leafer-ui 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
  const debug$5 = Debug.get('LeaferCanvas');
6013
6016
  class LeaferCanvas extends LeaferCanvasBase {
@@ -6528,7 +6531,7 @@ class Layouter {
6528
6531
  }
6529
6532
  partLayout() {
6530
6533
  var _a;
6531
- if (!((_a = this.__updatedList) === null || _a === void 0 ? void 0 : _a.length))
6534
+ if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
6532
6535
  return;
6533
6536
  const t = Run.start('PartLayout');
6534
6537
  const { target, __updatedList: updateList } = this;
@@ -7099,6 +7102,7 @@ class UIData extends LeafData {
7099
7102
  return t.fill && this.__hasStroke;
7100
7103
  }
7101
7104
  get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
7105
+ get __hasSurface() { const t = this; return (t.fill || t.stroke); }
7102
7106
  get __autoWidth() { return !this._width; }
7103
7107
  get __autoHeight() { return !this._height; }
7104
7108
  get __autoSide() { return !this._width || !this._height; }
@@ -7602,199 +7606,199 @@ let UI = UI_1 = class UI extends Leaf {
7602
7606
  };
7603
7607
  __decorate([
7604
7608
  dataProcessor(UIData)
7605
- ], UI.prototype, "__", void 0);
7609
+ ], UI.prototype, "__", undefined);
7606
7610
  __decorate([
7607
7611
  zoomLayerType()
7608
- ], UI.prototype, "zoomLayer", void 0);
7612
+ ], UI.prototype, "zoomLayer", undefined);
7609
7613
  __decorate([
7610
7614
  dataType('')
7611
- ], UI.prototype, "id", void 0);
7615
+ ], UI.prototype, "id", undefined);
7612
7616
  __decorate([
7613
7617
  dataType('')
7614
- ], UI.prototype, "name", void 0);
7618
+ ], UI.prototype, "name", undefined);
7615
7619
  __decorate([
7616
7620
  dataType('')
7617
- ], UI.prototype, "className", void 0);
7621
+ ], UI.prototype, "className", undefined);
7618
7622
  __decorate([
7619
7623
  surfaceType('pass-through')
7620
- ], UI.prototype, "blendMode", void 0);
7624
+ ], UI.prototype, "blendMode", undefined);
7621
7625
  __decorate([
7622
7626
  opacityType(1)
7623
- ], UI.prototype, "opacity", void 0);
7627
+ ], UI.prototype, "opacity", undefined);
7624
7628
  __decorate([
7625
7629
  visibleType(true)
7626
- ], UI.prototype, "visible", void 0);
7630
+ ], UI.prototype, "visible", undefined);
7627
7631
  __decorate([
7628
7632
  surfaceType(false)
7629
- ], UI.prototype, "locked", void 0);
7633
+ ], UI.prototype, "locked", undefined);
7630
7634
  __decorate([
7631
7635
  sortType(0)
7632
- ], UI.prototype, "zIndex", void 0);
7636
+ ], UI.prototype, "zIndex", undefined);
7633
7637
  __decorate([
7634
7638
  maskType(false)
7635
- ], UI.prototype, "mask", void 0);
7639
+ ], UI.prototype, "mask", undefined);
7636
7640
  __decorate([
7637
7641
  eraserType(false)
7638
- ], UI.prototype, "eraser", void 0);
7642
+ ], UI.prototype, "eraser", undefined);
7639
7643
  __decorate([
7640
7644
  positionType(0, true)
7641
- ], UI.prototype, "x", void 0);
7645
+ ], UI.prototype, "x", undefined);
7642
7646
  __decorate([
7643
7647
  positionType(0, true)
7644
- ], UI.prototype, "y", void 0);
7648
+ ], UI.prototype, "y", undefined);
7645
7649
  __decorate([
7646
7650
  boundsType(100, true)
7647
- ], UI.prototype, "width", void 0);
7651
+ ], UI.prototype, "width", undefined);
7648
7652
  __decorate([
7649
7653
  boundsType(100, true)
7650
- ], UI.prototype, "height", void 0);
7654
+ ], UI.prototype, "height", undefined);
7651
7655
  __decorate([
7652
7656
  scaleType(1, true)
7653
- ], UI.prototype, "scaleX", void 0);
7657
+ ], UI.prototype, "scaleX", undefined);
7654
7658
  __decorate([
7655
7659
  scaleType(1, true)
7656
- ], UI.prototype, "scaleY", void 0);
7660
+ ], UI.prototype, "scaleY", undefined);
7657
7661
  __decorate([
7658
7662
  rotationType(0, true)
7659
- ], UI.prototype, "rotation", void 0);
7663
+ ], UI.prototype, "rotation", undefined);
7660
7664
  __decorate([
7661
7665
  rotationType(0, true)
7662
- ], UI.prototype, "skewX", void 0);
7666
+ ], UI.prototype, "skewX", undefined);
7663
7667
  __decorate([
7664
7668
  rotationType(0, true)
7665
- ], UI.prototype, "skewY", void 0);
7669
+ ], UI.prototype, "skewY", undefined);
7666
7670
  __decorate([
7667
7671
  positionType(0, true)
7668
- ], UI.prototype, "offsetX", void 0);
7672
+ ], UI.prototype, "offsetX", undefined);
7669
7673
  __decorate([
7670
7674
  positionType(0, true)
7671
- ], UI.prototype, "offsetY", void 0);
7675
+ ], UI.prototype, "offsetY", undefined);
7672
7676
  __decorate([
7673
7677
  positionType(0, true)
7674
- ], UI.prototype, "scrollX", void 0);
7678
+ ], UI.prototype, "scrollX", undefined);
7675
7679
  __decorate([
7676
7680
  positionType(0, true)
7677
- ], UI.prototype, "scrollY", void 0);
7681
+ ], UI.prototype, "scrollY", undefined);
7678
7682
  __decorate([
7679
7683
  autoLayoutType()
7680
- ], UI.prototype, "origin", void 0);
7684
+ ], UI.prototype, "origin", undefined);
7681
7685
  __decorate([
7682
7686
  autoLayoutType()
7683
- ], UI.prototype, "around", void 0);
7687
+ ], UI.prototype, "around", undefined);
7684
7688
  __decorate([
7685
7689
  dataType(false)
7686
- ], UI.prototype, "lazy", void 0);
7690
+ ], UI.prototype, "lazy", undefined);
7687
7691
  __decorate([
7688
7692
  naturalBoundsType(1)
7689
- ], UI.prototype, "pixelRatio", void 0);
7693
+ ], UI.prototype, "pixelRatio", undefined);
7690
7694
  __decorate([
7691
7695
  pathInputType()
7692
- ], UI.prototype, "path", void 0);
7696
+ ], UI.prototype, "path", undefined);
7693
7697
  __decorate([
7694
7698
  pathType()
7695
- ], UI.prototype, "windingRule", void 0);
7699
+ ], UI.prototype, "windingRule", undefined);
7696
7700
  __decorate([
7697
7701
  pathType(true)
7698
- ], UI.prototype, "closed", void 0);
7702
+ ], UI.prototype, "closed", undefined);
7699
7703
  __decorate([
7700
7704
  boundsType(0)
7701
- ], UI.prototype, "padding", void 0);
7705
+ ], UI.prototype, "padding", undefined);
7702
7706
  __decorate([
7703
7707
  boundsType(false)
7704
- ], UI.prototype, "lockRatio", void 0);
7708
+ ], UI.prototype, "lockRatio", undefined);
7705
7709
  __decorate([
7706
7710
  boundsType()
7707
- ], UI.prototype, "widthRange", void 0);
7711
+ ], UI.prototype, "widthRange", undefined);
7708
7712
  __decorate([
7709
7713
  boundsType()
7710
- ], UI.prototype, "heightRange", void 0);
7714
+ ], UI.prototype, "heightRange", undefined);
7711
7715
  __decorate([
7712
7716
  dataType(false)
7713
- ], UI.prototype, "draggable", void 0);
7717
+ ], UI.prototype, "draggable", undefined);
7714
7718
  __decorate([
7715
7719
  dataType()
7716
- ], UI.prototype, "dragBounds", void 0);
7720
+ ], UI.prototype, "dragBounds", undefined);
7717
7721
  __decorate([
7718
7722
  dataType(false)
7719
- ], UI.prototype, "editable", void 0);
7723
+ ], UI.prototype, "editable", undefined);
7720
7724
  __decorate([
7721
7725
  hitType(true)
7722
- ], UI.prototype, "hittable", void 0);
7726
+ ], UI.prototype, "hittable", undefined);
7723
7727
  __decorate([
7724
7728
  hitType('path')
7725
- ], UI.prototype, "hitFill", void 0);
7729
+ ], UI.prototype, "hitFill", undefined);
7726
7730
  __decorate([
7727
7731
  strokeType('path')
7728
- ], UI.prototype, "hitStroke", void 0);
7732
+ ], UI.prototype, "hitStroke", undefined);
7729
7733
  __decorate([
7730
7734
  hitType(false)
7731
- ], UI.prototype, "hitBox", void 0);
7735
+ ], UI.prototype, "hitBox", undefined);
7732
7736
  __decorate([
7733
7737
  hitType(true)
7734
- ], UI.prototype, "hitChildren", void 0);
7738
+ ], UI.prototype, "hitChildren", undefined);
7735
7739
  __decorate([
7736
7740
  hitType(true)
7737
- ], UI.prototype, "hitSelf", void 0);
7741
+ ], UI.prototype, "hitSelf", undefined);
7738
7742
  __decorate([
7739
7743
  hitType()
7740
- ], UI.prototype, "hitRadius", void 0);
7744
+ ], UI.prototype, "hitRadius", undefined);
7741
7745
  __decorate([
7742
7746
  cursorType('')
7743
- ], UI.prototype, "cursor", void 0);
7747
+ ], UI.prototype, "cursor", undefined);
7744
7748
  __decorate([
7745
7749
  surfaceType()
7746
- ], UI.prototype, "fill", void 0);
7750
+ ], UI.prototype, "fill", undefined);
7747
7751
  __decorate([
7748
7752
  strokeType()
7749
- ], UI.prototype, "stroke", void 0);
7753
+ ], UI.prototype, "stroke", undefined);
7750
7754
  __decorate([
7751
7755
  strokeType('inside')
7752
- ], UI.prototype, "strokeAlign", void 0);
7756
+ ], UI.prototype, "strokeAlign", undefined);
7753
7757
  __decorate([
7754
7758
  strokeType(1)
7755
- ], UI.prototype, "strokeWidth", void 0);
7759
+ ], UI.prototype, "strokeWidth", undefined);
7756
7760
  __decorate([
7757
7761
  strokeType(false)
7758
- ], UI.prototype, "strokeWidthFixed", void 0);
7762
+ ], UI.prototype, "strokeWidthFixed", undefined);
7759
7763
  __decorate([
7760
7764
  strokeType('none')
7761
- ], UI.prototype, "strokeCap", void 0);
7765
+ ], UI.prototype, "strokeCap", undefined);
7762
7766
  __decorate([
7763
7767
  strokeType('miter')
7764
- ], UI.prototype, "strokeJoin", void 0);
7768
+ ], UI.prototype, "strokeJoin", undefined);
7765
7769
  __decorate([
7766
7770
  strokeType()
7767
- ], UI.prototype, "dashPattern", void 0);
7771
+ ], UI.prototype, "dashPattern", undefined);
7768
7772
  __decorate([
7769
7773
  strokeType()
7770
- ], UI.prototype, "dashOffset", void 0);
7774
+ ], UI.prototype, "dashOffset", undefined);
7771
7775
  __decorate([
7772
7776
  strokeType(10)
7773
- ], UI.prototype, "miterLimit", void 0);
7777
+ ], UI.prototype, "miterLimit", undefined);
7774
7778
  __decorate([
7775
7779
  pathType(0)
7776
- ], UI.prototype, "cornerRadius", void 0);
7780
+ ], UI.prototype, "cornerRadius", undefined);
7777
7781
  __decorate([
7778
7782
  pathType()
7779
- ], UI.prototype, "cornerSmoothing", void 0);
7783
+ ], UI.prototype, "cornerSmoothing", undefined);
7780
7784
  __decorate([
7781
7785
  effectType()
7782
- ], UI.prototype, "shadow", void 0);
7786
+ ], UI.prototype, "shadow", undefined);
7783
7787
  __decorate([
7784
7788
  effectType()
7785
- ], UI.prototype, "innerShadow", void 0);
7789
+ ], UI.prototype, "innerShadow", undefined);
7786
7790
  __decorate([
7787
7791
  effectType()
7788
- ], UI.prototype, "blur", void 0);
7792
+ ], UI.prototype, "blur", undefined);
7789
7793
  __decorate([
7790
7794
  effectType()
7791
- ], UI.prototype, "backgroundBlur", void 0);
7795
+ ], UI.prototype, "backgroundBlur", undefined);
7792
7796
  __decorate([
7793
7797
  effectType()
7794
- ], UI.prototype, "grayscale", void 0);
7798
+ ], UI.prototype, "grayscale", undefined);
7795
7799
  __decorate([
7796
7800
  dataType({})
7797
- ], UI.prototype, "data", void 0);
7801
+ ], UI.prototype, "data", undefined);
7798
7802
  __decorate([
7799
7803
  rewrite(Leaf.prototype.reset)
7800
7804
  ], UI.prototype, "reset", null);
@@ -7855,7 +7859,7 @@ let Group = class Group extends UI {
7855
7859
  };
7856
7860
  __decorate([
7857
7861
  dataProcessor(GroupData)
7858
- ], Group.prototype, "__", void 0);
7862
+ ], Group.prototype, "__", undefined);
7859
7863
  Group = __decorate([
7860
7864
  useModule(Branch),
7861
7865
  registerUI()
@@ -8026,8 +8030,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
8026
8030
  __setAttr(attrName, newValue) {
8027
8031
  if (this.canvas) {
8028
8032
  if (canvasSizeAttrs.includes(attrName)) {
8029
- if (!newValue)
8030
- debug$1.warn(attrName + ' is 0');
8031
8033
  this.__changeCanvasSize(attrName, newValue);
8032
8034
  }
8033
8035
  else if (attrName === 'fill') {
@@ -8230,10 +8232,10 @@ let Leafer = Leafer_1 = class Leafer extends Group {
8230
8232
  Leafer.list = new LeafList();
8231
8233
  __decorate([
8232
8234
  dataProcessor(LeaferData)
8233
- ], Leafer.prototype, "__", void 0);
8235
+ ], Leafer.prototype, "__", undefined);
8234
8236
  __decorate([
8235
8237
  boundsType()
8236
- ], Leafer.prototype, "pixelRatio", void 0);
8238
+ ], Leafer.prototype, "pixelRatio", undefined);
8237
8239
  Leafer = Leafer_1 = __decorate([
8238
8240
  registerUI()
8239
8241
  ], Leafer);
@@ -8246,7 +8248,7 @@ let Rect = class Rect extends UI {
8246
8248
  };
8247
8249
  __decorate([
8248
8250
  dataProcessor(RectData)
8249
- ], Rect.prototype, "__", void 0);
8251
+ ], Rect.prototype, "__", undefined);
8250
8252
  Rect = __decorate([
8251
8253
  useModule(RectRender),
8252
8254
  rewriteAble(),
@@ -8271,6 +8273,8 @@ let Box = class Box extends Group {
8271
8273
  const data = this.__;
8272
8274
  if (this.children.length) {
8273
8275
  if (data.__autoSide) {
8276
+ if (data.__hasSurface)
8277
+ this.__extraUpdate();
8274
8278
  super.__updateBoxBounds();
8275
8279
  const { boxBounds } = this.__layout;
8276
8280
  if (!data.__autoSize) {
@@ -8335,13 +8339,13 @@ let Box = class Box extends Group {
8335
8339
  };
8336
8340
  __decorate([
8337
8341
  dataProcessor(BoxData)
8338
- ], Box.prototype, "__", void 0);
8342
+ ], Box.prototype, "__", undefined);
8339
8343
  __decorate([
8340
8344
  dataType(false)
8341
- ], Box.prototype, "resizeChildren", void 0);
8345
+ ], Box.prototype, "resizeChildren", undefined);
8342
8346
  __decorate([
8343
8347
  affectRenderBoundsType('show')
8344
- ], Box.prototype, "overflow", void 0);
8348
+ ], Box.prototype, "overflow", undefined);
8345
8349
  __decorate([
8346
8350
  rewrite(rect$1.__updateStrokeSpread)
8347
8351
  ], Box.prototype, "__updateStrokeSpread", null);
@@ -8380,13 +8384,13 @@ let Frame = class Frame extends Box {
8380
8384
  };
8381
8385
  __decorate([
8382
8386
  dataProcessor(FrameData)
8383
- ], Frame.prototype, "__", void 0);
8387
+ ], Frame.prototype, "__", undefined);
8384
8388
  __decorate([
8385
8389
  surfaceType('#FFFFFF')
8386
- ], Frame.prototype, "fill", void 0);
8390
+ ], Frame.prototype, "fill", undefined);
8387
8391
  __decorate([
8388
8392
  affectRenderBoundsType('hide')
8389
- ], Frame.prototype, "overflow", void 0);
8393
+ ], Frame.prototype, "overflow", undefined);
8390
8394
  Frame = __decorate([
8391
8395
  registerUI()
8392
8396
  ], Frame);
@@ -8433,16 +8437,16 @@ let Ellipse = class Ellipse extends UI {
8433
8437
  };
8434
8438
  __decorate([
8435
8439
  dataProcessor(EllipseData)
8436
- ], Ellipse.prototype, "__", void 0);
8440
+ ], Ellipse.prototype, "__", undefined);
8437
8441
  __decorate([
8438
8442
  pathType(0)
8439
- ], Ellipse.prototype, "innerRadius", void 0);
8443
+ ], Ellipse.prototype, "innerRadius", undefined);
8440
8444
  __decorate([
8441
8445
  pathType(0)
8442
- ], Ellipse.prototype, "startAngle", void 0);
8446
+ ], Ellipse.prototype, "startAngle", undefined);
8443
8447
  __decorate([
8444
8448
  pathType(0)
8445
- ], Ellipse.prototype, "endAngle", void 0);
8449
+ ], Ellipse.prototype, "endAngle", undefined);
8446
8450
  Ellipse = __decorate([
8447
8451
  registerUI()
8448
8452
  ], Ellipse);
@@ -8501,22 +8505,22 @@ let Line = class Line extends UI {
8501
8505
  };
8502
8506
  __decorate([
8503
8507
  dataProcessor(LineData)
8504
- ], Line.prototype, "__", void 0);
8508
+ ], Line.prototype, "__", undefined);
8505
8509
  __decorate([
8506
8510
  affectStrokeBoundsType('center')
8507
- ], Line.prototype, "strokeAlign", void 0);
8511
+ ], Line.prototype, "strokeAlign", undefined);
8508
8512
  __decorate([
8509
8513
  boundsType(0)
8510
- ], Line.prototype, "height", void 0);
8514
+ ], Line.prototype, "height", undefined);
8511
8515
  __decorate([
8512
8516
  pathType()
8513
- ], Line.prototype, "points", void 0);
8517
+ ], Line.prototype, "points", undefined);
8514
8518
  __decorate([
8515
8519
  pathType(0)
8516
- ], Line.prototype, "curve", void 0);
8520
+ ], Line.prototype, "curve", undefined);
8517
8521
  __decorate([
8518
8522
  pathType(false)
8519
- ], Line.prototype, "closed", void 0);
8523
+ ], Line.prototype, "closed", undefined);
8520
8524
  Line = __decorate([
8521
8525
  registerUI()
8522
8526
  ], Line);
@@ -8549,16 +8553,16 @@ let Polygon = class Polygon extends UI {
8549
8553
  };
8550
8554
  __decorate([
8551
8555
  dataProcessor(PolygonData)
8552
- ], Polygon.prototype, "__", void 0);
8556
+ ], Polygon.prototype, "__", undefined);
8553
8557
  __decorate([
8554
8558
  pathType(3)
8555
- ], Polygon.prototype, "sides", void 0);
8559
+ ], Polygon.prototype, "sides", undefined);
8556
8560
  __decorate([
8557
8561
  pathType()
8558
- ], Polygon.prototype, "points", void 0);
8562
+ ], Polygon.prototype, "points", undefined);
8559
8563
  __decorate([
8560
8564
  pathType(0)
8561
- ], Polygon.prototype, "curve", void 0);
8565
+ ], Polygon.prototype, "curve", undefined);
8562
8566
  __decorate([
8563
8567
  rewrite(line.__updateRenderPath)
8564
8568
  ], Polygon.prototype, "__updateRenderPath", null);
@@ -8590,13 +8594,13 @@ let Star = class Star extends UI {
8590
8594
  };
8591
8595
  __decorate([
8592
8596
  dataProcessor(StarData)
8593
- ], Star.prototype, "__", void 0);
8597
+ ], Star.prototype, "__", undefined);
8594
8598
  __decorate([
8595
8599
  pathType(5)
8596
- ], Star.prototype, "corners", void 0);
8600
+ ], Star.prototype, "corners", undefined);
8597
8601
  __decorate([
8598
8602
  pathType(0.382)
8599
- ], Star.prototype, "innerRadius", void 0);
8603
+ ], Star.prototype, "innerRadius", undefined);
8600
8604
  Star = __decorate([
8601
8605
  registerUI()
8602
8606
  ], Star);
@@ -8618,10 +8622,10 @@ let Image$1 = class Image extends Rect {
8618
8622
  };
8619
8623
  __decorate([
8620
8624
  dataProcessor(ImageData)
8621
- ], Image$1.prototype, "__", void 0);
8625
+ ], Image$1.prototype, "__", undefined);
8622
8626
  __decorate([
8623
8627
  boundsType('')
8624
- ], Image$1.prototype, "url", void 0);
8628
+ ], Image$1.prototype, "url", undefined);
8625
8629
  Image$1 = __decorate([
8626
8630
  registerUI()
8627
8631
  ], Image$1);
@@ -8684,25 +8688,25 @@ let Canvas = class Canvas extends Rect {
8684
8688
  };
8685
8689
  __decorate([
8686
8690
  dataProcessor(CanvasData)
8687
- ], Canvas.prototype, "__", void 0);
8691
+ ], Canvas.prototype, "__", undefined);
8688
8692
  __decorate([
8689
8693
  resizeType(100)
8690
- ], Canvas.prototype, "width", void 0);
8694
+ ], Canvas.prototype, "width", undefined);
8691
8695
  __decorate([
8692
8696
  resizeType(100)
8693
- ], Canvas.prototype, "height", void 0);
8697
+ ], Canvas.prototype, "height", undefined);
8694
8698
  __decorate([
8695
8699
  resizeType(1)
8696
- ], Canvas.prototype, "pixelRatio", void 0);
8700
+ ], Canvas.prototype, "pixelRatio", undefined);
8697
8701
  __decorate([
8698
8702
  resizeType(true)
8699
- ], Canvas.prototype, "smooth", void 0);
8703
+ ], Canvas.prototype, "smooth", undefined);
8700
8704
  __decorate([
8701
8705
  dataType(false)
8702
- ], Canvas.prototype, "safeResize", void 0);
8706
+ ], Canvas.prototype, "safeResize", undefined);
8703
8707
  __decorate([
8704
8708
  resizeType()
8705
- ], Canvas.prototype, "contextSettings", void 0);
8709
+ ], Canvas.prototype, "contextSettings", undefined);
8706
8710
  Canvas = __decorate([
8707
8711
  registerUI()
8708
8712
  ], Canvas);
@@ -8793,76 +8797,76 @@ let Text = class Text extends UI {
8793
8797
  };
8794
8798
  __decorate([
8795
8799
  dataProcessor(TextData)
8796
- ], Text.prototype, "__", void 0);
8800
+ ], Text.prototype, "__", undefined);
8797
8801
  __decorate([
8798
8802
  boundsType(0)
8799
- ], Text.prototype, "width", void 0);
8803
+ ], Text.prototype, "width", undefined);
8800
8804
  __decorate([
8801
8805
  boundsType(0)
8802
- ], Text.prototype, "height", void 0);
8806
+ ], Text.prototype, "height", undefined);
8803
8807
  __decorate([
8804
8808
  dataType(false)
8805
- ], Text.prototype, "resizeFontSize", void 0);
8809
+ ], Text.prototype, "resizeFontSize", undefined);
8806
8810
  __decorate([
8807
8811
  surfaceType('#000000')
8808
- ], Text.prototype, "fill", void 0);
8812
+ ], Text.prototype, "fill", undefined);
8809
8813
  __decorate([
8810
8814
  affectStrokeBoundsType('outside')
8811
- ], Text.prototype, "strokeAlign", void 0);
8815
+ ], Text.prototype, "strokeAlign", undefined);
8812
8816
  __decorate([
8813
8817
  hitType('all')
8814
- ], Text.prototype, "hitFill", void 0);
8818
+ ], Text.prototype, "hitFill", undefined);
8815
8819
  __decorate([
8816
8820
  boundsType('')
8817
- ], Text.prototype, "text", void 0);
8821
+ ], Text.prototype, "text", undefined);
8818
8822
  __decorate([
8819
- boundsType('L')
8820
- ], Text.prototype, "fontFamily", void 0);
8823
+ boundsType('caption')
8824
+ ], Text.prototype, "fontFamily", undefined);
8821
8825
  __decorate([
8822
8826
  boundsType(12)
8823
- ], Text.prototype, "fontSize", void 0);
8827
+ ], Text.prototype, "fontSize", undefined);
8824
8828
  __decorate([
8825
8829
  boundsType('normal')
8826
- ], Text.prototype, "fontWeight", void 0);
8830
+ ], Text.prototype, "fontWeight", undefined);
8827
8831
  __decorate([
8828
8832
  boundsType(false)
8829
- ], Text.prototype, "italic", void 0);
8833
+ ], Text.prototype, "italic", undefined);
8830
8834
  __decorate([
8831
8835
  boundsType('none')
8832
- ], Text.prototype, "textCase", void 0);
8836
+ ], Text.prototype, "textCase", undefined);
8833
8837
  __decorate([
8834
8838
  boundsType('none')
8835
- ], Text.prototype, "textDecoration", void 0);
8839
+ ], Text.prototype, "textDecoration", undefined);
8836
8840
  __decorate([
8837
8841
  boundsType(0)
8838
- ], Text.prototype, "letterSpacing", void 0);
8842
+ ], Text.prototype, "letterSpacing", undefined);
8839
8843
  __decorate([
8840
8844
  boundsType({ type: 'percent', value: 1.5 })
8841
- ], Text.prototype, "lineHeight", void 0);
8845
+ ], Text.prototype, "lineHeight", undefined);
8842
8846
  __decorate([
8843
8847
  boundsType(0)
8844
- ], Text.prototype, "paraIndent", void 0);
8848
+ ], Text.prototype, "paraIndent", undefined);
8845
8849
  __decorate([
8846
8850
  boundsType(0)
8847
- ], Text.prototype, "paraSpacing", void 0);
8851
+ ], Text.prototype, "paraSpacing", undefined);
8848
8852
  __decorate([
8849
8853
  boundsType('x')
8850
- ], Text.prototype, "writingMode", void 0);
8854
+ ], Text.prototype, "writingMode", undefined);
8851
8855
  __decorate([
8852
8856
  boundsType('left')
8853
- ], Text.prototype, "textAlign", void 0);
8857
+ ], Text.prototype, "textAlign", undefined);
8854
8858
  __decorate([
8855
8859
  boundsType('top')
8856
- ], Text.prototype, "verticalAlign", void 0);
8860
+ ], Text.prototype, "verticalAlign", undefined);
8857
8861
  __decorate([
8858
8862
  boundsType(true)
8859
- ], Text.prototype, "autoSizeAlign", void 0);
8863
+ ], Text.prototype, "autoSizeAlign", undefined);
8860
8864
  __decorate([
8861
8865
  boundsType('normal')
8862
- ], Text.prototype, "textWrap", void 0);
8866
+ ], Text.prototype, "textWrap", undefined);
8863
8867
  __decorate([
8864
8868
  boundsType('show')
8865
- ], Text.prototype, "textOverflow", void 0);
8869
+ ], Text.prototype, "textOverflow", undefined);
8866
8870
  Text = __decorate([
8867
8871
  registerUI()
8868
8872
  ], Text);
@@ -8875,10 +8879,10 @@ let Path = class Path extends UI {
8875
8879
  };
8876
8880
  __decorate([
8877
8881
  dataProcessor(PathData)
8878
- ], Path.prototype, "__", void 0);
8882
+ ], Path.prototype, "__", undefined);
8879
8883
  __decorate([
8880
8884
  affectStrokeBoundsType('center')
8881
- ], Path.prototype, "strokeAlign", void 0);
8885
+ ], Path.prototype, "strokeAlign", undefined);
8882
8886
  Path = __decorate([
8883
8887
  registerUI()
8884
8888
  ], Path);
@@ -8917,10 +8921,10 @@ let Pen = class Pen extends Group {
8917
8921
  };
8918
8922
  __decorate([
8919
8923
  dataProcessor(PenData)
8920
- ], Pen.prototype, "__", void 0);
8924
+ ], Pen.prototype, "__", undefined);
8921
8925
  __decorate([
8922
8926
  penPathType()
8923
- ], Pen.prototype, "path", void 0);
8927
+ ], Pen.prototype, "path", undefined);
8924
8928
  Pen = __decorate([
8925
8929
  useModule(PathCreator, ['set', 'path', 'paint']),
8926
8930
  registerUI()
@@ -10105,9 +10109,9 @@ leaf.__hitWorld = function (point) {
10105
10109
  }
10106
10110
  return this.__hit(inner);
10107
10111
  };
10108
- leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitFill(inner, this.__.windingRule); };
10109
- leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitStroke(inner, strokeWidth); };
10110
- 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); };
10112
+ leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitFill(inner, this.__.windingRule); };
10113
+ leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitStroke(inner, strokeWidth); };
10114
+ leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
10111
10115
  leaf.__drawHitPath = function (canvas) { if (canvas)
10112
10116
  this.__drawRenderPath(canvas); };
10113
10117
 
@@ -11146,7 +11150,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
11146
11150
  }
11147
11151
  else {
11148
11152
  if (!paint.patternTask) {
11149
- paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
11153
+ paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
11150
11154
  paint.patternTask = null;
11151
11155
  if (canvas.bounds.hit(ui.__nowWorld))
11152
11156
  createPattern(ui, paint, pixelRatio);
@@ -11302,7 +11306,7 @@ function shadow(ui, current, shape) {
11302
11306
  const end = shadow.length - 1;
11303
11307
  toOffsetOutBounds$1(bounds, offsetOutBounds$1);
11304
11308
  shadow.forEach((item, index) => {
11305
- other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
11309
+ other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
11306
11310
  spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
11307
11311
  drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
11308
11312
  copyBounds = bounds;
@@ -11378,7 +11382,7 @@ function innerShadow(ui, current, shape) {
11378
11382
  other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
11379
11383
  copyBounds = bounds;
11380
11384
  }
11381
- other.fillWorld(copyBounds, item.color, 'source-in');
11385
+ other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
11382
11386
  if (ui.__worldFlipped) {
11383
11387
  current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
11384
11388
  }