@vue/compiler-sfc 3.2.20 → 3.2.24
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/compiler-sfc.cjs.js +14111 -14078
- package/dist/compiler-sfc.d.ts +24 -2
- package/dist/compiler-sfc.esm-browser.js +18455 -18425
- package/package.json +6 -6
package/dist/compiler-sfc.d.ts
CHANGED
|
@@ -76,6 +76,14 @@ export { extractIdentifiers }
|
|
|
76
76
|
|
|
77
77
|
export { generateCodeFrame }
|
|
78
78
|
|
|
79
|
+
declare interface ImportBinding {
|
|
80
|
+
isType: boolean;
|
|
81
|
+
imported: string;
|
|
82
|
+
source: string;
|
|
83
|
+
isFromSetup: boolean;
|
|
84
|
+
isUsedInTemplate: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
79
87
|
export { isInDestructureAssignment }
|
|
80
88
|
|
|
81
89
|
export { isStaticProperty }
|
|
@@ -117,7 +125,20 @@ export declare interface SFCDescriptor {
|
|
|
117
125
|
styles: SFCStyleBlock[];
|
|
118
126
|
customBlocks: SFCBlock[];
|
|
119
127
|
cssVars: string[];
|
|
128
|
+
/**
|
|
129
|
+
* whether the SFC uses :slotted() modifier.
|
|
130
|
+
* this is used as a compiler optimization hint.
|
|
131
|
+
*/
|
|
120
132
|
slotted: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* compare with an existing descriptor to determine whether HMR should perform
|
|
135
|
+
* a reload vs. re-render.
|
|
136
|
+
*
|
|
137
|
+
* Note: this comparison assumes the prev/next script are already identical,
|
|
138
|
+
* and only checks the special case where <script setup lang="ts"> unused import
|
|
139
|
+
* pruning result changes due to template changes.
|
|
140
|
+
*/
|
|
141
|
+
shouldForceReload: (prevImports: Record<string, ImportBinding>) => boolean;
|
|
121
142
|
}
|
|
122
143
|
|
|
123
144
|
export declare interface SFCParseOptions {
|
|
@@ -138,6 +159,7 @@ export declare interface SFCScriptBlock extends SFCBlock {
|
|
|
138
159
|
type: 'script';
|
|
139
160
|
setup?: string | boolean;
|
|
140
161
|
bindings?: BindingMetadata;
|
|
162
|
+
imports?: Record<string, ImportBinding>;
|
|
141
163
|
/**
|
|
142
164
|
* import('\@babel/types').Statement
|
|
143
165
|
*/
|
|
@@ -150,7 +172,7 @@ export declare interface SFCScriptBlock extends SFCBlock {
|
|
|
150
172
|
|
|
151
173
|
export declare interface SFCScriptCompileOptions {
|
|
152
174
|
/**
|
|
153
|
-
* Scope ID for prefixing injected CSS
|
|
175
|
+
* Scope ID for prefixing injected CSS variables.
|
|
154
176
|
* This must be consistent with the `id` passed to `compileStyle`.
|
|
155
177
|
*/
|
|
156
178
|
id: string;
|
|
@@ -192,7 +214,7 @@ export declare interface SFCScriptCompileOptions {
|
|
|
192
214
|
inlineTemplate?: boolean;
|
|
193
215
|
/**
|
|
194
216
|
* Options for template compilation when inlining. Note these are options that
|
|
195
|
-
* would normally be
|
|
217
|
+
* would normally be passed to `compiler-sfc`'s own `compileTemplate()`, not
|
|
196
218
|
* options passed to `compiler-dom`.
|
|
197
219
|
*/
|
|
198
220
|
templateOptions?: Partial<SFCTemplateCompileOptions>;
|