@leafer-draw/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;
@@ -6767,6 +6770,7 @@ class UIData extends LeafData {
6767
6770
  return t.fill && this.__hasStroke;
6768
6771
  }
6769
6772
  get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
6773
+ get __hasSurface() { const t = this; return (t.fill || t.stroke); }
6770
6774
  get __autoWidth() { return !this._width; }
6771
6775
  get __autoHeight() { return !this._height; }
6772
6776
  get __autoSide() { return !this._width || !this._height; }
@@ -7270,199 +7274,199 @@ let UI = UI_1 = class UI extends Leaf {
7270
7274
  };
7271
7275
  __decorate([
7272
7276
  dataProcessor(UIData)
7273
- ], UI.prototype, "__", void 0);
7277
+ ], UI.prototype, "__", undefined);
7274
7278
  __decorate([
7275
7279
  zoomLayerType()
7276
- ], UI.prototype, "zoomLayer", void 0);
7280
+ ], UI.prototype, "zoomLayer", undefined);
7277
7281
  __decorate([
7278
7282
  dataType('')
7279
- ], UI.prototype, "id", void 0);
7283
+ ], UI.prototype, "id", undefined);
7280
7284
  __decorate([
7281
7285
  dataType('')
7282
- ], UI.prototype, "name", void 0);
7286
+ ], UI.prototype, "name", undefined);
7283
7287
  __decorate([
7284
7288
  dataType('')
7285
- ], UI.prototype, "className", void 0);
7289
+ ], UI.prototype, "className", undefined);
7286
7290
  __decorate([
7287
7291
  surfaceType('pass-through')
7288
- ], UI.prototype, "blendMode", void 0);
7292
+ ], UI.prototype, "blendMode", undefined);
7289
7293
  __decorate([
7290
7294
  opacityType(1)
7291
- ], UI.prototype, "opacity", void 0);
7295
+ ], UI.prototype, "opacity", undefined);
7292
7296
  __decorate([
7293
7297
  visibleType(true)
7294
- ], UI.prototype, "visible", void 0);
7298
+ ], UI.prototype, "visible", undefined);
7295
7299
  __decorate([
7296
7300
  surfaceType(false)
7297
- ], UI.prototype, "locked", void 0);
7301
+ ], UI.prototype, "locked", undefined);
7298
7302
  __decorate([
7299
7303
  sortType(0)
7300
- ], UI.prototype, "zIndex", void 0);
7304
+ ], UI.prototype, "zIndex", undefined);
7301
7305
  __decorate([
7302
7306
  maskType(false)
7303
- ], UI.prototype, "mask", void 0);
7307
+ ], UI.prototype, "mask", undefined);
7304
7308
  __decorate([
7305
7309
  eraserType(false)
7306
- ], UI.prototype, "eraser", void 0);
7310
+ ], UI.prototype, "eraser", undefined);
7307
7311
  __decorate([
7308
7312
  positionType(0, true)
7309
- ], UI.prototype, "x", void 0);
7313
+ ], UI.prototype, "x", undefined);
7310
7314
  __decorate([
7311
7315
  positionType(0, true)
7312
- ], UI.prototype, "y", void 0);
7316
+ ], UI.prototype, "y", undefined);
7313
7317
  __decorate([
7314
7318
  boundsType(100, true)
7315
- ], UI.prototype, "width", void 0);
7319
+ ], UI.prototype, "width", undefined);
7316
7320
  __decorate([
7317
7321
  boundsType(100, true)
7318
- ], UI.prototype, "height", void 0);
7322
+ ], UI.prototype, "height", undefined);
7319
7323
  __decorate([
7320
7324
  scaleType(1, true)
7321
- ], UI.prototype, "scaleX", void 0);
7325
+ ], UI.prototype, "scaleX", undefined);
7322
7326
  __decorate([
7323
7327
  scaleType(1, true)
7324
- ], UI.prototype, "scaleY", void 0);
7328
+ ], UI.prototype, "scaleY", undefined);
7325
7329
  __decorate([
7326
7330
  rotationType(0, true)
7327
- ], UI.prototype, "rotation", void 0);
7331
+ ], UI.prototype, "rotation", undefined);
7328
7332
  __decorate([
7329
7333
  rotationType(0, true)
7330
- ], UI.prototype, "skewX", void 0);
7334
+ ], UI.prototype, "skewX", undefined);
7331
7335
  __decorate([
7332
7336
  rotationType(0, true)
7333
- ], UI.prototype, "skewY", void 0);
7337
+ ], UI.prototype, "skewY", undefined);
7334
7338
  __decorate([
7335
7339
  positionType(0, true)
7336
- ], UI.prototype, "offsetX", void 0);
7340
+ ], UI.prototype, "offsetX", undefined);
7337
7341
  __decorate([
7338
7342
  positionType(0, true)
7339
- ], UI.prototype, "offsetY", void 0);
7343
+ ], UI.prototype, "offsetY", undefined);
7340
7344
  __decorate([
7341
7345
  positionType(0, true)
7342
- ], UI.prototype, "scrollX", void 0);
7346
+ ], UI.prototype, "scrollX", undefined);
7343
7347
  __decorate([
7344
7348
  positionType(0, true)
7345
- ], UI.prototype, "scrollY", void 0);
7349
+ ], UI.prototype, "scrollY", undefined);
7346
7350
  __decorate([
7347
7351
  autoLayoutType()
7348
- ], UI.prototype, "origin", void 0);
7352
+ ], UI.prototype, "origin", undefined);
7349
7353
  __decorate([
7350
7354
  autoLayoutType()
7351
- ], UI.prototype, "around", void 0);
7355
+ ], UI.prototype, "around", undefined);
7352
7356
  __decorate([
7353
7357
  dataType(false)
7354
- ], UI.prototype, "lazy", void 0);
7358
+ ], UI.prototype, "lazy", undefined);
7355
7359
  __decorate([
7356
7360
  naturalBoundsType(1)
7357
- ], UI.prototype, "pixelRatio", void 0);
7361
+ ], UI.prototype, "pixelRatio", undefined);
7358
7362
  __decorate([
7359
7363
  pathInputType()
7360
- ], UI.prototype, "path", void 0);
7364
+ ], UI.prototype, "path", undefined);
7361
7365
  __decorate([
7362
7366
  pathType()
7363
- ], UI.prototype, "windingRule", void 0);
7367
+ ], UI.prototype, "windingRule", undefined);
7364
7368
  __decorate([
7365
7369
  pathType(true)
7366
- ], UI.prototype, "closed", void 0);
7370
+ ], UI.prototype, "closed", undefined);
7367
7371
  __decorate([
7368
7372
  boundsType(0)
7369
- ], UI.prototype, "padding", void 0);
7373
+ ], UI.prototype, "padding", undefined);
7370
7374
  __decorate([
7371
7375
  boundsType(false)
7372
- ], UI.prototype, "lockRatio", void 0);
7376
+ ], UI.prototype, "lockRatio", undefined);
7373
7377
  __decorate([
7374
7378
  boundsType()
7375
- ], UI.prototype, "widthRange", void 0);
7379
+ ], UI.prototype, "widthRange", undefined);
7376
7380
  __decorate([
7377
7381
  boundsType()
7378
- ], UI.prototype, "heightRange", void 0);
7382
+ ], UI.prototype, "heightRange", undefined);
7379
7383
  __decorate([
7380
7384
  dataType(false)
7381
- ], UI.prototype, "draggable", void 0);
7385
+ ], UI.prototype, "draggable", undefined);
7382
7386
  __decorate([
7383
7387
  dataType()
7384
- ], UI.prototype, "dragBounds", void 0);
7388
+ ], UI.prototype, "dragBounds", undefined);
7385
7389
  __decorate([
7386
7390
  dataType(false)
7387
- ], UI.prototype, "editable", void 0);
7391
+ ], UI.prototype, "editable", undefined);
7388
7392
  __decorate([
7389
7393
  hitType(true)
7390
- ], UI.prototype, "hittable", void 0);
7394
+ ], UI.prototype, "hittable", undefined);
7391
7395
  __decorate([
7392
7396
  hitType('path')
7393
- ], UI.prototype, "hitFill", void 0);
7397
+ ], UI.prototype, "hitFill", undefined);
7394
7398
  __decorate([
7395
7399
  strokeType('path')
7396
- ], UI.prototype, "hitStroke", void 0);
7400
+ ], UI.prototype, "hitStroke", undefined);
7397
7401
  __decorate([
7398
7402
  hitType(false)
7399
- ], UI.prototype, "hitBox", void 0);
7403
+ ], UI.prototype, "hitBox", undefined);
7400
7404
  __decorate([
7401
7405
  hitType(true)
7402
- ], UI.prototype, "hitChildren", void 0);
7406
+ ], UI.prototype, "hitChildren", undefined);
7403
7407
  __decorate([
7404
7408
  hitType(true)
7405
- ], UI.prototype, "hitSelf", void 0);
7409
+ ], UI.prototype, "hitSelf", undefined);
7406
7410
  __decorate([
7407
7411
  hitType()
7408
- ], UI.prototype, "hitRadius", void 0);
7412
+ ], UI.prototype, "hitRadius", undefined);
7409
7413
  __decorate([
7410
7414
  cursorType('')
7411
- ], UI.prototype, "cursor", void 0);
7415
+ ], UI.prototype, "cursor", undefined);
7412
7416
  __decorate([
7413
7417
  surfaceType()
7414
- ], UI.prototype, "fill", void 0);
7418
+ ], UI.prototype, "fill", undefined);
7415
7419
  __decorate([
7416
7420
  strokeType()
7417
- ], UI.prototype, "stroke", void 0);
7421
+ ], UI.prototype, "stroke", undefined);
7418
7422
  __decorate([
7419
7423
  strokeType('inside')
7420
- ], UI.prototype, "strokeAlign", void 0);
7424
+ ], UI.prototype, "strokeAlign", undefined);
7421
7425
  __decorate([
7422
7426
  strokeType(1)
7423
- ], UI.prototype, "strokeWidth", void 0);
7427
+ ], UI.prototype, "strokeWidth", undefined);
7424
7428
  __decorate([
7425
7429
  strokeType(false)
7426
- ], UI.prototype, "strokeWidthFixed", void 0);
7430
+ ], UI.prototype, "strokeWidthFixed", undefined);
7427
7431
  __decorate([
7428
7432
  strokeType('none')
7429
- ], UI.prototype, "strokeCap", void 0);
7433
+ ], UI.prototype, "strokeCap", undefined);
7430
7434
  __decorate([
7431
7435
  strokeType('miter')
7432
- ], UI.prototype, "strokeJoin", void 0);
7436
+ ], UI.prototype, "strokeJoin", undefined);
7433
7437
  __decorate([
7434
7438
  strokeType()
7435
- ], UI.prototype, "dashPattern", void 0);
7439
+ ], UI.prototype, "dashPattern", undefined);
7436
7440
  __decorate([
7437
7441
  strokeType()
7438
- ], UI.prototype, "dashOffset", void 0);
7442
+ ], UI.prototype, "dashOffset", undefined);
7439
7443
  __decorate([
7440
7444
  strokeType(10)
7441
- ], UI.prototype, "miterLimit", void 0);
7445
+ ], UI.prototype, "miterLimit", undefined);
7442
7446
  __decorate([
7443
7447
  pathType(0)
7444
- ], UI.prototype, "cornerRadius", void 0);
7448
+ ], UI.prototype, "cornerRadius", undefined);
7445
7449
  __decorate([
7446
7450
  pathType()
7447
- ], UI.prototype, "cornerSmoothing", void 0);
7451
+ ], UI.prototype, "cornerSmoothing", undefined);
7448
7452
  __decorate([
7449
7453
  effectType()
7450
- ], UI.prototype, "shadow", void 0);
7454
+ ], UI.prototype, "shadow", undefined);
7451
7455
  __decorate([
7452
7456
  effectType()
7453
- ], UI.prototype, "innerShadow", void 0);
7457
+ ], UI.prototype, "innerShadow", undefined);
7454
7458
  __decorate([
7455
7459
  effectType()
7456
- ], UI.prototype, "blur", void 0);
7460
+ ], UI.prototype, "blur", undefined);
7457
7461
  __decorate([
7458
7462
  effectType()
7459
- ], UI.prototype, "backgroundBlur", void 0);
7463
+ ], UI.prototype, "backgroundBlur", undefined);
7460
7464
  __decorate([
7461
7465
  effectType()
7462
- ], UI.prototype, "grayscale", void 0);
7466
+ ], UI.prototype, "grayscale", undefined);
7463
7467
  __decorate([
7464
7468
  dataType({})
7465
- ], UI.prototype, "data", void 0);
7469
+ ], UI.prototype, "data", undefined);
7466
7470
  __decorate([
7467
7471
  rewrite(Leaf.prototype.reset)
7468
7472
  ], UI.prototype, "reset", null);
@@ -7523,7 +7527,7 @@ let Group = class Group extends UI {
7523
7527
  };
7524
7528
  __decorate([
7525
7529
  dataProcessor(GroupData)
7526
- ], Group.prototype, "__", void 0);
7530
+ ], Group.prototype, "__", undefined);
7527
7531
  Group = __decorate([
7528
7532
  useModule(Branch),
7529
7533
  registerUI()
@@ -7694,8 +7698,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
7694
7698
  __setAttr(attrName, newValue) {
7695
7699
  if (this.canvas) {
7696
7700
  if (canvasSizeAttrs.includes(attrName)) {
7697
- if (!newValue)
7698
- debug.warn(attrName + ' is 0');
7699
7701
  this.__changeCanvasSize(attrName, newValue);
7700
7702
  }
7701
7703
  else if (attrName === 'fill') {
@@ -7898,10 +7900,10 @@ let Leafer = Leafer_1 = class Leafer extends Group {
7898
7900
  Leafer.list = new LeafList();
7899
7901
  __decorate([
7900
7902
  dataProcessor(LeaferData)
7901
- ], Leafer.prototype, "__", void 0);
7903
+ ], Leafer.prototype, "__", undefined);
7902
7904
  __decorate([
7903
7905
  boundsType()
7904
- ], Leafer.prototype, "pixelRatio", void 0);
7906
+ ], Leafer.prototype, "pixelRatio", undefined);
7905
7907
  Leafer = Leafer_1 = __decorate([
7906
7908
  registerUI()
7907
7909
  ], Leafer);
@@ -7914,7 +7916,7 @@ let Rect = class Rect extends UI {
7914
7916
  };
7915
7917
  __decorate([
7916
7918
  dataProcessor(RectData)
7917
- ], Rect.prototype, "__", void 0);
7919
+ ], Rect.prototype, "__", undefined);
7918
7920
  Rect = __decorate([
7919
7921
  useModule(RectRender),
7920
7922
  rewriteAble(),
@@ -7939,6 +7941,8 @@ let Box = class Box extends Group {
7939
7941
  const data = this.__;
7940
7942
  if (this.children.length) {
7941
7943
  if (data.__autoSide) {
7944
+ if (data.__hasSurface)
7945
+ this.__extraUpdate();
7942
7946
  super.__updateBoxBounds();
7943
7947
  const { boxBounds } = this.__layout;
7944
7948
  if (!data.__autoSize) {
@@ -8003,13 +8007,13 @@ let Box = class Box extends Group {
8003
8007
  };
8004
8008
  __decorate([
8005
8009
  dataProcessor(BoxData)
8006
- ], Box.prototype, "__", void 0);
8010
+ ], Box.prototype, "__", undefined);
8007
8011
  __decorate([
8008
8012
  dataType(false)
8009
- ], Box.prototype, "resizeChildren", void 0);
8013
+ ], Box.prototype, "resizeChildren", undefined);
8010
8014
  __decorate([
8011
8015
  affectRenderBoundsType('show')
8012
- ], Box.prototype, "overflow", void 0);
8016
+ ], Box.prototype, "overflow", undefined);
8013
8017
  __decorate([
8014
8018
  rewrite(rect.__updateStrokeSpread)
8015
8019
  ], Box.prototype, "__updateStrokeSpread", null);
@@ -8048,13 +8052,13 @@ let Frame = class Frame extends Box {
8048
8052
  };
8049
8053
  __decorate([
8050
8054
  dataProcessor(FrameData)
8051
- ], Frame.prototype, "__", void 0);
8055
+ ], Frame.prototype, "__", undefined);
8052
8056
  __decorate([
8053
8057
  surfaceType('#FFFFFF')
8054
- ], Frame.prototype, "fill", void 0);
8058
+ ], Frame.prototype, "fill", undefined);
8055
8059
  __decorate([
8056
8060
  affectRenderBoundsType('hide')
8057
- ], Frame.prototype, "overflow", void 0);
8061
+ ], Frame.prototype, "overflow", undefined);
8058
8062
  Frame = __decorate([
8059
8063
  registerUI()
8060
8064
  ], Frame);
@@ -8101,16 +8105,16 @@ let Ellipse = class Ellipse extends UI {
8101
8105
  };
8102
8106
  __decorate([
8103
8107
  dataProcessor(EllipseData)
8104
- ], Ellipse.prototype, "__", void 0);
8108
+ ], Ellipse.prototype, "__", undefined);
8105
8109
  __decorate([
8106
8110
  pathType(0)
8107
- ], Ellipse.prototype, "innerRadius", void 0);
8111
+ ], Ellipse.prototype, "innerRadius", undefined);
8108
8112
  __decorate([
8109
8113
  pathType(0)
8110
- ], Ellipse.prototype, "startAngle", void 0);
8114
+ ], Ellipse.prototype, "startAngle", undefined);
8111
8115
  __decorate([
8112
8116
  pathType(0)
8113
- ], Ellipse.prototype, "endAngle", void 0);
8117
+ ], Ellipse.prototype, "endAngle", undefined);
8114
8118
  Ellipse = __decorate([
8115
8119
  registerUI()
8116
8120
  ], Ellipse);
@@ -8169,22 +8173,22 @@ let Line = class Line extends UI {
8169
8173
  };
8170
8174
  __decorate([
8171
8175
  dataProcessor(LineData)
8172
- ], Line.prototype, "__", void 0);
8176
+ ], Line.prototype, "__", undefined);
8173
8177
  __decorate([
8174
8178
  affectStrokeBoundsType('center')
8175
- ], Line.prototype, "strokeAlign", void 0);
8179
+ ], Line.prototype, "strokeAlign", undefined);
8176
8180
  __decorate([
8177
8181
  boundsType(0)
8178
- ], Line.prototype, "height", void 0);
8182
+ ], Line.prototype, "height", undefined);
8179
8183
  __decorate([
8180
8184
  pathType()
8181
- ], Line.prototype, "points", void 0);
8185
+ ], Line.prototype, "points", undefined);
8182
8186
  __decorate([
8183
8187
  pathType(0)
8184
- ], Line.prototype, "curve", void 0);
8188
+ ], Line.prototype, "curve", undefined);
8185
8189
  __decorate([
8186
8190
  pathType(false)
8187
- ], Line.prototype, "closed", void 0);
8191
+ ], Line.prototype, "closed", undefined);
8188
8192
  Line = __decorate([
8189
8193
  registerUI()
8190
8194
  ], Line);
@@ -8217,16 +8221,16 @@ let Polygon = class Polygon extends UI {
8217
8221
  };
8218
8222
  __decorate([
8219
8223
  dataProcessor(PolygonData)
8220
- ], Polygon.prototype, "__", void 0);
8224
+ ], Polygon.prototype, "__", undefined);
8221
8225
  __decorate([
8222
8226
  pathType(3)
8223
- ], Polygon.prototype, "sides", void 0);
8227
+ ], Polygon.prototype, "sides", undefined);
8224
8228
  __decorate([
8225
8229
  pathType()
8226
- ], Polygon.prototype, "points", void 0);
8230
+ ], Polygon.prototype, "points", undefined);
8227
8231
  __decorate([
8228
8232
  pathType(0)
8229
- ], Polygon.prototype, "curve", void 0);
8233
+ ], Polygon.prototype, "curve", undefined);
8230
8234
  __decorate([
8231
8235
  rewrite(line.__updateRenderPath)
8232
8236
  ], Polygon.prototype, "__updateRenderPath", null);
@@ -8258,13 +8262,13 @@ let Star = class Star extends UI {
8258
8262
  };
8259
8263
  __decorate([
8260
8264
  dataProcessor(StarData)
8261
- ], Star.prototype, "__", void 0);
8265
+ ], Star.prototype, "__", undefined);
8262
8266
  __decorate([
8263
8267
  pathType(5)
8264
- ], Star.prototype, "corners", void 0);
8268
+ ], Star.prototype, "corners", undefined);
8265
8269
  __decorate([
8266
8270
  pathType(0.382)
8267
- ], Star.prototype, "innerRadius", void 0);
8271
+ ], Star.prototype, "innerRadius", undefined);
8268
8272
  Star = __decorate([
8269
8273
  registerUI()
8270
8274
  ], Star);
@@ -8286,10 +8290,10 @@ let Image = class Image extends Rect {
8286
8290
  };
8287
8291
  __decorate([
8288
8292
  dataProcessor(ImageData)
8289
- ], Image.prototype, "__", void 0);
8293
+ ], Image.prototype, "__", undefined);
8290
8294
  __decorate([
8291
8295
  boundsType('')
8292
- ], Image.prototype, "url", void 0);
8296
+ ], Image.prototype, "url", undefined);
8293
8297
  Image = __decorate([
8294
8298
  registerUI()
8295
8299
  ], Image);
@@ -8352,25 +8356,25 @@ let Canvas = class Canvas extends Rect {
8352
8356
  };
8353
8357
  __decorate([
8354
8358
  dataProcessor(CanvasData)
8355
- ], Canvas.prototype, "__", void 0);
8359
+ ], Canvas.prototype, "__", undefined);
8356
8360
  __decorate([
8357
8361
  resizeType(100)
8358
- ], Canvas.prototype, "width", void 0);
8362
+ ], Canvas.prototype, "width", undefined);
8359
8363
  __decorate([
8360
8364
  resizeType(100)
8361
- ], Canvas.prototype, "height", void 0);
8365
+ ], Canvas.prototype, "height", undefined);
8362
8366
  __decorate([
8363
8367
  resizeType(1)
8364
- ], Canvas.prototype, "pixelRatio", void 0);
8368
+ ], Canvas.prototype, "pixelRatio", undefined);
8365
8369
  __decorate([
8366
8370
  resizeType(true)
8367
- ], Canvas.prototype, "smooth", void 0);
8371
+ ], Canvas.prototype, "smooth", undefined);
8368
8372
  __decorate([
8369
8373
  dataType(false)
8370
- ], Canvas.prototype, "safeResize", void 0);
8374
+ ], Canvas.prototype, "safeResize", undefined);
8371
8375
  __decorate([
8372
8376
  resizeType()
8373
- ], Canvas.prototype, "contextSettings", void 0);
8377
+ ], Canvas.prototype, "contextSettings", undefined);
8374
8378
  Canvas = __decorate([
8375
8379
  registerUI()
8376
8380
  ], Canvas);
@@ -8461,76 +8465,76 @@ let Text = class Text extends UI {
8461
8465
  };
8462
8466
  __decorate([
8463
8467
  dataProcessor(TextData)
8464
- ], Text.prototype, "__", void 0);
8468
+ ], Text.prototype, "__", undefined);
8465
8469
  __decorate([
8466
8470
  boundsType(0)
8467
- ], Text.prototype, "width", void 0);
8471
+ ], Text.prototype, "width", undefined);
8468
8472
  __decorate([
8469
8473
  boundsType(0)
8470
- ], Text.prototype, "height", void 0);
8474
+ ], Text.prototype, "height", undefined);
8471
8475
  __decorate([
8472
8476
  dataType(false)
8473
- ], Text.prototype, "resizeFontSize", void 0);
8477
+ ], Text.prototype, "resizeFontSize", undefined);
8474
8478
  __decorate([
8475
8479
  surfaceType('#000000')
8476
- ], Text.prototype, "fill", void 0);
8480
+ ], Text.prototype, "fill", undefined);
8477
8481
  __decorate([
8478
8482
  affectStrokeBoundsType('outside')
8479
- ], Text.prototype, "strokeAlign", void 0);
8483
+ ], Text.prototype, "strokeAlign", undefined);
8480
8484
  __decorate([
8481
8485
  hitType('all')
8482
- ], Text.prototype, "hitFill", void 0);
8486
+ ], Text.prototype, "hitFill", undefined);
8483
8487
  __decorate([
8484
8488
  boundsType('')
8485
- ], Text.prototype, "text", void 0);
8489
+ ], Text.prototype, "text", undefined);
8486
8490
  __decorate([
8487
- boundsType('L')
8488
- ], Text.prototype, "fontFamily", void 0);
8491
+ boundsType('caption')
8492
+ ], Text.prototype, "fontFamily", undefined);
8489
8493
  __decorate([
8490
8494
  boundsType(12)
8491
- ], Text.prototype, "fontSize", void 0);
8495
+ ], Text.prototype, "fontSize", undefined);
8492
8496
  __decorate([
8493
8497
  boundsType('normal')
8494
- ], Text.prototype, "fontWeight", void 0);
8498
+ ], Text.prototype, "fontWeight", undefined);
8495
8499
  __decorate([
8496
8500
  boundsType(false)
8497
- ], Text.prototype, "italic", void 0);
8501
+ ], Text.prototype, "italic", undefined);
8498
8502
  __decorate([
8499
8503
  boundsType('none')
8500
- ], Text.prototype, "textCase", void 0);
8504
+ ], Text.prototype, "textCase", undefined);
8501
8505
  __decorate([
8502
8506
  boundsType('none')
8503
- ], Text.prototype, "textDecoration", void 0);
8507
+ ], Text.prototype, "textDecoration", undefined);
8504
8508
  __decorate([
8505
8509
  boundsType(0)
8506
- ], Text.prototype, "letterSpacing", void 0);
8510
+ ], Text.prototype, "letterSpacing", undefined);
8507
8511
  __decorate([
8508
8512
  boundsType({ type: 'percent', value: 1.5 })
8509
- ], Text.prototype, "lineHeight", void 0);
8513
+ ], Text.prototype, "lineHeight", undefined);
8510
8514
  __decorate([
8511
8515
  boundsType(0)
8512
- ], Text.prototype, "paraIndent", void 0);
8516
+ ], Text.prototype, "paraIndent", undefined);
8513
8517
  __decorate([
8514
8518
  boundsType(0)
8515
- ], Text.prototype, "paraSpacing", void 0);
8519
+ ], Text.prototype, "paraSpacing", undefined);
8516
8520
  __decorate([
8517
8521
  boundsType('x')
8518
- ], Text.prototype, "writingMode", void 0);
8522
+ ], Text.prototype, "writingMode", undefined);
8519
8523
  __decorate([
8520
8524
  boundsType('left')
8521
- ], Text.prototype, "textAlign", void 0);
8525
+ ], Text.prototype, "textAlign", undefined);
8522
8526
  __decorate([
8523
8527
  boundsType('top')
8524
- ], Text.prototype, "verticalAlign", void 0);
8528
+ ], Text.prototype, "verticalAlign", undefined);
8525
8529
  __decorate([
8526
8530
  boundsType(true)
8527
- ], Text.prototype, "autoSizeAlign", void 0);
8531
+ ], Text.prototype, "autoSizeAlign", undefined);
8528
8532
  __decorate([
8529
8533
  boundsType('normal')
8530
- ], Text.prototype, "textWrap", void 0);
8534
+ ], Text.prototype, "textWrap", undefined);
8531
8535
  __decorate([
8532
8536
  boundsType('show')
8533
- ], Text.prototype, "textOverflow", void 0);
8537
+ ], Text.prototype, "textOverflow", undefined);
8534
8538
  Text = __decorate([
8535
8539
  registerUI()
8536
8540
  ], Text);
@@ -8543,10 +8547,10 @@ let Path = class Path extends UI {
8543
8547
  };
8544
8548
  __decorate([
8545
8549
  dataProcessor(PathData)
8546
- ], Path.prototype, "__", void 0);
8550
+ ], Path.prototype, "__", undefined);
8547
8551
  __decorate([
8548
8552
  affectStrokeBoundsType('center')
8549
- ], Path.prototype, "strokeAlign", void 0);
8553
+ ], Path.prototype, "strokeAlign", undefined);
8550
8554
  Path = __decorate([
8551
8555
  registerUI()
8552
8556
  ], Path);
@@ -8585,10 +8589,10 @@ let Pen = class Pen extends Group {
8585
8589
  };
8586
8590
  __decorate([
8587
8591
  dataProcessor(PenData)
8588
- ], Pen.prototype, "__", void 0);
8592
+ ], Pen.prototype, "__", undefined);
8589
8593
  __decorate([
8590
8594
  penPathType()
8591
- ], Pen.prototype, "path", void 0);
8595
+ ], Pen.prototype, "path", undefined);
8592
8596
  Pen = __decorate([
8593
8597
  useModule(PathCreator, ['set', 'path', 'paint']),
8594
8598
  registerUI()
@@ -9222,7 +9226,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
9222
9226
  }
9223
9227
  else {
9224
9228
  if (!paint.patternTask) {
9225
- paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
9229
+ paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
9226
9230
  paint.patternTask = null;
9227
9231
  if (canvas.bounds.hit(ui.__nowWorld))
9228
9232
  createPattern(ui, paint, pixelRatio);
@@ -9378,7 +9382,7 @@ function shadow(ui, current, shape) {
9378
9382
  const end = shadow.length - 1;
9379
9383
  toOffsetOutBounds$1(bounds, offsetOutBounds$1);
9380
9384
  shadow.forEach((item, index) => {
9381
- other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
9385
+ other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
9382
9386
  spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
9383
9387
  drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
9384
9388
  copyBounds = bounds;
@@ -9454,7 +9458,7 @@ function innerShadow(ui, current, shape) {
9454
9458
  other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
9455
9459
  copyBounds = bounds;
9456
9460
  }
9457
- other.fillWorld(copyBounds, item.color, 'source-in');
9461
+ other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
9458
9462
  if (ui.__worldFlipped) {
9459
9463
  current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
9460
9464
  }