@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.global.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
|
**/
|
|
@@ -1281,10 +1281,17 @@ var Vue = (function () {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
function reduce(self, method, fn, args) {
|
|
1283
1283
|
const arr = shallowReadArray(self);
|
|
1284
|
+
const needsWrap = arr !== self && !isShallow(self);
|
|
1284
1285
|
let wrappedFn = fn;
|
|
1286
|
+
let wrapInitialAccumulator = false;
|
|
1285
1287
|
if (arr !== self) {
|
|
1286
|
-
if (
|
|
1288
|
+
if (needsWrap) {
|
|
1289
|
+
wrapInitialAccumulator = args.length === 0;
|
|
1287
1290
|
wrappedFn = function(acc, item, index) {
|
|
1291
|
+
if (wrapInitialAccumulator) {
|
|
1292
|
+
wrapInitialAccumulator = false;
|
|
1293
|
+
acc = toWrapped(self, acc);
|
|
1294
|
+
}
|
|
1288
1295
|
return fn.call(this, acc, toWrapped(self, item), index, self);
|
|
1289
1296
|
};
|
|
1290
1297
|
} else if (fn.length > 3) {
|
|
@@ -1293,7 +1300,8 @@ var Vue = (function () {
|
|
|
1293
1300
|
};
|
|
1294
1301
|
}
|
|
1295
1302
|
}
|
|
1296
|
-
|
|
1303
|
+
const result = arr[method](wrappedFn, ...args);
|
|
1304
|
+
return wrapInitialAccumulator ? toWrapped(self, result) : result;
|
|
1297
1305
|
}
|
|
1298
1306
|
function searchProxy(self, method, args) {
|
|
1299
1307
|
const arr = toRaw(self);
|
|
@@ -1583,15 +1591,14 @@ var Vue = (function () {
|
|
|
1583
1591
|
clear: createReadonlyMethod("clear")
|
|
1584
1592
|
} : {
|
|
1585
1593
|
add(value) {
|
|
1586
|
-
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1587
|
-
value = toRaw(value);
|
|
1588
|
-
}
|
|
1589
1594
|
const target = toRaw(this);
|
|
1590
1595
|
const proto = getProto(target);
|
|
1591
|
-
const
|
|
1596
|
+
const rawValue = toRaw(value);
|
|
1597
|
+
const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;
|
|
1598
|
+
const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
|
|
1592
1599
|
if (!hadKey) {
|
|
1593
|
-
target.add(
|
|
1594
|
-
trigger(target, "add",
|
|
1600
|
+
target.add(valueToAdd);
|
|
1601
|
+
trigger(target, "add", valueToAdd, valueToAdd);
|
|
1595
1602
|
}
|
|
1596
1603
|
return this;
|
|
1597
1604
|
},
|
|
@@ -1948,16 +1955,16 @@ var Vue = (function () {
|
|
|
1948
1955
|
return ret;
|
|
1949
1956
|
}
|
|
1950
1957
|
class ObjectRefImpl {
|
|
1951
|
-
constructor(_object,
|
|
1958
|
+
constructor(_object, key, _defaultValue) {
|
|
1952
1959
|
this._object = _object;
|
|
1953
|
-
this._key = _key;
|
|
1954
1960
|
this._defaultValue = _defaultValue;
|
|
1955
1961
|
this["__v_isRef"] = true;
|
|
1956
1962
|
this._value = void 0;
|
|
1963
|
+
this._key = isSymbol(key) ? key : String(key);
|
|
1957
1964
|
this._raw = toRaw(_object);
|
|
1958
1965
|
let shallow = true;
|
|
1959
1966
|
let obj = _object;
|
|
1960
|
-
if (!isArray(_object) || !isIntegerKey(
|
|
1967
|
+
if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {
|
|
1961
1968
|
do {
|
|
1962
1969
|
shallow = !isProxy(obj) || isShallow(obj);
|
|
1963
1970
|
} while (shallow && (obj = obj["__v_raw"]));
|
|
@@ -2757,6 +2764,13 @@ var Vue = (function () {
|
|
|
2757
2764
|
}
|
|
2758
2765
|
|
|
2759
2766
|
let isHmrUpdating = false;
|
|
2767
|
+
const setHmrUpdating = (v) => {
|
|
2768
|
+
try {
|
|
2769
|
+
return isHmrUpdating;
|
|
2770
|
+
} finally {
|
|
2771
|
+
isHmrUpdating = v;
|
|
2772
|
+
}
|
|
2773
|
+
};
|
|
2760
2774
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2761
2775
|
{
|
|
2762
2776
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
@@ -3784,9 +3798,10 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3784
3798
|
mount(container, mainAnchor);
|
|
3785
3799
|
updateCssVars(n2, true);
|
|
3786
3800
|
}
|
|
3787
|
-
if (isTeleportDeferred(n2.props)) {
|
|
3801
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3788
3802
|
n2.el.__isMounted = false;
|
|
3789
3803
|
queuePostRenderEffect(() => {
|
|
3804
|
+
if (n2.el.__isMounted !== false) return;
|
|
3790
3805
|
mountToTarget();
|
|
3791
3806
|
delete n2.el.__isMounted;
|
|
3792
3807
|
}, parentSuspense);
|
|
@@ -3794,7 +3809,12 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3794
3809
|
mountToTarget();
|
|
3795
3810
|
}
|
|
3796
3811
|
} else {
|
|
3797
|
-
|
|
3812
|
+
n2.el = n1.el;
|
|
3813
|
+
n2.targetStart = n1.targetStart;
|
|
3814
|
+
const mainAnchor = n2.anchor = n1.anchor;
|
|
3815
|
+
const target = n2.target = n1.target;
|
|
3816
|
+
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3817
|
+
if (n1.el.__isMounted === false) {
|
|
3798
3818
|
queuePostRenderEffect(() => {
|
|
3799
3819
|
TeleportImpl.process(
|
|
3800
3820
|
n1,
|
|
@@ -3811,11 +3831,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3811
3831
|
}, parentSuspense);
|
|
3812
3832
|
return;
|
|
3813
3833
|
}
|
|
3814
|
-
n2.el = n1.el;
|
|
3815
|
-
n2.targetStart = n1.targetStart;
|
|
3816
|
-
const mainAnchor = n2.anchor = n1.anchor;
|
|
3817
|
-
const target = n2.target = n1.target;
|
|
3818
|
-
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3819
3834
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3820
3835
|
const currentContainer = wasDisabled ? container : target;
|
|
3821
3836
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -4281,7 +4296,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4281
4296
|
callHook(hook, [el]);
|
|
4282
4297
|
},
|
|
4283
4298
|
enter(el) {
|
|
4284
|
-
if (leavingVNodesCache[key] === vnode) return;
|
|
4299
|
+
if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
|
|
4285
4300
|
let hook = onEnter;
|
|
4286
4301
|
let afterHook = onAfterEnter;
|
|
4287
4302
|
let cancelHook = onEnterCancelled;
|
|
@@ -6203,12 +6218,16 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6203
6218
|
);
|
|
6204
6219
|
}
|
|
6205
6220
|
} else if (typeof source === "number") {
|
|
6206
|
-
if (!Number.isInteger(source)) {
|
|
6207
|
-
warn$1(
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6221
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
6222
|
+
warn$1(
|
|
6223
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
6224
|
+
);
|
|
6225
|
+
ret = [];
|
|
6226
|
+
} else {
|
|
6227
|
+
ret = new Array(source);
|
|
6228
|
+
for (let i = 0; i < source; i++) {
|
|
6229
|
+
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
6230
|
+
}
|
|
6212
6231
|
}
|
|
6213
6232
|
} else if (isObject(source)) {
|
|
6214
6233
|
if (source[Symbol.iterator]) {
|
|
@@ -6911,6 +6930,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6911
6930
|
}
|
|
6912
6931
|
function withAsyncContext(getAwaitable) {
|
|
6913
6932
|
const ctx = getCurrentInstance();
|
|
6933
|
+
const inSSRSetup = isInSSRComponentSetup;
|
|
6914
6934
|
if (!ctx) {
|
|
6915
6935
|
warn$1(
|
|
6916
6936
|
`withAsyncContext called without active current instance. This is likely a bug.`
|
|
@@ -6918,13 +6938,25 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6918
6938
|
}
|
|
6919
6939
|
let awaitable = getAwaitable();
|
|
6920
6940
|
unsetCurrentInstance();
|
|
6941
|
+
if (inSSRSetup) {
|
|
6942
|
+
setInSSRSetupState(false);
|
|
6943
|
+
}
|
|
6944
|
+
const restore = () => {
|
|
6945
|
+
setCurrentInstance(ctx);
|
|
6946
|
+
if (inSSRSetup) {
|
|
6947
|
+
setInSSRSetupState(true);
|
|
6948
|
+
}
|
|
6949
|
+
};
|
|
6921
6950
|
const cleanup = () => {
|
|
6922
6951
|
if (getCurrentInstance() !== ctx) ctx.scope.off();
|
|
6923
6952
|
unsetCurrentInstance();
|
|
6953
|
+
if (inSSRSetup) {
|
|
6954
|
+
setInSSRSetupState(false);
|
|
6955
|
+
}
|
|
6924
6956
|
};
|
|
6925
6957
|
if (isPromise(awaitable)) {
|
|
6926
6958
|
awaitable = awaitable.catch((e) => {
|
|
6927
|
-
|
|
6959
|
+
restore();
|
|
6928
6960
|
Promise.resolve().then(() => Promise.resolve().then(cleanup));
|
|
6929
6961
|
throw e;
|
|
6930
6962
|
});
|
|
@@ -6932,7 +6964,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6932
6964
|
return [
|
|
6933
6965
|
awaitable,
|
|
6934
6966
|
() => {
|
|
6935
|
-
|
|
6967
|
+
restore();
|
|
6936
6968
|
Promise.resolve().then(cleanup);
|
|
6937
6969
|
}
|
|
6938
6970
|
];
|
|
@@ -7453,7 +7485,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7453
7485
|
return vm;
|
|
7454
7486
|
}
|
|
7455
7487
|
}
|
|
7456
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7488
|
+
Vue.version = `2.6.14-compat:${"3.5.31"}`;
|
|
7457
7489
|
Vue.config = singletonApp.config;
|
|
7458
7490
|
Vue.use = (plugin, ...options) => {
|
|
7459
7491
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8612,11 +8644,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8612
8644
|
}
|
|
8613
8645
|
return nextProp !== prevProp;
|
|
8614
8646
|
}
|
|
8615
|
-
function updateHOCHostEl({ vnode, parent }, el) {
|
|
8647
|
+
function updateHOCHostEl({ vnode, parent, suspense }, el) {
|
|
8616
8648
|
while (parent) {
|
|
8617
8649
|
const root = parent.subTree;
|
|
8618
8650
|
if (root.suspense && root.suspense.activeBranch === vnode) {
|
|
8619
|
-
root.el =
|
|
8651
|
+
root.suspense.vnode.el = root.el = el;
|
|
8652
|
+
vnode = root;
|
|
8620
8653
|
}
|
|
8621
8654
|
if (root === vnode) {
|
|
8622
8655
|
(vnode = parent.vnode).el = el;
|
|
@@ -8625,6 +8658,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8625
8658
|
break;
|
|
8626
8659
|
}
|
|
8627
8660
|
}
|
|
8661
|
+
if (suspense && suspense.activeBranch === vnode) {
|
|
8662
|
+
suspense.vnode.el = el;
|
|
8663
|
+
}
|
|
8628
8664
|
}
|
|
8629
8665
|
|
|
8630
8666
|
function createPropsDefaultThis(instance, rawProps, propKey) {
|
|
@@ -9538,10 +9574,17 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9538
9574
|
}
|
|
9539
9575
|
hostInsert(el, container, anchor);
|
|
9540
9576
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
9577
|
+
const isHmr = isHmrUpdating;
|
|
9541
9578
|
queuePostRenderEffect(() => {
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9579
|
+
let prev;
|
|
9580
|
+
prev = setHmrUpdating(isHmr);
|
|
9581
|
+
try {
|
|
9582
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
9583
|
+
needCallTransitionHooks && transition.enter(el);
|
|
9584
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
|
|
9585
|
+
} finally {
|
|
9586
|
+
setHmrUpdating(prev);
|
|
9587
|
+
}
|
|
9545
9588
|
}, parentSuspense);
|
|
9546
9589
|
}
|
|
9547
9590
|
};
|
|
@@ -9950,7 +9993,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9950
9993
|
}
|
|
9951
9994
|
} else {
|
|
9952
9995
|
if (root.ce && root.ce._hasShadowRoot()) {
|
|
9953
|
-
root.ce._injectChildStyle(
|
|
9996
|
+
root.ce._injectChildStyle(
|
|
9997
|
+
type,
|
|
9998
|
+
instance.parent ? instance.parent.type : void 0
|
|
9999
|
+
);
|
|
9954
10000
|
}
|
|
9955
10001
|
{
|
|
9956
10002
|
startMeasure(instance, `render`);
|
|
@@ -10484,7 +10530,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10484
10530
|
shapeFlag,
|
|
10485
10531
|
patchFlag,
|
|
10486
10532
|
dirs,
|
|
10487
|
-
cacheIndex
|
|
10533
|
+
cacheIndex,
|
|
10534
|
+
memo
|
|
10488
10535
|
} = vnode;
|
|
10489
10536
|
if (patchFlag === -2) {
|
|
10490
10537
|
optimized = false;
|
|
@@ -10546,10 +10593,14 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10546
10593
|
remove(vnode);
|
|
10547
10594
|
}
|
|
10548
10595
|
}
|
|
10549
|
-
|
|
10596
|
+
const shouldInvalidateMemo = memo != null && cacheIndex == null;
|
|
10597
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
|
|
10550
10598
|
queuePostRenderEffect(() => {
|
|
10551
10599
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
10552
10600
|
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
10601
|
+
if (shouldInvalidateMemo) {
|
|
10602
|
+
vnode.el = null;
|
|
10603
|
+
}
|
|
10553
10604
|
}, parentSuspense);
|
|
10554
10605
|
}
|
|
10555
10606
|
};
|
|
@@ -11112,6 +11163,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11112
11163
|
pendingId: suspenseId++,
|
|
11113
11164
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
11114
11165
|
activeBranch: null,
|
|
11166
|
+
isFallbackMountPending: false,
|
|
11115
11167
|
pendingBranch: null,
|
|
11116
11168
|
isInFallback: !isHydrating,
|
|
11117
11169
|
isHydrating,
|
|
@@ -11161,7 +11213,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11161
11213
|
}
|
|
11162
11214
|
};
|
|
11163
11215
|
}
|
|
11164
|
-
if (activeBranch) {
|
|
11216
|
+
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
11165
11217
|
if (parentNode(activeBranch.el) === container2) {
|
|
11166
11218
|
anchor = next(activeBranch);
|
|
11167
11219
|
}
|
|
@@ -11174,6 +11226,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11174
11226
|
move(pendingBranch, container2, anchor, 0);
|
|
11175
11227
|
}
|
|
11176
11228
|
}
|
|
11229
|
+
suspense.isFallbackMountPending = false;
|
|
11177
11230
|
setActiveBranch(suspense, pendingBranch);
|
|
11178
11231
|
suspense.pendingBranch = null;
|
|
11179
11232
|
suspense.isInFallback = false;
|
|
@@ -11209,6 +11262,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11209
11262
|
triggerEvent(vnode2, "onFallback");
|
|
11210
11263
|
const anchor2 = next(activeBranch);
|
|
11211
11264
|
const mountFallback = () => {
|
|
11265
|
+
suspense.isFallbackMountPending = false;
|
|
11212
11266
|
if (!suspense.isInFallback) {
|
|
11213
11267
|
return;
|
|
11214
11268
|
}
|
|
@@ -11228,6 +11282,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11228
11282
|
};
|
|
11229
11283
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
11230
11284
|
if (delayEnter) {
|
|
11285
|
+
suspense.isFallbackMountPending = true;
|
|
11231
11286
|
activeBranch.transition.afterLeave = mountFallback;
|
|
11232
11287
|
}
|
|
11233
11288
|
suspense.isInFallback = true;
|
|
@@ -11845,6 +11900,10 @@ Component that was made reactive: `,
|
|
|
11845
11900
|
const incoming = toMerge[key];
|
|
11846
11901
|
if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
|
|
11847
11902
|
ret[key] = existing ? [].concat(existing, incoming) : incoming;
|
|
11903
|
+
} else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
|
|
11904
|
+
// the model listener.
|
|
11905
|
+
!isModelListener(key)) {
|
|
11906
|
+
ret[key] = incoming;
|
|
11848
11907
|
}
|
|
11849
11908
|
} else if (key !== "") {
|
|
11850
11909
|
ret[key] = toMerge[key];
|
|
@@ -12527,7 +12586,7 @@ Component that was made reactive: `,
|
|
|
12527
12586
|
return true;
|
|
12528
12587
|
}
|
|
12529
12588
|
|
|
12530
|
-
const version = "3.5.
|
|
12589
|
+
const version = "3.5.31";
|
|
12531
12590
|
const warn = warn$1 ;
|
|
12532
12591
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12533
12592
|
const devtools = devtools$1 ;
|
|
@@ -13393,7 +13452,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13393
13452
|
}
|
|
13394
13453
|
} else if (
|
|
13395
13454
|
// #11081 force set props for possible async custom element
|
|
13396
|
-
el._isVueCE &&
|
|
13455
|
+
el._isVueCE && // #12408 check if it's declared prop or it's async custom element
|
|
13456
|
+
(shouldSetAsPropForVueCE(el, key) || // @ts-expect-error _def is private
|
|
13457
|
+
el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue)))
|
|
13397
13458
|
) {
|
|
13398
13459
|
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
13399
13460
|
} else {
|
|
@@ -13441,6 +13502,17 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13441
13502
|
}
|
|
13442
13503
|
return key in el;
|
|
13443
13504
|
}
|
|
13505
|
+
function shouldSetAsPropForVueCE(el, key) {
|
|
13506
|
+
const props = (
|
|
13507
|
+
// @ts-expect-error _def is private
|
|
13508
|
+
el._def.props
|
|
13509
|
+
);
|
|
13510
|
+
if (!props) {
|
|
13511
|
+
return false;
|
|
13512
|
+
}
|
|
13513
|
+
const camelKey = camelize(key);
|
|
13514
|
+
return Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey);
|
|
13515
|
+
}
|
|
13444
13516
|
|
|
13445
13517
|
const REMOVAL = {};
|
|
13446
13518
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -13485,6 +13557,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13485
13557
|
this._dirty = false;
|
|
13486
13558
|
this._numberProps = null;
|
|
13487
13559
|
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
13560
|
+
this._styleAnchors = /* @__PURE__ */ new WeakMap();
|
|
13488
13561
|
this._ob = null;
|
|
13489
13562
|
if (this.shadowRoot && _createApp !== createApp) {
|
|
13490
13563
|
this._root = this.shadowRoot;
|
|
@@ -13513,7 +13586,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13513
13586
|
}
|
|
13514
13587
|
this._connected = true;
|
|
13515
13588
|
let parent = this;
|
|
13516
|
-
while (parent = parent &&
|
|
13589
|
+
while (parent = parent && // #12479 should check assignedSlot first to get correct parent
|
|
13590
|
+
(parent.assignedSlot || parent.parentNode || parent.host)) {
|
|
13517
13591
|
if (parent instanceof VueElement) {
|
|
13518
13592
|
this._parent = parent;
|
|
13519
13593
|
break;
|
|
@@ -13735,6 +13809,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13735
13809
|
this._styles.forEach((s) => this._root.removeChild(s));
|
|
13736
13810
|
this._styles.length = 0;
|
|
13737
13811
|
}
|
|
13812
|
+
this._styleAnchors.delete(this._def);
|
|
13738
13813
|
this._applyStyles(newStyles);
|
|
13739
13814
|
this._instance = null;
|
|
13740
13815
|
this._update();
|
|
@@ -13759,7 +13834,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13759
13834
|
}
|
|
13760
13835
|
return vnode;
|
|
13761
13836
|
}
|
|
13762
|
-
_applyStyles(styles, owner) {
|
|
13837
|
+
_applyStyles(styles, owner, parentComp) {
|
|
13763
13838
|
if (!styles) return;
|
|
13764
13839
|
if (owner) {
|
|
13765
13840
|
if (owner === this._def || this._styleChildren.has(owner)) {
|
|
@@ -13768,11 +13843,19 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13768
13843
|
this._styleChildren.add(owner);
|
|
13769
13844
|
}
|
|
13770
13845
|
const nonce = this._nonce;
|
|
13846
|
+
const root = this.shadowRoot;
|
|
13847
|
+
const insertionAnchor = parentComp ? this._getStyleAnchor(parentComp) || this._getStyleAnchor(this._def) : this._getRootStyleInsertionAnchor(root);
|
|
13848
|
+
let last = null;
|
|
13771
13849
|
for (let i = styles.length - 1; i >= 0; i--) {
|
|
13772
13850
|
const s = document.createElement("style");
|
|
13773
13851
|
if (nonce) s.setAttribute("nonce", nonce);
|
|
13774
13852
|
s.textContent = styles[i];
|
|
13775
|
-
|
|
13853
|
+
root.insertBefore(s, last || insertionAnchor);
|
|
13854
|
+
last = s;
|
|
13855
|
+
if (i === 0) {
|
|
13856
|
+
if (!parentComp) this._styleAnchors.set(this._def, s);
|
|
13857
|
+
if (owner) this._styleAnchors.set(owner, s);
|
|
13858
|
+
}
|
|
13776
13859
|
{
|
|
13777
13860
|
if (owner) {
|
|
13778
13861
|
if (owner.__hmrId) {
|
|
@@ -13789,6 +13872,28 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13789
13872
|
}
|
|
13790
13873
|
}
|
|
13791
13874
|
}
|
|
13875
|
+
_getStyleAnchor(comp) {
|
|
13876
|
+
if (!comp) {
|
|
13877
|
+
return null;
|
|
13878
|
+
}
|
|
13879
|
+
const anchor = this._styleAnchors.get(comp);
|
|
13880
|
+
if (anchor && anchor.parentNode === this.shadowRoot) {
|
|
13881
|
+
return anchor;
|
|
13882
|
+
}
|
|
13883
|
+
if (anchor) {
|
|
13884
|
+
this._styleAnchors.delete(comp);
|
|
13885
|
+
}
|
|
13886
|
+
return null;
|
|
13887
|
+
}
|
|
13888
|
+
_getRootStyleInsertionAnchor(root) {
|
|
13889
|
+
for (let i = 0; i < root.childNodes.length; i++) {
|
|
13890
|
+
const node = root.childNodes[i];
|
|
13891
|
+
if (!(node instanceof HTMLStyleElement)) {
|
|
13892
|
+
return node;
|
|
13893
|
+
}
|
|
13894
|
+
}
|
|
13895
|
+
return null;
|
|
13896
|
+
}
|
|
13792
13897
|
/**
|
|
13793
13898
|
* Only called when shadowRoot is false
|
|
13794
13899
|
*/
|
|
@@ -13851,8 +13956,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13851
13956
|
/**
|
|
13852
13957
|
* @internal
|
|
13853
13958
|
*/
|
|
13854
|
-
_injectChildStyle(comp) {
|
|
13855
|
-
this._applyStyles(comp.styles, comp);
|
|
13959
|
+
_injectChildStyle(comp, parentComp) {
|
|
13960
|
+
this._applyStyles(comp.styles, comp, parentComp);
|
|
13856
13961
|
}
|
|
13857
13962
|
/**
|
|
13858
13963
|
* @internal
|
|
@@ -13882,6 +13987,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
13882
13987
|
_removeChildStyle(comp) {
|
|
13883
13988
|
{
|
|
13884
13989
|
this._styleChildren.delete(comp);
|
|
13990
|
+
this._styleAnchors.delete(comp);
|
|
13885
13991
|
if (this._childStyles && comp.__hmrId) {
|
|
13886
13992
|
const oldStyles = this._childStyles.get(comp.__hmrId);
|
|
13887
13993
|
if (oldStyles) {
|
|
@@ -14137,7 +14243,8 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
14137
14243
|
if (elValue === newValue) {
|
|
14138
14244
|
return;
|
|
14139
14245
|
}
|
|
14140
|
-
|
|
14246
|
+
const rootNode = el.getRootNode();
|
|
14247
|
+
if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
|
|
14141
14248
|
if (lazy && value === oldValue) {
|
|
14142
14249
|
return;
|
|
14143
14250
|
}
|
|
@@ -18534,7 +18641,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
18534
18641
|
loop.body = createBlockStatement([
|
|
18535
18642
|
createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
|
|
18536
18643
|
createCompoundExpression([
|
|
18537
|
-
`if (_cached`,
|
|
18644
|
+
`if (_cached && _cached.el`,
|
|
18538
18645
|
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
18539
18646
|
` && ${context.helperString(
|
|
18540
18647
|
IS_MEMO_SAME
|