@vue/runtime-dom 3.5.8 → 3.5.10
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 +11 -12
- package/dist/runtime-dom.cjs.prod.js +11 -12
- package/dist/runtime-dom.esm-browser.js +62 -47
- package/dist/runtime-dom.esm-browser.prod.js +2 -2
- package/dist/runtime-dom.esm-bundler.js +12 -13
- package/dist/runtime-dom.global.js +62 -47
- package/dist/runtime-dom.global.prod.js +2 -2
- package/package.json +4 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.10
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
import { warn, h, BaseTransition, assertNumber, BaseTransitionPropsValidators, getCurrentInstance, onBeforeMount, watchPostEffect, onMounted, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, unref, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, Text, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core';
|
|
7
7
|
export * from '@vue/runtime-core';
|
|
8
|
-
import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, includeBooleanAttr, isSymbol, isSpecialBooleanAttr, isFunction, NOOP, isOn, isModelListener,
|
|
8
|
+
import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, includeBooleanAttr, isSymbol, isSpecialBooleanAttr, isFunction, NOOP, isOn, isModelListener, camelize as camelize$1, isPlainObject, hasOwn, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared';
|
|
9
9
|
|
|
10
10
|
let policy = void 0;
|
|
11
11
|
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
@@ -772,6 +772,11 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
772
772
|
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
|
|
773
773
|
patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
774
774
|
}
|
|
775
|
+
} else if (
|
|
776
|
+
// #11081 force set props for possible async custom element
|
|
777
|
+
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
778
|
+
) {
|
|
779
|
+
patchDOMProp(el, camelize$1(key), nextValue);
|
|
775
780
|
} else {
|
|
776
781
|
if (key === "true-value") {
|
|
777
782
|
el._trueValue = nextValue;
|
|
@@ -812,13 +817,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
812
817
|
if (isNativeOn(key) && isString(value)) {
|
|
813
818
|
return false;
|
|
814
819
|
}
|
|
815
|
-
|
|
816
|
-
return true;
|
|
817
|
-
}
|
|
818
|
-
if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
|
|
819
|
-
return true;
|
|
820
|
-
}
|
|
821
|
-
return false;
|
|
820
|
+
return key in el;
|
|
822
821
|
}
|
|
823
822
|
|
|
824
823
|
const REMOVAL = {};
|
|
@@ -1495,7 +1494,7 @@ const vModelCheckbox = {
|
|
|
1495
1494
|
setChecked(el, binding, vnode);
|
|
1496
1495
|
}
|
|
1497
1496
|
};
|
|
1498
|
-
function setChecked(el, { value
|
|
1497
|
+
function setChecked(el, { value }, vnode) {
|
|
1499
1498
|
el._modelValue = value;
|
|
1500
1499
|
let checked;
|
|
1501
1500
|
if (isArray(value)) {
|
|
@@ -1545,19 +1544,19 @@ const vModelSelect = {
|
|
|
1545
1544
|
},
|
|
1546
1545
|
// set value in mounted & updated because <select> relies on its children
|
|
1547
1546
|
// <option>s.
|
|
1548
|
-
mounted(el, { value
|
|
1547
|
+
mounted(el, { value }) {
|
|
1549
1548
|
setSelected(el, value);
|
|
1550
1549
|
},
|
|
1551
1550
|
beforeUpdate(el, _binding, vnode) {
|
|
1552
1551
|
el[assignKey] = getModelAssigner(vnode);
|
|
1553
1552
|
},
|
|
1554
|
-
updated(el, { value
|
|
1553
|
+
updated(el, { value }) {
|
|
1555
1554
|
if (!el._assigning) {
|
|
1556
1555
|
setSelected(el, value);
|
|
1557
1556
|
}
|
|
1558
1557
|
}
|
|
1559
1558
|
};
|
|
1560
|
-
function setSelected(el, value
|
|
1559
|
+
function setSelected(el, value) {
|
|
1561
1560
|
const isMultiple = el.multiple;
|
|
1562
1561
|
const isArrayValue = isArray(value);
|
|
1563
1562
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.10
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -575,9 +575,17 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
575
575
|
let error;
|
|
576
576
|
while (batchedSub) {
|
|
577
577
|
let e = batchedSub;
|
|
578
|
+
let next;
|
|
579
|
+
while (e) {
|
|
580
|
+
if (!(e.flags & 1)) {
|
|
581
|
+
e.flags &= ~8;
|
|
582
|
+
}
|
|
583
|
+
e = e.next;
|
|
584
|
+
}
|
|
585
|
+
e = batchedSub;
|
|
578
586
|
batchedSub = void 0;
|
|
579
587
|
while (e) {
|
|
580
|
-
|
|
588
|
+
next = e.next;
|
|
581
589
|
e.next = void 0;
|
|
582
590
|
e.flags &= ~8;
|
|
583
591
|
if (e.flags & 1) {
|
|
@@ -600,7 +608,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
600
608
|
link.dep.activeLink = link;
|
|
601
609
|
}
|
|
602
610
|
}
|
|
603
|
-
function cleanupDeps(sub
|
|
611
|
+
function cleanupDeps(sub) {
|
|
604
612
|
let head;
|
|
605
613
|
let tail = sub.depsTail;
|
|
606
614
|
let link = tail;
|
|
@@ -608,7 +616,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
608
616
|
const prev = link.prevDep;
|
|
609
617
|
if (link.version === -1) {
|
|
610
618
|
if (link === tail) tail = prev;
|
|
611
|
-
removeSub(link
|
|
619
|
+
removeSub(link);
|
|
612
620
|
removeDep(link);
|
|
613
621
|
} else {
|
|
614
622
|
head = link;
|
|
@@ -663,11 +671,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
663
671
|
} finally {
|
|
664
672
|
activeSub = prevSub;
|
|
665
673
|
shouldTrack = prevShouldTrack;
|
|
666
|
-
cleanupDeps(computed
|
|
674
|
+
cleanupDeps(computed);
|
|
667
675
|
computed.flags &= ~2;
|
|
668
676
|
}
|
|
669
677
|
}
|
|
670
|
-
function removeSub(link,
|
|
678
|
+
function removeSub(link, soft = false) {
|
|
671
679
|
const { dep, prevSub, nextSub } = link;
|
|
672
680
|
if (prevSub) {
|
|
673
681
|
prevSub.nextSub = nextSub;
|
|
@@ -683,17 +691,15 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
683
691
|
if (dep.subsHead === link) {
|
|
684
692
|
dep.subsHead = nextSub;
|
|
685
693
|
}
|
|
686
|
-
if (!dep.subs) {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
removeSub(l, true);
|
|
691
|
-
}
|
|
692
|
-
} else if (dep.map && !fromComputed) {
|
|
693
|
-
dep.map.delete(dep.key);
|
|
694
|
-
if (!dep.map.size) targetMap.delete(dep.target);
|
|
694
|
+
if (!dep.subs && dep.computed) {
|
|
695
|
+
dep.computed.flags &= ~4;
|
|
696
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
697
|
+
removeSub(l, true);
|
|
695
698
|
}
|
|
696
699
|
}
|
|
700
|
+
if (!soft && !--dep.sc && dep.map) {
|
|
701
|
+
dep.map.delete(dep.key);
|
|
702
|
+
}
|
|
697
703
|
}
|
|
698
704
|
function removeDep(link) {
|
|
699
705
|
const { prevDep, nextDep } = link;
|
|
@@ -778,6 +784,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
778
784
|
this.target = void 0;
|
|
779
785
|
this.map = void 0;
|
|
780
786
|
this.key = void 0;
|
|
787
|
+
/**
|
|
788
|
+
* Subscriber counter
|
|
789
|
+
*/
|
|
790
|
+
this.sc = 0;
|
|
781
791
|
{
|
|
782
792
|
this.subsHead = void 0;
|
|
783
793
|
}
|
|
@@ -796,9 +806,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
796
806
|
activeSub.depsTail.nextDep = link;
|
|
797
807
|
activeSub.depsTail = link;
|
|
798
808
|
}
|
|
799
|
-
|
|
800
|
-
addSub(link);
|
|
801
|
-
}
|
|
809
|
+
addSub(link);
|
|
802
810
|
} else if (link.version === -1) {
|
|
803
811
|
link.version = this.version;
|
|
804
812
|
if (link.nextDep) {
|
|
@@ -862,22 +870,25 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
862
870
|
}
|
|
863
871
|
}
|
|
864
872
|
function addSub(link) {
|
|
865
|
-
|
|
866
|
-
if (
|
|
867
|
-
computed
|
|
868
|
-
|
|
869
|
-
|
|
873
|
+
link.dep.sc++;
|
|
874
|
+
if (link.sub.flags & 4) {
|
|
875
|
+
const computed = link.dep.computed;
|
|
876
|
+
if (computed && !link.dep.subs) {
|
|
877
|
+
computed.flags |= 4 | 16;
|
|
878
|
+
for (let l = computed.deps; l; l = l.nextDep) {
|
|
879
|
+
addSub(l);
|
|
880
|
+
}
|
|
870
881
|
}
|
|
882
|
+
const currentTail = link.dep.subs;
|
|
883
|
+
if (currentTail !== link) {
|
|
884
|
+
link.prevSub = currentTail;
|
|
885
|
+
if (currentTail) currentTail.nextSub = link;
|
|
886
|
+
}
|
|
887
|
+
if (link.dep.subsHead === void 0) {
|
|
888
|
+
link.dep.subsHead = link;
|
|
889
|
+
}
|
|
890
|
+
link.dep.subs = link;
|
|
871
891
|
}
|
|
872
|
-
const currentTail = link.dep.subs;
|
|
873
|
-
if (currentTail !== link) {
|
|
874
|
-
link.prevSub = currentTail;
|
|
875
|
-
if (currentTail) currentTail.nextSub = link;
|
|
876
|
-
}
|
|
877
|
-
if (link.dep.subsHead === void 0) {
|
|
878
|
-
link.dep.subsHead = link;
|
|
879
|
-
}
|
|
880
|
-
link.dep.subs = link;
|
|
881
892
|
}
|
|
882
893
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
883
894
|
const ITERATE_KEY = Symbol(
|
|
@@ -981,8 +992,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
981
992
|
endBatch();
|
|
982
993
|
}
|
|
983
994
|
function getDepFromReactive(object, key) {
|
|
984
|
-
|
|
985
|
-
return
|
|
995
|
+
const depMap = targetMap.get(object);
|
|
996
|
+
return depMap && depMap.get(key);
|
|
986
997
|
}
|
|
987
998
|
|
|
988
999
|
function reactiveReadArray(array) {
|
|
@@ -1918,6 +1929,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1918
1929
|
* @internal
|
|
1919
1930
|
*/
|
|
1920
1931
|
this.globalVersion = globalVersion - 1;
|
|
1932
|
+
/**
|
|
1933
|
+
* @internal
|
|
1934
|
+
*/
|
|
1935
|
+
this.next = void 0;
|
|
1921
1936
|
// for backwards compat
|
|
1922
1937
|
this.effect = this;
|
|
1923
1938
|
this["__v_isReadonly"] = !setter;
|
|
@@ -3634,6 +3649,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3634
3649
|
`useId() is called when there is no active component instance to be associated with.`
|
|
3635
3650
|
);
|
|
3636
3651
|
}
|
|
3652
|
+
return "";
|
|
3637
3653
|
}
|
|
3638
3654
|
function markAsyncBoundary(instance) {
|
|
3639
3655
|
instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
|
|
@@ -9662,7 +9678,7 @@ Component that was made reactive: `,
|
|
|
9662
9678
|
// #3666, avoid reference pollution when reusing vnode
|
|
9663
9679
|
child.slice()
|
|
9664
9680
|
);
|
|
9665
|
-
} else if (
|
|
9681
|
+
} else if (isVNode(child)) {
|
|
9666
9682
|
return cloneIfMounted(child);
|
|
9667
9683
|
} else {
|
|
9668
9684
|
return createVNode(Text, null, String(child));
|
|
@@ -10393,7 +10409,7 @@ Component that was made reactive: `,
|
|
|
10393
10409
|
return true;
|
|
10394
10410
|
}
|
|
10395
10411
|
|
|
10396
|
-
const version = "3.5.
|
|
10412
|
+
const version = "3.5.10";
|
|
10397
10413
|
const warn = warn$1 ;
|
|
10398
10414
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10399
10415
|
const devtools = devtools$1 ;
|
|
@@ -11161,6 +11177,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11161
11177
|
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
|
|
11162
11178
|
patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
11163
11179
|
}
|
|
11180
|
+
} else if (
|
|
11181
|
+
// #11081 force set props for possible async custom element
|
|
11182
|
+
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
11183
|
+
) {
|
|
11184
|
+
patchDOMProp(el, camelize(key), nextValue);
|
|
11164
11185
|
} else {
|
|
11165
11186
|
if (key === "true-value") {
|
|
11166
11187
|
el._trueValue = nextValue;
|
|
@@ -11201,13 +11222,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11201
11222
|
if (isNativeOn(key) && isString(value)) {
|
|
11202
11223
|
return false;
|
|
11203
11224
|
}
|
|
11204
|
-
|
|
11205
|
-
return true;
|
|
11206
|
-
}
|
|
11207
|
-
if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
|
|
11208
|
-
return true;
|
|
11209
|
-
}
|
|
11210
|
-
return false;
|
|
11225
|
+
return key in el;
|
|
11211
11226
|
}
|
|
11212
11227
|
|
|
11213
11228
|
const REMOVAL = {};
|
|
@@ -11872,7 +11887,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11872
11887
|
setChecked(el, binding, vnode);
|
|
11873
11888
|
}
|
|
11874
11889
|
};
|
|
11875
|
-
function setChecked(el, { value
|
|
11890
|
+
function setChecked(el, { value }, vnode) {
|
|
11876
11891
|
el._modelValue = value;
|
|
11877
11892
|
let checked;
|
|
11878
11893
|
if (isArray(value)) {
|
|
@@ -11922,19 +11937,19 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11922
11937
|
},
|
|
11923
11938
|
// set value in mounted & updated because <select> relies on its children
|
|
11924
11939
|
// <option>s.
|
|
11925
|
-
mounted(el, { value
|
|
11940
|
+
mounted(el, { value }) {
|
|
11926
11941
|
setSelected(el, value);
|
|
11927
11942
|
},
|
|
11928
11943
|
beforeUpdate(el, _binding, vnode) {
|
|
11929
11944
|
el[assignKey] = getModelAssigner(vnode);
|
|
11930
11945
|
},
|
|
11931
|
-
updated(el, { value
|
|
11946
|
+
updated(el, { value }) {
|
|
11932
11947
|
if (!el._assigning) {
|
|
11933
11948
|
setSelected(el, value);
|
|
11934
11949
|
}
|
|
11935
11950
|
}
|
|
11936
11951
|
};
|
|
11937
|
-
function setSelected(el, value
|
|
11952
|
+
function setSelected(el, value) {
|
|
11938
11953
|
const isMultiple = el.multiple;
|
|
11939
11954
|
const isArrayValue = isArray(value);
|
|
11940
11955
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|