@typefox/monaco-editor-react 7.3.0-next.5 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,11 +2,15 @@
2
2
 
3
3
  All notable changes to npm module [@typefox/monaco-editor-react](https://www.npmjs.com/package/@typefox/monaco-editor-react) are documented in this file.
4
4
 
5
- ## [7.3.0-next.5] - 2025-11-13
5
+ ## [7.3.0] - 2025-11-16
6
6
 
7
7
  - Fixed re-rendering issues with React StrictMode [#986](https://github.com/TypeFox/monaco-languageclient/pull/986).
8
- - Updated to `monaco-languageclient@10.3.0-next.5`.
9
- - Updated all `@codingame/monaco-vscode` packages to `22.1.9`.
8
+ - Added `onConfigProcessed` to announced the `EditorAppConfig` changed. The editor is only re-launched the component was disposed.
9
+ - Optional `modifiedTextValue` and `originalTextValue` are removed as text/model changes are handled via `EditorAppConfig`.
10
+ - `vscodeApiConfig` is now optional as you can start the api layer independently. If you use the compoenent without `vscodeApiConfig`, but did not ensure it is started an error is thrown.
11
+ - React comp: Only execute queued EditorApp start if HTML is still valid [#995](https://github.com/TypeFox/monaco-languageclient/pull/995).
12
+ - Updated to `monaco-languageclient@10.3.0`.
13
+ - Updated all `@codingame/monaco-vscode` packages to `23.0.0`.
10
14
 
11
15
  ## [7.2.0] - 2025-10-20
12
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACrG,OAAO,EAAE,KAAK,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACnG,OAAO,EAAgC,KAAK,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAC1I,OAA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@@ -14,18 +14,18 @@ const lcsManager = new LanguageClientManager();
14
14
  const haveEditorService = () => {
15
15
  return getEnhancedMonacoEnvironment().viewServiceType === 'EditorService';
16
16
  };
17
- const logger = new ConsoleLogger(LogLevel.Debug);
17
+ const logger = new ConsoleLogger(LogLevel.Off);
18
18
  const runQueue = [];
19
19
  let runQueueLock = true;
20
20
  let intervalId = undefined;
21
- const addQueue = (id, func) => {
21
+ const queueIntervalMs = 10;
22
+ const addQueue = (queueEntry) => {
22
23
  debugLogging('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>');
23
- debugLogging(`Adding to queue: ${id}: QUEUE SIZE before: ${runQueue.length}`);
24
- runQueue.push({ id, func });
24
+ debugLogging(`Adding to queue: ${queueEntry.id}: QUEUE SIZE before: ${runQueue.length}`);
25
+ runQueue.push(queueEntry);
25
26
  kickQueue();
26
27
  };
27
28
  const executeQueue = async () => {
28
- console.log(`Queue size: ${runQueue.length}`);
29
29
  if (runQueue.length > 0) {
30
30
  runQueueLock = true;
31
31
  while (runQueue.length > 0) {
@@ -33,7 +33,7 @@ const executeQueue = async () => {
33
33
  const queueObj = runQueue.shift();
34
34
  debugLogging('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<');
35
35
  debugLogging(`QUEUE ${queueObj?.id} start: SIZE before: ${lengthBefore}`, true);
36
- await queueObj?.func();
36
+ await queueObj?.func(queueObj.currentContainer);
37
37
  debugLogging(`QUEUE ${queueObj?.id} end: SIZE after: ${runQueue.length}`);
38
38
  }
39
39
  runQueueLock = false;
@@ -47,7 +47,7 @@ const kickQueue = () => {
47
47
  await executeQueue();
48
48
  stopQueue();
49
49
  }
50
- }, 50);
50
+ }, queueIntervalMs);
51
51
  }
52
52
  };
53
53
  const stopQueue = () => {
@@ -69,6 +69,10 @@ export const MonacoEditorReactComp = (props) => {
69
69
  const { style, className, vscodeApiConfig, editorAppConfig, languageClientConfig, onVscodeApiInitDone, onEditorStartDone, onLanguageClientsStartDone, onTextChanged, onConfigProcessed, onError, onDisposeEditor, onDisposeLanguageClient, logLevel } = props;
70
70
  const editorAppRef = useRef(undefined);
71
71
  const containerRef = useRef(null);
72
+ const modifiedCodeUriRef = useRef(undefined);
73
+ const modifiedCodeRef = useRef(undefined);
74
+ const originalCodeUriRef = useRef(undefined);
75
+ const originalCodeRef = useRef(undefined);
72
76
  const onTextChangedRef = useRef(onTextChanged);
73
77
  const launchingRef = useRef(false);
74
78
  const editorAppConfigRef = useRef(undefined);
@@ -88,7 +92,6 @@ export const MonacoEditorReactComp = (props) => {
88
92
  performErrorHandling(new Error('No htmlContainer found! Aborting...'));
89
93
  }
90
94
  const envEnhanced = getEnhancedMonacoEnvironment();
91
- // let apiConfig: MonacoVscodeApiConfig;
92
95
  if (vscodeApiConfig === undefined && envEnhanced.vscodeApiInitialised !== true) {
93
96
  throw new Error('vscodeApiConfig is not provided, but the monaco-vscode-api is not initialized! Aborting...');
94
97
  }
@@ -100,12 +103,6 @@ export const MonacoEditorReactComp = (props) => {
100
103
  debugLogging('GLOBAL INIT', true);
101
104
  if (apiWrapper === undefined)
102
105
  throw new Error('Unexpected error occurred: apiWrapper is not available! Aborting...');
103
- if (apiWrapper.getMonacoVscodeApiConfig().viewsConfig.$type === 'EditorService') {
104
- apiWrapper.overrideViewsConfig({
105
- $type: 'EditorService',
106
- htmlContainer: containerRef.current
107
- });
108
- }
109
106
  await apiWrapper.start();
110
107
  onVscodeApiInitDone?.(apiWrapper);
111
108
  debugLogging('GLOBAL INIT DONE', true);
@@ -123,32 +120,46 @@ export const MonacoEditorReactComp = (props) => {
123
120
  }
124
121
  }
125
122
  };
126
- const editorInitFunc = async () => {
123
+ const editorInit = async (htmlContainer) => {
127
124
  try {
128
125
  debugLogging('INIT EDITOR', true);
129
126
  // it is possible to run without an editorApp, when the ViewsService or WorkbenchService
130
127
  if (haveEditorService()) {
131
- if (editorAppRef.current === undefined && !launchingRef.current) {
132
- launchingRef.current = true;
133
- debugLogging('INIT: Creating editor', true);
134
- editorAppRef.current = new EditorApp(editorAppConfigRef.current);
135
- if (editorAppRef.current.isStarting() === true || editorAppRef.current.isDisposing() === true) {
136
- await Promise.all([
137
- editorAppRef.current.getStartingAwait(),
138
- editorAppRef.current.getDisposingAwait()
139
- ]);
140
- }
141
- editorAppRef.current.registerOnTextChangedCallback((textChanges) => {
142
- if (onTextChangedRef.current !== undefined) {
143
- onTextChangedRef.current(textChanges);
144
- }
145
- });
146
- await editorAppRef.current.start(containerRef.current);
147
- onEditorStartDone?.(editorAppRef.current);
148
- launchingRef.current = false;
128
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
129
+ if (htmlContainer === null || (htmlContainer !== null && htmlContainer.parentElement === null)) {
130
+ debugLogging('INIT EDITOR: Unable to create editor. HTML container or the parent is missing.', true);
149
131
  }
150
132
  else {
151
- debugLogging('INIT EDITOR: Editor already created', true);
133
+ if (editorAppRef.current === undefined && !launchingRef.current) {
134
+ launchingRef.current = true;
135
+ debugLogging('INIT EDITOR: Creating editor', true);
136
+ editorAppRef.current = new EditorApp(editorAppConfigRef.current);
137
+ if (editorAppRef.current.isStarting() === true || editorAppRef.current.isDisposing() === true) {
138
+ await Promise.all([
139
+ editorAppRef.current.getStartingAwait(),
140
+ editorAppRef.current.getDisposingAwait()
141
+ ]);
142
+ }
143
+ updateModelRelatedRefs();
144
+ editorAppRef.current.registerOnTextChangedCallback((textChanges) => {
145
+ if (textChanges.modified !== undefined) {
146
+ modifiedCodeRef.current = textChanges.modified;
147
+ }
148
+ if (textChanges.original !== undefined) {
149
+ originalCodeRef.current = textChanges.original;
150
+ }
151
+ if (onTextChangedRef.current !== undefined) {
152
+ onTextChangedRef.current(textChanges);
153
+ }
154
+ });
155
+ // await retrieveContainerRef('INIT EDITOR');
156
+ await editorAppRef.current.start(htmlContainer);
157
+ onEditorStartDone?.(editorAppRef.current);
158
+ launchingRef.current = false;
159
+ }
160
+ else {
161
+ debugLogging('INIT EDITOR: Editor already created', true);
162
+ }
152
163
  }
153
164
  }
154
165
  else {
@@ -160,34 +171,91 @@ export const MonacoEditorReactComp = (props) => {
160
171
  performErrorHandling(error);
161
172
  }
162
173
  };
163
- const configProcessedFunc = () => {
174
+ const updateEditorModel = async () => {
175
+ try {
176
+ debugLogging('UPDATE EDITOR MODEL', true);
177
+ if (!launchingRef.current && editorAppRef.current) {
178
+ editorAppRef.current.updateCodeResources(editorAppConfigRef.current?.codeResources);
179
+ updateModelRelatedRefs();
180
+ onConfigProcessed?.(editorAppRef.current);
181
+ }
182
+ else {
183
+ debugLogging('UPDATE EDITOR MODEL: Not Possible: No editor', true);
184
+ }
185
+ debugLogging('UPDATE EDITOR MODEL: Done', true);
186
+ }
187
+ catch (error) {
188
+ performErrorHandling(error);
189
+ }
190
+ };
191
+ const updateModelRelatedRefs = () => {
192
+ modifiedCodeRef.current = editorAppConfigRef.current?.codeResources?.modified?.text;
193
+ originalCodeRef.current = editorAppConfigRef.current?.codeResources?.original?.text;
194
+ modifiedCodeUriRef.current = editorAppConfigRef.current?.codeResources?.modified?.uri;
195
+ originalCodeUriRef.current = editorAppConfigRef.current?.codeResources?.original?.uri;
196
+ };
197
+ const disposeEditor = async () => {
198
+ try {
199
+ // dispose editor if used
200
+ debugLogging('DISPOSE', true);
201
+ if (editorAppRef.current !== undefined) {
202
+ await editorAppRef.current.dispose();
203
+ editorAppRef.current = undefined;
204
+ onDisposeEditor?.();
205
+ }
206
+ else {
207
+ debugLogging('DISPOSE: EditorApp is not disposed', true);
208
+ }
209
+ debugLogging('DISPOSE DONE', true);
210
+ }
211
+ catch (error) {
212
+ performErrorHandling(error);
213
+ }
214
+ };
215
+ const processConfig = () => {
216
+ let updateModel = false;
164
217
  try {
165
218
  debugLogging('CONFIG PROCESSED', true);
166
- if (!launchingRef.current) {
167
- if (editorAppConfigRef.current?.codeResources !== undefined && editorAppRef.current) {
168
- editorAppRef.current.updateCodeResources(editorAppConfigRef.current.codeResources);
169
- editorAppRef.current.updateCode({
170
- modified: editorAppConfigRef.current.codeResources.modified?.text,
171
- original: editorAppConfigRef.current.codeResources.original?.text
172
- });
219
+ if (!launchingRef.current && editorAppRef.current) {
220
+ if (editorAppConfigRef.current?.codeResources !== undefined) {
221
+ const newModifiedCodeUri = editorAppConfigRef.current.codeResources.modified?.uri;
222
+ const newOriginalCodeUri = editorAppConfigRef.current.codeResources.original?.uri;
223
+ const modifiedUri = modifiedCodeUriRef.current !== newModifiedCodeUri ? newModifiedCodeUri : undefined;
224
+ const originalUri = originalCodeUriRef.current !== newOriginalCodeUri ? newOriginalCodeUri : undefined;
225
+ // re-create the editor if the URIs have changed
226
+ if (modifiedUri !== undefined || originalUri !== undefined) {
227
+ updateModel = true;
228
+ }
229
+ else {
230
+ const newModifiedCode = editorAppConfigRef.current.codeResources.modified?.text;
231
+ const newOriginalCode = editorAppConfigRef.current.codeResources.original?.text;
232
+ const modified = modifiedCodeRef.current !== newModifiedCode ? newModifiedCode : undefined;
233
+ const original = originalCodeRef.current !== newOriginalCode ? newOriginalCode : undefined;
234
+ if (modified !== undefined || original !== undefined) {
235
+ editorAppRef.current.updateCode({ modified, original });
236
+ }
237
+ }
173
238
  }
174
- if (editorAppConfigRef.current?.editorOptions !== undefined && editorAppRef.current) {
239
+ if (editorAppConfigRef.current?.editorOptions !== undefined) {
175
240
  if (!editorAppRef.current.isDiffEditor()) {
176
241
  editorAppRef.current.getEditor()?.updateOptions(editorAppConfigRef.current.editorOptions);
177
242
  }
178
243
  }
179
- if (editorAppConfigRef.current?.diffEditorOptions !== undefined && editorAppRef.current) {
244
+ if (editorAppConfigRef.current?.diffEditorOptions !== undefined) {
180
245
  if (editorAppRef.current.isDiffEditor()) {
181
246
  editorAppRef.current.getDiffEditor()?.updateOptions(editorAppConfigRef.current.diffEditorOptions);
182
247
  }
183
248
  }
184
249
  }
185
- onConfigProcessed?.(editorAppRef.current);
250
+ if (!updateModel) {
251
+ onConfigProcessed?.(editorAppRef.current);
252
+ }
186
253
  debugLogging('CONFIG PROCESSED: Done', true);
187
254
  }
188
255
  catch (error) {
189
256
  performErrorHandling(error);
190
257
  }
258
+ return updateModel;
191
259
  };
192
260
  useEffect(() => {
193
261
  // fast-fail
@@ -196,13 +264,24 @@ export const MonacoEditorReactComp = (props) => {
196
264
  // always try to perform global init. Reason: we cannot ensure order
197
265
  performGlobalInit();
198
266
  editorAppConfigRef.current = editorAppConfig;
199
- addQueue('editorInit', editorInitFunc);
200
267
  // it is possible to run without an editorApp, when the ViewsService or WorkbenchService
201
268
  if (haveEditorService()) {
202
- if (editorAppRef.current !== undefined && !launchingRef.current) {
203
- configProcessedFunc();
269
+ const updateModel = processConfig();
270
+ if (updateModel) {
271
+ addQueue({ id: 'model update', func: updateEditorModel, currentContainer: containerRef.current });
272
+ }
273
+ else {
274
+ if (editorAppRef.current === undefined) {
275
+ addQueue({ id: 'editorInit', func: editorInit, currentContainer: containerRef.current });
276
+ }
277
+ else {
278
+ debugLogging('CHECK EDITOR: Editor already created', true);
279
+ }
204
280
  }
205
281
  }
282
+ else {
283
+ debugLogging('INIT EDITOR: Do nothing: Using ViewsService', true);
284
+ }
206
285
  }, [editorAppConfig]);
207
286
  useEffect(() => {
208
287
  // fast-fail
@@ -224,29 +303,29 @@ export const MonacoEditorReactComp = (props) => {
224
303
  performErrorHandling(new Error(`Unexpected error occurred during disposal of the language client: ${error}`));
225
304
  }
226
305
  };
227
- addQueue('dispose lc', disposeLCFunc);
306
+ addQueue({ id: 'dispose lc', func: disposeLCFunc, currentContainer: containerRef.current });
228
307
  }
229
308
  else {
230
309
  const lcInitFunc = async () => {
231
310
  try {
232
311
  debugLogging('INIT LC', true);
233
- lcsManager.setLogLevel(languageClientConfig.logLevel);
234
- await lcsManager.setConfig(languageClientConfig);
235
- if (!lcsManager.isStarted()) {
236
- await lcsManager.start();
237
- onLanguageClientsStartDone?.(lcsManager);
238
- debugLogging('INIT LC: Language client started', true);
239
- }
240
- else {
241
- debugLogging('INIT LC: Language client is not (re-)started', true);
242
- }
312
+ await lcsManager.start();
313
+ onLanguageClientsStartDone?.(lcsManager);
314
+ debugLogging('INIT LC: Language client started', true);
243
315
  debugLogging('INIT LC DONE', true);
244
316
  }
245
317
  catch (error) {
246
318
  performErrorHandling(error);
247
319
  }
248
320
  };
249
- addQueue('lcInit', lcInitFunc);
321
+ lcsManager.setLogLevel(languageClientConfig.logLevel);
322
+ lcsManager.setConfig(languageClientConfig);
323
+ if (!lcsManager.isStarted()) {
324
+ addQueue({ id: 'lcInit', func: lcInitFunc, currentContainer: containerRef.current });
325
+ }
326
+ else {
327
+ debugLogging('INIT LC: Language client is already running. No need to schedule async start.', true);
328
+ }
250
329
  }
251
330
  }, [languageClientConfig]);
252
331
  useEffect(() => {
@@ -255,25 +334,7 @@ export const MonacoEditorReactComp = (props) => {
255
334
  performGlobalInit();
256
335
  // this part runs on unmount (componentWillUnmount)
257
336
  return () => {
258
- const disposeFunc = async () => {
259
- try {
260
- // dispose editor if used
261
- debugLogging('DISPOSE', true);
262
- if (editorAppRef.current !== undefined) {
263
- await editorAppRef.current.dispose();
264
- editorAppRef.current = undefined;
265
- onDisposeEditor?.();
266
- }
267
- else {
268
- debugLogging('DISPOSE: EditorApp is not disposed', true);
269
- }
270
- debugLogging('DISPOSE DONE', true);
271
- }
272
- catch (error) {
273
- performErrorHandling(error);
274
- }
275
- };
276
- addQueue('dispose', disposeFunc);
337
+ addQueue({ id: 'disposeEditor', func: disposeEditor, currentContainer: containerRef.current });
277
338
  };
278
339
  }, []);
279
340
  useEffect(() => {
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAA2C,MAAM,iCAAiC,CAAC;AACrG,OAAO,EAA6B,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACnG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E,EAAE,CAAC,CAAC;IAEP,SAAS,CAAC,GAAG,EAAE,CAAC;QACZ,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;IAAA,CACJ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACH,6BACI,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,GACtB,CACL,CAAC;AAAA,CACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typefox/monaco-editor-react",
3
- "version": "7.3.0-next.5",
3
+ "version": "7.3.0",
4
4
  "license": "MIT",
5
5
  "description": "React component for Monaco-Editor and Monaco Languageclient",
6
6
  "keywords": [
@@ -46,7 +46,7 @@
46
46
  "npm": "10.9.3"
47
47
  },
48
48
  "dependencies": {
49
- "@codingame/monaco-vscode-editor-api": "^22.1.9",
49
+ "@codingame/monaco-vscode-editor-api": "^23.0.0",
50
50
  "react": ">=18.0.0 || <20.0.0"
51
51
  },
52
52
  "repository": {
package/src/index.tsx CHANGED
@@ -35,22 +35,26 @@ const lcsManager = new LanguageClientManager();
35
35
  const haveEditorService = () => {
36
36
  return getEnhancedMonacoEnvironment().viewServiceType === 'EditorService';
37
37
  };
38
- const logger = new ConsoleLogger(LogLevel.Debug);
38
+ const logger = new ConsoleLogger(LogLevel.Off);
39
39
 
40
- const runQueue: Array<{id: string, func: () => Promise<void>}> = [];
40
+ type QueueEntry = {
41
+ id: string;
42
+ func: (htmlContainer: HTMLElement | null) => Promise<void>;
43
+ currentContainer: HTMLElement | null;
44
+ };
45
+ const runQueue: QueueEntry[] = [];
41
46
  let runQueueLock = true;
42
47
  let intervalId: number | unknown | undefined = undefined;
48
+ const queueIntervalMs = 10;
43
49
 
44
- const addQueue = (id: string, func: () => Promise<void>) => {
50
+ const addQueue = (queueEntry: QueueEntry) => {
45
51
  debugLogging('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>');
46
- debugLogging(`Adding to queue: ${id}: QUEUE SIZE before: ${runQueue.length}`);
47
- runQueue.push({id, func});
52
+ debugLogging(`Adding to queue: ${queueEntry.id}: QUEUE SIZE before: ${runQueue.length}`);
53
+ runQueue.push(queueEntry);
48
54
  kickQueue();
49
55
  };
50
56
 
51
57
  const executeQueue = async () => {
52
- console.log(`Queue size: ${runQueue.length}`);
53
-
54
58
  if (runQueue.length > 0) {
55
59
  runQueueLock = true;
56
60
  while (runQueue.length > 0) {
@@ -58,7 +62,7 @@ const executeQueue = async () => {
58
62
  const queueObj = runQueue.shift();
59
63
  debugLogging('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<');
60
64
  debugLogging(`QUEUE ${queueObj?.id} start: SIZE before: ${lengthBefore}`, true);
61
- await queueObj?.func();
65
+ await queueObj?.func(queueObj.currentContainer);
62
66
  debugLogging(`QUEUE ${queueObj?.id} end: SIZE after: ${runQueue.length}`);
63
67
  }
64
68
  runQueueLock = false;
@@ -73,7 +77,7 @@ const kickQueue = () => {
73
77
  await executeQueue();
74
78
  stopQueue();
75
79
  }
76
- }, 50);
80
+ }, queueIntervalMs);
77
81
  }
78
82
  };
79
83
 
@@ -113,6 +117,10 @@ export const MonacoEditorReactComp: React.FC<MonacoEditorProps> = (props) => {
113
117
 
114
118
  const editorAppRef = useRef<EditorApp>(undefined);
115
119
  const containerRef = useRef<HTMLDivElement>(null);
120
+ const modifiedCodeUriRef = useRef<string>(undefined);
121
+ const modifiedCodeRef = useRef<string>(undefined);
122
+ const originalCodeUriRef = useRef<string>(undefined);
123
+ const originalCodeRef = useRef<string>(undefined);
116
124
  const onTextChangedRef = useRef(onTextChanged);
117
125
  const launchingRef = useRef<boolean>(false);
118
126
  const editorAppConfigRef = useRef<EditorAppConfig>(undefined);
@@ -134,7 +142,6 @@ export const MonacoEditorReactComp: React.FC<MonacoEditorProps> = (props) => {
134
142
  }
135
143
  const envEnhanced = getEnhancedMonacoEnvironment();
136
144
 
137
- // let apiConfig: MonacoVscodeApiConfig;
138
145
  if (vscodeApiConfig === undefined && envEnhanced.vscodeApiInitialised !== true) {
139
146
  throw new Error('vscodeApiConfig is not provided, but the monaco-vscode-api is not initialized! Aborting...');
140
147
  }
@@ -149,12 +156,6 @@ export const MonacoEditorReactComp: React.FC<MonacoEditorProps> = (props) => {
149
156
 
150
157
  if (apiWrapper === undefined) throw new Error('Unexpected error occurred: apiWrapper is not available! Aborting...');
151
158
 
152
- if (apiWrapper.getMonacoVscodeApiConfig().viewsConfig.$type === 'EditorService') {
153
- apiWrapper.overrideViewsConfig({
154
- $type: 'EditorService',
155
- htmlContainer: containerRef.current!
156
- });
157
- }
158
159
  await apiWrapper.start();
159
160
  onVscodeApiInitDone?.(apiWrapper);
160
161
 
@@ -173,34 +174,47 @@ export const MonacoEditorReactComp: React.FC<MonacoEditorProps> = (props) => {
173
174
  }
174
175
  };
175
176
 
176
- const editorInitFunc = async () => {
177
+ const editorInit = async (htmlContainer: HTMLElement | null) => {
177
178
  try {
178
179
  debugLogging('INIT EDITOR', true);
179
180
  // it is possible to run without an editorApp, when the ViewsService or WorkbenchService
180
181
  if (haveEditorService()) {
181
- if (editorAppRef.current === undefined && !launchingRef.current) {
182
- launchingRef.current = true;
183
- debugLogging('INIT: Creating editor', true);
184
-
185
- editorAppRef.current = new EditorApp(editorAppConfigRef.current);
186
- if (editorAppRef.current.isStarting() === true || editorAppRef.current.isDisposing() === true) {
187
- await Promise.all([
188
- editorAppRef.current.getStartingAwait(),
189
- editorAppRef.current.getDisposingAwait()
190
- ]);
191
- }
192
-
193
- editorAppRef.current.registerOnTextChangedCallback((textChanges) => {
194
- if (onTextChangedRef.current !== undefined) {
195
- onTextChangedRef.current(textChanges);
182
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
183
+ if (htmlContainer === null || (htmlContainer !== null && htmlContainer.parentElement === null)) {
184
+ debugLogging('INIT EDITOR: Unable to create editor. HTML container or the parent is missing.', true);
185
+ } else {
186
+ if (editorAppRef.current === undefined && !launchingRef.current) {
187
+ launchingRef.current = true;
188
+ debugLogging('INIT EDITOR: Creating editor', true);
189
+
190
+ editorAppRef.current = new EditorApp(editorAppConfigRef.current);
191
+ if (editorAppRef.current.isStarting() === true || editorAppRef.current.isDisposing() === true) {
192
+ await Promise.all([
193
+ editorAppRef.current.getStartingAwait(),
194
+ editorAppRef.current.getDisposingAwait()
195
+ ]);
196
196
  }
197
- });
198
- await editorAppRef.current.start(containerRef.current!);
197
+ updateModelRelatedRefs();
198
+
199
+ editorAppRef.current.registerOnTextChangedCallback((textChanges) => {
200
+ if (textChanges.modified !== undefined) {
201
+ modifiedCodeRef.current = textChanges.modified;
202
+ }
203
+ if (textChanges.original !== undefined) {
204
+ originalCodeRef.current = textChanges.original;
205
+ }
206
+ if (onTextChangedRef.current !== undefined) {
207
+ onTextChangedRef.current(textChanges);
208
+ }
209
+ });
210
+ // await retrieveContainerRef('INIT EDITOR');
211
+ await editorAppRef.current.start(htmlContainer);
199
212
 
200
- onEditorStartDone?.(editorAppRef.current);
201
- launchingRef.current = false;
202
- } else {
203
- debugLogging('INIT EDITOR: Editor already created', true);
213
+ onEditorStartDone?.(editorAppRef.current);
214
+ launchingRef.current = false;
215
+ } else {
216
+ debugLogging('INIT EDITOR: Editor already created', true);
217
+ }
204
218
  }
205
219
  } else {
206
220
  debugLogging('INIT EDITOR: Do nothing: Using ViewsService', true);
@@ -211,33 +225,90 @@ export const MonacoEditorReactComp: React.FC<MonacoEditorProps> = (props) => {
211
225
  }
212
226
  };
213
227
 
214
- const configProcessedFunc = () => {
228
+ const updateEditorModel = async () => {
229
+ try {
230
+ debugLogging('UPDATE EDITOR MODEL', true);
231
+ if (!launchingRef.current && editorAppRef.current) {
232
+ editorAppRef.current.updateCodeResources(editorAppConfigRef.current?.codeResources);
233
+ updateModelRelatedRefs();
234
+ onConfigProcessed?.(editorAppRef.current);
235
+ } else {
236
+ debugLogging('UPDATE EDITOR MODEL: Not Possible: No editor', true);
237
+ }
238
+ debugLogging('UPDATE EDITOR MODEL: Done', true);
239
+ } catch (error) {
240
+ performErrorHandling(error as Error);
241
+ }
242
+ };
243
+
244
+ const updateModelRelatedRefs = () => {
245
+ modifiedCodeRef.current = editorAppConfigRef.current?.codeResources?.modified?.text;
246
+ originalCodeRef.current = editorAppConfigRef.current?.codeResources?.original?.text;
247
+ modifiedCodeUriRef.current = editorAppConfigRef.current?.codeResources?.modified?.uri;
248
+ originalCodeUriRef.current = editorAppConfigRef.current?.codeResources?.original?.uri;
249
+ };
250
+
251
+ const disposeEditor = async () => {
252
+ try {
253
+ // dispose editor if used
254
+ debugLogging('DISPOSE', true);
255
+
256
+ if (editorAppRef.current !== undefined) {
257
+ await editorAppRef.current.dispose();
258
+ editorAppRef.current = undefined;
259
+ onDisposeEditor?.();
260
+ } else {
261
+ debugLogging('DISPOSE: EditorApp is not disposed', true);
262
+ }
263
+ debugLogging('DISPOSE DONE', true);
264
+ } catch (error) {
265
+ performErrorHandling(error as Error);
266
+ }
267
+ };
268
+
269
+ const processConfig = () => {
270
+ let updateModel = false;
215
271
  try {
216
272
  debugLogging('CONFIG PROCESSED', true);
217
- if (!launchingRef.current) {
218
- if (editorAppConfigRef.current?.codeResources !== undefined && editorAppRef.current) {
219
- editorAppRef.current.updateCodeResources(editorAppConfigRef.current.codeResources);
220
- editorAppRef.current.updateCode({
221
- modified: editorAppConfigRef.current.codeResources.modified?.text,
222
- original: editorAppConfigRef.current.codeResources.original?.text
223
- });
273
+ if (!launchingRef.current && editorAppRef.current) {
274
+ if (editorAppConfigRef.current?.codeResources !== undefined) {
275
+ const newModifiedCodeUri = editorAppConfigRef.current.codeResources.modified?.uri;
276
+ const newOriginalCodeUri = editorAppConfigRef.current.codeResources.original?.uri;
277
+
278
+ const modifiedUri = modifiedCodeUriRef.current !== newModifiedCodeUri ? newModifiedCodeUri : undefined;
279
+ const originalUri = originalCodeUriRef.current !== newOriginalCodeUri ? newOriginalCodeUri : undefined;
280
+ // re-create the editor if the URIs have changed
281
+ if (modifiedUri !== undefined || originalUri !== undefined) {
282
+ updateModel = true;
283
+ } else {
284
+ const newModifiedCode = editorAppConfigRef.current.codeResources.modified?.text;
285
+ const newOriginalCode = editorAppConfigRef.current.codeResources.original?.text;
286
+ const modified = modifiedCodeRef.current !== newModifiedCode ? newModifiedCode : undefined;
287
+ const original = originalCodeRef.current !== newOriginalCode ? newOriginalCode : undefined;
288
+ if (modified !== undefined || original !== undefined) {
289
+ editorAppRef.current.updateCode({ modified, original });
290
+ }
291
+ }
224
292
  }
225
- if (editorAppConfigRef.current?.editorOptions !== undefined && editorAppRef.current) {
293
+ if (editorAppConfigRef.current?.editorOptions !== undefined) {
226
294
  if (!editorAppRef.current.isDiffEditor()) {
227
295
  editorAppRef.current.getEditor()?.updateOptions(editorAppConfigRef.current.editorOptions);
228
296
  }
229
297
  }
230
- if (editorAppConfigRef.current?.diffEditorOptions !== undefined && editorAppRef.current) {
298
+ if (editorAppConfigRef.current?.diffEditorOptions !== undefined) {
231
299
  if (editorAppRef.current.isDiffEditor()) {
232
300
  editorAppRef.current.getDiffEditor()?.updateOptions(editorAppConfigRef.current.diffEditorOptions);
233
301
  }
234
302
  }
235
303
  }
236
- onConfigProcessed?.(editorAppRef.current);
304
+ if (!updateModel) {
305
+ onConfigProcessed?.(editorAppRef.current);
306
+ }
237
307
  debugLogging('CONFIG PROCESSED: Done', true);
238
308
  } catch (error) {
239
309
  performErrorHandling(error as Error);
240
310
  }
311
+ return updateModel;
241
312
  };
242
313
 
243
314
  useEffect(() => {
@@ -248,12 +319,20 @@ export const MonacoEditorReactComp: React.FC<MonacoEditorProps> = (props) => {
248
319
  performGlobalInit();
249
320
 
250
321
  editorAppConfigRef.current = editorAppConfig;
251
- addQueue('editorInit', editorInitFunc);
252
322
  // it is possible to run without an editorApp, when the ViewsService or WorkbenchService
253
323
  if (haveEditorService()) {
254
- if (editorAppRef.current !== undefined && !launchingRef.current) {
255
- configProcessedFunc();
324
+ const updateModel = processConfig();
325
+ if (updateModel) {
326
+ addQueue({ id: 'model update', func: updateEditorModel, currentContainer: containerRef.current});
327
+ } else {
328
+ if (editorAppRef.current === undefined) {
329
+ addQueue({ id: 'editorInit', func: editorInit, currentContainer: containerRef.current});
330
+ } else {
331
+ debugLogging('CHECK EDITOR: Editor already created', true);
332
+ }
256
333
  }
334
+ } else {
335
+ debugLogging('INIT EDITOR: Do nothing: Using ViewsService', true);
257
336
  }
258
337
  }, [editorAppConfig]);
259
338
 
@@ -279,27 +358,27 @@ export const MonacoEditorReactComp: React.FC<MonacoEditorProps> = (props) => {
279
358
  performErrorHandling(new Error(`Unexpected error occurred during disposal of the language client: ${error}`));
280
359
  }
281
360
  };
282
- addQueue('dispose lc', disposeLCFunc);
361
+ addQueue({ id:'dispose lc', func: disposeLCFunc, currentContainer: containerRef.current });
283
362
  } else {
284
363
  const lcInitFunc = async () => {
285
364
  try {
286
365
  debugLogging('INIT LC', true);
287
366
 
288
- lcsManager.setLogLevel(languageClientConfig.logLevel);
289
- await lcsManager.setConfig(languageClientConfig);
290
- if (!lcsManager.isStarted()) {
291
- await lcsManager.start();
292
- onLanguageClientsStartDone?.(lcsManager);
293
- debugLogging('INIT LC: Language client started', true);
294
- } else {
295
- debugLogging('INIT LC: Language client is not (re-)started', true);
296
- }
367
+ await lcsManager.start();
368
+ onLanguageClientsStartDone?.(lcsManager);
369
+ debugLogging('INIT LC: Language client started', true);
297
370
  debugLogging('INIT LC DONE', true);
298
371
  } catch (error) {
299
372
  performErrorHandling(error as Error);
300
373
  }
301
374
  };
302
- addQueue('lcInit', lcInitFunc);
375
+ lcsManager.setLogLevel(languageClientConfig.logLevel);
376
+ lcsManager.setConfig(languageClientConfig);
377
+ if (!lcsManager.isStarted()) {
378
+ addQueue({ id:'lcInit', func: lcInitFunc, currentContainer: containerRef.current });
379
+ } else {
380
+ debugLogging('INIT LC: Language client is already running. No need to schedule async start.', true);
381
+ }
303
382
  }
304
383
  }, [languageClientConfig]);
305
384
 
@@ -311,24 +390,7 @@ export const MonacoEditorReactComp: React.FC<MonacoEditorProps> = (props) => {
311
390
 
312
391
  // this part runs on unmount (componentWillUnmount)
313
392
  return () => {
314
- const disposeFunc = async () => {
315
- try {
316
- // dispose editor if used
317
- debugLogging('DISPOSE', true);
318
-
319
- if (editorAppRef.current !== undefined) {
320
- await editorAppRef.current.dispose();
321
- editorAppRef.current = undefined;
322
- onDisposeEditor?.();
323
- } else {
324
- debugLogging('DISPOSE: EditorApp is not disposed', true);
325
- }
326
- debugLogging('DISPOSE DONE', true);
327
- } catch (error) {
328
- performErrorHandling(error as Error);
329
- }
330
- };
331
- addQueue('dispose', disposeFunc);
393
+ addQueue({ id:'disposeEditor', func: disposeEditor, currentContainer: containerRef.current });
332
394
  };
333
395
  }, []);
334
396