@midscene/visualizer 1.0.1-beta-20251212055914.0 → 1.0.1-beta-20251215101919.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.
- package/dist/es/component/playground/index.css +10 -0
- package/dist/es/component/playground-result/index.css +10 -0
- package/dist/es/component/shiny-text/index.css +15 -0
- package/dist/es/utils/replay-scripts.mjs +21 -4
- package/dist/lib/component/playground/index.css +10 -0
- package/dist/lib/component/playground-result/index.css +10 -0
- package/dist/lib/component/shiny-text/index.css +15 -0
- package/dist/lib/utils/replay-scripts.js +21 -4
- package/dist/types/utils/replay-scripts.d.ts +1 -1
- package/package.json +5 -5
|
@@ -32,6 +32,16 @@
|
|
|
32
32
|
overflow: scroll;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
[data-theme="dark"] .result-wrapper .loading-container .loading-progress-text {
|
|
36
|
+
color: rgba(255, 255, 255, .45);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-theme="dark"] .result-wrapper pre {
|
|
40
|
+
color: #f8fafd;
|
|
41
|
+
background: rgba(255, 255, 255, .08);
|
|
42
|
+
border: 1px solid rgba(255, 255, 255, .12);
|
|
43
|
+
}
|
|
44
|
+
|
|
35
45
|
.prompt-input-wrapper {
|
|
36
46
|
width: 100%;
|
|
37
47
|
}
|
|
@@ -32,3 +32,13 @@
|
|
|
32
32
|
overflow: scroll;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
[data-theme="dark"] .result-wrapper .loading-container .loading-progress-text {
|
|
36
|
+
color: rgba(255, 255, 255, .45);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-theme="dark"] .result-wrapper pre {
|
|
40
|
+
color: #f8fafd;
|
|
41
|
+
background: rgba(255, 255, 255, .08);
|
|
42
|
+
border: 1px solid rgba(255, 255, 255, .12);
|
|
43
|
+
}
|
|
44
|
+
|
|
@@ -56,6 +56,21 @@
|
|
|
56
56
|
display: none;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
[data-theme="dark"] .shiny-text {
|
|
60
|
+
color: rgba(0, 0, 0, 0);
|
|
61
|
+
-webkit-text-fill-color: transparent;
|
|
62
|
+
text-shadow: none;
|
|
63
|
+
background-image: linear-gradient(45deg, #a78bfa, #c084fc, #e879f9, #c084fc);
|
|
64
|
+
background-size: 300%;
|
|
65
|
+
-webkit-background-clip: text;
|
|
66
|
+
background-clip: text;
|
|
67
|
+
animation: 8s infinite textGradient;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
[data-theme="dark"] .shiny-text:after {
|
|
71
|
+
background: linear-gradient(90deg, rgba(197, 184, 255, 0) 0%, rgba(197, 184, 255, .05) 10%, rgba(197, 184, 255, .15) 50%, rgba(197, 184, 255, .05) 90%, rgba(197, 184, 255, 0) 100%);
|
|
72
|
+
}
|
|
73
|
+
|
|
59
74
|
@keyframes shine {
|
|
60
75
|
0% {
|
|
61
76
|
opacity: .7;
|
|
@@ -80,12 +80,28 @@ const mergeTwoCameraState = (cameraState1, cameraState2)=>{
|
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
82
|
const allScriptsFromDump = (dump)=>{
|
|
83
|
+
var _normalizedDump_executions, _normalizedDump_executions1, _normalizedDump_modelBriefs;
|
|
84
|
+
if (!dump) {
|
|
85
|
+
console.warn('[allScriptsFromDump] dump is empty');
|
|
86
|
+
return {
|
|
87
|
+
scripts: [],
|
|
88
|
+
modelBriefs: []
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
const normalizedDump = Array.isArray(dump.executions) ? dump : {
|
|
92
|
+
sdkVersion: '',
|
|
93
|
+
groupName: 'Execution',
|
|
94
|
+
modelBriefs: [],
|
|
95
|
+
executions: [
|
|
96
|
+
dump
|
|
97
|
+
]
|
|
98
|
+
};
|
|
83
99
|
const dimensionsSet = new Set();
|
|
84
100
|
let firstWidth;
|
|
85
101
|
let firstHeight;
|
|
86
|
-
const sdkVersion =
|
|
102
|
+
const sdkVersion = normalizedDump.sdkVersion;
|
|
87
103
|
const modelBriefsSet = new Set();
|
|
88
|
-
|
|
104
|
+
null == (_normalizedDump_executions = normalizedDump.executions) || _normalizedDump_executions.filter(Boolean).forEach((execution)=>{
|
|
89
105
|
execution.tasks.forEach((task)=>{
|
|
90
106
|
var _task_uiContext_size, _task_uiContext;
|
|
91
107
|
if (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_size = _task_uiContext.size) ? void 0 : _task_uiContext_size.width) {
|
|
@@ -108,7 +124,7 @@ const allScriptsFromDump = (dump)=>{
|
|
|
108
124
|
};
|
|
109
125
|
}
|
|
110
126
|
const allScripts = [];
|
|
111
|
-
|
|
127
|
+
null == (_normalizedDump_executions1 = normalizedDump.executions) || _normalizedDump_executions1.filter(Boolean).forEach((execution)=>{
|
|
112
128
|
const scripts = generateAnimationScripts(execution, -1, firstWidth, firstHeight);
|
|
113
129
|
if (scripts) allScripts.push(...scripts);
|
|
114
130
|
execution.tasks.forEach((task)=>{
|
|
@@ -122,9 +138,10 @@ const allScriptsFromDump = (dump)=>{
|
|
|
122
138
|
if (index !== allScripts.length - 1 && 'Done' === script.title) return false;
|
|
123
139
|
return true;
|
|
124
140
|
});
|
|
141
|
+
const normalizedModelBriefs = (null == (_normalizedDump_modelBriefs = normalizedDump.modelBriefs) ? void 0 : _normalizedDump_modelBriefs.length) ? normalizedDump.modelBriefs : [];
|
|
125
142
|
const modelBriefs = (()=>{
|
|
126
143
|
var _list_;
|
|
127
|
-
const list = [
|
|
144
|
+
const list = normalizedModelBriefs.length ? normalizedModelBriefs : [
|
|
128
145
|
...modelBriefsSet
|
|
129
146
|
];
|
|
130
147
|
if (!list.length) return list;
|
|
@@ -32,6 +32,16 @@
|
|
|
32
32
|
overflow: scroll;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
[data-theme="dark"] .result-wrapper .loading-container .loading-progress-text {
|
|
36
|
+
color: rgba(255, 255, 255, .45);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-theme="dark"] .result-wrapper pre {
|
|
40
|
+
color: #f8fafd;
|
|
41
|
+
background: rgba(255, 255, 255, .08);
|
|
42
|
+
border: 1px solid rgba(255, 255, 255, .12);
|
|
43
|
+
}
|
|
44
|
+
|
|
35
45
|
.prompt-input-wrapper {
|
|
36
46
|
width: 100%;
|
|
37
47
|
}
|
|
@@ -32,3 +32,13 @@
|
|
|
32
32
|
overflow: scroll;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
[data-theme="dark"] .result-wrapper .loading-container .loading-progress-text {
|
|
36
|
+
color: rgba(255, 255, 255, .45);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
[data-theme="dark"] .result-wrapper pre {
|
|
40
|
+
color: #f8fafd;
|
|
41
|
+
background: rgba(255, 255, 255, .08);
|
|
42
|
+
border: 1px solid rgba(255, 255, 255, .12);
|
|
43
|
+
}
|
|
44
|
+
|
|
@@ -56,6 +56,21 @@
|
|
|
56
56
|
display: none;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
[data-theme="dark"] .shiny-text {
|
|
60
|
+
color: rgba(0, 0, 0, 0);
|
|
61
|
+
-webkit-text-fill-color: transparent;
|
|
62
|
+
text-shadow: none;
|
|
63
|
+
background-image: linear-gradient(45deg, #a78bfa, #c084fc, #e879f9, #c084fc);
|
|
64
|
+
background-size: 300%;
|
|
65
|
+
-webkit-background-clip: text;
|
|
66
|
+
background-clip: text;
|
|
67
|
+
animation: 8s infinite textGradient;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
[data-theme="dark"] .shiny-text:after {
|
|
71
|
+
background: linear-gradient(90deg, rgba(197, 184, 255, 0) 0%, rgba(197, 184, 255, .05) 10%, rgba(197, 184, 255, .15) 50%, rgba(197, 184, 255, .05) 90%, rgba(197, 184, 255, 0) 100%);
|
|
72
|
+
}
|
|
73
|
+
|
|
59
74
|
@keyframes shine {
|
|
60
75
|
0% {
|
|
61
76
|
opacity: .7;
|
|
@@ -111,12 +111,28 @@ const mergeTwoCameraState = (cameraState1, cameraState2)=>{
|
|
|
111
111
|
};
|
|
112
112
|
};
|
|
113
113
|
const allScriptsFromDump = (dump)=>{
|
|
114
|
+
var _normalizedDump_executions, _normalizedDump_executions1, _normalizedDump_modelBriefs;
|
|
115
|
+
if (!dump) {
|
|
116
|
+
console.warn('[allScriptsFromDump] dump is empty');
|
|
117
|
+
return {
|
|
118
|
+
scripts: [],
|
|
119
|
+
modelBriefs: []
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const normalizedDump = Array.isArray(dump.executions) ? dump : {
|
|
123
|
+
sdkVersion: '',
|
|
124
|
+
groupName: 'Execution',
|
|
125
|
+
modelBriefs: [],
|
|
126
|
+
executions: [
|
|
127
|
+
dump
|
|
128
|
+
]
|
|
129
|
+
};
|
|
114
130
|
const dimensionsSet = new Set();
|
|
115
131
|
let firstWidth;
|
|
116
132
|
let firstHeight;
|
|
117
|
-
const sdkVersion =
|
|
133
|
+
const sdkVersion = normalizedDump.sdkVersion;
|
|
118
134
|
const modelBriefsSet = new Set();
|
|
119
|
-
|
|
135
|
+
null == (_normalizedDump_executions = normalizedDump.executions) || _normalizedDump_executions.filter(Boolean).forEach((execution)=>{
|
|
120
136
|
execution.tasks.forEach((task)=>{
|
|
121
137
|
var _task_uiContext_size, _task_uiContext;
|
|
122
138
|
if (null == (_task_uiContext = task.uiContext) ? void 0 : null == (_task_uiContext_size = _task_uiContext.size) ? void 0 : _task_uiContext_size.width) {
|
|
@@ -139,7 +155,7 @@ const allScriptsFromDump = (dump)=>{
|
|
|
139
155
|
};
|
|
140
156
|
}
|
|
141
157
|
const allScripts = [];
|
|
142
|
-
|
|
158
|
+
null == (_normalizedDump_executions1 = normalizedDump.executions) || _normalizedDump_executions1.filter(Boolean).forEach((execution)=>{
|
|
143
159
|
const scripts = generateAnimationScripts(execution, -1, firstWidth, firstHeight);
|
|
144
160
|
if (scripts) allScripts.push(...scripts);
|
|
145
161
|
execution.tasks.forEach((task)=>{
|
|
@@ -153,9 +169,10 @@ const allScriptsFromDump = (dump)=>{
|
|
|
153
169
|
if (index !== allScripts.length - 1 && 'Done' === script.title) return false;
|
|
154
170
|
return true;
|
|
155
171
|
});
|
|
172
|
+
const normalizedModelBriefs = (null == (_normalizedDump_modelBriefs = normalizedDump.modelBriefs) ? void 0 : _normalizedDump_modelBriefs.length) ? normalizedDump.modelBriefs : [];
|
|
156
173
|
const modelBriefs = (()=>{
|
|
157
174
|
var _list_;
|
|
158
|
-
const list = [
|
|
175
|
+
const list = normalizedModelBriefs.length ? normalizedModelBriefs : [
|
|
159
176
|
...modelBriefsSet
|
|
160
177
|
];
|
|
161
178
|
if (!list.length) return list;
|
|
@@ -30,5 +30,5 @@ export interface ReplayScriptsInfo {
|
|
|
30
30
|
sdkVersion?: string;
|
|
31
31
|
modelBriefs: string[];
|
|
32
32
|
}
|
|
33
|
-
export declare const allScriptsFromDump: (dump: GroupedActionDump) => ReplayScriptsInfo | null;
|
|
33
|
+
export declare const allScriptsFromDump: (dump: GroupedActionDump | ExecutionDump | null | undefined) => ReplayScriptsInfo | null;
|
|
34
34
|
export declare const generateAnimationScripts: (execution: ExecutionDump | null, task: ExecutionTask | number, imageWidth: number, imageHeight: number) => AnimationScript[] | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/visualizer",
|
|
3
|
-
"version": "1.0.1-beta-
|
|
3
|
+
"version": "1.0.1-beta-20251215101919.0",
|
|
4
4
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
5
5
|
"homepage": "https://midscenejs.com/",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"antd": "^5.21.6",
|
|
61
61
|
"buffer": "6.0.3",
|
|
62
62
|
"dayjs": "^1.11.11",
|
|
63
|
-
"@midscene/core": "1.0.1-beta-
|
|
64
|
-
"@midscene/web": "1.0.1-beta-
|
|
65
|
-
"@midscene/playground": "1.0.1-beta-
|
|
66
|
-
"@midscene/shared": "1.0.1-beta-
|
|
63
|
+
"@midscene/core": "1.0.1-beta-20251215101919.0",
|
|
64
|
+
"@midscene/web": "1.0.1-beta-20251215101919.0",
|
|
65
|
+
"@midscene/playground": "1.0.1-beta-20251215101919.0",
|
|
66
|
+
"@midscene/shared": "1.0.1-beta-20251215101919.0"
|
|
67
67
|
},
|
|
68
68
|
"license": "MIT",
|
|
69
69
|
"scripts": {
|