@elice/material-exercise 1.230325.0 → 1.230418.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.
Files changed (373) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +526 -0
  2. package/cjs/components/material-exercise/MaterialExercise.js +44 -63
  3. package/cjs/components/material-exercise/MaterialExercise.styled.js +20 -23
  4. package/cjs/components/material-exercise/MaterialExerciseMobile.js +19 -15
  5. package/cjs/components/material-exercise/context/ExerciseIntlProvider.js +9 -13
  6. package/cjs/components/material-exercise/context/ExerciseProvider.js +83 -81
  7. package/cjs/components/material-exercise/context/ExerciseProviderNoImage.js +16 -16
  8. package/cjs/components/material-exercise/context/context.js +1 -1
  9. package/cjs/components/material-exercise/context/locales/noImage.en.json.js +3 -1
  10. package/cjs/components/material-exercise/context/locales/noImage.ko.json.js +3 -1
  11. package/cjs/components/material-exercise/context/recoil.d.ts +2 -1
  12. package/cjs/components/material-exercise/context/recoil.js +562 -373
  13. package/cjs/components/material-exercise/context/recoilTypes.js +0 -5
  14. package/cjs/components/material-exercise/context/subjects.js +3 -6
  15. package/cjs/components/material-exercise/context/types.d.ts +8 -1
  16. package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.d.ts +2 -2
  17. package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +78 -65
  18. package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.js +8 -8
  19. package/cjs/components/material-exercise/exercise-code-history/locales/en.json.js +7 -0
  20. package/cjs/components/material-exercise/exercise-code-history/locales/ko.json.js +7 -0
  21. package/cjs/components/material-exercise/exercise-file/ExerciseFile.js +20 -21
  22. package/cjs/components/material-exercise/exercise-file-editor/ExerciseFileEditor.js +228 -199
  23. package/cjs/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.js +8 -10
  24. package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +35 -32
  25. package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.js +57 -48
  26. package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabsLazy.js +6 -4
  27. package/cjs/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.en.json.js +3 -1
  28. package/cjs/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.ko.json.js +3 -1
  29. package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +327 -231
  30. package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTreeLazy.js +6 -4
  31. package/cjs/components/material-exercise/exercise-file-tree/locales/en.json.js +3 -1
  32. package/cjs/components/material-exercise/exercise-file-tree/locales/ko.json.js +3 -1
  33. package/cjs/components/material-exercise/exercise-file-viewer/ExerciseFileViewer.js +17 -17
  34. package/cjs/components/material-exercise/exercise-menu/ExerciseMenu.js +13 -14
  35. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.js +6 -6
  36. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuArduinoSettings.js +47 -38
  37. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +60 -42
  38. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuReset.js +29 -22
  39. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +45 -56
  40. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.styled.js +12 -12
  41. package/cjs/components/material-exercise/exercise-menu/locales/en.json.js +3 -1
  42. package/cjs/components/material-exercise/exercise-menu/locales/ko.json.js +3 -1
  43. package/cjs/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdown.js +28 -20
  44. package/cjs/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdownLazy.js +5 -3
  45. package/cjs/components/material-exercise/exercise-preview/ExercisePreview.js +30 -41
  46. package/cjs/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.js +17 -12
  47. package/cjs/components/material-exercise/exercise-preview/locales/en.json.js +3 -1
  48. package/cjs/components/material-exercise/exercise-preview/locales/ko.json.js +3 -1
  49. package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpane.js +24 -33
  50. package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpaneEditorPerference.js +13 -8
  51. package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpaneEnvironment.js +84 -83
  52. package/cjs/components/material-exercise/exercise-rightpane/locales/en.json.js +3 -1
  53. package/cjs/components/material-exercise/exercise-rightpane/locales/ko.json.js +3 -1
  54. package/cjs/components/material-exercise/exercise-room/ExerciseRoom.js +20 -12
  55. package/cjs/components/material-exercise/exercise-room/ExerciseRoom.styled.js +14 -12
  56. package/cjs/components/material-exercise/exercise-room/ExerciseRoomDetail.js +239 -147
  57. package/cjs/components/material-exercise/exercise-room/ExerciseRoomList.js +92 -63
  58. package/cjs/components/material-exercise/exercise-room/helpers/exerciseRoomPermissionStringConvertor.js +2 -8
  59. package/cjs/components/material-exercise/exercise-room/locales/en.json.js +3 -1
  60. package/cjs/components/material-exercise/exercise-room/locales/ko.json.js +3 -1
  61. package/cjs/components/material-exercise/exercise-runner/ExerciseRunner.js +224 -223
  62. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerContext.js +1 -1
  63. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerController.js +13 -13
  64. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +30 -26
  65. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.js +26 -26
  66. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +79 -95
  67. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +27 -27
  68. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +54 -60
  69. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusIndicator.js +5 -5
  70. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.js +10 -13
  71. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerTimer.js +29 -26
  72. package/cjs/components/material-exercise/exercise-runner/locales/en.json.js +3 -1
  73. package/cjs/components/material-exercise/exercise-runner/locales/ko.json.js +3 -1
  74. package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.d.ts +2 -2
  75. package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +290 -180
  76. package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.styled.js +8 -8
  77. package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistoryOutput.js +41 -45
  78. package/cjs/components/material-exercise/exercise-submit-history/locales/en.json.js +7 -0
  79. package/cjs/components/material-exercise/exercise-submit-history/locales/ko.json.js +7 -0
  80. package/cjs/components/shared/exercise-menu-button/ExerciseMenuButton.js +19 -17
  81. package/cjs/components/shared/exercise-shimmer/ExerciseFileShimmer.js +5 -4
  82. package/cjs/components/shared/exercise-shimmer/ExerciseFileTabShimmer.js +15 -14
  83. package/cjs/components/shared/exercise-shimmer/ExerciseFileTabsShimmer.js +7 -6
  84. package/cjs/components/shared/exercise-shimmer/ExerciseFileTreeListItemShimmer.js +17 -16
  85. package/cjs/components/shared/exercise-shimmer/ExerciseFileTreeListShimmer.js +18 -11
  86. package/cjs/components/shared/exercise-version-list/ExerciseVersionList.js +5 -4
  87. package/cjs/components/shared/exercise-version-list/ExerciseVersionList.styled.js +1 -1
  88. package/cjs/components/shared/exercise-version-list/ExerciseVersionListItem.js +8 -7
  89. package/cjs/components/shared/exercise-version-list/ExerciseVersionListItem.styled.js +9 -5
  90. package/cjs/components/shared/file-icon/FileIcon.js +23 -23
  91. package/cjs/components/shared/file-tabs/FileTab.js +32 -43
  92. package/cjs/components/shared/file-tabs/FileTab.styled.js +26 -22
  93. package/cjs/components/shared/file-tabs/FileTabs.js +55 -49
  94. package/cjs/components/shared/file-tabs/FileTabs.styled.js +2 -2
  95. package/cjs/components/shared/file-tabs/util.js +29 -18
  96. package/cjs/components/shared/file-tree/FileTree.js +11 -11
  97. package/cjs/components/shared/file-tree/FileTreeConfig.js +24 -23
  98. package/cjs/components/shared/file-tree/FileTreeList.js +35 -41
  99. package/cjs/components/shared/file-tree/FileTreeListItemContent.js +75 -91
  100. package/cjs/components/shared/file-tree/FileTreeListItemContent.styled.js +29 -40
  101. package/cjs/components/shared/file-tree/FileTreeListItemContentInput.js +77 -101
  102. package/cjs/components/shared/file-tree/FileTreeListItemContentInput.styled.js +6 -6
  103. package/cjs/components/shared/file-tree/FileTreeListItemContentMenu.js +51 -86
  104. package/cjs/components/shared/file-tree/FileTreeListItems.js +150 -153
  105. package/cjs/components/shared/file-tree/FileTreeListItems.styled.js +2 -2
  106. package/cjs/components/shared/file-tree/FileTreeToolbar.js +30 -41
  107. package/cjs/components/shared/file-tree/FileTreeToolbar.styled.js +1 -1
  108. package/cjs/components/shared/file-tree/context/FileTreeContext.js +91 -97
  109. package/cjs/components/shared/file-tree/locales/en.json.js +3 -1
  110. package/cjs/components/shared/file-tree/locales/ko.json.js +3 -1
  111. package/cjs/components/shared/file-tree/utils/fileTreeFiles.js +20 -22
  112. package/cjs/components/shared/file-tree/utils/fileTreeGenerator.js +193 -173
  113. package/cjs/components/shared/file-tree/utils/fileTreeInput.js +0 -1
  114. package/cjs/components/shared/file-tree/utils/fileTreeItem.js +1 -1
  115. package/cjs/components/shared/file-tree/utils/fileTreePath.js +5 -7
  116. package/cjs/components/shared/file-viewer/FileViewer.js +59 -60
  117. package/cjs/components/shared/file-viewer/FileViewerCsv.js +145 -101
  118. package/cjs/components/shared/file-viewer/FileViewerImage.js +7 -8
  119. package/cjs/components/shared/file-viewer/FileViewerIpynb.js +20 -14
  120. package/cjs/components/shared/file-viewer/FileViewerNonViewable.js +28 -34
  121. package/cjs/components/shared/file-viewer/FileViewerText.js +23 -16
  122. package/cjs/components/shared/file-viewer/locales/en.json.js +3 -1
  123. package/cjs/components/shared/file-viewer/locales/ko.json.js +3 -1
  124. package/cjs/components/shared/file-viewer/locales/nonViewable.en.json.js +3 -1
  125. package/cjs/components/shared/file-viewer/locales/nonViewable.ko.json.js +3 -1
  126. package/cjs/components/shared/material-modal/MaterialModal.js +10 -12
  127. package/cjs/components/shared/material-modal/MaterialModal.styled.js +5 -5
  128. package/cjs/components/shared/monaco-editor/MonacoEditor.js +123 -149
  129. package/cjs/components/shared/monaco-editor/MonacoEditorLazy.js +10 -8
  130. package/cjs/components/shared/monaco-editor/MonacoEditorMobile.js +49 -58
  131. package/cjs/components/shared/monaco-editor/MonacoEditorPerferenceForm.js +78 -85
  132. package/cjs/components/shared/monaco-editor/constants/grammars/index.js +131 -52
  133. package/cjs/components/shared/monaco-editor/constants/monaco/preferences.js +5 -9
  134. package/cjs/components/shared/monaco-editor/constants/themes/index.js +80 -32
  135. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoEventChange.js +10 -13
  136. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoEventCursor.js +14 -18
  137. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoEventScroll.js +8 -9
  138. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoMarkers.js +54 -72
  139. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoOptions.js +14 -15
  140. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoTheme.js +8 -9
  141. package/cjs/components/shared/monaco-editor/editor-languages/css/formatter.js +36 -12
  142. package/cjs/components/shared/monaco-editor/editor-languages/css/index.js +5 -8
  143. package/cjs/components/shared/monaco-editor/editor-languages/html/formatter.js +36 -12
  144. package/cjs/components/shared/monaco-editor/editor-languages/html/index.js +3 -6
  145. package/cjs/components/shared/monaco-editor/editor-languages/index.js +3 -1
  146. package/cjs/components/shared/monaco-editor/editor-languages/typescript/dts/_helper.js +1 -1
  147. package/cjs/components/shared/monaco-editor/editor-languages/typescript/dts/express.js +3 -2
  148. package/cjs/components/shared/monaco-editor/editor-languages/typescript/dts/propTypes.js +3 -2
  149. package/cjs/components/shared/monaco-editor/editor-languages/typescript/dts/react.js +3 -2
  150. package/cjs/components/shared/monaco-editor/editor-languages/typescript/formatter.js +36 -12
  151. package/cjs/components/shared/monaco-editor/editor-languages/typescript/index.js +18 -24
  152. package/cjs/components/shared/monaco-editor/hooks/useEditorOptions.js +12 -9
  153. package/cjs/components/shared/monaco-editor/locales/en.json.js +3 -1
  154. package/cjs/components/shared/monaco-editor/locales/ko.json.js +3 -1
  155. package/cjs/components/shared/monaco-editor/utils/emmet/abbreviationActions.js +18 -28
  156. package/cjs/components/shared/monaco-editor/utils/emmet/emmet.js +0 -3
  157. package/cjs/components/shared/monaco-editor/utils/emmet/registerProvider.js +12 -8
  158. package/cjs/components/shared/monaco-editor/utils/grammar/index.js +70 -32
  159. package/cjs/components/shared/monaco-editor/utils/grammar/onigasm.js +25 -7
  160. package/cjs/components/shared/monaco-editor/utils/grammar/textmate.js +67 -43
  161. package/cjs/components/shared/monaco-editor/utils/monacoLanguage.js +9 -19
  162. package/cjs/components/shared/monaco-editor/utils/monacoPreference.js +6 -5
  163. package/cjs/components/shared/monaco-editor/utils/prettier/config.js +2 -3
  164. package/cjs/components/shared/monaco-editor/utils/prettier/index.js +30 -9
  165. package/cjs/components/shared/monaco-editor/utils/theme/convert.js +20 -26
  166. package/cjs/components/shared/monaco-editor/utils/theme/index.js +22 -5
  167. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursor.js +77 -75
  168. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorManager.js +82 -93
  169. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorWidget.js +125 -135
  170. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelection.js +148 -160
  171. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelectionManager.js +104 -118
  172. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/styles.js +2 -2
  173. package/cjs/components/shared/monaco-editor/vendors/vscode-emmet-helper/configCompat.js +1 -3
  174. package/cjs/components/shared/monaco-editor/vendors/vscode-emmet-helper/data.js +2 -3
  175. package/cjs/components/shared/monaco-editor/vendors/vscode-emmet-helper/emmetHelper.js +218 -329
  176. package/cjs/components/shared/monaco-editor/vendors/vscode-emmet-helper/utils.js +3 -6
  177. package/cjs/components/shared/no-vnc/NoVnc.js +93 -90
  178. package/cjs/components/shared/no-vnc/NoVncLazy.js +7 -5
  179. package/cjs/components/shared/preview-container/PreviewContainer.js +7 -10
  180. package/cjs/components/shared/web-browser/WebBrowser.js +54 -59
  181. package/cjs/components/shared/xterm/Xterm.js +112 -105
  182. package/cjs/components/shared/xterm/XtermLazy.js +7 -5
  183. package/cjs/components/shared/xterm/locales/en.json.js +3 -1
  184. package/cjs/components/shared/xterm/locales/ko.json.js +3 -1
  185. package/cjs/constants/arduino.js +10 -10
  186. package/cjs/constants/shortcutKeyMap.js +5 -5
  187. package/cjs/constants/stylesheets.js +7 -10
  188. package/cjs/hooks/useArduino.js +327 -255
  189. package/cjs/hooks/useExerciseFile.js +24 -24
  190. package/cjs/hooks/useExericseShortcut.js +6 -5
  191. package/cjs/hooks/useMaterialExerciseFileUrl.js +54 -37
  192. package/cjs/hooks/useRunnerRoomWebSocket.js +58 -56
  193. package/cjs/hooks/useStdioTextConcator.js +18 -12
  194. package/cjs/hooks/useStdioWebSocket.js +41 -67
  195. package/cjs/hooks/useUsercodeEditWebSocket.js +230 -252
  196. package/cjs/hooks/useUsercodeHistory.js +121 -82
  197. package/cjs/index.js +4 -4
  198. package/cjs/utils/arduino.js +23 -25
  199. package/cjs/utils/exerciseFile.js +8 -16
  200. package/cjs/utils/runner.js +29 -25
  201. package/es/_virtual/_rollupPluginBabelHelpers.js +504 -0
  202. package/es/components/material-exercise/MaterialExercise.js +33 -54
  203. package/es/components/material-exercise/MaterialExercise.styled.js +20 -23
  204. package/es/components/material-exercise/MaterialExerciseMobile.js +15 -13
  205. package/es/components/material-exercise/context/ExerciseIntlProvider.js +9 -13
  206. package/es/components/material-exercise/context/ExerciseProvider.js +79 -79
  207. package/es/components/material-exercise/context/ExerciseProviderNoImage.js +11 -13
  208. package/es/components/material-exercise/context/context.js +1 -1
  209. package/es/components/material-exercise/context/recoil.d.ts +2 -1
  210. package/es/components/material-exercise/context/recoil.js +563 -374
  211. package/es/components/material-exercise/context/recoilTypes.js +0 -5
  212. package/es/components/material-exercise/context/subjects.js +3 -6
  213. package/es/components/material-exercise/context/types.d.ts +8 -1
  214. package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.d.ts +2 -2
  215. package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +73 -62
  216. package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.js +8 -8
  217. package/es/components/material-exercise/exercise-code-history/locales/en.json.js +3 -0
  218. package/es/components/material-exercise/exercise-code-history/locales/ko.json.js +3 -0
  219. package/es/components/material-exercise/exercise-file/ExerciseFile.js +15 -18
  220. package/es/components/material-exercise/exercise-file-editor/ExerciseFileEditor.js +222 -195
  221. package/es/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.js +5 -9
  222. package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +31 -28
  223. package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.js +52 -45
  224. package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsLazy.js +1 -1
  225. package/es/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +321 -225
  226. package/es/components/material-exercise/exercise-file-tree/ExerciseFileTreeLazy.js +1 -1
  227. package/es/components/material-exercise/exercise-file-viewer/ExerciseFileViewer.js +12 -14
  228. package/es/components/material-exercise/exercise-menu/ExerciseMenu.js +7 -10
  229. package/es/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.js +3 -5
  230. package/es/components/material-exercise/exercise-menu/ExerciseMenuArduinoSettings.js +43 -36
  231. package/es/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +53 -37
  232. package/es/components/material-exercise/exercise-menu/ExerciseMenuReset.js +25 -20
  233. package/es/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +41 -54
  234. package/es/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.styled.js +12 -12
  235. package/es/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdown.js +25 -19
  236. package/es/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdownLazy.js +1 -1
  237. package/es/components/material-exercise/exercise-preview/ExercisePreview.js +21 -34
  238. package/es/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.js +13 -10
  239. package/es/components/material-exercise/exercise-rightpane/ExerciseRightpane.js +17 -28
  240. package/es/components/material-exercise/exercise-rightpane/ExerciseRightpaneEditorPerference.js +9 -6
  241. package/es/components/material-exercise/exercise-rightpane/ExerciseRightpaneEnvironment.js +81 -82
  242. package/es/components/material-exercise/exercise-room/ExerciseRoom.js +13 -7
  243. package/es/components/material-exercise/exercise-room/ExerciseRoom.styled.js +14 -12
  244. package/es/components/material-exercise/exercise-room/ExerciseRoomDetail.js +236 -146
  245. package/es/components/material-exercise/exercise-room/ExerciseRoomList.js +90 -63
  246. package/es/components/material-exercise/exercise-room/helpers/exerciseRoomPermissionStringConvertor.js +2 -8
  247. package/es/components/material-exercise/exercise-runner/ExerciseRunner.js +218 -219
  248. package/es/components/material-exercise/exercise-runner/ExerciseRunnerContext.js +1 -1
  249. package/es/components/material-exercise/exercise-runner/ExerciseRunnerController.js +7 -9
  250. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +27 -25
  251. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.js +22 -24
  252. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +76 -94
  253. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +24 -26
  254. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +51 -59
  255. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusIndicator.js +2 -4
  256. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.js +6 -11
  257. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerTimer.js +26 -25
  258. package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.d.ts +2 -2
  259. package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +284 -174
  260. package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.styled.js +8 -8
  261. package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistoryOutput.js +38 -44
  262. package/es/components/material-exercise/exercise-submit-history/locales/en.json.js +3 -0
  263. package/es/components/material-exercise/exercise-submit-history/locales/ko.json.js +3 -0
  264. package/es/components/shared/exercise-menu-button/ExerciseMenuButton.js +16 -16
  265. package/es/components/shared/exercise-shimmer/ExerciseFileShimmer.js +2 -3
  266. package/es/components/shared/exercise-shimmer/ExerciseFileTabShimmer.js +12 -13
  267. package/es/components/shared/exercise-shimmer/ExerciseFileTabsShimmer.js +2 -3
  268. package/es/components/shared/exercise-shimmer/ExerciseFileTreeListItemShimmer.js +14 -15
  269. package/es/components/shared/exercise-shimmer/ExerciseFileTreeListShimmer.js +15 -10
  270. package/es/components/shared/exercise-version-list/ExerciseVersionList.js +2 -3
  271. package/es/components/shared/exercise-version-list/ExerciseVersionList.styled.js +1 -1
  272. package/es/components/shared/exercise-version-list/ExerciseVersionListItem.js +5 -6
  273. package/es/components/shared/exercise-version-list/ExerciseVersionListItem.styled.js +9 -5
  274. package/es/components/shared/file-icon/FileIcon.js +20 -22
  275. package/es/components/shared/file-tabs/FileTab.js +28 -41
  276. package/es/components/shared/file-tabs/FileTab.styled.js +26 -22
  277. package/es/components/shared/file-tabs/FileTabs.js +52 -48
  278. package/es/components/shared/file-tabs/FileTabs.styled.js +2 -2
  279. package/es/components/shared/file-tabs/util.js +29 -18
  280. package/es/components/shared/file-tree/FileTree.js +3 -5
  281. package/es/components/shared/file-tree/FileTreeConfig.js +21 -22
  282. package/es/components/shared/file-tree/FileTreeList.js +31 -39
  283. package/es/components/shared/file-tree/FileTreeListItemContent.js +67 -85
  284. package/es/components/shared/file-tree/FileTreeListItemContent.styled.js +29 -40
  285. package/es/components/shared/file-tree/FileTreeListItemContentInput.js +74 -100
  286. package/es/components/shared/file-tree/FileTreeListItemContentInput.styled.js +6 -6
  287. package/es/components/shared/file-tree/FileTreeListItemContentMenu.js +48 -85
  288. package/es/components/shared/file-tree/FileTreeListItems.js +147 -152
  289. package/es/components/shared/file-tree/FileTreeListItems.styled.js +2 -2
  290. package/es/components/shared/file-tree/FileTreeToolbar.js +24 -37
  291. package/es/components/shared/file-tree/FileTreeToolbar.styled.js +1 -1
  292. package/es/components/shared/file-tree/context/FileTreeContext.js +91 -97
  293. package/es/components/shared/file-tree/utils/fileTreeFiles.js +20 -22
  294. package/es/components/shared/file-tree/utils/fileTreeGenerator.js +193 -173
  295. package/es/components/shared/file-tree/utils/fileTreeInput.js +0 -1
  296. package/es/components/shared/file-tree/utils/fileTreeItem.js +1 -1
  297. package/es/components/shared/file-tree/utils/fileTreePath.js +5 -7
  298. package/es/components/shared/file-viewer/FileViewer.js +52 -53
  299. package/es/components/shared/file-viewer/FileViewerCsv.js +141 -99
  300. package/es/components/shared/file-viewer/FileViewerImage.js +3 -6
  301. package/es/components/shared/file-viewer/FileViewerIpynb.js +16 -12
  302. package/es/components/shared/file-viewer/FileViewerNonViewable.js +22 -30
  303. package/es/components/shared/file-viewer/FileViewerText.js +18 -13
  304. package/es/components/shared/material-modal/MaterialModal.js +7 -11
  305. package/es/components/shared/material-modal/MaterialModal.styled.js +5 -5
  306. package/es/components/shared/monaco-editor/MonacoEditor.js +119 -147
  307. package/es/components/shared/monaco-editor/MonacoEditorLazy.js +6 -4
  308. package/es/components/shared/monaco-editor/MonacoEditorMobile.js +45 -56
  309. package/es/components/shared/monaco-editor/MonacoEditorPerferenceForm.js +73 -82
  310. package/es/components/shared/monaco-editor/constants/grammars/index.js +131 -52
  311. package/es/components/shared/monaco-editor/constants/monaco/preferences.js +5 -9
  312. package/es/components/shared/monaco-editor/constants/themes/index.js +80 -32
  313. package/es/components/shared/monaco-editor/editor-hooks/useMonacoEventChange.js +10 -13
  314. package/es/components/shared/monaco-editor/editor-hooks/useMonacoEventCursor.js +14 -18
  315. package/es/components/shared/monaco-editor/editor-hooks/useMonacoEventScroll.js +8 -9
  316. package/es/components/shared/monaco-editor/editor-hooks/useMonacoMarkers.js +54 -72
  317. package/es/components/shared/monaco-editor/editor-hooks/useMonacoOptions.js +14 -15
  318. package/es/components/shared/monaco-editor/editor-hooks/useMonacoTheme.js +8 -9
  319. package/es/components/shared/monaco-editor/editor-languages/css/formatter.js +33 -11
  320. package/es/components/shared/monaco-editor/editor-languages/css/index.js +2 -5
  321. package/es/components/shared/monaco-editor/editor-languages/html/formatter.js +33 -11
  322. package/es/components/shared/monaco-editor/editor-languages/html/index.js +2 -5
  323. package/es/components/shared/monaco-editor/editor-languages/typescript/dts/_helper.js +1 -1
  324. package/es/components/shared/monaco-editor/editor-languages/typescript/dts/express.js +0 -1
  325. package/es/components/shared/monaco-editor/editor-languages/typescript/dts/propTypes.js +0 -1
  326. package/es/components/shared/monaco-editor/editor-languages/typescript/dts/react.js +0 -1
  327. package/es/components/shared/monaco-editor/editor-languages/typescript/formatter.js +33 -11
  328. package/es/components/shared/monaco-editor/editor-languages/typescript/index.js +10 -16
  329. package/es/components/shared/monaco-editor/hooks/useEditorOptions.js +12 -9
  330. package/es/components/shared/monaco-editor/utils/emmet/abbreviationActions.js +18 -28
  331. package/es/components/shared/monaco-editor/utils/emmet/emmet.js +0 -3
  332. package/es/components/shared/monaco-editor/utils/emmet/registerProvider.js +12 -8
  333. package/es/components/shared/monaco-editor/utils/grammar/index.js +67 -31
  334. package/es/components/shared/monaco-editor/utils/grammar/onigasm.js +25 -7
  335. package/es/components/shared/monaco-editor/utils/grammar/textmate.js +67 -43
  336. package/es/components/shared/monaco-editor/utils/monacoLanguage.js +9 -19
  337. package/es/components/shared/monaco-editor/utils/monacoPreference.js +6 -5
  338. package/es/components/shared/monaco-editor/utils/prettier/config.js +2 -3
  339. package/es/components/shared/monaco-editor/utils/prettier/index.js +27 -8
  340. package/es/components/shared/monaco-editor/utils/theme/convert.js +20 -26
  341. package/es/components/shared/monaco-editor/utils/theme/index.js +22 -5
  342. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursor.js +77 -75
  343. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorManager.js +82 -93
  344. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorWidget.js +125 -135
  345. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelection.js +148 -160
  346. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelectionManager.js +104 -118
  347. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/styles.js +2 -2
  348. package/es/components/shared/monaco-editor/vendors/vscode-emmet-helper/configCompat.js +1 -3
  349. package/es/components/shared/monaco-editor/vendors/vscode-emmet-helper/data.js +2 -3
  350. package/es/components/shared/monaco-editor/vendors/vscode-emmet-helper/emmetHelper.js +219 -330
  351. package/es/components/shared/monaco-editor/vendors/vscode-emmet-helper/utils.js +3 -6
  352. package/es/components/shared/no-vnc/NoVnc.js +89 -88
  353. package/es/components/shared/no-vnc/NoVncLazy.js +4 -2
  354. package/es/components/shared/preview-container/PreviewContainer.js +7 -10
  355. package/es/components/shared/web-browser/WebBrowser.js +49 -56
  356. package/es/components/shared/xterm/Xterm.js +107 -102
  357. package/es/components/shared/xterm/XtermLazy.js +4 -2
  358. package/es/constants/arduino.js +10 -10
  359. package/es/constants/shortcutKeyMap.js +3 -5
  360. package/es/constants/stylesheets.js +7 -10
  361. package/es/hooks/useArduino.js +327 -255
  362. package/es/hooks/useExerciseFile.js +24 -24
  363. package/es/hooks/useExericseShortcut.js +6 -5
  364. package/es/hooks/useMaterialExerciseFileUrl.js +55 -38
  365. package/es/hooks/useRunnerRoomWebSocket.js +58 -56
  366. package/es/hooks/useStdioTextConcator.js +18 -12
  367. package/es/hooks/useStdioWebSocket.js +41 -67
  368. package/es/hooks/useUsercodeEditWebSocket.js +230 -252
  369. package/es/hooks/useUsercodeHistory.js +122 -83
  370. package/es/utils/arduino.js +23 -25
  371. package/es/utils/exerciseFile.js +8 -16
  372. package/es/utils/runner.js +29 -25
  373. package/package.json +8 -8
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBabelHelpers.js');
5
6
  var monaco = require('monaco-editor/esm/vs/editor/editor.api');
6
7
  var styles = require('./styles.js');
7
8
 
@@ -25,19 +26,13 @@ function _interopNamespace(e) {
25
26
 
26
27
  var monaco__namespace = /*#__PURE__*/_interopNamespace(monaco);
27
28
 
28
- /* ====================================================================================================
29
- * These codes forked and modified from `convergencelabs/monaco-collab-ext`
30
- * under the terms of the MIT license.
31
- * Make sure to check the original project if any issue exists.
32
- * - project: https://github.com/convergencelabs/monaco-collab-ext
33
- * - codes: https://github.com/convergencelabs/monaco-collab-ext/tree/6ece72028e4b8fb35e9928a304fbdfe28a4e7be9/src/ts
34
- * ==================================================================================================== */
35
- class RemoteSelection {
29
+ var RemoteSelection = /*#__PURE__*/function () {
36
30
  /**
37
31
  * Constructs a new remote selection.
38
32
  *
39
33
  */
40
- constructor(codeEditor, id, classId, color, label, onDisposed) {
34
+ function RemoteSelection(codeEditor, id, classId, color, label, onDisposed) {
35
+ _rollupPluginBabelHelpers.classCallCheck(this, RemoteSelection);
41
36
  /**
42
37
  * The current start position of the selection.
43
38
  */
@@ -45,17 +40,15 @@ class RemoteSelection {
45
40
  /**
46
41
  * The current end position of the selection.
47
42
  */
48
-
49
43
  this._endPosition = {};
50
44
  /**
51
45
  * A flag determining if the selection has been disposed.
52
46
  */
53
-
54
47
  this._disposed = false;
55
48
  this._editor = codeEditor;
56
49
  this._id = id;
57
- const uniqueClassId = `${styles.REMOTE_MARKER_CLASS_NAME}-selection-${classId}`;
58
- this._className = `${styles.REMOTE_MARKER_CLASS_NAME}-selection ${uniqueClassId}`;
50
+ var uniqueClassId = "".concat(styles.REMOTE_MARKER_CLASS_NAME, "-selection-").concat(classId);
51
+ this._className = "".concat(styles.REMOTE_MARKER_CLASS_NAME, "-selection ").concat(uniqueClassId);
59
52
  this._styleElement = RemoteSelection._addDynamicStyleElement(uniqueClassId, color);
60
53
  this._label = label;
61
54
  this._decorations = [];
@@ -67,156 +60,151 @@ class RemoteSelection {
67
60
  * the class name of decorations, so we can not set a style property directly.
68
61
  * This method will create, add, and return the style tag for this element.
69
62
  */
70
-
71
-
72
- static _addDynamicStyleElement(className, color) {
73
- const css = `.${className} { background-color: ${color}; }`.trim();
74
- const styleElement = document.createElement('style');
75
- styleElement.innerText = css;
76
- document.head.appendChild(styleElement);
77
- return styleElement;
78
- }
79
- /**
80
- * A helper method to ensure the start position is before the end position.
81
- */
82
-
83
-
84
- static _swapIfNeeded(start, end) {
85
- if (start.lineNumber < end.lineNumber || start.lineNumber === end.lineNumber && start.column <= end.column) {
86
- return {
87
- start,
88
- end
89
- };
90
- } else {
91
- return {
92
- start: end,
93
- end: start
94
- };
63
+ _rollupPluginBabelHelpers.createClass(RemoteSelection, [{
64
+ key: "getId",
65
+ value:
66
+ /**
67
+ * Gets the userland id of this selection.
68
+ */
69
+ function getId() {
70
+ return this._id;
95
71
  }
96
- }
97
- /**
98
- * Gets the userland id of this selection.
99
- */
100
-
101
-
102
- getId() {
103
- return this._id;
104
- }
105
- /**
106
- * Gets the start position of the selection.
107
- *
108
- * @returns
109
- * The start position of the selection.
110
- */
111
-
112
-
113
- getStartPosition() {
114
- return Object.assign({}, this._startPosition);
115
- }
116
- /**
117
- * Gets the start position of the selection.
118
- *
119
- * @returns
120
- * The start position of the selection.
121
- */
122
-
123
-
124
- getEndPosition() {
125
- return Object.assign({}, this._endPosition);
126
- }
127
- /**
128
- * Sets the selection using zero-based text indices.
129
- */
130
-
131
-
132
- setOffsets(start, end) {
133
- var _a, _b;
134
-
135
- const startPosition = (_a = this._editor.getModel()) === null || _a === void 0 ? void 0 : _a.getPositionAt(start);
136
- const endPosition = (_b = this._editor.getModel()) === null || _b === void 0 ? void 0 : _b.getPositionAt(end);
137
-
138
- if (startPosition && endPosition) {
139
- this.setPositions(startPosition, endPosition);
72
+ /**
73
+ * Gets the start position of the selection.
74
+ *
75
+ * @returns
76
+ * The start position of the selection.
77
+ */
78
+ }, {
79
+ key: "getStartPosition",
80
+ value: function getStartPosition() {
81
+ return Object.assign({}, this._startPosition);
140
82
  }
141
- }
142
- /**
143
- * Sets the selection using Monaco's line-number / column coordinate system.
144
- */
145
-
146
-
147
- setPositions(start, end) {
148
- this._decorations = this._editor.deltaDecorations(this._decorations, []);
149
-
150
- const ordered = RemoteSelection._swapIfNeeded(start, end);
151
-
152
- this._startPosition = ordered.start;
153
- this._endPosition = ordered.end;
154
-
155
- this._render();
156
- }
157
- /**
158
- * Makes the selection visible if it is hidden.
159
- */
160
-
161
-
162
- show() {
163
- this._render();
164
- }
165
- /**
166
- * Makes the selection hidden if it is visible.
167
- */
168
-
169
-
170
- hide() {
171
- this._decorations = this._editor.deltaDecorations(this._decorations, []);
172
- }
173
- /**
174
- * Determines if the selection has been permanently removed from the editor.
175
- *
176
- * @returns
177
- * True if the selection has been disposed, false otherwise.
178
- */
179
-
180
-
181
- isDisposed() {
182
- return this._disposed;
183
- }
184
- /**
185
- * Permanently removes the selection from the editor.
186
- */
187
-
188
-
189
- dispose() {
190
- var _a;
191
-
192
- if (!this._disposed) {
193
- (_a = this._styleElement.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this._styleElement);
194
- this.hide();
195
- this._disposed = true;
196
-
197
- this._onDisposed();
83
+ /**
84
+ * Gets the start position of the selection.
85
+ *
86
+ * @returns
87
+ * The start position of the selection.
88
+ */
89
+ }, {
90
+ key: "getEndPosition",
91
+ value: function getEndPosition() {
92
+ return Object.assign({}, this._endPosition);
198
93
  }
199
- }
200
- /**
201
- * A helper method that actually renders the selection as a decoration within
202
- * the Monaco Editor.
203
- *
204
- * @private
205
- */
206
-
207
-
208
- _render() {
209
- this._decorations = this._editor.deltaDecorations(this._decorations, [{
210
- range: new monaco__namespace.Range(this._startPosition.lineNumber, this._startPosition.column, this._endPosition.lineNumber, this._endPosition.column),
211
- options: {
212
- className: this._className,
213
- hoverMessage: this._label != null ? {
214
- value: this._label
215
- } : null
94
+ /**
95
+ * Sets the selection using zero-based text indices.
96
+ */
97
+ }, {
98
+ key: "setOffsets",
99
+ value: function setOffsets(start, end) {
100
+ var _a, _b;
101
+ var startPosition = (_a = this._editor.getModel()) === null || _a === void 0 ? void 0 : _a.getPositionAt(start);
102
+ var endPosition = (_b = this._editor.getModel()) === null || _b === void 0 ? void 0 : _b.getPositionAt(end);
103
+ if (startPosition && endPosition) {
104
+ this.setPositions(startPosition, endPosition);
216
105
  }
217
- }]);
218
- }
219
-
220
- }
106
+ }
107
+ /**
108
+ * Sets the selection using Monaco's line-number / column coordinate system.
109
+ */
110
+ }, {
111
+ key: "setPositions",
112
+ value: function setPositions(start, end) {
113
+ this._decorations = this._editor.deltaDecorations(this._decorations, []);
114
+ var ordered = RemoteSelection._swapIfNeeded(start, end);
115
+ this._startPosition = ordered.start;
116
+ this._endPosition = ordered.end;
117
+ this._render();
118
+ }
119
+ /**
120
+ * Makes the selection visible if it is hidden.
121
+ */
122
+ }, {
123
+ key: "show",
124
+ value: function show() {
125
+ this._render();
126
+ }
127
+ /**
128
+ * Makes the selection hidden if it is visible.
129
+ */
130
+ }, {
131
+ key: "hide",
132
+ value: function hide() {
133
+ this._decorations = this._editor.deltaDecorations(this._decorations, []);
134
+ }
135
+ /**
136
+ * Determines if the selection has been permanently removed from the editor.
137
+ *
138
+ * @returns
139
+ * True if the selection has been disposed, false otherwise.
140
+ */
141
+ }, {
142
+ key: "isDisposed",
143
+ value: function isDisposed() {
144
+ return this._disposed;
145
+ }
146
+ /**
147
+ * Permanently removes the selection from the editor.
148
+ */
149
+ }, {
150
+ key: "dispose",
151
+ value: function dispose() {
152
+ var _a;
153
+ if (!this._disposed) {
154
+ (_a = this._styleElement.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(this._styleElement);
155
+ this.hide();
156
+ this._disposed = true;
157
+ this._onDisposed();
158
+ }
159
+ }
160
+ /**
161
+ * A helper method that actually renders the selection as a decoration within
162
+ * the Monaco Editor.
163
+ *
164
+ * @private
165
+ */
166
+ }, {
167
+ key: "_render",
168
+ value: function _render() {
169
+ this._decorations = this._editor.deltaDecorations(this._decorations, [{
170
+ range: new monaco__namespace.Range(this._startPosition.lineNumber, this._startPosition.column, this._endPosition.lineNumber, this._endPosition.column),
171
+ options: {
172
+ className: this._className,
173
+ hoverMessage: this._label != null ? {
174
+ value: this._label
175
+ } : null
176
+ }
177
+ }]);
178
+ }
179
+ }], [{
180
+ key: "_addDynamicStyleElement",
181
+ value: function _addDynamicStyleElement(className, color) {
182
+ var css = ".".concat(className, " { background-color: ").concat(color, "; }").trim();
183
+ var styleElement = document.createElement('style');
184
+ styleElement.innerText = css;
185
+ document.head.appendChild(styleElement);
186
+ return styleElement;
187
+ }
188
+ /**
189
+ * A helper method to ensure the start position is before the end position.
190
+ */
191
+ }, {
192
+ key: "_swapIfNeeded",
193
+ value: function _swapIfNeeded(start, end) {
194
+ if (start.lineNumber < end.lineNumber || start.lineNumber === end.lineNumber && start.column <= end.column) {
195
+ return {
196
+ start: start,
197
+ end: end
198
+ };
199
+ } else {
200
+ return {
201
+ start: end,
202
+ end: start
203
+ };
204
+ }
205
+ }
206
+ }]);
207
+ return RemoteSelection;
208
+ }();
221
209
 
222
210
  exports.RemoteSelection = RemoteSelection;
@@ -2,28 +2,22 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBabelHelpers.js');
5
6
  var RemoteSelection = require('./RemoteSelection.js');
6
7
 
7
- /* ====================================================================================================
8
- * These codes forked and modified from `convergencelabs/monaco-collab-ext`
9
- * under the terms of the MIT license.
10
- * Make sure to check the original project if any issue exists.
11
- * - project: https://github.com/convergencelabs/monaco-collab-ext
12
- * - codes: https://github.com/convergencelabs/monaco-collab-ext/tree/6ece72028e4b8fb35e9928a304fbdfe28a4e7be9/src/ts
13
- * ==================================================================================================== */
14
8
  /**
15
9
  * The RemoteSelectionManager renders remote users selections into the Monaco
16
10
  * editor using the editor's built-in decorators mechanism.
17
11
  */
18
-
19
- class RemoteSelectionManager {
12
+ var RemoteSelectionManager = /*#__PURE__*/function () {
20
13
  /**
21
14
  * Creates a new RemoteSelectionManager with the specified options.
22
15
  *
23
16
  * @param options
24
17
  * Ths options that configure the RemoteSelectionManager.
25
18
  */
26
- constructor(options) {
19
+ function RemoteSelectionManager(options) {
20
+ _rollupPluginBabelHelpers.classCallCheck(this, RemoteSelectionManager);
27
21
  this._remoteSelections = new Map();
28
22
  this._options = options;
29
23
  this._nextClassId = 0;
@@ -36,119 +30,111 @@ class RemoteSelectionManager {
36
30
  * @param color
37
31
  * The color to render the selection with.
38
32
  */
39
-
40
-
41
- addSelection(id, color, label) {
42
- const onDisposed = () => {
43
- this.removeSelection(id);
44
- };
45
-
46
- const selection = new RemoteSelection.RemoteSelection(this._options.editor, id, this._nextClassId++, color, label !== null && label !== void 0 ? label : '', onDisposed);
47
-
48
- this._remoteSelections.set(id, selection);
49
-
50
- return selection;
51
- }
52
- /**
53
- * Removes an existing remote selection from the editor.
54
- *
55
- * @param id
56
- * The unique id of the selection.
57
- */
58
-
59
-
60
- removeSelection(id) {
61
- const remoteSelection = this._getSelection(id);
62
-
63
- if (remoteSelection && !remoteSelection.isDisposed()) {
64
- remoteSelection.dispose();
33
+ _rollupPluginBabelHelpers.createClass(RemoteSelectionManager, [{
34
+ key: "addSelection",
35
+ value: function addSelection(id, color, label) {
36
+ var _this = this;
37
+ var onDisposed = function onDisposed() {
38
+ _this.removeSelection(id);
39
+ };
40
+ var selection = new RemoteSelection.RemoteSelection(this._options.editor, id, this._nextClassId++, color, label !== null && label !== void 0 ? label : '', onDisposed);
41
+ this._remoteSelections.set(id, selection);
42
+ return selection;
65
43
  }
66
- }
67
- /**
68
- * Sets the selection using zero-based text offset locations.
69
- *
70
- * @param id
71
- * The unique id of the selection.
72
- * @param start
73
- * The starting offset of the selection.
74
- * @param end
75
- * The ending offset of the selection.
76
- */
77
-
78
-
79
- setSelectionOffsets(id, start, end) {
80
- const remoteSelection = this._getSelection(id);
81
-
82
- if (remoteSelection) {
83
- remoteSelection.setOffsets(start, end);
44
+ /**
45
+ * Removes an existing remote selection from the editor.
46
+ *
47
+ * @param id
48
+ * The unique id of the selection.
49
+ */
50
+ }, {
51
+ key: "removeSelection",
52
+ value: function removeSelection(id) {
53
+ var remoteSelection = this._getSelection(id);
54
+ if (remoteSelection && !remoteSelection.isDisposed()) {
55
+ remoteSelection.dispose();
56
+ }
84
57
  }
85
- }
86
- /**
87
- * Sets the selection using the Monaco Editor's IPosition (line numbers and columns)
88
- * location concept.
89
- *
90
- * @param id
91
- * The unique id of the selection.
92
- * @param start
93
- * The starting position of the selection.
94
- * @param end
95
- * The ending position of the selection.
96
- */
97
-
98
-
99
- setSelectionPositions(id, start, end) {
100
- const remoteSelection = this._getSelection(id);
101
-
102
- if (remoteSelection) {
103
- remoteSelection.setPositions(start, end);
58
+ /**
59
+ * Sets the selection using zero-based text offset locations.
60
+ *
61
+ * @param id
62
+ * The unique id of the selection.
63
+ * @param start
64
+ * The starting offset of the selection.
65
+ * @param end
66
+ * The ending offset of the selection.
67
+ */
68
+ }, {
69
+ key: "setSelectionOffsets",
70
+ value: function setSelectionOffsets(id, start, end) {
71
+ var remoteSelection = this._getSelection(id);
72
+ if (remoteSelection) {
73
+ remoteSelection.setOffsets(start, end);
74
+ }
104
75
  }
105
- }
106
- /**
107
- * Shows the specified selection, if it is currently hidden.
108
- *
109
- * @param id
110
- * The unique id of the selection.
111
- */
112
-
113
-
114
- showSelection(id) {
115
- const remoteSelection = this._getSelection(id);
116
-
117
- if (remoteSelection) {
118
- remoteSelection.show();
76
+ /**
77
+ * Sets the selection using the Monaco Editor's IPosition (line numbers and columns)
78
+ * location concept.
79
+ *
80
+ * @param id
81
+ * The unique id of the selection.
82
+ * @param start
83
+ * The starting position of the selection.
84
+ * @param end
85
+ * The ending position of the selection.
86
+ */
87
+ }, {
88
+ key: "setSelectionPositions",
89
+ value: function setSelectionPositions(id, start, end) {
90
+ var remoteSelection = this._getSelection(id);
91
+ if (remoteSelection) {
92
+ remoteSelection.setPositions(start, end);
93
+ }
119
94
  }
120
- }
121
- /**
122
- * Hides the specified selection, if it is currently shown.
123
- *
124
- * @param id
125
- * The unique id of the selection.
126
- */
127
-
128
-
129
- hideSelection(id) {
130
- const remoteSelection = this._getSelection(id);
131
-
132
- if (remoteSelection) {
133
- remoteSelection.hide();
95
+ /**
96
+ * Shows the specified selection, if it is currently hidden.
97
+ *
98
+ * @param id
99
+ * The unique id of the selection.
100
+ */
101
+ }, {
102
+ key: "showSelection",
103
+ value: function showSelection(id) {
104
+ var remoteSelection = this._getSelection(id);
105
+ if (remoteSelection) {
106
+ remoteSelection.show();
107
+ }
134
108
  }
135
- }
136
- /**
137
- * A helper method that gets a cursor by id, or throws an exception.
138
- * @internal
139
- */
140
-
141
-
142
- _getSelection(id) {
143
- var _a;
144
-
145
- if (!this._remoteSelections.has(id)) {
146
- throw new Error('No such selection: ' + id);
109
+ /**
110
+ * Hides the specified selection, if it is currently shown.
111
+ *
112
+ * @param id
113
+ * The unique id of the selection.
114
+ */
115
+ }, {
116
+ key: "hideSelection",
117
+ value: function hideSelection(id) {
118
+ var remoteSelection = this._getSelection(id);
119
+ if (remoteSelection) {
120
+ remoteSelection.hide();
121
+ }
147
122
  }
148
-
149
- return (_a = this._remoteSelections.get(id)) !== null && _a !== void 0 ? _a : null;
150
- }
151
-
152
- }
123
+ /**
124
+ * A helper method that gets a cursor by id, or throws an exception.
125
+ * @internal
126
+ */
127
+ }, {
128
+ key: "_getSelection",
129
+ value: function _getSelection(id) {
130
+ var _a;
131
+ if (!this._remoteSelections.has(id)) {
132
+ throw new Error('No such selection: ' + id);
133
+ }
134
+ return (_a = this._remoteSelections.get(id)) !== null && _a !== void 0 ? _a : null;
135
+ }
136
+ }]);
137
+ return RemoteSelectionManager;
138
+ }();
153
139
 
154
140
  exports.RemoteSelectionManager = RemoteSelectionManager;
@@ -12,8 +12,8 @@ var styled = require('styled-components');
12
12
  * - project: https://github.com/convergencelabs/monaco-collab-ext
13
13
  * - codes: https://github.com/convergencelabs/monaco-collab-ext/tree/6ece72028e4b8fb35e9928a304fbdfe28a4e7be9/src/ts
14
14
  * ==================================================================================================== */
15
- const REMOTE_MARKER_CLASS_NAME = 'exercise-editor-marker';
16
- const cssRemoteMarker = styled.css([".", "{&-cursor{position:absolute;pointer-events:none;z-index:4000;width:2px;&:before{content:'';width:6px;height:5px;display:block;margin-left:-2px;margin-top:0;z-index:4000;background:inherit;}&-tooltip{position:absolute;white-space:nowrap;color:", ";text-shadow:0 0 1px ", ";opacity:1;font-size:12px;padding:2px;font-family:'Pretendard','Malgun Gothic','Helvetica','Myriad Pro','Arial',sans-serif;z-index:4000;transition:opacity 0.5s ease-out;}}&-selection{position:absolute;pointer-events:auto;opacity:0.3;}}"], REMOTE_MARKER_CLASS_NAME, designTokens.base.color.white, designTokens.base.color.gray9);
15
+ var REMOTE_MARKER_CLASS_NAME = 'exercise-editor-marker';
16
+ var cssRemoteMarker = styled.css([".", "{&-cursor{position:absolute;pointer-events:none;z-index:4000;width:2px;&:before{content:'';width:6px;height:5px;display:block;margin-left:-2px;margin-top:0;z-index:4000;background:inherit;}&-tooltip{position:absolute;white-space:nowrap;color:", ";text-shadow:0 0 1px ", ";opacity:1;font-size:12px;padding:2px;font-family:'Pretendard','Malgun Gothic','Helvetica','Myriad Pro','Arial',sans-serif;z-index:4000;transition:opacity 0.5s ease-out;}}&-selection{position:absolute;pointer-events:auto;opacity:0.3;}}"], REMOTE_MARKER_CLASS_NAME, designTokens.base.color.white, designTokens.base.color.gray9);
17
17
 
18
18
  exports.REMOTE_MARKER_CLASS_NAME = REMOTE_MARKER_CLASS_NAME;
19
19
  exports.cssRemoteMarker = cssRemoteMarker;
@@ -2,12 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- /* eslint-disable */
6
5
  /**
7
6
  * List of all known syntaxes
8
7
  */
9
-
10
- const syntaxes = {
8
+ var syntaxes = {
11
9
  markup: ['html', 'xml', 'xsl', 'jsx', 'js', 'pug', 'slim', 'haml'],
12
10
  stylesheet: ['css', 'sass', 'scss', 'less', 'sss', 'stylus']
13
11
  };