@vue/language-core 2.0.13 → 2.0.15
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 +1 -1
- package/lib/codegen/common.d.ts +11 -0
- package/lib/codegen/common.js +70 -0
- package/lib/codegen/script/component.d.ts +9 -0
- package/lib/codegen/script/component.js +109 -0
- package/lib/codegen/script/context.d.ts +25 -0
- package/lib/codegen/script/context.js +124 -0
- package/lib/{generators → codegen/script}/globalTypes.d.ts +1 -1
- package/lib/codegen/script/globalTypes.js +135 -0
- package/lib/codegen/script/index.d.ts +33 -0
- package/lib/codegen/script/index.js +127 -0
- package/lib/codegen/script/internalComponent.d.ts +5 -0
- package/lib/codegen/script/internalComponent.js +58 -0
- package/lib/codegen/script/scriptSetup.d.ts +6 -0
- package/lib/codegen/script/scriptSetup.js +371 -0
- package/lib/codegen/script/src.d.ts +2 -0
- package/lib/codegen/script/src.js +52 -0
- package/lib/codegen/script/template.d.ts +5 -0
- package/lib/codegen/script/template.js +196 -0
- package/lib/codegen/template/camelized.d.ts +2 -0
- package/lib/codegen/template/camelized.js +32 -0
- package/lib/codegen/template/context.d.ts +44 -0
- package/lib/codegen/template/context.js +170 -0
- package/lib/codegen/template/element.d.ts +8 -0
- package/lib/codegen/template/element.js +378 -0
- package/lib/codegen/template/elementChildren.d.ts +5 -0
- package/lib/codegen/template/elementChildren.js +26 -0
- package/lib/codegen/template/elementDirectives.d.ts +5 -0
- package/lib/codegen/template/elementDirectives.js +46 -0
- package/lib/codegen/template/elementEvents.d.ts +9 -0
- package/lib/codegen/template/elementEvents.js +157 -0
- package/lib/codegen/template/elementProps.d.ts +5 -0
- package/lib/codegen/template/elementProps.js +275 -0
- package/lib/codegen/template/index.d.ts +60 -0
- package/lib/codegen/template/index.js +130 -0
- package/lib/codegen/template/interpolation.d.ts +6 -0
- package/lib/{utils/transform.js → codegen/template/interpolation.js} +76 -46
- package/lib/codegen/template/objectProperty.d.ts +4 -0
- package/lib/codegen/template/objectProperty.js +31 -0
- package/lib/codegen/template/propertyAccess.d.ts +4 -0
- package/lib/codegen/template/propertyAccess.js +24 -0
- package/lib/codegen/template/slotOutlet.d.ts +5 -0
- package/lib/codegen/template/slotOutlet.js +72 -0
- package/lib/codegen/template/stringLiteralKey.d.ts +2 -0
- package/lib/codegen/template/stringLiteralKey.js +14 -0
- package/lib/codegen/template/templateChild.d.ts +7 -0
- package/lib/codegen/template/templateChild.js +160 -0
- package/lib/codegen/template/vFor.d.ts +12 -0
- package/lib/codegen/template/vFor.js +69 -0
- package/lib/codegen/template/vIf.d.ts +5 -0
- package/lib/codegen/template/vIf.js +53 -0
- package/lib/languageModule.d.ts +3 -4
- package/lib/languageModule.js +31 -14
- package/lib/parsers/scriptSetupRanges.d.ts +1 -0
- package/lib/parsers/scriptSetupRanges.js +6 -1
- package/lib/plugins/file-html.js +63 -66
- package/lib/plugins/file-md.js +47 -50
- package/lib/plugins/shared.d.ts +2 -0
- package/lib/plugins/shared.js +12 -0
- package/lib/plugins/vue-sfc-customblocks.js +2 -2
- package/lib/plugins/vue-sfc-scripts.js +2 -3
- package/lib/plugins/vue-sfc-styles.js +3 -3
- package/lib/plugins/vue-sfc-template.js +2 -2
- package/lib/plugins/vue-template-inline-css.js +34 -2
- package/lib/plugins/vue-template-inline-ts.js +10 -8
- package/lib/plugins/vue-tsx.d.ts +43 -5
- package/lib/plugins/vue-tsx.js +38 -28
- package/lib/plugins.d.ts +2 -1
- package/lib/plugins.js +18 -9
- package/lib/types.d.ts +3 -3
- package/lib/utils/ts.js +20 -32
- package/lib/virtualFile/computedFiles.d.ts +2 -1
- package/lib/virtualFile/computedFiles.js +41 -15
- package/lib/virtualFile/computedMappings.js +3 -3
- package/lib/virtualFile/computedSfc.js +22 -1
- package/lib/virtualFile/embeddedFile.d.ts +2 -3
- package/lib/virtualFile/embeddedFile.js +1 -2
- package/lib/virtualFile/vueFile.d.ts +3 -5
- package/lib/virtualFile/vueFile.js +6 -8
- package/package.json +3 -3
- package/lib/generators/globalTypes.js +0 -135
- package/lib/generators/inlineCss.d.ts +0 -3
- package/lib/generators/inlineCss.js +0 -37
- package/lib/generators/script.d.ts +0 -13
- package/lib/generators/script.js +0 -981
- package/lib/generators/template.d.ts +0 -19
- package/lib/generators/template.js +0 -1578
- package/lib/generators/utils.d.ts +0 -5
- package/lib/generators/utils.js +0 -54
- package/lib/utils/transform.d.ts +0 -8
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { VueCodeInformation } from '../types';
|
|
2
|
-
export declare function getStack(): string;
|
|
3
|
-
export declare function disableAllFeatures(override: Partial<VueCodeInformation>): VueCodeInformation;
|
|
4
|
-
export declare function enableAllFeatures(override: Partial<VueCodeInformation>): VueCodeInformation;
|
|
5
|
-
export declare function mergeFeatureSettings(base: VueCodeInformation, ...others: Partial<VueCodeInformation>[]): VueCodeInformation;
|
package/lib/generators/utils.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mergeFeatureSettings = exports.enableAllFeatures = exports.disableAllFeatures = exports.getStack = void 0;
|
|
4
|
-
// TODO: import from muggle-string
|
|
5
|
-
function getStack() {
|
|
6
|
-
const stack = new Error().stack;
|
|
7
|
-
let source = stack.split('\n')[3].trim();
|
|
8
|
-
if (source.endsWith(')')) {
|
|
9
|
-
source = source.slice(source.lastIndexOf('(') + 1, -1);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
source = source.slice(source.lastIndexOf(' ') + 1);
|
|
13
|
-
}
|
|
14
|
-
return source;
|
|
15
|
-
}
|
|
16
|
-
exports.getStack = getStack;
|
|
17
|
-
function disableAllFeatures(override) {
|
|
18
|
-
return {
|
|
19
|
-
verification: false,
|
|
20
|
-
completion: false,
|
|
21
|
-
semantic: false,
|
|
22
|
-
navigation: false,
|
|
23
|
-
structure: false,
|
|
24
|
-
format: false,
|
|
25
|
-
...override,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
exports.disableAllFeatures = disableAllFeatures;
|
|
29
|
-
function enableAllFeatures(override) {
|
|
30
|
-
return {
|
|
31
|
-
verification: true,
|
|
32
|
-
completion: true,
|
|
33
|
-
semantic: true,
|
|
34
|
-
navigation: true,
|
|
35
|
-
structure: true,
|
|
36
|
-
format: true,
|
|
37
|
-
...override,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
exports.enableAllFeatures = enableAllFeatures;
|
|
41
|
-
function mergeFeatureSettings(base, ...others) {
|
|
42
|
-
const result = { ...base };
|
|
43
|
-
for (const info of others) {
|
|
44
|
-
for (const key in info) {
|
|
45
|
-
const value = info[key];
|
|
46
|
-
if (value) {
|
|
47
|
-
result[key] = value;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
exports.mergeFeatureSettings = mergeFeatureSettings;
|
|
54
|
-
//# sourceMappingURL=utils.js.map
|
package/lib/utils/transform.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type * as ts from 'typescript';
|
|
2
|
-
import type { VueCompilerOptions } from '../types';
|
|
3
|
-
export declare function eachInterpolationSegment(ts: typeof import('typescript'), code: string, ast: ts.SourceFile, localVars: Map<string, number>, identifiers: Set<string>, vueOptions: VueCompilerOptions, ctxVars?: {
|
|
4
|
-
text: string;
|
|
5
|
-
isShorthand: boolean;
|
|
6
|
-
offset: number;
|
|
7
|
-
}[]): Generator<[fragment: string, offset: number | undefined, isJustForErrorMapping?: boolean]>;
|
|
8
|
-
export declare function collectVars(ts: typeof import('typescript'), node: ts.Node, ast: ts.SourceFile, result: string[]): void;
|