@vue/language-service 3.0.4 → 3.0.5
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/index.d.ts +1 -1
- package/index.js +21 -15
- package/lib/data.d.ts +4 -0
- package/lib/data.js +148 -0
- package/lib/plugins/css.js +1 -1
- package/lib/plugins/typescript-semantic-tokens.d.ts +1 -1
- package/lib/plugins/typescript-semantic-tokens.js +3 -3
- package/lib/plugins/utils.d.ts +2 -8
- package/lib/plugins/utils.js +6 -39
- package/lib/plugins/vue-autoinsert-dotvalue.d.ts +1 -1
- package/lib/plugins/vue-autoinsert-dotvalue.js +8 -19
- package/lib/plugins/vue-autoinsert-space.js +2 -6
- package/lib/plugins/vue-compiler-dom-errors.js +1 -1
- package/lib/plugins/vue-component-semantic-tokens.d.ts +1 -1
- package/lib/plugins/vue-component-semantic-tokens.js +4 -4
- package/lib/plugins/vue-document-drop.d.ts +1 -1
- package/lib/plugins/vue-document-drop.js +4 -7
- package/lib/plugins/vue-document-highlights.d.ts +1 -1
- package/lib/plugins/vue-document-highlights.js +3 -3
- package/lib/plugins/vue-extract-file.d.ts +1 -1
- package/lib/plugins/vue-extract-file.js +3 -3
- package/lib/plugins/vue-global-types-error.js +5 -2
- package/lib/plugins/vue-inlayhints.js +1 -1
- package/lib/plugins/vue-missing-props-hints.d.ts +1 -1
- package/lib/plugins/vue-missing-props-hints.js +5 -5
- package/lib/plugins/vue-scoped-class-links.js +1 -1
- package/lib/plugins/vue-sfc.js +2 -2
- package/lib/plugins/vue-suggest-define-assignment.js +1 -1
- package/lib/plugins/vue-template-ref-links.js +1 -1
- package/lib/plugins/vue-template.d.ts +1 -1
- package/lib/plugins/vue-template.js +11 -12
- package/lib/plugins/vue-twoslash-queries.d.ts +1 -1
- package/lib/plugins/vue-twoslash-queries.js +3 -3
- package/lib/utils.d.ts +8 -0
- package/lib/utils.js +43 -0
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from '@volar/language-service';
|
|
2
2
|
export * from '@volar/language-service/lib/utils/featureWorkers';
|
|
3
|
-
export declare function createVueLanguageServicePlugins(ts: typeof import('typescript'), tsPluginClient
|
|
3
|
+
export declare function createVueLanguageServicePlugins(ts: typeof import('typescript'), tsPluginClient?: import('@vue/typescript-plugin/lib/requests').Requests): import("@volar/language-service").LanguageServicePlugin<any>[];
|
package/index.js
CHANGED
|
@@ -44,38 +44,44 @@ const vue_template_1 = require("./lib/plugins/vue-template");
|
|
|
44
44
|
const vue_template_ref_links_1 = require("./lib/plugins/vue-template-ref-links");
|
|
45
45
|
const vue_twoslash_queries_1 = require("./lib/plugins/vue-twoslash-queries");
|
|
46
46
|
function createVueLanguageServicePlugins(ts, tsPluginClient) {
|
|
47
|
-
|
|
47
|
+
tsPluginClient ??= new Proxy({}, {
|
|
48
|
+
get() {
|
|
49
|
+
return () => undefined;
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
return [
|
|
48
53
|
(0, css_1.create)(),
|
|
49
54
|
(0, volar_service_json_1.create)(),
|
|
50
55
|
(0, volar_service_pug_beautify_1.create)(),
|
|
51
|
-
(0, docCommentTemplate_1.create)(ts),
|
|
52
|
-
(0, typescript_semantic_tokens_1.create)(tsPluginClient),
|
|
53
|
-
(0, syntactic_1.create)(ts),
|
|
54
56
|
(0, vue_autoinsert_space_1.create)(),
|
|
55
|
-
(0, vue_autoinsert_dotvalue_1.create)(ts, tsPluginClient),
|
|
56
57
|
(0, vue_compiler_dom_errors_1.create)(),
|
|
57
|
-
(0, vue_component_semantic_tokens_1.create)(tsPluginClient),
|
|
58
|
-
(0, vue_document_drop_1.create)(ts, tsPluginClient),
|
|
59
|
-
(0, vue_document_highlights_1.create)(tsPluginClient),
|
|
60
58
|
(0, vue_directive_comments_1.create)(),
|
|
61
|
-
(0, vue_extract_file_1.create)(ts, tsPluginClient),
|
|
62
59
|
(0, vue_global_types_error_1.create)(),
|
|
63
|
-
(0, vue_inlayhints_1.create)(ts),
|
|
64
|
-
(0, vue_missing_props_hints_1.create)(tsPluginClient),
|
|
65
60
|
(0, vue_scoped_class_links_1.create)(),
|
|
66
61
|
(0, vue_sfc_1.create)(),
|
|
67
62
|
(0, vue_suggest_define_assignment_1.create)(),
|
|
68
|
-
(0, vue_template_1.create)('html', tsPluginClient),
|
|
69
|
-
(0, vue_template_1.create)('pug', tsPluginClient),
|
|
70
63
|
(0, vue_template_ref_links_1.create)(),
|
|
71
|
-
(0, vue_twoslash_queries_1.create)(tsPluginClient),
|
|
72
64
|
(0, volar_service_emmet_1.create)({
|
|
73
65
|
mappedLanguages: {
|
|
74
66
|
'vue-root-tags': 'html',
|
|
75
67
|
'postcss': 'scss',
|
|
76
68
|
},
|
|
77
69
|
}),
|
|
70
|
+
// TS related plugins
|
|
71
|
+
(0, docCommentTemplate_1.create)(ts),
|
|
72
|
+
(0, syntactic_1.create)(ts),
|
|
73
|
+
(0, vue_inlayhints_1.create)(ts),
|
|
74
|
+
// type aware plugins
|
|
75
|
+
(0, typescript_semantic_tokens_1.create)(tsPluginClient),
|
|
76
|
+
(0, vue_autoinsert_dotvalue_1.create)(ts, tsPluginClient),
|
|
77
|
+
(0, vue_component_semantic_tokens_1.create)(tsPluginClient),
|
|
78
|
+
(0, vue_document_drop_1.create)(ts, tsPluginClient),
|
|
79
|
+
(0, vue_document_highlights_1.create)(tsPluginClient),
|
|
80
|
+
(0, vue_extract_file_1.create)(ts, tsPluginClient),
|
|
81
|
+
(0, vue_missing_props_hints_1.create)(tsPluginClient),
|
|
82
|
+
(0, vue_template_1.create)('html', tsPluginClient),
|
|
83
|
+
(0, vue_template_1.create)('jade', tsPluginClient),
|
|
84
|
+
(0, vue_twoslash_queries_1.create)(tsPluginClient),
|
|
78
85
|
];
|
|
79
|
-
return plugins;
|
|
80
86
|
}
|
|
81
87
|
//# sourceMappingURL=index.js.map
|
package/lib/data.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type * as html from 'vscode-html-languageservice';
|
|
2
|
+
export declare function loadTemplateData(lang: string): html.HTMLDataV1;
|
|
3
|
+
export declare function loadLanguageBlocks(lang: string): html.HTMLDataV1;
|
|
4
|
+
export declare function loadModelModifiersData(lang: string): html.HTMLDataV1;
|
package/lib/data.js
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadTemplateData = loadTemplateData;
|
|
4
|
+
exports.loadLanguageBlocks = loadLanguageBlocks;
|
|
5
|
+
exports.loadModelModifiersData = loadModelModifiersData;
|
|
6
|
+
let locale;
|
|
7
|
+
function loadTemplateData(lang) {
|
|
8
|
+
lang = lang.toLowerCase();
|
|
9
|
+
let data;
|
|
10
|
+
if (lang === 'ja') {
|
|
11
|
+
data = require('../data/template/ja.json');
|
|
12
|
+
}
|
|
13
|
+
else if (lang === 'fr') {
|
|
14
|
+
data = require('../data/template/fr.json');
|
|
15
|
+
}
|
|
16
|
+
else if (lang === 'ko') {
|
|
17
|
+
data = require('../data/template/ko.json');
|
|
18
|
+
}
|
|
19
|
+
else if (lang === 'pt-br') {
|
|
20
|
+
data = require('../data/template/pt.json');
|
|
21
|
+
}
|
|
22
|
+
else if (lang === 'zh-cn') {
|
|
23
|
+
data = require('../data/template/zh-cn.json');
|
|
24
|
+
}
|
|
25
|
+
else if (lang === 'zh-tw') {
|
|
26
|
+
data = require('../data/template/zh-hk.json');
|
|
27
|
+
}
|
|
28
|
+
else if (lang === 'it') {
|
|
29
|
+
data = require('../data/template/it.json');
|
|
30
|
+
}
|
|
31
|
+
else if (lang === 'cs') {
|
|
32
|
+
data = require('../data/template/cs.json');
|
|
33
|
+
}
|
|
34
|
+
else if (lang === 'ru') {
|
|
35
|
+
data = require('../data/template/ru.json');
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
data = require('../data/template/en.json');
|
|
39
|
+
}
|
|
40
|
+
resolveReferences(data);
|
|
41
|
+
// oxlint-disable-next-line no-useless-spread
|
|
42
|
+
for (const attr of [...data.globalAttributes ?? []]) {
|
|
43
|
+
if (!attr.name.startsWith('v-')) {
|
|
44
|
+
data.globalAttributes?.push({ ...attr, name: `:${attr.name}` }, { ...attr, name: `v-bind:${attr.name}` });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const vOn = data.globalAttributes?.find(d => d.name === 'v-on');
|
|
48
|
+
const vSlot = data.globalAttributes?.find(d => d.name === 'v-slot');
|
|
49
|
+
const vBind = data.globalAttributes?.find(d => d.name === 'v-bind');
|
|
50
|
+
if (vOn) {
|
|
51
|
+
data.globalAttributes?.push({ ...vOn, name: '@' });
|
|
52
|
+
}
|
|
53
|
+
if (vSlot) {
|
|
54
|
+
data.globalAttributes?.push({ ...vSlot, name: '#' });
|
|
55
|
+
}
|
|
56
|
+
if (vBind) {
|
|
57
|
+
data.globalAttributes?.push({ ...vBind, name: ':' });
|
|
58
|
+
}
|
|
59
|
+
return data;
|
|
60
|
+
}
|
|
61
|
+
function loadLanguageBlocks(lang) {
|
|
62
|
+
lang = lang.toLowerCase();
|
|
63
|
+
let data;
|
|
64
|
+
if (lang === 'ja') {
|
|
65
|
+
data = require('../data/language-blocks/ja.json');
|
|
66
|
+
}
|
|
67
|
+
else if (lang === 'fr') {
|
|
68
|
+
data = require('../data/language-blocks/fr.json');
|
|
69
|
+
}
|
|
70
|
+
else if (lang === 'ko') {
|
|
71
|
+
data = require('../data/language-blocks/ko.json');
|
|
72
|
+
}
|
|
73
|
+
else if (lang === 'pt-br') {
|
|
74
|
+
data = require('../data/language-blocks/pt.json');
|
|
75
|
+
}
|
|
76
|
+
else if (lang === 'zh-cn') {
|
|
77
|
+
data = require('../data/language-blocks/zh-cn.json');
|
|
78
|
+
}
|
|
79
|
+
else if (lang === 'zh-tw') {
|
|
80
|
+
data = require('../data/language-blocks/zh-hk.json');
|
|
81
|
+
}
|
|
82
|
+
else if (lang === 'it') {
|
|
83
|
+
data = require('../data/language-blocks/it.json');
|
|
84
|
+
}
|
|
85
|
+
else if (lang === 'cs') {
|
|
86
|
+
data = require('../data/language-blocks/cs.json');
|
|
87
|
+
}
|
|
88
|
+
else if (lang === 'ru') {
|
|
89
|
+
data = require('../data/language-blocks/ru.json');
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
data = require('../data/language-blocks/en.json');
|
|
93
|
+
}
|
|
94
|
+
resolveReferences(data);
|
|
95
|
+
return data;
|
|
96
|
+
}
|
|
97
|
+
function loadModelModifiersData(lang) {
|
|
98
|
+
lang = lang.toLowerCase();
|
|
99
|
+
let data;
|
|
100
|
+
if (lang === 'ja') {
|
|
101
|
+
data = require('../data/model-modifiers/ja.json');
|
|
102
|
+
}
|
|
103
|
+
else if (lang === 'fr') {
|
|
104
|
+
data = require('../data/model-modifiers/fr.json');
|
|
105
|
+
}
|
|
106
|
+
else if (lang === 'ko') {
|
|
107
|
+
data = require('../data/model-modifiers/ko.json');
|
|
108
|
+
}
|
|
109
|
+
else if (lang === 'pt-br') {
|
|
110
|
+
data = require('../data/model-modifiers/pt.json');
|
|
111
|
+
}
|
|
112
|
+
else if (lang === 'zh-cn') {
|
|
113
|
+
data = require('../data/model-modifiers/zh-cn.json');
|
|
114
|
+
}
|
|
115
|
+
else if (lang === 'zh-tw') {
|
|
116
|
+
data = require('../data/model-modifiers/zh-hk.json');
|
|
117
|
+
}
|
|
118
|
+
else if (lang === 'it') {
|
|
119
|
+
data = require('../data/model-modifiers/it.json');
|
|
120
|
+
}
|
|
121
|
+
else if (lang === 'cs') {
|
|
122
|
+
data = require('../data/model-modifiers/cs.json');
|
|
123
|
+
}
|
|
124
|
+
else if (lang === 'ru') {
|
|
125
|
+
data = require('../data/model-modifiers/ru.json');
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
data = require('../data/model-modifiers/en.json');
|
|
129
|
+
}
|
|
130
|
+
resolveReferences(data);
|
|
131
|
+
return data;
|
|
132
|
+
}
|
|
133
|
+
function resolveReferences(data) {
|
|
134
|
+
locale ??= require('../data/locale.json');
|
|
135
|
+
for (const item of [
|
|
136
|
+
...data.globalAttributes ?? [],
|
|
137
|
+
...data.tags?.flatMap(tag => [tag, ...tag.attributes]) ?? [],
|
|
138
|
+
]) {
|
|
139
|
+
if (typeof item.references === 'string') {
|
|
140
|
+
const relativeUrl = item.references;
|
|
141
|
+
item.references = locale.map(({ name, url }) => ({
|
|
142
|
+
name,
|
|
143
|
+
url: url + relativeUrl,
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=data.js.map
|
package/lib/plugins/css.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.create = create;
|
|
4
4
|
const language_core_1 = require("@vue/language-core");
|
|
5
5
|
const volar_service_css_1 = require("volar-service-css");
|
|
6
|
-
const utils_1 = require("
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
7
|
function create() {
|
|
8
8
|
const base = (0, volar_service_css_1.create)({ scssDocumentSelector: ['scss', 'postcss'] });
|
|
9
9
|
return {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
|
-
export declare function create(
|
|
2
|
+
export declare function create({ getEncodedSemanticClassifications }: import('@vue/typescript-plugin/lib/requests').Requests): LanguageServicePlugin;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = create;
|
|
4
4
|
const semanticTokens_1 = require("volar-service-typescript/lib/semanticFeatures/semanticTokens");
|
|
5
|
-
const utils_1 = require("
|
|
6
|
-
function create(
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function create({ getEncodedSemanticClassifications }) {
|
|
7
7
|
return {
|
|
8
8
|
name: 'typescript-semantic-tokens',
|
|
9
9
|
capabilities: {
|
|
@@ -48,7 +48,7 @@ function create(tsPluginClient) {
|
|
|
48
48
|
start: start,
|
|
49
49
|
length: end - start,
|
|
50
50
|
};
|
|
51
|
-
const classifications = await
|
|
51
|
+
const classifications = await getEncodedSemanticClassifications(root.fileName, span);
|
|
52
52
|
if (classifications) {
|
|
53
53
|
return (0, semanticTokens_1.convertClassificationsToSemanticTokens)(document, span, legend, classifications);
|
|
54
54
|
}
|
package/lib/plugins/utils.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { VueVirtualCode } from '@vue/language-core';
|
|
3
|
-
import { URI } from 'vscode-uri';
|
|
1
|
+
import type { TextDocument } from '@volar/language-service';
|
|
4
2
|
export declare function sleep(ms: number): Promise<unknown>;
|
|
5
|
-
export declare function
|
|
6
|
-
sourceScript: Required<SourceScript<URI>>;
|
|
7
|
-
virtualCode: import("@volar/language-service").VirtualCode;
|
|
8
|
-
root: VueVirtualCode;
|
|
9
|
-
} | undefined;
|
|
3
|
+
export declare function isTsDocument(document: TextDocument): boolean;
|
package/lib/plugins/utils.js
CHANGED
|
@@ -1,47 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sleep = sleep;
|
|
4
|
-
exports.
|
|
5
|
-
const language_core_1 = require("@vue/language-core");
|
|
6
|
-
const vscode_uri_1 = require("vscode-uri");
|
|
4
|
+
exports.isTsDocument = isTsDocument;
|
|
7
5
|
function sleep(ms) {
|
|
8
6
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
9
7
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
if (embeddedCodeId) {
|
|
17
|
-
if (typeof embeddedCodeId === 'string') {
|
|
18
|
-
if (decoded[1] !== embeddedCodeId) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
else if (!embeddedCodeId(decoded[1])) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (languageId && document.languageId !== languageId) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
const sourceScript = context.language.scripts.get(decoded[0]);
|
|
30
|
-
if (!sourceScript?.generated) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const virtualCode = sourceScript.generated.embeddedCodes.get(decoded[1]);
|
|
34
|
-
if (!virtualCode) {
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const root = sourceScript.generated.root;
|
|
38
|
-
if (!(root instanceof language_core_1.VueVirtualCode)) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
sourceScript: sourceScript,
|
|
43
|
-
virtualCode,
|
|
44
|
-
root,
|
|
45
|
-
};
|
|
8
|
+
function isTsDocument(document) {
|
|
9
|
+
return document.languageId === 'javascript'
|
|
10
|
+
|| document.languageId === 'typescript'
|
|
11
|
+
|| document.languageId === 'javascriptreact'
|
|
12
|
+
|| document.languageId === 'typescriptreact';
|
|
46
13
|
}
|
|
47
14
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
|
-
export declare function create(ts: typeof import('typescript'),
|
|
2
|
+
export declare function create(ts: typeof import('typescript'), { getPropertiesAtLocation }: import('@vue/typescript-plugin/lib/requests').Requests): LanguageServicePlugin;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = create;
|
|
4
4
|
const language_core_1 = require("@vue/language-core");
|
|
5
|
-
const utils_1 = require("
|
|
6
|
-
function create(ts,
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function create(ts, { getPropertiesAtLocation }) {
|
|
7
7
|
return {
|
|
8
8
|
name: 'vue-autoinsert-dotvalue',
|
|
9
9
|
capabilities: {
|
|
@@ -13,7 +13,6 @@ function create(ts, tsPluginClient) {
|
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
create(context) {
|
|
16
|
-
let currentReq = 0;
|
|
17
16
|
return {
|
|
18
17
|
async provideAutoInsertSnippet(document, selection, change) {
|
|
19
18
|
const info = (0, utils_1.getEmbeddedInfo)(context, document, id => id.startsWith('script_'));
|
|
@@ -27,24 +26,14 @@ function create(ts, tsPluginClient) {
|
|
|
27
26
|
if (!isCharacterTyping(document, change)) {
|
|
28
27
|
return;
|
|
29
28
|
}
|
|
30
|
-
|
|
31
|
-
// Wait for tsserver to sync
|
|
32
|
-
await (0, utils_1.sleep)(250);
|
|
33
|
-
if (req !== currentReq) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const enabled = await context.env.getConfiguration?.('vue.autoInsert.dotValue') ?? true;
|
|
37
|
-
if (!enabled) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
29
|
+
let sourceOffset;
|
|
40
30
|
const { sourceScript, virtualCode, root } = info;
|
|
41
31
|
const { sfc } = root;
|
|
42
|
-
const
|
|
43
|
-
|
|
32
|
+
const scriptBlocks = [sfc.script, sfc.scriptSetup].filter(block => !!block);
|
|
33
|
+
const map = context.language.maps.get(virtualCode, sourceScript);
|
|
34
|
+
if (!scriptBlocks.length) {
|
|
44
35
|
return;
|
|
45
36
|
}
|
|
46
|
-
let sourceOffset;
|
|
47
|
-
const map = context.language.maps.get(virtualCode, sourceScript);
|
|
48
37
|
for (const [offset] of map.toSourceLocation(document.offsetAt(selection))) {
|
|
49
38
|
sourceOffset = offset;
|
|
50
39
|
break;
|
|
@@ -52,7 +41,7 @@ function create(ts, tsPluginClient) {
|
|
|
52
41
|
if (sourceOffset === undefined) {
|
|
53
42
|
return;
|
|
54
43
|
}
|
|
55
|
-
for (const { ast, startTagEnd, endTagStart } of
|
|
44
|
+
for (const { ast, startTagEnd, endTagStart } of scriptBlocks) {
|
|
56
45
|
if (sourceOffset < startTagEnd || sourceOffset > endTagStart) {
|
|
57
46
|
continue;
|
|
58
47
|
}
|
|
@@ -60,7 +49,7 @@ function create(ts, tsPluginClient) {
|
|
|
60
49
|
return;
|
|
61
50
|
}
|
|
62
51
|
}
|
|
63
|
-
const props = await
|
|
52
|
+
const props = await getPropertiesAtLocation(root.fileName, sourceOffset) ?? [];
|
|
64
53
|
if (props.some(prop => prop === 'value')) {
|
|
65
54
|
return '${1:.value}';
|
|
66
55
|
}
|
|
@@ -10,14 +10,10 @@ function create() {
|
|
|
10
10
|
configurationSections: ['vue.autoInsert.bracketSpacing'],
|
|
11
11
|
},
|
|
12
12
|
},
|
|
13
|
-
create(
|
|
13
|
+
create() {
|
|
14
14
|
return {
|
|
15
|
-
|
|
15
|
+
provideAutoInsertSnippet(document, selection, change) {
|
|
16
16
|
if (document.languageId === 'html' || document.languageId === 'jade') {
|
|
17
|
-
const enabled = await context.env.getConfiguration?.('vue.autoInsert.bracketSpacing') ?? true;
|
|
18
|
-
if (!enabled) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
17
|
if (change.text === '{}'
|
|
22
18
|
&& document.getText().slice(change.rangeOffset - 1, change.rangeOffset + 3) === '{{}}'
|
|
23
19
|
&& document.offsetAt(selection) === change.rangeOffset + 1) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
|
-
export declare function create(
|
|
2
|
+
export declare function create({ getComponentNames, getElementNames }: import('@vue/typescript-plugin/lib/requests').Requests): LanguageServicePlugin;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = create;
|
|
4
4
|
const language_core_1 = require("@vue/language-core");
|
|
5
|
-
const utils_1 = require("
|
|
6
|
-
function create(
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
function create({ getComponentNames, getElementNames }) {
|
|
7
7
|
return {
|
|
8
8
|
name: 'vue-component-semantic-tokens',
|
|
9
9
|
capabilities: {
|
|
@@ -29,8 +29,8 @@ function create(tsPluginClient) {
|
|
|
29
29
|
const componentSpans = [];
|
|
30
30
|
const start = document.offsetAt(range.start);
|
|
31
31
|
const end = document.offsetAt(range.end);
|
|
32
|
-
const validComponentNames = await
|
|
33
|
-
const elements = new Set(await
|
|
32
|
+
const validComponentNames = await getComponentNames(root.fileName) ?? [];
|
|
33
|
+
const elements = new Set(await getElementNames(root.fileName) ?? []);
|
|
34
34
|
const components = new Set([
|
|
35
35
|
...validComponentNames,
|
|
36
36
|
...validComponentNames.map(language_core_1.hyphenateTag),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
|
-
export declare function create(ts: typeof import('typescript'),
|
|
2
|
+
export declare function create(ts: typeof import('typescript'), { getImportPathForFile }: import('@vue/typescript-plugin/lib/requests').Requests): LanguageServicePlugin;
|
|
@@ -8,8 +8,8 @@ const getUserPreferences_1 = require("volar-service-typescript/lib/configs/getUs
|
|
|
8
8
|
const vscode_uri_1 = require("vscode-uri");
|
|
9
9
|
const nameCasing_1 = require("../nameCasing");
|
|
10
10
|
const vue_extract_file_1 = require("../plugins/vue-extract-file");
|
|
11
|
-
const utils_1 = require("
|
|
12
|
-
function create(ts,
|
|
11
|
+
const utils_1 = require("../utils");
|
|
12
|
+
function create(ts, { getImportPathForFile }) {
|
|
13
13
|
return {
|
|
14
14
|
name: 'vue-document-drop',
|
|
15
15
|
capabilities: {
|
|
@@ -46,14 +46,11 @@ function create(ts, tsPluginClient) {
|
|
|
46
46
|
const incomingFileName = vscode_uri_1.URI.parse(importUri).fsPath.replace(/\\/g, '/');
|
|
47
47
|
let importPath;
|
|
48
48
|
const serviceScript = sourceScript.generated.languagePlugin.typescript?.getServiceScript(root);
|
|
49
|
-
if (
|
|
49
|
+
if (serviceScript) {
|
|
50
50
|
const tsDocumentUri = context.encodeEmbeddedDocumentUri(sourceScript.id, serviceScript.code.id);
|
|
51
51
|
const tsDocument = context.documents.get(tsDocumentUri, serviceScript.code.languageId, serviceScript.code.snapshot);
|
|
52
52
|
const preferences = await (0, getUserPreferences_1.getUserPreferences)(context, tsDocument);
|
|
53
|
-
|
|
54
|
-
if (importPathRequest) {
|
|
55
|
-
importPath = importPathRequest;
|
|
56
|
-
}
|
|
53
|
+
importPath = (await getImportPathForFile(root.fileName, incomingFileName, preferences) ?? {}).path;
|
|
57
54
|
}
|
|
58
55
|
if (!importPath) {
|
|
59
56
|
importPath = path_browserify_1.posix.relative(path_browserify_1.posix.dirname(root.fileName), incomingFileName)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
|
-
export declare function create(
|
|
2
|
+
export declare function create({ getDocumentHighlights }: import('@vue/typescript-plugin/lib/requests').Requests): LanguageServicePlugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = create;
|
|
4
|
-
const utils_1 = require("
|
|
5
|
-
function create(
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
|
+
function create({ getDocumentHighlights }) {
|
|
6
6
|
return {
|
|
7
7
|
name: 'vue-document-highlights',
|
|
8
8
|
capabilities: {
|
|
@@ -16,7 +16,7 @@ function create(tsPluginClient) {
|
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
const { root } = info;
|
|
19
|
-
const result = await
|
|
19
|
+
const result = await getDocumentHighlights(root.fileName, document.offsetAt(position));
|
|
20
20
|
return result
|
|
21
21
|
?.filter(({ fileName }) => fileName === root.fileName)
|
|
22
22
|
.flatMap(({ highlightSpans }) => highlightSpans)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
2
|
import { type Sfc } from '@vue/language-core';
|
|
3
3
|
import type * as ts from 'typescript';
|
|
4
|
-
export declare function create(ts: typeof import('typescript'),
|
|
4
|
+
export declare function create(ts: typeof import('typescript'), { collectExtractProps }: import('@vue/typescript-plugin/lib/requests').Requests): LanguageServicePlugin;
|
|
5
5
|
export declare function getLastImportNode(ts: typeof import('typescript'), sourceFile: ts.SourceFile): ts.Node | undefined;
|
|
6
6
|
export declare function createAddComponentToOptionEdit(ts: typeof import('typescript'), sfc: Sfc, ast: ts.SourceFile, componentName: string): {
|
|
7
7
|
range: import("@vue/language-core").TextRange;
|
|
@@ -5,9 +5,9 @@ exports.getLastImportNode = getLastImportNode;
|
|
|
5
5
|
exports.createAddComponentToOptionEdit = createAddComponentToOptionEdit;
|
|
6
6
|
const language_core_1 = require("@vue/language-core");
|
|
7
7
|
const vscode_uri_1 = require("vscode-uri");
|
|
8
|
-
const utils_1 = require("
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
9
|
const unicodeReg = /\\u/g;
|
|
10
|
-
function create(ts,
|
|
10
|
+
function create(ts, { collectExtractProps }) {
|
|
11
11
|
return {
|
|
12
12
|
name: 'vue-extract-file',
|
|
13
13
|
capabilities: {
|
|
@@ -70,7 +70,7 @@ function create(ts, tsPluginClient) {
|
|
|
70
70
|
if (!templateCodeRange) {
|
|
71
71
|
return codeAction;
|
|
72
72
|
}
|
|
73
|
-
const toExtract = await
|
|
73
|
+
const toExtract = await collectExtractProps(root.fileName, templateCodeRange) ?? [];
|
|
74
74
|
const templateInitialIndent = await context.env.getConfiguration('vue.format.template.initialIndent') ?? true;
|
|
75
75
|
const scriptInitialIndent = await context.env.getConfiguration('vue.format.script.initialIndent')
|
|
76
76
|
?? false;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = create;
|
|
4
|
-
const utils_1 = require("
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
5
|
function create() {
|
|
6
6
|
return {
|
|
7
7
|
name: 'vue-global-types-error',
|
|
@@ -18,7 +18,10 @@ function create() {
|
|
|
18
18
|
if (!info) {
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
const { root } = info;
|
|
21
|
+
const { sourceScript, root } = info;
|
|
22
|
+
if (sourceScript.id.scheme !== 'file') {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
22
25
|
const { vueCompilerOptions } = root;
|
|
23
26
|
const globalTypesPath = vueCompilerOptions.globalTypesPath(root.fileName);
|
|
24
27
|
if (globalTypesPath) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.create = create;
|
|
4
4
|
exports.findDestructuredProps = findDestructuredProps;
|
|
5
5
|
const language_core_1 = require("@vue/language-core");
|
|
6
|
-
const utils_1 = require("
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
7
|
function create(ts) {
|
|
8
8
|
return {
|
|
9
9
|
name: 'vue-inlayhints',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
|
-
export declare function create(
|
|
2
|
+
export declare function create({ getComponentNames, getElementNames, getComponentProps }: import('@vue/typescript-plugin/lib/requests').Requests): LanguageServicePlugin;
|
|
@@ -4,8 +4,8 @@ exports.create = create;
|
|
|
4
4
|
const language_core_1 = require("@vue/language-core");
|
|
5
5
|
const html = require("vscode-html-languageservice");
|
|
6
6
|
const nameCasing_1 = require("../nameCasing");
|
|
7
|
-
const utils_1 = require("
|
|
8
|
-
function create(
|
|
7
|
+
const utils_1 = require("../utils");
|
|
8
|
+
function create({ getComponentNames, getElementNames, getComponentProps }) {
|
|
9
9
|
return {
|
|
10
10
|
name: 'vue-missing-props-hints',
|
|
11
11
|
capabilities: {
|
|
@@ -30,9 +30,9 @@ function create(tsPluginClient) {
|
|
|
30
30
|
}
|
|
31
31
|
const result = [];
|
|
32
32
|
const casing = await (0, nameCasing_1.checkCasing)(context, sourceScript.id);
|
|
33
|
-
const components = await
|
|
33
|
+
const components = await getComponentNames(root.fileName) ?? [];
|
|
34
34
|
const componentProps = {};
|
|
35
|
-
intrinsicElementNames ??= new Set(await
|
|
35
|
+
intrinsicElementNames ??= new Set(await getElementNames(root.fileName) ?? []);
|
|
36
36
|
let token;
|
|
37
37
|
let current;
|
|
38
38
|
while ((token = scanner.scan()) !== html.TokenType.EOS) {
|
|
@@ -55,7 +55,7 @@ function create(tsPluginClient) {
|
|
|
55
55
|
if (cancellationToken.isCancellationRequested) {
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
|
-
componentProps[checkTag] = (await
|
|
58
|
+
componentProps[checkTag] = (await getComponentProps(root.fileName, checkTag) ?? [])
|
|
59
59
|
.filter(prop => prop.required)
|
|
60
60
|
.map(prop => prop.name);
|
|
61
61
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = create;
|
|
4
4
|
const language_core_1 = require("@vue/language-core");
|
|
5
|
-
const utils_1 = require("
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
6
|
function create() {
|
|
7
7
|
return {
|
|
8
8
|
name: 'vue-scoped-class-links',
|
package/lib/plugins/vue-sfc.js
CHANGED
|
@@ -4,8 +4,8 @@ exports.create = create;
|
|
|
4
4
|
const language_core_1 = require("@vue/language-core");
|
|
5
5
|
const volar_service_html_1 = require("volar-service-html");
|
|
6
6
|
const html = require("vscode-html-languageservice");
|
|
7
|
-
const data_1 = require("
|
|
8
|
-
const utils_1 = require("
|
|
7
|
+
const data_1 = require("../data");
|
|
8
|
+
const utils_1 = require("../utils");
|
|
9
9
|
let sfcDataProvider;
|
|
10
10
|
function create() {
|
|
11
11
|
const htmlService = (0, volar_service_html_1.create)({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = create;
|
|
4
4
|
const language_core_1 = require("@vue/language-core");
|
|
5
|
-
const utils_1 = require("
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
6
|
function create() {
|
|
7
7
|
return {
|
|
8
8
|
name: 'vue-suggest-define-assignment',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = create;
|
|
4
4
|
const language_core_1 = require("@vue/language-core");
|
|
5
|
-
const utils_1 = require("
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
6
|
function create() {
|
|
7
7
|
return {
|
|
8
8
|
name: 'vue-template-ref-links',
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
|
-
export declare function create(
|
|
2
|
+
export declare function create(languageId: 'html' | 'jade', { getComponentNames, getElementAttrs, getComponentProps, getComponentEvents, getComponentDirectives, getComponentSlots, }: import('@vue/typescript-plugin/lib/requests').Requests): LanguageServicePlugin;
|
|
@@ -7,9 +7,9 @@ const volar_service_html_1 = require("volar-service-html");
|
|
|
7
7
|
const volar_service_pug_1 = require("volar-service-pug");
|
|
8
8
|
const html = require("vscode-html-languageservice");
|
|
9
9
|
const vscode_uri_1 = require("vscode-uri");
|
|
10
|
+
const data_1 = require("../data");
|
|
10
11
|
const nameCasing_1 = require("../nameCasing");
|
|
11
|
-
const
|
|
12
|
-
const utils_1 = require("./utils");
|
|
12
|
+
const utils_1 = require("../utils");
|
|
13
13
|
const specialTags = new Set([
|
|
14
14
|
'slot',
|
|
15
15
|
'component',
|
|
@@ -25,7 +25,7 @@ const specialProps = new Set([
|
|
|
25
25
|
]);
|
|
26
26
|
let builtInData;
|
|
27
27
|
let modelData;
|
|
28
|
-
function create(
|
|
28
|
+
function create(languageId, { getComponentNames, getElementAttrs, getComponentProps, getComponentEvents, getComponentDirectives, getComponentSlots, }) {
|
|
29
29
|
let customData = [];
|
|
30
30
|
let extraCustomData = [];
|
|
31
31
|
const onDidChangeCustomDataListeners = new Set();
|
|
@@ -37,7 +37,7 @@ function create(mode, tsPluginClient) {
|
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
const baseService =
|
|
40
|
+
const baseService = languageId === 'jade'
|
|
41
41
|
? (0, volar_service_pug_1.create)({
|
|
42
42
|
useDefaultDataProvider: false,
|
|
43
43
|
getCustomData() {
|
|
@@ -60,9 +60,8 @@ function create(mode, tsPluginClient) {
|
|
|
60
60
|
onDidChangeCustomData,
|
|
61
61
|
});
|
|
62
62
|
const htmlDataProvider = html.getDefaultHTMLDataProvider();
|
|
63
|
-
const languageId = mode === 'pug' ? 'jade' : 'html';
|
|
64
63
|
return {
|
|
65
|
-
name: `vue-template (${
|
|
64
|
+
name: `vue-template (${languageId})`,
|
|
66
65
|
capabilities: {
|
|
67
66
|
...baseService.capabilities,
|
|
68
67
|
completionProvider: {
|
|
@@ -324,7 +323,7 @@ function create(mode, tsPluginClient) {
|
|
|
324
323
|
if (!components) {
|
|
325
324
|
components = [];
|
|
326
325
|
tasks.push((async () => {
|
|
327
|
-
components = (await
|
|
326
|
+
components = (await getComponentNames(root.fileName) ?? [])
|
|
328
327
|
.filter(name => name !== 'Transition'
|
|
329
328
|
&& name !== 'TransitionGroup'
|
|
330
329
|
&& name !== 'KeepAlive'
|
|
@@ -373,10 +372,10 @@ function create(mode, tsPluginClient) {
|
|
|
373
372
|
tagMap.set(tag, tagInfo);
|
|
374
373
|
tasks.push((async () => {
|
|
375
374
|
tagMap.set(tag, {
|
|
376
|
-
attrs: await
|
|
377
|
-
propInfos: await
|
|
378
|
-
events: await
|
|
379
|
-
directives: await
|
|
375
|
+
attrs: await getElementAttrs(root.fileName, tag) ?? [],
|
|
376
|
+
propInfos: await getComponentProps(root.fileName, tag) ?? [],
|
|
377
|
+
events: await getComponentEvents(root.fileName, tag) ?? [],
|
|
378
|
+
directives: await getComponentDirectives(root.fileName) ?? [],
|
|
380
379
|
});
|
|
381
380
|
version++;
|
|
382
381
|
})());
|
|
@@ -499,7 +498,7 @@ function create(mode, tsPluginClient) {
|
|
|
499
498
|
values = [];
|
|
500
499
|
tasks.push((async () => {
|
|
501
500
|
if (tag === 'slot' && attr === 'name') {
|
|
502
|
-
values = await
|
|
501
|
+
values = await getComponentSlots(root.fileName) ?? [];
|
|
503
502
|
}
|
|
504
503
|
version++;
|
|
505
504
|
})());
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
|
-
export declare function create(
|
|
2
|
+
export declare function create({ getQuickInfoAtPosition }: import('@vue/typescript-plugin/lib/requests').Requests): LanguageServicePlugin;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.create = create;
|
|
4
|
-
const utils_1 = require("
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
5
|
const twoslashTemplateReg = /<!--\s*\^\?\s*-->/g;
|
|
6
6
|
const twoslashScriptReg = /(?<=^|\n)\s*\/\/\s*\^\?/g;
|
|
7
|
-
function create(
|
|
7
|
+
function create({ getQuickInfoAtPosition }) {
|
|
8
8
|
return {
|
|
9
9
|
name: 'vue-twoslash-queries',
|
|
10
10
|
capabilities: {
|
|
@@ -36,7 +36,7 @@ function create(tsPluginClient) {
|
|
|
36
36
|
for (const [pointerPosition, hoverOffset] of hoverOffsets) {
|
|
37
37
|
const map = context.language.maps.get(virtualCode, sourceScript);
|
|
38
38
|
for (const [sourceOffset] of map.toSourceLocation(hoverOffset)) {
|
|
39
|
-
const quickInfo = await
|
|
39
|
+
const quickInfo = await getQuickInfoAtPosition(root.fileName, sourceDocument.positionAt(sourceOffset));
|
|
40
40
|
if (quickInfo) {
|
|
41
41
|
inlayHints.push({
|
|
42
42
|
position: { line: pointerPosition.line, character: pointerPosition.character + 2 },
|
package/lib/utils.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type LanguageServiceContext, type SourceScript, type TextDocument } from '@volar/language-service';
|
|
2
|
+
import { VueVirtualCode } from '@vue/language-core';
|
|
3
|
+
import { URI } from 'vscode-uri';
|
|
4
|
+
export declare function getEmbeddedInfo(context: LanguageServiceContext, document: TextDocument, embeddedCodeId?: string | ((id: string) => boolean), languageId?: string): {
|
|
5
|
+
sourceScript: Required<SourceScript<URI>>;
|
|
6
|
+
virtualCode: import("@volar/language-service").VirtualCode;
|
|
7
|
+
root: VueVirtualCode;
|
|
8
|
+
} | undefined;
|
package/lib/utils.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEmbeddedInfo = getEmbeddedInfo;
|
|
4
|
+
const language_core_1 = require("@vue/language-core");
|
|
5
|
+
const vscode_uri_1 = require("vscode-uri");
|
|
6
|
+
function getEmbeddedInfo(context, document, embeddedCodeId, languageId) {
|
|
7
|
+
const uri = vscode_uri_1.URI.parse(document.uri);
|
|
8
|
+
const decoded = context.decodeEmbeddedDocumentUri(uri);
|
|
9
|
+
if (!decoded) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (embeddedCodeId) {
|
|
13
|
+
if (typeof embeddedCodeId === 'string') {
|
|
14
|
+
if (decoded[1] !== embeddedCodeId) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
else if (!embeddedCodeId(decoded[1])) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (languageId && document.languageId !== languageId) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const sourceScript = context.language.scripts.get(decoded[0]);
|
|
26
|
+
if (!sourceScript?.generated) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const virtualCode = sourceScript.generated.embeddedCodes.get(decoded[1]);
|
|
30
|
+
if (!virtualCode) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const root = sourceScript.generated.root;
|
|
34
|
+
if (!(root instanceof language_core_1.VueVirtualCode)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
sourceScript: sourceScript,
|
|
39
|
+
virtualCode,
|
|
40
|
+
root,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-service",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"data",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"update-html-data": "node ./scripts/update-html-data.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@volar/language-service": "2.4.
|
|
21
|
-
"@vue/language-core": "3.0.
|
|
20
|
+
"@volar/language-service": "2.4.22",
|
|
21
|
+
"@vue/language-core": "3.0.5",
|
|
22
22
|
"@vue/shared": "^3.5.0",
|
|
23
23
|
"path-browserify": "^1.0.1",
|
|
24
24
|
"volar-service-css": "0.0.65",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^22.10.4",
|
|
36
36
|
"@types/path-browserify": "^1.0.1",
|
|
37
|
-
"@volar/kit": "2.4.
|
|
38
|
-
"@volar/typescript": "2.4.
|
|
37
|
+
"@volar/kit": "2.4.22",
|
|
38
|
+
"@volar/typescript": "2.4.22",
|
|
39
39
|
"@vue/compiler-dom": "^3.5.0",
|
|
40
|
-
"@vue/typescript-plugin": "3.0.
|
|
40
|
+
"@vue/typescript-plugin": "3.0.5",
|
|
41
41
|
"vscode-css-languageservice": "^6.3.1"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "036b6b1882179d35586e16f2a5cba5150e5d18e6"
|
|
44
44
|
}
|