@midscene/visualizer 0.28.4-beta-20250910153230.0 → 0.28.4
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.mjs → blackboard/index.mjs} +3 -3
- package/dist/es/component/{playground/ConfigSelector.mjs → config-selector/index.mjs} +2 -3
- package/dist/es/component/{playground/ContextPreview.mjs → context-preview/index.mjs} +3 -4
- package/dist/es/component/{env-config.mjs → env-config/index.mjs} +1 -1
- package/dist/es/component/{github-star.mjs → github-star/index.mjs} +1 -1
- package/dist/es/component/history-selector/index.css +132 -0
- package/dist/es/component/{playground/HistorySelector.mjs → history-selector/index.mjs} +1 -1
- package/dist/es/component/index.mjs +1 -0
- package/dist/es/component/{logo.mjs → logo/index.mjs} +1 -1
- package/dist/es/component/{misc.mjs → misc/index.mjs} +42 -2
- package/dist/es/component/{player.mjs → player/index.mjs} +8 -8
- package/dist/es/component/playground/index.css +35 -161
- package/dist/es/component/playground/index.mjs +8 -0
- package/dist/es/component/playground-result/index.css +35 -0
- package/dist/es/component/{playground/PlaygroundResult.mjs → playground-result/index.mjs} +7 -5
- package/dist/es/component/prompt-input/index.css +330 -0
- package/dist/es/component/{playground/PromptInput.mjs → prompt-input/index.mjs} +9 -9
- package/dist/es/component/{playground/ServiceModeControl.mjs → service-mode-control/index.mjs} +4 -5
- package/dist/es/component/{shiny-text.mjs → shiny-text/index.mjs} +1 -1
- package/dist/es/component/universal-playground/index.css +341 -0
- package/dist/es/component/universal-playground/index.mjs +273 -0
- package/dist/es/component/universal-playground/providers/context-provider.mjs +52 -0
- package/dist/es/component/universal-playground/providers/storage-provider.mjs +107 -0
- package/dist/es/hooks/usePlaygroundExecution.mjs +168 -0
- package/dist/es/hooks/usePlaygroundState.mjs +176 -0
- package/dist/es/icons/avatar.mjs +28 -0
- package/dist/es/index.mjs +22 -18
- package/dist/es/{component/playground/playground-constants.mjs → utils/constants.mjs} +23 -43
- package/dist/es/{component/playground → utils}/playground-utils.mjs +1 -1
- package/dist/es/{component → utils}/replay-scripts.mjs +1 -2
- package/dist/lib/component/{blackboard.js → blackboard/index.js} +5 -5
- package/dist/lib/component/{playground/ConfigSelector.js → config-selector/index.js} +6 -7
- package/dist/lib/component/{playground/ContextPreview.js → context-preview/index.js} +8 -9
- package/dist/lib/component/{env-config.js → env-config/index.js} +1 -1
- package/dist/lib/component/{github-star.js → github-star/index.js} +1 -1
- package/dist/lib/component/history-selector/index.css +132 -0
- package/dist/lib/component/{playground/HistorySelector.js → history-selector/index.js} +1 -1
- package/dist/lib/component/index.js +60 -0
- package/dist/lib/component/{logo.js → logo/index.js} +1 -1
- package/dist/lib/component/{misc.js → misc/index.js} +60 -1
- package/dist/lib/component/{player.js → player/index.js} +23 -23
- package/dist/lib/component/playground/index.css +35 -161
- package/dist/lib/component/playground/index.js +113 -0
- package/dist/lib/component/playground-result/index.css +35 -0
- package/dist/lib/component/{playground/PlaygroundResult.js → playground-result/index.js} +12 -10
- package/dist/lib/component/prompt-input/index.css +330 -0
- package/dist/lib/component/{playground/PromptInput.js → prompt-input/index.js} +37 -37
- package/dist/lib/component/{playground/ServiceModeControl.js → service-mode-control/index.js} +8 -9
- package/dist/lib/component/{shiny-text.js → shiny-text/index.js} +1 -1
- package/dist/lib/component/universal-playground/index.css +341 -0
- package/dist/lib/component/universal-playground/index.js +321 -0
- package/dist/lib/component/universal-playground/providers/context-provider.js +95 -0
- package/dist/lib/component/universal-playground/providers/storage-provider.js +147 -0
- package/dist/lib/hooks/usePlaygroundExecution.js +202 -0
- package/dist/lib/hooks/usePlaygroundState.js +210 -0
- package/dist/lib/icons/avatar.js +62 -0
- package/dist/lib/index.js +66 -34
- package/dist/lib/{component/playground/playground-constants.js → utils/constants.js} +31 -64
- package/dist/lib/{component/playground → utils}/playground-utils.js +1 -1
- package/dist/lib/{component → utils}/replay-scripts.js +3 -4
- package/dist/types/component/{blackboard.d.ts → blackboard/index.d.ts} +2 -2
- package/dist/types/component/{playground/ConfigSelector.d.ts → config-selector/index.d.ts} +0 -1
- package/dist/types/component/{playground/ContextPreview.d.ts → context-preview/index.d.ts} +0 -1
- package/dist/types/component/{github-star.d.ts → github-star/index.d.ts} +1 -1
- package/dist/types/component/{playground/HistorySelector.d.ts → history-selector/index.d.ts} +1 -1
- package/dist/types/component/index.d.ts +1 -0
- package/dist/types/component/{logo.d.ts → logo/index.d.ts} +1 -1
- package/dist/types/component/misc/index.d.ts +6 -0
- package/dist/types/component/{player.d.ts → player/index.d.ts} +2 -2
- package/dist/types/component/playground/index.d.ts +7 -0
- package/dist/types/component/{playground/PlaygroundResult.d.ts → playground-result/index.d.ts} +3 -4
- package/dist/types/component/{playground/PromptInput.d.ts → prompt-input/index.d.ts} +3 -2
- package/dist/types/component/{playground/ServiceModeControl.d.ts → service-mode-control/index.d.ts} +0 -1
- package/dist/types/component/{shiny-text.d.ts → shiny-text/index.d.ts} +1 -1
- package/dist/types/component/universal-playground/index.d.ts +4 -0
- package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
- package/dist/types/component/universal-playground/providers/storage-provider.d.ts +33 -0
- package/dist/types/hooks/usePlaygroundExecution.d.ts +10 -0
- package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
- package/dist/types/index.d.ts +15 -10
- package/dist/types/types.d.ts +164 -0
- package/dist/types/{component/playground/playground-constants.d.ts → utils/constants.d.ts} +3 -5
- package/dist/types/{component → utils}/replay-scripts.d.ts +0 -1
- package/package.json +5 -5
- package/dist/es/blank_polyfill.mjs +0 -2
- package/dist/es/component/describer.css +0 -25
- package/dist/es/component/playground/playground-types.mjs +0 -0
- package/dist/es/init.mjs +0 -10
- package/dist/lib/blank_polyfill.js +0 -36
- package/dist/lib/component/describer.css +0 -25
- package/dist/lib/component/playground/playground-types.js +0 -18
- package/dist/lib/init.js +0 -44
- package/dist/types/blank_polyfill.d.ts +0 -2
- package/dist/types/component/misc.d.ts +0 -2
- package/dist/types/component/playground/playground-types.d.ts +0 -19
- package/dist/types/component/playground/types.d.ts +0 -72
- package/dist/types/init.d.ts +0 -1
- /package/dist/es/component/{blackboard.css → blackboard/index.css} +0 -0
- /package/dist/es/component/{playground/FormField.mjs → form-field/index.mjs} +0 -0
- /package/dist/es/component/{github-star.css → github-star/index.css} +0 -0
- /package/dist/es/component/{logo.css → logo/index.css} +0 -0
- /package/dist/es/component/{player.css → player/index.css} +0 -0
- /package/dist/es/component/{playground-demo-ui-context.json → playground/playground-demo-ui-context.json} +0 -0
- /package/dist/es/component/{shiny-text.css → shiny-text/index.css} +0 -0
- /package/dist/es/{component/playground → hooks}/useServerValid.mjs +0 -0
- /package/dist/es/{component/store → store}/history.mjs +0 -0
- /package/dist/es/{component/store → store}/store.mjs +0 -0
- /package/dist/es/{component/playground/types.mjs → types.mjs} +0 -0
- /package/dist/es/{component → utils}/color.mjs +0 -0
- /package/dist/es/{utils.mjs → utils/index.mjs} +0 -0
- /package/dist/es/{component → utils}/pixi-loader.mjs +0 -0
- /package/dist/lib/component/{blackboard.css → blackboard/index.css} +0 -0
- /package/dist/lib/component/{playground/FormField.js → form-field/index.js} +0 -0
- /package/dist/lib/component/{github-star.css → github-star/index.css} +0 -0
- /package/dist/lib/component/{logo.css → logo/index.css} +0 -0
- /package/dist/lib/component/{player.css → player/index.css} +0 -0
- /package/dist/lib/component/{playground-demo-ui-context.json → playground/playground-demo-ui-context.json} +0 -0
- /package/dist/lib/component/{shiny-text.css → shiny-text/index.css} +0 -0
- /package/dist/lib/{component/playground → hooks}/useServerValid.js +0 -0
- /package/dist/lib/{component/store → store}/history.js +0 -0
- /package/dist/lib/{component/store → store}/store.js +0 -0
- /package/dist/lib/{component/playground/types.js → types.js} +0 -0
- /package/dist/lib/{component → utils}/color.js +0 -0
- /package/dist/lib/{utils.js → utils/index.js} +0 -0
- /package/dist/lib/{component → utils}/pixi-loader.js +0 -0
- /package/dist/types/component/{env-config.d.ts → env-config/index.d.ts} +0 -0
- /package/dist/types/component/{playground/FormField.d.ts → form-field/index.d.ts} +0 -0
- /package/dist/types/{component/playground → hooks}/useServerValid.d.ts +0 -0
- /package/dist/types/{component/store → store}/history.d.ts +0 -0
- /package/dist/types/{component/store → store}/store.d.ts +0 -0
- /package/dist/types/{component → utils}/color.d.ts +0 -0
- /package/dist/types/{utils.d.ts → utils/index.d.ts} +0 -0
- /package/dist/types/{component → utils}/pixi-loader.d.ts +0 -0
- /package/dist/types/{component/playground → utils}/playground-utils.d.ts +0 -0
|
@@ -1,7 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
.result-wrapper {
|
|
2
|
+
justify-content: center;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 100%;
|
|
5
|
+
margin: 4px 0;
|
|
6
|
+
display: flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.result-wrapper .loading-container {
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
display: flex;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.result-wrapper .loading-container .loading-progress-text {
|
|
19
|
+
color: #888;
|
|
20
|
+
margin-top: 8px;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.result-wrapper pre {
|
|
25
|
+
white-space: pre-wrap;
|
|
26
|
+
text-wrap: unset;
|
|
27
|
+
word-wrap: break-word;
|
|
28
|
+
overflow-wrap: break-word;
|
|
29
|
+
background: #f2f4f7;
|
|
30
|
+
border-radius: 8px;
|
|
2
31
|
margin: 0;
|
|
3
|
-
|
|
4
|
-
|
|
32
|
+
padding: 14px;
|
|
33
|
+
overflow: scroll;
|
|
5
34
|
}
|
|
6
35
|
|
|
7
36
|
.prompt-input-wrapper {
|
|
@@ -334,164 +363,9 @@ body {
|
|
|
334
363
|
color: #2b83ff;
|
|
335
364
|
}
|
|
336
365
|
|
|
337
|
-
|
|
338
|
-
border-radius: 12px 12px 0 0;
|
|
339
|
-
flex-direction: column;
|
|
340
|
-
height: 70vh;
|
|
341
|
-
display: flex;
|
|
342
|
-
overflow: hidden;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
.history-modal-container .history-modal-header {
|
|
346
|
-
justify-content: space-between;
|
|
347
|
-
align-items: center;
|
|
348
|
-
height: 48px;
|
|
349
|
-
padding: 0 25px;
|
|
350
|
-
line-height: 48px;
|
|
351
|
-
display: flex;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
.history-modal-container .history-modal-header .close-button {
|
|
355
|
-
justify-content: center;
|
|
356
|
-
align-items: center;
|
|
357
|
-
margin-right: -4px;
|
|
358
|
-
padding: 4px;
|
|
359
|
-
display: flex;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.history-modal-container .history-modal-header .close-button .anticon {
|
|
363
|
-
color: #999;
|
|
364
|
-
font-size: 18px;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.history-modal-container .history-modal-header .close-button:hover .anticon {
|
|
368
|
-
color: #666;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.history-modal-container .history-search-section {
|
|
372
|
-
background: #fff;
|
|
373
|
-
padding: 16px 20px;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
.history-modal-container .history-search-section .search-input-wrapper {
|
|
377
|
-
color: rgba(0, 0, 0, .25);
|
|
378
|
-
align-items: center;
|
|
379
|
-
gap: 12px;
|
|
380
|
-
display: flex;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.history-modal-container .history-search-section .search-input-wrapper .search-input {
|
|
384
|
-
background: #f1f2f3;
|
|
385
|
-
border: none;
|
|
386
|
-
border-radius: 16px;
|
|
387
|
-
flex: 1;
|
|
388
|
-
height: 36px;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.history-modal-container .history-search-section .search-input-wrapper .search-input .ant-input {
|
|
392
|
-
box-shadow: none;
|
|
393
|
-
background: none;
|
|
394
|
-
border: none;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.history-modal-container .history-search-section .search-input-wrapper .search-input:hover, .history-modal-container .history-search-section .search-input-wrapper .search-input:focus-within {
|
|
398
|
-
background: #fff;
|
|
399
|
-
border-color: #d9d9d9;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
.history-modal-container .history-search-section .search-input-wrapper .clear-button {
|
|
403
|
-
color: #1890ff;
|
|
404
|
-
height: auto;
|
|
405
|
-
padding: 0;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.history-modal-container .history-search-section .search-input-wrapper .clear-button:hover {
|
|
409
|
-
color: #40a9ff;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
.history-modal-container .history-content {
|
|
413
|
-
flex: 1;
|
|
414
|
-
padding: 0 25px 25px;
|
|
415
|
-
overflow-y: auto;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
.history-modal-container .history-content .history-group {
|
|
419
|
-
margin-bottom: 10px;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.history-modal-container .history-content .history-group .history-group-title {
|
|
423
|
-
color: rgba(0, 0, 0, .45);
|
|
424
|
-
height: 40px;
|
|
425
|
-
font-size: 12px;
|
|
426
|
-
font-weight: 400;
|
|
427
|
-
line-height: 40px;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
.history-modal-container .history-content .history-group .history-item {
|
|
431
|
-
cursor: pointer;
|
|
432
|
-
color: rgba(0, 0, 0, .85);
|
|
433
|
-
white-space: nowrap;
|
|
434
|
-
text-overflow: ellipsis;
|
|
435
|
-
height: 40px;
|
|
436
|
-
font-size: 14px;
|
|
437
|
-
line-height: 40px;
|
|
438
|
-
overflow: hidden;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.history-modal-container .history-content .history-group .history-item:hover {
|
|
442
|
-
background: #f2f4f7;
|
|
443
|
-
margin: 0 -8px;
|
|
444
|
-
padding: 0 8px;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.history-modal-container .history-content .no-results {
|
|
448
|
-
text-align: center;
|
|
449
|
-
color: #999;
|
|
450
|
-
padding: 40px 20px;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.ant-modal-wrap .ant-modal-content {
|
|
454
|
-
animation: .3s cubic-bezier(.4, 0, .2, 1) forwards slideUpFromBottom !important;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
@keyframes slideUpFromBottom {
|
|
458
|
-
0% {
|
|
459
|
-
opacity: 0;
|
|
460
|
-
transform: translateY(100%);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
100% {
|
|
464
|
-
opacity: 1;
|
|
465
|
-
transform: translateY(0);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
.result-wrapper {
|
|
470
|
-
justify-content: center;
|
|
471
|
-
height: 100%;
|
|
472
|
-
margin: 4px 0;
|
|
473
|
-
display: flex;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.result-wrapper .loading-container {
|
|
477
|
-
text-align: center;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
.result-wrapper .loading-container .loading-progress-text {
|
|
481
|
-
color: #888;
|
|
482
|
-
margin-top: 8px;
|
|
483
|
-
font-size: 12px;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
.result-wrapper pre {
|
|
487
|
-
white-space: pre-wrap;
|
|
488
|
-
text-wrap: unset;
|
|
489
|
-
word-wrap: break-word;
|
|
490
|
-
overflow-wrap: break-word;
|
|
491
|
-
background: #f2f4f7;
|
|
492
|
-
border-radius: 8px;
|
|
366
|
+
body {
|
|
493
367
|
margin: 0;
|
|
494
|
-
|
|
495
|
-
|
|
368
|
+
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji;
|
|
369
|
+
font-size: 14px;
|
|
496
370
|
}
|
|
497
371
|
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"../../hooks/useServerValid": function(module) {
|
|
4
|
+
module.exports = require("../../hooks/useServerValid.js");
|
|
5
|
+
},
|
|
6
|
+
"../../store/store": function(module) {
|
|
7
|
+
module.exports = require("../../store/store.js");
|
|
8
|
+
},
|
|
9
|
+
"../../types": function(module) {
|
|
10
|
+
module.exports = require("../../types.js");
|
|
11
|
+
},
|
|
12
|
+
"../context-preview": function(module) {
|
|
13
|
+
module.exports = require("../context-preview/index.js");
|
|
14
|
+
},
|
|
15
|
+
"../playground-result": function(module) {
|
|
16
|
+
module.exports = require("../playground-result/index.js");
|
|
17
|
+
},
|
|
18
|
+
"../prompt-input": function(module) {
|
|
19
|
+
module.exports = require("../prompt-input/index.js");
|
|
20
|
+
},
|
|
21
|
+
"../service-mode-control": function(module) {
|
|
22
|
+
module.exports = require("../service-mode-control/index.js");
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
var __webpack_module_cache__ = {};
|
|
26
|
+
function __webpack_require__(moduleId) {
|
|
27
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
28
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
29
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
30
|
+
exports: {}
|
|
31
|
+
};
|
|
32
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
33
|
+
return module.exports;
|
|
34
|
+
}
|
|
35
|
+
(()=>{
|
|
36
|
+
__webpack_require__.n = (module)=>{
|
|
37
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
38
|
+
__webpack_require__.d(getter, {
|
|
39
|
+
a: getter
|
|
40
|
+
});
|
|
41
|
+
return getter;
|
|
42
|
+
};
|
|
43
|
+
})();
|
|
44
|
+
(()=>{
|
|
45
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
46
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: definition[key]
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
})();
|
|
52
|
+
(()=>{
|
|
53
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
54
|
+
})();
|
|
55
|
+
(()=>{
|
|
56
|
+
__webpack_require__.r = (exports1)=>{
|
|
57
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
58
|
+
value: 'Module'
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
61
|
+
value: true
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
})();
|
|
65
|
+
var __webpack_exports__ = {};
|
|
66
|
+
(()=>{
|
|
67
|
+
__webpack_require__.r(__webpack_exports__);
|
|
68
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
69
|
+
ContextPreview: ()=>_context_preview__WEBPACK_IMPORTED_MODULE_0__.ContextPreview,
|
|
70
|
+
PlaygroundResultView: ()=>_playground_result__WEBPACK_IMPORTED_MODULE_1__.PlaygroundResultView,
|
|
71
|
+
PromptInput: ()=>_prompt_input__WEBPACK_IMPORTED_MODULE_2__.PromptInput,
|
|
72
|
+
ServiceModeControl: ()=>_service_mode_control__WEBPACK_IMPORTED_MODULE_4__.ServiceModeControl,
|
|
73
|
+
useEnvConfig: ()=>_store_store__WEBPACK_IMPORTED_MODULE_6__.useEnvConfig,
|
|
74
|
+
useServerValid: ()=>_hooks_useServerValid__WEBPACK_IMPORTED_MODULE_3__.useServerValid
|
|
75
|
+
});
|
|
76
|
+
var _context_preview__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../context-preview");
|
|
77
|
+
var _playground_result__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../playground-result");
|
|
78
|
+
var _prompt_input__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../prompt-input");
|
|
79
|
+
var _hooks_useServerValid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../hooks/useServerValid");
|
|
80
|
+
var _service_mode_control__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../service-mode-control");
|
|
81
|
+
var _types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../types");
|
|
82
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
83
|
+
for(var __WEBPACK_IMPORT_KEY__ in _types__WEBPACK_IMPORTED_MODULE_5__)if ([
|
|
84
|
+
"PromptInput",
|
|
85
|
+
"ContextPreview",
|
|
86
|
+
"ServiceModeControl",
|
|
87
|
+
"default",
|
|
88
|
+
"PlaygroundResultView",
|
|
89
|
+
"useEnvConfig",
|
|
90
|
+
"useServerValid"
|
|
91
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
92
|
+
return _types__WEBPACK_IMPORTED_MODULE_5__[key];
|
|
93
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
94
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
95
|
+
var _store_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../store/store");
|
|
96
|
+
})();
|
|
97
|
+
exports.ContextPreview = __webpack_exports__.ContextPreview;
|
|
98
|
+
exports.PlaygroundResultView = __webpack_exports__.PlaygroundResultView;
|
|
99
|
+
exports.PromptInput = __webpack_exports__.PromptInput;
|
|
100
|
+
exports.ServiceModeControl = __webpack_exports__.ServiceModeControl;
|
|
101
|
+
exports.useEnvConfig = __webpack_exports__.useEnvConfig;
|
|
102
|
+
exports.useServerValid = __webpack_exports__.useServerValid;
|
|
103
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
104
|
+
"ContextPreview",
|
|
105
|
+
"PlaygroundResultView",
|
|
106
|
+
"PromptInput",
|
|
107
|
+
"ServiceModeControl",
|
|
108
|
+
"useEnvConfig",
|
|
109
|
+
"useServerValid"
|
|
110
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
111
|
+
Object.defineProperty(exports, '__esModule', {
|
|
112
|
+
value: true
|
|
113
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.result-wrapper {
|
|
2
|
+
justify-content: center;
|
|
3
|
+
align-items: center;
|
|
4
|
+
height: 100%;
|
|
5
|
+
margin: 4px 0;
|
|
6
|
+
display: flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.result-wrapper .loading-container {
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
display: flex;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.result-wrapper .loading-container .loading-progress-text {
|
|
19
|
+
color: #888;
|
|
20
|
+
margin-top: 8px;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.result-wrapper pre {
|
|
25
|
+
white-space: pre-wrap;
|
|
26
|
+
text-wrap: unset;
|
|
27
|
+
word-wrap: break-word;
|
|
28
|
+
overflow-wrap: break-word;
|
|
29
|
+
background: #f2f4f7;
|
|
30
|
+
border-radius: 8px;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 14px;
|
|
33
|
+
overflow: scroll;
|
|
34
|
+
}
|
|
35
|
+
|
|
@@ -38,17 +38,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
39
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
40
40
|
const external_antd_namespaceObject = require("antd");
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
require("./index.css");
|
|
41
|
+
const index_js_namespaceObject = require("../misc/index.js");
|
|
42
|
+
const external_player_index_js_namespaceObject = require("../player/index.js");
|
|
43
|
+
const external_shiny_text_index_js_namespaceObject = require("../shiny-text/index.js");
|
|
44
|
+
var external_shiny_text_index_js_default = /*#__PURE__*/ __webpack_require__.n(external_shiny_text_index_js_namespaceObject);
|
|
46
45
|
const PlaygroundResultView = (param)=>{
|
|
47
46
|
let { result, loading, serverValid, serviceMode, replayScriptsInfo, replayCounter, loadingProgressText, verticalMode = false, notReadyMessage, fitMode, autoZoom } = param;
|
|
48
47
|
let resultWrapperClassName = 'result-wrapper';
|
|
49
48
|
if (verticalMode) resultWrapperClassName += ' vertical-mode-result';
|
|
50
49
|
if (replayScriptsInfo && verticalMode) resultWrapperClassName += ' result-wrapper-compact';
|
|
51
|
-
let resultDataToShow =
|
|
50
|
+
let resultDataToShow = index_js_namespaceObject.emptyResultTip;
|
|
52
51
|
if (serverValid || 'Server' !== serviceMode) {
|
|
53
52
|
if (loading) resultDataToShow = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
54
53
|
className: "loading-container",
|
|
@@ -61,14 +60,14 @@ const PlaygroundResultView = (param)=>{
|
|
|
61
60
|
}),
|
|
62
61
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
63
62
|
className: "loading-progress-text loading-progress-text-progress",
|
|
64
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
63
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_shiny_text_index_js_default(), {
|
|
65
64
|
text: loadingProgressText,
|
|
66
65
|
speed: 3
|
|
67
66
|
})
|
|
68
67
|
})
|
|
69
68
|
]
|
|
70
69
|
});
|
|
71
|
-
else if (replayScriptsInfo) resultDataToShow = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
70
|
+
else if (replayScriptsInfo) resultDataToShow = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_player_index_js_namespaceObject.Player, {
|
|
72
71
|
replayScripts: replayScriptsInfo.scripts,
|
|
73
72
|
imageWidth: replayScriptsInfo.width,
|
|
74
73
|
imageHeight: replayScriptsInfo.height,
|
|
@@ -84,14 +83,17 @@ const PlaygroundResultView = (param)=>{
|
|
|
84
83
|
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("pre", {
|
|
85
84
|
children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
|
|
86
85
|
});
|
|
87
|
-
} else resultDataToShow = (0,
|
|
86
|
+
} else resultDataToShow = (0, index_js_namespaceObject.serverLaunchTip)(notReadyMessage);
|
|
88
87
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
89
88
|
className: resultWrapperClassName,
|
|
90
89
|
style: {
|
|
91
90
|
height: '100%',
|
|
92
91
|
display: 'flex',
|
|
93
92
|
flexDirection: 'column',
|
|
94
|
-
flex: '1 1 auto'
|
|
93
|
+
flex: '1 1 auto',
|
|
94
|
+
justifyContent: 'center',
|
|
95
|
+
alignItems: 'center',
|
|
96
|
+
textAlign: 'center'
|
|
95
97
|
},
|
|
96
98
|
children: resultDataToShow
|
|
97
99
|
});
|