vue-codemirror6 0.0.5 → 0.0.6
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/dist/components/CodeMirror.vue.d.ts +63 -0
- package/dist/components/CodeMirror.vue.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.d.ts +6 -0
- package/dist/index.esm.d.ts.map +1 -0
- package/dist/vue-codemirror6.es.js +4 -5415
- package/dist/vue-codemirror6.umd.js +2 -28
- package/package.json +1 -1
- package/src/components/CodeMirror.vue +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Vue } from 'vue-property-decorator';
|
|
2
|
+
import { type Extension } from '@codemirror/state';
|
|
3
|
+
import type { LanguageSupport } from '@codemirror/language';
|
|
4
|
+
import type { Diagnostic } from '@codemirror/lint';
|
|
5
|
+
import type { StyleSpec } from 'style-mod';
|
|
6
|
+
/** CodeMirror Component */
|
|
7
|
+
export default class CodeMirror extends Vue {
|
|
8
|
+
/** Editor */
|
|
9
|
+
private editor;
|
|
10
|
+
/**
|
|
11
|
+
* Theme
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://codemirror.net/6/examples/styling/ | Example: Styling}
|
|
14
|
+
*/
|
|
15
|
+
readonly theme: {
|
|
16
|
+
[selector: string]: StyleSpec;
|
|
17
|
+
};
|
|
18
|
+
/** Dark Mode */
|
|
19
|
+
readonly dark: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Language Phreses
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://codemirror.net/6/examples/translate/ | Example: Internationalization}
|
|
24
|
+
*/
|
|
25
|
+
readonly phrases: Record<string, string>;
|
|
26
|
+
/**
|
|
27
|
+
* Additional Extension
|
|
28
|
+
*
|
|
29
|
+
* @see {@link https://codemirror.net/6/docs/ref/#state.Extension | Extending Editor State}
|
|
30
|
+
*/
|
|
31
|
+
readonly extensions: Extension[];
|
|
32
|
+
/**
|
|
33
|
+
* CodeMirror Language
|
|
34
|
+
*
|
|
35
|
+
* @see {@link https://codemirror.net/6/docs/ref/#language | @codemirror/language}
|
|
36
|
+
*/
|
|
37
|
+
readonly lang: LanguageSupport;
|
|
38
|
+
/**
|
|
39
|
+
* CodeMirror Linter
|
|
40
|
+
*
|
|
41
|
+
* @see {@link https://codemirror.net/6/docs/ref/#lint | @codemirror/lint}
|
|
42
|
+
*/
|
|
43
|
+
readonly linter: Diagnostic[];
|
|
44
|
+
/** Input */
|
|
45
|
+
readonly value: string;
|
|
46
|
+
/**
|
|
47
|
+
* Input value changed
|
|
48
|
+
*
|
|
49
|
+
* @see {@link https://codemirror.net/6/docs/migration/#making-changes | Making Changes}
|
|
50
|
+
*/
|
|
51
|
+
onValueChanged(): void;
|
|
52
|
+
/** Darkmode */
|
|
53
|
+
onToggleDarkMode(): void;
|
|
54
|
+
/** CodeMirror Extension */
|
|
55
|
+
get extension(): Extension[];
|
|
56
|
+
/** When loaded */
|
|
57
|
+
mounted(): void;
|
|
58
|
+
/** Destroy */
|
|
59
|
+
beforeDestroy(): void;
|
|
60
|
+
/** Vue node to plain text */
|
|
61
|
+
private getChildrenTextContent;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=CodeMirror.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeMirror.vue.d.ts","sourceRoot":"","sources":["../../src/components/CodeMirror.vue.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,GAAG,EAAS,MAAM,wBAAwB,CAAC;AAGrE,OAAO,EAEL,KAAK,SAAS,EAEf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAK3C,2BAA2B;AAC3B,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,GAAG;IACzC,aAAa;IACb,OAAO,CAAC,MAAM,CAAc;IAE5B;;;;OAIG;IAEH,QAAQ,CAAC,KAAK,EAAG;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IAEnD,gBAAgB;IAEhB,QAAQ,CAAC,IAAI,EAAG,OAAO,CAAC;IAExB;;;;OAIG;IAEH,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE1C;;;;OAIG;IAEH,QAAQ,CAAC,UAAU,EAAG,SAAS,EAAE,CAAC;IAElC;;;;OAIG;IAEH,QAAQ,CAAC,IAAI,EAAG,eAAe,CAAC;IAEhC;;;;OAIG;IAEH,QAAQ,CAAC,MAAM,EAAG,UAAU,EAAE,CAAC;IAE/B,YAAY;IAEZ,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAC;IAExB;;;;OAIG;IAEH,cAAc;IAqBd,eAAe;IAEf,gBAAgB;IAShB,2BAA2B;IAC3B,IAAI,SAAS,IAAI,SAAS,EAAE,CA4B3B;IAED,kBAAkB;IAClB,OAAO;IAwBP,cAAc;IACd,aAAa;IAIb,6BAA6B;IAC7B,OAAO,CAAC,sBAAsB;CAS/B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAkB,KAAK,YAAY,MAAM,aAAa,CAAC;;AASvD,wBAC0C"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PluginObject } from 'vue';
|
|
2
|
+
import component from './components/CodeMirror.vue';
|
|
3
|
+
declare type InstallableComponent = typeof component & PluginObject<any>;
|
|
4
|
+
declare const _default: InstallableComponent;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=index.esm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.d.ts","sourceRoot":"","sources":["../src/index.esm.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AAGzC,OAAO,SAAS,MAAM,6BAA6B,CAAC;AAGpD,aAAK,oBAAoB,GAAG,OAAO,SAAS,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;;AAKjE,wBASK"}
|