@vue/compat 3.5.29 → 3.5.31
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 +154 -47
- package/dist/vue.cjs.prod.js +135 -43
- package/dist/vue.esm-browser.js +154 -47
- package/dist/vue.esm-browser.prod.js +8 -8
- package/dist/vue.esm-bundler.js +154 -47
- package/dist/vue.global.js +154 -47
- package/dist/vue.global.prod.js +8 -8
- package/dist/vue.runtime.esm-browser.js +153 -46
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +153 -46
- package/dist/vue.runtime.global.js +153 -46
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +4 -3
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.31
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1282,10 +1282,17 @@ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
function reduce(self, method, fn, args) {
|
|
1284
1284
|
const arr = shallowReadArray(self);
|
|
1285
|
+
const needsWrap = arr !== self && !isShallow(self);
|
|
1285
1286
|
let wrappedFn = fn;
|
|
1287
|
+
let wrapInitialAccumulator = false;
|
|
1286
1288
|
if (arr !== self) {
|
|
1287
|
-
if (
|
|
1289
|
+
if (needsWrap) {
|
|
1290
|
+
wrapInitialAccumulator = args.length === 0;
|
|
1288
1291
|
wrappedFn = function(acc, item, index) {
|
|
1292
|
+
if (wrapInitialAccumulator) {
|
|
1293
|
+
wrapInitialAccumulator = false;
|
|
1294
|
+
acc = toWrapped(self, acc);
|
|
1295
|
+
}
|
|
1289
1296
|
return fn.call(this, acc, toWrapped(self, item), index, self);
|
|
1290
1297
|
};
|
|
1291
1298
|
} else if (fn.length > 3) {
|
|
@@ -1294,7 +1301,8 @@ function reduce(self, method, fn, args) {
|
|
|
1294
1301
|
};
|
|
1295
1302
|
}
|
|
1296
1303
|
}
|
|
1297
|
-
|
|
1304
|
+
const result = arr[method](wrappedFn, ...args);
|
|
1305
|
+
return wrapInitialAccumulator ? toWrapped(self, result) : result;
|
|
1298
1306
|
}
|
|
1299
1307
|
function searchProxy(self, method, args) {
|
|
1300
1308
|
const arr = toRaw(self);
|
|
@@ -1584,15 +1592,14 @@ function createInstrumentations(readonly, shallow) {
|
|
|
1584
1592
|
clear: createReadonlyMethod("clear")
|
|
1585
1593
|
} : {
|
|
1586
1594
|
add(value) {
|
|
1587
|
-
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1588
|
-
value = toRaw(value);
|
|
1589
|
-
}
|
|
1590
1595
|
const target = toRaw(this);
|
|
1591
1596
|
const proto = getProto(target);
|
|
1592
|
-
const
|
|
1597
|
+
const rawValue = toRaw(value);
|
|
1598
|
+
const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;
|
|
1599
|
+
const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
|
|
1593
1600
|
if (!hadKey) {
|
|
1594
|
-
target.add(
|
|
1595
|
-
trigger(target, "add",
|
|
1601
|
+
target.add(valueToAdd);
|
|
1602
|
+
trigger(target, "add", valueToAdd, valueToAdd);
|
|
1596
1603
|
}
|
|
1597
1604
|
return this;
|
|
1598
1605
|
},
|
|
@@ -1955,16 +1962,16 @@ function toRefs(object) {
|
|
|
1955
1962
|
return ret;
|
|
1956
1963
|
}
|
|
1957
1964
|
class ObjectRefImpl {
|
|
1958
|
-
constructor(_object,
|
|
1965
|
+
constructor(_object, key, _defaultValue) {
|
|
1959
1966
|
this._object = _object;
|
|
1960
|
-
this._key = _key;
|
|
1961
1967
|
this._defaultValue = _defaultValue;
|
|
1962
1968
|
this["__v_isRef"] = true;
|
|
1963
1969
|
this._value = void 0;
|
|
1970
|
+
this._key = isSymbol(key) ? key : String(key);
|
|
1964
1971
|
this._raw = toRaw(_object);
|
|
1965
1972
|
let shallow = true;
|
|
1966
1973
|
let obj = _object;
|
|
1967
|
-
if (!isArray(_object) || !isIntegerKey(
|
|
1974
|
+
if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {
|
|
1968
1975
|
do {
|
|
1969
1976
|
shallow = !isProxy(obj) || isShallow(obj);
|
|
1970
1977
|
} while (shallow && (obj = obj["__v_raw"]));
|
|
@@ -2769,6 +2776,13 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2769
2776
|
}
|
|
2770
2777
|
|
|
2771
2778
|
let isHmrUpdating = false;
|
|
2779
|
+
const setHmrUpdating = (v) => {
|
|
2780
|
+
try {
|
|
2781
|
+
return isHmrUpdating;
|
|
2782
|
+
} finally {
|
|
2783
|
+
isHmrUpdating = v;
|
|
2784
|
+
}
|
|
2785
|
+
};
|
|
2772
2786
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2773
2787
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2774
2788
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -3827,9 +3841,10 @@ const TeleportImpl = {
|
|
|
3827
3841
|
mount(container, mainAnchor);
|
|
3828
3842
|
updateCssVars(n2, true);
|
|
3829
3843
|
}
|
|
3830
|
-
if (isTeleportDeferred(n2.props)) {
|
|
3844
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3831
3845
|
n2.el.__isMounted = false;
|
|
3832
3846
|
queuePostRenderEffect(() => {
|
|
3847
|
+
if (n2.el.__isMounted !== false) return;
|
|
3833
3848
|
mountToTarget();
|
|
3834
3849
|
delete n2.el.__isMounted;
|
|
3835
3850
|
}, parentSuspense);
|
|
@@ -3837,7 +3852,12 @@ const TeleportImpl = {
|
|
|
3837
3852
|
mountToTarget();
|
|
3838
3853
|
}
|
|
3839
3854
|
} else {
|
|
3840
|
-
|
|
3855
|
+
n2.el = n1.el;
|
|
3856
|
+
n2.targetStart = n1.targetStart;
|
|
3857
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
3858
|
+
const target = n2.target = n1.target;
|
|
3859
|
+
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3860
|
+
if (n1.el.__isMounted === false) {
|
|
3841
3861
|
queuePostRenderEffect(() => {
|
|
3842
3862
|
TeleportImpl.process(
|
|
3843
3863
|
n1,
|
|
@@ -3854,11 +3874,6 @@ const TeleportImpl = {
|
|
|
3854
3874
|
}, parentSuspense);
|
|
3855
3875
|
return;
|
|
3856
3876
|
}
|
|
3857
|
-
n2.el = n1.el;
|
|
3858
|
-
n2.targetStart = n1.targetStart;
|
|
3859
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
3860
|
-
const target = n2.target = n1.target;
|
|
3861
|
-
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3862
3877
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3863
3878
|
const currentContainer = wasDisabled ? container : target;
|
|
3864
3879
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -4325,7 +4340,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4325
4340
|
callHook(hook, [el]);
|
|
4326
4341
|
},
|
|
4327
4342
|
enter(el) {
|
|
4328
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
4343
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
4329
4344
|
let hook = onEnter;
|
|
4330
4345
|
let afterHook = onAfterEnter;
|
|
4331
4346
|
let cancelHook = onEnterCancelled;
|
|
@@ -6264,12 +6279,16 @@ function renderList(source, renderItem, cache, index) {
|
|
|
6264
6279
|
);
|
|
6265
6280
|
}
|
|
6266
6281
|
} else if (typeof source === "number") {
|
|
6267
|
-
if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) {
|
|
6268
|
-
warn$1(
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6282
|
+
if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
|
|
6283
|
+
warn$1(
|
|
6284
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
6285
|
+
);
|
|
6286
|
+
ret = [];
|
|
6287
|
+
} else {
|
|
6288
|
+
ret = new Array(source);
|
|
6289
|
+
for (let i = 0; i < source; i++) {
|
|
6290
|
+
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
6291
|
+
}
|
|
6273
6292
|
}
|
|
6274
6293
|
} else if (isObject(source)) {
|
|
6275
6294
|
if (source[Symbol.iterator]) {
|
|
@@ -6972,6 +6991,7 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
6972
6991
|
}
|
|
6973
6992
|
function withAsyncContext(getAwaitable) {
|
|
6974
6993
|
const ctx = getCurrentInstance();
|
|
6994
|
+
const inSSRSetup = isInSSRComponentSetup;
|
|
6975
6995
|
if (!!(process.env.NODE_ENV !== "production") && !ctx) {
|
|
6976
6996
|
warn$1(
|
|
6977
6997
|
`withAsyncContext called without active current instance. This is likely a bug.`
|
|
@@ -6979,13 +6999,25 @@ function withAsyncContext(getAwaitable) {
|
|
|
6979
6999
|
}
|
|
6980
7000
|
let awaitable = getAwaitable();
|
|
6981
7001
|
unsetCurrentInstance();
|
|
7002
|
+
if (inSSRSetup) {
|
|
7003
|
+
setInSSRSetupState(false);
|
|
7004
|
+
}
|
|
7005
|
+
const restore = () => {
|
|
7006
|
+
setCurrentInstance(ctx);
|
|
7007
|
+
if (inSSRSetup) {
|
|
7008
|
+
setInSSRSetupState(true);
|
|
7009
|
+
}
|
|
7010
|
+
};
|
|
6982
7011
|
const cleanup = () => {
|
|
6983
7012
|
if (getCurrentInstance() !== ctx) ctx.scope.off();
|
|
6984
7013
|
unsetCurrentInstance();
|
|
7014
|
+
if (inSSRSetup) {
|
|
7015
|
+
setInSSRSetupState(false);
|
|
7016
|
+
}
|
|
6985
7017
|
};
|
|
6986
7018
|
if (isPromise(awaitable)) {
|
|
6987
7019
|
awaitable = awaitable.catch((e) => {
|
|
6988
|
-
|
|
7020
|
+
restore();
|
|
6989
7021
|
Promise.resolve().then(() => Promise.resolve().then(cleanup));
|
|
6990
7022
|
throw e;
|
|
6991
7023
|
});
|
|
@@ -6993,7 +7025,7 @@ function withAsyncContext(getAwaitable) {
|
|
|
6993
7025
|
return [
|
|
6994
7026
|
awaitable,
|
|
6995
7027
|
() => {
|
|
6996
|
-
|
|
7028
|
+
restore();
|
|
6997
7029
|
Promise.resolve().then(cleanup);
|
|
6998
7030
|
}
|
|
6999
7031
|
];
|
|
@@ -7519,7 +7551,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7519
7551
|
return vm;
|
|
7520
7552
|
}
|
|
7521
7553
|
}
|
|
7522
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7554
|
+
Vue.version = `2.6.14-compat:${"3.5.31"}`;
|
|
7523
7555
|
Vue.config = singletonApp.config;
|
|
7524
7556
|
Vue.use = (plugin, ...options) => {
|
|
7525
7557
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8680,11 +8712,12 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
8680
8712
|
}
|
|
8681
8713
|
return nextProp !== prevProp;
|
|
8682
8714
|
}
|
|
8683
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
8715
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
8684
8716
|
while (parent) {
|
|
8685
8717
|
const root = parent.subTree;
|
|
8686
8718
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
8687
|
-
root.el =
|
|
8719
|
+
root.suspense.vnode.el = root.el = el;
|
|
8720
|
+
vnode = root;
|
|
8688
8721
|
}
|
|
8689
8722
|
if (root === vnode) {
|
|
8690
8723
|
(vnode = parent.vnode).el = el;
|
|
@@ -8693,6 +8726,9 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
8693
8726
|
break;
|
|
8694
8727
|
}
|
|
8695
8728
|
}
|
|
8729
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
8730
|
+
suspense.vnode.el = el;
|
|
8731
|
+
}
|
|
8696
8732
|
}
|
|
8697
8733
|
|
|
8698
8734
|
function createPropsDefaultThis(instance, rawProps, propKey) {
|
|
@@ -9633,10 +9669,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9633
9669
|
}
|
|
9634
9670
|
hostInsert(el, container, anchor);
|
|
9635
9671
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
9672
|
+
const isHmr = !!(process.env.NODE_ENV !== "production") && isHmrUpdating;
|
|
9636
9673
|
queuePostRenderEffect(() => {
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9674
|
+
let prev;
|
|
9675
|
+
if (!!(process.env.NODE_ENV !== "production")) prev = setHmrUpdating(isHmr);
|
|
9676
|
+
try {
|
|
9677
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
9678
|
+
needCallTransitionHooks && transition.enter(el);
|
|
9679
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
9680
|
+
} finally {
|
|
9681
|
+
if (!!(process.env.NODE_ENV !== "production")) setHmrUpdating(prev);
|
|
9682
|
+
}
|
|
9640
9683
|
}, parentSuspense);
|
|
9641
9684
|
}
|
|
9642
9685
|
};
|
|
@@ -10056,7 +10099,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10056
10099
|
}
|
|
10057
10100
|
} else {
|
|
10058
10101
|
if (root.ce && root.ce._hasShadowRoot()) {
|
|
10059
|
-
root.ce._injectChildStyle(
|
|
10102
|
+
root.ce._injectChildStyle(
|
|
10103
|
+
type,
|
|
10104
|
+
instance.parent ? instance.parent.type : void 0
|
|
10105
|
+
);
|
|
10060
10106
|
}
|
|
10061
10107
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
10062
10108
|
startMeasure(instance, `render`);
|
|
@@ -10590,7 +10636,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10590
10636
|
shapeFlag,
|
|
10591
10637
|
patchFlag,
|
|
10592
10638
|
dirs,
|
|
10593
|
-
cacheIndex
|
|
10639
|
+
cacheIndex,
|
|
10640
|
+
memo
|
|
10594
10641
|
} = vnode;
|
|
10595
10642
|
if (patchFlag === -2) {
|
|
10596
10643
|
optimized = false;
|
|
@@ -10652,10 +10699,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10652
10699
|
remove(vnode);
|
|
10653
10700
|
}
|
|
10654
10701
|
}
|
|
10655
|
-
|
|
10702
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
10703
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
10656
10704
|
queuePostRenderEffect(() => {
|
|
10657
10705
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
10658
10706
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
10707
|
+
if (shouldInvalidateMemo) {
|
|
10708
|
+
vnode.el = null;
|
|
10709
|
+
}
|
|
10659
10710
|
}, parentSuspense);
|
|
10660
10711
|
}
|
|
10661
10712
|
};
|
|
@@ -11218,6 +11269,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11218
11269
|
pendingId: suspenseId++,
|
|
11219
11270
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
11220
11271
|
activeBranch: null,
|
|
11272
|
+
isFallbackMountPending: false,
|
|
11221
11273
|
pendingBranch: null,
|
|
11222
11274
|
isInFallback: !isHydrating,
|
|
11223
11275
|
isHydrating,
|
|
@@ -11267,7 +11319,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11267
11319
|
}
|
|
11268
11320
|
};
|
|
11269
11321
|
}
|
|
11270
|
-
if (activeBranch) {
|
|
11322
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
11271
11323
|
if (parentNode(activeBranch.el) === container2) {
|
|
11272
11324
|
anchor = next(activeBranch);
|
|
11273
11325
|
}
|
|
@@ -11280,6 +11332,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11280
11332
|
move(pendingBranch, container2, anchor, 0);
|
|
11281
11333
|
}
|
|
11282
11334
|
}
|
|
11335
|
+
suspense.isFallbackMountPending = false;
|
|
11283
11336
|
setActiveBranch(suspense, pendingBranch);
|
|
11284
11337
|
suspense.pendingBranch = null;
|
|
11285
11338
|
suspense.isInFallback = false;
|
|
@@ -11315,6 +11368,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11315
11368
|
triggerEvent(vnode2, "onFallback");
|
|
11316
11369
|
const anchor2 = next(activeBranch);
|
|
11317
11370
|
const mountFallback = () => {
|
|
11371
|
+
suspense.isFallbackMountPending = false;
|
|
11318
11372
|
if (!suspense.isInFallback) {
|
|
11319
11373
|
return;
|
|
11320
11374
|
}
|
|
@@ -11334,6 +11388,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11334
11388
|
};
|
|
11335
11389
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
11336
11390
|
if (delayEnter) {
|
|
11391
|
+
suspense.isFallbackMountPending = true;
|
|
11337
11392
|
activeBranch.transition.afterLeave = mountFallback;
|
|
11338
11393
|
}
|
|
11339
11394
|
suspense.isInFallback = true;
|
|
@@ -11951,6 +12006,10 @@ function mergeProps(...args) {
|
|
|
11951
12006
|
const incoming = toMerge[key];
|
|
11952
12007
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
11953
12008
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
12009
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
12010
|
+
// the model listener.
|
|
12011
|
+
!isModelListener(key)) {
|
|
12012
|
+
ret[key] = incoming;
|
|
11954
12013
|
}
|
|
11955
12014
|
} else if (key !== "") {
|
|
11956
12015
|
ret[key] = toMerge[key];
|
|
@@ -12661,7 +12720,7 @@ function isMemoSame(cached, memo) {
|
|
|
12661
12720
|
return true;
|
|
12662
12721
|
}
|
|
12663
12722
|
|
|
12664
|
-
const version = "3.5.
|
|
12723
|
+
const version = "3.5.31";
|
|
12665
12724
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
12666
12725
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12667
12726
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -13546,7 +13605,9 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
13546
13605
|
}
|
|
13547
13606
|
} else if (
|
|
13548
13607
|
// #11081 force set props for possible async custom element
|
|
13549
|
-
el._isVueCE &&
|
|
13608
|
+
el._isVueCE && // #12408 check if it's declared prop or it's async custom element
|
|
13609
|
+
(shouldSetAsPropForVueCE(el, key) || // @ts-expect-error _def is private
|
|
13610
|
+
el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue)))
|
|
13550
13611
|
) {
|
|
13551
13612
|
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
13552
13613
|
} else {
|
|
@@ -13594,6 +13655,17 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
13594
13655
|
}
|
|
13595
13656
|
return key in el;
|
|
13596
13657
|
}
|
|
13658
|
+
function shouldSetAsPropForVueCE(el, key) {
|
|
13659
|
+
const props = (
|
|
13660
|
+
// @ts-expect-error _def is private
|
|
13661
|
+
el._def.props
|
|
13662
|
+
);
|
|
13663
|
+
if (!props) {
|
|
13664
|
+
return false;
|
|
13665
|
+
}
|
|
13666
|
+
const camelKey = camelize(key);
|
|
13667
|
+
return Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey);
|
|
13668
|
+
}
|
|
13597
13669
|
|
|
13598
13670
|
const REMOVAL = {};
|
|
13599
13671
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -13638,6 +13710,7 @@ class VueElement extends BaseClass {
|
|
|
13638
13710
|
this._dirty = false;
|
|
13639
13711
|
this._numberProps = null;
|
|
13640
13712
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
13713
|
+
this._styleAnchors = /* @__PURE__ */ new WeakMap();
|
|
13641
13714
|
this._ob = null;
|
|
13642
13715
|
if (this.shadowRoot && _createApp !== createApp) {
|
|
13643
13716
|
this._root = this.shadowRoot;
|
|
@@ -13666,7 +13739,8 @@ class VueElement extends BaseClass {
|
|
|
13666
13739
|
}
|
|
13667
13740
|
this._connected = true;
|
|
13668
13741
|
let parent = this;
|
|
13669
|
-
while (parent = parent &&
|
|
13742
|
+
while (parent = parent && // #12479 should check assignedSlot first to get correct parent
|
|
13743
|
+
(parent.assignedSlot || parent.parentNode || parent.host)) {
|
|
13670
13744
|
if (parent instanceof VueElement) {
|
|
13671
13745
|
this._parent = parent;
|
|
13672
13746
|
break;
|
|
@@ -13888,6 +13962,7 @@ class VueElement extends BaseClass {
|
|
|
13888
13962
|
this._styles.forEach((s) => this._root.removeChild(s));
|
|
13889
13963
|
this._styles.length = 0;
|
|
13890
13964
|
}
|
|
13965
|
+
this._styleAnchors.delete(this._def);
|
|
13891
13966
|
this._applyStyles(newStyles);
|
|
13892
13967
|
this._instance = null;
|
|
13893
13968
|
this._update();
|
|
@@ -13912,7 +13987,7 @@ class VueElement extends BaseClass {
|
|
|
13912
13987
|
}
|
|
13913
13988
|
return vnode;
|
|
13914
13989
|
}
|
|
13915
|
-
_applyStyles(styles, owner) {
|
|
13990
|
+
_applyStyles(styles, owner, parentComp) {
|
|
13916
13991
|
if (!styles) return;
|
|
13917
13992
|
if (owner) {
|
|
13918
13993
|
if (owner === this._def || this._styleChildren.has(owner)) {
|
|
@@ -13921,11 +13996,19 @@ class VueElement extends BaseClass {
|
|
|
13921
13996
|
this._styleChildren.add(owner);
|
|
13922
13997
|
}
|
|
13923
13998
|
const nonce = this._nonce;
|
|
13999
|
+
const root = this.shadowRoot;
|
|
14000
|
+
const insertionAnchor = parentComp ? this._getStyleAnchor(parentComp) || this._getStyleAnchor(this._def) : this._getRootStyleInsertionAnchor(root);
|
|
14001
|
+
let last = null;
|
|
13924
14002
|
for (let i = styles.length - 1; i >= 0; i--) {
|
|
13925
14003
|
const s = document.createElement("style");
|
|
13926
14004
|
if (nonce) s.setAttribute("nonce", nonce);
|
|
13927
14005
|
s.textContent = styles[i];
|
|
13928
|
-
|
|
14006
|
+
root.insertBefore(s, last || insertionAnchor);
|
|
14007
|
+
last = s;
|
|
14008
|
+
if (i === 0) {
|
|
14009
|
+
if (!parentComp) this._styleAnchors.set(this._def, s);
|
|
14010
|
+
if (owner) this._styleAnchors.set(owner, s);
|
|
14011
|
+
}
|
|
13929
14012
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
13930
14013
|
if (owner) {
|
|
13931
14014
|
if (owner.__hmrId) {
|
|
@@ -13942,6 +14025,28 @@ class VueElement extends BaseClass {
|
|
|
13942
14025
|
}
|
|
13943
14026
|
}
|
|
13944
14027
|
}
|
|
14028
|
+
_getStyleAnchor(comp) {
|
|
14029
|
+
if (!comp) {
|
|
14030
|
+
return null;
|
|
14031
|
+
}
|
|
14032
|
+
const anchor = this._styleAnchors.get(comp);
|
|
14033
|
+
if (anchor && anchor.parentNode === this.shadowRoot) {
|
|
14034
|
+
return anchor;
|
|
14035
|
+
}
|
|
14036
|
+
if (anchor) {
|
|
14037
|
+
this._styleAnchors.delete(comp);
|
|
14038
|
+
}
|
|
14039
|
+
return null;
|
|
14040
|
+
}
|
|
14041
|
+
_getRootStyleInsertionAnchor(root) {
|
|
14042
|
+
for (let i = 0; i < root.childNodes.length; i++) {
|
|
14043
|
+
const node = root.childNodes[i];
|
|
14044
|
+
if (!(node instanceof HTMLStyleElement)) {
|
|
14045
|
+
return node;
|
|
14046
|
+
}
|
|
14047
|
+
}
|
|
14048
|
+
return null;
|
|
14049
|
+
}
|
|
13945
14050
|
/**
|
|
13946
14051
|
* Only called when shadowRoot is false
|
|
13947
14052
|
*/
|
|
@@ -14004,8 +14109,8 @@ class VueElement extends BaseClass {
|
|
|
14004
14109
|
/**
|
|
14005
14110
|
* @internal
|
|
14006
14111
|
*/
|
|
14007
|
-
_injectChildStyle(comp) {
|
|
14008
|
-
this._applyStyles(comp.styles, comp);
|
|
14112
|
+
_injectChildStyle(comp, parentComp) {
|
|
14113
|
+
this._applyStyles(comp.styles, comp, parentComp);
|
|
14009
14114
|
}
|
|
14010
14115
|
/**
|
|
14011
14116
|
* @internal
|
|
@@ -14035,6 +14140,7 @@ class VueElement extends BaseClass {
|
|
|
14035
14140
|
_removeChildStyle(comp) {
|
|
14036
14141
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
14037
14142
|
this._styleChildren.delete(comp);
|
|
14143
|
+
this._styleAnchors.delete(comp);
|
|
14038
14144
|
if (this._childStyles && comp.__hmrId) {
|
|
14039
14145
|
const oldStyles = this._childStyles.get(comp.__hmrId);
|
|
14040
14146
|
if (oldStyles) {
|
|
@@ -14302,7 +14408,8 @@ const vModelText = {
|
|
|
14302
14408
|
if (elValue === newValue) {
|
|
14303
14409
|
return;
|
|
14304
14410
|
}
|
|
14305
|
-
|
|
14411
|
+
const rootNode = el.getRootNode();
|
|
14412
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
14306
14413
|
if (lazy && value === oldValue) {
|
|
14307
14414
|
return;
|
|
14308
14415
|
}
|
|
@@ -18737,7 +18844,7 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
18737
18844
|
loop.body = createBlockStatement([
|
|
18738
18845
|
createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
|
|
18739
18846
|
createCompoundExpression([
|
|
18740
|
-
`if (_cached`,
|
|
18847
|
+
`if (_cached && _cached.el`,
|
|
18741
18848
|
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
18742
18849
|
` && ${context.helperString(
|
|
18743
18850
|
IS_MEMO_SAME
|