@wevu/compiler 6.21.0 → 6.23.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 +30 -5
- package/dist/index.mjs +578 -292
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -320,8 +320,12 @@ interface TemplateCompileResult {
|
|
|
320
320
|
*/
|
|
321
321
|
interface ForParseResult {
|
|
322
322
|
listExp?: string;
|
|
323
|
+
rawListExp?: string;
|
|
323
324
|
listExpAst?: Expression;
|
|
325
|
+
projectedListExp?: string;
|
|
326
|
+
projectedListExpAst?: Expression;
|
|
324
327
|
item?: string;
|
|
328
|
+
itemAccess?: string;
|
|
325
329
|
index?: string;
|
|
326
330
|
key?: string;
|
|
327
331
|
itemAliases?: Record<string, string>;
|
|
@@ -353,9 +357,16 @@ interface TemplateCompileOptions {
|
|
|
353
357
|
wxsExtension?: string;
|
|
354
358
|
classStyleWxsSrc?: string;
|
|
355
359
|
functionPropNames?: Iterable<FunctionPropNameMatcher>;
|
|
360
|
+
/**
|
|
361
|
+
* 允许保留在小程序模板中的直接函数调用名。
|
|
362
|
+
*/
|
|
363
|
+
templateSafeCallNames?: Iterable<string>;
|
|
356
364
|
wevuComponentTags?: Iterable<string>;
|
|
357
365
|
componentNameMap?: Record<string, string>;
|
|
358
366
|
miniProgramComponentTags?: Iterable<string>;
|
|
367
|
+
scopeId?: string;
|
|
368
|
+
slottedScopeId?: string;
|
|
369
|
+
cssVars?: boolean;
|
|
359
370
|
}
|
|
360
371
|
/**
|
|
361
372
|
* 作用域插槽编译模式。
|
|
@@ -604,6 +615,10 @@ interface CompileVueFileOptions {
|
|
|
604
615
|
* 是否在当前阶段改写 scoped 选择器。预处理语言应由最终 CSS 管线完成隔离时可关闭。
|
|
605
616
|
*/
|
|
606
617
|
transformScoped?: boolean;
|
|
618
|
+
/**
|
|
619
|
+
* 按预处理语言传递的 Vite CSS 预处理选项。
|
|
620
|
+
*/
|
|
621
|
+
preprocessOptions?: Record<string, Record<string, unknown>>;
|
|
607
622
|
};
|
|
608
623
|
json?: {
|
|
609
624
|
kind?: 'app' | 'page' | 'component';
|
|
@@ -690,7 +705,6 @@ declare function clearFileCaches(): void;
|
|
|
690
705
|
declare function transformNestedWxssVars(source: string): string;
|
|
691
706
|
//#endregion
|
|
692
707
|
//#region src/plugins/vue/compiler/style.d.ts
|
|
693
|
-
declare function transformVueDeepSelectors(source: string): string;
|
|
694
708
|
/**
|
|
695
709
|
* 样式编译结果。
|
|
696
710
|
*/
|
|
@@ -698,23 +712,30 @@ interface StyleCompileResult {
|
|
|
698
712
|
code: string;
|
|
699
713
|
map?: string;
|
|
700
714
|
scopedId?: string;
|
|
715
|
+
usesSlotted?: boolean;
|
|
701
716
|
modules?: Record<string, Record<string, string>>;
|
|
717
|
+
dependencies?: string[];
|
|
702
718
|
}
|
|
703
719
|
/**
|
|
704
720
|
* 样式编译选项。
|
|
705
721
|
*/
|
|
706
722
|
interface StyleCompileOptions {
|
|
707
723
|
id: string;
|
|
724
|
+
filename?: string;
|
|
708
725
|
scoped?: boolean;
|
|
709
726
|
transformScoped?: boolean;
|
|
710
727
|
modules?: boolean | string;
|
|
711
|
-
preprocessOptions?: Record<string,
|
|
728
|
+
preprocessOptions?: Record<string, unknown>;
|
|
712
729
|
preserveDeepSelectors?: boolean;
|
|
713
730
|
}
|
|
714
731
|
/**
|
|
715
|
-
*
|
|
732
|
+
* compiler-sfc 已在 scoped 插件中处理 deep 选择器,此函数保留为兼容入口。
|
|
716
733
|
*/
|
|
717
|
-
declare function
|
|
734
|
+
declare function transformVueDeepSelectors(source: string): string;
|
|
735
|
+
/**
|
|
736
|
+
* 将 Vue SFC style 块编译为可交给 Vite CSS 管线的内容。
|
|
737
|
+
*/
|
|
738
|
+
declare function compileVueStyleToWxss(styleBlock: SFCStyleBlock, options: StyleCompileOptions): Promise<StyleCompileResult>;
|
|
718
739
|
//#endregion
|
|
719
740
|
//#region src/plugins/vue/compiler/template/classStyleRuntime.d.ts
|
|
720
741
|
/**
|
|
@@ -833,7 +854,7 @@ declare function createJsonMerger(strategy: JsonMergeStrategy | undefined, baseC
|
|
|
833
854
|
//#endregion
|
|
834
855
|
//#region src/plugins/vue/transform/scopedId.d.ts
|
|
835
856
|
/**
|
|
836
|
-
*
|
|
857
|
+
* 根据项目内相对路径生成跨机器稳定的 scoped ID。
|
|
837
858
|
*/
|
|
838
859
|
declare function generateScopedId(filename: string): string;
|
|
839
860
|
//#endregion
|
|
@@ -929,6 +950,10 @@ interface TransformScriptOptions {
|
|
|
929
950
|
* 当前组件模板包含 scoped slot outlet,需要接收 scoped slot 桥接属性。
|
|
930
951
|
*/
|
|
931
952
|
scopedSlotHostProperties?: boolean;
|
|
953
|
+
/**
|
|
954
|
+
* 当前 SFC 的 CSS Modules 映射。
|
|
955
|
+
*/
|
|
956
|
+
cssModules?: Record<string, Record<string, string>>;
|
|
932
957
|
}
|
|
933
958
|
//#endregion
|
|
934
959
|
//#region src/plugins/vue/transform/transformScript/index.d.ts
|