@vue/language-core 1.9.0-alpha.3 → 2.0.1
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 +13 -0
- package/{out/index.js → index.js} +12 -14
- package/lib/generators/script.d.ts +13 -0
- package/lib/generators/script.js +1060 -0
- package/lib/generators/template.d.ts +9 -0
- package/lib/generators/template.js +1567 -0
- package/lib/generators/utils.d.ts +6 -0
- package/lib/generators/utils.js +58 -0
- package/lib/languageModule.d.ts +5 -0
- package/lib/languageModule.js +114 -0
- package/{out → lib}/parsers/scriptRanges.d.ts +2 -3
- package/{out → lib}/parsers/scriptRanges.js +11 -6
- package/{out → lib}/parsers/scriptSetupRanges.d.ts +17 -9
- package/{out → lib}/parsers/scriptSetupRanges.js +42 -35
- package/lib/plugins/file-html.d.ts +3 -0
- package/{out → lib}/plugins/file-html.js +1 -1
- package/lib/plugins/file-md.d.ts +3 -0
- package/{out → lib}/plugins/file-md.js +8 -8
- package/lib/plugins/file-vue.d.ts +3 -0
- package/{out → lib}/plugins/file-vue.js +9 -2
- package/lib/plugins/vue-sfc-customblocks.d.ts +3 -0
- package/lib/plugins/vue-sfc-customblocks.js +28 -0
- package/lib/plugins/vue-sfc-scripts.d.ts +3 -0
- package/lib/plugins/vue-sfc-scripts.js +36 -0
- package/lib/plugins/vue-sfc-styles.d.ts +3 -0
- package/lib/plugins/vue-sfc-styles.js +28 -0
- package/lib/plugins/vue-sfc-template.d.ts +3 -0
- package/lib/plugins/vue-sfc-template.js +29 -0
- package/lib/plugins/vue-template-html.d.ts +3 -0
- package/{out → lib}/plugins/vue-template-html.js +12 -12
- package/{out → lib}/plugins/vue-tsx.d.ts +25 -18
- package/lib/plugins/vue-tsx.js +212 -0
- package/{out → lib}/plugins.d.ts +19 -7
- package/{out → lib}/plugins.js +24 -18
- package/{out → lib}/types.d.ts +26 -9
- package/lib/types.js +5 -0
- package/{out → lib}/utils/parseCssClassNames.d.ts +0 -1
- package/{out → lib}/utils/parseCssVars.d.ts +0 -1
- package/{out → lib}/utils/parseSfc.d.ts +0 -1
- package/{out → lib}/utils/parseSfc.js +4 -18
- package/{out → lib}/utils/shared.d.ts +0 -1
- package/lib/utils/transform.d.ts +8 -0
- package/{out → lib}/utils/transform.js +62 -62
- package/{out → lib}/utils/ts.d.ts +3 -4
- package/{out → lib}/utils/ts.js +0 -12
- package/lib/utils/vue2TemplateCompiler.d.ts +2 -0
- package/{out → lib}/utils/vue2TemplateCompiler.js +5 -2
- package/{out → lib}/virtualFile/computedFiles.d.ts +2 -3
- package/{out → lib}/virtualFile/computedFiles.js +55 -42
- package/lib/virtualFile/computedMappings.d.ts +4 -0
- package/{out → lib}/virtualFile/computedMappings.js +9 -12
- package/lib/virtualFile/computedSfc.d.ts +4 -0
- package/{out → lib}/virtualFile/computedSfc.js +3 -3
- package/{out → lib}/virtualFile/computedVueSfc.d.ts +2 -3
- package/lib/virtualFile/embeddedFile.d.ts +12 -0
- package/lib/virtualFile/embeddedFile.js +15 -0
- package/lib/virtualFile/vueFile.d.ts +25 -0
- package/{out → lib}/virtualFile/vueFile.js +11 -21
- package/package.json +8 -11
- package/out/generators/script.d.ts +0 -15
- package/out/generators/script.js +0 -887
- package/out/generators/template.d.ts +0 -21
- package/out/generators/template.js +0 -1506
- package/out/index.d.ts +0 -16
- package/out/languageModule.d.ts +0 -10
- package/out/languageModule.js +0 -99
- package/out/plugins/file-html.d.ts +0 -4
- package/out/plugins/file-md.d.ts +0 -4
- package/out/plugins/file-vue.d.ts +0 -4
- package/out/plugins/vue-sfc-customblocks.d.ts +0 -4
- package/out/plugins/vue-sfc-customblocks.js +0 -33
- package/out/plugins/vue-sfc-scripts.d.ts +0 -4
- package/out/plugins/vue-sfc-scripts.js +0 -42
- package/out/plugins/vue-sfc-styles.d.ts +0 -4
- package/out/plugins/vue-sfc-styles.js +0 -33
- package/out/plugins/vue-sfc-template.d.ts +0 -4
- package/out/plugins/vue-sfc-template.js +0 -29
- package/out/plugins/vue-template-html.d.ts +0 -4
- package/out/plugins/vue-tsx.js +0 -159
- package/out/types.js +0 -3
- package/out/utils/globalTypes.d.ts +0 -4
- package/out/utils/globalTypes.js +0 -135
- package/out/utils/transform.d.ts +0 -9
- package/out/utils/vue2TemplateCompiler.d.ts +0 -3
- package/out/virtualFile/computedMappings.d.ts +0 -6
- package/out/virtualFile/computedSfc.d.ts +0 -5
- package/out/virtualFile/embeddedFile.d.ts +0 -13
- package/out/virtualFile/embeddedFile.js +0 -16
- package/out/virtualFile/vueFile.d.ts +0 -28
- /package/{out → lib}/utils/parseCssClassNames.js +0 -0
- /package/{out → lib}/utils/parseCssVars.js +0 -0
- /package/{out → lib}/utils/shared.js +0 -0
- /package/{out → lib}/virtualFile/computedVueSfc.js +0 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './lib/generators/template';
|
|
2
|
+
export * from './lib/languageModule';
|
|
3
|
+
export * from './lib/parsers/scriptSetupRanges';
|
|
4
|
+
export * from './lib/plugins';
|
|
5
|
+
export * from './lib/virtualFile/vueFile';
|
|
6
|
+
export * from './lib/types';
|
|
7
|
+
export * from './lib/utils/ts';
|
|
8
|
+
export * from './lib/utils/parseSfc';
|
|
9
|
+
export * as scriptRanges from './lib/parsers/scriptRanges';
|
|
10
|
+
export * from './lib/utils/shared';
|
|
11
|
+
export { tsCodegen } from './lib/plugins/vue-tsx';
|
|
12
|
+
export * from '@volar/language-core';
|
|
13
|
+
export type * as CompilerDOM from '@vue/compiler-dom';
|
|
@@ -14,20 +14,18 @@ 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.tsCodegen = exports.
|
|
18
|
-
__exportStar(require("./generators/template"), exports);
|
|
19
|
-
__exportStar(require("./languageModule"), exports);
|
|
20
|
-
__exportStar(require("./parsers/scriptSetupRanges"), exports);
|
|
21
|
-
__exportStar(require("./plugins"), exports);
|
|
22
|
-
__exportStar(require("./virtualFile/vueFile"), exports);
|
|
23
|
-
__exportStar(require("./types"), exports);
|
|
24
|
-
__exportStar(require("./utils/ts"), exports);
|
|
25
|
-
__exportStar(require("./utils/parseSfc"), exports);
|
|
26
|
-
exports.scriptRanges = require("./parsers/scriptRanges");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var vue_tsx_1 = require("./plugins/vue-tsx");
|
|
17
|
+
exports.tsCodegen = exports.scriptRanges = void 0;
|
|
18
|
+
__exportStar(require("./lib/generators/template"), exports);
|
|
19
|
+
__exportStar(require("./lib/languageModule"), exports);
|
|
20
|
+
__exportStar(require("./lib/parsers/scriptSetupRanges"), exports);
|
|
21
|
+
__exportStar(require("./lib/plugins"), exports);
|
|
22
|
+
__exportStar(require("./lib/virtualFile/vueFile"), exports);
|
|
23
|
+
__exportStar(require("./lib/types"), exports);
|
|
24
|
+
__exportStar(require("./lib/utils/ts"), exports);
|
|
25
|
+
__exportStar(require("./lib/utils/parseSfc"), exports);
|
|
26
|
+
exports.scriptRanges = require("./lib/parsers/scriptRanges");
|
|
27
|
+
__exportStar(require("./lib/utils/shared"), exports);
|
|
28
|
+
var vue_tsx_1 = require("./lib/plugins/vue-tsx");
|
|
30
29
|
Object.defineProperty(exports, "tsCodegen", { enumerable: true, get: function () { return vue_tsx_1.tsCodegen; } });
|
|
31
30
|
__exportStar(require("@volar/language-core"), exports);
|
|
32
|
-
__exportStar(require("@volar/source-map"), exports);
|
|
33
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Mapping } from '@volar/language-core';
|
|
2
|
+
import type * as ts from 'typescript';
|
|
3
|
+
import type { ScriptRanges } from '../parsers/scriptRanges';
|
|
4
|
+
import type { ScriptSetupRanges } from '../parsers/scriptSetupRanges';
|
|
5
|
+
import type { Code, CodeAndStack, Sfc, VueCompilerOptions } from '../types';
|
|
6
|
+
export declare function generate(ts: typeof import('typescript'), fileName: string, script: Sfc['script'], scriptSetup: Sfc['scriptSetup'], styles: Sfc['styles'], // TODO: computed it
|
|
7
|
+
lang: string, scriptRanges: ScriptRanges | undefined, scriptSetupRanges: ScriptSetupRanges | undefined, templateCodegen: {
|
|
8
|
+
tsCodes: Code[];
|
|
9
|
+
tsCodegenStacks: string[];
|
|
10
|
+
tagNames: Set<string>;
|
|
11
|
+
accessedGlobalVariables: Set<string>;
|
|
12
|
+
hasSlot: boolean;
|
|
13
|
+
} | undefined, compilerOptions: ts.CompilerOptions, vueCompilerOptions: VueCompilerOptions, globalTypesHolder: string | undefined, getGeneratedLength: () => number, linkedCodeMappings: Mapping<any>[] | undefined, codegenStack: boolean): Generator<CodeAndStack>;
|