Skip to content

Commit 687d9ab

Browse files
committed
Update Monaco
This notably updates just to 0.51, as 0.52 seems to throw uncatchable 'cancelled' errors in practical use which is very annoying.
1 parent b7e47d5 commit 687d9ab

File tree

4 files changed

+42
-41
lines changed

4 files changed

+42
-41
lines changed

package-lock.json

Lines changed: 30 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"mobx-utils": "^5.1.0",
109109
"mockrtc": "^0.3.1",
110110
"mockttp": "^3.15.4",
111-
"monaco-editor": "^0.27.0",
111+
"monaco-editor": "^0.51.0",
112112
"node-forge": "^1.3.0",
113113
"openapi-directory": "^1.3.0",
114114
"openapi3-ts": "^1.3.0",
@@ -123,7 +123,7 @@
123123
"react-contexify": "^6.0.0",
124124
"react-dom": "^18.2.0",
125125
"react-hotkeys-hook": "^2.1.3",
126-
"react-monaco-editor": "^0.45.0",
126+
"react-monaco-editor": "^0.58.0",
127127
"react-reverse-portal": "^2.1.1",
128128
"react-split-pane": "^0.1.92",
129129
"react-virtualized-auto-sizer": "^1.0.2",
@@ -191,7 +191,7 @@
191191
"karma-sourcemap-loader": "^0.3.8",
192192
"karma-webpack": "^5.0.0",
193193
"mocha": "^10.8.2",
194-
"monaco-editor-webpack-plugin": "^4.1.2",
194+
"monaco-editor-webpack-plugin": "^7.1.0",
195195
"node-fetch": "^2.6.7",
196196
"npm-run-all": "^4.1.5",
197197
"path-browserify": "^1.0.1",

src/components/editor/base-editor.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,7 @@ class BaseEditor extends React.Component<EditorProps> {
404404
renderValidationDecorations: 'on',
405405
fixedOverflowWidgets: true,
406406

407-
// TODO: Would like to set a fontFace here, but due to
408-
// https://github.com/Microsoft/monaco-editor/issues/392
409-
// it breaks wordwrap
410-
407+
fontFamily: '"DM mono", monospace',
411408
fontSize: 16,
412409
wordWrap: 'on',
413410

src/styles.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,14 @@ export const GlobalStyles = createGlobalStyle`
329329
.zone-widget .filename {
330330
display: none;
331331
}
332+
333+
.mtkcontrol {
334+
/* Control characters have loud red backgrounds. Common in binary data, and too
335+
strong for our purposes. This is visible but gentler. */
336+
color: ${p => p.theme.mainColor} !important;
337+
background: none !important;
338+
opacity: ${p => p.theme.pillContrast};
339+
}
332340
}
333341
334342
.phosphor-icon {

0 commit comments

Comments
 (0)