From 327fe211ff8594e0cdaba937d1a0c8450d7bf52c Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 11 May 2025 13:13:47 +0300 Subject: [PATCH] chore(code): integrate Vue support --- packages/codemirror/package.json | 1 + .../codemirror/src/syntax_highlighting.ts | 2 +- pnpm-lock.yaml | 59 +++++++++++++++++-- 3 files changed, 55 insertions(+), 7 deletions(-) diff --git a/packages/codemirror/package.json b/packages/codemirror/package.json index 43109981c..e95a3cc56 100644 --- a/packages/codemirror/package.json +++ b/packages/codemirror/package.json @@ -22,6 +22,7 @@ "@codemirror/commands": "6.8.1", "@codemirror/lang-markdown": "6.3.2", "@codemirror/lang-php": "6.0.1", + "@codemirror/lang-vue": "0.1.3", "@codemirror/legacy-modes": "6.5.1", "@codemirror/search": "6.5.10", "@codemirror/view": "6.36.7", diff --git a/packages/codemirror/src/syntax_highlighting.ts b/packages/codemirror/src/syntax_highlighting.ts index fb7f9e9f5..7f2e4c75b 100644 --- a/packages/codemirror/src/syntax_highlighting.ts +++ b/packages/codemirror/src/syntax_highlighting.ts @@ -160,7 +160,7 @@ const byMimeType: Record Promise | Language "text/x-vb": async () => (await import('@codemirror/legacy-modes/mode/vb')).vb, "text/x-verilog": async () => (await import('@codemirror/legacy-modes/mode/verilog')).verilog, "text/x-vhdl": async () => (await import('@codemirror/legacy-modes/mode/vhdl')).vhdl, - "text/x-vue": null, + "text/x-vue": async () => ((await import('@codemirror/lang-vue')).vue()), "text/x-webidl": async () => (await import('@codemirror/legacy-modes/mode/webidl')).webIDL, "text/x-xu": async () => (await import('@codemirror/legacy-modes/mode/mscgen')).xu, "text/x-yacas": async () => (await import('@codemirror/legacy-modes/mode/yacas')).yacas, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b3648501f..4910773df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1163,6 +1163,9 @@ importers: '@codemirror/lang-php': specifier: 6.0.1 version: 6.0.1 + '@codemirror/lang-vue': + specifier: 0.1.3 + version: 0.1.3 '@codemirror/legacy-modes': specifier: 6.5.1 version: 6.5.1 @@ -2181,6 +2184,9 @@ packages: '@codemirror/lang-php@6.0.1': resolution: {integrity: sha512-ublojMdw/PNWa7qdN5TMsjmqkNuTBD3k6ndZ4Z0S25SBAiweFGyY68AS3xNcIOlb6DDFDvKlinLQ40vSLqf8xA==} + '@codemirror/lang-vue@0.1.3': + resolution: {integrity: sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==} + '@codemirror/language@6.11.0': resolution: {integrity: sha512-A7+f++LodNNc1wGgoRDTt78cOwWm9KVezApgjOMp1W4hM0898nsqBXwF+sbePE7ZRcjN7Sa1Z5m2oN27XkmEjQ==} @@ -15059,6 +15065,14 @@ snapshots: - supports-color - utf-8-validate + '@ckeditor/ckeditor5-alignment@45.0.0': + dependencies: + '@ckeditor/ckeditor5-core': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-icons': 45.0.0 + '@ckeditor/ckeditor5-ui': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-utils': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + ckeditor5: 45.0.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41) + '@ckeditor/ckeditor5-alignment@45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5)': dependencies: '@ckeditor/ckeditor5-core': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) @@ -15071,6 +15085,15 @@ snapshots: - supports-color - utf-8-validate + '@ckeditor/ckeditor5-autoformat@45.0.0': + dependencies: + '@ckeditor/ckeditor5-core': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-engine': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-heading': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-typing': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-utils': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + ckeditor5: 45.0.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41) + '@ckeditor/ckeditor5-autoformat@45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5)': dependencies: '@ckeditor/ckeditor5-core': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) @@ -15084,6 +15107,13 @@ snapshots: - supports-color - utf-8-validate + '@ckeditor/ckeditor5-autosave@45.0.0': + dependencies: + '@ckeditor/ckeditor5-core': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-utils': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + ckeditor5: 45.0.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41) + es-toolkit: 1.32.0 + '@ckeditor/ckeditor5-autosave@45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5)': dependencies: '@ckeditor/ckeditor5-core': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) @@ -15717,6 +15747,14 @@ snapshots: - supports-color - utf-8-validate + '@ckeditor/ckeditor5-highlight@45.0.0': + dependencies: + '@ckeditor/ckeditor5-core': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-icons': 45.0.0 + '@ckeditor/ckeditor5-ui': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-utils': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + ckeditor5: 45.0.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41) + '@ckeditor/ckeditor5-highlight@45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5)': dependencies: '@ckeditor/ckeditor5-core': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) @@ -16154,7 +16192,7 @@ snapshots: '@ckeditor/ckeditor5-revision-history@45.0.0': dependencies: - '@ckeditor/ckeditor5-autosave': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-autosave': 45.0.0 '@ckeditor/ckeditor5-comments': 45.0.0 '@ckeditor/ckeditor5-core': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) '@ckeditor/ckeditor5-editor-classic': 45.0.0 @@ -16312,7 +16350,7 @@ snapshots: '@ckeditor/ckeditor5-find-and-replace': 45.0.0 '@ckeditor/ckeditor5-font': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) '@ckeditor/ckeditor5-heading': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) - '@ckeditor/ckeditor5-highlight': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-highlight': 45.0.0 '@ckeditor/ckeditor5-icons': 45.0.0 '@ckeditor/ckeditor5-image': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) '@ckeditor/ckeditor5-link': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) @@ -16497,6 +16535,15 @@ snapshots: '@lezer/common': 1.2.3 '@lezer/php': 1.0.2 + '@codemirror/lang-vue@0.1.3': + dependencies: + '@codemirror/lang-html': 6.4.9 + '@codemirror/lang-javascript': 6.2.3 + '@codemirror/language': 6.11.0 + '@lezer/common': 1.2.3 + '@lezer/highlight': 1.2.1 + '@lezer/lr': 1.4.2 + '@codemirror/language@6.11.0': dependencies: '@codemirror/state': 6.5.2 @@ -21723,9 +21770,9 @@ snapshots: ckeditor5@45.0.0(patch_hash=8331a09d41443b39ea1c784daaccfeb0da4f9065ed556e7de92e9c77edd9eb41): dependencies: '@ckeditor/ckeditor5-adapter-ckfinder': 45.0.0 - '@ckeditor/ckeditor5-alignment': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) - '@ckeditor/ckeditor5-autoformat': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) - '@ckeditor/ckeditor5-autosave': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-alignment': 45.0.0 + '@ckeditor/ckeditor5-autoformat': 45.0.0 + '@ckeditor/ckeditor5-autosave': 45.0.0 '@ckeditor/ckeditor5-basic-styles': 45.0.0 '@ckeditor/ckeditor5-block-quote': 45.0.0 '@ckeditor/ckeditor5-bookmark': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) @@ -21749,7 +21796,7 @@ snapshots: '@ckeditor/ckeditor5-font': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) '@ckeditor/ckeditor5-fullscreen': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) '@ckeditor/ckeditor5-heading': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) - '@ckeditor/ckeditor5-highlight': 45.0.0(bufferutil@4.0.9)(utf-8-validate@6.0.5) + '@ckeditor/ckeditor5-highlight': 45.0.0 '@ckeditor/ckeditor5-horizontal-line': 45.0.0 '@ckeditor/ckeditor5-html-embed': 45.0.0 '@ckeditor/ckeditor5-html-support': 45.0.0