@visactor/vrender-core 0.22.13 → 0.22.15-alpha.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.
Files changed (441) hide show
  1. package/cjs/animate/config.d.ts +1 -2
  2. package/cjs/animate/config.js +1 -5
  3. package/cjs/animate/config.js.map +1 -1
  4. package/cjs/application.d.ts +2 -1
  5. package/cjs/application.js.map +1 -1
  6. package/cjs/canvas/constants.js +1 -2
  7. package/cjs/canvas/empty-context.d.ts +1 -0
  8. package/cjs/canvas/empty-context.js +4 -0
  9. package/cjs/canvas/empty-context.js.map +1 -1
  10. package/cjs/color-string/interpolate.d.ts +1 -0
  11. package/cjs/color-string/interpolate.js +12 -4
  12. package/cjs/color-string/interpolate.js.map +1 -1
  13. package/cjs/color-string/store.js +2 -1
  14. package/cjs/common/custom-path2d.js +2 -2
  15. package/cjs/common/custom-path2d.js.map +1 -1
  16. package/cjs/common/diff.d.ts +1 -0
  17. package/cjs/common/diff.js +19 -0
  18. package/cjs/common/diff.js.map +1 -0
  19. package/cjs/common/enums.d.ts +0 -16
  20. package/cjs/common/enums.js +2 -11
  21. package/cjs/common/enums.js.map +1 -1
  22. package/cjs/common/morphing-utils.js +32 -124
  23. package/cjs/common/morphing-utils.js.map +1 -1
  24. package/cjs/common/performance-raf.d.ts +8 -0
  25. package/cjs/common/performance-raf.js +32 -0
  26. package/cjs/common/performance-raf.js.map +1 -0
  27. package/cjs/common/polygon.js +5 -2
  28. package/cjs/common/polygon.js.map +1 -1
  29. package/cjs/common/segment/curve/cubic-bezier.d.ts +1 -2
  30. package/cjs/common/segment/curve/cubic-bezier.js +3 -8
  31. package/cjs/common/segment/curve/cubic-bezier.js.map +1 -1
  32. package/cjs/common/segment/curve/quadratic-bezier.d.ts +1 -0
  33. package/cjs/common/segment/curve/quadratic-bezier.js +10 -3
  34. package/cjs/common/segment/curve/quadratic-bezier.js.map +1 -1
  35. package/cjs/common/segment/index.d.ts +1 -0
  36. package/cjs/common/segment/index.js +1 -1
  37. package/cjs/common/segment/index.js.map +1 -1
  38. package/cjs/common/shape/arc.d.ts +1 -1
  39. package/cjs/common/shape/arc.js +7 -3
  40. package/cjs/common/shape/arc.js.map +1 -1
  41. package/cjs/common/simplify.js +1 -2
  42. package/cjs/common/sort.js +1 -1
  43. package/cjs/common/split-path.js +2 -2
  44. package/cjs/common/split-path.js.map +1 -1
  45. package/cjs/common/store.js +1 -1
  46. package/cjs/common/text.js +1 -1
  47. package/cjs/common/utils.d.ts +0 -2
  48. package/cjs/common/utils.js +5 -9
  49. package/cjs/common/utils.js.map +1 -1
  50. package/cjs/core/application.js +1 -1
  51. package/cjs/core/camera.js +1 -1
  52. package/cjs/core/global.d.ts +3 -0
  53. package/cjs/core/global.js +14 -3
  54. package/cjs/core/global.js.map +1 -1
  55. package/cjs/core/stage.d.ts +8 -3
  56. package/cjs/core/stage.js +34 -20
  57. package/cjs/core/stage.js.map +1 -1
  58. package/cjs/graphic/arc.d.ts +1 -2
  59. package/cjs/graphic/arc.js +3 -2
  60. package/cjs/graphic/arc.js.map +1 -1
  61. package/cjs/graphic/area.d.ts +1 -2
  62. package/cjs/graphic/area.js +4 -1
  63. package/cjs/graphic/area.js.map +1 -1
  64. package/cjs/graphic/circle.d.ts +1 -2
  65. package/cjs/graphic/circle.js +5 -2
  66. package/cjs/graphic/circle.js.map +1 -1
  67. package/cjs/graphic/config.js +2 -1
  68. package/cjs/graphic/config.js.map +1 -1
  69. package/cjs/graphic/graphic-service/graphic-module.js +1 -2
  70. package/cjs/graphic/graphic-service/graphic-module.js.map +1 -1
  71. package/cjs/graphic/graphic-service/graphic-service.js +2 -3
  72. package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
  73. package/cjs/graphic/graphic.d.ts +9 -12
  74. package/cjs/graphic/graphic.js +48 -105
  75. package/cjs/graphic/graphic.js.map +1 -1
  76. package/cjs/graphic/group.js +8 -8
  77. package/cjs/graphic/group.js.map +1 -1
  78. package/cjs/graphic/line.d.ts +1 -2
  79. package/cjs/graphic/line.js +5 -1
  80. package/cjs/graphic/line.js.map +1 -1
  81. package/cjs/graphic/rect.js +5 -2
  82. package/cjs/graphic/rect.js.map +1 -1
  83. package/cjs/graphic/richtext/icon.d.ts +1 -1
  84. package/cjs/graphic/richtext/icon.js.map +1 -1
  85. package/cjs/graphic/richtext/paragraph.js +2 -2
  86. package/cjs/graphic/richtext/paragraph.js.map +1 -1
  87. package/cjs/graphic/star.d.ts +1 -2
  88. package/cjs/graphic/star.js +4 -2
  89. package/cjs/graphic/star.js.map +1 -1
  90. package/cjs/index.d.ts +2 -3
  91. package/cjs/index.js +14 -16
  92. package/cjs/index.js.map +1 -1
  93. package/cjs/interface/animate.d.ts +1 -160
  94. package/cjs/interface/animate.js +1 -4
  95. package/cjs/interface/animate.js.map +1 -1
  96. package/cjs/interface/animation/animate.d.ts +117 -0
  97. package/cjs/interface/animation/animate.js +10 -0
  98. package/cjs/interface/animation/animate.js.map +1 -0
  99. package/cjs/interface/animation/easing.d.ts +3 -0
  100. package/cjs/interface/animation/easing.js +6 -0
  101. package/cjs/interface/animation/easing.js.map +1 -0
  102. package/cjs/interface/animation/index.d.ts +5 -0
  103. package/cjs/{animate/Ticker → interface/animation}/index.js +3 -3
  104. package/cjs/interface/animation/index.js.map +1 -0
  105. package/cjs/interface/animation/ticker.d.ts +39 -0
  106. package/cjs/{animate/Ticker/type.js → interface/animation/ticker.js} +1 -1
  107. package/cjs/interface/animation/ticker.js.map +1 -0
  108. package/cjs/interface/animation/timeline.d.ts +17 -0
  109. package/cjs/interface/animation/timeline.js +6 -0
  110. package/cjs/interface/animation/timeline.js.map +1 -0
  111. package/cjs/interface/animation/type.d.ts +13 -0
  112. package/cjs/interface/animation/type.js +15 -0
  113. package/cjs/interface/animation/type.js.map +1 -0
  114. package/cjs/interface/context.d.ts +1 -0
  115. package/cjs/interface/context.js.map +1 -1
  116. package/cjs/interface/global.d.ts +2 -0
  117. package/cjs/interface/global.js.map +1 -1
  118. package/cjs/interface/graphic.d.ts +11 -3
  119. package/cjs/interface/graphic.js.map +1 -1
  120. package/cjs/interface/index.d.ts +1 -1
  121. package/cjs/interface/index.js +9 -9
  122. package/cjs/interface/index.js.map +1 -1
  123. package/cjs/interface/render.d.ts +7 -0
  124. package/cjs/interface/render.js.map +1 -1
  125. package/cjs/interface/stage.d.ts +4 -1
  126. package/cjs/interface/stage.js.map +1 -1
  127. package/cjs/modules.d.ts +2 -1
  128. package/cjs/modules.js +4 -3
  129. package/cjs/modules.js.map +1 -1
  130. package/cjs/plugins/builtin-plugin/auto-render-plugin.js +9 -8
  131. package/cjs/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
  132. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js +14 -11
  133. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  134. package/cjs/plugins/builtin-plugin/edit-module.js +4 -4
  135. package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
  136. package/cjs/plugins/builtin-plugin/flex-layout-plugin.js +13 -10
  137. package/cjs/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
  138. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +0 -1
  139. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
  140. package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js +8 -5
  141. package/cjs/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
  142. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.d.ts +2 -2
  143. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +6 -5
  144. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  145. package/cjs/render/contributions/render/arc-render.d.ts +4 -2
  146. package/cjs/render/contributions/render/arc-render.js +19 -17
  147. package/cjs/render/contributions/render/arc-render.js.map +1 -1
  148. package/cjs/render/contributions/render/area-render.js +2 -2
  149. package/cjs/render/contributions/render/area-render.js.map +1 -1
  150. package/cjs/render/contributions/render/base-render.d.ts +2 -2
  151. package/cjs/render/contributions/render/base-render.js +2 -2
  152. package/cjs/render/contributions/render/base-render.js.map +1 -1
  153. package/cjs/render/contributions/render/draw-contribution.d.ts +1 -0
  154. package/cjs/render/contributions/render/draw-contribution.js +23 -19
  155. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  156. package/cjs/render/contributions/render/draw-interceptor.js +2 -1
  157. package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
  158. package/cjs/render/contributions/render/group-render.d.ts +2 -2
  159. package/cjs/render/contributions/render/group-render.js +15 -11
  160. package/cjs/render/contributions/render/group-render.js.map +1 -1
  161. package/cjs/render/contributions/render/line-render.js +1 -1
  162. package/cjs/render/contributions/render/line-render.js.map +1 -1
  163. package/cjs/render/contributions/render/rect-render.d.ts +3 -1
  164. package/cjs/render/contributions/render/rect-render.js +17 -15
  165. package/cjs/render/contributions/render/rect-render.js.map +1 -1
  166. package/cjs/render/contributions/render/symbol-render.d.ts +4 -2
  167. package/cjs/render/contributions/render/symbol-render.js +16 -11
  168. package/cjs/render/contributions/render/symbol-render.js.map +1 -1
  169. package/cjs/render/render-service.d.ts +1 -1
  170. package/cjs/render/render-service.js.map +1 -1
  171. package/dist/index.es.js +5992 -8838
  172. package/es/animate/config.d.ts +1 -2
  173. package/es/animate/config.js +0 -5
  174. package/es/animate/config.js.map +1 -1
  175. package/es/application.d.ts +2 -1
  176. package/es/application.js.map +1 -1
  177. package/es/canvas/constants.js +1 -2
  178. package/es/canvas/empty-context.d.ts +1 -0
  179. package/es/canvas/empty-context.js +4 -0
  180. package/es/canvas/empty-context.js.map +1 -1
  181. package/es/color-string/interpolate.d.ts +1 -0
  182. package/es/color-string/interpolate.js +8 -1
  183. package/es/color-string/interpolate.js.map +1 -1
  184. package/es/color-string/store.js +2 -1
  185. package/es/common/custom-path2d.js +2 -2
  186. package/es/common/custom-path2d.js.map +1 -1
  187. package/es/common/diff.d.ts +1 -0
  188. package/es/common/diff.js +11 -0
  189. package/es/common/diff.js.map +1 -0
  190. package/es/common/enums.d.ts +0 -16
  191. package/es/common/enums.js +0 -20
  192. package/es/common/enums.js.map +1 -1
  193. package/es/common/morphing-utils.js +29 -124
  194. package/es/common/morphing-utils.js.map +1 -1
  195. package/es/common/performance-raf.d.ts +8 -0
  196. package/es/common/performance-raf.js +24 -0
  197. package/es/common/performance-raf.js.map +1 -0
  198. package/es/common/polygon.js +6 -3
  199. package/es/common/polygon.js.map +1 -1
  200. package/es/common/segment/curve/cubic-bezier.d.ts +1 -2
  201. package/es/common/segment/curve/cubic-bezier.js +1 -8
  202. package/es/common/segment/curve/cubic-bezier.js.map +1 -1
  203. package/es/common/segment/curve/quadratic-bezier.d.ts +1 -0
  204. package/es/common/segment/curve/quadratic-bezier.js +5 -2
  205. package/es/common/segment/curve/quadratic-bezier.js.map +1 -1
  206. package/es/common/segment/index.d.ts +1 -0
  207. package/es/common/segment/index.js +2 -0
  208. package/es/common/segment/index.js.map +1 -1
  209. package/es/common/shape/arc.d.ts +1 -1
  210. package/es/common/shape/arc.js +7 -3
  211. package/es/common/shape/arc.js.map +1 -1
  212. package/es/common/simplify.js +1 -2
  213. package/es/common/sort.js +1 -1
  214. package/es/common/split-path.js +2 -2
  215. package/es/common/split-path.js.map +1 -1
  216. package/es/common/store.js +1 -1
  217. package/es/common/text.js +1 -1
  218. package/es/common/utils.d.ts +0 -2
  219. package/es/common/utils.js +1 -5
  220. package/es/common/utils.js.map +1 -1
  221. package/es/core/application.js +1 -1
  222. package/es/core/camera.js +1 -1
  223. package/es/core/global.d.ts +3 -0
  224. package/es/core/global.js +15 -2
  225. package/es/core/global.js.map +1 -1
  226. package/es/core/stage.d.ts +8 -3
  227. package/es/core/stage.js +35 -22
  228. package/es/core/stage.js.map +1 -1
  229. package/es/graphic/arc.d.ts +1 -2
  230. package/es/graphic/arc.js +3 -2
  231. package/es/graphic/arc.js.map +1 -1
  232. package/es/graphic/area.d.ts +1 -2
  233. package/es/graphic/area.js +4 -1
  234. package/es/graphic/area.js.map +1 -1
  235. package/es/graphic/circle.d.ts +1 -2
  236. package/es/graphic/circle.js +4 -2
  237. package/es/graphic/circle.js.map +1 -1
  238. package/es/graphic/config.js +2 -1
  239. package/es/graphic/config.js.map +1 -1
  240. package/es/graphic/graphic-service/graphic-module.js +1 -1
  241. package/es/graphic/graphic-service/graphic-module.js.map +1 -1
  242. package/es/graphic/graphic-service/graphic-service.js +1 -4
  243. package/es/graphic/graphic-service/graphic-service.js.map +1 -1
  244. package/es/graphic/graphic.d.ts +9 -12
  245. package/es/graphic/graphic.js +52 -109
  246. package/es/graphic/graphic.js.map +1 -1
  247. package/es/graphic/group.js +7 -7
  248. package/es/graphic/group.js.map +1 -1
  249. package/es/graphic/line.d.ts +1 -2
  250. package/es/graphic/line.js +5 -1
  251. package/es/graphic/line.js.map +1 -1
  252. package/es/graphic/rect.js +5 -2
  253. package/es/graphic/rect.js.map +1 -1
  254. package/es/graphic/richtext/icon.d.ts +1 -1
  255. package/es/graphic/richtext/icon.js.map +1 -1
  256. package/es/graphic/richtext/paragraph.js +2 -2
  257. package/es/graphic/richtext/paragraph.js.map +1 -1
  258. package/es/graphic/star.d.ts +1 -2
  259. package/es/graphic/star.js +4 -2
  260. package/es/graphic/star.js.map +1 -1
  261. package/es/index.d.ts +2 -3
  262. package/es/index.js +4 -6
  263. package/es/index.js.map +1 -1
  264. package/es/interface/animate.d.ts +1 -160
  265. package/es/interface/animate.js +2 -1
  266. package/es/interface/animate.js.map +1 -1
  267. package/es/interface/animation/animate.d.ts +117 -0
  268. package/es/interface/animation/animate.js +6 -0
  269. package/es/interface/animation/animate.js.map +1 -0
  270. package/es/interface/animation/easing.d.ts +3 -0
  271. package/es/interface/animation/easing.js +2 -0
  272. package/es/interface/animation/easing.js.map +1 -0
  273. package/es/interface/animation/index.d.ts +5 -0
  274. package/es/interface/animation/index.js +10 -0
  275. package/es/interface/animation/index.js.map +1 -0
  276. package/es/interface/animation/ticker.d.ts +39 -0
  277. package/es/{animate/Ticker/type.js → interface/animation/ticker.js} +1 -1
  278. package/es/interface/animation/ticker.js.map +1 -0
  279. package/es/interface/animation/timeline.d.ts +17 -0
  280. package/es/interface/animation/timeline.js +2 -0
  281. package/es/interface/animation/timeline.js.map +1 -0
  282. package/es/interface/animation/type.d.ts +13 -0
  283. package/es/interface/animation/type.js +14 -0
  284. package/es/interface/animation/type.js.map +1 -0
  285. package/es/interface/context.d.ts +1 -0
  286. package/es/interface/context.js.map +1 -1
  287. package/es/interface/global.d.ts +2 -0
  288. package/es/interface/global.js.map +1 -1
  289. package/es/interface/graphic.d.ts +11 -3
  290. package/es/interface/graphic.js.map +1 -1
  291. package/es/interface/index.d.ts +1 -1
  292. package/es/interface/index.js +2 -2
  293. package/es/interface/index.js.map +1 -1
  294. package/es/interface/render.d.ts +7 -0
  295. package/es/interface/render.js.map +1 -1
  296. package/es/interface/stage.d.ts +4 -1
  297. package/es/interface/stage.js.map +1 -1
  298. package/es/modules.d.ts +2 -1
  299. package/es/modules.js +6 -0
  300. package/es/modules.js.map +1 -1
  301. package/es/plugins/builtin-plugin/auto-render-plugin.js +8 -8
  302. package/es/plugins/builtin-plugin/auto-render-plugin.js.map +1 -1
  303. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js +13 -12
  304. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  305. package/es/plugins/builtin-plugin/edit-module.js +4 -4
  306. package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
  307. package/es/plugins/builtin-plugin/flex-layout-plugin.js +12 -11
  308. package/es/plugins/builtin-plugin/flex-layout-plugin.js.map +1 -1
  309. package/es/plugins/builtin-plugin/html-attribute-plugin.js +0 -1
  310. package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
  311. package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js +8 -5
  312. package/es/plugins/builtin-plugin/incremental-auto-render-plugin.js.map +1 -1
  313. package/es/plugins/builtin-plugin/richtext-edit-plugin.d.ts +2 -2
  314. package/es/plugins/builtin-plugin/richtext-edit-plugin.js +4 -5
  315. package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  316. package/es/render/contributions/render/arc-render.d.ts +4 -2
  317. package/es/render/contributions/render/arc-render.js +19 -17
  318. package/es/render/contributions/render/arc-render.js.map +1 -1
  319. package/es/render/contributions/render/area-render.js +2 -2
  320. package/es/render/contributions/render/area-render.js.map +1 -1
  321. package/es/render/contributions/render/base-render.d.ts +2 -2
  322. package/es/render/contributions/render/base-render.js +2 -2
  323. package/es/render/contributions/render/base-render.js.map +1 -1
  324. package/es/render/contributions/render/draw-contribution.d.ts +1 -0
  325. package/es/render/contributions/render/draw-contribution.js +23 -19
  326. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  327. package/es/render/contributions/render/draw-interceptor.js +2 -1
  328. package/es/render/contributions/render/draw-interceptor.js.map +1 -1
  329. package/es/render/contributions/render/group-render.d.ts +2 -2
  330. package/es/render/contributions/render/group-render.js +15 -11
  331. package/es/render/contributions/render/group-render.js.map +1 -1
  332. package/es/render/contributions/render/line-render.js +1 -1
  333. package/es/render/contributions/render/line-render.js.map +1 -1
  334. package/es/render/contributions/render/rect-render.d.ts +3 -1
  335. package/es/render/contributions/render/rect-render.js +17 -14
  336. package/es/render/contributions/render/rect-render.js.map +1 -1
  337. package/es/render/contributions/render/symbol-render.d.ts +4 -2
  338. package/es/render/contributions/render/symbol-render.js +16 -11
  339. package/es/render/contributions/render/symbol-render.js.map +1 -1
  340. package/es/render/render-service.d.ts +1 -1
  341. package/es/render/render-service.js.map +1 -1
  342. package/package.json +2 -2
  343. package/cjs/animate/Ticker/default-ticker.d.ts +0 -40
  344. package/cjs/animate/Ticker/default-ticker.js +0 -140
  345. package/cjs/animate/Ticker/default-ticker.js.map +0 -1
  346. package/cjs/animate/Ticker/index.d.ts +0 -5
  347. package/cjs/animate/Ticker/index.js.map +0 -1
  348. package/cjs/animate/Ticker/manual-ticker-handler.d.ts +0 -15
  349. package/cjs/animate/Ticker/manual-ticker-handler.js +0 -36
  350. package/cjs/animate/Ticker/manual-ticker-handler.js.map +0 -1
  351. package/cjs/animate/Ticker/manual-ticker.d.ts +0 -19
  352. package/cjs/animate/Ticker/manual-ticker.js +0 -37
  353. package/cjs/animate/Ticker/manual-ticker.js.map +0 -1
  354. package/cjs/animate/Ticker/raf-tick-handler.d.ts +0 -9
  355. package/cjs/animate/Ticker/raf-tick-handler.js +0 -30
  356. package/cjs/animate/Ticker/raf-tick-handler.js.map +0 -1
  357. package/cjs/animate/Ticker/timeout-tick-handler.d.ts +0 -9
  358. package/cjs/animate/Ticker/timeout-tick-handler.js +0 -28
  359. package/cjs/animate/Ticker/timeout-tick-handler.js.map +0 -1
  360. package/cjs/animate/Ticker/type.d.ts +0 -6
  361. package/cjs/animate/Ticker/type.js.map +0 -1
  362. package/cjs/animate/animate.d.ts +0 -147
  363. package/cjs/animate/animate.js +0 -403
  364. package/cjs/animate/animate.js.map +0 -1
  365. package/cjs/animate/custom-animate.d.ts +0 -236
  366. package/cjs/animate/custom-animate.js +0 -726
  367. package/cjs/animate/custom-animate.js.map +0 -1
  368. package/cjs/animate/default-ticker.d.ts +0 -2
  369. package/cjs/animate/default-ticker.js +0 -14
  370. package/cjs/animate/default-ticker.js.map +0 -1
  371. package/cjs/animate/easing-func.d.ts +0 -1
  372. package/cjs/animate/easing-func.js +0 -16
  373. package/cjs/animate/easing-func.js.map +0 -1
  374. package/cjs/animate/easing.d.ts +0 -49
  375. package/cjs/animate/easing.js +0 -141
  376. package/cjs/animate/easing.js.map +0 -1
  377. package/cjs/animate/group-fade.d.ts +0 -16
  378. package/cjs/animate/group-fade.js +0 -66
  379. package/cjs/animate/group-fade.js.map +0 -1
  380. package/cjs/animate/index.d.ts +0 -8
  381. package/cjs/animate/index.js +0 -24
  382. package/cjs/animate/index.js.map +0 -1
  383. package/cjs/animate/morphing.d.ts +0 -52
  384. package/cjs/animate/morphing.js +0 -292
  385. package/cjs/animate/morphing.js.map +0 -1
  386. package/cjs/animate/timeline.d.ts +0 -17
  387. package/cjs/animate/timeline.js +0 -46
  388. package/cjs/animate/timeline.js.map +0 -1
  389. package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +0 -1
  390. package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js +0 -3
  391. package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +0 -1
  392. package/es/animate/Ticker/default-ticker.d.ts +0 -40
  393. package/es/animate/Ticker/default-ticker.js +0 -138
  394. package/es/animate/Ticker/default-ticker.js.map +0 -1
  395. package/es/animate/Ticker/index.d.ts +0 -5
  396. package/es/animate/Ticker/index.js +0 -10
  397. package/es/animate/Ticker/index.js.map +0 -1
  398. package/es/animate/Ticker/manual-ticker-handler.d.ts +0 -15
  399. package/es/animate/Ticker/manual-ticker-handler.js +0 -28
  400. package/es/animate/Ticker/manual-ticker-handler.js.map +0 -1
  401. package/es/animate/Ticker/manual-ticker.d.ts +0 -19
  402. package/es/animate/Ticker/manual-ticker.js +0 -31
  403. package/es/animate/Ticker/manual-ticker.js.map +0 -1
  404. package/es/animate/Ticker/raf-tick-handler.d.ts +0 -9
  405. package/es/animate/Ticker/raf-tick-handler.js +0 -22
  406. package/es/animate/Ticker/raf-tick-handler.js.map +0 -1
  407. package/es/animate/Ticker/timeout-tick-handler.d.ts +0 -9
  408. package/es/animate/Ticker/timeout-tick-handler.js +0 -20
  409. package/es/animate/Ticker/timeout-tick-handler.js.map +0 -1
  410. package/es/animate/Ticker/type.d.ts +0 -6
  411. package/es/animate/Ticker/type.js.map +0 -1
  412. package/es/animate/animate.d.ts +0 -147
  413. package/es/animate/animate.js +0 -398
  414. package/es/animate/animate.js.map +0 -1
  415. package/es/animate/custom-animate.d.ts +0 -236
  416. package/es/animate/custom-animate.js +0 -703
  417. package/es/animate/custom-animate.js.map +0 -1
  418. package/es/animate/default-ticker.d.ts +0 -2
  419. package/es/animate/default-ticker.js +0 -12
  420. package/es/animate/default-ticker.js.map +0 -1
  421. package/es/animate/easing-func.d.ts +0 -1
  422. package/es/animate/easing-func.js +0 -10
  423. package/es/animate/easing-func.js.map +0 -1
  424. package/es/animate/easing.d.ts +0 -49
  425. package/es/animate/easing.js +0 -134
  426. package/es/animate/easing.js.map +0 -1
  427. package/es/animate/group-fade.d.ts +0 -16
  428. package/es/animate/group-fade.js +0 -56
  429. package/es/animate/group-fade.js.map +0 -1
  430. package/es/animate/index.d.ts +0 -8
  431. package/es/animate/index.js +0 -16
  432. package/es/animate/index.js.map +0 -1
  433. package/es/animate/morphing.d.ts +0 -52
  434. package/es/animate/morphing.js +0 -295
  435. package/es/animate/morphing.js.map +0 -1
  436. package/es/animate/timeline.d.ts +0 -17
  437. package/es/animate/timeline.js +0 -42
  438. package/es/animate/timeline.js.map +0 -1
  439. package/es/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +0 -1
  440. package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js +0 -3
  441. package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +0 -1
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.Graphic = exports.NOWORK_ANIMATE_ATTR = exports.GRAPHIC_UPDATE_TAG_KEY = exports.PURE_STYLE_KEY = void 0;
6
6
 
7
- const vutils_1 = require("@visactor/vutils"), vutils_2 = require("@visactor/vutils"), node_tree_1 = require("./node-tree"), event_1 = require("../event"), config_1 = require("./config"), application_1 = require("../application"), animate_1 = require("../animate"), interpolate_1 = require("../color-string/interpolate"), custom_path2d_1 = require("../common/custom-path2d"), loader_1 = require("../resource-loader/loader"), enums_1 = require("../common/enums"), bounds_context_1 = require("../common/bounds-context"), render_command_list_1 = require("../common/render-command-list"), utils_1 = require("../common/utils"), builtin_symbol_1 = require("./builtin-symbol"), xml_1 = require("../common/xml"), constants_1 = require("./constants"), _tempBounds = new vutils_2.AABBBounds, tempMatrix = new vutils_2.Matrix, tempBounds = new vutils_2.AABBBounds;
7
+ const vutils_1 = require("@visactor/vutils"), vutils_2 = require("@visactor/vutils"), node_tree_1 = require("./node-tree"), event_1 = require("../event"), config_1 = require("./config"), application_1 = require("../application"), custom_path2d_1 = require("../common/custom-path2d"), loader_1 = require("../resource-loader/loader"), enums_1 = require("../common/enums"), bounds_context_1 = require("../common/bounds-context"), render_command_list_1 = require("../common/render-command-list"), utils_1 = require("../common/utils"), builtin_symbol_1 = require("./builtin-symbol"), xml_1 = require("../common/xml"), constants_1 = require("./constants"), config_2 = require("../animate/config"), canvas_1 = require("../canvas"), _tempBounds = new vutils_2.AABBBounds, tempMatrix = new vutils_2.Matrix, tempBounds = new vutils_2.AABBBounds;
8
8
 
9
9
  exports.PURE_STYLE_KEY = [ "stroke", "opacity", "strokeOpacity", "lineDash", "lineDashOffset", "lineCap", "lineJoin", "miterLimit", "fill", "fillOpacity" ],
10
10
  exports.GRAPHIC_UPDATE_TAG_KEY = [ "lineWidth", "scaleX", "scaleY", "angle", "anchor", "visible" ];
@@ -71,6 +71,13 @@ class Graphic extends node_tree_1.Node {
71
71
  this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0,
72
72
  params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
73
73
  }
74
+ getGraphicService() {
75
+ var _a, _b;
76
+ return null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.graphicService) && void 0 !== _b ? _b : application_1.application.graphicService;
77
+ }
78
+ getAttributes() {
79
+ return this.attribute;
80
+ }
74
81
  setMode(mode) {
75
82
  "3d" === mode ? this.set3dMode() : this.set2dMode();
76
83
  }
@@ -96,9 +103,9 @@ class Graphic extends node_tree_1.Node {
96
103
  const full = "imprecise" === this.attribute.boundsMode;
97
104
  if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
98
105
  if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
99
- application_1.application.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
106
+ this.getGraphicService().beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
100
107
  const bounds = this.doUpdateAABBBounds(full);
101
- return application_1.application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0),
108
+ return this.getGraphicService().afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0),
102
109
  "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
103
110
  }
104
111
  tryUpdateOBBBounds() {
@@ -198,7 +205,7 @@ class Graphic extends node_tree_1.Node {
198
205
  clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
199
206
  }
200
207
  shouldUpdateAABBBounds() {
201
- return this.shadowRoot ? (!!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) && application_1.application.graphicService.validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this) : !!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS) && application_1.application.graphicService.validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this);
208
+ return this.shadowRoot ? (!!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this) : !!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS) && this.getGraphicService().validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this);
202
209
  }
203
210
  shouldSelfChangeUpdateAABBBounds() {
204
211
  return this.shadowRoot ? !!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds() : !!(this._updateTag & enums_1.UpdateTag.UPDATE_BOUNDS);
@@ -235,6 +242,13 @@ class Graphic extends node_tree_1.Node {
235
242
  setWidthHeightWithoutTransform(aabbBounds) {
236
243
  this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
237
244
  }
245
+ setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context) {
246
+ this.setAttributes(params, forceUpdateTag, context), this.animates && this.animates.forEach((animate => {
247
+ Object.keys(params).forEach((key => {
248
+ animate.preventAttr(key);
249
+ }));
250
+ }));
251
+ }
238
252
  setAttributes(params, forceUpdateTag = !1, context) {
239
253
  (params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic),
240
254
  this._setAttributes(params, forceUpdateTag, context);
@@ -375,22 +389,8 @@ class Graphic extends node_tree_1.Node {
375
389
  skewTo(b, c) {
376
390
  return this;
377
391
  }
378
- animate(params) {
379
- var _a;
380
- this.animates || (this.animates = new Map);
381
- const animate = new animate_1.Animate(null == params ? void 0 : params.id, null !== (_a = null == params ? void 0 : params.timeline) && void 0 !== _a ? _a : this.stage && this.stage.getTimeline(), null == params ? void 0 : params.slience);
382
- if (animate.bind(this), params) {
383
- const {onStart: onStart, onFrame: onFrame, onEnd: onEnd, onRemove: onRemove} = params;
384
- null != onStart && animate.onStart(onStart), null != onFrame && animate.onFrame(onFrame),
385
- null != onEnd && animate.onEnd(onEnd), null != onRemove && animate.onRemove(onRemove),
386
- animate.interpolateFunc = params.interpolate;
387
- }
388
- return this.animates.set(animate.id, animate), animate.onRemove((() => {
389
- animate.stop(), this.animates.delete(animate.id);
390
- })), animate;
391
- }
392
392
  onAttributeUpdate(context) {
393
- context && context.skipUpdateCallback || (application_1.application.graphicService.onAttributeUpdate(this),
393
+ context && context.skipUpdateCallback || (this.getGraphicService().onAttributeUpdate(this),
394
394
  this._emitCustomEvent("afterAttributeUpdate", context));
395
395
  }
396
396
  update(d) {
@@ -405,21 +405,29 @@ class Graphic extends node_tree_1.Node {
405
405
  return null === (_a = this.states) || void 0 === _a ? void 0 : _a[stateName];
406
406
  }
407
407
  applyStateAttrs(attrs, stateNames, hasAnimation, isClear) {
408
- var _a, _b, _c, _d;
408
+ var _a, _b;
409
409
  if (hasAnimation) {
410
410
  const keys = Object.keys(attrs), noWorkAttrs = this.getNoWorkAnimateAttr(), animateAttrs = {};
411
411
  let noAnimateAttrs;
412
412
  keys.forEach((key => {
413
413
  noWorkAttrs[key] ? (noAnimateAttrs || (noAnimateAttrs = {}), noAnimateAttrs[key] = attrs[key]) : animateAttrs[key] = isClear && void 0 === attrs[key] ? this.getDefaultAttribute(key) : attrs[key];
414
414
  }));
415
- const animate = this.animate({
416
- slience: !0
417
- });
418
- animate.stateNames = stateNames, animate.to(animateAttrs, null !== (_b = null === (_a = this.stateAnimateConfig) || void 0 === _a ? void 0 : _a.duration) && void 0 !== _b ? _b : animate_1.DefaultStateAnimateConfig.duration, null !== (_d = null === (_c = this.stateAnimateConfig) || void 0 === _c ? void 0 : _c.easing) && void 0 !== _d ? _d : animate_1.DefaultStateAnimateConfig.easing),
419
- noAnimateAttrs && this.setAttributes(noAnimateAttrs, !1, {
415
+ const stateAnimateConfig = null !== (_b = null !== (_a = this.context && this.context.stateAnimateConfig) && void 0 !== _a ? _a : this.stateAnimateConfig) && void 0 !== _b ? _b : config_2.DefaultStateAnimateConfig;
416
+ this.applyAnimationState([ "state" ], [ {
417
+ name: "state",
418
+ animation: {
419
+ type: "state",
420
+ to: animateAttrs,
421
+ duration: stateAnimateConfig.duration,
422
+ easing: stateAnimateConfig.easing
423
+ }
424
+ } ]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
420
425
  type: enums_1.AttributeUpdateType.STATE
421
426
  });
422
- } else this.stopStateAnimates(), this.setAttributes(attrs, !1, {
427
+ } else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
428
+ type: enums_1.AttributeUpdateType.STATE
429
+ });
430
+ this._emitCustomEvent("afterStateUpdate", {
423
431
  type: enums_1.AttributeUpdateType.STATE
424
432
  });
425
433
  }
@@ -439,13 +447,9 @@ class Graphic extends node_tree_1.Node {
439
447
  }));
440
448
  }
441
449
  getNormalAttribute(key) {
442
- let value = this.attribute[key];
443
- return this.animates && this.animates.forEach((animate => {
444
- if (animate.stateNames) {
445
- const endProps = animate.getEndProps();
446
- (0, vutils_2.has)(endProps, key) && (value = endProps[key]);
447
- }
448
- })), value;
450
+ var _a, _b;
451
+ const value = this.attribute[key];
452
+ return this.animates ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
449
453
  }
450
454
  clearStates(hasAnimation) {
451
455
  this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [],
@@ -569,10 +573,10 @@ class Graphic extends node_tree_1.Node {
569
573
  this.animates && this.animates.size) {
570
574
  const timeline = stage.getTimeline();
571
575
  this.animates.forEach((a => {
572
- a.timeline === animate_1.defaultTimeline && a.setTimeline(timeline);
576
+ a.timeline.isGlobal && (a.setTimeline(timeline), timeline.addAnimate(a));
573
577
  }));
574
578
  }
575
- this._onSetStage && this._onSetStage(this, stage, layer), application_1.application.graphicService.onSetStage(this, stage);
579
+ this._onSetStage && this._onSetStage(this, stage, layer), this.getGraphicService().onSetStage(this, stage);
576
580
  }
577
581
  }
578
582
  setStageToShadowRoot(stage, layer) {
@@ -584,76 +588,6 @@ class Graphic extends node_tree_1.Node {
584
588
  type: enums_1.AttributeUpdateType.ANIMATE_END
585
589
  });
586
590
  }
587
- onStep(subAnimate, animate, step, ratio, end) {
588
- const nextAttributes = {};
589
- if (step.customAnimate) step.customAnimate.update(end, ratio, nextAttributes); else {
590
- const nextProps = step.props, nextParsedProps = step.parsedProps, propKeys = step.propKeys;
591
- this.stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, void 0, nextParsedProps, propKeys);
592
- }
593
- this.setAttributes(nextAttributes, !1, {
594
- type: enums_1.AttributeUpdateType.ANIMATE_UPDATE,
595
- animationState: {
596
- ratio: ratio,
597
- end: end,
598
- step: step,
599
- isFirstFrameOfStep: subAnimate.getLastStep() !== step
600
- }
601
- }), this.stage && this.stage.renderNextFrame();
602
- }
603
- stepInterpolate(subAnimate, animate, nextAttributes, step, ratio, end, nextProps, lastProps, nextParsedProps, propKeys) {
604
- propKeys || (propKeys = Object.keys(nextProps), step.propKeys = propKeys), end ? step.propKeys.forEach((key => {
605
- animate.validAttr(key) && (nextAttributes[key] = nextProps[key]);
606
- })) : propKeys.forEach((key => {
607
- var _a;
608
- if (!animate.validAttr(key)) return;
609
- const nextStepVal = nextProps[key], lastStepVal = null !== (_a = lastProps && lastProps[key]) && void 0 !== _a ? _a : subAnimate.getLastPropByName(key, step);
610
- if (null == nextStepVal || null == lastStepVal || nextStepVal === lastStepVal) return void (nextAttributes[key] = nextStepVal);
611
- let match;
612
- match = animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes),
613
- match || (match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, this, nextAttributes),
614
- match || this.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) || this._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes));
615
- })), step.parsedProps = nextParsedProps;
616
- }
617
- defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio) {
618
- if (Number.isFinite(nextStepVal) && Number.isFinite(lastStepVal)) return nextAttributes[key] = lastStepVal + (nextStepVal - lastStepVal) * ratio,
619
- !0;
620
- if ("fill" === key) {
621
- nextParsedProps || (nextParsedProps = {});
622
- const fillColorArray = nextParsedProps.fillColorArray, color = (0, interpolate_1.interpolateColor)(lastStepVal, null != fillColorArray ? fillColorArray : nextStepVal, ratio, !1, ((fArray, tArray) => {
623
- nextParsedProps.fillColorArray = tArray;
624
- }));
625
- return color && (nextAttributes[key] = color), !0;
626
- }
627
- if ("stroke" === key) {
628
- nextParsedProps || (nextParsedProps = {});
629
- const strokeColorArray = nextParsedProps.strokeColorArray, color = (0, interpolate_1.interpolateColor)(lastStepVal, null != strokeColorArray ? strokeColorArray : nextStepVal, ratio, !1, ((fArray, tArray) => {
630
- nextParsedProps.strokeColorArray = tArray;
631
- }));
632
- return color && (nextAttributes[key] = color), !0;
633
- }
634
- if ("shadowColor" === key) {
635
- nextParsedProps || (nextParsedProps = {});
636
- const shadowColorArray = nextParsedProps.shadowColorArray, color = (0, interpolate_1.interpolateColor)(lastStepVal, null != shadowColorArray ? shadowColorArray : nextStepVal, ratio, !0, ((fArray, tArray) => {
637
- nextParsedProps.shadowColorArray = tArray;
638
- }));
639
- return color && (nextAttributes[key] = color), !0;
640
- }
641
- if (Array.isArray(nextStepVal) && nextStepVal.length === lastStepVal.length) {
642
- const nextList = [];
643
- let valid = !0;
644
- for (let i = 0; i < nextStepVal.length; i++) {
645
- const v = lastStepVal[i], val = v + (nextStepVal[i] - v) * ratio;
646
- if (!Number.isFinite(val)) {
647
- valid = !1;
648
- break;
649
- }
650
- nextList.push(val);
651
- }
652
- valid && (nextAttributes[key] = nextList);
653
- }
654
- return !1;
655
- }
656
- _interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {}
657
591
  getDefaultAttribute(name) {
658
592
  return this.getGraphicTheme()[name];
659
593
  }
@@ -736,6 +670,15 @@ class Graphic extends node_tree_1.Node {
736
670
  this.dispatchEvent(changeEvent);
737
671
  }
738
672
  }
673
+ toCustomPath() {
674
+ var _a, _b, _c;
675
+ const renderer = null === (_c = null === (_b = (null === (_a = this.stage) || void 0 === _a ? void 0 : _a.renderService) || application_1.application.renderService) || void 0 === _b ? void 0 : _b.drawContribution) || void 0 === _c ? void 0 : _c.getRenderContribution(this);
676
+ if (renderer) {
677
+ const context = new canvas_1.EmptyContext2d(null, 1);
678
+ return renderer.drawShape(this, context, 0, 0, {}, {}), context.path;
679
+ }
680
+ return null;
681
+ }
739
682
  }
740
683
 
741
684
  function backgroundNotImage(image) {