@godscene/visualizer 1.7.11
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/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/es/component/blackboard/highlights.mjs +47 -0
- package/dist/es/component/blackboard/index.css +118 -0
- package/dist/es/component/blackboard/index.mjs +122 -0
- package/dist/es/component/config-selector/index.mjs +251 -0
- package/dist/es/component/context-preview/index.mjs +37 -0
- package/dist/es/component/env-config/index.mjs +237 -0
- package/dist/es/component/env-config-reminder/index.css +30 -0
- package/dist/es/component/env-config-reminder/index.mjs +27 -0
- package/dist/es/component/form-field/index.mjs +158 -0
- package/dist/es/component/history-selector/index.css +237 -0
- package/dist/es/component/history-selector/index.mjs +197 -0
- package/dist/es/component/index.mjs +1 -0
- package/dist/es/component/logo/index.css +19 -0
- package/dist/es/component/logo/index.mjs +20 -0
- package/dist/es/component/logo/logo.mjs +2 -0
- package/dist/es/component/misc/index.mjs +96 -0
- package/dist/es/component/nav-actions/index.mjs +14 -0
- package/dist/es/component/nav-actions/style.css +35 -0
- package/dist/es/component/player/index.css +296 -0
- package/dist/es/component/player/index.mjs +702 -0
- package/dist/es/component/player/playback-controls.mjs +4 -0
- package/dist/es/component/player/report-download.mjs +61 -0
- package/dist/es/component/player/scenes/StepScene.mjs +194 -0
- package/dist/es/component/player/scenes/derive-frame-state.mjs +229 -0
- package/dist/es/component/player/scenes/export-branded-video.mjs +360 -0
- package/dist/es/component/player/scenes/frame-calculator.mjs +149 -0
- package/dist/es/component/player/scenes/playback-frame.mjs +6 -0
- package/dist/es/component/player/scenes/playback-layout.mjs +12 -0
- package/dist/es/component/player/scenes/pointer-layout.mjs +36 -0
- package/dist/es/component/player/use-frame-player.mjs +87 -0
- package/dist/es/component/playground/index.css +930 -0
- package/dist/es/component/playground/playground-demo-ui-context.json +290 -0
- package/dist/es/component/playground-result/index.css +92 -0
- package/dist/es/component/playground-result/index.mjs +232 -0
- package/dist/es/component/prompt-input/index.css +832 -0
- package/dist/es/component/prompt-input/index.mjs +959 -0
- package/dist/es/component/screenshot-viewer/index.css +237 -0
- package/dist/es/component/screenshot-viewer/index.mjs +319 -0
- package/dist/es/component/service-mode-control/index.mjs +107 -0
- package/dist/es/component/shiny-text/index.css +107 -0
- package/dist/es/component/shiny-text/index.mjs +15 -0
- package/dist/es/component/universal-playground/empty-state.mjs +5 -0
- package/dist/es/component/universal-playground/index.css +619 -0
- package/dist/es/component/universal-playground/index.mjs +558 -0
- package/dist/es/component/universal-playground/providers/context-provider.mjs +90 -0
- package/dist/es/component/universal-playground/providers/indexeddb-storage-provider.mjs +280 -0
- package/dist/es/component/universal-playground/providers/storage-provider.mjs +279 -0
- package/dist/es/component/universal-playground/universal-playground-electron.mjs +668 -0
- package/dist/es/hooks/useMinimalTypeGate.mjs +47 -0
- package/dist/es/hooks/usePlaygroundExecution.mjs +435 -0
- package/dist/es/hooks/usePlaygroundState.mjs +278 -0
- package/dist/es/hooks/useSafeOverrideAIConfig.mjs +20 -0
- package/dist/es/hooks/useServerValid.mjs +55 -0
- package/dist/es/hooks/useTheme.mjs +25 -0
- package/dist/es/icons/action-chevron.mjs +61 -0
- package/dist/es/icons/avatar.mjs +70 -0
- package/dist/es/icons/close.mjs +61 -0
- package/dist/es/icons/global-perspective.mjs +58 -0
- package/dist/es/icons/history.mjs +72 -0
- package/dist/es/icons/magnifying-glass.mjs +81 -0
- package/dist/es/icons/player-setting.mjs +68 -0
- package/dist/es/icons/prompt-history.mjs +70 -0
- package/dist/es/icons/setting.mjs +62 -0
- package/dist/es/icons/show-marker.mjs +58 -0
- package/dist/es/index.mjs +26 -0
- package/dist/es/static/image/logo.png +0 -0
- package/dist/es/store/history.mjs +128 -0
- package/dist/es/store/store.mjs +277 -0
- package/dist/es/types.mjs +73 -0
- package/dist/es/utils/action-label.mjs +15 -0
- package/dist/es/utils/color.mjs +35 -0
- package/dist/es/utils/constants.mjs +99 -0
- package/dist/es/utils/device-capabilities.mjs +13 -0
- package/dist/es/utils/empty-state-scroll.mjs +8 -0
- package/dist/es/utils/highlight-element.mjs +62 -0
- package/dist/es/utils/index.mjs +13 -0
- package/dist/es/utils/playground-utils.mjs +43 -0
- package/dist/es/utils/progress-action-icon.mjs +30 -0
- package/dist/es/utils/prompt-input-utils.mjs +49 -0
- package/dist/es/utils/prompt-placeholder.mjs +19 -0
- package/dist/es/utils/replay-scripts.mjs +428 -0
- package/dist/lib/component/blackboard/highlights.js +84 -0
- package/dist/lib/component/blackboard/index.css +118 -0
- package/dist/lib/component/blackboard/index.js +169 -0
- package/dist/lib/component/config-selector/index.js +295 -0
- package/dist/lib/component/context-preview/index.js +82 -0
- package/dist/lib/component/env-config/index.js +271 -0
- package/dist/lib/component/env-config-reminder/index.css +30 -0
- package/dist/lib/component/env-config-reminder/index.js +61 -0
- package/dist/lib/component/form-field/index.js +204 -0
- package/dist/lib/component/history-selector/index.css +237 -0
- package/dist/lib/component/history-selector/index.js +243 -0
- package/dist/lib/component/index.js +58 -0
- package/dist/lib/component/logo/index.css +19 -0
- package/dist/lib/component/logo/index.js +67 -0
- package/dist/lib/component/logo/logo.js +24 -0
- package/dist/lib/component/misc/index.js +152 -0
- package/dist/lib/component/nav-actions/index.js +48 -0
- package/dist/lib/component/nav-actions/style.css +35 -0
- package/dist/lib/component/player/index.css +296 -0
- package/dist/lib/component/player/index.js +747 -0
- package/dist/lib/component/player/playback-controls.js +38 -0
- package/dist/lib/component/player/report-download.js +98 -0
- package/dist/lib/component/player/scenes/StepScene.js +228 -0
- package/dist/lib/component/player/scenes/derive-frame-state.js +266 -0
- package/dist/lib/component/player/scenes/export-branded-video.js +403 -0
- package/dist/lib/component/player/scenes/frame-calculator.js +186 -0
- package/dist/lib/component/player/scenes/playback-frame.js +40 -0
- package/dist/lib/component/player/scenes/playback-layout.js +46 -0
- package/dist/lib/component/player/scenes/pointer-layout.js +88 -0
- package/dist/lib/component/player/use-frame-player.js +121 -0
- package/dist/lib/component/playground/index.css +930 -0
- package/dist/lib/component/playground/playground-demo-ui-context.json +290 -0
- package/dist/lib/component/playground-result/index.css +92 -0
- package/dist/lib/component/playground-result/index.js +276 -0
- package/dist/lib/component/prompt-input/index.css +832 -0
- package/dist/lib/component/prompt-input/index.js +1005 -0
- package/dist/lib/component/screenshot-viewer/index.css +237 -0
- package/dist/lib/component/screenshot-viewer/index.js +353 -0
- package/dist/lib/component/service-mode-control/index.js +141 -0
- package/dist/lib/component/shiny-text/index.css +107 -0
- package/dist/lib/component/shiny-text/index.js +49 -0
- package/dist/lib/component/universal-playground/empty-state.js +39 -0
- package/dist/lib/component/universal-playground/index.css +619 -0
- package/dist/lib/component/universal-playground/index.js +607 -0
- package/dist/lib/component/universal-playground/providers/context-provider.js +133 -0
- package/dist/lib/component/universal-playground/providers/indexeddb-storage-provider.js +320 -0
- package/dist/lib/component/universal-playground/providers/storage-provider.js +337 -0
- package/dist/lib/component/universal-playground/universal-playground-electron.js +717 -0
- package/dist/lib/hooks/useMinimalTypeGate.js +81 -0
- package/dist/lib/hooks/usePlaygroundExecution.js +478 -0
- package/dist/lib/hooks/usePlaygroundState.js +312 -0
- package/dist/lib/hooks/useSafeOverrideAIConfig.js +57 -0
- package/dist/lib/hooks/useServerValid.js +89 -0
- package/dist/lib/hooks/useTheme.js +59 -0
- package/dist/lib/icons/action-chevron.js +95 -0
- package/dist/lib/icons/avatar.js +104 -0
- package/dist/lib/icons/close.js +95 -0
- package/dist/lib/icons/global-perspective.js +92 -0
- package/dist/lib/icons/history.js +106 -0
- package/dist/lib/icons/magnifying-glass.js +115 -0
- package/dist/lib/icons/player-setting.js +102 -0
- package/dist/lib/icons/prompt-history.js +104 -0
- package/dist/lib/icons/setting.js +96 -0
- package/dist/lib/icons/show-marker.js +92 -0
- package/dist/lib/index.js +204 -0
- package/dist/lib/static/image/logo.png +0 -0
- package/dist/lib/store/history.js +135 -0
- package/dist/lib/store/store.js +287 -0
- package/dist/lib/types.js +119 -0
- package/dist/lib/utils/action-label.js +52 -0
- package/dist/lib/utils/color.js +75 -0
- package/dist/lib/utils/constants.js +172 -0
- package/dist/lib/utils/device-capabilities.js +50 -0
- package/dist/lib/utils/empty-state-scroll.js +42 -0
- package/dist/lib/utils/highlight-element.js +99 -0
- package/dist/lib/utils/index.js +69 -0
- package/dist/lib/utils/playground-utils.js +86 -0
- package/dist/lib/utils/progress-action-icon.js +67 -0
- package/dist/lib/utils/prompt-input-utils.js +89 -0
- package/dist/lib/utils/prompt-placeholder.js +53 -0
- package/dist/lib/utils/replay-scripts.js +474 -0
- package/dist/types/component/blackboard/highlights.d.ts +11 -0
- package/dist/types/component/blackboard/index.d.ts +10 -0
- package/dist/types/component/config-selector/index.d.ts +15 -0
- package/dist/types/component/context-preview/index.d.ts +9 -0
- package/dist/types/component/env-config/index.d.ts +8 -0
- package/dist/types/component/env-config-reminder/index.d.ts +6 -0
- package/dist/types/component/form-field/index.d.ts +17 -0
- package/dist/types/component/history-selector/index.d.ts +13 -0
- package/dist/types/component/index.d.ts +1 -0
- package/dist/types/component/logo/index.d.ts +5 -0
- package/dist/types/component/misc/index.d.ts +6 -0
- package/dist/types/component/nav-actions/index.d.ts +12 -0
- package/dist/types/component/player/index.d.ts +15 -0
- package/dist/types/component/player/playback-controls.d.ts +1 -0
- package/dist/types/component/player/report-download.d.ts +32 -0
- package/dist/types/component/player/scenes/StepScene.d.ts +9 -0
- package/dist/types/component/player/scenes/derive-frame-state.d.ts +40 -0
- package/dist/types/component/player/scenes/export-branded-video.d.ts +33 -0
- package/dist/types/component/player/scenes/frame-calculator.d.ts +40 -0
- package/dist/types/component/player/scenes/playback-frame.d.ts +3 -0
- package/dist/types/component/player/scenes/playback-layout.d.ts +7 -0
- package/dist/types/component/player/scenes/pointer-layout.d.ts +20 -0
- package/dist/types/component/player/use-frame-player.d.ts +17 -0
- package/dist/types/component/playground-result/index.d.ts +22 -0
- package/dist/types/component/prompt-input/index.d.ts +23 -0
- package/dist/types/component/screenshot-viewer/index.d.ts +23 -0
- package/dist/types/component/service-mode-control/index.d.ts +6 -0
- package/dist/types/component/shiny-text/index.d.ts +12 -0
- package/dist/types/component/universal-playground/empty-state.d.ts +3 -0
- 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/indexeddb-storage-provider.d.ts +71 -0
- package/dist/types/component/universal-playground/providers/storage-provider.d.ts +58 -0
- package/dist/types/component/universal-playground/universal-playground-electron.d.ts +4 -0
- package/dist/types/hooks/useMinimalTypeGate.d.ts +72 -0
- package/dist/types/hooks/usePlaygroundExecution.d.ts +40 -0
- package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
- package/dist/types/hooks/useSafeOverrideAIConfig.d.ts +16 -0
- package/dist/types/hooks/useServerValid.d.ts +1 -0
- package/dist/types/hooks/useTheme.d.ts +7 -0
- package/dist/types/index.d.ts +29 -0
- package/dist/types/store/history.d.ts +16 -0
- package/dist/types/store/store.d.ts +57 -0
- package/dist/types/types.d.ts +278 -0
- package/dist/types/utils/action-label.d.ts +11 -0
- package/dist/types/utils/color.d.ts +4 -0
- package/dist/types/utils/constants.d.ts +80 -0
- package/dist/types/utils/device-capabilities.d.ts +9 -0
- package/dist/types/utils/empty-state-scroll.d.ts +11 -0
- package/dist/types/utils/highlight-element.d.ts +3 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/utils/playground-utils.d.ts +11 -0
- package/dist/types/utils/progress-action-icon.d.ts +12 -0
- package/dist/types/utils/prompt-input-utils.d.ts +24 -0
- package/dist/types/utils/prompt-placeholder.d.ts +1 -0
- package/dist/types/utils/replay-scripts.d.ts +50 -0
- package/package.json +82 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { LoadingOutlined } from "@ant-design/icons";
|
|
3
|
+
import { noReplayAPIs } from "@godscene/playground";
|
|
4
|
+
import { Spin } from "antd";
|
|
5
|
+
import { emptyResultTip, serverLaunchTip } from "../misc/index.mjs";
|
|
6
|
+
import { Player } from "../player/index.mjs";
|
|
7
|
+
import shiny_text from "../shiny-text/index.mjs";
|
|
8
|
+
import "./index.css";
|
|
9
|
+
const PlaygroundResultView = ({ result, loading, serverValid, serviceMode, replayScriptsInfo, replayCounter, loadingProgressText, verticalMode = false, notReadyMessage, fitMode, autoZoom, actionType, canDownloadReport, onDownloadReport })=>{
|
|
10
|
+
let resultWrapperClassName = 'result-wrapper';
|
|
11
|
+
if (verticalMode) resultWrapperClassName += ' vertical-mode-result';
|
|
12
|
+
if (replayScriptsInfo && verticalMode) resultWrapperClassName += ' result-wrapper-compact';
|
|
13
|
+
let resultDataToShow = emptyResultTip;
|
|
14
|
+
const shouldPrioritizeResult = actionType && noReplayAPIs.includes(actionType);
|
|
15
|
+
if (serverValid || 'Server' !== serviceMode) {
|
|
16
|
+
if (loading) resultDataToShow = /*#__PURE__*/ jsxs("div", {
|
|
17
|
+
className: "loading-container",
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ jsx(Spin, {
|
|
20
|
+
spinning: loading,
|
|
21
|
+
indicator: /*#__PURE__*/ jsx(LoadingOutlined, {
|
|
22
|
+
spin: true
|
|
23
|
+
})
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ jsx("div", {
|
|
26
|
+
className: "loading-progress-text loading-progress-text-progress",
|
|
27
|
+
children: /*#__PURE__*/ jsx(shiny_text, {
|
|
28
|
+
text: loadingProgressText,
|
|
29
|
+
speed: 3
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
else if (null == result ? void 0 : result.error) {
|
|
35
|
+
var _result_error;
|
|
36
|
+
const errorNode = /*#__PURE__*/ jsx("pre", {
|
|
37
|
+
style: {
|
|
38
|
+
color: '#ff4d4f',
|
|
39
|
+
whiteSpace: 'pre-wrap'
|
|
40
|
+
},
|
|
41
|
+
children: null == result ? void 0 : null == (_result_error = result.error) ? void 0 : _result_error.split('\n')[0]
|
|
42
|
+
});
|
|
43
|
+
resultDataToShow = result.reportHTML || replayScriptsInfo ? /*#__PURE__*/ jsxs("div", {
|
|
44
|
+
className: "combined-result-layout",
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ jsxs("div", {
|
|
47
|
+
style: {
|
|
48
|
+
flex: '0 0 auto',
|
|
49
|
+
maxHeight: '40%',
|
|
50
|
+
overflow: 'auto'
|
|
51
|
+
},
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ jsx("div", {
|
|
54
|
+
style: {
|
|
55
|
+
fontWeight: 'bold',
|
|
56
|
+
marginBottom: '8px'
|
|
57
|
+
},
|
|
58
|
+
children: "Error:"
|
|
59
|
+
}),
|
|
60
|
+
errorNode
|
|
61
|
+
]
|
|
62
|
+
}),
|
|
63
|
+
/*#__PURE__*/ jsxs("div", {
|
|
64
|
+
className: "combined-result-section",
|
|
65
|
+
children: [
|
|
66
|
+
/*#__PURE__*/ jsx("div", {
|
|
67
|
+
style: {
|
|
68
|
+
fontWeight: 'bold',
|
|
69
|
+
marginBottom: '8px'
|
|
70
|
+
},
|
|
71
|
+
children: "Report:"
|
|
72
|
+
}),
|
|
73
|
+
/*#__PURE__*/ jsx("div", {
|
|
74
|
+
className: "combined-result-player",
|
|
75
|
+
children: /*#__PURE__*/ jsx(Player, {
|
|
76
|
+
replayScripts: null == replayScriptsInfo ? void 0 : replayScriptsInfo.scripts,
|
|
77
|
+
imageWidth: null == replayScriptsInfo ? void 0 : replayScriptsInfo.width,
|
|
78
|
+
imageHeight: null == replayScriptsInfo ? void 0 : replayScriptsInfo.height,
|
|
79
|
+
reportFileContent: result.reportHTML || null,
|
|
80
|
+
fitMode: fitMode,
|
|
81
|
+
autoZoom: autoZoom,
|
|
82
|
+
canDownloadReport: null != canDownloadReport ? canDownloadReport : 'In-Browser' !== serviceMode,
|
|
83
|
+
onDownloadReport: onDownloadReport
|
|
84
|
+
}, replayCounter)
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
}) : errorNode;
|
|
90
|
+
} else if (shouldPrioritizeResult && (null == result ? void 0 : result.result) !== void 0 && replayScriptsInfo) {
|
|
91
|
+
const resultOutput = 'string' == typeof (null == result ? void 0 : result.result) ? /*#__PURE__*/ jsx("pre", {
|
|
92
|
+
children: null == result ? void 0 : result.result
|
|
93
|
+
}) : /*#__PURE__*/ jsx("pre", {
|
|
94
|
+
children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
|
|
95
|
+
});
|
|
96
|
+
const reportContent = (null == result ? void 0 : result.reportHTML) || null;
|
|
97
|
+
resultDataToShow = /*#__PURE__*/ jsxs("div", {
|
|
98
|
+
className: "combined-result-layout",
|
|
99
|
+
children: [
|
|
100
|
+
/*#__PURE__*/ jsxs("div", {
|
|
101
|
+
style: {
|
|
102
|
+
flex: '0 0 auto'
|
|
103
|
+
},
|
|
104
|
+
children: [
|
|
105
|
+
/*#__PURE__*/ jsx("div", {
|
|
106
|
+
style: {
|
|
107
|
+
fontWeight: 'bold',
|
|
108
|
+
marginBottom: '8px'
|
|
109
|
+
},
|
|
110
|
+
children: "Output:"
|
|
111
|
+
}),
|
|
112
|
+
resultOutput
|
|
113
|
+
]
|
|
114
|
+
}),
|
|
115
|
+
/*#__PURE__*/ jsxs("div", {
|
|
116
|
+
className: "combined-result-section",
|
|
117
|
+
children: [
|
|
118
|
+
/*#__PURE__*/ jsx("div", {
|
|
119
|
+
style: {
|
|
120
|
+
fontWeight: 'bold',
|
|
121
|
+
marginBottom: '8px'
|
|
122
|
+
},
|
|
123
|
+
children: "Report:"
|
|
124
|
+
}),
|
|
125
|
+
/*#__PURE__*/ jsx("div", {
|
|
126
|
+
className: "combined-result-player",
|
|
127
|
+
children: /*#__PURE__*/ jsx(Player, {
|
|
128
|
+
replayScripts: replayScriptsInfo.scripts,
|
|
129
|
+
imageWidth: replayScriptsInfo.width,
|
|
130
|
+
imageHeight: replayScriptsInfo.height,
|
|
131
|
+
reportFileContent: reportContent,
|
|
132
|
+
fitMode: fitMode,
|
|
133
|
+
autoZoom: autoZoom,
|
|
134
|
+
canDownloadReport: null != canDownloadReport ? canDownloadReport : 'In-Browser' !== serviceMode,
|
|
135
|
+
onDownloadReport: onDownloadReport
|
|
136
|
+
}, replayCounter)
|
|
137
|
+
})
|
|
138
|
+
]
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
});
|
|
142
|
+
} else if (replayScriptsInfo) {
|
|
143
|
+
const reportContent = (null == result ? void 0 : result.reportHTML) || null;
|
|
144
|
+
resultDataToShow = /*#__PURE__*/ jsx(Player, {
|
|
145
|
+
replayScripts: replayScriptsInfo.scripts,
|
|
146
|
+
imageWidth: replayScriptsInfo.width,
|
|
147
|
+
imageHeight: replayScriptsInfo.height,
|
|
148
|
+
reportFileContent: reportContent,
|
|
149
|
+
fitMode: fitMode,
|
|
150
|
+
autoZoom: autoZoom,
|
|
151
|
+
canDownloadReport: null != canDownloadReport ? canDownloadReport : 'In-Browser' !== serviceMode,
|
|
152
|
+
onDownloadReport: onDownloadReport
|
|
153
|
+
}, replayCounter);
|
|
154
|
+
} else if (shouldPrioritizeResult && (null == result ? void 0 : result.result) !== void 0 && (null == result ? void 0 : result.reportHTML)) {
|
|
155
|
+
const resultOutput = 'string' == typeof (null == result ? void 0 : result.result) ? /*#__PURE__*/ jsx("pre", {
|
|
156
|
+
children: null == result ? void 0 : result.result
|
|
157
|
+
}) : /*#__PURE__*/ jsx("pre", {
|
|
158
|
+
children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
|
|
159
|
+
});
|
|
160
|
+
resultDataToShow = /*#__PURE__*/ jsxs("div", {
|
|
161
|
+
className: "combined-result-layout",
|
|
162
|
+
children: [
|
|
163
|
+
/*#__PURE__*/ jsxs("div", {
|
|
164
|
+
style: {
|
|
165
|
+
flex: '0 0 auto'
|
|
166
|
+
},
|
|
167
|
+
children: [
|
|
168
|
+
/*#__PURE__*/ jsx("div", {
|
|
169
|
+
style: {
|
|
170
|
+
fontWeight: 'bold',
|
|
171
|
+
marginBottom: '8px'
|
|
172
|
+
},
|
|
173
|
+
children: "Output:"
|
|
174
|
+
}),
|
|
175
|
+
resultOutput
|
|
176
|
+
]
|
|
177
|
+
}),
|
|
178
|
+
/*#__PURE__*/ jsxs("div", {
|
|
179
|
+
className: "combined-result-section",
|
|
180
|
+
children: [
|
|
181
|
+
/*#__PURE__*/ jsx("div", {
|
|
182
|
+
style: {
|
|
183
|
+
fontWeight: 'bold',
|
|
184
|
+
marginBottom: '8px'
|
|
185
|
+
},
|
|
186
|
+
children: "Report:"
|
|
187
|
+
}),
|
|
188
|
+
/*#__PURE__*/ jsx("div", {
|
|
189
|
+
className: "combined-result-player",
|
|
190
|
+
children: /*#__PURE__*/ jsx(Player, {
|
|
191
|
+
reportFileContent: result.reportHTML,
|
|
192
|
+
fitMode: fitMode,
|
|
193
|
+
autoZoom: autoZoom,
|
|
194
|
+
canDownloadReport: null != canDownloadReport ? canDownloadReport : 'In-Browser' !== serviceMode,
|
|
195
|
+
onDownloadReport: onDownloadReport
|
|
196
|
+
}, replayCounter)
|
|
197
|
+
})
|
|
198
|
+
]
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
});
|
|
202
|
+
} else if (shouldPrioritizeResult && (null == result ? void 0 : result.result) !== void 0) resultDataToShow = 'string' == typeof (null == result ? void 0 : result.result) ? /*#__PURE__*/ jsx("pre", {
|
|
203
|
+
children: null == result ? void 0 : result.result
|
|
204
|
+
}) : /*#__PURE__*/ jsx("pre", {
|
|
205
|
+
children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
|
|
206
|
+
});
|
|
207
|
+
else if (null == result ? void 0 : result.reportHTML) resultDataToShow = /*#__PURE__*/ jsx(Player, {
|
|
208
|
+
reportFileContent: result.reportHTML,
|
|
209
|
+
fitMode: fitMode,
|
|
210
|
+
autoZoom: autoZoom,
|
|
211
|
+
canDownloadReport: null != canDownloadReport ? canDownloadReport : 'In-Browser' !== serviceMode,
|
|
212
|
+
onDownloadReport: onDownloadReport
|
|
213
|
+
}, replayCounter);
|
|
214
|
+
else if ((null == result ? void 0 : result.result) !== void 0) resultDataToShow = 'string' == typeof (null == result ? void 0 : result.result) ? /*#__PURE__*/ jsx("pre", {
|
|
215
|
+
children: null == result ? void 0 : result.result
|
|
216
|
+
}) : /*#__PURE__*/ jsx("pre", {
|
|
217
|
+
children: JSON.stringify(null == result ? void 0 : result.result, null, 2)
|
|
218
|
+
});
|
|
219
|
+
} else resultDataToShow = serverLaunchTip(notReadyMessage);
|
|
220
|
+
return /*#__PURE__*/ jsx("div", {
|
|
221
|
+
className: resultWrapperClassName,
|
|
222
|
+
style: {
|
|
223
|
+
height: '100%',
|
|
224
|
+
display: 'flex',
|
|
225
|
+
flexDirection: 'column',
|
|
226
|
+
flex: '1 1 auto',
|
|
227
|
+
justifyContent: 'center'
|
|
228
|
+
},
|
|
229
|
+
children: resultDataToShow
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
export { PlaygroundResultView };
|