@visactor/vrender-kits 1.1.0-alpha.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/cjs/canvas/contributions/harmony/canvas.js +5 -1
  2. package/cjs/canvas/contributions/harmony/canvas.js.map +1 -1
  3. package/cjs/env/contributions/browser-contribution.js +1 -1
  4. package/cjs/env/contributions/canvas-wrap.js +1 -1
  5. package/cjs/env/contributions/feishu-contribution.d.ts +15 -8
  6. package/cjs/env/contributions/feishu-contribution.js +26 -14
  7. package/cjs/env/contributions/feishu-contribution.js.map +1 -1
  8. package/cjs/env/contributions/harmony-contribution.d.ts +26 -7
  9. package/cjs/env/contributions/harmony-contribution.js +129 -21
  10. package/cjs/env/contributions/harmony-contribution.js.map +1 -1
  11. package/cjs/env/contributions/lynx-contribution.d.ts +35 -10
  12. package/cjs/env/contributions/lynx-contribution.js +128 -31
  13. package/cjs/env/contributions/lynx-contribution.js.map +1 -1
  14. package/cjs/env/contributions/miniapp-canvas.d.ts +18 -0
  15. package/cjs/env/contributions/miniapp-canvas.js +46 -0
  16. package/cjs/env/contributions/miniapp-canvas.js.map +1 -0
  17. package/cjs/env/contributions/node-contribution.d.ts +2 -2
  18. package/cjs/env/contributions/node-contribution.js +8 -3
  19. package/cjs/env/contributions/node-contribution.js.map +1 -1
  20. package/cjs/env/contributions/taro-contribution.d.ts +6 -10
  21. package/cjs/env/contributions/taro-contribution.js +17 -18
  22. package/cjs/env/contributions/taro-contribution.js.map +1 -1
  23. package/cjs/env/contributions/tt-contribution.d.ts +14 -8
  24. package/cjs/env/contributions/tt-contribution.js +26 -49
  25. package/cjs/env/contributions/tt-contribution.js.map +1 -1
  26. package/cjs/env/contributions/wx-contribution.d.ts +15 -11
  27. package/cjs/env/contributions/wx-contribution.js +30 -54
  28. package/cjs/env/contributions/wx-contribution.js.map +1 -1
  29. package/cjs/env/feishu.js +2 -3
  30. package/cjs/env/feishu.js.map +1 -1
  31. package/cjs/env/harmony.js +2 -3
  32. package/cjs/env/harmony.js.map +1 -1
  33. package/cjs/env/lynx.js +2 -3
  34. package/cjs/env/lynx.js.map +1 -1
  35. package/cjs/env/taro.js +2 -3
  36. package/cjs/env/taro.js.map +1 -1
  37. package/cjs/env/tt.js +2 -3
  38. package/cjs/env/tt.js.map +1 -1
  39. package/cjs/env/wx.js +4 -4
  40. package/cjs/env/wx.js.map +1 -1
  41. package/cjs/event/extension/drag.js +1 -1
  42. package/cjs/graphic/Lottie.js +1 -2
  43. package/cjs/graphic/constants.js +2 -1
  44. package/cjs/graphic/constants.js.map +1 -1
  45. package/cjs/index-node.d.ts +1 -1
  46. package/cjs/index-node.js +36 -1
  47. package/cjs/index-node.js.map +1 -1
  48. package/cjs/index.d.ts +1 -1
  49. package/cjs/index.js +36 -1
  50. package/cjs/index.js.map +1 -1
  51. package/cjs/installers/app.d.ts +10 -3
  52. package/cjs/installers/app.js +90 -12
  53. package/cjs/installers/app.js.map +1 -1
  54. package/cjs/installers/browser-lite.d.ts +3 -0
  55. package/cjs/installers/browser-lite.js +63 -0
  56. package/cjs/installers/browser-lite.js.map +1 -0
  57. package/cjs/installers/browser.d.ts +3 -0
  58. package/cjs/installers/browser.js +75 -0
  59. package/cjs/installers/browser.js.map +1 -0
  60. package/cjs/installers/graphics-lite.d.ts +2 -0
  61. package/cjs/installers/graphics-lite.js +54 -0
  62. package/cjs/installers/graphics-lite.js.map +1 -0
  63. package/cjs/installers/graphics.d.ts +2 -0
  64. package/cjs/installers/graphics.js +81 -0
  65. package/cjs/installers/graphics.js.map +1 -0
  66. package/cjs/jsx/graphicType.d.ts +4 -4
  67. package/cjs/jsx/graphicType.js.map +1 -1
  68. package/cjs/jsx/jsx-classic.js +3 -3
  69. package/cjs/jsx/jsx-classic.js.map +1 -1
  70. package/cjs/react-tree.js +3 -3
  71. package/cjs/react-tree.js.map +1 -1
  72. package/cjs/register/env.js +2 -3
  73. package/cjs/register/env.js.map +1 -1
  74. package/cjs/register/register-arc.js +3 -3
  75. package/cjs/register/register-arc.js.map +1 -1
  76. package/cjs/register/register-arc3d.js +6 -5
  77. package/cjs/register/register-arc3d.js.map +1 -1
  78. package/cjs/register/register-area.js +3 -3
  79. package/cjs/register/register-area.js.map +1 -1
  80. package/cjs/register/register-circle.js +3 -3
  81. package/cjs/register/register-circle.js.map +1 -1
  82. package/cjs/register/register-glyph.js +3 -3
  83. package/cjs/register/register-glyph.js.map +1 -1
  84. package/cjs/register/register-group.js +2 -2
  85. package/cjs/register/register-group.js.map +1 -1
  86. package/cjs/register/register-image.js +3 -3
  87. package/cjs/register/register-image.js.map +1 -1
  88. package/cjs/register/register-line.js +3 -3
  89. package/cjs/register/register-line.js.map +1 -1
  90. package/cjs/register/register-path.js +3 -3
  91. package/cjs/register/register-path.js.map +1 -1
  92. package/cjs/register/register-polygon.js +3 -3
  93. package/cjs/register/register-polygon.js.map +1 -1
  94. package/cjs/register/register-pyramid3d.js +4 -4
  95. package/cjs/register/register-pyramid3d.js.map +1 -1
  96. package/cjs/register/register-rect.js +3 -3
  97. package/cjs/register/register-rect.js.map +1 -1
  98. package/cjs/register/register-rect3d.js +3 -3
  99. package/cjs/register/register-rect3d.js.map +1 -1
  100. package/cjs/register/register-richtext.js +3 -3
  101. package/cjs/register/register-richtext.js.map +1 -1
  102. package/cjs/register/register-shadowRoot.js +3 -4
  103. package/cjs/register/register-shadowRoot.js.map +1 -1
  104. package/cjs/register/register-star.js +3 -3
  105. package/cjs/register/register-star.js.map +1 -1
  106. package/cjs/register/register-symbol.js +5 -4
  107. package/cjs/register/register-symbol.js.map +1 -1
  108. package/cjs/register/register-text.js +3 -3
  109. package/cjs/register/register-text.js.map +1 -1
  110. package/cjs/register/register-wraptext.js +2 -2
  111. package/cjs/register/register-wraptext.js.map +1 -1
  112. package/cjs/window/contributions/feishu-contribution.js +10 -7
  113. package/cjs/window/contributions/feishu-contribution.js.map +1 -1
  114. package/cjs/window/contributions/harmony-contribution.js +74 -17
  115. package/cjs/window/contributions/harmony-contribution.js.map +1 -1
  116. package/cjs/window/contributions/lynx-contribution.d.ts +1 -2
  117. package/cjs/window/contributions/lynx-contribution.js +67 -15
  118. package/cjs/window/contributions/lynx-contribution.js.map +1 -1
  119. package/cjs/window/contributions/taro-contribution.js +10 -7
  120. package/cjs/window/contributions/taro-contribution.js.map +1 -1
  121. package/cjs/window/contributions/tt-contribution.js +10 -7
  122. package/cjs/window/contributions/tt-contribution.js.map +1 -1
  123. package/cjs/window/contributions/wx-contribution.d.ts +1 -2
  124. package/cjs/window/contributions/wx-contribution.js +33 -16
  125. package/cjs/window/contributions/wx-contribution.js.map +1 -1
  126. package/dist/index.es.js +18523 -4923
  127. package/es/canvas/contributions/harmony/canvas.js +5 -1
  128. package/es/canvas/contributions/harmony/canvas.js.map +1 -1
  129. package/es/env/contributions/browser-contribution.js +1 -1
  130. package/es/env/contributions/canvas-wrap.js +1 -1
  131. package/es/env/contributions/feishu-contribution.d.ts +15 -8
  132. package/es/env/contributions/feishu-contribution.js +27 -14
  133. package/es/env/contributions/feishu-contribution.js.map +1 -1
  134. package/es/env/contributions/harmony-contribution.d.ts +26 -7
  135. package/es/env/contributions/harmony-contribution.js +132 -22
  136. package/es/env/contributions/harmony-contribution.js.map +1 -1
  137. package/es/env/contributions/lynx-contribution.d.ts +35 -10
  138. package/es/env/contributions/lynx-contribution.js +128 -29
  139. package/es/env/contributions/lynx-contribution.js.map +1 -1
  140. package/es/env/contributions/miniapp-canvas.d.ts +18 -0
  141. package/es/env/contributions/miniapp-canvas.js +37 -0
  142. package/es/env/contributions/miniapp-canvas.js.map +1 -0
  143. package/es/env/contributions/node-contribution.d.ts +2 -2
  144. package/es/env/contributions/node-contribution.js +8 -3
  145. package/es/env/contributions/node-contribution.js.map +1 -1
  146. package/es/env/contributions/taro-contribution.d.ts +6 -10
  147. package/es/env/contributions/taro-contribution.js +17 -17
  148. package/es/env/contributions/taro-contribution.js.map +1 -1
  149. package/es/env/contributions/tt-contribution.d.ts +14 -8
  150. package/es/env/contributions/tt-contribution.js +28 -48
  151. package/es/env/contributions/tt-contribution.js.map +1 -1
  152. package/es/env/contributions/wx-contribution.d.ts +15 -11
  153. package/es/env/contributions/wx-contribution.js +32 -53
  154. package/es/env/contributions/wx-contribution.js.map +1 -1
  155. package/es/env/feishu.js +2 -3
  156. package/es/env/feishu.js.map +1 -1
  157. package/es/env/harmony.js +2 -3
  158. package/es/env/harmony.js.map +1 -1
  159. package/es/env/lynx.js +2 -3
  160. package/es/env/lynx.js.map +1 -1
  161. package/es/env/taro.js +2 -3
  162. package/es/env/taro.js.map +1 -1
  163. package/es/env/tt.js +2 -3
  164. package/es/env/tt.js.map +1 -1
  165. package/es/env/wx.js +4 -4
  166. package/es/env/wx.js.map +1 -1
  167. package/es/event/extension/drag.js +1 -1
  168. package/es/graphic/Lottie.js +1 -2
  169. package/es/graphic/constants.js +3 -3
  170. package/es/graphic/constants.js.map +1 -1
  171. package/es/index-node.d.ts +1 -1
  172. package/es/index-node.js +1 -1
  173. package/es/index-node.js.map +1 -1
  174. package/es/index.d.ts +1 -1
  175. package/es/index.js +1 -1
  176. package/es/index.js.map +1 -1
  177. package/es/installers/app.d.ts +10 -3
  178. package/es/installers/app.js +120 -8
  179. package/es/installers/app.js.map +1 -1
  180. package/es/installers/browser-lite.d.ts +3 -0
  181. package/es/installers/browser-lite.js +86 -0
  182. package/es/installers/browser-lite.js.map +1 -0
  183. package/es/installers/browser.d.ts +3 -0
  184. package/es/installers/browser.js +115 -0
  185. package/es/installers/browser.js.map +1 -0
  186. package/es/installers/graphics-lite.d.ts +2 -0
  187. package/es/installers/graphics-lite.js +52 -0
  188. package/es/installers/graphics-lite.js.map +1 -0
  189. package/es/installers/graphics.d.ts +2 -0
  190. package/es/installers/graphics.js +79 -0
  191. package/es/installers/graphics.js.map +1 -0
  192. package/es/jsx/graphicType.d.ts +4 -4
  193. package/es/jsx/graphicType.js.map +1 -1
  194. package/es/jsx/jsx-classic.js +3 -3
  195. package/es/jsx/jsx-classic.js.map +1 -1
  196. package/es/react-tree.js +3 -3
  197. package/es/react-tree.js.map +1 -1
  198. package/es/register/env.js +2 -3
  199. package/es/register/env.js.map +1 -1
  200. package/es/register/register-arc.js +5 -1
  201. package/es/register/register-arc.js.map +1 -1
  202. package/es/register/register-arc3d.js +9 -2
  203. package/es/register/register-arc3d.js.map +1 -1
  204. package/es/register/register-area.js +5 -1
  205. package/es/register/register-area.js.map +1 -1
  206. package/es/register/register-circle.js +5 -1
  207. package/es/register/register-circle.js.map +1 -1
  208. package/es/register/register-glyph.js +5 -1
  209. package/es/register/register-glyph.js.map +1 -1
  210. package/es/register/register-group.js +1 -1
  211. package/es/register/register-group.js.map +1 -1
  212. package/es/register/register-image.js +5 -1
  213. package/es/register/register-image.js.map +1 -1
  214. package/es/register/register-line.js +5 -1
  215. package/es/register/register-line.js.map +1 -1
  216. package/es/register/register-path.js +5 -1
  217. package/es/register/register-path.js.map +1 -1
  218. package/es/register/register-polygon.js +5 -1
  219. package/es/register/register-polygon.js.map +1 -1
  220. package/es/register/register-pyramid3d.js +7 -1
  221. package/es/register/register-pyramid3d.js.map +1 -1
  222. package/es/register/register-rect.js +5 -1
  223. package/es/register/register-rect.js.map +1 -1
  224. package/es/register/register-rect3d.js +5 -1
  225. package/es/register/register-rect3d.js.map +1 -1
  226. package/es/register/register-richtext.js +5 -1
  227. package/es/register/register-richtext.js.map +1 -1
  228. package/es/register/register-shadowRoot.js +2 -3
  229. package/es/register/register-shadowRoot.js.map +1 -1
  230. package/es/register/register-star.js +5 -1
  231. package/es/register/register-star.js.map +1 -1
  232. package/es/register/register-symbol.js +7 -2
  233. package/es/register/register-symbol.js.map +1 -1
  234. package/es/register/register-text.js +5 -1
  235. package/es/register/register-text.js.map +1 -1
  236. package/es/register/register-wraptext.js +1 -1
  237. package/es/register/register-wraptext.js.map +1 -1
  238. package/es/window/contributions/feishu-contribution.js +9 -5
  239. package/es/window/contributions/feishu-contribution.js.map +1 -1
  240. package/es/window/contributions/harmony-contribution.js +73 -15
  241. package/es/window/contributions/harmony-contribution.js.map +1 -1
  242. package/es/window/contributions/lynx-contribution.d.ts +1 -2
  243. package/es/window/contributions/lynx-contribution.js +65 -14
  244. package/es/window/contributions/lynx-contribution.js.map +1 -1
  245. package/es/window/contributions/taro-contribution.js +9 -5
  246. package/es/window/contributions/taro-contribution.js.map +1 -1
  247. package/es/window/contributions/tt-contribution.js +9 -5
  248. package/es/window/contributions/tt-contribution.js.map +1 -1
  249. package/es/window/contributions/wx-contribution.d.ts +1 -2
  250. package/es/window/contributions/wx-contribution.js +31 -15
  251. package/es/window/contributions/wx-contribution.js.map +1 -1
  252. package/package.json +240 -4
  253. package/cjs/env/contributions/module.d.ts +0 -1
  254. package/cjs/env/contributions/module.js +0 -3
  255. package/cjs/env/contributions/module.js.map +0 -1
  256. package/cjs/node-bind.d.ts +0 -1
  257. package/cjs/node-bind.js +0 -1
  258. package/cjs/node-bind.js.map +0 -1
  259. package/cjs/picker/index.d.ts +0 -1
  260. package/cjs/picker/index.js +0 -1
  261. package/cjs/picker/index.js.map +0 -1
  262. package/cjs/render/contributions/render-module.d.ts +0 -1
  263. package/cjs/render/contributions/render-module.js +0 -3
  264. package/cjs/render/contributions/render-module.js.map +0 -1
  265. package/cjs/tools/dynamicTexture.d.ts +0 -1
  266. package/cjs/tools/dynamicTexture.js +0 -1
  267. package/cjs/tools/dynamicTexture.js.map +0 -1
  268. package/cjs/window/contributions/native-contribution.d.ts +0 -1
  269. package/cjs/window/contributions/native-contribution.js +0 -3
  270. package/cjs/window/contributions/native-contribution.js.map +0 -1
  271. package/es/env/contributions/module.d.ts +0 -1
  272. package/es/env/contributions/module.js +0 -3
  273. package/es/env/contributions/module.js.map +0 -1
  274. package/es/node-bind.d.ts +0 -1
  275. package/es/node-bind.js +0 -1
  276. package/es/node-bind.js.map +0 -1
  277. package/es/picker/index.d.ts +0 -1
  278. package/es/picker/index.js +0 -1
  279. package/es/picker/index.js.map +0 -1
  280. package/es/render/contributions/render-module.d.ts +0 -1
  281. package/es/render/contributions/render-module.js +0 -3
  282. package/es/render/contributions/render-module.js.map +0 -1
  283. package/es/tools/dynamicTexture.d.ts +0 -1
  284. package/es/tools/dynamicTexture.js +0 -1
  285. package/es/tools/dynamicTexture.js.map +0 -1
  286. package/es/window/contributions/native-contribution.d.ts +0 -1
  287. package/es/window/contributions/native-contribution.js +0 -3
  288. package/es/window/contributions/native-contribution.js.map +0 -1
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.installBrowserPickersToApp = exports.installBrowserEnvToApp = void 0;
6
+
7
+ const runtime_installer_1 = require("@visactor/vrender-core/entries/runtime-installer"), application_1 = require("@visactor/vrender-core/application"), constants_1 = require("@visactor/vrender-core/constants"), constants_2 = require("@visactor/vrender-core/picker/constants"), symbol_1 = require("@visactor/vrender-core/render/symbol"), modules_1 = require("../canvas/contributions/browser/modules"), explicit_binding_1 = require("../common/explicit-binding"), browser_contribution_1 = require("../env/contributions/browser-contribution"), arc3d_module_1 = require("../picker/contributions/canvas-picker/arc3d-module"), arc_module_1 = require("../picker/contributions/canvas-picker/arc-module"), area_module_1 = require("../picker/contributions/canvas-picker/area-module"), circle_module_1 = require("../picker/contributions/canvas-picker/circle-module"), glyph_module_1 = require("../picker/contributions/canvas-picker/glyph-module"), image_module_1 = require("../picker/contributions/canvas-picker/image-module"), line_module_1 = require("../picker/contributions/canvas-picker/line-module"), path_module_1 = require("../picker/contributions/canvas-picker/path-module"), polygon_module_1 = require("../picker/contributions/canvas-picker/polygon-module"), pyramid3d_module_1 = require("../picker/contributions/canvas-picker/pyramid3d-module"), rect3d_module_1 = require("../picker/contributions/canvas-picker/rect3d-module"), rect_module_1 = require("../picker/contributions/canvas-picker/rect-module"), richtext_module_1 = require("../picker/contributions/canvas-picker/richtext-module"), star_module_1 = require("../picker/contributions/canvas-picker/star-module"), symbol_module_1 = require("../picker/contributions/canvas-picker/symbol-module"), text_module_1 = require("../picker/contributions/canvas-picker/text-module"), constants_3 = require("../picker/contributions/constants"), canvas_picker_service_1 = require("../picker/canvas-picker-service"), browser_contribution_2 = require("../window/contributions/browser-contribution"), browserPickerInstallers = [ arc_module_1.bindArcCanvasPickerContribution, arc3d_module_1.bindArc3dCanvasPickerContribution, area_module_1.bindAreaCanvasPickerContribution, circle_module_1.bindCircleCanvasPickerContribution, glyph_module_1.bindGlyphCanvasPickerContribution, image_module_1.bindImageCanvasPickerContribution, line_module_1.bindLineCanvasPickerContribution, path_module_1.bindPathCanvasPickerContribution, polygon_module_1.bindPolygonCanvasPickerContribution, pyramid3d_module_1.bindPyramid3dCanvasPickerContribution, rect_module_1.bindRectCanvasPickerContribution, rect3d_module_1.bindRect3dCanvasPickerContribution, richtext_module_1.bindRichtextCanvasPickerContribution, star_module_1.bindStarCanvasPickerContribution, symbol_module_1.bindSymbolCanvasPickerContribution, text_module_1.bindTextCanvasPickerContribution ];
8
+
9
+ function createRegistryContributionProvider(entries) {
10
+ return {
11
+ getContributions: entries
12
+ };
13
+ }
14
+
15
+ function bindBrowserEnv(container) {
16
+ var _a, _b;
17
+ (null === (_b = (_a = container).isBound) || void 0 === _b ? void 0 : _b.call(_a, browser_contribution_1.BrowserEnvContribution)) || (container.bind(browser_contribution_1.BrowserEnvContribution).toSelf().inSingletonScope(),
18
+ container.bind(constants_1.EnvContribution).toService(browser_contribution_1.BrowserEnvContribution));
19
+ }
20
+
21
+ function bindBrowserCanvasPicker(container) {
22
+ container.isBound(canvas_picker_service_1.DefaultCanvasPickerService) || container.bind(canvas_picker_service_1.DefaultCanvasPickerService).toDynamicValue((() => new canvas_picker_service_1.DefaultCanvasPickerService((0,
23
+ explicit_binding_1.createContributionProvider)(constants_3.CanvasPickerContribution, container), (0,
24
+ explicit_binding_1.resolveContainerBinding)(container, symbol_1.DrawContribution), (0,
25
+ explicit_binding_1.createContributionProvider)(constants_2.PickItemInterceptor, container), (0,
26
+ explicit_binding_1.createContributionProvider)(constants_2.PickServiceInterceptor, container)))).inSingletonScope(),
27
+ container.isBound(constants_2.PickerService) ? container.rebind(constants_2.PickerService).toService(canvas_picker_service_1.DefaultCanvasPickerService) : container.bind(constants_2.PickerService).toService(canvas_picker_service_1.DefaultCanvasPickerService);
28
+ }
29
+
30
+ function createForcedEnvParams(envParams) {
31
+ if (null != envParams && ("object" == typeof envParams || "function" == typeof envParams)) {
32
+ const forcedEnvParams = Object.create(envParams);
33
+ return forcedEnvParams.force = !0, forcedEnvParams;
34
+ }
35
+ return {
36
+ force: !0
37
+ };
38
+ }
39
+
40
+ function activateBrowserRuntimeEnv(envParams) {
41
+ (0, runtime_installer_1.getRuntimeInstallerGlobal)().setEnv("browser", createForcedEnvParams(envParams));
42
+ }
43
+
44
+ function installBrowserRuntimeEnvToApp(app, {bindEnv: bindEnv, bindCanvasModules: bindCanvasModules, bindWindowContribution: bindWindowContribution}, envParams) {
45
+ (0, runtime_installer_1.configureRuntimeApplicationForApp)(app);
46
+ const bindingContext = (0, runtime_installer_1.getRuntimeInstallerBindingContext)();
47
+ bindEnv(bindingContext), bindCanvasModules(bindingContext), bindWindowContribution(bindingContext),
48
+ (0, runtime_installer_1.refreshRuntimeInstallerContributions)(), activateBrowserRuntimeEnv(envParams);
49
+ }
50
+
51
+ function configureBrowserPickerFactory(app) {
52
+ const bindingContext = (0, runtime_installer_1.getRuntimeInstallerBindingContext)(), pickerContributions = createRegistryContributionProvider((() => app.registry.picker.getAll())), pickItemInterceptors = createRegistryContributionProvider((() => bindingContext.isBound(constants_2.PickItemInterceptor) ? bindingContext.getAll(constants_2.PickItemInterceptor) : [])), pickServiceInterceptors = createRegistryContributionProvider((() => bindingContext.isBound(constants_2.PickServiceInterceptor) ? bindingContext.getAll(constants_2.PickServiceInterceptor) : [])), global = (0,
53
+ runtime_installer_1.getRuntimeInstallerGlobal)();
54
+ application_1.application.pickerServiceFactory = () => new canvas_picker_service_1.DefaultCanvasPickerService(pickerContributions, {}, pickItemInterceptors, pickServiceInterceptors),
55
+ application_1.application.global = global;
56
+ }
57
+
58
+ function installBrowserEnvToApp(app, envParams) {
59
+ installBrowserRuntimeEnvToApp(app, {
60
+ bindEnv: bindBrowserEnv,
61
+ bindCanvasModules: modules_1.bindBrowserCanvasModules,
62
+ bindWindowContribution: browser_contribution_2.bindBrowserWindowContribution
63
+ }, envParams);
64
+ }
65
+
66
+ function installBrowserPickersToApp(app) {
67
+ (0, runtime_installer_1.configureRuntimeApplicationForApp)(app);
68
+ const bindingContext = (0, runtime_installer_1.getRuntimeInstallerBindingContext)();
69
+ browserPickerInstallers.forEach((bindPicker => bindPicker(bindingContext))), bindBrowserCanvasPicker(bindingContext),
70
+ (0, runtime_installer_1.installRuntimePickersToApp)(app, constants_3.CanvasPickerContribution),
71
+ configureBrowserPickerFactory(app);
72
+ }
73
+
74
+ exports.installBrowserEnvToApp = installBrowserEnvToApp, exports.installBrowserPickersToApp = installBrowserPickersToApp;
75
+ //# sourceMappingURL=browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/installers/browser.ts"],"names":[],"mappings":";;;AAAA,wFAM0D;AAS1D,oEAAiE;AACjE,gEAAmE;AACnE,uEAAqH;AACrH,iEAAwE;AACxE,qEAAmF;AACnF,iEAAiG;AACjG,oFAAmF;AACnF,qFAAuG;AACvG,iFAAmG;AACnG,mFAAqG;AACrG,uFAAyG;AACzG,qFAAuG;AACvG,qFAAuG;AACvG,mFAAqG;AACrG,mFAAqG;AACrG,yFAA2G;AAC3G,6FAA+G;AAC/G,uFAAyG;AACzG,mFAAqG;AACrG,2FAA6G;AAC7G,mFAAqG;AACrG,uFAAyG;AACzG,mFAAqG;AACrG,iEAA6E;AAC7E,2EAA6E;AAC7E,uFAA6F;AAS7F,MAAM,uBAAuB,GAAG;IAC9B,4CAA+B;IAC/B,gDAAiC;IACjC,8CAAgC;IAChC,kDAAkC;IAClC,gDAAiC;IACjC,gDAAiC;IACjC,8CAAgC;IAChC,8CAAgC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CAAwC;QACpF,CAAC,CAAC,EAAE,CACP,CAAC;IACF,MAAM,uBAAuB,GAAG,kCAAkC,CAAsC,GAAG,EAAE,CAC3G,cAAc,CAAC,OAAO,CAAC,kCAAsB,CAAC;QAC5C,CAAC,CAAE,cAAc,CAAC,MAAM,CAAC,kCAAsB,CAA2C;QAC1F,CAAC,CAAC,EAAE,CACP,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,6CAAyB,GAAE,CAAC;IAC3C,yBAAW,CAAC,oBAAoB,GAAG,GAAG,EAAE,CACtC,IAAI,kDAA0B,CAAC,mBAAmB,EAAE,EAAS,EAAE,oBAAoB,EAAE,uBAAuB,CAAC,CAAC;IAChH,yBAAW,CAAC,MAAM,GAAG,MAAM,CAAC;AAC9B,CAAC;AAED,SAAgB,sBAAsB,CAAC,GAAS,EAAE,SAAoC;IACpF,6BAA6B,CAC3B,GAAG,EACH;QACE,OAAO,EAAE,cAAc;QACvB,iBAAiB,EAAE,kCAAwB;QAC3C,sBAAsB,EAAE,oDAA6B;KACtD,EACD,SAAS,CACV,CAAC;AACJ,CAAC;AAVD,wDAUC;AAED,SAAgB,0BAA0B,CAAC,GAAS;IAClD,IAAA,qDAAiC,EAAC,GAAG,CAAC,CAAC;IACvC,MAAM,cAAc,GAAG,IAAA,qDAAiC,GAAE,CAAC;IAC3D,uBAAuB,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC;IAC1E,uBAAuB,CAAC,cAAc,CAAC,CAAC;IACxC,IAAA,8CAA0B,EAAC,GAAG,EAAE,oCAAwB,CAAC,CAAC;IAC1D,6BAA6B,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC;AAPD,gEAOC","file":"browser.js","sourcesContent":["import {\n configureRuntimeApplicationForApp,\n getRuntimeInstallerBindingContext,\n getRuntimeInstallerGlobal,\n installRuntimePickersToApp,\n refreshRuntimeInstallerContributions\n} from '@visactor/vrender-core/entries/runtime-installer';\nimport type {\n IApp,\n IContributionProvider,\n IEnvParamsMap,\n IGraphicPicker,\n IPickItemInterceptorContribution,\n IPickServiceInterceptorContribution\n} from '@visactor/vrender-core';\nimport { application } from '@visactor/vrender-core/application';\nimport { EnvContribution } from '@visactor/vrender-core/constants';\nimport { PickItemInterceptor, PickerService, PickServiceInterceptor } from '@visactor/vrender-core/picker/constants';\nimport { DrawContribution } from '@visactor/vrender-core/render/symbol';\nimport { bindBrowserCanvasModules } from '../canvas/contributions/browser/modules';\nimport { createContributionProvider, resolveContainerBinding } from '../common/explicit-binding';\nimport { BrowserEnvContribution } from '../env/contributions/browser-contribution';\nimport { bindArc3dCanvasPickerContribution } from '../picker/contributions/canvas-picker/arc3d-module';\nimport { bindArcCanvasPickerContribution } from '../picker/contributions/canvas-picker/arc-module';\nimport { bindAreaCanvasPickerContribution } from '../picker/contributions/canvas-picker/area-module';\nimport { bindCircleCanvasPickerContribution } from '../picker/contributions/canvas-picker/circle-module';\nimport { bindGlyphCanvasPickerContribution } from '../picker/contributions/canvas-picker/glyph-module';\nimport { bindImageCanvasPickerContribution } from '../picker/contributions/canvas-picker/image-module';\nimport { bindLineCanvasPickerContribution } from '../picker/contributions/canvas-picker/line-module';\nimport { bindPathCanvasPickerContribution } from '../picker/contributions/canvas-picker/path-module';\nimport { bindPolygonCanvasPickerContribution } from '../picker/contributions/canvas-picker/polygon-module';\nimport { bindPyramid3dCanvasPickerContribution } from '../picker/contributions/canvas-picker/pyramid3d-module';\nimport { bindRect3dCanvasPickerContribution } from '../picker/contributions/canvas-picker/rect3d-module';\nimport { bindRectCanvasPickerContribution } from '../picker/contributions/canvas-picker/rect-module';\nimport { bindRichtextCanvasPickerContribution } from '../picker/contributions/canvas-picker/richtext-module';\nimport { bindStarCanvasPickerContribution } from '../picker/contributions/canvas-picker/star-module';\nimport { bindSymbolCanvasPickerContribution } from '../picker/contributions/canvas-picker/symbol-module';\nimport { bindTextCanvasPickerContribution } from '../picker/contributions/canvas-picker/text-module';\nimport { CanvasPickerContribution } from '../picker/contributions/constants';\nimport { DefaultCanvasPickerService } from '../picker/canvas-picker-service';\nimport { bindBrowserWindowContribution } from '../window/contributions/browser-contribution';\n\ntype RuntimeBindingContext = ReturnType<typeof getRuntimeInstallerBindingContext>;\ntype RuntimeEnvBindingStep = {\n bindEnv: (context: RuntimeBindingContext) => void;\n bindCanvasModules: (context: RuntimeBindingContext) => void;\n bindWindowContribution: (context: RuntimeBindingContext) => void;\n};\n\nconst browserPickerInstallers = [\n bindArcCanvasPickerContribution,\n bindArc3dCanvasPickerContribution,\n bindAreaCanvasPickerContribution,\n bindCircleCanvasPickerContribution,\n bindGlyphCanvasPickerContribution,\n bindImageCanvasPickerContribution,\n bindLineCanvasPickerContribution,\n bindPathCanvasPickerContribution,\n bindPolygonCanvasPickerContribution,\n bindPyramid3dCanvasPickerContribution,\n bindRectCanvasPickerContribution,\n bindRect3dCanvasPickerContribution,\n bindRichtextCanvasPickerContribution,\n bindStarCanvasPickerContribution,\n bindSymbolCanvasPickerContribution,\n bindTextCanvasPickerContribution\n];\n\nfunction createRegistryContributionProvider<T>(entries: () => T[]): IContributionProvider<T> {\n return {\n getContributions: entries\n };\n}\n\nfunction bindBrowserEnv(container: RuntimeBindingContext): void {\n if (!(container as any).isBound?.(BrowserEnvContribution)) {\n container.bind(BrowserEnvContribution).toSelf().inSingletonScope();\n container.bind(EnvContribution).toService(BrowserEnvContribution);\n }\n}\n\nfunction bindBrowserCanvasPicker(container: RuntimeBindingContext): void {\n if (!container.isBound(DefaultCanvasPickerService)) {\n container\n .bind(DefaultCanvasPickerService)\n .toDynamicValue(\n () =>\n new DefaultCanvasPickerService(\n createContributionProvider(CanvasPickerContribution, container as any),\n resolveContainerBinding(container as any, DrawContribution),\n createContributionProvider(PickItemInterceptor, container as any),\n createContributionProvider(PickServiceInterceptor, container as any)\n )\n )\n .inSingletonScope();\n }\n\n if (container.isBound(PickerService)) {\n container.rebind(PickerService).toService(DefaultCanvasPickerService);\n } else {\n container.bind(PickerService).toService(DefaultCanvasPickerService);\n }\n}\n\nfunction createForcedEnvParams<TEnvParams>(envParams: TEnvParams | undefined): TEnvParams {\n if (envParams != null && (typeof envParams === 'object' || typeof envParams === 'function')) {\n const forcedEnvParams = Object.create(envParams as object);\n forcedEnvParams.force = true;\n return forcedEnvParams as TEnvParams;\n }\n\n return { force: true } as TEnvParams;\n}\n\nfunction activateBrowserRuntimeEnv(envParams?: IEnvParamsMap['browser']): void {\n getRuntimeInstallerGlobal().setEnv('browser', createForcedEnvParams(envParams));\n}\n\nfunction installBrowserRuntimeEnvToApp(\n app: IApp,\n { bindEnv, bindCanvasModules, bindWindowContribution }: RuntimeEnvBindingStep,\n envParams?: IEnvParamsMap['browser']\n): void {\n configureRuntimeApplicationForApp(app);\n const bindingContext = getRuntimeInstallerBindingContext();\n bindEnv(bindingContext);\n bindCanvasModules(bindingContext);\n bindWindowContribution(bindingContext);\n refreshRuntimeInstallerContributions();\n activateBrowserRuntimeEnv(envParams);\n}\n\nfunction configureBrowserPickerFactory(app: IApp): void {\n const bindingContext = getRuntimeInstallerBindingContext();\n const pickerContributions = createRegistryContributionProvider<IGraphicPicker>(\n () => app.registry.picker.getAll() as IGraphicPicker[]\n );\n const pickItemInterceptors = createRegistryContributionProvider<IPickItemInterceptorContribution>(() =>\n bindingContext.isBound(PickItemInterceptor)\n ? (bindingContext.getAll(PickItemInterceptor) as IPickItemInterceptorContribution[])\n : []\n );\n const pickServiceInterceptors = createRegistryContributionProvider<IPickServiceInterceptorContribution>(() =>\n bindingContext.isBound(PickServiceInterceptor)\n ? (bindingContext.getAll(PickServiceInterceptor) as IPickServiceInterceptorContribution[])\n : []\n );\n\n const global = getRuntimeInstallerGlobal();\n application.pickerServiceFactory = () =>\n new DefaultCanvasPickerService(pickerContributions, {} as any, pickItemInterceptors, pickServiceInterceptors);\n application.global = global;\n}\n\nexport function installBrowserEnvToApp(app: IApp, envParams?: IEnvParamsMap['browser']): void {\n installBrowserRuntimeEnvToApp(\n app,\n {\n bindEnv: bindBrowserEnv,\n bindCanvasModules: bindBrowserCanvasModules,\n bindWindowContribution: bindBrowserWindowContribution\n },\n envParams\n );\n}\n\nexport function installBrowserPickersToApp(app: IApp): void {\n configureRuntimeApplicationForApp(app);\n const bindingContext = getRuntimeInstallerBindingContext();\n browserPickerInstallers.forEach(bindPicker => bindPicker(bindingContext));\n bindBrowserCanvasPicker(bindingContext);\n installRuntimePickersToApp(app, CanvasPickerContribution);\n configureBrowserPickerFactory(app);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import type { IApp } from '@visactor/vrender-core';
2
+ export declare function installLiteGraphicsToApp(app: IApp): void;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.installLiteGraphicsToApp = void 0;
6
+
7
+ const runtime_installer_1 = require("@visactor/vrender-core/entries/runtime-installer"), graphic_1 = require("@visactor/vrender-core/register/graphic"), modules_1 = require("@visactor/vrender-core/graphic/modules"), liteGraphicInstallSteps = [ {
8
+ register: graphic_1.registerAreaGraphic,
9
+ bindModule: modules_1.areaModule
10
+ }, {
11
+ register: graphic_1.registerCircleGraphic,
12
+ bindModule: modules_1.circleModule
13
+ }, {
14
+ register: graphic_1.registerGlyphGraphic,
15
+ bindModule: modules_1.glyphModule
16
+ }, {
17
+ register: graphic_1.registerGroupGraphic
18
+ }, {
19
+ register: graphic_1.registerLineGraphic,
20
+ bindModule: modules_1.lineModule
21
+ }, {
22
+ register: graphic_1.registerRectGraphic,
23
+ bindModule: modules_1.rectModule
24
+ }, {
25
+ register: graphic_1.registerShadowRootGraphic
26
+ }, {
27
+ register: graphic_1.registerSymbolGraphic,
28
+ bindModule: modules_1.symbolModule
29
+ }, {
30
+ register: graphic_1.registerTextGraphic,
31
+ bindModule: modules_1.textModule
32
+ }, {
33
+ register: graphic_1.registerWrapTextGraphic
34
+ } ];
35
+
36
+ let liteGraphicsInstalled = !1;
37
+
38
+ function ensureLiteGraphicsInstalled() {
39
+ if (liteGraphicsInstalled) return;
40
+ const bindingContext = (0, runtime_installer_1.getRuntimeInstallerBindingContext)();
41
+ liteGraphicsInstalled = !0, liteGraphicInstallSteps.forEach((({register: register, bindModule: bindModule}) => {
42
+ register(), null == bindModule || bindModule({
43
+ bind: bindingContext.bind
44
+ });
45
+ })), (0, runtime_installer_1.refreshRuntimeInstallerContributions)();
46
+ }
47
+
48
+ function installLiteGraphicsToApp(app) {
49
+ (0, runtime_installer_1.configureRuntimeApplicationForApp)(app), ensureLiteGraphicsInstalled(),
50
+ (0, runtime_installer_1.installRuntimeDrawContributionsToApp)(app), (0, runtime_installer_1.installRuntimeGraphicRenderersToApp)(app);
51
+ }
52
+
53
+ exports.installLiteGraphicsToApp = installLiteGraphicsToApp;
54
+ //# sourceMappingURL=graphics-lite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/installers/graphics-lite.ts"],"names":[],"mappings":";;;AAAA,wFAM0D;AAC1D,qEAWiD;AACjD,oEAQgD;AAShD,MAAM,uBAAuB,GAAgC;IAC3D,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,+BAAqB,EAAE,UAAU,EAAE,sBAAmB,EAAE;IACpE,EAAE,QAAQ,EAAE,8BAAoB,EAAE,UAAU,EAAE,qBAAkB,EAAE;IAClE,EAAE,QAAQ,EAAE,8BAAoB,EAAE;IAClC,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,mCAAyB,EAAE;IACvC,EAAE,QAAQ,EAAE,+BAAqB,EAAE,UAAU,EAAE,sBAAmB,EAAE;IACpE,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,iCAAuB,EAAE;CACtC,CAAC;AAEF,IAAI,qBAAqB,GAAG,KAAK,CAAC;AAElC,SAAS,2BAA2B;IAClC,IAAI,qBAAqB,EAAE;QACzB,OAAO;KACR;IAED,MAAM,cAAc,GAAG,IAAA,qDAAiC,GAAE,CAAC;IAC3D,qBAAqB,GAAG,IAAI,CAAC;IAC7B,uBAAuB,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;QAC3D,QAAQ,EAAE,CAAC;QACX,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,EAAE,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,IAAA,wDAAoC,GAAE,CAAC;AACzC,CAAC;AAED,SAAgB,wBAAwB,CAAC,GAAS;IAChD,IAAA,qDAAiC,EAAC,GAAG,CAAC,CAAC;IACvC,2BAA2B,EAAE,CAAC;IAC9B,IAAA,wDAAoC,EAAC,GAAG,CAAC,CAAC;IAC1C,IAAA,uDAAmC,EAAC,GAAG,CAAC,CAAC;AAC3C,CAAC;AALD,4DAKC","file":"graphics-lite.js","sourcesContent":["import {\n configureRuntimeApplicationForApp,\n getRuntimeInstallerBindingContext,\n installRuntimeDrawContributionsToApp,\n installRuntimeGraphicRenderersToApp,\n refreshRuntimeInstallerContributions\n} from '@visactor/vrender-core/entries/runtime-installer';\nimport {\n registerAreaGraphic,\n registerCircleGraphic,\n registerGlyphGraphic,\n registerGroupGraphic,\n registerLineGraphic,\n registerRectGraphic,\n registerShadowRootGraphic,\n registerSymbolGraphic,\n registerTextGraphic,\n registerWrapTextGraphic\n} from '@visactor/vrender-core/register/graphic';\nimport {\n areaModule,\n circleModule,\n glyphModule,\n lineModule,\n rectModule,\n symbolModule,\n textModule\n} from '@visactor/vrender-core/graphic/modules';\nimport type { IApp } from '@visactor/vrender-core';\n\ntype RuntimeBindingContext = ReturnType<typeof getRuntimeInstallerBindingContext>;\ntype RuntimeGraphicInstallStep = {\n register: () => void;\n bindModule?: (context: { bind: RuntimeBindingContext['bind'] }) => void;\n};\n\nconst liteGraphicInstallSteps: RuntimeGraphicInstallStep[] = [\n { register: registerAreaGraphic, bindModule: areaModule as any },\n { register: registerCircleGraphic, bindModule: circleModule as any },\n { register: registerGlyphGraphic, bindModule: glyphModule as any },\n { register: registerGroupGraphic },\n { register: registerLineGraphic, bindModule: lineModule as any },\n { register: registerRectGraphic, bindModule: rectModule as any },\n { register: registerShadowRootGraphic },\n { register: registerSymbolGraphic, bindModule: symbolModule as any },\n { register: registerTextGraphic, bindModule: textModule as any },\n { register: registerWrapTextGraphic }\n];\n\nlet liteGraphicsInstalled = false;\n\nfunction ensureLiteGraphicsInstalled(): void {\n if (liteGraphicsInstalled) {\n return;\n }\n\n const bindingContext = getRuntimeInstallerBindingContext();\n liteGraphicsInstalled = true;\n liteGraphicInstallSteps.forEach(({ register, bindModule }) => {\n register();\n bindModule?.({ bind: bindingContext.bind });\n });\n refreshRuntimeInstallerContributions();\n}\n\nexport function installLiteGraphicsToApp(app: IApp): void {\n configureRuntimeApplicationForApp(app);\n ensureLiteGraphicsInstalled();\n installRuntimeDrawContributionsToApp(app);\n installRuntimeGraphicRenderersToApp(app);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import type { IApp } from '@visactor/vrender-core';
2
+ export declare function installStandardGraphicsToApp(app: IApp): void;
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.installStandardGraphicsToApp = void 0;
6
+
7
+ const runtime_installer_1 = require("@visactor/vrender-core/entries/runtime-installer"), graphic_1 = require("@visactor/vrender-core/register/graphic"), modules_1 = require("@visactor/vrender-core/graphic/modules"), standardGraphicInstallSteps = [ {
8
+ register: graphic_1.registerArcGraphic,
9
+ bindModule: modules_1.arcModule
10
+ }, {
11
+ register: graphic_1.registerArc3dGraphic,
12
+ bindModule: modules_1.arc3dModule
13
+ }, {
14
+ register: graphic_1.registerAreaGraphic,
15
+ bindModule: modules_1.areaModule
16
+ }, {
17
+ register: graphic_1.registerCircleGraphic,
18
+ bindModule: modules_1.circleModule
19
+ }, {
20
+ register: graphic_1.registerGlyphGraphic,
21
+ bindModule: modules_1.glyphModule
22
+ }, {
23
+ register: graphic_1.registerGroupGraphic
24
+ }, {
25
+ register: graphic_1.registerImageGraphic,
26
+ bindModule: modules_1.imageModule
27
+ }, {
28
+ register: graphic_1.registerLineGraphic,
29
+ bindModule: modules_1.lineModule
30
+ }, {
31
+ register: graphic_1.registerPathGraphic,
32
+ bindModule: modules_1.pathModule
33
+ }, {
34
+ register: graphic_1.registerPolygonGraphic,
35
+ bindModule: modules_1.polygonModule
36
+ }, {
37
+ register: graphic_1.registerPyramid3dGraphic,
38
+ bindModule: modules_1.pyramid3dModule
39
+ }, {
40
+ register: graphic_1.registerRectGraphic,
41
+ bindModule: modules_1.rectModule
42
+ }, {
43
+ register: graphic_1.registerRect3dGraphic,
44
+ bindModule: modules_1.rect3dModule
45
+ }, {
46
+ register: graphic_1.registerRichtextGraphic,
47
+ bindModule: modules_1.richtextModule
48
+ }, {
49
+ register: graphic_1.registerShadowRootGraphic
50
+ }, {
51
+ register: graphic_1.registerStarGraphic,
52
+ bindModule: modules_1.starModule
53
+ }, {
54
+ register: graphic_1.registerSymbolGraphic,
55
+ bindModule: modules_1.symbolModule
56
+ }, {
57
+ register: graphic_1.registerTextGraphic,
58
+ bindModule: modules_1.textModule
59
+ }, {
60
+ register: graphic_1.registerWrapTextGraphic
61
+ } ];
62
+
63
+ let standardGraphicsInstalled = !1;
64
+
65
+ function ensureStandardGraphicsInstalled() {
66
+ if (standardGraphicsInstalled) return;
67
+ const bindingContext = (0, runtime_installer_1.getRuntimeInstallerBindingContext)();
68
+ standardGraphicsInstalled = !0, standardGraphicInstallSteps.forEach((({register: register, bindModule: bindModule}) => {
69
+ register(), null == bindModule || bindModule({
70
+ bind: bindingContext.bind
71
+ });
72
+ })), (0, runtime_installer_1.refreshRuntimeInstallerContributions)();
73
+ }
74
+
75
+ function installStandardGraphicsToApp(app) {
76
+ (0, runtime_installer_1.configureRuntimeApplicationForApp)(app), ensureStandardGraphicsInstalled(),
77
+ (0, runtime_installer_1.installRuntimeDrawContributionsToApp)(app), (0, runtime_installer_1.installRuntimeGraphicRenderersToApp)(app);
78
+ }
79
+
80
+ exports.installStandardGraphicsToApp = installStandardGraphicsToApp;
81
+ //# sourceMappingURL=graphics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/installers/graphics.ts"],"names":[],"mappings":";;;AAAA,wFAM0D;AAC1D,qEAoBiD;AACjD,oEAiBgD;AAShD,MAAM,2BAA2B,GAAgC;IAC/D,EAAE,QAAQ,EAAE,4BAAkB,EAAE,UAAU,EAAE,mBAAgB,EAAE;IAC9D,EAAE,QAAQ,EAAE,8BAAoB,EAAE,UAAU,EAAE,qBAAkB,EAAE;IAClE,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,+BAAqB,EAAE,UAAU,EAAE,sBAAmB,EAAE;IACpE,EAAE,QAAQ,EAAE,8BAAoB,EAAE,UAAU,EAAE,qBAAkB,EAAE;IAClE,EAAE,QAAQ,EAAE,8BAAoB,EAAE;IAClC,EAAE,QAAQ,EAAE,8BAAoB,EAAE,UAAU,EAAE,qBAAkB,EAAE;IAClE,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,gCAAsB,EAAE,UAAU,EAAE,uBAAoB,EAAE;IACtE,EAAE,QAAQ,EAAE,kCAAwB,EAAE,UAAU,EAAE,yBAAsB,EAAE;IAC1E,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,+BAAqB,EAAE,UAAU,EAAE,sBAAmB,EAAE;IACpE,EAAE,QAAQ,EAAE,iCAAuB,EAAE,UAAU,EAAE,wBAAqB,EAAE;IACxE,EAAE,QAAQ,EAAE,mCAAyB,EAAE;IACvC,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,+BAAqB,EAAE,UAAU,EAAE,sBAAmB,EAAE;IACpE,EAAE,QAAQ,EAAE,6BAAmB,EAAE,UAAU,EAAE,oBAAiB,EAAE;IAChE,EAAE,QAAQ,EAAE,iCAAuB,EAAE;CACtC,CAAC;AAEF,IAAI,yBAAyB,GAAG,KAAK,CAAC;AAEtC,SAAS,+BAA+B;IACtC,IAAI,yBAAyB,EAAE;QAC7B,OAAO;KACR;IAED,MAAM,cAAc,GAAG,IAAA,qDAAiC,GAAE,CAAC;IAC3D,yBAAyB,GAAG,IAAI,CAAC;IACjC,2BAA2B,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;QAC/D,QAAQ,EAAE,CAAC;QACX,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,EAAE,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IACH,IAAA,wDAAoC,GAAE,CAAC;AACzC,CAAC;AAED,SAAgB,4BAA4B,CAAC,GAAS;IACpD,IAAA,qDAAiC,EAAC,GAAG,CAAC,CAAC;IACvC,+BAA+B,EAAE,CAAC;IAClC,IAAA,wDAAoC,EAAC,GAAG,CAAC,CAAC;IAC1C,IAAA,uDAAmC,EAAC,GAAG,CAAC,CAAC;AAC3C,CAAC;AALD,oEAKC","file":"graphics.js","sourcesContent":["import {\n configureRuntimeApplicationForApp,\n getRuntimeInstallerBindingContext,\n installRuntimeDrawContributionsToApp,\n installRuntimeGraphicRenderersToApp,\n refreshRuntimeInstallerContributions\n} from '@visactor/vrender-core/entries/runtime-installer';\nimport {\n registerArc3dGraphic,\n registerArcGraphic,\n registerAreaGraphic,\n registerCircleGraphic,\n registerGlyphGraphic,\n registerGroupGraphic,\n registerImageGraphic,\n registerLineGraphic,\n registerPathGraphic,\n registerPolygonGraphic,\n registerPyramid3dGraphic,\n registerRect3dGraphic,\n registerRectGraphic,\n registerRichtextGraphic,\n registerShadowRootGraphic,\n registerStarGraphic,\n registerSymbolGraphic,\n registerTextGraphic,\n registerWrapTextGraphic\n} from '@visactor/vrender-core/register/graphic';\nimport {\n arc3dModule,\n arcModule,\n areaModule,\n circleModule,\n glyphModule,\n imageModule,\n lineModule,\n pathModule,\n polygonModule,\n pyramid3dModule,\n rect3dModule,\n rectModule,\n richtextModule,\n starModule,\n symbolModule,\n textModule\n} from '@visactor/vrender-core/graphic/modules';\nimport type { IApp } from '@visactor/vrender-core';\n\ntype RuntimeBindingContext = ReturnType<typeof getRuntimeInstallerBindingContext>;\ntype RuntimeGraphicInstallStep = {\n register: () => void;\n bindModule?: (context: { bind: RuntimeBindingContext['bind'] }) => void;\n};\n\nconst standardGraphicInstallSteps: RuntimeGraphicInstallStep[] = [\n { register: registerArcGraphic, bindModule: arcModule as any },\n { register: registerArc3dGraphic, bindModule: arc3dModule as any },\n { register: registerAreaGraphic, bindModule: areaModule as any },\n { register: registerCircleGraphic, bindModule: circleModule as any },\n { register: registerGlyphGraphic, bindModule: glyphModule as any },\n { register: registerGroupGraphic },\n { register: registerImageGraphic, bindModule: imageModule as any },\n { register: registerLineGraphic, bindModule: lineModule as any },\n { register: registerPathGraphic, bindModule: pathModule as any },\n { register: registerPolygonGraphic, bindModule: polygonModule as any },\n { register: registerPyramid3dGraphic, bindModule: pyramid3dModule as any },\n { register: registerRectGraphic, bindModule: rectModule as any },\n { register: registerRect3dGraphic, bindModule: rect3dModule as any },\n { register: registerRichtextGraphic, bindModule: richtextModule as any },\n { register: registerShadowRootGraphic },\n { register: registerStarGraphic, bindModule: starModule as any },\n { register: registerSymbolGraphic, bindModule: symbolModule as any },\n { register: registerTextGraphic, bindModule: textModule as any },\n { register: registerWrapTextGraphic }\n];\n\nlet standardGraphicsInstalled = false;\n\nfunction ensureStandardGraphicsInstalled(): void {\n if (standardGraphicsInstalled) {\n return;\n }\n\n const bindingContext = getRuntimeInstallerBindingContext();\n standardGraphicsInstalled = true;\n standardGraphicInstallSteps.forEach(({ register, bindModule }) => {\n register();\n bindModule?.({ bind: bindingContext.bind });\n });\n refreshRuntimeInstallerContributions();\n}\n\nexport function installStandardGraphicsToApp(app: IApp): void {\n configureRuntimeApplicationForApp(app);\n ensureStandardGraphicsInstalled();\n installRuntimeDrawContributionsToApp(app);\n installRuntimeGraphicRenderersToApp(app);\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { type IArc3dGraphicAttribute, type IArcGraphicAttribute, type IAreaGraphicAttribute, type ICircleGraphicAttribute, type IGlyphGraphicAttribute, type IGroupGraphicAttribute, type IImageGraphicAttribute, type ILineGraphicAttribute, type IPathGraphicAttribute, type IPolygonGraphicAttribute, type IPyramid3dGraphicAttribute, type IRect3dGraphicAttribute, type IRectGraphicAttribute, type IRichTextCharacter, type IRichTextGraphicAttribute, type IRichTextImageCharacter, type ISymbolGraphicAttribute, type ITextGraphicAttribute } from '@visactor/vrender-core';
1
+ import { type IArc3dGraphicAttribute, type IArcGraphicAttribute, type IAreaGraphicAttribute, type ICircleGraphicAttribute, type IGlyphGraphicAttribute, type IGroupGraphicAttribute, type IImageGraphicAttribute, type ILineGraphicAttribute, type IPathGraphicAttribute, type IPolygonGraphicAttribute, type IPyramid3dGraphicAttribute, type IRect3dGraphicAttribute, type IRectGraphicAttribute, type IRichTextCharacter, type IRichTextGraphicAttribute, type IRichTextImageCharacter, type StateDefinitionsInput, type ISymbolGraphicAttribute, type ITextGraphicAttribute } from '@visactor/vrender-core';
2
2
  export declare const REACT_TO_CANOPUS_EVENTS: {
3
3
  onPointerDown: string;
4
4
  onPointerUp: string;
@@ -52,7 +52,7 @@ export type IEventParamsType = {
52
52
  };
53
53
  export type IDefaultGraphicParamsType<T> = {
54
54
  attribute?: T;
55
- stateProxy?: (stateName: string, targetStates?: string[]) => Partial<T>;
55
+ states?: StateDefinitionsInput<T>;
56
56
  children?: any;
57
57
  name?: string;
58
58
  id?: string;
@@ -76,7 +76,7 @@ export declare function VRichText(params: IDefaultGraphicParamsType<IRichTextGra
76
76
  export declare namespace VRichText {
77
77
  var Text: (params: IDefaultGraphicParamsType<IRichTextCharacter>) => {
78
78
  attribute?: IRichTextCharacter;
79
- stateProxy?: (stateName: string, targetStates?: string[]) => Partial<IRichTextCharacter>;
79
+ states?: StateDefinitionsInput<IRichTextCharacter>;
80
80
  children?: any;
81
81
  name?: string;
82
82
  id?: string;
@@ -129,7 +129,7 @@ export declare namespace VRichText {
129
129
  };
130
130
  var Image: (params: IDefaultGraphicParamsType<IRichTextImageCharacter>) => {
131
131
  attribute?: IRichTextImageCharacter;
132
- stateProxy?: (stateName: string, targetStates?: string[]) => Partial<IRichTextImageCharacter>;
132
+ states?: StateDefinitionsInput<IRichTextImageCharacter>;
133
133
  children?: any;
134
134
  name?: string;
135
135
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/jsx/graphicType.ts"],"names":[],"mappings":";;;AAAA,yDAoBgC;AAEnB,QAAA,uBAAuB,GAAG;IACrC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;IAC1B,YAAY,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C;AAEF,SAAS,CAAC,KAAK,GAAG,UAAU,MAA0D;IACpF,uBACE,IAAI,EAAE,YAAY,IACf,MAAM,EACT;AACJ,CAAC,CAAC","file":"graphicType.js","sourcesContent":["import {\n graphicCreator,\n type IArc3dGraphicAttribute,\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type ICircleGraphicAttribute,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IPyramid3dGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IRichTextCharacter,\n type IRichTextGraphicAttribute,\n type IRichTextImageCharacter,\n type ISymbolGraphicAttribute,\n type ITextGraphicAttribute\n} from '@visactor/vrender-core';\n\nexport const REACT_TO_CANOPUS_EVENTS = {\n onPointerDown: 'pointerdown',\n onPointerUp: 'pointerup',\n onPointerUpOutside: 'pointerupoutside',\n onPointerTap: 'pointertap',\n onPointerOver: 'pointerover',\n onPointerMove: 'pointermove',\n onPointerEnter: 'pointerenter',\n onPointerLeave: 'pointerleave',\n onPointerOut: 'pointerout',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onMouseUpOutside: 'mouseupoutside',\n onMouseMove: 'mousemove',\n onMouseOver: 'mouseover',\n onMouseOut: 'mouseout',\n onMouseEnter: 'mouseenter',\n onMouseLeave: 'mouseleave',\n onPinch: 'pinch',\n onPinchStart: 'pinchstart',\n onPinchEnd: 'pinchend',\n onPan: 'pan',\n onPanStart: 'panstart',\n onPanEnd: 'panend',\n onDrag: 'drag',\n onDragStart: 'dragstart',\n onDragEnter: 'dragenter',\n onDragLeave: 'dragleave',\n onDragOver: 'dragover',\n onDragEnd: 'dragend',\n onRightDown: 'rightdown',\n onRightUp: 'rightup',\n onRightUpOutside: 'rightupoutside',\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n onTouchEndOutside: 'touchendoutside',\n onTouchMove: 'touchmove',\n onTouchCancel: 'touchcancel',\n onPress: 'press',\n onPressUp: 'pressup',\n onPressEnd: 'pressend',\n onSwipe: 'swipe',\n onDrop: 'drop',\n onWeel: 'wheel',\n onClick: 'click',\n onDblClick: 'dblclick'\n};\n\nexport const REACT_TO_CANOPUS_EVENTS_LIST = Object.keys(REACT_TO_CANOPUS_EVENTS);\n\nexport type IEventParamsType = {\n [t in keyof typeof REACT_TO_CANOPUS_EVENTS]?: (d: any) => void;\n};\n\nexport type IDefaultGraphicParamsType<T> = {\n attribute?: T;\n stateProxy?: (stateName: string, targetStates?: string[]) => Partial<T>;\n // react可能类型报错\n children?: any;\n name?: string;\n id?: string;\n} & IEventParamsType;\n\nexport function VArc(params: IDefaultGraphicParamsType<IArcGraphicAttribute>) {\n return (graphicCreator as any).arc(params ? params.attribute : {});\n}\nexport function VArc3d(params: IDefaultGraphicParamsType<IArc3dGraphicAttribute>) {\n return (graphicCreator as any).arc3d(params ? params.attribute : {});\n}\nexport function VArea(params: IDefaultGraphicParamsType<IAreaGraphicAttribute>) {\n return (graphicCreator as any).area(params ? params.attribute : {});\n}\nexport function VCircle(params: IDefaultGraphicParamsType<ICircleGraphicAttribute>) {\n return (graphicCreator as any).circle(params ? params.attribute : {});\n}\nexport function VGroup(params: IDefaultGraphicParamsType<IGroupGraphicAttribute>) {\n return (graphicCreator as any).group(params ? params.attribute : {});\n}\nexport function VGlyph(params: IDefaultGraphicParamsType<IGlyphGraphicAttribute>) {\n return (graphicCreator as any).glyph(params ? params.attribute : {});\n}\nexport function VImage(params: IDefaultGraphicParamsType<IImageGraphicAttribute>) {\n return (graphicCreator as any).image(params ? params.attribute : {});\n}\nexport function VLine(params: IDefaultGraphicParamsType<ILineGraphicAttribute>) {\n return (graphicCreator as any).line(params ? params.attribute : {});\n}\nexport function VPath(params: IDefaultGraphicParamsType<IPathGraphicAttribute>) {\n return (graphicCreator as any).path(params ? params.attribute : {});\n}\nexport function VPolygon(params: IDefaultGraphicParamsType<IPolygonGraphicAttribute>) {\n return (graphicCreator as any).polygon(params ? params.attribute : {});\n}\nexport function VPyramid3d(params: IDefaultGraphicParamsType<IPyramid3dGraphicAttribute>) {\n return (graphicCreator as any).pyramid3d(params ? params.attribute : {});\n}\nexport function VRect(params: IDefaultGraphicParamsType<IRectGraphicAttribute>) {\n return (graphicCreator as any).rect(params ? params.attribute : {});\n}\nexport function VRect3d(params: IDefaultGraphicParamsType<IRect3dGraphicAttribute>) {\n return (graphicCreator as any).rect3d(params ? params.attribute : {});\n}\nexport function VSymbol(params: IDefaultGraphicParamsType<ISymbolGraphicAttribute>) {\n return (graphicCreator as any).symbol(params ? params.attribute : {});\n}\nexport function VText(params: IDefaultGraphicParamsType<ITextGraphicAttribute>) {\n return (graphicCreator as any).text(params ? params.attribute : {});\n}\nexport function VRichText(params: IDefaultGraphicParamsType<IRichTextGraphicAttribute>) {\n return (graphicCreator as any).richtext(params ? params.attribute : {});\n}\n\nVRichText.Text = function (params: IDefaultGraphicParamsType<IRichTextCharacter>) {\n return {\n type: 'rich/text',\n ...params\n };\n};\n\nVRichText.Image = function (params: IDefaultGraphicParamsType<IRichTextImageCharacter>) {\n return {\n type: 'rich/image',\n ...params\n };\n};\n"]}
1
+ {"version":3,"sources":["../src/jsx/graphicType.ts"],"names":[],"mappings":";;;AAAA,yDAqBgC;AAEnB,QAAA,uBAAuB,GAAG;IACrC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,UAAU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,WAAW,IACd,MAAM,EACT;AACJ,CAAC,CAAC;AAEF,SAAS,CAAC,KAAK,GAAG,UAAU,MAA0D;IACpF,uBACE,IAAI,EAAE,YAAY,IACf,MAAM,EACT;AACJ,CAAC,CAAC","file":"graphicType.js","sourcesContent":["import {\n graphicCreator,\n type IArc3dGraphicAttribute,\n type IArcGraphicAttribute,\n type IAreaGraphicAttribute,\n type ICircleGraphicAttribute,\n type IGlyphGraphicAttribute,\n type IGroupGraphicAttribute,\n type IImageGraphicAttribute,\n type ILineGraphicAttribute,\n type IPathGraphicAttribute,\n type IPolygonGraphicAttribute,\n type IPyramid3dGraphicAttribute,\n type IRect3dGraphicAttribute,\n type IRectGraphicAttribute,\n type IRichTextCharacter,\n type IRichTextGraphicAttribute,\n type IRichTextImageCharacter,\n type StateDefinitionsInput,\n type ISymbolGraphicAttribute,\n type ITextGraphicAttribute\n} from '@visactor/vrender-core';\n\nexport const REACT_TO_CANOPUS_EVENTS = {\n onPointerDown: 'pointerdown',\n onPointerUp: 'pointerup',\n onPointerUpOutside: 'pointerupoutside',\n onPointerTap: 'pointertap',\n onPointerOver: 'pointerover',\n onPointerMove: 'pointermove',\n onPointerEnter: 'pointerenter',\n onPointerLeave: 'pointerleave',\n onPointerOut: 'pointerout',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onMouseUpOutside: 'mouseupoutside',\n onMouseMove: 'mousemove',\n onMouseOver: 'mouseover',\n onMouseOut: 'mouseout',\n onMouseEnter: 'mouseenter',\n onMouseLeave: 'mouseleave',\n onPinch: 'pinch',\n onPinchStart: 'pinchstart',\n onPinchEnd: 'pinchend',\n onPan: 'pan',\n onPanStart: 'panstart',\n onPanEnd: 'panend',\n onDrag: 'drag',\n onDragStart: 'dragstart',\n onDragEnter: 'dragenter',\n onDragLeave: 'dragleave',\n onDragOver: 'dragover',\n onDragEnd: 'dragend',\n onRightDown: 'rightdown',\n onRightUp: 'rightup',\n onRightUpOutside: 'rightupoutside',\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n onTouchEndOutside: 'touchendoutside',\n onTouchMove: 'touchmove',\n onTouchCancel: 'touchcancel',\n onPress: 'press',\n onPressUp: 'pressup',\n onPressEnd: 'pressend',\n onSwipe: 'swipe',\n onDrop: 'drop',\n onWeel: 'wheel',\n onClick: 'click',\n onDblClick: 'dblclick'\n};\n\nexport const REACT_TO_CANOPUS_EVENTS_LIST = Object.keys(REACT_TO_CANOPUS_EVENTS);\n\nexport type IEventParamsType = {\n [t in keyof typeof REACT_TO_CANOPUS_EVENTS]?: (d: any) => void;\n};\n\nexport type IDefaultGraphicParamsType<T> = {\n attribute?: T;\n states?: StateDefinitionsInput<T>;\n // react可能类型报错\n children?: any;\n name?: string;\n id?: string;\n} & IEventParamsType;\n\nexport function VArc(params: IDefaultGraphicParamsType<IArcGraphicAttribute>) {\n return (graphicCreator as any).arc(params ? params.attribute : {});\n}\nexport function VArc3d(params: IDefaultGraphicParamsType<IArc3dGraphicAttribute>) {\n return (graphicCreator as any).arc3d(params ? params.attribute : {});\n}\nexport function VArea(params: IDefaultGraphicParamsType<IAreaGraphicAttribute>) {\n return (graphicCreator as any).area(params ? params.attribute : {});\n}\nexport function VCircle(params: IDefaultGraphicParamsType<ICircleGraphicAttribute>) {\n return (graphicCreator as any).circle(params ? params.attribute : {});\n}\nexport function VGroup(params: IDefaultGraphicParamsType<IGroupGraphicAttribute>) {\n return (graphicCreator as any).group(params ? params.attribute : {});\n}\nexport function VGlyph(params: IDefaultGraphicParamsType<IGlyphGraphicAttribute>) {\n return (graphicCreator as any).glyph(params ? params.attribute : {});\n}\nexport function VImage(params: IDefaultGraphicParamsType<IImageGraphicAttribute>) {\n return (graphicCreator as any).image(params ? params.attribute : {});\n}\nexport function VLine(params: IDefaultGraphicParamsType<ILineGraphicAttribute>) {\n return (graphicCreator as any).line(params ? params.attribute : {});\n}\nexport function VPath(params: IDefaultGraphicParamsType<IPathGraphicAttribute>) {\n return (graphicCreator as any).path(params ? params.attribute : {});\n}\nexport function VPolygon(params: IDefaultGraphicParamsType<IPolygonGraphicAttribute>) {\n return (graphicCreator as any).polygon(params ? params.attribute : {});\n}\nexport function VPyramid3d(params: IDefaultGraphicParamsType<IPyramid3dGraphicAttribute>) {\n return (graphicCreator as any).pyramid3d(params ? params.attribute : {});\n}\nexport function VRect(params: IDefaultGraphicParamsType<IRectGraphicAttribute>) {\n return (graphicCreator as any).rect(params ? params.attribute : {});\n}\nexport function VRect3d(params: IDefaultGraphicParamsType<IRect3dGraphicAttribute>) {\n return (graphicCreator as any).rect3d(params ? params.attribute : {});\n}\nexport function VSymbol(params: IDefaultGraphicParamsType<ISymbolGraphicAttribute>) {\n return (graphicCreator as any).symbol(params ? params.attribute : {});\n}\nexport function VText(params: IDefaultGraphicParamsType<ITextGraphicAttribute>) {\n return (graphicCreator as any).text(params ? params.attribute : {});\n}\nexport function VRichText(params: IDefaultGraphicParamsType<IRichTextGraphicAttribute>) {\n return (graphicCreator as any).richtext(params ? params.attribute : {});\n}\n\nVRichText.Text = function (params: IDefaultGraphicParamsType<IRichTextCharacter>) {\n return {\n type: 'rich/text',\n ...params\n };\n};\n\nVRichText.Image = function (params: IDefaultGraphicParamsType<IRichTextImageCharacter>) {\n return {\n type: 'rich/image',\n ...params\n };\n};\n"]}
@@ -22,14 +22,14 @@ function flatten(list, out) {
22
22
  }
23
23
 
24
24
  function jsx(type, config, ...children) {
25
- const _a = config || {}, {key: key, name: name, id: id, attribute: attribute, stateProxy: stateProxy, animation: animation, timeline: timeline} = _a, props = __rest(_a, [ "key", "name", "id", "attribute", "stateProxy", "animation", "timeline" ]);
25
+ const _a = config || {}, {name: name, id: id, attribute: attribute, states: states, animation: animation, timeline: timeline} = _a, props = __rest(_a, [ "name", "id", "attribute", "states", "animation", "timeline" ]);
26
26
  let c = type;
27
27
  (0, vutils_1.isString)(type) && (c = vrender_core_1.graphicCreator[type]);
28
28
  const childrenList = [];
29
29
  children.length && flatten(1 === children.length ? children[0] : children, childrenList);
30
30
  const g = "Group" === c.name ? new c(attribute) : c(config);
31
- if (parseToGraphic(g, childrenList, props), stateProxy && (g.stateProxy = stateProxy),
32
- name && (g.name = name), (0, vutils_1.isArray)(animation)) {
31
+ if (parseToGraphic(g, childrenList, props), name && (g.name = name), id && (g.id = id),
32
+ states && (g.states = states), (0, vutils_1.isArray)(animation)) {
33
33
  const animate = g.animate();
34
34
  timeline && animate.setTimeline(timeline), animation.forEach((item => {
35
35
  animate[item[0]](...item.slice(1));
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/jsx/jsx-classic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6CAAqD;AACrD,yDAA+D;AAC/D,+CAAwD;AAExD,SAAS,OAAO,CAAC,IAAS,EAAE,GAAU;IACpC,IAAI,IAAA,gBAAO,EAAC,IAAI,CAAC,EAAE;QACjB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;KAC3C;IACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC;AAED,SAAgB,GAAG,CAAC,IAAkB,EAAE,MAA2B,EAAE,GAAG,QAAa;IACnF,MAAM,KAA0E,MAAM,IAAI,EAAE,EAAtF,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,OAA2B,EAAtB,KAAK,cAArE,yEAAuE,CAAe,CAAC;IAE7F,IAAI,CAAC,GAAG,IAAI,CAAC;IACb,IAAI,IAAA,iBAAQ,EAAC,IAAI,CAAC,EAAE;QAClB,CAAC,GAAG,6BAAc,CAAC,IAAI,CAAC,CAAC;KAC1B;IAED,MAAM,YAAY,GAAU,EAAE,CAAC;IAC/B,IAAI,QAAQ,CAAC,MAAM,EAAE;QACnB,OAAO,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAA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S,GAAG,IAAI,CAAC;KACpB;IAED,IAAI,SAAS,EAAE;QACb,YAAY,CAAC,OAAO,CAAC,CAAC,CAAM,EAAE,EAAE;YAC9B,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC7B,MAAM,EAAE,GAAG,qCAAuB,CAAC,CAAC,CAAC,CAAC;YACtC,IAAI,EAAE,EAAE;gBACN,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;aACpB;QACH,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,EAAE;YACzB,CAAC,CAAC,SAAS,CAAC,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;SACxF;KACF;AACH,CAAC;AAEY,QAAA,QAAQ,GAAG,oBAAK,CAAC","file":"jsx-classic.js","sourcesContent":["import { isArray, isString } from '@visactor/vutils';\nimport { Group, graphicCreator } from '@visactor/vrender-core';\nimport { REACT_TO_CANOPUS_EVENTS } from './graphicType';\n\nfunction flatten(list: any, out: any[]): void {\n if (isArray(list)) {\n return list.forEach(i => flatten(i, out));\n }\n out.push(list);\n}\n\nexport function jsx(type: string | any, config: Record<string, any>, ...children: any) {\n const { key, name, id, attribute, stateProxy, animation, timeline, ...props } = config || {};\n\n let c = type;\n if (isString(type)) {\n c = graphicCreator[type];\n }\n\n const childrenList: any[] = [];\n if (children.length) {\n flatten(children.length === 1 ? children[0] : children, childrenList);\n }\n\n const g = c.name === 'Group' ? new c(attribute) : c(config);\n parseToGraphic(g, childrenList, props);\n\n if (stateProxy) {\n g.stateProxy = stateProxy;\n }\n\n if (name) {\n g.name = name;\n }\n\n if (isArray(animation)) {\n // animation={[\n // ['to', { angle: 2 * Math.PI }, 1000, 'linear'],\n // ['loop', Infinity]\n // ]}\n const animate = g.animate();\n timeline && animate.setTimeline(timeline);\n animation.forEach((item: any[]) => {\n animate[item[0]](...item.slice(1));\n });\n }\n\n return g;\n}\n\nfunction parseToGraphic(g: any, childrenList: any[], props: any) {\n let isGraphic: boolean = false;\n let out: any;\n switch (g.type) {\n case 'richtext':\n break;\n case 'rich/text':\n out = g.attribute || {};\n childrenList[0] && (out.text = childrenList[0]);\n break;\n case 'rich/image':\n break;\n default:\n isGraphic = true;\n }\n\n if (isGraphic) {\n childrenList.forEach((c: any) => {\n c && g.add(c);\n });\n\n Object.keys(props).forEach(k => {\n const en = REACT_TO_CANOPUS_EVENTS[k];\n if (en) {\n g.on(en, props[k]);\n }\n });\n } else {\n if (g.type === 'richtext') {\n g.attribute.textConfig = childrenList.map(item => item.attribute).filter(item => item);\n }\n }\n}\n\nexport const Fragment = Group;\n"]}
1
+ {"version":3,"sources":["../src/jsx/jsx-classic.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6CAAqD;AACrD,yDAA+D;AAC/D,+CAAwD;AAExD,SAAS,OAAO,CAAC,IAAS,EAAE,GAAU;IACpC,IAAI,IAAA,gBAAO,EAAC,IAAI,CAAC,EAAE;QACjB,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;KAC3C;IACD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACjB,CAAC;AAED,SAAgB,GAAG,CAAC,IAAkB,EAAE,MAA2B,EAAE,GAAG,QAAa;IACnF,MAAM,KAAiE,MAAM,IAAI,EAAE,EAA7E,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,OAA2B,EAAtB,KAAK,cAA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Ac,CAAC,CAAM,EAAE,YAAmB,EAAE,KAAU;IAC7D,IAAI,SAAS,GAAY,KAAK,CAAC;IAC/B,IAAI,GAAQ,CAAC;IACb,QAAQ,CAAC,CAAC,IAAI,EAAE;QACd,KAAK,UAAU;YACb,MAAM;QACR,KAAK,WAAW;YACd,GAAG,GAAG,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC;YACxB,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,MAAM;QACR,KAAK,YAAY;YACf,MAAM;QACR;YACE,SAAS,GAAG,IAAI,CAAC;KACpB;IAED,IAAI,SAAS,EAAE;QACb,YAAY,CAAC,OAAO,CAAC,CAAC,CAAM,EAAE,EAAE;YAC9B,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC7B,MAAM,EAAE,GAAG,qCAAuB,CAAC,CAAC,CAAC,CAAC;YACtC,IAAI,EAAE,EAAE;gBACN,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;aACpB;QACH,CAAC,CAAC,CAAC;KACJ;SAAM;QACL,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,EAAE;YACzB,CAAC,CAAC,SAAS,CAAC,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;SACxF;KACF;AACH,CAAC;AAEY,QAAA,QAAQ,GAAG,oBAAK,CAAC","file":"jsx-classic.js","sourcesContent":["import { isArray, isString } from '@visactor/vutils';\nimport { Group, graphicCreator } from '@visactor/vrender-core';\nimport { REACT_TO_CANOPUS_EVENTS } from './graphicType';\n\nfunction flatten(list: any, out: any[]): void {\n if (isArray(list)) {\n return list.forEach(i => flatten(i, out));\n }\n out.push(list);\n}\n\nexport function jsx(type: string | any, config: Record<string, any>, ...children: any) {\n const { name, id, attribute, states, animation, timeline, ...props } = config || {};\n\n let c = type;\n if (isString(type)) {\n c = graphicCreator[type];\n }\n\n const childrenList: any[] = [];\n if (children.length) {\n flatten(children.length === 1 ? children[0] : children, childrenList);\n }\n\n const g = c.name === 'Group' ? new c(attribute) : c(config);\n parseToGraphic(g, childrenList, props);\n\n if (name) {\n g.name = name;\n }\n\n if (id) {\n g.id = id;\n }\n\n if (states) {\n g.states = states;\n }\n\n if (isArray(animation)) {\n // animation={[\n // ['to', { angle: 2 * Math.PI }, 1000, 'linear'],\n // ['loop', Infinity]\n // ]}\n const animate = g.animate();\n timeline && animate.setTimeline(timeline);\n animation.forEach((item: any[]) => {\n animate[item[0]](...item.slice(1));\n });\n }\n\n return g;\n}\n\nfunction parseToGraphic(g: any, childrenList: any[], props: any) {\n let isGraphic: boolean = false;\n let out: any;\n switch (g.type) {\n case 'richtext':\n break;\n case 'rich/text':\n out = g.attribute || {};\n childrenList[0] && (out.text = childrenList[0]);\n break;\n case 'rich/image':\n break;\n default:\n isGraphic = true;\n }\n\n if (isGraphic) {\n childrenList.forEach((c: any) => {\n c && g.add(c);\n });\n\n Object.keys(props).forEach(k => {\n const en = REACT_TO_CANOPUS_EVENTS[k];\n if (en) {\n g.on(en, props[k]);\n }\n });\n } else {\n if (g.type === 'richtext') {\n g.attribute.textConfig = childrenList.map(item => item.attribute).filter(item => item);\n }\n }\n}\n\nexport const Fragment = Group;\n"]}
package/cjs/react-tree.js CHANGED
@@ -8,11 +8,11 @@ const vutils_1 = require("@visactor/vutils"), jsx_1 = require("./jsx");
8
8
 
9
9
  function decodeReactDom(dom) {
10
10
  if (!dom || !dom.$$typeof) return dom;
11
- const type = dom.type, {attribute: attribute, children: children, stateProxy: stateProxy, id: id, name: name} = dom.props, g = type({
11
+ const type = dom.type, {attribute: attribute, children: children, states: states, id: id, name: name} = dom.props, g = type({
12
12
  attribute: attribute
13
13
  }), out = parseToGraphic(g, dom.props, children);
14
- return out || (stateProxy && (g.stateProxy = stateProxy), g.id = id, g.name = name,
15
- parseChildren(children, g), g);
14
+ return out || (g.id = id, g.name = name, states && (g.states = states), parseChildren(children, g),
15
+ g);
16
16
  }
17
17
 
18
18
  function parseChildren(children, g) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/react-tree.ts"],"names":[],"mappings":";;;AAAA,6CAA2C;AAC3C,+BAAgD;AAGhD,SAAgB,cAAc,CAAC,GAAQ;IACrC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;QAEzB,OAAO,GAAG,CAAC;KACZ;IACD,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IACtB,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC;IAChE,MAAM,CAAC,GAAG,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAC9B,MAAM,GAAG,GAAG,cAAc,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACnD,IAAI,GAAG,EAAE;QACP,OAAO,GAAG,CAAC;KACZ;IACD,IAAI,UAAU,EAAE;QACd,CAAC,CAAC,UAAU,GAAG,UAAU,CAAC;KAC3B;IAED,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;IACV,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC;IACd,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC3B,OAAO,CAAC,CAAC;AACX,CAAC;AApBD,wCAoBC;AAED,SAAS,aAAa,CAAC,QAAa,EAAE,CAAM;IAC1C,IAAI,IAAA,gBAAO,EAAC,QAAQ,CAAC,EAAE;QACrB,QAAQ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AAM,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,EAAE;QAChC,CAAC,CAAC,SAAS,CAAC,UAAU,GAAG,YAAY;aAClC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE;YACjB,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC,CAAC;aACD,MAAM,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;KAChC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","file":"react-tree.js","sourcesContent":["import { isArray } from '@visactor/vutils';\nimport { REACT_TO_CANOPUS_EVENTS } from './jsx';\n\n// temp devode for react jsx customLayout\nexport function decodeReactDom(dom: any) {\n if (!dom || !dom.$$typeof) {\n // not react\n return dom;\n }\n const type = dom.type;\n const { attribute, children, stateProxy, id, name } = dom.props;\n const g = type({ attribute });\n const out = parseToGraphic(g, dom.props, children);\n if (out) {\n return out;\n }\n if (stateProxy) {\n g.stateProxy = stateProxy;\n }\n\n g.id = id;\n g.name = name;\n parseChildren(children, g);\n return g;\n}\n\nfunction parseChildren(children: any, g: any) {\n if (isArray(children)) {\n children.forEach((item: any) => {\n if (isArray(item)) {\n parseChildren(item, g);\n } else {\n const c = decodeReactDom(item);\n c && c.type && g.add(c);\n }\n });\n } else if (children) {\n g.add(decodeReactDom(children));\n }\n}\n\nfunction parseToGraphic(g: any, props: any, childrenList: any): any {\n let isGraphic: boolean = false;\n let out;\n switch (g.type) {\n case 'richtext':\n break;\n case 'rich/text':\n out = g.attribute || {};\n childrenList && (out.text = childrenList);\n g.attribute = out;\n break;\n case 'rich/image':\n out = g.attribute || {};\n break;\n default:\n isGraphic = true;\n }\n\n if (isGraphic) {\n Object.keys(props).forEach(k => {\n const en = REACT_TO_CANOPUS_EVENTS[k];\n if (en) {\n g.on(en, props[k]);\n }\n });\n } else if (g.type === 'richtext') {\n g.attribute.textConfig = childrenList\n .map((item: any) => {\n return decodeReactDom(item);\n })\n .filter((item: any) => item);\n }\n return out;\n}\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AAC","file":"react-tree.js","sourcesContent":["import { isArray } from '@visactor/vutils';\nimport { REACT_TO_CANOPUS_EVENTS } from './jsx';\n\n// temp devode for react jsx customLayout\nexport function decodeReactDom(dom: any) {\n if (!dom || !dom.$$typeof) {\n // not react\n return dom;\n }\n const type = dom.type;\n const { attribute, children, states, id, name } = dom.props;\n const g = type({ attribute });\n const out = parseToGraphic(g, dom.props, children);\n if (out) {\n return out;\n }\n\n g.id = id;\n g.name = name;\n if (states) {\n g.states = states;\n }\n parseChildren(children, g);\n return g;\n}\n\nfunction parseChildren(children: any, g: any) {\n if (isArray(children)) {\n children.forEach((item: any) => {\n if (isArray(item)) {\n parseChildren(item, g);\n } else {\n const c = decodeReactDom(item);\n c && c.type && g.add(c);\n }\n });\n } else if (children) {\n g.add(decodeReactDom(children));\n }\n}\n\nfunction parseToGraphic(g: any, props: any, childrenList: any): any {\n let isGraphic: boolean = false;\n let out;\n switch (g.type) {\n case 'richtext':\n break;\n case 'rich/text':\n out = g.attribute || {};\n childrenList && (out.text = childrenList);\n g.attribute = out;\n break;\n case 'rich/image':\n out = g.attribute || {};\n break;\n default:\n isGraphic = true;\n }\n\n if (isGraphic) {\n Object.keys(props).forEach(k => {\n const en = REACT_TO_CANOPUS_EVENTS[k];\n if (en) {\n g.on(en, props[k]);\n }\n });\n } else if (g.type === 'richtext') {\n g.attribute.textConfig = childrenList\n .map((item: any) => {\n return decodeReactDom(item);\n })\n .filter((item: any) => item);\n }\n return out;\n}\n"]}
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.browser = void 0;
6
6
 
7
- const vrender_core_1 = require("@visactor/vrender-core");
7
+ const env_1 = require("@visactor/vrender-core/env");
8
8
 
9
- exports.browser = (0, vrender_core_1.isBrowserEnv)();
10
- //# sourceMappingURL=env.js.map
9
+ exports.browser = (0, env_1.isBrowserEnv)();
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/register/env.ts"],"names":[],"mappings":";;;AAAA,yDAAsD;AAEzC,QAAA,OAAO,GAAG,IAAA,2BAAY,GAAE,CAAC","file":"env.js","sourcesContent":["import { isBrowserEnv } from '@visactor/vrender-core';\n\nexport const browser = isBrowserEnv();\n"]}
1
+ {"version":3,"sources":["../src/register/env.ts"],"names":[],"mappings":";;;AAAA,oDAA0D;AAE7C,QAAA,OAAO,GAAG,IAAA,kBAAY,GAAE,CAAC","file":"env.js","sourcesContent":["import { isBrowserEnv } from '@visactor/vrender-core/env';\n\nexport const browser = isBrowserEnv();\n"]}
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.registerArc = exports._registerArc = void 0;
6
6
 
7
- const vrender_core_1 = require("@visactor/vrender-core"), env_1 = require("./env"), arc_module_1 = require("../picker/contributions/canvas-picker/arc-module"), arc_module_2 = require("../picker/contributions/math-picker/arc-module");
7
+ const bootstrap_1 = require("@visactor/vrender-core/legacy/bootstrap"), graphic_1 = require("@visactor/vrender-core/register/graphic"), modules_1 = require("@visactor/vrender-core/graphic/modules"), env_1 = require("./env"), arc_module_1 = require("../picker/contributions/canvas-picker/arc-module"), arc_module_2 = require("../picker/contributions/math-picker/arc-module");
8
8
 
9
9
  function _registerArc() {
10
10
  if (_registerArc.__loaded) return;
11
11
  _registerArc.__loaded = !0;
12
- const legacyContext = (0, vrender_core_1.getLegacyBindingContext)();
13
- (0, vrender_core_1.registerArcGraphic)(), vrender_core_1.arcModule({
12
+ const legacyContext = (0, bootstrap_1.getLegacyBindingContext)();
13
+ (0, graphic_1.registerArcGraphic)(), modules_1.arcModule({
14
14
  bind: legacyContext.bind
15
15
  }), env_1.browser ? (0, arc_module_1.bindArcCanvasPickerContribution)(legacyContext) : (0,
16
16
  arc_module_2.bindArcMathPickerContribution)(legacyContext);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/register/register-arc.ts"],"names":[],"mappings":";;;AAAA,yDAAgG;AAChG,+BAAgC;AAChC,iFAAmG;AACnG,+EAA+F;AAE/F,SAAgB,YAAY;IAC1B,IAAI,YAAY,CAAC,QAAQ,EAAE;QACzB,OAAO;KACR;IACD,YAAY,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC7B,MAAM,aAAa,GAAG,IAAA,sCAAuB,GAAE,CAAC;IAChD,IAAA,iCAAkB,GAAE,CAAC;IACpB,wBAAiB,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACjD,aAAO,CAAC,CAAC,CAAC,IAAA,4CAA+B,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAA,0CAA6B,EAAC,aAAa,CAAC,CAAC;AAC1G,CAAC;AATD,oCASC;AAED,YAAY,CAAC,QAAQ,GAAG,KAAK,CAAC;AAEjB,QAAA,WAAW,GAAG,YAAY,CAAC","file":"register-arc.js","sourcesContent":["import { arcModule, getLegacyBindingContext, registerArcGraphic } from '@visactor/vrender-core';\nimport { browser } from './env';\nimport { bindArcCanvasPickerContribution } from '../picker/contributions/canvas-picker/arc-module';\nimport { bindArcMathPickerContribution } from '../picker/contributions/math-picker/arc-module';\n\nexport function _registerArc() {\n if (_registerArc.__loaded) {\n return;\n }\n _registerArc.__loaded = true;\n const legacyContext = getLegacyBindingContext();\n registerArcGraphic();\n (arcModule as any)({ bind: legacyContext.bind });\n browser ? bindArcCanvasPickerContribution(legacyContext) : bindArcMathPickerContribution(legacyContext);\n}\n\n_registerArc.__loaded = false;\n\nexport const registerArc = _registerArc;\n"]}
1
+ {"version":3,"sources":["../src/register/register-arc.ts"],"names":[],"mappings":";;;AAAA,uEAAkF;AAClF,qEAA6E;AAC7E,oEAAmE;AACnE,+BAAgC;AAChC,iFAAmG;AACnG,+EAA+F;AAE/F,SAAgB,YAAY;IAC1B,IAAI,YAAY,CAAC,QAAQ,EAAE;QACzB,OAAO;KACR;IACD,YAAY,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC7B,MAAM,aAAa,GAAG,IAAA,mCAAuB,GAAE,CAAC;IAChD,IAAA,4BAAkB,GAAE,CAAC;IACpB,mBAAiB,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACjD,aAAO,CAAC,CAAC,CAAC,IAAA,4CAA+B,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAA,0CAA6B,EAAC,aAAa,CAAC,CAAC;AAC1G,CAAC;AATD,oCASC;AAED,YAAY,CAAC,QAAQ,GAAG,KAAK,CAAC;AAEjB,QAAA,WAAW,GAAG,YAAY,CAAC","file":"register-arc.js","sourcesContent":["import { getLegacyBindingContext } from '@visactor/vrender-core/legacy/bootstrap';\nimport { registerArcGraphic } from '@visactor/vrender-core/register/graphic';\nimport { arcModule } from '@visactor/vrender-core/graphic/modules';\nimport { browser } from './env';\nimport { bindArcCanvasPickerContribution } from '../picker/contributions/canvas-picker/arc-module';\nimport { bindArcMathPickerContribution } from '../picker/contributions/math-picker/arc-module';\n\nexport function _registerArc() {\n if (_registerArc.__loaded) {\n return;\n }\n _registerArc.__loaded = true;\n const legacyContext = getLegacyBindingContext();\n registerArcGraphic();\n (arcModule as any)({ bind: legacyContext.bind });\n browser ? bindArcCanvasPickerContribution(legacyContext) : bindArcMathPickerContribution(legacyContext);\n}\n\n_registerArc.__loaded = false;\n\nexport const registerArc = _registerArc;\n"]}
@@ -4,16 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.registerArc3d = void 0;
6
6
 
7
- const vrender_core_1 = require("@visactor/vrender-core"), arc3d_module_1 = require("../picker/contributions/canvas-picker/arc3d-module");
7
+ const bootstrap_1 = require("@visactor/vrender-core/legacy/bootstrap"), graphic_1 = require("@visactor/vrender-core/register/graphic"), modules_1 = require("@visactor/vrender-core/graphic/modules"), _3d_1 = require("@visactor/vrender-core/plugin/3d"), arc3d_module_1 = require("../picker/contributions/canvas-picker/arc3d-module");
8
8
 
9
9
  function _registerArc3d() {
10
10
  if (_registerArc3d.__loaded) return;
11
11
  _registerArc3d.__loaded = !0;
12
- const legacyContext = (0, vrender_core_1.getLegacyBindingContext)();
13
- (0, vrender_core_1.registerArc3dGraphic)(), (0, vrender_core_1.registerDirectionalLight)(),
14
- (0, vrender_core_1.registerOrthoCamera)(), vrender_core_1.arc3dModule({
12
+ const legacyContext = (0, bootstrap_1.getLegacyBindingContext)();
13
+ (0, graphic_1.registerArc3dGraphic)(), (0, _3d_1.registerDirectionalLight)(), (0,
14
+ _3d_1.registerOrthoCamera)(), modules_1.arc3dModule({
15
15
  bind: legacyContext.bind
16
16
  }), (0, arc3d_module_1.bindArc3dCanvasPickerContribution)(legacyContext);
17
17
  }
18
18
 
19
- _registerArc3d.__loaded = !1, exports.registerArc3d = _registerArc3d;
19
+ _registerArc3d.__loaded = !1, exports.registerArc3d = _registerArc3d;
20
+ //# sourceMappingURL=register-arc3d.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/register/register-arc3d.ts"],"names":[],"mappings":";;;AAAA,yDAMgC;AAChC,qFAAuG;AAEvG,SAAS,cAAc;IACrB,IAAI,cAAc,CAAC,QAAQ,EAAE;QAC3B,OAAO;KACR;IACD,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC/B,MAAM,aAAa,GAAG,IAAA,sCAAuB,GAAE,CAAC;IAChD,IAAA,mCAAoB,GAAE,CAAC;IACvB,IAAA,uCAAwB,GAAE,CAAC;IAC3B,IAAA,kCAAmB,GAAE,CAAC;IACrB,0BAAmB,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACnD,IAAA,gDAAiC,EAAC,aAAa,CAAC,CAAC;AACnD,CAAC;AAED,cAAc,CAAC,QAAQ,GAAG,KAAK,CAAC;AAEnB,QAAA,aAAa,GAAG,cAAc,CAAC","file":"register-arc3d.js","sourcesContent":["import {\n arc3dModule,\n getLegacyBindingContext,\n registerArc3dGraphic,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { bindArc3dCanvasPickerContribution } from '../picker/contributions/canvas-picker/arc3d-module';\n\nfunction _registerArc3d() {\n if (_registerArc3d.__loaded) {\n return;\n }\n _registerArc3d.__loaded = true;\n const legacyContext = getLegacyBindingContext();\n registerArc3dGraphic();\n registerDirectionalLight();\n registerOrthoCamera();\n (arc3dModule as any)({ bind: legacyContext.bind });\n bindArc3dCanvasPickerContribution(legacyContext);\n}\n\n_registerArc3d.__loaded = false;\n\nexport const registerArc3d = _registerArc3d;\n"]}
1
+ {"version":3,"sources":["../src/register/register-arc3d.ts"],"names":[],"mappings":";;;AAAA,uEAAkF;AAClF,qEAA+E;AAC/E,oEAAqE;AACrE,0DAAiG;AACjG,qFAAuG;AAEvG,SAAS,cAAc;IACrB,IAAI,cAAc,CAAC,QAAQ,EAAE;QAC3B,OAAO;KACR;IACD,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC/B,MAAM,aAAa,GAAG,IAAA,mCAAuB,GAAE,CAAC;IAChD,IAAA,8BAAoB,GAAE,CAAC;IACvB,IAAA,8BAAwB,GAAE,CAAC;IAC3B,IAAA,yBAAmB,GAAE,CAAC;IACrB,qBAAmB,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACnD,IAAA,gDAAiC,EAAC,aAAa,CAAC,CAAC;AACnD,CAAC;AAED,cAAc,CAAC,QAAQ,GAAG,KAAK,CAAC;AAEnB,QAAA,aAAa,GAAG,cAAc,CAAC","file":"register-arc3d.js","sourcesContent":["import { getLegacyBindingContext } from '@visactor/vrender-core/legacy/bootstrap';\nimport { registerArc3dGraphic } from '@visactor/vrender-core/register/graphic';\nimport { arc3dModule } from '@visactor/vrender-core/graphic/modules';\nimport { registerDirectionalLight, registerOrthoCamera } from '@visactor/vrender-core/plugin/3d';\nimport { bindArc3dCanvasPickerContribution } from '../picker/contributions/canvas-picker/arc3d-module';\n\nfunction _registerArc3d() {\n if (_registerArc3d.__loaded) {\n return;\n }\n _registerArc3d.__loaded = true;\n const legacyContext = getLegacyBindingContext();\n registerArc3dGraphic();\n registerDirectionalLight();\n registerOrthoCamera();\n (arc3dModule as any)({ bind: legacyContext.bind });\n bindArc3dCanvasPickerContribution(legacyContext);\n}\n\n_registerArc3d.__loaded = false;\n\nexport const registerArc3d = _registerArc3d;\n"]}
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.registerArea = void 0;
6
6
 
7
- const vrender_core_1 = require("@visactor/vrender-core"), env_1 = require("./env"), area_module_1 = require("../picker/contributions/canvas-picker/area-module"), area_module_2 = require("../picker/contributions/math-picker/area-module");
7
+ const bootstrap_1 = require("@visactor/vrender-core/legacy/bootstrap"), graphic_1 = require("@visactor/vrender-core/register/graphic"), modules_1 = require("@visactor/vrender-core/graphic/modules"), env_1 = require("./env"), area_module_1 = require("../picker/contributions/canvas-picker/area-module"), area_module_2 = require("../picker/contributions/math-picker/area-module");
8
8
 
9
9
  function _registerArea() {
10
10
  if (_registerArea.__loaded) return;
11
11
  _registerArea.__loaded = !0;
12
- const legacyContext = (0, vrender_core_1.getLegacyBindingContext)();
13
- (0, vrender_core_1.registerAreaGraphic)(), vrender_core_1.areaModule({
12
+ const legacyContext = (0, bootstrap_1.getLegacyBindingContext)();
13
+ (0, graphic_1.registerAreaGraphic)(), modules_1.areaModule({
14
14
  bind: legacyContext.bind
15
15
  }), env_1.browser ? (0, area_module_1.bindAreaCanvasPickerContribution)(legacyContext) : (0,
16
16
  area_module_2.bindAreaMathPickerContribution)(legacyContext);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/register/register-area.ts"],"names":[],"mappings":";;;AAAA,yDAAkG;AAClG,+BAAgC;AAChC,mFAAqG;AACrG,iFAAiG;AAEjG,SAAS,aAAa;IACpB,IAAI,aAAa,CAAC,QAAQ,EAAE;QAC1B,OAAO;KACR;IACD,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC9B,MAAM,aAAa,GAAG,IAAA,sCAAuB,GAAE,CAAC;IAChD,IAAA,kCAAmB,GAAE,CAAC;IACrB,yBAAkB,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IAClD,aAAO,CAAC,CAAC,CAAC,IAAA,8CAAgC,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAA,4CAA8B,EAAC,aAAa,CAAC,CAAC;AAC5G,CAAC;AAED,aAAa,CAAC,QAAQ,GAAG,KAAK,CAAC;AAElB,QAAA,YAAY,GAAG,aAAa,CAAC","file":"register-area.js","sourcesContent":["import { areaModule, getLegacyBindingContext, registerAreaGraphic } from '@visactor/vrender-core';\nimport { browser } from './env';\nimport { bindAreaCanvasPickerContribution } from '../picker/contributions/canvas-picker/area-module';\nimport { bindAreaMathPickerContribution } from '../picker/contributions/math-picker/area-module';\n\nfunction _registerArea() {\n if (_registerArea.__loaded) {\n return;\n }\n _registerArea.__loaded = true;\n const legacyContext = getLegacyBindingContext();\n registerAreaGraphic();\n (areaModule as any)({ bind: legacyContext.bind });\n browser ? bindAreaCanvasPickerContribution(legacyContext) : bindAreaMathPickerContribution(legacyContext);\n}\n\n_registerArea.__loaded = false;\n\nexport const registerArea = _registerArea;\n"]}
1
+ {"version":3,"sources":["../src/register/register-area.ts"],"names":[],"mappings":";;;AAAA,uEAAkF;AAClF,qEAA8E;AAC9E,oEAAoE;AACpE,+BAAgC;AAChC,mFAAqG;AACrG,iFAAiG;AAEjG,SAAS,aAAa;IACpB,IAAI,aAAa,CAAC,QAAQ,EAAE;QAC1B,OAAO;KACR;IACD,aAAa,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC9B,MAAM,aAAa,GAAG,IAAA,mCAAuB,GAAE,CAAC;IAChD,IAAA,6BAAmB,GAAE,CAAC;IACrB,oBAAkB,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IAClD,aAAO,CAAC,CAAC,CAAC,IAAA,8CAAgC,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAA,4CAA8B,EAAC,aAAa,CAAC,CAAC;AAC5G,CAAC;AAED,aAAa,CAAC,QAAQ,GAAG,KAAK,CAAC;AAElB,QAAA,YAAY,GAAG,aAAa,CAAC","file":"register-area.js","sourcesContent":["import { getLegacyBindingContext } from '@visactor/vrender-core/legacy/bootstrap';\nimport { registerAreaGraphic } from '@visactor/vrender-core/register/graphic';\nimport { areaModule } from '@visactor/vrender-core/graphic/modules';\nimport { browser } from './env';\nimport { bindAreaCanvasPickerContribution } from '../picker/contributions/canvas-picker/area-module';\nimport { bindAreaMathPickerContribution } from '../picker/contributions/math-picker/area-module';\n\nfunction _registerArea() {\n if (_registerArea.__loaded) {\n return;\n }\n _registerArea.__loaded = true;\n const legacyContext = getLegacyBindingContext();\n registerAreaGraphic();\n (areaModule as any)({ bind: legacyContext.bind });\n browser ? bindAreaCanvasPickerContribution(legacyContext) : bindAreaMathPickerContribution(legacyContext);\n}\n\n_registerArea.__loaded = false;\n\nexport const registerArea = _registerArea;\n"]}
@@ -4,13 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.registerCircle = void 0;
6
6
 
7
- const vrender_core_1 = require("@visactor/vrender-core"), env_1 = require("./env"), circle_module_1 = require("../picker/contributions/canvas-picker/circle-module"), circle_module_2 = require("../picker/contributions/math-picker/circle-module");
7
+ const bootstrap_1 = require("@visactor/vrender-core/legacy/bootstrap"), graphic_1 = require("@visactor/vrender-core/register/graphic"), modules_1 = require("@visactor/vrender-core/graphic/modules"), env_1 = require("./env"), circle_module_1 = require("../picker/contributions/canvas-picker/circle-module"), circle_module_2 = require("../picker/contributions/math-picker/circle-module");
8
8
 
9
9
  function _registerCircle() {
10
10
  if (_registerCircle.__loaded) return;
11
11
  _registerCircle.__loaded = !0;
12
- const legacyContext = (0, vrender_core_1.getLegacyBindingContext)();
13
- (0, vrender_core_1.registerCircleGraphic)(), vrender_core_1.circleModule({
12
+ const legacyContext = (0, bootstrap_1.getLegacyBindingContext)();
13
+ (0, graphic_1.registerCircleGraphic)(), modules_1.circleModule({
14
14
  bind: legacyContext.bind
15
15
  }), env_1.browser ? (0, circle_module_1.bindCircleCanvasPickerContribution)(legacyContext) : (0,
16
16
  circle_module_2.bindCircleMathPickerContribution)(legacyContext);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/register/register-circle.ts"],"names":[],"mappings":";;;AAAA,yDAAsG;AACtG,+BAAgC;AAChC,uFAAyG;AACzG,qFAAqG;AAErG,SAAS,eAAe;IACtB,IAAI,eAAe,CAAC,QAAQ,EAAE;QAC5B,OAAO;KACR;IACD,eAAe,CAAC,QAAQ,GAAG,IAAI,CAAC;IAChC,MAAM,aAAa,GAAG,IAAA,sCAAuB,GAAE,CAAC;IAChD,IAAA,oCAAqB,GAAE,CAAC;IACvB,2BAAoB,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACpD,aAAO,CAAC,CAAC,CAAC,IAAA,kDAAkC,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAA,gDAAgC,EAAC,aAAa,CAAC,CAAC;AAChH,CAAC;AAED,eAAe,CAAC,QAAQ,GAAG,KAAK,CAAC;AAEpB,QAAA,cAAc,GAAG,eAAe,CAAC","file":"register-circle.js","sourcesContent":["import { circleModule, getLegacyBindingContext, registerCircleGraphic } from '@visactor/vrender-core';\nimport { browser } from './env';\nimport { bindCircleCanvasPickerContribution } from '../picker/contributions/canvas-picker/circle-module';\nimport { bindCircleMathPickerContribution } from '../picker/contributions/math-picker/circle-module';\n\nfunction _registerCircle() {\n if (_registerCircle.__loaded) {\n return;\n }\n _registerCircle.__loaded = true;\n const legacyContext = getLegacyBindingContext();\n registerCircleGraphic();\n (circleModule as any)({ bind: legacyContext.bind });\n browser ? bindCircleCanvasPickerContribution(legacyContext) : bindCircleMathPickerContribution(legacyContext);\n}\n\n_registerCircle.__loaded = false;\n\nexport const registerCircle = _registerCircle;\n"]}
1
+ {"version":3,"sources":["../src/register/register-circle.ts"],"names":[],"mappings":";;;AAAA,uEAAkF;AAClF,qEAAgF;AAChF,oEAAsE;AACtE,+BAAgC;AAChC,uFAAyG;AACzG,qFAAqG;AAErG,SAAS,eAAe;IACtB,IAAI,eAAe,CAAC,QAAQ,EAAE;QAC5B,OAAO;KACR;IACD,eAAe,CAAC,QAAQ,GAAG,IAAI,CAAC;IAChC,MAAM,aAAa,GAAG,IAAA,mCAAuB,GAAE,CAAC;IAChD,IAAA,+BAAqB,GAAE,CAAC;IACvB,sBAAoB,CAAC,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;IACpD,aAAO,CAAC,CAAC,CAAC,IAAA,kDAAkC,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAA,gDAAgC,EAAC,aAAa,CAAC,CAAC;AAChH,CAAC;AAED,eAAe,CAAC,QAAQ,GAAG,KAAK,CAAC;AAEpB,QAAA,cAAc,GAAG,eAAe,CAAC","file":"register-circle.js","sourcesContent":["import { getLegacyBindingContext } from '@visactor/vrender-core/legacy/bootstrap';\nimport { registerCircleGraphic } from '@visactor/vrender-core/register/graphic';\nimport { circleModule } from '@visactor/vrender-core/graphic/modules';\nimport { browser } from './env';\nimport { bindCircleCanvasPickerContribution } from '../picker/contributions/canvas-picker/circle-module';\nimport { bindCircleMathPickerContribution } from '../picker/contributions/math-picker/circle-module';\n\nfunction _registerCircle() {\n if (_registerCircle.__loaded) {\n return;\n }\n _registerCircle.__loaded = true;\n const legacyContext = getLegacyBindingContext();\n registerCircleGraphic();\n (circleModule as any)({ bind: legacyContext.bind });\n browser ? bindCircleCanvasPickerContribution(legacyContext) : bindCircleMathPickerContribution(legacyContext);\n}\n\n_registerCircle.__loaded = false;\n\nexport const registerCircle = _registerCircle;\n"]}