@volar/vue-language-core
Advanced tools
Comparing version 1.0.14 to 1.0.16
@@ -370,3 +370,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
codeGen.push(`,\n`); | ||
if (htmlGen === null || htmlGen === void 0 ? void 0 : htmlGen.slotsNum) { | ||
if (htmlGen === null || htmlGen === void 0 ? void 0 : htmlGen.hasSlot) { | ||
codeGen.push(`children: ReturnType<typeof __VLS_template>,\n`); | ||
@@ -380,3 +380,3 @@ } | ||
else { | ||
if (htmlGen === null || htmlGen === void 0 ? void 0 : htmlGen.slotsNum) { | ||
if (htmlGen === null || htmlGen === void 0 ? void 0 : htmlGen.hasSlot) { | ||
usedTypes.WithTemplateSlots = true; | ||
@@ -549,3 +549,2 @@ codeGen.push(`return {} as __VLS_WithTemplateSlots<typeof __VLS_publicComponent, ReturnType<typeof __VLS_template>>;\n`); | ||
codeGen.push(`let __VLS_ctx!: ${useGlobalThisTypeInCtx ? 'typeof globalThis &' : ''}`); | ||
codeGen.push(`import('./__VLS_types.js').PickNotAny<__VLS_Ctx, {}> & `); | ||
if (sfc.scriptSetup) { | ||
@@ -552,0 +551,0 @@ codeGen.push(`InstanceType<import('./__VLS_types.js').PickNotAny<typeof __VLS_publicComponent, new () => {}>> & `); |
@@ -10,5 +10,5 @@ import { PositionCapabilities } from '@volar/language-core'; | ||
identifiers: Set<string>; | ||
slotsNum: number; | ||
hasSlot: boolean; | ||
}; | ||
export declare function walkElementNodes(node: CompilerDOM.RootNode | CompilerDOM.TemplateChildNode, cb: (node: CompilerDOM.ElementNode) => void): void; | ||
export declare function getPatchForSlotNode(node: CompilerDOM.ElementNode): CompilerDOM.ForNode | undefined; |
@@ -56,4 +56,4 @@ import { DocumentCapabilities, EmbeddedFile, EmbeddedFileKind, PositionCapabilities, SourceFile, TeleportMappingData } from '@volar/language-core'; | ||
sfcBlocks: ComputedRef<Record<string, SfcBlock>>; | ||
get kind(): EmbeddedFileKind; | ||
get capabilities(): DocumentCapabilities; | ||
kind: EmbeddedFileKind; | ||
capabilities: DocumentCapabilities; | ||
get mappings(): Mapping<PositionCapabilities>[]; | ||
@@ -69,2 +69,3 @@ get text(): string; | ||
_snapshot: Ref<ts.IScriptSnapshot>; | ||
_mappings: ComputedRef<Mapping<PositionCapabilities>[]>; | ||
_allEmbeddeds: import("@vue/reactivity").ShallowRef<{ | ||
@@ -71,0 +72,0 @@ file: VueEmbeddedFile; |
@@ -138,29 +138,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
get kind() { | ||
return language_core_1.EmbeddedFileKind.TextFile; | ||
} | ||
get capabilities() { | ||
return { | ||
diagnostic: true, | ||
foldingRange: true, | ||
documentFormatting: true, | ||
documentSymbol: true, | ||
codeAction: true, | ||
inlayHint: true, | ||
}; | ||
} | ||
get mappings() { | ||
return [{ | ||
sourceRange: [0, this._snapshot.value.getLength()], | ||
generatedRange: [0, this._snapshot.value.getLength()], | ||
data: { | ||
hover: true, | ||
references: true, | ||
definition: true, | ||
rename: true, | ||
completion: true, | ||
diagnostic: true, | ||
semanticTokens: true, | ||
}, | ||
}]; | ||
return this._mappings.value; | ||
} | ||
@@ -225,2 +200,24 @@ get text() { | ||
}); | ||
this.kind = language_core_1.EmbeddedFileKind.TextFile; | ||
this.capabilities = { | ||
diagnostic: true, | ||
foldingRange: true, | ||
documentFormatting: true, | ||
documentSymbol: true, | ||
codeAction: true, | ||
inlayHint: true, | ||
}; | ||
this._mappings = (0, reactivity_1.computed)(() => [{ | ||
sourceRange: [0, this._snapshot.value.getLength()], | ||
generatedRange: [0, this._snapshot.value.getLength()], | ||
data: { | ||
hover: true, | ||
references: true, | ||
definition: true, | ||
rename: true, | ||
completion: true, | ||
diagnostic: true, | ||
semanticTokens: true, | ||
}, | ||
}]); | ||
this._allEmbeddeds = (0, reactivity_1.shallowRef)([]); | ||
@@ -227,0 +224,0 @@ this._embeddeds = (0, reactivity_1.shallowRef)([]); |
@@ -9,3 +9,2 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
return ` | ||
import * as vue from '${libName}'; | ||
import type { | ||
@@ -36,3 +35,3 @@ FunctionalComponent, | ||
& PickNotAny<import('@vue/runtime-dom').GlobalComponents, {}> | ||
& Pick<typeof vue, | ||
& Pick<typeof import('${libName}'), | ||
// @ts-ignore | ||
@@ -39,0 +38,0 @@ 'Transition' |
@@ -56,3 +56,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
else { | ||
cb('(__VLS_ctx).', undefined); | ||
cb('__VLS_ctx.', undefined); | ||
if (ctxVars[i + 1].isShorthand) { | ||
@@ -81,3 +81,3 @@ cb(code.substring(ctxVars[i].offset, ctxVars[i + 1].offset + ctxVars[i + 1].text.length), ctxVars[i].offset); | ||
cb('', ctxVars[ctxVars.length - 1].offset, true); | ||
cb('(__VLS_ctx).', undefined); | ||
cb('__VLS_ctx.', undefined); | ||
cb(code.substring(ctxVars[ctxVars.length - 1].offset), ctxVars[ctxVars.length - 1].offset); | ||
@@ -84,0 +84,0 @@ } |
{ | ||
"name": "@volar/vue-language-core", | ||
"version": "1.0.14", | ||
"version": "1.0.16", | ||
"main": "out/index.js", | ||
@@ -16,4 +16,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"@volar/language-core": "1.0.14", | ||
"@volar/source-map": "1.0.14", | ||
"@volar/language-core": "1.0.16", | ||
"@volar/source-map": "1.0.16", | ||
"@vue/compiler-dom": "^3.2.45", | ||
@@ -23,3 +23,3 @@ "@vue/compiler-sfc": "^3.2.45", | ||
"@vue/shared": "^3.2.45", | ||
"minimatch": "^5.1.0", | ||
"minimatch": "^5.1.1", | ||
"vue-template-compiler": "^2.7.14" | ||
@@ -30,3 +30,3 @@ }, | ||
}, | ||
"gitHead": "ce4d48b37db784400e15fe08282edc836e24d4cd" | ||
"gitHead": "af476047d8859652254ed36f8aee184f1972a97a" | ||
} |
Sorry, the diff of this file is too big to display
235069
5106
+ Added@volar/language-core@1.0.16(transitive)
+ Added@volar/source-map@1.0.16(transitive)
- Removed@volar/language-core@1.0.14(transitive)
- Removed@volar/source-map@1.0.14(transitive)
Updated@volar/language-core@1.0.16
Updated@volar/source-map@1.0.16
Updatedminimatch@^5.1.1