k-vtable 1.0.37 → 1.0.39
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.
- package/cjs/ListTable.d.ts +2 -1
- package/cjs/ListTable.js +31 -10
- package/cjs/ListTable.js.map +1 -1
- package/cjs/body-helper/body-helper.d.ts +1 -0
- package/cjs/body-helper/body-helper.js +4 -3
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/body-helper/style.js +2 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.d.ts +1 -1
- package/cjs/core/BaseTable.d.ts +1 -0
- package/cjs/core/BaseTable.js +28 -22
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/row-series-number-helper.d.ts +1 -0
- package/cjs/core/row-series-number-helper.js +3 -1
- package/cjs/core/row-series-number-helper.js.map +1 -1
- package/cjs/data/CachedDataSource.js +5 -3
- package/cjs/data/CachedDataSource.js.map +1 -1
- package/cjs/data/DataSource.js +1 -2
- package/cjs/dataset/DataStatistics.js +2 -1
- package/cjs/header-helper/header-helper.d.ts +1 -0
- package/cjs/header-helper/header-helper.js +4 -3
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style.js +2 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/plugins/custom-cell-style.js +1 -1
- package/cjs/scenegraph/animation/appear.js +18 -3
- package/cjs/scenegraph/animation/appear.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +3 -3
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/menu.js +4 -4
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +6 -1
- package/cjs/scenegraph/graphic/chart.js +38 -4
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/group.d.ts +3 -1
- package/cjs/scenegraph/graphic/group.js +21 -3
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +4 -3
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/button-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +4 -4
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +3 -3
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/switch-cell.js +2 -2
- package/cjs/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -6
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +101 -12
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +4 -3
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +3 -3
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/runtime-contributions.d.ts +2 -0
- package/cjs/scenegraph/runtime-contributions.js +28 -0
- package/cjs/scenegraph/runtime-contributions.js.map +1 -0
- package/cjs/scenegraph/scenegraph.d.ts +4 -1
- package/cjs/scenegraph/scenegraph.js +40 -16
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.d.ts +4 -0
- package/cjs/scenegraph/utils/text-icon-layout.js +23 -6
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/scenegraph/utils/text-measure.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +7 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender-app.d.ts +20 -0
- package/cjs/vrender-app.js +141 -0
- package/cjs/vrender-app.js.map +1 -0
- package/cjs/vrender.d.ts +17 -1
- package/cjs/vrender.js +36 -15
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +106132 -96965
- package/dist/vtable.min.js +1 -1
- package/es/ListTable.d.ts +2 -1
- package/es/ListTable.js +30 -9
- package/es/ListTable.js.map +1 -1
- package/es/body-helper/body-helper.d.ts +1 -0
- package/es/body-helper/body-helper.js +4 -3
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/body-helper/style.js +2 -1
- package/es/components/legend/discrete-legend/discrete-legend.d.ts +1 -1
- package/es/core/BaseTable.d.ts +1 -0
- package/es/core/BaseTable.js +30 -24
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/row-series-number-helper.d.ts +1 -0
- package/es/core/row-series-number-helper.js +3 -1
- package/es/core/row-series-number-helper.js.map +1 -1
- package/es/data/CachedDataSource.js +5 -3
- package/es/data/CachedDataSource.js.map +1 -1
- package/es/data/DataSource.js +1 -2
- package/es/dataset/DataStatistics.js +2 -1
- package/es/header-helper/header-helper.d.ts +1 -0
- package/es/header-helper/header-helper.js +4 -3
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/header-helper/style.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/plugins/custom-cell-style.js +1 -1
- package/es/scenegraph/animation/appear.js +18 -3
- package/es/scenegraph/animation/appear.js.map +1 -1
- package/es/scenegraph/component/custom.js +3 -3
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/menu.js +4 -4
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +6 -1
- package/es/scenegraph/graphic/chart.js +39 -3
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/group.d.ts +3 -1
- package/es/scenegraph/graphic/group.js +21 -3
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +4 -3
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/button-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/button-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +4 -4
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +3 -3
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/radio-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/radio-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/switch-cell.js +2 -2
- package/es/scenegraph/group-creater/cell-type/switch-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +5 -5
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +99 -12
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +4 -3
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +3 -3
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/runtime-contributions.d.ts +2 -0
- package/es/scenegraph/runtime-contributions.js +20 -0
- package/es/scenegraph/runtime-contributions.js.map +1 -0
- package/es/scenegraph/scenegraph.d.ts +4 -1
- package/es/scenegraph/scenegraph.js +42 -16
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.d.ts +4 -0
- package/es/scenegraph/utils/text-icon-layout.js +18 -2
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/scenegraph/utils/text-measure.js.map +1 -1
- package/es/ts-types/base-table.d.ts +7 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +1 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender-app.d.ts +20 -0
- package/es/vrender-app.js +161 -0
- package/es/vrender-app.js.map +1 -0
- package/es/vrender.d.ts +17 -1
- package/es/vrender.js +27 -8
- package/es/vrender.js.map +1 -1
- package/package.json +8 -7
|
@@ -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,gBAAgB,GAAG,CAAC,IAAuB,EAAiB,EAAE;IAClE,IAAI,IAAI,KAAK,iBAAiB,EAAE;QAC9B,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC,SAAG,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,SAAwC,EAAU,EAAE;IAC3E,IAAI,SAAS,IAAI,IAAI,EAAE;QACrB,OAAO,SAAS,CAAC;KAClB;IAED,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE;QACpE,MAAM,eAAe,GAAG,SAAmB,CAAC;QAC5C,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAEzD,IAAI,WAAW,IAAI,IAAI,EAAE;YACvB,OAAO,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YACpC,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IAED,MAAM,WAAW,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAE/C,IAAI;QACF,IAAA,yDAAiC,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACnD,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAElD,OAAO;YACL,GAAG,EAAE,WAAW,CAAC,GAAG;YACpB,KAAK;YACL,aAAa,EAAE,WAAW,CAAC,aAAa;YACxC,UAAU,EAAE,IAAI;YAChB,QAAQ,EAAE,WAAW,CAAC,QAAQ;SAC/B,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,WAAW,CAAC,aAAa,EAAE,CAAC;QAC5B,MAAM,KAAK,CAAC;KACb;AACH,CAAC;AA/BD,8DA+BC","file":"vrender-app.js","sourcesContent":["import { acquireSharedVRenderApp } from '@visactor/vrender/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,
|
|
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
|
|
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
|
package/cjs/vrender.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,
|
|
1
|
+
{"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,wFAAqG;AACrG,yDAIgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAGhB,IAAA,+BAAU,GAAE,CAAC;AACf,CAAC;AARD,gDAQC;AAYD,MAAa,eAAe;IAC1B,YAA4B,QAAsC;QAAtC,aAAQ,GAAR,QAAQ,CAA8B;IAAG,CAAC;CACvE;AAFD,0CAEC;AAED,MAAM,mBAAmB,GAAG,GAAS,EAAE,CAAC,SAAS,CAAC;AAErC,QAAA,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,wBAAe,EAAE;IACtD,IAAI,CAAC,MAAoE;QACvE,MAAM,uBAAuB,GAAG,IAAA,qDAAiC,GAAE,CAAC;QAEpE,IAAI,MAAM,YAAY,eAAe,EAAE;YACrC,MAAM,CAAC,QAAQ,CAAC,wBAAe,CAAC,IAAI,EAAE,mBAAmB,EAAE,wBAAe,CAAC,OAAO,EAAE,wBAAe,CAAC,MAAM,CAAC,CAAC;YAC5G,MAAM,CAAC,QAAQ,CACb,uBAAuB,CAAC,IAAI,EAC5B,mBAAmB,EACnB,uBAAuB,CAAC,OAAO,EAC/B,uBAAuB,CAAC,MAAM,CAC/B,CAAC;YACF,OAAO;SACR;QAED,MAAM,CAAC,wBAAe,CAAC,CAAC;QACxB,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAClC,CAAC;IACD,GAAG,CAAI,iBAA0B;QAC/B,OAAO,wBAAe,CAAC,MAAM,CAAI,iBAA0B,CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC;CACF,CAAC,CAAC;AAEI,MAAM,UAAU,GACrB,GAAG,EAAE,CACL,CAAI,MAAS,EAAK,EAAE,CAClB,MAAM,CAAC;AAHE,QAAA,UAAU,cAGZ;AAEJ,MAAM,MAAM,GACjB,CAAC,kBAA2B,EAAE,EAAE,CAChC,CAAC,GAAG,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"]}
|