@visactor/vrender-core 1.0.47-alpha.0 → 1.1.0-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 (1271) hide show
  1. package/cjs/application.d.ts +14 -5
  2. package/cjs/application.js +1 -8
  3. package/cjs/application.js.map +1 -1
  4. package/cjs/canvas/empty-context.js +4 -14
  5. package/cjs/canvas/empty-context.js.map +1 -1
  6. package/cjs/canvas/util.d.ts +2 -3
  7. package/cjs/canvas/util.js +17 -3
  8. package/cjs/canvas/util.js.map +1 -1
  9. package/cjs/color-string/index.js +2 -1
  10. package/cjs/common/contribution-provider.d.ts +16 -9
  11. package/cjs/common/contribution-provider.js +9 -4
  12. package/cjs/common/contribution-provider.js.map +1 -1
  13. package/cjs/common/diff.js +1 -2
  14. package/cjs/common/enums.d.ts +2 -0
  15. package/cjs/common/enums.js +1 -0
  16. package/cjs/common/enums.js.map +1 -1
  17. package/cjs/common/event-transformer.js +43 -6
  18. package/cjs/common/event-transformer.js.map +1 -1
  19. package/cjs/common/explicit-binding.d.ts +5 -0
  20. package/cjs/common/explicit-binding.js +16 -0
  21. package/cjs/common/explicit-binding.js.map +1 -0
  22. package/cjs/common/performance-raf.d.ts +1 -0
  23. package/cjs/common/performance-raf.js +5 -0
  24. package/cjs/common/performance-raf.js.map +1 -1
  25. package/cjs/common/render-area.js +1 -1
  26. package/cjs/common/render-command-list.js +1 -1
  27. package/cjs/common/render-curve.js +1 -1
  28. package/cjs/common/render-utils.js +1 -1
  29. package/cjs/common/seg-context.js +1 -2
  30. package/cjs/common/simplify.js +1 -1
  31. package/cjs/common/sort.js +1 -1
  32. package/cjs/common/split-path.js +1 -1
  33. package/cjs/common/store.js +1 -1
  34. package/cjs/common/text.js +1 -1
  35. package/cjs/common/utils.js +1 -1
  36. package/cjs/core/application.js +1 -1
  37. package/cjs/core/camera.js +1 -1
  38. package/cjs/core/constants.js +1 -1
  39. package/cjs/core/contributions/env/base-contribution.js +4 -9
  40. package/cjs/core/contributions/env/base-contribution.js.map +1 -1
  41. package/cjs/core/contributions/env/modules.d.ts +4 -3
  42. package/cjs/core/contributions/env/modules.js +6 -4
  43. package/cjs/core/contributions/env/modules.js.map +1 -1
  44. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +3 -12
  45. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  46. package/cjs/core/contributions/layerHandler/empty-contribution.js +3 -12
  47. package/cjs/core/contributions/layerHandler/empty-contribution.js.map +1 -1
  48. package/cjs/core/contributions/layerHandler/modules.d.ts +4 -3
  49. package/cjs/core/contributions/layerHandler/modules.js +6 -4
  50. package/cjs/core/contributions/layerHandler/modules.js.map +1 -1
  51. package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js +3 -12
  52. package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
  53. package/cjs/core/contributions/modules.d.ts +2 -2
  54. package/cjs/core/contributions/modules.js +7 -1
  55. package/cjs/core/contributions/modules.js.map +1 -1
  56. package/cjs/core/contributions/textMeasure/AtextMeasure.js +3 -10
  57. package/cjs/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  58. package/cjs/core/contributions/textMeasure/modules.d.ts +4 -3
  59. package/cjs/core/contributions/textMeasure/modules.js +6 -4
  60. package/cjs/core/contributions/textMeasure/modules.js.map +1 -1
  61. package/cjs/core/contributions/textMeasure/textMeasure-contribution.js +3 -10
  62. package/cjs/core/contributions/textMeasure/textMeasure-contribution.js.map +1 -1
  63. package/cjs/core/contributions/window/base-contribution.js +3 -12
  64. package/cjs/core/contributions/window/base-contribution.js.map +1 -1
  65. package/cjs/core/core-modules.d.ts +4 -3
  66. package/cjs/core/core-modules.js +11 -7
  67. package/cjs/core/core-modules.js.map +1 -1
  68. package/cjs/core/global-module.js +2 -0
  69. package/cjs/core/global-module.js.map +1 -1
  70. package/cjs/core/global.d.ts +2 -0
  71. package/cjs/core/global.js +9 -18
  72. package/cjs/core/global.js.map +1 -1
  73. package/cjs/core/graphic-utils.d.ts +1 -2
  74. package/cjs/core/graphic-utils.js +8 -23
  75. package/cjs/core/graphic-utils.js.map +1 -1
  76. package/cjs/core/index.js +1 -1
  77. package/cjs/core/layer-service.d.ts +7 -2
  78. package/cjs/core/layer-service.js +29 -27
  79. package/cjs/core/layer-service.js.map +1 -1
  80. package/cjs/core/layer.js +1 -1
  81. package/cjs/core/layer.js.map +1 -1
  82. package/cjs/core/light.js +1 -1
  83. package/cjs/core/stage.d.ts +19 -7
  84. package/cjs/core/stage.js +50 -39
  85. package/cjs/core/stage.js.map +1 -1
  86. package/cjs/core/window.d.ts +7 -5
  87. package/cjs/core/window.js +14 -18
  88. package/cjs/core/window.js.map +1 -1
  89. package/cjs/create.d.ts +1 -2
  90. package/cjs/create.js +2 -2
  91. package/cjs/create.js.map +1 -1
  92. package/cjs/entries/app-context.d.ts +30 -0
  93. package/cjs/entries/app-context.js +84 -0
  94. package/cjs/entries/app-context.js.map +1 -0
  95. package/cjs/entries/browser.d.ts +25 -0
  96. package/cjs/entries/browser.js +44 -0
  97. package/cjs/entries/browser.js.map +1 -0
  98. package/cjs/entries/index.d.ts +7 -0
  99. package/cjs/entries/index.js +32 -0
  100. package/cjs/entries/index.js.map +1 -0
  101. package/cjs/entries/miniapp.d.ts +6 -0
  102. package/cjs/entries/miniapp.js +20 -0
  103. package/cjs/entries/miniapp.js.map +1 -0
  104. package/cjs/entries/node.d.ts +6 -0
  105. package/cjs/entries/node.js +20 -0
  106. package/cjs/entries/node.js.map +1 -0
  107. package/cjs/entries/runtime-installer.d.ts +11 -0
  108. package/cjs/entries/runtime-installer.js +111 -0
  109. package/cjs/entries/runtime-installer.js.map +1 -0
  110. package/cjs/entries/types.d.ts +29 -0
  111. package/cjs/{common/inversify-lite/interfaces/interfaces.js → entries/types.js} +1 -1
  112. package/cjs/entries/types.js.map +1 -0
  113. package/cjs/event/util.d.ts +1 -1
  114. package/cjs/factory/graphic-factory.d.ts +7 -0
  115. package/cjs/factory/graphic-factory.js +23 -0
  116. package/cjs/factory/graphic-factory.js.map +1 -0
  117. package/cjs/factory/index.d.ts +4 -0
  118. package/cjs/{common/inversify-lite → factory}/index.js +2 -1
  119. package/cjs/factory/index.js.map +1 -0
  120. package/cjs/factory/layer-factory.d.ts +7 -0
  121. package/cjs/factory/layer-factory.js +19 -0
  122. package/cjs/factory/layer-factory.js.map +1 -0
  123. package/cjs/factory/stage-factory.d.ts +8 -0
  124. package/cjs/factory/stage-factory.js +20 -0
  125. package/cjs/factory/stage-factory.js.map +1 -0
  126. package/cjs/factory/types.d.ts +34 -0
  127. package/cjs/{common/inversify/interfaces.js → factory/types.js} +1 -1
  128. package/cjs/factory/types.js.map +1 -0
  129. package/cjs/factory.d.ts +1 -0
  130. package/cjs/factory.js +16 -1
  131. package/cjs/factory.js.map +1 -1
  132. package/cjs/global.d.ts +2 -0
  133. package/cjs/global.js +11 -0
  134. package/cjs/global.js.map +1 -0
  135. package/cjs/graphic/area.js +1 -1
  136. package/cjs/graphic/area.js.map +1 -1
  137. package/cjs/graphic/bounds.js +3 -3
  138. package/cjs/graphic/bounds.js.map +1 -1
  139. package/cjs/graphic/config.js +0 -1
  140. package/cjs/graphic/config.js.map +1 -1
  141. package/cjs/graphic/glyph.js +9 -3
  142. package/cjs/graphic/glyph.js.map +1 -1
  143. package/cjs/graphic/graphic-creator.d.ts +9 -4
  144. package/cjs/graphic/graphic-creator.js +35 -7
  145. package/cjs/graphic/graphic-creator.js.map +1 -1
  146. package/cjs/graphic/graphic-service/graphic-module.d.ts +4 -3
  147. package/cjs/graphic/graphic-service/graphic-module.js +6 -4
  148. package/cjs/graphic/graphic-service/graphic-module.js.map +1 -1
  149. package/cjs/graphic/graphic-service/graphic-service.d.ts +2 -3
  150. package/cjs/graphic/graphic-service/graphic-service.js +5 -20
  151. package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
  152. package/cjs/graphic/graphic.d.ts +80 -11
  153. package/cjs/graphic/graphic.js +474 -152
  154. package/cjs/graphic/graphic.js.map +1 -1
  155. package/cjs/graphic/group.d.ts +11 -1
  156. package/cjs/graphic/group.js +46 -11
  157. package/cjs/graphic/group.js.map +1 -1
  158. package/cjs/graphic/index.d.ts +3 -0
  159. package/cjs/graphic/index.js +34 -15
  160. package/cjs/graphic/index.js.map +1 -1
  161. package/cjs/graphic/line.js +1 -1
  162. package/cjs/graphic/line.js.map +1 -1
  163. package/cjs/graphic/state/attribute-update-classifier.d.ts +13 -0
  164. package/cjs/graphic/state/attribute-update-classifier.js +67 -0
  165. package/cjs/graphic/state/attribute-update-classifier.js.map +1 -0
  166. package/cjs/graphic/state/shared-state-refresh.d.ts +6 -0
  167. package/cjs/graphic/state/shared-state-refresh.js +55 -0
  168. package/cjs/graphic/state/shared-state-refresh.js.map +1 -0
  169. package/cjs/graphic/state/shared-state-scope.d.ts +25 -0
  170. package/cjs/graphic/state/shared-state-scope.js +98 -0
  171. package/cjs/graphic/state/shared-state-scope.js.map +1 -0
  172. package/cjs/graphic/state/state-batch-scheduler.d.ts +42 -0
  173. package/cjs/graphic/state/state-batch-scheduler.js +285 -0
  174. package/cjs/graphic/state/state-batch-scheduler.js.map +1 -0
  175. package/cjs/graphic/state/state-definition-compiler.d.ts +6 -0
  176. package/cjs/graphic/state/state-definition-compiler.js +91 -0
  177. package/cjs/graphic/state/state-definition-compiler.js.map +1 -0
  178. package/cjs/graphic/state/state-definition.d.ts +44 -0
  179. package/cjs/graphic/state/state-definition.js +6 -0
  180. package/cjs/graphic/state/state-definition.js.map +1 -0
  181. package/cjs/graphic/state/state-engine.d.ts +38 -0
  182. package/cjs/graphic/state/state-engine.js +220 -0
  183. package/cjs/graphic/state/state-engine.js.map +1 -0
  184. package/cjs/graphic/state/state-model.d.ts +43 -0
  185. package/cjs/graphic/state/state-model.js +143 -0
  186. package/cjs/graphic/state/state-model.js.map +1 -0
  187. package/cjs/graphic/state/state-perf-monitor.d.ts +119 -0
  188. package/cjs/graphic/state/state-perf-monitor.js +217 -0
  189. package/cjs/graphic/state/state-perf-monitor.js.map +1 -0
  190. package/cjs/graphic/state/state-style-resolver.d.ts +22 -0
  191. package/cjs/graphic/state/state-style-resolver.js +73 -0
  192. package/cjs/graphic/state/state-style-resolver.js.map +1 -0
  193. package/cjs/graphic/state/state-transition-orchestrator.d.ts +41 -0
  194. package/cjs/graphic/state/state-transition-orchestrator.js +74 -0
  195. package/cjs/graphic/state/state-transition-orchestrator.js.map +1 -0
  196. package/cjs/graphic/text.d.ts +3 -2
  197. package/cjs/graphic/text.js +22 -14
  198. package/cjs/graphic/text.js.map +1 -1
  199. package/cjs/graphic/theme.d.ts +5 -0
  200. package/cjs/graphic/theme.js +7 -0
  201. package/cjs/graphic/theme.js.map +1 -1
  202. package/cjs/graphic/wrap-text.d.ts +1 -1
  203. package/cjs/graphic/wrap-text.js +17 -14
  204. package/cjs/graphic/wrap-text.js.map +1 -1
  205. package/cjs/index.d.ts +7 -4
  206. package/cjs/index.js +95 -25
  207. package/cjs/index.js.map +1 -1
  208. package/cjs/interface/global.d.ts +2 -0
  209. package/cjs/interface/global.js.map +1 -1
  210. package/cjs/interface/graphic/group.d.ts +6 -0
  211. package/cjs/interface/graphic/group.js.map +1 -1
  212. package/cjs/interface/graphic/theme.d.ts +3 -0
  213. package/cjs/interface/graphic/theme.js.map +1 -1
  214. package/cjs/interface/graphic.d.ts +24 -26
  215. package/cjs/interface/graphic.js.map +1 -1
  216. package/cjs/interface/plugin.d.ts +2 -0
  217. package/cjs/interface/plugin.js.map +1 -1
  218. package/cjs/interface/stage.d.ts +11 -3
  219. package/cjs/interface/stage.js.map +1 -1
  220. package/cjs/interface/theme-service.js.map +1 -1
  221. package/cjs/legacy/binding-context.d.ts +24 -0
  222. package/cjs/legacy/binding-context.js +98 -0
  223. package/cjs/legacy/binding-context.js.map +1 -0
  224. package/cjs/legacy/bootstrap.d.ts +10 -0
  225. package/cjs/legacy/bootstrap.js +72 -0
  226. package/cjs/legacy/bootstrap.js.map +1 -0
  227. package/cjs/legacy/module-types.d.ts +2 -0
  228. package/cjs/legacy/module-types.js +6 -0
  229. package/cjs/legacy/module-types.js.map +1 -0
  230. package/cjs/modules.d.ts +5 -6
  231. package/cjs/modules.js +54 -20
  232. package/cjs/modules.js.map +1 -1
  233. package/cjs/picker/global-picker-service.js +3 -12
  234. package/cjs/picker/global-picker-service.js.map +1 -1
  235. package/cjs/picker/pick-interceptor.js +9 -19
  236. package/cjs/picker/pick-interceptor.js.map +1 -1
  237. package/cjs/picker/pick-modules.d.ts +5 -3
  238. package/cjs/picker/pick-modules.js +6 -4
  239. package/cjs/picker/pick-modules.js.map +1 -1
  240. package/cjs/picker/picker-service.d.ts +13 -4
  241. package/cjs/picker/picker-service.js +16 -22
  242. package/cjs/picker/picker-service.js.map +1 -1
  243. package/cjs/plugins/base-plugin.d.ts +8 -0
  244. package/cjs/plugins/base-plugin.js +15 -0
  245. package/cjs/plugins/base-plugin.js.map +1 -0
  246. package/cjs/plugins/browser-env-plugin.d.ts +8 -0
  247. package/cjs/plugins/browser-env-plugin.js +24 -0
  248. package/cjs/plugins/browser-env-plugin.js.map +1 -0
  249. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.d.ts +4 -1
  250. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js +25 -4
  251. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  252. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +3 -1
  253. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  254. package/cjs/plugins/index.d.ts +5 -0
  255. package/cjs/plugins/index.js +23 -0
  256. package/cjs/plugins/index.js.map +1 -0
  257. package/cjs/plugins/picker-plugin.d.ts +7 -0
  258. package/cjs/plugins/picker-plugin.js +19 -0
  259. package/cjs/plugins/picker-plugin.js.map +1 -0
  260. package/cjs/plugins/plugin-modules.d.ts +4 -3
  261. package/cjs/plugins/plugin-modules.js +6 -4
  262. package/cjs/plugins/plugin-modules.js.map +1 -1
  263. package/cjs/plugins/plugin-service.d.ts +16 -2
  264. package/cjs/plugins/plugin-service.js +24 -26
  265. package/cjs/plugins/plugin-service.js.map +1 -1
  266. package/cjs/plugins/renderer-plugin.d.ts +7 -0
  267. package/cjs/plugins/renderer-plugin.js +19 -0
  268. package/cjs/plugins/renderer-plugin.js.map +1 -0
  269. package/cjs/plugins/types.d.ts +28 -0
  270. package/cjs/plugins/types.js +6 -0
  271. package/cjs/plugins/types.js.map +1 -0
  272. package/cjs/register/register-arc.js +1 -1
  273. package/cjs/register/register-arc.js.map +1 -1
  274. package/cjs/register/register-arc3d.js +1 -1
  275. package/cjs/register/register-arc3d.js.map +1 -1
  276. package/cjs/register/register-area.js +1 -1
  277. package/cjs/register/register-area.js.map +1 -1
  278. package/cjs/register/register-circle.js +1 -1
  279. package/cjs/register/register-circle.js.map +1 -1
  280. package/cjs/register/register-glyph.js +1 -1
  281. package/cjs/register/register-glyph.js.map +1 -1
  282. package/cjs/register/register-group.js +1 -1
  283. package/cjs/register/register-group.js.map +1 -1
  284. package/cjs/register/register-image.js +1 -1
  285. package/cjs/register/register-image.js.map +1 -1
  286. package/cjs/register/register-line.js +1 -1
  287. package/cjs/register/register-line.js.map +1 -1
  288. package/cjs/register/register-path.js +1 -1
  289. package/cjs/register/register-path.js.map +1 -1
  290. package/cjs/register/register-polygon.js +1 -1
  291. package/cjs/register/register-polygon.js.map +1 -1
  292. package/cjs/register/register-pyramid3d.js +1 -1
  293. package/cjs/register/register-pyramid3d.js.map +1 -1
  294. package/cjs/register/register-rect.js +1 -1
  295. package/cjs/register/register-rect.js.map +1 -1
  296. package/cjs/register/register-rect3d.js +1 -1
  297. package/cjs/register/register-rect3d.js.map +1 -1
  298. package/cjs/register/register-richtext.js +1 -1
  299. package/cjs/register/register-richtext.js.map +1 -1
  300. package/cjs/register/register-shadowRoot.js +1 -1
  301. package/cjs/register/register-shadowRoot.js.map +1 -1
  302. package/cjs/register/register-star.js +1 -1
  303. package/cjs/register/register-star.js.map +1 -1
  304. package/cjs/register/register-symbol.js +1 -1
  305. package/cjs/register/register-symbol.js.map +1 -1
  306. package/cjs/register/register-text.js +1 -1
  307. package/cjs/register/register-text.js.map +1 -1
  308. package/cjs/register/register-wraptext.js +1 -1
  309. package/cjs/register/register-wraptext.js.map +1 -1
  310. package/cjs/registry/contribution-registry.d.ts +9 -0
  311. package/cjs/registry/contribution-registry.js +33 -0
  312. package/cjs/registry/contribution-registry.js.map +1 -0
  313. package/cjs/registry/index.d.ts +5 -0
  314. package/cjs/registry/index.js +23 -0
  315. package/cjs/registry/index.js.map +1 -0
  316. package/cjs/registry/picker-registry.d.ts +10 -0
  317. package/cjs/registry/picker-registry.js +29 -0
  318. package/cjs/registry/picker-registry.js.map +1 -0
  319. package/cjs/registry/plugin-registry.d.ts +10 -0
  320. package/cjs/registry/plugin-registry.js +29 -0
  321. package/cjs/registry/plugin-registry.js.map +1 -0
  322. package/cjs/registry/renderer-registry.d.ts +11 -0
  323. package/cjs/registry/renderer-registry.js +37 -0
  324. package/cjs/registry/renderer-registry.js.map +1 -0
  325. package/cjs/registry/types.d.ts +34 -0
  326. package/cjs/registry/types.js +6 -0
  327. package/cjs/registry/types.js.map +1 -0
  328. package/cjs/render/contributions/modules.d.ts +2 -2
  329. package/cjs/render/contributions/modules.js +3 -1
  330. package/cjs/render/contributions/modules.js.map +1 -1
  331. package/cjs/render/contributions/render/arc-module.d.ts +4 -2
  332. package/cjs/render/contributions/render/arc-module.js +6 -4
  333. package/cjs/render/contributions/render/arc-module.js.map +1 -1
  334. package/cjs/render/contributions/render/arc-render.js +4 -19
  335. package/cjs/render/contributions/render/arc-render.js.map +1 -1
  336. package/cjs/render/contributions/render/arc3d-module.d.ts +4 -2
  337. package/cjs/render/contributions/render/arc3d-module.js +6 -4
  338. package/cjs/render/contributions/render/arc3d-module.js.map +1 -1
  339. package/cjs/render/contributions/render/arc3d-render.js +3 -10
  340. package/cjs/render/contributions/render/arc3d-render.js.map +1 -1
  341. package/cjs/render/contributions/render/area-module.d.ts +4 -2
  342. package/cjs/render/contributions/render/area-module.js +6 -4
  343. package/cjs/render/contributions/render/area-module.js.map +1 -1
  344. package/cjs/render/contributions/render/area-render.js +4 -19
  345. package/cjs/render/contributions/render/area-render.js.map +1 -1
  346. package/cjs/render/contributions/render/base-render.js +9 -5
  347. package/cjs/render/contributions/render/base-render.js.map +1 -1
  348. package/cjs/render/contributions/render/circle-module.d.ts +4 -2
  349. package/cjs/render/contributions/render/circle-module.js +6 -4
  350. package/cjs/render/contributions/render/circle-module.js.map +1 -1
  351. package/cjs/render/contributions/render/circle-render.js +3 -18
  352. package/cjs/render/contributions/render/circle-render.js.map +1 -1
  353. package/cjs/render/contributions/render/contributions/base-contribution-render.js +3 -18
  354. package/cjs/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  355. package/cjs/render/contributions/render/contributions/rect-contribution-render.js +5 -13
  356. package/cjs/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  357. package/cjs/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
  358. package/cjs/render/contributions/render/draw-contribution.d.ts +13 -4
  359. package/cjs/render/contributions/render/draw-contribution.js +22 -22
  360. package/cjs/render/contributions/render/draw-contribution.js.map +1 -1
  361. package/cjs/render/contributions/render/draw-interceptor.js +5 -15
  362. package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
  363. package/cjs/render/contributions/render/glyph-module.d.ts +4 -2
  364. package/cjs/render/contributions/render/glyph-module.js +6 -4
  365. package/cjs/render/contributions/render/glyph-module.js.map +1 -1
  366. package/cjs/render/contributions/render/glyph-render.js +3 -10
  367. package/cjs/render/contributions/render/glyph-render.js.map +1 -1
  368. package/cjs/render/contributions/render/graphic-render.js +1 -10
  369. package/cjs/render/contributions/render/graphic-render.js.map +1 -1
  370. package/cjs/render/contributions/render/group-render.js +4 -19
  371. package/cjs/render/contributions/render/group-render.js.map +1 -1
  372. package/cjs/render/contributions/render/image-module.d.ts +4 -2
  373. package/cjs/render/contributions/render/image-module.js +6 -4
  374. package/cjs/render/contributions/render/image-module.js.map +1 -1
  375. package/cjs/render/contributions/render/image-render.d.ts +2 -2
  376. package/cjs/render/contributions/render/image-render.js +14 -30
  377. package/cjs/render/contributions/render/image-render.js.map +1 -1
  378. package/cjs/render/contributions/render/incremental-area-render.js +3 -10
  379. package/cjs/render/contributions/render/incremental-area-render.js.map +1 -1
  380. package/cjs/render/contributions/render/incremental-draw-contribution.d.ts +2 -2
  381. package/cjs/render/contributions/render/incremental-draw-contribution.js +4 -19
  382. package/cjs/render/contributions/render/incremental-draw-contribution.js.map +1 -1
  383. package/cjs/render/contributions/render/incremental-line-render.js +3 -10
  384. package/cjs/render/contributions/render/incremental-line-render.js.map +1 -1
  385. package/cjs/render/contributions/render/line-module.d.ts +4 -2
  386. package/cjs/render/contributions/render/line-module.js +6 -4
  387. package/cjs/render/contributions/render/line-module.js.map +1 -1
  388. package/cjs/render/contributions/render/line-render.js +3 -10
  389. package/cjs/render/contributions/render/line-render.js.map +1 -1
  390. package/cjs/render/contributions/render/module.d.ts +4 -3
  391. package/cjs/render/contributions/render/module.js +10 -6
  392. package/cjs/render/contributions/render/module.js.map +1 -1
  393. package/cjs/render/contributions/render/path-module.d.ts +4 -2
  394. package/cjs/render/contributions/render/path-module.js +6 -4
  395. package/cjs/render/contributions/render/path-module.js.map +1 -1
  396. package/cjs/render/contributions/render/path-render.js +3 -18
  397. package/cjs/render/contributions/render/path-render.js.map +1 -1
  398. package/cjs/render/contributions/render/polygon-module.d.ts +4 -2
  399. package/cjs/render/contributions/render/polygon-module.js +6 -4
  400. package/cjs/render/contributions/render/polygon-module.js.map +1 -1
  401. package/cjs/render/contributions/render/polygon-render.js +3 -18
  402. package/cjs/render/contributions/render/polygon-render.js.map +1 -1
  403. package/cjs/render/contributions/render/pyramid3d-module.d.ts +4 -2
  404. package/cjs/render/contributions/render/pyramid3d-module.js +6 -4
  405. package/cjs/render/contributions/render/pyramid3d-module.js.map +1 -1
  406. package/cjs/render/contributions/render/pyramid3d-render.js +3 -10
  407. package/cjs/render/contributions/render/pyramid3d-render.js.map +1 -1
  408. package/cjs/render/contributions/render/rect-module.d.ts +4 -2
  409. package/cjs/render/contributions/render/rect-module.js +11 -8
  410. package/cjs/render/contributions/render/rect-module.js.map +1 -1
  411. package/cjs/render/contributions/render/rect-render.js +3 -18
  412. package/cjs/render/contributions/render/rect-render.js.map +1 -1
  413. package/cjs/render/contributions/render/rect3d-module.d.ts +4 -2
  414. package/cjs/render/contributions/render/rect3d-module.js +6 -4
  415. package/cjs/render/contributions/render/rect3d-module.js.map +1 -1
  416. package/cjs/render/contributions/render/rect3d-render.js +3 -10
  417. package/cjs/render/contributions/render/rect3d-render.js.map +1 -1
  418. package/cjs/render/contributions/render/render-slector.js.map +1 -1
  419. package/cjs/render/contributions/render/richtext-module.d.ts +4 -2
  420. package/cjs/render/contributions/render/richtext-module.js +6 -4
  421. package/cjs/render/contributions/render/richtext-module.js.map +1 -1
  422. package/cjs/render/contributions/render/richtext-render.js +3 -12
  423. package/cjs/render/contributions/render/richtext-render.js.map +1 -1
  424. package/cjs/render/contributions/render/star-module.d.ts +4 -2
  425. package/cjs/render/contributions/render/star-module.js +9 -6
  426. package/cjs/render/contributions/render/star-module.js.map +1 -1
  427. package/cjs/render/contributions/render/star-render.js +3 -18
  428. package/cjs/render/contributions/render/star-render.js.map +1 -1
  429. package/cjs/render/contributions/render/symbol-module.d.ts +4 -2
  430. package/cjs/render/contributions/render/symbol-module.js +6 -4
  431. package/cjs/render/contributions/render/symbol-module.js.map +1 -1
  432. package/cjs/render/contributions/render/symbol-render.js +3 -18
  433. package/cjs/render/contributions/render/symbol-render.js.map +1 -1
  434. package/cjs/render/contributions/render/text-module.d.ts +4 -2
  435. package/cjs/render/contributions/render/text-module.js +6 -4
  436. package/cjs/render/contributions/render/text-module.js.map +1 -1
  437. package/cjs/render/contributions/render/text-render.js +3 -18
  438. package/cjs/render/contributions/render/text-render.js.map +1 -1
  439. package/cjs/render/render-modules.d.ts +4 -3
  440. package/cjs/render/render-modules.js +6 -4
  441. package/cjs/render/render-modules.js.map +1 -1
  442. package/cjs/render/render-service.d.ts +1 -1
  443. package/cjs/render/render-service.js +4 -18
  444. package/cjs/render/render-service.js.map +1 -1
  445. package/dist/index.es.js +22505 -20114
  446. package/es/application.d.ts +14 -5
  447. package/es/application.js +1 -10
  448. package/es/application.js.map +1 -1
  449. package/es/canvas/empty-context.js +2 -17
  450. package/es/canvas/empty-context.js.map +1 -1
  451. package/es/canvas/util.d.ts +2 -3
  452. package/es/canvas/util.js +15 -5
  453. package/es/canvas/util.js.map +1 -1
  454. package/es/color-string/index.js +2 -1
  455. package/es/common/contribution-provider.d.ts +16 -9
  456. package/es/common/contribution-provider.js +6 -2
  457. package/es/common/contribution-provider.js.map +1 -1
  458. package/es/common/diff.js +1 -2
  459. package/es/common/enums.d.ts +2 -0
  460. package/es/common/enums.js +1 -0
  461. package/es/common/enums.js.map +1 -1
  462. package/es/common/event-transformer.js +43 -6
  463. package/es/common/event-transformer.js.map +1 -1
  464. package/es/common/explicit-binding.d.ts +5 -0
  465. package/es/common/explicit-binding.js +10 -0
  466. package/es/common/explicit-binding.js.map +1 -0
  467. package/es/common/performance-raf.d.ts +1 -0
  468. package/es/common/performance-raf.js +5 -0
  469. package/es/common/performance-raf.js.map +1 -1
  470. package/es/common/render-area.js +1 -1
  471. package/es/common/render-command-list.js +1 -1
  472. package/es/common/render-curve.js +1 -1
  473. package/es/common/render-utils.js +1 -1
  474. package/es/common/seg-context.js +1 -2
  475. package/es/common/simplify.js +1 -1
  476. package/es/common/sort.js +1 -1
  477. package/es/common/split-path.js +1 -1
  478. package/es/common/store.js +1 -1
  479. package/es/common/text.js +1 -1
  480. package/es/common/utils.js +1 -1
  481. package/es/core/application.js +1 -1
  482. package/es/core/camera.js +1 -1
  483. package/es/core/constants.js +1 -1
  484. package/es/core/contributions/env/base-contribution.js +3 -13
  485. package/es/core/contributions/env/base-contribution.js.map +1 -1
  486. package/es/core/contributions/env/modules.d.ts +4 -3
  487. package/es/core/contributions/env/modules.js +4 -4
  488. package/es/core/contributions/env/modules.js.map +1 -1
  489. package/es/core/contributions/layerHandler/canvas2d-contribution.js +2 -16
  490. package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  491. package/es/core/contributions/layerHandler/empty-contribution.js +2 -16
  492. package/es/core/contributions/layerHandler/empty-contribution.js.map +1 -1
  493. package/es/core/contributions/layerHandler/modules.d.ts +4 -3
  494. package/es/core/contributions/layerHandler/modules.js +4 -4
  495. package/es/core/contributions/layerHandler/modules.js.map +1 -1
  496. package/es/core/contributions/layerHandler/offscreen2d-contribution.js +2 -16
  497. package/es/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
  498. package/es/core/contributions/modules.d.ts +2 -2
  499. package/es/core/contributions/modules.js +7 -1
  500. package/es/core/contributions/modules.js.map +1 -1
  501. package/es/core/contributions/textMeasure/AtextMeasure.js +2 -14
  502. package/es/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  503. package/es/core/contributions/textMeasure/modules.d.ts +4 -3
  504. package/es/core/contributions/textMeasure/modules.js +4 -4
  505. package/es/core/contributions/textMeasure/modules.js.map +1 -1
  506. package/es/core/contributions/textMeasure/textMeasure-contribution.js +2 -14
  507. package/es/core/contributions/textMeasure/textMeasure-contribution.js.map +1 -1
  508. package/es/core/contributions/window/base-contribution.js +2 -16
  509. package/es/core/contributions/window/base-contribution.js.map +1 -1
  510. package/es/core/core-modules.d.ts +4 -3
  511. package/es/core/core-modules.js +13 -9
  512. package/es/core/core-modules.js.map +1 -1
  513. package/es/core/global-module.js +2 -0
  514. package/es/core/global-module.js.map +1 -1
  515. package/es/core/global.d.ts +2 -0
  516. package/es/core/global.js +8 -24
  517. package/es/core/global.js.map +1 -1
  518. package/es/core/graphic-utils.d.ts +1 -2
  519. package/es/core/graphic-utils.js +8 -35
  520. package/es/core/graphic-utils.js.map +1 -1
  521. package/es/core/index.js +1 -1
  522. package/es/core/layer-service.d.ts +7 -2
  523. package/es/core/layer-service.js +28 -34
  524. package/es/core/layer-service.js.map +1 -1
  525. package/es/core/layer.js +1 -1
  526. package/es/core/layer.js.map +1 -1
  527. package/es/core/light.js +1 -1
  528. package/es/core/stage.d.ts +19 -7
  529. package/es/core/stage.js +64 -48
  530. package/es/core/stage.js.map +1 -1
  531. package/es/core/window.d.ts +7 -5
  532. package/es/core/window.js +13 -25
  533. package/es/core/window.js.map +1 -1
  534. package/es/create.d.ts +1 -2
  535. package/es/create.js +4 -2
  536. package/es/create.js.map +1 -1
  537. package/es/entries/app-context.d.ts +30 -0
  538. package/es/entries/app-context.js +86 -0
  539. package/es/entries/app-context.js.map +1 -0
  540. package/es/entries/browser.d.ts +25 -0
  541. package/es/entries/browser.js +36 -0
  542. package/es/entries/browser.js.map +1 -0
  543. package/es/entries/index.d.ts +7 -0
  544. package/es/entries/index.js +14 -0
  545. package/es/entries/index.js.map +1 -0
  546. package/es/entries/miniapp.d.ts +6 -0
  547. package/es/entries/miniapp.js +12 -0
  548. package/es/entries/miniapp.js.map +1 -0
  549. package/es/entries/node.d.ts +6 -0
  550. package/es/entries/node.js +12 -0
  551. package/es/entries/node.js.map +1 -0
  552. package/es/entries/runtime-installer.d.ts +11 -0
  553. package/es/entries/runtime-installer.js +130 -0
  554. package/es/entries/runtime-installer.js.map +1 -0
  555. package/es/entries/types.d.ts +29 -0
  556. package/es/entries/types.js +2 -0
  557. package/es/entries/types.js.map +1 -0
  558. package/es/event/util.d.ts +1 -1
  559. package/es/factory/graphic-factory.d.ts +7 -0
  560. package/es/factory/graphic-factory.js +15 -0
  561. package/es/factory/graphic-factory.js.map +1 -0
  562. package/es/factory/index.d.ts +4 -0
  563. package/es/factory/index.js +8 -0
  564. package/es/factory/index.js.map +1 -0
  565. package/es/factory/layer-factory.d.ts +7 -0
  566. package/es/factory/layer-factory.js +11 -0
  567. package/es/factory/layer-factory.js.map +1 -0
  568. package/es/factory/stage-factory.d.ts +8 -0
  569. package/es/factory/stage-factory.js +12 -0
  570. package/es/factory/stage-factory.js.map +1 -0
  571. package/es/factory/types.d.ts +34 -0
  572. package/es/factory/types.js +2 -0
  573. package/es/factory/types.js.map +1 -0
  574. package/es/factory.d.ts +1 -0
  575. package/es/factory.js +2 -0
  576. package/es/factory.js.map +1 -1
  577. package/es/global.d.ts +2 -0
  578. package/es/global.js +10 -0
  579. package/es/global.js.map +1 -0
  580. package/es/graphic/area.js +1 -1
  581. package/es/graphic/area.js.map +1 -1
  582. package/es/graphic/bounds.js +3 -3
  583. package/es/graphic/bounds.js.map +1 -1
  584. package/es/graphic/config.js +0 -1
  585. package/es/graphic/config.js.map +1 -1
  586. package/es/graphic/glyph.js +9 -3
  587. package/es/graphic/glyph.js.map +1 -1
  588. package/es/graphic/graphic-creator.d.ts +9 -4
  589. package/es/graphic/graphic-creator.js +32 -5
  590. package/es/graphic/graphic-creator.js.map +1 -1
  591. package/es/graphic/graphic-service/graphic-module.d.ts +4 -3
  592. package/es/graphic/graphic-service/graphic-module.js +4 -4
  593. package/es/graphic/graphic-service/graphic-module.js.map +1 -1
  594. package/es/graphic/graphic-service/graphic-service.d.ts +2 -3
  595. package/es/graphic/graphic-service/graphic-service.js +6 -25
  596. package/es/graphic/graphic-service/graphic-service.js.map +1 -1
  597. package/es/graphic/graphic.d.ts +80 -11
  598. package/es/graphic/graphic.js +473 -139
  599. package/es/graphic/graphic.js.map +1 -1
  600. package/es/graphic/group.d.ts +11 -1
  601. package/es/graphic/group.js +46 -10
  602. package/es/graphic/group.js.map +1 -1
  603. package/es/graphic/index.d.ts +3 -0
  604. package/es/graphic/index.js +4 -0
  605. package/es/graphic/index.js.map +1 -1
  606. package/es/graphic/line.js +1 -1
  607. package/es/graphic/line.js.map +1 -1
  608. package/es/graphic/state/attribute-update-classifier.d.ts +13 -0
  609. package/es/graphic/state/attribute-update-classifier.js +61 -0
  610. package/es/graphic/state/attribute-update-classifier.js.map +1 -0
  611. package/es/graphic/state/shared-state-refresh.d.ts +6 -0
  612. package/es/graphic/state/shared-state-refresh.js +46 -0
  613. package/es/graphic/state/shared-state-refresh.js.map +1 -0
  614. package/es/graphic/state/shared-state-scope.d.ts +25 -0
  615. package/es/graphic/state/shared-state-scope.js +90 -0
  616. package/es/graphic/state/shared-state-scope.js.map +1 -0
  617. package/es/graphic/state/state-batch-scheduler.d.ts +42 -0
  618. package/es/graphic/state/state-batch-scheduler.js +278 -0
  619. package/es/graphic/state/state-batch-scheduler.js.map +1 -0
  620. package/es/graphic/state/state-definition-compiler.d.ts +6 -0
  621. package/es/graphic/state/state-definition-compiler.js +83 -0
  622. package/es/graphic/state/state-definition-compiler.js.map +1 -0
  623. package/es/graphic/state/state-definition.d.ts +44 -0
  624. package/es/graphic/state/state-definition.js +2 -0
  625. package/es/graphic/state/state-definition.js.map +1 -0
  626. package/es/graphic/state/state-engine.d.ts +38 -0
  627. package/es/graphic/state/state-engine.js +212 -0
  628. package/es/graphic/state/state-engine.js.map +1 -0
  629. package/es/graphic/state/state-model.d.ts +43 -0
  630. package/es/graphic/state/state-model.js +135 -0
  631. package/es/graphic/state/state-model.js.map +1 -0
  632. package/es/graphic/state/state-perf-monitor.d.ts +119 -0
  633. package/es/graphic/state/state-perf-monitor.js +207 -0
  634. package/es/graphic/state/state-perf-monitor.js.map +1 -0
  635. package/es/graphic/state/state-style-resolver.d.ts +22 -0
  636. package/es/graphic/state/state-style-resolver.js +65 -0
  637. package/es/graphic/state/state-style-resolver.js.map +1 -0
  638. package/es/graphic/state/state-transition-orchestrator.d.ts +41 -0
  639. package/es/graphic/state/state-transition-orchestrator.js +68 -0
  640. package/es/graphic/state/state-transition-orchestrator.js.map +1 -0
  641. package/es/graphic/text.d.ts +3 -2
  642. package/es/graphic/text.js +22 -13
  643. package/es/graphic/text.js.map +1 -1
  644. package/es/graphic/theme.d.ts +5 -0
  645. package/es/graphic/theme.js +7 -0
  646. package/es/graphic/theme.js.map +1 -1
  647. package/es/graphic/wrap-text.d.ts +1 -1
  648. package/es/graphic/wrap-text.js +18 -13
  649. package/es/graphic/wrap-text.js.map +1 -1
  650. package/es/index.d.ts +7 -4
  651. package/es/index.js +12 -6
  652. package/es/index.js.map +1 -1
  653. package/es/interface/global.d.ts +2 -0
  654. package/es/interface/global.js.map +1 -1
  655. package/es/interface/graphic/group.d.ts +6 -0
  656. package/es/interface/graphic/group.js.map +1 -1
  657. package/es/interface/graphic/theme.d.ts +3 -0
  658. package/es/interface/graphic/theme.js.map +1 -1
  659. package/es/interface/graphic.d.ts +24 -26
  660. package/es/interface/graphic.js.map +1 -1
  661. package/es/interface/plugin.d.ts +2 -0
  662. package/es/interface/plugin.js.map +1 -1
  663. package/es/interface/stage.d.ts +11 -3
  664. package/es/interface/stage.js.map +1 -1
  665. package/es/interface/theme-service.js.map +1 -1
  666. package/es/legacy/binding-context.d.ts +24 -0
  667. package/es/legacy/binding-context.js +90 -0
  668. package/es/legacy/binding-context.js.map +1 -0
  669. package/es/legacy/bootstrap.d.ts +10 -0
  670. package/es/legacy/bootstrap.js +73 -0
  671. package/es/legacy/bootstrap.js.map +1 -0
  672. package/es/legacy/module-types.d.ts +2 -0
  673. package/es/legacy/module-types.js +2 -0
  674. package/es/legacy/module-types.js.map +1 -0
  675. package/es/modules.d.ts +5 -6
  676. package/es/modules.js +37 -33
  677. package/es/modules.js.map +1 -1
  678. package/es/picker/global-picker-service.js +2 -16
  679. package/es/picker/global-picker-service.js.map +1 -1
  680. package/es/picker/pick-interceptor.js +8 -32
  681. package/es/picker/pick-interceptor.js.map +1 -1
  682. package/es/picker/pick-modules.d.ts +5 -3
  683. package/es/picker/pick-modules.js +4 -4
  684. package/es/picker/pick-modules.js.map +1 -1
  685. package/es/picker/picker-service.d.ts +13 -4
  686. package/es/picker/picker-service.js +16 -26
  687. package/es/picker/picker-service.js.map +1 -1
  688. package/es/plugins/base-plugin.d.ts +8 -0
  689. package/es/plugins/base-plugin.js +7 -0
  690. package/es/plugins/base-plugin.js.map +1 -0
  691. package/es/plugins/browser-env-plugin.d.ts +8 -0
  692. package/es/plugins/browser-env-plugin.js +16 -0
  693. package/es/plugins/browser-env-plugin.js.map +1 -0
  694. package/es/plugins/builtin-plugin/dirty-bounds-plugin.d.ts +4 -1
  695. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js +26 -3
  696. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  697. package/es/plugins/builtin-plugin/richtext-edit-plugin.js +3 -1
  698. package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  699. package/es/plugins/index.d.ts +5 -0
  700. package/es/plugins/index.js +10 -0
  701. package/es/plugins/index.js.map +1 -0
  702. package/es/plugins/picker-plugin.d.ts +7 -0
  703. package/es/plugins/picker-plugin.js +11 -0
  704. package/es/plugins/picker-plugin.js.map +1 -0
  705. package/es/plugins/plugin-modules.d.ts +4 -3
  706. package/es/plugins/plugin-modules.js +4 -4
  707. package/es/plugins/plugin-modules.js.map +1 -1
  708. package/es/plugins/plugin-service.d.ts +16 -2
  709. package/es/plugins/plugin-service.js +25 -32
  710. package/es/plugins/plugin-service.js.map +1 -1
  711. package/es/plugins/renderer-plugin.d.ts +7 -0
  712. package/es/plugins/renderer-plugin.js +11 -0
  713. package/es/plugins/renderer-plugin.js.map +1 -0
  714. package/es/plugins/types.d.ts +28 -0
  715. package/es/plugins/types.js +2 -0
  716. package/es/plugins/types.js.map +1 -0
  717. package/es/register/register-arc.js +2 -2
  718. package/es/register/register-arc.js.map +1 -1
  719. package/es/register/register-arc3d.js +2 -2
  720. package/es/register/register-arc3d.js.map +1 -1
  721. package/es/register/register-area.js +2 -2
  722. package/es/register/register-area.js.map +1 -1
  723. package/es/register/register-circle.js +2 -2
  724. package/es/register/register-circle.js.map +1 -1
  725. package/es/register/register-glyph.js +2 -2
  726. package/es/register/register-glyph.js.map +1 -1
  727. package/es/register/register-group.js +2 -2
  728. package/es/register/register-group.js.map +1 -1
  729. package/es/register/register-image.js +2 -2
  730. package/es/register/register-image.js.map +1 -1
  731. package/es/register/register-line.js +2 -2
  732. package/es/register/register-line.js.map +1 -1
  733. package/es/register/register-path.js +2 -2
  734. package/es/register/register-path.js.map +1 -1
  735. package/es/register/register-polygon.js +2 -2
  736. package/es/register/register-polygon.js.map +1 -1
  737. package/es/register/register-pyramid3d.js +2 -2
  738. package/es/register/register-pyramid3d.js.map +1 -1
  739. package/es/register/register-rect.js +2 -2
  740. package/es/register/register-rect.js.map +1 -1
  741. package/es/register/register-rect3d.js +2 -2
  742. package/es/register/register-rect3d.js.map +1 -1
  743. package/es/register/register-richtext.js +2 -2
  744. package/es/register/register-richtext.js.map +1 -1
  745. package/es/register/register-shadowRoot.js +2 -2
  746. package/es/register/register-shadowRoot.js.map +1 -1
  747. package/es/register/register-star.js +2 -2
  748. package/es/register/register-star.js.map +1 -1
  749. package/es/register/register-symbol.js +2 -2
  750. package/es/register/register-symbol.js.map +1 -1
  751. package/es/register/register-text.js +2 -2
  752. package/es/register/register-text.js.map +1 -1
  753. package/es/register/register-wraptext.js +2 -2
  754. package/es/register/register-wraptext.js.map +1 -1
  755. package/es/registry/contribution-registry.d.ts +9 -0
  756. package/es/registry/contribution-registry.js +25 -0
  757. package/es/registry/contribution-registry.js.map +1 -0
  758. package/es/registry/index.d.ts +5 -0
  759. package/es/registry/index.js +10 -0
  760. package/es/registry/index.js.map +1 -0
  761. package/es/registry/picker-registry.d.ts +10 -0
  762. package/es/registry/picker-registry.js +21 -0
  763. package/es/registry/picker-registry.js.map +1 -0
  764. package/es/registry/plugin-registry.d.ts +10 -0
  765. package/es/registry/plugin-registry.js +21 -0
  766. package/es/registry/plugin-registry.js.map +1 -0
  767. package/es/registry/renderer-registry.d.ts +11 -0
  768. package/es/registry/renderer-registry.js +29 -0
  769. package/es/registry/renderer-registry.js.map +1 -0
  770. package/es/registry/types.d.ts +34 -0
  771. package/es/registry/types.js +2 -0
  772. package/es/registry/types.js.map +1 -0
  773. package/es/render/contributions/modules.d.ts +2 -2
  774. package/es/render/contributions/modules.js +3 -1
  775. package/es/render/contributions/modules.js.map +1 -1
  776. package/es/render/contributions/render/arc-module.d.ts +4 -2
  777. package/es/render/contributions/render/arc-module.js +4 -4
  778. package/es/render/contributions/render/arc-module.js.map +1 -1
  779. package/es/render/contributions/render/arc-render.js +2 -24
  780. package/es/render/contributions/render/arc-render.js.map +1 -1
  781. package/es/render/contributions/render/arc3d-module.d.ts +4 -2
  782. package/es/render/contributions/render/arc3d-module.js +4 -4
  783. package/es/render/contributions/render/arc3d-module.js.map +1 -1
  784. package/es/render/contributions/render/arc3d-render.js +2 -14
  785. package/es/render/contributions/render/arc3d-render.js.map +1 -1
  786. package/es/render/contributions/render/area-module.d.ts +4 -2
  787. package/es/render/contributions/render/area-module.js +4 -4
  788. package/es/render/contributions/render/area-module.js.map +1 -1
  789. package/es/render/contributions/render/area-render.js +2 -24
  790. package/es/render/contributions/render/area-render.js.map +1 -1
  791. package/es/render/contributions/render/base-render.js +8 -5
  792. package/es/render/contributions/render/base-render.js.map +1 -1
  793. package/es/render/contributions/render/circle-module.d.ts +4 -2
  794. package/es/render/contributions/render/circle-module.js +4 -4
  795. package/es/render/contributions/render/circle-module.js.map +1 -1
  796. package/es/render/contributions/render/circle-render.js +2 -24
  797. package/es/render/contributions/render/circle-render.js.map +1 -1
  798. package/es/render/contributions/render/contributions/base-contribution-render.js +2 -24
  799. package/es/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  800. package/es/render/contributions/render/contributions/rect-contribution-render.js +4 -20
  801. package/es/render/contributions/render/contributions/rect-contribution-render.js.map +1 -1
  802. package/es/render/contributions/render/contributions/text-contribution-render.js.map +1 -1
  803. package/es/render/contributions/render/draw-contribution.d.ts +13 -4
  804. package/es/render/contributions/render/draw-contribution.js +24 -34
  805. package/es/render/contributions/render/draw-contribution.js.map +1 -1
  806. package/es/render/contributions/render/draw-interceptor.js +4 -19
  807. package/es/render/contributions/render/draw-interceptor.js.map +1 -1
  808. package/es/render/contributions/render/glyph-module.d.ts +4 -2
  809. package/es/render/contributions/render/glyph-module.js +4 -4
  810. package/es/render/contributions/render/glyph-module.js.map +1 -1
  811. package/es/render/contributions/render/glyph-render.js +2 -14
  812. package/es/render/contributions/render/glyph-render.js.map +1 -1
  813. package/es/render/contributions/render/graphic-render.js +1 -13
  814. package/es/render/contributions/render/graphic-render.js.map +1 -1
  815. package/es/render/contributions/render/group-render.js +2 -24
  816. package/es/render/contributions/render/group-render.js.map +1 -1
  817. package/es/render/contributions/render/image-module.d.ts +4 -2
  818. package/es/render/contributions/render/image-module.js +4 -4
  819. package/es/render/contributions/render/image-module.js.map +1 -1
  820. package/es/render/contributions/render/image-render.d.ts +2 -2
  821. package/es/render/contributions/render/image-render.js +9 -31
  822. package/es/render/contributions/render/image-render.js.map +1 -1
  823. package/es/render/contributions/render/incremental-area-render.js +2 -14
  824. package/es/render/contributions/render/incremental-area-render.js.map +1 -1
  825. package/es/render/contributions/render/incremental-draw-contribution.d.ts +2 -2
  826. package/es/render/contributions/render/incremental-draw-contribution.js +3 -29
  827. package/es/render/contributions/render/incremental-draw-contribution.js.map +1 -1
  828. package/es/render/contributions/render/incremental-line-render.js +2 -14
  829. package/es/render/contributions/render/incremental-line-render.js.map +1 -1
  830. package/es/render/contributions/render/line-module.d.ts +4 -2
  831. package/es/render/contributions/render/line-module.js +4 -4
  832. package/es/render/contributions/render/line-module.js.map +1 -1
  833. package/es/render/contributions/render/line-render.js +2 -14
  834. package/es/render/contributions/render/line-render.js.map +1 -1
  835. package/es/render/contributions/render/module.d.ts +4 -3
  836. package/es/render/contributions/render/module.js +10 -10
  837. package/es/render/contributions/render/module.js.map +1 -1
  838. package/es/render/contributions/render/path-module.d.ts +4 -2
  839. package/es/render/contributions/render/path-module.js +4 -4
  840. package/es/render/contributions/render/path-module.js.map +1 -1
  841. package/es/render/contributions/render/path-render.js +2 -24
  842. package/es/render/contributions/render/path-render.js.map +1 -1
  843. package/es/render/contributions/render/polygon-module.d.ts +4 -2
  844. package/es/render/contributions/render/polygon-module.js +4 -4
  845. package/es/render/contributions/render/polygon-module.js.map +1 -1
  846. package/es/render/contributions/render/polygon-render.js +2 -24
  847. package/es/render/contributions/render/polygon-render.js.map +1 -1
  848. package/es/render/contributions/render/pyramid3d-module.d.ts +4 -2
  849. package/es/render/contributions/render/pyramid3d-module.js +4 -4
  850. package/es/render/contributions/render/pyramid3d-module.js.map +1 -1
  851. package/es/render/contributions/render/pyramid3d-render.js +2 -14
  852. package/es/render/contributions/render/pyramid3d-render.js.map +1 -1
  853. package/es/render/contributions/render/rect-module.d.ts +4 -2
  854. package/es/render/contributions/render/rect-module.js +7 -7
  855. package/es/render/contributions/render/rect-module.js.map +1 -1
  856. package/es/render/contributions/render/rect-render.js +2 -24
  857. package/es/render/contributions/render/rect-render.js.map +1 -1
  858. package/es/render/contributions/render/rect3d-module.d.ts +4 -2
  859. package/es/render/contributions/render/rect3d-module.js +4 -4
  860. package/es/render/contributions/render/rect3d-module.js.map +1 -1
  861. package/es/render/contributions/render/rect3d-render.js +2 -14
  862. package/es/render/contributions/render/rect3d-render.js.map +1 -1
  863. package/es/render/contributions/render/render-slector.js.map +1 -1
  864. package/es/render/contributions/render/richtext-module.d.ts +4 -2
  865. package/es/render/contributions/render/richtext-module.js +4 -4
  866. package/es/render/contributions/render/richtext-module.js.map +1 -1
  867. package/es/render/contributions/render/richtext-render.js +2 -16
  868. package/es/render/contributions/render/richtext-render.js.map +1 -1
  869. package/es/render/contributions/render/star-module.d.ts +4 -2
  870. package/es/render/contributions/render/star-module.js +9 -5
  871. package/es/render/contributions/render/star-module.js.map +1 -1
  872. package/es/render/contributions/render/star-render.js +2 -24
  873. package/es/render/contributions/render/star-render.js.map +1 -1
  874. package/es/render/contributions/render/symbol-module.d.ts +4 -2
  875. package/es/render/contributions/render/symbol-module.js +4 -4
  876. package/es/render/contributions/render/symbol-module.js.map +1 -1
  877. package/es/render/contributions/render/symbol-render.js +2 -24
  878. package/es/render/contributions/render/symbol-render.js.map +1 -1
  879. package/es/render/contributions/render/text-module.d.ts +4 -2
  880. package/es/render/contributions/render/text-module.js +4 -4
  881. package/es/render/contributions/render/text-module.js.map +1 -1
  882. package/es/render/contributions/render/text-render.js +2 -24
  883. package/es/render/contributions/render/text-render.js.map +1 -1
  884. package/es/render/render-modules.d.ts +4 -3
  885. package/es/render/render-modules.js +4 -4
  886. package/es/render/render-modules.js.map +1 -1
  887. package/es/render/render-service.d.ts +1 -1
  888. package/es/render/render-service.js +4 -22
  889. package/es/render/render-service.js.map +1 -1
  890. package/package.json +8 -7
  891. package/cjs/common/inversify/annotation/inject.d.ts +0 -1
  892. package/cjs/common/inversify/annotation/inject.js +0 -10
  893. package/cjs/common/inversify/annotation/inject.js.map +0 -1
  894. package/cjs/common/inversify/annotation/inject_base.d.ts +0 -14
  895. package/cjs/common/inversify/annotation/inject_base.js +0 -39
  896. package/cjs/common/inversify/annotation/inject_base.js.map +0 -1
  897. package/cjs/common/inversify/annotation/injectable.d.ts +0 -1
  898. package/cjs/common/inversify/annotation/injectable.js +0 -46
  899. package/cjs/common/inversify/annotation/injectable.js.map +0 -1
  900. package/cjs/common/inversify/annotation/multi_inject.d.ts +0 -1
  901. package/cjs/common/inversify/annotation/multi_inject.js +0 -10
  902. package/cjs/common/inversify/annotation/multi_inject.js.map +0 -1
  903. package/cjs/common/inversify/annotation/named.d.ts +0 -1
  904. package/cjs/common/inversify/annotation/named.js +0 -14
  905. package/cjs/common/inversify/annotation/named.js.map +0 -1
  906. package/cjs/common/inversify/annotation/optional.d.ts +0 -2
  907. package/cjs/common/inversify/annotation/optional.js +0 -14
  908. package/cjs/common/inversify/annotation/optional.js.map +0 -1
  909. package/cjs/common/inversify/binding.d.ts +0 -18
  910. package/cjs/common/inversify/binding.js +0 -26
  911. package/cjs/common/inversify/binding.js.map +0 -1
  912. package/cjs/common/inversify/container.d.ts +0 -28
  913. package/cjs/common/inversify/container.js +0 -158
  914. package/cjs/common/inversify/container.js.map +0 -1
  915. package/cjs/common/inversify/cotainer-module.d.ts +0 -6
  916. package/cjs/common/inversify/cotainer-module.js +0 -16
  917. package/cjs/common/inversify/cotainer-module.js.map +0 -1
  918. package/cjs/common/inversify/index.d.ts +0 -7
  919. package/cjs/common/inversify/index.js +0 -75
  920. package/cjs/common/inversify/index.js.map +0 -1
  921. package/cjs/common/inversify/interfaces.d.ts +0 -218
  922. package/cjs/common/inversify/interfaces.js.map +0 -1
  923. package/cjs/common/inversify/literal_types.d.ts +0 -5
  924. package/cjs/common/inversify/literal_types.js +0 -34
  925. package/cjs/common/inversify/literal_types.js.map +0 -1
  926. package/cjs/common/inversify/meta-data.d.ts +0 -6
  927. package/cjs/common/inversify/meta-data.js +0 -19
  928. package/cjs/common/inversify/meta-data.js.map +0 -1
  929. package/cjs/common/inversify/metadata_keys.d.ts +0 -12
  930. package/cjs/common/inversify/metadata_keys.js +0 -15
  931. package/cjs/common/inversify/metadata_keys.js.map +0 -1
  932. package/cjs/common/inversify/metadata_reader.d.ts +0 -6
  933. package/cjs/common/inversify/metadata_reader.js +0 -28
  934. package/cjs/common/inversify/metadata_reader.js.map +0 -1
  935. package/cjs/common/inversify/syntax/binding_in_syntax.d.ts +0 -10
  936. package/cjs/common/inversify/syntax/binding_in_syntax.js +0 -29
  937. package/cjs/common/inversify/syntax/binding_in_syntax.js.map +0 -1
  938. package/cjs/common/inversify/syntax/binding_to_syntax.d.ts +0 -12
  939. package/cjs/common/inversify/syntax/binding_to_syntax.js +0 -40
  940. package/cjs/common/inversify/syntax/binding_to_syntax.js.map +0 -1
  941. package/cjs/common/inversify/syntax/constraint_helpers.d.ts +0 -2
  942. package/cjs/common/inversify/syntax/constraint_helpers.js +0 -20
  943. package/cjs/common/inversify/syntax/constraint_helpers.js.map +0 -1
  944. package/cjs/common/inversify-lite/annotation/decorator_utils.d.ts +0 -16
  945. package/cjs/common/inversify-lite/annotation/decorator_utils.js +0 -97
  946. package/cjs/common/inversify-lite/annotation/decorator_utils.js.map +0 -1
  947. package/cjs/common/inversify-lite/annotation/inject.d.ts +0 -2
  948. package/cjs/common/inversify-lite/annotation/inject.js +0 -36
  949. package/cjs/common/inversify-lite/annotation/inject.js.map +0 -1
  950. package/cjs/common/inversify-lite/annotation/inject_base.d.ts +0 -3
  951. package/cjs/common/inversify-lite/annotation/inject_base.js +0 -20
  952. package/cjs/common/inversify-lite/annotation/inject_base.js.map +0 -1
  953. package/cjs/common/inversify-lite/annotation/injectable.d.ts +0 -2
  954. package/cjs/common/inversify-lite/annotation/injectable.js +0 -48
  955. package/cjs/common/inversify-lite/annotation/injectable.js.map +0 -1
  956. package/cjs/common/inversify-lite/annotation/lazy_service_identifier.d.ts +0 -7
  957. package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js +0 -17
  958. package/cjs/common/inversify-lite/annotation/lazy_service_identifier.js.map +0 -1
  959. package/cjs/common/inversify-lite/annotation/multi_inject.d.ts +0 -2
  960. package/cjs/common/inversify-lite/annotation/multi_inject.js +0 -36
  961. package/cjs/common/inversify-lite/annotation/multi_inject.js.map +0 -1
  962. package/cjs/common/inversify-lite/annotation/named.d.ts +0 -2
  963. package/cjs/common/inversify-lite/annotation/named.js +0 -39
  964. package/cjs/common/inversify-lite/annotation/named.js.map +0 -1
  965. package/cjs/common/inversify-lite/annotation/property_event_decorator.d.ts +0 -4
  966. package/cjs/common/inversify-lite/annotation/property_event_decorator.js +0 -24
  967. package/cjs/common/inversify-lite/annotation/property_event_decorator.js.map +0 -1
  968. package/cjs/common/inversify-lite/bindings/binding.d.ts +0 -20
  969. package/cjs/common/inversify-lite/bindings/binding.js +0 -27
  970. package/cjs/common/inversify-lite/bindings/binding.js.map +0 -1
  971. package/cjs/common/inversify-lite/bindings/binding_count.d.ts +0 -5
  972. package/cjs/common/inversify-lite/bindings/binding_count.js +0 -10
  973. package/cjs/common/inversify-lite/bindings/binding_count.js.map +0 -1
  974. package/cjs/common/inversify-lite/constants/error_msgs.d.ts +0 -32
  975. package/cjs/common/inversify-lite/constants/error_msgs.js +0 -50
  976. package/cjs/common/inversify-lite/constants/error_msgs.js.map +0 -1
  977. package/cjs/common/inversify-lite/constants/literal_types.d.ts +0 -5
  978. package/cjs/common/inversify-lite/constants/literal_types.js +0 -35
  979. package/cjs/common/inversify-lite/constants/literal_types.js.map +0 -1
  980. package/cjs/common/inversify-lite/constants/metadata_keys.d.ts +0 -13
  981. package/cjs/common/inversify-lite/constants/metadata_keys.js +0 -16
  982. package/cjs/common/inversify-lite/constants/metadata_keys.js.map +0 -1
  983. package/cjs/common/inversify-lite/container/container.d.ts +0 -46
  984. package/cjs/common/inversify-lite/container/container.js +0 -290
  985. package/cjs/common/inversify-lite/container/container.js.map +0 -1
  986. package/cjs/common/inversify-lite/container/container_module.d.ts +0 -11
  987. package/cjs/common/inversify-lite/container/container_module.js +0 -24
  988. package/cjs/common/inversify-lite/container/container_module.js.map +0 -1
  989. package/cjs/common/inversify-lite/container/lookup.d.ts +0 -16
  990. package/cjs/common/inversify-lite/container/lookup.js +0 -97
  991. package/cjs/common/inversify-lite/container/lookup.js.map +0 -1
  992. package/cjs/common/inversify-lite/index.d.ts +0 -1
  993. package/cjs/common/inversify-lite/index.js.map +0 -1
  994. package/cjs/common/inversify-lite/interfaces/interfaces.d.ts +0 -237
  995. package/cjs/common/inversify-lite/interfaces/interfaces.js.map +0 -1
  996. package/cjs/common/inversify-lite/planning/context.d.ts +0 -11
  997. package/cjs/common/inversify-lite/planning/context.js +0 -22
  998. package/cjs/common/inversify-lite/planning/context.js.map +0 -1
  999. package/cjs/common/inversify-lite/planning/metadata.d.ts +0 -8
  1000. package/cjs/common/inversify-lite/planning/metadata.js +0 -44
  1001. package/cjs/common/inversify-lite/planning/metadata.js.map +0 -1
  1002. package/cjs/common/inversify-lite/planning/metadata_reader.d.ts +0 -6
  1003. package/cjs/common/inversify-lite/planning/metadata_reader.js +0 -51
  1004. package/cjs/common/inversify-lite/planning/metadata_reader.js.map +0 -1
  1005. package/cjs/common/inversify-lite/planning/plan.d.ts +0 -7
  1006. package/cjs/common/inversify-lite/planning/plan.js +0 -14
  1007. package/cjs/common/inversify-lite/planning/plan.js.map +0 -1
  1008. package/cjs/common/inversify-lite/planning/planner.d.ts +0 -5
  1009. package/cjs/common/inversify-lite/planning/planner.js +0 -132
  1010. package/cjs/common/inversify-lite/planning/planner.js.map +0 -1
  1011. package/cjs/common/inversify-lite/planning/queryable_string.d.ts +0 -9
  1012. package/cjs/common/inversify-lite/planning/queryable_string.js +0 -23
  1013. package/cjs/common/inversify-lite/planning/queryable_string.js.map +0 -1
  1014. package/cjs/common/inversify-lite/planning/reflection_utils.d.ts +0 -5
  1015. package/cjs/common/inversify-lite/planning/reflection_utils.js +0 -129
  1016. package/cjs/common/inversify-lite/planning/reflection_utils.js.map +0 -1
  1017. package/cjs/common/inversify-lite/planning/request.d.ts +0 -14
  1018. package/cjs/common/inversify-lite/planning/request.js +0 -22
  1019. package/cjs/common/inversify-lite/planning/request.js.map +0 -1
  1020. package/cjs/common/inversify-lite/planning/target.d.ts +0 -23
  1021. package/cjs/common/inversify-lite/planning/target.js +0 -81
  1022. package/cjs/common/inversify-lite/planning/target.js.map +0 -1
  1023. package/cjs/common/inversify-lite/resolution/instantiation.d.ts +0 -3
  1024. package/cjs/common/inversify-lite/resolution/instantiation.js +0 -143
  1025. package/cjs/common/inversify-lite/resolution/instantiation.js.map +0 -1
  1026. package/cjs/common/inversify-lite/resolution/resolver.d.ts +0 -3
  1027. package/cjs/common/inversify-lite/resolution/resolver.js +0 -74
  1028. package/cjs/common/inversify-lite/resolution/resolver.js.map +0 -1
  1029. package/cjs/common/inversify-lite/scope/scope.d.ts +0 -3
  1030. package/cjs/common/inversify-lite/scope/scope.js +0 -56
  1031. package/cjs/common/inversify-lite/scope/scope.js.map +0 -1
  1032. package/cjs/common/inversify-lite/syntax/binding_in_syntax.d.ts +0 -9
  1033. package/cjs/common/inversify-lite/syntax/binding_in_syntax.js +0 -25
  1034. package/cjs/common/inversify-lite/syntax/binding_in_syntax.js.map +0 -1
  1035. package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.d.ts +0 -12
  1036. package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -29
  1037. package/cjs/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +0 -1
  1038. package/cjs/common/inversify-lite/syntax/binding_on_syntax.d.ts +0 -6
  1039. package/cjs/common/inversify-lite/syntax/binding_on_syntax.js +0 -14
  1040. package/cjs/common/inversify-lite/syntax/binding_on_syntax.js.map +0 -1
  1041. package/cjs/common/inversify-lite/syntax/binding_to_syntax.d.ts +0 -18
  1042. package/cjs/common/inversify-lite/syntax/binding_to_syntax.js +0 -88
  1043. package/cjs/common/inversify-lite/syntax/binding_to_syntax.js.map +0 -1
  1044. package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.d.ts +0 -8
  1045. package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -19
  1046. package/cjs/common/inversify-lite/syntax/binding_when_on_syntax.js.map +0 -1
  1047. package/cjs/common/inversify-lite/syntax/binding_when_syntax.d.ts +0 -7
  1048. package/cjs/common/inversify-lite/syntax/binding_when_syntax.js +0 -20
  1049. package/cjs/common/inversify-lite/syntax/binding_when_syntax.js.map +0 -1
  1050. package/cjs/common/inversify-lite/syntax/constraint_helpers.d.ts +0 -3
  1051. package/cjs/common/inversify-lite/syntax/constraint_helpers.js +0 -38
  1052. package/cjs/common/inversify-lite/syntax/constraint_helpers.js.map +0 -1
  1053. package/cjs/common/inversify-lite/utils/async.d.ts +0 -3
  1054. package/cjs/common/inversify-lite/utils/async.js +0 -15
  1055. package/cjs/common/inversify-lite/utils/async.js.map +0 -1
  1056. package/cjs/common/inversify-lite/utils/binding_utils.d.ts +0 -4
  1057. package/cjs/common/inversify-lite/utils/binding_utils.js +0 -94
  1058. package/cjs/common/inversify-lite/utils/binding_utils.js.map +0 -1
  1059. package/cjs/common/inversify-lite/utils/clonable.d.ts +0 -3
  1060. package/cjs/common/inversify-lite/utils/clonable.js +0 -10
  1061. package/cjs/common/inversify-lite/utils/clonable.js.map +0 -1
  1062. package/cjs/common/inversify-lite/utils/exceptions.d.ts +0 -2
  1063. package/cjs/common/inversify-lite/utils/exceptions.js +0 -43
  1064. package/cjs/common/inversify-lite/utils/exceptions.js.map +0 -1
  1065. package/cjs/common/inversify-lite/utils/factory_type.d.ts +0 -5
  1066. package/cjs/common/inversify-lite/utils/factory_type.js +0 -11
  1067. package/cjs/common/inversify-lite/utils/factory_type.js.map +0 -1
  1068. package/cjs/common/inversify-lite/utils/id.d.ts +0 -2
  1069. package/cjs/common/inversify-lite/utils/id.js +0 -14
  1070. package/cjs/common/inversify-lite/utils/id.js.map +0 -1
  1071. package/cjs/common/inversify-lite/utils/js.d.ts +0 -1
  1072. package/cjs/common/inversify-lite/utils/js.js +0 -14
  1073. package/cjs/common/inversify-lite/utils/js.js.map +0 -1
  1074. package/cjs/common/inversify-lite/utils/serialization.d.ts +0 -10
  1075. package/cjs/common/inversify-lite/utils/serialization.js +0 -99
  1076. package/cjs/common/inversify-lite/utils/serialization.js.map +0 -1
  1077. package/cjs/container.d.ts +0 -2
  1078. package/cjs/container.js +0 -10
  1079. package/cjs/container.js.map +0 -1
  1080. package/es/common/inversify/annotation/inject.d.ts +0 -1
  1081. package/es/common/inversify/annotation/inject.js +0 -6
  1082. package/es/common/inversify/annotation/inject.js.map +0 -1
  1083. package/es/common/inversify/annotation/inject_base.d.ts +0 -14
  1084. package/es/common/inversify/annotation/inject_base.js +0 -29
  1085. package/es/common/inversify/annotation/inject_base.js.map +0 -1
  1086. package/es/common/inversify/annotation/injectable.d.ts +0 -1
  1087. package/es/common/inversify/annotation/injectable.js +0 -10
  1088. package/es/common/inversify/annotation/injectable.js.map +0 -1
  1089. package/es/common/inversify/annotation/multi_inject.d.ts +0 -1
  1090. package/es/common/inversify/annotation/multi_inject.js +0 -6
  1091. package/es/common/inversify/annotation/multi_inject.js.map +0 -1
  1092. package/es/common/inversify/annotation/named.d.ts +0 -1
  1093. package/es/common/inversify/annotation/named.js +0 -10
  1094. package/es/common/inversify/annotation/named.js.map +0 -1
  1095. package/es/common/inversify/annotation/optional.d.ts +0 -2
  1096. package/es/common/inversify/annotation/optional.js +0 -12
  1097. package/es/common/inversify/annotation/optional.js.map +0 -1
  1098. package/es/common/inversify/binding.d.ts +0 -18
  1099. package/es/common/inversify/binding.js +0 -22
  1100. package/es/common/inversify/binding.js.map +0 -1
  1101. package/es/common/inversify/container.d.ts +0 -28
  1102. package/es/common/inversify/container.js +0 -158
  1103. package/es/common/inversify/container.js.map +0 -1
  1104. package/es/common/inversify/cotainer-module.d.ts +0 -6
  1105. package/es/common/inversify/cotainer-module.js +0 -8
  1106. package/es/common/inversify/cotainer-module.js.map +0 -1
  1107. package/es/common/inversify/index.d.ts +0 -7
  1108. package/es/common/inversify/index.js +0 -14
  1109. package/es/common/inversify/index.js.map +0 -1
  1110. package/es/common/inversify/interfaces.d.ts +0 -218
  1111. package/es/common/inversify/interfaces.js +0 -2
  1112. package/es/common/inversify/interfaces.js.map +0 -1
  1113. package/es/common/inversify/literal_types.d.ts +0 -5
  1114. package/es/common/inversify/literal_types.js +0 -20
  1115. package/es/common/inversify/literal_types.js.map +0 -1
  1116. package/es/common/inversify/meta-data.d.ts +0 -6
  1117. package/es/common/inversify/meta-data.js +0 -11
  1118. package/es/common/inversify/meta-data.js.map +0 -1
  1119. package/es/common/inversify/metadata_keys.d.ts +0 -12
  1120. package/es/common/inversify/metadata_keys.js +0 -28
  1121. package/es/common/inversify/metadata_keys.js.map +0 -1
  1122. package/es/common/inversify/metadata_reader.d.ts +0 -6
  1123. package/es/common/inversify/metadata_reader.js +0 -18
  1124. package/es/common/inversify/metadata_reader.js.map +0 -1
  1125. package/es/common/inversify/syntax/binding_in_syntax.d.ts +0 -10
  1126. package/es/common/inversify/syntax/binding_in_syntax.js +0 -24
  1127. package/es/common/inversify/syntax/binding_in_syntax.js.map +0 -1
  1128. package/es/common/inversify/syntax/binding_to_syntax.d.ts +0 -12
  1129. package/es/common/inversify/syntax/binding_to_syntax.js +0 -36
  1130. package/es/common/inversify/syntax/binding_to_syntax.js.map +0 -1
  1131. package/es/common/inversify/syntax/constraint_helpers.d.ts +0 -2
  1132. package/es/common/inversify/syntax/constraint_helpers.js +0 -18
  1133. package/es/common/inversify/syntax/constraint_helpers.js.map +0 -1
  1134. package/es/common/inversify-lite/annotation/decorator_utils.d.ts +0 -16
  1135. package/es/common/inversify-lite/annotation/decorator_utils.js +0 -67
  1136. package/es/common/inversify-lite/annotation/decorator_utils.js.map +0 -1
  1137. package/es/common/inversify-lite/annotation/inject.d.ts +0 -2
  1138. package/es/common/inversify-lite/annotation/inject.js +0 -8
  1139. package/es/common/inversify-lite/annotation/inject.js.map +0 -1
  1140. package/es/common/inversify-lite/annotation/inject_base.d.ts +0 -3
  1141. package/es/common/inversify-lite/annotation/inject_base.js +0 -16
  1142. package/es/common/inversify-lite/annotation/inject_base.js.map +0 -1
  1143. package/es/common/inversify-lite/annotation/injectable.d.ts +0 -2
  1144. package/es/common/inversify-lite/annotation/injectable.js +0 -16
  1145. package/es/common/inversify-lite/annotation/injectable.js.map +0 -1
  1146. package/es/common/inversify-lite/annotation/lazy_service_identifier.d.ts +0 -7
  1147. package/es/common/inversify-lite/annotation/lazy_service_identifier.js +0 -9
  1148. package/es/common/inversify-lite/annotation/lazy_service_identifier.js.map +0 -1
  1149. package/es/common/inversify-lite/annotation/multi_inject.d.ts +0 -2
  1150. package/es/common/inversify-lite/annotation/multi_inject.js +0 -8
  1151. package/es/common/inversify-lite/annotation/multi_inject.js.map +0 -1
  1152. package/es/common/inversify-lite/annotation/named.d.ts +0 -2
  1153. package/es/common/inversify-lite/annotation/named.js +0 -12
  1154. package/es/common/inversify-lite/annotation/named.js.map +0 -1
  1155. package/es/common/inversify-lite/annotation/property_event_decorator.d.ts +0 -4
  1156. package/es/common/inversify-lite/annotation/property_event_decorator.js +0 -14
  1157. package/es/common/inversify-lite/annotation/property_event_decorator.js.map +0 -1
  1158. package/es/common/inversify-lite/bindings/binding.d.ts +0 -20
  1159. package/es/common/inversify-lite/bindings/binding.js +0 -23
  1160. package/es/common/inversify-lite/bindings/binding.js.map +0 -1
  1161. package/es/common/inversify-lite/bindings/binding_count.d.ts +0 -5
  1162. package/es/common/inversify-lite/bindings/binding_count.js +0 -6
  1163. package/es/common/inversify-lite/bindings/binding_count.js.map +0 -1
  1164. package/es/common/inversify-lite/constants/error_msgs.d.ts +0 -32
  1165. package/es/common/inversify-lite/constants/error_msgs.js +0 -64
  1166. package/es/common/inversify-lite/constants/error_msgs.js.map +0 -1
  1167. package/es/common/inversify-lite/constants/literal_types.d.ts +0 -5
  1168. package/es/common/inversify-lite/constants/literal_types.js +0 -21
  1169. package/es/common/inversify-lite/constants/literal_types.js.map +0 -1
  1170. package/es/common/inversify-lite/constants/metadata_keys.d.ts +0 -13
  1171. package/es/common/inversify-lite/constants/metadata_keys.js +0 -30
  1172. package/es/common/inversify-lite/constants/metadata_keys.js.map +0 -1
  1173. package/es/common/inversify-lite/container/container.d.ts +0 -46
  1174. package/es/common/inversify-lite/container/container.js +0 -279
  1175. package/es/common/inversify-lite/container/container.js.map +0 -1
  1176. package/es/common/inversify-lite/container/container_module.d.ts +0 -11
  1177. package/es/common/inversify-lite/container/container_module.js +0 -14
  1178. package/es/common/inversify-lite/container/container_module.js.map +0 -1
  1179. package/es/common/inversify-lite/container/lookup.d.ts +0 -16
  1180. package/es/common/inversify-lite/container/lookup.js +0 -68
  1181. package/es/common/inversify-lite/container/lookup.js.map +0 -1
  1182. package/es/common/inversify-lite/index.d.ts +0 -1
  1183. package/es/common/inversify-lite/index.js +0 -2
  1184. package/es/common/inversify-lite/index.js.map +0 -1
  1185. package/es/common/inversify-lite/interfaces/interfaces.d.ts +0 -237
  1186. package/es/common/inversify-lite/interfaces/interfaces.js +0 -2
  1187. package/es/common/inversify-lite/interfaces/interfaces.js.map +0 -1
  1188. package/es/common/inversify-lite/planning/context.d.ts +0 -11
  1189. package/es/common/inversify-lite/planning/context.js +0 -16
  1190. package/es/common/inversify-lite/planning/context.js.map +0 -1
  1191. package/es/common/inversify-lite/planning/metadata.d.ts +0 -8
  1192. package/es/common/inversify-lite/planning/metadata.js +0 -13
  1193. package/es/common/inversify-lite/planning/metadata.js.map +0 -1
  1194. package/es/common/inversify-lite/planning/metadata_reader.d.ts +0 -6
  1195. package/es/common/inversify-lite/planning/metadata_reader.js +0 -18
  1196. package/es/common/inversify-lite/planning/metadata_reader.js.map +0 -1
  1197. package/es/common/inversify-lite/planning/plan.d.ts +0 -7
  1198. package/es/common/inversify-lite/planning/plan.js +0 -8
  1199. package/es/common/inversify-lite/planning/plan.js.map +0 -1
  1200. package/es/common/inversify-lite/planning/planner.d.ts +0 -5
  1201. package/es/common/inversify-lite/planning/planner.js +0 -120
  1202. package/es/common/inversify-lite/planning/planner.js.map +0 -1
  1203. package/es/common/inversify-lite/planning/queryable_string.d.ts +0 -9
  1204. package/es/common/inversify-lite/planning/queryable_string.js +0 -17
  1205. package/es/common/inversify-lite/planning/queryable_string.js.map +0 -1
  1206. package/es/common/inversify-lite/planning/reflection_utils.d.ts +0 -5
  1207. package/es/common/inversify-lite/planning/reflection_utils.js +0 -99
  1208. package/es/common/inversify-lite/planning/reflection_utils.js.map +0 -1
  1209. package/es/common/inversify-lite/planning/request.d.ts +0 -14
  1210. package/es/common/inversify-lite/planning/request.js +0 -16
  1211. package/es/common/inversify-lite/planning/request.js.map +0 -1
  1212. package/es/common/inversify-lite/planning/target.d.ts +0 -23
  1213. package/es/common/inversify-lite/planning/target.js +0 -58
  1214. package/es/common/inversify-lite/planning/target.js.map +0 -1
  1215. package/es/common/inversify-lite/resolution/instantiation.d.ts +0 -3
  1216. package/es/common/inversify-lite/resolution/instantiation.js +0 -117
  1217. package/es/common/inversify-lite/resolution/instantiation.js.map +0 -1
  1218. package/es/common/inversify-lite/resolution/resolver.d.ts +0 -3
  1219. package/es/common/inversify-lite/resolution/resolver.js +0 -55
  1220. package/es/common/inversify-lite/resolution/resolver.js.map +0 -1
  1221. package/es/common/inversify-lite/scope/scope.d.ts +0 -3
  1222. package/es/common/inversify-lite/scope/scope.js +0 -50
  1223. package/es/common/inversify-lite/scope/scope.js.map +0 -1
  1224. package/es/common/inversify-lite/syntax/binding_in_syntax.d.ts +0 -9
  1225. package/es/common/inversify-lite/syntax/binding_in_syntax.js +0 -21
  1226. package/es/common/inversify-lite/syntax/binding_in_syntax.js.map +0 -1
  1227. package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.d.ts +0 -12
  1228. package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js +0 -25
  1229. package/es/common/inversify-lite/syntax/binding_in_when_on_syntax.js.map +0 -1
  1230. package/es/common/inversify-lite/syntax/binding_on_syntax.d.ts +0 -6
  1231. package/es/common/inversify-lite/syntax/binding_on_syntax.js +0 -8
  1232. package/es/common/inversify-lite/syntax/binding_on_syntax.js.map +0 -1
  1233. package/es/common/inversify-lite/syntax/binding_to_syntax.d.ts +0 -18
  1234. package/es/common/inversify-lite/syntax/binding_to_syntax.js +0 -63
  1235. package/es/common/inversify-lite/syntax/binding_to_syntax.js.map +0 -1
  1236. package/es/common/inversify-lite/syntax/binding_when_on_syntax.d.ts +0 -8
  1237. package/es/common/inversify-lite/syntax/binding_when_on_syntax.js +0 -13
  1238. package/es/common/inversify-lite/syntax/binding_when_on_syntax.js.map +0 -1
  1239. package/es/common/inversify-lite/syntax/binding_when_syntax.d.ts +0 -7
  1240. package/es/common/inversify-lite/syntax/binding_when_syntax.js +0 -15
  1241. package/es/common/inversify-lite/syntax/binding_when_syntax.js.map +0 -1
  1242. package/es/common/inversify-lite/syntax/constraint_helpers.d.ts +0 -3
  1243. package/es/common/inversify-lite/syntax/constraint_helpers.js +0 -11
  1244. package/es/common/inversify-lite/syntax/constraint_helpers.js.map +0 -1
  1245. package/es/common/inversify-lite/utils/async.d.ts +0 -3
  1246. package/es/common/inversify-lite/utils/async.js +0 -10
  1247. package/es/common/inversify-lite/utils/async.js.map +0 -1
  1248. package/es/common/inversify-lite/utils/binding_utils.d.ts +0 -4
  1249. package/es/common/inversify-lite/utils/binding_utils.js +0 -65
  1250. package/es/common/inversify-lite/utils/binding_utils.js.map +0 -1
  1251. package/es/common/inversify-lite/utils/clonable.d.ts +0 -3
  1252. package/es/common/inversify-lite/utils/clonable.js +0 -6
  1253. package/es/common/inversify-lite/utils/clonable.js.map +0 -1
  1254. package/es/common/inversify-lite/utils/exceptions.d.ts +0 -2
  1255. package/es/common/inversify-lite/utils/exceptions.js +0 -8
  1256. package/es/common/inversify-lite/utils/exceptions.js.map +0 -1
  1257. package/es/common/inversify-lite/utils/factory_type.d.ts +0 -5
  1258. package/es/common/inversify-lite/utils/factory_type.js +0 -7
  1259. package/es/common/inversify-lite/utils/factory_type.js.map +0 -1
  1260. package/es/common/inversify-lite/utils/id.d.ts +0 -2
  1261. package/es/common/inversify-lite/utils/id.js +0 -8
  1262. package/es/common/inversify-lite/utils/id.js.map +0 -1
  1263. package/es/common/inversify-lite/utils/js.d.ts +0 -1
  1264. package/es/common/inversify-lite/utils/js.js +0 -8
  1265. package/es/common/inversify-lite/utils/js.js.map +0 -1
  1266. package/es/common/inversify-lite/utils/serialization.d.ts +0 -10
  1267. package/es/common/inversify-lite/utils/serialization.js +0 -66
  1268. package/es/common/inversify-lite/utils/serialization.js.map +0 -1
  1269. package/es/container.d.ts +0 -2
  1270. package/es/container.js +0 -4
  1271. package/es/container.js.map +0 -1
package/es/factory.d.ts CHANGED
@@ -3,3 +3,4 @@ export declare class Factory {
3
3
  static registerPlugin(pluginKey: string, pluginClass: any): void;
4
4
  static getPlugin(pluginKey: string): any;
5
5
  }
6
+ export * from './factory/index';
package/es/factory.js CHANGED
@@ -8,4 +8,6 @@ export class Factory {
8
8
  }
9
9
 
10
10
  Factory._pluginClasses = {};
11
+
12
+ export * from "./factory/index";
11
13
  //# sourceMappingURL=factory.js.map
package/es/factory.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/factory.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;IAGlB,MAAM,CAAC,cAAc,CAAC,SAAiB,EAAE,WAAgB;QACvD,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,SAAiB;QAChC,OAAO,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC3C,CAAC;;AARc,sBAAc,GAAwB,EAAE,CAAC","file":"factory.js","sourcesContent":["export class Factory {\n private static _pluginClasses: Record<string, any> = {};\n\n static registerPlugin(pluginKey: string, pluginClass: any) {\n Factory._pluginClasses[pluginKey] = pluginClass;\n }\n\n static getPlugin(pluginKey: string) {\n return Factory._pluginClasses[pluginKey];\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/factory.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;IAGlB,MAAM,CAAC,cAAc,CAAC,SAAiB,EAAE,WAAgB;QACvD,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,SAAiB;QAChC,OAAO,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAC3C,CAAC;;AARc,sBAAc,GAAwB,EAAE,CAAC;AAW1D,cAAc,iBAAiB,CAAC","file":"factory.js","sourcesContent":["export class Factory {\n private static _pluginClasses: Record<string, any> = {};\n\n static registerPlugin(pluginKey: string, pluginClass: any) {\n Factory._pluginClasses[pluginKey] = pluginClass;\n }\n\n static getPlugin(pluginKey: string) {\n return Factory._pluginClasses[pluginKey];\n }\n}\n\nexport * from './factory/index';\n"]}
package/es/global.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import type { IGlobal } from './interface';
2
+ export declare const vglobal: IGlobal;
package/es/global.js ADDED
@@ -0,0 +1,10 @@
1
+ import { application } from "./application";
2
+
3
+ import { VGlobal } from "./constants";
4
+
5
+ import { createLegacySingletonProxy, resolveLegacySingleton } from "./legacy/bootstrap";
6
+
7
+ export const vglobal = createLegacySingletonProxy((() => resolveLegacySingleton(VGlobal)));
8
+
9
+ application.global = vglobal;
10
+ //# sourceMappingURL=global.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/global.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAExF,MAAM,CAAC,MAAM,OAAO,GAAG,0BAA0B,CAAU,GAAG,EAAE,CAAC,sBAAsB,CAAU,OAAO,CAAC,CAAC,CAAC;AAE3G,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC","file":"global.js","sourcesContent":["import type { IGlobal } from './interface';\nimport { application } from './application';\nimport { VGlobal } from './constants';\nimport { createLegacySingletonProxy, resolveLegacySingleton } from './legacy/bootstrap';\n\nexport const vglobal = createLegacySingletonProxy<IGlobal>(() => resolveLegacySingleton<IGlobal>(VGlobal));\n\napplication.global = vglobal;\n"]}
@@ -20,7 +20,7 @@ export class Area extends Graphic {
20
20
  return super.isValid() && this._isValid();
21
21
  }
22
22
  _isValid() {
23
- if (this.getPathProxy()) return !0;
23
+ if (this.pathProxy) return !0;
24
24
  const {points: points, segments: segments} = this.attribute;
25
25
  return segments ? 0 !== segments.length : !!points && 0 !== points.length;
26
26
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/area.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC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oB;QAClB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;;AArKM,wBAAmB,mBACxB,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,IACT,mBAAmB,EACtB;AAoKJ,MAAM,UAAU,UAAU,CAAC,UAAiC;IAC1D,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;AAC9B,CAAC","file":"area.js","sourcesContent":["import type { IAABBBounds, IPointLike } from '@visactor/vutils';\nimport type { IArea, IAreaCacheItem, IAreaGraphicAttribute } from '../interface';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { pointsInterpolation } from '../common/utils';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { AREA_NUMBER_TYPE } from './constants';\n\nconst AREA_UPDATE_TAG_KEY = ['segments', 'points', 'curveType', 'curveTension', ...GRAPHIC_UPDATE_TAG_KEY];\n\nexport class Area extends Graphic<IAreaGraphicAttribute> implements IArea {\n type: 'area' = 'area';\n\n static NOWORK_ANIMATE_ATTR = {\n segments: 1,\n curveType: 1,\n ...NOWORK_ANIMATE_ATTR\n };\n\n cache?: IAreaCacheItem;\n\n constructor(params: IAreaGraphicAttribute) {\n super(params);\n this.numberType = AREA_NUMBER_TYPE;\n }\n\n isValid(): boolean {\n return super.isValid() && this._isValid();\n }\n private _isValid(): boolean {\n if (this.getPathProxy()) {\n return true;\n }\n const { points, segments } = this.attribute;\n if (segments) {\n if (segments.length === 0) {\n return false;\n }\n return true;\n } else if (points) {\n if (points.length === 0) {\n return false;\n }\n return true;\n }\n return false;\n }\n\n getGraphicTheme(): Required<IAreaGraphicAttribute> {\n return getTheme(this).area;\n }\n\n protected updateAABBBounds(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n if (!this.updatePathProxyAABBBounds(aabbBounds)) {\n attribute.segments\n ? this.updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds)\n : this.updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds);\n }\n application.graphicService.updateTempAABBBounds(aabbBounds);\n // if (!this._rectBoundsContribitions) {\n // this._rectBoundsContribitions = this.rectBoundsContribitions.getContributions() || [];\n // }\n // this._rectBoundsContribitions.length &&\n // this._rectBoundsContribitions.forEach(c => {\n // c.updateBounds(attribute, areaTheme, tb1, graphic);\n // aabbBounds.union(tb1);\n // tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);\n // });\n\n this.setWidthHeightWithoutTransform(aabbBounds);\n\n const { lineJoin = areaTheme.lineJoin } = attribute;\n application.graphicService.transformAABBBounds(attribute, aabbBounds, areaTheme, lineJoin === 'miter', this);\n return aabbBounds;\n }\n\n protected updateAreaAABBBoundsByPoints(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds,\n graphic?: IArea\n ): IAABBBounds {\n const { points = areaTheme.points } = attribute;\n const b = aabbBounds;\n points.forEach(p => {\n b.add(p.x, p.y);\n b.add(p.x1 ?? p.x, p.y1 ?? p.y); //面积图特殊性:由三个值构成,横向面积图,x1会省略;纵向面积图,y1会省略\n });\n return b;\n }\n protected updateAreaAABBBoundsBySegments(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds,\n graphic?: IArea\n ): IAABBBounds {\n const { segments = areaTheme.segments } = attribute;\n const b = aabbBounds;\n segments.forEach(s => {\n s.points.forEach(p => {\n b.add(p.x, p.y);\n b.add(p.x1 ?? p.x, p.y1 ?? p.y); //面积图特殊性:由三个值构成,横向面积图,x1会省略;纵向面积图,y1会省略\n });\n });\n return b;\n }\n\n protected _interpolate(key: string, ratio: number, lastStepVal: any, nextStepVal: any, nextAttributes: any): void {\n if (key === 'points') {\n (nextAttributes as any).points = pointsInterpolation(lastStepVal, nextStepVal, ratio);\n }\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, AREA_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, AREA_UPDATE_TAG_KEY);\n }\n\n toCustomPath() {\n let path = super.toCustomPath();\n if (path) {\n return path;\n }\n path = new CustomPath2D();\n const attribute = this.attribute;\n const segments = attribute.segments;\n\n const parsePoints = (points: IPointLike[]) => {\n if (points && points.length) {\n let isFirst = true;\n const basePoints: IPointLike[] = [];\n points.forEach(point => {\n if (point.defined === false) {\n return;\n }\n if (isFirst) {\n path.moveTo(point.x, point.y);\n } else {\n path.lineTo(point.x, point.y);\n }\n basePoints.push({ x: point.x1 ?? point.x, y: point.y1 ?? point.y });\n\n isFirst = false;\n });\n\n if (basePoints.length) {\n for (let i = basePoints.length - 1; i >= 0; i--) {\n path.lineTo(basePoints[i].x, basePoints[i].y);\n }\n\n path.closePath();\n }\n }\n };\n\n if (attribute.points) {\n parsePoints(attribute.points);\n } else if (segments && segments.length) {\n segments.forEach(seg => {\n parsePoints(seg.points);\n });\n }\n\n return path;\n }\n\n clone() {\n return new Area({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Area.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createArea(attributes: IAreaGraphicAttribute): IArea {\n return new Area(attributes);\n}\n"]}
1
+ {"version":3,"sources":["../src/graphic/area.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;A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AArKM,wBAAmB,mBACxB,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,IACT,mBAAmB,EACtB;AAoKJ,MAAM,UAAU,UAAU,CAAC,UAAiC;IAC1D,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;AAC9B,CAAC","file":"area.js","sourcesContent":["import type { IAABBBounds, IPointLike } from '@visactor/vutils';\nimport type { IArea, IAreaCacheItem, IAreaGraphicAttribute } from '../interface';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { pointsInterpolation } from '../common/utils';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { AREA_NUMBER_TYPE } from './constants';\n\nconst AREA_UPDATE_TAG_KEY = ['segments', 'points', 'curveType', 'curveTension', ...GRAPHIC_UPDATE_TAG_KEY];\n\nexport class Area extends Graphic<IAreaGraphicAttribute> implements IArea {\n type: 'area' = 'area';\n\n static NOWORK_ANIMATE_ATTR = {\n segments: 1,\n curveType: 1,\n ...NOWORK_ANIMATE_ATTR\n };\n\n cache?: IAreaCacheItem;\n\n constructor(params: IAreaGraphicAttribute) {\n super(params);\n this.numberType = AREA_NUMBER_TYPE;\n }\n\n isValid(): boolean {\n return super.isValid() && this._isValid();\n }\n private _isValid(): boolean {\n if (this.pathProxy) {\n return true;\n }\n const { points, segments } = this.attribute;\n if (segments) {\n if (segments.length === 0) {\n return false;\n }\n return true;\n } else if (points) {\n if (points.length === 0) {\n return false;\n }\n return true;\n }\n return false;\n }\n\n getGraphicTheme(): Required<IAreaGraphicAttribute> {\n return getTheme(this).area;\n }\n\n protected updateAABBBounds(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n if (!this.updatePathProxyAABBBounds(aabbBounds)) {\n attribute.segments\n ? this.updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds)\n : this.updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds);\n }\n application.graphicService.updateTempAABBBounds(aabbBounds);\n // if (!this._rectBoundsContribitions) {\n // this._rectBoundsContribitions = this.rectBoundsContribitions.getContributions() || [];\n // }\n // this._rectBoundsContribitions.length &&\n // this._rectBoundsContribitions.forEach(c => {\n // c.updateBounds(attribute, areaTheme, tb1, graphic);\n // aabbBounds.union(tb1);\n // tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);\n // });\n\n this.setWidthHeightWithoutTransform(aabbBounds);\n\n const { lineJoin = areaTheme.lineJoin } = attribute;\n application.graphicService.transformAABBBounds(attribute, aabbBounds, areaTheme, lineJoin === 'miter', this);\n return aabbBounds;\n }\n\n protected updateAreaAABBBoundsByPoints(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds,\n graphic?: IArea\n ): IAABBBounds {\n const { points = areaTheme.points } = attribute;\n const b = aabbBounds;\n points.forEach(p => {\n b.add(p.x, p.y);\n b.add(p.x1 ?? p.x, p.y1 ?? p.y); //面积图特殊性:由三个值构成,横向面积图,x1会省略;纵向面积图,y1会省略\n });\n return b;\n }\n protected updateAreaAABBBoundsBySegments(\n attribute: IAreaGraphicAttribute,\n areaTheme: Required<IAreaGraphicAttribute>,\n aabbBounds: IAABBBounds,\n graphic?: IArea\n ): IAABBBounds {\n const { segments = areaTheme.segments } = attribute;\n const b = aabbBounds;\n segments.forEach(s => {\n s.points.forEach(p => {\n b.add(p.x, p.y);\n b.add(p.x1 ?? p.x, p.y1 ?? p.y); //面积图特殊性:由三个值构成,横向面积图,x1会省略;纵向面积图,y1会省略\n });\n });\n return b;\n }\n\n protected _interpolate(key: string, ratio: number, lastStepVal: any, nextStepVal: any, nextAttributes: any): void {\n if (key === 'points') {\n (nextAttributes as any).points = pointsInterpolation(lastStepVal, nextStepVal, ratio);\n }\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, AREA_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, AREA_UPDATE_TAG_KEY);\n }\n\n toCustomPath() {\n let path = super.toCustomPath();\n if (path) {\n return path;\n }\n path = new CustomPath2D();\n const attribute = this.attribute;\n const segments = attribute.segments;\n\n const parsePoints = (points: IPointLike[]) => {\n if (points && points.length) {\n let isFirst = true;\n const basePoints: IPointLike[] = [];\n points.forEach(point => {\n if (point.defined === false) {\n return;\n }\n if (isFirst) {\n path.moveTo(point.x, point.y);\n } else {\n path.lineTo(point.x, point.y);\n }\n basePoints.push({ x: point.x1 ?? point.x, y: point.y1 ?? point.y });\n\n isFirst = false;\n });\n\n if (basePoints.length) {\n for (let i = basePoints.length - 1; i >= 0; i--) {\n path.lineTo(basePoints[i].x, basePoints[i].y);\n }\n\n path.closePath();\n }\n }\n };\n\n if (attribute.points) {\n parsePoints(attribute.points);\n } else if (segments && segments.length) {\n segments.forEach(seg => {\n parsePoints(seg.points);\n });\n }\n\n return path;\n }\n\n clone() {\n return new Area({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Area.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createArea(attributes: IAreaGraphicAttribute): IArea {\n return new Area(attributes);\n}\n"]}
@@ -1,14 +1,14 @@
1
- import { graphicCreator } from "./graphic-creator";
1
+ import { createGraphic } from "./graphic-creator";
2
2
 
3
3
  let text, richText;
4
4
 
5
5
  export function getTextBounds(params) {
6
- return text || (text = graphicCreator.CreateGraphic("text", {})), text.initAttributes(params),
6
+ return text || (text = createGraphic("text", {})), text.initAttributes(params),
7
7
  text.AABBBounds;
8
8
  }
9
9
 
10
10
  export function getRichTextBounds(params) {
11
- return richText || (richText = graphicCreator.CreateGraphic("richtext", {})), richText.setAttributes(params),
11
+ return richText || (richText = createGraphic("richtext", {})), richText.setAttributes(params),
12
12
  richText.AABBBounds;
13
13
  }
14
14
  //# sourceMappingURL=bounds.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/bounds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAInD,IAAI,IAAS,CAAC;AACd,MAAM,UAAU,aAAa,CAAC,MAAyB;IACrD,IAAI,CAAC,IAAI,EAAE;QACT,IAAI,GAAG,cAAc,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;KACjD;IACD,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC,UAAU,CAAC;AACzB,CAAC;AAGD,IAAI,QAAa,CAAC;AAClB,MAAM,UAAU,iBAAiB,CAAC,MAA6B;IAC7D,IAAI,CAAC,QAAQ,EAAE;QACb,QAAQ,GAAG,cAAc,CAAC,aAAa,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;KACzD;IACD,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,QAAQ,CAAC,UAAU,CAAC;AAC7B,CAAC","file":"bounds.js","sourcesContent":["import type { IRichTextAttribute, IRichTextGraphicAttribute, ITextGraphicAttribute } from '../interface';\nimport { graphicCreator } from './graphic-creator';\n// import { createRichText, createText } from './graphic-creator';\n\ntype ITextBoundsParams = Partial<ITextGraphicAttribute>;\nlet text: any;\nexport function getTextBounds(params: ITextBoundsParams) {\n if (!text) {\n text = graphicCreator.CreateGraphic('text', {});\n }\n text.initAttributes(params);\n return text.AABBBounds;\n}\n\ntype IRichTextBoundsParams = Partial<IRichTextGraphicAttribute>;\nlet richText: any;\nexport function getRichTextBounds(params: IRichTextBoundsParams) {\n if (!richText) {\n richText = graphicCreator.CreateGraphic('richtext', {});\n }\n richText.setAttributes(params);\n return richText.AABBBounds;\n}\n"]}
1
+ {"version":3,"sources":["../src/graphic/bounds.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD,IAAI,IAAS,CAAC;AACd,MAAM,UAAU,aAAa,CAAC,MAAyB;IACrD,IAAI,CAAC,IAAI,EAAE;QACT,IAAI,GAAG,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;KAClC;IACD,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC,UAAU,CAAC;AACzB,CAAC;AAGD,IAAI,QAAa,CAAC;AAClB,MAAM,UAAU,iBAAiB,CAAC,MAA6B;IAC7D,IAAI,CAAC,QAAQ,EAAE;QACb,QAAQ,GAAG,aAAa,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;KAC1C;IACD,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,QAAQ,CAAC,UAAU,CAAC;AAC7B,CAAC","file":"bounds.js","sourcesContent":["import type { IRichTextGraphicAttribute, ITextGraphicAttribute } from '../interface';\nimport { createGraphic } from './graphic-creator';\n// import { createRichText, createText } from './graphic-creator';\n\ntype ITextBoundsParams = Partial<ITextGraphicAttribute>;\nlet text: any;\nexport function getTextBounds(params: ITextBoundsParams) {\n if (!text) {\n text = createGraphic('text', {});\n }\n text.initAttributes(params);\n return text.AABBBounds;\n}\n\ntype IRichTextBoundsParams = Partial<IRichTextGraphicAttribute>;\nlet richText: any;\nexport function getRichTextBounds(params: IRichTextBoundsParams) {\n if (!richText) {\n richText = createGraphic('richtext', {});\n }\n richText.setAttributes(params);\n return richText.AABBBounds;\n}\n"]}
@@ -161,7 +161,6 @@ export const DefaultAttribute = Object.assign(Object.assign(Object.assign({
161
161
  shadowPickMode: "graphic",
162
162
  keepStrokeScale: !1,
163
163
  clipConfig: null,
164
- pathProxy: null,
165
164
  roughStyle: null
166
165
  }, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
167
166
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC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EACjD,eAAe,EAAE,YAAY,EAC7B,UAAU,EAAE,EAAE,EACd,mBAAmB,EAAE,KAAK,EAC1B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,KAAK,GAClB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,iCAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,GAAG,EACd,aAAa,EAAE,UAAU,EACzB,UAAU,EAAE,CAAC,EACb,YAAY,EAAE,CAAC,EACf,YAAY,EAAE,CAAC,IACZ,gBAAgB,KACnB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,EACf,UAAU,EAAE,OAAO,GACpB,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,mCACpC,qBAAqB,KACxB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,CAAC,EAClB,gBAAgB,EAAE,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,QAAQ,EACtB,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EAEN,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,cAAc,EAAE,0BAA0B,EAC1C,qBAAqB,EAAE,CAAC,EACxB,gBAAgB,EAAE,KAAK,EACvB,uBAAuB,EAAE,CAAC,EAC1B,gBAAgB,EAAE,CAAC,EACnB,OAAO,EAAE,CAAC,GACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport {\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type IGraphicAttribute,\n type ICircleGraphicAttribute,\n type IFillStyle,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IStrokeStyle,\n type IGraphicStyle,\n type ISymbolGraphicAttribute,\n type ITextAttribute,\n type ITextGraphicAttribute,\n type IRichTextGraphicAttribute,\n type ITransform,\n type RichTextWordBreak,\n type RichTextVerticalDirection,\n type RichTextGlobalAlignType,\n type RichTextGlobalBaselineType,\n type IRichTextIconGraphicAttribute,\n type IStarGraphicAttribute,\n type IConnectedStyle,\n type ILayout,\n type IDebugType,\n type IPickStyle,\n MeasureModeEnum\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n maxWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined,\n measureMode: MeasureModeEnum.fontBounding,\n keepCenterInLine: false\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n autoAnimateTexture: false,\n textureRatio: 1,\n textureOptions: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n backgroundKeepAspectRatio: false,\n backgroundClip: true,\n backgroundScale: 1,\n backgroundOffsetX: 0,\n backgroundOffsetY: 0,\n backgroundPosition: 'top-left',\n blur: 0,\n filter: '',\n cursor: null,\n html: null,\n react: null,\n vue: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n fillStrokeOrder: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n shadowPickMode: 'graphic',\n keepStrokeScale: false,\n clipConfig: null,\n pathProxy: null,\n roughStyle: null,\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1,\n cornerType: 'round'\n // 默认是0,不需要主题\n // drawMode: 0\n} as any;\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n fillStrokeOrder: 1,\n clipRange: 1,\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultStarAttribute: Required<IStarGraphicAttribute> = {\n ...DefaultAttribute,\n width: 100,\n height: 100,\n spikes: 5,\n thickness: 0.5\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true,\n clipRange: 1\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n upgradeAttrs: null,\n editable: false,\n editOptions: null,\n ascentDescentMode: 'actual',\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n imageMode: undefined,\n image: '',\n width: 0,\n height: 0,\n maxWidth: 500,\n maxHeight: 500,\n imagePosition: 'top-left',\n imageScale: 1,\n imageOffsetX: 0,\n imageOffsetY: 0,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0,\n cornerType: 'round'\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};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I,EACd,SAAS,EAAE,YAAiC,EAC5C,iBAAiB,EAAE,KAAkC,EACrD,SAAS,EAAE,MAAiC,EAC5C,YAAY,EAAE,KAAmC,EACjD,eAAe,EAAE,YAAY,EAC7B,UAAU,EAAE,EAAE,EACd,mBAAmB,EAAE,KAAK,EAC1B,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,SAAS,EACnB,UAAU,EAAE,KAAK,GAClB,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,iCAChC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,GAAG,EACd,aAAa,EAAE,UAAU,EACzB,UAAU,EAAE,CAAC,EACb,YAAY,EAAE,CAAC,EACf,YAAY,EAAE,CAAC,IACZ,gBAAgB,KACnB,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,EACf,UAAU,EAAE,OAAO,GACpB,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,mCACpC,qBAAqB,KACxB,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,CAAC,EAClB,gBAAgB,EAAE,CAAC,EACnB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,QAAQ,EACtB,SAAS,EAAE,YAAY,EACvB,MAAM,EAAE,CAAC,EACT,EAAE,EAAE,EAAE,EAEN,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,cAAc,EAAE,0BAA0B,EAC1C,qBAAqB,EAAE,CAAC,EACxB,gBAAgB,EAAE,KAAK,EACvB,uBAAuB,EAAE,CAAC,EAC1B,gBAAgB,EAAE,CAAC,EACnB,OAAO,EAAE,CAAC,GACX,CAAC","file":"config.js","sourcesContent":["// 存放公共属性\nimport { Logger, Matrix, pi2 } from '@visactor/vutils';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport {\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type IGraphicAttribute,\n type ICircleGraphicAttribute,\n type IFillStyle,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IStrokeStyle,\n type IGraphicStyle,\n type ISymbolGraphicAttribute,\n type ITextAttribute,\n type ITextGraphicAttribute,\n type IRichTextGraphicAttribute,\n type ITransform,\n type RichTextWordBreak,\n type RichTextVerticalDirection,\n type RichTextGlobalAlignType,\n type RichTextGlobalBaselineType,\n type IRichTextIconGraphicAttribute,\n type IStarGraphicAttribute,\n type IConnectedStyle,\n type ILayout,\n type IDebugType,\n type IPickStyle,\n MeasureModeEnum\n} from '../interface';\n\nexport const DefaultLayout: ILayout = {\n alignSelf: 'auto'\n};\n\nexport const DefaultTransform: ITransform = {\n x: 0,\n y: 0,\n z: 0,\n dx: 0,\n dy: 0,\n dz: 0,\n scrollX: 0,\n scrollY: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n angle: 0,\n alpha: 0,\n beta: 0,\n scaleCenter: [0, 0],\n anchor: [0, 0],\n anchor3d: [0, 0],\n postMatrix: new Matrix()\n};\n\nexport const DefaultFillStyle: IFillStyle = {\n fillOpacity: 1,\n fill: false,\n shadowBlur: 0,\n shadowColor: 'black',\n shadowOffsetX: 0,\n shadowOffsetY: 0\n};\n\nconst commonStroke: Omit<IStrokeStyle, 'outerBorder' | 'innerBorder'> = {\n strokeOpacity: 1,\n lineDash: [],\n lineDashOffset: 0,\n lineWidth: 1,\n lineCap: 'butt',\n lineJoin: 'miter',\n miterLimit: 10,\n strokeBoundsBuffer: 2,\n stroke: false\n};\n\nexport const DefaultStrokeStyle: IStrokeStyle = {\n outerBorder: { ...commonStroke, distance: 0 },\n innerBorder: { ...commonStroke, distance: 0 },\n ...commonStroke\n};\n\nexport const DefaultTextStyle: Required<ITextAttribute> = {\n text: '',\n maxLineWidth: Infinity,\n maxWidth: Infinity,\n textAlign: 'left',\n textBaseline: 'alphabetic',\n fontSize: 16,\n // @ts-ignore\n fontFamily: `PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol`,\n fontWeight: '',\n ellipsis: '…',\n fontVariant: '',\n fontStyle: '',\n lineHeight: undefined,\n underline: 0,\n lineThrough: 0,\n scaleIn3d: false,\n direction: 'horizontal',\n wordBreak: 'break-all',\n ignoreBuf: false,\n verticalMode: 0,\n wrap: false,\n whiteSpace: 'no-wrap',\n heightLimit: Infinity,\n lineClamp: Infinity,\n suffixPosition: 'end',\n underlineDash: [],\n underlineOffset: 0,\n disableAutoClipedPoptip: undefined,\n measureMode: MeasureModeEnum.fontBounding,\n keepCenterInLine: false\n};\n\nexport const DefaultPickStyle: IPickStyle = {\n pickStrokeBuffer: 0\n};\n\nexport const DefaultStyle: IGraphicStyle = {\n forceBoundsWidth: undefined,\n forceBoundsHeight: undefined,\n opacity: 1,\n background: null,\n autoAnimateTexture: false,\n textureRatio: 1,\n textureOptions: null,\n backgroundOpacity: 1,\n backgroundCornerRadius: 0,\n texture: null,\n textureColor: 'black',\n textureSize: 10,\n texturePadding: 2,\n backgroundMode: 'no-repeat',\n backgroundFit: true,\n backgroundKeepAspectRatio: false,\n backgroundClip: true,\n backgroundScale: 1,\n backgroundOffsetX: 0,\n backgroundOffsetY: 0,\n backgroundPosition: 'top-left',\n blur: 0,\n filter: '',\n cursor: null,\n html: null,\n react: null,\n vue: null,\n ...DefaultFillStyle,\n ...DefaultStrokeStyle,\n ...DefaultLayout,\n ...DefaultPickStyle\n};\n\nexport const DefaultConnectAttribute: Required<IConnectedStyle> = {\n connectedType: 'none',\n // connectedStyle: {\n // stroke: DefaultStrokeStyle.stroke,\n // strokeOpacity: DefaultStrokeStyle.strokeOpacity,\n // lineDash: DefaultStrokeStyle.lineDash,\n // lineDashOffset: DefaultStrokeStyle.lineDashOffset,\n // lineCap: DefaultStrokeStyle.lineCap,\n // lineJoin: DefaultStrokeStyle.lineJoin,\n // lineWidth: DefaultStrokeStyle.lineWidth,\n // fill: DefaultFillStyle.fill,\n // fillOpacity: DefaultFillStyle.fillOpacity\n // },\n connectedStyle: {}, // 默认全都继承父属性\n connectedX: NaN,\n connectedY: NaN\n} as IConnectedStyle;\n\nexport const DefaultDebugAttribute: Required<IDebugType> = {\n _debug_bounds: false\n};\n\nexport const DefaultAttribute: Required<IGraphicAttribute> = {\n strokeSeg: null,\n renderable: true,\n pickable: true,\n shadowGraphic: undefined,\n childrenPickable: true,\n fillPickable: true,\n strokePickable: true,\n visible: true,\n zIndex: 0,\n layout: null,\n boundsPadding: 0,\n fillStrokeOrder: 0,\n renderStyle: 'default',\n pickMode: 'accurate',\n customPickShape: null,\n boundsMode: 'accurate',\n keepDirIn3d: true,\n shadowRootIdx: 1,\n globalZIndex: 1,\n globalCompositeOperation: '',\n overflow: 'hidden',\n shadowPickMode: 'graphic',\n keepStrokeScale: false,\n clipConfig: null,\n roughStyle: null,\n ...DefaultDebugAttribute,\n ...DefaultStyle,\n ...DefaultTransform\n};\n\nexport function addAttributeToPrototype(obj: Record<string, any>, c: any, keys: string[]) {\n keys.forEach(key => {\n c.prototype[key] = obj[key];\n });\n}\nexport function rewriteProto(obj: Record<string, any>, c: Record<string, any>) {\n Object.setPrototypeOf(obj, c);\n}\n\nexport const DefaultArcAttribute: Required<IArcGraphicAttribute> = {\n ...DefaultAttribute,\n startAngle: 0,\n endAngle: pi2,\n innerRadius: 0,\n outerRadius: 1,\n innerPadding: 0,\n outerPadding: 0,\n cornerRadius: 0,\n padRadius: 0,\n padAngle: 0,\n cap: false,\n forceShowCap: false\n};\n\nexport const DefaultAreaAttribute: Required<IAreaGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultCircleAttribute: Required<ICircleGraphicAttribute> = {\n ...DefaultAttribute,\n radius: 1,\n startAngle: 0,\n endAngle: pi2\n};\n\nexport const DefaultGroupAttribute: Required<IGroupGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n cornerRadius: 0,\n path: [],\n clip: false,\n visibleAll: true,\n display: 'relative',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n alignContent: 'flex-start',\n baseOpacity: 1,\n cornerType: 'round'\n // 默认是0,不需要主题\n // drawMode: 0\n} as any;\n\nexport const DefaultGlyphAttribute: Required<IGlyphGraphicAttribute> = {\n ...DefaultAttribute,\n path: '',\n width: 0,\n height: 0,\n cornerRadius: 0,\n clip: false\n};\n\nexport const DefaultLineAttribute: Required<ILineGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultConnectAttribute,\n points: [],\n segments: [],\n curveType: 'linear',\n clipRange: 1,\n clipRangeByDimension: 'default',\n closePath: false,\n curveTension: 1\n};\n\nexport const DefaultPathAttribute: Required<IPathGraphicAttribute> = {\n ...DefaultAttribute,\n path: new CustomPath2D(),\n fillStrokeOrder: 1,\n clipRange: 1,\n customPath: () => {\n Logger.getInstance().warn('空函数');\n }\n};\n\nexport const DefaultPolygonAttribute: Required<IPolygonGraphicAttribute> = {\n ...DefaultAttribute,\n points: [],\n cornerRadius: 0,\n closePath: true\n};\n\nexport const DefaultStarAttribute: Required<IStarGraphicAttribute> = {\n ...DefaultAttribute,\n width: 100,\n height: 100,\n spikes: 5,\n thickness: 0.5\n};\n\nexport const DefaultRectAttribute: Required<IRectGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n strokeBoundsBuffer: 0,\n cornerRadius: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultRect3dAttribute: Required<IRect3dGraphicAttribute> = {\n ...DefaultAttribute,\n width: 0,\n height: 0,\n x1: 0,\n y1: 0,\n cornerRadius: 0,\n length: 0,\n cornerType: 'round',\n drawStrokeWhenZeroWH: false\n};\n\nexport const DefaultSymbolAttribute: Required<ISymbolGraphicAttribute> = {\n ...DefaultAttribute,\n symbolType: 'circle',\n size: 10, // 外接**正方形**的边长\n keepDirIn3d: true,\n clipRange: 1\n};\n\nexport const DefaultTextAttribute: Required<ITextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n strokeBoundsBuffer: 0,\n keepDirIn3d: true\n};\n\nexport const DefaultRichTextAttribute: Required<IRichTextGraphicAttribute> = {\n ...DefaultAttribute,\n ...DefaultTextStyle,\n upgradeAttrs: null,\n editable: false,\n editOptions: null,\n ascentDescentMode: 'actual',\n width: 300,\n height: 300,\n ellipsis: true,\n wordBreak: 'break-word' as RichTextWordBreak,\n verticalDirection: 'top' as RichTextVerticalDirection,\n textAlign: 'left' as RichTextGlobalAlignType,\n textBaseline: 'top' as RichTextGlobalBaselineType,\n layoutDirection: 'horizontal',\n textConfig: [],\n disableAutoWrapLine: false,\n maxHeight: undefined,\n maxWidth: undefined,\n singleLine: false\n};\n\nexport const DefaultImageAttribute: Required<IImageGraphicAttribute> = {\n repeatX: 'no-repeat',\n repeatY: 'no-repeat',\n imageMode: undefined,\n image: '',\n width: 0,\n height: 0,\n maxWidth: 500,\n maxHeight: 500,\n imagePosition: 'top-left',\n imageScale: 1,\n imageOffsetX: 0,\n imageOffsetY: 0,\n ...DefaultAttribute,\n fill: true,\n cornerRadius: 0,\n cornerType: 'round'\n};\n\nexport const DefaultRichTextIconAttribute: Required<IRichTextIconGraphicAttribute> = {\n ...DefaultImageAttribute,\n backgroundShowMode: 'never',\n backgroundWidth: 0,\n backgroundHeight: 0,\n textAlign: 'left',\n textBaseline: 'middle',\n direction: 'horizontal',\n margin: 0,\n id: '',\n\n width: 20,\n height: 20,\n backgroundFill: 'rgba(101, 117, 168, 0.1)',\n backgroundFillOpacity: 1,\n backgroundStroke: false,\n backgroundStrokeOpacity: 1,\n backgroundRadius: 4,\n opacity: 1\n};\n"]}
@@ -93,6 +93,7 @@ export class Glyph extends Graphic {
93
93
  useStates(states, hasAnimation) {
94
94
  var _a;
95
95
  if (!states.length) return void this.clearStates(hasAnimation);
96
+ const previousStates = this.currentStates ? this.currentStates.slice() : [];
96
97
  if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some(((stateName, index) => this.currentStates[index] !== stateName)))) return;
97
98
  this.stopStateAnimates(), this.stateSort && (states = states.sort(this.stateSort));
98
99
  const stateAttrs = {}, subAttrs = this.subGraphic.map((() => ({})));
@@ -102,11 +103,16 @@ export class Glyph extends Graphic {
102
103
  attrs && (Object.assign(stateAttrs, attrs.attributes), (null === (_a = attrs.subAttributes) || void 0 === _a ? void 0 : _a.length) && subAttrs.forEach(((subAttrs, index) => {
103
104
  Object.assign(subAttrs, attrs.subAttributes[index]);
104
105
  })));
105
- })), this.updateNormalAttrs(stateAttrs), this.currentStates = states, this.applyStateAttrs(stateAttrs, states, hasAnimation);
106
+ })), this.beforeStateUpdate(stateAttrs, previousStates, states, hasAnimation, !1) && (this.updateNormalAttrs(stateAttrs),
107
+ this.currentStates = states, this.applyStateAttrs(stateAttrs, states, hasAnimation));
106
108
  }
107
109
  clearStates(hasAnimation) {
108
- this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [],
109
- this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [],
110
+ this.stopStateAnimates();
111
+ const previousStates = this.currentStates ? this.currentStates.slice() : [];
112
+ if (this.hasState() && this.normalAttrs) {
113
+ if (!this.beforeStateUpdate(this.normalAttrs, previousStates, [], hasAnimation, !0)) return;
114
+ this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0);
115
+ } else this.currentStates = [];
110
116
  this.normalAttrs = null;
111
117
  }
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iBAAiB,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE;YACvC,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;YAKxB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,aAAa,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;SAChF;aAAM;YACL,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;SACzB;QACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,MAAM,KAAK,GAAG,IAAI,KAAK,mBAAM,IAAI,CAAC,SAAS,EAAG,CAAC;QAC/C,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,oBAAoB;QAClB,OAAO,KAAK,CAAC,mBAAmB,CAAC;IACnC,CAAC;;AAjOM,yBAAmB,GAAG,mBAAmB,CAAC;AAoOnD,MAAM,UAAU,WAAW,CAAC,UAAkC;IAC5D,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC","file":"glyph.js","sourcesContent":["import type { AABBBounds, IAABBBounds, IPointLike } from '@visactor/vutils';\nimport { Graphic, NOWORK_ANIMATE_ATTR } from './graphic';\nimport type {\n GraphicType,\n IGraphic,\n IGlyph,\n IGlyphGraphicAttribute,\n IGraphicAttribute,\n ISetAttributeContext\n} from '../interface';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { GLYPH_NUMBER_TYPE } from './constants';\n\nexport class Glyph extends Graphic<IGlyphGraphicAttribute> implements IGlyph {\n type: GraphicType = 'glyph';\n declare _onInit: (g: IGlyph) => void;\n declare _onUpdate: (g: IGlyph) => void;\n declare glyphStates?: Record<\n string,\n {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n }\n >;\n declare glyphStateProxy?: (\n stateName: string,\n targetStates?: string[]\n ) => {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n };\n protected declare subGraphic: IGraphic[];\n\n static NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;\n\n constructor(params: Partial<IGlyphGraphicAttribute>) {\n super(params);\n this.numberType = GLYPH_NUMBER_TYPE;\n this.subGraphic = [];\n this._onInit && this._onInit(this);\n this.valid = this.isValid();\n }\n\n setSubGraphic(subGraphic: IGraphic[]) {\n this.detachSubGraphic();\n this.subGraphic = subGraphic;\n subGraphic.forEach(g => {\n g.glyphHost = this;\n Object.setPrototypeOf(g.attribute, this.attribute);\n });\n this.valid = this.isValid();\n this.addUpdateBoundTag();\n }\n\n protected detachSubGraphic() {\n this.subGraphic.forEach(g => {\n g.glyphHost = null;\n Object.setPrototypeOf(g.attribute, {});\n });\n }\n\n getSubGraphic() {\n return this.subGraphic;\n }\n\n onInit(cb: (g: this) => void): void {\n this._onInit = cb;\n }\n\n onUpdate(cb: (g: this) => void): void {\n this._onUpdate = cb;\n }\n\n isValid(): boolean {\n return true;\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) {\n super.setAttribute(key, value, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n setAttributes(\n params: Partial<IGlyphGraphicAttribute>,\n forceUpdateTag: boolean = false,\n context?: ISetAttributeContext\n ) {\n super.setAttributes(params, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n translate(x: number, y: number) {\n super.translate(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n translateTo(x: number, y: number) {\n super.translateTo(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scale(scaleX: number, scaleY: number, scaleCenter?: IPointLike) {\n super.scale(scaleX, scaleY, scaleCenter);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scaleTo(scaleX: number, scaleY: number) {\n super.scaleTo(scaleX, scaleY);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotate(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotateTo(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n getGraphicTheme(): Required<IGlyphGraphicAttribute> {\n return getTheme(this as IGraphic).glyph;\n }\n\n protected updateAABBBounds(\n attribute: IGlyphGraphicAttribute,\n theme: Required<IGlyphGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n // 添加子节点\n this.getSubGraphic().forEach((node: IGraphic) => {\n aabbBounds.union(node.AABBBounds);\n });\n\n // glyph不需要计算AABBBounds\n // this.transformAABBBounds(attribute, aabbBounds, theme, graphic);\n return aabbBounds;\n }\n\n protected doUpdateAABBBounds(): AABBBounds {\n this.updateAABBBoundsStamp++;\n this._AABBBounds.clear();\n const bounds = this.updateAABBBounds(this.attribute, this.getGraphicTheme(), this._AABBBounds) as AABBBounds;\n this.clearUpdateBoundTag();\n return bounds;\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return false;\n }\n protected needUpdateTag(key: string): boolean {\n return false;\n }\n\n useStates(states: string[], hasAnimation?: boolean): void {\n if (!states.length) {\n this.clearStates(hasAnimation);\n return;\n }\n\n const isChange =\n this.currentStates?.length !== states.length ||\n states.some((stateName, index) => this.currentStates[index] !== stateName);\n if (!isChange) {\n return;\n }\n\n this.stopStateAnimates();\n\n if (this.stateSort) {\n states = states.sort(this.stateSort);\n }\n const stateAttrs = {};\n const subAttrs = this.subGraphic.map(() => ({}));\n states.forEach(stateName => {\n const attrs = this.glyphStateProxy ? this.glyphStateProxy(stateName, states) : this.glyphStates[stateName];\n\n if (attrs) {\n Object.assign(stateAttrs, attrs.attributes);\n\n if (attrs.subAttributes?.length) {\n subAttrs.forEach((subAttrs, index) => {\n Object.assign(subAttrs, attrs.subAttributes[index]);\n });\n }\n }\n });\n\n // this.subGraphic.forEach((graphic, index) => {\n // graphic.updateNormalAttrs(subAttrs[index]);\n // graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);\n // });\n\n this.updateNormalAttrs(stateAttrs);\n this.currentStates = states;\n this.applyStateAttrs(stateAttrs, states, hasAnimation);\n }\n\n clearStates(hasAnimation?: boolean) {\n this.stopStateAnimates();\n if (this.hasState() && this.normalAttrs) {\n this.currentStates = [];\n // this.subGraphic.forEach(graphic => {\n // graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, true);\n // graphic.normalAttrs = null;\n // });\n this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, true);\n } else {\n this.currentStates = [];\n }\n this.normalAttrs = null;\n }\n\n clone(): IGraphic<Partial<IGlyphGraphicAttribute>> {\n const glyph = new Glyph({ ...this.attribute });\n glyph.setSubGraphic(this.subGraphic.map(g => g.clone()));\n return glyph;\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Glyph.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createGlyph(attributes: IGlyphGraphicAttribute): IGlyph {\n return new Glyph(attributes);\n}\n"]}
1
+ {"version":3,"sources":["../src/graphic/glyph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AASzD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,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from './graphic';\nimport type {\n GraphicType,\n IGraphic,\n IGlyph,\n IGlyphGraphicAttribute,\n IGraphicAttribute,\n ISetAttributeContext\n} from '../interface';\nimport { getTheme } from './theme';\nimport { GLYPH_NUMBER_TYPE } from './constants';\n\nexport class Glyph extends Graphic<IGlyphGraphicAttribute> implements IGlyph {\n type: GraphicType = 'glyph';\n declare _onInit: (g: IGlyph) => void;\n declare _onUpdate: (g: IGlyph) => void;\n declare glyphStates?: Record<\n string,\n {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n }\n >;\n declare glyphStateProxy?: (\n stateName: string,\n targetStates?: string[]\n ) => {\n attributes: Partial<IGlyphGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n };\n protected declare subGraphic: IGraphic[];\n\n static NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;\n\n constructor(params: Partial<IGlyphGraphicAttribute>) {\n super(params);\n this.numberType = GLYPH_NUMBER_TYPE;\n this.subGraphic = [];\n this._onInit && this._onInit(this);\n this.valid = this.isValid();\n }\n\n setSubGraphic(subGraphic: IGraphic[]) {\n this.detachSubGraphic();\n this.subGraphic = subGraphic;\n subGraphic.forEach(g => {\n g.glyphHost = this;\n Object.setPrototypeOf(g.attribute, this.attribute);\n });\n this.valid = this.isValid();\n this.addUpdateBoundTag();\n }\n\n protected detachSubGraphic() {\n this.subGraphic.forEach(g => {\n g.glyphHost = null;\n Object.setPrototypeOf(g.attribute, {});\n });\n }\n\n getSubGraphic() {\n return this.subGraphic;\n }\n\n onInit(cb: (g: this) => void): void {\n this._onInit = cb;\n }\n\n onUpdate(cb: (g: this) => void): void {\n this._onUpdate = cb;\n }\n\n isValid(): boolean {\n return true;\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) {\n super.setAttribute(key, value, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n setAttributes(\n params: Partial<IGlyphGraphicAttribute>,\n forceUpdateTag: boolean = false,\n context?: ISetAttributeContext\n ) {\n super.setAttributes(params, forceUpdateTag, context);\n this.subGraphic.forEach(g => {\n g.addUpdateShapeAndBoundsTag();\n g.addUpdatePositionTag();\n });\n }\n\n translate(x: number, y: number) {\n super.translate(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n translateTo(x: number, y: number) {\n super.translateTo(x, y);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scale(scaleX: number, scaleY: number, scaleCenter?: IPointLike) {\n super.scale(scaleX, scaleY, scaleCenter);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n scaleTo(scaleX: number, scaleY: number) {\n super.scaleTo(scaleX, scaleY);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotate(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n rotateTo(angle: number) {\n super.rotate(angle);\n\n this.subGraphic.forEach(g => {\n g.addUpdatePositionTag();\n g.addUpdateBoundTag();\n });\n return this;\n }\n\n getGraphicTheme(): Required<IGlyphGraphicAttribute> {\n return getTheme(this as IGraphic).glyph;\n }\n\n protected updateAABBBounds(\n attribute: IGlyphGraphicAttribute,\n theme: Required<IGlyphGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n // 添加子节点\n this.getSubGraphic().forEach((node: IGraphic) => {\n aabbBounds.union(node.AABBBounds);\n });\n\n // glyph不需要计算AABBBounds\n // this.transformAABBBounds(attribute, aabbBounds, theme, graphic);\n return aabbBounds;\n }\n\n protected doUpdateAABBBounds(): AABBBounds {\n this.updateAABBBoundsStamp++;\n this._AABBBounds.clear();\n const bounds = this.updateAABBBounds(this.attribute, this.getGraphicTheme(), this._AABBBounds) as AABBBounds;\n this.clearUpdateBoundTag();\n return bounds;\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return false;\n }\n protected needUpdateTag(key: string): boolean {\n return false;\n }\n\n useStates(states: string[], hasAnimation?: boolean): void {\n if (!states.length) {\n this.clearStates(hasAnimation);\n return;\n }\n const previousStates = this.currentStates ? this.currentStates.slice() : [];\n\n const isChange =\n this.currentStates?.length !== states.length ||\n states.some((stateName, index) => this.currentStates[index] !== stateName);\n if (!isChange) {\n return;\n }\n\n this.stopStateAnimates();\n\n if (this.stateSort) {\n states = states.sort(this.stateSort);\n }\n const stateAttrs = {};\n const subAttrs = this.subGraphic.map(() => ({}));\n states.forEach(stateName => {\n const attrs = this.glyphStateProxy ? this.glyphStateProxy(stateName, states) : this.glyphStates[stateName];\n\n if (attrs) {\n Object.assign(stateAttrs, attrs.attributes);\n\n if (attrs.subAttributes?.length) {\n subAttrs.forEach((subAttrs, index) => {\n Object.assign(subAttrs, attrs.subAttributes[index]);\n });\n }\n }\n });\n\n // this.subGraphic.forEach((graphic, index) => {\n // graphic.updateNormalAttrs(subAttrs[index]);\n // graphic.applyStateAttrs(subAttrs[index], states, hasAnimation);\n // });\n\n if (!this.beforeStateUpdate(stateAttrs, previousStates, states, hasAnimation, false)) {\n return;\n }\n\n this.updateNormalAttrs(stateAttrs);\n this.currentStates = states;\n this.applyStateAttrs(stateAttrs, states, hasAnimation);\n }\n\n clearStates(hasAnimation?: boolean) {\n this.stopStateAnimates();\n const previousStates = this.currentStates ? this.currentStates.slice() : [];\n if (this.hasState() && this.normalAttrs) {\n if (!this.beforeStateUpdate(this.normalAttrs, previousStates, [], hasAnimation, true)) {\n return;\n }\n this.currentStates = [];\n // this.subGraphic.forEach(graphic => {\n // graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, true);\n // graphic.normalAttrs = null;\n // });\n this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, true);\n } else {\n this.currentStates = [];\n }\n this.normalAttrs = null;\n }\n\n clone(): IGraphic<Partial<IGlyphGraphicAttribute>> {\n const glyph = new Glyph({ ...this.attribute });\n glyph.setSubGraphic(this.subGraphic.map(g => g.clone()));\n return glyph;\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Glyph.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createGlyph(attributes: IGlyphGraphicAttribute): IGlyph {\n return new Glyph(attributes);\n}\n"]}
@@ -1,6 +1,8 @@
1
1
  import type { IArc, IArcGraphicAttribute, IArea, IAreaGraphicAttribute, ICircle, ICircleGraphicAttribute, IGroup, IGroupGraphicAttribute, IImage, IImageGraphicAttribute, ILine, ILineGraphicAttribute, IPath, IPathGraphicAttribute, IPolygon, IPolygonGraphicAttribute, IRect, IRect3d, IRect3dGraphicAttribute, IRectGraphicAttribute, IRichText, IRichTextGraphicAttribute, IShadowRoot, ISymbol, ISymbolGraphicAttribute, IText, ITextGraphicAttribute, IWrapTextGraphicAttribute } from '../interface';
2
+ import type { IGraphic } from '../interface/graphic';
3
+ export type IGraphicCreateCallback<TGraphic extends IGraphic = IGraphic, TAttributes = any> = (attributes: TAttributes) => TGraphic;
2
4
  declare class GraphicCreator {
3
- store: Map<string, any>;
5
+ store: Map<string, IGraphicCreateCallback>;
4
6
  arc?: (attribute: IArcGraphicAttribute) => IArc;
5
7
  area?: (attribute: IAreaGraphicAttribute) => IArea;
6
8
  circle?: (attribute: ICircleGraphicAttribute) => ICircle;
@@ -15,10 +17,13 @@ declare class GraphicCreator {
15
17
  richtext?: (attribute: IRichTextGraphicAttribute) => IRichText;
16
18
  polygon?: (attribute: IPolygonGraphicAttribute) => IPolygon;
17
19
  shadowRoot?: (attribute: IGroupGraphicAttribute) => IShadowRoot;
18
- wraptext?: (attribute: IWrapTextGraphicAttribute) => IText;
20
+ wrapText?: (attribute: IWrapTextGraphicAttribute) => IText;
19
21
  constructor();
20
- RegisterGraphicCreator(name: string, cb: any): void;
21
- CreateGraphic(name: string, params: any): any;
22
+ registerStore(name: string, creator: IGraphicCreateCallback): void;
23
+ RegisterGraphicCreator(name: string, creator: IGraphicCreateCallback): void;
24
+ CreateGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(name: string, attributes: TAttributes): TGraphic | null;
22
25
  }
23
26
  export declare const graphicCreator: GraphicCreator;
27
+ export declare function registerGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(name: string, creator: IGraphicCreateCallback<TGraphic, TAttributes>): void;
28
+ export declare function createGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(name: string, attributes: TAttributes): TGraphic;
24
29
  export {};
@@ -1,15 +1,42 @@
1
+ import { GraphicFactory } from "../factory/graphic-factory";
2
+
3
+ function createGraphicCtor(creator) {
4
+ return class {
5
+ constructor(attributes) {
6
+ try {
7
+ return new creator(attributes);
8
+ } catch (error) {
9
+ return creator(attributes);
10
+ }
11
+ }
12
+ };
13
+ }
14
+
15
+ const sharedGraphicFactory = new GraphicFactory;
16
+
1
17
  class GraphicCreator {
2
18
  constructor() {
3
19
  this.store = new Map;
4
20
  }
5
- RegisterGraphicCreator(name, cb) {
6
- this.store.set(name, cb), this[name] = cb;
21
+ registerStore(name, creator) {
22
+ this.store.set(name, creator), this[name] = creator;
23
+ }
24
+ RegisterGraphicCreator(name, creator) {
25
+ registerGraphic(name, creator);
7
26
  }
8
- CreateGraphic(name, params) {
9
- const cb = this.store.get(name);
10
- return cb ? cb(params) : null;
27
+ CreateGraphic(name, attributes) {
28
+ return this.store.has(name) ? createGraphic(name, attributes) : null;
11
29
  }
12
30
  }
13
31
 
14
32
  export const graphicCreator = new GraphicCreator;
33
+
34
+ export function registerGraphic(name, creator) {
35
+ if (!name) throw new Error("Graphic registration requires a non-empty graphic type");
36
+ graphicCreator.registerStore(name, creator), sharedGraphicFactory.register(name, createGraphicCtor(creator));
37
+ }
38
+
39
+ export function createGraphic(name, attributes) {
40
+ return sharedGraphicFactory.create(name, attributes);
41
+ }
15
42
  //# sourceMappingURL=graphic-creator.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/graphic-creator.ts"],"names":[],"mappings":"AA8IA,MAAM,cAAc;IAiBlB;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,sBAAsB,CAAC,IAAY,EAAE,EAAO;QAC1C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACxB,IAAY,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;IAC3B,CAAC;IAED,aAAa,CAAC,IAAY,EAAE,MAAW;QACrC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,EAAE,EAAE;YACP,OAAO,IAAI,CAAC;SACb;QACD,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC","file":"graphic-creator.js","sourcesContent":["// import type {\n// IArc,\n// IArcGraphicAttribute,\n// IArea,\n// IAreaGraphicAttribute,\n// ICircle,\n// ICircleGraphicAttribute,\n// IGroup,\n// IGroupGraphicAttribute,\n// IImageGraphicAttribute,\n// ILine,\n// ILineGraphicAttribute,\n// IPath,\n// IPathGraphicAttribute,\n// IPolygonGraphicAttribute,\n// IRect,\n// IRectGraphicAttribute,\n// ISymbolGraphicAttribute,\n// IText,\n// ITextGraphicAttribute,\n// ISymbol,\n// IImage,\n// IPolygon,\n// IShadowRoot,\n// IGraphic,\n// IRichTextGraphicAttribute,\n// IRichText,\n// IGlyph,\n// IGlyphGraphicAttribute,\n// IRect3d,\n// IRect3dGraphicAttribute,\n// IArc3dGraphicAttribute,\n// IPyramid3dGraphicAttribute,\n// IPyramid3d,\n// IWrapTextGraphicAttribute\n// } from '../interface';\n// import { Arc } from './arc';\n// import { Area } from './area';\n// import { Circle } from './circle';\n// import { Group } from './group';\n// import { Image } from './image';\n// import { Line } from './line';\n// import { Path } from './path';\n// import { Polygon } from './polygon';\n// import { Rect } from './rect';\n// // 这里git会将Symbol强行转成小写symbol,先重命名一下\n// import { Symbol as MarkSymbol } from './symbol';\n// import { ShadowRoot as MarkShadowRoot } from './shadow-root';\n// import { Text } from './text';\n// import { RichText } from './richtext';\n// import { Glyph } from './glyph';\n// import { Rect3d } from './rect3d';\n// import { Arc3d } from './arc3d';\n// import { Pyramid3d } from './pyramid3d';\n// import { WrapText } from './wrap-text';\n\nimport type {\n IArc,\n IArcGraphicAttribute,\n IArea,\n IAreaGraphicAttribute,\n ICircle,\n ICircleGraphicAttribute,\n IGroup,\n IGroupGraphicAttribute,\n IImage,\n IImageGraphicAttribute,\n ILine,\n ILineGraphicAttribute,\n IPath,\n IPathGraphicAttribute,\n IPolygon,\n IPolygonGraphicAttribute,\n IRect,\n IRect3d,\n IRect3dGraphicAttribute,\n IRectGraphicAttribute,\n IRichText,\n IRichTextGraphicAttribute,\n IShadowRoot,\n ISymbol,\n ISymbolGraphicAttribute,\n IText,\n ITextGraphicAttribute,\n IWrapTextGraphicAttribute\n} from '../interface';\n\n// export function createArc(attributes: IArcGraphicAttribute): IArc {\n// return new Arc(attributes);\n// }\n// export function createArc3d(attributes: IArc3dGraphicAttribute): IArc {\n// return new Arc3d(attributes);\n// }\n// export function createPyramid3d(attributes: IPyramid3dGraphicAttribute): IPyramid3d {\n// return new Pyramid3d(attributes);\n// }\n// export function createArea(attributes: IAreaGraphicAttribute): IArea {\n// return new Area(attributes);\n// }\n// export function createCircle(attributes: ICircleGraphicAttribute): ICircle {\n// return new Circle(attributes);\n// }\n// export function createGroup(attributes: IGroupGraphicAttribute): IGroup {\n// return new Group(attributes);\n// }\n// export function createLine(attributes: ILineGraphicAttribute): ILine {\n// return new Line(attributes);\n// }\n// export function createPath(attributes: IPathGraphicAttribute): IPath {\n// return new Path(attributes);\n// }\n// export function createRect(attributes: IRectGraphicAttribute): IRect {\n// return new Rect(attributes);\n// }\n// export function createRect3d(attributes: IRect3dGraphicAttribute): IRect3d {\n// return new Rect3d(attributes);\n// }\n// export function createGlyph(attributes: IGlyphGraphicAttribute): IGlyph {\n// return new Glyph(attributes);\n// }\n// export function createText(attributes: ITextGraphicAttribute): IText {\n// return new Text(attributes);\n// }\n// export function createWrapText(attributes: IWrapTextGraphicAttribute): IText {\n// return new WrapText(attributes);\n// }\n// export function createSymbol(attributes: ISymbolGraphicAttribute): ISymbol {\n// return new MarkSymbol(attributes);\n// }\n// export function createImage(attributes: IImageGraphicAttribute): IImage {\n// return new Image(attributes);\n// }\n// export function createPolygon(attributes: IPolygonGraphicAttribute): IPolygon {\n// return new Polygon(attributes);\n// }\n// export function createShadowRoot(graphic?: IGraphic): IShadowRoot {\n// return new MarkShadowRoot(graphic);\n// }\n// export function createRichText(attributes: IRichTextGraphicAttribute): IRichText {\n// return new RichText(attributes);\n// }\n\nclass GraphicCreator {\n declare store: Map<string, any>;\n declare arc?: (attribute: IArcGraphicAttribute) => IArc;\n declare area?: (attribute: IAreaGraphicAttribute) => IArea;\n declare circle?: (attribute: ICircleGraphicAttribute) => ICircle;\n declare group?: (attribute: IGroupGraphicAttribute) => IGroup;\n declare image?: (attribute: IImageGraphicAttribute) => IImage;\n declare line?: (attribute: ILineGraphicAttribute) => ILine;\n declare path?: (attribute: IPathGraphicAttribute) => IPath;\n declare rect?: (attribute: IRectGraphicAttribute) => IRect;\n declare rect3d?: (attribute: IRect3dGraphicAttribute) => IRect3d;\n declare symbol?: (attribute: ISymbolGraphicAttribute) => ISymbol;\n declare text?: (attribute: ITextGraphicAttribute) => IText;\n declare richtext?: (attribute: IRichTextGraphicAttribute) => IRichText;\n declare polygon?: (attribute: IPolygonGraphicAttribute) => IPolygon;\n declare shadowRoot?: (attribute: IGroupGraphicAttribute) => IShadowRoot;\n declare wraptext?: (attribute: IWrapTextGraphicAttribute) => IText;\n constructor() {\n this.store = new Map();\n }\n\n RegisterGraphicCreator(name: string, cb: any) {\n this.store.set(name, cb);\n (this as any)[name] = cb;\n }\n\n CreateGraphic(name: string, params: any) {\n const cb = this.store.get(name);\n if (!cb) {\n return null;\n }\n return cb(params);\n }\n}\n\nexport const graphicCreator = new GraphicCreator();\n\n// export const graphicCreator = {\n// arc: createArc,\n// area: createArea,\n// circle: createCircle,\n// group: createGroup,\n// image: createImage,\n// line: createLine,\n// path: createPath,\n// rect: createRect,\n// rect3d: createRect3d,\n// symbol: createSymbol,\n// text: createText,\n// richtext: createRichText,\n// polygon: createPolygon,\n// shadowRoot: createShadowRoot,\n// wrapText: createWrapText\n// };\n"]}
1
+ {"version":3,"sources":["../src/graphic/graphic-creator.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAO5D,SAAS,iBAAiB,CACxB,OAAsD;IAEtD,OAAO,MAAM,qBAAqB;QAChC,YAAY,UAAuB;YACjC,IAAI;gBACF,OAAO,IAAK,OAAe,CAAC,UAAU,CAAC,CAAC;aACzC;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC;aAC5B;QACH,CAAC;KACK,CAAC;AACX,CAAC;AAED,MAAM,oBAAoB,GAAG,IAAI,cAAc,EAAE,CAAC;AAElD,MAAM,cAAc;IAkBlB;QACE,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,aAAa,CAAC,IAAY,EAAE,OAA+B;QACzD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7B,IAAY,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC;IAChC,CAAC;IAED,sBAAsB,CAAC,IAAY,EAAE,OAA+B;QAClE,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IAED,aAAa,CACX,IAAY,EACZ,UAAuB;QAEvB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACzB,OAAO,IAAI,CAAC;SACb;QAED,OAAO,aAAa,CAAwB,IAAI,EAAE,UAAU,CAAC,CAAC;IAChE,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AAEnD,MAAM,UAAU,eAAe,CAC7B,IAAY,EACZ,OAAsD;IAEtD,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;KAC3E;IAED,cAAc,CAAC,aAAa,CAAC,IAAI,EAAE,OAAiC,CAAC,CAAC;IACtE,oBAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,IAAY,EACZ,UAAuB;IAEvB,OAAO,oBAAoB,CAAC,MAAM,CAAwB,IAAI,EAAE,UAAU,CAAC,CAAC;AAC9E,CAAC","file":"graphic-creator.js","sourcesContent":["import type {\n IArc,\n IArcGraphicAttribute,\n IArea,\n IAreaGraphicAttribute,\n ICircle,\n ICircleGraphicAttribute,\n IGroup,\n IGroupGraphicAttribute,\n IImage,\n IImageGraphicAttribute,\n ILine,\n ILineGraphicAttribute,\n IPath,\n IPathGraphicAttribute,\n IPolygon,\n IPolygonGraphicAttribute,\n IRect,\n IRect3d,\n IRect3dGraphicAttribute,\n IRectGraphicAttribute,\n IRichText,\n IRichTextGraphicAttribute,\n IShadowRoot,\n ISymbol,\n ISymbolGraphicAttribute,\n IText,\n ITextGraphicAttribute,\n IWrapTextGraphicAttribute\n} from '../interface';\nimport { GraphicFactory } from '../factory/graphic-factory';\nimport type { IGraphic } from '../interface/graphic';\n\nexport type IGraphicCreateCallback<TGraphic extends IGraphic = IGraphic, TAttributes = any> = (\n attributes: TAttributes\n) => TGraphic;\n\nfunction createGraphicCtor<TGraphic extends IGraphic = IGraphic, TAttributes = any>(\n creator: IGraphicCreateCallback<TGraphic, TAttributes>\n) {\n return class RegisteredGraphicCtor {\n constructor(attributes: TAttributes) {\n try {\n return new (creator as any)(attributes);\n } catch (error) {\n return creator(attributes);\n }\n }\n } as any;\n}\n\nconst sharedGraphicFactory = new GraphicFactory();\n\nclass GraphicCreator {\n declare store: Map<string, IGraphicCreateCallback>;\n declare arc?: (attribute: IArcGraphicAttribute) => IArc;\n declare area?: (attribute: IAreaGraphicAttribute) => IArea;\n declare circle?: (attribute: ICircleGraphicAttribute) => ICircle;\n declare group?: (attribute: IGroupGraphicAttribute) => IGroup;\n declare image?: (attribute: IImageGraphicAttribute) => IImage;\n declare line?: (attribute: ILineGraphicAttribute) => ILine;\n declare path?: (attribute: IPathGraphicAttribute) => IPath;\n declare rect?: (attribute: IRectGraphicAttribute) => IRect;\n declare rect3d?: (attribute: IRect3dGraphicAttribute) => IRect3d;\n declare symbol?: (attribute: ISymbolGraphicAttribute) => ISymbol;\n declare text?: (attribute: ITextGraphicAttribute) => IText;\n declare richtext?: (attribute: IRichTextGraphicAttribute) => IRichText;\n declare polygon?: (attribute: IPolygonGraphicAttribute) => IPolygon;\n declare shadowRoot?: (attribute: IGroupGraphicAttribute) => IShadowRoot;\n declare wrapText?: (attribute: IWrapTextGraphicAttribute) => IText;\n\n constructor() {\n this.store = new Map();\n }\n\n registerStore(name: string, creator: IGraphicCreateCallback) {\n this.store.set(name, creator);\n (this as any)[name] = creator;\n }\n\n RegisterGraphicCreator(name: string, creator: IGraphicCreateCallback) {\n registerGraphic(name, creator);\n }\n\n CreateGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(\n name: string,\n attributes: TAttributes\n ): TGraphic | null {\n if (!this.store.has(name)) {\n return null;\n }\n\n return createGraphic<TGraphic, TAttributes>(name, attributes);\n }\n}\n\nexport const graphicCreator = new GraphicCreator();\n\nexport function registerGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(\n name: string,\n creator: IGraphicCreateCallback<TGraphic, TAttributes>\n) {\n if (!name) {\n throw new Error('Graphic registration requires a non-empty graphic type');\n }\n\n graphicCreator.registerStore(name, creator as IGraphicCreateCallback);\n sharedGraphicFactory.register(name, createGraphicCtor(creator));\n}\n\nexport function createGraphic<TGraphic extends IGraphic = IGraphic, TAttributes = any>(\n name: string,\n attributes: TAttributes\n): TGraphic {\n return sharedGraphicFactory.create<TGraphic, TAttributes>(name, attributes);\n}\n"]}
@@ -1,3 +1,4 @@
1
- import { ContainerModule } from '../../common/inversify-lite';
2
- declare const _default: ContainerModule;
3
- export default _default;
1
+ export declare function bindGraphicModules({ bind }: {
2
+ bind: any;
3
+ }): void;
4
+ export default bindGraphicModules;
@@ -1,12 +1,12 @@
1
- import { ContainerModule } from "../../common/inversify-lite";
2
-
3
1
  import { DefaultGraphicService } from "./graphic-service";
4
2
 
5
3
  import { GraphicCreator, GraphicService } from "../constants";
6
4
 
7
5
  import { graphicCreator } from "../graphic-creator";
8
6
 
9
- export default new ContainerModule((bind => {
7
+ export function bindGraphicModules({bind: bind}) {
10
8
  bind(GraphicService).to(DefaultGraphicService), bind(GraphicCreator).toConstantValue(graphicCreator);
11
- }));
9
+ }
10
+
11
+ export default bindGraphicModules;
12
12
  //# sourceMappingURL=graphic-module.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/graphic-service/graphic-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,eAAe,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE;IACxC,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC;IAE/C,IAAI,CAAC,cAAc,CAAC,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC","file":"graphic-module.js","sourcesContent":["import { ContainerModule } from '../../common/inversify-lite';\n// import { DefaultTheme } from './default-theme';\nimport { DefaultGraphicService } from './graphic-service';\nimport { GraphicCreator, GraphicService } from '../constants';\nimport { graphicCreator } from '../graphic-creator';\n// import { DefaultThemeService, Theme, ThemeServce } from './theme-service';\n\nexport default new ContainerModule(bind => {\n bind(GraphicService).to(DefaultGraphicService);\n\n bind(GraphicCreator).toConstantValue(graphicCreator);\n});\n"]}
1
+ {"version":3,"sources":["../src/graphic/graphic-service/graphic-module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,MAAM,UAAU,kBAAkB,CAAC,EAAE,IAAI,EAAiB;IACxD,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC;IAE/C,IAAI,CAAC,cAAc,CAAC,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;AACvD,CAAC;AAED,eAAe,kBAAkB,CAAC","file":"graphic-module.js","sourcesContent":["// import { DefaultTheme } from './default-theme';\nimport { DefaultGraphicService } from './graphic-service';\nimport { GraphicCreator, GraphicService } from '../constants';\nimport { graphicCreator } from '../graphic-creator';\n// import { DefaultThemeService, Theme, ThemeServce } from './theme-service';\n\nexport function bindGraphicModules({ bind }: { bind: any }) {\n bind(GraphicService).to(DefaultGraphicService);\n\n bind(GraphicCreator).toConstantValue(graphicCreator);\n}\n\nexport default bindGraphicModules;\n"]}
@@ -1,5 +1,4 @@
1
- import type { IAABBBounds } from '@visactor/vutils';
2
- import { AABBBounds } from '@visactor/vutils';
1
+ import { AABBBounds, type IAABBBounds } from '@visactor/vutils';
3
2
  import type { mat4, IGraphicAttribute, IGraphic, IGroup, IStage, IText, ITextGraphicAttribute, ITransform, IGraphicService, IGraphicCreator, ISyncHook } from '../../interface';
4
3
  export declare function getExtraModelMatrix(dx: number, dy: number, graphic: IGraphic): mat4 | null;
5
4
  export declare function getModelMatrix(out: mat4, graphic: IGraphic, theme: ITransform): void;
@@ -21,7 +20,7 @@ export declare class DefaultGraphicService implements IGraphicService {
21
20
  };
22
21
  protected tempAABBBounds1: AABBBounds;
23
22
  protected tempAABBBounds2: AABBBounds;
24
- constructor(creator: IGraphicCreator);
23
+ constructor(creator?: IGraphicCreator);
25
24
  onAttributeUpdate(graphic: IGraphic): void;
26
25
  onSetStage(graphic: IGraphic, stage: IStage): void;
27
26
  onRemove(graphic: IGraphic<Partial<IGraphicAttribute>>): void;
@@ -1,17 +1,3 @@
1
- var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
2
- var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
3
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
4
- return c > 3 && r && Object.defineProperty(target, key, r), r;
5
- }, __metadata = this && this.__metadata || function(k, v) {
6
- if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
7
- }, __param = this && this.__param || function(paramIndex, decorator) {
8
- return function(target, key) {
9
- decorator(target, key, paramIndex);
10
- };
11
- };
12
-
13
- import { inject, injectable } from "../../common/inversify-lite";
14
-
15
1
  import { AABBBounds, isNumber, transformBoundsWithMatrix } from "@visactor/vutils";
16
2
 
17
3
  import { SyncHook } from "../../tapable";
@@ -26,10 +12,10 @@ import { BoundsContext } from "../../common/bounds-context";
26
12
 
27
13
  import { renderCommandList } from "../../common/render-command-list";
28
14
 
29
- import { GraphicCreator } from "../constants";
30
-
31
15
  import { identityMat4, multiplyMat4Mat4, rotateX, rotateY, rotateZ, scaleMat4, translate } from "../../common/matrix";
32
16
 
17
+ import { graphicCreator } from "../graphic-creator";
18
+
33
19
  export function getExtraModelMatrix(dx, dy, graphic) {
34
20
  const {alpha: alpha, beta: beta} = graphic.attribute;
35
21
  if (!alpha && !beta) return null;
@@ -93,8 +79,8 @@ export function shouldUseMat4(graphic) {
93
79
  return alpha || beta;
94
80
  }
95
81
 
96
- let DefaultGraphicService = class {
97
- constructor(creator) {
82
+ export class DefaultGraphicService {
83
+ constructor(creator = graphicCreator) {
98
84
  this.creator = creator, this.hooks = {
99
85
  onAttributeUpdate: new SyncHook([ "graphic" ]),
100
86
  onSetStage: new SyncHook([ "graphic", "stage" ]),
@@ -135,8 +121,7 @@ let DefaultGraphicService = class {
135
121
  this.hooks.clearAABBBounds.taps.length && this.hooks.clearAABBBounds.call(graphic, stage, b);
136
122
  }
137
123
  updatePathProxyAABBBounds(aabbBounds, graphic) {
138
- var _a;
139
- const path = null === (_a = null == graphic ? void 0 : graphic.getPathProxy) || void 0 === _a ? void 0 : _a.call(graphic);
124
+ const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
140
125
  if (!path) return !1;
141
126
  const boundsContext = new BoundsContext(aabbBounds);
142
127
  return renderCommandList(path.commandList, boundsContext, 0, 0), !0;
@@ -194,9 +179,5 @@ let DefaultGraphicService = class {
194
179
  tb2: tb2
195
180
  };
196
181
  }
197
- };
198
-
199
- DefaultGraphicService = __decorate([ injectable(), __param(0, inject(GraphicCreator)), __metadata("design:paramtypes", [ Object ]) ], DefaultGraphicService);
200
-
201
- export { DefaultGraphicService };
182
+ }
202
183
  //# sourceMappingURL=graphic-service.js.map