@elice/material-exercise 1.230328.0 → 1.230418.1

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBabelHelpers.js');
6
+
5
7
  /* ====================================================================================================
6
8
  * These codes forked and modified from `convergencelabs/monaco-collab-ext`
7
9
  * under the terms of the MIT license.
@@ -9,89 +11,89 @@ Object.defineProperty(exports, '__esModule', { value: true });
9
11
  * - project: https://github.com/convergencelabs/monaco-collab-ext
10
12
  * - codes: https://github.com/convergencelabs/monaco-collab-ext/tree/6ece72028e4b8fb35e9928a304fbdfe28a4e7be9/src/ts
11
13
  * ==================================================================================================== */
12
-
13
14
  /**
14
15
  * The RemoteCursor class represents a remote cursor in the MonacoEditor. This
15
16
  * class allows you to control the location and visibility of the cursor.
16
17
  */
17
- class RemoteCursor {
18
- constructor(delegate) {
18
+ var RemoteCursor = /*#__PURE__*/function () {
19
+ function RemoteCursor(delegate) {
20
+ _rollupPluginBabelHelpers.classCallCheck(this, RemoteCursor);
19
21
  this._delegate = delegate;
20
22
  }
21
23
  /**
22
24
  * Gets the unique id of this cursor.
23
25
  */
24
-
25
-
26
- getId() {
27
- return this._delegate.getId();
28
- }
29
- /**
30
- * Gets the position of the cursor.
31
- */
32
-
33
-
34
- getPosition() {
35
- var _a;
36
-
37
- return (_a = this._delegate.getPosition()) === null || _a === void 0 ? void 0 : _a.position;
38
- }
39
- /**
40
- * Sets the location of the cursor based on a Monaco Editor IPosition.
41
- */
42
-
43
-
44
- setPosition(position) {
45
- this._delegate.setPosition(position);
46
- }
47
- /**
48
- * Sets the location of the cursor using a zero-based text offset.
49
- *
50
- * @param offset
51
- * The offset of the cursor.
52
- */
53
-
54
-
55
- setOffset(offset) {
56
- this._delegate.setOffset(offset);
57
- }
58
- /**
59
- * Shows the cursor if it is hidden.
60
- */
61
-
62
-
63
- show() {
64
- this._delegate.show();
65
- }
66
- /**
67
- * Hides the cursor if it is shown.
68
- */
69
-
70
-
71
- hide() {
72
- this._delegate.hide();
73
- }
74
- /**
75
- * Determines if the cursor has already been disposed. A cursor is disposed
76
- * when it has been permanently removed from the editor.
77
- *
78
- * @returns
79
- * True if the cursor has been disposed, false otherwise.
80
- */
81
-
82
-
83
- isDisposed() {
84
- return this._delegate.isDisposed();
85
- }
86
- /**
87
- * Disposes of this cursor, removing it from the editor.
88
- */
89
-
90
-
91
- dispose() {
92
- this._delegate.dispose();
93
- }
94
-
95
- }
26
+ _rollupPluginBabelHelpers.createClass(RemoteCursor, [{
27
+ key: "getId",
28
+ value: function getId() {
29
+ return this._delegate.getId();
30
+ }
31
+ /**
32
+ * Gets the position of the cursor.
33
+ */
34
+ }, {
35
+ key: "getPosition",
36
+ value: function getPosition() {
37
+ var _a;
38
+ return (_a = this._delegate.getPosition()) === null || _a === void 0 ? void 0 : _a.position;
39
+ }
40
+ /**
41
+ * Sets the location of the cursor based on a Monaco Editor IPosition.
42
+ */
43
+ }, {
44
+ key: "setPosition",
45
+ value: function setPosition(position) {
46
+ this._delegate.setPosition(position);
47
+ }
48
+ /**
49
+ * Sets the location of the cursor using a zero-based text offset.
50
+ *
51
+ * @param offset
52
+ * The offset of the cursor.
53
+ */
54
+ }, {
55
+ key: "setOffset",
56
+ value: function setOffset(offset) {
57
+ this._delegate.setOffset(offset);
58
+ }
59
+ /**
60
+ * Shows the cursor if it is hidden.
61
+ */
62
+ }, {
63
+ key: "show",
64
+ value: function show() {
65
+ this._delegate.show();
66
+ }
67
+ /**
68
+ * Hides the cursor if it is shown.
69
+ */
70
+ }, {
71
+ key: "hide",
72
+ value: function hide() {
73
+ this._delegate.hide();
74
+ }
75
+ /**
76
+ * Determines if the cursor has already been disposed. A cursor is disposed
77
+ * when it has been permanently removed from the editor.
78
+ *
79
+ * @returns
80
+ * True if the cursor has been disposed, false otherwise.
81
+ */
82
+ }, {
83
+ key: "isDisposed",
84
+ value: function isDisposed() {
85
+ return this._delegate.isDisposed();
86
+ }
87
+ /**
88
+ * Disposes of this cursor, removing it from the editor.
89
+ */
90
+ }, {
91
+ key: "dispose",
92
+ value: function dispose() {
93
+ this._delegate.dispose();
94
+ }
95
+ }]);
96
+ return RemoteCursor;
97
+ }();
96
98
 
97
99
  exports.RemoteCursor = RemoteCursor;
@@ -2,20 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var _rollupPluginBabelHelpers = require('../../../../../_virtual/_rollupPluginBabelHelpers.js');
5
6
  var RemoteCursor = require('./RemoteCursor.js');
6
7
  var RemoteCursorWidget = require('./RemoteCursorWidget.js');
7
8
 
8
- /* ====================================================================================================
9
- * These codes forked and modified from `convergencelabs/monaco-collab-ext`
10
- * under the terms of the MIT license.
11
- * Make sure to check the original project if any issue exists.
12
- * - project: https://github.com/convergencelabs/monaco-collab-ext
13
- * - codes: https://github.com/convergencelabs/monaco-collab-ext/tree/6ece72028e4b8fb35e9928a304fbdfe28a4e7be9/src/ts
14
- * ==================================================================================================== */
15
- class RemoteCursorManager {
16
- constructor(options) {
9
+ var RemoteCursorManager = /*#__PURE__*/function () {
10
+ function RemoteCursorManager(options) {
11
+ _rollupPluginBabelHelpers.classCallCheck(this, RemoteCursorManager);
17
12
  var _a, _b;
18
-
19
13
  this._options = {
20
14
  editor: options.editor,
21
15
  tooltips: (_a = options.tooltips) !== null && _a !== void 0 ? _a : true,
@@ -27,93 +21,88 @@ class RemoteCursorManager {
27
21
  /**
28
22
  * Adds a new remote cursor to the editor.
29
23
  */
30
-
31
-
32
- addCursor(id, color, label) {
33
- const widgetId = `${this._nextWidgetId++}`;
34
- const tooltipDurationMs = this._options.tooltipDuration * 1000;
35
- const cursorWidget = new RemoteCursorWidget.RemoteCursorWidget(this._options.editor, widgetId, color, label !== null && label !== void 0 ? label : '', this._options.tooltips, tooltipDurationMs, () => this.removeCursor(id));
36
-
37
- this._cursorWidgets.set(id, cursorWidget);
38
-
39
- return new RemoteCursor.RemoteCursor(cursorWidget);
40
- }
41
- /**
42
- * Removes the remote cursor from the editor.
43
- */
44
-
45
-
46
- removeCursor(id) {
47
- const remoteCursorWidget = this._getCursor(id);
48
-
49
- if (remoteCursorWidget && !remoteCursorWidget.isDisposed()) {
50
- remoteCursorWidget.dispose();
24
+ _rollupPluginBabelHelpers.createClass(RemoteCursorManager, [{
25
+ key: "addCursor",
26
+ value: function addCursor(id, color, label) {
27
+ var _this = this;
28
+ var widgetId = "".concat(this._nextWidgetId++);
29
+ var tooltipDurationMs = this._options.tooltipDuration * 1000;
30
+ var cursorWidget = new RemoteCursorWidget.RemoteCursorWidget(this._options.editor, widgetId, color, label !== null && label !== void 0 ? label : '', this._options.tooltips, tooltipDurationMs, function () {
31
+ return _this.removeCursor(id);
32
+ });
33
+ this._cursorWidgets.set(id, cursorWidget);
34
+ return new RemoteCursor.RemoteCursor(cursorWidget);
51
35
  }
52
-
53
- this._cursorWidgets.delete(id);
54
- }
55
- /**
56
- * Updates the location of the specified remote cursor
57
- * using a Monaco IPosition object.
58
- */
59
-
60
-
61
- setCursorPosition(id, position) {
62
- const remoteCursorWidget = this._getCursor(id);
63
-
64
- if (remoteCursorWidget) {
65
- remoteCursorWidget.setPosition(position);
36
+ /**
37
+ * Removes the remote cursor from the editor.
38
+ */
39
+ }, {
40
+ key: "removeCursor",
41
+ value: function removeCursor(id) {
42
+ var remoteCursorWidget = this._getCursor(id);
43
+ if (remoteCursorWidget && !remoteCursorWidget.isDisposed()) {
44
+ remoteCursorWidget.dispose();
45
+ }
46
+ this._cursorWidgets.delete(id);
66
47
  }
67
- }
68
- /**
69
- * Updates the location of the specified remote cursor
70
- * based on a zero-based text offset.
71
- */
72
-
73
-
74
- setCursorOffset(id, offset) {
75
- const remoteCursorWidget = this._getCursor(id);
76
-
77
- if (remoteCursorWidget) {
78
- remoteCursorWidget.setOffset(offset);
48
+ /**
49
+ * Updates the location of the specified remote cursor
50
+ * using a Monaco IPosition object.
51
+ */
52
+ }, {
53
+ key: "setCursorPosition",
54
+ value: function setCursorPosition(id, position) {
55
+ var remoteCursorWidget = this._getCursor(id);
56
+ if (remoteCursorWidget) {
57
+ remoteCursorWidget.setPosition(position);
58
+ }
79
59
  }
80
- }
81
- /**
82
- * Shows the specified cursor. Note the cursor may be scrolled out of view.
83
- */
84
-
85
-
86
- showCursor(id) {
87
- const remoteCursorWidget = this._getCursor(id);
88
-
89
- if (remoteCursorWidget) {
90
- remoteCursorWidget.show();
60
+ /**
61
+ * Updates the location of the specified remote cursor
62
+ * based on a zero-based text offset.
63
+ */
64
+ }, {
65
+ key: "setCursorOffset",
66
+ value: function setCursorOffset(id, offset) {
67
+ var remoteCursorWidget = this._getCursor(id);
68
+ if (remoteCursorWidget) {
69
+ remoteCursorWidget.setOffset(offset);
70
+ }
91
71
  }
92
- }
93
- /**
94
- * Hides the specified cursor.
95
- */
96
-
97
-
98
- hideCursor(id) {
99
- const remoteCursorWidget = this._getCursor(id);
100
-
101
- if (remoteCursorWidget) {
102
- remoteCursorWidget.hide();
72
+ /**
73
+ * Shows the specified cursor. Note the cursor may be scrolled out of view.
74
+ */
75
+ }, {
76
+ key: "showCursor",
77
+ value: function showCursor(id) {
78
+ var remoteCursorWidget = this._getCursor(id);
79
+ if (remoteCursorWidget) {
80
+ remoteCursorWidget.show();
81
+ }
103
82
  }
104
- }
105
- /**
106
- * A helper method that gets a cursor by id, or throws an exception.
107
- * @internal
108
- */
109
-
110
-
111
- _getCursor(id) {
112
- var _a;
113
-
114
- return (_a = this._cursorWidgets.get(id)) !== null && _a !== void 0 ? _a : null;
115
- }
116
-
117
- }
83
+ /**
84
+ * Hides the specified cursor.
85
+ */
86
+ }, {
87
+ key: "hideCursor",
88
+ value: function hideCursor(id) {
89
+ var remoteCursorWidget = this._getCursor(id);
90
+ if (remoteCursorWidget) {
91
+ remoteCursorWidget.hide();
92
+ }
93
+ }
94
+ /**
95
+ * A helper method that gets a cursor by id, or throws an exception.
96
+ * @internal
97
+ */
98
+ }, {
99
+ key: "_getCursor",
100
+ value: function _getCursor(id) {
101
+ var _a;
102
+ return (_a = this._cursorWidgets.get(id)) !== null && _a !== void 0 ? _a : null;
103
+ }
104
+ }]);
105
+ return RemoteCursorManager;
106
+ }();
118
107
 
119
108
  exports.RemoteCursorManager = RemoteCursorManager;
@@ -2,180 +2,170 @@
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
 
8
- /* ====================================================================================================
9
- * These codes forked and modified from `convergencelabs/monaco-collab-ext`
10
- * under the terms of the MIT license.
11
- * Make sure to check the original project if any issue exists.
12
- * - project: https://github.com/convergencelabs/monaco-collab-ext
13
- * - codes: https://github.com/convergencelabs/monaco-collab-ext/tree/6ece72028e4b8fb35e9928a304fbdfe28a4e7be9/src/ts
14
- * ==================================================================================================== */
15
-
16
9
  function getConfiguration(editorInstance) {
17
10
  // Support for Monaco < 0.19.0
18
11
  if (typeof editorInstance.getConfiguration === 'function') {
19
12
  return editorInstance.getConfiguration();
20
13
  }
21
-
22
14
  return {
23
15
  lineHeight: editorInstance.getOption(monaco.editor.EditorOption.lineHeight)
24
16
  };
25
17
  }
26
-
27
- class RemoteCursorWidget {
28
- constructor(codeEditor, widgetId, color, label, tooltipEnabled, tooltipDuration, onDisposed) {
18
+ var RemoteCursorWidget = /*#__PURE__*/function () {
19
+ function RemoteCursorWidget(codeEditor, widgetId, color, label, tooltipEnabled, tooltipDuration, onDisposed) {
20
+ var _this = this;
21
+ _rollupPluginBabelHelpers.classCallCheck(this, RemoteCursorWidget);
29
22
  this._position = null;
30
23
  this._editor = codeEditor;
31
24
  this._tooltipDuration = tooltipDuration;
32
- this._id = `${styles.REMOTE_MARKER_CLASS_NAME}-cursor-${widgetId}`;
33
- this._onDisposed = onDisposed; // Create the main node for the cursor element.
34
-
35
- const {
36
- lineHeight
37
- } = getConfiguration(this._editor);
25
+ this._id = "".concat(styles.REMOTE_MARKER_CLASS_NAME, "-cursor-").concat(widgetId);
26
+ this._onDisposed = onDisposed;
27
+ // Create the main node for the cursor element.
28
+ var _getConfiguration = getConfiguration(this._editor),
29
+ lineHeight = _getConfiguration.lineHeight;
38
30
  this._domNode = document.createElement('div');
39
- this._domNode.className = `${styles.REMOTE_MARKER_CLASS_NAME}-cursor`;
31
+ this._domNode.className = "".concat(styles.REMOTE_MARKER_CLASS_NAME, "-cursor");
40
32
  this._domNode.style.background = color;
41
- this._domNode.style.height = `${lineHeight}px`; // Create the tooltip element if the tooltip is enabled.
42
-
33
+ this._domNode.style.height = "".concat(lineHeight, "px");
34
+ // Create the tooltip element if the tooltip is enabled.
43
35
  if (tooltipEnabled) {
44
36
  this._tooltipNode = document.createElement('div');
45
- this._tooltipNode.className = `${styles.REMOTE_MARKER_CLASS_NAME}-cursor-tooltip`;
37
+ this._tooltipNode.className = "".concat(styles.REMOTE_MARKER_CLASS_NAME, "-cursor-tooltip");
46
38
  this._tooltipNode.style.background = color;
47
39
  this._tooltipNode.innerHTML = label;
48
-
49
- this._domNode.appendChild(this._tooltipNode); // we only need to listen to scroll positions to update the
40
+ this._domNode.appendChild(this._tooltipNode);
41
+ // we only need to listen to scroll positions to update the
50
42
  // tooltip location on scrolling.
51
-
52
-
53
- this._scrollListener = this._editor.onDidScrollChange(() => {
54
- this._updateTooltipPosition();
43
+ this._scrollListener = this._editor.onDidScrollChange(function () {
44
+ _this._updateTooltipPosition();
55
45
  });
56
46
  } else {
57
47
  this._tooltipNode = null;
58
48
  this._scrollListener = null;
59
49
  }
60
-
61
50
  this._hideTimer = null;
62
-
63
51
  this._editor.addContentWidget(this);
64
-
65
52
  this._disposed = false;
66
53
  }
67
-
68
- hide() {
69
- this._domNode.style.display = 'none';
70
- }
71
-
72
- show() {
73
- this._domNode.style.display = 'inherit';
74
- }
75
-
76
- setOffset(offset) {
77
- var _a;
78
-
79
- const position = (_a = this._editor.getModel()) === null || _a === void 0 ? void 0 : _a.getPositionAt(offset);
80
-
81
- if (position) {
82
- this.setPosition(position);
54
+ _rollupPluginBabelHelpers.createClass(RemoteCursorWidget, [{
55
+ key: "hide",
56
+ value: function hide() {
57
+ this._domNode.style.display = 'none';
83
58
  }
84
- }
85
-
86
- setPosition(position) {
87
- this._updatePosition(position);
88
-
89
- if (this._tooltipNode !== null) {
90
- setTimeout(() => this._showTooltip(), 0);
59
+ }, {
60
+ key: "show",
61
+ value: function show() {
62
+ this._domNode.style.display = 'inherit';
91
63
  }
92
- }
93
-
94
- isDisposed() {
95
- return this._disposed;
96
- }
97
-
98
- dispose() {
99
- if (this._disposed) {
100
- return;
64
+ }, {
65
+ key: "setOffset",
66
+ value: function setOffset(offset) {
67
+ var _a;
68
+ var position = (_a = this._editor.getModel()) === null || _a === void 0 ? void 0 : _a.getPositionAt(offset);
69
+ if (position) {
70
+ this.setPosition(position);
71
+ }
101
72
  }
102
-
103
- this._editor.removeContentWidget(this);
104
-
105
- if (this._scrollListener !== null) {
106
- this._scrollListener.dispose();
73
+ }, {
74
+ key: "setPosition",
75
+ value: function setPosition(position) {
76
+ var _this2 = this;
77
+ this._updatePosition(position);
78
+ if (this._tooltipNode !== null) {
79
+ setTimeout(function () {
80
+ return _this2._showTooltip();
81
+ }, 0);
82
+ }
107
83
  }
108
-
109
- this._disposed = true;
110
-
111
- this._onDisposed();
112
- }
113
-
114
- getId() {
115
- return this._id;
116
- }
117
-
118
- getDomNode() {
119
- return this._domNode;
120
- }
121
-
122
- getPosition() {
123
- return this._position;
124
- }
125
-
126
- _updatePosition(position) {
127
- this._position = {
128
- position: Object.assign({}, position),
129
- preference: [monaco.editor.ContentWidgetPositionPreference.EXACT]
130
- };
131
-
132
- this._editor.layoutContentWidget(this);
133
- }
134
-
135
- _showTooltip() {
136
- this._updateTooltipPosition();
137
-
138
- if (this._hideTimer !== null) {
139
- clearTimeout(this._hideTimer);
140
- } else {
141
- this._setTooltipVisible(true);
84
+ }, {
85
+ key: "isDisposed",
86
+ value: function isDisposed() {
87
+ return this._disposed;
142
88
  }
143
-
144
- this._hideTimer = setTimeout(() => {
145
- this._setTooltipVisible(false);
146
-
147
- this._hideTimer = null;
148
- }, this._tooltipDuration);
149
- }
150
-
151
- _updateTooltipPosition() {
152
- if (!this._tooltipNode) {
153
- return;
89
+ }, {
90
+ key: "dispose",
91
+ value: function dispose() {
92
+ if (this._disposed) {
93
+ return;
94
+ }
95
+ this._editor.removeContentWidget(this);
96
+ if (this._scrollListener !== null) {
97
+ this._scrollListener.dispose();
98
+ }
99
+ this._disposed = true;
100
+ this._onDisposed();
154
101
  }
155
-
156
- const distanceFromTop = this._domNode.offsetTop - this._editor.getScrollTop();
157
-
158
- if (distanceFromTop - this._tooltipNode.offsetHeight < 5) {
159
- this._tooltipNode.style.top = `${this._tooltipNode.offsetHeight + 2}px`;
160
- } else {
161
- this._tooltipNode.style.top = `-${this._tooltipNode.offsetHeight}px`;
102
+ }, {
103
+ key: "getId",
104
+ value: function getId() {
105
+ return this._id;
162
106
  }
163
-
164
- this._tooltipNode.style.left = '0';
165
- }
166
-
167
- _setTooltipVisible(visible) {
168
- if (!this._tooltipNode) {
169
- return;
107
+ }, {
108
+ key: "getDomNode",
109
+ value: function getDomNode() {
110
+ return this._domNode;
170
111
  }
171
-
172
- if (visible) {
173
- this._tooltipNode.style.opacity = '1.0';
174
- } else {
175
- this._tooltipNode.style.opacity = '0';
112
+ }, {
113
+ key: "getPosition",
114
+ value: function getPosition() {
115
+ return this._position;
176
116
  }
177
- }
178
-
179
- }
117
+ }, {
118
+ key: "_updatePosition",
119
+ value: function _updatePosition(position) {
120
+ this._position = {
121
+ position: Object.assign({}, position),
122
+ preference: [monaco.editor.ContentWidgetPositionPreference.EXACT]
123
+ };
124
+ this._editor.layoutContentWidget(this);
125
+ }
126
+ }, {
127
+ key: "_showTooltip",
128
+ value: function _showTooltip() {
129
+ var _this3 = this;
130
+ this._updateTooltipPosition();
131
+ if (this._hideTimer !== null) {
132
+ clearTimeout(this._hideTimer);
133
+ } else {
134
+ this._setTooltipVisible(true);
135
+ }
136
+ this._hideTimer = setTimeout(function () {
137
+ _this3._setTooltipVisible(false);
138
+ _this3._hideTimer = null;
139
+ }, this._tooltipDuration);
140
+ }
141
+ }, {
142
+ key: "_updateTooltipPosition",
143
+ value: function _updateTooltipPosition() {
144
+ if (!this._tooltipNode) {
145
+ return;
146
+ }
147
+ var distanceFromTop = this._domNode.offsetTop - this._editor.getScrollTop();
148
+ if (distanceFromTop - this._tooltipNode.offsetHeight < 5) {
149
+ this._tooltipNode.style.top = "".concat(this._tooltipNode.offsetHeight + 2, "px");
150
+ } else {
151
+ this._tooltipNode.style.top = "-".concat(this._tooltipNode.offsetHeight, "px");
152
+ }
153
+ this._tooltipNode.style.left = '0';
154
+ }
155
+ }, {
156
+ key: "_setTooltipVisible",
157
+ value: function _setTooltipVisible(visible) {
158
+ if (!this._tooltipNode) {
159
+ return;
160
+ }
161
+ if (visible) {
162
+ this._tooltipNode.style.opacity = '1.0';
163
+ } else {
164
+ this._tooltipNode.style.opacity = '0';
165
+ }
166
+ }
167
+ }]);
168
+ return RemoteCursorWidget;
169
+ }();
180
170
 
181
171
  exports.RemoteCursorWidget = RemoteCursorWidget;