@elice/material-runbox-legacy 1.240718.0-trasncript.0 → 1.240718.0-trasncript.2

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 (21) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +383 -0
  2. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacy.js +22 -20
  3. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacy.styled.js +5 -1
  4. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyContent.js +250 -171
  5. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyContent.styled.js +10 -6
  6. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyRunnerRoomWrapper.js +80 -43
  7. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyStdioWrapper.js +63 -30
  8. package/cjs/components/material-runbox-legacy/index.js +7 -0
  9. package/cjs/components/material-runbox-legacy/locales/index.js +13 -0
  10. package/cjs/components/material-runbox-legacy/websocket.js +2 -2
  11. package/es/_virtual/_rollupPluginBabelHelpers.js +374 -0
  12. package/es/components/material-runbox-legacy/MaterialRunboxLegacy.js +22 -20
  13. package/es/components/material-runbox-legacy/MaterialRunboxLegacy.styled.js +1 -1
  14. package/es/components/material-runbox-legacy/MaterialRunboxLegacyContent.js +246 -171
  15. package/es/components/material-runbox-legacy/MaterialRunboxLegacyContent.styled.js +6 -6
  16. package/es/components/material-runbox-legacy/MaterialRunboxLegacyRunnerRoomWrapper.js +76 -43
  17. package/es/components/material-runbox-legacy/MaterialRunboxLegacyStdioWrapper.js +59 -30
  18. package/es/components/material-runbox-legacy/index.js +1 -0
  19. package/es/components/material-runbox-legacy/locales/index.js +4 -0
  20. package/es/components/material-runbox-legacy/websocket.js +2 -2
  21. package/package.json +9 -12
@@ -2,6 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
6
+ var jsxRuntime = require('react/jsx-runtime');
5
7
  var React = require('react');
6
8
  var reactUse = require('react-use');
7
9
  var blocks = require('@elice/blocks');
@@ -10,7 +12,10 @@ var intl = require('@elice/intl');
10
12
  var websocket = require('./websocket.js');
11
13
  var MaterialRunboxLegacyContent_styled = require('./MaterialRunboxLegacyContent.styled.js');
12
14
 
13
- /* eslint-disable @typescript-eslint/naming-convention */
15
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
16
+
17
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
18
+
14
19
  exports.MaterialRunboxLegacyStatus = void 0;
15
20
  (function (MaterialRunboxLegacyStatus) {
16
21
  MaterialRunboxLegacyStatus[MaterialRunboxLegacyStatus["Idle"] = 0] = "Idle";
@@ -21,47 +26,74 @@ exports.MaterialRunboxLegacyStatus = void 0;
21
26
  MaterialRunboxLegacyStatus[MaterialRunboxLegacyStatus["Terminated"] = 5] = "Terminated";
22
27
  MaterialRunboxLegacyStatus[MaterialRunboxLegacyStatus["Error"] = 6] = "Error";
23
28
  })(exports.MaterialRunboxLegacyStatus || (exports.MaterialRunboxLegacyStatus = {}));
24
- const MaterialRunboxLegacyContent = ({
25
- runboxUrl,
26
- isRunboxTerminated,
27
- isRunboxJoinError,
28
- reconnect
29
- }) => {
30
- const intl$1 = intl.useRawEliceIntl();
31
- const [runboxStats, setRunboxStats] = React.useState(null);
32
- const [isRunboxUrlLoaded, setRunboxUrlLoaded] = React.useState(false);
33
- const isRunboxUrlLoadedPrev = reactUse.usePrevious(isRunboxUrlLoaded);
34
- const [runboxStatus, setRunboxStatus] = React.useState(exports.MaterialRunboxLegacyStatus.Idle);
35
- const isRunboxPreparing = runboxStatus !== exports.MaterialRunboxLegacyStatus.Done && runboxStatus !== exports.MaterialRunboxLegacyStatus.Terminated;
36
- websocket.WSMaterialRunboxLegacyStdio.useMessage(message => {
29
+ var MaterialRunboxLegacyContent = function MaterialRunboxLegacyContent(_ref) {
30
+ var runboxUrl = _ref.runboxUrl,
31
+ isRunboxTerminated = _ref.isRunboxTerminated,
32
+ isRunboxJoinError = _ref.isRunboxJoinError,
33
+ reconnect = _ref.reconnect;
34
+ var intl$1 = intl.useRawEliceIntl();
35
+ var _React$useState = React__default.default.useState(null),
36
+ _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
37
+ runboxStats = _React$useState2[0],
38
+ setRunboxStats = _React$useState2[1];
39
+ var _React$useState3 = React__default.default.useState(false),
40
+ _React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
41
+ isRunboxUrlLoaded = _React$useState4[0],
42
+ setRunboxUrlLoaded = _React$useState4[1];
43
+ var isRunboxUrlLoadedPrev = reactUse.usePrevious(isRunboxUrlLoaded);
44
+ var _React$useState5 = React__default.default.useState(exports.MaterialRunboxLegacyStatus.Idle),
45
+ _React$useState6 = _rollupPluginBabelHelpers.slicedToArray(_React$useState5, 2),
46
+ runboxStatus = _React$useState6[0],
47
+ setRunboxStatus = _React$useState6[1];
48
+ var isRunboxPreparing = runboxStatus !== exports.MaterialRunboxLegacyStatus.Done && runboxStatus !== exports.MaterialRunboxLegacyStatus.Terminated;
49
+ websocket.WSMaterialRunboxLegacyStdio.useMessage(function (message) {
37
50
  if (message.type === 'stats') {
38
51
  setRunboxStats(message.data);
39
52
  }
40
- }, {
41
- camelize: true
42
53
  });
43
- const handleReconnect = () => {
54
+ var handleReconnect = function handleReconnect() {
44
55
  setRunboxStats(null);
45
56
  setRunboxUrlLoaded(false);
46
57
  reconnect();
47
58
  };
48
- const handleShare = async () => {
49
- if (!runboxUrl) {
50
- return;
51
- }
52
- try {
53
- await navigator.clipboard.writeText(runboxUrl);
54
- blocks.Notification.success(intl$1.formatMessage({
55
- id: 'runboxLegacy.share.success'
56
- }));
57
- } catch (e) {
58
- alert(runboxUrl);
59
- }
60
- };
59
+ var handleShare = /*#__PURE__*/function () {
60
+ var _ref2 = _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers.regeneratorRuntime().mark(function _callee() {
61
+ return _rollupPluginBabelHelpers.regeneratorRuntime().wrap(function _callee$(_context) {
62
+ while (1) switch (_context.prev = _context.next) {
63
+ case 0:
64
+ if (runboxUrl) {
65
+ _context.next = 2;
66
+ break;
67
+ }
68
+ return _context.abrupt("return");
69
+ case 2:
70
+ _context.prev = 2;
71
+ _context.next = 5;
72
+ return navigator.clipboard.writeText(runboxUrl);
73
+ case 5:
74
+ blocks.Notification.success(intl$1.formatMessage({
75
+ id: 'runboxLegacy.share.success'
76
+ }));
77
+ _context.next = 11;
78
+ break;
79
+ case 8:
80
+ _context.prev = 8;
81
+ _context.t0 = _context["catch"](2);
82
+ alert(runboxUrl);
83
+ case 11:
84
+ case "end":
85
+ return _context.stop();
86
+ }
87
+ }, _callee, null, [[2, 8]]);
88
+ }));
89
+ return function handleShare() {
90
+ return _ref2.apply(this, arguments);
91
+ };
92
+ }();
61
93
  //
62
94
  // Change `isRunboxUrlLoaded` flag to false, when runbox url removed.
63
95
  //
64
- React.useEffect(() => {
96
+ React__default.default.useEffect(function () {
65
97
  if (!runboxUrl) {
66
98
  setRunboxUrlLoaded(false);
67
99
  }
@@ -69,8 +101,8 @@ const MaterialRunboxLegacyContent = ({
69
101
  //
70
102
  // Determine runbox status.
71
103
  //
72
- React.useEffect(() => {
73
- setRunboxStatus((() => {
104
+ React__default.default.useEffect(function () {
105
+ setRunboxStatus(function () {
74
106
  switch (true) {
75
107
  case isRunboxJoinError:
76
108
  return exports.MaterialRunboxLegacyStatus.Error;
@@ -87,12 +119,12 @@ const MaterialRunboxLegacyContent = ({
87
119
  default:
88
120
  return exports.MaterialRunboxLegacyStatus.Idle;
89
121
  }
90
- })());
122
+ }());
91
123
  }, [isRunboxJoinError, isRunboxTerminated, isRunboxUrlLoaded, isRunboxUrlLoadedPrev, runboxUrl]);
92
124
  /**
93
125
  * Runbox status message shown at header.
94
126
  */
95
- const renderRunboxStatusMessage = () => {
127
+ var renderRunboxStatusMessage = function renderRunboxStatusMessage() {
96
128
  switch (runboxStatus) {
97
129
  case exports.MaterialRunboxLegacyStatus.Idle:
98
130
  return intl$1.formatMessage({
@@ -123,154 +155,201 @@ const MaterialRunboxLegacyContent = ({
123
155
  /**
124
156
  * Header of runbox.
125
157
  */
126
- const renderRunboxHeader = () => {
127
- const runboxStatsInfo = runboxStats ? React.createElement(blocks.LaptopOrLarger, null, React.createElement(blocks.Flex, null, React.createElement(blocks.Flex, {
128
- align: "center"
129
- }, React.createElement(blocks.Text, {
130
- size: "tiny",
131
- lineHeight: 1.5,
132
- role: "gray7",
133
- bold: true
134
- }, "CPU:\u00A0"), React.createElement(blocks.Flex, {
135
- align: "center",
136
- width: "30px"
137
- }, React.createElement(blocks.AntProgress, {
138
- type: "line",
139
- percent: runboxStats.cpu.percent,
140
- status: 'active',
141
- showInfo: false
142
- })), React.createElement(blocks.Text, {
143
- size: "tiny",
144
- lineHeight: 1.5,
145
- role: "gray5"
146
- }, "\u00A0", `${runboxStats.cpu.percent.toFixed(0)}%`)), React.createElement(blocks.Hspace, {
147
- width: 1
148
- }), React.createElement(blocks.Flex, {
149
- align: "center"
150
- }, React.createElement(blocks.Text, {
151
- size: "tiny",
152
- lineHeight: 1.5,
153
- role: "gray7",
154
- bold: true
155
- }, "MEM:\u00A0"), React.createElement(blocks.Flex, {
156
- align: "center",
157
- width: "30px"
158
- }, React.createElement(blocks.AntProgress, {
159
- percent: runboxStats.memory.currentBytes / runboxStats.memory.limitBytes * 100,
160
- status: 'active',
161
- showInfo: false
162
- })), React.createElement(blocks.Text, {
163
- size: "tiny",
164
- lineHeight: 1.5,
165
- role: "gray5"
166
- }, "\u00A0", `${(runboxStats.memory.currentBytes / 1024 / 1024).toFixed(0)}M / ${(runboxStats.memory.limitBytes / 1024 / 1024).toFixed(0)}M`)), React.createElement(blocks.Hspace, {
167
- width: 1
168
- }), React.createElement(blocks.Text, {
169
- size: "tiny",
170
- lineHeight: 1.5,
171
- role: "gray7",
172
- bold: true
173
- }, "DISK:\u00A0"), React.createElement(blocks.Text, {
174
- size: "tiny",
175
- lineHeight: 1.5,
176
- role: "gray5"
177
- }, `Read ${(runboxStats.block.rxBytes / 1024 / 1024).toFixed(0)}M Write ${(runboxStats.block.txBytes / 1024 / 1024).toFixed(0)}M`), React.createElement(blocks.Hspace, {
178
- width: 1
179
- }), React.createElement(blocks.Text, {
180
- size: "tiny",
181
- lineHeight: 1.5,
182
- role: "gray7",
183
- bold: true
184
- }, "NET:\u00A0"), React.createElement(blocks.Text, {
185
- size: "tiny",
186
- lineHeight: 1.5,
187
- role: "gray5"
188
- }, `↓${(runboxStats.network.rxBytes / 1024 / 1024).toFixed(0)}M ↑${(runboxStats.network.txBytes / 1024 / 1024).toFixed(0)}M`), React.createElement(blocks.Hspace, {
189
- width: 1
190
- }))) : null;
191
- return React.createElement(MaterialRunboxLegacyContent_styled.RunboxHeader, null, runboxStatsInfo, React.createElement(blocks.Flex, {
192
- align: "center"
193
- }, React.createElement(MaterialRunboxLegacyContent_styled.RunboxStatusLight, {
194
- status: runboxStatus
195
- }), React.createElement(blocks.Hspace, {
196
- width: 0.5
197
- }), React.createElement(blocks.Text, {
198
- size: "small"
199
- }, renderRunboxStatusMessage())), React.createElement(blocks.Hspace, {
200
- width: 1
201
- }), React.createElement(blocks.IconButton, {
202
- icon: icons.eilShare,
203
- role: "greyfb",
204
- size: "small",
205
- border: true,
206
- disabled: isRunboxPreparing,
207
- onClick: handleShare
208
- }), React.createElement(blocks.Hspace, {
209
- width: 0.5
210
- }), React.createElement(blocks.Tooltip, {
211
- title: isRunboxPreparing ? intl$1.formatMessage({
212
- id: 'runboxLegacy.reloadButton.tooltip'
213
- }) : undefined
214
- }, React.createElement("span", null, React.createElement(blocks.IconButton, {
215
- icon: icons.eilReset,
216
- iconSpin: isRunboxPreparing,
217
- role: "greyfb",
218
- size: "small",
219
- border: true,
220
- disabled: isRunboxPreparing,
221
- onClick: handleReconnect
222
- }))));
158
+ var renderRunboxHeader = function renderRunboxHeader() {
159
+ var runboxStatsInfo = runboxStats ? jsxRuntime.jsx(blocks.LaptopOrLarger, {
160
+ children: jsxRuntime.jsxs(blocks.Flex, {
161
+ children: [jsxRuntime.jsxs(blocks.Flex, {
162
+ align: "center",
163
+ children: [jsxRuntime.jsx(blocks.Text, {
164
+ size: "tiny",
165
+ lineHeight: 1.5,
166
+ role: "gray7",
167
+ bold: true,
168
+ children: "CPU:\xA0"
169
+ }), jsxRuntime.jsx(blocks.Flex, {
170
+ align: "center",
171
+ width: "30px",
172
+ children: jsxRuntime.jsx(blocks.AntProgress, {
173
+ type: "line",
174
+ percent: runboxStats.cpu.percent,
175
+ status: 'active',
176
+ showInfo: false
177
+ })
178
+ }), jsxRuntime.jsxs(blocks.Text, {
179
+ size: "tiny",
180
+ lineHeight: 1.5,
181
+ role: "gray5",
182
+ children: ["\xA0", "".concat(runboxStats.cpu.percent.toFixed(0), "%")]
183
+ })]
184
+ }), jsxRuntime.jsx(blocks.Hspace, {
185
+ width: 1
186
+ }), jsxRuntime.jsxs(blocks.Flex, {
187
+ align: "center",
188
+ children: [jsxRuntime.jsx(blocks.Text, {
189
+ size: "tiny",
190
+ lineHeight: 1.5,
191
+ role: "gray7",
192
+ bold: true,
193
+ children: "MEM:\xA0"
194
+ }), jsxRuntime.jsx(blocks.Flex, {
195
+ align: "center",
196
+ width: "30px",
197
+ children: jsxRuntime.jsx(blocks.AntProgress, {
198
+ percent: runboxStats.memory.currentBytes / runboxStats.memory.limitBytes * 100,
199
+ status: 'active',
200
+ showInfo: false
201
+ })
202
+ }), jsxRuntime.jsxs(blocks.Text, {
203
+ size: "tiny",
204
+ lineHeight: 1.5,
205
+ role: "gray5",
206
+ children: ["\xA0", "".concat((runboxStats.memory.currentBytes / 1024 / 1024).toFixed(0), "M / ").concat((runboxStats.memory.limitBytes / 1024 / 1024).toFixed(0), "M")]
207
+ })]
208
+ }), jsxRuntime.jsx(blocks.Hspace, {
209
+ width: 1
210
+ }), jsxRuntime.jsx(blocks.Text, {
211
+ size: "tiny",
212
+ lineHeight: 1.5,
213
+ role: "gray7",
214
+ bold: true,
215
+ children: "DISK:\xA0"
216
+ }), jsxRuntime.jsx(blocks.Text, {
217
+ size: "tiny",
218
+ lineHeight: 1.5,
219
+ role: "gray5",
220
+ children: "Read ".concat((runboxStats.block.rxBytes / 1024 / 1024).toFixed(0), "M Write ").concat((runboxStats.block.txBytes / 1024 / 1024).toFixed(0), "M")
221
+ }), jsxRuntime.jsx(blocks.Hspace, {
222
+ width: 1
223
+ }), jsxRuntime.jsx(blocks.Text, {
224
+ size: "tiny",
225
+ lineHeight: 1.5,
226
+ role: "gray7",
227
+ bold: true,
228
+ children: "NET:\xA0"
229
+ }), jsxRuntime.jsx(blocks.Text, {
230
+ size: "tiny",
231
+ lineHeight: 1.5,
232
+ role: "gray5",
233
+ children: "\u2193".concat((runboxStats.network.rxBytes / 1024 / 1024).toFixed(0), "M \u2191").concat((runboxStats.network.txBytes / 1024 / 1024).toFixed(0), "M")
234
+ }), jsxRuntime.jsx(blocks.Hspace, {
235
+ width: 1
236
+ })]
237
+ })
238
+ }) : null;
239
+ return jsxRuntime.jsxs(MaterialRunboxLegacyContent_styled.RunboxHeader, {
240
+ children: [runboxStatsInfo, jsxRuntime.jsxs(blocks.Flex, {
241
+ align: "center",
242
+ children: [jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxStatusLight, {
243
+ status: runboxStatus
244
+ }), jsxRuntime.jsx(blocks.Hspace, {
245
+ width: 0.5
246
+ }), jsxRuntime.jsx(blocks.Text, {
247
+ size: "small",
248
+ children: renderRunboxStatusMessage()
249
+ })]
250
+ }), jsxRuntime.jsx(blocks.Hspace, {
251
+ width: 1
252
+ }), jsxRuntime.jsx(blocks.IconButton, {
253
+ icon: icons.eilShare,
254
+ role: "greyfb",
255
+ size: "small",
256
+ border: true,
257
+ disabled: isRunboxPreparing,
258
+ onClick: handleShare
259
+ }), jsxRuntime.jsx(blocks.Hspace, {
260
+ width: 0.5
261
+ }), jsxRuntime.jsx(blocks.Tooltip, {
262
+ title: isRunboxPreparing ? intl$1.formatMessage({
263
+ id: 'runboxLegacy.reloadButton.tooltip'
264
+ }) : undefined,
265
+ children: jsxRuntime.jsx("span", {
266
+ children: jsxRuntime.jsx(blocks.IconButton, {
267
+ icon: icons.eilReset,
268
+ iconSpin: isRunboxPreparing,
269
+ role: "greyfb",
270
+ size: "small",
271
+ border: true,
272
+ disabled: isRunboxPreparing,
273
+ onClick: handleReconnect
274
+ })
275
+ })
276
+ })]
277
+ });
223
278
  };
224
279
  /**
225
280
  * Body of runbox.
226
281
  */
227
- const renderRunboxBody = () => {
282
+ var renderRunboxBody = function renderRunboxBody() {
228
283
  if (runboxStatus === exports.MaterialRunboxLegacyStatus.Terminated) {
229
- return React.createElement(MaterialRunboxLegacyContent_styled.RunboxBody, null, React.createElement(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, null, React.createElement(blocks.Box, null, React.createElement(blocks.Text, {
230
- size: "small",
231
- preWrap: true,
232
- lineHeight: 1.5,
233
- textAlign: "center"
234
- }, intl$1.formatMessage({
235
- id: 'runboxLegacy.overlay.message.terminated'
236
- })))));
284
+ return jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBody, {
285
+ children: jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, {
286
+ children: jsxRuntime.jsx(blocks.Box, {
287
+ children: jsxRuntime.jsx(blocks.Text, {
288
+ size: "small",
289
+ preWrap: true,
290
+ lineHeight: 1.5,
291
+ textAlign: "center",
292
+ children: intl$1.formatMessage({
293
+ id: 'runboxLegacy.overlay.message.terminated'
294
+ })
295
+ })
296
+ })
297
+ })
298
+ });
237
299
  }
238
300
  if (runboxStatus === exports.MaterialRunboxLegacyStatus.Error) {
239
- return React.createElement(MaterialRunboxLegacyContent_styled.RunboxBody, null, React.createElement(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, null, React.createElement(blocks.Box, null, React.createElement(blocks.Text, {
240
- size: "small",
241
- preWrap: true,
242
- lineHeight: 1.5,
243
- textAlign: "center"
244
- }, intl$1.formatMessage({
245
- id: 'runboxLegacy.overlay.message.error'
246
- })))));
301
+ return jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBody, {
302
+ children: jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, {
303
+ children: jsxRuntime.jsx(blocks.Box, {
304
+ children: jsxRuntime.jsx(blocks.Text, {
305
+ size: "small",
306
+ preWrap: true,
307
+ lineHeight: 1.5,
308
+ textAlign: "center",
309
+ children: intl$1.formatMessage({
310
+ id: 'runboxLegacy.overlay.message.error'
311
+ })
312
+ })
313
+ })
314
+ })
315
+ });
247
316
  }
248
- return React.createElement(MaterialRunboxLegacyContent_styled.RunboxBody, null, React.createElement(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, {
249
- "aria-hidden": !isRunboxPreparing
250
- }, React.createElement(blocks.Box, null, React.createElement(blocks.Spinner, null), React.createElement(blocks.Vspace, {
251
- height: 1
252
- }), React.createElement(blocks.Text, {
253
- size: "small",
254
- preWrap: true,
255
- lineHeight: 1.5,
256
- textAlign: "center"
257
- }, runboxStatus === exports.MaterialRunboxLegacyStatus.Disconnected ? intl$1.formatMessage({
258
- id: 'runboxLegacy.overlay.message.disconnected'
259
- }) : intl$1.formatMessage({
260
- id: 'runboxLegacy.overlay.message.connecting'
261
- })))), runboxUrl ? React.createElement(MaterialRunboxLegacyContent_styled.RunboxBodyIframe, {
262
- src: runboxUrl + '/?folder=/mnt/elice/workspace',
263
- title: "material-runbox-legacy",
264
- onLoad: () => setRunboxUrlLoaded(true),
265
- allow: "clipboard-read; clipboard-write; camera *; microphone *"
266
- }) : null);
317
+ return jsxRuntime.jsxs(MaterialRunboxLegacyContent_styled.RunboxBody, {
318
+ children: [jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, {
319
+ "aria-hidden": !isRunboxPreparing,
320
+ children: jsxRuntime.jsxs(blocks.Box, {
321
+ children: [jsxRuntime.jsx(blocks.Spinner, {}), jsxRuntime.jsx(blocks.Vspace, {
322
+ height: 1
323
+ }), jsxRuntime.jsx(blocks.Text, {
324
+ size: "small",
325
+ preWrap: true,
326
+ lineHeight: 1.5,
327
+ textAlign: "center",
328
+ children: runboxStatus === exports.MaterialRunboxLegacyStatus.Disconnected ? intl$1.formatMessage({
329
+ id: 'runboxLegacy.overlay.message.disconnected'
330
+ }) : intl$1.formatMessage({
331
+ id: 'runboxLegacy.overlay.message.connecting'
332
+ })
333
+ })]
334
+ })
335
+ }), runboxUrl ? jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBodyIframe, {
336
+ src: runboxUrl + '/?folder=/mnt/elice/workspace',
337
+ title: "material-runbox-legacy",
338
+ onLoad: function onLoad() {
339
+ return setRunboxUrlLoaded(true);
340
+ },
341
+ allow: "clipboard-read; clipboard-write; camera *; microphone *"
342
+ }) : null]
343
+ });
267
344
  };
268
345
  //
269
346
  //
270
347
  //
271
- return React.createElement(React.Fragment, null, renderRunboxHeader(), React.createElement(blocks.Vspace, {
272
- height: 0.5
273
- }), renderRunboxBody());
348
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, {
349
+ children: [renderRunboxHeader(), jsxRuntime.jsx(blocks.Vspace, {
350
+ height: 0.5
351
+ }), renderRunboxBody()]
352
+ });
274
353
  };
275
354
 
276
355
  exports.default = MaterialRunboxLegacyContent;
@@ -4,21 +4,25 @@ var designTokens = require('@elice/design-tokens');
4
4
  var styled = require('styled-components');
5
5
  var MaterialRunboxLegacyContent = require('./MaterialRunboxLegacyContent.js');
6
6
 
7
- const RunboxHeader = styled.div.withConfig({
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
10
+
11
+ var RunboxHeader = styled__default.default.div.withConfig({
8
12
  componentId: "sc-18a3wux-0"
9
13
  })(["flex:0 0 2.5rem;display:flex;justify-content:flex-end;align-items:center;padding:0 0.5rem;"]);
10
- const RunboxBody = styled.div.withConfig({
14
+ var RunboxBody = styled__default.default.div.withConfig({
11
15
  componentId: "sc-18a3wux-1"
12
16
  })(["position:relative;flex:1;"]);
13
- const RunboxBodyOverlay = styled.div.withConfig({
17
+ var RunboxBodyOverlay = styled__default.default.div.withConfig({
14
18
  componentId: "sc-18a3wux-2"
15
19
  })(["position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;flex:1;width:100%;height:100%;background:rgba(255,255,255,0.8);&[aria-hidden='true']{display:none;}"]);
16
- const RunboxBodyIframe = styled.iframe.withConfig({
20
+ var RunboxBodyIframe = styled__default.default.iframe.withConfig({
17
21
  componentId: "sc-18a3wux-3"
18
22
  })(["width:100%;height:100%;border:none;"]);
19
- const RunboxStatusLight = styled.span.withConfig({
23
+ var RunboxStatusLight = styled__default.default.span.withConfig({
20
24
  componentId: "sc-18a3wux-4"
21
- })(["display:block;width:0.5rem;height:0.5rem;border-radius:50%;background-color:", ";"], props => {
25
+ })(["display:block;width:0.5rem;height:0.5rem;border-radius:50%;background-color:", ";"], function (props) {
22
26
  switch (props.status) {
23
27
  case MaterialRunboxLegacyContent.MaterialRunboxLegacyStatus.Loading:
24
28
  case MaterialRunboxLegacyContent.MaterialRunboxLegacyStatus.Connecting: