{"_id":"@duxet/vue-monaco","_rev":"1-55da96bc62f181f2a31db04cf06fe79f","name":"@duxet/vue-monaco","dist-tags":{"latest":"0.3.0"},"versions":{"0.3.0":{"name":"@duxet/vue-monaco","version":"0.3.0","description":"MonacoEditor component for Vue.js","repository":{"url":"git+https://github.com/egoist/vue-monaco.git","type":"git"},"main":"dist/vue-monaco.es.js","unpkg":"dist/vue-monaco.js","cdn":"dist/vue-monaco.js","scripts":{"test":"npm run lint && echo 'no tests!'","lint":"xo","prepublish":"npm run build","build":"bili --js buble --format umd,es --module-name VueMonaco --globals.monaco-editor monaco","example":"poi","build:example":"poi build"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"license":"MIT","dependencies":{"monaco-editor":"^0.13.1","nano-assign":"^1.0.0"},"devDependencies":{"bili":"^3.1.2","eslint-config-rem":"^3.0.0","monaco-editor-webpack-plugin":"^1.4.0","poi":"^10.2.9","xo":"^0.18.0"},"xo":{"extends":"rem/prettier","ignores":["example/**"],"envs":["browser"],"rules":{"unicorn/filename-case":0}},"gitHead":"0144da9e92df75b22fea4526bc201ae3087805ca","bugs":{"url":"https://github.com/egoist/vue-monaco/issues"},"homepage":"https://github.com/egoist/vue-monaco#readme","_id":"@duxet/vue-monaco@0.3.0","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"duxet","email":"duxetlg@gmail.com"},"dist":{"integrity":"sha512-rDvpH3bnyqd/rPM8ERG1Qzh7+9d4iWOwIUDxSn7xuNS+9rjGQWogqnRwDuCzjR6d7yU7lOi+S2dcKGqDuXEF5A==","shasum":"4a607cd52ed0d1632f052303be68319af429d33f","tarball":"https://registry.npmjs.org/@duxet/vue-monaco/-/vue-monaco-0.3.0.tgz","fileCount":6,"unpackedSize":3422702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrMQsCRA9TVsSAnZWagAAwUoP/2iWaD4oMJKOXGFfKHzV\nETYChAx8QD9Osd71FuGqFbj8k9jayAGY0mbRvGdYxZ7qAqYAjBM3SW3N2oM3\n98YZjizXfJyuvYbFiMxpYw9dd7T1hOf1DI2MaG95THT+eCFm3zP+nNvJeJY3\nffkLMuT+nLeEBIQ5nZUxm9CFGhpxUUn76Y6JkrlPsk8FdnOzPGF1cTqCuRUi\nMg7iYvuBT1l1qDkDpGlR3wWoW8Avwog6rCuwy9YgcZzOILdiRI+5M+inBQwj\nrAqtLQXNxzmQPQm8y/YjFj/qkioN3EPQZN34o9xU0TpJ/q/dDqoSbbGjWDlG\nSWj3Y7FjT08Vvktu60omoFzdOABaAEYMicUWsjJk8S9ciWIGMbOWEUkaMkmO\nF0LuD02jSPKZlqsIRVicssVMVlCcKJp657101i1tjbMr4ZMawYYHJ2JpBZ6W\nzlXvv+4fIlkjI6lQxI19gEULRVKCWHMRnBXCdFSdpE1nc65B1Uv08pJi33xt\nZkFAIQQzyoIv3udKNkLgCddoJ+cRIy6im5P/PZY97+7j0O8RdiRVY5PTjjiX\nOb1DwGKjtuzyaUtEZWb6yfK0rV23fdoYai3+1qP+HaIruzw2Y23VF8K6nLei\no7svOzKu0+vjWOSB8AMtiEypVC0nu5ibnBCvUwH4E6rISH2X6qtfRyPuRLGy\nH/6c\r\n=Zxpr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGR+X9Iius/mNqcVcJ7yUXijhi8lN7w4cJ9bo3A0I15yAiEAjIy8e2/tgE9l9nrI/bLzcxEB/DPm0nbUFfu4s0oi5mA="}]},"maintainers":[{"name":"duxet","email":"duxetlg@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-monaco_0.3.0_1538049067830_0.794135504068026"},"_hasShrinkwrap":false}},"time":{"created":"2018-09-27T11:51:07.665Z","0.3.0":"2018-09-27T11:51:08.266Z","modified":"2022-04-05T06:09:41.432Z"},"maintainers":[{"name":"duxet","email":"duxetlg@gmail.com"}],"description":"MonacoEditor component for Vue.js","homepage":"https://github.com/egoist/vue-monaco#readme","repository":{"url":"git+https://github.com/egoist/vue-monaco.git","type":"git"},"author":{"name":"egoist","email":"0x142857@gmail.com"},"bugs":{"url":"https://github.com/egoist/vue-monaco/issues"},"license":"MIT","readme":"# vue-monaco\n\n[![NPM version](https://img.shields.io/npm/v/vue-monaco.svg?style=flat)](https://npmjs.com/package/vue-monaco) [![NPM downloads](https://img.shields.io/npm/dm/vue-monaco.svg?style=flat)](https://npmjs.com/package/vue-monaco) [![CircleCI](https://circleci.com/gh/egoist/vue-monaco/tree/master.svg?style=shield)](https://circleci.com/gh/egoist/vue-monaco/tree/master)  [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/egoist/donate)\n\n*[Monaco Editor](https://github.com/Microsoft/monaco-editor) is the code editor that powers VS Code.*\n\n## Install\n\n```bash\nyarn add vue-monaco\n```\n\n## Usage\n\nTo use with webpack:\n\n```js\n// webpack.config.js\nconst MonocoEditorPlugin = require('monaco-editor-webpack-plugin')\n\nmodule.exports = {\n  plugins: [\n    new MonocoEditorPlugin()\n  ]\n}\n```\n\nThen use the component:\n\n```vue\n<template>\n  <monaco-editor\n    class=\"editor\"\n    v-model=\"code\"\n    language=\"javascript\">\n  </monaco-editor>\n</template>\n\n<script>\nimport MonacoEditor from 'vue-monaco'\n\nexport default {\n  components: {\n    MonacoEditor\n  },\n\n  data() {\n    return {\n      code: 'const noop = () => {}'\n    }\n  }\n}\n</script>\n\n<style>\n.editor {\n  width: 600px;\n  height: 800px;\n}\n</style>\n```\n\n### Props\n\n- `code`\n- `language`\n- `theme`\n- `options`\n\n### Events\n\n| Event              | IStandaloneCodeEditor Event | Parameters                                  |\n|--------------------|-----------------------------|---------------------------------------------|\n| `editorMount`      |                             | IStandaloneCodeEditor                       |\n| `contextMenu`      | onContextMenu               | IEditorMouseEvent                           |\n| `blur`             | onDidBlurEditor             |                                             |\n| `blurText`         | onDidBlurEditorText         |                                             |\n| `configuration`    | onDidBlurEditorText         | IConfigurationChangedEvent                  |\n| `position`         | onDidChangeCursorPosition   | ICursorPositionChangedEvent                 |\n| `selection`        | onDidChangeCursorSelection  | ICursorSelectionChangedEvent                |\n| `model`            | onDidChangeModel            | IModelChangedEvent                          |\n| `change`           | onDidChangeModelContent     | value: string, e: IModelContentChangedEvent |\n| `modelDecorations` | onDidChangeModelDecorations | IModelDecorationsChangedEvent               |\n| `modelLanguage`    | onDidChangeModelLanguage    | IModelLanguageChangedEvent                  |\n| `modelOptions`     | onDidChangeModelOptions     | IModelOptionsChangedEvent                   |\n| `afterDispose`     | onDidDispose                |                                             |\n| `focus`            | onDidFocusEditor            |                                             |\n| `focusText`        | onDidFocusEditorText        |                                             |\n| `layout`           | onDidLayoutChange           | EditorLayoutInfo                            |\n| `scroll`           | onDidScrollChange           | IScrollEvent                                |\n| `keydown`          | onKeyDown                   | IKeyboardEvent                              |\n| `keyup`            | onKeyUp                     | IKeyboardEvent                              |\n| `mouseDown`        | onMouseDown                 | IEditorMouseEvent                           |\n| `mouseLeave`       | onMouseLeave                | IEditorMouseEvent                           |\n| `mouseMove`        | onMouseMove                 | IEditorMouseEvent                           |\n| `mouseUp`          | onMouseUp                   | IEditorMouseEvent                           |\n\n\n### Methods\n\n- `getMonaco(): IStandaloneCodeEditor`: Return the [editor instance](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.istandalonecodeeditor.html).\n\nUse `ref` to interact with the `MonacoEditor` component in order to access methods: `<MonacoEditor ref=\"editor\"></MonacoEditor>`, then `this.$refs.editor.getMonaco()` will be available.\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n\n## Author\n\n**vue-monaco** © [egoist](https://github.com/egoist), Released under the [MIT](./LICENSE) License.<br>\nAuthored and maintained by egoist with help from contributors ([list](https://github.com/egoist/vue-monaco/contributors)).\n\n> [egoist.moe](https://egoist.moe) · GitHub [@egoist](https://github.com/egoist) · Twitter [@_egoistlily](https://twitter.com/_egoistlily)\n","readmeFilename":"README.md"}