@midscene/visualizer 0.30.10 → 0.30.11-beta-20251218071621.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/blackboard/index.css +8 -0
- package/dist/es/component/blackboard/index.mjs +137 -68
- package/dist/es/component/config-selector/index.mjs +102 -4
- package/dist/es/component/context-preview/index.mjs +1 -2
- package/dist/es/component/env-config/index.mjs +1 -2
- package/dist/es/component/env-config-reminder/index.css +8 -0
- package/dist/es/component/env-config-reminder/index.mjs +1 -2
- package/dist/es/component/form-field/index.mjs +5 -10
- package/dist/es/component/history-selector/index.css +38 -1
- package/dist/es/component/history-selector/index.mjs +1 -2
- package/dist/es/component/logo/index.mjs +7 -3
- package/dist/es/component/misc/index.mjs +1 -4
- package/dist/es/component/nav-actions/index.mjs +1 -2
- package/dist/es/component/nav-actions/style.css +1 -1
- package/dist/es/component/player/index.css +26 -0
- package/dist/es/component/player/index.mjs +376 -364
- package/dist/es/component/playground/index.css +291 -31
- package/dist/es/component/playground-result/index.css +10 -0
- package/dist/es/component/playground-result/index.mjs +129 -10
- package/dist/es/component/prompt-input/index.css +281 -31
- package/dist/es/component/prompt-input/index.mjs +83 -25
- package/dist/es/component/screenshot-viewer/index.css +214 -0
- package/dist/es/component/screenshot-viewer/index.mjs +282 -0
- package/dist/es/component/service-mode-control/index.mjs +1 -2
- package/dist/es/component/shiny-text/index.css +35 -3
- package/dist/es/component/shiny-text/index.mjs +3 -3
- package/dist/es/component/universal-playground/index.css +61 -1
- package/dist/es/component/universal-playground/index.mjs +106 -83
- package/dist/es/component/universal-playground/providers/context-provider.mjs +56 -18
- package/dist/es/component/universal-playground/providers/indexeddb-storage-provider.mjs +213 -139
- package/dist/es/component/universal-playground/providers/storage-provider.mjs +199 -121
- package/dist/es/hooks/usePlaygroundExecution.mjs +297 -146
- package/dist/es/hooks/usePlaygroundState.mjs +141 -75
- package/dist/es/hooks/useSafeOverrideAIConfig.mjs +2 -6
- package/dist/es/hooks/useServerValid.mjs +37 -12
- package/dist/es/hooks/useTheme.mjs +25 -0
- package/dist/es/icons/avatar.mjs +46 -4
- package/dist/es/icons/close.mjs +46 -4
- package/dist/es/icons/global-perspective.mjs +47 -5
- package/dist/es/icons/history.mjs +48 -6
- package/dist/es/icons/magnifying-glass.mjs +47 -5
- package/dist/es/icons/player-setting.mjs +48 -6
- package/dist/es/icons/setting.mjs +47 -5
- package/dist/es/icons/show-marker.mjs +47 -5
- package/dist/es/index.mjs +4 -4
- package/dist/es/store/history.mjs +46 -7
- package/dist/es/store/store.mjs +68 -2
- package/dist/es/types.mjs +1 -1
- package/dist/es/utils/constants.mjs +7 -3
- package/dist/es/utils/index.mjs +4 -1
- package/dist/es/utils/pixi-loader.mjs +37 -11
- package/dist/es/utils/replay-scripts.mjs +160 -111
- package/dist/lib/component/blackboard/index.css +8 -0
- package/dist/lib/component/blackboard/index.js +139 -70
- package/dist/lib/component/config-selector/index.js +103 -5
- package/dist/lib/component/context-preview/index.js +3 -4
- package/dist/lib/component/env-config/index.js +3 -4
- package/dist/lib/component/env-config-reminder/index.css +8 -0
- package/dist/lib/component/env-config-reminder/index.js +3 -4
- package/dist/lib/component/form-field/index.js +10 -15
- package/dist/lib/component/history-selector/index.css +38 -1
- package/dist/lib/component/history-selector/index.js +3 -4
- package/dist/lib/component/index.js +6 -8
- package/dist/lib/component/logo/index.js +9 -5
- package/dist/lib/component/misc/index.js +6 -9
- package/dist/lib/component/nav-actions/index.js +3 -4
- package/dist/lib/component/nav-actions/style.css +1 -1
- package/dist/lib/component/player/index.css +26 -0
- package/dist/lib/component/player/index.js +376 -365
- package/dist/lib/component/playground/index.css +291 -31
- package/dist/lib/component/playground/index.js +31 -33
- package/dist/lib/component/playground-result/index.css +10 -0
- package/dist/lib/component/playground-result/index.js +131 -12
- package/dist/lib/component/prompt-input/index.css +281 -31
- package/dist/lib/component/prompt-input/index.js +84 -26
- package/dist/lib/component/screenshot-viewer/index.css +214 -0
- package/dist/lib/component/screenshot-viewer/index.js +316 -0
- package/dist/lib/component/service-mode-control/index.js +3 -4
- package/dist/lib/component/shiny-text/index.css +35 -3
- package/dist/lib/component/shiny-text/index.js +5 -5
- package/dist/lib/component/universal-playground/index.css +61 -1
- package/dist/lib/component/universal-playground/index.js +108 -84
- package/dist/lib/component/universal-playground/providers/context-provider.js +58 -20
- package/dist/lib/component/universal-playground/providers/indexeddb-storage-provider.js +217 -143
- package/dist/lib/component/universal-playground/providers/storage-provider.js +207 -129
- package/dist/lib/hooks/usePlaygroundExecution.js +299 -148
- package/dist/lib/hooks/usePlaygroundState.js +143 -77
- package/dist/lib/hooks/useSafeOverrideAIConfig.js +4 -8
- package/dist/lib/hooks/useServerValid.js +39 -14
- package/dist/lib/hooks/useTheme.js +59 -0
- package/dist/lib/icons/avatar.js +48 -6
- package/dist/lib/icons/close.js +48 -6
- package/dist/lib/icons/global-perspective.js +49 -7
- package/dist/lib/icons/history.js +50 -8
- package/dist/lib/icons/magnifying-glass.js +49 -7
- package/dist/lib/icons/player-setting.js +50 -8
- package/dist/lib/icons/setting.js +49 -7
- package/dist/lib/icons/show-marker.js +49 -7
- package/dist/lib/index.js +44 -34
- package/dist/lib/store/history.js +48 -9
- package/dist/lib/store/store.js +74 -8
- package/dist/lib/types.js +3 -3
- package/dist/lib/utils/color.js +2 -2
- package/dist/lib/utils/constants.js +20 -4
- package/dist/lib/utils/index.js +10 -4
- package/dist/lib/utils/pixi-loader.js +41 -15
- package/dist/lib/utils/playground-utils.js +4 -4
- package/dist/lib/utils/replay-scripts.js +164 -115
- package/dist/types/component/config-selector/index.d.ts +2 -0
- package/dist/types/component/player/index.d.ts +0 -1
- package/dist/types/component/playground-result/index.d.ts +1 -0
- package/dist/types/component/prompt-input/index.d.ts +2 -1
- package/dist/types/component/screenshot-viewer/index.d.ts +15 -0
- package/dist/types/hooks/usePlaygroundExecution.d.ts +1 -1
- package/dist/types/hooks/usePlaygroundState.d.ts +3 -3
- package/dist/types/hooks/useTheme.d.ts +7 -0
- package/dist/types/index.d.ts +3 -3
- package/dist/types/store/store.d.ts +18 -1
- package/dist/types/types.d.ts +14 -4
- package/dist/types/utils/constants.d.ts +5 -1
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/replay-scripts.d.ts +1 -1
- package/package.json +12 -22
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
default: ()=>ScreenshotViewer
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
const icons_namespaceObject = require("@ant-design/icons");
|
|
31
|
+
const external_antd_namespaceObject = require("antd");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
require("./index.css");
|
|
34
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
35
|
+
try {
|
|
36
|
+
var info = gen[key](arg);
|
|
37
|
+
var value = info.value;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
reject(error);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (info.done) resolve(value);
|
|
43
|
+
else Promise.resolve(value).then(_next, _throw);
|
|
44
|
+
}
|
|
45
|
+
function _async_to_generator(fn) {
|
|
46
|
+
return function() {
|
|
47
|
+
var self = this, args = arguments;
|
|
48
|
+
return new Promise(function(resolve, reject) {
|
|
49
|
+
var gen = fn.apply(self, args);
|
|
50
|
+
function _next(value) {
|
|
51
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
52
|
+
}
|
|
53
|
+
function _throw(err) {
|
|
54
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
55
|
+
}
|
|
56
|
+
_next(void 0);
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function ScreenshotViewer({ getScreenshot, getInterfaceInfo, serverOnline, isUserOperating = false }) {
|
|
61
|
+
const [screenshot, setScreenshot] = (0, external_react_namespaceObject.useState)(null);
|
|
62
|
+
const [loading, setLoading] = (0, external_react_namespaceObject.useState)(false);
|
|
63
|
+
const [error, setError] = (0, external_react_namespaceObject.useState)(null);
|
|
64
|
+
const [lastUpdateTime, setLastUpdateTime] = (0, external_react_namespaceObject.useState)(0);
|
|
65
|
+
const [interfaceInfo, setInterfaceInfo] = (0, external_react_namespaceObject.useState)(null);
|
|
66
|
+
const pollingIntervalRef = (0, external_react_namespaceObject.useRef)(null);
|
|
67
|
+
const isPollingPausedRef = (0, external_react_namespaceObject.useRef)(false);
|
|
68
|
+
const fetchScreenshot = (0, external_react_namespaceObject.useCallback)((isManual = false)=>_async_to_generator(function*() {
|
|
69
|
+
if (!serverOnline) return;
|
|
70
|
+
setLoading(true);
|
|
71
|
+
if (isManual) setError(null);
|
|
72
|
+
try {
|
|
73
|
+
const result = yield getScreenshot();
|
|
74
|
+
console.log('Screenshot API response:', result);
|
|
75
|
+
if (null == result ? void 0 : result.screenshot) {
|
|
76
|
+
const screenshotData = result.screenshot.toString().trim();
|
|
77
|
+
if (screenshotData) {
|
|
78
|
+
setScreenshot(screenshotData);
|
|
79
|
+
setError(null);
|
|
80
|
+
setLastUpdateTime(Date.now());
|
|
81
|
+
} else setError('Empty screenshot data received');
|
|
82
|
+
} else setError('No screenshot data in response');
|
|
83
|
+
} catch (err) {
|
|
84
|
+
console.error('Screenshot fetch error:', err);
|
|
85
|
+
setError(err instanceof Error ? err.message : 'Failed to fetch screenshot');
|
|
86
|
+
} finally{
|
|
87
|
+
setLoading(false);
|
|
88
|
+
}
|
|
89
|
+
})(), [
|
|
90
|
+
getScreenshot,
|
|
91
|
+
serverOnline
|
|
92
|
+
]);
|
|
93
|
+
const fetchInterfaceInfo = (0, external_react_namespaceObject.useCallback)(()=>_async_to_generator(function*() {
|
|
94
|
+
if (!serverOnline || !getInterfaceInfo) return;
|
|
95
|
+
try {
|
|
96
|
+
const info = yield getInterfaceInfo();
|
|
97
|
+
if (info) setInterfaceInfo(info);
|
|
98
|
+
} catch (err) {
|
|
99
|
+
console.error('Interface info fetch error:', err);
|
|
100
|
+
}
|
|
101
|
+
})(), [
|
|
102
|
+
getInterfaceInfo,
|
|
103
|
+
serverOnline
|
|
104
|
+
]);
|
|
105
|
+
const startPolling = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
106
|
+
if (pollingIntervalRef.current) clearInterval(pollingIntervalRef.current);
|
|
107
|
+
console.log('Starting screenshot polling (5s interval)');
|
|
108
|
+
pollingIntervalRef.current = setInterval(()=>{
|
|
109
|
+
if (!isPollingPausedRef.current && serverOnline) fetchScreenshot(false);
|
|
110
|
+
}, 5000);
|
|
111
|
+
}, [
|
|
112
|
+
fetchScreenshot,
|
|
113
|
+
serverOnline
|
|
114
|
+
]);
|
|
115
|
+
const stopPolling = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
116
|
+
if (pollingIntervalRef.current) {
|
|
117
|
+
console.log('Stopping screenshot polling');
|
|
118
|
+
clearInterval(pollingIntervalRef.current);
|
|
119
|
+
pollingIntervalRef.current = null;
|
|
120
|
+
}
|
|
121
|
+
}, []);
|
|
122
|
+
const pausePolling = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
123
|
+
console.log('Pausing screenshot polling');
|
|
124
|
+
isPollingPausedRef.current = true;
|
|
125
|
+
}, []);
|
|
126
|
+
const resumePolling = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
127
|
+
console.log('Resuming screenshot polling');
|
|
128
|
+
isPollingPausedRef.current = false;
|
|
129
|
+
}, []);
|
|
130
|
+
const handleManualRefresh = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
131
|
+
fetchScreenshot(true);
|
|
132
|
+
}, [
|
|
133
|
+
fetchScreenshot
|
|
134
|
+
]);
|
|
135
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
136
|
+
if (!serverOnline) {
|
|
137
|
+
setScreenshot(null);
|
|
138
|
+
setError(null);
|
|
139
|
+
setInterfaceInfo(null);
|
|
140
|
+
stopPolling();
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
fetchScreenshot(false);
|
|
144
|
+
fetchInterfaceInfo();
|
|
145
|
+
startPolling();
|
|
146
|
+
return ()=>{
|
|
147
|
+
stopPolling();
|
|
148
|
+
};
|
|
149
|
+
}, [
|
|
150
|
+
serverOnline,
|
|
151
|
+
startPolling,
|
|
152
|
+
stopPolling,
|
|
153
|
+
fetchScreenshot,
|
|
154
|
+
fetchInterfaceInfo
|
|
155
|
+
]);
|
|
156
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
157
|
+
if (!serverOnline) return;
|
|
158
|
+
if (isUserOperating) pausePolling();
|
|
159
|
+
else {
|
|
160
|
+
resumePolling();
|
|
161
|
+
fetchScreenshot(false);
|
|
162
|
+
}
|
|
163
|
+
}, [
|
|
164
|
+
isUserOperating,
|
|
165
|
+
pausePolling,
|
|
166
|
+
resumePolling,
|
|
167
|
+
fetchScreenshot,
|
|
168
|
+
serverOnline
|
|
169
|
+
]);
|
|
170
|
+
(0, external_react_namespaceObject.useEffect)(()=>()=>{
|
|
171
|
+
stopPolling();
|
|
172
|
+
}, [
|
|
173
|
+
stopPolling
|
|
174
|
+
]);
|
|
175
|
+
if (!serverOnline) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
176
|
+
className: "screenshot-viewer offline",
|
|
177
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
178
|
+
className: "screenshot-placeholder",
|
|
179
|
+
children: [
|
|
180
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h3", {
|
|
181
|
+
children: "\uD83D\uDCF1 Screen Preview"
|
|
182
|
+
}),
|
|
183
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
184
|
+
children: "Start the playground server to see real-time screenshots"
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
})
|
|
188
|
+
});
|
|
189
|
+
if (loading && !screenshot) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
190
|
+
className: "screenshot-viewer loading",
|
|
191
|
+
children: [
|
|
192
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Spin, {
|
|
193
|
+
size: "large"
|
|
194
|
+
}),
|
|
195
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
196
|
+
children: "Loading screenshot..."
|
|
197
|
+
})
|
|
198
|
+
]
|
|
199
|
+
});
|
|
200
|
+
if (error && !screenshot) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
201
|
+
className: "screenshot-viewer error",
|
|
202
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
203
|
+
className: "screenshot-placeholder",
|
|
204
|
+
children: [
|
|
205
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h3", {
|
|
206
|
+
children: "\uD83D\uDCF1 Screen Preview"
|
|
207
|
+
}),
|
|
208
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
209
|
+
className: "error-message",
|
|
210
|
+
children: error
|
|
211
|
+
})
|
|
212
|
+
]
|
|
213
|
+
})
|
|
214
|
+
});
|
|
215
|
+
const formatLastUpdateTime = (timestamp)=>{
|
|
216
|
+
if (!timestamp) return '';
|
|
217
|
+
const now = Date.now();
|
|
218
|
+
const diff = Math.floor((now - timestamp) / 1000);
|
|
219
|
+
if (diff < 60) return `${diff}s ago`;
|
|
220
|
+
if (diff < 3600) return `${Math.floor(diff / 60)}m ago`;
|
|
221
|
+
return new Date(timestamp).toLocaleTimeString();
|
|
222
|
+
};
|
|
223
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
224
|
+
className: "screenshot-viewer",
|
|
225
|
+
children: [
|
|
226
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
227
|
+
className: "screenshot-header",
|
|
228
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
229
|
+
className: "screenshot-title",
|
|
230
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("h3", {
|
|
231
|
+
children: (null == interfaceInfo ? void 0 : interfaceInfo.type) ? interfaceInfo.type : 'Device Name'
|
|
232
|
+
})
|
|
233
|
+
})
|
|
234
|
+
}),
|
|
235
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
236
|
+
className: "screenshot-container",
|
|
237
|
+
children: [
|
|
238
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
239
|
+
className: "screenshot-overlay",
|
|
240
|
+
children: [
|
|
241
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
242
|
+
className: "device-name-overlay",
|
|
243
|
+
children: [
|
|
244
|
+
"Device Name",
|
|
245
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
|
|
246
|
+
title: null == interfaceInfo ? void 0 : interfaceInfo.description,
|
|
247
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.InfoCircleOutlined, {
|
|
248
|
+
size: 16,
|
|
249
|
+
className: "info-icon"
|
|
250
|
+
})
|
|
251
|
+
})
|
|
252
|
+
]
|
|
253
|
+
}),
|
|
254
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
255
|
+
className: "screenshot-controls",
|
|
256
|
+
children: [
|
|
257
|
+
lastUpdateTime > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
258
|
+
className: "last-update-time",
|
|
259
|
+
children: [
|
|
260
|
+
"Last updated ",
|
|
261
|
+
formatLastUpdateTime(lastUpdateTime)
|
|
262
|
+
]
|
|
263
|
+
}),
|
|
264
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tooltip, {
|
|
265
|
+
title: "Refresh screenshot",
|
|
266
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
267
|
+
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ReloadOutlined, {}),
|
|
268
|
+
onClick: handleManualRefresh,
|
|
269
|
+
loading: loading,
|
|
270
|
+
size: "small"
|
|
271
|
+
})
|
|
272
|
+
}),
|
|
273
|
+
isUserOperating && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
|
|
274
|
+
className: "operation-indicator",
|
|
275
|
+
children: [
|
|
276
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Spin, {
|
|
277
|
+
size: "small"
|
|
278
|
+
}),
|
|
279
|
+
" Operating..."
|
|
280
|
+
]
|
|
281
|
+
})
|
|
282
|
+
]
|
|
283
|
+
})
|
|
284
|
+
]
|
|
285
|
+
}),
|
|
286
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
287
|
+
className: "screenshot-content",
|
|
288
|
+
children: screenshot ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
|
|
289
|
+
src: screenshot.startsWith('data:image/') ? screenshot : `data:image/png;base64,${screenshot}`,
|
|
290
|
+
alt: "Device Screenshot",
|
|
291
|
+
className: "screenshot-image",
|
|
292
|
+
onLoad: ()=>console.log('Screenshot image loaded successfully'),
|
|
293
|
+
onError: (e)=>{
|
|
294
|
+
console.error('Screenshot image load error:', e);
|
|
295
|
+
console.error('Screenshot data preview:', screenshot.substring(0, 100));
|
|
296
|
+
setError('Failed to load screenshot image');
|
|
297
|
+
}
|
|
298
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
299
|
+
className: "screenshot-placeholder",
|
|
300
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("p", {
|
|
301
|
+
children: "No screenshot available"
|
|
302
|
+
})
|
|
303
|
+
})
|
|
304
|
+
})
|
|
305
|
+
]
|
|
306
|
+
})
|
|
307
|
+
]
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
exports["default"] = __webpack_exports__["default"];
|
|
311
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
312
|
+
"default"
|
|
313
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
314
|
+
Object.defineProperty(exports, '__esModule', {
|
|
315
|
+
value: true
|
|
316
|
+
});
|
|
@@ -43,8 +43,7 @@ const SWITCH_BUTTON_TEXT = {
|
|
|
43
43
|
Server: 'Switch to In-Browser Mode',
|
|
44
44
|
'In-Browser': 'Switch to Server Mode'
|
|
45
45
|
};
|
|
46
|
-
const ServiceModeControl = (
|
|
47
|
-
let { serviceMode } = param;
|
|
46
|
+
const ServiceModeControl = ({ serviceMode })=>{
|
|
48
47
|
const { setServiceMode, config } = (0, store_js_namespaceObject.useEnvConfig)();
|
|
49
48
|
const serverValid = (0, useServerValid_js_namespaceObject.useServerValid)('Server' === serviceMode);
|
|
50
49
|
const renderServerTip = ()=>{
|
|
@@ -131,9 +130,9 @@ const ServiceModeControl = (param)=>{
|
|
|
131
130
|
});
|
|
132
131
|
};
|
|
133
132
|
exports.ServiceModeControl = __webpack_exports__.ServiceModeControl;
|
|
134
|
-
for(var
|
|
133
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
135
134
|
"ServiceModeControl"
|
|
136
|
-
].indexOf(
|
|
135
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
137
136
|
Object.defineProperty(exports, '__esModule', {
|
|
138
137
|
value: true
|
|
139
138
|
});
|
|
@@ -13,6 +13,23 @@
|
|
|
13
13
|
overflow: hidden;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
.shiny-text.theme-blue {
|
|
17
|
+
background-image: linear-gradient(45deg, #2b83ff, #6a11cb, #2575fc, #4481eb);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.shiny-text.theme-purple {
|
|
21
|
+
background-image: linear-gradient(45deg, #667eea, #764ba2, #b06ab3, #9d50bb);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.shiny-text.theme-green {
|
|
25
|
+
background-image: linear-gradient(45deg, #11998e, #38ef7d, #2dd4bf, #10b981);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.shiny-text.theme-rainbow {
|
|
29
|
+
background-image: linear-gradient(45deg, #ff0080, #ff8c00, #40e0d0, #9d50bb, #ff0080);
|
|
30
|
+
background-size: 400%;
|
|
31
|
+
}
|
|
32
|
+
|
|
16
33
|
.shiny-text:after {
|
|
17
34
|
content: "";
|
|
18
35
|
width: 120%;
|
|
@@ -28,9 +45,9 @@
|
|
|
28
45
|
}
|
|
29
46
|
|
|
30
47
|
.shiny-text.disabled {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
48
|
+
color: #000;
|
|
49
|
+
background: none;
|
|
50
|
+
font-weight: normal;
|
|
34
51
|
animation: none;
|
|
35
52
|
}
|
|
36
53
|
|
|
@@ -39,6 +56,21 @@
|
|
|
39
56
|
display: none;
|
|
40
57
|
}
|
|
41
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
|
+
|
|
42
74
|
@keyframes shine {
|
|
43
75
|
0% {
|
|
44
76
|
opacity: .7;
|
|
@@ -28,22 +28,22 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
});
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
30
|
require("./index.css");
|
|
31
|
-
const ShinyText = (
|
|
32
|
-
let { text, disabled = false, speed = 5, className = '' } = param;
|
|
31
|
+
const ShinyText = ({ text, disabled = false, speed = 5, className = '', colorTheme = 'blue' })=>{
|
|
33
32
|
const style = {
|
|
34
33
|
'--animation-duration': `${speed}s`
|
|
35
34
|
};
|
|
35
|
+
const themeClass = `theme-${colorTheme}`;
|
|
36
36
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
37
|
-
className: `shiny-text ${disabled ? 'disabled' : ''} ${className}`,
|
|
37
|
+
className: `shiny-text ${themeClass} ${disabled ? 'disabled' : ''} ${className}`,
|
|
38
38
|
style: style,
|
|
39
39
|
children: text
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
42
|
const shiny_text = ShinyText;
|
|
43
43
|
exports["default"] = __webpack_exports__["default"];
|
|
44
|
-
for(var
|
|
44
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
45
45
|
"default"
|
|
46
|
-
].indexOf(
|
|
46
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
47
47
|
Object.defineProperty(exports, '__esModule', {
|
|
48
48
|
value: true
|
|
49
49
|
});
|
|
@@ -160,7 +160,6 @@
|
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
.playground-container .progress-description {
|
|
163
|
-
color: #000;
|
|
164
163
|
padding: 8px 0;
|
|
165
164
|
font-size: 14px;
|
|
166
165
|
line-height: 22px;
|
|
@@ -339,3 +338,64 @@
|
|
|
339
338
|
text-decoration: underline;
|
|
340
339
|
}
|
|
341
340
|
|
|
341
|
+
[data-theme="dark"] .universal-playground .error-hint {
|
|
342
|
+
color: rgba(255, 255, 255, .45);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
[data-theme="dark"] .universal-playground .status-indicator {
|
|
346
|
+
color: #f8fafd;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
[data-theme="dark"] .universal-playground .status-indicator.error {
|
|
350
|
+
color: #ff4d4f;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
[data-theme="dark"] .universal-playground .status-indicator.success {
|
|
354
|
+
color: #52c41a;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
[data-theme="dark"] .universal-playground .operation-label {
|
|
358
|
+
color: #f8fafd;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
[data-theme="dark"] .universal-playground .alert-message {
|
|
362
|
+
color: #f8fafd;
|
|
363
|
+
background-color: rgba(82, 38, 7, .3);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
[data-theme="dark"] .universal-playground .operation-item .operation-icon-wrapper {
|
|
367
|
+
background-color: rgba(255, 255, 255, .08);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
[data-theme="dark"] .universal-playground .operation-item .operation-content {
|
|
371
|
+
background-color: rgba(0, 0, 0, 0);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
[data-theme="dark"] .universal-playground .operation-item .operation-content .operation-title {
|
|
375
|
+
color: rgba(255, 255, 255, .45);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
[data-theme="dark"] .universal-playground .playground-footer {
|
|
379
|
+
background-color: rgba(255, 255, 255, .04);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
[data-theme="dark"] .universal-playground .playground-footer .status-text {
|
|
383
|
+
color: #f8fafd;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
[data-theme="dark"] .universal-playground .results-info {
|
|
387
|
+
color: rgba(255, 255, 255, .45);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
[data-theme="dark"] .universal-playground .result-section .result-title, [data-theme="dark"] .universal-playground .result-section .result-details, [data-theme="dark"] .universal-playground .result-section .result-value {
|
|
391
|
+
color: #f8fafd;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
[data-theme="dark"] .universal-playground .result-section .result-value.success {
|
|
395
|
+
color: #52c41a;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
[data-theme="dark"] .universal-playground .result-section .result-value.error {
|
|
399
|
+
color: #ff4d4f;
|
|
400
|
+
}
|
|
401
|
+
|