@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.
Files changed (221) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/dist/es/component/blackboard/highlights.mjs +47 -0
  4. package/dist/es/component/blackboard/index.css +118 -0
  5. package/dist/es/component/blackboard/index.mjs +122 -0
  6. package/dist/es/component/config-selector/index.mjs +251 -0
  7. package/dist/es/component/context-preview/index.mjs +37 -0
  8. package/dist/es/component/env-config/index.mjs +237 -0
  9. package/dist/es/component/env-config-reminder/index.css +30 -0
  10. package/dist/es/component/env-config-reminder/index.mjs +27 -0
  11. package/dist/es/component/form-field/index.mjs +158 -0
  12. package/dist/es/component/history-selector/index.css +237 -0
  13. package/dist/es/component/history-selector/index.mjs +197 -0
  14. package/dist/es/component/index.mjs +1 -0
  15. package/dist/es/component/logo/index.css +19 -0
  16. package/dist/es/component/logo/index.mjs +20 -0
  17. package/dist/es/component/logo/logo.mjs +2 -0
  18. package/dist/es/component/misc/index.mjs +96 -0
  19. package/dist/es/component/nav-actions/index.mjs +14 -0
  20. package/dist/es/component/nav-actions/style.css +35 -0
  21. package/dist/es/component/player/index.css +296 -0
  22. package/dist/es/component/player/index.mjs +702 -0
  23. package/dist/es/component/player/playback-controls.mjs +4 -0
  24. package/dist/es/component/player/report-download.mjs +61 -0
  25. package/dist/es/component/player/scenes/StepScene.mjs +194 -0
  26. package/dist/es/component/player/scenes/derive-frame-state.mjs +229 -0
  27. package/dist/es/component/player/scenes/export-branded-video.mjs +360 -0
  28. package/dist/es/component/player/scenes/frame-calculator.mjs +149 -0
  29. package/dist/es/component/player/scenes/playback-frame.mjs +6 -0
  30. package/dist/es/component/player/scenes/playback-layout.mjs +12 -0
  31. package/dist/es/component/player/scenes/pointer-layout.mjs +36 -0
  32. package/dist/es/component/player/use-frame-player.mjs +87 -0
  33. package/dist/es/component/playground/index.css +930 -0
  34. package/dist/es/component/playground/playground-demo-ui-context.json +290 -0
  35. package/dist/es/component/playground-result/index.css +92 -0
  36. package/dist/es/component/playground-result/index.mjs +232 -0
  37. package/dist/es/component/prompt-input/index.css +832 -0
  38. package/dist/es/component/prompt-input/index.mjs +959 -0
  39. package/dist/es/component/screenshot-viewer/index.css +237 -0
  40. package/dist/es/component/screenshot-viewer/index.mjs +319 -0
  41. package/dist/es/component/service-mode-control/index.mjs +107 -0
  42. package/dist/es/component/shiny-text/index.css +107 -0
  43. package/dist/es/component/shiny-text/index.mjs +15 -0
  44. package/dist/es/component/universal-playground/empty-state.mjs +5 -0
  45. package/dist/es/component/universal-playground/index.css +619 -0
  46. package/dist/es/component/universal-playground/index.mjs +558 -0
  47. package/dist/es/component/universal-playground/providers/context-provider.mjs +90 -0
  48. package/dist/es/component/universal-playground/providers/indexeddb-storage-provider.mjs +280 -0
  49. package/dist/es/component/universal-playground/providers/storage-provider.mjs +279 -0
  50. package/dist/es/component/universal-playground/universal-playground-electron.mjs +668 -0
  51. package/dist/es/hooks/useMinimalTypeGate.mjs +47 -0
  52. package/dist/es/hooks/usePlaygroundExecution.mjs +435 -0
  53. package/dist/es/hooks/usePlaygroundState.mjs +278 -0
  54. package/dist/es/hooks/useSafeOverrideAIConfig.mjs +20 -0
  55. package/dist/es/hooks/useServerValid.mjs +55 -0
  56. package/dist/es/hooks/useTheme.mjs +25 -0
  57. package/dist/es/icons/action-chevron.mjs +61 -0
  58. package/dist/es/icons/avatar.mjs +70 -0
  59. package/dist/es/icons/close.mjs +61 -0
  60. package/dist/es/icons/global-perspective.mjs +58 -0
  61. package/dist/es/icons/history.mjs +72 -0
  62. package/dist/es/icons/magnifying-glass.mjs +81 -0
  63. package/dist/es/icons/player-setting.mjs +68 -0
  64. package/dist/es/icons/prompt-history.mjs +70 -0
  65. package/dist/es/icons/setting.mjs +62 -0
  66. package/dist/es/icons/show-marker.mjs +58 -0
  67. package/dist/es/index.mjs +26 -0
  68. package/dist/es/static/image/logo.png +0 -0
  69. package/dist/es/store/history.mjs +128 -0
  70. package/dist/es/store/store.mjs +277 -0
  71. package/dist/es/types.mjs +73 -0
  72. package/dist/es/utils/action-label.mjs +15 -0
  73. package/dist/es/utils/color.mjs +35 -0
  74. package/dist/es/utils/constants.mjs +99 -0
  75. package/dist/es/utils/device-capabilities.mjs +13 -0
  76. package/dist/es/utils/empty-state-scroll.mjs +8 -0
  77. package/dist/es/utils/highlight-element.mjs +62 -0
  78. package/dist/es/utils/index.mjs +13 -0
  79. package/dist/es/utils/playground-utils.mjs +43 -0
  80. package/dist/es/utils/progress-action-icon.mjs +30 -0
  81. package/dist/es/utils/prompt-input-utils.mjs +49 -0
  82. package/dist/es/utils/prompt-placeholder.mjs +19 -0
  83. package/dist/es/utils/replay-scripts.mjs +428 -0
  84. package/dist/lib/component/blackboard/highlights.js +84 -0
  85. package/dist/lib/component/blackboard/index.css +118 -0
  86. package/dist/lib/component/blackboard/index.js +169 -0
  87. package/dist/lib/component/config-selector/index.js +295 -0
  88. package/dist/lib/component/context-preview/index.js +82 -0
  89. package/dist/lib/component/env-config/index.js +271 -0
  90. package/dist/lib/component/env-config-reminder/index.css +30 -0
  91. package/dist/lib/component/env-config-reminder/index.js +61 -0
  92. package/dist/lib/component/form-field/index.js +204 -0
  93. package/dist/lib/component/history-selector/index.css +237 -0
  94. package/dist/lib/component/history-selector/index.js +243 -0
  95. package/dist/lib/component/index.js +58 -0
  96. package/dist/lib/component/logo/index.css +19 -0
  97. package/dist/lib/component/logo/index.js +67 -0
  98. package/dist/lib/component/logo/logo.js +24 -0
  99. package/dist/lib/component/misc/index.js +152 -0
  100. package/dist/lib/component/nav-actions/index.js +48 -0
  101. package/dist/lib/component/nav-actions/style.css +35 -0
  102. package/dist/lib/component/player/index.css +296 -0
  103. package/dist/lib/component/player/index.js +747 -0
  104. package/dist/lib/component/player/playback-controls.js +38 -0
  105. package/dist/lib/component/player/report-download.js +98 -0
  106. package/dist/lib/component/player/scenes/StepScene.js +228 -0
  107. package/dist/lib/component/player/scenes/derive-frame-state.js +266 -0
  108. package/dist/lib/component/player/scenes/export-branded-video.js +403 -0
  109. package/dist/lib/component/player/scenes/frame-calculator.js +186 -0
  110. package/dist/lib/component/player/scenes/playback-frame.js +40 -0
  111. package/dist/lib/component/player/scenes/playback-layout.js +46 -0
  112. package/dist/lib/component/player/scenes/pointer-layout.js +88 -0
  113. package/dist/lib/component/player/use-frame-player.js +121 -0
  114. package/dist/lib/component/playground/index.css +930 -0
  115. package/dist/lib/component/playground/playground-demo-ui-context.json +290 -0
  116. package/dist/lib/component/playground-result/index.css +92 -0
  117. package/dist/lib/component/playground-result/index.js +276 -0
  118. package/dist/lib/component/prompt-input/index.css +832 -0
  119. package/dist/lib/component/prompt-input/index.js +1005 -0
  120. package/dist/lib/component/screenshot-viewer/index.css +237 -0
  121. package/dist/lib/component/screenshot-viewer/index.js +353 -0
  122. package/dist/lib/component/service-mode-control/index.js +141 -0
  123. package/dist/lib/component/shiny-text/index.css +107 -0
  124. package/dist/lib/component/shiny-text/index.js +49 -0
  125. package/dist/lib/component/universal-playground/empty-state.js +39 -0
  126. package/dist/lib/component/universal-playground/index.css +619 -0
  127. package/dist/lib/component/universal-playground/index.js +607 -0
  128. package/dist/lib/component/universal-playground/providers/context-provider.js +133 -0
  129. package/dist/lib/component/universal-playground/providers/indexeddb-storage-provider.js +320 -0
  130. package/dist/lib/component/universal-playground/providers/storage-provider.js +337 -0
  131. package/dist/lib/component/universal-playground/universal-playground-electron.js +717 -0
  132. package/dist/lib/hooks/useMinimalTypeGate.js +81 -0
  133. package/dist/lib/hooks/usePlaygroundExecution.js +478 -0
  134. package/dist/lib/hooks/usePlaygroundState.js +312 -0
  135. package/dist/lib/hooks/useSafeOverrideAIConfig.js +57 -0
  136. package/dist/lib/hooks/useServerValid.js +89 -0
  137. package/dist/lib/hooks/useTheme.js +59 -0
  138. package/dist/lib/icons/action-chevron.js +95 -0
  139. package/dist/lib/icons/avatar.js +104 -0
  140. package/dist/lib/icons/close.js +95 -0
  141. package/dist/lib/icons/global-perspective.js +92 -0
  142. package/dist/lib/icons/history.js +106 -0
  143. package/dist/lib/icons/magnifying-glass.js +115 -0
  144. package/dist/lib/icons/player-setting.js +102 -0
  145. package/dist/lib/icons/prompt-history.js +104 -0
  146. package/dist/lib/icons/setting.js +96 -0
  147. package/dist/lib/icons/show-marker.js +92 -0
  148. package/dist/lib/index.js +204 -0
  149. package/dist/lib/static/image/logo.png +0 -0
  150. package/dist/lib/store/history.js +135 -0
  151. package/dist/lib/store/store.js +287 -0
  152. package/dist/lib/types.js +119 -0
  153. package/dist/lib/utils/action-label.js +52 -0
  154. package/dist/lib/utils/color.js +75 -0
  155. package/dist/lib/utils/constants.js +172 -0
  156. package/dist/lib/utils/device-capabilities.js +50 -0
  157. package/dist/lib/utils/empty-state-scroll.js +42 -0
  158. package/dist/lib/utils/highlight-element.js +99 -0
  159. package/dist/lib/utils/index.js +69 -0
  160. package/dist/lib/utils/playground-utils.js +86 -0
  161. package/dist/lib/utils/progress-action-icon.js +67 -0
  162. package/dist/lib/utils/prompt-input-utils.js +89 -0
  163. package/dist/lib/utils/prompt-placeholder.js +53 -0
  164. package/dist/lib/utils/replay-scripts.js +474 -0
  165. package/dist/types/component/blackboard/highlights.d.ts +11 -0
  166. package/dist/types/component/blackboard/index.d.ts +10 -0
  167. package/dist/types/component/config-selector/index.d.ts +15 -0
  168. package/dist/types/component/context-preview/index.d.ts +9 -0
  169. package/dist/types/component/env-config/index.d.ts +8 -0
  170. package/dist/types/component/env-config-reminder/index.d.ts +6 -0
  171. package/dist/types/component/form-field/index.d.ts +17 -0
  172. package/dist/types/component/history-selector/index.d.ts +13 -0
  173. package/dist/types/component/index.d.ts +1 -0
  174. package/dist/types/component/logo/index.d.ts +5 -0
  175. package/dist/types/component/misc/index.d.ts +6 -0
  176. package/dist/types/component/nav-actions/index.d.ts +12 -0
  177. package/dist/types/component/player/index.d.ts +15 -0
  178. package/dist/types/component/player/playback-controls.d.ts +1 -0
  179. package/dist/types/component/player/report-download.d.ts +32 -0
  180. package/dist/types/component/player/scenes/StepScene.d.ts +9 -0
  181. package/dist/types/component/player/scenes/derive-frame-state.d.ts +40 -0
  182. package/dist/types/component/player/scenes/export-branded-video.d.ts +33 -0
  183. package/dist/types/component/player/scenes/frame-calculator.d.ts +40 -0
  184. package/dist/types/component/player/scenes/playback-frame.d.ts +3 -0
  185. package/dist/types/component/player/scenes/playback-layout.d.ts +7 -0
  186. package/dist/types/component/player/scenes/pointer-layout.d.ts +20 -0
  187. package/dist/types/component/player/use-frame-player.d.ts +17 -0
  188. package/dist/types/component/playground-result/index.d.ts +22 -0
  189. package/dist/types/component/prompt-input/index.d.ts +23 -0
  190. package/dist/types/component/screenshot-viewer/index.d.ts +23 -0
  191. package/dist/types/component/service-mode-control/index.d.ts +6 -0
  192. package/dist/types/component/shiny-text/index.d.ts +12 -0
  193. package/dist/types/component/universal-playground/empty-state.d.ts +3 -0
  194. package/dist/types/component/universal-playground/index.d.ts +4 -0
  195. package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
  196. package/dist/types/component/universal-playground/providers/indexeddb-storage-provider.d.ts +71 -0
  197. package/dist/types/component/universal-playground/providers/storage-provider.d.ts +58 -0
  198. package/dist/types/component/universal-playground/universal-playground-electron.d.ts +4 -0
  199. package/dist/types/hooks/useMinimalTypeGate.d.ts +72 -0
  200. package/dist/types/hooks/usePlaygroundExecution.d.ts +40 -0
  201. package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
  202. package/dist/types/hooks/useSafeOverrideAIConfig.d.ts +16 -0
  203. package/dist/types/hooks/useServerValid.d.ts +1 -0
  204. package/dist/types/hooks/useTheme.d.ts +7 -0
  205. package/dist/types/index.d.ts +29 -0
  206. package/dist/types/store/history.d.ts +16 -0
  207. package/dist/types/store/store.d.ts +57 -0
  208. package/dist/types/types.d.ts +278 -0
  209. package/dist/types/utils/action-label.d.ts +11 -0
  210. package/dist/types/utils/color.d.ts +4 -0
  211. package/dist/types/utils/constants.d.ts +80 -0
  212. package/dist/types/utils/device-capabilities.d.ts +9 -0
  213. package/dist/types/utils/empty-state-scroll.d.ts +11 -0
  214. package/dist/types/utils/highlight-element.d.ts +3 -0
  215. package/dist/types/utils/index.d.ts +5 -0
  216. package/dist/types/utils/playground-utils.d.ts +11 -0
  217. package/dist/types/utils/progress-action-icon.d.ts +12 -0
  218. package/dist/types/utils/prompt-input-utils.d.ts +24 -0
  219. package/dist/types/utils/prompt-placeholder.d.ts +1 -0
  220. package/dist/types/utils/replay-scripts.d.ts +50 -0
  221. 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 };