@wevu/compiler 6.7.2 → 6.7.4
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 +20 -17
- package/dist/index.mjs +1741 -1759
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -97,6 +97,25 @@ interface WevuDefaults {
|
|
|
97
97
|
component?: Record<string, any>;
|
|
98
98
|
}
|
|
99
99
|
//#endregion
|
|
100
|
+
//#region src/plugins/utils/vueSfcBlockSrc.d.ts
|
|
101
|
+
/**
|
|
102
|
+
* 解析 SFC block `src` 的配置。
|
|
103
|
+
*/
|
|
104
|
+
interface ResolveSfcBlockSrcOptions {
|
|
105
|
+
resolveId?: (source: string, importer?: string) => Promise<string | undefined>;
|
|
106
|
+
readFile?: (id: string, options?: {
|
|
107
|
+
checkMtime?: boolean;
|
|
108
|
+
}) => Promise<string>;
|
|
109
|
+
checkMtime?: boolean;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* 解析 SFC 中带 `src` 的 block,并返回依赖列表。
|
|
113
|
+
*/
|
|
114
|
+
declare function resolveSfcBlockSrc(descriptor: SFCDescriptor, filename: string, options?: ResolveSfcBlockSrcOptions): Promise<{
|
|
115
|
+
descriptor: SFCDescriptor;
|
|
116
|
+
deps: string[];
|
|
117
|
+
}>;
|
|
118
|
+
//#endregion
|
|
100
119
|
//#region src/plugins/utils/vueSfc.d.ts
|
|
101
120
|
/**
|
|
102
121
|
* 读取并解析 SFC 的配置。
|
|
@@ -115,16 +134,6 @@ interface ReadAndParseSfcOptions {
|
|
|
115
134
|
*/
|
|
116
135
|
resolveSrc?: ResolveSfcBlockSrcOptions;
|
|
117
136
|
}
|
|
118
|
-
/**
|
|
119
|
-
* 解析 SFC block `src` 的配置。
|
|
120
|
-
*/
|
|
121
|
-
interface ResolveSfcBlockSrcOptions {
|
|
122
|
-
resolveId?: (source: string, importer?: string) => Promise<string | undefined>;
|
|
123
|
-
readFile?: (id: string, options?: {
|
|
124
|
-
checkMtime?: boolean;
|
|
125
|
-
}) => Promise<string>;
|
|
126
|
-
checkMtime?: boolean;
|
|
127
|
-
}
|
|
128
137
|
/**
|
|
129
138
|
* 预处理 `<script setup src>`,避免编译器丢失 src。
|
|
130
139
|
*/
|
|
@@ -141,13 +150,6 @@ declare function restoreScriptSetupSrc(descriptor: SFCDescriptor): void;
|
|
|
141
150
|
* 将预处理的 `<script src>` 恢复为真实 src。
|
|
142
151
|
*/
|
|
143
152
|
declare function restoreScriptSrc(descriptor: SFCDescriptor): void;
|
|
144
|
-
/**
|
|
145
|
-
* 解析 SFC 中带 `src` 的 block,并返回依赖列表。
|
|
146
|
-
*/
|
|
147
|
-
declare function resolveSfcBlockSrc(descriptor: SFCDescriptor, filename: string, options?: ResolveSfcBlockSrcOptions): Promise<{
|
|
148
|
-
descriptor: SFCDescriptor;
|
|
149
|
-
deps: string[];
|
|
150
|
-
}>;
|
|
151
153
|
/**
|
|
152
154
|
* 读取并解析 SFC,支持缓存与 src 解析。
|
|
153
155
|
*/
|
|
@@ -279,6 +281,7 @@ interface ClassStyleBinding {
|
|
|
279
281
|
type: 'class' | 'style' | 'bind';
|
|
280
282
|
exp: string;
|
|
281
283
|
expAst?: Expression;
|
|
284
|
+
errorFallback?: string;
|
|
282
285
|
forStack: ForParseResult[];
|
|
283
286
|
}
|
|
284
287
|
/**
|