Skip to content

Commit 579e5e9

Browse files
committed
feat: monaco bind!
1 parent f65db44 commit 579e5e9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"monaco",
66
"svelte"
77
],
8-
"version": "1.0.3",
8+
"version": "1.0.4",
99
"scripts": {
1010
"dev": "vite dev",
1111
"build": "vite build",

src/lib/Monaco.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import { createEventDispatcher } from 'svelte';
2020
import loader from '@monaco-editor/loader';
2121
22-
let monaco: typeof MonacoE | undefined = $state();
23-
2422
const dispatch = createEventDispatcher<{
2523
ready: MonacoE.editor.IStandaloneCodeEditor;
2624
}>();
@@ -32,6 +30,7 @@
3230
value: string;
3331
theme?: string | undefined;
3432
options?: MonacoE.editor.IStandaloneEditorConstructionOptions;
33+
monaco?: typeof MonacoE;
3534
}
3635
3736
let {
@@ -41,7 +40,8 @@
4140
options = {
4241
value,
4342
automaticLayout: true
44-
}
43+
},
44+
monaco = $bindable()
4545
}: Props = $props();
4646
4747
function refreshTheme() {

0 commit comments

Comments
 (0)