@php-script/editor-vue 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +32 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @php-script/editor-vue
2
+
3
+ [![npm](https://img.shields.io/npm/v/@php-script/editor-vue?label=npm)](https://www.npmjs.com/package/@php-script/editor-vue)
4
+ [![Downloads](https://img.shields.io/npm/dm/@php-script/editor-vue?label=downloads)](https://www.npmjs.com/package/@php-script/editor-vue)
5
+
6
+ Documentation: https://php-script.github.io/php-script-editor/packages/vue.html
7
+
8
+ Vue 3 wrapper for the `<php-script-editor>` web component, with `v-model`. Loads the element on the client only, so it is safe with Nuxt SSR.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm i @php-script/editor-vue monaco-editor
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```vue
19
+ <script setup lang="ts">
20
+ import { ref } from 'vue';
21
+ import { PhpScriptEditor } from '@php-script/editor-vue';
22
+
23
+ const code = ref('echo "Hello";');
24
+ </script>
25
+
26
+ <template>
27
+ <PhpScriptEditor v-model="code" config-url="/php-script/config" />
28
+ </template>
29
+ ```
30
+
31
+ See the [documentation](https://php-script.github.io/php-script-editor/packages/vue.html) for all props, events and methods, and
32
+ [Server and language config](https://php-script.github.io/php-script-editor/server.html) for the endpoints.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-script/editor-vue",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Vue 3 wrapper for the <php-script-editor> web component (v-model support).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,7 +17,7 @@
17
17
  "dist"
18
18
  ],
19
19
  "dependencies": {
20
- "@php-script/editor": "^0.1.0"
20
+ "@php-script/editor": "^0.1.1"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "monaco-editor": ">=0.55.0 <1.0.0",