@wevu/compiler 7.9.0 → 7.10.1-dev.20261112.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/dist/index.d.mts +9 -1
- package/dist/index.mjs +6 -6
- package/package.json +17 -9
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import "@vue/compiler-core";
|
|
|
4
4
|
import { parse } from "@vue/compiler-dom";
|
|
5
5
|
import { LRUCache } from "lru-cache";
|
|
6
6
|
import MagicString from "magic-string";
|
|
7
|
-
import { SFCBlock, SFCDescriptor, SFCParseResult, SFCStyleBlock } from "vue/compiler-sfc";
|
|
7
|
+
import { SFCBlock, SFCDescriptor, SFCParseOptions, SFCParseResult, SFCStyleBlock } from "vue/compiler-sfc";
|
|
8
8
|
import * as t from "@weapp-vite/ast/babelTypes";
|
|
9
9
|
import { Expression, File } from "@weapp-vite/ast/babelTypes";
|
|
10
10
|
import { MpPlatform } from "@weapp-core/shared";
|
|
@@ -260,6 +260,10 @@ interface ReadAndParseSfcOptions {
|
|
|
260
260
|
*/
|
|
261
261
|
resolveSrc?: ResolveSfcBlockSrcOptions;
|
|
262
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* 解析 SFC,并在 Vue 完成块归属与校验后恢复外部脚本来源。
|
|
265
|
+
*/
|
|
266
|
+
export declare function parseVueSfc(source: string, options?: Omit<SFCParseOptions, 'compiler'>): SFCParseResult;
|
|
263
267
|
/**
|
|
264
268
|
* 预处理 `<script setup src>`,避免编译器丢失 src。
|
|
265
269
|
*/
|
|
@@ -2042,6 +2046,10 @@ interface InlineExpressionAsset {
|
|
|
2042
2046
|
scopeKeys: string[];
|
|
2043
2047
|
/** @internal */
|
|
2044
2048
|
parameterNames: InlineExpressionParameterNames;
|
|
2049
|
+
/** 编译器生成的 helper 局部名称,由脚本生成器绑定到对应运行时导入。@internal */
|
|
2050
|
+
runtimeHelpers?: {
|
|
2051
|
+
unref?: string;
|
|
2052
|
+
};
|
|
2045
2053
|
indexBindings?: InlineExpressionIndexBindingAsset[];
|
|
2046
2054
|
scopeResolvers?: InlineExpressionScopeResolverAsset[];
|
|
2047
2055
|
}
|