nuxt-monaco-editor 1.0.3 → 1.0.4

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,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.4](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.0.3...v1.0.4) (2022-10-23)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * $editor was always undefined ([ef3a420](https://github.com/e-chan1007/nuxt-monaco-editor/commit/ef3a420d805498e2b47f8b727b5d3b4ca1cb5eaf))
11
+
5
12
  ### [1.0.3](https://github.com/e-chan1007/nuxt-monaco-editor/compare/v1.0.2...v1.0.3) (2022-10-21)
6
13
 
7
14
 
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0-rc.9"
6
6
  },
7
- "version": "1.0.3"
7
+ "version": "1.0.4"
8
8
  }
@@ -43,6 +43,7 @@ let ignoreWatch = false
43
43
  let editor: Monaco.editor.IStandaloneDiffEditor
44
44
  let originalModel: Monaco.editor.ITextModel
45
45
  let modifiedModel: Monaco.editor.ITextModel
46
+ const editorRef = ref(editor)
46
47
 
47
48
  watch(() => [props.original, props.modelValue], () => {
48
49
  if (ignoreWatch) {
@@ -73,11 +74,12 @@ defineExpose({
73
74
  * Monaco editor instance
74
75
  */
75
76
  // @ts-ignore
76
- $editor: editor
77
+ $editor: editorRef
77
78
  })
78
79
 
79
80
  onMounted(() => {
80
81
  editor = monaco.editor.createDiffEditor(editorElement.value!, props.options)
82
+ editorRef.value = editor
81
83
  originalModel = monaco.editor.createModel(props.original, props.lang)
82
84
  modifiedModel = monaco.editor.createModel(props.modelValue, props.lang)
83
85
  editor.setModel({
@@ -43,6 +43,7 @@ const monaco = useMonaco()!
43
43
  let ignoreWatch = false
44
44
  let editor: Monaco.editor.IStandaloneCodeEditor
45
45
  let model: Monaco.editor.ITextModel
46
+ const editorRef = ref(editor)
46
47
 
47
48
  watch(() => props.modelValue, () => {
48
49
  if (ignoreWatch) {
@@ -67,11 +68,12 @@ defineExpose({
67
68
  * Monaco editor instance
68
69
  */
69
70
  // @ts-ignore
70
- $editor: editor
71
+ $editor: editorRef
71
72
  })
72
73
 
73
74
  onMounted(() => {
74
75
  editor = monaco.editor.create(editorElement.value!, props.options)
76
+ editorRef.value = editor
75
77
  model = monaco.editor.createModel(props.modelValue, lang.value)
76
78
  editor.setModel(model)
77
79
 
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/e-chan1007/nuxt-monaco-editor.git"
13
13
  },
14
- "version": "1.0.3",
14
+ "version": "1.0.4",
15
15
  "type": "module",
16
16
  "license": "MIT",
17
17
  "exports": {
@@ -57,7 +57,7 @@
57
57
  "remark-lint": "^9.1.1",
58
58
  "remark-preset-lint-recommended": "^6.1.2",
59
59
  "standard-version": "^9.5.0",
60
- "vuepress": "next"
60
+ "vuepress": "2.0.0-beta.51"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "monaco-editor": "*"