@elice/material-exercise 1.260517.0-codegenexercisecli.1 → 1.260526.0-addvideoassessmentmaterial.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/material-exercise/MaterialExercise.js +1 -5
- package/cjs/components/material-exercise/context/ExerciseProvider.js +0 -9
- package/cjs/components/material-exercise/context/types.d.ts +0 -10
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogSteps.js +2 -2
- package/cjs/components/material-exercise/index.d.ts +1 -1
- package/es/components/material-exercise/MaterialExercise.js +3 -7
- package/es/components/material-exercise/context/ExerciseProvider.js +0 -9
- package/es/components/material-exercise/context/types.d.ts +0 -10
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogSteps.js +2 -2
- package/es/components/material-exercise/index.d.ts +1 -1
- package/package.json +7 -7
|
@@ -147,7 +147,6 @@ var MaterialExercise = React.forwardRef(function (props, ref) {
|
|
|
147
147
|
var exercisePreviewType = recoil.useRecoilValue(recoil$1.exercisePreviewTypeState(props.materialExerciseId));
|
|
148
148
|
var exercisePreviewDisplayMode = recoil.useRecoilValue(recoil$1.exercisePreviewDisplayModeState);
|
|
149
149
|
var exerciseMonacoEditorApis = recoil.useRecoilValue(recoil$1.exerciseMonacoEditorApisState);
|
|
150
|
-
var _setActiveFilename = recoil.useSetRecoilState(recoil$1.exerciseActiveFilenameState);
|
|
151
150
|
/**
|
|
152
151
|
* File tree
|
|
153
152
|
*/
|
|
@@ -285,12 +284,9 @@ var MaterialExercise = React.forwardRef(function (props, ref) {
|
|
|
285
284
|
},
|
|
286
285
|
openRunnerRooms: function openRunnerRooms() {
|
|
287
286
|
return subjects.exerciseRunnerRoomsOpen$.next();
|
|
288
|
-
},
|
|
289
|
-
setActiveFilename: function setActiveFilename(filename) {
|
|
290
|
-
return _setActiveFilename(filename);
|
|
291
287
|
}
|
|
292
288
|
};
|
|
293
|
-
}, [exerciseMonacoEditorApis
|
|
289
|
+
}, [exerciseMonacoEditorApis]);
|
|
294
290
|
//
|
|
295
291
|
//
|
|
296
292
|
//
|
|
@@ -140,15 +140,6 @@ var ExerciseProvider = function ExerciseProvider(_a) {
|
|
|
140
140
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
141
141
|
[width, height]);
|
|
142
142
|
//
|
|
143
|
-
// forward active filename changes to host
|
|
144
|
-
//
|
|
145
|
-
React__default.default.useEffect(function () {
|
|
146
|
-
var _a;
|
|
147
|
-
(_a = contextProps.onActiveFilenameChange) === null || _a === void 0 ? void 0 : _a.call(contextProps, activeFilename);
|
|
148
|
-
},
|
|
149
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
150
|
-
[activeFilename]);
|
|
151
|
-
//
|
|
152
143
|
// update
|
|
153
144
|
//
|
|
154
145
|
React__default.default.useEffect(function () {
|
|
@@ -18,7 +18,6 @@ export interface MaterialExerciseCommonApis {
|
|
|
18
18
|
sendTextToRunner: MaterialExerciseCommonApiSendTextToTerminal;
|
|
19
19
|
getMonacoEditorApis: MaterialExerciseCommonApiGetMonacoEditorApis;
|
|
20
20
|
openRunnerRooms: MaterialExerciseCommonAPiOpenRunnerRooms;
|
|
21
|
-
setActiveFilename: MaterialExerciseCommonApiSetActiveFilename;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
23
|
* Send text to terminal.
|
|
@@ -32,10 +31,6 @@ export type MaterialExerciseCommonApiGetMonacoEditorApis = () => MonacoEditorApi
|
|
|
32
31
|
* Open runner rooms.
|
|
33
32
|
*/
|
|
34
33
|
export type MaterialExerciseCommonAPiOpenRunnerRooms = () => void;
|
|
35
|
-
/**
|
|
36
|
-
* Set the currently active file in the editor.
|
|
37
|
-
*/
|
|
38
|
-
export type MaterialExerciseCommonApiSetActiveFilename = (filename: string) => void;
|
|
39
34
|
/**
|
|
40
35
|
* [External]
|
|
41
36
|
* Common exposed props for `MaterialExercise*` components.
|
|
@@ -69,7 +64,6 @@ export interface MaterialExerciseCommonProps {
|
|
|
69
64
|
onReferenceDocsToggle?: () => void;
|
|
70
65
|
onCodeHelpRequest?: MaterialExerciseCommonPropOnCodeHelpRequest;
|
|
71
66
|
onCodeEditorChange?: MaterialExerciseCommonPropOnCodeEditorChange;
|
|
72
|
-
onActiveFilenameChange?: MaterialExerciseCommonPropOnActiveFilenameChange;
|
|
73
67
|
onStdioError?: MaterialExerciseCommonPropOnStdioError;
|
|
74
68
|
onDefaultExerciseRoomIdSet?: MaterialExerciseCommonPropOnDefaultExerciseRoomIdSet;
|
|
75
69
|
onExerciseRoomIdChange?: MaterialExerciseCommonPropOnExerciseRoomIdChange;
|
|
@@ -100,10 +94,6 @@ export type MaterialExerciseCommonPropOnCodeEditorChange = (payload: {
|
|
|
100
94
|
content: string;
|
|
101
95
|
selectedContent: string;
|
|
102
96
|
}) => void;
|
|
103
|
-
/**
|
|
104
|
-
* On active file change.
|
|
105
|
-
*/
|
|
106
|
-
export type MaterialExerciseCommonPropOnActiveFilenameChange = (filename: string | null) => void;
|
|
107
97
|
/**
|
|
108
98
|
* On stdio error.
|
|
109
99
|
*/
|
|
@@ -38,13 +38,13 @@ var ArduinoConnectionPreflightDialogSteps = function ArduinoConnectionPreflightD
|
|
|
38
38
|
mx: 0.25,
|
|
39
39
|
borderRadius: 0.5,
|
|
40
40
|
bgcolor: function bgcolor(theme) {
|
|
41
|
-
return theme.palette.background.
|
|
41
|
+
return theme.palette.background.inverse;
|
|
42
42
|
},
|
|
43
43
|
border: function border(theme) {
|
|
44
44
|
return "1px solid ".concat(theme.palette.divider);
|
|
45
45
|
},
|
|
46
46
|
color: function color(theme) {
|
|
47
|
-
return theme.palette.
|
|
47
|
+
return theme.palette.inverse.main;
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
children: text
|
|
@@ -2,4 +2,4 @@ export { default as MaterialExercise } from './MaterialExercise';
|
|
|
2
2
|
export type { MaterialExerciseProps, MaterialExerciseApis } from './MaterialExercise';
|
|
3
3
|
export { default as MaterialExerciseMobile } from './MaterialExerciseMobile';
|
|
4
4
|
export type { MaterialExerciseMobileProps } from './MaterialExerciseMobile';
|
|
5
|
-
export type { MaterialExerciseCommonApis, MaterialExerciseCommonApiSendTextToTerminal, MaterialExerciseCommonProps, MaterialExerciseCommonPropExerciseImageEmptyOptions,
|
|
5
|
+
export type { MaterialExerciseCommonApis, MaterialExerciseCommonApiSendTextToTerminal, MaterialExerciseCommonProps, MaterialExerciseCommonPropExerciseImageEmptyOptions, MaterialExerciseCommonPropOnCodeHelpRequest, MaterialExerciseCommonPropOnCodeEditorChange, MaterialExerciseCommonPropOnStdioError, MaterialExerciseCommonPropOnDefaultExerciseRoomIdSet, MaterialExerciseCommonPropOnExerciseRoomIdChange, MaterialExerciseCommonPropOnRunningDone, MaterialExerciseCommonPropOnSubmit, MaterialExerciseCommonPropOnError, } from './context/types';
|
|
@@ -7,7 +7,7 @@ import { base } from '@elice/design-tokens';
|
|
|
7
7
|
import { eilClassroom } from '@elice/icons';
|
|
8
8
|
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
9
9
|
import { withForwardRefMaterial } from '@elice/material-shared-utils';
|
|
10
|
-
import { useRecoilValue
|
|
10
|
+
import { useRecoilValue } from 'recoil';
|
|
11
11
|
import { MATERIAL_RESIZABLE_COMMON_PROPS, MATERIAL_DIVIDER_BORDER_VALUE } from '../../constants/stylesheets.js';
|
|
12
12
|
import ExerciseProvider from './context/ExerciseProvider.js';
|
|
13
13
|
import messageEn from '../locales/en.json.js';
|
|
@@ -22,7 +22,7 @@ import ExerciseMultilangDropdownLazy from './exercise-multilang-dropdown/Exercis
|
|
|
22
22
|
import ExerciseMenu from './exercise-menu/ExerciseMenu.js';
|
|
23
23
|
import ExerciseFile from './exercise-file/ExerciseFile.js';
|
|
24
24
|
import { ExerciseContext } from './context/context.js';
|
|
25
|
-
import { exerciseContainerSizeState, exerciseState, exerciseFileTreeOpenedState, exercisePreviewTypeState, exercisePreviewDisplayModeState, exerciseMonacoEditorApisState
|
|
25
|
+
import { exerciseContainerSizeState, exerciseState, exerciseFileTreeOpenedState, exercisePreviewTypeState, exercisePreviewDisplayModeState, exerciseMonacoEditorApisState } from './context/recoil.js';
|
|
26
26
|
import { exerciseRunnerRoomsOpen$, exerciseRunnerTextSend$ } from './context/subjects.js';
|
|
27
27
|
import { ExercisePreviewType, ExercisePreviewDisplayMode } from './context/recoilTypes.js';
|
|
28
28
|
|
|
@@ -138,7 +138,6 @@ var MaterialExercise = forwardRef(function (props, ref) {
|
|
|
138
138
|
var exercisePreviewType = useRecoilValue(exercisePreviewTypeState(props.materialExerciseId));
|
|
139
139
|
var exercisePreviewDisplayMode = useRecoilValue(exercisePreviewDisplayModeState);
|
|
140
140
|
var exerciseMonacoEditorApis = useRecoilValue(exerciseMonacoEditorApisState);
|
|
141
|
-
var _setActiveFilename = useSetRecoilState(exerciseActiveFilenameState);
|
|
142
141
|
/**
|
|
143
142
|
* File tree
|
|
144
143
|
*/
|
|
@@ -276,12 +275,9 @@ var MaterialExercise = forwardRef(function (props, ref) {
|
|
|
276
275
|
},
|
|
277
276
|
openRunnerRooms: function openRunnerRooms() {
|
|
278
277
|
return exerciseRunnerRoomsOpen$.next();
|
|
279
|
-
},
|
|
280
|
-
setActiveFilename: function setActiveFilename(filename) {
|
|
281
|
-
return _setActiveFilename(filename);
|
|
282
278
|
}
|
|
283
279
|
};
|
|
284
|
-
}, [exerciseMonacoEditorApis
|
|
280
|
+
}, [exerciseMonacoEditorApis]);
|
|
285
281
|
//
|
|
286
282
|
//
|
|
287
283
|
//
|
|
@@ -131,15 +131,6 @@ var ExerciseProvider = function ExerciseProvider(_a) {
|
|
|
131
131
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
132
132
|
[width, height]);
|
|
133
133
|
//
|
|
134
|
-
// forward active filename changes to host
|
|
135
|
-
//
|
|
136
|
-
React.useEffect(function () {
|
|
137
|
-
var _a;
|
|
138
|
-
(_a = contextProps.onActiveFilenameChange) === null || _a === void 0 ? void 0 : _a.call(contextProps, activeFilename);
|
|
139
|
-
},
|
|
140
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
141
|
-
[activeFilename]);
|
|
142
|
-
//
|
|
143
134
|
// update
|
|
144
135
|
//
|
|
145
136
|
React.useEffect(function () {
|
|
@@ -18,7 +18,6 @@ export interface MaterialExerciseCommonApis {
|
|
|
18
18
|
sendTextToRunner: MaterialExerciseCommonApiSendTextToTerminal;
|
|
19
19
|
getMonacoEditorApis: MaterialExerciseCommonApiGetMonacoEditorApis;
|
|
20
20
|
openRunnerRooms: MaterialExerciseCommonAPiOpenRunnerRooms;
|
|
21
|
-
setActiveFilename: MaterialExerciseCommonApiSetActiveFilename;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
23
|
* Send text to terminal.
|
|
@@ -32,10 +31,6 @@ export type MaterialExerciseCommonApiGetMonacoEditorApis = () => MonacoEditorApi
|
|
|
32
31
|
* Open runner rooms.
|
|
33
32
|
*/
|
|
34
33
|
export type MaterialExerciseCommonAPiOpenRunnerRooms = () => void;
|
|
35
|
-
/**
|
|
36
|
-
* Set the currently active file in the editor.
|
|
37
|
-
*/
|
|
38
|
-
export type MaterialExerciseCommonApiSetActiveFilename = (filename: string) => void;
|
|
39
34
|
/**
|
|
40
35
|
* [External]
|
|
41
36
|
* Common exposed props for `MaterialExercise*` components.
|
|
@@ -69,7 +64,6 @@ export interface MaterialExerciseCommonProps {
|
|
|
69
64
|
onReferenceDocsToggle?: () => void;
|
|
70
65
|
onCodeHelpRequest?: MaterialExerciseCommonPropOnCodeHelpRequest;
|
|
71
66
|
onCodeEditorChange?: MaterialExerciseCommonPropOnCodeEditorChange;
|
|
72
|
-
onActiveFilenameChange?: MaterialExerciseCommonPropOnActiveFilenameChange;
|
|
73
67
|
onStdioError?: MaterialExerciseCommonPropOnStdioError;
|
|
74
68
|
onDefaultExerciseRoomIdSet?: MaterialExerciseCommonPropOnDefaultExerciseRoomIdSet;
|
|
75
69
|
onExerciseRoomIdChange?: MaterialExerciseCommonPropOnExerciseRoomIdChange;
|
|
@@ -100,10 +94,6 @@ export type MaterialExerciseCommonPropOnCodeEditorChange = (payload: {
|
|
|
100
94
|
content: string;
|
|
101
95
|
selectedContent: string;
|
|
102
96
|
}) => void;
|
|
103
|
-
/**
|
|
104
|
-
* On active file change.
|
|
105
|
-
*/
|
|
106
|
-
export type MaterialExerciseCommonPropOnActiveFilenameChange = (filename: string | null) => void;
|
|
107
97
|
/**
|
|
108
98
|
* On stdio error.
|
|
109
99
|
*/
|
|
@@ -28,13 +28,13 @@ var ArduinoConnectionPreflightDialogSteps = function ArduinoConnectionPreflightD
|
|
|
28
28
|
mx: 0.25,
|
|
29
29
|
borderRadius: 0.5,
|
|
30
30
|
bgcolor: function bgcolor(theme) {
|
|
31
|
-
return theme.palette.background.
|
|
31
|
+
return theme.palette.background.inverse;
|
|
32
32
|
},
|
|
33
33
|
border: function border(theme) {
|
|
34
34
|
return "1px solid ".concat(theme.palette.divider);
|
|
35
35
|
},
|
|
36
36
|
color: function color(theme) {
|
|
37
|
-
return theme.palette.
|
|
37
|
+
return theme.palette.inverse.main;
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
children: text
|
|
@@ -2,4 +2,4 @@ export { default as MaterialExercise } from './MaterialExercise';
|
|
|
2
2
|
export type { MaterialExerciseProps, MaterialExerciseApis } from './MaterialExercise';
|
|
3
3
|
export { default as MaterialExerciseMobile } from './MaterialExerciseMobile';
|
|
4
4
|
export type { MaterialExerciseMobileProps } from './MaterialExerciseMobile';
|
|
5
|
-
export type { MaterialExerciseCommonApis, MaterialExerciseCommonApiSendTextToTerminal, MaterialExerciseCommonProps, MaterialExerciseCommonPropExerciseImageEmptyOptions,
|
|
5
|
+
export type { MaterialExerciseCommonApis, MaterialExerciseCommonApiSendTextToTerminal, MaterialExerciseCommonProps, MaterialExerciseCommonPropExerciseImageEmptyOptions, MaterialExerciseCommonPropOnCodeHelpRequest, MaterialExerciseCommonPropOnCodeEditorChange, MaterialExerciseCommonPropOnStdioError, MaterialExerciseCommonPropOnDefaultExerciseRoomIdSet, MaterialExerciseCommonPropOnExerciseRoomIdChange, MaterialExerciseCommonPropOnRunningDone, MaterialExerciseCommonPropOnSubmit, MaterialExerciseCommonPropOnError, } from './context/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-exercise",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.260526.0-addvideoassessmentmaterial.0",
|
|
4
4
|
"description": "User view and editing components of Elice material exercise",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"overlay-kit": "^1.8.0",
|
|
40
40
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
41
41
|
"react-use": "^17.0.0",
|
|
42
|
-
"@elice/material-shared-types": "1.
|
|
43
|
-
"@elice/material-shared-utils": "1.
|
|
42
|
+
"@elice/material-shared-types": "1.260526.0-addvideoassessmentmaterial.0",
|
|
43
|
+
"@elice/material-shared-utils": "1.260526.0-addvideoassessmentmaterial.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@novnc/novnc": "^1.3.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"xterm-addon-fit": "^0.5.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@elice/api-client": "
|
|
73
|
+
"@elice/api-client": "1.260518.0-addvideoassessmentmaterial.3",
|
|
74
74
|
"@elice/blocks": "1.260404.0",
|
|
75
75
|
"@elice/design-tokens": "^1.220803.0",
|
|
76
76
|
"@elice/icons": "^1.230814.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@elice/mui-elements": "5.251204.0",
|
|
81
81
|
"@elice/mui-system": "5.251204.0",
|
|
82
82
|
"@elice/rollup-config": "^1.260406.0",
|
|
83
|
-
"@elice/types": "
|
|
83
|
+
"@elice/types": "1.260519.0-addvideoassessmentmaterial.5",
|
|
84
84
|
"@elice/utils": "^1.250930.0",
|
|
85
85
|
"@elice/websocket": "^1.220815.0",
|
|
86
86
|
"@emotion/babel-plugin": "^11.13.5",
|
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
"rollup": "^4.0.0",
|
|
116
116
|
"typescript": "~5.9.3",
|
|
117
117
|
"vite": "^4.4.9",
|
|
118
|
-
"@elice/material-shared-types": "1.
|
|
119
|
-
"@elice/material-shared-utils": "1.
|
|
118
|
+
"@elice/material-shared-types": "1.260526.0-addvideoassessmentmaterial.0",
|
|
119
|
+
"@elice/material-shared-utils": "1.260526.0-addvideoassessmentmaterial.0"
|
|
120
120
|
},
|
|
121
121
|
"scripts": {
|
|
122
122
|
"start": "run-s watch",
|