@vue/compat 3.5.0-rc.1 → 3.5.1
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/vue.cjs.js +65 -36
- package/dist/vue.cjs.prod.js +54 -35
- package/dist/vue.esm-browser.js +66 -36
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +66 -36
- package/dist/vue.global.js +66 -36
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +65 -35
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +65 -35
- package/dist/vue.runtime.global.js +65 -35
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.1
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -214,6 +214,14 @@ function isRenderableAttrValue(value) {
|
|
|
214
214
|
return type === "string" || type === "number" || type === "boolean";
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
+
const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
|
|
218
|
+
function getEscapedCssVarName(key, doubleEscape) {
|
|
219
|
+
return key.replace(
|
|
220
|
+
cssVarNameEscapeSymbolsRE,
|
|
221
|
+
(s) => `\\${s}`
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
|
|
217
225
|
function looseCompareArrays(a, b) {
|
|
218
226
|
if (a.length !== b.length) return false;
|
|
219
227
|
let equal = true;
|
|
@@ -967,7 +975,7 @@ const arrayInstrumentations = {
|
|
|
967
975
|
},
|
|
968
976
|
concat(...args) {
|
|
969
977
|
return reactiveReadArray(this).concat(
|
|
970
|
-
...args.map((x) => reactiveReadArray(x))
|
|
978
|
+
...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)
|
|
971
979
|
);
|
|
972
980
|
},
|
|
973
981
|
entries() {
|
|
@@ -1073,7 +1081,7 @@ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
|
1073
1081
|
const needsWrap = arr !== self && !isShallow(self);
|
|
1074
1082
|
const methodFn = arr[method];
|
|
1075
1083
|
if (methodFn !== arrayProto[method]) {
|
|
1076
|
-
const result2 = methodFn.apply(
|
|
1084
|
+
const result2 = methodFn.apply(self, args);
|
|
1077
1085
|
return needsWrap ? toReactive(result2) : result2;
|
|
1078
1086
|
}
|
|
1079
1087
|
let wrappedFn = fn;
|
|
@@ -3821,7 +3829,9 @@ const BaseTransitionImpl = {
|
|
|
3821
3829
|
// #11061, ensure enterHooks is fresh after clone
|
|
3822
3830
|
(hooks) => enterHooks = hooks
|
|
3823
3831
|
);
|
|
3824
|
-
|
|
3832
|
+
if (innerChild.type !== Comment) {
|
|
3833
|
+
setTransitionHooks(innerChild, enterHooks);
|
|
3834
|
+
}
|
|
3825
3835
|
const oldChild = instance.subTree;
|
|
3826
3836
|
const oldInnerChild = oldChild && getInnerChild$1(oldChild);
|
|
3827
3837
|
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
@@ -4147,10 +4157,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4147
4157
|
const oldRef = oldRawRef && oldRawRef.r;
|
|
4148
4158
|
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
4149
4159
|
const setupState = owner.setupState;
|
|
4160
|
+
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => hasOwn(setupState, key) && !(Object.getOwnPropertyDescriptor(refs, key) || EMPTY_OBJ).get;
|
|
4150
4161
|
if (oldRef != null && oldRef !== ref) {
|
|
4151
4162
|
if (isString(oldRef)) {
|
|
4152
4163
|
refs[oldRef] = null;
|
|
4153
|
-
if (
|
|
4164
|
+
if (canSetSetupRef(oldRef)) {
|
|
4154
4165
|
setupState[oldRef] = null;
|
|
4155
4166
|
}
|
|
4156
4167
|
} else if (isRef(oldRef)) {
|
|
@@ -4165,14 +4176,14 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4165
4176
|
if (_isString || _isRef) {
|
|
4166
4177
|
const doSet = () => {
|
|
4167
4178
|
if (rawRef.f) {
|
|
4168
|
-
const existing = _isString ?
|
|
4179
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
4169
4180
|
if (isUnmount) {
|
|
4170
4181
|
isArray(existing) && remove(existing, refValue);
|
|
4171
4182
|
} else {
|
|
4172
4183
|
if (!isArray(existing)) {
|
|
4173
4184
|
if (_isString) {
|
|
4174
4185
|
refs[ref] = [refValue];
|
|
4175
|
-
if (
|
|
4186
|
+
if (canSetSetupRef(ref)) {
|
|
4176
4187
|
setupState[ref] = refs[ref];
|
|
4177
4188
|
}
|
|
4178
4189
|
} else {
|
|
@@ -4185,7 +4196,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4185
4196
|
}
|
|
4186
4197
|
} else if (_isString) {
|
|
4187
4198
|
refs[ref] = value;
|
|
4188
|
-
if (
|
|
4199
|
+
if (canSetSetupRef(ref)) {
|
|
4189
4200
|
setupState[ref] = value;
|
|
4190
4201
|
}
|
|
4191
4202
|
} else if (_isRef) {
|
|
@@ -4535,8 +4546,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4535
4546
|
const isText = vnode.type === Text;
|
|
4536
4547
|
if (node) {
|
|
4537
4548
|
if (isText && !optimized) {
|
|
4538
|
-
|
|
4539
|
-
if (next && (next = normalizeVNode(next)).type === Text) {
|
|
4549
|
+
if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
|
|
4540
4550
|
insert(
|
|
4541
4551
|
createText(
|
|
4542
4552
|
node.data.slice(vnode.children.length)
|
|
@@ -4792,7 +4802,10 @@ function resolveCssVars(instance, vnode, expectedMap) {
|
|
|
4792
4802
|
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
4793
4803
|
const cssVars = instance.getCssVars();
|
|
4794
4804
|
for (const key in cssVars) {
|
|
4795
|
-
expectedMap.set(
|
|
4805
|
+
expectedMap.set(
|
|
4806
|
+
`--${getEscapedCssVarName(key)}`,
|
|
4807
|
+
String(cssVars[key])
|
|
4808
|
+
);
|
|
4796
4809
|
}
|
|
4797
4810
|
}
|
|
4798
4811
|
if (vnode === root && instance.parent) {
|
|
@@ -5260,10 +5273,11 @@ const KeepAliveImpl = {
|
|
|
5260
5273
|
};
|
|
5261
5274
|
}
|
|
5262
5275
|
};
|
|
5263
|
-
{
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5276
|
+
const decorate$2 = (t) => {
|
|
5277
|
+
t.__isBuiltIn = true;
|
|
5278
|
+
return t;
|
|
5279
|
+
};
|
|
5280
|
+
const KeepAlive = /* @__PURE__ */ decorate$2(KeepAliveImpl) ;
|
|
5267
5281
|
function matches(pattern, name) {
|
|
5268
5282
|
if (isArray(pattern)) {
|
|
5269
5283
|
return pattern.some((p) => matches(p, name));
|
|
@@ -6975,7 +6989,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6975
6989
|
return vm;
|
|
6976
6990
|
}
|
|
6977
6991
|
}
|
|
6978
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
6992
|
+
Vue.version = `2.6.14-compat:${"3.5.1"}`;
|
|
6979
6993
|
Vue.config = singletonApp.config;
|
|
6980
6994
|
Vue.use = (plugin, ...options) => {
|
|
6981
6995
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -12111,7 +12125,7 @@ function isMemoSame(cached, memo) {
|
|
|
12111
12125
|
return true;
|
|
12112
12126
|
}
|
|
12113
12127
|
|
|
12114
|
-
const version = "3.5.
|
|
12128
|
+
const version = "3.5.1";
|
|
12115
12129
|
const warn = warn$1 ;
|
|
12116
12130
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12117
12131
|
const devtools = devtools$1 ;
|
|
@@ -12222,11 +12236,6 @@ const nodeOps = {
|
|
|
12222
12236
|
const TRANSITION = "transition";
|
|
12223
12237
|
const ANIMATION = "animation";
|
|
12224
12238
|
const vtcKey = Symbol("_vtc");
|
|
12225
|
-
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
12226
|
-
Transition.displayName = "Transition";
|
|
12227
|
-
{
|
|
12228
|
-
Transition.__isBuiltIn = true;
|
|
12229
|
-
}
|
|
12230
12239
|
const DOMTransitionPropsValidators = {
|
|
12231
12240
|
name: String,
|
|
12232
12241
|
type: String,
|
|
@@ -12245,11 +12254,22 @@ const DOMTransitionPropsValidators = {
|
|
|
12245
12254
|
leaveActiveClass: String,
|
|
12246
12255
|
leaveToClass: String
|
|
12247
12256
|
};
|
|
12248
|
-
const TransitionPropsValidators =
|
|
12257
|
+
const TransitionPropsValidators = /* @__PURE__ */ extend(
|
|
12249
12258
|
{},
|
|
12250
12259
|
BaseTransitionPropsValidators,
|
|
12251
12260
|
DOMTransitionPropsValidators
|
|
12252
12261
|
);
|
|
12262
|
+
const decorate$1 = (t) => {
|
|
12263
|
+
t.displayName = "Transition";
|
|
12264
|
+
t.props = TransitionPropsValidators;
|
|
12265
|
+
{
|
|
12266
|
+
t.__isBuiltIn = true;
|
|
12267
|
+
}
|
|
12268
|
+
return t;
|
|
12269
|
+
};
|
|
12270
|
+
const Transition = /* @__PURE__ */ decorate$1(
|
|
12271
|
+
(props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots)
|
|
12272
|
+
);
|
|
12253
12273
|
const callHook = (hook, args = []) => {
|
|
12254
12274
|
if (isArray(hook)) {
|
|
12255
12275
|
hook.forEach((h2) => h2(...args));
|
|
@@ -12819,7 +12839,11 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
12819
12839
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
12820
12840
|
!tag.includes("-")) {
|
|
12821
12841
|
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
12822
|
-
const newValue = value == null ?
|
|
12842
|
+
const newValue = value == null ? (
|
|
12843
|
+
// #11647: value should be set as empty string for null and undefined,
|
|
12844
|
+
// but <input type="checkbox"> should be set as 'on'.
|
|
12845
|
+
el.type === "checkbox" ? "on" : ""
|
|
12846
|
+
) : String(value);
|
|
12823
12847
|
if (oldValue !== newValue || !("_value" in el)) {
|
|
12824
12848
|
el.value = newValue;
|
|
12825
12849
|
}
|
|
@@ -13459,7 +13483,14 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
13459
13483
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
13460
13484
|
const moveCbKey = Symbol("_moveCb");
|
|
13461
13485
|
const enterCbKey = Symbol("_enterCb");
|
|
13462
|
-
const
|
|
13486
|
+
const decorate = (t) => {
|
|
13487
|
+
delete t.props.mode;
|
|
13488
|
+
{
|
|
13489
|
+
t.__isBuiltIn = true;
|
|
13490
|
+
}
|
|
13491
|
+
return t;
|
|
13492
|
+
};
|
|
13493
|
+
const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
13463
13494
|
name: "TransitionGroup",
|
|
13464
13495
|
props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
|
|
13465
13496
|
tag: String,
|
|
@@ -13551,12 +13582,7 @@ const TransitionGroupImpl = {
|
|
|
13551
13582
|
return createVNode(tag, null, children);
|
|
13552
13583
|
};
|
|
13553
13584
|
}
|
|
13554
|
-
};
|
|
13555
|
-
{
|
|
13556
|
-
TransitionGroupImpl.__isBuiltIn = true;
|
|
13557
|
-
}
|
|
13558
|
-
const removeMode = (props) => delete props.mode;
|
|
13559
|
-
/* @__PURE__ */ removeMode(TransitionGroupImpl.props);
|
|
13585
|
+
});
|
|
13560
13586
|
const TransitionGroup = TransitionGroupImpl;
|
|
13561
13587
|
function callPendingCbs(c) {
|
|
13562
13588
|
const el = c.el;
|
|
@@ -13705,12 +13731,16 @@ const vModelCheckbox = {
|
|
|
13705
13731
|
};
|
|
13706
13732
|
function setChecked(el, { value, oldValue }, vnode) {
|
|
13707
13733
|
el._modelValue = value;
|
|
13734
|
+
let checked;
|
|
13708
13735
|
if (isArray(value)) {
|
|
13709
|
-
|
|
13736
|
+
checked = looseIndexOf(value, vnode.props.value) > -1;
|
|
13710
13737
|
} else if (isSet(value)) {
|
|
13711
|
-
|
|
13712
|
-
} else
|
|
13713
|
-
|
|
13738
|
+
checked = value.has(vnode.props.value);
|
|
13739
|
+
} else {
|
|
13740
|
+
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
13741
|
+
}
|
|
13742
|
+
if (el.checked !== checked) {
|
|
13743
|
+
el.checked = checked;
|
|
13714
13744
|
}
|
|
13715
13745
|
}
|
|
13716
13746
|
const vModelRadio = {
|