@vue/shared 3.6.0-rc.1 → 3.6.0-rc.11
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/shared.cjs.js +103 -39
- package/dist/shared.cjs.prod.js +103 -39
- package/dist/shared.d.ts +261 -240
- package/dist/shared.esm-bundler.js +100 -40
- package/package.json +1 -1
package/dist/shared.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
//#region temp/packages/shared/src/makeMap.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Make a map and return a function for checking if a key
|
|
4
|
-
* is in that map.
|
|
5
|
-
* IMPORTANT: all calls of this function must be prefixed with
|
|
6
|
-
* \/\*#\_\_PURE\_\_\*\/
|
|
7
|
-
* So that they can be tree-shaken if necessary.
|
|
8
|
-
*/
|
|
3
|
+
* Make a map and return a function for checking if a key
|
|
4
|
+
* is in that map.
|
|
5
|
+
* IMPORTANT: all calls of this function must be prefixed with
|
|
6
|
+
* \/\*#\_\_PURE\_\_\*\/
|
|
7
|
+
* So that they can be tree-shaken if necessary.
|
|
8
|
+
*/
|
|
9
9
|
export declare function makeMap(str: string): (key: string) => boolean;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region temp/packages/shared/src/general.d.ts
|
|
@@ -15,12 +15,12 @@ export declare const EMPTY_OBJ: {
|
|
|
15
15
|
export declare const EMPTY_ARR: readonly never[];
|
|
16
16
|
export declare const NOOP: () => void;
|
|
17
17
|
/**
|
|
18
|
-
* Always return true.
|
|
19
|
-
*/
|
|
18
|
+
* Always return true.
|
|
19
|
+
*/
|
|
20
20
|
export declare const YES: () => boolean;
|
|
21
21
|
/**
|
|
22
|
-
* Always return false.
|
|
23
|
-
*/
|
|
22
|
+
* Always return false.
|
|
23
|
+
*/
|
|
24
24
|
export declare const NO: () => boolean;
|
|
25
25
|
export declare const isOn: (key: string) => boolean;
|
|
26
26
|
export declare const isNativeOn: (key: string) => boolean;
|
|
@@ -47,40 +47,40 @@ export declare const isReservedProp: (key: string) => boolean;
|
|
|
47
47
|
export declare const isBuiltInTag: (key: string) => boolean;
|
|
48
48
|
export declare const isBuiltInDirective: (key: string) => boolean;
|
|
49
49
|
/**
|
|
50
|
-
* @private
|
|
51
|
-
*/
|
|
50
|
+
* @private
|
|
51
|
+
*/
|
|
52
52
|
export declare const camelize: (str: string) => string;
|
|
53
53
|
/**
|
|
54
|
-
* @private
|
|
55
|
-
*/
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
56
|
export declare const hyphenate: (str: string) => string;
|
|
57
57
|
/**
|
|
58
|
-
* @private
|
|
59
|
-
*/
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
60
|
export declare const capitalize: <T extends string>(str: T) => Capitalize<T>;
|
|
61
61
|
/**
|
|
62
|
-
* @private
|
|
63
|
-
*/
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
64
|
export declare const toHandlerKey: <T extends string>(str: T) => T extends "" ? "" : `on${Capitalize<T>}`;
|
|
65
65
|
/**
|
|
66
|
-
* #13070 When v-model and v-model:model directives are used together,
|
|
67
|
-
* they will generate the same modelModifiers prop,
|
|
68
|
-
* so a `$` suffix is added to avoid conflicts.
|
|
69
|
-
* @private
|
|
70
|
-
*/
|
|
66
|
+
* #13070 When v-model and v-model:model directives are used together,
|
|
67
|
+
* they will generate the same modelModifiers prop,
|
|
68
|
+
* so a `$` suffix is added to avoid conflicts.
|
|
69
|
+
* @private
|
|
70
|
+
*/
|
|
71
71
|
export declare const getModifierPropName: (name: string) => string;
|
|
72
72
|
export declare const hasChanged: (value: any, oldValue: any) => boolean;
|
|
73
73
|
export declare const invokeArrayFns: (fns: Function[], ...arg: any[]) => void;
|
|
74
74
|
export declare const def: (obj: object, key: string | symbol, value: any, writable?: boolean) => void;
|
|
75
75
|
/**
|
|
76
|
-
* "123-foo" will be parsed to 123
|
|
77
|
-
* This is used for the .number modifier in v-model
|
|
78
|
-
*/
|
|
76
|
+
* "123-foo" will be parsed to 123
|
|
77
|
+
* This is used for the .number modifier in v-model
|
|
78
|
+
*/
|
|
79
79
|
export declare const looseToNumber: (val: any) => any;
|
|
80
80
|
/**
|
|
81
|
-
* Only concerns number-like strings
|
|
82
|
-
* "123-foo" will be returned as-is
|
|
83
|
-
*/
|
|
81
|
+
* Only concerns number-like strings
|
|
82
|
+
* "123-foo" will be returned as-is
|
|
83
|
+
*/
|
|
84
84
|
export declare const toNumber: (val: any) => any;
|
|
85
85
|
export declare const getGlobalThis: () => any;
|
|
86
86
|
export declare function genPropsAccessExp(name: string): string;
|
|
@@ -89,119 +89,119 @@ export declare function canSetValueDirectly(tagName: string): boolean;
|
|
|
89
89
|
//#endregion
|
|
90
90
|
//#region temp/packages/shared/src/patchFlags.d.ts
|
|
91
91
|
/**
|
|
92
|
-
* Patch flags are optimization hints generated by the compiler.
|
|
93
|
-
* when a block with dynamicChildren is encountered during diff, the algorithm
|
|
94
|
-
* enters "optimized mode". In this mode, we know that the vdom is produced by
|
|
95
|
-
* a render function generated by the compiler, so the algorithm only needs to
|
|
96
|
-
* handle updates explicitly marked by these patch flags.
|
|
97
|
-
*
|
|
98
|
-
* Patch flags can be combined using the | bitwise operator and can be checked
|
|
99
|
-
* using the & operator, e.g.
|
|
100
|
-
*
|
|
101
|
-
* ```js
|
|
102
|
-
* const flag = TEXT | CLASS
|
|
103
|
-
* if (flag & TEXT) { ... }
|
|
104
|
-
* ```
|
|
105
|
-
*
|
|
106
|
-
* Check the `patchElement` function in '../../runtime-core/src/renderer.ts' to see how the
|
|
107
|
-
* flags are handled during diff.
|
|
108
|
-
*/
|
|
92
|
+
* Patch flags are optimization hints generated by the compiler.
|
|
93
|
+
* when a block with dynamicChildren is encountered during diff, the algorithm
|
|
94
|
+
* enters "optimized mode". In this mode, we know that the vdom is produced by
|
|
95
|
+
* a render function generated by the compiler, so the algorithm only needs to
|
|
96
|
+
* handle updates explicitly marked by these patch flags.
|
|
97
|
+
*
|
|
98
|
+
* Patch flags can be combined using the | bitwise operator and can be checked
|
|
99
|
+
* using the & operator, e.g.
|
|
100
|
+
*
|
|
101
|
+
* ```js
|
|
102
|
+
* const flag = TEXT | CLASS
|
|
103
|
+
* if (flag & TEXT) { ... }
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* Check the `patchElement` function in '../../runtime-core/src/renderer.ts' to see how the
|
|
107
|
+
* flags are handled during diff.
|
|
108
|
+
*/
|
|
109
109
|
export declare enum PatchFlags {
|
|
110
110
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
* Indicates an element with dynamic textContent (children fast path)
|
|
112
|
+
*/
|
|
113
113
|
TEXT = 1,
|
|
114
114
|
/**
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
* Indicates an element with dynamic class binding.
|
|
116
|
+
*/
|
|
117
117
|
CLASS = 2,
|
|
118
118
|
/**
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
119
|
+
* Indicates an element with dynamic style
|
|
120
|
+
* The compiler pre-compiles static string styles into static objects
|
|
121
|
+
* + detects and hoists inline static objects
|
|
122
|
+
* e.g. `style="color: red"` and `:style="{ color: 'red' }"` both get hoisted
|
|
123
|
+
* as:
|
|
124
|
+
* ```js
|
|
125
|
+
* const style = { color: 'red' }
|
|
126
|
+
* render() { return e('div', { style }) }
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
129
|
STYLE = 4,
|
|
130
130
|
/**
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
* Indicates an element that has non-class/style dynamic props.
|
|
132
|
+
* Can also be on a component that has any dynamic props (includes
|
|
133
|
+
* class/style). when this flag is present, the vnode also has a dynamicProps
|
|
134
|
+
* array that contains the keys of the props that may change so the runtime
|
|
135
|
+
* can diff them faster (without having to worry about removed props)
|
|
136
|
+
*/
|
|
137
137
|
PROPS = 8,
|
|
138
138
|
/**
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
* Indicates an element with props with dynamic keys. When keys change, a full
|
|
140
|
+
* diff is always needed to remove the old key. This flag is mutually
|
|
141
|
+
* exclusive with CLASS, STYLE and PROPS.
|
|
142
|
+
*/
|
|
143
143
|
FULL_PROPS = 16,
|
|
144
144
|
/**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
* Indicates an element that requires props hydration
|
|
146
|
+
* (but not necessarily patching)
|
|
147
|
+
* e.g. event listeners & v-bind with prop modifier
|
|
148
|
+
*/
|
|
149
149
|
NEED_HYDRATION = 32,
|
|
150
150
|
/**
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
* Indicates a fragment whose children order doesn't change.
|
|
152
|
+
*/
|
|
153
153
|
STABLE_FRAGMENT = 64,
|
|
154
154
|
/**
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
* Indicates a fragment with keyed or partially keyed children
|
|
156
|
+
*/
|
|
157
157
|
KEYED_FRAGMENT = 128,
|
|
158
158
|
/**
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
* Indicates a fragment with unkeyed children.
|
|
160
|
+
*/
|
|
161
161
|
UNKEYED_FRAGMENT = 256,
|
|
162
162
|
/**
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
* Indicates an element that only needs non-props patching, e.g. ref or
|
|
164
|
+
* directives (onVnodeXXX hooks). since every patched vnode checks for refs
|
|
165
|
+
* and onVnodeXXX hooks, it simply marks the vnode so that a parent block
|
|
166
|
+
* will track it.
|
|
167
|
+
*/
|
|
168
168
|
NEED_PATCH = 512,
|
|
169
169
|
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
* Indicates a component with dynamic slots (e.g. slot that references a v-for
|
|
171
|
+
* iterated value, or dynamic slot names).
|
|
172
|
+
* Components with this flag are always force updated.
|
|
173
|
+
*/
|
|
174
174
|
DYNAMIC_SLOTS = 1024,
|
|
175
175
|
/**
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
* Indicates a fragment that was created only because the user has placed
|
|
177
|
+
* comments at the root level of a template. This is a dev-only flag since
|
|
178
|
+
* comments are stripped in production.
|
|
179
|
+
*/
|
|
180
180
|
DEV_ROOT_FRAGMENT = 2048,
|
|
181
181
|
/**
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
* SPECIAL FLAGS -------------------------------------------------------------
|
|
183
|
+
* Special flags are negative integers. They are never matched against using
|
|
184
|
+
* bitwise operators (bitwise matching should only happen in branches where
|
|
185
|
+
* patchFlag > 0), and are mutually exclusive. When checking for a special
|
|
186
|
+
* flag, simply check patchFlag === FLAG.
|
|
187
|
+
*/
|
|
188
188
|
/**
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
* Indicates a cached static vnode. This is also a hint for hydration to skip
|
|
190
|
+
* the entire sub tree since static content never needs to be updated.
|
|
191
|
+
*/
|
|
192
192
|
CACHED = -1,
|
|
193
193
|
/**
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
194
|
+
* A special flag that indicates that the diffing algorithm should bail out
|
|
195
|
+
* of optimized mode. For example, on block fragments created by renderSlot()
|
|
196
|
+
* when encountering non-compiler generated slots (i.e. manually written
|
|
197
|
+
* render functions, which should always be fully diffed)
|
|
198
|
+
* OR manually cloneVNodes
|
|
199
|
+
*/
|
|
200
200
|
BAIL = -2
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
|
-
* dev only flag -> name mapping
|
|
204
|
-
*/
|
|
203
|
+
* dev only flag -> name mapping
|
|
204
|
+
*/
|
|
205
205
|
export declare const PatchFlagNames: Record<PatchFlags, string>;
|
|
206
206
|
//#endregion
|
|
207
207
|
//#region temp/packages/shared/src/shapeFlags.d.ts
|
|
@@ -216,34 +216,35 @@ export declare enum ShapeFlags {
|
|
|
216
216
|
SUSPENSE = 128,
|
|
217
217
|
COMPONENT_SHOULD_KEEP_ALIVE = 256,
|
|
218
218
|
COMPONENT_KEPT_ALIVE = 512,
|
|
219
|
+
SLOT_FALLBACK = 1024,
|
|
219
220
|
COMPONENT = 6
|
|
220
221
|
}
|
|
221
222
|
//#endregion
|
|
222
223
|
//#region temp/packages/shared/src/slotFlags.d.ts
|
|
223
224
|
export declare enum SlotFlags {
|
|
224
225
|
/**
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
* Stable slots that only reference slot props or context state. The slot
|
|
227
|
+
* can fully capture its own dependencies so when passed down the parent won't
|
|
228
|
+
* need to force the child to update.
|
|
229
|
+
*/
|
|
229
230
|
STABLE = 1,
|
|
230
231
|
/**
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
* Slots that reference scope variables (v-for or an outer slot prop), or
|
|
233
|
+
* has conditional structure (v-if, v-for). The parent will need to force
|
|
234
|
+
* the child to update because the slot does not fully capture its dependencies.
|
|
235
|
+
*/
|
|
235
236
|
DYNAMIC = 2,
|
|
236
237
|
/**
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
* `<slot/>` being forwarded into a child component. Whether the parent needs
|
|
239
|
+
* to update the child is dependent on what kind of slots the parent itself
|
|
240
|
+
* received. This has to be refined at runtime, when the child's vnode
|
|
241
|
+
* is being created (in `normalizeChildren`)
|
|
242
|
+
*/
|
|
242
243
|
FORWARDED = 3
|
|
243
244
|
}
|
|
244
245
|
/**
|
|
245
|
-
* Dev only
|
|
246
|
-
*/
|
|
246
|
+
* Dev only
|
|
247
|
+
*/
|
|
247
248
|
export declare const slotFlagsText: Record<SlotFlags, string>;
|
|
248
249
|
//#endregion
|
|
249
250
|
//#region temp/packages/shared/src/globalsAllowList.d.ts
|
|
@@ -264,77 +265,77 @@ export declare function normalizeProps(props: Record<string, any> | null): Recor
|
|
|
264
265
|
//#endregion
|
|
265
266
|
//#region temp/packages/shared/src/domTagConfig.d.ts
|
|
266
267
|
/**
|
|
267
|
-
* Compiler only.
|
|
268
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
269
|
-
*/
|
|
268
|
+
* Compiler only.
|
|
269
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
270
|
+
*/
|
|
270
271
|
export declare const isHTMLTag: (key: string) => boolean;
|
|
271
272
|
/**
|
|
272
|
-
* Compiler only.
|
|
273
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
274
|
-
*/
|
|
273
|
+
* Compiler only.
|
|
274
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
275
|
+
*/
|
|
275
276
|
export declare const isSVGTag: (key: string) => boolean;
|
|
276
277
|
/**
|
|
277
|
-
* Compiler only.
|
|
278
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
279
|
-
*/
|
|
278
|
+
* Compiler only.
|
|
279
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
280
|
+
*/
|
|
280
281
|
export declare const isMathMLTag: (key: string) => boolean;
|
|
281
282
|
/**
|
|
282
|
-
* Compiler only.
|
|
283
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
284
|
-
*/
|
|
283
|
+
* Compiler only.
|
|
284
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
285
|
+
*/
|
|
285
286
|
export declare const isVoidTag: (key: string) => boolean;
|
|
286
287
|
/**
|
|
287
|
-
* Compiler only.
|
|
288
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
289
|
-
*/
|
|
288
|
+
* Compiler only.
|
|
289
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
290
|
+
*/
|
|
290
291
|
export declare const isFormattingTag: (key: string) => boolean;
|
|
291
292
|
/**
|
|
292
|
-
* Compiler only.
|
|
293
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
294
|
-
*/
|
|
293
|
+
* Compiler only.
|
|
294
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
295
|
+
*/
|
|
295
296
|
export declare const isAlwaysCloseTag: (key: string) => boolean;
|
|
296
297
|
/**
|
|
297
|
-
* Compiler only.
|
|
298
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
299
|
-
*/
|
|
298
|
+
* Compiler only.
|
|
299
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
300
|
+
*/
|
|
300
301
|
export declare const isInlineTag: (key: string) => boolean;
|
|
301
302
|
/**
|
|
302
|
-
* Compiler only.
|
|
303
|
-
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
304
|
-
*/
|
|
303
|
+
* Compiler only.
|
|
304
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
305
|
+
*/
|
|
305
306
|
export declare const isBlockTag: (key: string) => boolean;
|
|
306
307
|
//#endregion
|
|
307
308
|
//#region temp/packages/shared/src/domAttrConfig.d.ts
|
|
308
309
|
export declare const isSpecialBooleanAttr: (key: string) => boolean;
|
|
309
310
|
/**
|
|
310
|
-
* The full list is needed during SSR to produce the correct initial markup.
|
|
311
|
-
*/
|
|
311
|
+
* The full list is needed during SSR to produce the correct initial markup.
|
|
312
|
+
*/
|
|
312
313
|
export declare const isBooleanAttr: (key: string) => boolean;
|
|
313
314
|
/**
|
|
314
|
-
* Boolean attributes should be included if the value is truthy or ''.
|
|
315
|
-
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
316
|
-
*/
|
|
315
|
+
* Boolean attributes should be included if the value is truthy or ''.
|
|
316
|
+
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
317
|
+
*/
|
|
317
318
|
export declare function includeBooleanAttr(value: unknown): boolean;
|
|
318
319
|
export declare function isSSRSafeAttrName(name: string): boolean;
|
|
319
320
|
export declare const propsToAttrMap: Record<string, string | undefined>;
|
|
320
321
|
/**
|
|
321
|
-
* Known attributes, this is used for stringification of runtime static nodes
|
|
322
|
-
* so that we don't stringify bindings that cannot be set from HTML.
|
|
323
|
-
* Don't also forget to allow `data-*` and `aria-*`!
|
|
324
|
-
* Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
|
325
|
-
*/
|
|
322
|
+
* Known attributes, this is used for stringification of runtime static nodes
|
|
323
|
+
* so that we don't stringify bindings that cannot be set from HTML.
|
|
324
|
+
* Don't also forget to allow `data-*` and `aria-*`!
|
|
325
|
+
* Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
|
326
|
+
*/
|
|
326
327
|
export declare const isKnownHtmlAttr: (key: string) => boolean;
|
|
327
328
|
/**
|
|
328
|
-
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
329
|
-
*/
|
|
329
|
+
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
330
|
+
*/
|
|
330
331
|
export declare const isKnownSvgAttr: (key: string) => boolean;
|
|
331
332
|
/**
|
|
332
|
-
* Generated from https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute
|
|
333
|
-
*/
|
|
333
|
+
* Generated from https://developer.mozilla.org/en-US/docs/Web/MathML/Attribute
|
|
334
|
+
*/
|
|
334
335
|
export declare const isKnownMathMLAttr: (key: string) => boolean;
|
|
335
336
|
/**
|
|
336
|
-
* Shared between server-renderer and runtime-core hydration logic
|
|
337
|
-
*/
|
|
337
|
+
* Shared between server-renderer and runtime-core hydration logic
|
|
338
|
+
*/
|
|
338
339
|
export declare function isRenderableAttrValue(value: unknown): boolean;
|
|
339
340
|
export declare function shouldSetAsAttr(tagName: string, key: string): boolean;
|
|
340
341
|
//#endregion
|
|
@@ -353,26 +354,27 @@ export declare const cssVarNameEscapeSymbolsRE: RegExp;
|
|
|
353
354
|
export declare function getEscapedCssVarName(key: string, doubleEscape: boolean): string;
|
|
354
355
|
//#endregion
|
|
355
356
|
//#region temp/packages/shared/src/looseEqual.d.ts
|
|
356
|
-
|
|
357
|
+
type ComparisonState = [Map<any, any>, Map<any, any>];
|
|
358
|
+
export declare function looseEqual(a: any, b: any, seen?: ComparisonState): boolean;
|
|
357
359
|
export declare function looseIndexOf(arr: any[], val: any): number;
|
|
358
360
|
//#endregion
|
|
359
361
|
//#region temp/packages/shared/src/toDisplayString.d.ts
|
|
360
362
|
/**
|
|
361
|
-
* For converting {{ interpolation }} values to displayed strings.
|
|
362
|
-
* @private
|
|
363
|
-
*/
|
|
363
|
+
* For converting {{ interpolation }} values to displayed strings.
|
|
364
|
+
* @private
|
|
365
|
+
*/
|
|
364
366
|
export declare const toDisplayString: (val: unknown) => string;
|
|
365
367
|
//#endregion
|
|
366
368
|
//#region temp/packages/shared/src/typeUtils.d.ts
|
|
367
|
-
export type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
369
|
+
export type Prettify<T> = { [K in keyof T]: T[K]; } & {};
|
|
368
370
|
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
369
|
-
export type LooseRequired<T> = { [P in keyof (T & Required<T>)]: T[P] };
|
|
371
|
+
export type LooseRequired<T> = { [P in keyof (T & Required<T>)]: T[P]; };
|
|
370
372
|
export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
371
373
|
export type IsKeyValues<T, K = string> = IfAny<T, false, T extends object ? (keyof T extends K ? true : false) : false>;
|
|
372
374
|
/**
|
|
373
|
-
* Utility for extracting the parameters from a function overload (for typed emits)
|
|
374
|
-
* https://github.com/microsoft/TypeScript/issues/32164#issuecomment-1146737709
|
|
375
|
-
*/
|
|
375
|
+
* Utility for extracting the parameters from a function overload (for typed emits)
|
|
376
|
+
* https://github.com/microsoft/TypeScript/issues/32164#issuecomment-1146737709
|
|
377
|
+
*/
|
|
376
378
|
export type OverloadParameters<T extends (...args: any[]) => any> = Parameters<OverloadUnion<T>>;
|
|
377
379
|
type OverloadProps<TOverload> = Pick<TOverload, keyof TOverload>;
|
|
378
380
|
type OverloadUnionRecursive<TOverload, TPartialOverload = unknown> = TOverload extends ((...args: infer TArgs) => infer TReturn) ? TPartialOverload extends TOverload ? never : OverloadUnionRecursive<TPartialOverload & TOverload, TPartialOverload & ((...args: TArgs) => TReturn) & OverloadProps<TOverload>> | ((...args: TArgs) => TReturn) : never;
|
|
@@ -383,47 +385,55 @@ export declare function getSequence(arr: number[]): number[];
|
|
|
383
385
|
//#endregion
|
|
384
386
|
//#region temp/packages/shared/src/cssVars.d.ts
|
|
385
387
|
/**
|
|
386
|
-
* Normalize CSS var value created by `v-bind` in `<style>` block
|
|
387
|
-
* See https://github.com/vuejs/core/pull/12461#issuecomment-2495804664
|
|
388
|
-
*/
|
|
388
|
+
* Normalize CSS var value created by `v-bind` in `<style>` block
|
|
389
|
+
* See https://github.com/vuejs/core/pull/12461#issuecomment-2495804664
|
|
390
|
+
*/
|
|
389
391
|
export declare function normalizeCssVarValue(value: unknown): string;
|
|
390
392
|
//#endregion
|
|
391
393
|
//#region temp/packages/shared/src/vaporFlags.d.ts
|
|
392
394
|
/**
|
|
393
|
-
* Flags to optimize vapor `createFor` runtime behavior, shared between the
|
|
394
|
-
* compiler and the runtime
|
|
395
|
-
*/
|
|
395
|
+
* Flags to optimize vapor `createFor` runtime behavior, shared between the
|
|
396
|
+
* compiler and the runtime
|
|
397
|
+
*/
|
|
396
398
|
export declare enum VaporVForFlags {
|
|
397
399
|
/**
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
400
|
+
* v-for is the only child of a parent container, so it can take the fast
|
|
401
|
+
* path with textContent = '' when the whole list is emptied
|
|
402
|
+
*/
|
|
401
403
|
FAST_REMOVE = 1,
|
|
402
404
|
/**
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
405
|
+
* v-for used on a component-shaped item. Component items require structural
|
|
406
|
+
* removal before item scope cleanup and cannot use the fast-clear path. This
|
|
407
|
+
* does not guarantee the item block is a VaporComponentInstance: component
|
|
408
|
+
* fallback paths may still return a DOM Node.
|
|
409
|
+
*/
|
|
408
410
|
IS_COMPONENT = 2,
|
|
409
411
|
/**
|
|
410
|
-
|
|
411
|
-
|
|
412
|
+
* v-for inside v-once
|
|
413
|
+
*/
|
|
412
414
|
ONCE = 4,
|
|
413
415
|
/**
|
|
414
|
-
|
|
415
|
-
|
|
416
|
+
* v-for item block is a single DOM Node.
|
|
417
|
+
*/
|
|
416
418
|
IS_SINGLE_NODE = 8,
|
|
417
419
|
/**
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
420
|
+
* v-for item block is known to be a VaporFragment, so runtime can use
|
|
421
|
+
* fragment-specific insert/remove helpers.
|
|
422
|
+
*/
|
|
421
423
|
IS_FRAGMENT = 16,
|
|
422
424
|
/**
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
SLOT_ROOT = 32
|
|
425
|
+
* v-for sits on a slot content/fallback root chain and can change slot
|
|
426
|
+
* validity.
|
|
427
|
+
*/
|
|
428
|
+
SLOT_ROOT = 32,
|
|
429
|
+
/**
|
|
430
|
+
* The server wraps every row in `<!--[-->...<!--]-->`: the row template is
|
|
431
|
+
* not a single element and the list is not a direct child of a Transition
|
|
432
|
+
* or TransitionGroup (compiler-ssr `needFragmentWrapper`). Hydration then
|
|
433
|
+
* treats a leading `<!--[-->` as the row wrapper rather than as the row
|
|
434
|
+
* content's own marker.
|
|
435
|
+
*/
|
|
436
|
+
WRAPPED_ROWS = 64
|
|
427
437
|
}
|
|
428
438
|
export declare enum VaporBlockShape {
|
|
429
439
|
EMPTY = 0,
|
|
@@ -431,72 +441,83 @@ export declare enum VaporBlockShape {
|
|
|
431
441
|
MULTI_ROOT = 2
|
|
432
442
|
}
|
|
433
443
|
/**
|
|
434
|
-
* Bit layout for vapor `createIf` flags.
|
|
435
|
-
*
|
|
436
|
-
* - bits 0-1: true branch VaporBlockShape
|
|
437
|
-
* - bits 2-3: false branch VaporBlockShape
|
|
438
|
-
* - bit 4: v-once
|
|
439
|
-
* - bit 5: true branch is static and can skip branch-owned EffectScope
|
|
440
|
-
* - bit 6: false branch is static and can skip branch-owned EffectScope
|
|
441
|
-
* - bit 7: v-if sits on a slot content/fallback root chain
|
|
442
|
-
* - bits 8+: branch index + 1 for keyed dynamic fragments
|
|
443
|
-
*
|
|
444
|
-
* Examples:
|
|
445
|
-
* - v-once, true single-root, no false branch: 1 | ONCE = 17
|
|
446
|
-
* - keyed index 0, true/false single-root: 1 | (1 << 2) | (1 << 8) = 261
|
|
447
|
-
*/
|
|
444
|
+
* Bit layout for vapor `createIf` flags.
|
|
445
|
+
*
|
|
446
|
+
* - bits 0-1: true branch VaporBlockShape
|
|
447
|
+
* - bits 2-3: false branch VaporBlockShape
|
|
448
|
+
* - bit 4: v-once
|
|
449
|
+
* - bit 5: true branch is static and can skip branch-owned EffectScope
|
|
450
|
+
* - bit 6: false branch is static and can skip branch-owned EffectScope
|
|
451
|
+
* - bit 7: v-if sits on a slot content/fallback root chain
|
|
452
|
+
* - bits 8+: branch index + 1 for keyed dynamic fragments
|
|
453
|
+
*
|
|
454
|
+
* Examples:
|
|
455
|
+
* - v-once, true single-root, no false branch: 1 | ONCE = 17
|
|
456
|
+
* - keyed index 0, true/false single-root: 1 | (1 << 2) | (1 << 8) = 261
|
|
457
|
+
*/
|
|
448
458
|
export declare enum VaporIfFlags {
|
|
449
459
|
/**
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
460
|
+
* Documents the packed true/false branch shape bits. Runtime decode shifts
|
|
461
|
+
* to the selected branch first, then masks with 0b11 for one VaporBlockShape.
|
|
462
|
+
*/
|
|
453
463
|
BLOCK_SHAPE = 15,
|
|
454
464
|
/**
|
|
455
|
-
|
|
456
|
-
|
|
465
|
+
* Marks a branch that is created once and never updated.
|
|
466
|
+
*/
|
|
457
467
|
ONCE = 16,
|
|
458
468
|
/**
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
469
|
+
* The compiler proved that the true branch only returns static template nodes,
|
|
470
|
+
* so runtime can skip creating a branch-owned EffectScope.
|
|
471
|
+
*/
|
|
462
472
|
TRUE_NO_SCOPE = 32,
|
|
463
473
|
/**
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
474
|
+
* The compiler proved that the false branch only returns static template
|
|
475
|
+
* nodes, so runtime can skip creating a branch-owned EffectScope.
|
|
476
|
+
*/
|
|
467
477
|
FALSE_NO_SCOPE = 64,
|
|
468
478
|
/**
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
479
|
+
* v-if sits on a slot content/fallback root chain and can change slot
|
|
480
|
+
* validity.
|
|
481
|
+
*/
|
|
472
482
|
SLOT_ROOT = 128,
|
|
473
483
|
/**
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
484
|
+
* Shift for keyed branch index. The encoded value is index + 1, so decoded
|
|
485
|
+
* zero means "not keyed" and source index 0 still round-trips.
|
|
486
|
+
*/
|
|
477
487
|
INDEX_SHIFT = 8
|
|
478
488
|
}
|
|
479
489
|
/**
|
|
480
|
-
* Flags used by vapor template factories, shared between the compiler and the
|
|
481
|
-
* runtime.
|
|
482
|
-
*/
|
|
490
|
+
* Flags used by vapor template factories, shared between the compiler and the
|
|
491
|
+
* runtime.
|
|
492
|
+
*/
|
|
483
493
|
export declare enum TemplateFlags {
|
|
484
494
|
ROOT = 1,
|
|
485
495
|
STATIC = 2
|
|
486
496
|
}
|
|
487
497
|
/**
|
|
488
|
-
* Flags used by vapor slot outlets, shared between the compiler and the
|
|
489
|
-
* runtime.
|
|
490
|
-
*/
|
|
498
|
+
* Flags used by vapor slot outlets, shared between the compiler and the
|
|
499
|
+
* runtime.
|
|
500
|
+
*/
|
|
491
501
|
export declare enum VaporSlotFlags {
|
|
492
502
|
NO_SLOTTED = 1,
|
|
493
503
|
ONCE = 2,
|
|
494
|
-
|
|
495
|
-
|
|
504
|
+
FORWARDED = 4,
|
|
505
|
+
SHARED_FALLBACK = 8
|
|
506
|
+
}
|
|
507
|
+
export declare function isForwardedSlot(flags: number): boolean;
|
|
508
|
+
export declare function slotInheritsFallback(flags: number): boolean;
|
|
509
|
+
export declare function slotNotifiesBoundary(flags: number): boolean;
|
|
510
|
+
/**
|
|
511
|
+
* Per-slot-function metadata attached by the compiler as `fn._`.
|
|
512
|
+
*/
|
|
513
|
+
export declare enum VaporSlotStability {
|
|
514
|
+
NON_STABLE = 1
|
|
496
515
|
}
|
|
497
516
|
export declare enum VaporDynamicComponentFlags {
|
|
498
517
|
SINGLE_ROOT = 1,
|
|
499
518
|
ONCE = 2,
|
|
500
|
-
SLOT_ROOT = 4
|
|
519
|
+
SLOT_ROOT = 4,
|
|
520
|
+
NS_SVG = 8,
|
|
521
|
+
NS_MATHML = 16
|
|
501
522
|
}
|
|
502
|
-
//#endregion
|
|
523
|
+
//#endregion
|