@fc-components/monaco-editor 0.1.18 → 0.1.19
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/dist/monaco-editor.cjs.development.js +2 -0
- package/dist/monaco-editor.cjs.development.js.map +1 -1
- package/dist/monaco-editor.cjs.production.min.js +1 -1
- package/dist/monaco-editor.cjs.production.min.js.map +1 -1
- package/dist/monaco-editor.esm.js +2 -0
- package/dist/monaco-editor.esm.js.map +1 -1
- package/dist/sql/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/sql/index.tsx +3 -0
package/dist/sql/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ interface SqlEditorProps {
|
|
|
11
11
|
onChange?: (value: string) => void;
|
|
12
12
|
onEnter?: (value: string) => void;
|
|
13
13
|
onBlur?: (value: string) => void;
|
|
14
|
+
onFocus?: (value: string) => void;
|
|
14
15
|
editorDidMount?: (editor: monacoTypes.editor.IStandaloneCodeEditor) => void;
|
|
15
16
|
}
|
|
16
17
|
export default function SqlEditor(props: SqlEditorProps): React.JSX.Element;
|
package/package.json
CHANGED
package/src/sql/index.tsx
CHANGED
|
@@ -20,6 +20,7 @@ interface SqlEditorProps {
|
|
|
20
20
|
onChange?: (value: string) => void;
|
|
21
21
|
onEnter?: (value: string) => void;
|
|
22
22
|
onBlur?: (value: string) => void;
|
|
23
|
+
onFocus?: (value: string) => void;
|
|
23
24
|
editorDidMount?: (editor: monacoTypes.editor.IStandaloneCodeEditor) => void;
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -80,6 +81,7 @@ export default function SqlEditor(props: SqlEditorProps) {
|
|
|
80
81
|
onChange,
|
|
81
82
|
onEnter,
|
|
82
83
|
onBlur,
|
|
84
|
+
onFocus,
|
|
83
85
|
editorDidMount,
|
|
84
86
|
} = props;
|
|
85
87
|
|
|
@@ -147,6 +149,7 @@ export default function SqlEditor(props: SqlEditorProps) {
|
|
|
147
149
|
|
|
148
150
|
editor.onDidFocusEditorText(() => {
|
|
149
151
|
isEditorFocused.set(true);
|
|
152
|
+
onFocus?.(editor.getValue());
|
|
150
153
|
});
|
|
151
154
|
|
|
152
155
|
// set the height of the editor container
|