@octanejs/monaco-editor 0.0.31 → 0.0.33
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/package.json +4 -4
- package/src/Editor/Editor.tsrx +12 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/monaco-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"monaco-editor": ">=0.25.0 <1",
|
|
41
|
-
"octane": "^0.
|
|
41
|
+
"octane": "^0.13.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@monaco-editor/react": "4.7.0",
|
|
45
|
-
"@octanejs/testing-library": "0.1.
|
|
45
|
+
"@octanejs/testing-library": "0.1.63",
|
|
46
46
|
"@testing-library/jest-dom": "^6.9.1",
|
|
47
47
|
"@testing-library/react": "16.3.2",
|
|
48
48
|
"@tsrx/react": "^0.4.5",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@vitejs/plugin-react": "^6.0.3",
|
|
52
52
|
"esbuild": "^0.28.1",
|
|
53
53
|
"monaco-editor": "0.55.1",
|
|
54
|
-
"octane": "0.
|
|
54
|
+
"octane": "0.13.0",
|
|
55
55
|
"playwright": "^1.61.1",
|
|
56
56
|
"react": "19.2.7",
|
|
57
57
|
"react-dom": "19.2.7",
|
package/src/Editor/Editor.tsrx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import loader from '@monaco-editor/loader';
|
|
2
2
|
import type { IDisposable, editor } from 'monaco-editor';
|
|
3
|
-
import { memo, useEffect, useRef, useState } from 'octane';
|
|
3
|
+
import { memo, useEffect, useLayoutEffect, useRef, useState } from 'octane';
|
|
4
4
|
|
|
5
5
|
import MonacoContainer from '../MonacoContainer';
|
|
6
6
|
import { isLoaderCancelation } from '../loader';
|
|
@@ -58,14 +58,17 @@ function EditorComponent(props: EditorProps) @{
|
|
|
58
58
|
saveViewState,
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
// Pending renders must not replace the visible editor's callbacks or disposal policy.
|
|
62
|
+
useLayoutEffect(() => {
|
|
63
|
+
latestRef.current = {
|
|
64
|
+
beforeMount,
|
|
65
|
+
keepCurrentModel,
|
|
66
|
+
onChange,
|
|
67
|
+
onMount,
|
|
68
|
+
onValidate,
|
|
69
|
+
saveViewState,
|
|
70
|
+
};
|
|
71
|
+
}, [beforeMount, keepCurrentModel, onChange, onMount, onValidate, saveViewState]);
|
|
69
72
|
|
|
70
73
|
useEffect(() => {
|
|
71
74
|
let active = true;
|