This commit is contained in:
kakkokari-gtyih 2024-12-22 19:18:28 +09:00
parent cbbf227cd9
commit 37822db655
3 changed files with 14 additions and 23 deletions

View File

@ -72,7 +72,6 @@
"uuid": "10.0.0",
"v-code-diff": "1.13.1",
"vite": "5.4.11",
"vscode-oniguruma": "2.0.1",
"vue": "3.5.12",
"vuedraggable": "next"
},

View File

@ -4,7 +4,7 @@
*/
import { createHighlighterCore } from 'shiki/core';
import { createOnigurumaEngine } from 'shiki/engine/oniguruma';
import { createOnigurumaEngine, loadWasm } from 'shiki/engine/oniguruma';
import darkPlus from 'shiki/themes/dark-plus.mjs';
import { bundledThemesInfo } from 'shiki/themes';
import { bundledLanguagesInfo } from 'shiki/langs';
@ -69,7 +69,7 @@ async function initHighlighter() {
const jsLangInfo = bundledLanguagesInfo.find(t => t.id === 'javascript');
const highlighter = await createHighlighterCore({
engine: createOnigurumaEngine(() => import('vscode-oniguruma/release/onig.wasm?init')),
engine: createOnigurumaEngine(() => import('shiki/onig.wasm?init')),
themes,
langs: [
...(jsLangInfo ? [async () => await jsLangInfo.import()] : []),

32
pnpm-lock.yaml generated
View File

@ -856,9 +856,6 @@ importers:
vite:
specifier: 5.4.11
version: 5.4.11(@types/node@22.9.0)(sass@1.79.3)(terser@5.36.0)
vscode-oniguruma:
specifier: 2.0.1
version: 2.0.1
vue:
specifier: 3.5.12
version: 3.5.12(typescript@5.6.3)
@ -10925,9 +10922,6 @@ packages:
resolution: {integrity: sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==}
hasBin: true
vscode-oniguruma@2.0.1:
resolution: {integrity: sha512-poJU8iHIWnC3vgphJnrLZyI3YdqRlR27xzqDmpPXYzA93R4Gk8z7T6oqDzDoHjoikA2aS82crdXFkjELCdJsjQ==}
vscode-uri@3.0.8:
resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==}
@ -11806,7 +11800,7 @@ snapshots:
'@babel/traverse': 7.24.7
'@babel/types': 7.24.7
convert-source-map: 2.0.0
debug: 4.3.7(supports-color@8.1.1)
debug: 4.3.7(supports-color@5.5.0)
gensync: 1.0.0-beta.2
json5: 2.2.3
semver: 6.3.1
@ -12080,7 +12074,7 @@ snapshots:
'@babel/helper-split-export-declaration': 7.24.7
'@babel/parser': 7.25.6
'@babel/types': 7.25.6
debug: 4.3.7(supports-color@8.1.1)
debug: 4.3.7(supports-color@5.5.0)
globals: 11.12.0
transitivePeerDependencies:
- supports-color
@ -12471,7 +12465,7 @@ snapshots:
'@eslint/config-array@0.18.0':
dependencies:
'@eslint/object-schema': 2.1.4
debug: 4.3.7(supports-color@8.1.1)
debug: 4.3.7(supports-color@5.5.0)
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
@ -12481,7 +12475,7 @@ snapshots:
'@eslint/eslintrc@3.1.0':
dependencies:
ajv: 6.12.6
debug: 4.3.7(supports-color@8.1.1)
debug: 4.3.7(supports-color@5.5.0)
espree: 10.3.0
globals: 14.0.0
ignore: 5.3.1
@ -15650,7 +15644,7 @@ snapshots:
agent-base@7.1.0:
dependencies:
debug: 4.3.5
debug: 4.3.7(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
@ -17254,7 +17248,7 @@ snapshots:
esbuild-register@3.5.0(esbuild@0.24.0):
dependencies:
debug: 4.3.7(supports-color@8.1.1)
debug: 4.3.7(supports-color@5.5.0)
esbuild: 0.24.0
transitivePeerDependencies:
- supports-color
@ -17496,7 +17490,7 @@ snapshots:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
debug: 4.3.7(supports-color@8.1.1)
debug: 4.3.7(supports-color@5.5.0)
escape-string-regexp: 4.0.0
eslint-scope: 8.2.0
eslint-visitor-keys: 4.2.0
@ -17941,7 +17935,7 @@ snapshots:
follow-redirects@1.15.9(debug@4.3.7):
optionalDependencies:
debug: 4.3.7(supports-color@8.1.1)
debug: 4.3.7(supports-color@5.5.0)
for-each@0.3.3:
dependencies:
@ -18411,7 +18405,7 @@ snapshots:
http-proxy-agent@7.0.2:
dependencies:
agent-base: 7.1.0
debug: 4.3.5
debug: 4.3.7(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
@ -18465,7 +18459,7 @@ snapshots:
https-proxy-agent@7.0.5:
dependencies:
agent-base: 7.1.0
debug: 4.3.5
debug: 4.3.7(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
@ -19913,7 +19907,7 @@ snapshots:
micromark@4.0.0:
dependencies:
'@types/debug': 4.1.12
debug: 4.3.7(supports-color@8.1.1)
debug: 4.3.7(supports-color@5.5.0)
decode-named-character-reference: 1.0.2
devlop: 1.1.0
micromark-core-commonmark: 2.0.0
@ -21907,7 +21901,7 @@ snapshots:
arg: 5.0.2
bluebird: 3.7.2
check-more-types: 2.24.0
debug: 4.3.7(supports-color@8.1.1)
debug: 4.3.7(supports-color@5.5.0)
execa: 5.1.1
lazy-ass: 1.6.0
ps-tree: 1.2.0
@ -22813,8 +22807,6 @@ snapshots:
dependencies:
vscode-languageserver-protocol: 3.17.5
vscode-oniguruma@2.0.1: {}
vscode-uri@3.0.8: {}
vue-component-meta@2.0.16(typescript@5.6.3):