@leafer-ui/worker 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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;
@@ -5175,8 +5175,7 @@ const LeafBounds = {
5175
5175
  __updateAutoLayout() {
5176
5176
  this.__layout.matrixChanged = true;
5177
5177
  if (this.isBranch) {
5178
- if (this.leaferIsReady)
5179
- this.leafer.layouter.addExtra(this);
5178
+ this.__extraUpdate();
5180
5179
  if (this.__.flow) {
5181
5180
  if (this.__layout.boxChanged)
5182
5181
  this.__updateFlowLayout();
@@ -5329,7 +5328,7 @@ let Leaf = class Leaf {
5329
5328
  get __worldFlipped() { return this.__world.scaleX < 0 || this.__world.scaleY < 0; }
5330
5329
  get __onlyHitMask() { return this.__hasMask && !this.__.hitChildren; }
5331
5330
  get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
5332
- get __inLazyBounds() { const { leafer } = this; return leafer && leafer.created && leafer.lazyBounds.hit(this.__world); }
5331
+ get __inLazyBounds() { return this.leaferIsCreated && this.leafer.lazyBounds.hit(this.__world); }
5333
5332
  get pathInputed() { return this.__.__pathInputed; }
5334
5333
  set event(map) { this.on(map); }
5335
5334
  constructor(data) {
@@ -5440,6 +5439,10 @@ let Leaf = class Leaf {
5440
5439
  forceRender(_bounds, _sync) {
5441
5440
  this.forceUpdate('surface');
5442
5441
  }
5442
+ __extraUpdate() {
5443
+ if (this.leaferIsReady)
5444
+ this.leafer.layouter.addExtra(this);
5445
+ }
5443
5446
  __updateWorldMatrix() { }
5444
5447
  __updateLocalMatrix() { }
5445
5448
  __updateWorldBounds() { }
@@ -6007,7 +6010,7 @@ class LeafLevelList {
6007
6010
  }
6008
6011
  }
6009
6012
 
6010
- const version = "1.3.2";
6013
+ const version = "1.3.3";
6011
6014
 
6012
6015
  class LeaferCanvas extends LeaferCanvasBase {
6013
6016
  get allowBackgroundColor() { return true; }
@@ -6352,7 +6355,7 @@ class Layouter {
6352
6355
  }
6353
6356
  partLayout() {
6354
6357
  var _a;
6355
- if (!((_a = this.__updatedList) === null || _a === void 0 ? void 0 : _a.length))
6358
+ if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
6356
6359
  return;
6357
6360
  const t = Run.start('PartLayout');
6358
6361
  const { target, __updatedList: updateList } = this;
@@ -6923,6 +6926,7 @@ class UIData extends LeafData {
6923
6926
  return t.fill && this.__hasStroke;
6924
6927
  }
6925
6928
  get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
6929
+ get __hasSurface() { const t = this; return (t.fill || t.stroke); }
6926
6930
  get __autoWidth() { return !this._width; }
6927
6931
  get __autoHeight() { return !this._height; }
6928
6932
  get __autoSide() { return !this._width || !this._height; }
@@ -7426,199 +7430,199 @@ let UI = UI_1 = class UI extends Leaf {
7426
7430
  };
7427
7431
  __decorate([
7428
7432
  dataProcessor(UIData)
7429
- ], UI.prototype, "__", void 0);
7433
+ ], UI.prototype, "__", undefined);
7430
7434
  __decorate([
7431
7435
  zoomLayerType()
7432
- ], UI.prototype, "zoomLayer", void 0);
7436
+ ], UI.prototype, "zoomLayer", undefined);
7433
7437
  __decorate([
7434
7438
  dataType('')
7435
- ], UI.prototype, "id", void 0);
7439
+ ], UI.prototype, "id", undefined);
7436
7440
  __decorate([
7437
7441
  dataType('')
7438
- ], UI.prototype, "name", void 0);
7442
+ ], UI.prototype, "name", undefined);
7439
7443
  __decorate([
7440
7444
  dataType('')
7441
- ], UI.prototype, "className", void 0);
7445
+ ], UI.prototype, "className", undefined);
7442
7446
  __decorate([
7443
7447
  surfaceType('pass-through')
7444
- ], UI.prototype, "blendMode", void 0);
7448
+ ], UI.prototype, "blendMode", undefined);
7445
7449
  __decorate([
7446
7450
  opacityType(1)
7447
- ], UI.prototype, "opacity", void 0);
7451
+ ], UI.prototype, "opacity", undefined);
7448
7452
  __decorate([
7449
7453
  visibleType(true)
7450
- ], UI.prototype, "visible", void 0);
7454
+ ], UI.prototype, "visible", undefined);
7451
7455
  __decorate([
7452
7456
  surfaceType(false)
7453
- ], UI.prototype, "locked", void 0);
7457
+ ], UI.prototype, "locked", undefined);
7454
7458
  __decorate([
7455
7459
  sortType(0)
7456
- ], UI.prototype, "zIndex", void 0);
7460
+ ], UI.prototype, "zIndex", undefined);
7457
7461
  __decorate([
7458
7462
  maskType(false)
7459
- ], UI.prototype, "mask", void 0);
7463
+ ], UI.prototype, "mask", undefined);
7460
7464
  __decorate([
7461
7465
  eraserType(false)
7462
- ], UI.prototype, "eraser", void 0);
7466
+ ], UI.prototype, "eraser", undefined);
7463
7467
  __decorate([
7464
7468
  positionType(0, true)
7465
- ], UI.prototype, "x", void 0);
7469
+ ], UI.prototype, "x", undefined);
7466
7470
  __decorate([
7467
7471
  positionType(0, true)
7468
- ], UI.prototype, "y", void 0);
7472
+ ], UI.prototype, "y", undefined);
7469
7473
  __decorate([
7470
7474
  boundsType(100, true)
7471
- ], UI.prototype, "width", void 0);
7475
+ ], UI.prototype, "width", undefined);
7472
7476
  __decorate([
7473
7477
  boundsType(100, true)
7474
- ], UI.prototype, "height", void 0);
7478
+ ], UI.prototype, "height", undefined);
7475
7479
  __decorate([
7476
7480
  scaleType(1, true)
7477
- ], UI.prototype, "scaleX", void 0);
7481
+ ], UI.prototype, "scaleX", undefined);
7478
7482
  __decorate([
7479
7483
  scaleType(1, true)
7480
- ], UI.prototype, "scaleY", void 0);
7484
+ ], UI.prototype, "scaleY", undefined);
7481
7485
  __decorate([
7482
7486
  rotationType(0, true)
7483
- ], UI.prototype, "rotation", void 0);
7487
+ ], UI.prototype, "rotation", undefined);
7484
7488
  __decorate([
7485
7489
  rotationType(0, true)
7486
- ], UI.prototype, "skewX", void 0);
7490
+ ], UI.prototype, "skewX", undefined);
7487
7491
  __decorate([
7488
7492
  rotationType(0, true)
7489
- ], UI.prototype, "skewY", void 0);
7493
+ ], UI.prototype, "skewY", undefined);
7490
7494
  __decorate([
7491
7495
  positionType(0, true)
7492
- ], UI.prototype, "offsetX", void 0);
7496
+ ], UI.prototype, "offsetX", undefined);
7493
7497
  __decorate([
7494
7498
  positionType(0, true)
7495
- ], UI.prototype, "offsetY", void 0);
7499
+ ], UI.prototype, "offsetY", undefined);
7496
7500
  __decorate([
7497
7501
  positionType(0, true)
7498
- ], UI.prototype, "scrollX", void 0);
7502
+ ], UI.prototype, "scrollX", undefined);
7499
7503
  __decorate([
7500
7504
  positionType(0, true)
7501
- ], UI.prototype, "scrollY", void 0);
7505
+ ], UI.prototype, "scrollY", undefined);
7502
7506
  __decorate([
7503
7507
  autoLayoutType()
7504
- ], UI.prototype, "origin", void 0);
7508
+ ], UI.prototype, "origin", undefined);
7505
7509
  __decorate([
7506
7510
  autoLayoutType()
7507
- ], UI.prototype, "around", void 0);
7511
+ ], UI.prototype, "around", undefined);
7508
7512
  __decorate([
7509
7513
  dataType(false)
7510
- ], UI.prototype, "lazy", void 0);
7514
+ ], UI.prototype, "lazy", undefined);
7511
7515
  __decorate([
7512
7516
  naturalBoundsType(1)
7513
- ], UI.prototype, "pixelRatio", void 0);
7517
+ ], UI.prototype, "pixelRatio", undefined);
7514
7518
  __decorate([
7515
7519
  pathInputType()
7516
- ], UI.prototype, "path", void 0);
7520
+ ], UI.prototype, "path", undefined);
7517
7521
  __decorate([
7518
7522
  pathType()
7519
- ], UI.prototype, "windingRule", void 0);
7523
+ ], UI.prototype, "windingRule", undefined);
7520
7524
  __decorate([
7521
7525
  pathType(true)
7522
- ], UI.prototype, "closed", void 0);
7526
+ ], UI.prototype, "closed", undefined);
7523
7527
  __decorate([
7524
7528
  boundsType(0)
7525
- ], UI.prototype, "padding", void 0);
7529
+ ], UI.prototype, "padding", undefined);
7526
7530
  __decorate([
7527
7531
  boundsType(false)
7528
- ], UI.prototype, "lockRatio", void 0);
7532
+ ], UI.prototype, "lockRatio", undefined);
7529
7533
  __decorate([
7530
7534
  boundsType()
7531
- ], UI.prototype, "widthRange", void 0);
7535
+ ], UI.prototype, "widthRange", undefined);
7532
7536
  __decorate([
7533
7537
  boundsType()
7534
- ], UI.prototype, "heightRange", void 0);
7538
+ ], UI.prototype, "heightRange", undefined);
7535
7539
  __decorate([
7536
7540
  dataType(false)
7537
- ], UI.prototype, "draggable", void 0);
7541
+ ], UI.prototype, "draggable", undefined);
7538
7542
  __decorate([
7539
7543
  dataType()
7540
- ], UI.prototype, "dragBounds", void 0);
7544
+ ], UI.prototype, "dragBounds", undefined);
7541
7545
  __decorate([
7542
7546
  dataType(false)
7543
- ], UI.prototype, "editable", void 0);
7547
+ ], UI.prototype, "editable", undefined);
7544
7548
  __decorate([
7545
7549
  hitType(true)
7546
- ], UI.prototype, "hittable", void 0);
7550
+ ], UI.prototype, "hittable", undefined);
7547
7551
  __decorate([
7548
7552
  hitType('path')
7549
- ], UI.prototype, "hitFill", void 0);
7553
+ ], UI.prototype, "hitFill", undefined);
7550
7554
  __decorate([
7551
7555
  strokeType('path')
7552
- ], UI.prototype, "hitStroke", void 0);
7556
+ ], UI.prototype, "hitStroke", undefined);
7553
7557
  __decorate([
7554
7558
  hitType(false)
7555
- ], UI.prototype, "hitBox", void 0);
7559
+ ], UI.prototype, "hitBox", undefined);
7556
7560
  __decorate([
7557
7561
  hitType(true)
7558
- ], UI.prototype, "hitChildren", void 0);
7562
+ ], UI.prototype, "hitChildren", undefined);
7559
7563
  __decorate([
7560
7564
  hitType(true)
7561
- ], UI.prototype, "hitSelf", void 0);
7565
+ ], UI.prototype, "hitSelf", undefined);
7562
7566
  __decorate([
7563
7567
  hitType()
7564
- ], UI.prototype, "hitRadius", void 0);
7568
+ ], UI.prototype, "hitRadius", undefined);
7565
7569
  __decorate([
7566
7570
  cursorType('')
7567
- ], UI.prototype, "cursor", void 0);
7571
+ ], UI.prototype, "cursor", undefined);
7568
7572
  __decorate([
7569
7573
  surfaceType()
7570
- ], UI.prototype, "fill", void 0);
7574
+ ], UI.prototype, "fill", undefined);
7571
7575
  __decorate([
7572
7576
  strokeType()
7573
- ], UI.prototype, "stroke", void 0);
7577
+ ], UI.prototype, "stroke", undefined);
7574
7578
  __decorate([
7575
7579
  strokeType('inside')
7576
- ], UI.prototype, "strokeAlign", void 0);
7580
+ ], UI.prototype, "strokeAlign", undefined);
7577
7581
  __decorate([
7578
7582
  strokeType(1)
7579
- ], UI.prototype, "strokeWidth", void 0);
7583
+ ], UI.prototype, "strokeWidth", undefined);
7580
7584
  __decorate([
7581
7585
  strokeType(false)
7582
- ], UI.prototype, "strokeWidthFixed", void 0);
7586
+ ], UI.prototype, "strokeWidthFixed", undefined);
7583
7587
  __decorate([
7584
7588
  strokeType('none')
7585
- ], UI.prototype, "strokeCap", void 0);
7589
+ ], UI.prototype, "strokeCap", undefined);
7586
7590
  __decorate([
7587
7591
  strokeType('miter')
7588
- ], UI.prototype, "strokeJoin", void 0);
7592
+ ], UI.prototype, "strokeJoin", undefined);
7589
7593
  __decorate([
7590
7594
  strokeType()
7591
- ], UI.prototype, "dashPattern", void 0);
7595
+ ], UI.prototype, "dashPattern", undefined);
7592
7596
  __decorate([
7593
7597
  strokeType()
7594
- ], UI.prototype, "dashOffset", void 0);
7598
+ ], UI.prototype, "dashOffset", undefined);
7595
7599
  __decorate([
7596
7600
  strokeType(10)
7597
- ], UI.prototype, "miterLimit", void 0);
7601
+ ], UI.prototype, "miterLimit", undefined);
7598
7602
  __decorate([
7599
7603
  pathType(0)
7600
- ], UI.prototype, "cornerRadius", void 0);
7604
+ ], UI.prototype, "cornerRadius", undefined);
7601
7605
  __decorate([
7602
7606
  pathType()
7603
- ], UI.prototype, "cornerSmoothing", void 0);
7607
+ ], UI.prototype, "cornerSmoothing", undefined);
7604
7608
  __decorate([
7605
7609
  effectType()
7606
- ], UI.prototype, "shadow", void 0);
7610
+ ], UI.prototype, "shadow", undefined);
7607
7611
  __decorate([
7608
7612
  effectType()
7609
- ], UI.prototype, "innerShadow", void 0);
7613
+ ], UI.prototype, "innerShadow", undefined);
7610
7614
  __decorate([
7611
7615
  effectType()
7612
- ], UI.prototype, "blur", void 0);
7616
+ ], UI.prototype, "blur", undefined);
7613
7617
  __decorate([
7614
7618
  effectType()
7615
- ], UI.prototype, "backgroundBlur", void 0);
7619
+ ], UI.prototype, "backgroundBlur", undefined);
7616
7620
  __decorate([
7617
7621
  effectType()
7618
- ], UI.prototype, "grayscale", void 0);
7622
+ ], UI.prototype, "grayscale", undefined);
7619
7623
  __decorate([
7620
7624
  dataType({})
7621
- ], UI.prototype, "data", void 0);
7625
+ ], UI.prototype, "data", undefined);
7622
7626
  __decorate([
7623
7627
  rewrite(Leaf.prototype.reset)
7624
7628
  ], UI.prototype, "reset", null);
@@ -7679,7 +7683,7 @@ let Group = class Group extends UI {
7679
7683
  };
7680
7684
  __decorate([
7681
7685
  dataProcessor(GroupData)
7682
- ], Group.prototype, "__", void 0);
7686
+ ], Group.prototype, "__", undefined);
7683
7687
  Group = __decorate([
7684
7688
  useModule(Branch),
7685
7689
  registerUI()
@@ -7850,8 +7854,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
7850
7854
  __setAttr(attrName, newValue) {
7851
7855
  if (this.canvas) {
7852
7856
  if (canvasSizeAttrs.includes(attrName)) {
7853
- if (!newValue)
7854
- debug$1.warn(attrName + ' is 0');
7855
7857
  this.__changeCanvasSize(attrName, newValue);
7856
7858
  }
7857
7859
  else if (attrName === 'fill') {
@@ -8054,10 +8056,10 @@ let Leafer = Leafer_1 = class Leafer extends Group {
8054
8056
  Leafer.list = new LeafList();
8055
8057
  __decorate([
8056
8058
  dataProcessor(LeaferData)
8057
- ], Leafer.prototype, "__", void 0);
8059
+ ], Leafer.prototype, "__", undefined);
8058
8060
  __decorate([
8059
8061
  boundsType()
8060
- ], Leafer.prototype, "pixelRatio", void 0);
8062
+ ], Leafer.prototype, "pixelRatio", undefined);
8061
8063
  Leafer = Leafer_1 = __decorate([
8062
8064
  registerUI()
8063
8065
  ], Leafer);
@@ -8070,7 +8072,7 @@ let Rect = class Rect extends UI {
8070
8072
  };
8071
8073
  __decorate([
8072
8074
  dataProcessor(RectData)
8073
- ], Rect.prototype, "__", void 0);
8075
+ ], Rect.prototype, "__", undefined);
8074
8076
  Rect = __decorate([
8075
8077
  useModule(RectRender),
8076
8078
  rewriteAble(),
@@ -8095,6 +8097,8 @@ let Box = class Box extends Group {
8095
8097
  const data = this.__;
8096
8098
  if (this.children.length) {
8097
8099
  if (data.__autoSide) {
8100
+ if (data.__hasSurface)
8101
+ this.__extraUpdate();
8098
8102
  super.__updateBoxBounds();
8099
8103
  const { boxBounds } = this.__layout;
8100
8104
  if (!data.__autoSize) {
@@ -8159,13 +8163,13 @@ let Box = class Box extends Group {
8159
8163
  };
8160
8164
  __decorate([
8161
8165
  dataProcessor(BoxData)
8162
- ], Box.prototype, "__", void 0);
8166
+ ], Box.prototype, "__", undefined);
8163
8167
  __decorate([
8164
8168
  dataType(false)
8165
- ], Box.prototype, "resizeChildren", void 0);
8169
+ ], Box.prototype, "resizeChildren", undefined);
8166
8170
  __decorate([
8167
8171
  affectRenderBoundsType('show')
8168
- ], Box.prototype, "overflow", void 0);
8172
+ ], Box.prototype, "overflow", undefined);
8169
8173
  __decorate([
8170
8174
  rewrite(rect$1.__updateStrokeSpread)
8171
8175
  ], Box.prototype, "__updateStrokeSpread", null);
@@ -8204,13 +8208,13 @@ let Frame = class Frame extends Box {
8204
8208
  };
8205
8209
  __decorate([
8206
8210
  dataProcessor(FrameData)
8207
- ], Frame.prototype, "__", void 0);
8211
+ ], Frame.prototype, "__", undefined);
8208
8212
  __decorate([
8209
8213
  surfaceType('#FFFFFF')
8210
- ], Frame.prototype, "fill", void 0);
8214
+ ], Frame.prototype, "fill", undefined);
8211
8215
  __decorate([
8212
8216
  affectRenderBoundsType('hide')
8213
- ], Frame.prototype, "overflow", void 0);
8217
+ ], Frame.prototype, "overflow", undefined);
8214
8218
  Frame = __decorate([
8215
8219
  registerUI()
8216
8220
  ], Frame);
@@ -8257,16 +8261,16 @@ let Ellipse = class Ellipse extends UI {
8257
8261
  };
8258
8262
  __decorate([
8259
8263
  dataProcessor(EllipseData)
8260
- ], Ellipse.prototype, "__", void 0);
8264
+ ], Ellipse.prototype, "__", undefined);
8261
8265
  __decorate([
8262
8266
  pathType(0)
8263
- ], Ellipse.prototype, "innerRadius", void 0);
8267
+ ], Ellipse.prototype, "innerRadius", undefined);
8264
8268
  __decorate([
8265
8269
  pathType(0)
8266
- ], Ellipse.prototype, "startAngle", void 0);
8270
+ ], Ellipse.prototype, "startAngle", undefined);
8267
8271
  __decorate([
8268
8272
  pathType(0)
8269
- ], Ellipse.prototype, "endAngle", void 0);
8273
+ ], Ellipse.prototype, "endAngle", undefined);
8270
8274
  Ellipse = __decorate([
8271
8275
  registerUI()
8272
8276
  ], Ellipse);
@@ -8325,22 +8329,22 @@ let Line = class Line extends UI {
8325
8329
  };
8326
8330
  __decorate([
8327
8331
  dataProcessor(LineData)
8328
- ], Line.prototype, "__", void 0);
8332
+ ], Line.prototype, "__", undefined);
8329
8333
  __decorate([
8330
8334
  affectStrokeBoundsType('center')
8331
- ], Line.prototype, "strokeAlign", void 0);
8335
+ ], Line.prototype, "strokeAlign", undefined);
8332
8336
  __decorate([
8333
8337
  boundsType(0)
8334
- ], Line.prototype, "height", void 0);
8338
+ ], Line.prototype, "height", undefined);
8335
8339
  __decorate([
8336
8340
  pathType()
8337
- ], Line.prototype, "points", void 0);
8341
+ ], Line.prototype, "points", undefined);
8338
8342
  __decorate([
8339
8343
  pathType(0)
8340
- ], Line.prototype, "curve", void 0);
8344
+ ], Line.prototype, "curve", undefined);
8341
8345
  __decorate([
8342
8346
  pathType(false)
8343
- ], Line.prototype, "closed", void 0);
8347
+ ], Line.prototype, "closed", undefined);
8344
8348
  Line = __decorate([
8345
8349
  registerUI()
8346
8350
  ], Line);
@@ -8373,16 +8377,16 @@ let Polygon = class Polygon extends UI {
8373
8377
  };
8374
8378
  __decorate([
8375
8379
  dataProcessor(PolygonData)
8376
- ], Polygon.prototype, "__", void 0);
8380
+ ], Polygon.prototype, "__", undefined);
8377
8381
  __decorate([
8378
8382
  pathType(3)
8379
- ], Polygon.prototype, "sides", void 0);
8383
+ ], Polygon.prototype, "sides", undefined);
8380
8384
  __decorate([
8381
8385
  pathType()
8382
- ], Polygon.prototype, "points", void 0);
8386
+ ], Polygon.prototype, "points", undefined);
8383
8387
  __decorate([
8384
8388
  pathType(0)
8385
- ], Polygon.prototype, "curve", void 0);
8389
+ ], Polygon.prototype, "curve", undefined);
8386
8390
  __decorate([
8387
8391
  rewrite(line.__updateRenderPath)
8388
8392
  ], Polygon.prototype, "__updateRenderPath", null);
@@ -8414,13 +8418,13 @@ let Star = class Star extends UI {
8414
8418
  };
8415
8419
  __decorate([
8416
8420
  dataProcessor(StarData)
8417
- ], Star.prototype, "__", void 0);
8421
+ ], Star.prototype, "__", undefined);
8418
8422
  __decorate([
8419
8423
  pathType(5)
8420
- ], Star.prototype, "corners", void 0);
8424
+ ], Star.prototype, "corners", undefined);
8421
8425
  __decorate([
8422
8426
  pathType(0.382)
8423
- ], Star.prototype, "innerRadius", void 0);
8427
+ ], Star.prototype, "innerRadius", undefined);
8424
8428
  Star = __decorate([
8425
8429
  registerUI()
8426
8430
  ], Star);
@@ -8442,10 +8446,10 @@ let Image = class Image extends Rect {
8442
8446
  };
8443
8447
  __decorate([
8444
8448
  dataProcessor(ImageData)
8445
- ], Image.prototype, "__", void 0);
8449
+ ], Image.prototype, "__", undefined);
8446
8450
  __decorate([
8447
8451
  boundsType('')
8448
- ], Image.prototype, "url", void 0);
8452
+ ], Image.prototype, "url", undefined);
8449
8453
  Image = __decorate([
8450
8454
  registerUI()
8451
8455
  ], Image);
@@ -8508,25 +8512,25 @@ let Canvas = class Canvas extends Rect {
8508
8512
  };
8509
8513
  __decorate([
8510
8514
  dataProcessor(CanvasData)
8511
- ], Canvas.prototype, "__", void 0);
8515
+ ], Canvas.prototype, "__", undefined);
8512
8516
  __decorate([
8513
8517
  resizeType(100)
8514
- ], Canvas.prototype, "width", void 0);
8518
+ ], Canvas.prototype, "width", undefined);
8515
8519
  __decorate([
8516
8520
  resizeType(100)
8517
- ], Canvas.prototype, "height", void 0);
8521
+ ], Canvas.prototype, "height", undefined);
8518
8522
  __decorate([
8519
8523
  resizeType(1)
8520
- ], Canvas.prototype, "pixelRatio", void 0);
8524
+ ], Canvas.prototype, "pixelRatio", undefined);
8521
8525
  __decorate([
8522
8526
  resizeType(true)
8523
- ], Canvas.prototype, "smooth", void 0);
8527
+ ], Canvas.prototype, "smooth", undefined);
8524
8528
  __decorate([
8525
8529
  dataType(false)
8526
- ], Canvas.prototype, "safeResize", void 0);
8530
+ ], Canvas.prototype, "safeResize", undefined);
8527
8531
  __decorate([
8528
8532
  resizeType()
8529
- ], Canvas.prototype, "contextSettings", void 0);
8533
+ ], Canvas.prototype, "contextSettings", undefined);
8530
8534
  Canvas = __decorate([
8531
8535
  registerUI()
8532
8536
  ], Canvas);
@@ -8617,76 +8621,76 @@ let Text = class Text extends UI {
8617
8621
  };
8618
8622
  __decorate([
8619
8623
  dataProcessor(TextData)
8620
- ], Text.prototype, "__", void 0);
8624
+ ], Text.prototype, "__", undefined);
8621
8625
  __decorate([
8622
8626
  boundsType(0)
8623
- ], Text.prototype, "width", void 0);
8627
+ ], Text.prototype, "width", undefined);
8624
8628
  __decorate([
8625
8629
  boundsType(0)
8626
- ], Text.prototype, "height", void 0);
8630
+ ], Text.prototype, "height", undefined);
8627
8631
  __decorate([
8628
8632
  dataType(false)
8629
- ], Text.prototype, "resizeFontSize", void 0);
8633
+ ], Text.prototype, "resizeFontSize", undefined);
8630
8634
  __decorate([
8631
8635
  surfaceType('#000000')
8632
- ], Text.prototype, "fill", void 0);
8636
+ ], Text.prototype, "fill", undefined);
8633
8637
  __decorate([
8634
8638
  affectStrokeBoundsType('outside')
8635
- ], Text.prototype, "strokeAlign", void 0);
8639
+ ], Text.prototype, "strokeAlign", undefined);
8636
8640
  __decorate([
8637
8641
  hitType('all')
8638
- ], Text.prototype, "hitFill", void 0);
8642
+ ], Text.prototype, "hitFill", undefined);
8639
8643
  __decorate([
8640
8644
  boundsType('')
8641
- ], Text.prototype, "text", void 0);
8645
+ ], Text.prototype, "text", undefined);
8642
8646
  __decorate([
8643
- boundsType('L')
8644
- ], Text.prototype, "fontFamily", void 0);
8647
+ boundsType('caption')
8648
+ ], Text.prototype, "fontFamily", undefined);
8645
8649
  __decorate([
8646
8650
  boundsType(12)
8647
- ], Text.prototype, "fontSize", void 0);
8651
+ ], Text.prototype, "fontSize", undefined);
8648
8652
  __decorate([
8649
8653
  boundsType('normal')
8650
- ], Text.prototype, "fontWeight", void 0);
8654
+ ], Text.prototype, "fontWeight", undefined);
8651
8655
  __decorate([
8652
8656
  boundsType(false)
8653
- ], Text.prototype, "italic", void 0);
8657
+ ], Text.prototype, "italic", undefined);
8654
8658
  __decorate([
8655
8659
  boundsType('none')
8656
- ], Text.prototype, "textCase", void 0);
8660
+ ], Text.prototype, "textCase", undefined);
8657
8661
  __decorate([
8658
8662
  boundsType('none')
8659
- ], Text.prototype, "textDecoration", void 0);
8663
+ ], Text.prototype, "textDecoration", undefined);
8660
8664
  __decorate([
8661
8665
  boundsType(0)
8662
- ], Text.prototype, "letterSpacing", void 0);
8666
+ ], Text.prototype, "letterSpacing", undefined);
8663
8667
  __decorate([
8664
8668
  boundsType({ type: 'percent', value: 1.5 })
8665
- ], Text.prototype, "lineHeight", void 0);
8669
+ ], Text.prototype, "lineHeight", undefined);
8666
8670
  __decorate([
8667
8671
  boundsType(0)
8668
- ], Text.prototype, "paraIndent", void 0);
8672
+ ], Text.prototype, "paraIndent", undefined);
8669
8673
  __decorate([
8670
8674
  boundsType(0)
8671
- ], Text.prototype, "paraSpacing", void 0);
8675
+ ], Text.prototype, "paraSpacing", undefined);
8672
8676
  __decorate([
8673
8677
  boundsType('x')
8674
- ], Text.prototype, "writingMode", void 0);
8678
+ ], Text.prototype, "writingMode", undefined);
8675
8679
  __decorate([
8676
8680
  boundsType('left')
8677
- ], Text.prototype, "textAlign", void 0);
8681
+ ], Text.prototype, "textAlign", undefined);
8678
8682
  __decorate([
8679
8683
  boundsType('top')
8680
- ], Text.prototype, "verticalAlign", void 0);
8684
+ ], Text.prototype, "verticalAlign", undefined);
8681
8685
  __decorate([
8682
8686
  boundsType(true)
8683
- ], Text.prototype, "autoSizeAlign", void 0);
8687
+ ], Text.prototype, "autoSizeAlign", undefined);
8684
8688
  __decorate([
8685
8689
  boundsType('normal')
8686
- ], Text.prototype, "textWrap", void 0);
8690
+ ], Text.prototype, "textWrap", undefined);
8687
8691
  __decorate([
8688
8692
  boundsType('show')
8689
- ], Text.prototype, "textOverflow", void 0);
8693
+ ], Text.prototype, "textOverflow", undefined);
8690
8694
  Text = __decorate([
8691
8695
  registerUI()
8692
8696
  ], Text);
@@ -8699,10 +8703,10 @@ let Path = class Path extends UI {
8699
8703
  };
8700
8704
  __decorate([
8701
8705
  dataProcessor(PathData)
8702
- ], Path.prototype, "__", void 0);
8706
+ ], Path.prototype, "__", undefined);
8703
8707
  __decorate([
8704
8708
  affectStrokeBoundsType('center')
8705
- ], Path.prototype, "strokeAlign", void 0);
8709
+ ], Path.prototype, "strokeAlign", undefined);
8706
8710
  Path = __decorate([
8707
8711
  registerUI()
8708
8712
  ], Path);
@@ -8741,10 +8745,10 @@ let Pen = class Pen extends Group {
8741
8745
  };
8742
8746
  __decorate([
8743
8747
  dataProcessor(PenData)
8744
- ], Pen.prototype, "__", void 0);
8748
+ ], Pen.prototype, "__", undefined);
8745
8749
  __decorate([
8746
8750
  penPathType()
8747
- ], Pen.prototype, "path", void 0);
8751
+ ], Pen.prototype, "path", undefined);
8748
8752
  Pen = __decorate([
8749
8753
  useModule(PathCreator, ['set', 'path', 'paint']),
8750
8754
  registerUI()
@@ -9929,9 +9933,9 @@ leaf.__hitWorld = function (point) {
9929
9933
  }
9930
9934
  return this.__hit(inner);
9931
9935
  };
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); };
9936
+ leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitFill(inner, this.__.windingRule); };
9937
+ leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitStroke(inner, strokeWidth); };
9938
+ leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
9935
9939
  leaf.__drawHitPath = function (canvas) { if (canvas)
9936
9940
  this.__drawRenderPath(canvas); };
9937
9941
 
@@ -10666,7 +10670,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
10666
10670
  }
10667
10671
  else {
10668
10672
  if (!paint.patternTask) {
10669
- paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
10673
+ paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
10670
10674
  paint.patternTask = null;
10671
10675
  if (canvas.bounds.hit(ui.__nowWorld))
10672
10676
  createPattern(ui, paint, pixelRatio);
@@ -10822,7 +10826,7 @@ function shadow(ui, current, shape) {
10822
10826
  const end = shadow.length - 1;
10823
10827
  toOffsetOutBounds$1(bounds, offsetOutBounds$1);
10824
10828
  shadow.forEach((item, index) => {
10825
- other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
10829
+ other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
10826
10830
  spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
10827
10831
  drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
10828
10832
  copyBounds = bounds;
@@ -10898,7 +10902,7 @@ function innerShadow(ui, current, shape) {
10898
10902
  other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
10899
10903
  copyBounds = bounds;
10900
10904
  }
10901
- other.fillWorld(copyBounds, item.color, 'source-in');
10905
+ other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
10902
10906
  if (ui.__worldFlipped) {
10903
10907
  current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
10904
10908
  }