Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-monaco",
"version": "0.3.1",
"version": "0.4.0",
"description": "MonacoEditor component for Vue.js",
"repository": {
"url": "egoist/vue-monaco",
Expand All @@ -22,17 +22,19 @@
"author": "egoist <[email protected]>",
"license": "MIT",
"dependencies": {
"monaco-editor": "^0.20.0",
"monaco-editor": "^0.30.0",
"nano-assign": "^1.0.0"
},
"devDependencies": {
"@vue/composition-api": "^1.4.0",
"bili": "^4.8.0",
"eslint-config-rem": "^4.0.0",
"eslint-plugin-prettier": "^3.1.0",
"monaco-editor-webpack-plugin": "^1.9.0",
"monaco-editor-webpack-plugin": "6",
"poi": "^12.2.14",
"prettier": "^1.18.2",
"vue": "^2.5.21",
"vue-demi": "^0.12.1",
"vue-template-compiler": "^2.5.21",
"xo": "^0.24.0"
},
Expand Down
15 changes: 12 additions & 3 deletions src/MonacoEditor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import assign from 'nano-assign'
import { defineComponent } from 'vue-demi'

export default {
export default defineComponent({
name: 'MonacoEditor',

props: {
Expand Down Expand Up @@ -95,6 +96,7 @@ export default {
},

methods: {
/** @param {import('monaco-editor')} monaco */
initMonaco(monaco) {
this.$emit('editorWillMount', this.monaco)

Expand Down Expand Up @@ -137,11 +139,18 @@ export default {
this.$emit('editorDidMount', this.editor)
},

/** @deprecated */
/**
* @deprecated use getEditor instead
* @see getEditor
* @returns {import('monaco-editor').editor.ICodeEditor}
*/
getMonaco() {
return this.editor
},

/**
* @returns {import('monaco-editor').editor.ICodeEditor}
*/
getEditor() {
return this.editor
},
Expand All @@ -162,4 +171,4 @@ export default {
render(h) {
return h('div')
}
}
})
61 changes: 52 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,13 @@
source-map "^0.7.3"
vue-template-es2015-compiler "^1.6.0"

"@vue/composition-api@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@vue/composition-api/-/composition-api-1.4.0.tgz#784450d0da1ecfd82f4094053ca593849cbd2e37"
integrity sha512-fanqJw1cqhkfS1dcpFY52CeR0aWDBr7ub/0ObPWqMnNPdRsMi1gX04Q3aLeRtJEuVeCFewNbqvkPskkSPTVaXQ==
dependencies:
tslib "^2.3.1"

"@webassemblyjs/[email protected]":
version "1.7.11"
resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.11.tgz#b988582cafbb2b095e8b556526f30c90d057cace"
Expand Down Expand Up @@ -3046,6 +3053,11 @@ emojis-list@^2.0.0:
version "2.1.0"
resolved "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"

emojis-list@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78"
integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==

encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
Expand Down Expand Up @@ -5021,6 +5033,13 @@ json5@^2.1.0:
dependencies:
minimist "^1.2.0"

json5@^2.1.2:
version "2.2.0"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
dependencies:
minimist "^1.2.5"

jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
Expand Down Expand Up @@ -5143,6 +5162,15 @@ loader-utils@^1.2.3:
emojis-list "^2.0.0"
json5 "^1.0.1"

loader-utils@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129"
integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==
dependencies:
big.js "^5.2.2"
emojis-list "^3.0.0"
json5 "^2.1.2"

locate-path@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
Expand Down Expand Up @@ -5535,6 +5563,11 @@ minimist@^1.1.3, minimist@^1.2.0:
version "1.2.0"
resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"

minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==

minipass-collect@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617"
Expand Down Expand Up @@ -5628,17 +5661,17 @@ [email protected], mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
dependencies:
minimist "0.0.8"

monaco-editor-webpack-plugin@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-1.9.0.tgz#5b547281b9f404057dc5d8c5722390df9ac90be6"
integrity sha512-tOiiToc94E1sb50BgZ8q8WK/bxus77SRrwCqIpAB5er3cpX78SULbEBY4YPOB8kDolOzKRt30WIHG/D6gz69Ww==
monaco-editor-webpack-plugin@6:
version "6.0.0"
resolved "https://registry.yarnpkg.com/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-6.0.0.tgz#628956ce1851afa2a5f6c88d0ecbb24e9a444898"
integrity sha512-vC886Mzpd2AkSM35XLkfQMjH+Ohz6RISVwhAejDUzZDheJAiz6G34lky1vyO8fZ702v7IrcKmsGwL1rRFnwvUA==
dependencies:
loader-utils "^1.2.3"
loader-utils "^2.0.0"

monaco-editor@^0.20.0:
version "0.20.0"
resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.20.0.tgz#5d5009343a550124426cb4d965a4d27a348b4dea"
integrity sha512-hkvf4EtPJRMQlPC3UbMoRs0vTAFAYdzFQ+gpMb8A+9znae1c43q8Mab9iVsgTcg/4PNiLGGn3SlDIa8uvK1FIQ==
monaco-editor@^0.30.0:
version "0.30.1"
resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.30.1.tgz#47f8d18a0aa2264fc5654581741ab8d7bec01689"
integrity sha512-B/y4+b2O5G2gjuxIFtCE2EkM17R2NM7/3F8x0qcPsqy4V83bitJTIO4TIeZpYlzu/xy6INiY/+84BEm6+7Cmzg==

move-concurrently@^1.0.1:
version "1.0.1"
Expand Down Expand Up @@ -8665,6 +8698,11 @@ tslib@^1.9.0:
version "1.9.3"
resolved "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"

tslib@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==

[email protected]:
version "0.0.0"
resolved "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
Expand Down Expand Up @@ -8990,6 +9028,11 @@ [email protected]:
dependencies:
indexof "0.0.1"

vue-demi@^0.12.1:
version "0.12.1"
resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.12.1.tgz#f7e18efbecffd11ab069d1472d7a06e319b4174c"
integrity sha512-QL3ny+wX8c6Xm1/EZylbgzdoDolye+VpCXRhI2hug9dJTP3OUJ3lmiKN3CsVV3mOJKwFi0nsstbgob0vG7aoIw==

vue-hot-reload-api@^2.3.0:
version "2.3.0"
resolved "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.0.tgz#97976142405d13d8efae154749e88c4e358cf926"
Expand Down