leafer-ui 2.2.11 → 2.3.1

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.
package/README.md CHANGED
@@ -6,9 +6,11 @@
6
6
 
7
7
  轻松实现图形交互与编辑,AI 时代的无限画布引擎
8
8
 
9
- 官网: [leaferjs.com](https://www.leaferjs.com)
9
+ 开源官网: [leaferjs.com](https://www.leaferjs.com)
10
10
 
11
- 森林: [leafer.pro](https://www.leafer.pro)
11
+ 开源森林: [leafer.pro](https://www.leafer.pro)
12
+
13
+ PxGrow: [pxgrow.com](https://www.pxgrow.com)
12
14
 
13
15
  **👉 在浏览器里 “跑得动 100 万个图形” 的 Canvas 引擎**
14
16
  **👉 可以做 “Figma 级编辑器” 的 Canvas 内核**
@@ -120,7 +122,11 @@ leafer.add(rect)
120
122
  - **[PxGrow](https://www.pxgrow.com/) 提供可选商业插件:** 专注于解决**工业级应用**中的复杂业务难题。包括专业编辑器套件、复杂图形算法与性能优化能力,帮助企业节省数月甚至数年的研发投入。
121
123
  - **良性循环与长期主义:** 开发者因开源受益,企业因商业能力提效,而商业支持又持续推动 LeaferJS 的发展与创新,形成开放、透明、可持续的发展循环。
122
124
 
123
- ### LeaferJS 仓库组成一览表
125
+ ### 企业为什么选择 LeaferJS × PxGrow
126
+
127
+ [在线 PPT · 适合团队演示与技术方案评估](https://www.pxgrow.com/presentation)
128
+
129
+ ## LeaferJS 仓库组成一览表
124
130
 
125
131
  | 仓库名称 | 功能描述 | 开源地址 |
126
132
  | :------------ | :--------------------------- | :---------------------------------------------- |
@@ -161,242 +167,15 @@ LeaferJS 是一个持续打磨了五年的原创开源引擎。我们致力于
161
167
 
162
168
  ## 致谢贡献者
163
169
 
170
+ [每一位参与开源森林的创作者](https://www.leafer.pro/#creator)
171
+
164
172
  [每一位贡献代码的社区成员](https://github.com/leaferjs/leafer-ui/graphs/contributors)
165
173
 
166
- [每一位参与生态的社区成员](https://www.leaferjs.com/ui/contribute/)
167
-
168
- ## 赞助商
169
-
170
- <p><h3 align="center">金牌赞助商</h3></p>
171
- <p style="display: flex;flex-wrap: wrap;justify-content: center;gap: 15px;">
172
- <a target="_blank" href="https://yzllq.com/">
173
- <img width="180" title="一个浏览器打开多组账户 - 电商、自媒体、矩阵营销的便捷账户管理方式" src="https://www.leaferjs.com/image/sponsor/gold/yzllq.png" loading="lazy" />
174
- </a>
175
- <a target="_blank" href="https://easysearch.cn">
176
- <img width="180" title="Easysearch - 企业级的分布式搜索型数据库" src="https://www.leaferjs.com/image/sponsor/gold/easysearch.png" loading="lazy" />
177
- </a>
178
- <a target="_blank" href="https://boardos.online">
179
- <img width="180" title="在线实时白板协作系统" src="https://www.leaferjs.com/image/sponsor/gold/boardos.svg" loading="lazy" />
180
- </a>
181
- <a target="_blank" href="https://www.photiu.ai">
182
- <img width="180" title="Photiu" src="https://www.leaferjs.com/image/sponsor/gold/photiu.png" loading="lazy" />
183
- </a>
184
- <a target="_blank" href="https://xpai.design">
185
- <img width="180" title="迅排设计" src="https://www.leaferjs.com/image/sponsor/gold/xp.jpg" loading="lazy" />
186
- </a>
187
- <a target="_blank" href="https://github.com/dromara/yft-design">
188
- <img width="180" title="yft-design" src="https://www.leaferjs.com/image/sponsor/gold/yft.jpg" loading="lazy" />
189
- </a>
190
- <a target="_blank" href="https://www.finclip.com/landing/miniappgame?from=leafer">
191
- <img width="180" title="FinClip" src="https://www.leaferjs.com/image/sponsor/gold/finclip.jpg" loading="lazy" />
192
- </a>
193
- <a target="_blank" href="https://f.style">
194
- <img width="180" title="hiif" src="https://www.leaferjs.com/image/sponsor/gold/hiif.jpg" loading="lazy" />
195
- </a>
196
- <a target="_blank" href="https://www.seafox.cc">
197
- <img width="180" title="seafox" src="https://www.leaferjs.com/image/sponsor/gold/seafox.jpg" loading="lazy" />
198
- </a>
199
- <a target="_blank" href="https://dooring.vip">
200
- <img width="180" title="dooring" src="https://www.leaferjs.com/image/sponsor/gold/dooring.jpg" loading="lazy" />
201
- </a>
202
- <a target="_blank" href="https://pro.kuaitu.cc">
203
- <img width="180" title="快图设计" src="https://www.leaferjs.com/image/sponsor/gold/kuaitu.jpg" loading="lazy" />
204
- </a>
205
- <a target="_blank" href="https://chensuiyi.me">
206
- <img width="180" title="前端之虎陈随易" src="https://www.leaferjs.com/image/sponsor/gold/chensuiyi.jpg" loading="lazy" />
207
- </a>
208
- <a target="_blank" href="http://www.yunform.cn">
209
- <img width="180" title="数据查询录入表单页面制作效率工具" src="https://www.leaferjs.com/image/sponsor/gold/yunform.svg" loading="lazy" />
210
- </a>
211
- <a target="_blank" href="https://www.pxgrow.com/vip/logo/">
212
- <img width="180" title="赞助我们" src="https://www.leaferjs.com/image/sponsor/gold/add.jpg" loading="lazy" />
213
- </a>
214
- </p>
215
-
216
- <p><h3 align="center">银牌赞助</h3></p>
217
- <p style="display: flex;flex-wrap: wrap;justify-content: center;gap: 5px;">
218
- <a target="_blank" href="">
219
- <img width="40" title="怜生" src="https://www.pxgrow.com/image/user/default/3.jpg" loading="lazy" />
220
- </a>
221
- <a target="_blank" href="https://pro.kuaitu.cc">
222
- <img width="40" title="快图设计" src="https://www.pxgrow.com/image/user/default/7.jpg" loading="lazy" />
223
- </a>
224
- <a target="_blank" href="">
225
- <img width="40" title="black" src="https://api.pxgrow.com/uploads/avatar/249/AzA/4v/u.jpg" loading="lazy" />
226
- </a>
227
- <a target="_blank" href="">
228
- <img width="40" title="ARAM" src="https://api.pxgrow.com/uploads/avatar/3Pv/P26/zw/u.jpg" loading="lazy" />
229
- </a>
230
- <a target="_blank" href="">
231
- <img width="40" title="Winning" src="https://www.pxgrow.com/image/user/default/4.jpg" loading="lazy" />
232
- </a>
233
- <a target="_blank" href="">
234
- <img width="40" title="刘洋" src="https://www.pxgrow.com/image/user/default/2.jpg" loading="lazy" />
235
- </a>
236
- <a target="_blank" href="">
237
- <img width="40" title="张老爷" src="https://api.pxgrow.com/uploads/avatar/76z/6wz/Px/u.jpg" loading="lazy" />
238
- </a>
239
- <a target="_blank" href="">
240
- <img width="40" title="KevinJiaCN" src="https://www.pxgrow.com/image/user/default/3.jpg" loading="lazy" />
241
- </a>
242
- <a target="_blank" href="">
243
- <img width="40" title="goosen" src="https://www.pxgrow.com/image/sponsor/user/122.jpeg" loading="lazy" />
244
- </a>
245
- <a target="_blank" href="">
246
- <img width="40" title="dev_chen" src="https://www.pxgrow.com/image/sponsor/user/137.jpg" loading="lazy" />
247
- </a>
248
- <a target="_blank" href="frameelf">
249
- <img width="40" title="o" src="https://api.pxgrow.com/uploads/avatar/3Pv/P2S/ww/u.jpg" loading="lazy" />
250
- </a>
251
- <a target="_blank" href="">
252
- <img width="40" title="Y" src="https://www.pxgrow.com/image/sponsor/user/131.jpg" loading="lazy" />
253
- </a>
254
- <a target="_blank" href="https://github.com/daodaolee">
255
- <img width="40" title="道里" src="https://www.pxgrow.com/image/sponsor/user/108.jpg" loading="lazy" />
256
- </a>
257
- <a target="_blank" href="">
258
- <img width="40" title="dong" src="https://www.pxgrow.com/image/sponsor/user/yellow.png" loading="lazy" />
259
- </a>
260
- <a target="_blank" href="">
261
- <img width="40" title="三一" src="https://www.pxgrow.com/image/sponsor/user/151.jpeg" loading="lazy" />
262
- </a>
263
- <a target="_blank" href="https://www.fastadmin.net">
264
- <img width="40" title="F4nniu" src="https://api.pxgrow.com/uploads/avatar/3Pv/P26/P3/u.jpg" loading="lazy" />
265
- </a>
266
- <a target="_blank" href="">
267
- <img width="40" title="风之影" src="https://www.pxgrow.com/image/sponsor/user/81.jpg" loading="lazy" />
268
- </a>
269
- <a target="_blank" href="">
270
- <img width="40" title="😊" src="https://www.pxgrow.com/image/sponsor/user/79.jpg" loading="lazy" />
271
- </a>
272
- <a target="_blank" href="https://pro.kuaitu.cc/">
273
- <img width="40" title="快图设计" src="https://www.pxgrow.com/image/sponsor/user/72.jpg" loading="lazy" />
274
- </a>
275
- <a target="_blank" href="">
276
- <img width="40" title="ycteng" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
277
- </a>
278
- <a target="_blank" href="https://afdian.com/a/herobeast">
279
- <img width="40" title="herobeast" src="https://www.pxgrow.com/image/sponsor/user/63.jpeg" loading="lazy" />
280
- </a>
281
- <a target="_blank" href="">
282
- <img width="40" title="Evel" src="https://www.pxgrow.com/image/sponsor/user/62.jpeg" loading="lazy" />
283
- </a>
284
- <a target="_blank" href="">
285
- <img width="40" title="icezeros" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
286
- </a>
287
- <a target="_blank" href="">
288
- <img width="40" title="林伟强@青柠设计" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
289
- </a>
290
- <a target="_blank" href="https://github.com/Misakey-Mikoto">
291
- <img width="40" title="misakey" src="https://www.pxgrow.com/image/sponsor/user/orange.png" loading="lazy" />
292
- </a>
293
- <a target="_blank" href="">
294
- <img width="40" title="junna" src="https://www.pxgrow.com/image/sponsor/user/57.jpeg" loading="lazy" />
295
- </a>
296
- <a target="_blank" href="http://www.nickspace.cn">
297
- <img width="40" title="NickSpace" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
298
- </a>
299
- <a target="_blank" href="https://afdian.com/a/ziiziz">
300
- <img width="40" title="YGG" src="https://www.pxgrow.com/image/sponsor/user/55.jpeg" loading="lazy" />
301
- </a>
302
- <a target="_blank" href="">
303
- <img width="40" title="tony" src="https://www.pxgrow.com/image/sponsor/user/51.jpeg" loading="lazy" />
304
- </a>
305
- <a target="_blank" href="">
306
- <img width="40" title="lk" src="https://api.pxgrow.com/uploads/avatar/39A/334/wC/u.jpg" loading="lazy" />
307
- </a>
308
- <a target="_blank" href="">
309
- <img width="40" title="用户z89CSwv9" src="https://www.pxgrow.com/image/user/default/2.jpg" loading="lazy" />
310
- </a>
311
- <a target="_blank" href="">
312
- <img width="40" title="南" src="https://www.pxgrow.com/image/sponsor/user/purple.png" loading="lazy" />
313
- </a>
314
- <a target="_blank" href="">
315
- <img width="40" title=".." src="https://www.pxgrow.com/image/sponsor/user/44.jpg" loading="lazy" />
316
- </a>
317
- <a target="_blank" href="">
318
- <img width="40" title="__tynam" src="https://www.pxgrow.com/image/sponsor/user/43.jpg" loading="lazy" />
319
- </a>
320
- <a target="_blank" href="https://github.com/zhixiaotong">
321
- <img width="40" title="知晓同丶" src="https://www.pxgrow.com/image/sponsor/user/42.png" loading="lazy" />
322
- </a>
323
- <a target="_blank" href="">
324
- <img width="40" title="馒头" src="https://www.pxgrow.com/image/sponsor/user/41.jpeg" loading="lazy" />
325
- </a>
326
- <a target="_blank" href="">
327
- <img width="40" title="刘杨" src="https://www.pxgrow.com/image/sponsor/user/26.jpeg" loading="lazy" />
328
- </a>
329
- <a target="_blank" href="">
330
- <img width="40" title="Biu" src="https://www.pxgrow.com/image/sponsor/user/32.jpeg" loading="lazy" />
331
- </a>
332
- <a target="_blank" href="https://www.leaferjs.com">
333
- <img width="40" title="Leafer" src="https://www.pxgrow.com/image/sponsor/user/4.jpeg" loading="lazy" />
334
- </a>
335
- <a target="_blank" href="">
336
- <img width="40" title="sunboy" src="https://www.pxgrow.com/image/sponsor/user/36.jpeg" loading="lazy" />
337
- </a>
338
- <a target="_blank" href="">
339
- <img width="40" title="张恒来啦" src="https://www.pxgrow.com/image/sponsor/user/35.jpeg" loading="lazy" />
340
- </a>
341
- <a target="_blank" href="">
342
- <img width="40" title="呆若牦牛" src="https://www.pxgrow.com/image/sponsor/user/34.jpeg" loading="lazy" />
343
- </a>
344
- <a target="_blank" href="">
345
- <img width="40" title="艳霞" src="https://www.pxgrow.com/image/sponsor/user/33.jpeg" loading="lazy" />
346
- </a>
347
- <a target="_blank" href="">
348
- <img width="40" title="skywalker512" src="https://www.pxgrow.com/image/sponsor/user/21.jpeg" loading="lazy" />
349
- </a>
350
- <a target="_blank" href="https://www.u-tools.cn/plugins/detail/%E6%88%AA%E5%9B%BE%E5%B7%A5%E5%85%B7%20Plus/index.html">
351
- <img width="40" title="xiaou@截图工具" src="https://www.pxgrow.com/image/sponsor/user/135.png" loading="lazy" />
352
- </a>
353
- <a target="_blank" href="">
354
- <img width="40" title="黄鸭梨" src="https://www.pxgrow.com/image/sponsor/user/yellow.png" loading="lazy" />
355
- </a>
356
- <a target="_blank" href="">
357
- <img width="40" title="子洋" src="https://www.pxgrow.com/image/sponsor/user/17.jpeg" loading="lazy" />
358
- </a>
359
- <a target="_blank" href="">
360
- <img width="40" title="一只胖憨憨" src="https://api.pxgrow.com/uploads/avatar/249/AzA/32/u.jpg" loading="lazy" />
361
- </a>
362
- <a target="_blank" href="danshen.me">
363
- <img width="40" title="channely" src="https://www.pxgrow.com/image/sponsor/user/15.jpeg" loading="lazy" />
364
- </a>
365
- <a target="_blank" href="">
366
- <img width="40" title="ibryang" src="https://www.pxgrow.com/image/user/default/2.jpg" loading="lazy" />
367
- </a>
368
- <a target="_blank" href="">
369
- <img width="40" title="用户3PvP2Sxw" src="https://www.pxgrow.com/image/user/default/2.jpg" loading="lazy" />
370
- </a>
371
- <a target="_blank" href="">
372
- <img width="40" title="kooriookami" src="https://www.pxgrow.com/image/user/default/3.jpg" loading="lazy" />
373
- </a>
374
- <a target="_blank" href="">
375
- <img width="40" title="毛豆花生" src="https://www.pxgrow.com/image/sponsor/user/8.jpeg" loading="lazy" />
376
- </a>
377
- <a target="_blank" href="https://afdian.com/a/programschool">
378
- <img width="40" title="编程学院" src="https://www.pxgrow.com/image/sponsor/user/7.jpg" loading="lazy" />
379
- </a>
380
- <a target="_blank" href="https://afdian.com/u/8230187ef5a811eeba2d5254001e7c00">
381
- <img width="40" title="Jikun" src="https://www.pxgrow.com/image/sponsor/user/5.jpeg" loading="lazy" />
382
- </a>
383
- <a target="_blank" href="">
384
- <img width="40" title="robot" src="https://www.pxgrow.com/image/sponsor/user/29.jpeg" loading="lazy" />
385
- </a>
386
- <a target="_blank" href="">
387
- <img width="40" title="黄某人" src="https://www.pxgrow.com/image/user/default/3.jpg" loading="lazy" />
388
- </a>
389
- <a target="_blank" href="">
390
- <img width="40" title="爱发电用户_xugk" src="https://www.pxgrow.com/image/sponsor/user/yellow.png" loading="lazy" />
391
- </a>
392
- <a target="_blank" href="https://www.pxgrow.com/vip/logo/">
393
- <img width="40" title="赞助我们" src="https://www.leaferjs.com/image/sponsor/silver/add.jpg" loading="lazy" />
394
- </a>
395
- </p>
396
-
397
- <p><h3 align="center">铜牌赞助</h3></p>
398
- <p style="display: flex;flex-wrap: wrap;justify-content: center;gap: 15px;">
399
- parox2014 &nbsp;&nbsp;QGG &nbsp;&nbsp;小白不白 &nbsp;&nbsp;用户zw8T394C &nbsp;&nbsp;用户zw8T398C &nbsp;&nbsp;龙眼吃多了上火 &nbsp;&nbsp;用户zw8T392T &nbsp;&nbsp;用户z89CSw69 &nbsp;&nbsp;用户CzP9SCAz &nbsp;&nbsp;Kim &nbsp;&nbsp;用户249AzA8v &nbsp;&nbsp;l0f5c7bf &nbsp;&nbsp;夏先生 &nbsp;&nbsp;yinuo &nbsp;&nbsp;用户3wTwAz78 &nbsp;&nbsp;用户zw8T39zT &nbsp;&nbsp;用户249AzA82 &nbsp;&nbsp;用户CzP9SCvz &nbsp;&nbsp;用户39A334xT &nbsp;&nbsp;用户3wTwAz3x &nbsp;&nbsp;用户zw8T39zC &nbsp;&nbsp;稀饭、微凉 &nbsp;&nbsp;用户CzP9SCT4 &nbsp;&nbsp;便宜VPS服务器 &nbsp;&nbsp;菲鸽 &nbsp;&nbsp;szhua &nbsp;&nbsp;Cheng &nbsp;&nbsp;Suezp &nbsp;&nbsp;beyond &nbsp;&nbsp;用户3PvP2S63 &nbsp;&nbsp;o &nbsp;&nbsp;Arvin &nbsp;&nbsp;finallycc &nbsp;&nbsp;用户39A3346C &nbsp;&nbsp;大雷 &nbsp;&nbsp;用户CzP9SC4z &nbsp;&nbsp;随风 &nbsp;&nbsp;用户z89CSwT9 &nbsp;&nbsp;用户3wTwAzCx &nbsp;&nbsp;UPMuling &nbsp;&nbsp;军杨 &nbsp;&nbsp;桔子雨工作室 &nbsp;&nbsp;用户zw8T37xC &nbsp;&nbsp;前端炒饭仔 &nbsp;&nbsp;用户z89CSw46 &nbsp;&nbsp;崮生 &nbsp;&nbsp;互动矩阵 &nbsp;&nbsp;ZhanYoHo &nbsp;&nbsp;何佳Q &nbsp;&nbsp;coderhyh &nbsp;&nbsp;早上好啊 &nbsp;&nbsp;快图设计 &nbsp;&nbsp;do &nbsp;&nbsp;毛哥哥 &nbsp;&nbsp;迅排设计 &nbsp;&nbsp;用户z89CSw86 &nbsp;&nbsp;糖果 &nbsp;&nbsp;南城以北 &nbsp;&nbsp;黑色摩天仑 &nbsp;&nbsp;Charm &nbsp;&nbsp;Lauginwing &nbsp;&nbsp;在路上 &nbsp;&nbsp;Jerry &nbsp;&nbsp;张余🌈 &nbsp;&nbsp;李狗嗨。💢 &nbsp;&nbsp;用户zw8T376T &nbsp;&nbsp;用户249AzA2v &nbsp;&nbsp;ʚ LMT ɞ &nbsp;&nbsp;格子 &nbsp;&nbsp;等等 &nbsp;&nbsp;goosen &nbsp;&nbsp;F4nniu &nbsp;&nbsp;梁福斌 &nbsp;&nbsp;江万江 &nbsp;&nbsp;杨超 &nbsp;&nbsp;ToB Dev &nbsp;&nbsp;前端之虎陈随易 &nbsp;&nbsp;A☀️云☀️A &nbsp;&nbsp;zhk &nbsp;&nbsp;爱发电用户_c9c82 &nbsp;&nbsp;轻简历 &nbsp;&nbsp;爱发电用户_0fac0 &nbsp;&nbsp;wangyesheji.cn &nbsp;&nbsp;风间 &nbsp;&nbsp;爱发电用户_Tqsm &nbsp;&nbsp;爱发电用户_6KpE &nbsp;&nbsp;星小志 &nbsp;&nbsp;zwm &nbsp;&nbsp;爱发电用户_3725c &nbsp;&nbsp;Noth1ng &nbsp;&nbsp;纳西妲の√ &nbsp;&nbsp;爱发电用户_Ahb9 &nbsp;&nbsp;爱发电用户_7617d &nbsp;&nbsp;冷漠 &nbsp;&nbsp;爱发电用户_9RXB &nbsp;&nbsp;今日值得读 &nbsp;&nbsp;爱发电用户_49sT &nbsp;&nbsp;爱发电用户_NFCS &nbsp;&nbsp;爱发电用户_43ad8 &nbsp;&nbsp;爱发电用户_30455 &nbsp;&nbsp;砖吐筷筷 &nbsp;&nbsp;xiaozhang &nbsp;&nbsp;爱发电用户_b47b3 &nbsp;&nbsp;longbow1998 &nbsp;&nbsp;爱发电用户_5d755 &nbsp;&nbsp;爱发电用户_b76b8 &nbsp;&nbsp;爱发电用户_e70c2 &nbsp;&nbsp;xiaou@截图工具 &nbsp;&nbsp;ousiri &nbsp;&nbsp;爱发电用户_039dc &nbsp;&nbsp;花祁 &nbsp;&nbsp;爱发电用户_99f39 &nbsp;&nbsp;坤坤 &nbsp;&nbsp;爱发电用户_X6hp &nbsp;&nbsp;ycteng &nbsp;&nbsp;曹吉美爸爸 &nbsp;&nbsp;啸沧海 &nbsp;&nbsp;Ronny &nbsp;&nbsp;爱发电用户_UXEV &nbsp;&nbsp;Biu &nbsp;&nbsp;王志强 &nbsp;&nbsp;SaltedFish &nbsp;&nbsp;爱发电用户_76f9d &nbsp;&nbsp;PD.新城คิดถึง &nbsp;&nbsp;糖颂缘冥倾 &nbsp;&nbsp;ALBERT. &nbsp;&nbsp;爱发电用户_Pbm7 &nbsp;&nbsp;Leafer &nbsp;&nbsp;赞助我们 &nbsp;&nbsp;</p>
174
+ [早期参与生态的社区成员](https://www.leaferjs.com/ui/contribute/)
175
+
176
+ ## 致谢赞助商
177
+
178
+ [每一位参与赞助过我们的用户](https://www.leaferjs.com/#footer-sponsor)
400
179
 
401
180
  ## License
402
181
 
package/dist/web.js CHANGED
@@ -433,7 +433,7 @@ var LeaferUI = function(exports) {
433
433
  };
434
434
  }
435
435
  const {sin: sin$5, cos: cos$5, acos: acos, sqrt: sqrt$3} = Math;
436
- const {float: float$3} = MathHelper;
436
+ const {float: float$4} = MathHelper;
437
437
  const tempPoint$5 = {};
438
438
  function getWorld() {
439
439
  return Object.assign(Object.assign(Object.assign({}, getMatrixData()), getBoundsData()), {
@@ -681,12 +681,12 @@ var LeaferUI = function(exports) {
681
681
  const cosR = c / scaleY;
682
682
  rotation = PI_2 - (d > 0 ? acos(-cosR) : -acos(cosR));
683
683
  }
684
- const cosR = float$3(cos$5(rotation));
684
+ const cosR = float$4(cos$5(rotation));
685
685
  const sinR = sin$5(rotation);
686
- scaleX = float$3(scaleX), scaleY = float$3(scaleY);
687
- skewX = cosR ? float$3((c / scaleY + sinR) / cosR / OneRadian, 9) : 0;
688
- skewY = cosR ? float$3((b / scaleX - sinR) / cosR / OneRadian, 9) : 0;
689
- rotation = float$3(rotation / OneRadian);
686
+ scaleX = float$4(scaleX), scaleY = float$4(scaleY);
687
+ skewX = cosR ? float$4((c / scaleY + sinR) / cosR / OneRadian, 9) : 0;
688
+ skewY = cosR ? float$4((b / scaleX - sinR) / cosR / OneRadian, 9) : 0;
689
+ rotation = float$4(rotation / OneRadian);
690
690
  } else {
691
691
  scaleX = a;
692
692
  scaleY = d;
@@ -728,7 +728,7 @@ var LeaferUI = function(exports) {
728
728
  }
729
729
  };
730
730
  const M$6 = MatrixHelper;
731
- const {float: float$2} = MathHelper;
731
+ const {float: float$3} = MathHelper;
732
732
  const {toInnerPoint: toInnerPoint$2, toOuterPoint: toOuterPoint$3} = MatrixHelper;
733
733
  const {sin: sin$4, cos: cos$4, abs: abs$6, sqrt: sqrt$2, atan2: atan2$2, min: min$2, round: round$2} = Math;
734
734
  const PointHelper = {
@@ -871,7 +871,7 @@ var LeaferUI = function(exports) {
871
871
  return points;
872
872
  },
873
873
  isSame(t, point, quick) {
874
- return quick ? t.x === point.x && t.y === point.y : float$2(t.x) === float$2(point.x) && float$2(t.y) === float$2(point.y);
874
+ return quick ? t.x === point.x && t.y === point.y : float$3(t.x) === float$3(point.x) && float$3(t.y) === float$3(point.y);
875
875
  },
876
876
  reset(t) {
877
877
  t.x = t.y = 0;
@@ -1206,7 +1206,7 @@ var LeaferUI = function(exports) {
1206
1206
  };
1207
1207
  const {tempPointBounds: tempPointBounds$1, setPoint: setPoint$2, addPoint: addPoint$2, toBounds: toBounds$2} = TwoPointBoundsHelper;
1208
1208
  const {toOuterPoint: toOuterPoint$2} = MatrixHelper;
1209
- const {float: float$1, fourNumber: fourNumber} = MathHelper;
1209
+ const {float: float$2, fourNumber: fourNumber} = MathHelper;
1210
1210
  const {floor: floor$1, ceil: ceil$1} = Math;
1211
1211
  let right$1, bottom$1, boundsRight, boundsBottom;
1212
1212
  const point = {};
@@ -1375,10 +1375,10 @@ var LeaferUI = function(exports) {
1375
1375
  }
1376
1376
  },
1377
1377
  float(t, maxLength) {
1378
- t.x = float$1(t.x, maxLength);
1379
- t.y = float$1(t.y, maxLength);
1380
- t.width = float$1(t.width, maxLength);
1381
- t.height = float$1(t.height, maxLength);
1378
+ t.x = float$2(t.x, maxLength);
1379
+ t.y = float$2(t.y, maxLength);
1380
+ t.width = float$2(t.width, maxLength);
1381
+ t.height = float$2(t.height, maxLength);
1382
1382
  },
1383
1383
  add(t, bounds, isPoint) {
1384
1384
  right$1 = t.x + t.width;
@@ -3516,6 +3516,7 @@ var LeaferUI = function(exports) {
3516
3516
  const {M: M, L: L$1, Z: Z} = PathCommandMap;
3517
3517
  const {getCenterX: getCenterX, getCenterY: getCenterY} = PointHelper;
3518
3518
  const {arcTo: arcTo} = PathCommandDataHelper;
3519
+ const {float: float$1} = MathHelper;
3519
3520
  const PathCorner = {
3520
3521
  smooth(data, cornerRadius, _cornerSmoothing) {
3521
3522
  let command, lastCommand, commandLen, startXIndex, startYIndex, smoothLen;
@@ -3556,7 +3557,8 @@ var LeaferUI = function(exports) {
3556
3557
  break;
3557
3558
 
3558
3559
  case Z:
3559
- arcTo(smooth, x, y, startX, startY, cornerRadius, lastX, lastY, three);
3560
+ if (float$1(x) === float$1(startX) && float$1(y) === float$1(startY)) x = lastX,
3561
+ y = lastY; else arcTo(smooth, x, y, startX, startY, cornerRadius, lastX, lastY, three);
3560
3562
  break;
3561
3563
 
3562
3564
  default:
@@ -4718,10 +4720,11 @@ var LeaferUI = function(exports) {
4718
4720
  hasOffset(t) {
4719
4721
  return t.offsetX || t.offsetY;
4720
4722
  },
4721
- hasParent(p, parent) {
4723
+ hasParent(p, parent, minLevel) {
4722
4724
  if (!parent) return false;
4723
4725
  while (p) {
4724
4726
  if (parent === p) return true;
4727
+ if (minLevel && p.__level === minLevel) return;
4725
4728
  p = p.parent;
4726
4729
  }
4727
4730
  },
@@ -4738,6 +4741,9 @@ var LeaferUI = function(exports) {
4738
4741
  onAnimate && onAnimate();
4739
4742
  }
4740
4743
  };
4744
+ function isTrackChanges(leafer) {
4745
+ return leafer && leafer.config.trackChanges;
4746
+ }
4741
4747
  const L = LeafHelper;
4742
4748
  const {updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$1, updateAllWorldOpacity: updateAllWorldOpacity, updateAllChange: updateAllChange$1, updateChange: updateChange} = L;
4743
4749
  function getTempLocal(t, worldPoint) {
@@ -4785,6 +4791,16 @@ var LeaferUI = function(exports) {
4785
4791
  sort(a, b) {
4786
4792
  return a.__.zIndex === b.__.zIndex ? a.__tempNumber - b.__tempNumber : a.__.zIndex - b.__.zIndex;
4787
4793
  },
4794
+ zIndex(branch, child, index) {
4795
+ const {children: children} = branch, before = children[index - 1], after = children[index];
4796
+ if (before && after) {
4797
+ if (child.zIndex < before.zIndex || child.zIndex > after.zIndex) child.zIndex = (before.zIndex + after.zIndex) / 2;
4798
+ } else if (before) {
4799
+ if (child.zIndex < before.zIndex) child.zIndex = before.zIndex + 1;
4800
+ } else if (after) {
4801
+ if (child.zIndex > after.zIndex) child.zIndex = after.zIndex - 1;
4802
+ }
4803
+ },
4788
4804
  pushAllChildBranch(branch, leafList) {
4789
4805
  branch.__tempNumber = 1;
4790
4806
  if (branch.__.__childBranchNumber) {
@@ -5669,7 +5685,7 @@ var LeaferUI = function(exports) {
5669
5685
  },
5670
5686
  emitPropertyEvent(type, name, oldValue, newValue) {
5671
5687
  const {leafer: leafer} = this;
5672
- if (leafer.config.trackChanges || leafer.zoomLayer === this) {
5688
+ if (isTrackChanges(leafer) || leafer.zoomLayer === this) {
5673
5689
  const event = new PropertyEvent(type, this, name, oldValue, newValue);
5674
5690
  this.isLeafer || this.hasEvent(type) && this.emitEvent(event);
5675
5691
  leafer.emitEvent(event);
@@ -6105,7 +6121,6 @@ var LeaferUI = function(exports) {
6105
6121
  }
6106
6122
  }
6107
6123
  __bindFrame(frame) {
6108
- if (this.isFrame && frame !== null) frame = this;
6109
6124
  this.frame = frame;
6110
6125
  if (this.isBranch) {
6111
6126
  const {children: children} = this;
@@ -6138,6 +6153,7 @@ var LeaferUI = function(exports) {
6138
6153
  this.__layout.update();
6139
6154
  }
6140
6155
  forceUpdate(typeOrAttrName) {
6156
+ if (this.__hasComplex) LeafHelper.updateComplex(this);
6141
6157
  let quick;
6142
6158
  if (!typeOrAttrName || typeOrAttrName === "bounds") doBoundsType(this), quick = true; else if (typeOrAttrName === "surface") doSurfaceType(this),
6143
6159
  quick = true; else if (typeOrAttrName === "stroke") doStrokeType(this), quick = true;
@@ -6410,14 +6426,17 @@ var LeaferUI = function(exports) {
6410
6426
  }
6411
6427
  if (child.parent) child.parent.remove(child);
6412
6428
  child.parent = this;
6413
- noIndex ? this.children.push(child) : this.children.splice(index, 0, child);
6429
+ if (noIndex) this.children.push(child); else {
6430
+ BranchHelper.zIndex(this, child, index);
6431
+ this.children.splice(index, 0, child);
6432
+ }
6414
6433
  if (child.isBranch) this.__.__childBranchNumber = (this.__.__childBranchNumber || 0) + 1;
6415
6434
  const childLayout = child.__layout;
6416
6435
  childLayout.boxChanged || childLayout.boxChange();
6417
6436
  childLayout.matrixChanged || childLayout.matrixChange();
6418
6437
  if (child.__parentChange) child.__parentChange.forEach(item => item(this, child));
6419
6438
  if (child.__bubbleMap) child.__emitLifeEvent(ChildEvent.ADD);
6420
- if (this.isFrame) child.__bindFrame(this);
6439
+ if (this.frame) child.__bindFrame(this.frame);
6421
6440
  if (this.leafer) {
6422
6441
  child.__bindLeafer(this.leafer);
6423
6442
  if (this.leafer.created) this.__emitChildEvent(ChildEvent.ADD, child);
@@ -6477,11 +6496,11 @@ var LeaferUI = function(exports) {
6477
6496
  if (this.leafer.hitCanvasManager) this.leafer.hitCanvasManager.clear();
6478
6497
  }
6479
6498
  }
6480
- if (this.isFrame) child.__bindFrame(null);
6499
+ if (child.frame && !child.isFrame) child.__bindFrame(null);
6481
6500
  }
6482
6501
  __emitChildEvent(type, child) {
6483
6502
  const {leafer: leafer} = this;
6484
- if (leafer.config.trackChanges || leafer.zoomLayer === this) {
6503
+ if (isTrackChanges(leafer) || leafer.zoomLayer === this) {
6485
6504
  const event = new ChildEvent(type, child, this);
6486
6505
  if (this.hasEvent(type) && !this.isLeafer) this.emitEvent(event);
6487
6506
  leafer.emitEvent(event);
@@ -6634,7 +6653,12 @@ var LeaferUI = function(exports) {
6634
6653
  this.levelMap = null;
6635
6654
  }
6636
6655
  }
6637
- const version = "2.2.11";
6656
+ const version = "2.3.1";
6657
+ if (typeof globalThis !== "undefined") {
6658
+ const globalLeafer = globalThis.Leafer || (globalThis.Leafer = {});
6659
+ globalLeafer.version = version;
6660
+ globalLeafer.Plugin = Plugin;
6661
+ }
6638
6662
  const debug$5 = Debug.get("LeaferCanvas");
6639
6663
  class LeaferCanvas extends LeaferCanvasBase {
6640
6664
  set zIndex(zIndex) {
@@ -7742,6 +7766,16 @@ var LeaferUI = function(exports) {
7742
7766
  });
7743
7767
  };
7744
7768
  }
7769
+ function frameType() {
7770
+ return (target, key) => {
7771
+ defineKey(target, key, {
7772
+ set(_value) {},
7773
+ get() {
7774
+ return this;
7775
+ }
7776
+ });
7777
+ };
7778
+ }
7745
7779
  function createAttr(defaultValue) {
7746
7780
  return (target, key) => {
7747
7781
  defineKey(target, key, createDescriptor(key, defaultValue));
@@ -8994,6 +9028,7 @@ var LeaferUI = function(exports) {
8994
9028
  return true;
8995
9029
  }
8996
9030
  };
9031
+ __decorate([ frameType() ], exports.Frame.prototype, "frame", void 0);
8997
9032
  __decorate([ dataProcessor(FrameData) ], exports.Frame.prototype, "__", void 0);
8998
9033
  __decorate([ surfaceType("#FFFFFF") ], exports.Frame.prototype, "fill", void 0);
8999
9034
  __decorate([ affectRenderBoundsType("hide") ], exports.Frame.prototype, "overflow", void 0);
@@ -12868,6 +12903,7 @@ var LeaferUI = function(exports) {
12868
12903
  exports.emptyData = emptyData;
12869
12904
  exports.eraserType = eraserType;
12870
12905
  exports.extraPropertyEventMap = extraPropertyEventMap;
12906
+ exports.frameType = frameType;
12871
12907
  exports.getBoundsData = getBoundsData;
12872
12908
  exports.getDescriptor = getDescriptor;
12873
12909
  exports.getMatrixData = getMatrixData;
@@ -12881,6 +12917,7 @@ var LeaferUI = function(exports) {
12881
12917
  exports.isNumber = isNumber;
12882
12918
  exports.isObject = isObject;
12883
12919
  exports.isString = isString;
12920
+ exports.isTrackChanges = isTrackChanges;
12884
12921
  exports.isUndefined = isUndefined;
12885
12922
  exports.layoutProcessor = layoutProcessor;
12886
12923
  exports.leaferTransformAttrMap = leaferTransformAttrMap;