@vue/language-service 2.0.24 → 2.0.26-alpha.0
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/data/language-blocks/zh-cn.json +1 -1
- package/index.d.ts +0 -8
- package/index.js +11 -20
- package/lib/types.d.ts +8 -0
- package/lib/types.js +9 -1
- package/package.json +16 -16
|
@@ -916,7 +916,7 @@
|
|
|
916
916
|
],
|
|
917
917
|
"description": {
|
|
918
918
|
"kind": "markdown",
|
|
919
|
-
"value": "\n在一个 `*.vue` 文件中可以为任何项目特定需求使用额外的自定义块。举例来说,一个用作写文档的 `<docs>` 块。这里是一些自定义块的真实用例:\n\n- [Gridsome:`<page-query>`](https://gridsome.org/docs/querying-data/)\n- [vite-plugin-vue-gql:`<gql>`](https://github.com/wheatjs/vite-plugin-vue-gql)\n- [vue-i18n:`<i18n>`](https://github.com/intlify/bundle-tools/tree/main/packages/
|
|
919
|
+
"value": "\n在一个 `*.vue` 文件中可以为任何项目特定需求使用额外的自定义块。举例来说,一个用作写文档的 `<docs>` 块。这里是一些自定义块的真实用例:\n\n- [Gridsome:`<page-query>`](https://gridsome.org/docs/querying-data/)\n- [vite-plugin-vue-gql:`<gql>`](https://github.com/wheatjs/vite-plugin-vue-gql)\n- [vue-i18n:`<i18n>`](https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n#i18n-custom-block)\n\n自定义块的处理需要依赖工具链。如果你想要在构建中集成你的自定义语块,请参见 [SFC 自定义块集成工具链指南](https://cn.vuejs.org/guide/scaling-up/tooling.html#sfc-custom-block-integrations)获取更多细节。\n"
|
|
920
920
|
},
|
|
921
921
|
"references": [
|
|
922
922
|
{
|
package/index.d.ts
CHANGED
|
@@ -13,11 +13,3 @@ declare module '@volar/language-service' {
|
|
|
13
13
|
}
|
|
14
14
|
export declare function getFullLanguageServicePlugins(ts: typeof import('typescript')): LanguageServicePlugin[];
|
|
15
15
|
export declare function getHybridModeLanguageServicePlugins(ts: typeof import('typescript'), getTsPluginClient: typeof import("@vue/typescript-plugin/lib/client")): LanguageServicePlugin[];
|
|
16
|
-
export declare const commands: {
|
|
17
|
-
parseSfc: string;
|
|
18
|
-
detectNameCasing: string;
|
|
19
|
-
convertTagsToKebabCase: string;
|
|
20
|
-
convertTagsToPascalCase: string;
|
|
21
|
-
convertPropsToKebabCase: string;
|
|
22
|
-
convertPropsToCamelCase: string;
|
|
23
|
-
};
|
package/index.js
CHANGED
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.commands = void 0;
|
|
18
17
|
exports.getFullLanguageServicePlugins = getFullLanguageServicePlugins;
|
|
19
18
|
exports.getHybridModeLanguageServicePlugins = getHybridModeLanguageServicePlugins;
|
|
20
19
|
__exportStar(require("@volar/language-service"), exports);
|
|
@@ -139,14 +138,6 @@ function getHybridModeLanguageServicePlugins(ts, getTsPluginClient) {
|
|
|
139
138
|
}
|
|
140
139
|
return plugins;
|
|
141
140
|
}
|
|
142
|
-
exports.commands = {
|
|
143
|
-
parseSfc: 'vue.parseSfc',
|
|
144
|
-
detectNameCasing: 'vue.detectNameCasing',
|
|
145
|
-
convertTagsToKebabCase: 'vue.convertTagsToKebabCase',
|
|
146
|
-
convertTagsToPascalCase: 'vue.convertTagsToPascalCase',
|
|
147
|
-
convertPropsToKebabCase: 'vue.convertPropsToKebabCase',
|
|
148
|
-
convertPropsToCamelCase: 'vue.convertPropsToCamelCase',
|
|
149
|
-
};
|
|
150
141
|
function getCommonLanguageServicePlugins(ts, getTsPluginClient) {
|
|
151
142
|
return [
|
|
152
143
|
(0, volar_service_typescript_twoslash_queries_1.create)(ts),
|
|
@@ -175,7 +166,7 @@ function getCommonLanguageServicePlugins(ts, getTsPluginClient) {
|
|
|
175
166
|
name: 'vue-parse-sfc',
|
|
176
167
|
capabilities: {
|
|
177
168
|
executeCommandProvider: {
|
|
178
|
-
commands: [
|
|
169
|
+
commands: [types_1.commands.parseSfc],
|
|
179
170
|
},
|
|
180
171
|
},
|
|
181
172
|
create() {
|
|
@@ -191,30 +182,30 @@ function getCommonLanguageServicePlugins(ts, getTsPluginClient) {
|
|
|
191
182
|
capabilities: {
|
|
192
183
|
executeCommandProvider: {
|
|
193
184
|
commands: [
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
185
|
+
types_1.commands.detectNameCasing,
|
|
186
|
+
types_1.commands.convertTagsToKebabCase,
|
|
187
|
+
types_1.commands.convertTagsToPascalCase,
|
|
188
|
+
types_1.commands.convertPropsToKebabCase,
|
|
189
|
+
types_1.commands.convertPropsToCamelCase,
|
|
199
190
|
],
|
|
200
191
|
}
|
|
201
192
|
},
|
|
202
193
|
create(context) {
|
|
203
194
|
return {
|
|
204
195
|
executeCommand(command, [uri]) {
|
|
205
|
-
if (command ===
|
|
196
|
+
if (command === types_1.commands.detectNameCasing) {
|
|
206
197
|
return (0, nameCasing_1.detect)(context, vscode_uri_1.URI.parse(uri));
|
|
207
198
|
}
|
|
208
|
-
else if (command ===
|
|
199
|
+
else if (command === types_1.commands.convertTagsToKebabCase) {
|
|
209
200
|
return (0, nameCasing_1.convertTagName)(context, vscode_uri_1.URI.parse(uri), types_1.TagNameCasing.Kebab, getTsPluginClient(context));
|
|
210
201
|
}
|
|
211
|
-
else if (command ===
|
|
202
|
+
else if (command === types_1.commands.convertTagsToPascalCase) {
|
|
212
203
|
return (0, nameCasing_1.convertTagName)(context, vscode_uri_1.URI.parse(uri), types_1.TagNameCasing.Pascal, getTsPluginClient(context));
|
|
213
204
|
}
|
|
214
|
-
else if (command ===
|
|
205
|
+
else if (command === types_1.commands.convertPropsToKebabCase) {
|
|
215
206
|
return (0, nameCasing_1.convertAttrName)(context, vscode_uri_1.URI.parse(uri), types_1.AttrNameCasing.Kebab, getTsPluginClient(context));
|
|
216
207
|
}
|
|
217
|
-
else if (command ===
|
|
208
|
+
else if (command === types_1.commands.convertPropsToCamelCase) {
|
|
218
209
|
return (0, nameCasing_1.convertAttrName)(context, vscode_uri_1.URI.parse(uri), types_1.AttrNameCasing.Camel, getTsPluginClient(context));
|
|
219
210
|
}
|
|
220
211
|
},
|
package/lib/types.d.ts
CHANGED
|
@@ -6,5 +6,13 @@ export declare enum AttrNameCasing {
|
|
|
6
6
|
Kebab = 0,
|
|
7
7
|
Camel = 1
|
|
8
8
|
}
|
|
9
|
+
export declare const commands: {
|
|
10
|
+
parseSfc: string;
|
|
11
|
+
detectNameCasing: string;
|
|
12
|
+
convertTagsToKebabCase: string;
|
|
13
|
+
convertTagsToPascalCase: string;
|
|
14
|
+
convertPropsToKebabCase: string;
|
|
15
|
+
convertPropsToCamelCase: string;
|
|
16
|
+
};
|
|
9
17
|
export * from '@volar/language-service/lib/types';
|
|
10
18
|
export * from '@vue/language-core/lib/types';
|
package/lib/types.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.AttrNameCasing = exports.TagNameCasing = void 0;
|
|
17
|
+
exports.commands = exports.AttrNameCasing = exports.TagNameCasing = void 0;
|
|
18
18
|
var TagNameCasing;
|
|
19
19
|
(function (TagNameCasing) {
|
|
20
20
|
TagNameCasing[TagNameCasing["Kebab"] = 0] = "Kebab";
|
|
@@ -25,6 +25,14 @@ var AttrNameCasing;
|
|
|
25
25
|
AttrNameCasing[AttrNameCasing["Kebab"] = 0] = "Kebab";
|
|
26
26
|
AttrNameCasing[AttrNameCasing["Camel"] = 1] = "Camel";
|
|
27
27
|
})(AttrNameCasing || (exports.AttrNameCasing = AttrNameCasing = {}));
|
|
28
|
+
exports.commands = {
|
|
29
|
+
parseSfc: 'vue.parseSfc',
|
|
30
|
+
detectNameCasing: 'vue.detectNameCasing',
|
|
31
|
+
convertTagsToKebabCase: 'vue.convertTagsToKebabCase',
|
|
32
|
+
convertTagsToPascalCase: 'vue.convertTagsToPascalCase',
|
|
33
|
+
convertPropsToKebabCase: 'vue.convertPropsToKebabCase',
|
|
34
|
+
convertPropsToCamelCase: 'vue.convertPropsToCamelCase',
|
|
35
|
+
};
|
|
28
36
|
// only export types of depend packages
|
|
29
37
|
__exportStar(require("@volar/language-service/lib/types"), exports);
|
|
30
38
|
__exportStar(require("@vue/language-core/lib/types"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-service",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26-alpha.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"data",
|
|
@@ -16,23 +16,23 @@
|
|
|
16
16
|
"update-html-data": "node ./scripts/update-html-data.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@volar/language-core": "~2.4.0-alpha.
|
|
20
|
-
"@volar/language-service": "~2.4.0-alpha.
|
|
21
|
-
"@volar/typescript": "~2.4.0-alpha.
|
|
19
|
+
"@volar/language-core": "~2.4.0-alpha.11",
|
|
20
|
+
"@volar/language-service": "~2.4.0-alpha.11",
|
|
21
|
+
"@volar/typescript": "~2.4.0-alpha.11",
|
|
22
22
|
"@vue/compiler-dom": "^3.4.0",
|
|
23
|
-
"@vue/language-core": "2.0.
|
|
23
|
+
"@vue/language-core": "2.0.26-alpha.0",
|
|
24
24
|
"@vue/shared": "^3.4.0",
|
|
25
|
-
"@vue/typescript-plugin": "2.0.
|
|
25
|
+
"@vue/typescript-plugin": "2.0.26-alpha.0",
|
|
26
26
|
"computeds": "^0.0.1",
|
|
27
27
|
"path-browserify": "^1.0.1",
|
|
28
|
-
"volar-service-css": "
|
|
29
|
-
"volar-service-emmet": "
|
|
30
|
-
"volar-service-html": "
|
|
31
|
-
"volar-service-json": "
|
|
32
|
-
"volar-service-pug": "
|
|
33
|
-
"volar-service-pug-beautify": "
|
|
34
|
-
"volar-service-typescript": "
|
|
35
|
-
"volar-service-typescript-twoslash-queries": "
|
|
28
|
+
"volar-service-css": "volar-2.4",
|
|
29
|
+
"volar-service-emmet": "volar-2.4",
|
|
30
|
+
"volar-service-html": "volar-2.4",
|
|
31
|
+
"volar-service-json": "volar-2.4",
|
|
32
|
+
"volar-service-pug": "volar-2.4",
|
|
33
|
+
"volar-service-pug-beautify": "volar-2.4",
|
|
34
|
+
"volar-service-typescript": "volar-2.4",
|
|
35
|
+
"volar-service-typescript-twoslash-queries": "volar-2.4",
|
|
36
36
|
"vscode-html-languageservice": "^5.2.0",
|
|
37
37
|
"vscode-languageserver-textdocument": "^1.0.11",
|
|
38
38
|
"vscode-uri": "^3.0.8"
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "latest",
|
|
42
42
|
"@types/path-browserify": "latest",
|
|
43
|
-
"@volar/kit": "~2.4.0-alpha.
|
|
43
|
+
"@volar/kit": "~2.4.0-alpha.11",
|
|
44
44
|
"vscode-languageserver-protocol": "^3.17.5"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "7ace5046de671cda22fac8dd7d71b3658489c5c6"
|
|
47
47
|
}
|