@leafer/miniapp 1.11.2 → 1.12.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.
@@ -1 +1 @@
1
- {"version":3,"file":"miniapp.esm.min.js","sources":["../../../../../../../src/leafer/packages/interface/src/path/IPathCommand.ts"],"sourcesContent":["import { IPointData } from '../math/IMath'\n\ntype Command = number\ntype x = number\ntype y = number\ntype x1 = number\ntype y1 = number\ntype x2 = number\ntype y2 = number\ntype radiusX = number\ntype radiusY = number\ntype xAxisRotation = number\ntype largeArcFlag = number\ntype sweepFlag = number\n\n\nexport type MCommandData = [Command, x, y]\nexport type HCommandData = [Command, x]\nexport type VCommandData = [Command, y]\nexport type LCommandData = MCommandData\n\nexport type CCommandData = [Command, x1, y1, x2, y2, x, y]\nexport type SCommandData = [Command, x2, y2, x, y]\n\nexport type QCommandData = [Command, x1, y1, x, y]\nexport type TCommandData = [Command, x, y]\n\nexport type ZCommandData = [Command]\n\nexport type ACommandData = [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]\n\n\n// 非svg标准的canvas绘图命令\ntype width = number\ntype height = number\ntype rotation = number\ntype startAngle = number\ntype endAngle = number\ntype anticlockwise = boolean\ntype cornerRadius = number | number[]\ntype radius = number\n\nexport type RectCommandData = [Command, x, y, width, height]\nexport type RoundRectCommandData = [Command, x, y, width, height, cornerRadius]\nexport type EllipseCommandData = [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]\nexport type ArcCommandData = [Command, x, y, radius, startAngle, endAngle, anticlockwise]\nexport type ArcToCommandData = [Command, x1, y1, x2, y2, radius]\n\n\nexport type CanvasPathCommand = 1 | 2 | 5 | 7 | 11 // M | L | C | Q | Z canvas可以绘制的命令\n\nexport type IPathCommandData = number[] // ...(MCommandData | LCommandData | CCommandData | QCommandData | ZCommandData)\n\n\n// 路径命令对象\nexport interface MoveToCommandObject {\n name: 'M'\n x: number\n y: number\n}\nexport interface LineToCommandObject {\n name: 'L'\n x: number\n y: number\n}\n\nexport interface BezierCurveToCommandObject {\n name: 'C'\n x1: number\n y1: number\n x2: number\n y2: number\n x: number\n y: number\n}\n\nexport interface QuadraticCurveToCommandObject {\n name: 'Q'\n x1: number\n y1: number\n x: number\n y: number\n}\n\nexport interface ClosePathCommandObject {\n name: 'Z'\n}\n\nexport type IPathCommandObject = MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject // M | L | C | Q | Z canvas可以绘制的命令\n\n\n// 可视化路径节点\n\nexport interface IPathCommandNodeBase {\n name: 'M^' | 'L^' | 'C^' | 'Z^'\n x: number\n y: number\n a?: IPointData // 第一个手柄,连接上一个节点\n b?: IPointData // 第二个手柄,连接下一个节点\n ab?: PathNodeHandleType // 手柄类型\n}\n\nexport interface MoveToCommandNode extends IPathCommandNodeBase {\n name: 'M^'\n}\nexport interface LineToCommandNode extends IPathCommandNodeBase {\n name: 'L^'\n}\n\nexport interface BezierCurveToCommandNode extends IPathCommandNodeBase {\n name: 'C^'\n}\n\nexport interface ClosePathCommandNode {\n name: 'Z^'\n x?: number\n y?: number\n a?: IPointData\n b?: IPointData\n ab?: PathNodeHandleType\n\n}\n\nexport type IPathCommandNode = MoveToCommandNode | LineToCommandNode | BezierCurveToCommandNode | ClosePathCommandNode // M | L | C | Z 路径节点命令(适合可视化编辑)\n\nexport enum PathNodeHandleType { // 手柄类型\n none = 1, // 无手柄\n free = 2, // 每个手柄自由控制\n mirrorAngle = 3, // 仅镜像角度\n mirror = 4, // 镜像角度和长度\n}\n\nexport type PathNodeHandleName = 'a' | 'b' // 手柄名称\n\nexport interface IPathNodeBase {\n pathNode: IPathCommandNode\n}"],"names":["PathNodeHandleType"],"mappings":"khBA6HYA,GAAZ,SAAYA,GACRA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,YAAA,GAAA,cACAA,EAAAA,EAAA,OAAA,GAAA,QACH,CALD,CAAYA,IAAAA,EAAkB,CAAA"}
1
+ {"version":3,"file":"miniapp.esm.min.js","sources":["../../../../../../../src/leafer/packages/interface/src/path/IPathCommand.ts"],"sourcesContent":["import { IPointData } from '../math/IMath'\n\ntype Command = number\ntype x = number\ntype y = number\ntype x1 = number\ntype y1 = number\ntype x2 = number\ntype y2 = number\ntype radiusX = number\ntype radiusY = number\ntype xAxisRotation = number\ntype largeArcFlag = number\ntype sweepFlag = number\n\n\nexport type MCommandData = [Command, x, y]\nexport type HCommandData = [Command, x]\nexport type VCommandData = [Command, y]\nexport type LCommandData = MCommandData\n\nexport type CCommandData = [Command, x1, y1, x2, y2, x, y]\nexport type SCommandData = [Command, x2, y2, x, y]\n\nexport type QCommandData = [Command, x1, y1, x, y]\nexport type TCommandData = [Command, x, y]\n\nexport type ZCommandData = [Command]\n\nexport type ACommandData = [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]\n\n\n// 非svg标准的canvas绘图命令\ntype width = number\ntype height = number\ntype rotation = number\ntype startAngle = number\ntype endAngle = number\ntype anticlockwise = boolean\ntype cornerRadius = number | number[]\ntype radius = number\n\nexport type RectCommandData = [Command, x, y, width, height]\nexport type RoundRectCommandData = [Command, x, y, width, height, cornerRadius]\nexport type EllipseCommandData = [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]\nexport type ArcCommandData = [Command, x, y, radius, startAngle, endAngle, anticlockwise]\nexport type ArcToCommandData = [Command, x1, y1, x2, y2, radius]\n\n\nexport type CanvasPathCommand = 1 | 2 | 5 | 7 | 11 // M | L | C | Q | Z canvas可以绘制的命令\n\nexport type IPathCommandData = number[] // ...(MCommandData | LCommandData | CCommandData | QCommandData | ZCommandData)\n\n\n// 路径命令对象\nexport interface MoveToCommandObject {\n name: 'M'\n x: number\n y: number\n}\nexport interface LineToCommandObject {\n name: 'L'\n x: number\n y: number\n}\n\nexport interface BezierCurveToCommandObject {\n name: 'C'\n x1: number\n y1: number\n x2: number\n y2: number\n x: number\n y: number\n}\n\nexport interface QuadraticCurveToCommandObject {\n name: 'Q'\n x1: number\n y1: number\n x: number\n y: number\n}\n\nexport interface ClosePathCommandObject {\n name: 'Z'\n}\n\nexport type IPathCommandObject = MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject // M | L | C | Q | Z canvas可以绘制的命令\n\n\n// 可视化路径节点\n\nexport interface IPathCommandNodeBase {\n name: 'M^' | 'L^' | 'C^' | 'Z^'\n x: number\n y: number\n a?: IPointData // 第一个手柄,连接上一个节点\n b?: IPointData // 第二个手柄,连接下一个节点\n ab?: PathNodeHandleType // 手柄类型\n}\n\nexport interface MoveToCommandNode extends IPathCommandNodeBase {\n name: 'M^'\n}\nexport interface LineToCommandNode extends IPathCommandNodeBase {\n name: 'L^'\n}\n\nexport interface BezierCurveToCommandNode extends IPathCommandNodeBase {\n name: 'C^'\n}\n\nexport interface ClosePathCommandNode {\n name: 'Z^'\n x?: number\n y?: number\n a?: IPointData\n b?: IPointData\n ab?: PathNodeHandleType\n}\n\nexport type IPathCommandNode = MoveToCommandNode | LineToCommandNode | BezierCurveToCommandNode | ClosePathCommandNode // M | L | C | Z 路径节点命令(适合可视化编辑)\n\nexport enum PathNodeHandleType { // 手柄类型\n none = 1, // 无手柄\n free = 2, // 每个手柄自由控制\n mirrorAngle = 3, // 仅镜像角度\n mirror = 4, // 镜像角度和长度\n}\n\nexport type PathNodeHandleName = 'a' | 'b' // 手柄名称\n\nexport interface IPathNodeBase {\n pathNode: IPathCommandNode\n}"],"names":["PathNodeHandleType"],"mappings":"khBA4HYA,GAAZ,SAAYA,GACRA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,YAAA,GAAA,cACAA,EAAAA,EAAA,OAAA,GAAA,QACH,CALD,CAAYA,IAAAA,EAAkB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"miniapp.min.cjs","sources":["../../../../../../../src/leafer/packages/interface/src/path/IPathCommand.ts"],"sourcesContent":["import { IPointData } from '../math/IMath'\n\ntype Command = number\ntype x = number\ntype y = number\ntype x1 = number\ntype y1 = number\ntype x2 = number\ntype y2 = number\ntype radiusX = number\ntype radiusY = number\ntype xAxisRotation = number\ntype largeArcFlag = number\ntype sweepFlag = number\n\n\nexport type MCommandData = [Command, x, y]\nexport type HCommandData = [Command, x]\nexport type VCommandData = [Command, y]\nexport type LCommandData = MCommandData\n\nexport type CCommandData = [Command, x1, y1, x2, y2, x, y]\nexport type SCommandData = [Command, x2, y2, x, y]\n\nexport type QCommandData = [Command, x1, y1, x, y]\nexport type TCommandData = [Command, x, y]\n\nexport type ZCommandData = [Command]\n\nexport type ACommandData = [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]\n\n\n// 非svg标准的canvas绘图命令\ntype width = number\ntype height = number\ntype rotation = number\ntype startAngle = number\ntype endAngle = number\ntype anticlockwise = boolean\ntype cornerRadius = number | number[]\ntype radius = number\n\nexport type RectCommandData = [Command, x, y, width, height]\nexport type RoundRectCommandData = [Command, x, y, width, height, cornerRadius]\nexport type EllipseCommandData = [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]\nexport type ArcCommandData = [Command, x, y, radius, startAngle, endAngle, anticlockwise]\nexport type ArcToCommandData = [Command, x1, y1, x2, y2, radius]\n\n\nexport type CanvasPathCommand = 1 | 2 | 5 | 7 | 11 // M | L | C | Q | Z canvas可以绘制的命令\n\nexport type IPathCommandData = number[] // ...(MCommandData | LCommandData | CCommandData | QCommandData | ZCommandData)\n\n\n// 路径命令对象\nexport interface MoveToCommandObject {\n name: 'M'\n x: number\n y: number\n}\nexport interface LineToCommandObject {\n name: 'L'\n x: number\n y: number\n}\n\nexport interface BezierCurveToCommandObject {\n name: 'C'\n x1: number\n y1: number\n x2: number\n y2: number\n x: number\n y: number\n}\n\nexport interface QuadraticCurveToCommandObject {\n name: 'Q'\n x1: number\n y1: number\n x: number\n y: number\n}\n\nexport interface ClosePathCommandObject {\n name: 'Z'\n}\n\nexport type IPathCommandObject = MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject // M | L | C | Q | Z canvas可以绘制的命令\n\n\n// 可视化路径节点\n\nexport interface IPathCommandNodeBase {\n name: 'M^' | 'L^' | 'C^' | 'Z^'\n x: number\n y: number\n a?: IPointData // 第一个手柄,连接上一个节点\n b?: IPointData // 第二个手柄,连接下一个节点\n ab?: PathNodeHandleType // 手柄类型\n}\n\nexport interface MoveToCommandNode extends IPathCommandNodeBase {\n name: 'M^'\n}\nexport interface LineToCommandNode extends IPathCommandNodeBase {\n name: 'L^'\n}\n\nexport interface BezierCurveToCommandNode extends IPathCommandNodeBase {\n name: 'C^'\n}\n\nexport interface ClosePathCommandNode {\n name: 'Z^'\n x?: number\n y?: number\n a?: IPointData\n b?: IPointData\n ab?: PathNodeHandleType\n\n}\n\nexport type IPathCommandNode = MoveToCommandNode | LineToCommandNode | BezierCurveToCommandNode | ClosePathCommandNode // M | L | C | Z 路径节点命令(适合可视化编辑)\n\nexport enum PathNodeHandleType { // 手柄类型\n none = 1, // 无手柄\n free = 2, // 每个手柄自由控制\n mirrorAngle = 3, // 仅镜像角度\n mirror = 4, // 镜像角度和长度\n}\n\nexport type PathNodeHandleName = 'a' | 'b' // 手柄名称\n\nexport interface IPathNodeBase {\n pathNode: IPathCommandNode\n}"],"names":["PathNodeHandleType"],"mappings":"iBA6HYA,ghBAAAA,QAAAA,wBAAAA,GAAAA,EAAAA,QAAAA,qBAAAA,2BAAkB,CAAA,IAC1BA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,YAAA,GAAA,cACAA,EAAAA,EAAA,OAAA,GAAA"}
1
+ {"version":3,"file":"miniapp.min.cjs","sources":["../../../../../../../src/leafer/packages/interface/src/path/IPathCommand.ts"],"sourcesContent":["import { IPointData } from '../math/IMath'\n\ntype Command = number\ntype x = number\ntype y = number\ntype x1 = number\ntype y1 = number\ntype x2 = number\ntype y2 = number\ntype radiusX = number\ntype radiusY = number\ntype xAxisRotation = number\ntype largeArcFlag = number\ntype sweepFlag = number\n\n\nexport type MCommandData = [Command, x, y]\nexport type HCommandData = [Command, x]\nexport type VCommandData = [Command, y]\nexport type LCommandData = MCommandData\n\nexport type CCommandData = [Command, x1, y1, x2, y2, x, y]\nexport type SCommandData = [Command, x2, y2, x, y]\n\nexport type QCommandData = [Command, x1, y1, x, y]\nexport type TCommandData = [Command, x, y]\n\nexport type ZCommandData = [Command]\n\nexport type ACommandData = [Command, radiusX, radiusY, xAxisRotation, largeArcFlag, sweepFlag, x, y]\n\n\n// 非svg标准的canvas绘图命令\ntype width = number\ntype height = number\ntype rotation = number\ntype startAngle = number\ntype endAngle = number\ntype anticlockwise = boolean\ntype cornerRadius = number | number[]\ntype radius = number\n\nexport type RectCommandData = [Command, x, y, width, height]\nexport type RoundRectCommandData = [Command, x, y, width, height, cornerRadius]\nexport type EllipseCommandData = [Command, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise]\nexport type ArcCommandData = [Command, x, y, radius, startAngle, endAngle, anticlockwise]\nexport type ArcToCommandData = [Command, x1, y1, x2, y2, radius]\n\n\nexport type CanvasPathCommand = 1 | 2 | 5 | 7 | 11 // M | L | C | Q | Z canvas可以绘制的命令\n\nexport type IPathCommandData = number[] // ...(MCommandData | LCommandData | CCommandData | QCommandData | ZCommandData)\n\n\n// 路径命令对象\nexport interface MoveToCommandObject {\n name: 'M'\n x: number\n y: number\n}\nexport interface LineToCommandObject {\n name: 'L'\n x: number\n y: number\n}\n\nexport interface BezierCurveToCommandObject {\n name: 'C'\n x1: number\n y1: number\n x2: number\n y2: number\n x: number\n y: number\n}\n\nexport interface QuadraticCurveToCommandObject {\n name: 'Q'\n x1: number\n y1: number\n x: number\n y: number\n}\n\nexport interface ClosePathCommandObject {\n name: 'Z'\n}\n\nexport type IPathCommandObject = MoveToCommandObject | LineToCommandObject | BezierCurveToCommandObject | QuadraticCurveToCommandObject | ClosePathCommandObject // M | L | C | Q | Z canvas可以绘制的命令\n\n\n// 可视化路径节点\n\nexport interface IPathCommandNodeBase {\n name: 'M^' | 'L^' | 'C^' | 'Z^'\n x: number\n y: number\n a?: IPointData // 第一个手柄,连接上一个节点\n b?: IPointData // 第二个手柄,连接下一个节点\n ab?: PathNodeHandleType // 手柄类型\n}\n\nexport interface MoveToCommandNode extends IPathCommandNodeBase {\n name: 'M^'\n}\nexport interface LineToCommandNode extends IPathCommandNodeBase {\n name: 'L^'\n}\n\nexport interface BezierCurveToCommandNode extends IPathCommandNodeBase {\n name: 'C^'\n}\n\nexport interface ClosePathCommandNode {\n name: 'Z^'\n x?: number\n y?: number\n a?: IPointData\n b?: IPointData\n ab?: PathNodeHandleType\n}\n\nexport type IPathCommandNode = MoveToCommandNode | LineToCommandNode | BezierCurveToCommandNode | ClosePathCommandNode // M | L | C | Z 路径节点命令(适合可视化编辑)\n\nexport enum PathNodeHandleType { // 手柄类型\n none = 1, // 无手柄\n free = 2, // 每个手柄自由控制\n mirrorAngle = 3, // 仅镜像角度\n mirror = 4, // 镜像角度和长度\n}\n\nexport type PathNodeHandleName = 'a' | 'b' // 手柄名称\n\nexport interface IPathNodeBase {\n pathNode: IPathCommandNode\n}"],"names":["PathNodeHandleType"],"mappings":"iBA4HYA,ghBAAAA,QAAAA,wBAAAA,GAAAA,EAAAA,QAAAA,qBAAAA,2BAAkB,CAAA,IAC1BA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,KAAA,GAAA,OACAA,EAAAA,EAAA,YAAA,GAAA,cACAA,EAAAA,EAAA,OAAA,GAAA"}
@@ -4056,16 +4056,27 @@ const ImageManager = {
4056
4056
  recycle(image) {
4057
4057
  image.use--;
4058
4058
  setTimeout(() => {
4059
- if (!image.use) I$1.recycledList.push(image);
4059
+ if (!image.use) {
4060
+ if (Platform.image.isLarge(image)) {
4061
+ if (image.url) Resource.remove(image.url);
4062
+ } else {
4063
+ image.clearLevels();
4064
+ I$1.recycledList.push(image);
4065
+ }
4066
+ }
4060
4067
  });
4061
4068
  },
4062
- clearRecycled() {
4069
+ recyclePaint(paint) {
4070
+ I$1.recycle(paint.image);
4071
+ },
4072
+ clearRecycled(force) {
4063
4073
  const list = I$1.recycledList;
4064
- if (list.length > I$1.maxRecycled) {
4065
- list.forEach(image => !image.use && image.url && Resource.remove(image.url));
4074
+ if (list.length > I$1.maxRecycled || force) {
4075
+ list.forEach(image => (!image.use || force) && image.url && Resource.remove(image.url));
4066
4076
  list.length = 0;
4067
4077
  }
4068
4078
  },
4079
+ clearLevels() {},
4069
4080
  hasAlphaPixel(config) {
4070
4081
  return FileHelper.alphaPixelTypes.some(item => I$1.isFormat(item, config));
4071
4082
  },
@@ -4080,7 +4091,7 @@ const ImageManager = {
4080
4091
  return false;
4081
4092
  },
4082
4093
  destroy() {
4083
- I$1.recycledList = [];
4094
+ this.clearRecycled(true);
4084
4095
  }
4085
4096
  };
4086
4097
 
@@ -4183,11 +4194,15 @@ class LeaferImage {
4183
4194
  Platform.image.setPatternTransform(pattern, transform, paint);
4184
4195
  return pattern;
4185
4196
  }
4197
+ clearLevels(_checkUse) {}
4186
4198
  destroy() {
4199
+ this.clearLevels();
4200
+ const {view: view} = this;
4201
+ if (view && view.close) view.close();
4187
4202
  this.config = {
4188
4203
  url: ""
4189
4204
  };
4190
- this.cache = null;
4205
+ this.cache = this.view = null;
4191
4206
  this.waitComplete.length = 0;
4192
4207
  }
4193
4208
  }
@@ -5966,6 +5981,7 @@ const LeafBounds = {
5966
5981
  const LeafRender = {
5967
5982
  __render(canvas, options) {
5968
5983
  if (options.shape) return this.__renderShape(canvas, options);
5984
+ if (options.cellList && !options.cellList.has(this)) return;
5969
5985
  if (this.__worldOpacity) {
5970
5986
  const data = this.__;
5971
5987
  if (data.bright && !options.topRendering) return options.topList.add(this);
@@ -6864,7 +6880,7 @@ class LeafLevelList {
6864
6880
  }
6865
6881
  }
6866
6882
 
6867
- const version = "1.11.2";
6883
+ const version = "1.12.0";
6868
6884
 
6869
6885
  class LeaferCanvas extends LeaferCanvasBase {
6870
6886
  get allowBackgroundColor() {
@@ -7134,7 +7150,7 @@ class Watcher {
7134
7150
  return this.hasAdd || this.hasRemove || this.hasVisible;
7135
7151
  }
7136
7152
  get updatedList() {
7137
- if (this.hasRemove) {
7153
+ if (this.hasRemove && this.config.usePartLayout) {
7138
7154
  const updatedList = new LeafList;
7139
7155
  this.__updatedList.list.forEach(item => {
7140
7156
  if (item.leafer) updatedList.add(item);
@@ -7169,16 +7185,18 @@ class Watcher {
7169
7185
  if (this.running) this.target.emit(RenderEvent.REQUEST);
7170
7186
  }
7171
7187
  __onAttrChange(event) {
7172
- this.__updatedList.add(event.target);
7188
+ if (this.config.usePartLayout) this.__updatedList.add(event.target);
7173
7189
  this.update();
7174
7190
  }
7175
7191
  __onChildEvent(event) {
7176
- if (event.type === ChildEvent.ADD) {
7177
- this.hasAdd = true;
7178
- this.__pushChild(event.child);
7179
- } else {
7180
- this.hasRemove = true;
7181
- this.__updatedList.add(event.parent);
7192
+ if (this.config.usePartLayout) {
7193
+ if (event.type === ChildEvent.ADD) {
7194
+ this.hasAdd = true;
7195
+ this.__pushChild(event.child);
7196
+ } else {
7197
+ this.hasRemove = true;
7198
+ this.__updatedList.add(event.parent);
7199
+ }
7182
7200
  }
7183
7201
  this.update();
7184
7202
  }
@@ -7295,7 +7313,9 @@ const debug$7 = Debug.get("Layouter");
7295
7313
  class Layouter {
7296
7314
  constructor(target, userConfig) {
7297
7315
  this.totalTimes = 0;
7298
- this.config = {};
7316
+ this.config = {
7317
+ usePartLayout: true
7318
+ };
7299
7319
  this.__levelList = new LeafLevelList;
7300
7320
  this.target = target;
7301
7321
  if (userConfig) this.config = DataHelper.default(userConfig, this.config);
@@ -7340,7 +7360,7 @@ class Layouter {
7340
7360
  this.totalTimes++;
7341
7361
  this.layouting = true;
7342
7362
  this.target.emit(WatchEvent.REQUEST);
7343
- if (this.totalTimes > 1) {
7363
+ if (this.totalTimes > 1 && this.config.usePartLayout) {
7344
7364
  this.partLayout();
7345
7365
  } else {
7346
7366
  this.fullLayout();
@@ -7457,7 +7477,7 @@ class Renderer {
7457
7477
  }
7458
7478
  update(change = true) {
7459
7479
  if (!this.changed) this.changed = change;
7460
- this.__requestRender();
7480
+ if (!this.requestTime) this.__requestRender();
7461
7481
  }
7462
7482
  requestLayout() {
7463
7483
  this.target.emit(LayoutEvent.REQUEST);
@@ -7564,7 +7584,7 @@ class Renderer {
7564
7584
  Run.end(t);
7565
7585
  }
7566
7586
  __render(bounds, realBounds) {
7567
- const {canvas: canvas} = this, includes = bounds.includes(this.target.__world), options = includes ? {
7587
+ const {canvas: canvas, target: target} = this, includes = bounds.includes(target.__world), options = includes ? {
7568
7588
  includes: includes
7569
7589
  } : {
7570
7590
  bounds: bounds,
@@ -7572,12 +7592,16 @@ class Renderer {
7572
7592
  };
7573
7593
  if (this.needFill) canvas.fillWorld(bounds, this.config.fill);
7574
7594
  if (Debug.showRepaint) Debug.drawRepaint(canvas, bounds);
7575
- Platform.render(this.target, canvas, options);
7595
+ if (this.config.useCellRender) options.cellList = this.getCellList();
7596
+ Platform.render(target, canvas, options);
7576
7597
  this.renderBounds = realBounds = realBounds || bounds;
7577
7598
  this.renderOptions = options;
7578
7599
  this.totalBounds.isEmpty() ? this.totalBounds = realBounds : this.totalBounds.add(realBounds);
7579
7600
  canvas.updateRender(realBounds);
7580
7601
  }
7602
+ getCellList() {
7603
+ return undefined;
7604
+ }
7581
7605
  addBlock(block) {
7582
7606
  if (!this.updateBlocks) this.updateBlocks = [];
7583
7607
  this.updateBlocks.push(block);
@@ -8234,6 +8258,11 @@ class TextData extends UIData {
8234
8258
  }
8235
8259
  this._boxStyle = value;
8236
8260
  }
8261
+ __getInputData(names, options) {
8262
+ const data = super.__getInputData(names, options);
8263
+ if (data.textEditing) delete data.textEditing;
8264
+ return data;
8265
+ }
8237
8266
  }
8238
8267
 
8239
8268
  class ImageData extends RectData {
@@ -11685,6 +11714,7 @@ function getLeafPaint(attrName, paint, ui) {
11685
11714
  const {boxBounds: boxBounds} = ui.__layout;
11686
11715
  switch (paint.type) {
11687
11716
  case "image":
11717
+ if (!paint.url) return undefined;
11688
11718
  leafPaint = PaintImage.image(ui, attrName, paint, boxBounds, !recycleMap || !recycleMap[paint.url]);
11689
11719
  break;
11690
11720
 
@@ -12025,7 +12055,7 @@ function layout$3(transform, box, x, y, scaleX, scaleY, rotation, skew) {
12025
12055
  translate(transform, box.x + x, box.y + y);
12026
12056
  }
12027
12057
 
12028
- const {get: get$1, scale: scale$2, copy: copy$4} = MatrixHelper;
12058
+ const {get: get$1, scale: scale$1, copy: copy$4} = MatrixHelper;
12029
12059
 
12030
12060
  const {getFloorScale: getFloorScale} = MathHelper, {abs: abs$6} = Math;
12031
12061
 
@@ -12057,7 +12087,7 @@ function createPattern(paint, ui, canvas, renderOptions) {
12057
12087
  scaleY *= getFloorScale(height + (yGap || 0));
12058
12088
  imageMatrix = get$1();
12059
12089
  if (transform) copy$4(imageMatrix, transform);
12060
- scale$2(imageMatrix, 1 / scaleX, 1 / scaleY);
12090
+ scale$1(imageMatrix, 1 / scaleX, 1 / scaleY);
12061
12091
  }
12062
12092
  const imageCanvas = image.getCanvas(width, height, data.opacity, data.filters, xGap, yGap, ui.leafer && ui.leafer.config.smooth);
12063
12093
  const pattern = image.getPattern(imageCanvas, data.repeat || (Platform.origin.noRepeat || "no-repeat"), imageMatrix, paint);
@@ -12089,7 +12119,7 @@ function checkImage(paint, drawImage, ui, canvas, renderOptions) {
12089
12119
  if (data.repeat) {
12090
12120
  drawImage = false;
12091
12121
  } else if (!(originPaint.changeful || Platform.name === "miniapp" && ResizeEvent.isResizing(ui) || exporting)) {
12092
- drawImage = Platform.image.isLarge(image, scaleX, scaleY);
12122
+ drawImage = Platform.image.isLarge(image, scaleX, scaleY) || image.width * scaleX > 8096 || image.height * scaleY > 8096;
12093
12123
  }
12094
12124
  }
12095
12125
  if (drawImage) {
@@ -12148,7 +12178,7 @@ function recycleImage(attrName, data) {
12148
12178
  if (url) {
12149
12179
  if (!recycleMap) recycleMap = {};
12150
12180
  recycleMap[url] = true;
12151
- ImageManager.recycle(image);
12181
+ ImageManager.recyclePaint(paint);
12152
12182
  if (image.loading) {
12153
12183
  if (!input) {
12154
12184
  input = data.__input && data.__input[attrName] || [];
@@ -13172,7 +13202,7 @@ function mergeConfigAttr() {
13172
13202
 
13173
13203
  const {abs: abs$4} = Math;
13174
13204
 
13175
- const {copy: copy$2, scale: scale$1} = MatrixHelper;
13205
+ const {copy: copy$2} = MatrixHelper;
13176
13206
 
13177
13207
  const {setListWithFn: setListWithFn} = BoundsHelper;
13178
13208
 
@@ -13216,19 +13246,10 @@ class Stroker extends UI {
13216
13246
  const aScaleX = abs$4(worldTransform.scaleX), aScaleY = abs$4(worldTransform.scaleY);
13217
13247
  copy$2(matrix$1, worldTransform);
13218
13248
  matrix$1.half = strokeWidth % 2;
13219
- if (aScaleX !== aScaleY) {
13220
- scale$1(matrix$1, 1 / aScaleX, 1 / aScaleY);
13221
- canvas.setWorld(matrix$1, options.matrix);
13222
- canvas.beginPath();
13223
- data.strokeWidth = strokeWidth;
13224
- const {x: x, y: y, width: width, height: height} = leaf.__layout.boxBounds;
13225
- canvas.rect(x * aScaleX, y * aScaleY, width * aScaleX, height * aScaleY);
13226
- } else {
13227
- canvas.setWorld(matrix$1, options.matrix);
13228
- canvas.beginPath();
13229
- if (leaf.__.__useArrow) leaf.__drawPath(canvas); else leaf.__.__pathForRender ? leaf.__drawRenderPath(canvas) : leaf.__drawPathByBox(canvas);
13230
- data.strokeWidth = strokeWidth / abs$4(worldTransform.scaleX);
13231
- }
13249
+ canvas.setWorld(matrix$1, options.matrix);
13250
+ canvas.beginPath();
13251
+ if (leaf.__.__useArrow) leaf.__drawPath(canvas); else leaf.__.__pathForRender ? leaf.__drawRenderPath(canvas) : leaf.__drawPathByBox(canvas);
13252
+ data.strokeWidth = strokeWidth / Math.max(aScaleX, aScaleY);
13232
13253
  if (stroke) isString(stroke) ? Paint.stroke(stroke, this, canvas, options) : Paint.strokes(stroke, this, canvas, options);
13233
13254
  if (fill) isString(fill) ? Paint.fill(fill, this, canvas, options) : Paint.fills(fill, this, canvas, options);
13234
13255
  }