@vue/runtime-dom 3.4.21 → 3.4.23
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 +46 -22
- package/dist/runtime-dom.cjs.prod.js +35 -21
- package/dist/runtime-dom.d.ts +4 -3
- package/dist/runtime-dom.esm-browser.js +116 -80
- package/dist/runtime-dom.esm-browser.prod.js +6 -5
- package/dist/runtime-dom.esm-bundler.js +49 -25
- package/dist/runtime-dom.global.js +116 -80
- package/dist/runtime-dom.global.prod.js +6 -5
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.23
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
import { h, BaseTransition, BaseTransitionPropsValidators, assertNumber, getCurrentInstance, warn,
|
|
6
|
+
import { h, BaseTransition, BaseTransitionPropsValidators, assertNumber, getCurrentInstance, warn, onMounted, watchPostEffect, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core';
|
|
7
7
|
export * from '@vue/runtime-core';
|
|
8
|
-
import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, isSpecialBooleanAttr, includeBooleanAttr, isOn, isModelListener,
|
|
8
|
+
import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, isSpecialBooleanAttr, includeBooleanAttr, isFunction, NOOP, isOn, isModelListener, camelize as camelize$1, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared';
|
|
9
9
|
|
|
10
10
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
11
11
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
@@ -430,8 +430,8 @@ function useCssVars(getter) {
|
|
|
430
430
|
setVarsOnVNode(instance.subTree, vars);
|
|
431
431
|
updateTeleports(vars);
|
|
432
432
|
};
|
|
433
|
-
watchPostEffect(setVars);
|
|
434
433
|
onMounted(() => {
|
|
434
|
+
watchPostEffect(setVars);
|
|
435
435
|
const ob = new MutationObserver(setVars);
|
|
436
436
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
437
437
|
onUnmounted(() => ob.disconnect());
|
|
@@ -654,11 +654,14 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
654
654
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
655
655
|
const existingInvoker = invokers[rawName];
|
|
656
656
|
if (nextValue && existingInvoker) {
|
|
657
|
-
existingInvoker.value = nextValue;
|
|
657
|
+
existingInvoker.value = !!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue;
|
|
658
658
|
} else {
|
|
659
659
|
const [name, options] = parseName(rawName);
|
|
660
660
|
if (nextValue) {
|
|
661
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
661
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
662
|
+
!!(process.env.NODE_ENV !== "production") ? sanitizeEventValue(nextValue, rawName) : nextValue,
|
|
663
|
+
instance
|
|
664
|
+
);
|
|
662
665
|
addEventListener(el, name, invoker, options);
|
|
663
666
|
} else if (existingInvoker) {
|
|
664
667
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -701,6 +704,16 @@ function createInvoker(initialValue, instance) {
|
|
|
701
704
|
invoker.attached = getNow();
|
|
702
705
|
return invoker;
|
|
703
706
|
}
|
|
707
|
+
function sanitizeEventValue(value, propName) {
|
|
708
|
+
if (isFunction(value) || isArray(value)) {
|
|
709
|
+
return value;
|
|
710
|
+
}
|
|
711
|
+
warn(
|
|
712
|
+
`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
|
|
713
|
+
Expected function or array of functions, received type ${typeof value}.`
|
|
714
|
+
);
|
|
715
|
+
return NOOP;
|
|
716
|
+
}
|
|
704
717
|
function patchStopImmediatePropagation(e, value) {
|
|
705
718
|
if (isArray(value)) {
|
|
706
719
|
const originalStop = e.stopImmediatePropagation;
|
|
@@ -708,7 +721,9 @@ function patchStopImmediatePropagation(e, value) {
|
|
|
708
721
|
originalStop.call(e);
|
|
709
722
|
e._stopped = true;
|
|
710
723
|
};
|
|
711
|
-
return value.map(
|
|
724
|
+
return value.map(
|
|
725
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
726
|
+
);
|
|
712
727
|
} else {
|
|
713
728
|
return value;
|
|
714
729
|
}
|
|
@@ -909,7 +924,7 @@ class VueElement extends BaseClass {
|
|
|
909
924
|
}
|
|
910
925
|
}
|
|
911
926
|
_setAttr(key) {
|
|
912
|
-
let value = this.getAttribute(key);
|
|
927
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
913
928
|
const camelKey = camelize$1(key);
|
|
914
929
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
915
930
|
value = toNumber(value);
|
|
@@ -1075,7 +1090,28 @@ const TransitionGroupImpl = {
|
|
|
1075
1090
|
const rawProps = toRaw(props);
|
|
1076
1091
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
1077
1092
|
let tag = rawProps.tag || Fragment;
|
|
1078
|
-
prevChildren =
|
|
1093
|
+
prevChildren = [];
|
|
1094
|
+
if (children) {
|
|
1095
|
+
for (let i = 0; i < children.length; i++) {
|
|
1096
|
+
const child = children[i];
|
|
1097
|
+
if (child.el && child.el instanceof Element) {
|
|
1098
|
+
prevChildren.push(child);
|
|
1099
|
+
setTransitionHooks(
|
|
1100
|
+
child,
|
|
1101
|
+
resolveTransitionHooks(
|
|
1102
|
+
child,
|
|
1103
|
+
cssTransitionProps,
|
|
1104
|
+
state,
|
|
1105
|
+
instance
|
|
1106
|
+
)
|
|
1107
|
+
);
|
|
1108
|
+
positionMap.set(
|
|
1109
|
+
child,
|
|
1110
|
+
child.el.getBoundingClientRect()
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1079
1115
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
1080
1116
|
for (let i = 0; i < children.length; i++) {
|
|
1081
1117
|
const child = children[i];
|
|
@@ -1088,16 +1124,6 @@ const TransitionGroupImpl = {
|
|
|
1088
1124
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
1089
1125
|
}
|
|
1090
1126
|
}
|
|
1091
|
-
if (prevChildren) {
|
|
1092
|
-
for (let i = 0; i < prevChildren.length; i++) {
|
|
1093
|
-
const child = prevChildren[i];
|
|
1094
|
-
setTransitionHooks(
|
|
1095
|
-
child,
|
|
1096
|
-
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
1097
|
-
);
|
|
1098
|
-
positionMap.set(child, child.el.getBoundingClientRect());
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
1127
|
return createVNode(tag, null, children);
|
|
1102
1128
|
};
|
|
1103
1129
|
}
|
|
@@ -1196,7 +1222,7 @@ const vModelText = {
|
|
|
1196
1222
|
el[assignKey] = getModelAssigner(vnode);
|
|
1197
1223
|
if (el.composing)
|
|
1198
1224
|
return;
|
|
1199
|
-
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
1225
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
1200
1226
|
const newValue = value == null ? "" : value;
|
|
1201
1227
|
if (elValue === newValue) {
|
|
1202
1228
|
return;
|
|
@@ -1299,14 +1325,14 @@ const vModelSelect = {
|
|
|
1299
1325
|
// set value in mounted & updated because <select> relies on its children
|
|
1300
1326
|
// <option>s.
|
|
1301
1327
|
mounted(el, { value, modifiers: { number } }) {
|
|
1302
|
-
setSelected(el, value
|
|
1328
|
+
setSelected(el, value);
|
|
1303
1329
|
},
|
|
1304
1330
|
beforeUpdate(el, _binding, vnode) {
|
|
1305
1331
|
el[assignKey] = getModelAssigner(vnode);
|
|
1306
1332
|
},
|
|
1307
1333
|
updated(el, { value, modifiers: { number } }) {
|
|
1308
1334
|
if (!el._assigning) {
|
|
1309
|
-
setSelected(el, value
|
|
1335
|
+
setSelected(el, value);
|
|
1310
1336
|
}
|
|
1311
1337
|
}
|
|
1312
1338
|
};
|
|
@@ -1326,9 +1352,7 @@ function setSelected(el, value, number) {
|
|
|
1326
1352
|
if (isArrayValue) {
|
|
1327
1353
|
const optionType = typeof optionValue;
|
|
1328
1354
|
if (optionType === "string" || optionType === "number") {
|
|
1329
|
-
option.selected = value.
|
|
1330
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
1331
|
-
);
|
|
1355
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
1332
1356
|
} else {
|
|
1333
1357
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
1334
1358
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.23
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
var VueRuntimeDOM = (function (exports) {
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
10
|
+
// @__NO_SIDE_EFFECTS__
|
|
9
11
|
function makeMap(str, expectsLowerCase) {
|
|
10
12
|
const set = new Set(str.split(","));
|
|
11
13
|
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
|
@@ -292,7 +294,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
292
294
|
};
|
|
293
295
|
const stringifySymbol = (v, i = "") => {
|
|
294
296
|
var _a;
|
|
295
|
-
return
|
|
297
|
+
return (
|
|
298
|
+
// Symbol.description in es2019+ so we need to cast here to pass
|
|
299
|
+
// the lib: es2016 check
|
|
300
|
+
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
|
301
|
+
);
|
|
296
302
|
};
|
|
297
303
|
|
|
298
304
|
function warn$2(msg, ...args) {
|
|
@@ -728,6 +734,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
728
734
|
return instrumentations;
|
|
729
735
|
}
|
|
730
736
|
function hasOwnProperty(key) {
|
|
737
|
+
if (!isSymbol(key))
|
|
738
|
+
key = String(key);
|
|
731
739
|
const obj = toRaw(this);
|
|
732
740
|
track(obj, "has", key);
|
|
733
741
|
return obj.hasOwnProperty(key);
|
|
@@ -1080,23 +1088,16 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1080
1088
|
clear: createReadonlyMethod("clear"),
|
|
1081
1089
|
forEach: createForEach(true, true)
|
|
1082
1090
|
};
|
|
1083
|
-
const iteratorMethods = [
|
|
1091
|
+
const iteratorMethods = [
|
|
1092
|
+
"keys",
|
|
1093
|
+
"values",
|
|
1094
|
+
"entries",
|
|
1095
|
+
Symbol.iterator
|
|
1096
|
+
];
|
|
1084
1097
|
iteratorMethods.forEach((method) => {
|
|
1085
|
-
mutableInstrumentations2[method] = createIterableMethod(
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
false
|
|
1089
|
-
);
|
|
1090
|
-
readonlyInstrumentations2[method] = createIterableMethod(
|
|
1091
|
-
method,
|
|
1092
|
-
true,
|
|
1093
|
-
false
|
|
1094
|
-
);
|
|
1095
|
-
shallowInstrumentations2[method] = createIterableMethod(
|
|
1096
|
-
method,
|
|
1097
|
-
false,
|
|
1098
|
-
true
|
|
1099
|
-
);
|
|
1098
|
+
mutableInstrumentations2[method] = createIterableMethod(method, false, false);
|
|
1099
|
+
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1100
|
+
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1100
1101
|
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1101
1102
|
method,
|
|
1102
1103
|
true,
|
|
@@ -1253,7 +1254,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1253
1254
|
return !!(value && value["__v_isShallow"]);
|
|
1254
1255
|
}
|
|
1255
1256
|
function isProxy(value) {
|
|
1256
|
-
return
|
|
1257
|
+
return value ? !!value["__v_raw"] : false;
|
|
1257
1258
|
}
|
|
1258
1259
|
function toRaw(observed) {
|
|
1259
1260
|
const raw = observed && observed["__v_raw"];
|
|
@@ -1715,11 +1716,17 @@ getter: `, this.getter);
|
|
|
1715
1716
|
}
|
|
1716
1717
|
return res;
|
|
1717
1718
|
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1719
|
+
if (isArray(fn)) {
|
|
1720
|
+
const values = [];
|
|
1721
|
+
for (let i = 0; i < fn.length; i++) {
|
|
1722
|
+
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
1723
|
+
}
|
|
1724
|
+
return values;
|
|
1725
|
+
} else {
|
|
1726
|
+
warn$1(
|
|
1727
|
+
`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
|
|
1728
|
+
);
|
|
1721
1729
|
}
|
|
1722
|
-
return values;
|
|
1723
1730
|
}
|
|
1724
1731
|
function handleError(err, instance, type, throwInDev = true) {
|
|
1725
1732
|
const contextVNode = instance ? instance.vnode : null;
|
|
@@ -1740,12 +1747,14 @@ getter: `, this.getter);
|
|
|
1740
1747
|
}
|
|
1741
1748
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
1742
1749
|
if (appErrorHandler) {
|
|
1750
|
+
pauseTracking();
|
|
1743
1751
|
callWithErrorHandling(
|
|
1744
1752
|
appErrorHandler,
|
|
1745
1753
|
null,
|
|
1746
1754
|
10,
|
|
1747
1755
|
[err, exposedInstance, errorInfo]
|
|
1748
1756
|
);
|
|
1757
|
+
resetTracking();
|
|
1749
1758
|
return;
|
|
1750
1759
|
}
|
|
1751
1760
|
}
|
|
@@ -2121,6 +2130,8 @@ getter: `, this.getter);
|
|
|
2121
2130
|
_devtoolsComponentRemoved(component);
|
|
2122
2131
|
}
|
|
2123
2132
|
};
|
|
2133
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2134
|
+
// @__NO_SIDE_EFFECTS__
|
|
2124
2135
|
function createDevtoolsComponentHook(hook) {
|
|
2125
2136
|
return (component) => {
|
|
2126
2137
|
emit$1(
|
|
@@ -4191,7 +4202,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4191
4202
|
return () => {
|
|
4192
4203
|
pendingCacheKey = null;
|
|
4193
4204
|
if (!slots.default) {
|
|
4194
|
-
return null;
|
|
4205
|
+
return current = null;
|
|
4195
4206
|
}
|
|
4196
4207
|
const children = slots.default();
|
|
4197
4208
|
const rawVNode = children[0];
|
|
@@ -4504,6 +4515,9 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4504
4515
|
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
4505
4516
|
const PublicInstanceProxyHandlers = {
|
|
4506
4517
|
get({ _: instance }, key) {
|
|
4518
|
+
if (key === "__v_skip") {
|
|
4519
|
+
return true;
|
|
4520
|
+
}
|
|
4507
4521
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
4508
4522
|
if (key === "__isVue") {
|
|
4509
4523
|
return true;
|
|
@@ -4546,7 +4560,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
4546
4560
|
let cssModule, globalProperties;
|
|
4547
4561
|
if (publicGetter) {
|
|
4548
4562
|
if (key === "$attrs") {
|
|
4549
|
-
track(instance, "get",
|
|
4563
|
+
track(instance.attrs, "get", "");
|
|
4550
4564
|
markAttrsAccessed();
|
|
4551
4565
|
} else if (key === "$slots") {
|
|
4552
4566
|
track(instance, "get", key);
|
|
@@ -5471,10 +5485,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5471
5485
|
return !!(currentInstance || currentRenderingInstance || currentApp);
|
|
5472
5486
|
}
|
|
5473
5487
|
|
|
5488
|
+
const internalObjectProto = /* @__PURE__ */ Object.create(null);
|
|
5489
|
+
const createInternalObject = () => Object.create(internalObjectProto);
|
|
5490
|
+
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
5491
|
+
|
|
5474
5492
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
5475
5493
|
const props = {};
|
|
5476
|
-
const attrs =
|
|
5477
|
-
def(attrs, InternalObjectKey, 1);
|
|
5494
|
+
const attrs = createInternalObject();
|
|
5478
5495
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
5479
5496
|
setFullProps(instance, rawProps, props, attrs);
|
|
5480
5497
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -5589,7 +5606,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5589
5606
|
}
|
|
5590
5607
|
}
|
|
5591
5608
|
if (hasAttrsChanged) {
|
|
5592
|
-
trigger(instance, "set", "
|
|
5609
|
+
trigger(instance.attrs, "set", "");
|
|
5593
5610
|
}
|
|
5594
5611
|
{
|
|
5595
5612
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -5925,19 +5942,18 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5925
5942
|
const type = children._;
|
|
5926
5943
|
if (type) {
|
|
5927
5944
|
instance.slots = toRaw(children);
|
|
5928
|
-
def(
|
|
5945
|
+
def(instance.slots, "_", type);
|
|
5929
5946
|
} else {
|
|
5930
5947
|
normalizeObjectSlots(
|
|
5931
5948
|
children,
|
|
5932
|
-
instance.slots =
|
|
5949
|
+
instance.slots = createInternalObject());
|
|
5933
5950
|
}
|
|
5934
5951
|
} else {
|
|
5935
|
-
instance.slots =
|
|
5952
|
+
instance.slots = createInternalObject();
|
|
5936
5953
|
if (children) {
|
|
5937
5954
|
normalizeVNodeSlots(instance, children);
|
|
5938
5955
|
}
|
|
5939
5956
|
}
|
|
5940
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
5941
5957
|
};
|
|
5942
5958
|
const updateSlots = (instance, children, optimized) => {
|
|
5943
5959
|
const { vnode, slots } = instance;
|
|
@@ -6109,6 +6125,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6109
6125
|
}
|
|
6110
6126
|
};
|
|
6111
6127
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
6128
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
6112
6129
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
6113
6130
|
const onMismatch = () => handleMismatch(
|
|
6114
6131
|
node,
|
|
@@ -8543,7 +8560,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
8543
8560
|
...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
|
|
8544
8561
|
);
|
|
8545
8562
|
};
|
|
8546
|
-
const InternalObjectKey = `__vInternal`;
|
|
8547
8563
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
8548
8564
|
const normalizeRef = ({
|
|
8549
8565
|
ref,
|
|
@@ -8676,7 +8692,7 @@ Component that was made reactive: `,
|
|
|
8676
8692
|
function guardReactiveProps(props) {
|
|
8677
8693
|
if (!props)
|
|
8678
8694
|
return null;
|
|
8679
|
-
return isProxy(props) ||
|
|
8695
|
+
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
8680
8696
|
}
|
|
8681
8697
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
8682
8698
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -8781,7 +8797,7 @@ Component that was made reactive: `,
|
|
|
8781
8797
|
} else {
|
|
8782
8798
|
type = 32;
|
|
8783
8799
|
const slotFlag = children._;
|
|
8784
|
-
if (!slotFlag && !(
|
|
8800
|
+
if (!slotFlag && !isInternalObject(children)) {
|
|
8785
8801
|
children._ctx = currentRenderingInstance;
|
|
8786
8802
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
8787
8803
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -9002,7 +9018,7 @@ Component that was made reactive: `,
|
|
|
9002
9018
|
}
|
|
9003
9019
|
}
|
|
9004
9020
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
9005
|
-
instance.proxy =
|
|
9021
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
9006
9022
|
{
|
|
9007
9023
|
exposePropsOnRenderContext(instance);
|
|
9008
9024
|
}
|
|
@@ -9134,26 +9150,21 @@ Component that was made reactive: `,
|
|
|
9134
9150
|
}
|
|
9135
9151
|
}
|
|
9136
9152
|
}
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
return false;
|
|
9153
|
-
}
|
|
9154
|
-
}
|
|
9155
|
-
));
|
|
9156
|
-
}
|
|
9153
|
+
const attrsProxyHandlers = {
|
|
9154
|
+
get(target, key) {
|
|
9155
|
+
markAttrsAccessed();
|
|
9156
|
+
track(target, "get", "");
|
|
9157
|
+
return target[key];
|
|
9158
|
+
},
|
|
9159
|
+
set() {
|
|
9160
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
9161
|
+
return false;
|
|
9162
|
+
},
|
|
9163
|
+
deleteProperty() {
|
|
9164
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
9165
|
+
return false;
|
|
9166
|
+
}
|
|
9167
|
+
} ;
|
|
9157
9168
|
function getSlotsProxy(instance) {
|
|
9158
9169
|
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
9159
9170
|
get(target, key) {
|
|
@@ -9187,9 +9198,10 @@ Component that was made reactive: `,
|
|
|
9187
9198
|
instance.exposed = exposed || {};
|
|
9188
9199
|
};
|
|
9189
9200
|
{
|
|
9201
|
+
let attrsProxy;
|
|
9190
9202
|
return Object.freeze({
|
|
9191
9203
|
get attrs() {
|
|
9192
|
-
return
|
|
9204
|
+
return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
|
|
9193
9205
|
},
|
|
9194
9206
|
get slots() {
|
|
9195
9207
|
return getSlotsProxy(instance);
|
|
@@ -9534,7 +9546,7 @@ Component that was made reactive: `,
|
|
|
9534
9546
|
return true;
|
|
9535
9547
|
}
|
|
9536
9548
|
|
|
9537
|
-
const version = "3.4.
|
|
9549
|
+
const version = "3.4.23";
|
|
9538
9550
|
const warn = warn$1 ;
|
|
9539
9551
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9540
9552
|
const devtools = devtools$1 ;
|
|
@@ -9960,8 +9972,8 @@ Component that was made reactive: `,
|
|
|
9960
9972
|
setVarsOnVNode(instance.subTree, vars);
|
|
9961
9973
|
updateTeleports(vars);
|
|
9962
9974
|
};
|
|
9963
|
-
watchPostEffect(setVars);
|
|
9964
9975
|
onMounted(() => {
|
|
9976
|
+
watchPostEffect(setVars);
|
|
9965
9977
|
const ob = new MutationObserver(setVars);
|
|
9966
9978
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
9967
9979
|
onUnmounted(() => ob.disconnect());
|
|
@@ -10184,11 +10196,14 @@ Component that was made reactive: `,
|
|
|
10184
10196
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
10185
10197
|
const existingInvoker = invokers[rawName];
|
|
10186
10198
|
if (nextValue && existingInvoker) {
|
|
10187
|
-
existingInvoker.value = nextValue;
|
|
10199
|
+
existingInvoker.value = sanitizeEventValue(nextValue, rawName) ;
|
|
10188
10200
|
} else {
|
|
10189
10201
|
const [name, options] = parseName(rawName);
|
|
10190
10202
|
if (nextValue) {
|
|
10191
|
-
const invoker = invokers[rawName] = createInvoker(
|
|
10203
|
+
const invoker = invokers[rawName] = createInvoker(
|
|
10204
|
+
sanitizeEventValue(nextValue, rawName) ,
|
|
10205
|
+
instance
|
|
10206
|
+
);
|
|
10192
10207
|
addEventListener(el, name, invoker, options);
|
|
10193
10208
|
} else if (existingInvoker) {
|
|
10194
10209
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -10231,6 +10246,16 @@ Component that was made reactive: `,
|
|
|
10231
10246
|
invoker.attached = getNow();
|
|
10232
10247
|
return invoker;
|
|
10233
10248
|
}
|
|
10249
|
+
function sanitizeEventValue(value, propName) {
|
|
10250
|
+
if (isFunction(value) || isArray(value)) {
|
|
10251
|
+
return value;
|
|
10252
|
+
}
|
|
10253
|
+
warn(
|
|
10254
|
+
`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
|
|
10255
|
+
Expected function or array of functions, received type ${typeof value}.`
|
|
10256
|
+
);
|
|
10257
|
+
return NOOP;
|
|
10258
|
+
}
|
|
10234
10259
|
function patchStopImmediatePropagation(e, value) {
|
|
10235
10260
|
if (isArray(value)) {
|
|
10236
10261
|
const originalStop = e.stopImmediatePropagation;
|
|
@@ -10238,7 +10263,9 @@ Component that was made reactive: `,
|
|
|
10238
10263
|
originalStop.call(e);
|
|
10239
10264
|
e._stopped = true;
|
|
10240
10265
|
};
|
|
10241
|
-
return value.map(
|
|
10266
|
+
return value.map(
|
|
10267
|
+
(fn) => (e2) => !e2._stopped && fn && fn(e2)
|
|
10268
|
+
);
|
|
10242
10269
|
} else {
|
|
10243
10270
|
return value;
|
|
10244
10271
|
}
|
|
@@ -10439,7 +10466,7 @@ Component that was made reactive: `,
|
|
|
10439
10466
|
}
|
|
10440
10467
|
}
|
|
10441
10468
|
_setAttr(key) {
|
|
10442
|
-
let value = this.getAttribute(key);
|
|
10469
|
+
let value = this.hasAttribute(key) ? this.getAttribute(key) : void 0;
|
|
10443
10470
|
const camelKey = camelize(key);
|
|
10444
10471
|
if (this._numberProps && this._numberProps[camelKey]) {
|
|
10445
10472
|
value = toNumber(value);
|
|
@@ -10593,7 +10620,28 @@ Component that was made reactive: `,
|
|
|
10593
10620
|
const rawProps = toRaw(props);
|
|
10594
10621
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
10595
10622
|
let tag = rawProps.tag || Fragment;
|
|
10596
|
-
prevChildren =
|
|
10623
|
+
prevChildren = [];
|
|
10624
|
+
if (children) {
|
|
10625
|
+
for (let i = 0; i < children.length; i++) {
|
|
10626
|
+
const child = children[i];
|
|
10627
|
+
if (child.el && child.el instanceof Element) {
|
|
10628
|
+
prevChildren.push(child);
|
|
10629
|
+
setTransitionHooks(
|
|
10630
|
+
child,
|
|
10631
|
+
resolveTransitionHooks(
|
|
10632
|
+
child,
|
|
10633
|
+
cssTransitionProps,
|
|
10634
|
+
state,
|
|
10635
|
+
instance
|
|
10636
|
+
)
|
|
10637
|
+
);
|
|
10638
|
+
positionMap.set(
|
|
10639
|
+
child,
|
|
10640
|
+
child.el.getBoundingClientRect()
|
|
10641
|
+
);
|
|
10642
|
+
}
|
|
10643
|
+
}
|
|
10644
|
+
}
|
|
10597
10645
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
10598
10646
|
for (let i = 0; i < children.length; i++) {
|
|
10599
10647
|
const child = children[i];
|
|
@@ -10606,16 +10654,6 @@ Component that was made reactive: `,
|
|
|
10606
10654
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
10607
10655
|
}
|
|
10608
10656
|
}
|
|
10609
|
-
if (prevChildren) {
|
|
10610
|
-
for (let i = 0; i < prevChildren.length; i++) {
|
|
10611
|
-
const child = prevChildren[i];
|
|
10612
|
-
setTransitionHooks(
|
|
10613
|
-
child,
|
|
10614
|
-
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
10615
|
-
);
|
|
10616
|
-
positionMap.set(child, child.el.getBoundingClientRect());
|
|
10617
|
-
}
|
|
10618
|
-
}
|
|
10619
10657
|
return createVNode(tag, null, children);
|
|
10620
10658
|
};
|
|
10621
10659
|
}
|
|
@@ -10714,7 +10752,7 @@ Component that was made reactive: `,
|
|
|
10714
10752
|
el[assignKey] = getModelAssigner(vnode);
|
|
10715
10753
|
if (el.composing)
|
|
10716
10754
|
return;
|
|
10717
|
-
const elValue = number || el.type === "number" ? looseToNumber(el.value) : el.value;
|
|
10755
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? looseToNumber(el.value) : el.value;
|
|
10718
10756
|
const newValue = value == null ? "" : value;
|
|
10719
10757
|
if (elValue === newValue) {
|
|
10720
10758
|
return;
|
|
@@ -10817,14 +10855,14 @@ Component that was made reactive: `,
|
|
|
10817
10855
|
// set value in mounted & updated because <select> relies on its children
|
|
10818
10856
|
// <option>s.
|
|
10819
10857
|
mounted(el, { value, modifiers: { number } }) {
|
|
10820
|
-
setSelected(el, value
|
|
10858
|
+
setSelected(el, value);
|
|
10821
10859
|
},
|
|
10822
10860
|
beforeUpdate(el, _binding, vnode) {
|
|
10823
10861
|
el[assignKey] = getModelAssigner(vnode);
|
|
10824
10862
|
},
|
|
10825
10863
|
updated(el, { value, modifiers: { number } }) {
|
|
10826
10864
|
if (!el._assigning) {
|
|
10827
|
-
setSelected(el, value
|
|
10865
|
+
setSelected(el, value);
|
|
10828
10866
|
}
|
|
10829
10867
|
}
|
|
10830
10868
|
};
|
|
@@ -10844,9 +10882,7 @@ Component that was made reactive: `,
|
|
|
10844
10882
|
if (isArrayValue) {
|
|
10845
10883
|
const optionType = typeof optionValue;
|
|
10846
10884
|
if (optionType === "string" || optionType === "number") {
|
|
10847
|
-
option.selected = value.
|
|
10848
|
-
number ? looseToNumber(optionValue) : optionValue
|
|
10849
|
-
);
|
|
10885
|
+
option.selected = value.some((v) => String(v) === String(optionValue));
|
|
10850
10886
|
} else {
|
|
10851
10887
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
10852
10888
|
}
|