@leafer-ui/miniapp 1.3.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1533,10 +1533,10 @@ const DataHelper = {
1533
1533
  Object.keys(merge).forEach(key => {
1534
1534
  var _a, _b;
1535
1535
  value = merge[key];
1536
- if ((value === null || value === void 0 ? void 0 : value.constructor) === Object && ((_a = t[key]) === null || _a === void 0 ? void 0 : _a.constructor) === Object)
1536
+ if ((value === null || value === undefined ? undefined : value.constructor) === Object && ((_a = t[key]) === null || _a === undefined ? undefined : _a.constructor) === Object)
1537
1537
  return assign(t[key], merge[key], exclude && exclude[key]);
1538
1538
  if (exclude && (key in exclude)) {
1539
- if (((_b = exclude[key]) === null || _b === void 0 ? void 0 : _b.constructor) === Object)
1539
+ if (((_b = exclude[key]) === null || _b === undefined ? undefined : _b.constructor) === Object)
1540
1540
  assign(t[key] = {}, merge[key], exclude[key]);
1541
1541
  return;
1542
1542
  }
@@ -1705,7 +1705,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1705
1705
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1706
1706
  PERFORMANCE OF THIS SOFTWARE.
1707
1707
  ***************************************************************************** */
1708
- /* global Reflect, Promise, SuppressedError, Symbol */
1708
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1709
1709
 
1710
1710
 
1711
1711
  function __decorate(decorators, target, key, desc) {
@@ -1773,7 +1773,7 @@ let Canvas$1 = class Canvas {
1773
1773
  }
1774
1774
  setTransform(_a, _b, _c, _d, _e, _f) { }
1775
1775
  resetTransform() { }
1776
- getTransform() { return void 0; }
1776
+ getTransform() { return undefined; }
1777
1777
  save() { }
1778
1778
  restore() { }
1779
1779
  transform(a, b, c, d, e, f) {
@@ -1830,12 +1830,12 @@ let Canvas$1 = class Canvas {
1830
1830
  ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) { }
1831
1831
  rect(_x, _y, _width, _height) { }
1832
1832
  roundRect(_x, _y, _width, _height, _radius) { }
1833
- createConicGradient(_startAngle, _x, _y) { return void 0; }
1834
- createLinearGradient(_x0, _y0, _x1, _y1) { return void 0; }
1835
- createPattern(_image, _repetition) { return void 0; }
1836
- createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return void 0; }
1833
+ createConicGradient(_startAngle, _x, _y) { return undefined; }
1834
+ createLinearGradient(_x0, _y0, _x1, _y1) { return undefined; }
1835
+ createPattern(_image, _repetition) { return undefined; }
1836
+ createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return undefined; }
1837
1837
  fillText(_text, _x, _y, _maxWidth) { }
1838
- measureText(_text) { return void 0; }
1838
+ measureText(_text) { return undefined; }
1839
1839
  strokeText(_text, _x, _y, _maxWidth) { }
1840
1840
  destroy() {
1841
1841
  this.context = null;
@@ -1843,79 +1843,79 @@ let Canvas$1 = class Canvas {
1843
1843
  };
1844
1844
  __decorate([
1845
1845
  contextAttr('imageSmoothingEnabled')
1846
- ], Canvas$1.prototype, "smooth", void 0);
1846
+ ], Canvas$1.prototype, "smooth", undefined);
1847
1847
  __decorate([
1848
1848
  contextAttr('imageSmoothingQuality')
1849
- ], Canvas$1.prototype, "smoothLevel", void 0);
1849
+ ], Canvas$1.prototype, "smoothLevel", undefined);
1850
1850
  __decorate([
1851
1851
  contextAttr('globalAlpha')
1852
- ], Canvas$1.prototype, "opacity", void 0);
1852
+ ], Canvas$1.prototype, "opacity", undefined);
1853
1853
  __decorate([
1854
1854
  contextAttr()
1855
- ], Canvas$1.prototype, "fillStyle", void 0);
1855
+ ], Canvas$1.prototype, "fillStyle", undefined);
1856
1856
  __decorate([
1857
1857
  contextAttr()
1858
- ], Canvas$1.prototype, "strokeStyle", void 0);
1858
+ ], Canvas$1.prototype, "strokeStyle", undefined);
1859
1859
  __decorate([
1860
1860
  contextAttr('lineWidth')
1861
- ], Canvas$1.prototype, "strokeWidth", void 0);
1861
+ ], Canvas$1.prototype, "strokeWidth", undefined);
1862
1862
  __decorate([
1863
1863
  contextAttr('lineCap')
1864
- ], Canvas$1.prototype, "strokeCap", void 0);
1864
+ ], Canvas$1.prototype, "strokeCap", undefined);
1865
1865
  __decorate([
1866
1866
  contextAttr('lineJoin')
1867
- ], Canvas$1.prototype, "strokeJoin", void 0);
1867
+ ], Canvas$1.prototype, "strokeJoin", undefined);
1868
1868
  __decorate([
1869
1869
  contextAttr('lineDashOffset')
1870
- ], Canvas$1.prototype, "dashOffset", void 0);
1870
+ ], Canvas$1.prototype, "dashOffset", undefined);
1871
1871
  __decorate([
1872
1872
  contextAttr()
1873
- ], Canvas$1.prototype, "miterLimit", void 0);
1873
+ ], Canvas$1.prototype, "miterLimit", undefined);
1874
1874
  __decorate([
1875
1875
  contextAttr()
1876
- ], Canvas$1.prototype, "shadowBlur", void 0);
1876
+ ], Canvas$1.prototype, "shadowBlur", undefined);
1877
1877
  __decorate([
1878
1878
  contextAttr()
1879
- ], Canvas$1.prototype, "shadowColor", void 0);
1879
+ ], Canvas$1.prototype, "shadowColor", undefined);
1880
1880
  __decorate([
1881
1881
  contextAttr()
1882
- ], Canvas$1.prototype, "shadowOffsetX", void 0);
1882
+ ], Canvas$1.prototype, "shadowOffsetX", undefined);
1883
1883
  __decorate([
1884
1884
  contextAttr()
1885
- ], Canvas$1.prototype, "shadowOffsetY", void 0);
1885
+ ], Canvas$1.prototype, "shadowOffsetY", undefined);
1886
1886
  __decorate([
1887
1887
  contextAttr()
1888
- ], Canvas$1.prototype, "filter", void 0);
1888
+ ], Canvas$1.prototype, "filter", undefined);
1889
1889
  __decorate([
1890
1890
  contextAttr()
1891
- ], Canvas$1.prototype, "font", void 0);
1891
+ ], Canvas$1.prototype, "font", undefined);
1892
1892
  __decorate([
1893
1893
  contextAttr()
1894
- ], Canvas$1.prototype, "fontKerning", void 0);
1894
+ ], Canvas$1.prototype, "fontKerning", undefined);
1895
1895
  __decorate([
1896
1896
  contextAttr()
1897
- ], Canvas$1.prototype, "fontStretch", void 0);
1897
+ ], Canvas$1.prototype, "fontStretch", undefined);
1898
1898
  __decorate([
1899
1899
  contextAttr()
1900
- ], Canvas$1.prototype, "fontVariantCaps", void 0);
1900
+ ], Canvas$1.prototype, "fontVariantCaps", undefined);
1901
1901
  __decorate([
1902
1902
  contextAttr()
1903
- ], Canvas$1.prototype, "textAlign", void 0);
1903
+ ], Canvas$1.prototype, "textAlign", undefined);
1904
1904
  __decorate([
1905
1905
  contextAttr()
1906
- ], Canvas$1.prototype, "textBaseline", void 0);
1906
+ ], Canvas$1.prototype, "textBaseline", undefined);
1907
1907
  __decorate([
1908
1908
  contextAttr()
1909
- ], Canvas$1.prototype, "textRendering", void 0);
1909
+ ], Canvas$1.prototype, "textRendering", undefined);
1910
1910
  __decorate([
1911
1911
  contextAttr()
1912
- ], Canvas$1.prototype, "wordSpacing", void 0);
1912
+ ], Canvas$1.prototype, "wordSpacing", undefined);
1913
1913
  __decorate([
1914
1914
  contextAttr()
1915
- ], Canvas$1.prototype, "letterSpacing", void 0);
1915
+ ], Canvas$1.prototype, "letterSpacing", undefined);
1916
1916
  __decorate([
1917
1917
  contextAttr()
1918
- ], Canvas$1.prototype, "direction", void 0);
1918
+ ], Canvas$1.prototype, "direction", undefined);
1919
1919
  __decorate([
1920
1920
  contextMethod()
1921
1921
  ], Canvas$1.prototype, "setTransform", null);
@@ -3384,7 +3384,7 @@ class TaskItem {
3384
3384
  this.task = task;
3385
3385
  }
3386
3386
  run() {
3387
- return __awaiter(this, void 0, void 0, function* () {
3387
+ return __awaiter(this, undefined, undefined, function* () {
3388
3388
  try {
3389
3389
  if (this.task && !this.isComplete && this.parent.running)
3390
3390
  yield this.task();
@@ -3696,7 +3696,7 @@ class LeaferImage {
3696
3696
  load(onSuccess, onError) {
3697
3697
  if (!this.loading) {
3698
3698
  this.loading = true;
3699
- ImageManager.tasker.add(() => __awaiter(this, void 0, void 0, function* () {
3699
+ ImageManager.tasker.add(() => __awaiter(this, undefined, undefined, function* () {
3700
3700
  return yield Platform.origin.loadImage(this.url).then((img) => {
3701
3701
  this.ready = true;
3702
3702
  this.width = img.naturalWidth || img.width;
@@ -3821,10 +3821,10 @@ function autoLayoutType(defaultValue) {
3821
3821
  return decorateLeafAttr(defaultValue, (key) => attr({
3822
3822
  set(value) {
3823
3823
  if (this.__setAttr(key, value)) {
3824
- this.__layout.matrixChanged || this.__layout.matrixChange();
3825
3824
  this.__hasAutoLayout = !!(this.origin || this.around || this.flow);
3826
3825
  if (!this.__local)
3827
3826
  this.__layout.createLocal();
3827
+ doBoundsType(this);
3828
3828
  }
3829
3829
  }
3830
3830
  }));
@@ -4207,55 +4207,62 @@ const LeafHelper = {
4207
4207
  y += t.y;
4208
4208
  transition ? t.animate({ x, y }, transition) : (t.x = x, t.y = y);
4209
4209
  },
4210
- zoomOfWorld(t, origin, scaleX, scaleY, resize) {
4211
- L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize);
4210
+ zoomOfWorld(t, origin, scaleX, scaleY, resize, transition) {
4211
+ L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition);
4212
4212
  },
4213
- zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize) {
4214
- copy$7(matrix$1, t.__localMatrix);
4213
+ zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition) {
4214
+ const o = t.__localMatrix;
4215
+ if (typeof scaleY !== 'number') {
4216
+ if (scaleY)
4217
+ transition = scaleY;
4218
+ scaleY = scaleX;
4219
+ }
4220
+ copy$7(matrix$1, o);
4215
4221
  scaleOfOuter$2(matrix$1, origin, scaleX, scaleY);
4216
4222
  if (t.origin || t.around) {
4217
- L.setTransform(t, matrix$1, resize);
4223
+ L.setTransform(t, matrix$1, resize, transition);
4218
4224
  }
4219
4225
  else {
4220
- moveByMatrix(t, matrix$1);
4221
- t.scaleResize(scaleX, scaleY, resize !== true);
4226
+ const x = t.x + matrix$1.e - o.e, y = t.y + matrix$1.f - o.f;
4227
+ if (transition && !resize)
4228
+ t.animate({ x, y, scaleX: t.scaleX * scaleX, scaleY: t.scaleY * scaleY }, transition);
4229
+ else
4230
+ t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true);
4222
4231
  }
4223
4232
  },
4224
- rotateOfWorld(t, origin, angle) {
4225
- L.rotateOfLocal(t, getTempLocal(t, origin), angle);
4233
+ rotateOfWorld(t, origin, angle, transition) {
4234
+ L.rotateOfLocal(t, getTempLocal(t, origin), angle, transition);
4226
4235
  },
4227
- rotateOfLocal(t, origin, angle) {
4228
- copy$7(matrix$1, t.__localMatrix);
4236
+ rotateOfLocal(t, origin, angle, transition) {
4237
+ const o = t.__localMatrix;
4238
+ copy$7(matrix$1, o);
4229
4239
  rotateOfOuter$2(matrix$1, origin, angle);
4230
- if (t.origin || t.around) {
4231
- L.setTransform(t, matrix$1);
4232
- }
4233
- else {
4234
- moveByMatrix(t, matrix$1);
4235
- t.rotation = MathHelper.formatRotation(t.rotation + angle);
4236
- }
4240
+ if (t.origin || t.around)
4241
+ L.setTransform(t, matrix$1, false, transition);
4242
+ else
4243
+ t.set({ x: t.x + matrix$1.e - o.e, y: t.y + matrix$1.f - o.f, rotation: MathHelper.formatRotation(t.rotation + angle) }, transition);
4237
4244
  },
4238
- skewOfWorld(t, origin, skewX, skewY, resize) {
4239
- L.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize);
4245
+ skewOfWorld(t, origin, skewX, skewY, resize, transition) {
4246
+ L.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize, transition);
4240
4247
  },
4241
- skewOfLocal(t, origin, skewX, skewY = 0, resize) {
4248
+ skewOfLocal(t, origin, skewX, skewY = 0, resize, transition) {
4242
4249
  copy$7(matrix$1, t.__localMatrix);
4243
4250
  skewOfOuter(matrix$1, origin, skewX, skewY);
4244
- L.setTransform(t, matrix$1, resize);
4251
+ L.setTransform(t, matrix$1, resize, transition);
4245
4252
  },
4246
- transformWorld(t, transform, resize) {
4253
+ transformWorld(t, transform, resize, transition) {
4247
4254
  copy$7(matrix$1, t.worldTransform);
4248
4255
  multiplyParent$2(matrix$1, transform);
4249
4256
  if (t.parent)
4250
4257
  divideParent(matrix$1, t.parent.worldTransform);
4251
- L.setTransform(t, matrix$1, resize);
4258
+ L.setTransform(t, matrix$1, resize, transition);
4252
4259
  },
4253
- transform(t, transform, resize) {
4260
+ transform(t, transform, resize, transition) {
4254
4261
  copy$7(matrix$1, t.localTransform);
4255
4262
  multiplyParent$2(matrix$1, transform);
4256
- L.setTransform(t, matrix$1, resize);
4263
+ L.setTransform(t, matrix$1, resize, transition);
4257
4264
  },
4258
- setTransform(t, transform, resize) {
4265
+ setTransform(t, transform, resize, transition) {
4259
4266
  const data = t.__, originPoint = data.origin && L.getInnerOrigin(t, data.origin);
4260
4267
  const layout = getLayout(transform, originPoint, data.around && L.getInnerOrigin(t, data.around));
4261
4268
  if (resize) {
@@ -4270,7 +4277,7 @@ const LeafHelper = {
4270
4277
  t.scaleResize(scaleX, scaleY, false);
4271
4278
  }
4272
4279
  else
4273
- t.set(layout);
4280
+ t.set(layout, transition);
4274
4281
  },
4275
4282
  getFlipTransform(t, axis) {
4276
4283
  const m = getMatrixData();
@@ -4307,11 +4314,6 @@ const LeafHelper = {
4307
4314
  };
4308
4315
  const L = LeafHelper;
4309
4316
  const { updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$2, updateAllWorldOpacity: updateAllWorldOpacity$1, updateAllChange: updateAllChange$1 } = L;
4310
- function moveByMatrix(t, matrix) {
4311
- const { e, f } = t.__localMatrix;
4312
- t.x += matrix.e - e;
4313
- t.y += matrix.f - f;
4314
- }
4315
4317
  function getTempLocal(t, world) {
4316
4318
  t.__layout.update();
4317
4319
  return t.parent ? PointHelper.tempToInnerOf(world, t.parent.__world) : world;
@@ -5175,8 +5177,7 @@ const LeafBounds = {
5175
5177
  __updateAutoLayout() {
5176
5178
  this.__layout.matrixChanged = true;
5177
5179
  if (this.isBranch) {
5178
- if (this.leaferIsReady)
5179
- this.leafer.layouter.addExtra(this);
5180
+ this.__extraUpdate();
5180
5181
  if (this.__.flow) {
5181
5182
  if (this.__layout.boxChanged)
5182
5183
  this.__updateFlowLayout();
@@ -5329,7 +5330,7 @@ let Leaf = class Leaf {
5329
5330
  get __worldFlipped() { return this.__world.scaleX < 0 || this.__world.scaleY < 0; }
5330
5331
  get __onlyHitMask() { return this.__hasMask && !this.__.hitChildren; }
5331
5332
  get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
5332
- get __inLazyBounds() { const { leafer } = this; return leafer && leafer.created && leafer.lazyBounds.hit(this.__world); }
5333
+ get __inLazyBounds() { return this.leaferIsCreated && this.leafer.lazyBounds.hit(this.__world); }
5333
5334
  get pathInputed() { return this.__.__pathInputed; }
5334
5335
  set event(map) { this.on(map); }
5335
5336
  constructor(data) {
@@ -5440,6 +5441,10 @@ let Leaf = class Leaf {
5440
5441
  forceRender(_bounds, _sync) {
5441
5442
  this.forceUpdate('surface');
5442
5443
  }
5444
+ __extraUpdate() {
5445
+ if (this.leaferIsReady)
5446
+ this.leafer.layouter.addExtra(this);
5447
+ }
5443
5448
  __updateWorldMatrix() { }
5444
5449
  __updateLocalMatrix() { }
5445
5450
  __updateWorldBounds() { }
@@ -5582,11 +5587,11 @@ let Leaf = class Leaf {
5582
5587
  const layer = this.leafer ? this.leafer.zoomLayer : this;
5583
5588
  return layer.getWorldPoint(page, relative, distance, change);
5584
5589
  }
5585
- setTransform(matrix, resize) {
5586
- setTransform(this, matrix, resize);
5590
+ setTransform(matrix, resize, transition) {
5591
+ setTransform(this, matrix, resize, transition);
5587
5592
  }
5588
- transform(matrix, resize) {
5589
- transform(this, matrix, resize);
5593
+ transform(matrix, resize, transition) {
5594
+ transform(this, matrix, resize, transition);
5590
5595
  }
5591
5596
  move(x, y, transition) {
5592
5597
  moveLocal(this, x, y, transition);
@@ -5594,32 +5599,32 @@ let Leaf = class Leaf {
5594
5599
  moveInner(x, y, transition) {
5595
5600
  moveWorld(this, x, y, true, transition);
5596
5601
  }
5597
- scaleOf(origin, scaleX, scaleY, resize) {
5598
- zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize);
5602
+ scaleOf(origin, scaleX, scaleY, resize, transition) {
5603
+ zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition);
5599
5604
  }
5600
- rotateOf(origin, rotation) {
5601
- rotateOfLocal(this, getLocalOrigin(this, origin), rotation);
5605
+ rotateOf(origin, rotation, transition) {
5606
+ rotateOfLocal(this, getLocalOrigin(this, origin), rotation, transition);
5602
5607
  }
5603
- skewOf(origin, skewX, skewY, resize) {
5604
- skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize);
5608
+ skewOf(origin, skewX, skewY, resize, transition) {
5609
+ skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize, transition);
5605
5610
  }
5606
- transformWorld(worldTransform, resize) {
5607
- transformWorld(this, worldTransform, resize);
5611
+ transformWorld(worldTransform, resize, transition) {
5612
+ transformWorld(this, worldTransform, resize, transition);
5608
5613
  }
5609
5614
  moveWorld(x, y, transition) {
5610
5615
  moveWorld(this, x, y, false, transition);
5611
5616
  }
5612
- scaleOfWorld(worldOrigin, scaleX, scaleY, resize) {
5613
- zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize);
5617
+ scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition) {
5618
+ zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition);
5614
5619
  }
5615
5620
  rotateOfWorld(worldOrigin, rotation) {
5616
5621
  rotateOfWorld(this, worldOrigin, rotation);
5617
5622
  }
5618
- skewOfWorld(worldOrigin, skewX, skewY, resize) {
5619
- skewOfWorld(this, worldOrigin, skewX, skewY, resize);
5623
+ skewOfWorld(worldOrigin, skewX, skewY, resize, transition) {
5624
+ skewOfWorld(this, worldOrigin, skewX, skewY, resize, transition);
5620
5625
  }
5621
- flip(axis) {
5622
- transform(this, getFlipTransform(this, axis));
5626
+ flip(axis, transition) {
5627
+ transform(this, getFlipTransform(this, axis), false, transition);
5623
5628
  }
5624
5629
  scaleResize(scaleX, scaleY = scaleX, _noResize) {
5625
5630
  this.scaleX *= scaleX;
@@ -6007,7 +6012,7 @@ class LeafLevelList {
6007
6012
  }
6008
6013
  }
6009
6014
 
6010
- const version = "1.3.2";
6015
+ const version = "1.4.0";
6011
6016
 
6012
6017
  class LeaferCanvas extends LeaferCanvasBase {
6013
6018
  get allowBackgroundColor() { return false; }
@@ -6491,7 +6496,7 @@ class Layouter {
6491
6496
  }
6492
6497
  partLayout() {
6493
6498
  var _a;
6494
- if (!((_a = this.__updatedList) === null || _a === void 0 ? void 0 : _a.length))
6499
+ if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
6495
6500
  return;
6496
6501
  const t = Run.start('PartLayout');
6497
6502
  const { target, __updatedList: updateList } = this;
@@ -7062,6 +7067,7 @@ class UIData extends LeafData {
7062
7067
  return t.fill && this.__hasStroke;
7063
7068
  }
7064
7069
  get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
7070
+ get __hasSurface() { const t = this; return (t.fill || t.stroke); }
7065
7071
  get __autoWidth() { return !this._width; }
7066
7072
  get __autoHeight() { return !this._height; }
7067
7073
  get __autoSide() { return !this._width || !this._height; }
@@ -7565,199 +7571,199 @@ let UI = UI_1 = class UI extends Leaf {
7565
7571
  };
7566
7572
  __decorate([
7567
7573
  dataProcessor(UIData)
7568
- ], UI.prototype, "__", void 0);
7574
+ ], UI.prototype, "__", undefined);
7569
7575
  __decorate([
7570
7576
  zoomLayerType()
7571
- ], UI.prototype, "zoomLayer", void 0);
7577
+ ], UI.prototype, "zoomLayer", undefined);
7572
7578
  __decorate([
7573
7579
  dataType('')
7574
- ], UI.prototype, "id", void 0);
7580
+ ], UI.prototype, "id", undefined);
7575
7581
  __decorate([
7576
7582
  dataType('')
7577
- ], UI.prototype, "name", void 0);
7583
+ ], UI.prototype, "name", undefined);
7578
7584
  __decorate([
7579
7585
  dataType('')
7580
- ], UI.prototype, "className", void 0);
7586
+ ], UI.prototype, "className", undefined);
7581
7587
  __decorate([
7582
7588
  surfaceType('pass-through')
7583
- ], UI.prototype, "blendMode", void 0);
7589
+ ], UI.prototype, "blendMode", undefined);
7584
7590
  __decorate([
7585
7591
  opacityType(1)
7586
- ], UI.prototype, "opacity", void 0);
7592
+ ], UI.prototype, "opacity", undefined);
7587
7593
  __decorate([
7588
7594
  visibleType(true)
7589
- ], UI.prototype, "visible", void 0);
7595
+ ], UI.prototype, "visible", undefined);
7590
7596
  __decorate([
7591
7597
  surfaceType(false)
7592
- ], UI.prototype, "locked", void 0);
7598
+ ], UI.prototype, "locked", undefined);
7593
7599
  __decorate([
7594
7600
  sortType(0)
7595
- ], UI.prototype, "zIndex", void 0);
7601
+ ], UI.prototype, "zIndex", undefined);
7596
7602
  __decorate([
7597
7603
  maskType(false)
7598
- ], UI.prototype, "mask", void 0);
7604
+ ], UI.prototype, "mask", undefined);
7599
7605
  __decorate([
7600
7606
  eraserType(false)
7601
- ], UI.prototype, "eraser", void 0);
7607
+ ], UI.prototype, "eraser", undefined);
7602
7608
  __decorate([
7603
7609
  positionType(0, true)
7604
- ], UI.prototype, "x", void 0);
7610
+ ], UI.prototype, "x", undefined);
7605
7611
  __decorate([
7606
7612
  positionType(0, true)
7607
- ], UI.prototype, "y", void 0);
7613
+ ], UI.prototype, "y", undefined);
7608
7614
  __decorate([
7609
7615
  boundsType(100, true)
7610
- ], UI.prototype, "width", void 0);
7616
+ ], UI.prototype, "width", undefined);
7611
7617
  __decorate([
7612
7618
  boundsType(100, true)
7613
- ], UI.prototype, "height", void 0);
7619
+ ], UI.prototype, "height", undefined);
7614
7620
  __decorate([
7615
7621
  scaleType(1, true)
7616
- ], UI.prototype, "scaleX", void 0);
7622
+ ], UI.prototype, "scaleX", undefined);
7617
7623
  __decorate([
7618
7624
  scaleType(1, true)
7619
- ], UI.prototype, "scaleY", void 0);
7625
+ ], UI.prototype, "scaleY", undefined);
7620
7626
  __decorate([
7621
7627
  rotationType(0, true)
7622
- ], UI.prototype, "rotation", void 0);
7628
+ ], UI.prototype, "rotation", undefined);
7623
7629
  __decorate([
7624
7630
  rotationType(0, true)
7625
- ], UI.prototype, "skewX", void 0);
7631
+ ], UI.prototype, "skewX", undefined);
7626
7632
  __decorate([
7627
7633
  rotationType(0, true)
7628
- ], UI.prototype, "skewY", void 0);
7634
+ ], UI.prototype, "skewY", undefined);
7629
7635
  __decorate([
7630
7636
  positionType(0, true)
7631
- ], UI.prototype, "offsetX", void 0);
7637
+ ], UI.prototype, "offsetX", undefined);
7632
7638
  __decorate([
7633
7639
  positionType(0, true)
7634
- ], UI.prototype, "offsetY", void 0);
7640
+ ], UI.prototype, "offsetY", undefined);
7635
7641
  __decorate([
7636
7642
  positionType(0, true)
7637
- ], UI.prototype, "scrollX", void 0);
7643
+ ], UI.prototype, "scrollX", undefined);
7638
7644
  __decorate([
7639
7645
  positionType(0, true)
7640
- ], UI.prototype, "scrollY", void 0);
7646
+ ], UI.prototype, "scrollY", undefined);
7641
7647
  __decorate([
7642
7648
  autoLayoutType()
7643
- ], UI.prototype, "origin", void 0);
7649
+ ], UI.prototype, "origin", undefined);
7644
7650
  __decorate([
7645
7651
  autoLayoutType()
7646
- ], UI.prototype, "around", void 0);
7652
+ ], UI.prototype, "around", undefined);
7647
7653
  __decorate([
7648
7654
  dataType(false)
7649
- ], UI.prototype, "lazy", void 0);
7655
+ ], UI.prototype, "lazy", undefined);
7650
7656
  __decorate([
7651
7657
  naturalBoundsType(1)
7652
- ], UI.prototype, "pixelRatio", void 0);
7658
+ ], UI.prototype, "pixelRatio", undefined);
7653
7659
  __decorate([
7654
7660
  pathInputType()
7655
- ], UI.prototype, "path", void 0);
7661
+ ], UI.prototype, "path", undefined);
7656
7662
  __decorate([
7657
7663
  pathType()
7658
- ], UI.prototype, "windingRule", void 0);
7664
+ ], UI.prototype, "windingRule", undefined);
7659
7665
  __decorate([
7660
7666
  pathType(true)
7661
- ], UI.prototype, "closed", void 0);
7667
+ ], UI.prototype, "closed", undefined);
7662
7668
  __decorate([
7663
7669
  boundsType(0)
7664
- ], UI.prototype, "padding", void 0);
7670
+ ], UI.prototype, "padding", undefined);
7665
7671
  __decorate([
7666
7672
  boundsType(false)
7667
- ], UI.prototype, "lockRatio", void 0);
7673
+ ], UI.prototype, "lockRatio", undefined);
7668
7674
  __decorate([
7669
7675
  boundsType()
7670
- ], UI.prototype, "widthRange", void 0);
7676
+ ], UI.prototype, "widthRange", undefined);
7671
7677
  __decorate([
7672
7678
  boundsType()
7673
- ], UI.prototype, "heightRange", void 0);
7679
+ ], UI.prototype, "heightRange", undefined);
7674
7680
  __decorate([
7675
7681
  dataType(false)
7676
- ], UI.prototype, "draggable", void 0);
7682
+ ], UI.prototype, "draggable", undefined);
7677
7683
  __decorate([
7678
7684
  dataType()
7679
- ], UI.prototype, "dragBounds", void 0);
7685
+ ], UI.prototype, "dragBounds", undefined);
7680
7686
  __decorate([
7681
7687
  dataType(false)
7682
- ], UI.prototype, "editable", void 0);
7688
+ ], UI.prototype, "editable", undefined);
7683
7689
  __decorate([
7684
7690
  hitType(true)
7685
- ], UI.prototype, "hittable", void 0);
7691
+ ], UI.prototype, "hittable", undefined);
7686
7692
  __decorate([
7687
7693
  hitType('path')
7688
- ], UI.prototype, "hitFill", void 0);
7694
+ ], UI.prototype, "hitFill", undefined);
7689
7695
  __decorate([
7690
7696
  strokeType('path')
7691
- ], UI.prototype, "hitStroke", void 0);
7697
+ ], UI.prototype, "hitStroke", undefined);
7692
7698
  __decorate([
7693
7699
  hitType(false)
7694
- ], UI.prototype, "hitBox", void 0);
7700
+ ], UI.prototype, "hitBox", undefined);
7695
7701
  __decorate([
7696
7702
  hitType(true)
7697
- ], UI.prototype, "hitChildren", void 0);
7703
+ ], UI.prototype, "hitChildren", undefined);
7698
7704
  __decorate([
7699
7705
  hitType(true)
7700
- ], UI.prototype, "hitSelf", void 0);
7706
+ ], UI.prototype, "hitSelf", undefined);
7701
7707
  __decorate([
7702
7708
  hitType()
7703
- ], UI.prototype, "hitRadius", void 0);
7709
+ ], UI.prototype, "hitRadius", undefined);
7704
7710
  __decorate([
7705
7711
  cursorType('')
7706
- ], UI.prototype, "cursor", void 0);
7712
+ ], UI.prototype, "cursor", undefined);
7707
7713
  __decorate([
7708
7714
  surfaceType()
7709
- ], UI.prototype, "fill", void 0);
7715
+ ], UI.prototype, "fill", undefined);
7710
7716
  __decorate([
7711
7717
  strokeType()
7712
- ], UI.prototype, "stroke", void 0);
7718
+ ], UI.prototype, "stroke", undefined);
7713
7719
  __decorate([
7714
7720
  strokeType('inside')
7715
- ], UI.prototype, "strokeAlign", void 0);
7721
+ ], UI.prototype, "strokeAlign", undefined);
7716
7722
  __decorate([
7717
7723
  strokeType(1)
7718
- ], UI.prototype, "strokeWidth", void 0);
7724
+ ], UI.prototype, "strokeWidth", undefined);
7719
7725
  __decorate([
7720
7726
  strokeType(false)
7721
- ], UI.prototype, "strokeWidthFixed", void 0);
7727
+ ], UI.prototype, "strokeWidthFixed", undefined);
7722
7728
  __decorate([
7723
7729
  strokeType('none')
7724
- ], UI.prototype, "strokeCap", void 0);
7730
+ ], UI.prototype, "strokeCap", undefined);
7725
7731
  __decorate([
7726
7732
  strokeType('miter')
7727
- ], UI.prototype, "strokeJoin", void 0);
7733
+ ], UI.prototype, "strokeJoin", undefined);
7728
7734
  __decorate([
7729
7735
  strokeType()
7730
- ], UI.prototype, "dashPattern", void 0);
7736
+ ], UI.prototype, "dashPattern", undefined);
7731
7737
  __decorate([
7732
7738
  strokeType()
7733
- ], UI.prototype, "dashOffset", void 0);
7739
+ ], UI.prototype, "dashOffset", undefined);
7734
7740
  __decorate([
7735
7741
  strokeType(10)
7736
- ], UI.prototype, "miterLimit", void 0);
7742
+ ], UI.prototype, "miterLimit", undefined);
7737
7743
  __decorate([
7738
7744
  pathType(0)
7739
- ], UI.prototype, "cornerRadius", void 0);
7745
+ ], UI.prototype, "cornerRadius", undefined);
7740
7746
  __decorate([
7741
7747
  pathType()
7742
- ], UI.prototype, "cornerSmoothing", void 0);
7748
+ ], UI.prototype, "cornerSmoothing", undefined);
7743
7749
  __decorate([
7744
7750
  effectType()
7745
- ], UI.prototype, "shadow", void 0);
7751
+ ], UI.prototype, "shadow", undefined);
7746
7752
  __decorate([
7747
7753
  effectType()
7748
- ], UI.prototype, "innerShadow", void 0);
7754
+ ], UI.prototype, "innerShadow", undefined);
7749
7755
  __decorate([
7750
7756
  effectType()
7751
- ], UI.prototype, "blur", void 0);
7757
+ ], UI.prototype, "blur", undefined);
7752
7758
  __decorate([
7753
7759
  effectType()
7754
- ], UI.prototype, "backgroundBlur", void 0);
7760
+ ], UI.prototype, "backgroundBlur", undefined);
7755
7761
  __decorate([
7756
7762
  effectType()
7757
- ], UI.prototype, "grayscale", void 0);
7763
+ ], UI.prototype, "grayscale", undefined);
7758
7764
  __decorate([
7759
7765
  dataType({})
7760
- ], UI.prototype, "data", void 0);
7766
+ ], UI.prototype, "data", undefined);
7761
7767
  __decorate([
7762
7768
  rewrite(Leaf.prototype.reset)
7763
7769
  ], UI.prototype, "reset", null);
@@ -7818,7 +7824,7 @@ let Group = class Group extends UI {
7818
7824
  };
7819
7825
  __decorate([
7820
7826
  dataProcessor(GroupData)
7821
- ], Group.prototype, "__", void 0);
7827
+ ], Group.prototype, "__", undefined);
7822
7828
  Group = __decorate([
7823
7829
  useModule(Branch),
7824
7830
  registerUI()
@@ -7989,8 +7995,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
7989
7995
  __setAttr(attrName, newValue) {
7990
7996
  if (this.canvas) {
7991
7997
  if (canvasSizeAttrs.includes(attrName)) {
7992
- if (!newValue)
7993
- debug$1.warn(attrName + ' is 0');
7994
7998
  this.__changeCanvasSize(attrName, newValue);
7995
7999
  }
7996
8000
  else if (attrName === 'fill') {
@@ -8193,10 +8197,10 @@ let Leafer = Leafer_1 = class Leafer extends Group {
8193
8197
  Leafer.list = new LeafList();
8194
8198
  __decorate([
8195
8199
  dataProcessor(LeaferData)
8196
- ], Leafer.prototype, "__", void 0);
8200
+ ], Leafer.prototype, "__", undefined);
8197
8201
  __decorate([
8198
8202
  boundsType()
8199
- ], Leafer.prototype, "pixelRatio", void 0);
8203
+ ], Leafer.prototype, "pixelRatio", undefined);
8200
8204
  Leafer = Leafer_1 = __decorate([
8201
8205
  registerUI()
8202
8206
  ], Leafer);
@@ -8209,7 +8213,7 @@ let Rect = class Rect extends UI {
8209
8213
  };
8210
8214
  __decorate([
8211
8215
  dataProcessor(RectData)
8212
- ], Rect.prototype, "__", void 0);
8216
+ ], Rect.prototype, "__", undefined);
8213
8217
  Rect = __decorate([
8214
8218
  useModule(RectRender),
8215
8219
  rewriteAble(),
@@ -8234,6 +8238,8 @@ let Box = class Box extends Group {
8234
8238
  const data = this.__;
8235
8239
  if (this.children.length) {
8236
8240
  if (data.__autoSide) {
8241
+ if (data.__hasSurface)
8242
+ this.__extraUpdate();
8237
8243
  super.__updateBoxBounds();
8238
8244
  const { boxBounds } = this.__layout;
8239
8245
  if (!data.__autoSize) {
@@ -8298,13 +8304,13 @@ let Box = class Box extends Group {
8298
8304
  };
8299
8305
  __decorate([
8300
8306
  dataProcessor(BoxData)
8301
- ], Box.prototype, "__", void 0);
8307
+ ], Box.prototype, "__", undefined);
8302
8308
  __decorate([
8303
8309
  dataType(false)
8304
- ], Box.prototype, "resizeChildren", void 0);
8310
+ ], Box.prototype, "resizeChildren", undefined);
8305
8311
  __decorate([
8306
8312
  affectRenderBoundsType('show')
8307
- ], Box.prototype, "overflow", void 0);
8313
+ ], Box.prototype, "overflow", undefined);
8308
8314
  __decorate([
8309
8315
  rewrite(rect$1.__updateStrokeSpread)
8310
8316
  ], Box.prototype, "__updateStrokeSpread", null);
@@ -8343,13 +8349,13 @@ let Frame = class Frame extends Box {
8343
8349
  };
8344
8350
  __decorate([
8345
8351
  dataProcessor(FrameData)
8346
- ], Frame.prototype, "__", void 0);
8352
+ ], Frame.prototype, "__", undefined);
8347
8353
  __decorate([
8348
8354
  surfaceType('#FFFFFF')
8349
- ], Frame.prototype, "fill", void 0);
8355
+ ], Frame.prototype, "fill", undefined);
8350
8356
  __decorate([
8351
8357
  affectRenderBoundsType('hide')
8352
- ], Frame.prototype, "overflow", void 0);
8358
+ ], Frame.prototype, "overflow", undefined);
8353
8359
  Frame = __decorate([
8354
8360
  registerUI()
8355
8361
  ], Frame);
@@ -8396,16 +8402,16 @@ let Ellipse = class Ellipse extends UI {
8396
8402
  };
8397
8403
  __decorate([
8398
8404
  dataProcessor(EllipseData)
8399
- ], Ellipse.prototype, "__", void 0);
8405
+ ], Ellipse.prototype, "__", undefined);
8400
8406
  __decorate([
8401
8407
  pathType(0)
8402
- ], Ellipse.prototype, "innerRadius", void 0);
8408
+ ], Ellipse.prototype, "innerRadius", undefined);
8403
8409
  __decorate([
8404
8410
  pathType(0)
8405
- ], Ellipse.prototype, "startAngle", void 0);
8411
+ ], Ellipse.prototype, "startAngle", undefined);
8406
8412
  __decorate([
8407
8413
  pathType(0)
8408
- ], Ellipse.prototype, "endAngle", void 0);
8414
+ ], Ellipse.prototype, "endAngle", undefined);
8409
8415
  Ellipse = __decorate([
8410
8416
  registerUI()
8411
8417
  ], Ellipse);
@@ -8464,22 +8470,22 @@ let Line = class Line extends UI {
8464
8470
  };
8465
8471
  __decorate([
8466
8472
  dataProcessor(LineData)
8467
- ], Line.prototype, "__", void 0);
8473
+ ], Line.prototype, "__", undefined);
8468
8474
  __decorate([
8469
8475
  affectStrokeBoundsType('center')
8470
- ], Line.prototype, "strokeAlign", void 0);
8476
+ ], Line.prototype, "strokeAlign", undefined);
8471
8477
  __decorate([
8472
8478
  boundsType(0)
8473
- ], Line.prototype, "height", void 0);
8479
+ ], Line.prototype, "height", undefined);
8474
8480
  __decorate([
8475
8481
  pathType()
8476
- ], Line.prototype, "points", void 0);
8482
+ ], Line.prototype, "points", undefined);
8477
8483
  __decorate([
8478
8484
  pathType(0)
8479
- ], Line.prototype, "curve", void 0);
8485
+ ], Line.prototype, "curve", undefined);
8480
8486
  __decorate([
8481
8487
  pathType(false)
8482
- ], Line.prototype, "closed", void 0);
8488
+ ], Line.prototype, "closed", undefined);
8483
8489
  Line = __decorate([
8484
8490
  registerUI()
8485
8491
  ], Line);
@@ -8512,16 +8518,16 @@ let Polygon = class Polygon extends UI {
8512
8518
  };
8513
8519
  __decorate([
8514
8520
  dataProcessor(PolygonData)
8515
- ], Polygon.prototype, "__", void 0);
8521
+ ], Polygon.prototype, "__", undefined);
8516
8522
  __decorate([
8517
8523
  pathType(3)
8518
- ], Polygon.prototype, "sides", void 0);
8524
+ ], Polygon.prototype, "sides", undefined);
8519
8525
  __decorate([
8520
8526
  pathType()
8521
- ], Polygon.prototype, "points", void 0);
8527
+ ], Polygon.prototype, "points", undefined);
8522
8528
  __decorate([
8523
8529
  pathType(0)
8524
- ], Polygon.prototype, "curve", void 0);
8530
+ ], Polygon.prototype, "curve", undefined);
8525
8531
  __decorate([
8526
8532
  rewrite(line.__updateRenderPath)
8527
8533
  ], Polygon.prototype, "__updateRenderPath", null);
@@ -8553,13 +8559,13 @@ let Star = class Star extends UI {
8553
8559
  };
8554
8560
  __decorate([
8555
8561
  dataProcessor(StarData)
8556
- ], Star.prototype, "__", void 0);
8562
+ ], Star.prototype, "__", undefined);
8557
8563
  __decorate([
8558
8564
  pathType(5)
8559
- ], Star.prototype, "corners", void 0);
8565
+ ], Star.prototype, "corners", undefined);
8560
8566
  __decorate([
8561
8567
  pathType(0.382)
8562
- ], Star.prototype, "innerRadius", void 0);
8568
+ ], Star.prototype, "innerRadius", undefined);
8563
8569
  Star = __decorate([
8564
8570
  registerUI()
8565
8571
  ], Star);
@@ -8581,10 +8587,10 @@ let Image = class Image extends Rect {
8581
8587
  };
8582
8588
  __decorate([
8583
8589
  dataProcessor(ImageData)
8584
- ], Image.prototype, "__", void 0);
8590
+ ], Image.prototype, "__", undefined);
8585
8591
  __decorate([
8586
8592
  boundsType('')
8587
- ], Image.prototype, "url", void 0);
8593
+ ], Image.prototype, "url", undefined);
8588
8594
  Image = __decorate([
8589
8595
  registerUI()
8590
8596
  ], Image);
@@ -8647,25 +8653,25 @@ let Canvas = class Canvas extends Rect {
8647
8653
  };
8648
8654
  __decorate([
8649
8655
  dataProcessor(CanvasData)
8650
- ], Canvas.prototype, "__", void 0);
8656
+ ], Canvas.prototype, "__", undefined);
8651
8657
  __decorate([
8652
8658
  resizeType(100)
8653
- ], Canvas.prototype, "width", void 0);
8659
+ ], Canvas.prototype, "width", undefined);
8654
8660
  __decorate([
8655
8661
  resizeType(100)
8656
- ], Canvas.prototype, "height", void 0);
8662
+ ], Canvas.prototype, "height", undefined);
8657
8663
  __decorate([
8658
8664
  resizeType(1)
8659
- ], Canvas.prototype, "pixelRatio", void 0);
8665
+ ], Canvas.prototype, "pixelRatio", undefined);
8660
8666
  __decorate([
8661
8667
  resizeType(true)
8662
- ], Canvas.prototype, "smooth", void 0);
8668
+ ], Canvas.prototype, "smooth", undefined);
8663
8669
  __decorate([
8664
8670
  dataType(false)
8665
- ], Canvas.prototype, "safeResize", void 0);
8671
+ ], Canvas.prototype, "safeResize", undefined);
8666
8672
  __decorate([
8667
8673
  resizeType()
8668
- ], Canvas.prototype, "contextSettings", void 0);
8674
+ ], Canvas.prototype, "contextSettings", undefined);
8669
8675
  Canvas = __decorate([
8670
8676
  registerUI()
8671
8677
  ], Canvas);
@@ -8756,76 +8762,76 @@ let Text = class Text extends UI {
8756
8762
  };
8757
8763
  __decorate([
8758
8764
  dataProcessor(TextData)
8759
- ], Text.prototype, "__", void 0);
8765
+ ], Text.prototype, "__", undefined);
8760
8766
  __decorate([
8761
8767
  boundsType(0)
8762
- ], Text.prototype, "width", void 0);
8768
+ ], Text.prototype, "width", undefined);
8763
8769
  __decorate([
8764
8770
  boundsType(0)
8765
- ], Text.prototype, "height", void 0);
8771
+ ], Text.prototype, "height", undefined);
8766
8772
  __decorate([
8767
8773
  dataType(false)
8768
- ], Text.prototype, "resizeFontSize", void 0);
8774
+ ], Text.prototype, "resizeFontSize", undefined);
8769
8775
  __decorate([
8770
8776
  surfaceType('#000000')
8771
- ], Text.prototype, "fill", void 0);
8777
+ ], Text.prototype, "fill", undefined);
8772
8778
  __decorate([
8773
8779
  affectStrokeBoundsType('outside')
8774
- ], Text.prototype, "strokeAlign", void 0);
8780
+ ], Text.prototype, "strokeAlign", undefined);
8775
8781
  __decorate([
8776
8782
  hitType('all')
8777
- ], Text.prototype, "hitFill", void 0);
8783
+ ], Text.prototype, "hitFill", undefined);
8778
8784
  __decorate([
8779
8785
  boundsType('')
8780
- ], Text.prototype, "text", void 0);
8786
+ ], Text.prototype, "text", undefined);
8781
8787
  __decorate([
8782
- boundsType('L')
8783
- ], Text.prototype, "fontFamily", void 0);
8788
+ boundsType('caption')
8789
+ ], Text.prototype, "fontFamily", undefined);
8784
8790
  __decorate([
8785
8791
  boundsType(12)
8786
- ], Text.prototype, "fontSize", void 0);
8792
+ ], Text.prototype, "fontSize", undefined);
8787
8793
  __decorate([
8788
8794
  boundsType('normal')
8789
- ], Text.prototype, "fontWeight", void 0);
8795
+ ], Text.prototype, "fontWeight", undefined);
8790
8796
  __decorate([
8791
8797
  boundsType(false)
8792
- ], Text.prototype, "italic", void 0);
8798
+ ], Text.prototype, "italic", undefined);
8793
8799
  __decorate([
8794
8800
  boundsType('none')
8795
- ], Text.prototype, "textCase", void 0);
8801
+ ], Text.prototype, "textCase", undefined);
8796
8802
  __decorate([
8797
8803
  boundsType('none')
8798
- ], Text.prototype, "textDecoration", void 0);
8804
+ ], Text.prototype, "textDecoration", undefined);
8799
8805
  __decorate([
8800
8806
  boundsType(0)
8801
- ], Text.prototype, "letterSpacing", void 0);
8807
+ ], Text.prototype, "letterSpacing", undefined);
8802
8808
  __decorate([
8803
8809
  boundsType({ type: 'percent', value: 1.5 })
8804
- ], Text.prototype, "lineHeight", void 0);
8810
+ ], Text.prototype, "lineHeight", undefined);
8805
8811
  __decorate([
8806
8812
  boundsType(0)
8807
- ], Text.prototype, "paraIndent", void 0);
8813
+ ], Text.prototype, "paraIndent", undefined);
8808
8814
  __decorate([
8809
8815
  boundsType(0)
8810
- ], Text.prototype, "paraSpacing", void 0);
8816
+ ], Text.prototype, "paraSpacing", undefined);
8811
8817
  __decorate([
8812
8818
  boundsType('x')
8813
- ], Text.prototype, "writingMode", void 0);
8819
+ ], Text.prototype, "writingMode", undefined);
8814
8820
  __decorate([
8815
8821
  boundsType('left')
8816
- ], Text.prototype, "textAlign", void 0);
8822
+ ], Text.prototype, "textAlign", undefined);
8817
8823
  __decorate([
8818
8824
  boundsType('top')
8819
- ], Text.prototype, "verticalAlign", void 0);
8825
+ ], Text.prototype, "verticalAlign", undefined);
8820
8826
  __decorate([
8821
8827
  boundsType(true)
8822
- ], Text.prototype, "autoSizeAlign", void 0);
8828
+ ], Text.prototype, "autoSizeAlign", undefined);
8823
8829
  __decorate([
8824
8830
  boundsType('normal')
8825
- ], Text.prototype, "textWrap", void 0);
8831
+ ], Text.prototype, "textWrap", undefined);
8826
8832
  __decorate([
8827
8833
  boundsType('show')
8828
- ], Text.prototype, "textOverflow", void 0);
8834
+ ], Text.prototype, "textOverflow", undefined);
8829
8835
  Text = __decorate([
8830
8836
  registerUI()
8831
8837
  ], Text);
@@ -8838,10 +8844,10 @@ let Path = class Path extends UI {
8838
8844
  };
8839
8845
  __decorate([
8840
8846
  dataProcessor(PathData)
8841
- ], Path.prototype, "__", void 0);
8847
+ ], Path.prototype, "__", undefined);
8842
8848
  __decorate([
8843
8849
  affectStrokeBoundsType('center')
8844
- ], Path.prototype, "strokeAlign", void 0);
8850
+ ], Path.prototype, "strokeAlign", undefined);
8845
8851
  Path = __decorate([
8846
8852
  registerUI()
8847
8853
  ], Path);
@@ -8880,10 +8886,10 @@ let Pen = class Pen extends Group {
8880
8886
  };
8881
8887
  __decorate([
8882
8888
  dataProcessor(PenData)
8883
- ], Pen.prototype, "__", void 0);
8889
+ ], Pen.prototype, "__", undefined);
8884
8890
  __decorate([
8885
8891
  penPathType()
8886
- ], Pen.prototype, "path", void 0);
8892
+ ], Pen.prototype, "path", undefined);
8887
8893
  Pen = __decorate([
8888
8894
  useModule(PathCreator, ['set', 'path', 'paint']),
8889
8895
  registerUI()
@@ -9650,10 +9656,9 @@ class InteractionBase {
9650
9656
  }
9651
9657
  }
9652
9658
  pointerMoveReal(data) {
9653
- const { dragHover, dragDistance } = this.p;
9654
9659
  this.emit(PointerEvent.BEFORE_MOVE, data, this.defaultPath);
9655
9660
  if (this.downData) {
9656
- const canDrag = PointHelper.getDistance(this.downData, data) > dragDistance;
9661
+ const canDrag = PointHelper.getDistance(this.downData, data) > this.p.dragDistance;
9657
9662
  if (canDrag) {
9658
9663
  if (this.waitTap)
9659
9664
  this.pointerWaitCancel();
@@ -9665,9 +9670,8 @@ class InteractionBase {
9665
9670
  this.updateHoverData(data);
9666
9671
  this.checkPath(data);
9667
9672
  this.emit(PointerEvent.MOVE, data);
9668
- if (!(this.dragging && !dragHover))
9669
- this.pointerHover(data);
9670
- if (this.dragger.dragging) {
9673
+ this.pointerHover(data);
9674
+ if (this.dragging) {
9671
9675
  this.dragger.dragOverOrOut(data);
9672
9676
  this.dragger.dragEnterOrLeave(data);
9673
9677
  }
@@ -9748,7 +9752,8 @@ class InteractionBase {
9748
9752
  this.updateCursor();
9749
9753
  }
9750
9754
  pointerHover(data) {
9751
- if (this.canHover) {
9755
+ if (this.canHover && !(this.dragging && !this.p.dragHover)) {
9756
+ data.path || (data.path = new LeafList());
9752
9757
  this.pointerOverOrOut(data);
9753
9758
  this.pointerEnterOrLeave(data);
9754
9759
  }
@@ -10068,9 +10073,9 @@ leaf.__hitWorld = function (point) {
10068
10073
  }
10069
10074
  return this.__hit(inner);
10070
10075
  };
10071
- leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitFill(inner, this.__.windingRule); };
10072
- leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitStroke(inner, strokeWidth); };
10073
- 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); };
10076
+ leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitFill(inner, this.__.windingRule); };
10077
+ leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitStroke(inner, strokeWidth); };
10078
+ leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
10074
10079
  leaf.__drawHitPath = function (canvas) { if (canvas)
10075
10080
  this.__drawRenderPath(canvas); };
10076
10081
 
@@ -10910,7 +10915,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
10910
10915
  }
10911
10916
  else {
10912
10917
  if (!paint.patternTask) {
10913
- paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
10918
+ paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
10914
10919
  paint.patternTask = null;
10915
10920
  if (canvas.bounds.hit(ui.__nowWorld))
10916
10921
  createPattern(ui, paint, pixelRatio);
@@ -11066,7 +11071,7 @@ function shadow(ui, current, shape) {
11066
11071
  const end = shadow.length - 1;
11067
11072
  toOffsetOutBounds$1(bounds, offsetOutBounds$1);
11068
11073
  shadow.forEach((item, index) => {
11069
- other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
11074
+ other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
11070
11075
  spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
11071
11076
  drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
11072
11077
  copyBounds = bounds;
@@ -11142,7 +11147,7 @@ function innerShadow(ui, current, shape) {
11142
11147
  other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
11143
11148
  copyBounds = bounds;
11144
11149
  }
11145
- other.fillWorld(copyBounds, item.color, 'source-in');
11150
+ other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
11146
11151
  if (ui.__worldFlipped) {
11147
11152
  current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
11148
11153
  }
@@ -11500,11 +11505,11 @@ const TextMode = 2;
11500
11505
  function layoutChar(drawData, style, width, _height) {
11501
11506
  const { rows } = drawData;
11502
11507
  const { textAlign, paraIndent, letterSpacing } = style;
11503
- let charX, addWordWidth, indentWidth, mode, wordChar;
11508
+ let charX, addWordWidth, indentWidth, mode, wordChar, wordsLength;
11504
11509
  rows.forEach(row => {
11505
11510
  if (row.words) {
11506
- indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
11507
- addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
11511
+ indentWidth = paraIndent && row.paraStart ? paraIndent : 0, wordsLength = row.words.length;
11512
+ addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && wordsLength > 1) ? (width - row.width - indentWidth) / (wordsLength - 1) : 0;
11508
11513
  mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
11509
11514
  if (row.isOverflow && !letterSpacing)
11510
11515
  row.textMode = true;
@@ -11516,7 +11521,7 @@ function layoutChar(drawData, style, width, _height) {
11516
11521
  row.x += indentWidth;
11517
11522
  charX = row.x;
11518
11523
  row.data = [];
11519
- row.words.forEach(word => {
11524
+ row.words.forEach((word, index) => {
11520
11525
  if (mode === WordMode) {
11521
11526
  wordChar = { char: '', x: charX };
11522
11527
  charX = toWordChar(word.data, charX, wordChar);
@@ -11526,7 +11531,7 @@ function layoutChar(drawData, style, width, _height) {
11526
11531
  else {
11527
11532
  charX = toChar(word.data, charX, row.data, row.isOverflow);
11528
11533
  }
11529
- if (addWordWidth && (!row.paraEnd || textAlign === 'both')) {
11534
+ if (addWordWidth && (!row.paraEnd || textAlign === 'both') && (index !== wordsLength - 1)) {
11530
11535
  charX += addWordWidth;
11531
11536
  row.width += addWordWidth;
11532
11537
  }
@@ -11814,3 +11819,4 @@ if (platform === 'ios') {
11814
11819
  }
11815
11820
 
11816
11821
  export { AlignHelper, Answer, App, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragEvent, Dragger, DropEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Frame, FrameData, Group, GroupData, HitCanvasManager, Image, ImageData, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferImage, Line, LineData, MathHelper, Matrix, MatrixHelper, MoveEvent, MyDragEvent, MyImage, MyPointerEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, RotateEvent, Run, Selector, Star, StarData, State, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, doBoundsType, doStrokeType, effectType, emptyData, eraserType, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isNull, layoutProcessor, maskType, naturalBoundsType, opacityType, pathInputType, pathType, pen, positionType, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, sortType, strokeType, surfaceType, tempBounds$1 as tempBounds, tempMatrix, tempPoint$3 as tempPoint, useCanvas, useModule, version, visibleType, zoomLayerType };
11822
+ //# sourceMappingURL=miniapp.module.js.map