@leafer-ui/worker 1.3.2 → 1.4.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.
@@ -1533,10 +1533,10 @@ const DataHelper = {
1533
1533
  Object.keys(merge).forEach(key => {
1534
1534
  var _a, _b;
1535
1535
  value = merge[key];
1536
- if ((value === null || value === void 0 ? void 0 : value.constructor) === Object && ((_a = t[key]) === null || _a === void 0 ? void 0 : _a.constructor) === Object)
1536
+ if ((value === null || value === undefined ? undefined : value.constructor) === Object && ((_a = t[key]) === null || _a === undefined ? undefined : _a.constructor) === Object)
1537
1537
  return assign(t[key], merge[key], exclude && exclude[key]);
1538
1538
  if (exclude && (key in exclude)) {
1539
- if (((_b = exclude[key]) === null || _b === void 0 ? void 0 : _b.constructor) === Object)
1539
+ if (((_b = exclude[key]) === null || _b === undefined ? undefined : _b.constructor) === Object)
1540
1540
  assign(t[key] = {}, merge[key], exclude[key]);
1541
1541
  return;
1542
1542
  }
@@ -1705,7 +1705,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1705
1705
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1706
1706
  PERFORMANCE OF THIS SOFTWARE.
1707
1707
  ***************************************************************************** */
1708
- /* global Reflect, Promise, SuppressedError, Symbol */
1708
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1709
1709
 
1710
1710
 
1711
1711
  function __decorate(decorators, target, key, desc) {
@@ -1773,7 +1773,7 @@ let Canvas$1 = class Canvas {
1773
1773
  }
1774
1774
  setTransform(_a, _b, _c, _d, _e, _f) { }
1775
1775
  resetTransform() { }
1776
- getTransform() { return void 0; }
1776
+ getTransform() { return undefined; }
1777
1777
  save() { }
1778
1778
  restore() { }
1779
1779
  transform(a, b, c, d, e, f) {
@@ -1830,12 +1830,12 @@ let Canvas$1 = class Canvas {
1830
1830
  ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) { }
1831
1831
  rect(_x, _y, _width, _height) { }
1832
1832
  roundRect(_x, _y, _width, _height, _radius) { }
1833
- createConicGradient(_startAngle, _x, _y) { return void 0; }
1834
- createLinearGradient(_x0, _y0, _x1, _y1) { return void 0; }
1835
- createPattern(_image, _repetition) { return void 0; }
1836
- createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return void 0; }
1833
+ createConicGradient(_startAngle, _x, _y) { return undefined; }
1834
+ createLinearGradient(_x0, _y0, _x1, _y1) { return undefined; }
1835
+ createPattern(_image, _repetition) { return undefined; }
1836
+ createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return undefined; }
1837
1837
  fillText(_text, _x, _y, _maxWidth) { }
1838
- measureText(_text) { return void 0; }
1838
+ measureText(_text) { return undefined; }
1839
1839
  strokeText(_text, _x, _y, _maxWidth) { }
1840
1840
  destroy() {
1841
1841
  this.context = null;
@@ -1843,79 +1843,79 @@ let Canvas$1 = class Canvas {
1843
1843
  };
1844
1844
  __decorate([
1845
1845
  contextAttr('imageSmoothingEnabled')
1846
- ], Canvas$1.prototype, "smooth", void 0);
1846
+ ], Canvas$1.prototype, "smooth", undefined);
1847
1847
  __decorate([
1848
1848
  contextAttr('imageSmoothingQuality')
1849
- ], Canvas$1.prototype, "smoothLevel", void 0);
1849
+ ], Canvas$1.prototype, "smoothLevel", undefined);
1850
1850
  __decorate([
1851
1851
  contextAttr('globalAlpha')
1852
- ], Canvas$1.prototype, "opacity", void 0);
1852
+ ], Canvas$1.prototype, "opacity", undefined);
1853
1853
  __decorate([
1854
1854
  contextAttr()
1855
- ], Canvas$1.prototype, "fillStyle", void 0);
1855
+ ], Canvas$1.prototype, "fillStyle", undefined);
1856
1856
  __decorate([
1857
1857
  contextAttr()
1858
- ], Canvas$1.prototype, "strokeStyle", void 0);
1858
+ ], Canvas$1.prototype, "strokeStyle", undefined);
1859
1859
  __decorate([
1860
1860
  contextAttr('lineWidth')
1861
- ], Canvas$1.prototype, "strokeWidth", void 0);
1861
+ ], Canvas$1.prototype, "strokeWidth", undefined);
1862
1862
  __decorate([
1863
1863
  contextAttr('lineCap')
1864
- ], Canvas$1.prototype, "strokeCap", void 0);
1864
+ ], Canvas$1.prototype, "strokeCap", undefined);
1865
1865
  __decorate([
1866
1866
  contextAttr('lineJoin')
1867
- ], Canvas$1.prototype, "strokeJoin", void 0);
1867
+ ], Canvas$1.prototype, "strokeJoin", undefined);
1868
1868
  __decorate([
1869
1869
  contextAttr('lineDashOffset')
1870
- ], Canvas$1.prototype, "dashOffset", void 0);
1870
+ ], Canvas$1.prototype, "dashOffset", undefined);
1871
1871
  __decorate([
1872
1872
  contextAttr()
1873
- ], Canvas$1.prototype, "miterLimit", void 0);
1873
+ ], Canvas$1.prototype, "miterLimit", undefined);
1874
1874
  __decorate([
1875
1875
  contextAttr()
1876
- ], Canvas$1.prototype, "shadowBlur", void 0);
1876
+ ], Canvas$1.prototype, "shadowBlur", undefined);
1877
1877
  __decorate([
1878
1878
  contextAttr()
1879
- ], Canvas$1.prototype, "shadowColor", void 0);
1879
+ ], Canvas$1.prototype, "shadowColor", undefined);
1880
1880
  __decorate([
1881
1881
  contextAttr()
1882
- ], Canvas$1.prototype, "shadowOffsetX", void 0);
1882
+ ], Canvas$1.prototype, "shadowOffsetX", undefined);
1883
1883
  __decorate([
1884
1884
  contextAttr()
1885
- ], Canvas$1.prototype, "shadowOffsetY", void 0);
1885
+ ], Canvas$1.prototype, "shadowOffsetY", undefined);
1886
1886
  __decorate([
1887
1887
  contextAttr()
1888
- ], Canvas$1.prototype, "filter", void 0);
1888
+ ], Canvas$1.prototype, "filter", undefined);
1889
1889
  __decorate([
1890
1890
  contextAttr()
1891
- ], Canvas$1.prototype, "font", void 0);
1891
+ ], Canvas$1.prototype, "font", undefined);
1892
1892
  __decorate([
1893
1893
  contextAttr()
1894
- ], Canvas$1.prototype, "fontKerning", void 0);
1894
+ ], Canvas$1.prototype, "fontKerning", undefined);
1895
1895
  __decorate([
1896
1896
  contextAttr()
1897
- ], Canvas$1.prototype, "fontStretch", void 0);
1897
+ ], Canvas$1.prototype, "fontStretch", undefined);
1898
1898
  __decorate([
1899
1899
  contextAttr()
1900
- ], Canvas$1.prototype, "fontVariantCaps", void 0);
1900
+ ], Canvas$1.prototype, "fontVariantCaps", undefined);
1901
1901
  __decorate([
1902
1902
  contextAttr()
1903
- ], Canvas$1.prototype, "textAlign", void 0);
1903
+ ], Canvas$1.prototype, "textAlign", undefined);
1904
1904
  __decorate([
1905
1905
  contextAttr()
1906
- ], Canvas$1.prototype, "textBaseline", void 0);
1906
+ ], Canvas$1.prototype, "textBaseline", undefined);
1907
1907
  __decorate([
1908
1908
  contextAttr()
1909
- ], Canvas$1.prototype, "textRendering", void 0);
1909
+ ], Canvas$1.prototype, "textRendering", undefined);
1910
1910
  __decorate([
1911
1911
  contextAttr()
1912
- ], Canvas$1.prototype, "wordSpacing", void 0);
1912
+ ], Canvas$1.prototype, "wordSpacing", undefined);
1913
1913
  __decorate([
1914
1914
  contextAttr()
1915
- ], Canvas$1.prototype, "letterSpacing", void 0);
1915
+ ], Canvas$1.prototype, "letterSpacing", undefined);
1916
1916
  __decorate([
1917
1917
  contextAttr()
1918
- ], Canvas$1.prototype, "direction", void 0);
1918
+ ], Canvas$1.prototype, "direction", undefined);
1919
1919
  __decorate([
1920
1920
  contextMethod()
1921
1921
  ], Canvas$1.prototype, "setTransform", null);
@@ -3384,7 +3384,7 @@ class TaskItem {
3384
3384
  this.task = task;
3385
3385
  }
3386
3386
  run() {
3387
- return __awaiter(this, void 0, void 0, function* () {
3387
+ return __awaiter(this, undefined, undefined, function* () {
3388
3388
  try {
3389
3389
  if (this.task && !this.isComplete && this.parent.running)
3390
3390
  yield this.task();
@@ -3696,7 +3696,7 @@ class LeaferImage {
3696
3696
  load(onSuccess, onError) {
3697
3697
  if (!this.loading) {
3698
3698
  this.loading = true;
3699
- ImageManager.tasker.add(() => __awaiter(this, void 0, void 0, function* () {
3699
+ ImageManager.tasker.add(() => __awaiter(this, undefined, undefined, function* () {
3700
3700
  return yield Platform.origin.loadImage(this.url).then((img) => {
3701
3701
  this.ready = true;
3702
3702
  this.width = img.naturalWidth || img.width;
@@ -3821,10 +3821,10 @@ function autoLayoutType(defaultValue) {
3821
3821
  return decorateLeafAttr(defaultValue, (key) => attr({
3822
3822
  set(value) {
3823
3823
  if (this.__setAttr(key, value)) {
3824
- this.__layout.matrixChanged || this.__layout.matrixChange();
3825
3824
  this.__hasAutoLayout = !!(this.origin || this.around || this.flow);
3826
3825
  if (!this.__local)
3827
3826
  this.__layout.createLocal();
3827
+ doBoundsType(this);
3828
3828
  }
3829
3829
  }
3830
3830
  }));
@@ -4207,55 +4207,62 @@ const LeafHelper = {
4207
4207
  y += t.y;
4208
4208
  transition ? t.animate({ x, y }, transition) : (t.x = x, t.y = y);
4209
4209
  },
4210
- zoomOfWorld(t, origin, scaleX, scaleY, resize) {
4211
- L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize);
4210
+ zoomOfWorld(t, origin, scaleX, scaleY, resize, transition) {
4211
+ L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition);
4212
4212
  },
4213
- zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize) {
4214
- copy$7(matrix$1, t.__localMatrix);
4213
+ zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition) {
4214
+ const o = t.__localMatrix;
4215
+ if (typeof scaleY !== 'number') {
4216
+ if (scaleY)
4217
+ transition = scaleY;
4218
+ scaleY = scaleX;
4219
+ }
4220
+ copy$7(matrix$1, o);
4215
4221
  scaleOfOuter$2(matrix$1, origin, scaleX, scaleY);
4216
4222
  if (t.origin || t.around) {
4217
- L.setTransform(t, matrix$1, resize);
4223
+ L.setTransform(t, matrix$1, resize, transition);
4218
4224
  }
4219
4225
  else {
4220
- moveByMatrix(t, matrix$1);
4221
- t.scaleResize(scaleX, scaleY, resize !== true);
4226
+ const x = t.x + matrix$1.e - o.e, y = t.y + matrix$1.f - o.f;
4227
+ if (transition && !resize)
4228
+ t.animate({ x, y, scaleX: t.scaleX * scaleX, scaleY: t.scaleY * scaleY }, transition);
4229
+ else
4230
+ t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true);
4222
4231
  }
4223
4232
  },
4224
- rotateOfWorld(t, origin, angle) {
4225
- L.rotateOfLocal(t, getTempLocal(t, origin), angle);
4233
+ rotateOfWorld(t, origin, angle, transition) {
4234
+ L.rotateOfLocal(t, getTempLocal(t, origin), angle, transition);
4226
4235
  },
4227
- rotateOfLocal(t, origin, angle) {
4228
- copy$7(matrix$1, t.__localMatrix);
4236
+ rotateOfLocal(t, origin, angle, transition) {
4237
+ const o = t.__localMatrix;
4238
+ copy$7(matrix$1, o);
4229
4239
  rotateOfOuter$2(matrix$1, origin, angle);
4230
- if (t.origin || t.around) {
4231
- L.setTransform(t, matrix$1);
4232
- }
4233
- else {
4234
- moveByMatrix(t, matrix$1);
4235
- t.rotation = MathHelper.formatRotation(t.rotation + angle);
4236
- }
4240
+ if (t.origin || t.around)
4241
+ L.setTransform(t, matrix$1, false, transition);
4242
+ else
4243
+ t.set({ x: t.x + matrix$1.e - o.e, y: t.y + matrix$1.f - o.f, rotation: MathHelper.formatRotation(t.rotation + angle) }, transition);
4237
4244
  },
4238
- skewOfWorld(t, origin, skewX, skewY, resize) {
4239
- L.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize);
4245
+ skewOfWorld(t, origin, skewX, skewY, resize, transition) {
4246
+ L.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize, transition);
4240
4247
  },
4241
- skewOfLocal(t, origin, skewX, skewY = 0, resize) {
4248
+ skewOfLocal(t, origin, skewX, skewY = 0, resize, transition) {
4242
4249
  copy$7(matrix$1, t.__localMatrix);
4243
4250
  skewOfOuter(matrix$1, origin, skewX, skewY);
4244
- L.setTransform(t, matrix$1, resize);
4251
+ L.setTransform(t, matrix$1, resize, transition);
4245
4252
  },
4246
- transformWorld(t, transform, resize) {
4253
+ transformWorld(t, transform, resize, transition) {
4247
4254
  copy$7(matrix$1, t.worldTransform);
4248
4255
  multiplyParent$2(matrix$1, transform);
4249
4256
  if (t.parent)
4250
4257
  divideParent(matrix$1, t.parent.worldTransform);
4251
- L.setTransform(t, matrix$1, resize);
4258
+ L.setTransform(t, matrix$1, resize, transition);
4252
4259
  },
4253
- transform(t, transform, resize) {
4260
+ transform(t, transform, resize, transition) {
4254
4261
  copy$7(matrix$1, t.localTransform);
4255
4262
  multiplyParent$2(matrix$1, transform);
4256
- L.setTransform(t, matrix$1, resize);
4263
+ L.setTransform(t, matrix$1, resize, transition);
4257
4264
  },
4258
- setTransform(t, transform, resize) {
4265
+ setTransform(t, transform, resize, transition) {
4259
4266
  const data = t.__, originPoint = data.origin && L.getInnerOrigin(t, data.origin);
4260
4267
  const layout = getLayout(transform, originPoint, data.around && L.getInnerOrigin(t, data.around));
4261
4268
  if (resize) {
@@ -4270,7 +4277,7 @@ const LeafHelper = {
4270
4277
  t.scaleResize(scaleX, scaleY, false);
4271
4278
  }
4272
4279
  else
4273
- t.set(layout);
4280
+ t.set(layout, transition);
4274
4281
  },
4275
4282
  getFlipTransform(t, axis) {
4276
4283
  const m = getMatrixData();
@@ -4307,11 +4314,6 @@ const LeafHelper = {
4307
4314
  };
4308
4315
  const L = LeafHelper;
4309
4316
  const { updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$2, updateAllWorldOpacity: updateAllWorldOpacity$1, updateAllChange: updateAllChange$1 } = L;
4310
- function moveByMatrix(t, matrix) {
4311
- const { e, f } = t.__localMatrix;
4312
- t.x += matrix.e - e;
4313
- t.y += matrix.f - f;
4314
- }
4315
4317
  function getTempLocal(t, world) {
4316
4318
  t.__layout.update();
4317
4319
  return t.parent ? PointHelper.tempToInnerOf(world, t.parent.__world) : world;
@@ -5175,8 +5177,7 @@ const LeafBounds = {
5175
5177
  __updateAutoLayout() {
5176
5178
  this.__layout.matrixChanged = true;
5177
5179
  if (this.isBranch) {
5178
- if (this.leaferIsReady)
5179
- this.leafer.layouter.addExtra(this);
5180
+ this.__extraUpdate();
5180
5181
  if (this.__.flow) {
5181
5182
  if (this.__layout.boxChanged)
5182
5183
  this.__updateFlowLayout();
@@ -5329,7 +5330,7 @@ let Leaf = class Leaf {
5329
5330
  get __worldFlipped() { return this.__world.scaleX < 0 || this.__world.scaleY < 0; }
5330
5331
  get __onlyHitMask() { return this.__hasMask && !this.__.hitChildren; }
5331
5332
  get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
5332
- get __inLazyBounds() { const { leafer } = this; return leafer && leafer.created && leafer.lazyBounds.hit(this.__world); }
5333
+ get __inLazyBounds() { return this.leaferIsCreated && this.leafer.lazyBounds.hit(this.__world); }
5333
5334
  get pathInputed() { return this.__.__pathInputed; }
5334
5335
  set event(map) { this.on(map); }
5335
5336
  constructor(data) {
@@ -5440,6 +5441,10 @@ let Leaf = class Leaf {
5440
5441
  forceRender(_bounds, _sync) {
5441
5442
  this.forceUpdate('surface');
5442
5443
  }
5444
+ __extraUpdate() {
5445
+ if (this.leaferIsReady)
5446
+ this.leafer.layouter.addExtra(this);
5447
+ }
5443
5448
  __updateWorldMatrix() { }
5444
5449
  __updateLocalMatrix() { }
5445
5450
  __updateWorldBounds() { }
@@ -5582,11 +5587,11 @@ let Leaf = class Leaf {
5582
5587
  const layer = this.leafer ? this.leafer.zoomLayer : this;
5583
5588
  return layer.getWorldPoint(page, relative, distance, change);
5584
5589
  }
5585
- setTransform(matrix, resize) {
5586
- setTransform(this, matrix, resize);
5590
+ setTransform(matrix, resize, transition) {
5591
+ setTransform(this, matrix, resize, transition);
5587
5592
  }
5588
- transform(matrix, resize) {
5589
- transform(this, matrix, resize);
5593
+ transform(matrix, resize, transition) {
5594
+ transform(this, matrix, resize, transition);
5590
5595
  }
5591
5596
  move(x, y, transition) {
5592
5597
  moveLocal(this, x, y, transition);
@@ -5594,32 +5599,32 @@ let Leaf = class Leaf {
5594
5599
  moveInner(x, y, transition) {
5595
5600
  moveWorld(this, x, y, true, transition);
5596
5601
  }
5597
- scaleOf(origin, scaleX, scaleY, resize) {
5598
- zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize);
5602
+ scaleOf(origin, scaleX, scaleY, resize, transition) {
5603
+ zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition);
5599
5604
  }
5600
- rotateOf(origin, rotation) {
5601
- rotateOfLocal(this, getLocalOrigin(this, origin), rotation);
5605
+ rotateOf(origin, rotation, transition) {
5606
+ rotateOfLocal(this, getLocalOrigin(this, origin), rotation, transition);
5602
5607
  }
5603
- skewOf(origin, skewX, skewY, resize) {
5604
- skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize);
5608
+ skewOf(origin, skewX, skewY, resize, transition) {
5609
+ skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize, transition);
5605
5610
  }
5606
- transformWorld(worldTransform, resize) {
5607
- transformWorld(this, worldTransform, resize);
5611
+ transformWorld(worldTransform, resize, transition) {
5612
+ transformWorld(this, worldTransform, resize, transition);
5608
5613
  }
5609
5614
  moveWorld(x, y, transition) {
5610
5615
  moveWorld(this, x, y, false, transition);
5611
5616
  }
5612
- scaleOfWorld(worldOrigin, scaleX, scaleY, resize) {
5613
- zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize);
5617
+ scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition) {
5618
+ zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition);
5614
5619
  }
5615
5620
  rotateOfWorld(worldOrigin, rotation) {
5616
5621
  rotateOfWorld(this, worldOrigin, rotation);
5617
5622
  }
5618
- skewOfWorld(worldOrigin, skewX, skewY, resize) {
5619
- skewOfWorld(this, worldOrigin, skewX, skewY, resize);
5623
+ skewOfWorld(worldOrigin, skewX, skewY, resize, transition) {
5624
+ skewOfWorld(this, worldOrigin, skewX, skewY, resize, transition);
5620
5625
  }
5621
- flip(axis) {
5622
- transform(this, getFlipTransform(this, axis));
5626
+ flip(axis, transition) {
5627
+ transform(this, getFlipTransform(this, axis), false, transition);
5623
5628
  }
5624
5629
  scaleResize(scaleX, scaleY = scaleX, _noResize) {
5625
5630
  this.scaleX *= scaleX;
@@ -6007,7 +6012,7 @@ class LeafLevelList {
6007
6012
  }
6008
6013
  }
6009
6014
 
6010
- const version = "1.3.2";
6015
+ const version = "1.4.0";
6011
6016
 
6012
6017
  class LeaferCanvas extends LeaferCanvasBase {
6013
6018
  get allowBackgroundColor() { return true; }
@@ -6352,7 +6357,7 @@ class Layouter {
6352
6357
  }
6353
6358
  partLayout() {
6354
6359
  var _a;
6355
- if (!((_a = this.__updatedList) === null || _a === void 0 ? void 0 : _a.length))
6360
+ if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
6356
6361
  return;
6357
6362
  const t = Run.start('PartLayout');
6358
6363
  const { target, __updatedList: updateList } = this;
@@ -6923,6 +6928,7 @@ class UIData extends LeafData {
6923
6928
  return t.fill && this.__hasStroke;
6924
6929
  }
6925
6930
  get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
6931
+ get __hasSurface() { const t = this; return (t.fill || t.stroke); }
6926
6932
  get __autoWidth() { return !this._width; }
6927
6933
  get __autoHeight() { return !this._height; }
6928
6934
  get __autoSide() { return !this._width || !this._height; }
@@ -7426,199 +7432,199 @@ let UI = UI_1 = class UI extends Leaf {
7426
7432
  };
7427
7433
  __decorate([
7428
7434
  dataProcessor(UIData)
7429
- ], UI.prototype, "__", void 0);
7435
+ ], UI.prototype, "__", undefined);
7430
7436
  __decorate([
7431
7437
  zoomLayerType()
7432
- ], UI.prototype, "zoomLayer", void 0);
7438
+ ], UI.prototype, "zoomLayer", undefined);
7433
7439
  __decorate([
7434
7440
  dataType('')
7435
- ], UI.prototype, "id", void 0);
7441
+ ], UI.prototype, "id", undefined);
7436
7442
  __decorate([
7437
7443
  dataType('')
7438
- ], UI.prototype, "name", void 0);
7444
+ ], UI.prototype, "name", undefined);
7439
7445
  __decorate([
7440
7446
  dataType('')
7441
- ], UI.prototype, "className", void 0);
7447
+ ], UI.prototype, "className", undefined);
7442
7448
  __decorate([
7443
7449
  surfaceType('pass-through')
7444
- ], UI.prototype, "blendMode", void 0);
7450
+ ], UI.prototype, "blendMode", undefined);
7445
7451
  __decorate([
7446
7452
  opacityType(1)
7447
- ], UI.prototype, "opacity", void 0);
7453
+ ], UI.prototype, "opacity", undefined);
7448
7454
  __decorate([
7449
7455
  visibleType(true)
7450
- ], UI.prototype, "visible", void 0);
7456
+ ], UI.prototype, "visible", undefined);
7451
7457
  __decorate([
7452
7458
  surfaceType(false)
7453
- ], UI.prototype, "locked", void 0);
7459
+ ], UI.prototype, "locked", undefined);
7454
7460
  __decorate([
7455
7461
  sortType(0)
7456
- ], UI.prototype, "zIndex", void 0);
7462
+ ], UI.prototype, "zIndex", undefined);
7457
7463
  __decorate([
7458
7464
  maskType(false)
7459
- ], UI.prototype, "mask", void 0);
7465
+ ], UI.prototype, "mask", undefined);
7460
7466
  __decorate([
7461
7467
  eraserType(false)
7462
- ], UI.prototype, "eraser", void 0);
7468
+ ], UI.prototype, "eraser", undefined);
7463
7469
  __decorate([
7464
7470
  positionType(0, true)
7465
- ], UI.prototype, "x", void 0);
7471
+ ], UI.prototype, "x", undefined);
7466
7472
  __decorate([
7467
7473
  positionType(0, true)
7468
- ], UI.prototype, "y", void 0);
7474
+ ], UI.prototype, "y", undefined);
7469
7475
  __decorate([
7470
7476
  boundsType(100, true)
7471
- ], UI.prototype, "width", void 0);
7477
+ ], UI.prototype, "width", undefined);
7472
7478
  __decorate([
7473
7479
  boundsType(100, true)
7474
- ], UI.prototype, "height", void 0);
7480
+ ], UI.prototype, "height", undefined);
7475
7481
  __decorate([
7476
7482
  scaleType(1, true)
7477
- ], UI.prototype, "scaleX", void 0);
7483
+ ], UI.prototype, "scaleX", undefined);
7478
7484
  __decorate([
7479
7485
  scaleType(1, true)
7480
- ], UI.prototype, "scaleY", void 0);
7486
+ ], UI.prototype, "scaleY", undefined);
7481
7487
  __decorate([
7482
7488
  rotationType(0, true)
7483
- ], UI.prototype, "rotation", void 0);
7489
+ ], UI.prototype, "rotation", undefined);
7484
7490
  __decorate([
7485
7491
  rotationType(0, true)
7486
- ], UI.prototype, "skewX", void 0);
7492
+ ], UI.prototype, "skewX", undefined);
7487
7493
  __decorate([
7488
7494
  rotationType(0, true)
7489
- ], UI.prototype, "skewY", void 0);
7495
+ ], UI.prototype, "skewY", undefined);
7490
7496
  __decorate([
7491
7497
  positionType(0, true)
7492
- ], UI.prototype, "offsetX", void 0);
7498
+ ], UI.prototype, "offsetX", undefined);
7493
7499
  __decorate([
7494
7500
  positionType(0, true)
7495
- ], UI.prototype, "offsetY", void 0);
7501
+ ], UI.prototype, "offsetY", undefined);
7496
7502
  __decorate([
7497
7503
  positionType(0, true)
7498
- ], UI.prototype, "scrollX", void 0);
7504
+ ], UI.prototype, "scrollX", undefined);
7499
7505
  __decorate([
7500
7506
  positionType(0, true)
7501
- ], UI.prototype, "scrollY", void 0);
7507
+ ], UI.prototype, "scrollY", undefined);
7502
7508
  __decorate([
7503
7509
  autoLayoutType()
7504
- ], UI.prototype, "origin", void 0);
7510
+ ], UI.prototype, "origin", undefined);
7505
7511
  __decorate([
7506
7512
  autoLayoutType()
7507
- ], UI.prototype, "around", void 0);
7513
+ ], UI.prototype, "around", undefined);
7508
7514
  __decorate([
7509
7515
  dataType(false)
7510
- ], UI.prototype, "lazy", void 0);
7516
+ ], UI.prototype, "lazy", undefined);
7511
7517
  __decorate([
7512
7518
  naturalBoundsType(1)
7513
- ], UI.prototype, "pixelRatio", void 0);
7519
+ ], UI.prototype, "pixelRatio", undefined);
7514
7520
  __decorate([
7515
7521
  pathInputType()
7516
- ], UI.prototype, "path", void 0);
7522
+ ], UI.prototype, "path", undefined);
7517
7523
  __decorate([
7518
7524
  pathType()
7519
- ], UI.prototype, "windingRule", void 0);
7525
+ ], UI.prototype, "windingRule", undefined);
7520
7526
  __decorate([
7521
7527
  pathType(true)
7522
- ], UI.prototype, "closed", void 0);
7528
+ ], UI.prototype, "closed", undefined);
7523
7529
  __decorate([
7524
7530
  boundsType(0)
7525
- ], UI.prototype, "padding", void 0);
7531
+ ], UI.prototype, "padding", undefined);
7526
7532
  __decorate([
7527
7533
  boundsType(false)
7528
- ], UI.prototype, "lockRatio", void 0);
7534
+ ], UI.prototype, "lockRatio", undefined);
7529
7535
  __decorate([
7530
7536
  boundsType()
7531
- ], UI.prototype, "widthRange", void 0);
7537
+ ], UI.prototype, "widthRange", undefined);
7532
7538
  __decorate([
7533
7539
  boundsType()
7534
- ], UI.prototype, "heightRange", void 0);
7540
+ ], UI.prototype, "heightRange", undefined);
7535
7541
  __decorate([
7536
7542
  dataType(false)
7537
- ], UI.prototype, "draggable", void 0);
7543
+ ], UI.prototype, "draggable", undefined);
7538
7544
  __decorate([
7539
7545
  dataType()
7540
- ], UI.prototype, "dragBounds", void 0);
7546
+ ], UI.prototype, "dragBounds", undefined);
7541
7547
  __decorate([
7542
7548
  dataType(false)
7543
- ], UI.prototype, "editable", void 0);
7549
+ ], UI.prototype, "editable", undefined);
7544
7550
  __decorate([
7545
7551
  hitType(true)
7546
- ], UI.prototype, "hittable", void 0);
7552
+ ], UI.prototype, "hittable", undefined);
7547
7553
  __decorate([
7548
7554
  hitType('path')
7549
- ], UI.prototype, "hitFill", void 0);
7555
+ ], UI.prototype, "hitFill", undefined);
7550
7556
  __decorate([
7551
7557
  strokeType('path')
7552
- ], UI.prototype, "hitStroke", void 0);
7558
+ ], UI.prototype, "hitStroke", undefined);
7553
7559
  __decorate([
7554
7560
  hitType(false)
7555
- ], UI.prototype, "hitBox", void 0);
7561
+ ], UI.prototype, "hitBox", undefined);
7556
7562
  __decorate([
7557
7563
  hitType(true)
7558
- ], UI.prototype, "hitChildren", void 0);
7564
+ ], UI.prototype, "hitChildren", undefined);
7559
7565
  __decorate([
7560
7566
  hitType(true)
7561
- ], UI.prototype, "hitSelf", void 0);
7567
+ ], UI.prototype, "hitSelf", undefined);
7562
7568
  __decorate([
7563
7569
  hitType()
7564
- ], UI.prototype, "hitRadius", void 0);
7570
+ ], UI.prototype, "hitRadius", undefined);
7565
7571
  __decorate([
7566
7572
  cursorType('')
7567
- ], UI.prototype, "cursor", void 0);
7573
+ ], UI.prototype, "cursor", undefined);
7568
7574
  __decorate([
7569
7575
  surfaceType()
7570
- ], UI.prototype, "fill", void 0);
7576
+ ], UI.prototype, "fill", undefined);
7571
7577
  __decorate([
7572
7578
  strokeType()
7573
- ], UI.prototype, "stroke", void 0);
7579
+ ], UI.prototype, "stroke", undefined);
7574
7580
  __decorate([
7575
7581
  strokeType('inside')
7576
- ], UI.prototype, "strokeAlign", void 0);
7582
+ ], UI.prototype, "strokeAlign", undefined);
7577
7583
  __decorate([
7578
7584
  strokeType(1)
7579
- ], UI.prototype, "strokeWidth", void 0);
7585
+ ], UI.prototype, "strokeWidth", undefined);
7580
7586
  __decorate([
7581
7587
  strokeType(false)
7582
- ], UI.prototype, "strokeWidthFixed", void 0);
7588
+ ], UI.prototype, "strokeWidthFixed", undefined);
7583
7589
  __decorate([
7584
7590
  strokeType('none')
7585
- ], UI.prototype, "strokeCap", void 0);
7591
+ ], UI.prototype, "strokeCap", undefined);
7586
7592
  __decorate([
7587
7593
  strokeType('miter')
7588
- ], UI.prototype, "strokeJoin", void 0);
7594
+ ], UI.prototype, "strokeJoin", undefined);
7589
7595
  __decorate([
7590
7596
  strokeType()
7591
- ], UI.prototype, "dashPattern", void 0);
7597
+ ], UI.prototype, "dashPattern", undefined);
7592
7598
  __decorate([
7593
7599
  strokeType()
7594
- ], UI.prototype, "dashOffset", void 0);
7600
+ ], UI.prototype, "dashOffset", undefined);
7595
7601
  __decorate([
7596
7602
  strokeType(10)
7597
- ], UI.prototype, "miterLimit", void 0);
7603
+ ], UI.prototype, "miterLimit", undefined);
7598
7604
  __decorate([
7599
7605
  pathType(0)
7600
- ], UI.prototype, "cornerRadius", void 0);
7606
+ ], UI.prototype, "cornerRadius", undefined);
7601
7607
  __decorate([
7602
7608
  pathType()
7603
- ], UI.prototype, "cornerSmoothing", void 0);
7609
+ ], UI.prototype, "cornerSmoothing", undefined);
7604
7610
  __decorate([
7605
7611
  effectType()
7606
- ], UI.prototype, "shadow", void 0);
7612
+ ], UI.prototype, "shadow", undefined);
7607
7613
  __decorate([
7608
7614
  effectType()
7609
- ], UI.prototype, "innerShadow", void 0);
7615
+ ], UI.prototype, "innerShadow", undefined);
7610
7616
  __decorate([
7611
7617
  effectType()
7612
- ], UI.prototype, "blur", void 0);
7618
+ ], UI.prototype, "blur", undefined);
7613
7619
  __decorate([
7614
7620
  effectType()
7615
- ], UI.prototype, "backgroundBlur", void 0);
7621
+ ], UI.prototype, "backgroundBlur", undefined);
7616
7622
  __decorate([
7617
7623
  effectType()
7618
- ], UI.prototype, "grayscale", void 0);
7624
+ ], UI.prototype, "grayscale", undefined);
7619
7625
  __decorate([
7620
7626
  dataType({})
7621
- ], UI.prototype, "data", void 0);
7627
+ ], UI.prototype, "data", undefined);
7622
7628
  __decorate([
7623
7629
  rewrite(Leaf.prototype.reset)
7624
7630
  ], UI.prototype, "reset", null);
@@ -7679,7 +7685,7 @@ let Group = class Group extends UI {
7679
7685
  };
7680
7686
  __decorate([
7681
7687
  dataProcessor(GroupData)
7682
- ], Group.prototype, "__", void 0);
7688
+ ], Group.prototype, "__", undefined);
7683
7689
  Group = __decorate([
7684
7690
  useModule(Branch),
7685
7691
  registerUI()
@@ -7850,8 +7856,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
7850
7856
  __setAttr(attrName, newValue) {
7851
7857
  if (this.canvas) {
7852
7858
  if (canvasSizeAttrs.includes(attrName)) {
7853
- if (!newValue)
7854
- debug$1.warn(attrName + ' is 0');
7855
7859
  this.__changeCanvasSize(attrName, newValue);
7856
7860
  }
7857
7861
  else if (attrName === 'fill') {
@@ -8054,10 +8058,10 @@ let Leafer = Leafer_1 = class Leafer extends Group {
8054
8058
  Leafer.list = new LeafList();
8055
8059
  __decorate([
8056
8060
  dataProcessor(LeaferData)
8057
- ], Leafer.prototype, "__", void 0);
8061
+ ], Leafer.prototype, "__", undefined);
8058
8062
  __decorate([
8059
8063
  boundsType()
8060
- ], Leafer.prototype, "pixelRatio", void 0);
8064
+ ], Leafer.prototype, "pixelRatio", undefined);
8061
8065
  Leafer = Leafer_1 = __decorate([
8062
8066
  registerUI()
8063
8067
  ], Leafer);
@@ -8070,7 +8074,7 @@ let Rect = class Rect extends UI {
8070
8074
  };
8071
8075
  __decorate([
8072
8076
  dataProcessor(RectData)
8073
- ], Rect.prototype, "__", void 0);
8077
+ ], Rect.prototype, "__", undefined);
8074
8078
  Rect = __decorate([
8075
8079
  useModule(RectRender),
8076
8080
  rewriteAble(),
@@ -8095,6 +8099,8 @@ let Box = class Box extends Group {
8095
8099
  const data = this.__;
8096
8100
  if (this.children.length) {
8097
8101
  if (data.__autoSide) {
8102
+ if (data.__hasSurface)
8103
+ this.__extraUpdate();
8098
8104
  super.__updateBoxBounds();
8099
8105
  const { boxBounds } = this.__layout;
8100
8106
  if (!data.__autoSize) {
@@ -8159,13 +8165,13 @@ let Box = class Box extends Group {
8159
8165
  };
8160
8166
  __decorate([
8161
8167
  dataProcessor(BoxData)
8162
- ], Box.prototype, "__", void 0);
8168
+ ], Box.prototype, "__", undefined);
8163
8169
  __decorate([
8164
8170
  dataType(false)
8165
- ], Box.prototype, "resizeChildren", void 0);
8171
+ ], Box.prototype, "resizeChildren", undefined);
8166
8172
  __decorate([
8167
8173
  affectRenderBoundsType('show')
8168
- ], Box.prototype, "overflow", void 0);
8174
+ ], Box.prototype, "overflow", undefined);
8169
8175
  __decorate([
8170
8176
  rewrite(rect$1.__updateStrokeSpread)
8171
8177
  ], Box.prototype, "__updateStrokeSpread", null);
@@ -8204,13 +8210,13 @@ let Frame = class Frame extends Box {
8204
8210
  };
8205
8211
  __decorate([
8206
8212
  dataProcessor(FrameData)
8207
- ], Frame.prototype, "__", void 0);
8213
+ ], Frame.prototype, "__", undefined);
8208
8214
  __decorate([
8209
8215
  surfaceType('#FFFFFF')
8210
- ], Frame.prototype, "fill", void 0);
8216
+ ], Frame.prototype, "fill", undefined);
8211
8217
  __decorate([
8212
8218
  affectRenderBoundsType('hide')
8213
- ], Frame.prototype, "overflow", void 0);
8219
+ ], Frame.prototype, "overflow", undefined);
8214
8220
  Frame = __decorate([
8215
8221
  registerUI()
8216
8222
  ], Frame);
@@ -8257,16 +8263,16 @@ let Ellipse = class Ellipse extends UI {
8257
8263
  };
8258
8264
  __decorate([
8259
8265
  dataProcessor(EllipseData)
8260
- ], Ellipse.prototype, "__", void 0);
8266
+ ], Ellipse.prototype, "__", undefined);
8261
8267
  __decorate([
8262
8268
  pathType(0)
8263
- ], Ellipse.prototype, "innerRadius", void 0);
8269
+ ], Ellipse.prototype, "innerRadius", undefined);
8264
8270
  __decorate([
8265
8271
  pathType(0)
8266
- ], Ellipse.prototype, "startAngle", void 0);
8272
+ ], Ellipse.prototype, "startAngle", undefined);
8267
8273
  __decorate([
8268
8274
  pathType(0)
8269
- ], Ellipse.prototype, "endAngle", void 0);
8275
+ ], Ellipse.prototype, "endAngle", undefined);
8270
8276
  Ellipse = __decorate([
8271
8277
  registerUI()
8272
8278
  ], Ellipse);
@@ -8325,22 +8331,22 @@ let Line = class Line extends UI {
8325
8331
  };
8326
8332
  __decorate([
8327
8333
  dataProcessor(LineData)
8328
- ], Line.prototype, "__", void 0);
8334
+ ], Line.prototype, "__", undefined);
8329
8335
  __decorate([
8330
8336
  affectStrokeBoundsType('center')
8331
- ], Line.prototype, "strokeAlign", void 0);
8337
+ ], Line.prototype, "strokeAlign", undefined);
8332
8338
  __decorate([
8333
8339
  boundsType(0)
8334
- ], Line.prototype, "height", void 0);
8340
+ ], Line.prototype, "height", undefined);
8335
8341
  __decorate([
8336
8342
  pathType()
8337
- ], Line.prototype, "points", void 0);
8343
+ ], Line.prototype, "points", undefined);
8338
8344
  __decorate([
8339
8345
  pathType(0)
8340
- ], Line.prototype, "curve", void 0);
8346
+ ], Line.prototype, "curve", undefined);
8341
8347
  __decorate([
8342
8348
  pathType(false)
8343
- ], Line.prototype, "closed", void 0);
8349
+ ], Line.prototype, "closed", undefined);
8344
8350
  Line = __decorate([
8345
8351
  registerUI()
8346
8352
  ], Line);
@@ -8373,16 +8379,16 @@ let Polygon = class Polygon extends UI {
8373
8379
  };
8374
8380
  __decorate([
8375
8381
  dataProcessor(PolygonData)
8376
- ], Polygon.prototype, "__", void 0);
8382
+ ], Polygon.prototype, "__", undefined);
8377
8383
  __decorate([
8378
8384
  pathType(3)
8379
- ], Polygon.prototype, "sides", void 0);
8385
+ ], Polygon.prototype, "sides", undefined);
8380
8386
  __decorate([
8381
8387
  pathType()
8382
- ], Polygon.prototype, "points", void 0);
8388
+ ], Polygon.prototype, "points", undefined);
8383
8389
  __decorate([
8384
8390
  pathType(0)
8385
- ], Polygon.prototype, "curve", void 0);
8391
+ ], Polygon.prototype, "curve", undefined);
8386
8392
  __decorate([
8387
8393
  rewrite(line.__updateRenderPath)
8388
8394
  ], Polygon.prototype, "__updateRenderPath", null);
@@ -8414,13 +8420,13 @@ let Star = class Star extends UI {
8414
8420
  };
8415
8421
  __decorate([
8416
8422
  dataProcessor(StarData)
8417
- ], Star.prototype, "__", void 0);
8423
+ ], Star.prototype, "__", undefined);
8418
8424
  __decorate([
8419
8425
  pathType(5)
8420
- ], Star.prototype, "corners", void 0);
8426
+ ], Star.prototype, "corners", undefined);
8421
8427
  __decorate([
8422
8428
  pathType(0.382)
8423
- ], Star.prototype, "innerRadius", void 0);
8429
+ ], Star.prototype, "innerRadius", undefined);
8424
8430
  Star = __decorate([
8425
8431
  registerUI()
8426
8432
  ], Star);
@@ -8442,10 +8448,10 @@ let Image = class Image extends Rect {
8442
8448
  };
8443
8449
  __decorate([
8444
8450
  dataProcessor(ImageData)
8445
- ], Image.prototype, "__", void 0);
8451
+ ], Image.prototype, "__", undefined);
8446
8452
  __decorate([
8447
8453
  boundsType('')
8448
- ], Image.prototype, "url", void 0);
8454
+ ], Image.prototype, "url", undefined);
8449
8455
  Image = __decorate([
8450
8456
  registerUI()
8451
8457
  ], Image);
@@ -8508,25 +8514,25 @@ let Canvas = class Canvas extends Rect {
8508
8514
  };
8509
8515
  __decorate([
8510
8516
  dataProcessor(CanvasData)
8511
- ], Canvas.prototype, "__", void 0);
8517
+ ], Canvas.prototype, "__", undefined);
8512
8518
  __decorate([
8513
8519
  resizeType(100)
8514
- ], Canvas.prototype, "width", void 0);
8520
+ ], Canvas.prototype, "width", undefined);
8515
8521
  __decorate([
8516
8522
  resizeType(100)
8517
- ], Canvas.prototype, "height", void 0);
8523
+ ], Canvas.prototype, "height", undefined);
8518
8524
  __decorate([
8519
8525
  resizeType(1)
8520
- ], Canvas.prototype, "pixelRatio", void 0);
8526
+ ], Canvas.prototype, "pixelRatio", undefined);
8521
8527
  __decorate([
8522
8528
  resizeType(true)
8523
- ], Canvas.prototype, "smooth", void 0);
8529
+ ], Canvas.prototype, "smooth", undefined);
8524
8530
  __decorate([
8525
8531
  dataType(false)
8526
- ], Canvas.prototype, "safeResize", void 0);
8532
+ ], Canvas.prototype, "safeResize", undefined);
8527
8533
  __decorate([
8528
8534
  resizeType()
8529
- ], Canvas.prototype, "contextSettings", void 0);
8535
+ ], Canvas.prototype, "contextSettings", undefined);
8530
8536
  Canvas = __decorate([
8531
8537
  registerUI()
8532
8538
  ], Canvas);
@@ -8617,76 +8623,76 @@ let Text = class Text extends UI {
8617
8623
  };
8618
8624
  __decorate([
8619
8625
  dataProcessor(TextData)
8620
- ], Text.prototype, "__", void 0);
8626
+ ], Text.prototype, "__", undefined);
8621
8627
  __decorate([
8622
8628
  boundsType(0)
8623
- ], Text.prototype, "width", void 0);
8629
+ ], Text.prototype, "width", undefined);
8624
8630
  __decorate([
8625
8631
  boundsType(0)
8626
- ], Text.prototype, "height", void 0);
8632
+ ], Text.prototype, "height", undefined);
8627
8633
  __decorate([
8628
8634
  dataType(false)
8629
- ], Text.prototype, "resizeFontSize", void 0);
8635
+ ], Text.prototype, "resizeFontSize", undefined);
8630
8636
  __decorate([
8631
8637
  surfaceType('#000000')
8632
- ], Text.prototype, "fill", void 0);
8638
+ ], Text.prototype, "fill", undefined);
8633
8639
  __decorate([
8634
8640
  affectStrokeBoundsType('outside')
8635
- ], Text.prototype, "strokeAlign", void 0);
8641
+ ], Text.prototype, "strokeAlign", undefined);
8636
8642
  __decorate([
8637
8643
  hitType('all')
8638
- ], Text.prototype, "hitFill", void 0);
8644
+ ], Text.prototype, "hitFill", undefined);
8639
8645
  __decorate([
8640
8646
  boundsType('')
8641
- ], Text.prototype, "text", void 0);
8647
+ ], Text.prototype, "text", undefined);
8642
8648
  __decorate([
8643
- boundsType('L')
8644
- ], Text.prototype, "fontFamily", void 0);
8649
+ boundsType('caption')
8650
+ ], Text.prototype, "fontFamily", undefined);
8645
8651
  __decorate([
8646
8652
  boundsType(12)
8647
- ], Text.prototype, "fontSize", void 0);
8653
+ ], Text.prototype, "fontSize", undefined);
8648
8654
  __decorate([
8649
8655
  boundsType('normal')
8650
- ], Text.prototype, "fontWeight", void 0);
8656
+ ], Text.prototype, "fontWeight", undefined);
8651
8657
  __decorate([
8652
8658
  boundsType(false)
8653
- ], Text.prototype, "italic", void 0);
8659
+ ], Text.prototype, "italic", undefined);
8654
8660
  __decorate([
8655
8661
  boundsType('none')
8656
- ], Text.prototype, "textCase", void 0);
8662
+ ], Text.prototype, "textCase", undefined);
8657
8663
  __decorate([
8658
8664
  boundsType('none')
8659
- ], Text.prototype, "textDecoration", void 0);
8665
+ ], Text.prototype, "textDecoration", undefined);
8660
8666
  __decorate([
8661
8667
  boundsType(0)
8662
- ], Text.prototype, "letterSpacing", void 0);
8668
+ ], Text.prototype, "letterSpacing", undefined);
8663
8669
  __decorate([
8664
8670
  boundsType({ type: 'percent', value: 1.5 })
8665
- ], Text.prototype, "lineHeight", void 0);
8671
+ ], Text.prototype, "lineHeight", undefined);
8666
8672
  __decorate([
8667
8673
  boundsType(0)
8668
- ], Text.prototype, "paraIndent", void 0);
8674
+ ], Text.prototype, "paraIndent", undefined);
8669
8675
  __decorate([
8670
8676
  boundsType(0)
8671
- ], Text.prototype, "paraSpacing", void 0);
8677
+ ], Text.prototype, "paraSpacing", undefined);
8672
8678
  __decorate([
8673
8679
  boundsType('x')
8674
- ], Text.prototype, "writingMode", void 0);
8680
+ ], Text.prototype, "writingMode", undefined);
8675
8681
  __decorate([
8676
8682
  boundsType('left')
8677
- ], Text.prototype, "textAlign", void 0);
8683
+ ], Text.prototype, "textAlign", undefined);
8678
8684
  __decorate([
8679
8685
  boundsType('top')
8680
- ], Text.prototype, "verticalAlign", void 0);
8686
+ ], Text.prototype, "verticalAlign", undefined);
8681
8687
  __decorate([
8682
8688
  boundsType(true)
8683
- ], Text.prototype, "autoSizeAlign", void 0);
8689
+ ], Text.prototype, "autoSizeAlign", undefined);
8684
8690
  __decorate([
8685
8691
  boundsType('normal')
8686
- ], Text.prototype, "textWrap", void 0);
8692
+ ], Text.prototype, "textWrap", undefined);
8687
8693
  __decorate([
8688
8694
  boundsType('show')
8689
- ], Text.prototype, "textOverflow", void 0);
8695
+ ], Text.prototype, "textOverflow", undefined);
8690
8696
  Text = __decorate([
8691
8697
  registerUI()
8692
8698
  ], Text);
@@ -8699,10 +8705,10 @@ let Path = class Path extends UI {
8699
8705
  };
8700
8706
  __decorate([
8701
8707
  dataProcessor(PathData)
8702
- ], Path.prototype, "__", void 0);
8708
+ ], Path.prototype, "__", undefined);
8703
8709
  __decorate([
8704
8710
  affectStrokeBoundsType('center')
8705
- ], Path.prototype, "strokeAlign", void 0);
8711
+ ], Path.prototype, "strokeAlign", undefined);
8706
8712
  Path = __decorate([
8707
8713
  registerUI()
8708
8714
  ], Path);
@@ -8741,10 +8747,10 @@ let Pen = class Pen extends Group {
8741
8747
  };
8742
8748
  __decorate([
8743
8749
  dataProcessor(PenData)
8744
- ], Pen.prototype, "__", void 0);
8750
+ ], Pen.prototype, "__", undefined);
8745
8751
  __decorate([
8746
8752
  penPathType()
8747
- ], Pen.prototype, "path", void 0);
8753
+ ], Pen.prototype, "path", undefined);
8748
8754
  Pen = __decorate([
8749
8755
  useModule(PathCreator, ['set', 'path', 'paint']),
8750
8756
  registerUI()
@@ -9511,10 +9517,9 @@ class InteractionBase {
9511
9517
  }
9512
9518
  }
9513
9519
  pointerMoveReal(data) {
9514
- const { dragHover, dragDistance } = this.p;
9515
9520
  this.emit(PointerEvent.BEFORE_MOVE, data, this.defaultPath);
9516
9521
  if (this.downData) {
9517
- const canDrag = PointHelper.getDistance(this.downData, data) > dragDistance;
9522
+ const canDrag = PointHelper.getDistance(this.downData, data) > this.p.dragDistance;
9518
9523
  if (canDrag) {
9519
9524
  if (this.waitTap)
9520
9525
  this.pointerWaitCancel();
@@ -9526,9 +9531,8 @@ class InteractionBase {
9526
9531
  this.updateHoverData(data);
9527
9532
  this.checkPath(data);
9528
9533
  this.emit(PointerEvent.MOVE, data);
9529
- if (!(this.dragging && !dragHover))
9530
- this.pointerHover(data);
9531
- if (this.dragger.dragging) {
9534
+ this.pointerHover(data);
9535
+ if (this.dragging) {
9532
9536
  this.dragger.dragOverOrOut(data);
9533
9537
  this.dragger.dragEnterOrLeave(data);
9534
9538
  }
@@ -9609,7 +9613,8 @@ class InteractionBase {
9609
9613
  this.updateCursor();
9610
9614
  }
9611
9615
  pointerHover(data) {
9612
- if (this.canHover) {
9616
+ if (this.canHover && !(this.dragging && !this.p.dragHover)) {
9617
+ data.path || (data.path = new LeafList());
9613
9618
  this.pointerOverOrOut(data);
9614
9619
  this.pointerEnterOrLeave(data);
9615
9620
  }
@@ -9929,9 +9934,9 @@ leaf.__hitWorld = function (point) {
9929
9934
  }
9930
9935
  return this.__hit(inner);
9931
9936
  };
9932
- leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitFill(inner, this.__.windingRule); };
9933
- leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitStroke(inner, strokeWidth); };
9934
- leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
9937
+ leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitFill(inner, this.__.windingRule); };
9938
+ leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitStroke(inner, strokeWidth); };
9939
+ leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
9935
9940
  leaf.__drawHitPath = function (canvas) { if (canvas)
9936
9941
  this.__drawRenderPath(canvas); };
9937
9942
 
@@ -10666,7 +10671,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
10666
10671
  }
10667
10672
  else {
10668
10673
  if (!paint.patternTask) {
10669
- paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
10674
+ paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
10670
10675
  paint.patternTask = null;
10671
10676
  if (canvas.bounds.hit(ui.__nowWorld))
10672
10677
  createPattern(ui, paint, pixelRatio);
@@ -10822,7 +10827,7 @@ function shadow(ui, current, shape) {
10822
10827
  const end = shadow.length - 1;
10823
10828
  toOffsetOutBounds$1(bounds, offsetOutBounds$1);
10824
10829
  shadow.forEach((item, index) => {
10825
- other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
10830
+ other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
10826
10831
  spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
10827
10832
  drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
10828
10833
  copyBounds = bounds;
@@ -10898,7 +10903,7 @@ function innerShadow(ui, current, shape) {
10898
10903
  other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
10899
10904
  copyBounds = bounds;
10900
10905
  }
10901
- other.fillWorld(copyBounds, item.color, 'source-in');
10906
+ other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
10902
10907
  if (ui.__worldFlipped) {
10903
10908
  current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
10904
10909
  }
@@ -11256,11 +11261,11 @@ const TextMode = 2;
11256
11261
  function layoutChar(drawData, style, width, _height) {
11257
11262
  const { rows } = drawData;
11258
11263
  const { textAlign, paraIndent, letterSpacing } = style;
11259
- let charX, addWordWidth, indentWidth, mode, wordChar;
11264
+ let charX, addWordWidth, indentWidth, mode, wordChar, wordsLength;
11260
11265
  rows.forEach(row => {
11261
11266
  if (row.words) {
11262
- indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
11263
- addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
11267
+ indentWidth = paraIndent && row.paraStart ? paraIndent : 0, wordsLength = row.words.length;
11268
+ addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && wordsLength > 1) ? (width - row.width - indentWidth) / (wordsLength - 1) : 0;
11264
11269
  mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
11265
11270
  if (row.isOverflow && !letterSpacing)
11266
11271
  row.textMode = true;
@@ -11272,7 +11277,7 @@ function layoutChar(drawData, style, width, _height) {
11272
11277
  row.x += indentWidth;
11273
11278
  charX = row.x;
11274
11279
  row.data = [];
11275
- row.words.forEach(word => {
11280
+ row.words.forEach((word, index) => {
11276
11281
  if (mode === WordMode) {
11277
11282
  wordChar = { char: '', x: charX };
11278
11283
  charX = toWordChar(word.data, charX, wordChar);
@@ -11282,7 +11287,7 @@ function layoutChar(drawData, style, width, _height) {
11282
11287
  else {
11283
11288
  charX = toChar(word.data, charX, row.data, row.isOverflow);
11284
11289
  }
11285
- if (addWordWidth && (!row.paraEnd || textAlign === 'both')) {
11290
+ if (addWordWidth && (!row.paraEnd || textAlign === 'both') && (index !== wordsLength - 1)) {
11286
11291
  charX += addWordWidth;
11287
11292
  row.width += addWordWidth;
11288
11293
  }
@@ -11539,3 +11544,4 @@ Object.assign(Creator, {
11539
11544
  useCanvas();
11540
11545
 
11541
11546
  export { AlignHelper, Answer, App, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragEvent, Dragger, DropEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Frame, FrameData, Group, GroupData, HitCanvasManager, Image, ImageData, ImageEvent, ImageManager, IncrementId, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferImage, Line, LineData, MathHelper, Matrix, MatrixHelper, MoveEvent, MyDragEvent, MyImage, MyPointerEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, RotateEvent, Run, Selector, Star, StarData, State, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, doBoundsType, doStrokeType, effectType, emptyData, eraserType, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isNull, layoutProcessor, maskType, naturalBoundsType, opacityType, pathInputType, pathType, pen, positionType, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, sortType, strokeType, surfaceType, tempBounds$1 as tempBounds, tempMatrix, tempPoint$3 as tempPoint, useCanvas, useModule, version, visibleType, zoomLayerType };
11547
+ //# sourceMappingURL=worker.module.js.map