@elice/material-exercise 1.251120.1 → 1.260128.0-rc.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/_virtual/_rollupPluginBabelHelpers.js +241 -451
- package/cjs/components/index.js +9 -9
- package/cjs/components/material-exercise/MaterialExercise.js +14 -17
- package/cjs/components/material-exercise/MaterialExercise.styled.d.ts +40 -10
- package/cjs/components/material-exercise/MaterialExercise.styled.js +68 -33
- package/cjs/components/material-exercise/MaterialExerciseMobile.js +3 -6
- package/cjs/components/material-exercise/context/ExerciseProvider.js +17 -8
- package/cjs/components/material-exercise/context/ExerciseProviderNoImage.d.ts +1 -1
- package/cjs/components/material-exercise/context/ExerciseProviderNoImage.js +5 -5
- package/cjs/components/material-exercise/context/recoil.js +202 -219
- package/cjs/components/material-exercise/context/recoilTypes.d.ts +1 -2
- package/cjs/components/material-exercise/context/types.d.ts +0 -1
- package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +9 -25
- package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.d.ts +23 -9
- package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.js +45 -22
- package/cjs/components/material-exercise/exercise-file/ExerciseFile.js +8 -22
- package/cjs/components/material-exercise/exercise-file-editor/ExerciseFileEditor.js +34 -48
- package/cjs/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.js +5 -9
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +16 -15
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabsLazy.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabsLazy.js +1 -5
- package/cjs/components/material-exercise/exercise-file-tabs/exercise-file-tabs-file-tree-button/ExerciseFileTabsFileTreeButton.js +10 -13
- package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +73 -99
- package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTreeLazy.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTreeLazy.js +1 -5
- package/cjs/components/material-exercise/exercise-file-viewer/ExerciseFileViewer.js +2 -9
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenu.js +7 -10
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.js +0 -4
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuArduinoSettings.js +10 -14
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +5 -7
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuReset.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuReset.js +1 -15
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +6 -12
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.styled.d.ts +46 -13
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.styled.js +81 -38
- package/cjs/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdown.js +2 -5
- package/cjs/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdownLazy.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-preview/ExercisePreview.js +9 -11
- package/cjs/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.d.ts +1 -2
- package/cjs/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.js +3 -6
- package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpane.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpane.js +25 -21
- package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpaneEditorPerference.js +1 -6
- package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpaneEnvironment.js +16 -11
- package/cjs/components/material-exercise/exercise-room/ExerciseRoom.styled.d.ts +30 -9
- package/cjs/components/material-exercise/exercise-room/ExerciseRoom.styled.js +33 -25
- package/cjs/components/material-exercise/exercise-room/ExerciseRoomDetail.js +101 -106
- package/cjs/components/material-exercise/exercise-room/ExerciseRoomList.js +31 -35
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunner.js +53 -72
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerController.js +8 -22
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +2 -6
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.js +28 -22
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +23 -27
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +28 -26
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusIndicator.d.ts +4 -1
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusIndicator.js +6 -6
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.d.ts +1 -1
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.js +15 -11
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerTimer.js +6 -9
- package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +107 -114
- package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.styled.d.ts +30 -9
- package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.styled.js +55 -26
- package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistoryOutput.js +20 -16
- package/cjs/components/material-exercise/index.d.ts +1 -1
- package/cjs/components/shared/exercise-menu-button/ExerciseMenuButton.d.ts +1 -1
- package/cjs/components/shared/exercise-menu-button/ExerciseMenuButton.js +18 -10
- package/cjs/components/shared/exercise-shimmer/ExerciseFileShimmer.d.ts +1 -1
- package/cjs/components/shared/exercise-shimmer/ExerciseFileShimmer.js +17 -17
- package/cjs/components/shared/exercise-shimmer/ExerciseFileTabShimmer.d.ts +1 -1
- package/cjs/components/shared/exercise-shimmer/ExerciseFileTabShimmer.js +9 -9
- package/cjs/components/shared/exercise-shimmer/ExerciseFileTabsShimmer.d.ts +1 -1
- package/cjs/components/shared/exercise-shimmer/ExerciseFileTabsShimmer.js +5 -5
- package/cjs/components/shared/exercise-shimmer/ExerciseFileTreeListItemShimmer.d.ts +1 -1
- package/cjs/components/shared/exercise-shimmer/ExerciseFileTreeListItemShimmer.js +12 -12
- package/cjs/components/shared/exercise-shimmer/ExerciseFileTreeListShimmer.js +19 -11
- package/cjs/components/shared/exercise-version-list/ExerciseVersionList.d.ts +1 -1
- package/cjs/components/shared/exercise-version-list/ExerciseVersionList.styled.d.ts +5 -8
- package/cjs/components/shared/exercise-version-list/ExerciseVersionList.styled.js +13 -5
- package/cjs/components/shared/exercise-version-list/ExerciseVersionListItem.d.ts +1 -1
- package/cjs/components/shared/exercise-version-list/ExerciseVersionListItem.styled.d.ts +20 -5
- package/cjs/components/shared/exercise-version-list/ExerciseVersionListItem.styled.js +37 -15
- package/cjs/components/shared/file-tabs/FileTab.js +5 -5
- package/cjs/components/shared/file-tabs/FileTab.styled.d.ts +29 -8
- package/cjs/components/shared/file-tabs/FileTab.styled.js +50 -27
- package/cjs/components/shared/file-tabs/FileTabs.styled.d.ts +8 -2
- package/cjs/components/shared/file-tabs/FileTabs.styled.js +17 -9
- package/cjs/components/shared/file-tree/FileTree.d.ts +1 -1
- package/cjs/components/shared/file-tree/FileTree.js +20 -12
- package/cjs/components/shared/file-tree/FileTreeConfig.js +6 -6
- package/cjs/components/shared/file-tree/FileTreeList.d.ts +1 -1
- package/cjs/components/shared/file-tree/FileTreeList.js +10 -8
- package/cjs/components/shared/file-tree/FileTreeListItemContent.js +5 -5
- package/cjs/components/shared/file-tree/FileTreeListItemContent.styled.d.ts +35 -10
- package/cjs/components/shared/file-tree/FileTreeListItemContent.styled.js +49 -33
- package/cjs/components/shared/file-tree/FileTreeListItemContentInput.js +9 -9
- package/cjs/components/shared/file-tree/FileTreeListItemContentInput.styled.d.ts +7 -3
- package/cjs/components/shared/file-tree/FileTreeListItemContentInput.styled.js +16 -8
- package/cjs/components/shared/file-tree/FileTreeListItemContentMenu.js +1 -1
- package/cjs/components/shared/file-tree/FileTreeListItems.d.ts +1 -1
- package/cjs/components/shared/file-tree/FileTreeListItems.js +13 -11
- package/cjs/components/shared/file-tree/FileTreeListItems.styled.d.ts +8 -2
- package/cjs/components/shared/file-tree/FileTreeListItems.styled.js +23 -8
- package/cjs/components/shared/file-tree/FileTreeToolbar.styled.d.ts +4 -1
- package/cjs/components/shared/file-tree/FileTreeToolbar.styled.js +5 -5
- package/cjs/components/shared/file-tree/context/FileTreeContext.d.ts +1 -1
- package/cjs/components/shared/file-tree/context/FileTreeContext.js +0 -1
- package/cjs/components/shared/file-tree/file-tree-toolbar/FileTreeToolbar.js +7 -7
- package/cjs/components/shared/file-tree/index.d.ts +1 -1
- package/cjs/components/shared/file-tree/utils/fileTreeGenerator.js +2 -4
- package/cjs/components/shared/file-viewer/FileViewer.js +10 -14
- package/cjs/components/shared/file-viewer/FileViewerCsv.js +68 -52
- package/cjs/components/shared/file-viewer/FileViewerImage.d.ts +1 -1
- package/cjs/components/shared/file-viewer/FileViewerImage.js +14 -10
- package/cjs/components/shared/file-viewer/FileViewerIpynb.js +14 -10
- package/cjs/components/shared/file-viewer/FileViewerNonViewable.d.ts +1 -1
- package/cjs/components/shared/file-viewer/FileViewerNonViewable.js +46 -17
- package/cjs/components/shared/file-viewer/FileViewerText.js +3 -13
- package/cjs/components/shared/material-modal/MaterialModal.d.ts +1 -1
- package/cjs/components/shared/material-modal/MaterialModal.styled.d.ts +19 -6
- package/cjs/components/shared/material-modal/MaterialModal.styled.js +25 -17
- package/cjs/components/shared/monaco-editor/MonacoEditor.js +22 -14
- package/cjs/components/shared/monaco-editor/MonacoEditorLazy.js +0 -4
- package/cjs/components/shared/monaco-editor/MonacoEditorMobile.js +2 -2
- package/cjs/components/shared/monaco-editor/MonacoEditorPerferenceForm.js +28 -21
- package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoMarkers.js +0 -1
- package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoOptions.d.ts +0 -1
- package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoOptions.js +2 -2
- package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoTheme.d.ts +1 -1
- package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoTheme.js +1 -2
- package/cjs/components/shared/monaco-editor/editor-languages/css/formatter.js +17 -21
- package/cjs/components/shared/monaco-editor/editor-languages/css/index.js +1 -1
- package/cjs/components/shared/monaco-editor/editor-languages/html/formatter.js +17 -21
- package/cjs/components/shared/monaco-editor/editor-languages/html/index.js +1 -1
- package/cjs/components/shared/monaco-editor/editor-languages/typescript/formatter.js +20 -24
- package/cjs/components/shared/monaco-editor/editor-languages/typescript/index.js +1 -2
- package/cjs/components/shared/monaco-editor/hooks/useEditorOptions.js +1 -1
- package/cjs/components/shared/monaco-editor/index.js +5 -5
- package/cjs/components/shared/monaco-editor/utils/emmet/abbreviationActions.d.ts +1 -1
- package/cjs/components/shared/monaco-editor/utils/emmet/abbreviationActions.js +2 -2
- package/cjs/components/shared/monaco-editor/utils/emmet/registerProvider.js +2 -2
- package/cjs/components/shared/monaco-editor/utils/grammar/index.js +24 -28
- package/cjs/components/shared/monaco-editor/utils/grammar/onigasm.js +8 -9
- package/cjs/components/shared/monaco-editor/utils/grammar/textmate.js +16 -18
- package/cjs/components/shared/monaco-editor/utils/prettier/index.js +13 -16
- package/cjs/components/shared/monaco-editor/utils/theme/convert.js +1 -1
- package/cjs/components/shared/monaco-editor/utils/theme/index.js +4 -7
- package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursor.js +1 -2
- package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorManager.d.ts +1 -2
- package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorManager.js +2 -3
- package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorWidget.js +1 -2
- package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelection.js +1 -2
- package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelectionManager.d.ts +1 -2
- package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelectionManager.js +1 -2
- package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/styles.d.ts +1 -1
- package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/styles.js +2 -2
- package/cjs/components/shared/monaco-editor/vendors/vscode-emmet-helper/emmetHelper.js +0 -1
- package/cjs/components/shared/no-vnc/NoVnc.js +44 -24
- package/cjs/components/shared/preview-container/PreviewContainer.d.ts +1 -1
- package/cjs/components/shared/preview-container/PreviewContainer.js +8 -8
- package/cjs/components/shared/web-browser/WebBrowser.js +20 -12
- package/cjs/components/shared/xterm/Xterm.js +9 -9
- package/cjs/components/shared/xterm/utils/index.js +0 -1
- package/cjs/constants/stylesheets.d.ts +2 -2
- package/cjs/constants/stylesheets.js +2 -2
- package/cjs/hooks/useArduino.js +70 -80
- package/cjs/hooks/useExerciseFile.js +1 -4
- package/cjs/hooks/useMaterialExerciseFileUrl.js +13 -13
- package/cjs/hooks/useRunnerRoomWebSocket.js +7 -10
- package/cjs/hooks/useStdioTextConcator.js +3 -6
- package/cjs/hooks/useUsercodeEditWebSocket.js +26 -29
- package/cjs/hooks/useUsercodeHistory.js +28 -30
- package/cjs/index.js +9 -9
- package/cjs/utils/arduino.d.ts +0 -3
- package/es/_virtual/_rollupPluginBabelHelpers.js +240 -451
- package/es/components/index.js +3 -3
- package/es/components/material-exercise/MaterialExercise.js +14 -17
- package/es/components/material-exercise/MaterialExercise.styled.d.ts +40 -10
- package/es/components/material-exercise/MaterialExercise.styled.js +67 -32
- package/es/components/material-exercise/MaterialExerciseMobile.js +3 -6
- package/es/components/material-exercise/context/ExerciseProvider.js +16 -7
- package/es/components/material-exercise/context/ExerciseProviderNoImage.d.ts +1 -1
- package/es/components/material-exercise/context/ExerciseProviderNoImage.js +4 -4
- package/es/components/material-exercise/context/recoil.js +204 -221
- package/es/components/material-exercise/context/recoilTypes.d.ts +1 -2
- package/es/components/material-exercise/context/types.d.ts +0 -1
- package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +9 -25
- package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.d.ts +23 -9
- package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.js +44 -21
- package/es/components/material-exercise/exercise-file/ExerciseFile.js +7 -21
- package/es/components/material-exercise/exercise-file-editor/ExerciseFileEditor.js +35 -49
- package/es/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.js +4 -8
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +15 -14
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsLazy.d.ts +1 -1
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsLazy.js +1 -5
- package/es/components/material-exercise/exercise-file-tabs/exercise-file-tabs-file-tree-button/ExerciseFileTabsFileTreeButton.js +9 -12
- package/es/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +73 -99
- package/es/components/material-exercise/exercise-file-tree/ExerciseFileTreeLazy.d.ts +1 -1
- package/es/components/material-exercise/exercise-file-tree/ExerciseFileTreeLazy.js +1 -5
- package/es/components/material-exercise/exercise-file-viewer/ExerciseFileViewer.js +2 -9
- package/es/components/material-exercise/exercise-menu/ExerciseMenu.js +6 -9
- package/es/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.d.ts +1 -1
- package/es/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.js +0 -4
- package/es/components/material-exercise/exercise-menu/ExerciseMenuArduinoSettings.js +10 -14
- package/es/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +5 -7
- package/es/components/material-exercise/exercise-menu/ExerciseMenuReset.d.ts +1 -1
- package/es/components/material-exercise/exercise-menu/ExerciseMenuReset.js +1 -15
- package/es/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +7 -13
- package/es/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.styled.d.ts +46 -13
- package/es/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.styled.js +80 -37
- package/es/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdown.js +2 -5
- package/es/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdownLazy.d.ts +1 -1
- package/es/components/material-exercise/exercise-preview/ExercisePreview.js +8 -10
- package/es/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.d.ts +1 -2
- package/es/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.js +3 -6
- package/es/components/material-exercise/exercise-rightpane/ExerciseRightpane.d.ts +1 -1
- package/es/components/material-exercise/exercise-rightpane/ExerciseRightpane.js +25 -21
- package/es/components/material-exercise/exercise-rightpane/ExerciseRightpaneEditorPerference.js +1 -6
- package/es/components/material-exercise/exercise-rightpane/ExerciseRightpaneEnvironment.js +15 -10
- package/es/components/material-exercise/exercise-room/ExerciseRoom.styled.d.ts +30 -9
- package/es/components/material-exercise/exercise-room/ExerciseRoom.styled.js +32 -24
- package/es/components/material-exercise/exercise-room/ExerciseRoomDetail.js +103 -108
- package/es/components/material-exercise/exercise-room/ExerciseRoomList.js +32 -36
- package/es/components/material-exercise/exercise-runner/ExerciseRunner.js +53 -72
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerController.js +7 -21
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +2 -6
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.d.ts +1 -1
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.js +27 -21
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +22 -26
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.d.ts +1 -1
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +1 -1
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +28 -26
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusIndicator.d.ts +4 -1
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusIndicator.js +5 -5
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.d.ts +1 -1
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.js +14 -10
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerTimer.js +5 -8
- package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +108 -115
- package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.styled.d.ts +30 -9
- package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.styled.js +54 -25
- package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistoryOutput.js +20 -16
- package/es/components/material-exercise/index.d.ts +1 -1
- package/es/components/shared/exercise-menu-button/ExerciseMenuButton.d.ts +1 -1
- package/es/components/shared/exercise-menu-button/ExerciseMenuButton.js +18 -10
- package/es/components/shared/exercise-shimmer/ExerciseFileShimmer.d.ts +1 -1
- package/es/components/shared/exercise-shimmer/ExerciseFileShimmer.js +16 -16
- package/es/components/shared/exercise-shimmer/ExerciseFileTabShimmer.d.ts +1 -1
- package/es/components/shared/exercise-shimmer/ExerciseFileTabShimmer.js +8 -8
- package/es/components/shared/exercise-shimmer/ExerciseFileTabsShimmer.d.ts +1 -1
- package/es/components/shared/exercise-shimmer/ExerciseFileTabsShimmer.js +4 -4
- package/es/components/shared/exercise-shimmer/ExerciseFileTreeListItemShimmer.d.ts +1 -1
- package/es/components/shared/exercise-shimmer/ExerciseFileTreeListItemShimmer.js +12 -12
- package/es/components/shared/exercise-shimmer/ExerciseFileTreeListShimmer.js +18 -10
- package/es/components/shared/exercise-version-list/ExerciseVersionList.d.ts +1 -1
- package/es/components/shared/exercise-version-list/ExerciseVersionList.styled.d.ts +5 -8
- package/es/components/shared/exercise-version-list/ExerciseVersionList.styled.js +12 -4
- package/es/components/shared/exercise-version-list/ExerciseVersionListItem.d.ts +1 -1
- package/es/components/shared/exercise-version-list/ExerciseVersionListItem.styled.d.ts +20 -5
- package/es/components/shared/exercise-version-list/ExerciseVersionListItem.styled.js +36 -14
- package/es/components/shared/file-tabs/FileTab.js +5 -5
- package/es/components/shared/file-tabs/FileTab.styled.d.ts +29 -8
- package/es/components/shared/file-tabs/FileTab.styled.js +49 -26
- package/es/components/shared/file-tabs/FileTabs.styled.d.ts +8 -2
- package/es/components/shared/file-tabs/FileTabs.styled.js +16 -8
- package/es/components/shared/file-tree/FileTree.d.ts +1 -1
- package/es/components/shared/file-tree/FileTree.js +19 -11
- package/es/components/shared/file-tree/FileTreeConfig.js +5 -5
- package/es/components/shared/file-tree/FileTreeList.d.ts +1 -1
- package/es/components/shared/file-tree/FileTreeList.js +10 -8
- package/es/components/shared/file-tree/FileTreeListItemContent.js +5 -5
- package/es/components/shared/file-tree/FileTreeListItemContent.styled.d.ts +35 -10
- package/es/components/shared/file-tree/FileTreeListItemContent.styled.js +49 -33
- package/es/components/shared/file-tree/FileTreeListItemContentInput.js +9 -9
- package/es/components/shared/file-tree/FileTreeListItemContentInput.styled.d.ts +7 -3
- package/es/components/shared/file-tree/FileTreeListItemContentInput.styled.js +15 -7
- package/es/components/shared/file-tree/FileTreeListItemContentMenu.js +1 -1
- package/es/components/shared/file-tree/FileTreeListItems.d.ts +1 -1
- package/es/components/shared/file-tree/FileTreeListItems.js +13 -11
- package/es/components/shared/file-tree/FileTreeListItems.styled.d.ts +8 -2
- package/es/components/shared/file-tree/FileTreeListItems.styled.js +22 -7
- package/es/components/shared/file-tree/FileTreeToolbar.styled.d.ts +4 -1
- package/es/components/shared/file-tree/FileTreeToolbar.styled.js +4 -4
- package/es/components/shared/file-tree/context/FileTreeContext.d.ts +1 -1
- package/es/components/shared/file-tree/context/FileTreeContext.js +0 -1
- package/es/components/shared/file-tree/file-tree-toolbar/FileTreeToolbar.js +7 -7
- package/es/components/shared/file-tree/index.d.ts +1 -1
- package/es/components/shared/file-tree/utils/fileTreeGenerator.js +3 -5
- package/es/components/shared/file-viewer/FileViewer.js +9 -13
- package/es/components/shared/file-viewer/FileViewerCsv.js +68 -52
- package/es/components/shared/file-viewer/FileViewerImage.d.ts +1 -1
- package/es/components/shared/file-viewer/FileViewerImage.js +13 -9
- package/es/components/shared/file-viewer/FileViewerIpynb.js +13 -9
- package/es/components/shared/file-viewer/FileViewerNonViewable.d.ts +1 -1
- package/es/components/shared/file-viewer/FileViewerNonViewable.js +45 -16
- package/es/components/shared/file-viewer/FileViewerText.js +3 -13
- package/es/components/shared/material-modal/MaterialModal.d.ts +1 -1
- package/es/components/shared/material-modal/MaterialModal.styled.d.ts +19 -6
- package/es/components/shared/material-modal/MaterialModal.styled.js +24 -16
- package/es/components/shared/monaco-editor/MonacoEditor.js +21 -13
- package/es/components/shared/monaco-editor/MonacoEditorLazy.js +0 -4
- package/es/components/shared/monaco-editor/MonacoEditorMobile.js +2 -2
- package/es/components/shared/monaco-editor/MonacoEditorPerferenceForm.js +27 -20
- package/es/components/shared/monaco-editor/editor-hooks/useMonacoMarkers.js +0 -1
- package/es/components/shared/monaco-editor/editor-hooks/useMonacoOptions.d.ts +0 -1
- package/es/components/shared/monaco-editor/editor-hooks/useMonacoOptions.js +2 -2
- package/es/components/shared/monaco-editor/editor-hooks/useMonacoTheme.d.ts +1 -1
- package/es/components/shared/monaco-editor/editor-hooks/useMonacoTheme.js +1 -2
- package/es/components/shared/monaco-editor/editor-languages/css/formatter.js +18 -22
- package/es/components/shared/monaco-editor/editor-languages/css/index.js +1 -1
- package/es/components/shared/monaco-editor/editor-languages/html/formatter.js +18 -22
- package/es/components/shared/monaco-editor/editor-languages/html/index.js +1 -1
- package/es/components/shared/monaco-editor/editor-languages/typescript/formatter.js +21 -25
- package/es/components/shared/monaco-editor/editor-languages/typescript/index.js +1 -2
- package/es/components/shared/monaco-editor/hooks/useEditorOptions.js +1 -1
- package/es/components/shared/monaco-editor/index.js +2 -2
- package/es/components/shared/monaco-editor/utils/emmet/abbreviationActions.d.ts +1 -1
- package/es/components/shared/monaco-editor/utils/emmet/abbreviationActions.js +2 -2
- package/es/components/shared/monaco-editor/utils/emmet/registerProvider.js +2 -2
- package/es/components/shared/monaco-editor/utils/grammar/index.js +25 -29
- package/es/components/shared/monaco-editor/utils/grammar/onigasm.js +9 -10
- package/es/components/shared/monaco-editor/utils/grammar/textmate.js +17 -19
- package/es/components/shared/monaco-editor/utils/prettier/index.js +14 -17
- package/es/components/shared/monaco-editor/utils/theme/convert.js +1 -1
- package/es/components/shared/monaco-editor/utils/theme/index.js +5 -8
- package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursor.js +1 -2
- package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorManager.d.ts +1 -2
- package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorManager.js +2 -3
- package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorWidget.js +1 -2
- package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelection.js +1 -2
- package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelectionManager.d.ts +1 -2
- package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelectionManager.js +1 -2
- package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/styles.d.ts +1 -1
- package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/styles.js +2 -2
- package/es/components/shared/monaco-editor/vendors/vscode-emmet-helper/emmetHelper.js +1 -2
- package/es/components/shared/no-vnc/NoVnc.js +43 -23
- package/es/components/shared/preview-container/PreviewContainer.d.ts +1 -1
- package/es/components/shared/preview-container/PreviewContainer.js +7 -7
- package/es/components/shared/web-browser/WebBrowser.js +19 -11
- package/es/components/shared/xterm/Xterm.js +8 -8
- package/es/components/shared/xterm/utils/index.js +0 -1
- package/es/constants/stylesheets.d.ts +2 -2
- package/es/constants/stylesheets.js +2 -2
- package/es/hooks/useArduino.js +72 -82
- package/es/hooks/useExerciseFile.js +1 -4
- package/es/hooks/useMaterialExerciseFileUrl.js +14 -14
- package/es/hooks/useRunnerRoomWebSocket.js +8 -11
- package/es/hooks/useStdioTextConcator.js +3 -6
- package/es/hooks/useUsercodeEditWebSocket.js +27 -30
- package/es/hooks/useUsercodeHistory.js +29 -31
- package/es/index.js +3 -3
- package/es/utils/arduino.d.ts +0 -3
- package/es/utils/arduino.js +1 -1
- package/package.json +15 -17
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import _styled from '@emotion/styled/base';
|
|
2
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
4
|
import React, { forwardRef } from 'react';
|
|
4
5
|
import { useMeasure, useMount, useUnmount, useUpdateEffect } from 'react-use';
|
|
@@ -14,30 +15,51 @@ import RFB_decoders_tight from '@novnc/novnc/core/decoders/tight';
|
|
|
14
15
|
import RFB_decoders_tight_png from '@novnc/novnc/core/decoders/tightpng';
|
|
15
16
|
import { encodings } from '@novnc/novnc/core/encodings';
|
|
16
17
|
import RFB from '@novnc/novnc/core/rfb';
|
|
17
|
-
import styled from 'styled-components';
|
|
18
|
-
import ExerciseMenuButton from '../exercise-menu-button/ExerciseMenuButton.js';
|
|
19
|
-
import PreviewContainer from '../preview-container/PreviewContainer.js';
|
|
20
18
|
import messageEn from './locales/en.json.js';
|
|
19
|
+
import PreviewContainer from '../preview-container/PreviewContainer.js';
|
|
20
|
+
import ExerciseMenuButton from '../exercise-menu-button/ExerciseMenuButton.js';
|
|
21
21
|
|
|
22
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
22
23
|
//
|
|
23
24
|
//
|
|
24
25
|
//
|
|
25
26
|
var VNC_BACKGROUND_COLOR = base.color.navy7;
|
|
26
|
-
var StyledHeaderTitle =
|
|
27
|
-
|
|
28
|
-
})(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
27
|
+
var StyledHeaderTitle = /*#__PURE__*/_styled("div", {
|
|
28
|
+
target: "ejcezyv4"
|
|
29
|
+
})("production" === "production" ? {
|
|
30
|
+
name: "82a6rk",
|
|
31
|
+
styles: "flex:1"
|
|
32
|
+
} : {
|
|
33
|
+
name: "82a6rk",
|
|
34
|
+
styles: "flex:1",
|
|
35
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
36
|
+
});
|
|
37
|
+
var StyledHeaderButtonGroup = /*#__PURE__*/_styled("div", {
|
|
38
|
+
target: "ejcezyv3"
|
|
39
|
+
})("production" === "production" ? {
|
|
40
|
+
name: "6w70r0",
|
|
41
|
+
styles: "flex:0 0 auto;display:flex;align-items:center"
|
|
42
|
+
} : {
|
|
43
|
+
name: "6w70r0",
|
|
44
|
+
styles: "flex:0 0 auto;display:flex;align-items:center",
|
|
45
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
46
|
+
});
|
|
47
|
+
var StyledVncWrap = /*#__PURE__*/_styled("div", {
|
|
48
|
+
target: "ejcezyv2"
|
|
49
|
+
})("display:flex;align-items:center;justify-content:center;width:100%;height:100%;background-color:", VNC_BACKGROUND_COLOR, ";overflow:hidden;");
|
|
50
|
+
var StyledNoVncContainer = /*#__PURE__*/_styled("div", {
|
|
51
|
+
target: "ejcezyv1"
|
|
52
|
+
})();
|
|
53
|
+
var StyledNoVnc = /*#__PURE__*/_styled("div", {
|
|
54
|
+
target: "ejcezyv0"
|
|
55
|
+
})("production" === "production" ? {
|
|
56
|
+
name: "1d7o9kz",
|
|
57
|
+
styles: "position:relative;left:50%;top:50%;transform-origin:center center;transform:translate(-50%, -50%)"
|
|
58
|
+
} : {
|
|
59
|
+
name: "1d7o9kz",
|
|
60
|
+
styles: "position:relative;left:50%;top:50%;transform-origin:center center;transform:translate(-50%, -50%)",
|
|
61
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
62
|
+
});
|
|
41
63
|
//
|
|
42
64
|
//
|
|
43
65
|
//
|
|
@@ -219,9 +241,7 @@ var NoVnc = forwardRef(function (_ref, ref) {
|
|
|
219
241
|
}
|
|
220
242
|
vncRfb.current.scaleViewport = isVncScaledFromLocal;
|
|
221
243
|
vncRfb.current.resizeSession = !isVncScaledFromLocal;
|
|
222
|
-
},
|
|
223
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
224
|
-
[isVncScaledFromLocal]);
|
|
244
|
+
}, [isVncScaledFromLocal]);
|
|
225
245
|
//
|
|
226
246
|
//
|
|
227
247
|
//
|
|
@@ -284,6 +304,6 @@ var NoVnc = forwardRef(function (_ref, ref) {
|
|
|
284
304
|
})
|
|
285
305
|
});
|
|
286
306
|
});
|
|
287
|
-
var
|
|
307
|
+
var NoVnc_default = new IntlComponentBuilder(NoVnc).add('en', messageEn).addAsync('ko', import('./locales/ko.json.js')).addAsync('th', import('./locales/th.json.js')).addAsync('ja', import('./locales/ja.json.js')).build();
|
|
288
308
|
|
|
289
|
-
export {
|
|
309
|
+
export { NoVnc_default as default };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
1
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
3
|
import { forwardRef } from 'react';
|
|
3
4
|
import { base } from '@elice/design-tokens';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
5
|
|
|
6
6
|
var PREVIEW_CONTAINER_HEADER_HEIGHT = 36; // 2.25rem
|
|
7
7
|
var PREVIEW_CONTAINER_HEADER_PADDING_TOP_BOTTOM = 4; // 0.25rem
|
|
8
|
-
var StyledPreviewContainer =
|
|
9
|
-
|
|
10
|
-
})(
|
|
11
|
-
var StyledPreviewHeader =
|
|
12
|
-
|
|
13
|
-
})(
|
|
8
|
+
var StyledPreviewContainer = /*#__PURE__*/_styled("div", {
|
|
9
|
+
target: "e1xlhqh31"
|
|
10
|
+
})("display:flex;flex-direction:column;width:100%;height:100%;background-color:", base.color.white, ";overflow:hidden;");
|
|
11
|
+
var StyledPreviewHeader = /*#__PURE__*/_styled("div", {
|
|
12
|
+
target: "e1xlhqh30"
|
|
13
|
+
})("flex:0 0 ", PREVIEW_CONTAINER_HEADER_HEIGHT, "px;display:flex;align-items:center;padding:", PREVIEW_CONTAINER_HEADER_PADDING_TOP_BOTTOM, "px 0.5rem;border-bottom:1px solid ", base.color.navy7, ";background-color:", base.color.navy8, ";");
|
|
14
14
|
var PreviewContainer = forwardRef(function (_ref, ref) {
|
|
15
15
|
var children = _ref.children,
|
|
16
16
|
header = _ref.header;
|
|
@@ -1,23 +1,31 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import _styled from '@emotion/styled/base';
|
|
2
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
4
|
import React, { forwardRef } from 'react';
|
|
4
5
|
import { Flex } from '@elice/blocks';
|
|
5
6
|
import { base } from '@elice/design-tokens';
|
|
6
7
|
import { eilRetry, eilNewWindow } from '@elice/icons';
|
|
7
8
|
import { IntlComponentBuilder } from '@elice/intl';
|
|
8
|
-
import styled from 'styled-components';
|
|
9
|
-
import ExerciseMenuButton from '../exercise-menu-button/ExerciseMenuButton.js';
|
|
10
9
|
import PreviewContainer, { PREVIEW_CONTAINER_HEADER_HEIGHT, PREVIEW_CONTAINER_HEADER_PADDING_TOP_BOTTOM } from '../preview-container/PreviewContainer.js';
|
|
11
10
|
import messageEn from './locales/en.json.js';
|
|
12
11
|
import messageKo from './locales/ko.json.js';
|
|
12
|
+
import ExerciseMenuButton from '../exercise-menu-button/ExerciseMenuButton.js';
|
|
13
13
|
|
|
14
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
14
15
|
var WEB_BROWSER_URL_INPUT_HEIGHT = PREVIEW_CONTAINER_HEADER_HEIGHT - PREVIEW_CONTAINER_HEADER_PADDING_TOP_BOTTOM * 2;
|
|
15
|
-
var StyledHeaderUrlInput =
|
|
16
|
-
|
|
17
|
-
})(
|
|
18
|
-
var StyledIframe =
|
|
19
|
-
|
|
20
|
-
})(
|
|
16
|
+
var StyledHeaderUrlInput = /*#__PURE__*/_styled("input", {
|
|
17
|
+
target: "euwelzc1"
|
|
18
|
+
})("flex:1;min-width:0;height:", WEB_BROWSER_URL_INPUT_HEIGHT, "px;padding:0.25rem 0.5rem;color:", base.color.white, ";background:", base.color.navy6, ";border:0;border-radius:0.25rem;&:active,&:focus{outline:none;}");
|
|
19
|
+
var StyledIframe = /*#__PURE__*/_styled("iframe", {
|
|
20
|
+
target: "euwelzc0"
|
|
21
|
+
})("production" === "production" ? {
|
|
22
|
+
name: "11zjt2d",
|
|
23
|
+
styles: "flex:1;width:100%;height:100%;min-height:0;border:0"
|
|
24
|
+
} : {
|
|
25
|
+
name: "11zjt2d",
|
|
26
|
+
styles: "flex:1;width:100%;height:100%;min-height:0;border:0",
|
|
27
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
+
});
|
|
21
29
|
/**
|
|
22
30
|
* Attach `_cachebust` search parameter to the URL to prevent caching.
|
|
23
31
|
*/
|
|
@@ -99,7 +107,7 @@ var WebBrowser = forwardRef(function (_ref, ref) {
|
|
|
99
107
|
if (iframeUrl) {
|
|
100
108
|
setInputUrl(iframeUrl);
|
|
101
109
|
}
|
|
102
|
-
} catch (
|
|
110
|
+
} catch (_d) {
|
|
103
111
|
// SecurityError : can be raised on the cross-origin environment!
|
|
104
112
|
// do nothing.
|
|
105
113
|
}
|
|
@@ -159,8 +167,8 @@ var WebBrowser = forwardRef(function (_ref, ref) {
|
|
|
159
167
|
return jsx(StyledIframe, {
|
|
160
168
|
src: iframeSrc,
|
|
161
169
|
title: url,
|
|
162
|
-
|
|
163
|
-
|
|
170
|
+
ref: iframeRef,
|
|
171
|
+
onLoad: handleIframeLoad
|
|
164
172
|
});
|
|
165
173
|
};
|
|
166
174
|
//
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import _styled from '@emotion/styled/base';
|
|
2
3
|
import { jsx } from 'react/jsx-runtime';
|
|
3
4
|
import React, { forwardRef } from 'react';
|
|
4
5
|
import { useMeasure, useDebounce } from 'react-use';
|
|
5
6
|
import { base } from '@elice/design-tokens';
|
|
6
7
|
import { IntlComponentBuilder } from '@elice/intl';
|
|
7
|
-
import styled from 'styled-components';
|
|
8
8
|
import { Terminal } from 'xterm';
|
|
9
9
|
import { FitAddon } from 'xterm-addon-fit';
|
|
10
|
-
import messageEn from './locales/en.json.js';
|
|
11
|
-
import messageKo from './locales/ko.json.js';
|
|
12
10
|
import { patchXtermComposedPath } from './utils/index.js';
|
|
13
11
|
import 'xterm/css/xterm.css';
|
|
12
|
+
import messageEn from './locales/en.json.js';
|
|
13
|
+
import messageKo from './locales/ko.json.js';
|
|
14
14
|
|
|
15
15
|
var XTERM_BACKGROUND_COLOR = base.color.navy9;
|
|
16
|
-
var StyledXtermWrapper =
|
|
17
|
-
|
|
18
|
-
})(
|
|
16
|
+
var StyledXtermWrapper = /*#__PURE__*/_styled("div", {
|
|
17
|
+
target: "evf6lbr0"
|
|
18
|
+
})("flex:1 1 0%;height:100%;background-color:", XTERM_BACKGROUND_COLOR, ";overflow:hidden;padding:1rem;padding-right:0;.xterm-viewport{overflow-y:auto;overflow-x:hidden;}");
|
|
19
19
|
var Xterm = forwardRef(function (_ref, ref) {
|
|
20
20
|
var _ref$isRunning = _ref.isRunning,
|
|
21
21
|
isRunning = _ref$isRunning === void 0 ? false : _ref$isRunning,
|
|
@@ -227,6 +227,6 @@ var Xterm = forwardRef(function (_ref, ref) {
|
|
|
227
227
|
//
|
|
228
228
|
//
|
|
229
229
|
//
|
|
230
|
-
var
|
|
230
|
+
var Xterm_default = new IntlComponentBuilder(Xterm).add('en', messageEn).add('ko', messageKo).addAsync('th', import('./locales/th.json.js')).addAsync('ja', import('./locales/ja.json.js')).build();
|
|
231
231
|
|
|
232
|
-
export {
|
|
232
|
+
export { Xterm_default as default };
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* - ref: https://git.elicer.io/elice/frontend/elice-web/-/issues/1801
|
|
4
4
|
*/
|
|
5
5
|
function patchXtermComposedPath() {
|
|
6
|
-
// eslint-disable-next-line no-eval
|
|
7
6
|
eval('!function(){"function"!==window.Event.prototype.composedPath&&!function(t,o,h){t.composedPath||(t.composedPath=function(){if(this.path)return this.path;var t=this.target;for(this.path=[];null!==t.parentNode;)this.path.push(t),t=t.parentNode;return this.path.push(o,h),this.path})}(Event.prototype,document,window)}();');
|
|
8
7
|
}
|
|
9
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ResizableNextProps } from '@elice/blocks';
|
|
2
|
-
import type { CSSProperties } from '
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
3
|
interface MaterialScrollBarOptions {
|
|
4
4
|
width?: CSSProperties['width'];
|
|
5
5
|
height?: CSSProperties['height'];
|
|
@@ -25,5 +25,5 @@ export declare const MATERIAL_SCROLL_BAR_BACKGROUND_COLOR: "#2e2e3c";
|
|
|
25
25
|
/**
|
|
26
26
|
* CSS for scroll bar.
|
|
27
27
|
*/
|
|
28
|
-
export declare const getMaterialScrollBarCss: (options: MaterialScrollBarOptions) => import("
|
|
28
|
+
export declare const getMaterialScrollBarCss: (options: MaterialScrollBarOptions) => import("@emotion/react").SerializedStyles;
|
|
29
29
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { base } from '@elice/design-tokens';
|
|
2
|
-
import { css } from '
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Common props for resizable blocks.
|
|
@@ -27,7 +27,7 @@ var MATERIAL_SCROLL_BAR_BACKGROUND_COLOR = base.color.navy8;
|
|
|
27
27
|
* CSS for scroll bar.
|
|
28
28
|
*/
|
|
29
29
|
var getMaterialScrollBarCss = function getMaterialScrollBarCss(options) {
|
|
30
|
-
return css(
|
|
30
|
+
return /*#__PURE__*/css("::-webkit-scrollbar{display:", options.hideable ? 'none' : 'initial', ";width:", options.width, ";height:", options.height, ";}::-webkit-scrollbar-track-piece{background-color:", MATERIAL_SCROLL_BAR_BACKGROUND_COLOR, ";}::-webkit-scrollbar-thumb{border-radius:", options.borderRadius || '2px', ";background-color:", MATERIAL_SCROLL_BAR_COLOR, ";}&:hover{scrollbar-width:thin;::-webkit-scrollbar{display:initial;}}");
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export { MATERIAL_DIVIDER_BORDER_VALUE, MATERIAL_RESIZABLE_COMMON_PROPS, MATERIAL_SCROLL_BAR_BACKGROUND_COLOR, MATERIAL_SCROLL_BAR_COLOR, getMaterialScrollBarCss };
|
package/es/hooks/useArduino.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator,
|
|
1
|
+
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator, createForOfIteratorHelper as _createForOfIteratorHelper } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { useRef, useState, useEffect } from 'react';
|
|
3
3
|
import { usePrevious } from 'react-use';
|
|
4
4
|
import { useRecoilState, useSetRecoilState } from 'recoil';
|
|
5
5
|
import io from 'socket.io-client';
|
|
6
|
-
import {
|
|
7
|
-
import '../components/material-exercise/context/context.js';
|
|
8
|
-
import '../components/material-exercise/context/recoilTypes.js';
|
|
9
|
-
import '../components/material-exercise/context/subjects.js';
|
|
10
|
-
import '../components/material-exercise/context/ExerciseProvider.js';
|
|
11
|
-
import { AVR_COMMANDLINE, AVR_SIGNATURE, DISABLE_TIME_AFTER_UPLOAD, ARDUINO_AGENT_PORTS } from '../constants/arduino.js';
|
|
6
|
+
import { AVR_SIGNATURE, AVR_COMMANDLINE, ARDUINO_AGENT_PORTS, DISABLE_TIME_AFTER_UPLOAD } from '../constants/arduino.js';
|
|
12
7
|
import { getArduinoBoardType, getFileContent, createArduinoUrl, getFQBN } from '../utils/arduino.js';
|
|
8
|
+
import { exerciseArduinoPortsState, exerciseArduinoOpenedPortNameState, exerciseArduinoAgentConnectionState, exerciseArduinoUploadProgressState, exerciseArduinoPreferenceState, exerciseArduinoOnSelectPortState } from '../components/material-exercise/context/recoil.js';
|
|
13
9
|
|
|
14
10
|
//
|
|
15
11
|
//
|
|
@@ -143,44 +139,43 @@ var useArduino = function useArduino(_ref) {
|
|
|
143
139
|
* Send list command to the agent.
|
|
144
140
|
*/
|
|
145
141
|
var ping = /*#__PURE__*/function () {
|
|
146
|
-
var _ref2 = _asyncToGenerator(
|
|
147
|
-
return
|
|
148
|
-
while (1) switch (_context.
|
|
142
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
143
|
+
return _regenerator().w(function (_context) {
|
|
144
|
+
while (1) switch (_context.p = _context.n) {
|
|
149
145
|
case 0:
|
|
150
146
|
if (agentHttpPort) {
|
|
151
|
-
_context.
|
|
147
|
+
_context.n = 1;
|
|
152
148
|
break;
|
|
153
149
|
}
|
|
154
|
-
return _context.
|
|
155
|
-
case
|
|
150
|
+
return _context.a(2);
|
|
151
|
+
case 1:
|
|
156
152
|
if (!state.current.uploadingPortName) {
|
|
157
|
-
_context.
|
|
153
|
+
_context.n = 2;
|
|
158
154
|
break;
|
|
159
155
|
}
|
|
160
|
-
return _context.
|
|
161
|
-
case
|
|
162
|
-
_context.
|
|
163
|
-
_context.
|
|
156
|
+
return _context.a(2);
|
|
157
|
+
case 2:
|
|
158
|
+
_context.p = 2;
|
|
159
|
+
_context.n = 3;
|
|
164
160
|
return fetch(createArduinoUrl({
|
|
165
161
|
protocol: 'http',
|
|
166
162
|
pathname: '/info',
|
|
167
163
|
port: agentHttpPort
|
|
168
164
|
}));
|
|
169
|
-
case
|
|
165
|
+
case 3:
|
|
170
166
|
send('list');
|
|
171
|
-
_context.
|
|
167
|
+
_context.n = 5;
|
|
172
168
|
break;
|
|
173
|
-
case
|
|
174
|
-
_context.
|
|
175
|
-
_context.
|
|
169
|
+
case 4:
|
|
170
|
+
_context.p = 4;
|
|
171
|
+
_context.v;
|
|
176
172
|
// if ping fails, reconnect the agent.
|
|
177
173
|
reload();
|
|
178
174
|
setAgentConnectionStatus('reconnecting');
|
|
179
|
-
case
|
|
180
|
-
|
|
181
|
-
return _context.stop();
|
|
175
|
+
case 5:
|
|
176
|
+
return _context.a(2);
|
|
182
177
|
}
|
|
183
|
-
}, _callee, null, [[
|
|
178
|
+
}, _callee, null, [[2, 4]]);
|
|
184
179
|
}));
|
|
185
180
|
return function ping() {
|
|
186
181
|
return _ref2.apply(this, arguments);
|
|
@@ -239,7 +234,7 @@ var useArduino = function useArduino(_ref) {
|
|
|
239
234
|
return res.json();
|
|
240
235
|
}).then(function () {
|
|
241
236
|
// no response (202 accepted)
|
|
242
|
-
})
|
|
237
|
+
})["catch"](function () {
|
|
243
238
|
//
|
|
244
239
|
});
|
|
245
240
|
};
|
|
@@ -375,22 +370,22 @@ var useArduino = function useArduino(_ref) {
|
|
|
375
370
|
var reconnectTimeout = null;
|
|
376
371
|
/** Scan port. */
|
|
377
372
|
var _scan = /*#__PURE__*/function () {
|
|
378
|
-
var _ref3 = _asyncToGenerator(
|
|
379
|
-
var _iterator, _step, port;
|
|
380
|
-
return
|
|
381
|
-
while (1) switch (_context2.
|
|
373
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
374
|
+
var _iterator, _step, port, _t2, _t3;
|
|
375
|
+
return _regenerator().w(function (_context2) {
|
|
376
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
382
377
|
case 0:
|
|
383
378
|
_iterator = _createForOfIteratorHelper(ARDUINO_AGENT_PORTS);
|
|
384
|
-
_context2.
|
|
379
|
+
_context2.p = 1;
|
|
385
380
|
_iterator.s();
|
|
386
|
-
case
|
|
381
|
+
case 2:
|
|
387
382
|
if ((_step = _iterator.n()).done) {
|
|
388
|
-
_context2.
|
|
383
|
+
_context2.n = 7;
|
|
389
384
|
break;
|
|
390
385
|
}
|
|
391
386
|
port = _step.value;
|
|
392
|
-
_context2.
|
|
393
|
-
_context2.
|
|
387
|
+
_context2.p = 3;
|
|
388
|
+
_context2.n = 4;
|
|
394
389
|
return fetch(createArduinoUrl({
|
|
395
390
|
protocol: 'http',
|
|
396
391
|
pathname: '/info',
|
|
@@ -398,47 +393,44 @@ var useArduino = function useArduino(_ref) {
|
|
|
398
393
|
}), {
|
|
399
394
|
signal: abortCtrl.signal
|
|
400
395
|
});
|
|
401
|
-
case
|
|
402
|
-
return _context2.
|
|
403
|
-
case
|
|
404
|
-
_context2.
|
|
405
|
-
|
|
406
|
-
if (!(
|
|
407
|
-
_context2.
|
|
396
|
+
case 4:
|
|
397
|
+
return _context2.a(2, port);
|
|
398
|
+
case 5:
|
|
399
|
+
_context2.p = 5;
|
|
400
|
+
_t2 = _context2.v;
|
|
401
|
+
if (!(_t2.name === 'AbortError')) {
|
|
402
|
+
_context2.n = 6;
|
|
408
403
|
break;
|
|
409
404
|
}
|
|
410
|
-
throw
|
|
411
|
-
case
|
|
412
|
-
_context2.
|
|
405
|
+
throw _t2;
|
|
406
|
+
case 6:
|
|
407
|
+
_context2.n = 2;
|
|
413
408
|
break;
|
|
414
|
-
case
|
|
415
|
-
_context2.
|
|
409
|
+
case 7:
|
|
410
|
+
_context2.n = 9;
|
|
416
411
|
break;
|
|
417
|
-
case
|
|
418
|
-
_context2.
|
|
419
|
-
|
|
420
|
-
_iterator.e(
|
|
421
|
-
case
|
|
422
|
-
_context2.
|
|
412
|
+
case 8:
|
|
413
|
+
_context2.p = 8;
|
|
414
|
+
_t3 = _context2.v;
|
|
415
|
+
_iterator.e(_t3);
|
|
416
|
+
case 9:
|
|
417
|
+
_context2.p = 9;
|
|
423
418
|
_iterator.f();
|
|
424
|
-
return _context2.
|
|
425
|
-
case
|
|
426
|
-
return _context2.
|
|
427
|
-
case 26:
|
|
428
|
-
case "end":
|
|
429
|
-
return _context2.stop();
|
|
419
|
+
return _context2.f(9);
|
|
420
|
+
case 10:
|
|
421
|
+
return _context2.a(2, null);
|
|
430
422
|
}
|
|
431
|
-
}, _callee2, null, [[
|
|
423
|
+
}, _callee2, null, [[3, 5], [1, 8, 9, 10]]);
|
|
432
424
|
}));
|
|
433
425
|
return function _scan() {
|
|
434
426
|
return _ref3.apply(this, arguments);
|
|
435
427
|
};
|
|
436
428
|
}();
|
|
437
429
|
/** Scan port to discover until found. */
|
|
438
|
-
var
|
|
439
|
-
var _ref4 = _asyncToGenerator(
|
|
440
|
-
return
|
|
441
|
-
while (1) switch (_context3.
|
|
430
|
+
var _discover2 = /*#__PURE__*/function () {
|
|
431
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
432
|
+
return _regenerator().w(function (_context3) {
|
|
433
|
+
while (1) switch (_context3.n) {
|
|
442
434
|
case 0:
|
|
443
435
|
void _scan().then(function (port) {
|
|
444
436
|
// if port found, stop scanning and set port
|
|
@@ -448,15 +440,14 @@ var useArduino = function useArduino(_ref) {
|
|
|
448
440
|
// or start scanning again
|
|
449
441
|
else {
|
|
450
442
|
reconnectTimeout = window.setTimeout(function () {
|
|
451
|
-
return void
|
|
443
|
+
return void _discover2();
|
|
452
444
|
}, AGENT_REDISCOVER_DELAY);
|
|
453
445
|
}
|
|
454
|
-
})
|
|
446
|
+
})["catch"](function () {
|
|
455
447
|
return void 0;
|
|
456
448
|
});
|
|
457
449
|
case 1:
|
|
458
|
-
|
|
459
|
-
return _context3.stop();
|
|
450
|
+
return _context3.a(2);
|
|
460
451
|
}
|
|
461
452
|
}, _callee3);
|
|
462
453
|
}));
|
|
@@ -466,7 +457,7 @@ var useArduino = function useArduino(_ref) {
|
|
|
466
457
|
}();
|
|
467
458
|
// start scanning...
|
|
468
459
|
setAgentConnectionStatus('connecting');
|
|
469
|
-
void
|
|
460
|
+
void _discover2();
|
|
470
461
|
return function () {
|
|
471
462
|
abortCtrl.abort();
|
|
472
463
|
if (reconnectTimeout) {
|
|
@@ -485,15 +476,15 @@ var useArduino = function useArduino(_ref) {
|
|
|
485
476
|
return;
|
|
486
477
|
}
|
|
487
478
|
var _init = /*#__PURE__*/function () {
|
|
488
|
-
var _ref5 = _asyncToGenerator(
|
|
489
|
-
return
|
|
490
|
-
while (1) switch (_context4.
|
|
479
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
|
|
480
|
+
return _regenerator().w(function (_context4) {
|
|
481
|
+
while (1) switch (_context4.n) {
|
|
491
482
|
case 0:
|
|
492
|
-
_context4.
|
|
483
|
+
_context4.n = 1;
|
|
493
484
|
return new Promise(function (r) {
|
|
494
485
|
return window.setTimeout(r, AGENT_INIT_DELAY);
|
|
495
486
|
});
|
|
496
|
-
case
|
|
487
|
+
case 1:
|
|
497
488
|
setAgentConnectionStatus('connecting');
|
|
498
489
|
// connect socket.io-client to the agent.
|
|
499
490
|
socket.current = io(createArduinoUrl({
|
|
@@ -505,12 +496,12 @@ var useArduino = function useArduino(_ref) {
|
|
|
505
496
|
try {
|
|
506
497
|
var msg = JSON.parse(message);
|
|
507
498
|
handleAgentMsg(msg);
|
|
508
|
-
} catch (
|
|
499
|
+
} catch (_a) {
|
|
509
500
|
// console.warn(e);
|
|
510
501
|
}
|
|
511
502
|
});
|
|
512
503
|
// agent - on connect
|
|
513
|
-
_context4.
|
|
504
|
+
_context4.n = 2;
|
|
514
505
|
return new Promise(function (resolve) {
|
|
515
506
|
var _a;
|
|
516
507
|
return (_a = socket.current) === null || _a === void 0 ? void 0 : _a.on('connect', resolve);
|
|
@@ -522,14 +513,13 @@ var useArduino = function useArduino(_ref) {
|
|
|
522
513
|
(_d = socket.current) === null || _d === void 0 ? void 0 : _d.emit('command', 'downloadtool rp2040tools latest arduino keep');
|
|
523
514
|
(_e = socket.current) === null || _e === void 0 ? void 0 : _e.emit('command', 'downloadtool avrdude 6.3.0-arduino15 arduino keep');
|
|
524
515
|
});
|
|
525
|
-
case
|
|
516
|
+
case 2:
|
|
526
517
|
setAgentConnectionStatus('connected');
|
|
527
518
|
pingInterval.current = window.setInterval(function () {
|
|
528
519
|
return void ping();
|
|
529
520
|
}, AGENT_CHECK_PING_INTERVAL);
|
|
530
|
-
case
|
|
531
|
-
|
|
532
|
-
return _context4.stop();
|
|
521
|
+
case 3:
|
|
522
|
+
return _context4.a(2);
|
|
533
523
|
}
|
|
534
524
|
}, _callee4);
|
|
535
525
|
}));
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { useContext, useMemo } from 'react';
|
|
2
2
|
import { useRecoilValue } from 'recoil';
|
|
3
3
|
import { exerciseState, exerciseRoomState } from '../components/material-exercise/context/recoil.js';
|
|
4
|
+
import { checkExerciseFileResettable, checkExerciseFileEditable } from '../utils/exerciseFile.js';
|
|
4
5
|
import { ExerciseContext } from '../components/material-exercise/context/context.js';
|
|
5
|
-
import '../components/material-exercise/context/recoilTypes.js';
|
|
6
|
-
import '../components/material-exercise/context/subjects.js';
|
|
7
|
-
import '../components/material-exercise/context/ExerciseProvider.js';
|
|
8
|
-
import { checkExerciseFileEditable, checkExerciseFileResettable } from '../utils/exerciseFile.js';
|
|
9
6
|
|
|
10
7
|
/**
|
|
11
8
|
* Check whether the exercise file is editable.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator,
|
|
1
|
+
import { slicedToArray as _slicedToArray, asyncToGenerator as _asyncToGenerator, regenerator as _regenerator } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { getOrgMaterialExerciseExerciseRoomUserFileGet, getOrgMaterialExerciseExerciseImageExerciseFileGet } from '@elice/api-client';
|
|
4
4
|
|
|
@@ -20,43 +20,43 @@ var useMaterialExerciseFileUrl = function useMaterialExerciseFileUrl(_ref) {
|
|
|
20
20
|
if (!exerciseImage || !filename) {
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
24
|
+
_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
24
25
|
var _a, exerciseImageFileList;
|
|
25
|
-
return
|
|
26
|
-
while (1) switch (_context.
|
|
26
|
+
return _regenerator().w(function (_context) {
|
|
27
|
+
while (1) switch (_context.n) {
|
|
27
28
|
case 0:
|
|
28
29
|
exerciseImageFileList = (_a = exerciseImage.filelist) !== null && _a !== void 0 ? _a : []; // origin from exercise image
|
|
29
30
|
if (!exerciseImageFileList.includes(filename)) {
|
|
30
|
-
_context.
|
|
31
|
+
_context.n = 1;
|
|
31
32
|
break;
|
|
32
33
|
}
|
|
33
|
-
return _context.
|
|
34
|
+
return _context.a(2, getOrgMaterialExerciseExerciseImageExerciseFileGet({
|
|
34
35
|
exerciseImageId: exerciseImage.id,
|
|
35
36
|
filename: filename
|
|
36
37
|
}, {
|
|
37
38
|
signal: abortCtrl.signal
|
|
38
39
|
}).then(function (res) {
|
|
39
40
|
return res.exerciseFile.url;
|
|
40
|
-
})
|
|
41
|
+
})["catch"](function () {
|
|
41
42
|
return null;
|
|
42
43
|
}));
|
|
43
|
-
case
|
|
44
|
-
return _context.
|
|
44
|
+
case 1:
|
|
45
|
+
return _context.a(2, getOrgMaterialExerciseExerciseRoomUserFileGet({
|
|
45
46
|
exerciseRoomId: exerciseRoomId,
|
|
46
47
|
filename: filename
|
|
47
48
|
}, {
|
|
48
49
|
signal: abortCtrl.signal
|
|
49
50
|
}).then(function (res) {
|
|
50
51
|
return res.userFile.url;
|
|
51
|
-
})
|
|
52
|
+
})["catch"](function () {
|
|
52
53
|
return null;
|
|
53
54
|
}));
|
|
54
|
-
case
|
|
55
|
-
|
|
56
|
-
return _context.stop();
|
|
55
|
+
case 2:
|
|
56
|
+
return _context.a(2);
|
|
57
57
|
}
|
|
58
58
|
}, _callee);
|
|
59
|
-
}))().then(setFileUrl)
|
|
59
|
+
}))().then(setFileUrl)["catch"](onError);
|
|
60
60
|
return function () {
|
|
61
61
|
abortCtrl.abort();
|
|
62
62
|
setFileUrl(null);
|