@visactor/vrender-core 1.1.0-alpha.24 → 1.1.0-alpha.26

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 (404) hide show
  1. package/cjs/common/event-listener-manager.js +1 -2
  2. package/cjs/common/event-transformer.js +2 -1
  3. package/cjs/common/performance-raf.js +1 -1
  4. package/cjs/common/xml/is-xml.d.ts +2 -0
  5. package/cjs/common/xml/is-xml.js +14 -0
  6. package/cjs/common/xml/is-xml.js.map +1 -0
  7. package/cjs/common/xml/parser.d.ts +2 -2
  8. package/cjs/common/xml/parser.js +14 -11
  9. package/cjs/common/xml/parser.js.map +1 -1
  10. package/cjs/container.d.ts +2 -0
  11. package/cjs/container.js +50 -0
  12. package/cjs/container.js.map +1 -0
  13. package/cjs/core/graphic-utils.js +1 -2
  14. package/cjs/core/layer-service.js +2 -1
  15. package/cjs/core/stage.d.ts +0 -9
  16. package/cjs/core/stage.js +11 -29
  17. package/cjs/core/stage.js.map +1 -1
  18. package/cjs/entries/miniapp.d.ts +0 -1
  19. package/cjs/entries/miniapp.js +1 -5
  20. package/cjs/entries/miniapp.js.map +1 -1
  21. package/cjs/entries/node.d.ts +0 -1
  22. package/cjs/entries/node.js +1 -5
  23. package/cjs/entries/node.js.map +1 -1
  24. package/cjs/env.d.ts +1 -0
  25. package/cjs/env.js +25 -0
  26. package/cjs/env.js.map +1 -0
  27. package/cjs/event/public-constant.d.ts +7 -0
  28. package/cjs/event/public-constant.js +100 -0
  29. package/cjs/event/public-constant.js.map +1 -0
  30. package/cjs/event/util.d.ts +1 -1
  31. package/cjs/graphic/base.d.ts +2 -0
  32. package/cjs/graphic/base.js +15 -0
  33. package/cjs/graphic/base.js.map +1 -0
  34. package/cjs/graphic/creator.d.ts +16 -0
  35. package/cjs/graphic/creator.js +160 -0
  36. package/cjs/graphic/creator.js.map +1 -0
  37. package/cjs/graphic/glyph.js +4 -8
  38. package/cjs/graphic/glyph.js.map +1 -1
  39. package/cjs/graphic/graphic-service/graphic-service.d.ts +0 -1
  40. package/cjs/graphic/graphic-service/graphic-service.js +1 -8
  41. package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
  42. package/cjs/graphic/graphic.d.ts +19 -29
  43. package/cjs/graphic/graphic.js +123 -201
  44. package/cjs/graphic/graphic.js.map +1 -1
  45. package/cjs/graphic/group.d.ts +1 -3
  46. package/cjs/graphic/group.js +22 -28
  47. package/cjs/graphic/group.js.map +1 -1
  48. package/cjs/graphic/modules.d.ts +16 -0
  49. package/cjs/graphic/modules.js +150 -0
  50. package/cjs/graphic/modules.js.map +1 -0
  51. package/cjs/graphic/node-tree.d.ts +3 -3
  52. package/cjs/graphic/node-tree.js +1 -0
  53. package/cjs/graphic/node-tree.js.map +1 -1
  54. package/cjs/graphic/state/shared-state-refresh.js +11 -32
  55. package/cjs/graphic/state/shared-state-refresh.js.map +1 -1
  56. package/cjs/graphic/state/shared-state-scope.d.ts +2 -5
  57. package/cjs/graphic/state/shared-state-scope.js +8 -27
  58. package/cjs/graphic/state/shared-state-scope.js.map +1 -1
  59. package/cjs/graphic/state/state-definition-compiler.js +4 -5
  60. package/cjs/graphic/state/state-definition-compiler.js.map +1 -1
  61. package/cjs/graphic/state/state-definition.d.ts +2 -5
  62. package/cjs/graphic/state/state-definition.js.map +1 -1
  63. package/cjs/graphic/state/state-engine.d.ts +0 -5
  64. package/cjs/graphic/state/state-engine.js +20 -70
  65. package/cjs/graphic/state/state-engine.js.map +1 -1
  66. package/cjs/graphic/state/state-transition-orchestrator.d.ts +7 -9
  67. package/cjs/graphic/state/state-transition-orchestrator.js +10 -13
  68. package/cjs/graphic/state/state-transition-orchestrator.js.map +1 -1
  69. package/cjs/graphic/tools.js +3 -3
  70. package/cjs/graphic/tools.js.map +1 -1
  71. package/cjs/index.js.map +1 -1
  72. package/cjs/interface/graphic/group.d.ts +0 -2
  73. package/cjs/interface/graphic/group.js.map +1 -1
  74. package/cjs/interface/graphic.d.ts +1 -5
  75. package/cjs/interface/graphic.js.map +1 -1
  76. package/cjs/interface/index.js.map +1 -1
  77. package/cjs/interface/node-tree.d.ts +3 -0
  78. package/cjs/interface/node-tree.js.map +1 -1
  79. package/cjs/interface/stage.d.ts +0 -7
  80. package/cjs/interface/stage.js.map +1 -1
  81. package/cjs/interpolate.d.ts +2 -0
  82. package/cjs/interpolate.js +34 -0
  83. package/cjs/interpolate.js.map +1 -0
  84. package/cjs/modules.js.map +1 -1
  85. package/cjs/path.d.ts +4 -0
  86. package/cjs/path.js +33 -0
  87. package/cjs/path.js.map +1 -0
  88. package/cjs/plugin/3d.d.ts +3 -0
  89. package/cjs/plugin/3d.js +33 -0
  90. package/cjs/plugin/3d.js.map +1 -0
  91. package/cjs/plugin/attribute.d.ts +2 -0
  92. package/cjs/plugin/attribute.js +24 -0
  93. package/cjs/plugin/attribute.js.map +1 -0
  94. package/cjs/plugin/flex-layout.d.ts +1 -0
  95. package/cjs/plugin/flex-layout.js +15 -0
  96. package/cjs/plugin/flex-layout.js.map +1 -0
  97. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js +8 -8
  98. package/cjs/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  99. package/cjs/plugins/index.d.ts +0 -4
  100. package/cjs/plugins/index.js +1 -3
  101. package/cjs/plugins/index.js.map +1 -1
  102. package/cjs/plugins/plugin-service.d.ts +0 -1
  103. package/cjs/plugins/plugin-service.js +2 -3
  104. package/cjs/plugins/plugin-service.js.map +1 -1
  105. package/cjs/plugins/types.d.ts +1 -8
  106. package/cjs/plugins/types.js.map +1 -1
  107. package/cjs/register/graphic.d.ts +19 -0
  108. package/cjs/register/graphic.js +177 -0
  109. package/cjs/register/graphic.js.map +1 -0
  110. package/cjs/registry/contribution-registry.d.ts +0 -1
  111. package/cjs/registry/contribution-registry.js +0 -3
  112. package/cjs/registry/contribution-registry.js.map +1 -1
  113. package/cjs/registry/picker-registry.d.ts +0 -1
  114. package/cjs/registry/picker-registry.js +0 -3
  115. package/cjs/registry/picker-registry.js.map +1 -1
  116. package/cjs/registry/renderer-registry.d.ts +0 -1
  117. package/cjs/registry/renderer-registry.js +0 -3
  118. package/cjs/registry/renderer-registry.js.map +1 -1
  119. package/cjs/registry/types.d.ts +0 -3
  120. package/cjs/registry/types.js.map +1 -1
  121. package/cjs/svg.d.ts +1 -0
  122. package/cjs/svg.js +15 -0
  123. package/cjs/svg.js.map +1 -0
  124. package/cjs/text.d.ts +2 -0
  125. package/cjs/text.js +29 -0
  126. package/cjs/text.js.map +1 -0
  127. package/dist/index.es.js +897 -2213
  128. package/es/common/event-listener-manager.js +1 -2
  129. package/es/common/event-transformer.js +2 -1
  130. package/es/common/performance-raf.js +1 -1
  131. package/es/common/xml/is-xml.d.ts +2 -0
  132. package/es/common/xml/is-xml.js +8 -0
  133. package/es/common/xml/is-xml.js.map +1 -0
  134. package/es/common/xml/parser.d.ts +2 -2
  135. package/es/common/xml/parser.js +3 -7
  136. package/es/common/xml/parser.js.map +1 -1
  137. package/es/container.d.ts +2 -0
  138. package/es/container.js +2 -0
  139. package/es/container.js.map +1 -0
  140. package/es/core/graphic-utils.js +1 -2
  141. package/es/core/layer-service.js +2 -1
  142. package/es/core/stage.d.ts +0 -9
  143. package/es/core/stage.js +9 -30
  144. package/es/core/stage.js.map +1 -1
  145. package/es/entries/miniapp.d.ts +0 -1
  146. package/es/entries/miniapp.js +1 -5
  147. package/es/entries/miniapp.js.map +1 -1
  148. package/es/entries/node.d.ts +0 -1
  149. package/es/entries/node.js +1 -5
  150. package/es/entries/node.js.map +1 -1
  151. package/es/env.d.ts +1 -0
  152. package/es/env.js +2 -0
  153. package/es/env.js.map +1 -0
  154. package/es/event/public-constant.d.ts +7 -0
  155. package/es/event/public-constant.js +12 -0
  156. package/es/event/public-constant.js.map +1 -0
  157. package/es/event/util.d.ts +1 -1
  158. package/es/graphic/base.d.ts +2 -0
  159. package/es/graphic/base.js +2 -0
  160. package/es/graphic/base.js.map +1 -0
  161. package/es/graphic/creator.d.ts +16 -0
  162. package/es/graphic/creator.js +32 -0
  163. package/es/graphic/creator.js.map +1 -0
  164. package/es/graphic/glyph.js +4 -8
  165. package/es/graphic/glyph.js.map +1 -1
  166. package/es/graphic/graphic-service/graphic-service.d.ts +0 -1
  167. package/es/graphic/graphic-service/graphic-service.js +0 -10
  168. package/es/graphic/graphic-service/graphic-service.js.map +1 -1
  169. package/es/graphic/graphic.d.ts +19 -29
  170. package/es/graphic/graphic.js +123 -207
  171. package/es/graphic/graphic.js.map +1 -1
  172. package/es/graphic/group.d.ts +1 -3
  173. package/es/graphic/group.js +22 -28
  174. package/es/graphic/group.js.map +1 -1
  175. package/es/graphic/modules.d.ts +16 -0
  176. package/es/graphic/modules.js +32 -0
  177. package/es/graphic/modules.js.map +1 -0
  178. package/es/graphic/node-tree.d.ts +3 -3
  179. package/es/graphic/node-tree.js +1 -0
  180. package/es/graphic/node-tree.js.map +1 -1
  181. package/es/graphic/state/shared-state-refresh.js +8 -28
  182. package/es/graphic/state/shared-state-refresh.js.map +1 -1
  183. package/es/graphic/state/shared-state-scope.d.ts +2 -5
  184. package/es/graphic/state/shared-state-scope.js +7 -28
  185. package/es/graphic/state/shared-state-scope.js.map +1 -1
  186. package/es/graphic/state/state-definition-compiler.js +4 -5
  187. package/es/graphic/state/state-definition-compiler.js.map +1 -1
  188. package/es/graphic/state/state-definition.d.ts +2 -5
  189. package/es/graphic/state/state-definition.js.map +1 -1
  190. package/es/graphic/state/state-engine.d.ts +0 -5
  191. package/es/graphic/state/state-engine.js +17 -67
  192. package/es/graphic/state/state-engine.js.map +1 -1
  193. package/es/graphic/state/state-transition-orchestrator.d.ts +7 -9
  194. package/es/graphic/state/state-transition-orchestrator.js +10 -13
  195. package/es/graphic/state/state-transition-orchestrator.js.map +1 -1
  196. package/es/graphic/tools.js +3 -3
  197. package/es/graphic/tools.js.map +1 -1
  198. package/es/index.js.map +1 -1
  199. package/es/interface/graphic/group.d.ts +0 -2
  200. package/es/interface/graphic/group.js.map +1 -1
  201. package/es/interface/graphic.d.ts +1 -5
  202. package/es/interface/graphic.js.map +1 -1
  203. package/es/interface/index.js.map +1 -1
  204. package/es/interface/node-tree.d.ts +3 -0
  205. package/es/interface/node-tree.js.map +1 -1
  206. package/es/interface/stage.d.ts +0 -7
  207. package/es/interface/stage.js.map +1 -1
  208. package/es/interpolate.d.ts +2 -0
  209. package/es/interpolate.js +4 -0
  210. package/es/interpolate.js.map +1 -0
  211. package/es/modules.js.map +1 -1
  212. package/es/path.d.ts +4 -0
  213. package/es/path.js +6 -0
  214. package/es/path.js.map +1 -0
  215. package/es/plugin/3d.d.ts +3 -0
  216. package/es/plugin/3d.js +6 -0
  217. package/es/plugin/3d.js.map +1 -0
  218. package/es/plugin/attribute.d.ts +2 -0
  219. package/es/plugin/attribute.js +4 -0
  220. package/es/plugin/attribute.js.map +1 -0
  221. package/es/plugin/flex-layout.d.ts +1 -0
  222. package/es/plugin/flex-layout.js +2 -0
  223. package/es/plugin/flex-layout.js.map +1 -0
  224. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js +8 -8
  225. package/es/plugins/builtin-plugin/dirty-bounds-plugin.js.map +1 -1
  226. package/es/plugins/index.d.ts +0 -4
  227. package/es/plugins/index.js +0 -8
  228. package/es/plugins/index.js.map +1 -1
  229. package/es/plugins/plugin-service.d.ts +0 -1
  230. package/es/plugins/plugin-service.js +2 -3
  231. package/es/plugins/plugin-service.js.map +1 -1
  232. package/es/plugins/types.d.ts +1 -8
  233. package/es/plugins/types.js.map +1 -1
  234. package/es/register/graphic.d.ts +19 -0
  235. package/es/register/graphic.js +38 -0
  236. package/es/register/graphic.js.map +1 -0
  237. package/es/registry/contribution-registry.d.ts +0 -1
  238. package/es/registry/contribution-registry.js +0 -3
  239. package/es/registry/contribution-registry.js.map +1 -1
  240. package/es/registry/picker-registry.d.ts +0 -1
  241. package/es/registry/picker-registry.js +0 -3
  242. package/es/registry/picker-registry.js.map +1 -1
  243. package/es/registry/renderer-registry.d.ts +0 -1
  244. package/es/registry/renderer-registry.js +0 -3
  245. package/es/registry/renderer-registry.js.map +1 -1
  246. package/es/registry/types.d.ts +0 -3
  247. package/es/registry/types.js.map +1 -1
  248. package/es/svg.d.ts +1 -0
  249. package/es/svg.js +2 -0
  250. package/es/svg.js.map +1 -0
  251. package/es/text.d.ts +2 -0
  252. package/es/text.js +4 -0
  253. package/es/text.js.map +1 -0
  254. package/package.json +245 -1
  255. package/cjs/allocator/constants.d.ts +0 -9
  256. package/cjs/allocator/constants.js +0 -11
  257. package/cjs/allocator/constants.js.map +0 -1
  258. package/cjs/common/Reflect-metadata.d.ts +0 -2
  259. package/cjs/common/Reflect-metadata.js +0 -182
  260. package/cjs/common/Reflect-metadata.js.map +0 -1
  261. package/cjs/common/segment/curve/arc.d.ts +0 -17
  262. package/cjs/common/segment/curve/arc.js +0 -38
  263. package/cjs/common/segment/curve/arc.js.map +0 -1
  264. package/cjs/common/segment/curve/ellipse.d.ts +0 -21
  265. package/cjs/common/segment/curve/ellipse.js +0 -39
  266. package/cjs/common/segment/curve/ellipse.js.map +0 -1
  267. package/cjs/common/segment/curve/move.d.ts +0 -16
  268. package/cjs/common/segment/curve/move.js +0 -37
  269. package/cjs/common/segment/curve/move.js.map +0 -1
  270. package/cjs/common/store.d.ts +0 -2
  271. package/cjs/common/store.js +0 -2
  272. package/cjs/common/store.js.map +0 -1
  273. package/cjs/core/application.d.ts +0 -1
  274. package/cjs/core/application.js +0 -6
  275. package/cjs/core/application.js.map +0 -1
  276. package/cjs/core/global-module.d.ts +0 -1
  277. package/cjs/core/global-module.js +0 -1
  278. package/cjs/core/global-module.js.map +0 -1
  279. package/cjs/export.d.ts +0 -1
  280. package/cjs/export.js +0 -1
  281. package/cjs/export.js.map +0 -1
  282. package/cjs/graphic/state/state-batch-scheduler.d.ts +0 -42
  283. package/cjs/graphic/state/state-batch-scheduler.js +0 -285
  284. package/cjs/graphic/state/state-batch-scheduler.js.map +0 -1
  285. package/cjs/graphic/state/state-model.d.ts +0 -43
  286. package/cjs/graphic/state/state-model.js +0 -143
  287. package/cjs/graphic/state/state-model.js.map +0 -1
  288. package/cjs/graphic/state/state-perf-monitor.d.ts +0 -120
  289. package/cjs/graphic/state/state-perf-monitor.js +0 -224
  290. package/cjs/graphic/state/state-perf-monitor.js.map +0 -1
  291. package/cjs/graphic/state/state-style-resolver.d.ts +0 -13
  292. package/cjs/graphic/state/state-style-resolver.js +0 -50
  293. package/cjs/graphic/state/state-style-resolver.js.map +0 -1
  294. package/cjs/interface/animate.d.ts +0 -1
  295. package/cjs/interface/animate.js +0 -3
  296. package/cjs/interface/animate.js.map +0 -1
  297. package/cjs/interface/creator.d.ts +0 -4
  298. package/cjs/interface/creator.js +0 -6
  299. package/cjs/interface/creator.js.map +0 -1
  300. package/cjs/interface/graphic/dynamic-path.d.ts +0 -1
  301. package/cjs/interface/graphic/dynamic-path.js +0 -3
  302. package/cjs/interface/graphic/dynamic-path.js.map +0 -1
  303. package/cjs/interface/graphic-utils.d.ts +0 -1
  304. package/cjs/interface/graphic-utils.js +0 -3
  305. package/cjs/interface/graphic-utils.js.map +0 -1
  306. package/cjs/interface/theme-service.d.ts +0 -1
  307. package/cjs/interface/theme-service.js +0 -3
  308. package/cjs/interface/theme-service.js.map +0 -1
  309. package/cjs/plugins/base-plugin.d.ts +0 -8
  310. package/cjs/plugins/base-plugin.js +0 -15
  311. package/cjs/plugins/base-plugin.js.map +0 -1
  312. package/cjs/plugins/browser-env-plugin.d.ts +0 -8
  313. package/cjs/plugins/browser-env-plugin.js +0 -24
  314. package/cjs/plugins/browser-env-plugin.js.map +0 -1
  315. package/cjs/plugins/builtin-plugin/poptip-plugin.d.ts +0 -1
  316. package/cjs/plugins/builtin-plugin/poptip-plugin.js +0 -3
  317. package/cjs/plugins/builtin-plugin/poptip-plugin.js.map +0 -1
  318. package/cjs/plugins/picker-plugin.d.ts +0 -7
  319. package/cjs/plugins/picker-plugin.js +0 -19
  320. package/cjs/plugins/picker-plugin.js.map +0 -1
  321. package/cjs/plugins/renderer-plugin.d.ts +0 -7
  322. package/cjs/plugins/renderer-plugin.js +0 -19
  323. package/cjs/plugins/renderer-plugin.js.map +0 -1
  324. package/cjs/render/contributions/render/clear-screen.d.ts +0 -1
  325. package/cjs/render/contributions/render/clear-screen.js +0 -3
  326. package/cjs/render/contributions/render/clear-screen.js.map +0 -1
  327. package/cjs/render/contributions/render/render-slector.d.ts +0 -1
  328. package/cjs/render/contributions/render/render-slector.js +0 -3
  329. package/cjs/render/contributions/render/render-slector.js.map +0 -1
  330. package/es/allocator/constants.d.ts +0 -9
  331. package/es/allocator/constants.js +0 -18
  332. package/es/allocator/constants.js.map +0 -1
  333. package/es/common/Reflect-metadata.d.ts +0 -2
  334. package/es/common/Reflect-metadata.js +0 -178
  335. package/es/common/Reflect-metadata.js.map +0 -1
  336. package/es/common/segment/curve/arc.d.ts +0 -17
  337. package/es/common/segment/curve/arc.js +0 -31
  338. package/es/common/segment/curve/arc.js.map +0 -1
  339. package/es/common/segment/curve/ellipse.d.ts +0 -21
  340. package/es/common/segment/curve/ellipse.js +0 -33
  341. package/es/common/segment/curve/ellipse.js.map +0 -1
  342. package/es/common/segment/curve/move.d.ts +0 -16
  343. package/es/common/segment/curve/move.js +0 -31
  344. package/es/common/segment/curve/move.js.map +0 -1
  345. package/es/common/store.d.ts +0 -2
  346. package/es/common/store.js +0 -2
  347. package/es/common/store.js.map +0 -1
  348. package/es/core/application.d.ts +0 -1
  349. package/es/core/application.js +0 -2
  350. package/es/core/application.js.map +0 -1
  351. package/es/core/global-module.d.ts +0 -1
  352. package/es/core/global-module.js +0 -1
  353. package/es/core/global-module.js.map +0 -1
  354. package/es/export.d.ts +0 -1
  355. package/es/export.js +0 -1
  356. package/es/export.js.map +0 -1
  357. package/es/graphic/state/state-batch-scheduler.d.ts +0 -42
  358. package/es/graphic/state/state-batch-scheduler.js +0 -278
  359. package/es/graphic/state/state-batch-scheduler.js.map +0 -1
  360. package/es/graphic/state/state-model.d.ts +0 -43
  361. package/es/graphic/state/state-model.js +0 -135
  362. package/es/graphic/state/state-model.js.map +0 -1
  363. package/es/graphic/state/state-perf-monitor.d.ts +0 -120
  364. package/es/graphic/state/state-perf-monitor.js +0 -214
  365. package/es/graphic/state/state-perf-monitor.js.map +0 -1
  366. package/es/graphic/state/state-style-resolver.d.ts +0 -13
  367. package/es/graphic/state/state-style-resolver.js +0 -42
  368. package/es/graphic/state/state-style-resolver.js.map +0 -1
  369. package/es/interface/animate.d.ts +0 -1
  370. package/es/interface/animate.js +0 -3
  371. package/es/interface/animate.js.map +0 -1
  372. package/es/interface/creator.d.ts +0 -4
  373. package/es/interface/creator.js +0 -2
  374. package/es/interface/creator.js.map +0 -1
  375. package/es/interface/graphic/dynamic-path.d.ts +0 -1
  376. package/es/interface/graphic/dynamic-path.js +0 -3
  377. package/es/interface/graphic/dynamic-path.js.map +0 -1
  378. package/es/interface/graphic-utils.d.ts +0 -1
  379. package/es/interface/graphic-utils.js +0 -3
  380. package/es/interface/graphic-utils.js.map +0 -1
  381. package/es/interface/theme-service.d.ts +0 -1
  382. package/es/interface/theme-service.js +0 -3
  383. package/es/interface/theme-service.js.map +0 -1
  384. package/es/plugins/base-plugin.d.ts +0 -8
  385. package/es/plugins/base-plugin.js +0 -7
  386. package/es/plugins/base-plugin.js.map +0 -1
  387. package/es/plugins/browser-env-plugin.d.ts +0 -8
  388. package/es/plugins/browser-env-plugin.js +0 -16
  389. package/es/plugins/browser-env-plugin.js.map +0 -1
  390. package/es/plugins/builtin-plugin/poptip-plugin.d.ts +0 -1
  391. package/es/plugins/builtin-plugin/poptip-plugin.js +0 -3
  392. package/es/plugins/builtin-plugin/poptip-plugin.js.map +0 -1
  393. package/es/plugins/picker-plugin.d.ts +0 -7
  394. package/es/plugins/picker-plugin.js +0 -11
  395. package/es/plugins/picker-plugin.js.map +0 -1
  396. package/es/plugins/renderer-plugin.d.ts +0 -7
  397. package/es/plugins/renderer-plugin.js +0 -11
  398. package/es/plugins/renderer-plugin.js.map +0 -1
  399. package/es/render/contributions/render/clear-screen.d.ts +0 -1
  400. package/es/render/contributions/render/clear-screen.js +0 -3
  401. package/es/render/contributions/render/clear-screen.js.map +0 -1
  402. package/es/render/contributions/render/render-slector.d.ts +0 -1
  403. package/es/render/contributions/render/render-slector.js +0 -3
  404. package/es/render/contributions/render/render-slector.js.map +0 -1
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- function isPlainObject(value) {
4
- return null != value && "object" == typeof value && !Array.isArray(value);
5
- }
6
-
7
- function cloneValue(value) {
8
- if (!isPlainObject(value)) return value;
9
- const clone = {};
10
- for (const key in value) Object.prototype.hasOwnProperty.call(value, key) && (clone[key] = cloneValue(value[key]));
11
- return clone;
12
- }
13
-
14
- function deepMerge(base, value) {
15
- const result = cloneValue(base) || {};
16
- for (const key in value) {
17
- if (!Object.prototype.hasOwnProperty.call(value, key)) continue;
18
- const nextValue = value[key], previousValue = result[key];
19
- isPlainObject(previousValue) && isPlainObject(nextValue) ? result[key] = deepMerge(previousValue, nextValue) : result[key] = cloneValue(nextValue);
20
- }
21
- return result;
22
- }
23
-
24
- Object.defineProperty(exports, "__esModule", {
25
- value: !0
26
- }), exports.StateStyleResolver = void 0;
27
-
28
- class StateStyleResolver {
29
- constructor(options = {}) {
30
- this.options = options;
31
- }
32
- resolve(normalAttrs, states, stateProxy, currentStates, stateSort) {
33
- var _a;
34
- const mergeMode = null !== (_a = this.options.mergeMode) && void 0 !== _a ? _a : "shallow", sortedStates = stateSort ? currentStates.slice().sort(stateSort) : currentStates.slice(), resolvedAttrs = {};
35
- return sortedStates.forEach((stateName => {
36
- const attrs = stateProxy ? stateProxy(stateName, sortedStates) : null == states ? void 0 : states[stateName];
37
- if (null != attrs) for (const key in attrs) {
38
- if (!Object.prototype.hasOwnProperty.call(attrs, key)) continue;
39
- const nextValue = attrs[key];
40
- if ("deep" === mergeMode && isPlainObject(nextValue) && (isPlainObject(resolvedAttrs[key]) || isPlainObject(normalAttrs[key]))) {
41
- const baseValue = isPlainObject(resolvedAttrs[key]) ? resolvedAttrs[key] : isPlainObject(normalAttrs[key]) ? normalAttrs[key] : {};
42
- resolvedAttrs[key] = deepMerge(baseValue, nextValue);
43
- } else resolvedAttrs[key] = cloneValue(nextValue);
44
- }
45
- })), resolvedAttrs;
46
- }
47
- }
48
-
49
- exports.StateStyleResolver = StateStyleResolver;
50
- //# sourceMappingURL=state-style-resolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/graphic/state/state-style-resolver.ts"],"names":[],"mappings":";;;AAkBA,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,UAAU,CAAI,KAAQ;IAC7B,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAED,MAAM,KAAK,GAAwB,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;YACrD,SAAS;SACV;QACD,KAAK,CAAC,GAAG,CAAC,GAAG,UAAU,CAAE,KAA6B,CAAC,GAAG,CAAC,CAAC,CAAC;KAC9D;IACD,OAAO,KAAU,CAAC;AACpB,CAAC;AAED,SAAS,SAAS,CAAC,IAAyB,EAAE,KAA0B;IACtE,MAAM,MAAM,GAAwB,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAE3D,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;QACvB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;YACrD,SAAS;SACV;QAED,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAElC,IAAI,aAAa,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,SAAS,CAAC,EAAE;YAC5D,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;SACnD;aAAM;YACL,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;SACrC;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAa,kBAAkB;IAC7B,YAA6B,UAAsC,EAAE;QAAxC,YAAO,GAAP,OAAO,CAAiC;IAAG,CAAC;IAEzE,OAAO,CACL,WAAuB,EACvB,MAA8C,EAC9C,UAAqC,EACrC,aAAuB,EACvB,SAAqB;;QAErB,MAAM,SAAS,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,SAAS,mCAAI,SAAS,CAAC;QACtD,MAAM,YAAY,GAAG,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC/F,MAAM,aAAa,GAAe,EAAE,CAAC;QAErC,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;YAC/B,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,SAAS,CAAC,CAAC;YAErF,IAAI,KAAK,IAAI,IAAI,EAAE;gBACjB,OAAO;aACR;YAED,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;gBACvB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE;oBACrD,SAAS;iBACV;gBAED,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;gBAE7B,IACE,SAAS,KAAK,MAAM;oBACpB,aAAa,CAAC,SAAS,CAAC;oBACxB,CAAC,aAAa,CAAE,aAAqC,CAAC,GAAG,CAAC,CAAC;wBACzD,aAAa,CAAE,WAAmC,CAAC,GAAG,CAAC,CAAC,CAAC,EAC3D;oBACA,MAAM,SAAS,GAAG,aAAa,CAAE,aAAqC,CAAC,GAAG,CAAC,CAAC;wBAC1E,CAAC,CAAE,aAAqC,CAAC,GAAG,CAAC;wBAC7C,CAAC,CAAC,aAAa,CAAE,WAAmC,CAAC,GAAG,CAAC,CAAC;4BAC1D,CAAC,CAAE,WAAmC,CAAC,GAAG,CAAC;4BAC3C,CAAC,CAAC,EAAE,CAAC;oBACN,aAAqC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;iBAC/E;qBAAM;oBACJ,aAAqC,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;iBACrE;aACF;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAhDD,gDAgDC","file":"state-style-resolver.js","sourcesContent":["import type { StateProxy, StateSort } from './state-model';\n\nexport type StateMergeMode = 'shallow' | 'deep';\n\nexport interface IStateStyleResolverOptions {\n mergeMode?: StateMergeMode;\n}\n\nexport interface IStateStyleResolver<T> {\n resolve: (\n normalAttrs: Partial<T>,\n states: Record<string, Partial<T>> | undefined,\n stateProxy: StateProxy<T> | undefined,\n currentStates: string[],\n stateSort?: StateSort\n ) => Partial<T>;\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, any> {\n return value != null && typeof value === 'object' && !Array.isArray(value);\n}\n\nfunction cloneValue<T>(value: T): T {\n if (!isPlainObject(value)) {\n return value;\n }\n\n const clone: Record<string, any> = {};\n for (const key in value) {\n if (!Object.prototype.hasOwnProperty.call(value, key)) {\n continue;\n }\n clone[key] = cloneValue((value as Record<string, any>)[key]);\n }\n return clone as T;\n}\n\nfunction deepMerge(base: Record<string, any>, value: Record<string, any>): Record<string, any> {\n const result: Record<string, any> = cloneValue(base) || {};\n\n for (const key in value) {\n if (!Object.prototype.hasOwnProperty.call(value, key)) {\n continue;\n }\n\n const nextValue = value[key];\n const previousValue = result[key];\n\n if (isPlainObject(previousValue) && isPlainObject(nextValue)) {\n result[key] = deepMerge(previousValue, nextValue);\n } else {\n result[key] = cloneValue(nextValue);\n }\n }\n\n return result;\n}\n\nexport class StateStyleResolver<T extends Record<string, any> = Record<string, any>> implements IStateStyleResolver<T> {\n constructor(private readonly options: IStateStyleResolverOptions = {}) {}\n\n resolve(\n normalAttrs: Partial<T>,\n states: Record<string, Partial<T>> | undefined,\n stateProxy: StateProxy<T> | undefined,\n currentStates: string[],\n stateSort?: StateSort\n ): Partial<T> {\n const mergeMode = this.options.mergeMode ?? 'shallow';\n const sortedStates = stateSort ? currentStates.slice().sort(stateSort) : currentStates.slice();\n const resolvedAttrs: Partial<T> = {};\n\n sortedStates.forEach(stateName => {\n const attrs = stateProxy ? stateProxy(stateName, sortedStates) : states?.[stateName];\n\n if (attrs == null) {\n return;\n }\n\n for (const key in attrs) {\n if (!Object.prototype.hasOwnProperty.call(attrs, key)) {\n continue;\n }\n\n const nextValue = attrs[key];\n\n if (\n mergeMode === 'deep' &&\n isPlainObject(nextValue) &&\n (isPlainObject((resolvedAttrs as Record<string, any>)[key]) ||\n isPlainObject((normalAttrs as Record<string, any>)[key]))\n ) {\n const baseValue = isPlainObject((resolvedAttrs as Record<string, any>)[key])\n ? (resolvedAttrs as Record<string, any>)[key]\n : isPlainObject((normalAttrs as Record<string, any>)[key])\n ? (normalAttrs as Record<string, any>)[key]\n : {};\n (resolvedAttrs as Record<string, any>)[key] = deepMerge(baseValue, nextValue);\n } else {\n (resolvedAttrs as Record<string, any>)[key] = cloneValue(nextValue);\n }\n }\n });\n\n return resolvedAttrs;\n }\n}\n"]}
@@ -1 +0,0 @@
1
-
@@ -1,3 +0,0 @@
1
-
2
-
3
- //# sourceMappingURL=animate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/interface/animate.ts"],"names":[],"mappings":"","file":"animate.js","sourcesContent":["// import type { EventEmitter } from '@visactor/vutils';\n// import type { AnimateStepType } from '../common/enums';\n// import type { Releaseable } from './common';\n// import type { IGraphic } from './graphic';\n\n// enum AnimateStatus {\n// INITIAL = 0,\n// RUNNING = 1,\n// PAUSED = 2,\n// END = 3\n// }\n\n// enum AnimateMode {\n// NORMAL = 0b0000,\n// SET_ATTR_IMMEDIATELY = 0b0001\n// }\n\n// // export type EasingType = (...args: any) => any;\n\n// // export declare class Easing {\n// // static linear(t: number): number;\n// // static none(): typeof Easing.linear;\n// // /**\n// // * 获取缓动函数,amount指示这个缓动函数的插值方式\n// // * @param amount\n// // * @returns\n// // */\n// // static get(amount: number): (t: number) => number;\n// // static getPowIn(pow: number): (t: number) => number;\n// // static getPowOut(pow: number): (t: number) => number;\n// // static getPowInOut(pow: number): (t: number) => number;\n// // static quadIn: (t: number) => number;\n// // static quadOut: (t: number) => number;\n// // static quadInOut: (t: number) => number;\n// // static cubicIn: (t: number) => number;\n// // static cubicOut: (t: number) => number;\n// // static cubicInOut: (t: number) => number;\n// // static quartIn: (t: number) => number;\n// // static quartOut: (t: number) => number;\n// // static quartInOut: (t: number) => number;\n// // static quintIn: (t: number) => number;\n// // static quintOut: (t: number) => number;\n// // static quintInOut: (t: number) => number;\n// // static getBackIn(amount: number): (t: number) => number;\n// // static getBackOut(amount: number): (t: number) => number;\n// // static getBackInOut(amount: number): (t: number) => number;\n// // static backIn: (t: number) => number;\n// // static backOut: (t: number) => number;\n// // static backInOut: (t: number) => number;\n// // static circIn(t: number): number;\n// // static circOut(t: number): number;\n// // static circInOut(t: number): number;\n// // static bounceOut(t: number): number;\n// // static bounceIn(t: number): number;\n// // static bounceInOut(t: number): number;\n// // static getElasticIn(amplitude: number, period: number): (t: number) => number;\n// // static getElasticOut(amplitude: number, period: number): (t: number) => number;\n// // static getElasticInOut(amplitude: number, period: number): (t: number) => number;\n// // static elasticIn: (t: number) => number;\n// // static elasticOut: (t: number) => number;\n// // static elasticInOut: (t: number) => number;\n// // }\n\n// // timeline管理一堆的animate,多个timeline互不影响\n// // timeline主要作用是基于layer层面的整体管理\n// // 每个layer默认带有一个timeline\n// export interface Timeline {\n// AnimateList: IAnimate[];\n// }\n\n// type IStopType = 'end' | 'start' | 'current';\n\n// // TODO: 提供options配置可序列化\n// interface AnimateSpecItem {\n// type: 'to' | 'delay' | 'stop' | 'any';\n// params: any[];\n// }\n\n// export type EasingTypeStr =\n// | 'linear'\n// | 'quadIn'\n// | 'quadOut'\n// | 'quadInOut'\n// | 'quadInOut'\n// | 'cubicIn'\n// | 'cubicOut'\n// | 'cubicInOut'\n// | 'quartIn'\n// | 'quartOut'\n// | 'quartInOut'\n// | 'quintIn'\n// | 'quintOut'\n// | 'quintInOut'\n// | 'backIn'\n// | 'backOut'\n// | 'backInOut'\n// | 'circIn'\n// | 'circOut'\n// | 'circInOut'\n// | 'bounceOut'\n// | 'bounceIn'\n// | 'bounceInOut'\n// | 'elasticIn'\n// | 'elasticOut'\n// | 'elasticInOut'\n// | 'sineIn'\n// | 'sineOut'\n// | 'sineInOut'\n// | 'expoIn'\n// | 'expoOut'\n// | 'expoInOut'\n// // @since 0.21.0\n// | 'easeInOutQuad'\n// | 'easeOutElastic'\n// | 'easeInOutElastic'\n// | '';\n// export type EasingTypeFunc = (t: number) => number;\n\n// export type EasingType = EasingTypeStr | EasingTypeFunc;\n\n// export type IAnimateStepType = keyof typeof AnimateStepType;\n\n// export interface IStep {\n// type: IAnimateStepType;\n// prev?: IStep;\n// // 持续时间\n// duration: number;\n// // 在animate中的位置\n// position: number;\n// next?: IStep;\n// props?: any;\n// parsedProps?: any;\n// propKeys?: string[];\n// easing?: EasingTypeFunc;\n// customAnimate?: ICustomAnimate;\n\n// append: (step: IStep) => void;\n// getLastProps: () => any;\n// }\n\n// export interface IStepConfig {\n// tempProps?: boolean; // props为临时props,可以直接使用不用拷贝\n// noPreventAttrs?: boolean;\n// }\n\n// export interface IAnimateTarget {\n// onAnimateBind?: (animte: IAnimate | ISubAnimate) => void;\n// // 获取属性\n// getComputedAttribute: (name: string) => any;\n// // 获取默认属性\n// getDefaultAttribute: (name: string) => any;\n// onStop: (props?: Record<string, any>) => void;\n// animates: Map<string | number, IAnimate>;\n// [key: string]: any;\n// }\n\n// export interface ICustomAnimate {\n// duration: number;\n// easing: EasingType;\n// step?: IStep;\n// mode?: AnimateMode;\n\n// bind: (target: IAnimateTarget, subAni: ISubAnimate) => void;\n// // 在第一次调用的时候触发\n// onBind: () => void;\n// // 第一次执行的时候调用\n// onFirstRun: () => void;\n// // 开始执行的时候调用(如果有循环,那每个周期都会调用)\n// onStart: () => void;\n// // 结束执行的时候调用(如果有循环,那每个周期都会调用)\n// onEnd: () => void;\n// onUpdate: (end: boolean, ratio: number, out: Record<string, any>) => void;\n// update: (end: boolean, ratio: number, out: Record<string, any>) => void;\n// getEndProps: () => Record<string, any> | void;\n// getFromProps: () => Record<string, any> | void;\n// getMergedEndProps: () => Record<string, any> | void;\n// }\n\n// export type IAnimateConstructor = new (...args: any[]) => IAnimate;\n\n// // 每一个animate绑定一个graphic,用于描述这个graphic的动画内容\n// // 在timeline层面,animate相当于是一段timeslice\n// export interface IAnimate {\n// readonly id: string | number;\n// status: AnimateStatus;\n\n// interpolateFunc: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n\n// _onStart?: (() => void)[];\n// _onFrame?: ((step: IStep, ratio: number) => void)[];\n// _onEnd?: (() => void)[];\n// _onRemove?: (() => void)[];\n\n// getStartProps: () => Record<string, any>;\n// getEndProps: () => Record<string, any>;\n\n// setTimeline: (timeline: ITimeline) => void;\n// // getTimeline: () => ITimeline;\n// readonly timeline: ITimeline;\n\n// bind: (target: IAnimateTarget) => this;\n// to: (props: Record<string, any>, duration: number, easing: EasingType, params?: IStepConfig) => this;\n// from: (props: Record<string, any>, duration: number, easing: EasingType, params?: IStepConfig) => this;\n// pause: () => void;\n// resume: () => void;\n// onStart: (cb: () => void) => void;\n// onEnd: (cb: () => void) => void;\n// onFrame: (cb: (step: IStep, ratio: number) => void) => void;\n// onRemove: (cb: () => void) => void;\n// // 屏蔽属性\n// preventAttr: (key: string) => void;\n// // 屏蔽属性\n// preventAttrs: (key: string[]) => void;\n// // 属性是否合法\n// validAttr: (key: string) => boolean;\n\n// runCb: (cb: (a: IAnimate, step: IStep) => void) => IAnimate;\n\n// // 自定义插值,返回false表示没有匹配上\n// customInterpolate: (\n// key: string,\n// ratio: number,\n// from: any,\n// to: any,\n// target: IAnimateTarget,\n// ret: Record<string, any>\n// ) => boolean;\n// //\n// play: (customAnimate: ICustomAnimate) => this;\n\n// // 获取该属性的上一个值\n// // getLastPropByName: (name: string, step: IStep) => any;\n// // delay: (duration: number) => IAnimate;\n// stop: (type?: 'start' | 'end' | Record<string, any>) => void;\n// /** 打上END标志,下一帧被删除 */\n// release: () => void;\n// // 获取持续的时长\n// getDuration: () => number;\n// // 获取动画开始时间(注意并不是子动画的startAt)\n// getStartTime: () => number;\n// // done: (cb: (_: any) => any) => IAnimate;\n// // pause: () => IAnimate;\n// // spec: (spec: AnimateSpecItem[]) => IAnimate;\n// // start: () => void; // 有start方法,避免动画提前开始(VGrammar需要时间处理数据)\n// wait: (delay: number) => this;\n\n// // // 编排\n// afterAll: (list: IAnimate[]) => this;\n// after: (animate: IAnimate) => this;\n// parallel: (animate: IAnimate) => this;\n\n// // // timislice (getter)\n// // startTime: number;\n// // endTime: number;\n// // startTimes: number[];\n// // endTimes: number[];\n\n// // // 高级参数,frame到frameEnd之间可以进行reverse,loop,bounce效果\n// // frame: () => IAnimate;\n// // frameEnd: () => IAnimate;\n// reversed: (r: boolean) => IAnimate;\n// loop: (n: number) => IAnimate;\n// bounce: (b: boolean) => IAnimate;\n\n// nextAnimate?: IAnimate;\n// prevAnimate?: IAnimate;\n\n// advance: (delta: number) => void;\n\n// startAt: (t: number) => IAnimate;\n\n// // // 语法糖\n// // create: (duration: number) => IAnimate;\n// // fadeIn: (duration: number) => IAnimate;\n// }\n\n// export interface ISubAnimate {\n// getLastStep: () => IStep;\n// animate: IAnimate;\n// // 获取该属性的上一个值\n// getLastPropByName: (name: string, step: IStep) => any;\n// }\n\n// // rect.animate().abc().to({}, 1000).delay(1000).frame().to().delay().to().frameEnd().loop().bounce()\n\n// export interface BaseAnimateConfig {\n// id?: number | string;\n// interpolate?: (key: string, ratio: number, from: any, to: any, nextAttributes: any) => boolean;\n// onStart?: () => void;\n// onFrame?: (step: IStep, ratio: number) => void;\n// onEnd?: () => void;\n// onRemove?: () => void;\n// }\n\n// // VGrammar和 vrender命名不一致,好尴尬\n// export interface MorphingAnimateConfig extends Omit<BaseAnimateConfig, 'interpolate'> {\n// duration?: number;\n// easing?: EasingType; // 统一到easing\n// delay?: number;\n// }\n\n// export interface MultiMorphingAnimateConfig extends MorphingAnimateConfig {\n// splitPath?: 'clone' | ((graphic: IGraphic, count: number, needAppend?: boolean) => IGraphic[]);\n// individualDelay?: (index: number, count: number, fromGraphic: IGraphic, toGraphic: IGraphic) => number;\n// }\n\n// export interface ITimeline {\n// id: number;\n// animateCount: number;\n// isGlobal: boolean;\n// addAnimate: (animate: IAnimate) => void;\n// removeAnimate: (animate: IAnimate, release?: boolean) => void;\n// tick: (delta: number) => void;\n// clear: () => void;\n// pause: () => void;\n// resume: () => void;\n// }\n\n// export type ITimelineConstructor = new (...args: any[]) => ITimeline;\n\n// export type ITickerConstructor = new (...args: any[]) => ITicker;\n\n// export interface ITickHandler extends Releaseable {\n// avaliable: () => boolean;\n// /**\n// * 开始执行tick\n// * @param interval 延时 ms\n// * @param cb 执行的回调\n// */\n// tick: (interval: number, cb: (handler: ITickHandler) => void) => void; // 开始\n// tickTo?: (t: number, cb: (handler: ITickHandler, params?: { once: boolean }) => void) => void;\n// getTime: () => number; // 获取时间\n// }\n\n// export interface ITickerHandlerStatic {\n// Avaliable: () => boolean;\n// new (): ITickHandler;\n// }\n\n// export interface ITicker extends EventEmitter {\n// setFPS?: (fps: number) => void;\n// setInterval?: (interval: number) => void;\n// getFPS?: () => number;\n// getInterval?: () => number;\n// tick: (interval: number) => void;\n// tickAt?: (time: number) => void;\n// pause: () => boolean;\n// resume: () => boolean;\n// /**\n// * 开启tick,force为true强制开启,否则如果timeline为空则不开启\n// */\n// start: (force?: boolean) => boolean;\n// stop: () => void;\n// addTimeline: (timeline: ITimeline) => void;\n// remTimeline: (timeline: ITimeline) => void;\n// trySyncTickStatus: () => void;\n// getTimelines: () => ITimeline[];\n\n// release: () => void;\n\n// // 是否自动停止,默认为true\n// autoStop: boolean;\n// }\n"]}
@@ -1,4 +0,0 @@
1
- import type { ILayer } from './layer';
2
- import type { IStage } from './stage';
3
- export declare function createLayer(canvasId?: string): ILayer;
4
- export declare function createStage(w: number, h: number): IStage;
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: !0
5
- });
6
- //# sourceMappingURL=creator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/interface/creator.ts"],"names":[],"mappings":"","file":"creator.js","sourcesContent":["import type { ILayer } from './layer';\nimport type { IStage } from './stage';\n\nexport declare function createLayer(canvasId?: string): ILayer;\nexport declare function createStage(w: number, h: number): IStage;\n"]}
@@ -1,3 +0,0 @@
1
-
2
-
3
- //# sourceMappingURL=dynamic-path.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/interface/graphic/dynamic-path.ts"],"names":[],"mappings":"","file":"dynamic-path.js","sourcesContent":["// import { IGraphic, IStyle } from '../Graphic';\n// import { IPath2D } from '../Path';\n\n// // TODO: Path svg <Path path='' />\n\n// export interface IDynamicPathShape {\n// path: IPath2D;\n// }\n\n// type ShapeType = 'area' | 'circle' | 'ellipse' | 'line' | 'rect' | 'path';\n\n// export interface IDynamicPath extends IGraphic, Partial<IDynamicPathShape> {\n// type: ShapeType;\n// style?: Partial<IStyle>; // 用户传入什么就是什么\n// }\n"]}
@@ -1 +0,0 @@
1
-
@@ -1,3 +0,0 @@
1
-
2
-
3
- //# sourceMappingURL=graphic-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/interface/graphic-utils.ts"],"names":[],"mappings":"","file":"graphic-utils.js","sourcesContent":["// import { IPoint } from \"@visactor/vutils\";\n// import { IContext2d } from \"./context\";\n// import { IGraphicAttribute } from \"./graphic\";\n\n// interface TextType {\n// text: string;\n// fontFamily: string;\n// fontSize: number;\n// }\n\n// export declare function measureText(\n// params: TextType,\n// ctx?: IContext2d\n// ): { width: number; height: number };\n\n// export * from \"./graphic/bounds\";\n\n// // export type TransformType = Pick<IGraphicAttribute, 'x' | 'y' | 'scaleX' | 'scaleY' | 'angle'> & {\n// // anchor?: IGraphicAttribute['anchor'];\n// // };\n\n// // export interface Transform {\n// // init: (origin: TransformType) => Transform;\n// // translate: (x: number, y: number) => Transform;\n// // translateTo: (x: number, y: number) => Transform;\n// // scale: (sx: number, sy: number, center: IPoint) => Transform;\n// // scaleTo: (sx: number, sy: number, center: IPoint) => Transform;\n// // rotate: (rx: number, ry: number, center: IPoint) => Transform;\n// // rotateTo: (rx: number, ry: number, center: IPoint) => Transform;\n// // // 语法糖\n// // interactive: (dx: number, dy: number, dsx: number, dsy: number, drx: number, dry: number) => Transform;\n// // // 扩展padding像素,用于外描边,内描边\n// // extend: (origin: TransformType, padding: number) => Transform;\n// // // 将所有的transform生成为一次的transform\n// // simplify: (target?: TransformType) => TransformType;\n// // }\n"]}
@@ -1 +0,0 @@
1
-
@@ -1,3 +0,0 @@
1
-
2
-
3
- //# sourceMappingURL=theme-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/interface/theme-service.ts"],"names":[],"mappings":"","file":"theme-service.js","sourcesContent":["// import { ContributionProvider } from '../../common/contribution-provider';\n// import {\n// ICircleGraphicAttribute,\n// ILineGraphicAttribute,\n// IPathGraphicAttribute,\n// IRectGraphicAttribute,\n// ISymbolGraphicAttribute,\n// ITextGraphicAttribute,\n// IArcGraphicAttribute,\n// IAreaGraphicAttribute,\n// IGroupGraphicAttribute,\n// IPolygonGraphicAttribute\n// } from '../../interface';\n\n// export interface ITheme {\n// readonly id: string;\n// circleAttribute: Required<ICircleGraphicAttribute>;\n// textAttribute: Required<ITextGraphicAttribute>;\n// symbolAttribute: Required<ISymbolGraphicAttribute>;\n// lineAttribute: Required<ILineGraphicAttribute>;\n// areaAttribute: Required<IAreaGraphicAttribute>;\n// rectAttribute: Required<IRectGraphicAttribute>;\n// pathAttribute: Required<IPathGraphicAttribute>;\n// arcAttribute: Required<IArcGraphicAttribute>;\n// groupAttribute: Required<IGroupGraphicAttribute>;\n// polygonAttribute: Required<IPolygonGraphicAttribute>;\n\n// configure: (themeService: IThemeService) => void;\n\n// activate: () => void;\n// deactivate: () => void;\n// }\n\n// export const Theme = Symbol.for('Theme');\n\n// export const DEFAULT_THEME_ID = 'DEFAULT_THEME_ID';\n\n// export interface IThemeService {\n// register: (theme: ITheme) => void;\n// getThemes: () => ITheme[];\n\n// getTheme: (themeId: string) => ITheme;\n\n// setCurrentTheme: (themeId: string) => void;\n\n// getCurrentTheme: () => ITheme;\n\n// defaultTheme: ITheme;\n\n// reset: () => void;\n// }\n\n// export const ThemeServce = Symbol.for('ThemeServce');\n\n// export class DefaultThemeService implements IThemeService {\n// protected themeMap: Record<string, ITheme> = {};\n// protected activeTheme?: ITheme;\n\n// constructor(\n// @named(Theme)\n// protected readonly contributions: ContributionProvider<ITheme>\n// ) {}\n\n// @postConstruct()\n// init() {\n// this.contributions.getContributions().forEach(theme => {\n// theme.configure(this);\n// });\n// this.setCurrentTheme(this.defaultTheme.id);\n// }\n\n// register(theme: ITheme) {\n// this.themeMap[theme.id] = theme;\n// }\n// getThemes(): ITheme[] {\n// return Object.keys(this.themeMap).map(k => this.themeMap[k]);\n// }\n\n// getTheme(themeId: string): ITheme {\n// return this.themeMap[themeId];\n// }\n\n// setCurrentTheme(themeId: string): void {\n// this.activeTheme = this.themeMap[themeId] || this.defaultTheme;\n// }\n\n// getCurrentTheme(): ITheme {\n// return this.activeTheme as ITheme;\n// }\n\n// get defaultTheme(): ITheme {\n// return this.themeMap[DEFAULT_THEME_ID];\n// }\n\n// reset(): void {\n// this.setCurrentTheme(this.defaultTheme.id);\n// }\n// }\n"]}
@@ -1,8 +0,0 @@
1
- import type { IPlugin, IPluginContext } from './types';
2
- export declare abstract class BasePlugin implements IPlugin {
3
- readonly name: string;
4
- readonly version: string;
5
- constructor(name: string, version?: string);
6
- abstract install(context: IPluginContext): void;
7
- uninstall(): void;
8
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: !0
5
- }), exports.BasePlugin = void 0;
6
-
7
- class BasePlugin {
8
- constructor(name, version = "1.0.0") {
9
- this.name = name, this.version = version;
10
- }
11
- uninstall() {}
12
- }
13
-
14
- exports.BasePlugin = BasePlugin;
15
- //# sourceMappingURL=base-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/plugins/base-plugin.ts"],"names":[],"mappings":";;;AAEA,MAAsB,UAAU;IAC9B,YAA4B,IAAY,EAAkB,UAAkB,OAAO;QAAvD,SAAI,GAAJ,IAAI,CAAQ;QAAkB,YAAO,GAAP,OAAO,CAAkB;IAAG,CAAC;IAIvF,SAAS;QACP,OAAO;IACT,CAAC;CACF;AARD,gCAQC","file":"base-plugin.js","sourcesContent":["import type { IPlugin, IPluginContext } from './types';\n\nexport abstract class BasePlugin implements IPlugin {\n constructor(public readonly name: string, public readonly version: string = '1.0.0') {}\n\n abstract install(context: IPluginContext): void;\n\n uninstall(): void {\n return;\n }\n}\n"]}
@@ -1,8 +0,0 @@
1
- import { BasePlugin } from './base-plugin';
2
- import type { IBrowserEnvPluginHooks, IPluginContext } from './types';
3
- export declare class BrowserEnvPlugin extends BasePlugin {
4
- private readonly hooks;
5
- constructor(name: string, hooks?: IBrowserEnvPluginHooks, version?: string);
6
- install(context: IPluginContext): void;
7
- uninstall(): void;
8
- }
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: !0
5
- }), exports.BrowserEnvPlugin = void 0;
6
-
7
- const base_plugin_1 = require("./base-plugin");
8
-
9
- class BrowserEnvPlugin extends base_plugin_1.BasePlugin {
10
- constructor(name, hooks = {}, version) {
11
- super(name, version), this.hooks = hooks;
12
- }
13
- install(context) {
14
- var _a, _b;
15
- null === (_b = (_a = this.hooks).install) || void 0 === _b || _b.call(_a, context);
16
- }
17
- uninstall() {
18
- var _a, _b;
19
- null === (_b = (_a = this.hooks).uninstall) || void 0 === _b || _b.call(_a);
20
- }
21
- }
22
-
23
- exports.BrowserEnvPlugin = BrowserEnvPlugin;
24
- //# sourceMappingURL=browser-env-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/plugins/browser-env-plugin.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAG3C,MAAa,gBAAiB,SAAQ,wBAAU;IAC9C,YAAY,IAAY,EAAmB,QAAgC,EAAE,EAAE,OAAgB;QAC7F,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QADoB,UAAK,GAAL,KAAK,CAA6B;IAE7E,CAAC;IAED,OAAO,CAAC,OAAuB;;QAC7B,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,OAAO,mDAAG,OAAO,CAAC,CAAC;IAChC,CAAC;IAED,SAAS;;QACP,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,SAAS,kDAAI,CAAC;IAC3B,CAAC;CACF;AAZD,4CAYC","file":"browser-env-plugin.js","sourcesContent":["import { BasePlugin } from './base-plugin';\nimport type { IBrowserEnvPluginHooks, IPluginContext } from './types';\n\nexport class BrowserEnvPlugin extends BasePlugin {\n constructor(name: string, private readonly hooks: IBrowserEnvPluginHooks = {}, version?: string) {\n super(name, version);\n }\n\n install(context: IPluginContext): void {\n this.hooks.install?.(context);\n }\n\n uninstall(): void {\n this.hooks.uninstall?.();\n }\n}\n"]}
@@ -1,3 +0,0 @@
1
-
2
-
3
- //# sourceMappingURL=poptip-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/plugins/builtin-plugin/poptip-plugin.ts"],"names":[],"mappings":"","file":"poptip-plugin.js","sourcesContent":["// import type { FederatedPointerEvent } from '../../event';\n// import { Generator } from '../../common/generator';\n// import type { IGraphic, IPlugin, IPluginService } from '../../interface';\n\n// export class PopTipPlugin implements IPlugin {\n// name: 'PopTipPlugin' = 'PopTipPlugin';\n// activeEvent: 'onRegister' = 'onRegister';\n// pluginService: IPluginService;\n// _uid: number = Generator.GenAutoIncrementId();\n// key: string = this.name + this._uid;\n// activeGraphic: IGraphic;\n\n// activate(context: IPluginService): void {\n// this.pluginService = context;\n// const { stage } = this.pluginService;\n\n// stage.addEventListener('pointerover', this.poptip);\n// }\n// poptip = (e: FederatedPointerEvent) => {\n// const graphic = e.target as any;\n// if (graphic.isContainer || !graphic.attribute || graphic === this.activeGraphic) {\n// this.unpoptip(e);\n// return;\n// }\n// const { poptip } = graphic.attribute;\n// if (poptip) {\n// graphic._showPoptip = true;\n// }\n\n// if (this.activeGraphic) {\n// this.activeGraphic._showPoptip = false;\n// }\n// console.log(graphic)\n// this.setActiveGraphic(graphic, true);\n// }\n\n// unpoptip = (e: FederatedPointerEvent) => {\n// if (!this.activeGraphic) {\n// return;\n// }\n// this.activeGraphic._showPoptip = false;\n// this.setActiveGraphic(null, true);\n// }\n\n// setActiveGraphic(graphic: any | null, rerender?: boolean) {\n// this.activeGraphic = graphic;\n// // 触发重绘\n// this.pluginService.stage.renderNextFrame();\n// }\n\n// deactivate(context: IPluginService): void {\n// const { stage } = this.pluginService;\n// stage.removeEventListener('pointerover', this.poptip);\n// }\n// }\n"]}
@@ -1,7 +0,0 @@
1
- import { BasePlugin } from './base-plugin';
2
- import type { IPickerPluginEntries, IPluginContext } from './types';
3
- export declare class PickerPlugin extends BasePlugin {
4
- private readonly entries;
5
- constructor(name: string, entries: IPickerPluginEntries, version?: string);
6
- install(context: IPluginContext): void;
7
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: !0
5
- }), exports.PickerPlugin = void 0;
6
-
7
- const base_plugin_1 = require("./base-plugin");
8
-
9
- class PickerPlugin extends base_plugin_1.BasePlugin {
10
- constructor(name, entries, version) {
11
- super(name, version), this.entries = entries;
12
- }
13
- install(context) {
14
- context.registry.picker.registerMany(this.entries);
15
- }
16
- }
17
-
18
- exports.PickerPlugin = PickerPlugin;
19
- //# sourceMappingURL=picker-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/plugins/picker-plugin.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAG3C,MAAa,YAAa,SAAQ,wBAAU;IAC1C,YAAY,IAAY,EAAmB,OAA6B,EAAE,OAAgB;QACxF,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QADoB,YAAO,GAAP,OAAO,CAAsB;IAExE,CAAC;IAED,OAAO,CAAC,OAAuB;QAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;CACF;AARD,oCAQC","file":"picker-plugin.js","sourcesContent":["import { BasePlugin } from './base-plugin';\nimport type { IPickerPluginEntries, IPluginContext } from './types';\n\nexport class PickerPlugin extends BasePlugin {\n constructor(name: string, private readonly entries: IPickerPluginEntries, version?: string) {\n super(name, version);\n }\n\n install(context: IPluginContext): void {\n context.registry.picker.registerMany(this.entries);\n }\n}\n"]}
@@ -1,7 +0,0 @@
1
- import { BasePlugin } from './base-plugin';
2
- import type { IPluginContext, IRendererPluginEntries } from './types';
3
- export declare class RendererPlugin extends BasePlugin {
4
- private readonly entries;
5
- constructor(name: string, entries: IRendererPluginEntries, version?: string);
6
- install(context: IPluginContext): void;
7
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: !0
5
- }), exports.RendererPlugin = void 0;
6
-
7
- const base_plugin_1 = require("./base-plugin");
8
-
9
- class RendererPlugin extends base_plugin_1.BasePlugin {
10
- constructor(name, entries, version) {
11
- super(name, version), this.entries = entries;
12
- }
13
- install(context) {
14
- context.registry.renderer.registerMany(this.entries);
15
- }
16
- }
17
-
18
- exports.RendererPlugin = RendererPlugin;
19
- //# sourceMappingURL=renderer-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/plugins/renderer-plugin.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAG3C,MAAa,cAAe,SAAQ,wBAAU;IAC5C,YAAY,IAAY,EAAmB,OAA+B,EAAE,OAAgB;QAC1F,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QADoB,YAAO,GAAP,OAAO,CAAwB;IAE1E,CAAC;IAED,OAAO,CAAC,OAAuB;QAC7B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACvD,CAAC;CACF;AARD,wCAQC","file":"renderer-plugin.js","sourcesContent":["import { BasePlugin } from './base-plugin';\nimport type { IPluginContext, IRendererPluginEntries } from './types';\n\nexport class RendererPlugin extends BasePlugin {\n constructor(name: string, private readonly entries: IRendererPluginEntries, version?: string) {\n super(name, version);\n }\n\n install(context: IPluginContext): void {\n context.registry.renderer.registerMany(this.entries);\n }\n}\n"]}
@@ -1,3 +0,0 @@
1
-
2
-
3
- //# sourceMappingURL=clear-screen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/render/contributions/render/clear-screen.ts"],"names":[],"mappings":"","file":"clear-screen.js","sourcesContent":["// export class ClearScreenContribution extends Be\n"]}
@@ -1,3 +0,0 @@
1
-
2
-
3
- //# sourceMappingURL=render-slector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/render/contributions/render/render-slector.ts"],"names":[],"mappings":"","file":"render-slector.js","sourcesContent":["// import type { IGraphic, IGraphicRender, IRenderSelector } from '../../../interface';\n\n// export class DefaultRenderSelector implements IRenderSelector {\n// selector(graphic: IGraphic): IGraphicRender | null {\n// return null;\n// }\n// }\n"]}
@@ -1,9 +0,0 @@
1
- export declare const CanvasAllocate: unique symbol;
2
- export declare const RectAllocate: unique symbol;
3
- export declare const ArcAllocate: unique symbol;
4
- export declare const AreaAllocate: unique symbol;
5
- export declare const CircleAllocate: unique symbol;
6
- export declare const LineAllocate: unique symbol;
7
- export declare const PathAllocate: unique symbol;
8
- export declare const SymbolAllocate: unique symbol;
9
- export declare const TextAllocate: unique symbol;
@@ -1,18 +0,0 @@
1
- export const CanvasAllocate = Symbol.for("CanvasAllocate");
2
-
3
- export const RectAllocate = Symbol.for("RectAllocate");
4
-
5
- export const ArcAllocate = Symbol.for("ArcAllocate");
6
-
7
- export const AreaAllocate = Symbol.for("AreaAllocate");
8
-
9
- export const CircleAllocate = Symbol.for("CircleAllocate");
10
-
11
- export const LineAllocate = Symbol.for("LineAllocate");
12
-
13
- export const PathAllocate = Symbol.for("PathAllocate");
14
-
15
- export const SymbolAllocate = Symbol.for("SymbolAllocate");
16
-
17
- export const TextAllocate = Symbol.for("TextAllocate");
18
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/allocator/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC","file":"constants.js","sourcesContent":["export const CanvasAllocate = Symbol.for('CanvasAllocate');\nexport const RectAllocate = Symbol.for('RectAllocate');\nexport const ArcAllocate = Symbol.for('ArcAllocate');\nexport const AreaAllocate = Symbol.for('AreaAllocate');\nexport const CircleAllocate = Symbol.for('CircleAllocate');\nexport const LineAllocate = Symbol.for('LineAllocate');\nexport const PathAllocate = Symbol.for('PathAllocate');\nexport const SymbolAllocate = Symbol.for('SymbolAllocate');\nexport const TextAllocate = Symbol.for('TextAllocate');\n"]}
@@ -1,2 +0,0 @@
1
- declare const _default: {};
2
- export default _default;
@@ -1,178 +0,0 @@
1
- export default (function(Reflect) {
2
- var target, previous;
3
- return function(exporter) {
4
- Object.prototype.hasOwnProperty;
5
- const supportsSymbol = "function" == typeof Symbol, toPrimitiveSymbol = supportsSymbol && void 0 !== Symbol.toPrimitive ? Symbol.toPrimitive : "@@toPrimitive", functionPrototype = (supportsSymbol && void 0 !== Symbol.iterator && Symbol.iterator,
6
- Object.create, Object.getPrototypeOf(Function)), _Map = ("object" == typeof process && process.env && process.env.REFLECT_METADATA_USE_MAP_POLYFILL,
7
- Map), Metadata = (Set, new WeakMap);
8
- function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
9
- if (!IsObject(target)) throw new TypeError;
10
- return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
11
- }
12
- function hasMetadata(metadataKey, target, propertyKey) {
13
- if (!IsObject(target)) throw new TypeError;
14
- return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasMetadata(metadataKey, target, propertyKey);
15
- }
16
- function hasOwnMetadata(metadataKey, target, propertyKey) {
17
- if (!IsObject(target)) throw new TypeError;
18
- return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
19
- }
20
- function getMetadata(metadataKey, target, propertyKey) {
21
- if (!IsObject(target)) throw new TypeError;
22
- return IsUndefined(propertyKey) || (propertyKey = ToPropertyKey(propertyKey)), OrdinaryGetMetadata(metadataKey, target, propertyKey);
23
- }
24
- function GetOrCreateMetadataMap(O, P, Create) {
25
- let targetMetadata = Metadata.get(O);
26
- if (IsUndefined(targetMetadata)) {
27
- if (!Create) return;
28
- targetMetadata = new _Map, Metadata.set(O, targetMetadata);
29
- }
30
- let metadataMap = targetMetadata.get(P);
31
- if (IsUndefined(metadataMap)) {
32
- if (!Create) return;
33
- metadataMap = new _Map, targetMetadata.set(P, metadataMap);
34
- }
35
- return metadataMap;
36
- }
37
- function OrdinaryHasMetadata(MetadataKey, O, P) {
38
- if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return !0;
39
- const parent = OrdinaryGetPrototypeOf(O);
40
- return !IsNull(parent) && OrdinaryHasMetadata(MetadataKey, parent, P);
41
- }
42
- function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
43
- const metadataMap = GetOrCreateMetadataMap(O, P, !1);
44
- return !IsUndefined(metadataMap) && ToBoolean(metadataMap.has(MetadataKey));
45
- }
46
- function OrdinaryGetMetadata(MetadataKey, O, P) {
47
- if (OrdinaryHasOwnMetadata(MetadataKey, O, P)) return OrdinaryGetOwnMetadata(MetadataKey, O, P);
48
- const parent = OrdinaryGetPrototypeOf(O);
49
- return IsNull(parent) ? void 0 : OrdinaryGetMetadata(MetadataKey, parent, P);
50
- }
51
- function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
52
- const metadataMap = GetOrCreateMetadataMap(O, P, !1);
53
- if (!IsUndefined(metadataMap)) return metadataMap.get(MetadataKey);
54
- }
55
- function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
56
- GetOrCreateMetadataMap(O, P, !0).set(MetadataKey, MetadataValue);
57
- }
58
- function Type(x) {
59
- if (null === x) return 1;
60
- switch (typeof x) {
61
- case "undefined":
62
- return 0;
63
-
64
- case "boolean":
65
- return 2;
66
-
67
- case "string":
68
- return 3;
69
-
70
- case "symbol":
71
- return 4;
72
-
73
- case "number":
74
- return 5;
75
-
76
- case "object":
77
- return null === x ? 1 : 6;
78
-
79
- default:
80
- return 6;
81
- }
82
- }
83
- function IsUndefined(x) {
84
- return void 0 === x;
85
- }
86
- function IsNull(x) {
87
- return null === x;
88
- }
89
- function IsSymbol(x) {
90
- return "symbol" == typeof x;
91
- }
92
- function IsObject(x) {
93
- return "object" == typeof x ? null !== x : "function" == typeof x;
94
- }
95
- function ToPrimitive(input, PreferredType) {
96
- switch (Type(input)) {
97
- case 0:
98
- case 1:
99
- case 2:
100
- case 3:
101
- case 4:
102
- case 5:
103
- return input;
104
- }
105
- const hint = 3 === PreferredType ? "string" : 5 === PreferredType ? "number" : "default", exoticToPrim = GetMethod(input, toPrimitiveSymbol);
106
- if (void 0 !== exoticToPrim) {
107
- const result = exoticToPrim.call(input, hint);
108
- if (IsObject(result)) throw new TypeError;
109
- return result;
110
- }
111
- return OrdinaryToPrimitive(input, "default" === hint ? "number" : hint);
112
- }
113
- function OrdinaryToPrimitive(O, hint) {
114
- if ("string" === hint) {
115
- const toString_1 = O.toString;
116
- if (IsCallable(toString_1)) {
117
- const result = toString_1.call(O);
118
- if (!IsObject(result)) return result;
119
- }
120
- const valueOf = O.valueOf;
121
- if (IsCallable(valueOf)) {
122
- const result = valueOf.call(O);
123
- if (!IsObject(result)) return result;
124
- }
125
- } else {
126
- const valueOf = O.valueOf;
127
- if (IsCallable(valueOf)) {
128
- const result = valueOf.call(O);
129
- if (!IsObject(result)) return result;
130
- }
131
- const toString_2 = O.toString;
132
- if (IsCallable(toString_2)) {
133
- const result = toString_2.call(O);
134
- if (!IsObject(result)) return result;
135
- }
136
- }
137
- throw new TypeError;
138
- }
139
- function ToBoolean(argument) {
140
- return !!argument;
141
- }
142
- function ToString(argument) {
143
- return "" + argument;
144
- }
145
- function ToPropertyKey(argument) {
146
- const key = ToPrimitive(argument, 3);
147
- return IsSymbol(key) ? key : ToString(key);
148
- }
149
- function IsCallable(argument) {
150
- return "function" == typeof argument;
151
- }
152
- function GetMethod(V, P) {
153
- const func = V[P];
154
- if (null != func) {
155
- if (!IsCallable(func)) throw new TypeError;
156
- return func;
157
- }
158
- }
159
- function OrdinaryGetPrototypeOf(O) {
160
- const proto = Object.getPrototypeOf(O);
161
- if ("function" != typeof O || O === functionPrototype) return proto;
162
- if (proto !== functionPrototype) return proto;
163
- const prototype = O.prototype, prototypeProto = prototype && Object.getPrototypeOf(prototype);
164
- if (null == prototypeProto || prototypeProto === Object.prototype) return proto;
165
- const constructor = prototypeProto.constructor;
166
- return "function" != typeof constructor || constructor === O ? proto : constructor;
167
- }
168
- exporter("defineMetadata", defineMetadata), exporter("hasMetadata", hasMetadata),
169
- exporter("hasOwnMetadata", hasOwnMetadata), exporter("getMetadata", getMetadata);
170
- }((target = Reflect, function(key, value) {
171
- "function" != typeof target[key] && Object.defineProperty(target, key, {
172
- configurable: !0,
173
- writable: !0,
174
- value: value
175
- }), previous && previous(key, value);
176
- })), Reflect;
177
- }({}));
178
- //# sourceMappingURL=Reflect-metadata.js.map