@vue/language-core 1.9.0-alpha.3 → 2.0.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/package.json +6 -9
- 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/index.js +0 -33
- package/out/languageModule.d.ts +0 -10
- package/out/languageModule.js +0 -99
- package/out/parsers/scriptRanges.d.ts +0 -16
- package/out/parsers/scriptRanges.js +0 -58
- package/out/parsers/scriptSetupRanges.d.ts +0 -49
- package/out/parsers/scriptSetupRanges.js +0 -291
- package/out/plugins/file-html.d.ts +0 -4
- package/out/plugins/file-html.js +0 -81
- package/out/plugins/file-md.d.ts +0 -4
- package/out/plugins/file-md.js +0 -71
- package/out/plugins/file-vue.d.ts +0 -4
- package/out/plugins/file-vue.js +0 -40
- 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-template-html.js +0 -169
- package/out/plugins/vue-tsx.d.ts +0 -73
- package/out/plugins/vue-tsx.js +0 -159
- package/out/plugins.d.ts +0 -25
- package/out/plugins.js +0 -58
- package/out/types.d.ts +0 -125
- package/out/types.js +0 -3
- package/out/utils/globalTypes.d.ts +0 -4
- package/out/utils/globalTypes.js +0 -135
- package/out/utils/parseCssClassNames.d.ts +0 -5
- package/out/utils/parseCssClassNames.js +0 -19
- package/out/utils/parseCssVars.d.ts +0 -6
- package/out/utils/parseCssVars.js +0 -28
- package/out/utils/parseSfc.d.ts +0 -3
- package/out/utils/parseSfc.js +0 -135
- package/out/utils/shared.d.ts +0 -4
- package/out/utils/shared.js +0 -20
- package/out/utils/transform.d.ts +0 -9
- package/out/utils/transform.js +0 -195
- package/out/utils/ts.d.ts +0 -9
- package/out/utils/ts.js +0 -237
- package/out/utils/vue2TemplateCompiler.d.ts +0 -3
- package/out/utils/vue2TemplateCompiler.js +0 -86
- package/out/virtualFile/computedFiles.d.ts +0 -4
- package/out/virtualFile/computedFiles.js +0 -204
- package/out/virtualFile/computedMappings.d.ts +0 -6
- package/out/virtualFile/computedMappings.js +0 -39
- package/out/virtualFile/computedSfc.d.ts +0 -5
- package/out/virtualFile/computedSfc.js +0 -197
- package/out/virtualFile/computedVueSfc.d.ts +0 -5
- package/out/virtualFile/computedVueSfc.js +0 -41
- 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/virtualFile/vueFile.js +0 -53
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VueFile = void 0;
|
|
4
|
-
const language_core_1 = require("@volar/language-core");
|
|
5
|
-
const computedFiles_1 = require("./computedFiles");
|
|
6
|
-
const computedMappings_1 = require("./computedMappings");
|
|
7
|
-
const computedSfc_1 = require("./computedSfc");
|
|
8
|
-
const computedVueSfc_1 = require("./computedVueSfc");
|
|
9
|
-
const computeds_1 = require("computeds");
|
|
10
|
-
const jsxReg = /^\.(js|ts)x?$/;
|
|
11
|
-
class VueFile {
|
|
12
|
-
get embeddedFiles() {
|
|
13
|
-
return this.getEmbeddedFiles();
|
|
14
|
-
}
|
|
15
|
-
get mainScriptName() {
|
|
16
|
-
let res = '';
|
|
17
|
-
(0, language_core_1.forEachEmbeddedFile)(this, file => {
|
|
18
|
-
if (file.kind === language_core_1.FileKind.TypeScriptHostFile && file.fileName.replace(this.fileName, '').match(jsxReg)) {
|
|
19
|
-
res = file.fileName;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
return res;
|
|
23
|
-
}
|
|
24
|
-
get snapshot() {
|
|
25
|
-
return this._snapshot();
|
|
26
|
-
}
|
|
27
|
-
get mappings() {
|
|
28
|
-
return this.getMappings();
|
|
29
|
-
}
|
|
30
|
-
constructor(fileName, initSnapshot, vueCompilerOptions, plugins, ts, codegenStack) {
|
|
31
|
-
this.fileName = fileName;
|
|
32
|
-
this.initSnapshot = initSnapshot;
|
|
33
|
-
this.vueCompilerOptions = vueCompilerOptions;
|
|
34
|
-
this.plugins = plugins;
|
|
35
|
-
this.ts = ts;
|
|
36
|
-
this.codegenStack = codegenStack;
|
|
37
|
-
// computeds
|
|
38
|
-
this.getVueSfc = (0, computedVueSfc_1.computedVueSfc)(this.plugins, this.fileName, () => this._snapshot());
|
|
39
|
-
this.sfc = (0, computedSfc_1.computedSfc)(this.ts, this.plugins, this.fileName, () => this._snapshot(), this.getVueSfc);
|
|
40
|
-
this.getMappings = (0, computedMappings_1.computedMappings)(() => this._snapshot(), this.sfc);
|
|
41
|
-
this.getEmbeddedFiles = (0, computedFiles_1.computedFiles)(this.plugins, this.fileName, this.sfc, this.codegenStack);
|
|
42
|
-
// others
|
|
43
|
-
this.capabilities = language_core_1.FileCapabilities.full;
|
|
44
|
-
this.kind = language_core_1.FileKind.TextFile;
|
|
45
|
-
this.codegenStacks = [];
|
|
46
|
-
this._snapshot = (0, computeds_1.signal)(initSnapshot);
|
|
47
|
-
}
|
|
48
|
-
update(newSnapshot) {
|
|
49
|
-
this._snapshot.set(newSnapshot);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.VueFile = VueFile;
|
|
53
|
-
//# sourceMappingURL=vueFile.js.map
|