@midscene/visualizer 0.30.10 → 1.0.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
|
@@ -32,8 +32,20 @@
|
|
|
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 {
|
|
46
|
+
box-sizing: border-box;
|
|
36
47
|
width: 100%;
|
|
48
|
+
padding: 0 4px;
|
|
37
49
|
}
|
|
38
50
|
|
|
39
51
|
.prompt-input-wrapper .mode-radio-group-wrapper {
|
|
@@ -179,35 +191,62 @@
|
|
|
179
191
|
}
|
|
180
192
|
|
|
181
193
|
.prompt-input-wrapper .main-side-console-input {
|
|
194
|
+
z-index: 1;
|
|
195
|
+
background: linear-gradient(#fff, #fff) padding-box padding-box, linear-gradient(135deg, #4285f4 0%, #06f 25%, #7b02c5 50%, #ea4335 75%, #ff7043 100%) border-box;
|
|
196
|
+
border: 1px solid rgba(0, 0, 0, 0);
|
|
197
|
+
border-radius: 12px;
|
|
182
198
|
margin-top: 10px;
|
|
199
|
+
padding-bottom: 56px;
|
|
183
200
|
position: relative;
|
|
184
201
|
}
|
|
185
202
|
|
|
203
|
+
@keyframes hue-shift {
|
|
204
|
+
0% {
|
|
205
|
+
-webkit-filter: hue-rotate();
|
|
206
|
+
filter: hue-rotate();
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
100% {
|
|
210
|
+
-webkit-filter: hue-rotate(360deg);
|
|
211
|
+
filter: hue-rotate(360deg);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.prompt-input-wrapper .main-side-console-input:focus-within {
|
|
216
|
+
z-index: 10;
|
|
217
|
+
box-shadow: 0 0 0 3px rgba(43, 131, 255, .16);
|
|
218
|
+
}
|
|
219
|
+
|
|
186
220
|
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea {
|
|
221
|
+
resize: none;
|
|
187
222
|
white-space: pre-wrap;
|
|
188
223
|
scrollbar-width: thin;
|
|
189
|
-
background:
|
|
190
|
-
border:
|
|
191
|
-
border-radius:
|
|
224
|
+
background: none;
|
|
225
|
+
border: none;
|
|
226
|
+
border-radius: 0;
|
|
227
|
+
outline: none;
|
|
228
|
+
min-height: 120px;
|
|
192
229
|
padding: 12px 16px;
|
|
193
230
|
line-height: 21px;
|
|
194
231
|
transition: background-color .2s;
|
|
232
|
+
position: relative;
|
|
195
233
|
overflow-y: auto;
|
|
196
234
|
}
|
|
197
235
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
236
|
+
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea:focus {
|
|
237
|
+
box-shadow: none;
|
|
238
|
+
border: none;
|
|
239
|
+
outline: none;
|
|
240
|
+
}
|
|
202
241
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
242
|
+
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea:focus-visible {
|
|
243
|
+
box-shadow: none;
|
|
244
|
+
border: none;
|
|
245
|
+
outline: none;
|
|
206
246
|
}
|
|
207
247
|
|
|
208
|
-
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea:
|
|
209
|
-
|
|
210
|
-
border: 1px solid rgba(0, 0, 0, 0);
|
|
248
|
+
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea:after {
|
|
249
|
+
display: none;
|
|
211
250
|
}
|
|
212
251
|
|
|
213
252
|
.prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea::-webkit-scrollbar {
|
|
@@ -219,20 +258,35 @@
|
|
|
219
258
|
border-radius: 3px;
|
|
220
259
|
}
|
|
221
260
|
|
|
222
|
-
.prompt-input-wrapper .main-side-console-input.loading
|
|
261
|
+
.prompt-input-wrapper .main-side-console-input.loading {
|
|
223
262
|
background: linear-gradient(#fff, #fff) padding-box padding-box, linear-gradient(135deg, #4285f4 0%, #06f 25%, #7b02c5 50%, #ea4335 75%, #ff7043 100%) border-box;
|
|
224
263
|
border: 1px solid rgba(0, 0, 0, 0);
|
|
225
|
-
animation: 5s linear infinite hue-shift;
|
|
226
264
|
}
|
|
227
265
|
|
|
228
|
-
.prompt-input-wrapper .main-side-console-input
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
266
|
+
.prompt-input-wrapper .main-side-console-input.loading:before {
|
|
267
|
+
content: "";
|
|
268
|
+
-webkit-mask-composite: xor;
|
|
269
|
+
pointer-events: none;
|
|
270
|
+
z-index: -1;
|
|
271
|
+
background: linear-gradient(135deg, #4285f4 0%, #06f 25%, #7b02c5 50%, #ea4335 75%, #ff7043 100%);
|
|
272
|
+
border-radius: 12px;
|
|
273
|
+
padding: 1px;
|
|
274
|
+
animation: 5s linear infinite hue-shift;
|
|
275
|
+
position: absolute;
|
|
276
|
+
top: -1px;
|
|
277
|
+
bottom: -1px;
|
|
278
|
+
left: -1px;
|
|
279
|
+
right: -1px;
|
|
280
|
+
-webkit-mask-image: linear-gradient(#fff 0, #fff 0), linear-gradient(#fff 0, #fff 0);
|
|
281
|
+
-webkit-mask-position: 0 0, 0 0;
|
|
282
|
+
-webkit-mask-size: auto, auto;
|
|
283
|
+
-webkit-mask-repeat: repeat, repeat;
|
|
284
|
+
-webkit-mask-clip: content-box, border-box;
|
|
285
|
+
-webkit-mask-origin: content-box, border-box;
|
|
286
|
+
-webkit-mask-composite: xor;
|
|
287
|
+
mask-composite: exclude;
|
|
288
|
+
-webkit-mask-source-type: auto, auto;
|
|
289
|
+
mask-mode: match-source, match-source;
|
|
236
290
|
}
|
|
237
291
|
|
|
238
292
|
.prompt-input-wrapper .main-side-console-input.disabled .form-controller-wrapper {
|
|
@@ -240,7 +294,7 @@
|
|
|
240
294
|
}
|
|
241
295
|
|
|
242
296
|
.prompt-input-wrapper .ant-form-item-with-help + .form-controller-wrapper {
|
|
243
|
-
bottom:
|
|
297
|
+
bottom: 14px;
|
|
244
298
|
}
|
|
245
299
|
|
|
246
300
|
.prompt-input-wrapper .ant-input {
|
|
@@ -249,21 +303,50 @@
|
|
|
249
303
|
|
|
250
304
|
.prompt-input-wrapper .form-controller-wrapper {
|
|
251
305
|
box-sizing: border-box;
|
|
252
|
-
|
|
306
|
+
z-index: 1000;
|
|
307
|
+
pointer-events: none;
|
|
308
|
+
background-color: rgba(0, 0, 0, 0);
|
|
253
309
|
flex-direction: row;
|
|
254
310
|
justify-content: flex-end;
|
|
255
311
|
align-items: flex-end;
|
|
256
312
|
gap: 8px;
|
|
257
313
|
width: calc(100% - 32px);
|
|
314
|
+
height: 56px;
|
|
258
315
|
padding: 12px 0;
|
|
259
316
|
line-height: 32px;
|
|
260
317
|
transition: background-color .2s;
|
|
261
318
|
display: flex;
|
|
262
319
|
position: absolute;
|
|
263
|
-
bottom:
|
|
320
|
+
bottom: 0;
|
|
264
321
|
left: 16px;
|
|
265
322
|
}
|
|
266
323
|
|
|
324
|
+
.prompt-input-wrapper .form-controller-wrapper > * {
|
|
325
|
+
pointer-events: auto;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.prompt-input-wrapper .form-controller-wrapper.with-strategy {
|
|
329
|
+
justify-content: space-between;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.prompt-input-wrapper .planning-strategy-selector {
|
|
333
|
+
color: #2b83ff;
|
|
334
|
+
cursor: pointer;
|
|
335
|
+
align-items: center;
|
|
336
|
+
font-size: 13px;
|
|
337
|
+
transition: opacity .2s;
|
|
338
|
+
display: inline-flex;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.prompt-input-wrapper .planning-strategy-selector:hover {
|
|
342
|
+
opacity: .8;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.prompt-input-wrapper .ant-dropdown-menu-item-selected {
|
|
346
|
+
color: #2b83ff !important;
|
|
347
|
+
background-color: #e6f4ff !important;
|
|
348
|
+
}
|
|
349
|
+
|
|
267
350
|
.prompt-input-wrapper .settings-wrapper {
|
|
268
351
|
color: #777;
|
|
269
352
|
flex-flow: wrap;
|
|
@@ -356,11 +439,6 @@
|
|
|
356
439
|
border-color: #40a9ff;
|
|
357
440
|
}
|
|
358
441
|
|
|
359
|
-
.prompt-input-wrapper .structured-params-container .structured-params .ant-input:focus, .prompt-input-wrapper .structured-params-container .structured-params .ant-input-number:focus, .prompt-input-wrapper .structured-params-container .structured-params .ant-select:focus, .prompt-input-wrapper .structured-params-container .structured-params .ant-input:focus-within, .prompt-input-wrapper .structured-params-container .structured-params .ant-input-number:focus-within, .prompt-input-wrapper .structured-params-container .structured-params .ant-select:focus-within {
|
|
360
|
-
border-color: #40a9ff;
|
|
361
|
-
box-shadow: 0 0 0 2px rgba(24, 144, 255, .2);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
442
|
.prompt-input-wrapper .structured-params-container .structured-params textarea.ant-input {
|
|
365
443
|
padding-bottom: 5px;
|
|
366
444
|
}
|
|
@@ -423,6 +501,188 @@
|
|
|
423
501
|
color: #2b83ff;
|
|
424
502
|
}
|
|
425
503
|
|
|
504
|
+
.more-apis-dropdown .ant-dropdown-menu {
|
|
505
|
+
scrollbar-width: thin;
|
|
506
|
+
max-height: 400px;
|
|
507
|
+
overflow-y: auto;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.more-apis-dropdown .ant-dropdown-menu::-webkit-scrollbar {
|
|
511
|
+
width: 6px;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
.more-apis-dropdown .ant-dropdown-menu::-webkit-scrollbar-track {
|
|
515
|
+
background: #f1f1f1;
|
|
516
|
+
border-radius: 3px;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.more-apis-dropdown .ant-dropdown-menu::-webkit-scrollbar-thumb {
|
|
520
|
+
background: #c1c1c1;
|
|
521
|
+
border-radius: 3px;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.more-apis-dropdown .ant-dropdown-menu::-webkit-scrollbar-thumb:hover {
|
|
525
|
+
background: #a8a8a8;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
[data-theme="dark"] .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-radio-button-wrapper {
|
|
529
|
+
color: #f8fafd !important;
|
|
530
|
+
background-color: rgba(255, 255, 255, .08) !important;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
[data-theme="dark"] .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked {
|
|
534
|
+
color: #fff !important;
|
|
535
|
+
background-color: #2b83ff !important;
|
|
536
|
+
border-color: #2b83ff !important;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
[data-theme="dark"] .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .more-apis-button {
|
|
540
|
+
color: #f8fafd !important;
|
|
541
|
+
background-color: rgba(255, 255, 255, .08) !important;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
[data-theme="dark"] .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .more-apis-button:hover {
|
|
545
|
+
background-color: rgba(255, 255, 255, .12) !important;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
[data-theme="dark"] .prompt-input-wrapper .mode-radio-group-wrapper .mode-radio-group .more-apis-button.selected-from-dropdown {
|
|
549
|
+
color: #fff !important;
|
|
550
|
+
background-color: #2b83ff !important;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
[data-theme="dark"] .prompt-input-wrapper .mode-radio-group-wrapper .action-icons {
|
|
554
|
+
background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(31, 31, 31, .5) 20%, rgba(31, 31, 31, .8) 40%, rgba(31, 31, 31, .95) 60%, #1f1f1f 70%) !important;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
[data-theme="dark"] .prompt-input-wrapper .main-side-console-input {
|
|
558
|
+
background: #1f1f1f !important;
|
|
559
|
+
border-color: rgba(255, 255, 255, .12) !important;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
[data-theme="dark"] .prompt-input-wrapper .main-side-console-input:focus-within {
|
|
563
|
+
background: linear-gradient(#1f1f1f, #1f1f1f) padding-box padding-box, linear-gradient(135deg, #4285f4 0%, #06f 25%, #7b02c5 50%, #ea4335 75%, #ff7043 100%) border-box !important;
|
|
564
|
+
border: 1px solid rgba(0, 0, 0, 0) !important;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
[data-theme="dark"] .prompt-input-wrapper .main-side-console-input .main-side-console-input-textarea {
|
|
568
|
+
color: #f8fafd !important;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
[data-theme="dark"] .prompt-input-wrapper .main-side-console-input.loading {
|
|
572
|
+
background: linear-gradient(#1f1f1f, #1f1f1f) padding-box padding-box, linear-gradient(135deg, #4285f4 0%, #06f 25%, #7b02c5 50%, #ea4335 75%, #ff7043 100%) border-box !important;
|
|
573
|
+
border: 1px solid rgba(0, 0, 0, 0) !important;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
[data-theme="dark"] .prompt-input-wrapper .ant-form-item-control-input-content .ant-input, [data-theme="dark"] .prompt-input-wrapper .ant-form-item-control-input-content textarea.ant-input {
|
|
577
|
+
color: #f8fafd !important;
|
|
578
|
+
background: rgba(255, 255, 255, .04) !important;
|
|
579
|
+
border-color: rgba(255, 255, 255, .12) !important;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
[data-theme="dark"] .prompt-input-wrapper .ant-form-item-control-input-content .ant-btn {
|
|
583
|
+
color: #f8fafd !important;
|
|
584
|
+
background-color: rgba(255, 255, 255, .08) !important;
|
|
585
|
+
border-color: rgba(255, 255, 255, .12) !important;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
[data-theme="dark"] .prompt-input-wrapper .ant-form-item-control-input-content .ant-btn.ant-btn-primary {
|
|
589
|
+
color: #fff !important;
|
|
590
|
+
background-color: #2b83ff !important;
|
|
591
|
+
border-color: #2b83ff !important;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
[data-theme="dark"] .prompt-input-wrapper .form-controller-wrapper {
|
|
595
|
+
background-color: rgba(0, 0, 0, 0) !important;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
[data-theme="dark"] .prompt-input-wrapper .planning-strategy-selector {
|
|
599
|
+
color: #2b83ff !important;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
[data-theme="dark"] .prompt-input-wrapper .planning-strategy-selector:hover {
|
|
603
|
+
opacity: .8;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
[data-theme="dark"] .prompt-input-wrapper .ant-dropdown-menu-item-selected {
|
|
607
|
+
color: #2b83ff !important;
|
|
608
|
+
background-color: rgba(43, 131, 255, .15) !important;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
[data-theme="dark"] .prompt-input-wrapper .structured-params-container {
|
|
612
|
+
background: linear-gradient(#1f1f1f, #1f1f1f) padding-box padding-box, linear-gradient(135deg, #4285f4 0%, #06f 25%, #7b02c5 50%, #ea4335 75%, #ff7043 100%) border-box !important;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
[data-theme="dark"] .prompt-input-wrapper .structured-params-container .structured-params .ant-form-item-label > label {
|
|
616
|
+
color: #f8fafd !important;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
[data-theme="dark"] .prompt-input-wrapper .structured-params-container .structured-params .ant-input, [data-theme="dark"] .prompt-input-wrapper .structured-params-container .structured-params .ant-input-number, [data-theme="dark"] .prompt-input-wrapper .structured-params-container .structured-params .ant-select, [data-theme="dark"] .prompt-input-wrapper .structured-params-container .structured-params .ant-radio-group .ant-radio-button-wrapper {
|
|
620
|
+
color: #f8fafd !important;
|
|
621
|
+
background-color: rgba(255, 255, 255, .04) !important;
|
|
622
|
+
border-color: rgba(255, 255, 255, .12) !important;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
[data-theme="dark"] .prompt-input-wrapper .structured-params-container .structured-params .ant-radio-group .ant-radio-button-wrapper.ant-radio-button-wrapper-checked {
|
|
626
|
+
color: #fff !important;
|
|
627
|
+
background-color: #2b83ff !important;
|
|
628
|
+
border-color: #2b83ff !important;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
[data-theme="dark"] .prompt-input .tip-button {
|
|
632
|
+
background-color: rgba(255, 255, 255, .08);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
[data-theme="dark"] .prompt-input .tip-button.active {
|
|
636
|
+
color: #fff;
|
|
637
|
+
background-color: #2b83ff;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
[data-theme="dark"] .prompt-input .prompt-textarea-wrapper {
|
|
641
|
+
background-color: rgba(255, 255, 255, .04);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
[data-theme="dark"] .prompt-input .prompt-textarea-wrapper:hover, [data-theme="dark"] .prompt-input .prompt-textarea-wrapper.focused {
|
|
645
|
+
background-color: rgba(255, 255, 255, .08);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
[data-theme="dark"] .prompt-input .btn-wrapper .btn-item {
|
|
649
|
+
color: #fff;
|
|
650
|
+
background-color: #2b83ff;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
[data-theme="dark"] .prompt-input .btn-wrapper .btn-item:hover {
|
|
654
|
+
background-color: #2b83ff;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
[data-theme="dark"] .prompt-input .dropdown-content {
|
|
658
|
+
background-color: #1f1f1f;
|
|
659
|
+
border-color: rgba(255, 255, 255, .12);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
[data-theme="dark"] .prompt-input .param-label {
|
|
663
|
+
color: #f8fafd;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
[data-theme="dark"] .prompt-input .error-message {
|
|
667
|
+
color: #ff4d4f;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
[data-theme="dark"] .prompt-input .send-button-text {
|
|
671
|
+
color: #2b83ff;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
[data-theme="dark"] .more-apis-dropdown .ant-dropdown-menu::-webkit-scrollbar-track {
|
|
675
|
+
background: rgba(255, 255, 255, .08);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
[data-theme="dark"] .more-apis-dropdown .ant-dropdown-menu::-webkit-scrollbar-thumb {
|
|
679
|
+
background: rgba(255, 255, 255, .2);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
[data-theme="dark"] .more-apis-dropdown .ant-dropdown-menu::-webkit-scrollbar-thumb:hover {
|
|
683
|
+
background: rgba(255, 255, 255, .3);
|
|
684
|
+
}
|
|
685
|
+
|
|
426
686
|
body {
|
|
427
687
|
margin: 0;
|
|
428
688
|
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
|
|
@@ -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
|
+
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { LoadingOutlined } from "@ant-design/icons";
|
|
3
|
+
import { noReplayAPIs } from "@midscene/playground";
|
|
3
4
|
import { Spin } from "antd";
|
|
4
5
|
import { emptyResultTip, serverLaunchTip } from "../misc/index.mjs";
|
|
5
6
|
import { Player } from "../player/index.mjs";
|
|
6
7
|
import shiny_text from "../shiny-text/index.mjs";
|
|
7
8
|
import "./index.css";
|
|
8
|
-
const PlaygroundResultView = (
|
|
9
|
-
let { result, loading, serverValid, serviceMode, replayScriptsInfo, replayCounter, loadingProgressText, verticalMode = false, notReadyMessage, fitMode, autoZoom } = param;
|
|
9
|
+
const PlaygroundResultView = ({ result, loading, serverValid, serviceMode, replayScriptsInfo, replayCounter, loadingProgressText, verticalMode = false, notReadyMessage, fitMode, autoZoom, actionType })=>{
|
|
10
10
|
let resultWrapperClassName = 'result-wrapper';
|
|
11
11
|
if (verticalMode) resultWrapperClassName += ' vertical-mode-result';
|
|
12
12
|
if (replayScriptsInfo && verticalMode) resultWrapperClassName += ' result-wrapper-compact';
|
|
13
13
|
let resultDataToShow = emptyResultTip;
|
|
14
|
+
const shouldPrioritizeResult = actionType && noReplayAPIs.includes(actionType);
|
|
14
15
|
if (serverValid || 'Server' !== serviceMode) {
|
|
15
16
|
if (loading) resultDataToShow = /*#__PURE__*/ jsxs("div", {
|
|
16
17
|
className: "loading-container",
|
|
@@ -30,17 +31,135 @@ const PlaygroundResultView = (param)=>{
|
|
|
30
31
|
})
|
|
31
32
|
]
|
|
32
33
|
});
|
|
33
|
-
else if (replayScriptsInfo) resultDataToShow = /*#__PURE__*/ jsx(Player, {
|
|
34
|
-
replayScripts: replayScriptsInfo.scripts,
|
|
35
|
-
imageWidth: replayScriptsInfo.width,
|
|
36
|
-
imageHeight: replayScriptsInfo.height,
|
|
37
|
-
reportFileContent: ('In-Browser-Extension' === serviceMode || 'Server' === serviceMode) && (null == result ? void 0 : result.reportHTML) ? null == result ? void 0 : result.reportHTML : null,
|
|
38
|
-
fitMode: fitMode,
|
|
39
|
-
autoZoom: autoZoom
|
|
40
|
-
}, replayCounter);
|
|
41
34
|
else if (null == result ? void 0 : result.error) resultDataToShow = /*#__PURE__*/ jsx("pre", {
|
|
42
35
|
children: null == result ? void 0 : result.error
|
|
43
36
|
});
|
|
37
|
+
else if (shouldPrioritizeResult && (null == result ? void 0 : result.result) !== void 0 && replayScriptsInfo) {
|
|
38
|
+
const resultOutput = 'string' == typeof (null == result ? void 0 : result.result) ? /*#__PURE__*/ jsx("pre", {
|
|
39
|
+
children: null == result ? void 0 : result.result
|
|
40
|
+
}) : /*#__PURE__*/ jsx("pre", {
|
|
41
|
+
children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
|
|
42
|
+
});
|
|
43
|
+
const reportContent = (null == result ? void 0 : result.reportHTML) || null;
|
|
44
|
+
resultDataToShow = /*#__PURE__*/ jsxs("div", {
|
|
45
|
+
style: {
|
|
46
|
+
display: 'flex',
|
|
47
|
+
flexDirection: 'column',
|
|
48
|
+
gap: '16px',
|
|
49
|
+
height: '100%'
|
|
50
|
+
},
|
|
51
|
+
children: [
|
|
52
|
+
/*#__PURE__*/ jsxs("div", {
|
|
53
|
+
style: {
|
|
54
|
+
flex: '0 0 auto'
|
|
55
|
+
},
|
|
56
|
+
children: [
|
|
57
|
+
/*#__PURE__*/ jsx("div", {
|
|
58
|
+
style: {
|
|
59
|
+
fontWeight: 'bold',
|
|
60
|
+
marginBottom: '8px'
|
|
61
|
+
},
|
|
62
|
+
children: "Output:"
|
|
63
|
+
}),
|
|
64
|
+
resultOutput
|
|
65
|
+
]
|
|
66
|
+
}),
|
|
67
|
+
/*#__PURE__*/ jsxs("div", {
|
|
68
|
+
style: {
|
|
69
|
+
flex: '1 1 auto',
|
|
70
|
+
minHeight: 0
|
|
71
|
+
},
|
|
72
|
+
children: [
|
|
73
|
+
/*#__PURE__*/ jsx("div", {
|
|
74
|
+
style: {
|
|
75
|
+
fontWeight: 'bold',
|
|
76
|
+
marginBottom: '8px'
|
|
77
|
+
},
|
|
78
|
+
children: "Report:"
|
|
79
|
+
}),
|
|
80
|
+
/*#__PURE__*/ jsx(Player, {
|
|
81
|
+
replayScripts: replayScriptsInfo.scripts,
|
|
82
|
+
imageWidth: replayScriptsInfo.width,
|
|
83
|
+
imageHeight: replayScriptsInfo.height,
|
|
84
|
+
reportFileContent: reportContent,
|
|
85
|
+
fitMode: fitMode,
|
|
86
|
+
autoZoom: autoZoom
|
|
87
|
+
}, replayCounter)
|
|
88
|
+
]
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
});
|
|
92
|
+
} else if (replayScriptsInfo) {
|
|
93
|
+
const reportContent = (null == result ? void 0 : result.reportHTML) || null;
|
|
94
|
+
resultDataToShow = /*#__PURE__*/ jsx(Player, {
|
|
95
|
+
replayScripts: replayScriptsInfo.scripts,
|
|
96
|
+
imageWidth: replayScriptsInfo.width,
|
|
97
|
+
imageHeight: replayScriptsInfo.height,
|
|
98
|
+
reportFileContent: reportContent,
|
|
99
|
+
fitMode: fitMode,
|
|
100
|
+
autoZoom: autoZoom
|
|
101
|
+
}, replayCounter);
|
|
102
|
+
} else if (shouldPrioritizeResult && (null == result ? void 0 : result.result) !== void 0 && (null == result ? void 0 : result.reportHTML)) {
|
|
103
|
+
const resultOutput = 'string' == typeof (null == result ? void 0 : result.result) ? /*#__PURE__*/ jsx("pre", {
|
|
104
|
+
children: null == result ? void 0 : result.result
|
|
105
|
+
}) : /*#__PURE__*/ jsx("pre", {
|
|
106
|
+
children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
|
|
107
|
+
});
|
|
108
|
+
resultDataToShow = /*#__PURE__*/ jsxs("div", {
|
|
109
|
+
style: {
|
|
110
|
+
display: 'flex',
|
|
111
|
+
flexDirection: 'column',
|
|
112
|
+
gap: '16px',
|
|
113
|
+
height: '100%'
|
|
114
|
+
},
|
|
115
|
+
children: [
|
|
116
|
+
/*#__PURE__*/ jsxs("div", {
|
|
117
|
+
style: {
|
|
118
|
+
flex: '0 0 auto'
|
|
119
|
+
},
|
|
120
|
+
children: [
|
|
121
|
+
/*#__PURE__*/ jsx("div", {
|
|
122
|
+
style: {
|
|
123
|
+
fontWeight: 'bold',
|
|
124
|
+
marginBottom: '8px'
|
|
125
|
+
},
|
|
126
|
+
children: "Output:"
|
|
127
|
+
}),
|
|
128
|
+
resultOutput
|
|
129
|
+
]
|
|
130
|
+
}),
|
|
131
|
+
/*#__PURE__*/ jsxs("div", {
|
|
132
|
+
style: {
|
|
133
|
+
flex: '1 1 auto',
|
|
134
|
+
minHeight: 0
|
|
135
|
+
},
|
|
136
|
+
children: [
|
|
137
|
+
/*#__PURE__*/ jsx("div", {
|
|
138
|
+
style: {
|
|
139
|
+
fontWeight: 'bold',
|
|
140
|
+
marginBottom: '8px'
|
|
141
|
+
},
|
|
142
|
+
children: "Report:"
|
|
143
|
+
}),
|
|
144
|
+
/*#__PURE__*/ jsx(Player, {
|
|
145
|
+
reportFileContent: result.reportHTML,
|
|
146
|
+
fitMode: fitMode,
|
|
147
|
+
autoZoom: autoZoom
|
|
148
|
+
}, replayCounter)
|
|
149
|
+
]
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
});
|
|
153
|
+
} else if (shouldPrioritizeResult && (null == result ? void 0 : result.result) !== void 0) resultDataToShow = 'string' == typeof (null == result ? void 0 : result.result) ? /*#__PURE__*/ jsx("pre", {
|
|
154
|
+
children: null == result ? void 0 : result.result
|
|
155
|
+
}) : /*#__PURE__*/ jsx("pre", {
|
|
156
|
+
children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
|
|
157
|
+
});
|
|
158
|
+
else if (null == result ? void 0 : result.reportHTML) resultDataToShow = /*#__PURE__*/ jsx(Player, {
|
|
159
|
+
reportFileContent: result.reportHTML,
|
|
160
|
+
fitMode: fitMode,
|
|
161
|
+
autoZoom: autoZoom
|
|
162
|
+
}, replayCounter);
|
|
44
163
|
else if ((null == result ? void 0 : result.result) !== void 0) resultDataToShow = 'string' == typeof (null == result ? void 0 : result.result) ? /*#__PURE__*/ jsx("pre", {
|
|
45
164
|
children: null == result ? void 0 : result.result
|
|
46
165
|
}) : /*#__PURE__*/ jsx("pre", {
|