k-vtable 1.0.37 → 1.0.38

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 (171) hide show
  1. package/cjs/ListTable.d.ts +2 -1
  2. package/cjs/ListTable.js +31 -10
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/body-helper/body-helper.d.ts +1 -0
  5. package/cjs/body-helper/body-helper.js +4 -3
  6. package/cjs/body-helper/body-helper.js.map +1 -1
  7. package/cjs/body-helper/style.js +2 -1
  8. package/cjs/components/legend/discrete-legend/discrete-legend.d.ts +1 -1
  9. package/cjs/core/BaseTable.d.ts +1 -0
  10. package/cjs/core/BaseTable.js +28 -22
  11. package/cjs/core/BaseTable.js.map +1 -1
  12. package/cjs/core/row-series-number-helper.d.ts +1 -0
  13. package/cjs/core/row-series-number-helper.js +3 -1
  14. package/cjs/core/row-series-number-helper.js.map +1 -1
  15. package/cjs/data/CachedDataSource.js +5 -3
  16. package/cjs/data/CachedDataSource.js.map +1 -1
  17. package/cjs/data/DataSource.js +1 -2
  18. package/cjs/dataset/DataStatistics.js +2 -1
  19. package/cjs/header-helper/header-helper.d.ts +1 -0
  20. package/cjs/header-helper/header-helper.js +4 -3
  21. package/cjs/header-helper/header-helper.js.map +1 -1
  22. package/cjs/header-helper/style.js +2 -1
  23. package/cjs/index.d.ts +1 -1
  24. package/cjs/index.js +1 -1
  25. package/cjs/index.js.map +1 -1
  26. package/cjs/plugins/custom-cell-style.js +1 -1
  27. package/cjs/scenegraph/animation/appear.js +18 -3
  28. package/cjs/scenegraph/animation/appear.js.map +1 -1
  29. package/cjs/scenegraph/component/custom.js +3 -3
  30. package/cjs/scenegraph/component/custom.js.map +1 -1
  31. package/cjs/scenegraph/component/menu.js +4 -4
  32. package/cjs/scenegraph/component/menu.js.map +1 -1
  33. package/cjs/scenegraph/graphic/chart.d.ts +6 -1
  34. package/cjs/scenegraph/graphic/chart.js +38 -4
  35. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  36. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
  37. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  38. package/cjs/scenegraph/graphic/group.d.ts +3 -1
  39. package/cjs/scenegraph/graphic/group.js +21 -3
  40. package/cjs/scenegraph/graphic/group.js.map +1 -1
  41. package/cjs/scenegraph/group-creater/cell-helper.js +4 -3
  42. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  43. package/cjs/scenegraph/group-creater/cell-type/button-cell.js +2 -2
  44. package/cjs/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
  45. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +4 -4
  46. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  47. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
  48. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  49. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +3 -3
  50. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  51. package/cjs/scenegraph/group-creater/cell-type/radio-cell.js +2 -2
  52. package/cjs/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
  53. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -2
  54. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  55. package/cjs/scenegraph/group-creater/cell-type/switch-cell.js +2 -2
  56. package/cjs/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
  57. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -6
  58. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  59. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +101 -12
  60. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  61. package/cjs/scenegraph/group-creater/column-helper.js +4 -3
  62. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  63. package/cjs/scenegraph/layout/update-row.js +3 -3
  64. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  65. package/cjs/scenegraph/runtime-contributions.d.ts +2 -0
  66. package/cjs/scenegraph/runtime-contributions.js +28 -0
  67. package/cjs/scenegraph/runtime-contributions.js.map +1 -0
  68. package/cjs/scenegraph/scenegraph.d.ts +4 -1
  69. package/cjs/scenegraph/scenegraph.js +40 -16
  70. package/cjs/scenegraph/scenegraph.js.map +1 -1
  71. package/cjs/scenegraph/utils/text-icon-layout.d.ts +4 -0
  72. package/cjs/scenegraph/utils/text-icon-layout.js +23 -6
  73. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  74. package/cjs/scenegraph/utils/text-measure.js.map +1 -1
  75. package/cjs/ts-types/base-table.d.ts +7 -1
  76. package/cjs/ts-types/base-table.js.map +1 -1
  77. package/cjs/ts-types/table-engine.d.ts +1 -1
  78. package/cjs/ts-types/table-engine.js.map +1 -1
  79. package/cjs/vrender-app.d.ts +20 -0
  80. package/cjs/vrender-app.js +141 -0
  81. package/cjs/vrender-app.js.map +1 -0
  82. package/cjs/vrender.d.ts +17 -1
  83. package/cjs/vrender.js +36 -15
  84. package/cjs/vrender.js.map +1 -1
  85. package/dist/vtable.js +106132 -96965
  86. package/dist/vtable.min.js +1 -1
  87. package/es/ListTable.d.ts +2 -1
  88. package/es/ListTable.js +30 -9
  89. package/es/ListTable.js.map +1 -1
  90. package/es/body-helper/body-helper.d.ts +1 -0
  91. package/es/body-helper/body-helper.js +4 -3
  92. package/es/body-helper/body-helper.js.map +1 -1
  93. package/es/body-helper/style.js +2 -1
  94. package/es/components/legend/discrete-legend/discrete-legend.d.ts +1 -1
  95. package/es/core/BaseTable.d.ts +1 -0
  96. package/es/core/BaseTable.js +30 -24
  97. package/es/core/BaseTable.js.map +1 -1
  98. package/es/core/row-series-number-helper.d.ts +1 -0
  99. package/es/core/row-series-number-helper.js +3 -1
  100. package/es/core/row-series-number-helper.js.map +1 -1
  101. package/es/data/CachedDataSource.js +5 -3
  102. package/es/data/CachedDataSource.js.map +1 -1
  103. package/es/data/DataSource.js +1 -2
  104. package/es/dataset/DataStatistics.js +2 -1
  105. package/es/header-helper/header-helper.d.ts +1 -0
  106. package/es/header-helper/header-helper.js +4 -3
  107. package/es/header-helper/header-helper.js.map +1 -1
  108. package/es/header-helper/style.js +2 -1
  109. package/es/index.d.ts +1 -1
  110. package/es/index.js +1 -1
  111. package/es/index.js.map +1 -1
  112. package/es/plugins/custom-cell-style.js +1 -1
  113. package/es/scenegraph/animation/appear.js +18 -3
  114. package/es/scenegraph/animation/appear.js.map +1 -1
  115. package/es/scenegraph/component/custom.js +3 -3
  116. package/es/scenegraph/component/custom.js.map +1 -1
  117. package/es/scenegraph/component/menu.js +4 -4
  118. package/es/scenegraph/component/menu.js.map +1 -1
  119. package/es/scenegraph/graphic/chart.d.ts +6 -1
  120. package/es/scenegraph/graphic/chart.js +39 -3
  121. package/es/scenegraph/graphic/chart.js.map +1 -1
  122. package/es/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
  123. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  124. package/es/scenegraph/graphic/group.d.ts +3 -1
  125. package/es/scenegraph/graphic/group.js +21 -3
  126. package/es/scenegraph/graphic/group.js.map +1 -1
  127. package/es/scenegraph/group-creater/cell-helper.js +4 -3
  128. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  129. package/es/scenegraph/group-creater/cell-type/button-cell.js +2 -2
  130. package/es/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
  131. package/es/scenegraph/group-creater/cell-type/chart-cell.js +4 -4
  132. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  133. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
  134. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  135. package/es/scenegraph/group-creater/cell-type/image-cell.js +3 -3
  136. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  137. package/es/scenegraph/group-creater/cell-type/radio-cell.js +2 -2
  138. package/es/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
  139. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -2
  140. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  141. package/es/scenegraph/group-creater/cell-type/switch-cell.js +2 -2
  142. package/es/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
  143. package/es/scenegraph/group-creater/cell-type/text-cell.js +5 -5
  144. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  145. package/es/scenegraph/group-creater/cell-type/video-cell.js +99 -12
  146. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  147. package/es/scenegraph/group-creater/column-helper.js +4 -3
  148. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  149. package/es/scenegraph/layout/update-row.js +3 -3
  150. package/es/scenegraph/layout/update-row.js.map +1 -1
  151. package/es/scenegraph/runtime-contributions.d.ts +2 -0
  152. package/es/scenegraph/runtime-contributions.js +20 -0
  153. package/es/scenegraph/runtime-contributions.js.map +1 -0
  154. package/es/scenegraph/scenegraph.d.ts +4 -1
  155. package/es/scenegraph/scenegraph.js +42 -16
  156. package/es/scenegraph/scenegraph.js.map +1 -1
  157. package/es/scenegraph/utils/text-icon-layout.d.ts +4 -0
  158. package/es/scenegraph/utils/text-icon-layout.js +18 -2
  159. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  160. package/es/scenegraph/utils/text-measure.js.map +1 -1
  161. package/es/ts-types/base-table.d.ts +7 -1
  162. package/es/ts-types/base-table.js.map +1 -1
  163. package/es/ts-types/table-engine.d.ts +1 -1
  164. package/es/ts-types/table-engine.js.map +1 -1
  165. package/es/vrender-app.d.ts +20 -0
  166. package/es/vrender-app.js +161 -0
  167. package/es/vrender-app.js.map +1 -0
  168. package/es/vrender.d.ts +17 -1
  169. package/es/vrender.js +27 -8
  170. package/es/vrender.js.map +1 -1
  171. package/package.json +11 -10
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.createStageFromVRenderApp = void 0;
6
+
7
+ const shared_1 = require("@visactor/vrender/entries/shared"), vrender_components_1 = require("@visactor/vrender-components"), app_1 = require("@visactor/vrender-kits/installers/app"), browser_1 = require("@visactor/vrender-kits/env/browser"), feishu_1 = require("@visactor/vrender-kits/env/feishu"), harmony_1 = require("@visactor/vrender-kits/env/harmony"), lynx_1 = require("@visactor/vrender-kits/env/lynx"), node_1 = require("@visactor/vrender-kits/env/node"), taro_1 = require("@visactor/vrender-kits/env/taro"), tt_1 = require("@visactor/vrender-kits/env/tt"), wx_1 = require("@visactor/vrender-kits/env/wx"), vrender_core_1 = require("@visactor/vrender-core"), env_1 = require("./tools/env"), runtime_contributions_1 = require("./scenegraph/runtime-contributions"), envParamsKeyMap = new WeakMap;
8
+
9
+ let envParamsKeyId = 0;
10
+
11
+ const getVRenderAppEnv = mode => "desktop-browser" === mode ? "browser" : null != mode ? mode : "node" === env_1.Env.mode ? "node" : "browser", getEnvParamsKey = envParams => {
12
+ if (null == envParams) return "default";
13
+ if ("object" == typeof envParams || "function" == typeof envParams) {
14
+ const envParamsObject = envParams, existingKey = envParamsKeyMap.get(envParamsObject);
15
+ return null != existingKey ? `object:${existingKey}` : (envParamsKeyId += 1, envParamsKeyMap.set(envParamsObject, envParamsKeyId),
16
+ `object:${envParamsKeyId}`);
17
+ }
18
+ return `primitive:${String(envParams)}`;
19
+ }, getVRenderAppKey = (env, scope, envParams) => `${env}:${null != scope ? scope : "default"}:${getEnvParamsKey(envParams)}`, getForcedEnvParams = envParams => null == envParams || "object" != typeof envParams && "function" != typeof envParams ? {
20
+ force: !0
21
+ } : Object.assign(Object.create(envParams), {
22
+ force: !0
23
+ }), activateLegacyVGlobalEnv = (env, envParams) => {
24
+ switch (env) {
25
+ case "node":
26
+ (0, node_1.loadNodeEnv)();
27
+ break;
28
+
29
+ case "wx":
30
+ (0, wx_1.loadWxEnv)();
31
+ break;
32
+
33
+ case "lynx":
34
+ (0, lynx_1.loadLynxEnv)();
35
+ break;
36
+
37
+ case "harmony":
38
+ (0, harmony_1.loadHarmonyEnv)();
39
+ break;
40
+
41
+ case "taro":
42
+ (0, taro_1.loadTaroEnv)();
43
+ break;
44
+
45
+ case "feishu":
46
+ (0, feishu_1.loadFeishuEnv)();
47
+ break;
48
+
49
+ case "tt":
50
+ (0, tt_1.loadTTEnv)();
51
+ break;
52
+
53
+ default:
54
+ (0, browser_1.loadBrowserEnv)();
55
+ }
56
+ vrender_core_1.vglobal.setEnv(env, getForcedEnvParams(envParams));
57
+ }, activateSharedVRenderAppEnv = (app, env, envParams) => {
58
+ switch (env) {
59
+ case "node":
60
+ (0, app_1.installNodeEnvToApp)(app, envParams);
61
+ break;
62
+
63
+ case "wx":
64
+ (0, app_1.installWxEnvToApp)(app, envParams);
65
+ break;
66
+
67
+ case "lynx":
68
+ (0, app_1.installLynxEnvToApp)(app, envParams);
69
+ break;
70
+
71
+ case "harmony":
72
+ (0, app_1.installHarmonyEnvToApp)(app, envParams);
73
+ break;
74
+
75
+ case "taro":
76
+ (0, app_1.installTaroEnvToApp)(app, envParams);
77
+ break;
78
+
79
+ case "feishu":
80
+ (0, app_1.installFeishuEnvToApp)(app, envParams);
81
+ break;
82
+
83
+ case "tt":
84
+ (0, app_1.installTTEnvToApp)(app, envParams);
85
+ break;
86
+
87
+ default:
88
+ (0, app_1.installBrowserEnvToApp)(app, envParams);
89
+ }
90
+ activateLegacyVGlobalEnv(env, envParams), (0, vrender_components_1.installPoptipToApp)(app);
91
+ }, retainDefaultVRenderApp = (env, scope, envParams) => {
92
+ const key = getVRenderAppKey(env, scope, envParams), sharedOptions = Object.assign({
93
+ env: env,
94
+ key: key
95
+ }, null == envParams ? void 0 : {
96
+ envParams: envParams
97
+ }), handle = (0, shared_1.acquireSharedVRenderApp)(sharedOptions);
98
+ let released = !1;
99
+ return activateSharedVRenderAppEnv(handle.app, env, envParams), {
100
+ app: handle.app,
101
+ releaseAppRef: () => {
102
+ released || (released = !0, handle.release());
103
+ }
104
+ };
105
+ }, resolveVRenderApp = (options = {}) => {
106
+ return options.app ? {
107
+ app: options.app,
108
+ appOwned: !1,
109
+ releaseAppRef: () => {}
110
+ } : Object.assign(Object.assign({}, retainDefaultVRenderApp("desktop-browser" === (mode = options.mode) ? "browser" : null != mode ? mode : "node" === env_1.Env.mode ? "node" : "browser", options.scope, options.envParams)), {
111
+ appOwned: !0
112
+ });
113
+ var mode;
114
+ };
115
+
116
+ function createStageFromVRenderApp(params, options = {}) {
117
+ if (options.stage) return {
118
+ app: options.app,
119
+ stage: options.stage,
120
+ releaseAppRef: () => {},
121
+ stageOwned: !1,
122
+ appOwned: !1
123
+ };
124
+ const resolvedApp = resolveVRenderApp(options);
125
+ try {
126
+ (0, runtime_contributions_1.installVTableRuntimeContributions)(resolvedApp.app);
127
+ const stage = resolvedApp.app.createStage(params);
128
+ return {
129
+ app: resolvedApp.app,
130
+ stage: stage,
131
+ releaseAppRef: resolvedApp.releaseAppRef,
132
+ stageOwned: !0,
133
+ appOwned: resolvedApp.appOwned
134
+ };
135
+ } catch (error) {
136
+ throw resolvedApp.releaseAppRef(), error;
137
+ }
138
+ }
139
+
140
+ exports.createStageFromVRenderApp = createStageFromVRenderApp;
141
+ //# sourceMappingURL=vrender-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/vrender-app.ts"],"names":[],"mappings":";;;AAAA,6DAA2E;AAC3E,qEAAkE;AAClE,+DAS+C;AAC/C,gEAAoE;AACpE,8DAAkE;AAClE,gEAAoE;AACpE,0DAA8D;AAC9D,0DAA8D;AAC9D,0DAA8D;AAC9D,sDAA0D;AAC1D,sDAA0D;AAE1D,yDAAiD;AAEjD,qCAAkC;AAClC,8EAAuF;AAqBvF,MAAM,eAAe,GAAG,IAAI,OAAO,EAAkB,CAAC;AACtD,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB,MAAM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entries/shared';\nimport { installPoptipToApp } from '@visactor/vrender-components';\nimport {\n installBrowserEnvToApp,\n installFeishuEnvToApp,\n installHarmonyEnvToApp,\n installLynxEnvToApp,\n installNodeEnvToApp,\n installTaroEnvToApp,\n installTTEnvToApp,\n installWxEnvToApp\n} from '@visactor/vrender-kits/installers/app';\nimport { loadBrowserEnv } from '@visactor/vrender-kits/env/browser';\nimport { loadFeishuEnv } from '@visactor/vrender-kits/env/feishu';\nimport { loadHarmonyEnv } from '@visactor/vrender-kits/env/harmony';\nimport { loadLynxEnv } from '@visactor/vrender-kits/env/lynx';\nimport { loadNodeEnv } from '@visactor/vrender-kits/env/node';\nimport { loadTaroEnv } from '@visactor/vrender-kits/env/taro';\nimport { loadTTEnv } from '@visactor/vrender-kits/env/tt';\nimport { loadWxEnv } from '@visactor/vrender-kits/env/wx';\nimport type { TVRenderSharedAppEnv, TVRenderSharedAppOptions } from '@visactor/vrender/entries/shared';\nimport { vglobal } from '@visactor/vrender-core';\nimport type { IApp, IEnvParamsMap, IStage, IStageParams } from '@visactor/vrender-core';\nimport { Env } from './tools/env';\nimport { installVTableRuntimeContributions } from './scenegraph/runtime-contributions';\n\ntype VRenderAppEnv = TVRenderSharedAppEnv;\ntype VRenderStageMode = VRenderAppEnv | 'desktop-browser';\n\nexport type VRenderStageAppOptions = {\n mode?: VRenderStageMode;\n scope?: string;\n app?: IApp;\n stage?: IStage;\n envParams?: IEnvParamsMap[VRenderAppEnv];\n};\n\nexport type VRenderStageAppRef = {\n app?: IApp;\n stage: IStage;\n releaseAppRef: () => void;\n stageOwned: boolean;\n appOwned: boolean;\n};\n\nconst envParamsKeyMap = new WeakMap<object, number>();\nlet envParamsKeyId = 0;\n\nconst getVRenderAppEnv = (mode?: VRenderStageMode): VRenderAppEnv => {\n if (mode === 'desktop-browser') {\n return 'browser';\n }\n\n return mode ?? (Env.mode === 'node' ? 'node' : 'browser');\n};\n\nconst getEnvParamsKey = (envParams?: IEnvParamsMap[VRenderAppEnv]): string => {\n if (envParams == null) {\n return 'default';\n }\n\n if (typeof envParams === 'object' || typeof envParams === 'function') {\n const envParamsObject = envParams as object;\n const existingKey = envParamsKeyMap.get(envParamsObject);\n\n if (existingKey != null) {\n return `object:${existingKey}`;\n }\n\n envParamsKeyId += 1;\n envParamsKeyMap.set(envParamsObject, envParamsKeyId);\n return `object:${envParamsKeyId}`;\n }\n\n return `primitive:${String(envParams)}`;\n};\n\nconst getVRenderAppKey = (env: VRenderAppEnv, scope?: string, envParams?: IEnvParamsMap[VRenderAppEnv]): string =>\n `${env}:${scope ?? 'default'}:${getEnvParamsKey(envParams)}`;\n\nconst getForcedEnvParams = (\n envParams?: IEnvParamsMap[VRenderAppEnv]\n): IEnvParamsMap[VRenderAppEnv] & { force: true } => {\n if (envParams != null && (typeof envParams === 'object' || typeof envParams === 'function')) {\n return Object.assign(Object.create(envParams as object), { force: true });\n }\n\n return { force: true } as IEnvParamsMap[VRenderAppEnv] & { force: true };\n};\n\nconst activateLegacyVGlobalEnv = (env: VRenderAppEnv, envParams?: IEnvParamsMap[VRenderAppEnv]): void => {\n switch (env) {\n case 'node':\n loadNodeEnv();\n break;\n case 'wx':\n loadWxEnv();\n break;\n case 'lynx':\n loadLynxEnv();\n break;\n case 'harmony':\n loadHarmonyEnv();\n break;\n case 'taro':\n loadTaroEnv();\n break;\n case 'feishu':\n loadFeishuEnv();\n break;\n case 'tt':\n loadTTEnv();\n break;\n case 'browser':\n default:\n loadBrowserEnv();\n break;\n }\n\n vglobal.setEnv(env, getForcedEnvParams(envParams));\n};\n\nconst activateSharedVRenderAppEnv = (app: IApp, env: VRenderAppEnv, envParams?: IEnvParamsMap[VRenderAppEnv]): void => {\n switch (env) {\n case 'node':\n installNodeEnvToApp(app, envParams as IEnvParamsMap['node']);\n break;\n case 'wx':\n installWxEnvToApp(app, envParams as IEnvParamsMap['wx']);\n break;\n case 'lynx':\n installLynxEnvToApp(app, envParams as IEnvParamsMap['lynx']);\n break;\n case 'harmony':\n installHarmonyEnvToApp(app, envParams as IEnvParamsMap['harmony']);\n break;\n case 'taro':\n installTaroEnvToApp(app, envParams as IEnvParamsMap['taro']);\n break;\n case 'feishu':\n installFeishuEnvToApp(app, envParams as IEnvParamsMap['feishu']);\n break;\n case 'tt':\n installTTEnvToApp(app, envParams as IEnvParamsMap['tt']);\n break;\n case 'browser':\n default:\n installBrowserEnvToApp(app, envParams as IEnvParamsMap['browser']);\n break;\n }\n\n activateLegacyVGlobalEnv(env, envParams);\n installPoptipToApp(app);\n};\n\nconst retainDefaultVRenderApp = (env: VRenderAppEnv, scope?: string, envParams?: IEnvParamsMap[VRenderAppEnv]) => {\n const key = getVRenderAppKey(env, scope, envParams);\n const sharedOptions = {\n env,\n key,\n ...(envParams == null ? undefined : { envParams })\n } as TVRenderSharedAppOptions<VRenderAppEnv>;\n const handle = acquireSharedVRenderApp(sharedOptions);\n let released = false;\n\n activateSharedVRenderAppEnv(handle.app, env, envParams);\n\n return {\n app: handle.app,\n releaseAppRef: () => {\n if (released) {\n return;\n }\n released = true;\n handle.release();\n }\n };\n};\n\nconst resolveVRenderApp = (options: VRenderStageAppOptions = {}) => {\n if (options.app) {\n return {\n app: options.app,\n appOwned: false,\n releaseAppRef: (): void => undefined\n };\n }\n\n return {\n ...retainDefaultVRenderApp(getVRenderAppEnv(options.mode), options.scope, options.envParams),\n appOwned: true\n };\n};\n\nexport function createStageFromVRenderApp(\n params: Partial<IStageParams>,\n options: VRenderStageAppOptions = {}\n): VRenderStageAppRef {\n if (options.stage) {\n return {\n app: options.app,\n stage: options.stage,\n releaseAppRef: (): void => undefined,\n stageOwned: false,\n appOwned: false\n };\n }\n\n const resolvedApp = resolveVRenderApp(options);\n\n try {\n installVTableRuntimeContributions(resolvedApp.app);\n const stage = resolvedApp.app.createStage(params);\n\n return {\n app: resolvedApp.app,\n stage,\n releaseAppRef: resolvedApp.releaseAppRef,\n stageOwned: true,\n appOwned: resolvedApp.appOwned\n };\n } catch (error) {\n resolvedApp.releaseAppRef();\n throw error;\n }\n}\n"]}
package/cjs/vrender.d.ts CHANGED
@@ -1,7 +1,23 @@
1
- import '@visactor/vrender-core';
1
+ import { type ILegacyBindingContext, type ServiceIdentifier } from '@visactor/vrender-core';
2
2
  export declare function registerForVrender(): void;
3
+ type LegacyBind = ILegacyBindingContext['bind'];
4
+ type LegacyRebind = ILegacyBindingContext['rebind'];
5
+ type LegacyIsBound = ILegacyBindingContext['isBound'];
6
+ type LegacyContainerModuleHandler = (bind: LegacyBind, unbind: (serviceIdentifier: ServiceIdentifier<unknown>) => void, isBound: LegacyIsBound, rebind: LegacyRebind) => void;
7
+ export declare class ContainerModule {
8
+ readonly registry: LegacyContainerModuleHandler;
9
+ constructor(registry: LegacyContainerModuleHandler);
10
+ }
11
+ export declare const container: ILegacyBindingContext & {
12
+ load(module: ContainerModule | ((context: ILegacyBindingContext) => void)): void;
13
+ get<T>(serviceIdentifier: unknown): T;
14
+ };
15
+ export declare const injectable: () => <T>(target: T) => T;
16
+ export declare const inject: (_serviceIdentifier: unknown) => (..._args: unknown[]) => void;
17
+ export declare const named: (_name: unknown) => (..._args: unknown[]) => void;
3
18
  export type { Direction } from '@visactor/vrender-core';
4
19
  export type { State } from '@visactor/vrender-components';
20
+ export type { VRenderStageAppOptions, VRenderStageAppRef } from './vrender-app';
5
21
  export * from '@visactor/vrender-core';
6
22
  export * from '@visactor/vrender-kits';
7
23
  export * from '@visactor/vrender-components';
package/cjs/vrender.js CHANGED
@@ -17,28 +17,49 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
17
17
 
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
- }), exports.registerForVrender = void 0;
20
+ }), exports.named = exports.inject = exports.injectable = exports.container = exports.ContainerModule = exports.registerForVrender = void 0;
21
21
 
22
- const vrender_components_1 = require("@visactor/vrender-components");
23
-
24
- require("@visactor/vrender-core");
25
-
26
- const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits");
22
+ const vrender_components_1 = require("@visactor/vrender-components"), runtime_installer_1 = require("@visactor/vrender-core/entries/runtime-installer"), vrender_core_1 = require("@visactor/vrender-core");
27
23
 
28
24
  let registed = !1;
29
25
 
30
26
  function registerForVrender() {
31
- registed || (registed = !0, (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
32
- vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
33
- vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_1.registerArc)(),
34
- (0, vrender_kits_1.registerCircle)(), (0, vrender_kits_1.registerGroup)(), (0, vrender_kits_1.registerImage)(),
35
- (0, vrender_kits_1.registerLine)(), (0, vrender_kits_1.registerRect)(), (0, vrender_kits_1.registerRichtext)(),
36
- (0, vrender_kits_1.registerShadowRoot)(), (0, vrender_kits_1.registerSymbol)(),
37
- (0, vrender_kits_1.registerText)(), (0, vrender_core_1.registerFlexLayoutPlugin)(),
38
- (0, vrender_components_1.loadPoptip)(), (0, vrender_core_1.registerFlexLayoutPlugin)());
27
+ registed || (registed = !0, (0, vrender_components_1.loadPoptip)());
39
28
  }
40
29
 
41
- exports.registerForVrender = registerForVrender, __exportStar(require("@visactor/vrender-core"), exports),
30
+ exports.registerForVrender = registerForVrender;
31
+
32
+ class ContainerModule {
33
+ constructor(registry) {
34
+ this.registry = registry;
35
+ }
36
+ }
37
+
38
+ exports.ContainerModule = ContainerModule;
39
+
40
+ const unbindLegacyService = () => {};
41
+
42
+ exports.container = Object.assign(vrender_core_1.container, {
43
+ load(module) {
44
+ const runtimeInstallerContext = (0, runtime_installer_1.getRuntimeInstallerBindingContext)();
45
+ if (module instanceof ContainerModule) return module.registry(vrender_core_1.container.bind, unbindLegacyService, vrender_core_1.container.isBound, vrender_core_1.container.rebind),
46
+ void module.registry(runtimeInstallerContext.bind, unbindLegacyService, runtimeInstallerContext.isBound, runtimeInstallerContext.rebind);
47
+ module(vrender_core_1.container), module(runtimeInstallerContext);
48
+ },
49
+ get: serviceIdentifier => vrender_core_1.container.getAll(serviceIdentifier)[0]
50
+ });
51
+
52
+ const injectable = () => target => target;
53
+
54
+ exports.injectable = injectable;
55
+
56
+ const inject = _serviceIdentifier => (..._args) => {};
57
+
58
+ exports.inject = inject;
59
+
60
+ const named = _name => (..._args) => {};
61
+
62
+ exports.named = named, __exportStar(require("@visactor/vrender-core"), exports),
42
63
  __exportStar(require("@visactor/vrender-kits"), exports), __exportStar(require("@visactor/vrender-components"), exports),
43
64
  __exportStar(require("@visactor/vrender-animate"), exports);
44
65
  //# sourceMappingURL=vrender.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,kCAAgC;AAChC,yDAAwH;AACxH,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IAGd,IAAA,6BAAc,GAAE,CAAC;IAEjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IAIf,IAAA,2BAAY,GAAE,CAAC;IAEf,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,uCAAwB,GAAE,CAAC;IAE3B,IAAA,+BAAU,GAAE,CAAC;IAEb,IAAA,uCAAwB,GAAE,CAAC;AAC7B,CAAC;AAnCD,gDAmCC;AAOD,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.0.37\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n // registerArc3d();\n // registerArea();\n registerCircle();\n // registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n // registerPath();\n // registerPolygon();\n // registerPyramid3d();\n registerRect();\n // registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerFlexLayoutPlugin();\n // registerWrapText();\n loadPoptip();\n\n registerFlexLayoutPlugin();\n}\n\nexport type { Direction } from '@visactor/vrender-core';\nexport type { State } from '@visactor/vrender-components';\n// export { GroupFadeIn } from '@visactor/vrender-core';\n// export { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\nexport * from '@visactor/vrender-animate';\n"]}
1
+ {"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qE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AG,KAAgB,EAAQ,EAAE,CAC5B,SAAS,CAAC;AAHD,QAAA,MAAM,UAGL;AAEP,MAAM,KAAK,GAChB,CAAC,KAAc,EAAE,EAAE,CACnB,CAAC,GAAG,KAAgB,EAAQ,EAAE,CAC5B,SAAS,CAAC;AAHD,QAAA,KAAK,SAGJ;AAQd,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport { getRuntimeInstallerBindingContext } from '@visactor/vrender-core/entries/runtime-installer';\nimport {\n container as legacyContainer,\n type ILegacyBindingContext,\n type ServiceIdentifier\n} from '@visactor/vrender-core';\n// 导出版本号\n// export const version = \"1.0.38\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // Default env and graphic bootstrap is owned by create*VRenderApp().\n // VTable keeps only component/custom assembly that is not covered by the app creator.\n loadPoptip();\n}\n\ntype LegacyBind = ILegacyBindingContext['bind'];\ntype LegacyRebind = ILegacyBindingContext['rebind'];\ntype LegacyIsBound = ILegacyBindingContext['isBound'];\ntype LegacyContainerModuleHandler = (\n bind: LegacyBind,\n unbind: (serviceIdentifier: ServiceIdentifier<unknown>) => void,\n isBound: LegacyIsBound,\n rebind: LegacyRebind\n) => void;\n\nexport class ContainerModule {\n constructor(public readonly registry: LegacyContainerModuleHandler) {}\n}\n\nconst unbindLegacyService = (): void => undefined;\n\nexport const container = Object.assign(legacyContainer, {\n load(module: ContainerModule | ((context: ILegacyBindingContext) => void)): void {\n const runtimeInstallerContext = getRuntimeInstallerBindingContext();\n\n if (module instanceof ContainerModule) {\n module.registry(legacyContainer.bind, unbindLegacyService, legacyContainer.isBound, legacyContainer.rebind);\n module.registry(\n runtimeInstallerContext.bind,\n unbindLegacyService,\n runtimeInstallerContext.isBound,\n runtimeInstallerContext.rebind\n );\n return;\n }\n\n module(legacyContainer);\n module(runtimeInstallerContext);\n },\n get<T>(serviceIdentifier: unknown): T {\n return legacyContainer.getAll<T>(serviceIdentifier as never)[0];\n }\n});\n\nexport const injectable =\n () =>\n <T>(target: T): T =>\n target;\n\nexport const inject =\n (_serviceIdentifier: unknown) =>\n (..._args: unknown[]): void =>\n undefined;\n\nexport const named =\n (_name: unknown) =>\n (..._args: unknown[]): void =>\n undefined;\n\nexport type { Direction } from '@visactor/vrender-core';\nexport type { State } from '@visactor/vrender-components';\nexport type { VRenderStageAppOptions, VRenderStageAppRef } from './vrender-app';\n// export { GroupFadeIn } from '@visactor/vrender-core';\n// export { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\nexport * from '@visactor/vrender-animate';\n"]}