vue-codemirror6 0.0.5 → 0.3.0

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/README.md CHANGED
@@ -1,119 +1,220 @@
1
1
  # vue-codemirror6
2
2
 
3
- A component for using [CodeMirror6](https://codemirror.net/6/) with Vue. Unlike [surmon-china's vue-codemirror](https://github.com/surmon-china/vue-codemirror), it is for CodeMirror6.
3
+ [![jsdelivr CDN](https://data.jsdelivr.com/v1/package/npm/vue-codemirror6/badge)](https://www.jsdelivr.com/package/npm/vue-codemirror6)
4
+ [![NPM Downloads](https://img.shields.io/npm/dm/vue-codemirror6.svg?style=flat)](https://www.npmjs.com/package/vue-codemirror6)
5
+ [![Open in unpkg](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/vue-codemirror6/file/README.md)
6
+ [![npm version](https://img.shields.io/npm/v/vue-codemirror6.svg)](https://www.npmjs.com/package/@uiw/react-codemirror)
7
+ [![Open in Gitpod](https://shields.io/badge/Open%20in-Gitpod-green?logo=Gitpod)](https://gitpod.io/#https://github.com/logue/vue-codemirror6)
8
+
9
+ A component for using [CodeMirror6](https://codemirror.net/6/) with Vue. Unrelated to [surmon-china's vue-codemirror](https://github.com/surmon-china/vue-codemirror), it is for CodeMirror6.
4
10
 
5
11
  ## Usage
6
12
 
7
13
  This component can handle bidirectional binding by `v-model` like a general Vue component.
8
14
 
9
- Other options are currently as follows:
10
-
11
- | attribute | information |
12
- | ---------- | -------------------------------------------------------------------------------------------------------------------------------- |
13
- | lang | The language you want to have syntax highlighting. see <https://codemirror.net/6/#languages> |
14
- | phrases | Specify here if you want to make the displayed character string multilingual. see <https://codemirror.net/6/examples/translate/> |
15
- | extensions | Includes enhancements to extend CodeMirror. Such as [@codemirror/basic-setup](https://github.com/codemirror/basic-setup). |
16
- | dark | Toggle Darkmode. |
17
- | linter | Set Linter. see example <https://codesandbox.io/s/f6nb0?file=/src/index.js> |
15
+ ### Props
16
+
17
+ | Props | Type | Information |
18
+ | ---------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19
+ | dark | boolean | Toggle Darkmode. If you use Vuetify, I recommend that you enter `$vuetify.theme.dark`. |
20
+ | theme | { [selector: string]: StyleSpec } | Specify the theme. For example, if you use [@codemirror/theme-one-dark](https://github.com/codemirror/theme-one-dark), import `oneDark` and put it in this prop. |
21
+ | readonly | boolean | Makes the cursor visible or you can drag the text but not edit the value. |
22
+ | editable | boolean | When this is set to false, it is similar to `readonly`, except that the cursor is not displayed like the normal pre tag. |
23
+ | lang | LanguageSupport | The language you want to have syntax highlighting. see <https://codemirror.net/6/#languages> |
24
+ | phrases | Record&lt;string, string&gt; | Specify here if you want to make the displayed character string multilingual. see <https://codemirror.net/6/examples/translate/> |
25
+ | extensions | Extension[] | Includes enhancements to extend CodeMirror. Such as [@codemirror/basic-setup](https://github.com/codemirror/basic-setup). |
26
+ | linter | Diagnostic[] | Set Linter. see example <https://codesandbox.io/s/f6nb0?file=/src/index.js> |
27
+
28
+ Notice: `lang` and `linter` can also be set together in `extensions`. This is defined for usability compatibility with past CodeMirrors.
29
+
30
+ ### Supported Languages
31
+
32
+ - [`@codemirror/lang-cpp`](https://www.npmjs.com/package/@codemirror/lang-cpp)
33
+ - [`@codemirror/lang-html`](https://www.npmjs.com/package/@codemirror/lang-html)
34
+ - [`@codemirror/lang-java`](https://www.npmjs.com/package/@codemirror/lang-java)
35
+ - [`@codemirror/lang-javascript`](https://www.npmjs.com/package/@codemirror/lang-javascript)
36
+ - [`@codemirror/lang-json`](https://www.npmjs.com/package/@codemirror/lang-json)
37
+ - [`@codemirror/lang-lezer`](https://www.npmjs.com/package/@codemirror/lang-lezer)
38
+ - [`@codemirror/lang-markdown`](https://www.npmjs.com/package/@codemirror/lang-markdown)
39
+ - [`@codemirror/lang-php`](https://www.npmjs.com/package/@codemirror/lang-php)
40
+ - [`@codemirror/lang-python`](https://www.npmjs.com/package/@codemirror/lang-python)
41
+ - [`@codemirror/lang-rust`](https://www.npmjs.com/package/@codemirror/lang-rust)
42
+ - [`@codemirror/lang-sql`](https://www.npmjs.com/package/@codemirror/lang-sql)
43
+ - [`@codemirror/lang-xml`](https://www.npmjs.com/package/@codemirror/lang-xml)
44
+
45
+ ### Supported Themes
46
+
47
+ - [`@codemirror/theme-one-dark`](https://github.com/codemirror/theme-one-dark)
48
+ - [`upleveled/theme-vs-code-dark-plus`](https://github.com/upleveled/theme-vs-code-dark-plus)
18
49
 
19
50
  ## Example
20
51
 
52
+ Mark up as follows to make it work at a minimum.
53
+
54
+ ```vue
55
+ <template>
56
+ <code-mirror v-model="value" />
57
+ </template>
58
+
59
+ <script>
60
+ import { ref, defineComponent } from 'vue';
61
+
62
+ import CodeMirror from '@/components/CodeMirror.vue';
63
+
64
+ export default defineComponent({
65
+ components: {
66
+ CodeMirror,
67
+ },
68
+ setup() {
69
+ const value = ref(
70
+ `# The quick brown fox jumps over the lazy dog.
71
+
72
+ [Lorem ipsum](https://www.lipsum.com/) dolor sit amet, **consectetur** adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
73
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
74
+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
75
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.`
76
+ );
77
+ return { value };
78
+ },
79
+ });
80
+ </script>
81
+ ```
82
+
83
+ ### Example using Slots
84
+
85
+ The contents of the slot will overwrite the existing `v-model`. For this reason, it is recommended to use it when simply displaying with a `readonly` prop without using `v-model`.
86
+
87
+ Also, insert a `<pre>` tag to prevent the text in the slot from being automatically formatted.
88
+
89
+ ```vue
90
+ <template>
91
+ <code-mirror :lang="lang" :editable="false">
92
+ <pre>
93
+ {
94
+ "key": "value"
95
+ }</pre
96
+ >
97
+ </code-mirror>
98
+ </template>
99
+
100
+ <script>
101
+ import { ref, defineComponent } from 'vue';
102
+
103
+ import { json } from '@codemirror/lang-json';
104
+
105
+ import CodeMirror from '@/components/CodeMirror.vue';
106
+
107
+ export default defineComponent({
108
+ components: {
109
+ CodeMirror,
110
+ },
111
+ setup() {
112
+ const lang = ref(json());
113
+ return { lang };
114
+ },
115
+ });
116
+ </script>
117
+ ```
118
+
119
+ ### Full Example
120
+
21
121
  When using as a Markdown editor on [Vuetify](https://vuetifyjs.com/).
22
122
 
23
123
  ```vue
24
124
  <template>
25
- <codemirror
125
+ <code-mirror
26
126
  v-model="value"
27
127
  :lang="lang"
28
128
  :phrases="phreses"
29
129
  :extensions="extensions"
30
130
  :dark="$vuetify.theme.dark"
31
- @update="onCmUpdate"
32
131
  />
33
132
  </template>
34
133
 
35
134
  <script lang="ts">
36
- import { Component, Vue } from 'vue-property-decorator';
135
+ import { ref, type Ref, defineComponent } from 'vue';
37
136
 
38
137
  // Load component
39
138
  import CodeMirror from 'vue-codemirror6';
40
139
 
41
140
  // CodeMirror extensions
42
- import { basicSetup } from '@codemirror/basic-setup';
141
+ import type { LanguageSupport } from '@codemirror/language';
43
142
  import { markdown } from '@codemirror/lang-markdown';
44
- import type { ViewUpdate } from '@codemirror/view';
143
+ import { basicSetup } from '@codemirror/basic-setup';
45
144
  import type { Extension } from '@codemirror/state';
46
- import type { LanguageSupport } from '@codemirror/language';
145
+ import type { ViewUpdate } from '@codemirror/view';
47
146
 
48
- @Component({ components: { CodeMirror } })
49
- export default class Home extends Vue {
50
- /** text */
51
- value: string;
52
-
53
- /**
54
- * CodeMirror Language
55
- *
56
- * @see {@link https://codemirror.net/6/docs/ref/#language | @codemirror/language}
57
- */
58
- lang: LanguageSupport = markdown();
59
-
60
- /**
61
- * Internationalization Config. In this example, the display language is Japanese.
62
- *
63
- * @see {@link https://codemirror.net/6/examples/translate/ | Example: Internationalization}
64
- */
65
- phrases: Record<string, string> = {
66
- // @codemirror/view
67
- 'Control character': '制御文字',
68
- // @codemirror/fold
69
- 'Folded lines': '折り畳まれた行',
70
- 'Unfolded lines': '折り畳める行',
71
- to: '行き先',
72
- 'folded code': '折り畳まれたコード',
73
- unfold: '折り畳む解除',
74
- 'Fold line': '行を折り畳む',
75
- 'Unfold line': '行の折り畳む解除',
76
- // @codemirror/search
77
- 'Go to line': '行き先の行',
78
- go: 'OK',
79
- Find: '検索',
80
- Replace: '置き換え',
81
- next: '▼',
82
- previous: '▲',
83
- all: 'すべて',
84
- 'match case': '一致条件',
85
- regexp: '正規表現',
86
- replace: '置き換え',
87
- 'replace all': 'すべてを置き換え',
88
- close: '閉じる',
89
- 'current match': '現在の一致',
90
- 'on line': 'した行',
91
- // @codemirror/lint
92
- Diagnostics: 'エラー',
93
- 'No diagnostics': 'エラーなし',
94
- }
95
-
96
- /**
97
- * CodeMirror Extensions
98
- *
99
- * @see {@link:https://codemirror.net/6/docs/ref/#state.Extension | Extending Editor State}
100
- */
101
- extensions: Extension[] = [
102
- /** @see {@link:https://codemirror.net/6/docs/ref/#basic-setup | basic-setup} */
103
- basicSetup
104
- ]
105
-
106
- /**
107
- * CodeMirror Hook View update event
108
- *
109
- * @param update View Update
110
- *
111
- * @see {@link https://codemirror.net/6/docs/ref/#view.ViewUpdate|class ViewUpdate}
112
- */
113
- onCmUpdate(update: ViewUpdate) {
114
- console.log(update)
115
- }
116
- }
147
+ export default defineComponent({
148
+ components: {
149
+ CodeMirror,
150
+ },
151
+ setup() {
152
+ /** text */
153
+ const value: Ref<string> = ref('');
154
+
155
+ /**
156
+ * CodeMirror Language
157
+ *
158
+ * @see {@link https://codemirror.net/6/docs/ref/#language | @codemirror/language}
159
+ */
160
+ const lang: Ref<LanguageSupport> = ref(markdown());
161
+
162
+ /**
163
+ * Internationalization Config.
164
+ * In this example, the display language to Japanese.
165
+ *
166
+ * @see {@link https://codemirror.net/6/examples/translate/ | Example: Internationalization}
167
+ */
168
+ const phrases: Ref<Record<string, string>> = ref({
169
+ // @codemirror/view
170
+ 'Control character': '制御文字',
171
+ // @codemirror/fold
172
+ 'Folded lines': '折り畳まれた行',
173
+ 'Unfolded lines': '折り畳める行',
174
+ to: '行き先',
175
+ 'folded code': '折り畳まれたコード',
176
+ unfold: '折り畳む解除',
177
+ 'Fold line': '行を折り畳む',
178
+ 'Unfold line': '行の折り畳む解除',
179
+ // @codemirror/search
180
+ 'Go to line': '行き先の行',
181
+ go: 'OK',
182
+ Find: '検索',
183
+ Replace: '置き換え',
184
+ next: '▼',
185
+ previous: '▲',
186
+ all: 'すべて',
187
+ 'match case': '一致条件',
188
+ regexp: '正規表現',
189
+ replace: '置き換え',
190
+ 'replace all': 'すべてを置き換え',
191
+ close: '閉じる',
192
+ 'current match': '現在の一致',
193
+ 'on line': 'した行',
194
+ // @codemirror/lint
195
+ Diagnostics: 'エラー',
196
+ 'No diagnostics': 'エラーなし',
197
+ });
198
+
199
+ /**
200
+ * CodeMirror Extensions
201
+ *
202
+ * @see {@link:https://codemirror.net/6/docs/ref/#state.Extension | Extending Editor State}
203
+ */
204
+ const extensions: Ref<Extension[]> = ref([
205
+ /** @see {@link:https://codemirror.net/6/docs/ref/#basic-setup | basic-setup} */
206
+ basicSetup,
207
+ ]);
208
+
209
+ return {
210
+ value,
211
+ lang,
212
+ phrases,
213
+ extensions,
214
+ };
215
+ },
216
+ });
217
+ </script>
117
218
  ```
118
219
 
119
220
  ## LICENSE
@@ -0,0 +1,176 @@
1
+ import { type Ref, type PropType, type SetupContext, EmitsOptions } from 'vue-demi';
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
+ declare const _default: import("vue-demi").DefineComponent<{
7
+ /** Model value */
8
+ modelValue: {
9
+ type: StringConstructor;
10
+ default: string;
11
+ };
12
+ /**
13
+ * Theme
14
+ *
15
+ * @see {@link https://codemirror.net/6/examples/styling/ | Example: Styling}
16
+ */
17
+ theme: {
18
+ type: PropType<{
19
+ [selector: string]: StyleSpec;
20
+ }>;
21
+ default: undefined;
22
+ };
23
+ /** Dark Mode */
24
+ dark: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ /**
29
+ * Readonly
30
+ *
31
+ * @see {@link https://codemirror.net/6/docs/ref/#state.EditorState%5EreadOnly | readOnly}
32
+ */
33
+ readonly: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ /**
38
+ * Editable
39
+ *
40
+ * @see {@link https://codemirror.net/6/docs/ref/#view.EditorView%5Eeditable | editable}
41
+ */
42
+ editable: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ /**
47
+ * Additional Extension
48
+ *
49
+ * @see {@link https://codemirror.net/6/docs/ref/#state.Extension | Extending Editor State}
50
+ */
51
+ extensions: {
52
+ type: PropType<Extension[]>;
53
+ default: undefined;
54
+ };
55
+ /**
56
+ * Language Phreses
57
+ *
58
+ * @see {@link https://codemirror.net/6/examples/translate/ | Example: Internationalization}
59
+ */
60
+ phrases: {
61
+ type: PropType<Record<string, string>>;
62
+ default: undefined;
63
+ };
64
+ /**
65
+ * CodeMirror Language
66
+ *
67
+ * @see {@link https://codemirror.net/6/docs/ref/#language | @codemirror/language}
68
+ */
69
+ lang: {
70
+ type: PropType<LanguageSupport>;
71
+ default: undefined;
72
+ };
73
+ /**
74
+ * CodeMirror Linter
75
+ *
76
+ * @see {@link https://codemirror.net/6/docs/ref/#lint | @codemirror/lint}
77
+ */
78
+ linter: {
79
+ type: PropType<Diagnostic[]>;
80
+ default: undefined;
81
+ };
82
+ }, {
83
+ context: SetupContext<EmitsOptions>;
84
+ editor: Ref<Element | undefined>;
85
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, EmitsOptions, "update:modelValue" | "update", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
86
+ /** Model value */
87
+ modelValue: {
88
+ type: StringConstructor;
89
+ default: string;
90
+ };
91
+ /**
92
+ * Theme
93
+ *
94
+ * @see {@link https://codemirror.net/6/examples/styling/ | Example: Styling}
95
+ */
96
+ theme: {
97
+ type: PropType<{
98
+ [selector: string]: StyleSpec;
99
+ }>;
100
+ default: undefined;
101
+ };
102
+ /** Dark Mode */
103
+ dark: {
104
+ type: BooleanConstructor;
105
+ default: boolean;
106
+ };
107
+ /**
108
+ * Readonly
109
+ *
110
+ * @see {@link https://codemirror.net/6/docs/ref/#state.EditorState%5EreadOnly | readOnly}
111
+ */
112
+ readonly: {
113
+ type: BooleanConstructor;
114
+ default: boolean;
115
+ };
116
+ /**
117
+ * Editable
118
+ *
119
+ * @see {@link https://codemirror.net/6/docs/ref/#view.EditorView%5Eeditable | editable}
120
+ */
121
+ editable: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ /**
126
+ * Additional Extension
127
+ *
128
+ * @see {@link https://codemirror.net/6/docs/ref/#state.Extension | Extending Editor State}
129
+ */
130
+ extensions: {
131
+ type: PropType<Extension[]>;
132
+ default: undefined;
133
+ };
134
+ /**
135
+ * Language Phreses
136
+ *
137
+ * @see {@link https://codemirror.net/6/examples/translate/ | Example: Internationalization}
138
+ */
139
+ phrases: {
140
+ type: PropType<Record<string, string>>;
141
+ default: undefined;
142
+ };
143
+ /**
144
+ * CodeMirror Language
145
+ *
146
+ * @see {@link https://codemirror.net/6/docs/ref/#language | @codemirror/language}
147
+ */
148
+ lang: {
149
+ type: PropType<LanguageSupport>;
150
+ default: undefined;
151
+ };
152
+ /**
153
+ * CodeMirror Linter
154
+ *
155
+ * @see {@link https://codemirror.net/6/docs/ref/#lint | @codemirror/lint}
156
+ */
157
+ linter: {
158
+ type: PropType<Diagnostic[]>;
159
+ default: undefined;
160
+ };
161
+ }>>, {
162
+ modelValue: string;
163
+ theme: {
164
+ [selector: string]: StyleSpec;
165
+ };
166
+ dark: boolean;
167
+ readonly: boolean;
168
+ editable: boolean;
169
+ extensions: Extension[];
170
+ phrases: Record<string, string>;
171
+ lang: LanguageSupport;
172
+ linter: Diagnostic[];
173
+ }>;
174
+ /** CodeMirror Component */
175
+ export default _default;
176
+ //# 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,EAOL,KAAK,GAAG,EAER,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,YAAY,EACb,MAAM,UAAU,CAAC;AAKlB,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;;IAcvC,kBAAkB;;;;;IAKlB;;;;OAIG;;;;;;;IAKH,gBAAgB;;;;;IAKhB;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;;;;;IApEH,kBAAkB;;;;;IAKlB;;;;OAIG;;;;;;;IAKH,gBAAgB;;;;;IAKhB;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;IAKH;;;;OAIG;;;;;;;;;;;;;;;;;;AA/EP,2BAA2B;AAC3B,wBA+MG"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Vue CodeMirror6 Component
3
+ *
4
+ * @license MIT
5
+ * @author Logue {@link logue@hotmail.co.jp}
6
+ * @copyright 2022 Masashi Yoshikawa {@link https://logue.dev/} All rights reserved.
7
+ * @see {@link https://github.com/logue/vue-codemirror6}
8
+ */
9
+ import * as namedExports from './index.esm';
10
+ declare const _default: (import("vue").DefineComponent<{
11
+ modelValue: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ theme: {
16
+ type: import("vue").PropType<{
17
+ [selector: string]: import("style-mod").StyleSpec;
18
+ }>;
19
+ default: undefined;
20
+ };
21
+ dark: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ readonly: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ editable: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ extensions: {
34
+ type: import("vue").PropType<import("@codemirror/state").Extension[]>;
35
+ default: undefined;
36
+ };
37
+ phrases: {
38
+ type: import("vue").PropType<Record<string, string>>;
39
+ default: undefined;
40
+ };
41
+ lang: {
42
+ type: import("vue").PropType<import("@codemirror/language").LanguageSupport>;
43
+ default: undefined;
44
+ };
45
+ linter: {
46
+ type: import("vue").PropType<import("@codemirror/lint").Diagnostic[]>;
47
+ default: undefined;
48
+ };
49
+ }, {
50
+ context: import("vue").SetupContext<import("vue").EmitsOptions>;
51
+ editor: import("vue").Ref<Element | undefined>;
52
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "update:modelValue" | "update", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
53
+ modelValue: {
54
+ type: StringConstructor;
55
+ default: string;
56
+ };
57
+ theme: {
58
+ type: import("vue").PropType<{
59
+ [selector: string]: import("style-mod").StyleSpec;
60
+ }>;
61
+ default: undefined;
62
+ };
63
+ dark: {
64
+ type: BooleanConstructor;
65
+ default: boolean;
66
+ };
67
+ readonly: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ editable: {
72
+ type: BooleanConstructor;
73
+ default: boolean;
74
+ };
75
+ extensions: {
76
+ type: import("vue").PropType<import("@codemirror/state").Extension[]>;
77
+ default: undefined;
78
+ };
79
+ phrases: {
80
+ type: import("vue").PropType<Record<string, string>>;
81
+ default: undefined;
82
+ };
83
+ lang: {
84
+ type: import("vue").PropType<import("@codemirror/language").LanguageSupport>;
85
+ default: undefined;
86
+ };
87
+ linter: {
88
+ type: import("vue").PropType<import("@codemirror/lint").Diagnostic[]>;
89
+ default: undefined;
90
+ };
91
+ }>>, {
92
+ modelValue: string;
93
+ theme: {
94
+ [selector: string]: import("style-mod").StyleSpec;
95
+ };
96
+ dark: boolean;
97
+ readonly: boolean;
98
+ editable: boolean;
99
+ extensions: import("@codemirror/state").Extension[];
100
+ phrases: Record<string, string>;
101
+ lang: import("@codemirror/language").LanguageSupport;
102
+ linter: import("@codemirror/lint").Diagnostic[];
103
+ }> | {
104
+ install: (app: any) => void;
105
+ }) & typeof namedExports;
106
+ export default _default;
107
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAkB,KAAK,YAAY,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASvD,wBAC0C"}