codemirror-editor-vue3
Advanced tools
Comparing version
{ | ||
"name": "codemirror-editor-vue3", | ||
"description": "CodeMirror component for Vue3", | ||
"version": "2.2.2", | ||
"version": "2.3.0-beta1", | ||
"license": "MIT", | ||
"files": [ | ||
"dist/codemirror-editor-vue3.es.js", | ||
"dist/codemirror-editor-vue3.umd.js", | ||
"dist/packages/*", | ||
"dist/style.css" | ||
], | ||
"files": ["dist"], | ||
"type": "module", | ||
"types": "./dist/packages/index.d.ts", | ||
"main": "./dist/codemirror-editor-vue3.umd.js", | ||
"module": "./dist/codemirror-editor-vue3.es.js", | ||
"style": "./dist/style.css", | ||
"main": "./dist/codemirror-editor-vue3.umd.cjs", | ||
"module": "./dist/codemirror-editor-vue3.js", | ||
"exports": { | ||
".": { | ||
"import": "./dist/codemirror-editor-vue3.es.js", | ||
"require": "./dist/codemirror-editor-vue3.umd.js" | ||
}, | ||
"./dist/style.css": { | ||
"import": "./dist/style.css", | ||
"require": "./dist/style.css" | ||
"import": "./dist/codemirror-editor-vue3.js", | ||
"require": "./dist/codemirror-editor-vue3.umd.cjs" | ||
} | ||
@@ -69,2 +60,7 @@ }, | ||
}, | ||
"peerDependencies": { | ||
"vue": "3.x", | ||
"codemirror": "5.x", | ||
"diff-match-patch": "^1.0.5" | ||
}, | ||
"devDependencies": { | ||
@@ -82,4 +78,7 @@ "@commitlint/cli": "^16.1.0", | ||
"@vueuse/core": "^9.13.0", | ||
"chalk": "^4.1.2", | ||
"conventional-changelog-cli": "^2.0.31", | ||
"dedent": "^0.7.0", | ||
"diff-match-patch": "^1.0.5", | ||
"enquirer": "^2.3.6", | ||
"eslint": "^8.35.0", | ||
@@ -91,6 +90,10 @@ "eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-vue": "^9.9.0", | ||
"execa": "^4.0.2", | ||
"less": "^4.1.3", | ||
"lint-staged": "^10.2.10", | ||
"minimist": "^1.2.6", | ||
"prettier": "^2.8.4", | ||
"rollup-plugin-cpy": "^2.0.1", | ||
"rollup-plugin-vue": "^6.0.0", | ||
"semver": "^7.3.5", | ||
"typescript": "^4.9.5", | ||
@@ -108,11 +111,4 @@ "unplugin-auto-import": "^0.15.0", | ||
"windicss": "^3.5.6", | ||
"chalk": "^4.1.2", | ||
"conventional-changelog-cli": "^2.0.31", | ||
"enquirer": "^2.3.6", | ||
"execa": "^4.0.2", | ||
"lint-staged": "^10.2.10", | ||
"minimist": "^1.2.6", | ||
"semver": "^7.3.5", | ||
"yorkie-pnpm": "^2.0.1" | ||
} | ||
} |
@@ -10,3 +10,3 @@ [](https://github.com/RennCheung/codemirror-editor-vue3/stargazers) | ||
The codemirror component of vue3. This component is developed based on [Codemirror 5](http://codemirror.net/5/) and only vue3 is supported. | ||
The codemirror component of vue3. This component is developed based on [Codemirror 5](http://codemirror.net/5/) and only vue3 is supported. | ||
@@ -31,2 +31,8 @@ In addition to the officially supported modes, the log output presentation mode is added, out of the box, but not necessarily suitable for all scenarios. | ||
> If your project requires Typescript support, you will also need to install the '@types/codemirror' dependency. | ||
```bash | ||
npm install @types/codemirror@5.60.5 -D | ||
``` | ||
## Register global component | ||
@@ -110,25 +116,26 @@ | ||
| name | description | type | default | | ||
| ----------------- | :--------------------------------------------------------: | :--------------------------- | :------------------------------------: | | ||
| **value(v-model)** | Editor content | `string` | "" | | ||
| **options** | [Configuration options of codemirror5][cm_config_url] | [EditorConfiguration][cm_editor_type_url] | [DEFAULT_OPTIONS][default_options_url] | | ||
| **placeholder** | Editor placeholder content to introduce codemirror related files | `string` | "" | | ||
| **border** | Whether to display editor borders | `boolean` | `false` | | ||
| **width** | width | `string` | `100% ` | | ||
| **height** | height | `string` | `100% ` | | ||
| **original-style** | Using the original style, disable the second modification of the style for this component (but does not affect width, height, and border) | ` boolean` | `false` | | ||
| **KeepCursorInEnd** | Always keep the mouse position on the last line | `boolean` | `false` | | ||
| **merge** | merge mode, can also be used as diff pattern | `boolean` | `false` | | ||
| *name* | Name, which is passed to the textarea inside the component(This is useless🙃) | `string` | - | | ||
| name | description | type | default | | ||
| ------------------- | :---------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------- | :------------------------------------: | | ||
| **value(v-model)** | Editor content | `string` | "" | | ||
| **options** | [Configuration options of codemirror5][cm_config_url] | [EditorConfiguration][cm_editor_type_url] | [DEFAULT_OPTIONS][default_options_url] | | ||
| **placeholder** | Editor placeholder content to introduce codemirror related files | `string` | "" | | ||
| **border** | Whether to display editor borders | `boolean` | `false` | | ||
| **width** | width | `string` | `100% ` | | ||
| **height** | height | `string` | `100% ` | | ||
| **original-style** | Using the original style, disable the second modification of the style for this component (but does not affect width, height, and border) | ` boolean` | `false` | | ||
| **KeepCursorInEnd** | Always keep the mouse position on the last line | `boolean` | `false` | | ||
| **merge** | merge mode, can also be used as diff pattern | `boolean` | `false` | | ||
| _name_ | Name, which is passed to the textarea inside the component(This is useless🙃) | `string` | - | | ||
## Events | ||
## Events | ||
### Component Events | ||
> The following three are only the events encapsulated by this component. Please refer to more events [Codemirror Events](./events#codemirror-events) | ||
| event name | description | params | | ||
| -------- | :---------------------: | :------------------------------------ | | ||
| `change` | value or instance changes | `(value: string, cm: Editor) => void` | | ||
| `input` | input | `(value: string) => void` | | ||
| `ready` | The Codemirror component is mounted | `(cm: Editor) => void;` | | ||
| event name | description | params | | ||
| ---------- | :---------------------------------: | :------------------------------------ | | ||
| `change` | value or instance changes | `(value: string, cm: Editor) => void` | | ||
| `input` | input | `(value: string) => void` | | ||
| `ready` | The Codemirror component is mounted | `(cm: Editor) => void;` | | ||
@@ -175,2 +182,1 @@ --- | ||
- `update` | ||
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
77360
21.11%1634
77.61%0
-100%179
3.47%0
-100%Yes
NaN5
150%3
50%