Skip to content

Commit 7286703

Browse files
committed
chore: update packages and playground
1 parent d7b3dda commit 7286703

File tree

8 files changed

+4366
-4512
lines changed

8 files changed

+4366
-4512
lines changed

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"pkief.material-icon-theme",
99
"johnsoncodehk.vscode-tsconfig-helper",
1010
"christian-kohler.path-intellisense",
11-
"github.copilot",
1211
"usernamehw.errorlens",
1312
"yoavbls.pretty-ts-errors",
1413
"antfu.iconify",

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"workbench.preferredDarkColorTheme": "Default Dark+",
1515
"workbench.preferredLightColorTheme": "Default Dark+",
1616
"workbench.productIconTheme": "Default",
17-
"workbench.sideBar.location": "right",
17+
"workbench.sideBar.location": "left",
18+
"workbench.activityBar.orientation": "vertical",
1819
"workbench.startupEditor": "newUntitledFile",
1920
"workbench.tree.expandMode": "singleClick",
2021
"workbench.tree.indent": 25,

package.json

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,35 @@
3434
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
3535
},
3636
"dependencies": {
37-
"@babel/runtime": "^7.26.0",
38-
"@codemirror/commands": "^6.7.1",
39-
"@codemirror/state": "6.5.0",
37+
"@babel/runtime": "^7.26.10",
38+
"@codemirror/autocomplete": "^6.18.6",
39+
"@codemirror/commands": "^6.8.0",
40+
"@codemirror/language": "^6.10.8",
41+
"@codemirror/lint": "^6.8.4",
42+
"@codemirror/search": "^6.5.10",
43+
"@codemirror/state": "6.5.2",
4044
"@codemirror/theme-one-dark": "^6.1.2",
41-
"@codemirror/view": "6.36.1",
42-
"@nuxt/kit": "^3.15.0",
43-
"@uiw/codemirror-extensions-basic-setup": "^4.23.7"
45+
"@codemirror/view": "6.36.4",
46+
"@nuxt/kit": "^3.16.0"
4447
},
4548
"devDependencies": {
46-
"@nuxt/devtools": "^1.7.0",
47-
"@nuxt/eslint-config": "^0.7.4",
49+
"@nuxt/devtools": "^2.2.1",
50+
"@nuxt/eslint-config": "^1.2.0",
4851
"@nuxt/module-builder": "^0.8.4",
49-
"@nuxt/schema": "^3.15.0",
50-
"@nuxt/test-utils": "^3.15.1",
51-
"@types/node": "^22.10.2",
52-
"changelogen": "^0.5.7",
53-
"eslint": "^9.17.0",
54-
"nuxt": "^3.15.0",
55-
"typescript": "^5.7.2",
56-
"vitest": "^2.1.8",
57-
"vue-tsc": "^2.2.0"
52+
"@nuxt/schema": "^3.16.0",
53+
"@nuxt/test-utils": "^3.17.2",
54+
"@types/node": "^22.13.10",
55+
"changelogen": "^0.6.1",
56+
"eslint": "^9.22.0",
57+
"nuxt": "^3.16.0",
58+
"typescript": "^5.8.2",
59+
"vitest": "^3.0.8",
60+
"vue-tsc": "^2.2.8"
5861
},
5962
"keywords": [
6063
"nuxt",
6164
"codemirror",
6265
"vue"
6366
],
64-
"packageManager": "pnpm@9.15.9"
67+
"packageManager": "pnpm@10.6.2"
6568
}

playground/app.vue

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
<script setup lang="ts">
22
import { javascript } from '@codemirror/lang-javascript'
3-
import { lineNumbersRelative } from '@uiw/codemirror-extensions-line-numbers-relative'
4-
import { okaidia } from '@uiw/codemirror-theme-okaidia'
5-
63
import type { ViewUpdate } from '@codemirror/view'
4+
import { lineNumbersRelative } from '@uiw/codemirror-extensions-line-numbers-relative'
75
import type { CodeMirrorRef, Statistics } from '../src/runtime/types/nuxt-codemirror'
86
97
const code = ref('console.log("Hello, CodeMirror!");')
108
// const theme = ref<'light' | 'dark' | 'none'>('light')
119
const codemirror = ref<CodeMirrorRef>()
1210
13-
const extensions = [lineNumbersRelative, javascript({ jsx: true, typescript: true })]
14-
1511
const handleChange = (value: string, viewUpdate: ViewUpdate) => {
1612
console.log('Value changed:', value)
1713
console.log('View updated:', viewUpdate)
@@ -41,24 +37,23 @@ onMounted(() => {
4137
</script>
4238

4339
<template>
44-
<NuxtCodeMirror
45-
ref="codemirror"
46-
v-model="code"
47-
:extensions="extensions"
48-
style="width: 500px; height: 400px;"
49-
:theme="okaidia"
50-
placeholder="Enter your code here..."
51-
:auto-focus="true"
52-
:editable="true"
53-
:basic-setup="true"
54-
:indent-with-tab="true"
55-
@on-change="handleChange"
56-
@statistics="handleStatistics"
57-
@on-update="handleUpdate"
58-
/>
59-
<div>{{ code }}</div>
60-
<input
61-
v-model="code"
62-
type="text"
63-
>
40+
<NuxtCodeMirror
41+
ref="codemirror"
42+
v-model="code"
43+
:extensions="[lineNumbersRelative, javascript()]"
44+
style="width: 500px; height: 400px;"
45+
placeholder="Enter your code here..."
46+
:auto-focus="true"
47+
:basic-setup="true"
48+
:editable="true"
49+
:indent-with-tab="true"
50+
@on-change="handleChange"
51+
@statistics="handleStatistics"
52+
@on-update="handleUpdate"
53+
/>
54+
<div>{{ code }}</div>
55+
<input
56+
v-model="code"
57+
type="text"
58+
>
6459
</template>

playground/package.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@
88
"generate": "nuxi generate"
99
},
1010
"dependencies": {
11-
"@codemirror/lang-javascript": "^6.2.2",
12-
"@nuxt/kit": "^3.15.0",
13-
"@uiw/codemirror-extensions-line-numbers-relative": "^4.23.7",
14-
"@uiw/codemirror-theme-okaidia": "^4.23.7",
15-
"nuxt": "^3.15.0"
11+
"@codemirror/lang-javascript": "^6.2.3",
12+
"@codemirror/language": "^6.10.8",
13+
"@nuxt/kit": "^3.16.0",
14+
"@uiw/codemirror-extensions-line-numbers-relative": "^4.23.10",
15+
"@uiw/codemirror-theme-okaidia": "^4.23.10",
16+
"@codemirror/autocomplete": "^6.18.6",
17+
"@codemirror/commands": "^6.8.0",
18+
"@codemirror/lint": "^6.8.4",
19+
"@codemirror/search": "^6.5.10",
20+
"@codemirror/state": "6.5.2",
21+
"@codemirror/view": "6.36.4",
22+
"codemirror": "^6.0.1",
23+
"nuxt": "^3.16.0"
1624
}
1725
}

0 commit comments

Comments
 (0)