vue-codemirror6 1.5.0 → 1.5.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.
package/CHANGELOG.md CHANGED
@@ -47,7 +47,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
47
47
 
48
48
  > 22 November 2024
49
49
 
50
- - Fix sample code syntax error [`#47`](https://github.com/logue/vue-codemirror6/pull/47)
50
+ - Fix sample code syntax error [`#47`](https://github.com/logue/vue-codemirror6/pull/47)
51
51
  - chore: demo docs [`#43`](https://github.com/logue/vue-codemirror6/pull/43)
52
52
  - fix: editor not update content when `modelValue` change and selection is out of range [`#44`](https://github.com/logue/vue-codemirror6/pull/44)
53
53
  - chore: props and readme doc [`#31`](https://github.com/logue/vue-codemirror6/pull/31)
@@ -79,7 +79,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
79
79
 
80
80
  - chore(CODEOWNERS): CODEOWNERS.com Bot, at your service! [`#14`](https://github.com/logue/vue-codemirror6/pull/14)
81
81
  - Update demo code. (Replaced @codemirror/html to @codemirror/vue.) [`8da1a8a`](https://github.com/logue/vue-codemirror6/commit/8da1a8a4e37d713cc78281ce9c304c42a06940dc)
82
- - Changed implementation to generate *.d.ts with vite-plugin-dts. [`1caaa20`](https://github.com/logue/vue-codemirror6/commit/1caaa20b1423a3d252a6c770a630fb60e2e3440d)
82
+ - Changed implementation to generate \*.d.ts with vite-plugin-dts. [`1caaa20`](https://github.com/logue/vue-codemirror6/commit/1caaa20b1423a3d252a6c770a630fb60e2e3440d)
83
83
  - Update README.md. [`f8dd493`](https://github.com/logue/vue-codemirror6/commit/f8dd4934a7b9cc089cd830473db5250d28b3389b)
84
84
 
85
85
  #### [1.1.11](https://github.com/logue/vue-codemirror6/compare/1.1.3...1.1.11)
package/dist/index.cjs.js CHANGED
@@ -5,9 +5,9 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2022-2026 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.5.0
8
+ * @version 1.5.1
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
12
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let e=require(`@codemirror/commands`),t=require(`@codemirror/language`),n=require(`@codemirror/lint`),r=require(`@codemirror/state`),i=require(`@codemirror/view`),a=require(`codemirror`),o=require(`vue-demi`);var s={version:`1.5.0`,date:`2026-03-30T11:56:36.326Z`},c=e=>e?Object.entries(e).reduce((e,[t,n])=>(t=t.charAt(0).toUpperCase()+t.slice(1),t=`on${t}`,{...e,[t]:n}),{}):{};function l(e,t={},n){if(o.isVue2)return(0,o.h)(e,t,n);let{props:r,domProps:i,on:a,...s}=t,l=a?c(a):{};return(0,o.h)(e,{...s,...r,...i,...l},n)}var u=e=>typeof e==`function`?e():e,d=(0,o.defineComponent)({name:`CodeMirror`,model:{prop:`modelValue`,event:`update:modelValue`},props:{modelValue:{type:String,default:``},theme:{type:Object,default:()=>({})},dark:{type:Boolean,default:!1},basic:{type:Boolean,default:!1},minimal:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},wrap:{type:Boolean,default:!1},tab:{type:Boolean,default:!1},indentUnit:{type:String,default:void 0},allowMultipleSelections:{type:Boolean,default:!1},tabSize:{type:Number,default:void 0},lineSeparator:{type:String,default:void 0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},extensions:{type:Array,default:()=>[]},phrases:{type:Object,default:void 0},lang:{type:Object,default:void 0},linter:{type:Function,default:void 0},linterConfig:{type:Object,default:()=>({})},forceLinting:{type:Boolean,default:!1},gutter:{type:Boolean,default:!1},gutterConfig:{type:Object,default:void 0},tag:{type:String,default:`div`},scrollIntoView:{type:Boolean,default:!0},preserveScrollPosition:{type:Boolean,default:!1},keymap:{type:Array,default:()=>[]}},emits:{"update:modelValue":(e=``)=>!0,update:e=>!0,ready:e=>!0,focus:e=>!0,change:e=>!0,destroy:()=>!0},setup(s,c){let l=(0,o.ref)(),u=(0,o.ref)(s.modelValue),d=(0,o.shallowRef)(void 0),f=(0,o.computed)({get:()=>d.value?.hasFocus??!1,set:e=>{e&&d.value&&d.value.focus()}}),p=(0,o.computed)({get:()=>d.value?.state.selection,set:e=>{d.value&&e&&d.value.dispatch({selection:e})}}),m=(0,o.computed)({get:()=>d.value?.state.selection.main.head??0,set:e=>{d.value&&d.value.dispatch({selection:{anchor:e}})}}),h=(0,o.computed)({get:()=>d.value?.state.toJSON(),set:e=>{d.value&&e&&d.value.setState(r.EditorState.fromJSON(e))}}),g=(0,o.ref)(0),_=(0,o.ref)(0),v=(0,o.computed)(()=>{let o=new r.Compartment,l=new r.Compartment;if(s.basic&&s.minimal)throw Error(`[Vue CodeMirror] Both basic and minimal cannot be specified.`);let u=[];return s.keymap&&s.keymap.length>0&&(u=s.keymap),s.tab&&u.push(e.indentWithTab),[s.basic&&!s.minimal?a.basicSetup:void 0,s.minimal&&!s.basic?a.minimalSetup:void 0,i.EditorView.updateListener.of(e=>{d.value&&(c.emit(`focus`,d.value.hasFocus),g.value=d.value.state.doc?.length,!(e.changes.empty||!e.docChanged)&&(s.linter&&(s.forceLinting&&(0,n.forceLinting)(d.value),_.value=s.linter(d.value).length),c.emit(`update`,e)))}),i.EditorView.theme(s.theme,{dark:s.dark}),s.wrap?i.EditorView.lineWrapping:void 0,s.indentUnit?t.indentUnit.of(s.indentUnit):void 0,r.EditorState.allowMultipleSelections.of(s.allowMultipleSelections),s.tabSize?l.of(r.EditorState.tabSize.of(s.tabSize)):void 0,s.phrases?r.EditorState.phrases.of(s.phrases):void 0,r.EditorState.readOnly.of(s.readonly),i.EditorView.editable.of(!s.disabled),s.lineSeparator?r.EditorState.lineSeparator.of(s.lineSeparator):void 0,s.lang?o.of(s.lang):void 0,s.linter?(0,n.linter)(s.linter,s.linterConfig):void 0,s.linter&&s.gutter?(0,n.lintGutter)(s.gutterConfig):void 0,s.placeholder?(0,i.placeholder)(s.placeholder):void 0,u.length>0?i.keymap.of(u):void 0,...s.extensions].filter(e=>!!e)});(0,o.watch)(v,e=>d.value?.dispatch({effects:r.StateEffect.reconfigure.of(e)}),{immediate:!0}),(0,o.watch)(()=>s.modelValue,async e=>{if(!d.value||d.value.composing||d.value.state.doc.toJSON().join(s.lineSeparator??`
12
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});let e=require(`@codemirror/commands`),t=require(`@codemirror/language`),n=require(`@codemirror/lint`),r=require(`@codemirror/state`),i=require(`@codemirror/view`),a=require(`codemirror`),o=require(`vue-demi`);var s={version:`1.5.1`,date:`2026-04-03T05:31:33.377Z`},c=e=>e?Object.entries(e).reduce((e,[t,n])=>(t=t.charAt(0).toUpperCase()+t.slice(1),t=`on${t}`,{...e,[t]:n}),{}):{};function l(e,t={},n){if(o.isVue2)return(0,o.h)(e,t,n);let{props:r,domProps:i,on:a,...s}=t,l=a?c(a):{};return(0,o.h)(e,{...s,...r,...i,...l},n)}var u=e=>typeof e==`function`?e():e,d=(0,o.defineComponent)({name:`CodeMirror`,model:{prop:`modelValue`,event:`update:modelValue`},props:{modelValue:{type:String,default:``},theme:{type:Object,default:()=>({})},dark:{type:Boolean,default:!1},basic:{type:Boolean,default:!1},minimal:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},wrap:{type:Boolean,default:!1},tab:{type:Boolean,default:!1},indentUnit:{type:String,default:void 0},allowMultipleSelections:{type:Boolean,default:!1},tabSize:{type:Number,default:void 0},lineSeparator:{type:String,default:void 0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},extensions:{type:Array,default:()=>[]},phrases:{type:Object,default:void 0},lang:{type:Object,default:void 0},linter:{type:Function,default:void 0},linterConfig:{type:Object,default:()=>({})},forceLinting:{type:Boolean,default:!1},gutter:{type:Boolean,default:!1},gutterConfig:{type:Object,default:void 0},tag:{type:String,default:`div`},scrollIntoView:{type:Boolean,default:!0},preserveScrollPosition:{type:Boolean,default:!1},keymap:{type:Array,default:()=>[]}},emits:{"update:modelValue":(e=``)=>!0,update:e=>!0,ready:e=>!0,focus:e=>!0,change:e=>!0,destroy:()=>!0},setup(s,c){let l=(0,o.ref)(),u=(0,o.ref)(s.modelValue),d=(0,o.shallowRef)(void 0),f=(0,o.computed)({get:()=>d.value?.hasFocus??!1,set:e=>{e&&d.value&&d.value.focus()}}),p=(0,o.computed)({get:()=>d.value?.state.selection,set:e=>{d.value&&e&&d.value.dispatch({selection:e})}}),m=(0,o.computed)({get:()=>d.value?.state.selection.main.head??0,set:e=>{d.value&&d.value.dispatch({selection:{anchor:e}})}}),h=(0,o.computed)({get:()=>d.value?.state.toJSON(),set:e=>{d.value&&e&&d.value.setState(r.EditorState.fromJSON(e))}}),g=(0,o.ref)(0),_=(0,o.ref)(0),v=(0,o.computed)(()=>{let o=new r.Compartment,l=new r.Compartment;if(s.basic&&s.minimal)throw Error(`[Vue CodeMirror] Both basic and minimal cannot be specified.`);let u=[];return s.keymap&&s.keymap.length>0&&(u=s.keymap),s.tab&&u.push(e.indentWithTab),[s.basic&&!s.minimal?a.basicSetup:void 0,s.minimal&&!s.basic?a.minimalSetup:void 0,i.EditorView.updateListener.of(e=>{d.value&&(c.emit(`focus`,d.value.hasFocus),g.value=d.value.state.doc?.length,!(e.changes.empty||!e.docChanged)&&(s.linter&&(s.forceLinting&&(0,n.forceLinting)(d.value),_.value=s.linter(d.value).length),c.emit(`update`,e)))}),i.EditorView.theme(s.theme,{dark:s.dark}),s.wrap?i.EditorView.lineWrapping:void 0,s.indentUnit?t.indentUnit.of(s.indentUnit):void 0,r.EditorState.allowMultipleSelections.of(s.allowMultipleSelections),s.tabSize?l.of(r.EditorState.tabSize.of(s.tabSize)):void 0,s.phrases?r.EditorState.phrases.of(s.phrases):void 0,r.EditorState.readOnly.of(s.readonly),i.EditorView.editable.of(!s.disabled),s.lineSeparator?r.EditorState.lineSeparator.of(s.lineSeparator):void 0,s.lang?o.of(s.lang):void 0,s.linter?(0,n.linter)(s.linter,s.linterConfig):void 0,s.linter&&s.gutter?(0,n.lintGutter)(s.gutterConfig):void 0,s.placeholder?(0,i.placeholder)(s.placeholder):void 0,u.length>0?i.keymap.of(u):void 0,...s.extensions].filter(e=>!!e)});(0,o.watch)(v,e=>d.value?.dispatch({effects:r.StateEffect.reconfigure.of(e)}),{immediate:!0}),(0,o.watch)(()=>s.modelValue,async e=>{if(!d.value||d.value.composing||d.value.state.doc.toJSON().join(s.lineSeparator??`
13
13
  `)===e)return;let t=!d.value.state.selection.ranges.every(t=>t.anchor<e.length&&t.head<e.length),n={from:0,to:d.value.state.doc.length,insert:e},r=s.preserveScrollPosition?d.value.scrollSnapshot().map(d.value.state.changes(n)):void 0;d.value.dispatch({changes:n,selection:t?{anchor:0,head:0}:d.value.state.selection,scrollIntoView:s.scrollIntoView,effects:r?[r]:void 0})},{immediate:!0}),(0,o.onMounted)(async()=>{if(globalThis.window===void 0||!l.value)return;let e=u.value;l.value.childNodes[0]&&(u.value!==``&&console.warn("[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."),e=l.value.childNodes[0].innerText.trim()),d.value=new i.EditorView({parent:l.value,state:r.EditorState.create({doc:e,extensions:v.value}),dispatch:e=>{d.value&&(d.value.update([e]),!(e.changes.empty||!e.docChanged)&&(c.emit(`update:modelValue`,e.state.doc.toString()),c.emit(`change`,e.state)))}}),await(0,o.nextTick)(),c.emit(`ready`,{view:d.value,state:d.value.state,container:l.value})}),(0,o.onUnmounted)(()=>{d.value&&(d.value.destroy(),c.emit(`destroy`))});let y={editor:l,view:d,cursor:m,selection:p,focus:f,length:g,json:h,diagnosticCount:_,dom:d.value?.contentDOM,lint:()=>{!s.linter||!d.value||(s.forceLinting&&(0,n.forceLinting)(d.value),_.value=(0,n.diagnosticCount)(d.value.state))},forceReconfigure:()=>{d.value?.dispatch({effects:r.StateEffect.reconfigure.of([])}),d.value?.dispatch({effects:r.StateEffect.appendConfig.of(v.value)})},getRange:(e,t)=>d.value?.state.sliceDoc(e,t),getLine:e=>d.value?.state.doc.line(e+1).text,lineCount:()=>d.value?.state.doc.lines??0,getCursor:()=>d.value?.state.selection.main.head??0,listSelections:()=>d.value?.state.selection.ranges??[],getSelection:()=>d.value?d.value.state.sliceDoc(d.value.state.selection.main.from,d.value.state.selection.main.to):``,getSelections:()=>{let e=d.value?.state;return e?e.selection.ranges.map(t=>e.sliceDoc(t.from,t.to)):[]},somethingSelected:()=>d.value?.state.selection.ranges.some(e=>!e.empty)??!1,replaceRange:(e,t,n)=>{d.value&&d.value.dispatch({changes:{from:t,to:n,insert:e}})},replaceSelection:e=>{d.value&&d.value.dispatch(d.value.state.replaceSelection(e))},setCursor:e=>{d.value&&d.value.dispatch({selection:{anchor:e}})},setSelection:(e,t)=>{d.value&&d.value.dispatch({selection:{anchor:e,head:t}})},setSelections:(e,t)=>{d.value&&d.value.dispatch({selection:r.EditorSelection.create(e,t)})},extendSelectionsBy:e=>{d.value&&p.value&&d.value.dispatch({selection:r.EditorSelection.create(p.value.ranges.map(t=>t.extend(e(t))))})}};return c.expose(y),y},render(){return l(this.$props.tag,{ref:`editor`,class:`vue-codemirror`},this.$slots.default?l(`aside`,{style:`display: none;`,"aria-hidden":`true`},u(this.$slots.default)):void 0)}}),f=e=>e.component(`CodeMirror`,d);exports.Meta=s,exports.default=d,exports.install=f;
@@ -0,0 +1,674 @@
1
+ import { LanguageSupport } from '@codemirror/language';
2
+ import { LintSource } from '@codemirror/lint';
3
+ import { EditorSelection, EditorState, Extension, SelectionRange, StateField, Text } from '@codemirror/state';
4
+ import { EditorView, KeyBinding, ViewUpdate } from '@codemirror/view';
5
+ import { PropType, Ref, ShallowRef, WritableComputedRef } from 'vue-demi';
6
+ import { StyleSpec } from 'style-mod';
7
+ import { default as Meta } from './src/Meta';
8
+ /** CodeMirror Component */
9
+ declare const CodeMirror: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
10
+ /** Model value */
11
+ modelValue: {
12
+ type: PropType<string | Text>;
13
+ default: string;
14
+ };
15
+ /**
16
+ * Theme
17
+ *
18
+ * @see {@link https://codemirror.net/docs/ref/#view.EditorView^theme}
19
+ */
20
+ theme: {
21
+ type: PropType<Record<string, StyleSpec>>;
22
+ default: () => {};
23
+ };
24
+ /** Dark Mode */
25
+ dark: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ /**
30
+ * Use Basic Setup
31
+ *
32
+ * This will enable the basic setup for the editor.
33
+ *
34
+ * @see {@link https://codemirror.net/docs/ref/#codemirror.basicSetup}
35
+ */
36
+ basic: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
40
+ /**
41
+ * Use Minimal Setup (The basic setting has priority.)
42
+ *
43
+ * @see {@link https://codemirror.net/docs/ref/#codemirror.minimalSetup}
44
+ */
45
+ minimal: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ /**
50
+ * Placeholder
51
+ *
52
+ * @see {@link https://codemirror.net/docs/ref/#view.placeholder}
53
+ */
54
+ placeholder: {
55
+ type: PropType<string | HTMLElement>;
56
+ default: undefined;
57
+ };
58
+ /**
59
+ * Line wrapping
60
+ *
61
+ * An extension that enables line wrapping in the editor (by setting CSS white-space to pre-wrap in the content).
62
+ *
63
+ * @see {@link https://codemirror.net/docs/ref/#view.EditorView%5ElineWrapping}
64
+ */
65
+ wrap: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ /**
70
+ * Allow tab key indent.
71
+ *
72
+ * This will enable the tab key to indent the current line or selection.
73
+ *
74
+ * @see {@link https://codemirror.net/examples/tab/}
75
+ */
76
+ tab: {
77
+ type: BooleanConstructor;
78
+ default: boolean;
79
+ };
80
+ /**
81
+ * Tab character
82
+ *
83
+ * This is the unit of indentation used when the editor is configured to indent with tabs.
84
+ * It is also used to determine the size of the tab character when the editor is configured to use tabs for indentation..
85
+ *
86
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^indentUnit}
87
+ */
88
+ indentUnit: {
89
+ type: StringConstructor;
90
+ default: undefined;
91
+ };
92
+ /**
93
+ * Allow Multiple Selection.
94
+ *
95
+ * This allows the editor to have multiple selections at the same time.
96
+ * This is useful for editing multiple parts of the document at once.
97
+ * If this is set to true, the editor will allow multiple selections.
98
+ * If this is set to false, the editor will only allow a single selection.
99
+ *
100
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^allowMultipleSelections}
101
+ */
102
+ allowMultipleSelections: {
103
+ type: BooleanConstructor;
104
+ default: boolean;
105
+ };
106
+ /**
107
+ * Tab size
108
+ *
109
+ * This is the number of spaces that a tab character represents in the editor.
110
+ * It is used to determine the size of the tab character when the editor is configured to use tabs for indentation.
111
+ * If this is set to a number, the editor will use that number of spaces for each tab character.
112
+ *
113
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^tabSize}
114
+ */
115
+ tabSize: {
116
+ type: NumberConstructor;
117
+ default: undefined;
118
+ };
119
+ /**
120
+ * Set line break (separetor) char.
121
+ *
122
+ * This is the character that is used to separate lines in the editor.
123
+ * It is used to determine the line break character when the editor is configured to use a specific line break character.
124
+ *
125
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^lineSeparator}
126
+ */
127
+ lineSeparator: {
128
+ type: StringConstructor;
129
+ default: undefined;
130
+ };
131
+ /**
132
+ * Readonly
133
+ *
134
+ * This is a CodeMirror Facet that allows you to set the editor to read-only mode.
135
+ * When this is set to true, the editor will not allow any changes to be made to the document.
136
+ * This is useful for displaying code that should not be edited, such as documentation or examples.
137
+ * If this is set to false, the editor will allow changes to be made to the document.
138
+ *
139
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^readOnly}
140
+ */
141
+ readonly: {
142
+ type: BooleanConstructor;
143
+ default: boolean;
144
+ };
145
+ /**
146
+ * Disable input.
147
+ *
148
+ * This is the reversed value of the CodeMirror editable.
149
+ * Similar to `readonly`, but setting this value to true disables dragging.
150
+ *
151
+ * @see {@link https://codemirror.net/docs/ref/#view.EditorView^editable}
152
+ */
153
+ disabled: {
154
+ type: BooleanConstructor;
155
+ default: boolean;
156
+ };
157
+ /**
158
+ * Additional Extension
159
+ *
160
+ * You can use this to add any additional extensions that you want to use in the editor.
161
+ *
162
+ * @see {@link https://codemirror.net/docs/ref/#state.Extension}
163
+ */
164
+ extensions: {
165
+ type: PropType<Extension[]>;
166
+ default: () => never[];
167
+ };
168
+ /**
169
+ * Language Phreses
170
+ *
171
+ * This is a CodeMirror Facet that allows you to define custom phrases for the editor.
172
+ * It can be used to override default phrases or add new ones.
173
+ * This is useful for translating the editor to different languages or for customizing the editor's UI.
174
+ *
175
+ * @see {@link https://codemirror.net/examples/translate/}
176
+ */
177
+ phrases: {
178
+ type: PropType<Record<string, string>>;
179
+ default: undefined;
180
+ };
181
+ /**
182
+ * CodeMirror Language
183
+ *
184
+ * This is a CodeMirror Facet that allows you to define the language of the editor.
185
+ * It can be used to enable syntax highlighting and other language-specific features.
186
+ * It is useful for displaying code in a specific language, such as JavaScript, Python, or HTML.
187
+ *
188
+ * @see {@link https://codemirror.net/docs/ref/#language}
189
+ */
190
+ lang: {
191
+ type: PropType<LanguageSupport>;
192
+ default: undefined;
193
+ };
194
+ /**
195
+ * CodeMirror Linter
196
+ *
197
+ * This is a CodeMirror Facet that allows you to define a linter for the editor.
198
+ * It can be used to check the code for errors and warnings, and to provide feedback to the user.
199
+ * It is useful for displaying code in a specific language, such as JavaScript, Python, or HTML.
200
+ * This is useful for providing feedback to the user about the code they are writing.
201
+ *
202
+ * @see {@link https://codemirror.net/docs/ref/#lint.linter}
203
+ */
204
+ linter: {
205
+ type: PropType<LintSource>;
206
+ default: undefined;
207
+ };
208
+ /**
209
+ * Linter Config
210
+ *
211
+ * This is a CodeMirror Facet that allows you to define the configuration for the linter.
212
+ * It can be used to specify options for the linter, such as the severity of errors and warnings, and to customize the behavior of the linter.
213
+ * This is useful for providing feedback to the user about the code they are writing.
214
+ *
215
+ * @see {@link https://codemirror.net/docs/ref/#lint.linter^config}
216
+ */
217
+ linterConfig: {
218
+ type: ObjectConstructor;
219
+ default: () => {};
220
+ };
221
+ /**
222
+ * Forces any linters configured to run when the editor is idle to run right away.
223
+ *
224
+ * This is useful for running linters on the initial load of the editor, or when the user has made changes to the code and wants to see the results immediately.
225
+ *
226
+ * @see {@link https://codemirror.net/docs/ref/#lint.forceLinting}
227
+ */
228
+ forceLinting: {
229
+ type: BooleanConstructor;
230
+ default: boolean;
231
+ };
232
+ /**
233
+ * Show Linter Gutter
234
+ *
235
+ * An area to 🔴 the lines with errors will be displayed.
236
+ * This feature is not enabled if `linter` is not specified.
237
+ *
238
+ * @see {@link https://codemirror.net/docs/ref/#lint.lintGutter}
239
+ */
240
+ gutter: {
241
+ type: BooleanConstructor;
242
+ default: boolean;
243
+ };
244
+ /**
245
+ * Gutter Config
246
+ *
247
+ * This is a CodeMirror Facet that allows you to define the configuration for the gutter.
248
+ * It can be used to specify options for the gutter, such as the size of the gutter, the position of the gutter, and to customize the behavior of the gutter.
249
+ * This is useful for providing feedback to the user about the code they are writing.
250
+ *
251
+ * @see {@link https://codemirror.net/docs/ref/#lint.lintGutter^config}
252
+ */
253
+ gutterConfig: {
254
+ type: ObjectConstructor;
255
+ default: undefined;
256
+ };
257
+ /**
258
+ * Using tag
259
+ */
260
+ tag: {
261
+ type: StringConstructor;
262
+ default: string;
263
+ };
264
+ /**
265
+ * Allows an external update to scroll the form.
266
+ *
267
+ * This is useful for scrolling the editor to a specific position when the user has made changes to the code and wants to see the results immediately.
268
+ * If this is set to true, the editor will scroll to the position specified in the transaction.
269
+ * If this is set to false, the editor will not scroll to the position specified in the transaction.
270
+ *
271
+ * @see {@link https://codemirror.net/docs/ref/#state.TransactionSpec.scrollIntoView}
272
+ */
273
+ scrollIntoView: {
274
+ type: BooleanConstructor;
275
+ default: boolean;
276
+ };
277
+ /**
278
+ * Preserve the current scroll position on external updates.
279
+ *
280
+ * This keeps the editor's own scroll container from jumping when
281
+ * `modelValue` is updated from outside the component.
282
+ *
283
+ * @see {@link https://codemirror.net/docs/ref/#view.EditorView.scrollSnapshot}
284
+ */
285
+ preserveScrollPosition: {
286
+ type: BooleanConstructor;
287
+ default: boolean;
288
+ };
289
+ /**
290
+ * Key map
291
+ * This is a CodeMirror Facet that allows you to define custom key bindings.
292
+ * It can be used to override default key bindings or add new ones.
293
+ *
294
+ * @see {@link https://codemirror.net/docs/ref/#view.keymap}
295
+ */
296
+ keymap: {
297
+ type: PropType<KeyBinding[]>;
298
+ default: () => never[];
299
+ };
300
+ }>, {
301
+ editor: Ref<HTMLElement | undefined, HTMLElement | undefined>;
302
+ view: ShallowRef<EditorView | undefined>;
303
+ cursor: WritableComputedRef<number, number>;
304
+ selection: WritableComputedRef<EditorSelection | undefined, EditorSelection | undefined>;
305
+ focus: WritableComputedRef<boolean, boolean>;
306
+ length: Ref<number, number>;
307
+ json: WritableComputedRef<Record<string, StateField<any>> | undefined, Record<string, StateField<any>> | undefined>;
308
+ diagnosticCount: Ref<number, number>;
309
+ dom: HTMLElement | undefined;
310
+ lint: () => void;
311
+ forceReconfigure: () => void;
312
+ getRange: (from?: number, to?: number) => string | undefined;
313
+ getLine: (number: number) => string | undefined;
314
+ lineCount: () => number;
315
+ getCursor: () => number;
316
+ listSelections: () => readonly SelectionRange[];
317
+ getSelection: () => string;
318
+ getSelections: () => string[];
319
+ somethingSelected: () => boolean;
320
+ replaceRange: (replacement: string | Text, from: number, to: number) => void;
321
+ replaceSelection: (replacement: string | Text) => void;
322
+ setCursor: (position: number) => void;
323
+ setSelection: (anchor: number, head?: number) => void;
324
+ setSelections: (ranges: readonly SelectionRange[], primary?: number) => void;
325
+ extendSelectionsBy: (f: any) => void;
326
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
327
+ /** Model Update */
328
+ 'update:modelValue': (_value?: string | Text) => true;
329
+ /** CodeMirror ViewUpdate */
330
+ update: (_value: ViewUpdate) => true;
331
+ /** CodeMirror onReady */
332
+ ready: (_value: {
333
+ view: EditorView;
334
+ state: EditorState;
335
+ container: HTMLElement;
336
+ }) => true;
337
+ /** CodeMirror onFocus */
338
+ focus: (_value: boolean) => true;
339
+ /** State Changed */
340
+ change: (_value: EditorState) => true;
341
+ /** CodeMirror onDestroy */
342
+ destroy: () => true;
343
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
344
+ /** Model value */
345
+ modelValue: {
346
+ type: PropType<string | Text>;
347
+ default: string;
348
+ };
349
+ /**
350
+ * Theme
351
+ *
352
+ * @see {@link https://codemirror.net/docs/ref/#view.EditorView^theme}
353
+ */
354
+ theme: {
355
+ type: PropType<Record<string, StyleSpec>>;
356
+ default: () => {};
357
+ };
358
+ /** Dark Mode */
359
+ dark: {
360
+ type: BooleanConstructor;
361
+ default: boolean;
362
+ };
363
+ /**
364
+ * Use Basic Setup
365
+ *
366
+ * This will enable the basic setup for the editor.
367
+ *
368
+ * @see {@link https://codemirror.net/docs/ref/#codemirror.basicSetup}
369
+ */
370
+ basic: {
371
+ type: BooleanConstructor;
372
+ default: boolean;
373
+ };
374
+ /**
375
+ * Use Minimal Setup (The basic setting has priority.)
376
+ *
377
+ * @see {@link https://codemirror.net/docs/ref/#codemirror.minimalSetup}
378
+ */
379
+ minimal: {
380
+ type: BooleanConstructor;
381
+ default: boolean;
382
+ };
383
+ /**
384
+ * Placeholder
385
+ *
386
+ * @see {@link https://codemirror.net/docs/ref/#view.placeholder}
387
+ */
388
+ placeholder: {
389
+ type: PropType<string | HTMLElement>;
390
+ default: undefined;
391
+ };
392
+ /**
393
+ * Line wrapping
394
+ *
395
+ * An extension that enables line wrapping in the editor (by setting CSS white-space to pre-wrap in the content).
396
+ *
397
+ * @see {@link https://codemirror.net/docs/ref/#view.EditorView%5ElineWrapping}
398
+ */
399
+ wrap: {
400
+ type: BooleanConstructor;
401
+ default: boolean;
402
+ };
403
+ /**
404
+ * Allow tab key indent.
405
+ *
406
+ * This will enable the tab key to indent the current line or selection.
407
+ *
408
+ * @see {@link https://codemirror.net/examples/tab/}
409
+ */
410
+ tab: {
411
+ type: BooleanConstructor;
412
+ default: boolean;
413
+ };
414
+ /**
415
+ * Tab character
416
+ *
417
+ * This is the unit of indentation used when the editor is configured to indent with tabs.
418
+ * It is also used to determine the size of the tab character when the editor is configured to use tabs for indentation..
419
+ *
420
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^indentUnit}
421
+ */
422
+ indentUnit: {
423
+ type: StringConstructor;
424
+ default: undefined;
425
+ };
426
+ /**
427
+ * Allow Multiple Selection.
428
+ *
429
+ * This allows the editor to have multiple selections at the same time.
430
+ * This is useful for editing multiple parts of the document at once.
431
+ * If this is set to true, the editor will allow multiple selections.
432
+ * If this is set to false, the editor will only allow a single selection.
433
+ *
434
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^allowMultipleSelections}
435
+ */
436
+ allowMultipleSelections: {
437
+ type: BooleanConstructor;
438
+ default: boolean;
439
+ };
440
+ /**
441
+ * Tab size
442
+ *
443
+ * This is the number of spaces that a tab character represents in the editor.
444
+ * It is used to determine the size of the tab character when the editor is configured to use tabs for indentation.
445
+ * If this is set to a number, the editor will use that number of spaces for each tab character.
446
+ *
447
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^tabSize}
448
+ */
449
+ tabSize: {
450
+ type: NumberConstructor;
451
+ default: undefined;
452
+ };
453
+ /**
454
+ * Set line break (separetor) char.
455
+ *
456
+ * This is the character that is used to separate lines in the editor.
457
+ * It is used to determine the line break character when the editor is configured to use a specific line break character.
458
+ *
459
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^lineSeparator}
460
+ */
461
+ lineSeparator: {
462
+ type: StringConstructor;
463
+ default: undefined;
464
+ };
465
+ /**
466
+ * Readonly
467
+ *
468
+ * This is a CodeMirror Facet that allows you to set the editor to read-only mode.
469
+ * When this is set to true, the editor will not allow any changes to be made to the document.
470
+ * This is useful for displaying code that should not be edited, such as documentation or examples.
471
+ * If this is set to false, the editor will allow changes to be made to the document.
472
+ *
473
+ * @see {@link https://codemirror.net/docs/ref/#state.EditorState^readOnly}
474
+ */
475
+ readonly: {
476
+ type: BooleanConstructor;
477
+ default: boolean;
478
+ };
479
+ /**
480
+ * Disable input.
481
+ *
482
+ * This is the reversed value of the CodeMirror editable.
483
+ * Similar to `readonly`, but setting this value to true disables dragging.
484
+ *
485
+ * @see {@link https://codemirror.net/docs/ref/#view.EditorView^editable}
486
+ */
487
+ disabled: {
488
+ type: BooleanConstructor;
489
+ default: boolean;
490
+ };
491
+ /**
492
+ * Additional Extension
493
+ *
494
+ * You can use this to add any additional extensions that you want to use in the editor.
495
+ *
496
+ * @see {@link https://codemirror.net/docs/ref/#state.Extension}
497
+ */
498
+ extensions: {
499
+ type: PropType<Extension[]>;
500
+ default: () => never[];
501
+ };
502
+ /**
503
+ * Language Phreses
504
+ *
505
+ * This is a CodeMirror Facet that allows you to define custom phrases for the editor.
506
+ * It can be used to override default phrases or add new ones.
507
+ * This is useful for translating the editor to different languages or for customizing the editor's UI.
508
+ *
509
+ * @see {@link https://codemirror.net/examples/translate/}
510
+ */
511
+ phrases: {
512
+ type: PropType<Record<string, string>>;
513
+ default: undefined;
514
+ };
515
+ /**
516
+ * CodeMirror Language
517
+ *
518
+ * This is a CodeMirror Facet that allows you to define the language of the editor.
519
+ * It can be used to enable syntax highlighting and other language-specific features.
520
+ * It is useful for displaying code in a specific language, such as JavaScript, Python, or HTML.
521
+ *
522
+ * @see {@link https://codemirror.net/docs/ref/#language}
523
+ */
524
+ lang: {
525
+ type: PropType<LanguageSupport>;
526
+ default: undefined;
527
+ };
528
+ /**
529
+ * CodeMirror Linter
530
+ *
531
+ * This is a CodeMirror Facet that allows you to define a linter for the editor.
532
+ * It can be used to check the code for errors and warnings, and to provide feedback to the user.
533
+ * It is useful for displaying code in a specific language, such as JavaScript, Python, or HTML.
534
+ * This is useful for providing feedback to the user about the code they are writing.
535
+ *
536
+ * @see {@link https://codemirror.net/docs/ref/#lint.linter}
537
+ */
538
+ linter: {
539
+ type: PropType<LintSource>;
540
+ default: undefined;
541
+ };
542
+ /**
543
+ * Linter Config
544
+ *
545
+ * This is a CodeMirror Facet that allows you to define the configuration for the linter.
546
+ * It can be used to specify options for the linter, such as the severity of errors and warnings, and to customize the behavior of the linter.
547
+ * This is useful for providing feedback to the user about the code they are writing.
548
+ *
549
+ * @see {@link https://codemirror.net/docs/ref/#lint.linter^config}
550
+ */
551
+ linterConfig: {
552
+ type: ObjectConstructor;
553
+ default: () => {};
554
+ };
555
+ /**
556
+ * Forces any linters configured to run when the editor is idle to run right away.
557
+ *
558
+ * This is useful for running linters on the initial load of the editor, or when the user has made changes to the code and wants to see the results immediately.
559
+ *
560
+ * @see {@link https://codemirror.net/docs/ref/#lint.forceLinting}
561
+ */
562
+ forceLinting: {
563
+ type: BooleanConstructor;
564
+ default: boolean;
565
+ };
566
+ /**
567
+ * Show Linter Gutter
568
+ *
569
+ * An area to 🔴 the lines with errors will be displayed.
570
+ * This feature is not enabled if `linter` is not specified.
571
+ *
572
+ * @see {@link https://codemirror.net/docs/ref/#lint.lintGutter}
573
+ */
574
+ gutter: {
575
+ type: BooleanConstructor;
576
+ default: boolean;
577
+ };
578
+ /**
579
+ * Gutter Config
580
+ *
581
+ * This is a CodeMirror Facet that allows you to define the configuration for the gutter.
582
+ * It can be used to specify options for the gutter, such as the size of the gutter, the position of the gutter, and to customize the behavior of the gutter.
583
+ * This is useful for providing feedback to the user about the code they are writing.
584
+ *
585
+ * @see {@link https://codemirror.net/docs/ref/#lint.lintGutter^config}
586
+ */
587
+ gutterConfig: {
588
+ type: ObjectConstructor;
589
+ default: undefined;
590
+ };
591
+ /**
592
+ * Using tag
593
+ */
594
+ tag: {
595
+ type: StringConstructor;
596
+ default: string;
597
+ };
598
+ /**
599
+ * Allows an external update to scroll the form.
600
+ *
601
+ * This is useful for scrolling the editor to a specific position when the user has made changes to the code and wants to see the results immediately.
602
+ * If this is set to true, the editor will scroll to the position specified in the transaction.
603
+ * If this is set to false, the editor will not scroll to the position specified in the transaction.
604
+ *
605
+ * @see {@link https://codemirror.net/docs/ref/#state.TransactionSpec.scrollIntoView}
606
+ */
607
+ scrollIntoView: {
608
+ type: BooleanConstructor;
609
+ default: boolean;
610
+ };
611
+ /**
612
+ * Preserve the current scroll position on external updates.
613
+ *
614
+ * This keeps the editor's own scroll container from jumping when
615
+ * `modelValue` is updated from outside the component.
616
+ *
617
+ * @see {@link https://codemirror.net/docs/ref/#view.EditorView.scrollSnapshot}
618
+ */
619
+ preserveScrollPosition: {
620
+ type: BooleanConstructor;
621
+ default: boolean;
622
+ };
623
+ /**
624
+ * Key map
625
+ * This is a CodeMirror Facet that allows you to define custom key bindings.
626
+ * It can be used to override default key bindings or add new ones.
627
+ *
628
+ * @see {@link https://codemirror.net/docs/ref/#view.keymap}
629
+ */
630
+ keymap: {
631
+ type: PropType<KeyBinding[]>;
632
+ default: () => never[];
633
+ };
634
+ }>> & Readonly<{
635
+ onChange?: ((_value: EditorState) => any) | undefined;
636
+ onFocus?: ((_value: boolean) => any) | undefined;
637
+ "onUpdate:modelValue"?: ((_value?: string | Text | undefined) => any) | undefined;
638
+ onUpdate?: ((_value: ViewUpdate) => any) | undefined;
639
+ onReady?: ((_value: {
640
+ view: EditorView;
641
+ state: EditorState;
642
+ container: HTMLElement;
643
+ }) => any) | undefined;
644
+ onDestroy?: (() => any) | undefined;
645
+ }>, {
646
+ modelValue: string | Text;
647
+ theme: Record<string, StyleSpec>;
648
+ dark: boolean;
649
+ basic: boolean;
650
+ minimal: boolean;
651
+ placeholder: string | HTMLElement;
652
+ wrap: boolean;
653
+ tab: boolean;
654
+ indentUnit: string;
655
+ allowMultipleSelections: boolean;
656
+ tabSize: number;
657
+ lineSeparator: string;
658
+ readonly: boolean;
659
+ disabled: boolean;
660
+ extensions: Extension[];
661
+ phrases: Record<string, string>;
662
+ lang: LanguageSupport;
663
+ linter: LintSource;
664
+ linterConfig: Record<string, any>;
665
+ forceLinting: boolean;
666
+ gutter: boolean;
667
+ gutterConfig: Record<string, any>;
668
+ tag: string;
669
+ scrollIntoView: boolean;
670
+ preserveScrollPosition: boolean;
671
+ keymap: KeyBinding[];
672
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
673
+ declare const installCodeMirror: (app: any) => void;
674
+ export { CodeMirror as default, installCodeMirror as install, Meta };
package/dist/index.es.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2022-2026 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.5.0
8
+ * @version 1.5.1
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
@@ -18,8 +18,8 @@ import { basicSetup as p, minimalSetup as m } from "codemirror";
18
18
  import { computed as h, defineComponent as g, h as _, isVue2 as v, nextTick as y, onMounted as b, onUnmounted as x, ref as S, shallowRef as C, watch as w } from "vue-demi";
19
19
  //#region src/Meta.ts
20
20
  var T = {
21
- version: "1.5.0",
22
- date: "2026-03-30T11:56:36.326Z"
21
+ version: "1.5.1",
22
+ date: "2026-04-03T05:31:33.377Z"
23
23
  }, E = (e) => e ? Object.entries(e).reduce((e, [t, n]) => (t = t.charAt(0).toUpperCase() + t.slice(1), t = `on${t}`, {
24
24
  ...e,
25
25
  [t]: n
@@ -5,9 +5,9 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2022-2026 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.5.0
8
+ * @version 1.5.1
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
12
- var CodeMirror=(function(e,t,n,r,i,a,o,s){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var c={version:`1.5.0`,date:`2026-03-30T11:56:36.326Z`},l=e=>e?Object.entries(e).reduce((e,[t,n])=>(t=t.charAt(0).toUpperCase()+t.slice(1),t=`on${t}`,{...e,[t]:n}),{}):{};function u(e,t={},n){if(s.isVue2)return(0,s.h)(e,t,n);let{props:r,domProps:i,on:a,...o}=t,c=a?l(a):{};return(0,s.h)(e,{...o,...r,...i,...c},n)}var d=e=>typeof e==`function`?e():e,f=(0,s.defineComponent)({name:`CodeMirror`,model:{prop:`modelValue`,event:`update:modelValue`},props:{modelValue:{type:String,default:``},theme:{type:Object,default:()=>({})},dark:{type:Boolean,default:!1},basic:{type:Boolean,default:!1},minimal:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},wrap:{type:Boolean,default:!1},tab:{type:Boolean,default:!1},indentUnit:{type:String,default:void 0},allowMultipleSelections:{type:Boolean,default:!1},tabSize:{type:Number,default:void 0},lineSeparator:{type:String,default:void 0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},extensions:{type:Array,default:()=>[]},phrases:{type:Object,default:void 0},lang:{type:Object,default:void 0},linter:{type:Function,default:void 0},linterConfig:{type:Object,default:()=>({})},forceLinting:{type:Boolean,default:!1},gutter:{type:Boolean,default:!1},gutterConfig:{type:Object,default:void 0},tag:{type:String,default:`div`},scrollIntoView:{type:Boolean,default:!0},preserveScrollPosition:{type:Boolean,default:!1},keymap:{type:Array,default:()=>[]}},emits:{"update:modelValue":(e=``)=>!0,update:e=>!0,ready:e=>!0,focus:e=>!0,change:e=>!0,destroy:()=>!0},setup(e,c){let l=(0,s.ref)(),u=(0,s.ref)(e.modelValue),d=(0,s.shallowRef)(void 0),f=(0,s.computed)({get:()=>d.value?.hasFocus??!1,set:e=>{e&&d.value&&d.value.focus()}}),p=(0,s.computed)({get:()=>d.value?.state.selection,set:e=>{d.value&&e&&d.value.dispatch({selection:e})}}),m=(0,s.computed)({get:()=>d.value?.state.selection.main.head??0,set:e=>{d.value&&d.value.dispatch({selection:{anchor:e}})}}),h=(0,s.computed)({get:()=>d.value?.state.toJSON(),set:e=>{d.value&&e&&d.value.setState(i.EditorState.fromJSON(e))}}),g=(0,s.ref)(0),_=(0,s.ref)(0),v=(0,s.computed)(()=>{let s=new i.Compartment,l=new i.Compartment;if(e.basic&&e.minimal)throw Error(`[Vue CodeMirror] Both basic and minimal cannot be specified.`);let u=[];return e.keymap&&e.keymap.length>0&&(u=e.keymap),e.tab&&u.push(t.indentWithTab),[e.basic&&!e.minimal?o.basicSetup:void 0,e.minimal&&!e.basic?o.minimalSetup:void 0,a.EditorView.updateListener.of(t=>{d.value&&(c.emit(`focus`,d.value.hasFocus),g.value=d.value.state.doc?.length,!(t.changes.empty||!t.docChanged)&&(e.linter&&(e.forceLinting&&(0,r.forceLinting)(d.value),_.value=e.linter(d.value).length),c.emit(`update`,t)))}),a.EditorView.theme(e.theme,{dark:e.dark}),e.wrap?a.EditorView.lineWrapping:void 0,e.indentUnit?n.indentUnit.of(e.indentUnit):void 0,i.EditorState.allowMultipleSelections.of(e.allowMultipleSelections),e.tabSize?l.of(i.EditorState.tabSize.of(e.tabSize)):void 0,e.phrases?i.EditorState.phrases.of(e.phrases):void 0,i.EditorState.readOnly.of(e.readonly),a.EditorView.editable.of(!e.disabled),e.lineSeparator?i.EditorState.lineSeparator.of(e.lineSeparator):void 0,e.lang?s.of(e.lang):void 0,e.linter?(0,r.linter)(e.linter,e.linterConfig):void 0,e.linter&&e.gutter?(0,r.lintGutter)(e.gutterConfig):void 0,e.placeholder?(0,a.placeholder)(e.placeholder):void 0,u.length>0?a.keymap.of(u):void 0,...e.extensions].filter(e=>!!e)});(0,s.watch)(v,e=>d.value?.dispatch({effects:i.StateEffect.reconfigure.of(e)}),{immediate:!0}),(0,s.watch)(()=>e.modelValue,async t=>{if(!d.value||d.value.composing||d.value.state.doc.toJSON().join(e.lineSeparator??`
12
+ var CodeMirror=(function(e,t,n,r,i,a,o,s){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var c={version:`1.5.1`,date:`2026-04-03T05:31:33.377Z`},l=e=>e?Object.entries(e).reduce((e,[t,n])=>(t=t.charAt(0).toUpperCase()+t.slice(1),t=`on${t}`,{...e,[t]:n}),{}):{};function u(e,t={},n){if(s.isVue2)return(0,s.h)(e,t,n);let{props:r,domProps:i,on:a,...o}=t,c=a?l(a):{};return(0,s.h)(e,{...o,...r,...i,...c},n)}var d=e=>typeof e==`function`?e():e,f=(0,s.defineComponent)({name:`CodeMirror`,model:{prop:`modelValue`,event:`update:modelValue`},props:{modelValue:{type:String,default:``},theme:{type:Object,default:()=>({})},dark:{type:Boolean,default:!1},basic:{type:Boolean,default:!1},minimal:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},wrap:{type:Boolean,default:!1},tab:{type:Boolean,default:!1},indentUnit:{type:String,default:void 0},allowMultipleSelections:{type:Boolean,default:!1},tabSize:{type:Number,default:void 0},lineSeparator:{type:String,default:void 0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},extensions:{type:Array,default:()=>[]},phrases:{type:Object,default:void 0},lang:{type:Object,default:void 0},linter:{type:Function,default:void 0},linterConfig:{type:Object,default:()=>({})},forceLinting:{type:Boolean,default:!1},gutter:{type:Boolean,default:!1},gutterConfig:{type:Object,default:void 0},tag:{type:String,default:`div`},scrollIntoView:{type:Boolean,default:!0},preserveScrollPosition:{type:Boolean,default:!1},keymap:{type:Array,default:()=>[]}},emits:{"update:modelValue":(e=``)=>!0,update:e=>!0,ready:e=>!0,focus:e=>!0,change:e=>!0,destroy:()=>!0},setup(e,c){let l=(0,s.ref)(),u=(0,s.ref)(e.modelValue),d=(0,s.shallowRef)(void 0),f=(0,s.computed)({get:()=>d.value?.hasFocus??!1,set:e=>{e&&d.value&&d.value.focus()}}),p=(0,s.computed)({get:()=>d.value?.state.selection,set:e=>{d.value&&e&&d.value.dispatch({selection:e})}}),m=(0,s.computed)({get:()=>d.value?.state.selection.main.head??0,set:e=>{d.value&&d.value.dispatch({selection:{anchor:e}})}}),h=(0,s.computed)({get:()=>d.value?.state.toJSON(),set:e=>{d.value&&e&&d.value.setState(i.EditorState.fromJSON(e))}}),g=(0,s.ref)(0),_=(0,s.ref)(0),v=(0,s.computed)(()=>{let s=new i.Compartment,l=new i.Compartment;if(e.basic&&e.minimal)throw Error(`[Vue CodeMirror] Both basic and minimal cannot be specified.`);let u=[];return e.keymap&&e.keymap.length>0&&(u=e.keymap),e.tab&&u.push(t.indentWithTab),[e.basic&&!e.minimal?o.basicSetup:void 0,e.minimal&&!e.basic?o.minimalSetup:void 0,a.EditorView.updateListener.of(t=>{d.value&&(c.emit(`focus`,d.value.hasFocus),g.value=d.value.state.doc?.length,!(t.changes.empty||!t.docChanged)&&(e.linter&&(e.forceLinting&&(0,r.forceLinting)(d.value),_.value=e.linter(d.value).length),c.emit(`update`,t)))}),a.EditorView.theme(e.theme,{dark:e.dark}),e.wrap?a.EditorView.lineWrapping:void 0,e.indentUnit?n.indentUnit.of(e.indentUnit):void 0,i.EditorState.allowMultipleSelections.of(e.allowMultipleSelections),e.tabSize?l.of(i.EditorState.tabSize.of(e.tabSize)):void 0,e.phrases?i.EditorState.phrases.of(e.phrases):void 0,i.EditorState.readOnly.of(e.readonly),a.EditorView.editable.of(!e.disabled),e.lineSeparator?i.EditorState.lineSeparator.of(e.lineSeparator):void 0,e.lang?s.of(e.lang):void 0,e.linter?(0,r.linter)(e.linter,e.linterConfig):void 0,e.linter&&e.gutter?(0,r.lintGutter)(e.gutterConfig):void 0,e.placeholder?(0,a.placeholder)(e.placeholder):void 0,u.length>0?a.keymap.of(u):void 0,...e.extensions].filter(e=>!!e)});(0,s.watch)(v,e=>d.value?.dispatch({effects:i.StateEffect.reconfigure.of(e)}),{immediate:!0}),(0,s.watch)(()=>e.modelValue,async t=>{if(!d.value||d.value.composing||d.value.state.doc.toJSON().join(e.lineSeparator??`
13
13
  `)===t)return;let n=!d.value.state.selection.ranges.every(e=>e.anchor<t.length&&e.head<t.length),r={from:0,to:d.value.state.doc.length,insert:t},i=e.preserveScrollPosition?d.value.scrollSnapshot().map(d.value.state.changes(r)):void 0;d.value.dispatch({changes:r,selection:n?{anchor:0,head:0}:d.value.state.selection,scrollIntoView:e.scrollIntoView,effects:i?[i]:void 0})},{immediate:!0}),(0,s.onMounted)(async()=>{if(globalThis.window===void 0||!l.value)return;let e=u.value;l.value.childNodes[0]&&(u.value!==``&&console.warn("[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."),e=l.value.childNodes[0].innerText.trim()),d.value=new a.EditorView({parent:l.value,state:i.EditorState.create({doc:e,extensions:v.value}),dispatch:e=>{d.value&&(d.value.update([e]),!(e.changes.empty||!e.docChanged)&&(c.emit(`update:modelValue`,e.state.doc.toString()),c.emit(`change`,e.state)))}}),await(0,s.nextTick)(),c.emit(`ready`,{view:d.value,state:d.value.state,container:l.value})}),(0,s.onUnmounted)(()=>{d.value&&(d.value.destroy(),c.emit(`destroy`))});let y={editor:l,view:d,cursor:m,selection:p,focus:f,length:g,json:h,diagnosticCount:_,dom:d.value?.contentDOM,lint:()=>{!e.linter||!d.value||(e.forceLinting&&(0,r.forceLinting)(d.value),_.value=(0,r.diagnosticCount)(d.value.state))},forceReconfigure:()=>{d.value?.dispatch({effects:i.StateEffect.reconfigure.of([])}),d.value?.dispatch({effects:i.StateEffect.appendConfig.of(v.value)})},getRange:(e,t)=>d.value?.state.sliceDoc(e,t),getLine:e=>d.value?.state.doc.line(e+1).text,lineCount:()=>d.value?.state.doc.lines??0,getCursor:()=>d.value?.state.selection.main.head??0,listSelections:()=>d.value?.state.selection.ranges??[],getSelection:()=>d.value?d.value.state.sliceDoc(d.value.state.selection.main.from,d.value.state.selection.main.to):``,getSelections:()=>{let e=d.value?.state;return e?e.selection.ranges.map(t=>e.sliceDoc(t.from,t.to)):[]},somethingSelected:()=>d.value?.state.selection.ranges.some(e=>!e.empty)??!1,replaceRange:(e,t,n)=>{d.value&&d.value.dispatch({changes:{from:t,to:n,insert:e}})},replaceSelection:e=>{d.value&&d.value.dispatch(d.value.state.replaceSelection(e))},setCursor:e=>{d.value&&d.value.dispatch({selection:{anchor:e}})},setSelection:(e,t)=>{d.value&&d.value.dispatch({selection:{anchor:e,head:t}})},setSelections:(e,t)=>{d.value&&d.value.dispatch({selection:i.EditorSelection.create(e,t)})},extendSelectionsBy:e=>{d.value&&p.value&&d.value.dispatch({selection:i.EditorSelection.create(p.value.ranges.map(t=>t.extend(e(t))))})}};return c.expose(y),y},render(){return u(this.$props.tag,{ref:`editor`,class:`vue-codemirror`},this.$slots.default?u(`aside`,{style:`display: none;`,"aria-hidden":`true`},d(this.$slots.default)):void 0)}});return e.Meta=c,e.default=f,e.install=e=>e.component(`CodeMirror`,f),e})({},commands,language,lint,state,view,codemirror,VueDemi);
package/dist/index.umd.js CHANGED
@@ -5,9 +5,9 @@
5
5
  * @author Logue <logue@hotmail.co.jp>
6
6
  * @copyright 2022-2026 By Masashi Yoshikawa All rights reserved.
7
7
  * @license MIT
8
- * @version 1.5.0
8
+ * @version 1.5.1
9
9
  * @see {@link https://github.com/logue/vue-codemirror6}
10
10
  */
11
11
 
12
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@codemirror/commands`),require(`@codemirror/language`),require(`@codemirror/lint`),require(`@codemirror/state`),require(`@codemirror/view`),require(`codemirror`),require(`vue-demi`)):typeof define==`function`&&define.amd?define([`exports`,`@codemirror/commands`,`@codemirror/language`,`@codemirror/lint`,`@codemirror/state`,`@codemirror/view`,`codemirror`,`vue-demi`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.CodeMirror={},e.commands,e.language,e.lint,e.state,e.view,e.codemirror,e.VueDemi))})(this,function(e,t,n,r,i,a,o,s){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var c={version:`1.5.0`,date:`2026-03-30T11:56:36.326Z`},l=e=>e?Object.entries(e).reduce((e,[t,n])=>(t=t.charAt(0).toUpperCase()+t.slice(1),t=`on${t}`,{...e,[t]:n}),{}):{};function u(e,t={},n){if(s.isVue2)return(0,s.h)(e,t,n);let{props:r,domProps:i,on:a,...o}=t,c=a?l(a):{};return(0,s.h)(e,{...o,...r,...i,...c},n)}var d=e=>typeof e==`function`?e():e,f=(0,s.defineComponent)({name:`CodeMirror`,model:{prop:`modelValue`,event:`update:modelValue`},props:{modelValue:{type:String,default:``},theme:{type:Object,default:()=>({})},dark:{type:Boolean,default:!1},basic:{type:Boolean,default:!1},minimal:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},wrap:{type:Boolean,default:!1},tab:{type:Boolean,default:!1},indentUnit:{type:String,default:void 0},allowMultipleSelections:{type:Boolean,default:!1},tabSize:{type:Number,default:void 0},lineSeparator:{type:String,default:void 0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},extensions:{type:Array,default:()=>[]},phrases:{type:Object,default:void 0},lang:{type:Object,default:void 0},linter:{type:Function,default:void 0},linterConfig:{type:Object,default:()=>({})},forceLinting:{type:Boolean,default:!1},gutter:{type:Boolean,default:!1},gutterConfig:{type:Object,default:void 0},tag:{type:String,default:`div`},scrollIntoView:{type:Boolean,default:!0},preserveScrollPosition:{type:Boolean,default:!1},keymap:{type:Array,default:()=>[]}},emits:{"update:modelValue":(e=``)=>!0,update:e=>!0,ready:e=>!0,focus:e=>!0,change:e=>!0,destroy:()=>!0},setup(e,c){let l=(0,s.ref)(),u=(0,s.ref)(e.modelValue),d=(0,s.shallowRef)(void 0),f=(0,s.computed)({get:()=>d.value?.hasFocus??!1,set:e=>{e&&d.value&&d.value.focus()}}),p=(0,s.computed)({get:()=>d.value?.state.selection,set:e=>{d.value&&e&&d.value.dispatch({selection:e})}}),m=(0,s.computed)({get:()=>d.value?.state.selection.main.head??0,set:e=>{d.value&&d.value.dispatch({selection:{anchor:e}})}}),h=(0,s.computed)({get:()=>d.value?.state.toJSON(),set:e=>{d.value&&e&&d.value.setState(i.EditorState.fromJSON(e))}}),g=(0,s.ref)(0),_=(0,s.ref)(0),v=(0,s.computed)(()=>{let s=new i.Compartment,l=new i.Compartment;if(e.basic&&e.minimal)throw Error(`[Vue CodeMirror] Both basic and minimal cannot be specified.`);let u=[];return e.keymap&&e.keymap.length>0&&(u=e.keymap),e.tab&&u.push(t.indentWithTab),[e.basic&&!e.minimal?o.basicSetup:void 0,e.minimal&&!e.basic?o.minimalSetup:void 0,a.EditorView.updateListener.of(t=>{d.value&&(c.emit(`focus`,d.value.hasFocus),g.value=d.value.state.doc?.length,!(t.changes.empty||!t.docChanged)&&(e.linter&&(e.forceLinting&&(0,r.forceLinting)(d.value),_.value=e.linter(d.value).length),c.emit(`update`,t)))}),a.EditorView.theme(e.theme,{dark:e.dark}),e.wrap?a.EditorView.lineWrapping:void 0,e.indentUnit?n.indentUnit.of(e.indentUnit):void 0,i.EditorState.allowMultipleSelections.of(e.allowMultipleSelections),e.tabSize?l.of(i.EditorState.tabSize.of(e.tabSize)):void 0,e.phrases?i.EditorState.phrases.of(e.phrases):void 0,i.EditorState.readOnly.of(e.readonly),a.EditorView.editable.of(!e.disabled),e.lineSeparator?i.EditorState.lineSeparator.of(e.lineSeparator):void 0,e.lang?s.of(e.lang):void 0,e.linter?(0,r.linter)(e.linter,e.linterConfig):void 0,e.linter&&e.gutter?(0,r.lintGutter)(e.gutterConfig):void 0,e.placeholder?(0,a.placeholder)(e.placeholder):void 0,u.length>0?a.keymap.of(u):void 0,...e.extensions].filter(e=>!!e)});(0,s.watch)(v,e=>d.value?.dispatch({effects:i.StateEffect.reconfigure.of(e)}),{immediate:!0}),(0,s.watch)(()=>e.modelValue,async t=>{if(!d.value||d.value.composing||d.value.state.doc.toJSON().join(e.lineSeparator??`
12
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`@codemirror/commands`),require(`@codemirror/language`),require(`@codemirror/lint`),require(`@codemirror/state`),require(`@codemirror/view`),require(`codemirror`),require(`vue-demi`)):typeof define==`function`&&define.amd?define([`exports`,`@codemirror/commands`,`@codemirror/language`,`@codemirror/lint`,`@codemirror/state`,`@codemirror/view`,`codemirror`,`vue-demi`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.CodeMirror={},e.commands,e.language,e.lint,e.state,e.view,e.codemirror,e.VueDemi))})(this,function(e,t,n,r,i,a,o,s){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var c={version:`1.5.1`,date:`2026-04-03T05:31:33.377Z`},l=e=>e?Object.entries(e).reduce((e,[t,n])=>(t=t.charAt(0).toUpperCase()+t.slice(1),t=`on${t}`,{...e,[t]:n}),{}):{};function u(e,t={},n){if(s.isVue2)return(0,s.h)(e,t,n);let{props:r,domProps:i,on:a,...o}=t,c=a?l(a):{};return(0,s.h)(e,{...o,...r,...i,...c},n)}var d=e=>typeof e==`function`?e():e,f=(0,s.defineComponent)({name:`CodeMirror`,model:{prop:`modelValue`,event:`update:modelValue`},props:{modelValue:{type:String,default:``},theme:{type:Object,default:()=>({})},dark:{type:Boolean,default:!1},basic:{type:Boolean,default:!1},minimal:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},wrap:{type:Boolean,default:!1},tab:{type:Boolean,default:!1},indentUnit:{type:String,default:void 0},allowMultipleSelections:{type:Boolean,default:!1},tabSize:{type:Number,default:void 0},lineSeparator:{type:String,default:void 0},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},extensions:{type:Array,default:()=>[]},phrases:{type:Object,default:void 0},lang:{type:Object,default:void 0},linter:{type:Function,default:void 0},linterConfig:{type:Object,default:()=>({})},forceLinting:{type:Boolean,default:!1},gutter:{type:Boolean,default:!1},gutterConfig:{type:Object,default:void 0},tag:{type:String,default:`div`},scrollIntoView:{type:Boolean,default:!0},preserveScrollPosition:{type:Boolean,default:!1},keymap:{type:Array,default:()=>[]}},emits:{"update:modelValue":(e=``)=>!0,update:e=>!0,ready:e=>!0,focus:e=>!0,change:e=>!0,destroy:()=>!0},setup(e,c){let l=(0,s.ref)(),u=(0,s.ref)(e.modelValue),d=(0,s.shallowRef)(void 0),f=(0,s.computed)({get:()=>d.value?.hasFocus??!1,set:e=>{e&&d.value&&d.value.focus()}}),p=(0,s.computed)({get:()=>d.value?.state.selection,set:e=>{d.value&&e&&d.value.dispatch({selection:e})}}),m=(0,s.computed)({get:()=>d.value?.state.selection.main.head??0,set:e=>{d.value&&d.value.dispatch({selection:{anchor:e}})}}),h=(0,s.computed)({get:()=>d.value?.state.toJSON(),set:e=>{d.value&&e&&d.value.setState(i.EditorState.fromJSON(e))}}),g=(0,s.ref)(0),_=(0,s.ref)(0),v=(0,s.computed)(()=>{let s=new i.Compartment,l=new i.Compartment;if(e.basic&&e.minimal)throw Error(`[Vue CodeMirror] Both basic and minimal cannot be specified.`);let u=[];return e.keymap&&e.keymap.length>0&&(u=e.keymap),e.tab&&u.push(t.indentWithTab),[e.basic&&!e.minimal?o.basicSetup:void 0,e.minimal&&!e.basic?o.minimalSetup:void 0,a.EditorView.updateListener.of(t=>{d.value&&(c.emit(`focus`,d.value.hasFocus),g.value=d.value.state.doc?.length,!(t.changes.empty||!t.docChanged)&&(e.linter&&(e.forceLinting&&(0,r.forceLinting)(d.value),_.value=e.linter(d.value).length),c.emit(`update`,t)))}),a.EditorView.theme(e.theme,{dark:e.dark}),e.wrap?a.EditorView.lineWrapping:void 0,e.indentUnit?n.indentUnit.of(e.indentUnit):void 0,i.EditorState.allowMultipleSelections.of(e.allowMultipleSelections),e.tabSize?l.of(i.EditorState.tabSize.of(e.tabSize)):void 0,e.phrases?i.EditorState.phrases.of(e.phrases):void 0,i.EditorState.readOnly.of(e.readonly),a.EditorView.editable.of(!e.disabled),e.lineSeparator?i.EditorState.lineSeparator.of(e.lineSeparator):void 0,e.lang?s.of(e.lang):void 0,e.linter?(0,r.linter)(e.linter,e.linterConfig):void 0,e.linter&&e.gutter?(0,r.lintGutter)(e.gutterConfig):void 0,e.placeholder?(0,a.placeholder)(e.placeholder):void 0,u.length>0?a.keymap.of(u):void 0,...e.extensions].filter(e=>!!e)});(0,s.watch)(v,e=>d.value?.dispatch({effects:i.StateEffect.reconfigure.of(e)}),{immediate:!0}),(0,s.watch)(()=>e.modelValue,async t=>{if(!d.value||d.value.composing||d.value.state.doc.toJSON().join(e.lineSeparator??`
13
13
  `)===t)return;let n=!d.value.state.selection.ranges.every(e=>e.anchor<t.length&&e.head<t.length),r={from:0,to:d.value.state.doc.length,insert:t},i=e.preserveScrollPosition?d.value.scrollSnapshot().map(d.value.state.changes(r)):void 0;d.value.dispatch({changes:r,selection:n?{anchor:0,head:0}:d.value.state.selection,scrollIntoView:e.scrollIntoView,effects:i?[i]:void 0})},{immediate:!0}),(0,s.onMounted)(async()=>{if(globalThis.window===void 0||!l.value)return;let e=u.value;l.value.childNodes[0]&&(u.value!==``&&console.warn("[CodeMirror.vue] The <code-mirror> tag contains child elements that overwrite the `v-model` values."),e=l.value.childNodes[0].innerText.trim()),d.value=new a.EditorView({parent:l.value,state:i.EditorState.create({doc:e,extensions:v.value}),dispatch:e=>{d.value&&(d.value.update([e]),!(e.changes.empty||!e.docChanged)&&(c.emit(`update:modelValue`,e.state.doc.toString()),c.emit(`change`,e.state)))}}),await(0,s.nextTick)(),c.emit(`ready`,{view:d.value,state:d.value.state,container:l.value})}),(0,s.onUnmounted)(()=>{d.value&&(d.value.destroy(),c.emit(`destroy`))});let y={editor:l,view:d,cursor:m,selection:p,focus:f,length:g,json:h,diagnosticCount:_,dom:d.value?.contentDOM,lint:()=>{!e.linter||!d.value||(e.forceLinting&&(0,r.forceLinting)(d.value),_.value=(0,r.diagnosticCount)(d.value.state))},forceReconfigure:()=>{d.value?.dispatch({effects:i.StateEffect.reconfigure.of([])}),d.value?.dispatch({effects:i.StateEffect.appendConfig.of(v.value)})},getRange:(e,t)=>d.value?.state.sliceDoc(e,t),getLine:e=>d.value?.state.doc.line(e+1).text,lineCount:()=>d.value?.state.doc.lines??0,getCursor:()=>d.value?.state.selection.main.head??0,listSelections:()=>d.value?.state.selection.ranges??[],getSelection:()=>d.value?d.value.state.sliceDoc(d.value.state.selection.main.from,d.value.state.selection.main.to):``,getSelections:()=>{let e=d.value?.state;return e?e.selection.ranges.map(t=>e.sliceDoc(t.from,t.to)):[]},somethingSelected:()=>d.value?.state.selection.ranges.some(e=>!e.empty)??!1,replaceRange:(e,t,n)=>{d.value&&d.value.dispatch({changes:{from:t,to:n,insert:e}})},replaceSelection:e=>{d.value&&d.value.dispatch(d.value.state.replaceSelection(e))},setCursor:e=>{d.value&&d.value.dispatch({selection:{anchor:e}})},setSelection:(e,t)=>{d.value&&d.value.dispatch({selection:{anchor:e,head:t}})},setSelections:(e,t)=>{d.value&&d.value.dispatch({selection:i.EditorSelection.create(e,t)})},extendSelectionsBy:e=>{d.value&&p.value&&d.value.dispatch({selection:i.EditorSelection.create(p.value.ranges.map(t=>t.extend(e(t))))})}};return c.expose(y),y},render(){return u(this.$props.tag,{ref:`editor`,class:`vue-codemirror`},this.$slots.default?u(`aside`,{style:`display: none;`,"aria-hidden":`true`},d(this.$slots.default)):void 0)}});e.Meta=c,e.default=f,e.install=e=>e.component(`CodeMirror`,f)});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "vue-codemirror6",
4
- "version": "1.5.0",
4
+ "version": "1.5.1",
5
5
  "license": "MIT",
6
6
  "description": "CodeMirror6 Component for vue2 and vue3.",
7
7
  "keywords": [
@@ -73,7 +73,7 @@
73
73
  "lint:eslint": "eslint . --fix --cache --cache-location ./node_modules/.vite/eslint-cache",
74
74
  "lint:prettier": "prettier \"./**/*.{js,ts,json,css,sass,scss,htm,html,vue,md}\" -w -u",
75
75
  "preview": "vite preview --mode=docs",
76
- "build-only": "vite build",
76
+ "build-only": "vite build && node scripts/sync-dts-entry.mjs",
77
77
  "type-check": "vue-tsc --declaration --emitDeclarationOnly",
78
78
  "test": "vitest",
79
79
  "test:ui": "vitest --ui",
@@ -108,7 +108,7 @@
108
108
  "@codemirror/lint": "^6.9.5",
109
109
  "@codemirror/search": "^6.6.0",
110
110
  "@codemirror/state": "^6.6.0",
111
- "@codemirror/view": "^6.40.0",
111
+ "@codemirror/view": "^6.41.0",
112
112
  "@tsconfig/node-lts": "^24.0.0",
113
113
  "@types/node": "^25.5.0",
114
114
  "@vitejs/plugin-vue": "^6.0.5",
@@ -126,7 +126,7 @@
126
126
  "eslint-import-resolver-typescript": "^4.4.4",
127
127
  "eslint-linter-browserify": "^10.1.0",
128
128
  "eslint-plugin-import-x": "^4.16.2",
129
- "eslint-plugin-oxlint": "^1.57.0",
129
+ "eslint-plugin-oxlint": "^1.58.0",
130
130
  "eslint-plugin-playwright": "^2.10.1",
131
131
  "eslint-plugin-security": "^4.0.0",
132
132
  "eslint-plugin-vue": "^10.8.0",
@@ -136,15 +136,15 @@
136
136
  "jiti": "^2.6.1",
137
137
  "lint-staged": "^16.4.0",
138
138
  "npm-run-all2": "^8.0.4",
139
- "oxlint": "^1.57.0",
139
+ "oxlint": "^1.58.0",
140
140
  "prettier": "^3.8.1",
141
141
  "rimraf": "^6.1.3",
142
142
  "rollup-plugin-visualizer": "^7.0.1",
143
- "sass-embedded": "^1.98.0",
143
+ "sass-embedded": "^1.99.0",
144
144
  "style-mod": "^4.1.3",
145
145
  "supports-color": "^10.2.2",
146
146
  "typescript": "^6.0.2",
147
- "typescript-eslint": "^8.57.2",
147
+ "typescript-eslint": "^8.58.0",
148
148
  "vite": "^8.0.3",
149
149
  "vite-plugin-banner": "^0.8.1",
150
150
  "vite-plugin-checker": "^0.12.0",