@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
|
@@ -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
|
**/
|
|
@@ -1209,10 +1209,17 @@ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
function reduce(self, method, fn, args) {
|
|
1211
1211
|
const arr = shallowReadArray(self);
|
|
1212
|
+
const needsWrap = arr !== self && !isShallow(self);
|
|
1212
1213
|
let wrappedFn = fn;
|
|
1214
|
+
let wrapInitialAccumulator = false;
|
|
1213
1215
|
if (arr !== self) {
|
|
1214
|
-
if (
|
|
1216
|
+
if (needsWrap) {
|
|
1217
|
+
wrapInitialAccumulator = args.length === 0;
|
|
1215
1218
|
wrappedFn = function(acc, item, index) {
|
|
1219
|
+
if (wrapInitialAccumulator) {
|
|
1220
|
+
wrapInitialAccumulator = false;
|
|
1221
|
+
acc = toWrapped(self, acc);
|
|
1222
|
+
}
|
|
1216
1223
|
return fn.call(this, acc, toWrapped(self, item), index, self);
|
|
1217
1224
|
};
|
|
1218
1225
|
} else if (fn.length > 3) {
|
|
@@ -1221,7 +1228,8 @@ function reduce(self, method, fn, args) {
|
|
|
1221
1228
|
};
|
|
1222
1229
|
}
|
|
1223
1230
|
}
|
|
1224
|
-
|
|
1231
|
+
const result = arr[method](wrappedFn, ...args);
|
|
1232
|
+
return wrapInitialAccumulator ? toWrapped(self, result) : result;
|
|
1225
1233
|
}
|
|
1226
1234
|
function searchProxy(self, method, args) {
|
|
1227
1235
|
const arr = toRaw(self);
|
|
@@ -1511,15 +1519,14 @@ function createInstrumentations(readonly, shallow) {
|
|
|
1511
1519
|
clear: createReadonlyMethod("clear")
|
|
1512
1520
|
} : {
|
|
1513
1521
|
add(value) {
|
|
1514
|
-
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1515
|
-
value = toRaw(value);
|
|
1516
|
-
}
|
|
1517
1522
|
const target = toRaw(this);
|
|
1518
1523
|
const proto = getProto(target);
|
|
1519
|
-
const
|
|
1524
|
+
const rawValue = toRaw(value);
|
|
1525
|
+
const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;
|
|
1526
|
+
const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
|
|
1520
1527
|
if (!hadKey) {
|
|
1521
|
-
target.add(
|
|
1522
|
-
trigger(target, "add",
|
|
1528
|
+
target.add(valueToAdd);
|
|
1529
|
+
trigger(target, "add", valueToAdd, valueToAdd);
|
|
1523
1530
|
}
|
|
1524
1531
|
return this;
|
|
1525
1532
|
},
|
|
@@ -1882,16 +1889,16 @@ function toRefs(object) {
|
|
|
1882
1889
|
return ret;
|
|
1883
1890
|
}
|
|
1884
1891
|
class ObjectRefImpl {
|
|
1885
|
-
constructor(_object,
|
|
1892
|
+
constructor(_object, key, _defaultValue) {
|
|
1886
1893
|
this._object = _object;
|
|
1887
|
-
this._key = _key;
|
|
1888
1894
|
this._defaultValue = _defaultValue;
|
|
1889
1895
|
this["__v_isRef"] = true;
|
|
1890
1896
|
this._value = void 0;
|
|
1897
|
+
this._key = isSymbol(key) ? key : String(key);
|
|
1891
1898
|
this._raw = toRaw(_object);
|
|
1892
1899
|
let shallow = true;
|
|
1893
1900
|
let obj = _object;
|
|
1894
|
-
if (!isArray(_object) || !isIntegerKey(
|
|
1901
|
+
if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {
|
|
1895
1902
|
do {
|
|
1896
1903
|
shallow = !isProxy(obj) || isShallow(obj);
|
|
1897
1904
|
} while (shallow && (obj = obj["__v_raw"]));
|
|
@@ -2696,6 +2703,13 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2696
2703
|
}
|
|
2697
2704
|
|
|
2698
2705
|
let isHmrUpdating = false;
|
|
2706
|
+
const setHmrUpdating = (v) => {
|
|
2707
|
+
try {
|
|
2708
|
+
return isHmrUpdating;
|
|
2709
|
+
} finally {
|
|
2710
|
+
isHmrUpdating = v;
|
|
2711
|
+
}
|
|
2712
|
+
};
|
|
2699
2713
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2700
2714
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2701
2715
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -3754,9 +3768,10 @@ const TeleportImpl = {
|
|
|
3754
3768
|
mount(container, mainAnchor);
|
|
3755
3769
|
updateCssVars(n2, true);
|
|
3756
3770
|
}
|
|
3757
|
-
if (isTeleportDeferred(n2.props)) {
|
|
3771
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3758
3772
|
n2.el.__isMounted = false;
|
|
3759
3773
|
queuePostRenderEffect(() => {
|
|
3774
|
+
if (n2.el.__isMounted !== false) return;
|
|
3760
3775
|
mountToTarget();
|
|
3761
3776
|
delete n2.el.__isMounted;
|
|
3762
3777
|
}, parentSuspense);
|
|
@@ -3764,7 +3779,12 @@ const TeleportImpl = {
|
|
|
3764
3779
|
mountToTarget();
|
|
3765
3780
|
}
|
|
3766
3781
|
} else {
|
|
3767
|
-
|
|
3782
|
+
n2.el = n1.el;
|
|
3783
|
+
n2.targetStart = n1.targetStart;
|
|
3784
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
3785
|
+
const target = n2.target = n1.target;
|
|
3786
|
+
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3787
|
+
if (n1.el.__isMounted === false) {
|
|
3768
3788
|
queuePostRenderEffect(() => {
|
|
3769
3789
|
TeleportImpl.process(
|
|
3770
3790
|
n1,
|
|
@@ -3781,11 +3801,6 @@ const TeleportImpl = {
|
|
|
3781
3801
|
}, parentSuspense);
|
|
3782
3802
|
return;
|
|
3783
3803
|
}
|
|
3784
|
-
n2.el = n1.el;
|
|
3785
|
-
n2.targetStart = n1.targetStart;
|
|
3786
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
3787
|
-
const target = n2.target = n1.target;
|
|
3788
|
-
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3789
3804
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3790
3805
|
const currentContainer = wasDisabled ? container : target;
|
|
3791
3806
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -4252,7 +4267,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4252
4267
|
callHook(hook, [el]);
|
|
4253
4268
|
},
|
|
4254
4269
|
enter(el) {
|
|
4255
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
4270
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
4256
4271
|
let hook = onEnter;
|
|
4257
4272
|
let afterHook = onAfterEnter;
|
|
4258
4273
|
let cancelHook = onEnterCancelled;
|
|
@@ -6191,12 +6206,16 @@ function renderList(source, renderItem, cache, index) {
|
|
|
6191
6206
|
);
|
|
6192
6207
|
}
|
|
6193
6208
|
} else if (typeof source === "number") {
|
|
6194
|
-
if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) {
|
|
6195
|
-
warn$1(
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6209
|
+
if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
|
|
6210
|
+
warn$1(
|
|
6211
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
6212
|
+
);
|
|
6213
|
+
ret = [];
|
|
6214
|
+
} else {
|
|
6215
|
+
ret = new Array(source);
|
|
6216
|
+
for (let i = 0; i < source; i++) {
|
|
6217
|
+
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
6218
|
+
}
|
|
6200
6219
|
}
|
|
6201
6220
|
} else if (isObject(source)) {
|
|
6202
6221
|
if (source[Symbol.iterator]) {
|
|
@@ -6899,6 +6918,7 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
6899
6918
|
}
|
|
6900
6919
|
function withAsyncContext(getAwaitable) {
|
|
6901
6920
|
const ctx = getCurrentInstance();
|
|
6921
|
+
const inSSRSetup = isInSSRComponentSetup;
|
|
6902
6922
|
if (!!(process.env.NODE_ENV !== "production") && !ctx) {
|
|
6903
6923
|
warn$1(
|
|
6904
6924
|
`withAsyncContext called without active current instance. This is likely a bug.`
|
|
@@ -6906,13 +6926,25 @@ function withAsyncContext(getAwaitable) {
|
|
|
6906
6926
|
}
|
|
6907
6927
|
let awaitable = getAwaitable();
|
|
6908
6928
|
unsetCurrentInstance();
|
|
6929
|
+
if (inSSRSetup) {
|
|
6930
|
+
setInSSRSetupState(false);
|
|
6931
|
+
}
|
|
6932
|
+
const restore = () => {
|
|
6933
|
+
setCurrentInstance(ctx);
|
|
6934
|
+
if (inSSRSetup) {
|
|
6935
|
+
setInSSRSetupState(true);
|
|
6936
|
+
}
|
|
6937
|
+
};
|
|
6909
6938
|
const cleanup = () => {
|
|
6910
6939
|
if (getCurrentInstance() !== ctx) ctx.scope.off();
|
|
6911
6940
|
unsetCurrentInstance();
|
|
6941
|
+
if (inSSRSetup) {
|
|
6942
|
+
setInSSRSetupState(false);
|
|
6943
|
+
}
|
|
6912
6944
|
};
|
|
6913
6945
|
if (isPromise(awaitable)) {
|
|
6914
6946
|
awaitable = awaitable.catch((e) => {
|
|
6915
|
-
|
|
6947
|
+
restore();
|
|
6916
6948
|
Promise.resolve().then(() => Promise.resolve().then(cleanup));
|
|
6917
6949
|
throw e;
|
|
6918
6950
|
});
|
|
@@ -6920,7 +6952,7 @@ function withAsyncContext(getAwaitable) {
|
|
|
6920
6952
|
return [
|
|
6921
6953
|
awaitable,
|
|
6922
6954
|
() => {
|
|
6923
|
-
|
|
6955
|
+
restore();
|
|
6924
6956
|
Promise.resolve().then(cleanup);
|
|
6925
6957
|
}
|
|
6926
6958
|
];
|
|
@@ -7446,7 +7478,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7446
7478
|
return vm;
|
|
7447
7479
|
}
|
|
7448
7480
|
}
|
|
7449
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7481
|
+
Vue.version = `2.6.14-compat:${"3.5.31"}`;
|
|
7450
7482
|
Vue.config = singletonApp.config;
|
|
7451
7483
|
Vue.use = (plugin, ...options) => {
|
|
7452
7484
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8607,11 +8639,12 @@ function hasPropValueChanged(nextProps, prevProps, key) {
|
|
|
8607
8639
|
}
|
|
8608
8640
|
return nextProp !== prevProp;
|
|
8609
8641
|
}
|
|
8610
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
8642
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
8611
8643
|
while (parent) {
|
|
8612
8644
|
const root = parent.subTree;
|
|
8613
8645
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
8614
|
-
root.el =
|
|
8646
|
+
root.suspense.vnode.el = root.el = el;
|
|
8647
|
+
vnode = root;
|
|
8615
8648
|
}
|
|
8616
8649
|
if (root === vnode) {
|
|
8617
8650
|
(vnode = parent.vnode).el = el;
|
|
@@ -8620,6 +8653,9 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
8620
8653
|
break;
|
|
8621
8654
|
}
|
|
8622
8655
|
}
|
|
8656
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
8657
|
+
suspense.vnode.el = el;
|
|
8658
|
+
}
|
|
8623
8659
|
}
|
|
8624
8660
|
|
|
8625
8661
|
function createPropsDefaultThis(instance, rawProps, propKey) {
|
|
@@ -9560,10 +9596,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9560
9596
|
}
|
|
9561
9597
|
hostInsert(el, container, anchor);
|
|
9562
9598
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
9599
|
+
const isHmr = !!(process.env.NODE_ENV !== "production") && isHmrUpdating;
|
|
9563
9600
|
queuePostRenderEffect(() => {
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9601
|
+
let prev;
|
|
9602
|
+
if (!!(process.env.NODE_ENV !== "production")) prev = setHmrUpdating(isHmr);
|
|
9603
|
+
try {
|
|
9604
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
9605
|
+
needCallTransitionHooks && transition.enter(el);
|
|
9606
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
9607
|
+
} finally {
|
|
9608
|
+
if (!!(process.env.NODE_ENV !== "production")) setHmrUpdating(prev);
|
|
9609
|
+
}
|
|
9567
9610
|
}, parentSuspense);
|
|
9568
9611
|
}
|
|
9569
9612
|
};
|
|
@@ -9983,7 +10026,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9983
10026
|
}
|
|
9984
10027
|
} else {
|
|
9985
10028
|
if (root.ce && root.ce._hasShadowRoot()) {
|
|
9986
|
-
root.ce._injectChildStyle(
|
|
10029
|
+
root.ce._injectChildStyle(
|
|
10030
|
+
type,
|
|
10031
|
+
instance.parent ? instance.parent.type : void 0
|
|
10032
|
+
);
|
|
9987
10033
|
}
|
|
9988
10034
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
9989
10035
|
startMeasure(instance, `render`);
|
|
@@ -10517,7 +10563,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10517
10563
|
shapeFlag,
|
|
10518
10564
|
patchFlag,
|
|
10519
10565
|
dirs,
|
|
10520
|
-
cacheIndex
|
|
10566
|
+
cacheIndex,
|
|
10567
|
+
memo
|
|
10521
10568
|
} = vnode;
|
|
10522
10569
|
if (patchFlag === -2) {
|
|
10523
10570
|
optimized = false;
|
|
@@ -10579,10 +10626,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10579
10626
|
remove(vnode);
|
|
10580
10627
|
}
|
|
10581
10628
|
}
|
|
10582
|
-
|
|
10629
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
10630
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
10583
10631
|
queuePostRenderEffect(() => {
|
|
10584
10632
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
10585
10633
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
10634
|
+
if (shouldInvalidateMemo) {
|
|
10635
|
+
vnode.el = null;
|
|
10636
|
+
}
|
|
10586
10637
|
}, parentSuspense);
|
|
10587
10638
|
}
|
|
10588
10639
|
};
|
|
@@ -11145,6 +11196,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11145
11196
|
pendingId: suspenseId++,
|
|
11146
11197
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
11147
11198
|
activeBranch: null,
|
|
11199
|
+
isFallbackMountPending: false,
|
|
11148
11200
|
pendingBranch: null,
|
|
11149
11201
|
isInFallback: !isHydrating,
|
|
11150
11202
|
isHydrating,
|
|
@@ -11194,7 +11246,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11194
11246
|
}
|
|
11195
11247
|
};
|
|
11196
11248
|
}
|
|
11197
|
-
if (activeBranch) {
|
|
11249
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
11198
11250
|
if (parentNode(activeBranch.el) === container2) {
|
|
11199
11251
|
anchor = next(activeBranch);
|
|
11200
11252
|
}
|
|
@@ -11207,6 +11259,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11207
11259
|
move(pendingBranch, container2, anchor, 0);
|
|
11208
11260
|
}
|
|
11209
11261
|
}
|
|
11262
|
+
suspense.isFallbackMountPending = false;
|
|
11210
11263
|
setActiveBranch(suspense, pendingBranch);
|
|
11211
11264
|
suspense.pendingBranch = null;
|
|
11212
11265
|
suspense.isInFallback = false;
|
|
@@ -11242,6 +11295,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11242
11295
|
triggerEvent(vnode2, "onFallback");
|
|
11243
11296
|
const anchor2 = next(activeBranch);
|
|
11244
11297
|
const mountFallback = () => {
|
|
11298
|
+
suspense.isFallbackMountPending = false;
|
|
11245
11299
|
if (!suspense.isInFallback) {
|
|
11246
11300
|
return;
|
|
11247
11301
|
}
|
|
@@ -11261,6 +11315,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11261
11315
|
};
|
|
11262
11316
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
11263
11317
|
if (delayEnter) {
|
|
11318
|
+
suspense.isFallbackMountPending = true;
|
|
11264
11319
|
activeBranch.transition.afterLeave = mountFallback;
|
|
11265
11320
|
}
|
|
11266
11321
|
suspense.isInFallback = true;
|
|
@@ -11878,6 +11933,10 @@ function mergeProps(...args) {
|
|
|
11878
11933
|
const incoming = toMerge[key];
|
|
11879
11934
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
11880
11935
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
11936
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
11937
|
+
// the model listener.
|
|
11938
|
+
!isModelListener(key)) {
|
|
11939
|
+
ret[key] = incoming;
|
|
11881
11940
|
}
|
|
11882
11941
|
} else if (key !== "") {
|
|
11883
11942
|
ret[key] = toMerge[key];
|
|
@@ -12588,7 +12647,7 @@ function isMemoSame(cached, memo) {
|
|
|
12588
12647
|
return true;
|
|
12589
12648
|
}
|
|
12590
12649
|
|
|
12591
|
-
const version = "3.5.
|
|
12650
|
+
const version = "3.5.31";
|
|
12592
12651
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
12593
12652
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12594
12653
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -13473,7 +13532,9 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
13473
13532
|
}
|
|
13474
13533
|
} else if (
|
|
13475
13534
|
// #11081 force set props for possible async custom element
|
|
13476
|
-
el._isVueCE &&
|
|
13535
|
+
el._isVueCE && // #12408 check if it's declared prop or it's async custom element
|
|
13536
|
+
(shouldSetAsPropForVueCE(el, key) || // @ts-expect-error _def is private
|
|
13537
|
+
el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue)))
|
|
13477
13538
|
) {
|
|
13478
13539
|
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
13479
13540
|
} else {
|
|
@@ -13521,6 +13582,17 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
13521
13582
|
}
|
|
13522
13583
|
return key in el;
|
|
13523
13584
|
}
|
|
13585
|
+
function shouldSetAsPropForVueCE(el, key) {
|
|
13586
|
+
const props = (
|
|
13587
|
+
// @ts-expect-error _def is private
|
|
13588
|
+
el._def.props
|
|
13589
|
+
);
|
|
13590
|
+
if (!props) {
|
|
13591
|
+
return false;
|
|
13592
|
+
}
|
|
13593
|
+
const camelKey = camelize(key);
|
|
13594
|
+
return Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey);
|
|
13595
|
+
}
|
|
13524
13596
|
|
|
13525
13597
|
const REMOVAL = {};
|
|
13526
13598
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -13565,6 +13637,7 @@ class VueElement extends BaseClass {
|
|
|
13565
13637
|
this._dirty = false;
|
|
13566
13638
|
this._numberProps = null;
|
|
13567
13639
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
13640
|
+
this._styleAnchors = /* @__PURE__ */ new WeakMap();
|
|
13568
13641
|
this._ob = null;
|
|
13569
13642
|
if (this.shadowRoot && _createApp !== createApp) {
|
|
13570
13643
|
this._root = this.shadowRoot;
|
|
@@ -13593,7 +13666,8 @@ class VueElement extends BaseClass {
|
|
|
13593
13666
|
}
|
|
13594
13667
|
this._connected = true;
|
|
13595
13668
|
let parent = this;
|
|
13596
|
-
while (parent = parent &&
|
|
13669
|
+
while (parent = parent && // #12479 should check assignedSlot first to get correct parent
|
|
13670
|
+
(parent.assignedSlot || parent.parentNode || parent.host)) {
|
|
13597
13671
|
if (parent instanceof VueElement) {
|
|
13598
13672
|
this._parent = parent;
|
|
13599
13673
|
break;
|
|
@@ -13815,6 +13889,7 @@ class VueElement extends BaseClass {
|
|
|
13815
13889
|
this._styles.forEach((s) => this._root.removeChild(s));
|
|
13816
13890
|
this._styles.length = 0;
|
|
13817
13891
|
}
|
|
13892
|
+
this._styleAnchors.delete(this._def);
|
|
13818
13893
|
this._applyStyles(newStyles);
|
|
13819
13894
|
this._instance = null;
|
|
13820
13895
|
this._update();
|
|
@@ -13839,7 +13914,7 @@ class VueElement extends BaseClass {
|
|
|
13839
13914
|
}
|
|
13840
13915
|
return vnode;
|
|
13841
13916
|
}
|
|
13842
|
-
_applyStyles(styles, owner) {
|
|
13917
|
+
_applyStyles(styles, owner, parentComp) {
|
|
13843
13918
|
if (!styles) return;
|
|
13844
13919
|
if (owner) {
|
|
13845
13920
|
if (owner === this._def || this._styleChildren.has(owner)) {
|
|
@@ -13848,11 +13923,19 @@ class VueElement extends BaseClass {
|
|
|
13848
13923
|
this._styleChildren.add(owner);
|
|
13849
13924
|
}
|
|
13850
13925
|
const nonce = this._nonce;
|
|
13926
|
+
const root = this.shadowRoot;
|
|
13927
|
+
const insertionAnchor = parentComp ? this._getStyleAnchor(parentComp) || this._getStyleAnchor(this._def) : this._getRootStyleInsertionAnchor(root);
|
|
13928
|
+
let last = null;
|
|
13851
13929
|
for (let i = styles.length - 1; i >= 0; i--) {
|
|
13852
13930
|
const s = document.createElement("style");
|
|
13853
13931
|
if (nonce) s.setAttribute("nonce", nonce);
|
|
13854
13932
|
s.textContent = styles[i];
|
|
13855
|
-
|
|
13933
|
+
root.insertBefore(s, last || insertionAnchor);
|
|
13934
|
+
last = s;
|
|
13935
|
+
if (i === 0) {
|
|
13936
|
+
if (!parentComp) this._styleAnchors.set(this._def, s);
|
|
13937
|
+
if (owner) this._styleAnchors.set(owner, s);
|
|
13938
|
+
}
|
|
13856
13939
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
13857
13940
|
if (owner) {
|
|
13858
13941
|
if (owner.__hmrId) {
|
|
@@ -13869,6 +13952,28 @@ class VueElement extends BaseClass {
|
|
|
13869
13952
|
}
|
|
13870
13953
|
}
|
|
13871
13954
|
}
|
|
13955
|
+
_getStyleAnchor(comp) {
|
|
13956
|
+
if (!comp) {
|
|
13957
|
+
return null;
|
|
13958
|
+
}
|
|
13959
|
+
const anchor = this._styleAnchors.get(comp);
|
|
13960
|
+
if (anchor && anchor.parentNode === this.shadowRoot) {
|
|
13961
|
+
return anchor;
|
|
13962
|
+
}
|
|
13963
|
+
if (anchor) {
|
|
13964
|
+
this._styleAnchors.delete(comp);
|
|
13965
|
+
}
|
|
13966
|
+
return null;
|
|
13967
|
+
}
|
|
13968
|
+
_getRootStyleInsertionAnchor(root) {
|
|
13969
|
+
for (let i = 0; i < root.childNodes.length; i++) {
|
|
13970
|
+
const node = root.childNodes[i];
|
|
13971
|
+
if (!(node instanceof HTMLStyleElement)) {
|
|
13972
|
+
return node;
|
|
13973
|
+
}
|
|
13974
|
+
}
|
|
13975
|
+
return null;
|
|
13976
|
+
}
|
|
13872
13977
|
/**
|
|
13873
13978
|
* Only called when shadowRoot is false
|
|
13874
13979
|
*/
|
|
@@ -13931,8 +14036,8 @@ class VueElement extends BaseClass {
|
|
|
13931
14036
|
/**
|
|
13932
14037
|
* @internal
|
|
13933
14038
|
*/
|
|
13934
|
-
_injectChildStyle(comp) {
|
|
13935
|
-
this._applyStyles(comp.styles, comp);
|
|
14039
|
+
_injectChildStyle(comp, parentComp) {
|
|
14040
|
+
this._applyStyles(comp.styles, comp, parentComp);
|
|
13936
14041
|
}
|
|
13937
14042
|
/**
|
|
13938
14043
|
* @internal
|
|
@@ -13962,6 +14067,7 @@ class VueElement extends BaseClass {
|
|
|
13962
14067
|
_removeChildStyle(comp) {
|
|
13963
14068
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
13964
14069
|
this._styleChildren.delete(comp);
|
|
14070
|
+
this._styleAnchors.delete(comp);
|
|
13965
14071
|
if (this._childStyles && comp.__hmrId) {
|
|
13966
14072
|
const oldStyles = this._childStyles.get(comp.__hmrId);
|
|
13967
14073
|
if (oldStyles) {
|
|
@@ -14229,7 +14335,8 @@ const vModelText = {
|
|
|
14229
14335
|
if (elValue === newValue) {
|
|
14230
14336
|
return;
|
|
14231
14337
|
}
|
|
14232
|
-
|
|
14338
|
+
const rootNode = el.getRootNode();
|
|
14339
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
14233
14340
|
if (lazy && value === oldValue) {
|
|
14234
14341
|
return;
|
|
14235
14342
|
}
|