@vue/runtime-dom 3.2.32 → 3.2.33
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/runtime-dom.cjs.js +41 -38
- package/dist/runtime-dom.cjs.prod.js +41 -38
- package/dist/runtime-dom.esm-browser.js +106 -53
- package/dist/runtime-dom.esm-browser.prod.js +1 -1
- package/dist/runtime-dom.esm-bundler.js +41 -38
- package/dist/runtime-dom.global.js +106 -53
- package/dist/runtime-dom.global.prod.js +1 -1
- package/package.json +3 -3
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@ var shared = require('@vue/shared');
|
|
|
7
7
|
|
|
8
8
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
9
9
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
10
|
-
const templateContainer = doc && doc.createElement('template');
|
|
10
|
+
const templateContainer = doc && /*#__PURE__*/ doc.createElement('template');
|
|
11
11
|
const nodeOps = {
|
|
12
12
|
insert: (child, parent, anchor) => {
|
|
13
13
|
parent.insertBefore(child, anchor || null);
|
|
@@ -158,6 +158,8 @@ function setStyle(style, name, val) {
|
|
|
158
158
|
val.forEach(v => setStyle(style, name, v));
|
|
159
159
|
}
|
|
160
160
|
else {
|
|
161
|
+
if (val == null)
|
|
162
|
+
val = '';
|
|
161
163
|
if (name.startsWith('--')) {
|
|
162
164
|
// custom property definition
|
|
163
165
|
style.setProperty(name, val);
|
|
@@ -252,31 +254,28 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
252
254
|
}
|
|
253
255
|
return;
|
|
254
256
|
}
|
|
257
|
+
let needRemove = false;
|
|
255
258
|
if (value === '' || value == null) {
|
|
256
259
|
const type = typeof el[key];
|
|
257
260
|
if (type === 'boolean') {
|
|
258
261
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
259
|
-
|
|
260
|
-
return;
|
|
262
|
+
value = shared.includeBooleanAttr(value);
|
|
261
263
|
}
|
|
262
264
|
else if (value == null && type === 'string') {
|
|
263
265
|
// e.g. <div :id="null">
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
return;
|
|
266
|
+
value = '';
|
|
267
|
+
needRemove = true;
|
|
267
268
|
}
|
|
268
269
|
else if (type === 'number') {
|
|
269
270
|
// e.g. <img :width="null">
|
|
270
271
|
// the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
catch (_a) { }
|
|
275
|
-
el.removeAttribute(key);
|
|
276
|
-
return;
|
|
272
|
+
value = 0;
|
|
273
|
+
needRemove = true;
|
|
277
274
|
}
|
|
278
275
|
}
|
|
279
|
-
// some properties perform value validation and throw
|
|
276
|
+
// some properties perform value validation and throw,
|
|
277
|
+
// some properties has getter, no setter, will error in 'use strict'
|
|
278
|
+
// eg. <select :type="null"></select> <select :willValidate="null"></select>
|
|
280
279
|
try {
|
|
281
280
|
el[key] = value;
|
|
282
281
|
}
|
|
@@ -286,31 +285,35 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
286
285
|
`value ${value} is invalid.`, e);
|
|
287
286
|
}
|
|
288
287
|
}
|
|
288
|
+
needRemove && el.removeAttribute(key);
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
// Async edge case fix requires storing an event listener's attach timestamp.
|
|
292
|
-
|
|
293
|
-
let
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
292
|
+
const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
|
|
293
|
+
let _getNow = Date.now;
|
|
294
|
+
let skipTimestampCheck = false;
|
|
295
|
+
if (typeof window !== 'undefined') {
|
|
296
|
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
|
297
|
+
// timestamp can either be hi-res (relative to page load) or low-res
|
|
298
|
+
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
299
|
+
// same timestamp type when saving the flush timestamp.
|
|
300
|
+
if (Date.now() > document.createEvent('Event').timeStamp) {
|
|
301
|
+
// if the low-res timestamp which is bigger than the event timestamp
|
|
302
|
+
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
|
|
303
|
+
// and we need to use the hi-res version for event listeners as well.
|
|
304
|
+
_getNow = () => performance.now();
|
|
305
|
+
}
|
|
306
|
+
// #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
|
|
307
|
+
// and does not fire microtasks in between event propagation, so safe to exclude.
|
|
308
|
+
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
309
|
+
skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
310
|
+
}
|
|
311
|
+
return [_getNow, skipTimestampCheck];
|
|
312
|
+
})();
|
|
310
313
|
// To avoid the overhead of repeatedly calling performance.now(), we cache
|
|
311
314
|
// and use the same timestamp for all event listeners attached in the same tick.
|
|
312
315
|
let cachedNow = 0;
|
|
313
|
-
const p = Promise.resolve();
|
|
316
|
+
const p = /*#__PURE__*/ Promise.resolve();
|
|
314
317
|
const reset = () => {
|
|
315
318
|
cachedNow = 0;
|
|
316
319
|
};
|
|
@@ -435,13 +438,13 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
435
438
|
}
|
|
436
439
|
return false;
|
|
437
440
|
}
|
|
438
|
-
//
|
|
439
|
-
//
|
|
440
|
-
//
|
|
441
|
-
//
|
|
441
|
+
// these are enumerated attrs, however their corresponding DOM properties
|
|
442
|
+
// are actually booleans - this leads to setting it with a string "false"
|
|
443
|
+
// value leading it to be coerced to `true`, so we need to always treat
|
|
444
|
+
// them as attributes.
|
|
442
445
|
// Note that `contentEditable` doesn't have this problem: its DOM
|
|
443
446
|
// property is also enumerated string values.
|
|
444
|
-
if (key === 'spellcheck' || key === 'draggable') {
|
|
447
|
+
if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
|
|
445
448
|
return false;
|
|
446
449
|
}
|
|
447
450
|
// #1787, #2840 form property on form elements is readonly and must be set as
|
|
@@ -1492,7 +1495,7 @@ function initVShowForSSR() {
|
|
|
1492
1495
|
};
|
|
1493
1496
|
}
|
|
1494
1497
|
|
|
1495
|
-
const rendererOptions = shared.extend({ patchProp }, nodeOps);
|
|
1498
|
+
const rendererOptions = /*#__PURE__*/ shared.extend({ patchProp }, nodeOps);
|
|
1496
1499
|
// lazy create the renderer - this makes core renderer logic tree-shakable
|
|
1497
1500
|
// in case the user only imports reactivity utilities from Vue.
|
|
1498
1501
|
let renderer;
|
|
@@ -7,7 +7,7 @@ var shared = require('@vue/shared');
|
|
|
7
7
|
|
|
8
8
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
9
9
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
10
|
-
const templateContainer = doc && doc.createElement('template');
|
|
10
|
+
const templateContainer = doc && /*#__PURE__*/ doc.createElement('template');
|
|
11
11
|
const nodeOps = {
|
|
12
12
|
insert: (child, parent, anchor) => {
|
|
13
13
|
parent.insertBefore(child, anchor || null);
|
|
@@ -158,6 +158,8 @@ function setStyle(style, name, val) {
|
|
|
158
158
|
val.forEach(v => setStyle(style, name, v));
|
|
159
159
|
}
|
|
160
160
|
else {
|
|
161
|
+
if (val == null)
|
|
162
|
+
val = '';
|
|
161
163
|
if (name.startsWith('--')) {
|
|
162
164
|
// custom property definition
|
|
163
165
|
style.setProperty(name, val);
|
|
@@ -252,61 +254,62 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
252
254
|
}
|
|
253
255
|
return;
|
|
254
256
|
}
|
|
257
|
+
let needRemove = false;
|
|
255
258
|
if (value === '' || value == null) {
|
|
256
259
|
const type = typeof el[key];
|
|
257
260
|
if (type === 'boolean') {
|
|
258
261
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
259
|
-
|
|
260
|
-
return;
|
|
262
|
+
value = shared.includeBooleanAttr(value);
|
|
261
263
|
}
|
|
262
264
|
else if (value == null && type === 'string') {
|
|
263
265
|
// e.g. <div :id="null">
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
return;
|
|
266
|
+
value = '';
|
|
267
|
+
needRemove = true;
|
|
267
268
|
}
|
|
268
269
|
else if (type === 'number') {
|
|
269
270
|
// e.g. <img :width="null">
|
|
270
271
|
// the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
catch (_a) { }
|
|
275
|
-
el.removeAttribute(key);
|
|
276
|
-
return;
|
|
272
|
+
value = 0;
|
|
273
|
+
needRemove = true;
|
|
277
274
|
}
|
|
278
275
|
}
|
|
279
|
-
// some properties perform value validation and throw
|
|
276
|
+
// some properties perform value validation and throw,
|
|
277
|
+
// some properties has getter, no setter, will error in 'use strict'
|
|
278
|
+
// eg. <select :type="null"></select> <select :willValidate="null"></select>
|
|
280
279
|
try {
|
|
281
280
|
el[key] = value;
|
|
282
281
|
}
|
|
283
282
|
catch (e) {
|
|
284
283
|
}
|
|
284
|
+
needRemove && el.removeAttribute(key);
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
// Async edge case fix requires storing an event listener's attach timestamp.
|
|
288
|
-
|
|
289
|
-
let
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
288
|
+
const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
|
|
289
|
+
let _getNow = Date.now;
|
|
290
|
+
let skipTimestampCheck = false;
|
|
291
|
+
if (typeof window !== 'undefined') {
|
|
292
|
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
|
293
|
+
// timestamp can either be hi-res (relative to page load) or low-res
|
|
294
|
+
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
295
|
+
// same timestamp type when saving the flush timestamp.
|
|
296
|
+
if (Date.now() > document.createEvent('Event').timeStamp) {
|
|
297
|
+
// if the low-res timestamp which is bigger than the event timestamp
|
|
298
|
+
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
|
|
299
|
+
// and we need to use the hi-res version for event listeners as well.
|
|
300
|
+
_getNow = () => performance.now();
|
|
301
|
+
}
|
|
302
|
+
// #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
|
|
303
|
+
// and does not fire microtasks in between event propagation, so safe to exclude.
|
|
304
|
+
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
305
|
+
skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
306
|
+
}
|
|
307
|
+
return [_getNow, skipTimestampCheck];
|
|
308
|
+
})();
|
|
306
309
|
// To avoid the overhead of repeatedly calling performance.now(), we cache
|
|
307
310
|
// and use the same timestamp for all event listeners attached in the same tick.
|
|
308
311
|
let cachedNow = 0;
|
|
309
|
-
const p = Promise.resolve();
|
|
312
|
+
const p = /*#__PURE__*/ Promise.resolve();
|
|
310
313
|
const reset = () => {
|
|
311
314
|
cachedNow = 0;
|
|
312
315
|
};
|
|
@@ -431,13 +434,13 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
431
434
|
}
|
|
432
435
|
return false;
|
|
433
436
|
}
|
|
434
|
-
//
|
|
435
|
-
//
|
|
436
|
-
//
|
|
437
|
-
//
|
|
437
|
+
// these are enumerated attrs, however their corresponding DOM properties
|
|
438
|
+
// are actually booleans - this leads to setting it with a string "false"
|
|
439
|
+
// value leading it to be coerced to `true`, so we need to always treat
|
|
440
|
+
// them as attributes.
|
|
438
441
|
// Note that `contentEditable` doesn't have this problem: its DOM
|
|
439
442
|
// property is also enumerated string values.
|
|
440
|
-
if (key === 'spellcheck' || key === 'draggable') {
|
|
443
|
+
if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
|
|
441
444
|
return false;
|
|
442
445
|
}
|
|
443
446
|
// #1787, #2840 form property on form elements is readonly and must be set as
|
|
@@ -1443,7 +1446,7 @@ function initVShowForSSR() {
|
|
|
1443
1446
|
};
|
|
1444
1447
|
}
|
|
1445
1448
|
|
|
1446
|
-
const rendererOptions = shared.extend({ patchProp }, nodeOps);
|
|
1449
|
+
const rendererOptions = /*#__PURE__*/ shared.extend({ patchProp }, nodeOps);
|
|
1447
1450
|
// lazy create the renderer - this makes core renderer logic tree-shakable
|
|
1448
1451
|
// in case the user only imports reactivity utilities from Vue.
|
|
1449
1452
|
let renderer;
|
|
@@ -533,10 +533,17 @@ class ReactiveEffect {
|
|
|
533
533
|
activeEffect = this.parent;
|
|
534
534
|
shouldTrack = lastShouldTrack;
|
|
535
535
|
this.parent = undefined;
|
|
536
|
+
if (this.deferStop) {
|
|
537
|
+
this.stop();
|
|
538
|
+
}
|
|
536
539
|
}
|
|
537
540
|
}
|
|
538
541
|
stop() {
|
|
539
|
-
|
|
542
|
+
// stopped while running itself - defer the cleanup
|
|
543
|
+
if (activeEffect === this) {
|
|
544
|
+
this.deferStop = true;
|
|
545
|
+
}
|
|
546
|
+
else if (this.active) {
|
|
540
547
|
cleanupEffect(this);
|
|
541
548
|
if (this.onStop) {
|
|
542
549
|
this.onStop();
|
|
@@ -711,7 +718,9 @@ function triggerEffects(dep, debuggerEventExtraInfo) {
|
|
|
711
718
|
}
|
|
712
719
|
|
|
713
720
|
const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
714
|
-
const builtInSymbols = new Set(
|
|
721
|
+
const builtInSymbols = new Set(
|
|
722
|
+
/*#__PURE__*/
|
|
723
|
+
Object.getOwnPropertyNames(Symbol)
|
|
715
724
|
.map(key => Symbol[key])
|
|
716
725
|
.filter(isSymbol));
|
|
717
726
|
const get = /*#__PURE__*/ createGetter();
|
|
@@ -863,13 +872,13 @@ const readonlyHandlers = {
|
|
|
863
872
|
get: readonlyGet,
|
|
864
873
|
set(target, key) {
|
|
865
874
|
{
|
|
866
|
-
|
|
875
|
+
warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
867
876
|
}
|
|
868
877
|
return true;
|
|
869
878
|
},
|
|
870
879
|
deleteProperty(target, key) {
|
|
871
880
|
{
|
|
872
|
-
|
|
881
|
+
warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
873
882
|
}
|
|
874
883
|
return true;
|
|
875
884
|
}
|
|
@@ -1697,7 +1706,7 @@ let preFlushIndex = 0;
|
|
|
1697
1706
|
const pendingPostFlushCbs = [];
|
|
1698
1707
|
let activePostFlushCbs = null;
|
|
1699
1708
|
let postFlushIndex = 0;
|
|
1700
|
-
const resolvedPromise = Promise.resolve();
|
|
1709
|
+
const resolvedPromise = /*#__PURE__*/ Promise.resolve();
|
|
1701
1710
|
let currentFlushPromise = null;
|
|
1702
1711
|
let currentPreFlushParentJob = null;
|
|
1703
1712
|
const RECURSION_LIMIT = 100;
|
|
@@ -2113,6 +2122,8 @@ function devtoolsComponentEmit(component, event, params) {
|
|
|
2113
2122
|
}
|
|
2114
2123
|
|
|
2115
2124
|
function emit$1(instance, event, ...rawArgs) {
|
|
2125
|
+
if (instance.isUnmounted)
|
|
2126
|
+
return;
|
|
2116
2127
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
2117
2128
|
{
|
|
2118
2129
|
const { emitsOptions, propsOptions: [propsOptions] } = instance;
|
|
@@ -3389,10 +3400,22 @@ const BaseTransitionImpl = {
|
|
|
3389
3400
|
if (!children || !children.length) {
|
|
3390
3401
|
return;
|
|
3391
3402
|
}
|
|
3392
|
-
|
|
3403
|
+
let child = children[0];
|
|
3393
3404
|
if (children.length > 1) {
|
|
3394
|
-
|
|
3395
|
-
|
|
3405
|
+
let hasFound = false;
|
|
3406
|
+
// locate first non-comment child
|
|
3407
|
+
for (const c of children) {
|
|
3408
|
+
if (c.type !== Comment) {
|
|
3409
|
+
if (hasFound) {
|
|
3410
|
+
// warn more than one non-comment child
|
|
3411
|
+
warn$1('<transition> can only be used on a single element or component. ' +
|
|
3412
|
+
'Use <transition-group> for lists.');
|
|
3413
|
+
break;
|
|
3414
|
+
}
|
|
3415
|
+
child = c;
|
|
3416
|
+
hasFound = true;
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3396
3419
|
}
|
|
3397
3420
|
// there's no need to track reactivity for these props so use the raw
|
|
3398
3421
|
// props for a bit better perf
|
|
@@ -3405,8 +3428,6 @@ const BaseTransitionImpl = {
|
|
|
3405
3428
|
mode !== 'default') {
|
|
3406
3429
|
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3407
3430
|
}
|
|
3408
|
-
// at this point children has a guaranteed length of 1.
|
|
3409
|
-
const child = children[0];
|
|
3410
3431
|
if (state.isLeaving) {
|
|
3411
3432
|
return emptyPlaceholder(child);
|
|
3412
3433
|
}
|
|
@@ -6928,7 +6949,22 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6928
6949
|
const remove = vnode => {
|
|
6929
6950
|
const { type, el, anchor, transition } = vnode;
|
|
6930
6951
|
if (type === Fragment) {
|
|
6931
|
-
|
|
6952
|
+
if (vnode.patchFlag > 0 &&
|
|
6953
|
+
vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ &&
|
|
6954
|
+
transition &&
|
|
6955
|
+
!transition.persisted) {
|
|
6956
|
+
vnode.children.forEach(child => {
|
|
6957
|
+
if (child.type === Comment) {
|
|
6958
|
+
hostRemove(child.el);
|
|
6959
|
+
}
|
|
6960
|
+
else {
|
|
6961
|
+
remove(child);
|
|
6962
|
+
}
|
|
6963
|
+
});
|
|
6964
|
+
}
|
|
6965
|
+
else {
|
|
6966
|
+
removeFragment(el, anchor);
|
|
6967
|
+
}
|
|
6932
6968
|
return;
|
|
6933
6969
|
}
|
|
6934
6970
|
if (type === Static) {
|
|
@@ -7947,7 +7983,10 @@ function renderSlot(slots, name, props = {},
|
|
|
7947
7983
|
// this is not a user-facing function, so the fallback is always generated by
|
|
7948
7984
|
// the compiler and guaranteed to be a function returning an array
|
|
7949
7985
|
fallback, noSlotted) {
|
|
7950
|
-
if (currentRenderingInstance.isCE
|
|
7986
|
+
if (currentRenderingInstance.isCE ||
|
|
7987
|
+
(currentRenderingInstance.parent &&
|
|
7988
|
+
isAsyncWrapper(currentRenderingInstance.parent) &&
|
|
7989
|
+
currentRenderingInstance.parent.isCE)) {
|
|
7951
7990
|
return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
|
|
7952
7991
|
}
|
|
7953
7992
|
let slot = slots[name];
|
|
@@ -8020,7 +8059,10 @@ const getPublicInstance = (i) => {
|
|
|
8020
8059
|
return getExposeProxy(i) || i.proxy;
|
|
8021
8060
|
return getPublicInstance(i.parent);
|
|
8022
8061
|
};
|
|
8023
|
-
const publicPropertiesMap =
|
|
8062
|
+
const publicPropertiesMap =
|
|
8063
|
+
// Move PURE marker to new line to workaround compiler discarding it
|
|
8064
|
+
// due to type annotation
|
|
8065
|
+
/*#__PURE__*/ extend(Object.create(null), {
|
|
8024
8066
|
$: i => i,
|
|
8025
8067
|
$el: i => i.vnode.el,
|
|
8026
8068
|
$data: i => i.data,
|
|
@@ -8190,7 +8232,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
8190
8232
|
defineProperty(target, key, descriptor) {
|
|
8191
8233
|
if (descriptor.get != null) {
|
|
8192
8234
|
// invalidate key cache of a getter based property #5417
|
|
8193
|
-
target
|
|
8235
|
+
target._.accessCache[key] = 0;
|
|
8194
8236
|
}
|
|
8195
8237
|
else if (hasOwn(descriptor, 'value')) {
|
|
8196
8238
|
this.set(target, key, descriptor.value, null);
|
|
@@ -8398,6 +8440,7 @@ function setupComponent(instance, isSSR = false) {
|
|
|
8398
8440
|
return setupResult;
|
|
8399
8441
|
}
|
|
8400
8442
|
function setupStatefulComponent(instance, isSSR) {
|
|
8443
|
+
var _a;
|
|
8401
8444
|
const Component = instance.type;
|
|
8402
8445
|
{
|
|
8403
8446
|
if (Component.name) {
|
|
@@ -8455,6 +8498,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
8455
8498
|
// async setup returned Promise.
|
|
8456
8499
|
// bail here and wait for re-entry.
|
|
8457
8500
|
instance.asyncDep = setupResult;
|
|
8501
|
+
if (!instance.suspense) {
|
|
8502
|
+
const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
|
|
8503
|
+
warn$1(`Component <${name}>: setup function returned a promise, but no ` +
|
|
8504
|
+
`<Suspense> boundary was found in the parent component tree. ` +
|
|
8505
|
+
`A component with async setup() must be nested in a <Suspense> ` +
|
|
8506
|
+
`in order to be rendered.`);
|
|
8507
|
+
}
|
|
8458
8508
|
}
|
|
8459
8509
|
}
|
|
8460
8510
|
else {
|
|
@@ -9071,7 +9121,7 @@ function isMemoSame(cached, memo) {
|
|
|
9071
9121
|
}
|
|
9072
9122
|
|
|
9073
9123
|
// Core API ------------------------------------------------------------------
|
|
9074
|
-
const version = "3.2.
|
|
9124
|
+
const version = "3.2.33";
|
|
9075
9125
|
/**
|
|
9076
9126
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
9077
9127
|
* @internal
|
|
@@ -9088,7 +9138,7 @@ const compatUtils = (null);
|
|
|
9088
9138
|
|
|
9089
9139
|
const svgNS = 'http://www.w3.org/2000/svg';
|
|
9090
9140
|
const doc = (typeof document !== 'undefined' ? document : null);
|
|
9091
|
-
const templateContainer = doc && doc.createElement('template');
|
|
9141
|
+
const templateContainer = doc && /*#__PURE__*/ doc.createElement('template');
|
|
9092
9142
|
const nodeOps = {
|
|
9093
9143
|
insert: (child, parent, anchor) => {
|
|
9094
9144
|
parent.insertBefore(child, anchor || null);
|
|
@@ -9239,6 +9289,8 @@ function setStyle(style, name, val) {
|
|
|
9239
9289
|
val.forEach(v => setStyle(style, name, v));
|
|
9240
9290
|
}
|
|
9241
9291
|
else {
|
|
9292
|
+
if (val == null)
|
|
9293
|
+
val = '';
|
|
9242
9294
|
if (name.startsWith('--')) {
|
|
9243
9295
|
// custom property definition
|
|
9244
9296
|
style.setProperty(name, val);
|
|
@@ -9333,31 +9385,28 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
9333
9385
|
}
|
|
9334
9386
|
return;
|
|
9335
9387
|
}
|
|
9388
|
+
let needRemove = false;
|
|
9336
9389
|
if (value === '' || value == null) {
|
|
9337
9390
|
const type = typeof el[key];
|
|
9338
9391
|
if (type === 'boolean') {
|
|
9339
9392
|
// e.g. <select multiple> compiles to { multiple: '' }
|
|
9340
|
-
|
|
9341
|
-
return;
|
|
9393
|
+
value = includeBooleanAttr(value);
|
|
9342
9394
|
}
|
|
9343
9395
|
else if (value == null && type === 'string') {
|
|
9344
9396
|
// e.g. <div :id="null">
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
return;
|
|
9397
|
+
value = '';
|
|
9398
|
+
needRemove = true;
|
|
9348
9399
|
}
|
|
9349
9400
|
else if (type === 'number') {
|
|
9350
9401
|
// e.g. <img :width="null">
|
|
9351
9402
|
// the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
}
|
|
9355
|
-
catch (_a) { }
|
|
9356
|
-
el.removeAttribute(key);
|
|
9357
|
-
return;
|
|
9403
|
+
value = 0;
|
|
9404
|
+
needRemove = true;
|
|
9358
9405
|
}
|
|
9359
9406
|
}
|
|
9360
|
-
// some properties perform value validation and throw
|
|
9407
|
+
// some properties perform value validation and throw,
|
|
9408
|
+
// some properties has getter, no setter, will error in 'use strict'
|
|
9409
|
+
// eg. <select :type="null"></select> <select :willValidate="null"></select>
|
|
9361
9410
|
try {
|
|
9362
9411
|
el[key] = value;
|
|
9363
9412
|
}
|
|
@@ -9367,31 +9416,35 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
9367
9416
|
`value ${value} is invalid.`, e);
|
|
9368
9417
|
}
|
|
9369
9418
|
}
|
|
9419
|
+
needRemove && el.removeAttribute(key);
|
|
9370
9420
|
}
|
|
9371
9421
|
|
|
9372
9422
|
// Async edge case fix requires storing an event listener's attach timestamp.
|
|
9373
|
-
|
|
9374
|
-
let
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9423
|
+
const [_getNow, skipTimestampCheck] = /*#__PURE__*/ (() => {
|
|
9424
|
+
let _getNow = Date.now;
|
|
9425
|
+
let skipTimestampCheck = false;
|
|
9426
|
+
if (typeof window !== 'undefined') {
|
|
9427
|
+
// Determine what event timestamp the browser is using. Annoyingly, the
|
|
9428
|
+
// timestamp can either be hi-res (relative to page load) or low-res
|
|
9429
|
+
// (relative to UNIX epoch), so in order to compare time we have to use the
|
|
9430
|
+
// same timestamp type when saving the flush timestamp.
|
|
9431
|
+
if (Date.now() > document.createEvent('Event').timeStamp) {
|
|
9432
|
+
// if the low-res timestamp which is bigger than the event timestamp
|
|
9433
|
+
// (which is evaluated AFTER) it means the event is using a hi-res timestamp,
|
|
9434
|
+
// and we need to use the hi-res version for event listeners as well.
|
|
9435
|
+
_getNow = () => performance.now();
|
|
9436
|
+
}
|
|
9437
|
+
// #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
|
|
9438
|
+
// and does not fire microtasks in between event propagation, so safe to exclude.
|
|
9439
|
+
const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
|
|
9440
|
+
skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
|
|
9441
|
+
}
|
|
9442
|
+
return [_getNow, skipTimestampCheck];
|
|
9443
|
+
})();
|
|
9391
9444
|
// To avoid the overhead of repeatedly calling performance.now(), we cache
|
|
9392
9445
|
// and use the same timestamp for all event listeners attached in the same tick.
|
|
9393
9446
|
let cachedNow = 0;
|
|
9394
|
-
const p = Promise.resolve();
|
|
9447
|
+
const p = /*#__PURE__*/ Promise.resolve();
|
|
9395
9448
|
const reset = () => {
|
|
9396
9449
|
cachedNow = 0;
|
|
9397
9450
|
};
|
|
@@ -9516,13 +9569,13 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
9516
9569
|
}
|
|
9517
9570
|
return false;
|
|
9518
9571
|
}
|
|
9519
|
-
//
|
|
9520
|
-
//
|
|
9521
|
-
//
|
|
9522
|
-
//
|
|
9572
|
+
// these are enumerated attrs, however their corresponding DOM properties
|
|
9573
|
+
// are actually booleans - this leads to setting it with a string "false"
|
|
9574
|
+
// value leading it to be coerced to `true`, so we need to always treat
|
|
9575
|
+
// them as attributes.
|
|
9523
9576
|
// Note that `contentEditable` doesn't have this problem: its DOM
|
|
9524
9577
|
// property is also enumerated string values.
|
|
9525
|
-
if (key === 'spellcheck' || key === 'draggable') {
|
|
9578
|
+
if (key === 'spellcheck' || key === 'draggable' || key === 'translate') {
|
|
9526
9579
|
return false;
|
|
9527
9580
|
}
|
|
9528
9581
|
// #1787, #2840 form property on form elements is readonly and must be set as
|
|
@@ -10589,7 +10642,7 @@ function setDisplay(el, value) {
|
|
|
10589
10642
|
el.style.display = value ? el._vod : 'none';
|
|
10590
10643
|
}
|
|
10591
10644
|
|
|
10592
|
-
const rendererOptions = extend({ patchProp }, nodeOps);
|
|
10645
|
+
const rendererOptions = /*#__PURE__*/ extend({ patchProp }, nodeOps);
|
|
10593
10646
|
// lazy create the renderer - this makes core renderer logic tree-shakable
|
|
10594
10647
|
// in case the user only imports reactivity utilities from Vue.
|
|
10595
10648
|
let renderer;
|