@wevu/compiler 7.5.0 → 7.6.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/dist/index.d.mts +25 -0
- package/dist/index.mjs +14 -12
- package/dist/vueJsxTransform-C4lhnLbg.mjs +1 -0
- package/package.json +10 -9
package/dist/index.d.mts
CHANGED
|
@@ -229,6 +229,7 @@ interface EncodedSourceMapLike {
|
|
|
229
229
|
*/
|
|
230
230
|
interface ResolveSfcBlockSrcOptions {
|
|
231
231
|
resolveId?: (source: string, importer?: string) => Promise<string | undefined>;
|
|
232
|
+
/** 自定义读取器的异常原样传出,保留调用方用于重试或重新同步的控制流。 */
|
|
232
233
|
readFile?: (id: string, options?: {
|
|
233
234
|
checkMtime?: boolean;
|
|
234
235
|
}) => Promise<string>;
|
|
@@ -2137,6 +2138,10 @@ interface TemplateCompileOptions {
|
|
|
2137
2138
|
htmlTagToWxmlTagClass?: boolean;
|
|
2138
2139
|
scopedSlotsCompiler?: ScopedSlotsCompilerMode;
|
|
2139
2140
|
scopedSlotsRequireProps?: boolean;
|
|
2141
|
+
/** 显式启用微信原生普通插槽的声明上下文协议;默认关闭。 */
|
|
2142
|
+
nativeSlotContext?: boolean;
|
|
2143
|
+
/** 上下文分析后需要声明协议的组件标签;未提供时保守保留全部 wevu 组件。@internal */
|
|
2144
|
+
nativeSlotContextTags?: ReadonlySet<string>;
|
|
2140
2145
|
slotSingleRootNoWrapper?: boolean;
|
|
2141
2146
|
slotFallbackWrapper?: SlotFallbackWrapperConfig;
|
|
2142
2147
|
slotFallbackWrapperStrategy?: SlotFallbackWrapperStrategy;
|
|
@@ -2312,6 +2317,16 @@ export declare function getMiniProgramTemplatePlatform(platform?: MpPlatform): M
|
|
|
2312
2317
|
*/
|
|
2313
2318
|
export declare function compileVueTemplateToWxml(template: string, filename: string, options?: TemplateCompileOptions): TemplateCompileResult;
|
|
2314
2319
|
//#endregion
|
|
2320
|
+
//#region src/plugins/vue/transform/compileVueFile/nativeSlotContext/source.d.ts
|
|
2321
|
+
interface SourceFacts {
|
|
2322
|
+
source: string;
|
|
2323
|
+
descriptor?: SFCDescriptor;
|
|
2324
|
+
invalid?: boolean;
|
|
2325
|
+
ast?: File;
|
|
2326
|
+
}
|
|
2327
|
+
/** 缓存单个源文件的原始输入与解析事实,不保存递归分类或递归任务。 */
|
|
2328
|
+
type NativeSlotContextAnalysisCache = Map<string, Promise<SourceFacts | undefined>>;
|
|
2329
|
+
//#endregion
|
|
2315
2330
|
//#region src/plugins/vue/transform/compileVueFile/types.d.ts
|
|
2316
2331
|
interface ResolvedUsingComponentInfo {
|
|
2317
2332
|
from?: string;
|
|
@@ -2340,6 +2355,8 @@ interface VueTransformResult {
|
|
|
2340
2355
|
pageMeta?: JsonMergeContext['pageMeta'];
|
|
2341
2356
|
/** @internal */
|
|
2342
2357
|
componentStyleOptions?: ComponentStyleOptions;
|
|
2358
|
+
/** 已解析模板和计算绑定的注册签名;包含外部模板与静态 JSX 展开。@internal */
|
|
2359
|
+
templateRegistrationSignature?: string;
|
|
2343
2360
|
/** @internal */
|
|
2344
2361
|
runtimeCapabilities?: WevuRuntimeCapabilityMetadata;
|
|
2345
2362
|
hasScriptSetup?: boolean;
|
|
@@ -2349,6 +2366,8 @@ interface VueTransformResult {
|
|
|
2349
2366
|
sfcSrcDeps?: string[];
|
|
2350
2367
|
/** 模板和脚本外部块的编译输入,变化时必须失效完整编译结果。@internal */
|
|
2351
2368
|
sfcSrcCompilationDeps?: string[];
|
|
2369
|
+
/** 原生插槽上下文分析读取的源码依赖,变化时必须重新编译引用方。@internal */
|
|
2370
|
+
nativeSlotContextDeps?: string[];
|
|
2352
2371
|
/** 已解析样式中的 CSS 变量表达式快照。@internal */
|
|
2353
2372
|
cssVars?: string[];
|
|
2354
2373
|
styleBlocks?: SFCStyleBlock[];
|
|
@@ -2471,11 +2490,17 @@ interface CompileVueFileOptions {
|
|
|
2471
2490
|
mergeStrategy?: JsonMergeStrategy;
|
|
2472
2491
|
};
|
|
2473
2492
|
sfcSrc?: ResolveSfcBlockSrcOptions;
|
|
2493
|
+
/** JSX/TSX 跨文件静态展开的同步源码读取;未提供时读取磁盘。 */
|
|
2494
|
+
jsx?: {
|
|
2495
|
+
readFile: (filename: string) => string;
|
|
2496
|
+
};
|
|
2474
2497
|
wevuDefaults?: WevuDefaults;
|
|
2475
2498
|
/**
|
|
2476
2499
|
* 缓存被当前 SFC 引用的 Vue 组件静态元信息,避免重复读取和解析同一组件。
|
|
2477
2500
|
*/
|
|
2478
2501
|
componentMetaCache?: Map<string, Promise<VueSfcStaticComponentMeta>>;
|
|
2502
|
+
/** 原生插槽上下文分析的单文件事实缓存,不缓存传递闭包。@internal */
|
|
2503
|
+
nativeSlotContextCache?: NativeSlotContextAnalysisCache;
|
|
2479
2504
|
}
|
|
2480
2505
|
//#endregion
|
|
2481
2506
|
//#region src/plugins/jsx/compileJsxFile.d.ts
|