@visactor/vrender-components 0.21.0-alpha.4 → 0.21.0-beta.0

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.
Files changed (90) hide show
  1. package/cjs/axis/type.d.ts +2 -2
  2. package/cjs/axis/type.js.map +1 -1
  3. package/cjs/data-zoom/type.d.ts +1 -1
  4. package/cjs/data-zoom/type.js.map +1 -1
  5. package/cjs/index.d.ts +1 -2
  6. package/cjs/index.js +2 -2
  7. package/cjs/index.js.map +1 -1
  8. package/cjs/interface.js.map +1 -1
  9. package/cjs/jsx/component-type.js +2 -1
  10. package/cjs/label/arc.js +2 -3
  11. package/cjs/label/arc.js.map +1 -1
  12. package/cjs/label/base.js +12 -7
  13. package/cjs/label/base.js.map +1 -1
  14. package/cjs/label/overlap/place.d.ts +6 -1
  15. package/cjs/label/overlap/place.js +4 -4
  16. package/cjs/label/overlap/place.js.map +1 -1
  17. package/cjs/label/overlap/shiftY.d.ts +2 -1
  18. package/cjs/label/overlap/shiftY.js +72 -18
  19. package/cjs/label/overlap/shiftY.js.map +1 -1
  20. package/cjs/label/polygon.js +1 -1
  21. package/cjs/label/rect.js +1 -1
  22. package/cjs/legend/color/type.d.ts +2 -2
  23. package/cjs/legend/color/type.js.map +1 -1
  24. package/cjs/legend/discrete/type.d.ts +1 -1
  25. package/cjs/legend/discrete/type.js.map +1 -1
  26. package/cjs/marker/type.d.ts +2 -2
  27. package/cjs/marker/type.js.map +1 -1
  28. package/cjs/player/type/discrete-player.d.ts +3 -3
  29. package/cjs/player/type/discrete-player.js.map +1 -1
  30. package/cjs/player/type/index.d.ts +2 -2
  31. package/cjs/player/type/index.js.map +1 -1
  32. package/cjs/scrollbar/index.d.ts +1 -0
  33. package/cjs/scrollbar/index.js +2 -1
  34. package/cjs/scrollbar/index.js.map +1 -1
  35. package/cjs/scrollbar/scrollbar-plugin.d.ts +18 -15
  36. package/cjs/scrollbar/scrollbar-plugin.js +109 -97
  37. package/cjs/scrollbar/scrollbar-plugin.js.map +1 -1
  38. package/cjs/timeline/type.js.map +1 -1
  39. package/dist/index.es.js +506 -797
  40. package/es/axis/type.d.ts +2 -2
  41. package/es/axis/type.js.map +1 -1
  42. package/es/data-zoom/type.d.ts +1 -1
  43. package/es/data-zoom/type.js.map +1 -1
  44. package/es/index.d.ts +1 -2
  45. package/es/index.js +1 -3
  46. package/es/index.js.map +1 -1
  47. package/es/interface.js.map +1 -1
  48. package/es/jsx/component-type.js +2 -1
  49. package/es/label/arc.js +2 -3
  50. package/es/label/arc.js.map +1 -1
  51. package/es/label/base.js +12 -7
  52. package/es/label/base.js.map +1 -1
  53. package/es/label/overlap/place.d.ts +6 -1
  54. package/es/label/overlap/place.js +4 -4
  55. package/es/label/overlap/place.js.map +1 -1
  56. package/es/label/overlap/shiftY.d.ts +2 -1
  57. package/es/label/overlap/shiftY.js +68 -15
  58. package/es/label/overlap/shiftY.js.map +1 -1
  59. package/es/label/polygon.js +1 -1
  60. package/es/label/rect.js +1 -1
  61. package/es/legend/color/type.d.ts +2 -2
  62. package/es/legend/color/type.js.map +1 -1
  63. package/es/legend/discrete/type.d.ts +1 -1
  64. package/es/legend/discrete/type.js.map +1 -1
  65. package/es/marker/type.d.ts +2 -2
  66. package/es/marker/type.js.map +1 -1
  67. package/es/player/type/discrete-player.d.ts +3 -3
  68. package/es/player/type/discrete-player.js.map +1 -1
  69. package/es/player/type/index.d.ts +2 -2
  70. package/es/player/type/index.js.map +1 -1
  71. package/es/scrollbar/index.d.ts +1 -0
  72. package/es/scrollbar/index.js +2 -0
  73. package/es/scrollbar/index.js.map +1 -1
  74. package/es/scrollbar/scrollbar-plugin.d.ts +18 -15
  75. package/es/scrollbar/scrollbar-plugin.js +111 -94
  76. package/es/scrollbar/scrollbar-plugin.js.map +1 -1
  77. package/es/timeline/type.js.map +1 -1
  78. package/package.json +10 -10
  79. package/cjs/gif/gif.d.ts +0 -29
  80. package/cjs/gif/gif.js +0 -59
  81. package/cjs/gif/gif.js.map +0 -1
  82. package/cjs/gif/index.d.ts +0 -1
  83. package/cjs/gif/index.js +0 -21
  84. package/cjs/gif/index.js.map +0 -1
  85. package/es/gif/gif.d.ts +0 -29
  86. package/es/gif/gif.js +0 -55
  87. package/es/gif/gif.js.map +0 -1
  88. package/es/gif/index.d.ts +0 -1
  89. package/es/gif/index.js +0 -2
  90. package/es/gif/index.js.map +0 -1
package/dist/index.es.js CHANGED
@@ -2086,7 +2086,8 @@ const DefaultAttribute = Object.assign(Object.assign(Object.assign({
2086
2086
  globalZIndex: 1,
2087
2087
  globalCompositeOperation: "",
2088
2088
  overflow: "hidden",
2089
- shadowPickMode: "graphic"
2089
+ shadowPickMode: "graphic",
2090
+ keepStrokeScale: !1
2090
2091
  }, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
2091
2092
  const DefaultArcAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
2092
2093
  startAngle: 0,
@@ -4372,7 +4373,7 @@ class ResourceLoader {
4372
4373
  }
4373
4374
  static GetFile(url, type) {
4374
4375
  let data = ResourceLoader.cache.get(url);
4375
- return data ? "fail" === data.loadState ? Promise.reject() : "init" === data.loadState || "loading" === data.loadState ? data.dataPromise.then(data => data.data) : Promise.resolve(data.data) : (data = {
4376
+ return data ? "init" === data.loadState || "fail" === data.loadState ? Promise.reject() : "loading" === data.loadState ? data.dataPromise.then(data => data.data) : Promise.resolve(data.data) : (data = {
4376
4377
  type: type,
4377
4378
  loadState: "init"
4378
4379
  }, ResourceLoader.cache.set(url, data), "arrayBuffer" === type ? data.dataPromise = application.global.loadArrayBuffer(url) : "blob" === type ? data.dataPromise = application.global.loadBlob(url) : "json" === type && (data.dataPromise = application.global.loadJson(url)), data.dataPromise.then(data => data.data));
@@ -6517,7 +6518,7 @@ class BaseRender {
6517
6518
  }
6518
6519
  }
6519
6520
 
6520
- const parse$1 = function () {
6521
+ const parse = function () {
6521
6522
  const tokens = {
6522
6523
  linearGradient: /^(linear\-gradient)/i,
6523
6524
  radialGradient: /^(radial\-gradient)/i,
@@ -6670,7 +6671,7 @@ class GradientParser {
6670
6671
  }
6671
6672
  static Parse(c) {
6672
6673
  if (GradientParser.IsGradientStr(c)) try {
6673
- const datum = parse$1(c)[0];
6674
+ const datum = parse(c)[0];
6674
6675
  if (datum) {
6675
6676
  if ("linear" === datum.type) return GradientParser.ParseLinear(datum);
6676
6677
  if ("radial" === datum.type) return GradientParser.ParseRadial(datum);
@@ -7027,7 +7028,8 @@ class DefaultArcRenderContribution {
7027
7028
  x: originX = arcAttribute.x,
7028
7029
  y: originY = arcAttribute.y,
7029
7030
  scaleX = arcAttribute.scaleX,
7030
- scaleY = arcAttribute.scaleY
7031
+ scaleY = arcAttribute.scaleY,
7032
+ keepStrokeScale = arcAttribute.keepStrokeScale
7031
7033
  } = arc.attribute;
7032
7034
  let {
7033
7035
  innerRadius = arcAttribute.innerRadius,
@@ -7039,7 +7041,7 @@ class DefaultArcRenderContribution {
7039
7041
  {
7040
7042
  distance = arcAttribute[key].distance
7041
7043
  } = borderStyle,
7042
- d = getScaledStroke(context, distance, context.dpr),
7044
+ d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
7043
7045
  deltaAngle = distance / outerRadius,
7044
7046
  sign = "outerBorder" === key ? 1 : -1;
7045
7047
  if (arc.setAttributes({
@@ -7084,14 +7086,15 @@ class DefaultCircleRenderContribution {
7084
7086
  x: originX = circleAttribute.x,
7085
7087
  y: originY = circleAttribute.y,
7086
7088
  scaleX = circleAttribute.scaleX,
7087
- scaleY = circleAttribute.scaleY
7089
+ scaleY = circleAttribute.scaleY,
7090
+ keepStrokeScale = circleAttribute.keepStrokeScale
7088
7091
  } = circle.attribute,
7089
7092
  renderBorder = (borderStyle, key) => {
7090
7093
  const doStroke = !(!borderStyle || !borderStyle.stroke),
7091
7094
  {
7092
7095
  distance = circleAttribute[key].distance
7093
7096
  } = borderStyle,
7094
- d = getScaledStroke(context, distance, context.dpr),
7097
+ d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
7095
7098
  sign = "outerBorder" === key ? 1 : -1;
7096
7099
  if (context.beginPath(), context.arc(x, y, radius + sign * d, startAngle, endAngle), context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(circle, circle.attribute, circleAttribute), strokeCb) strokeCb(context, borderStyle, circleAttribute[key]);else if (doStroke) {
7097
7100
  const lastOpacity = circleAttribute[key].opacity;
@@ -7210,7 +7213,8 @@ class DefaultRectRenderContribution {
7210
7213
  scaleX = rectAttribute.scaleX,
7211
7214
  scaleY = rectAttribute.scaleY,
7212
7215
  x1: x1,
7213
- y1: y1
7216
+ y1: y1,
7217
+ keepStrokeScale = rectAttribute.keepStrokeScale
7214
7218
  } = rect.attribute;
7215
7219
  let {
7216
7220
  width: width,
@@ -7223,7 +7227,7 @@ class DefaultRectRenderContribution {
7223
7227
  {
7224
7228
  distance = rectAttribute[key].distance
7225
7229
  } = borderStyle,
7226
- d = getScaledStroke(context, distance, context.dpr),
7230
+ d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
7227
7231
  nextX = x + sign * d,
7228
7232
  nextY = y + sign * d,
7229
7233
  dw = 2 * d;
@@ -7353,9 +7357,8 @@ class DefaultImageRenderContribution extends DefaultRectRenderContribution {
7353
7357
  constructor() {
7354
7358
  super(...arguments), this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
7355
7359
  }
7356
- drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
7357
- if (!(image.isGifImage && image.renderFrame && image.playing)) return super.drawShape(image, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
7358
- image.renderFrame(context, x, y);
7360
+ drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
7361
+ return super.drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
7359
7362
  }
7360
7363
  }
7361
7364
  const defaultImageRenderContribution = new DefaultImageRenderContribution();
@@ -7381,14 +7384,15 @@ class DefaultSymbolRenderContribution {
7381
7384
  x: originX = symbolAttribute.x,
7382
7385
  y: originY = symbolAttribute.y,
7383
7386
  scaleX = symbolAttribute.scaleX,
7384
- scaleY = symbolAttribute.scaleY
7387
+ scaleY = symbolAttribute.scaleY,
7388
+ keepStrokeScale = symbolAttribute.keepStrokeScale
7385
7389
  } = symbol.attribute,
7386
7390
  renderBorder = (borderStyle, key) => {
7387
7391
  const doStroke = !(!borderStyle || !borderStyle.stroke),
7388
7392
  {
7389
7393
  distance = symbolAttribute[key].distance
7390
7394
  } = borderStyle,
7391
- d = getScaledStroke(context, distance, context.dpr),
7395
+ d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
7392
7396
  sign = "outerBorder" === key ? 1 : -1;
7393
7397
  if (context.beginPath(), !1 === parsedPath.drawOffset(context, size, x, y, sign * d) && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), strokeCb) strokeCb(context, borderStyle, symbolAttribute[key]);else if (doStroke) {
7394
7398
  const lastOpacity = symbolAttribute[key].opacity;
@@ -9093,12 +9097,10 @@ let DefaultCanvasImageRender = class extends BaseRender {
9093
9097
  const {
9094
9098
  image: url
9095
9099
  } = image.attribute;
9096
- if (!image.isGifImage) {
9097
- if (!url || !image.resources) return;
9098
- const res = image.resources.get(url);
9099
- if ("loading" === res.state && isString(url)) return void ResourceLoader.improveImageLoading(url);
9100
- if ("success" !== res.state) return;
9101
- }
9100
+ if (!url || !image.resources) return;
9101
+ const res = image.resources.get(url);
9102
+ if ("loading" === res.state && isString(url)) return void ResourceLoader.improveImageLoading(url);
9103
+ if ("success" !== res.state) return;
9102
9104
  const {
9103
9105
  context: context
9104
9106
  } = renderService.drawParams;
@@ -10218,6 +10220,9 @@ class BaseSymbol {
10218
10220
  bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
10219
10221
  } else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
10220
10222
  }
10223
+ parseSize(size) {
10224
+ return isNumber(size) ? size : Math.min(size[0], size[1]);
10225
+ }
10221
10226
  }
10222
10227
 
10223
10228
  function circle(ctx, r, x, y, z) {
@@ -10228,13 +10233,13 @@ class CircleSymbol extends BaseSymbol {
10228
10233
  super(...arguments), this.type = "circle", this.pathStr = "M0.5,0A0.5,0.5,0,1,1,-0.5,0A0.5,0.5,0,1,1,0.5,0";
10229
10234
  }
10230
10235
  draw(ctx, size, x, y, z) {
10231
- return circle(ctx, size / 2, x, y, z);
10236
+ return circle(ctx, this.parseSize(size) / 2, x, y, z);
10232
10237
  }
10233
10238
  drawOffset(ctx, size, x, y, offset, z) {
10234
- return circle(ctx, size / 2 + offset, x, y, z);
10239
+ return circle(ctx, this.parseSize(size) / 2 + offset, x, y, z);
10235
10240
  }
10236
10241
  drawToSvgPath(size, x, y, z) {
10237
- const r = size / 2;
10242
+ const r = this.parseSize(size) / 2;
10238
10243
  return `M ${x - r}, ${y} a ${r},${r} 0 1,0 ${2 * r},0 a ${r},${r} 0 1,0 -${2 * r},0`;
10239
10244
  }
10240
10245
  }
@@ -10251,10 +10256,10 @@ class CrossSymbol extends BaseSymbol {
10251
10256
  super(...arguments), this.type = "cross", this.pathStr = "M-0.5,-0.2L-0.5,0.2L-0.2,0.2L-0.2,0.5L0.2,0.5L0.2,0.2L0.5,0.2L0.5,-0.2L0.2,-0.2L0.2,-0.5L-0.2,-0.5L-0.2,-0.2Z";
10252
10257
  }
10253
10258
  draw(ctx, size, x, y, z) {
10254
- return cross(ctx, size / 6, x, y, z);
10259
+ return cross(ctx, this.parseSize(size) / 6, x, y, z);
10255
10260
  }
10256
10261
  drawOffset(ctx, size, x, y, offset, z) {
10257
- return crossOffset(ctx, size / 6, x, y, offset, z);
10262
+ return crossOffset(ctx, this.parseSize(size) / 6, x, y, offset, z);
10258
10263
  }
10259
10264
  }
10260
10265
  var cross$1 = new CrossSymbol();
@@ -10267,13 +10272,13 @@ class DiamondSymbol extends BaseSymbol {
10267
10272
  super(...arguments), this.type = "diamond", this.pathStr = "M-0.5,0L0,-0.5L0.5,0L0,0.5Z";
10268
10273
  }
10269
10274
  draw(ctx, size, x, y, z) {
10270
- return diamond(ctx, size / 2, x, y, z);
10275
+ return diamond(ctx, this.parseSize(size) / 2, x, y, z);
10271
10276
  }
10272
10277
  drawFitDir(ctx, size, x, y, z) {
10273
- return diamond(ctx, size / 2, x, y, z);
10278
+ return diamond(ctx, this.parseSize(size) / 2, x, y, z);
10274
10279
  }
10275
10280
  drawOffset(ctx, size, x, y, offset, z) {
10276
- return diamond(ctx, size / 2 + offset, x, y, z);
10281
+ return diamond(ctx, this.parseSize(size) / 2 + offset, x, y, z);
10277
10282
  }
10278
10283
  }
10279
10284
  var diamond$1 = new DiamondSymbol();
@@ -10287,10 +10292,10 @@ class SquareSymbol extends BaseSymbol {
10287
10292
  super(...arguments), this.type = "square", this.pathStr = "M-0.5,-0.5h1v1h-1Z";
10288
10293
  }
10289
10294
  draw(ctx, size, x, y) {
10290
- return square(ctx, size / 2, x, y);
10295
+ return square(ctx, this.parseSize(size) / 2, x, y);
10291
10296
  }
10292
10297
  drawOffset(ctx, size, x, y, offset) {
10293
- return square(ctx, size / 2 + offset, x, y);
10298
+ return square(ctx, this.parseSize(size) / 2 + offset, x, y);
10294
10299
  }
10295
10300
  }
10296
10301
  var square$1 = new SquareSymbol();
@@ -10304,10 +10309,10 @@ class TriangleUpSymbol extends BaseSymbol {
10304
10309
  super(...arguments), this.type = "triangleUp", this.pathStr = "M0.5,0.5 L-0.5,0.5 L0,-0.5 Z";
10305
10310
  }
10306
10311
  draw(ctx, size, x, y) {
10307
- return trianglUpOffset(ctx, size / 2, x, y);
10312
+ return trianglUpOffset(ctx, this.parseSize(size) / 2, x, y);
10308
10313
  }
10309
10314
  drawOffset(ctx, size, x, y, offset) {
10310
- return trianglUpOffset(ctx, size / 2, x, y, offset);
10315
+ return trianglUpOffset(ctx, this.parseSize(size) / 2, x, y, offset);
10311
10316
  }
10312
10317
  }
10313
10318
  var triangleUp = new TriangleUpSymbol();
@@ -10339,10 +10344,10 @@ class StarSymbol extends BaseSymbol {
10339
10344
  super(...arguments), this.type = "star", this.pathStr = "M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z";
10340
10345
  }
10341
10346
  draw(ctx, size, transX, transY) {
10342
- return star(ctx, size / 2, transX, transY);
10347
+ return star(ctx, this.parseSize(size) / 2, transX, transY);
10343
10348
  }
10344
10349
  drawOffset(ctx, size, transX, transY, offset) {
10345
- return star(ctx, size / 2 + offset, transX, transY);
10350
+ return star(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10346
10351
  }
10347
10352
  }
10348
10353
  var star$1 = new StarSymbol();
@@ -10360,10 +10365,10 @@ class ArrowSymbol extends BaseSymbol {
10360
10365
  super(...arguments), this.type = "arrow", this.pathStr = "M-0.07142857142857142,0.5L0.07142857142857142,0.5L0.07142857142857142,-0.0625L0.2,-0.0625L0,-0.5L-0.2,-0.0625L-0.07142857142857142,-0.0625Z";
10361
10366
  }
10362
10367
  draw(ctx, size, transX, transY) {
10363
- return arrow(ctx, size / 2, transX, transY);
10368
+ return arrow(ctx, this.parseSize(size) / 2, transX, transY);
10364
10369
  }
10365
10370
  drawOffset(ctx, size, transX, transY, offset) {
10366
- return arrow(ctx, size / 2 + offset, transX, transY);
10371
+ return arrow(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10367
10372
  }
10368
10373
  }
10369
10374
  var arrow$1 = new ArrowSymbol();
@@ -10377,10 +10382,10 @@ class WedgeSymbol extends BaseSymbol {
10377
10382
  super(...arguments), this.type = "wedge", this.pathStr = "M0,-0.5773502691896257L-0.125,0.28867513459481287L0.125,0.28867513459481287Z";
10378
10383
  }
10379
10384
  draw(ctx, size, transX, transY) {
10380
- return wedge(ctx, size / 2, transX, transY);
10385
+ return wedge(ctx, this.parseSize(size) / 2, transX, transY);
10381
10386
  }
10382
10387
  drawOffset(ctx, size, transX, transY, offset) {
10383
- return wedge(ctx, size / 2 + offset, transX, transY);
10388
+ return wedge(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10384
10389
  }
10385
10390
  }
10386
10391
  var wedge$1 = new WedgeSymbol();
@@ -10393,10 +10398,10 @@ class StrokeSymbol extends BaseSymbol {
10393
10398
  super(...arguments), this.type = "stroke", this.pathStr = "";
10394
10399
  }
10395
10400
  draw(ctx, size, transX, transY) {
10396
- return stroke(ctx, size / 2, transX, transY);
10401
+ return stroke(ctx, this.parseSize(size) / 2, transX, transY);
10397
10402
  }
10398
10403
  drawOffset(ctx, size, transX, transY, offset) {
10399
- return stroke(ctx, size / 2 + offset, transX, transY);
10404
+ return stroke(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10400
10405
  }
10401
10406
  }
10402
10407
  var stroke$1 = new StrokeSymbol();
@@ -10418,10 +10423,10 @@ class WyeSymbol extends BaseSymbol {
10418
10423
  super(...arguments), this.type = "wye", this.pathStr = "M0.25 0.14433756729740646L0.25 0.6443375672974064L-0.25 0.6443375672974064L-0.25 0.14433756729740643L-0.6830127018922193 -0.10566243270259357L-0.4330127018922193 -0.5386751345948129L0 -0.28867513459481287L0.4330127018922193 -0.5386751345948129L0.6830127018922193 -0.10566243270259357Z";
10419
10424
  }
10420
10425
  draw(ctx, size, transX, transY) {
10421
- return wye(ctx, size / 2, transX, transY);
10426
+ return wye(ctx, this.parseSize(size) / 2, transX, transY);
10422
10427
  }
10423
10428
  drawOffset(ctx, size, transX, transY, offset) {
10424
- return wye(ctx, size / 2 + offset, transX, transY);
10429
+ return wye(ctx, this.parseSize(size) / 2 + offset, transX, transY);
10425
10430
  }
10426
10431
  }
10427
10432
  var wye$1 = new WyeSymbol();
@@ -10434,10 +10439,10 @@ class TriangleLeftSymbol extends BaseSymbol {
10434
10439
  super(...arguments), this.type = "triangleLeft", this.pathStr = "M-0.5,0 L0.5,0.5 L0.5,-0.5 Z";
10435
10440
  }
10436
10441
  draw(ctx, size, x, y) {
10437
- return trianglLeftOffset(ctx, size / 2, x, y, 0);
10442
+ return trianglLeftOffset(ctx, this.parseSize(size) / 2, x, y, 0);
10438
10443
  }
10439
10444
  drawOffset(ctx, size, x, y, offset) {
10440
- return trianglLeftOffset(ctx, size / 2, x, y, offset);
10445
+ return trianglLeftOffset(ctx, this.parseSize(size) / 2, x, y, offset);
10441
10446
  }
10442
10447
  }
10443
10448
  var triangleLeft = new TriangleLeftSymbol();
@@ -10451,10 +10456,10 @@ class TriangleRightSymbol extends BaseSymbol {
10451
10456
  super(...arguments), this.type = "triangleRight", this.pathStr = "M-0.5,0.5 L0.5,0 L-0.5,-0.5 Z";
10452
10457
  }
10453
10458
  draw(ctx, size, x, y) {
10454
- return trianglRightOffset(ctx, size / 2, x, y);
10459
+ return trianglRightOffset(ctx, this.parseSize(size) / 2, x, y);
10455
10460
  }
10456
10461
  drawOffset(ctx, size, x, y, offset) {
10457
- return trianglRightOffset(ctx, size / 2, x, y, offset);
10462
+ return trianglRightOffset(ctx, this.parseSize(size) / 2, x, y, offset);
10458
10463
  }
10459
10464
  }
10460
10465
  var triangleRight = new TriangleRightSymbol();
@@ -10468,10 +10473,10 @@ class TriangleDownSymbol extends BaseSymbol {
10468
10473
  super(...arguments), this.type = "triangleDown", this.pathStr = "M-0.5,-0.5 L0.5,-0.5 L0,0.5 Z";
10469
10474
  }
10470
10475
  draw(ctx, size, x, y) {
10471
- return trianglDownOffset(ctx, size / 2, x, y);
10476
+ return trianglDownOffset(ctx, this.parseSize(size) / 2, x, y);
10472
10477
  }
10473
10478
  drawOffset(ctx, size, x, y, offset) {
10474
- return trianglDownOffset(ctx, size / 2, x, y, offset);
10479
+ return trianglDownOffset(ctx, this.parseSize(size) / 2, x, y, offset);
10475
10480
  }
10476
10481
  }
10477
10482
  var triangleDown = new TriangleDownSymbol();
@@ -10486,10 +10491,10 @@ class ThinTriangleSymbol extends BaseSymbol {
10486
10491
  super(...arguments), this.type = "thinTriangle", this.pathStr = "M0,-0.5773502691896257L-0.5,0.28867513459481287L0.5,0.28867513459481287Z";
10487
10492
  }
10488
10493
  draw(ctx, size, x, y) {
10489
- return thinTriangle(ctx, size / 2 / sqrt3, x, y);
10494
+ return thinTriangle(ctx, this.parseSize(size) / 2 / sqrt3, x, y);
10490
10495
  }
10491
10496
  drawOffset(ctx, size, x, y, offset) {
10492
- return thinTriangle(ctx, size / 2 / sqrt3 + offset, x, y);
10497
+ return thinTriangle(ctx, this.parseSize(size) / 2 / sqrt3 + offset, x, y);
10493
10498
  }
10494
10499
  }
10495
10500
  var thinTriangle$1 = new ThinTriangleSymbol();
@@ -10503,10 +10508,10 @@ class Arrow2LeftSymbol extends BaseSymbol {
10503
10508
  super(...arguments), this.type = "arrow2Left", this.pathStr = "M 0.25 -0.5 L -0.25 0 l 0.25 0.5";
10504
10509
  }
10505
10510
  draw(ctx, size, transX, transY) {
10506
- return arrow2Left(ctx, size / 4, transX, transY);
10511
+ return arrow2Left(ctx, this.parseSize(size) / 4, transX, transY);
10507
10512
  }
10508
10513
  drawOffset(ctx, size, transX, transY, offset) {
10509
- return arrow2Left(ctx, size / 4 + offset, transX, transY);
10514
+ return arrow2Left(ctx, this.parseSize(size) / 4 + offset, transX, transY);
10510
10515
  }
10511
10516
  }
10512
10517
  var arrow2Left$1 = new Arrow2LeftSymbol();
@@ -10520,10 +10525,10 @@ class Arrow2RightSymbol extends BaseSymbol {
10520
10525
  super(...arguments), this.type = "arrow2Right", this.pathStr = "M -0.25 -0.5 l 0.25 0 l -0.25 0.5";
10521
10526
  }
10522
10527
  draw(ctx, size, transX, transY) {
10523
- return arrow2Right(ctx, size / 4, transX, transY);
10528
+ return arrow2Right(ctx, this.parseSize(size) / 4, transX, transY);
10524
10529
  }
10525
10530
  drawOffset(ctx, size, transX, transY, offset) {
10526
- return arrow2Right(ctx, size / 4 + offset, transX, transY);
10531
+ return arrow2Right(ctx, this.parseSize(size) / 4 + offset, transX, transY);
10527
10532
  }
10528
10533
  }
10529
10534
  var arrow2Right$1 = new Arrow2RightSymbol();
@@ -10537,10 +10542,10 @@ class Arrow2UpSymbol extends BaseSymbol {
10537
10542
  super(...arguments), this.type = "arrow2Up", this.pathStr = "M -0.5 0.25 L 0 -0.25 l 0.5 0.25";
10538
10543
  }
10539
10544
  draw(ctx, size, transX, transY) {
10540
- return arrow2Up(ctx, size / 4, transX, transY);
10545
+ return arrow2Up(ctx, this.parseSize(size) / 4, transX, transY);
10541
10546
  }
10542
10547
  drawOffset(ctx, size, transX, transY, offset) {
10543
- return arrow2Up(ctx, size / 4 + offset, transX, transY);
10548
+ return arrow2Up(ctx, this.parseSize(size) / 4 + offset, transX, transY);
10544
10549
  }
10545
10550
  }
10546
10551
  var arrow2Up$1 = new Arrow2UpSymbol();
@@ -10554,10 +10559,10 @@ class Arrow2DownSymbol extends BaseSymbol {
10554
10559
  super(...arguments), this.type = "arrow2Down", this.pathStr = "M -0.5 -0.25 L 0 0.25 l 0.5 -0.25";
10555
10560
  }
10556
10561
  draw(ctx, size, transX, transY) {
10557
- return arrow2Down(ctx, size / 4, transX, transY);
10562
+ return arrow2Down(ctx, this.parseSize(size) / 4, transX, transY);
10558
10563
  }
10559
10564
  drawOffset(ctx, size, transX, transY, offset) {
10560
- return arrow2Down(ctx, size / 4 + offset, transX, transY);
10565
+ return arrow2Down(ctx, this.parseSize(size) / 4 + offset, transX, transY);
10561
10566
  }
10562
10567
  }
10563
10568
  var arrow2Down$1 = new Arrow2DownSymbol();
@@ -10570,13 +10575,13 @@ class LineVSymbol extends BaseSymbol {
10570
10575
  super(...arguments), this.type = "lineV", this.pathStr = "M0,-0.5L0,0.5";
10571
10576
  }
10572
10577
  draw(ctx, size, x, y, z) {
10573
- return lineV(ctx, size / 2, x, y);
10578
+ return lineV(ctx, this.parseSize(size) / 2, x, y);
10574
10579
  }
10575
10580
  drawOffset(ctx, size, x, y, offset, z) {
10576
- return lineV(ctx, size / 2 + offset, x, y);
10581
+ return lineV(ctx, this.parseSize(size) / 2 + offset, x, y);
10577
10582
  }
10578
10583
  drawToSvgPath(size, x, y, z) {
10579
- const r = size / 2;
10584
+ const r = this.parseSize(size) / 2;
10580
10585
  return `M ${x}, ${y - r} L ${x},${y + r}`;
10581
10586
  }
10582
10587
  }
@@ -10590,13 +10595,13 @@ class LineHSymbol extends BaseSymbol {
10590
10595
  super(...arguments), this.type = "lineH", this.pathStr = "M-0.5,0L0.5,0";
10591
10596
  }
10592
10597
  draw(ctx, size, x, y, z) {
10593
- return lineH(ctx, size / 2, x, y);
10598
+ return lineH(ctx, this.parseSize(size) / 2, x, y);
10594
10599
  }
10595
10600
  drawOffset(ctx, size, x, y, offset, z) {
10596
- return lineH(ctx, size / 2 + offset, x, y);
10601
+ return lineH(ctx, this.parseSize(size) / 2 + offset, x, y);
10597
10602
  }
10598
10603
  drawToSvgPath(size, x, y, z) {
10599
- const r = size / 2;
10604
+ const r = this.parseSize(size) / 2;
10600
10605
  return `M ${x - r}, ${y} L ${x + r},${y}`;
10601
10606
  }
10602
10607
  }
@@ -10610,13 +10615,13 @@ class CloseSymbol extends BaseSymbol {
10610
10615
  super(...arguments), this.type = "close", this.pathStr = "M-0.5,-0.5L0.5,0.5,M0.5,-0.5L-0.5,0.5";
10611
10616
  }
10612
10617
  draw(ctx, size, x, y, z) {
10613
- return close(ctx, size / 2, x, y);
10618
+ return close(ctx, this.parseSize(size) / 2, x, y);
10614
10619
  }
10615
10620
  drawOffset(ctx, size, x, y, offset, z) {
10616
- return close(ctx, size / 2 + offset, x, y);
10621
+ return close(ctx, this.parseSize(size) / 2 + offset, x, y);
10617
10622
  }
10618
10623
  drawToSvgPath(size, x, y, z) {
10619
- const r = size / 2;
10624
+ const r = this.parseSize(size) / 2;
10620
10625
  return `M ${x - r}, ${y - r} L ${x + r},${y + r} M ${x + r}, ${y - r} L ${x - r},${y + r}`;
10621
10626
  }
10622
10627
  }
@@ -10650,15 +10655,18 @@ class CustomSymbolClass {
10650
10655
  this.pathStr = "", this.type = type, isArray(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
10651
10656
  }
10652
10657
  drawOffset(ctx, size, x, y, offset, z, cb) {
10653
- return this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
10658
+ return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
10654
10659
  ctx.beginPath(), renderCommandList(item.path.commandList, ctx, x, y, size, size), cb && cb(item.path, item.attribute);
10655
10660
  }), !1) : (renderCommandList(this.path.commandList, ctx, x, y, size + offset, size + offset), !1);
10656
10661
  }
10657
10662
  draw(ctx, size, x, y, z, cb) {
10658
- return this.drawOffset(ctx, size, x, y, 0, z, cb);
10663
+ return size = this.parseSize(size), this.drawOffset(ctx, size, x, y, 0, z, cb);
10664
+ }
10665
+ parseSize(size) {
10666
+ return isNumber(size) ? size : Math.min(size[0], size[1]);
10659
10667
  }
10660
10668
  bounds(size, bounds) {
10661
- if (this.isSvg) {
10669
+ if (size = this.parseSize(size), this.isSvg) {
10662
10670
  if (!this.svgCache) return;
10663
10671
  return bounds.clear(), void this.svgCache.forEach(_ref => {
10664
10672
  let {
@@ -11162,7 +11170,11 @@ class Paragraph {
11162
11170
  case "sub":
11163
11171
  baseline += this.descent / 2;
11164
11172
  }
11165
- "vertical" === direction && (ctx.save(), ctx.rotateAbout(Math.PI / 2, left, baseline), ctx.translate(-this.heightOrigin || -this.lineHeight / 2, -this.descent / 2), ctx.translate(left, baseline), left = 0, baseline = 0), this.character.stroke && (applyStrokeStyle(ctx, this.character), ctx.strokeText(text, left, baseline)), applyFillStyle(ctx, this.character), this.character.fill && ctx.fillText(text, left, baseline), this.character.fill && ("boolean" == typeof this.character.lineThrough || "boolean" == typeof this.character.underline ? (this.character.underline && ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1), this.character.lineThrough && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)) : "underline" === this.character.textDecoration ? ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1) : "line-through" === this.character.textDecoration && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)), "vertical" === direction && ctx.restore();
11173
+ "vertical" === direction && (ctx.save(), ctx.rotateAbout(Math.PI / 2, left, baseline), ctx.translate(-this.heightOrigin || -this.lineHeight / 2, -this.descent / 2), ctx.translate(left, baseline), left = 0, baseline = 0);
11174
+ const {
11175
+ lineWidth = 1
11176
+ } = this.character;
11177
+ this.character.stroke && lineWidth && (applyStrokeStyle(ctx, this.character), ctx.strokeText(text, left, baseline)), applyFillStyle(ctx, this.character), this.character.fill && ctx.fillText(text, left, baseline), this.character.fill && ("boolean" == typeof this.character.lineThrough || "boolean" == typeof this.character.underline ? (this.character.underline && ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1), this.character.lineThrough && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)) : "underline" === this.character.textDecoration ? ctx.fillRect(left, 1 + baseline, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1) : "line-through" === this.character.textDecoration && ctx.fillRect(left, 1 + baseline - this.ascent / 2, this.widthOrigin || this.width, this.character.fontSize ? Math.max(1, Math.floor(this.character.fontSize / 10)) : 1)), "vertical" === direction && ctx.restore();
11166
11178
  }
11167
11179
  getWidthWithEllips(direction) {
11168
11180
  let text = this.text;
@@ -13349,8 +13361,9 @@ class PickerBase {
13349
13361
  return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, (context, arcAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, arcAttribute, themeAttribute) => {
13350
13362
  if (picked) return !0;
13351
13363
  const lineWidth = arcAttribute.lineWidth || themeAttribute.lineWidth,
13352
- pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13353
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
13364
+ pickStrokeBuffer = arcAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
13365
+ keepStrokeScale = arcAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
13366
+ return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
13354
13367
  }), pickContext.highPerformanceRestore(), picked;
13355
13368
  }
13356
13369
  }
@@ -13572,8 +13585,9 @@ class RectPickerBase {
13572
13585
  if (!onlyTranslate || rect.shadowRoot || isNumber(cornerRadius, !0) && 0 !== cornerRadius || isArray(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
13573
13586
  if (picked) return !0;
13574
13587
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
13575
- pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13576
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
13588
+ pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
13589
+ keepStrokeScale = rectAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
13590
+ return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(point.x, point.y), picked;
13577
13591
  });else {
13578
13592
  const {
13579
13593
  fill = rectAttribute.fill,
@@ -13752,8 +13766,9 @@ class BaseLinePicker extends BaseRender {
13752
13766
  return this.canvasRenderer.drawShape(graphic, pickContext, x, y, {}, null, context => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, lineAttribute, themeAttribute) => {
13753
13767
  if (picked) return !0;
13754
13768
  const lineWidth = lineAttribute.lineWidth || themeAttribute.lineWidth,
13755
- pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13756
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
13769
+ pickStrokeBuffer = lineAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
13770
+ keepStrokeScale = lineAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
13771
+ return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
13757
13772
  }), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
13758
13773
  }
13759
13774
  }
@@ -13888,8 +13903,9 @@ let DefaultCanvasSymbolPicker = class extends Base3dPicker {
13888
13903
  return this.canvasRenderer.drawShape(symbol, pickContext, x, y, {}, null, (context, symbolAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(pickPoint.x, pickPoint.y), picked), (context, symbolAttribute, themeAttribute) => {
13889
13904
  if (picked) return !0;
13890
13905
  const lineWidth = symbolAttribute.lineWidth || themeAttribute.lineWidth,
13891
- pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer;
13892
- return pickContext.lineWidth = getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
13906
+ pickStrokeBuffer = symbolAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
13907
+ keepStrokeScale = symbolAttribute.keepStrokeScale || themeAttribute.keepStrokeScale;
13908
+ return pickContext.lineWidth = keepStrokeScale ? lineWidth + pickStrokeBuffer : getScaledStroke(pickContext, lineWidth + pickStrokeBuffer, pickContext.dpr), picked = context.isPointInStroke(pickPoint.x, pickPoint.y), picked;
13893
13909
  }), this.canvasRenderer.z = 0, pickContext.modelMatrix !== lastModelMatrix && mat4Allocate.free(pickContext.modelMatrix), pickContext.modelMatrix = lastModelMatrix, pickContext.highPerformanceRestore(), picked;
13894
13910
  }
13895
13911
  };
@@ -14536,6 +14552,288 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
14536
14552
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
14537
14553
  };
14538
14554
 
14555
+ var ScrollBarPlugin_1;
14556
+ let ScrollBarPlugin = ScrollBarPlugin_1 = class ScrollBarPlugin {
14557
+ constructor() {
14558
+ this.name = 'scrollbar';
14559
+ this.activeEvent = 'onRegister';
14560
+ this._uid = Generator.GenAutoIncrementId();
14561
+ this.key = this.name + this._uid;
14562
+ this.scroll = (e) => {
14563
+ var _a, _b;
14564
+ const graphic = e.target;
14565
+ const data = this.getScrollContainer(graphic);
14566
+ if (!data && !this.scrollContainer) {
14567
+ return;
14568
+ }
14569
+ if (!data && this.scrollContainer) {
14570
+ if (!this.scrollContainer.g.stage || this.scrollContainer.g.stage !== graphic.stage) {
14571
+ return;
14572
+ }
14573
+ const newScrollContainer = this.formatScrollContainer(this.scrollContainer.g);
14574
+ if (!newScrollContainer) {
14575
+ this.clearScrollbar(this.scrollContainer.g, 'all');
14576
+ return;
14577
+ }
14578
+ if (this.scrollContainer.showH && !newScrollContainer.showH) {
14579
+ this.clearScrollbar(this.scrollContainer.g, 'horizontal');
14580
+ }
14581
+ if (this.scrollContainer.showV && !newScrollContainer.showV) {
14582
+ this.clearScrollbar(this.scrollContainer.g, 'vertical');
14583
+ }
14584
+ this.scrollContainer = newScrollContainer;
14585
+ }
14586
+ else if (data && this.scrollContainer && data.g !== this.scrollContainer.g) {
14587
+ this.clearScrollbar(this.scrollContainer.g, 'all');
14588
+ }
14589
+ this.scrollContainer = data !== null && data !== void 0 ? data : this.scrollContainer;
14590
+ const scrollContainer = data.g;
14591
+ const { width, height, scrollX = 0, scrollY = 0 } = scrollContainer.attribute;
14592
+ let newScrollX = scrollX;
14593
+ let newScrollY = scrollY;
14594
+ let { showH, showV } = data;
14595
+ this.scrollContainerBounds = new Bounds().set(0, 0, scrollContainer.attribute.width, scrollContainer.attribute.height);
14596
+ if (showH && showH) {
14597
+ if (abs(e.deltaX) > abs(e.deltaY)) {
14598
+ showH = showH && true;
14599
+ showV = showV && false;
14600
+ }
14601
+ else {
14602
+ showH = showH && false;
14603
+ showV = showV && true;
14604
+ }
14605
+ }
14606
+ const childrenBounds = this.childrenBounds;
14607
+ childrenBounds.clear();
14608
+ childrenBounds.set(0, 0, scrollContainer.AABBBounds.width(), scrollContainer.AABBBounds.height());
14609
+ const scrollWidth = childrenBounds.width();
14610
+ const scrollHeight = childrenBounds.height();
14611
+ if (showH) {
14612
+ newScrollX = Math.max(Math.min(((_a = e.deltaX) !== null && _a !== void 0 ? _a : 0) - scrollX, scrollWidth - width), 0);
14613
+ }
14614
+ else {
14615
+ newScrollX = -scrollX;
14616
+ }
14617
+ if (showV) {
14618
+ newScrollY = Math.max(Math.min(((_b = e.deltaY) !== null && _b !== void 0 ? _b : 0) - scrollY, scrollHeight - height), 0);
14619
+ }
14620
+ else {
14621
+ newScrollY = -scrollY;
14622
+ }
14623
+ childrenBounds.translate(-newScrollX, -newScrollY);
14624
+ this.addOrUpdateScroll(showH, showV, scrollContainer.parent, scrollContainer);
14625
+ scrollContainer.setAttributes({
14626
+ scrollX: -newScrollX,
14627
+ scrollY: -newScrollY
14628
+ });
14629
+ };
14630
+ this.handleScrollBarChange = (params) => {
14631
+ if (!this.scrollContainer ||
14632
+ !this.scrollContainerBounds ||
14633
+ !this.childrenBounds ||
14634
+ !params ||
14635
+ !params.target ||
14636
+ !params.detail ||
14637
+ !params.detail.value) {
14638
+ return;
14639
+ }
14640
+ const scrollbar = params.target;
14641
+ const newRange = params.detail.value;
14642
+ if (scrollbar.attribute.direction === 'horizontal') {
14643
+ const scrollWidth = this.childrenBounds.width();
14644
+ this.scrollContainer.g.setAttributes({ scrollX: -newRange[0] * scrollWidth });
14645
+ }
14646
+ else {
14647
+ const scrollHeight = this.childrenBounds.height();
14648
+ this.scrollContainer.g.setAttributes({ scrollY: -newRange[0] * scrollHeight });
14649
+ }
14650
+ };
14651
+ }
14652
+ activate(context) {
14653
+ this.pluginService = context;
14654
+ const { stage } = this.pluginService;
14655
+ this.childrenBounds = new AABBBounds();
14656
+ stage.addEventListener('wheel', this.scroll);
14657
+ this.params = ScrollBarPlugin_1.defaultParams;
14658
+ }
14659
+ initEventOfScrollbar(scrollContainer, scrollbar, isHorozntal) {
14660
+ scrollContainer.addEventListener('pointerover', () => {
14661
+ scrollbar.setAttribute('visibleAll', true);
14662
+ });
14663
+ scrollContainer.addEventListener('pointermove', () => {
14664
+ scrollbar.setAttribute('visibleAll', true);
14665
+ });
14666
+ scrollContainer.addEventListener('pointerout', () => {
14667
+ scrollbar.setAttribute('visibleAll', false);
14668
+ });
14669
+ scrollbar.addEventListener('pointerover', () => {
14670
+ scrollbar.setAttribute('visibleAll', true);
14671
+ });
14672
+ scrollbar.addEventListener('pointerout', () => {
14673
+ scrollbar.setAttribute('visibleAll', true);
14674
+ });
14675
+ scrollbar.addEventListener('scrollUp', this.handleScrollBarChange);
14676
+ scrollbar.addEventListener(SCROLLBAR_EVENT, this.handleScrollBarChange);
14677
+ }
14678
+ addOrUpdateScroll(showH, showV, container, scrollContainer) {
14679
+ if (showH) {
14680
+ const { scrollBar: hScrollbar, isUpdate } = this.addOrUpdateHScroll(scrollContainer, container, true);
14681
+ if (!isUpdate) {
14682
+ this.initEventOfScrollbar(scrollContainer, hScrollbar, true);
14683
+ }
14684
+ }
14685
+ else {
14686
+ this.clearScrollbar(scrollContainer, 'horizontal');
14687
+ }
14688
+ if (showV) {
14689
+ const { scrollBar: vScrollbar, isUpdate } = this.addOrUpdateHScroll(scrollContainer, container, false);
14690
+ if (!isUpdate) {
14691
+ this.initEventOfScrollbar(scrollContainer, vScrollbar, false);
14692
+ }
14693
+ }
14694
+ else {
14695
+ this.clearScrollbar(scrollContainer, 'vertical');
14696
+ }
14697
+ }
14698
+ getDirection(isHorozntal) {
14699
+ return isHorozntal ? 'horizontal' : 'vertical';
14700
+ }
14701
+ addOrUpdateHScroll(scrollContainer, container, isHorozntal) {
14702
+ var _a;
14703
+ const direction = this.getDirection(isHorozntal);
14704
+ const name = `${(_a = scrollContainer.name) !== null && _a !== void 0 ? _a : scrollContainer._uid}_${this.getDirection(isHorozntal)}_${this.name}`;
14705
+ const scrollbars = container.children.filter((g) => g.name === name);
14706
+ let isUpdate = true;
14707
+ let scrollBar = scrollbars[0];
14708
+ const { y = 0, dy = 0, x = 0, dx = 0, height, width, zIndex = 0 } = this.scrollContainer.g.attribute;
14709
+ const attrs = {
14710
+ x: 0,
14711
+ y: 0,
14712
+ direction,
14713
+ zIndex: zIndex + 1,
14714
+ visibleAll: true,
14715
+ padding: [2, 0],
14716
+ railStyle: {
14717
+ fill: 'rgba(0, 0, 0, .1)'
14718
+ },
14719
+ range: [0, 0.05]
14720
+ };
14721
+ if (isHorozntal) {
14722
+ attrs.width = this.scrollContainerBounds.width();
14723
+ attrs.height = 12;
14724
+ }
14725
+ else {
14726
+ attrs.height = this.scrollContainerBounds.height();
14727
+ attrs.width = 12;
14728
+ }
14729
+ if (!scrollBar) {
14730
+ isUpdate = false;
14731
+ scrollBar = new ScrollBar(attrs);
14732
+ scrollBar.name = name;
14733
+ container.add(scrollBar);
14734
+ scrollBar.isScrollBar = true;
14735
+ }
14736
+ else if (scrollbars.length > 1) {
14737
+ scrollbars.forEach((child, index) => {
14738
+ var _a;
14739
+ if (index) {
14740
+ (_a = child.parent) === null || _a === void 0 ? void 0 : _a.removeChild(child);
14741
+ }
14742
+ });
14743
+ }
14744
+ const childrenBounds = this.childrenBounds;
14745
+ if (isHorozntal) {
14746
+ const ratio = Math.min(this.scrollContainerBounds.width() / childrenBounds.width(), 1);
14747
+ const start = Math.max(Math.min(this.childrenBounds.x1 / this.childrenBounds.width(), 0), ratio - 1);
14748
+ attrs.x = x + dx;
14749
+ attrs.y = y + dy + height - this.scrollContainerBounds.height();
14750
+ attrs.range = [-start, -start + ratio];
14751
+ }
14752
+ else {
14753
+ const ratio = Math.min(this.scrollContainerBounds.height() / childrenBounds.height(), 1);
14754
+ const start = Math.max(Math.min(this.childrenBounds.y1 / this.childrenBounds.height(), 0), ratio - 1);
14755
+ attrs.x = x + dx + width - this.scrollContainerBounds.width();
14756
+ attrs.y = y + dy;
14757
+ attrs.range = [-start, -start + ratio];
14758
+ }
14759
+ scrollBar.setAttributes(attrs);
14760
+ return {
14761
+ scrollBar,
14762
+ isUpdate
14763
+ };
14764
+ }
14765
+ clearScrollbar(scrollContainer, type) {
14766
+ if (!scrollContainer.parent) {
14767
+ return;
14768
+ }
14769
+ const scrollbarBars = scrollContainer.parent.children.filter((child) => {
14770
+ return child.isScrollBar && (type === 'all' || child.attribute.direction === type);
14771
+ });
14772
+ scrollbarBars.forEach((child) => {
14773
+ child.parent.removeChild(child);
14774
+ });
14775
+ }
14776
+ formatScrollContainer(g) {
14777
+ if (!g || g.type !== 'group' || !g.attribute) {
14778
+ return null;
14779
+ }
14780
+ const { overflow, width, height } = g.attribute;
14781
+ if (!overflow || overflow === 'hidden') {
14782
+ return null;
14783
+ }
14784
+ let showH = false;
14785
+ let showV = false;
14786
+ if (overflow === 'scroll') {
14787
+ showH = true;
14788
+ showV = true;
14789
+ }
14790
+ else {
14791
+ showH = overflow === 'scroll-x';
14792
+ showV = !showH;
14793
+ }
14794
+ if (!g.AABBBounds.empty()) {
14795
+ if (showH) {
14796
+ showH = width < g.AABBBounds.width();
14797
+ }
14798
+ if (showV) {
14799
+ showV = height < g.AABBBounds.height();
14800
+ }
14801
+ }
14802
+ return showH || showV ? { g: g, showH, showV } : null;
14803
+ }
14804
+ getScrollContainer(graphic) {
14805
+ let g = graphic;
14806
+ while (g) {
14807
+ const res = this.formatScrollContainer(g);
14808
+ if (res) {
14809
+ return res;
14810
+ }
14811
+ g = g.parent;
14812
+ }
14813
+ return null;
14814
+ }
14815
+ deactivate(context) {
14816
+ const { stage } = this.pluginService;
14817
+ stage.removeEventListener('wheel', this.scroll);
14818
+ }
14819
+ };
14820
+ ScrollBarPlugin.defaultParams = {
14821
+ timeout: 500
14822
+ };
14823
+ ScrollBarPlugin = ScrollBarPlugin_1 = __decorate([
14824
+ injectable()
14825
+ ], ScrollBarPlugin);
14826
+
14827
+ const scrollbarModule = new ContainerModule((bind, unbind, isBound, rebind) => {
14828
+ if (!isBound(ScrollBarPlugin)) {
14829
+ bind(ScrollBarPlugin).toSelf();
14830
+ bind(AutoEnablePlugins).toService(ScrollBarPlugin);
14831
+ }
14832
+ });
14833
+ function loadScrollbar() {
14834
+ container.load(scrollbarModule);
14835
+ }
14836
+
14539
14837
  function traverseGroup(group, cb) {
14540
14838
  group.forEachChildren(node => {
14541
14839
  const stopped = cb(node);
@@ -15993,24 +16291,29 @@ function defaultLabelPosition(type) {
15993
16291
  return DefaultPositions;
15994
16292
  }
15995
16293
  }
15996
- function clampText(text, width, height) {
16294
+ function clampText(text, width, height, padding = {}) {
15997
16295
  const { x1, x2, y1, y2 } = text.AABBBounds;
16296
+ const { top = 0, left = 0, right = 0, bottom = 0 } = padding;
15998
16297
  const minX = Math.min(x1, x2);
15999
16298
  const maxX = Math.max(x1, x2);
16000
16299
  const minY = Math.min(y1, y2);
16001
16300
  const maxY = Math.max(y1, y2);
16301
+ const minXWithPadding = 0 - left;
16302
+ const maxXWithPadding = width + right;
16303
+ const minYWithPadding = 0 - top;
16304
+ const maxYWithPadding = height + bottom;
16002
16305
  let dx = 0;
16003
16306
  let dy = 0;
16004
- if (minX < 0 && maxX - minX <= width) {
16307
+ if (minX < minXWithPadding && maxX - minX <= width) {
16005
16308
  dx = -minX;
16006
16309
  }
16007
- else if (maxX > width && minX - (maxX - width) >= 0) {
16310
+ else if (maxX > maxXWithPadding && minX - (maxX - width) >= minXWithPadding) {
16008
16311
  dx = width - maxX;
16009
16312
  }
16010
- if (minY < 0 && maxY - minY <= height) {
16313
+ if (minY < minYWithPadding && maxY - minY <= height) {
16011
16314
  dy = -minY;
16012
16315
  }
16013
- else if (maxY > height && minY - (maxY - height) >= 0) {
16316
+ else if (maxY > maxYWithPadding && minY - (maxY - height) >= minYWithPadding) {
16014
16317
  dy = height - maxY;
16015
16318
  }
16016
16319
  return { dx, dy };
@@ -16310,56 +16613,121 @@ function loadLabelComponent() {
16310
16613
  registerLine();
16311
16614
  }
16312
16615
 
16313
- function shiftY(texts, option = {}) {
16314
- const { maxIterations = 10, maxError = 0.1, padding = 1, maxY = Number.MAX_VALUE } = option;
16616
+ const isIntersect = (top, bottom) => {
16617
+ return Math.ceil(top) > Math.floor(bottom);
16618
+ };
16619
+ const isXIntersect = ([a, b], [c, d]) => {
16620
+ return d > a && b > c;
16621
+ };
16622
+ function getIntersectionLength(range1, range2) {
16623
+ const [start1, end1] = range1;
16624
+ const [start2, end2] = range2;
16625
+ const start = Math.max(start1, start2);
16626
+ const end = Math.min(end1, end2);
16627
+ return Math.max(0, end - start);
16628
+ }
16629
+ function shiftY(texts, option) {
16630
+ const { maxIterations = 10, maxError = 0.1, padding = 1, maxY = Number.MAX_VALUE, labelling } = option;
16315
16631
  const n = texts.length;
16316
16632
  if (n <= 1) {
16317
16633
  return texts;
16318
16634
  }
16319
- const isIntersect = ([a, b], [c, d]) => {
16320
- return d > a && b > c;
16321
- };
16635
+ const xMap = new Map();
16322
16636
  const textInformation = new Map();
16323
- const getY0 = (text) => textInformation.get(text).y0;
16324
- const getY = (text) => textInformation.get(text).y;
16637
+ const getY1Initial = (text) => textInformation.get(text).y1Initial;
16325
16638
  const getHeight = (text) => textInformation.get(text).height;
16639
+ const getY1 = (text) => textInformation.get(text).y1;
16640
+ const getY = (text) => textInformation.get(text).y;
16641
+ const getX = (text) => textInformation.get(text).x;
16326
16642
  const getX1 = (text) => textInformation.get(text).x1;
16327
16643
  const getX2 = (text) => textInformation.get(text).x2;
16328
- const setY = (text, y) => {
16329
- textInformation.get(text).y = y;
16644
+ const setY1 = (text, y) => {
16645
+ textInformation.get(text).y1 = y;
16330
16646
  };
16647
+ function adjustPositionInOneGroup(texts) {
16648
+ if (texts.length === 1) {
16649
+ return;
16650
+ }
16651
+ for (let i = texts.length - 1; i > 0; i--) {
16652
+ const curText = texts[i];
16653
+ const upperText = texts[i - 1];
16654
+ const lowerText = texts[i + 1];
16655
+ if (isIntersect(getY1(upperText) + getHeight(upperText), getY1(curText))) {
16656
+ const { y } = labelling(curText);
16657
+ if (!lowerText || !isIntersect(y + getHeight(curText) / 2, getY1(lowerText))) {
16658
+ if (y + getHeight(curText) / 2 <= maxY) {
16659
+ setY1(curText, getY1(curText) + y - getY(curText));
16660
+ }
16661
+ }
16662
+ }
16663
+ }
16664
+ }
16665
+ texts.sort((a, b) => a.attribute.x - b.attribute.x);
16331
16666
  for (const text of texts) {
16332
16667
  const { y1, y2, x1, x2 } = text.AABBBounds;
16333
- textInformation.set(text, { y0: y1, y: y1, height: y2 - y1, x1, x2 });
16668
+ const { x, y } = text.attribute;
16669
+ textInformation.set(text, { y1Initial: y1, y1, y2, y, height: y2 - y1, x1, x2, x });
16670
+ let hasRange = false;
16671
+ for (const [range, xGroupTexts] of xMap) {
16672
+ const { start, end } = range;
16673
+ if (x1 >= start && x2 <= end) {
16674
+ xGroupTexts.push(text);
16675
+ hasRange = true;
16676
+ }
16677
+ else if (isNumberClose(x, getX(xGroupTexts[0]), undefined, 5)) {
16678
+ const newRange = { start: Math.min(start, x1), end: Math.max(end, x2) };
16679
+ xGroupTexts.push(text);
16680
+ xMap.set(newRange, xGroupTexts);
16681
+ xMap.delete(range);
16682
+ hasRange = true;
16683
+ }
16684
+ else if (getIntersectionLength([start, end], [x1, x2]) / (end - start) > 0.5) {
16685
+ const newRange = { start: Math.min(start, x1), end: Math.max(end, x2) };
16686
+ xGroupTexts.push(text);
16687
+ xMap.set(newRange, xGroupTexts);
16688
+ xMap.delete(range);
16689
+ hasRange = true;
16690
+ }
16691
+ if (hasRange) {
16692
+ break;
16693
+ }
16694
+ }
16695
+ if (!hasRange) {
16696
+ xMap.set({ start: x1, end: x2 }, [text]);
16697
+ }
16698
+ }
16699
+ for (const xTexts of xMap.values()) {
16700
+ xTexts.sort((a, b) => getY1Initial(a) - getY1Initial(b));
16701
+ adjustPositionInOneGroup(xTexts);
16334
16702
  }
16335
16703
  for (let iter = 0; iter < maxIterations; iter++) {
16336
- texts.sort((a, b) => getY(a) - getY(b));
16704
+ texts.sort((a, b) => getY1(a) - getY1(b));
16337
16705
  let error = 0;
16338
16706
  for (let i = 0; i < n - 1; i++) {
16339
16707
  const curText = texts[i];
16340
16708
  let j = i + 1;
16341
16709
  let nextText;
16342
16710
  while ((nextText = texts[j]) &&
16343
- !isIntersect([getX1(curText), getX2(curText)], [getX1(nextText), getX2(nextText)])) {
16711
+ !isXIntersect([getX1(curText), getX2(curText)], [getX1(nextText), getX2(nextText)])) {
16344
16712
  j += 1;
16345
16713
  }
16346
16714
  if (nextText) {
16347
- const y0 = getY(curText);
16715
+ const y1 = getY1(curText);
16348
16716
  const h0 = getHeight(curText);
16349
- const y1 = getY(nextText);
16350
- const delta = y1 - (y0 + h0);
16717
+ const nextY1 = getY1(nextText);
16718
+ const delta = nextY1 - (y1 + h0);
16351
16719
  if (delta < padding) {
16352
16720
  const newDelta = (padding - delta) / 2;
16353
16721
  error = Math.max(error, newDelta);
16354
16722
  if (y1 + newDelta + getHeight(nextText) > maxY) {
16355
- setY(curText, y0 - (padding - delta));
16723
+ setY1(curText, y1 - (padding - delta));
16356
16724
  }
16357
- else if (y0 - newDelta < 0) {
16358
- setY(nextText, y1 + (padding - delta));
16725
+ else if (y1 - newDelta < 0) {
16726
+ setY1(nextText, nextY1 + (padding - delta));
16359
16727
  }
16360
16728
  else {
16361
- setY(curText, y0 - newDelta);
16362
- setY(nextText, y1 + newDelta);
16729
+ setY1(curText, y1 - newDelta);
16730
+ setY1(nextText, nextY1 + newDelta);
16363
16731
  }
16364
16732
  }
16365
16733
  }
@@ -16369,10 +16737,25 @@ function shiftY(texts, option = {}) {
16369
16737
  }
16370
16738
  }
16371
16739
  for (const text of texts) {
16372
- const finalY = text.attribute.y + getY(text) - getY0(text);
16740
+ const finalY = text.attribute.y + getY1(text) - getY1Initial(text);
16373
16741
  text.setAttribute('y', finalY);
16374
16742
  }
16375
- return texts;
16743
+ const result = [];
16744
+ texts.sort((a, b) => a.attribute.x - b.attribute.x);
16745
+ let start = 0;
16746
+ let end = texts.length - 1;
16747
+ while (start <= end) {
16748
+ if (start === end) {
16749
+ result.push(texts[start]);
16750
+ }
16751
+ else {
16752
+ result.push(texts[start]);
16753
+ result.push(texts[end]);
16754
+ }
16755
+ start++;
16756
+ end--;
16757
+ }
16758
+ return result;
16376
16759
  }
16377
16760
 
16378
16761
  loadLabelComponent();
@@ -16718,18 +17101,25 @@ class LabelBase extends AbstractComponent {
16718
17101
  if (clampForce) {
16719
17102
  for (let i = 0; i < result.length; i++) {
16720
17103
  const text = labels[i];
16721
- const { dx = 0, dy = 0 } = clampText(text, bmpTool.width, bmpTool.height);
17104
+ const { dx = 0, dy = 0 } = clampText(text, bmpTool.width, bmpTool.height, bmpTool.padding);
16722
17105
  if (dx !== 0 || dy !== 0) {
16723
17106
  text.setAttributes({ x: text.attribute.x + dx, y: text.attribute.y + dy });
17107
+ text._isClamped = true;
16724
17108
  }
16725
17109
  }
16726
17110
  }
16727
- result = shiftY(result, Object.assign({ maxY: bmpTool.height }, strategy));
17111
+ result = shiftY(result, Object.assign(Object.assign({ maxY: bmpTool.height }, strategy), { labelling: (text) => {
17112
+ const baseMark = this.getRelatedGraphic(text.attribute);
17113
+ const graphicBound = this._isCollectionBase
17114
+ ? this.getGraphicBounds(null, this._idToPoint.get(text.attribute.id))
17115
+ : this.getGraphicBounds(baseMark, text);
17116
+ return this.labeling(text.AABBBounds, graphicBound, 'bottom', this.attribute.offset);
17117
+ } }));
16728
17118
  for (let i = 0; i < result.length; i++) {
16729
17119
  const text = result[i];
16730
17120
  const bounds = text.AABBBounds;
16731
17121
  const range = boundToRange(bmpTool, bounds, true);
16732
- if (canPlace(bmpTool, bitmap, bounds, clampForce, overlapPadding)) {
17122
+ if (canPlace(bmpTool, bitmap, bounds, clampForce, text._isClamped ? 0 : overlapPadding)) {
16733
17123
  bitmap.setRange(range);
16734
17124
  }
16735
17125
  else {
@@ -16802,7 +17192,7 @@ class LabelBase extends AbstractComponent {
16802
17192
  }
16803
17193
  }
16804
17194
  if (!hasPlace && clampForce) {
16805
- const { dx = 0, dy = 0 } = clampText(text, bmpTool.width, bmpTool.height);
17195
+ const { dx = 0, dy = 0 } = clampText(text, bmpTool.width, bmpTool.height, bmpTool.padding);
16806
17196
  if (dx === 0 && dy === 0) {
16807
17197
  if (canPlace(bmpTool, bitmap, text.AABBBounds)) {
16808
17198
  bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, true));
@@ -17286,6 +17676,9 @@ class ArcLabel extends LabelBase {
17286
17676
  this._alignOffset = 0;
17287
17677
  }
17288
17678
  _overlapping(labels) {
17679
+ if (['inside', 'inside-center'].includes(this.attribute.position)) {
17680
+ return super._overlapping(labels);
17681
+ }
17289
17682
  return labels;
17290
17683
  }
17291
17684
  labeling(textBounds, graphicBounds, position = 'outside', offset = 0) {
@@ -29552,690 +29945,6 @@ EmptyTip.defaultAttributes = {
29552
29945
  }
29553
29946
  };
29554
29947
 
29555
- var lib$1 = {};
29556
-
29557
- var gif = {};
29558
-
29559
- var lib = {};
29560
-
29561
- Object.defineProperty(lib, "__esModule", {
29562
- value: true
29563
- });
29564
- lib.loop = lib.conditional = lib.parse = void 0;
29565
- var parse = function parse(stream, schema) {
29566
- var result = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
29567
- var parent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : result;
29568
- if (Array.isArray(schema)) {
29569
- schema.forEach(function (partSchema) {
29570
- return parse(stream, partSchema, result, parent);
29571
- });
29572
- } else if (typeof schema === 'function') {
29573
- schema(stream, result, parent, parse);
29574
- } else {
29575
- var key = Object.keys(schema)[0];
29576
- if (Array.isArray(schema[key])) {
29577
- parent[key] = {};
29578
- parse(stream, schema[key], result, parent[key]);
29579
- } else {
29580
- parent[key] = schema[key](stream, result, parent, parse);
29581
- }
29582
- }
29583
- return result;
29584
- };
29585
- lib.parse = parse;
29586
- var conditional = function conditional(schema, conditionFunc) {
29587
- return function (stream, result, parent, parse) {
29588
- if (conditionFunc(stream, result, parent)) {
29589
- parse(stream, schema, result, parent);
29590
- }
29591
- };
29592
- };
29593
- lib.conditional = conditional;
29594
- var loop = function loop(schema, continueFunc) {
29595
- return function (stream, result, parent, parse) {
29596
- var arr = [];
29597
- var lastStreamPos = stream.pos;
29598
- while (continueFunc(stream, result, parent)) {
29599
- var newParent = {};
29600
- parse(stream, schema, result, newParent); // cases when whole file is parsed but no termination is there and stream position is not getting updated as well
29601
- // it falls into infinite recursion, null check to avoid the same
29602
-
29603
- if (stream.pos === lastStreamPos) {
29604
- break;
29605
- }
29606
- lastStreamPos = stream.pos;
29607
- arr.push(newParent);
29608
- }
29609
- return arr;
29610
- };
29611
- };
29612
- lib.loop = loop;
29613
-
29614
- var uint8 = {};
29615
-
29616
- Object.defineProperty(uint8, "__esModule", {
29617
- value: true
29618
- });
29619
- uint8.readBits = uint8.readArray = uint8.readUnsigned = uint8.readString = uint8.peekBytes = uint8.readBytes = uint8.peekByte = uint8.readByte = uint8.buildStream = void 0;
29620
-
29621
- // Default stream and parsers for Uint8TypedArray data type
29622
- var buildStream = function buildStream(uint8Data) {
29623
- return {
29624
- data: uint8Data,
29625
- pos: 0
29626
- };
29627
- };
29628
- uint8.buildStream = buildStream;
29629
- var readByte = function readByte() {
29630
- return function (stream) {
29631
- return stream.data[stream.pos++];
29632
- };
29633
- };
29634
- uint8.readByte = readByte;
29635
- var peekByte = function peekByte() {
29636
- var offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
29637
- return function (stream) {
29638
- return stream.data[stream.pos + offset];
29639
- };
29640
- };
29641
- uint8.peekByte = peekByte;
29642
- var readBytes = function readBytes(length) {
29643
- return function (stream) {
29644
- return stream.data.subarray(stream.pos, stream.pos += length);
29645
- };
29646
- };
29647
- uint8.readBytes = readBytes;
29648
- var peekBytes = function peekBytes(length) {
29649
- return function (stream) {
29650
- return stream.data.subarray(stream.pos, stream.pos + length);
29651
- };
29652
- };
29653
- uint8.peekBytes = peekBytes;
29654
- var readString = function readString(length) {
29655
- return function (stream) {
29656
- return Array.from(readBytes(length)(stream)).map(function (value) {
29657
- return String.fromCharCode(value);
29658
- }).join('');
29659
- };
29660
- };
29661
- uint8.readString = readString;
29662
- var readUnsigned = function readUnsigned(littleEndian) {
29663
- return function (stream) {
29664
- var bytes = readBytes(2)(stream);
29665
- return littleEndian ? (bytes[1] << 8) + bytes[0] : (bytes[0] << 8) + bytes[1];
29666
- };
29667
- };
29668
- uint8.readUnsigned = readUnsigned;
29669
- var readArray = function readArray(byteSize, totalOrFunc) {
29670
- return function (stream, result, parent) {
29671
- var total = typeof totalOrFunc === 'function' ? totalOrFunc(stream, result, parent) : totalOrFunc;
29672
- var parser = readBytes(byteSize);
29673
- var arr = new Array(total);
29674
- for (var i = 0; i < total; i++) {
29675
- arr[i] = parser(stream);
29676
- }
29677
- return arr;
29678
- };
29679
- };
29680
- uint8.readArray = readArray;
29681
- var subBitsTotal = function subBitsTotal(bits, startIndex, length) {
29682
- var result = 0;
29683
- for (var i = 0; i < length; i++) {
29684
- result += bits[startIndex + i] && Math.pow(2, length - i - 1);
29685
- }
29686
- return result;
29687
- };
29688
- var readBits = function readBits(schema) {
29689
- return function (stream) {
29690
- var _byte = readByte()(stream); // convert the byte to bit array
29691
-
29692
- var bits = new Array(8);
29693
- for (var i = 0; i < 8; i++) {
29694
- bits[7 - i] = !!(_byte & 1 << i);
29695
- } // convert the bit array to values based on the schema
29696
-
29697
- return Object.keys(schema).reduce(function (res, key) {
29698
- var def = schema[key];
29699
- if (def.length) {
29700
- res[key] = subBitsTotal(bits, def.index, def.length);
29701
- } else {
29702
- res[key] = bits[def.index];
29703
- }
29704
- return res;
29705
- }, {});
29706
- };
29707
- };
29708
- uint8.readBits = readBits;
29709
-
29710
- (function (exports) {
29711
-
29712
- Object.defineProperty(exports, "__esModule", {
29713
- value: true
29714
- });
29715
- exports["default"] = void 0;
29716
- var _ = lib;
29717
- var _uint = uint8;
29718
-
29719
- // a set of 0x00 terminated subblocks
29720
- var subBlocksSchema = {
29721
- blocks: function blocks(stream) {
29722
- var terminator = 0x00;
29723
- var chunks = [];
29724
- var streamSize = stream.data.length;
29725
- var total = 0;
29726
- for (var size = (0, _uint.readByte)()(stream); size !== terminator; size = (0, _uint.readByte)()(stream)) {
29727
- // size becomes undefined for some case when file is corrupted and terminator is not proper
29728
- // null check to avoid recursion
29729
- if (!size) break; // catch corrupted files with no terminator
29730
-
29731
- if (stream.pos + size >= streamSize) {
29732
- var availableSize = streamSize - stream.pos;
29733
- chunks.push((0, _uint.readBytes)(availableSize)(stream));
29734
- total += availableSize;
29735
- break;
29736
- }
29737
- chunks.push((0, _uint.readBytes)(size)(stream));
29738
- total += size;
29739
- }
29740
- var result = new Uint8Array(total);
29741
- var offset = 0;
29742
- for (var i = 0; i < chunks.length; i++) {
29743
- result.set(chunks[i], offset);
29744
- offset += chunks[i].length;
29745
- }
29746
- return result;
29747
- }
29748
- }; // global control extension
29749
-
29750
- var gceSchema = (0, _.conditional)({
29751
- gce: [{
29752
- codes: (0, _uint.readBytes)(2)
29753
- }, {
29754
- byteSize: (0, _uint.readByte)()
29755
- }, {
29756
- extras: (0, _uint.readBits)({
29757
- future: {
29758
- index: 0,
29759
- length: 3
29760
- },
29761
- disposal: {
29762
- index: 3,
29763
- length: 3
29764
- },
29765
- userInput: {
29766
- index: 6
29767
- },
29768
- transparentColorGiven: {
29769
- index: 7
29770
- }
29771
- })
29772
- }, {
29773
- delay: (0, _uint.readUnsigned)(true)
29774
- }, {
29775
- transparentColorIndex: (0, _uint.readByte)()
29776
- }, {
29777
- terminator: (0, _uint.readByte)()
29778
- }]
29779
- }, function (stream) {
29780
- var codes = (0, _uint.peekBytes)(2)(stream);
29781
- return codes[0] === 0x21 && codes[1] === 0xf9;
29782
- }); // image pipeline block
29783
-
29784
- var imageSchema = (0, _.conditional)({
29785
- image: [{
29786
- code: (0, _uint.readByte)()
29787
- }, {
29788
- descriptor: [{
29789
- left: (0, _uint.readUnsigned)(true)
29790
- }, {
29791
- top: (0, _uint.readUnsigned)(true)
29792
- }, {
29793
- width: (0, _uint.readUnsigned)(true)
29794
- }, {
29795
- height: (0, _uint.readUnsigned)(true)
29796
- }, {
29797
- lct: (0, _uint.readBits)({
29798
- exists: {
29799
- index: 0
29800
- },
29801
- interlaced: {
29802
- index: 1
29803
- },
29804
- sort: {
29805
- index: 2
29806
- },
29807
- future: {
29808
- index: 3,
29809
- length: 2
29810
- },
29811
- size: {
29812
- index: 5,
29813
- length: 3
29814
- }
29815
- })
29816
- }]
29817
- }, (0, _.conditional)({
29818
- lct: (0, _uint.readArray)(3, function (stream, result, parent) {
29819
- return Math.pow(2, parent.descriptor.lct.size + 1);
29820
- })
29821
- }, function (stream, result, parent) {
29822
- return parent.descriptor.lct.exists;
29823
- }), {
29824
- data: [{
29825
- minCodeSize: (0, _uint.readByte)()
29826
- }, subBlocksSchema]
29827
- }]
29828
- }, function (stream) {
29829
- return (0, _uint.peekByte)()(stream) === 0x2c;
29830
- }); // plain text block
29831
-
29832
- var textSchema = (0, _.conditional)({
29833
- text: [{
29834
- codes: (0, _uint.readBytes)(2)
29835
- }, {
29836
- blockSize: (0, _uint.readByte)()
29837
- }, {
29838
- preData: function preData(stream, result, parent) {
29839
- return (0, _uint.readBytes)(parent.text.blockSize)(stream);
29840
- }
29841
- }, subBlocksSchema]
29842
- }, function (stream) {
29843
- var codes = (0, _uint.peekBytes)(2)(stream);
29844
- return codes[0] === 0x21 && codes[1] === 0x01;
29845
- }); // application block
29846
-
29847
- var applicationSchema = (0, _.conditional)({
29848
- application: [{
29849
- codes: (0, _uint.readBytes)(2)
29850
- }, {
29851
- blockSize: (0, _uint.readByte)()
29852
- }, {
29853
- id: function id(stream, result, parent) {
29854
- return (0, _uint.readString)(parent.blockSize)(stream);
29855
- }
29856
- }, subBlocksSchema]
29857
- }, function (stream) {
29858
- var codes = (0, _uint.peekBytes)(2)(stream);
29859
- return codes[0] === 0x21 && codes[1] === 0xff;
29860
- }); // comment block
29861
-
29862
- var commentSchema = (0, _.conditional)({
29863
- comment: [{
29864
- codes: (0, _uint.readBytes)(2)
29865
- }, subBlocksSchema]
29866
- }, function (stream) {
29867
- var codes = (0, _uint.peekBytes)(2)(stream);
29868
- return codes[0] === 0x21 && codes[1] === 0xfe;
29869
- });
29870
- var schema = [{
29871
- header: [{
29872
- signature: (0, _uint.readString)(3)
29873
- }, {
29874
- version: (0, _uint.readString)(3)
29875
- }]
29876
- }, {
29877
- lsd: [{
29878
- width: (0, _uint.readUnsigned)(true)
29879
- }, {
29880
- height: (0, _uint.readUnsigned)(true)
29881
- }, {
29882
- gct: (0, _uint.readBits)({
29883
- exists: {
29884
- index: 0
29885
- },
29886
- resolution: {
29887
- index: 1,
29888
- length: 3
29889
- },
29890
- sort: {
29891
- index: 4
29892
- },
29893
- size: {
29894
- index: 5,
29895
- length: 3
29896
- }
29897
- })
29898
- }, {
29899
- backgroundColorIndex: (0, _uint.readByte)()
29900
- }, {
29901
- pixelAspectRatio: (0, _uint.readByte)()
29902
- }]
29903
- }, (0, _.conditional)({
29904
- gct: (0, _uint.readArray)(3, function (stream, result) {
29905
- return Math.pow(2, result.lsd.gct.size + 1);
29906
- })
29907
- }, function (stream, result) {
29908
- return result.lsd.gct.exists;
29909
- }),
29910
- // content frames
29911
- {
29912
- frames: (0, _.loop)([gceSchema, applicationSchema, commentSchema, imageSchema, textSchema], function (stream) {
29913
- var nextCode = (0, _uint.peekByte)()(stream); // rather than check for a terminator, we should check for the existence
29914
- // of an ext or image block to avoid infinite loops
29915
- //var terminator = 0x3B;
29916
- //return nextCode !== terminator;
29917
-
29918
- return nextCode === 0x21 || nextCode === 0x2c;
29919
- })
29920
- }];
29921
- var _default = schema;
29922
- exports["default"] = _default;
29923
- })(gif);
29924
-
29925
- var deinterlace$1 = {};
29926
-
29927
- Object.defineProperty(deinterlace$1, "__esModule", {
29928
- value: true
29929
- });
29930
- deinterlace$1.deinterlace = void 0;
29931
-
29932
- /**
29933
- * Deinterlace function from https://github.com/shachaf/jsgif
29934
- */
29935
- var deinterlace = function deinterlace(pixels, width) {
29936
- var newPixels = new Array(pixels.length);
29937
- var rows = pixels.length / width;
29938
- var cpRow = function cpRow(toRow, fromRow) {
29939
- var fromPixels = pixels.slice(fromRow * width, (fromRow + 1) * width);
29940
- newPixels.splice.apply(newPixels, [toRow * width, width].concat(fromPixels));
29941
- }; // See appendix E.
29942
-
29943
- var offsets = [0, 4, 2, 1];
29944
- var steps = [8, 8, 4, 2];
29945
- var fromRow = 0;
29946
- for (var pass = 0; pass < 4; pass++) {
29947
- for (var toRow = offsets[pass]; toRow < rows; toRow += steps[pass]) {
29948
- cpRow(toRow, fromRow);
29949
- fromRow++;
29950
- }
29951
- }
29952
- return newPixels;
29953
- };
29954
- deinterlace$1.deinterlace = deinterlace;
29955
-
29956
- var lzw$1 = {};
29957
-
29958
- Object.defineProperty(lzw$1, "__esModule", {
29959
- value: true
29960
- });
29961
- lzw$1.lzw = void 0;
29962
-
29963
- /**
29964
- * javascript port of java LZW decompression
29965
- * Original java author url: https://gist.github.com/devunwired/4479231
29966
- */
29967
- var lzw = function lzw(minCodeSize, data, pixelCount) {
29968
- var MAX_STACK_SIZE = 4096;
29969
- var nullCode = -1;
29970
- var npix = pixelCount;
29971
- var available, clear, code_mask, code_size, end_of_information, in_code, old_code, bits, code, i, datum, data_size, first, top, bi, pi;
29972
- var dstPixels = new Array(pixelCount);
29973
- var prefix = new Array(MAX_STACK_SIZE);
29974
- var suffix = new Array(MAX_STACK_SIZE);
29975
- var pixelStack = new Array(MAX_STACK_SIZE + 1); // Initialize GIF data stream decoder.
29976
-
29977
- data_size = minCodeSize;
29978
- clear = 1 << data_size;
29979
- end_of_information = clear + 1;
29980
- available = clear + 2;
29981
- old_code = nullCode;
29982
- code_size = data_size + 1;
29983
- code_mask = (1 << code_size) - 1;
29984
- for (code = 0; code < clear; code++) {
29985
- prefix[code] = 0;
29986
- suffix[code] = code;
29987
- } // Decode GIF pixel stream.
29988
-
29989
- var datum, bits, first, top, pi, bi;
29990
- datum = bits = first = top = pi = bi = 0;
29991
- for (i = 0; i < npix;) {
29992
- if (top === 0) {
29993
- if (bits < code_size) {
29994
- // get the next byte
29995
- datum += data[bi] << bits;
29996
- bits += 8;
29997
- bi++;
29998
- continue;
29999
- } // Get the next code.
30000
-
30001
- code = datum & code_mask;
30002
- datum >>= code_size;
30003
- bits -= code_size; // Interpret the code
30004
-
30005
- if (code > available || code == end_of_information) {
30006
- break;
30007
- }
30008
- if (code == clear) {
30009
- // Reset decoder.
30010
- code_size = data_size + 1;
30011
- code_mask = (1 << code_size) - 1;
30012
- available = clear + 2;
30013
- old_code = nullCode;
30014
- continue;
30015
- }
30016
- if (old_code == nullCode) {
30017
- pixelStack[top++] = suffix[code];
30018
- old_code = code;
30019
- first = code;
30020
- continue;
30021
- }
30022
- in_code = code;
30023
- if (code == available) {
30024
- pixelStack[top++] = first;
30025
- code = old_code;
30026
- }
30027
- while (code > clear) {
30028
- pixelStack[top++] = suffix[code];
30029
- code = prefix[code];
30030
- }
30031
- first = suffix[code] & 0xff;
30032
- pixelStack[top++] = first; // add a new string to the table, but only if space is available
30033
- // if not, just continue with current table until a clear code is found
30034
- // (deferred clear code implementation as per GIF spec)
30035
-
30036
- if (available < MAX_STACK_SIZE) {
30037
- prefix[available] = old_code;
30038
- suffix[available] = first;
30039
- available++;
30040
- if ((available & code_mask) === 0 && available < MAX_STACK_SIZE) {
30041
- code_size++;
30042
- code_mask += available;
30043
- }
30044
- }
30045
- old_code = in_code;
30046
- } // Pop a pixel off the pixel stack.
30047
-
30048
- top--;
30049
- dstPixels[pi++] = pixelStack[top];
30050
- i++;
30051
- }
30052
- for (i = pi; i < npix; i++) {
30053
- dstPixels[i] = 0; // clear missing pixels
30054
- }
30055
-
30056
- return dstPixels;
30057
- };
30058
- lzw$1.lzw = lzw;
30059
-
30060
- Object.defineProperty(lib$1, "__esModule", {
30061
- value: true
30062
- });
30063
- var decompressFrames_1 = lib$1.decompressFrames = lib$1.decompressFrame = parseGIF_1 = lib$1.parseGIF = void 0;
30064
- var _gif = _interopRequireDefault(gif);
30065
- var _jsBinarySchemaParser = lib;
30066
- var _uint = uint8;
30067
- var _deinterlace = deinterlace$1;
30068
- var _lzw = lzw$1;
30069
- function _interopRequireDefault(obj) {
30070
- return obj && obj.__esModule ? obj : {
30071
- "default": obj
30072
- };
30073
- }
30074
- var parseGIF = function parseGIF(arrayBuffer) {
30075
- var byteData = new Uint8Array(arrayBuffer);
30076
- return (0, _jsBinarySchemaParser.parse)((0, _uint.buildStream)(byteData), _gif["default"]);
30077
- };
30078
- var parseGIF_1 = lib$1.parseGIF = parseGIF;
30079
- var generatePatch = function generatePatch(image) {
30080
- var totalPixels = image.pixels.length;
30081
- var patchData = new Uint8ClampedArray(totalPixels * 4);
30082
- for (var i = 0; i < totalPixels; i++) {
30083
- var pos = i * 4;
30084
- var colorIndex = image.pixels[i];
30085
- var color = image.colorTable[colorIndex] || [0, 0, 0];
30086
- patchData[pos] = color[0];
30087
- patchData[pos + 1] = color[1];
30088
- patchData[pos + 2] = color[2];
30089
- patchData[pos + 3] = colorIndex !== image.transparentIndex ? 255 : 0;
30090
- }
30091
- return patchData;
30092
- };
30093
- var decompressFrame = function decompressFrame(frame, gct, buildImagePatch) {
30094
- if (!frame.image) {
30095
- console.warn('gif frame does not have associated image.');
30096
- return;
30097
- }
30098
- var image = frame.image; // get the number of pixels
30099
-
30100
- var totalPixels = image.descriptor.width * image.descriptor.height; // do lzw decompression
30101
-
30102
- var pixels = (0, _lzw.lzw)(image.data.minCodeSize, image.data.blocks, totalPixels); // deal with interlacing if necessary
30103
-
30104
- if (image.descriptor.lct.interlaced) {
30105
- pixels = (0, _deinterlace.deinterlace)(pixels, image.descriptor.width);
30106
- }
30107
- var resultImage = {
30108
- pixels: pixels,
30109
- dims: {
30110
- top: frame.image.descriptor.top,
30111
- left: frame.image.descriptor.left,
30112
- width: frame.image.descriptor.width,
30113
- height: frame.image.descriptor.height
30114
- }
30115
- }; // color table
30116
-
30117
- if (image.descriptor.lct && image.descriptor.lct.exists) {
30118
- resultImage.colorTable = image.lct;
30119
- } else {
30120
- resultImage.colorTable = gct;
30121
- } // add per frame relevant gce information
30122
-
30123
- if (frame.gce) {
30124
- resultImage.delay = (frame.gce.delay || 10) * 10; // convert to ms
30125
-
30126
- resultImage.disposalType = frame.gce.extras.disposal; // transparency
30127
-
30128
- if (frame.gce.extras.transparentColorGiven) {
30129
- resultImage.transparentIndex = frame.gce.transparentColorIndex;
30130
- }
30131
- } // create canvas usable imagedata if desired
30132
-
30133
- if (buildImagePatch) {
30134
- resultImage.patch = generatePatch(resultImage);
30135
- }
30136
- return resultImage;
30137
- };
30138
- lib$1.decompressFrame = decompressFrame;
30139
- var decompressFrames = function decompressFrames(parsedGif, buildImagePatches) {
30140
- return parsedGif.frames.filter(function (f) {
30141
- return f.image;
30142
- }).map(function (f) {
30143
- return decompressFrame(f, parsedGif.gct, buildImagePatches);
30144
- });
30145
- };
30146
- decompressFrames_1 = lib$1.decompressFrames = decompressFrames;
30147
-
30148
- class GifImage extends Image {
30149
- constructor(params) {
30150
- super(params);
30151
- this.isGifImage = true;
30152
- this.loadGif();
30153
- }
30154
- loadGif() {
30155
- if (isString(this.attribute.gifImage)) {
30156
- ResourceLoader.GetFile(this.attribute.gifImage, 'arrayBuffer')
30157
- .then((res) => {
30158
- const gif = parseGIF_1(res);
30159
- const frames = decompressFrames_1(gif, true);
30160
- this.renderGIF(frames);
30161
- })
30162
- .catch(e => {
30163
- console.error('Gif load error: ', e);
30164
- });
30165
- }
30166
- else if (this.attribute.gifImage instanceof ArrayBuffer) {
30167
- const gif = parseGIF_1(this.attribute.gifImage);
30168
- const frames = decompressFrames_1(gif, true);
30169
- this.renderGIF(frames);
30170
- }
30171
- }
30172
- renderGIF(frames) {
30173
- this.loadedFrames = frames;
30174
- this.frameIndex = 0;
30175
- if (!this.tempCanvas) {
30176
- this.tempCanvas = application.global.createCanvas({});
30177
- this.tempCtx = this.tempCanvas.getContext('2d');
30178
- }
30179
- if (!this.gifCanvas) {
30180
- this.gifCanvas = application.global.createCanvas({});
30181
- this.gifCtx = this.gifCanvas.getContext('2d');
30182
- }
30183
- this.gifCanvas.width = frames[0].dims.width;
30184
- this.gifCanvas.height = frames[0].dims.height;
30185
- this.playing = true;
30186
- this.lastTime = new Date().getTime();
30187
- const animation = this.animate();
30188
- if (this.attribute.timeline) {
30189
- animation.setTimeline(this.attribute.timeline);
30190
- }
30191
- animation.to({}, 1000, 'linear').loop(Infinity);
30192
- }
30193
- renderFrame(context, x, y) {
30194
- const frame = this.loadedFrames[this.frameIndex || 0];
30195
- if (frame.disposalType === 2) {
30196
- this.gifCtx.clearRect(0, 0, this.gifCanvas.width, this.gifCanvas.height);
30197
- }
30198
- this.drawPatch(frame);
30199
- this.manipulate(context, x, y);
30200
- const diff = new Date().getTime() - this.lastTime;
30201
- if (frame.delay < diff) {
30202
- this.frameIndex++;
30203
- this.lastTime = new Date().getTime();
30204
- }
30205
- if (this.frameIndex >= this.loadedFrames.length) {
30206
- this.frameIndex = 0;
30207
- }
30208
- }
30209
- drawPatch(frame) {
30210
- const dims = frame.dims;
30211
- if (!this.frameImageData ||
30212
- dims.width !== this.frameImageData.width ||
30213
- dims.height !== this.frameImageData.height) {
30214
- this.tempCanvas.width = dims.width;
30215
- this.tempCanvas.height = dims.height;
30216
- this.frameImageData = this.tempCtx.createImageData(dims.width, dims.height);
30217
- }
30218
- this.frameImageData.data.set(frame.patch);
30219
- this.tempCtx.putImageData(this.frameImageData, 0, 0);
30220
- this.gifCtx.drawImage(this.tempCanvas, dims.left, dims.top);
30221
- }
30222
- manipulate(context, x, y) {
30223
- context.drawImage(this.gifCanvas, 0, 0, this.gifCanvas.width, this.gifCanvas.height, x, y, this.attribute.width, this.attribute.height);
30224
- }
30225
- setAttribute(key, value, forceUpdateTag, context) {
30226
- super.setAttribute(key, value, forceUpdateTag, context);
30227
- if (key === 'gifImage') {
30228
- this.loadGif();
30229
- }
30230
- }
30231
- setAttributes(params, forceUpdateTag, context) {
30232
- super.setAttributes(params, forceUpdateTag, context);
30233
- if (params.gifImage) {
30234
- this.loadGif();
30235
- }
30236
- }
30237
- }
30238
-
30239
- const version = "0.21.0-alpha.4";
29948
+ const version = "0.21.0-beta.0";
30240
29949
 
30241
- export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GifImage, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
29950
+ export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };