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