@vue/runtime-dom 3.5.21 → 3.5.22
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 +40 -14
- package/dist/runtime-dom.cjs.prod.js +40 -14
- package/dist/runtime-dom.d.ts +20 -7
- package/dist/runtime-dom.esm-browser.js +72 -50
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +40 -14
- package/dist/runtime-dom.global.js +72 -50
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -214,11 +214,11 @@ function resolveTransitionProps(rawProps) {
|
|
|
214
214
|
const resolve = () => finishLeave(el, done);
|
|
215
215
|
addTransitionClass(el, leaveFromClass);
|
|
216
216
|
if (!el._enterCancelled) {
|
|
217
|
-
forceReflow();
|
|
217
|
+
forceReflow(el);
|
|
218
218
|
addTransitionClass(el, leaveActiveClass);
|
|
219
219
|
} else {
|
|
220
220
|
addTransitionClass(el, leaveActiveClass);
|
|
221
|
-
forceReflow();
|
|
221
|
+
forceReflow(el);
|
|
222
222
|
}
|
|
223
223
|
nextFrame(() => {
|
|
224
224
|
if (!el._isLeaving) {
|
|
@@ -364,8 +364,9 @@ function toMs(s) {
|
|
|
364
364
|
if (s === "auto") return 0;
|
|
365
365
|
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
366
366
|
}
|
|
367
|
-
function forceReflow() {
|
|
368
|
-
|
|
367
|
+
function forceReflow(el) {
|
|
368
|
+
const targetDocument = el ? el.ownerDocument : document;
|
|
369
|
+
return targetDocument.body.offsetHeight;
|
|
369
370
|
}
|
|
370
371
|
|
|
371
372
|
function patchClass(el, value, isSVG) {
|
|
@@ -878,7 +879,11 @@ class VueElement extends BaseClass {
|
|
|
878
879
|
);
|
|
879
880
|
}
|
|
880
881
|
if (_def.shadowRoot !== false) {
|
|
881
|
-
this.attachShadow(
|
|
882
|
+
this.attachShadow(
|
|
883
|
+
extend({}, _def.shadowRootOptions, {
|
|
884
|
+
mode: "open"
|
|
885
|
+
})
|
|
886
|
+
);
|
|
882
887
|
this._root = this.shadowRoot;
|
|
883
888
|
} else {
|
|
884
889
|
this._root = this;
|
|
@@ -938,9 +943,18 @@ class VueElement extends BaseClass {
|
|
|
938
943
|
this._app && this._app.unmount();
|
|
939
944
|
if (this._instance) this._instance.ce = void 0;
|
|
940
945
|
this._app = this._instance = null;
|
|
946
|
+
if (this._teleportTargets) {
|
|
947
|
+
this._teleportTargets.clear();
|
|
948
|
+
this._teleportTargets = void 0;
|
|
949
|
+
}
|
|
941
950
|
}
|
|
942
951
|
});
|
|
943
952
|
}
|
|
953
|
+
_processMutations(mutations) {
|
|
954
|
+
for (const m of mutations) {
|
|
955
|
+
this._setAttr(m.attributeName);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
944
958
|
/**
|
|
945
959
|
* resolve inner component definition (handle possible async component)
|
|
946
960
|
*/
|
|
@@ -951,11 +965,7 @@ class VueElement extends BaseClass {
|
|
|
951
965
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
952
966
|
this._setAttr(this.attributes[i].name);
|
|
953
967
|
}
|
|
954
|
-
this._ob = new MutationObserver((
|
|
955
|
-
for (const m of mutations) {
|
|
956
|
-
this._setAttr(m.attributeName);
|
|
957
|
-
}
|
|
958
|
-
});
|
|
968
|
+
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
959
969
|
this._ob.observe(this, { attributes: true });
|
|
960
970
|
const resolve = (def, isAsync = false) => {
|
|
961
971
|
this._resolved = true;
|
|
@@ -1071,7 +1081,10 @@ class VueElement extends BaseClass {
|
|
|
1071
1081
|
}
|
|
1072
1082
|
if (shouldReflect) {
|
|
1073
1083
|
const ob = this._ob;
|
|
1074
|
-
|
|
1084
|
+
if (ob) {
|
|
1085
|
+
this._processMutations(ob.takeRecords());
|
|
1086
|
+
ob.disconnect();
|
|
1087
|
+
}
|
|
1075
1088
|
if (val === true) {
|
|
1076
1089
|
this.setAttribute(hyphenate(key), "");
|
|
1077
1090
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -1175,7 +1188,7 @@ class VueElement extends BaseClass {
|
|
|
1175
1188
|
* Only called when shadowRoot is false
|
|
1176
1189
|
*/
|
|
1177
1190
|
_renderSlots() {
|
|
1178
|
-
const outlets =
|
|
1191
|
+
const outlets = this._getSlots();
|
|
1179
1192
|
const scopeId = this._instance.type.__scopeId;
|
|
1180
1193
|
for (let i = 0; i < outlets.length; i++) {
|
|
1181
1194
|
const o = outlets[i];
|
|
@@ -1201,6 +1214,19 @@ class VueElement extends BaseClass {
|
|
|
1201
1214
|
parent.removeChild(o);
|
|
1202
1215
|
}
|
|
1203
1216
|
}
|
|
1217
|
+
/**
|
|
1218
|
+
* @internal
|
|
1219
|
+
*/
|
|
1220
|
+
_getSlots() {
|
|
1221
|
+
const roots = [this];
|
|
1222
|
+
if (this._teleportTargets) {
|
|
1223
|
+
roots.push(...this._teleportTargets);
|
|
1224
|
+
}
|
|
1225
|
+
return roots.reduce((res, i) => {
|
|
1226
|
+
res.push(...Array.from(i.querySelectorAll("slot")));
|
|
1227
|
+
return res;
|
|
1228
|
+
}, []);
|
|
1229
|
+
}
|
|
1204
1230
|
/**
|
|
1205
1231
|
* @internal
|
|
1206
1232
|
*/
|
|
@@ -1302,7 +1328,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
1302
1328
|
prevChildren.forEach(callPendingCbs);
|
|
1303
1329
|
prevChildren.forEach(recordPosition);
|
|
1304
1330
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
1305
|
-
forceReflow();
|
|
1331
|
+
forceReflow(instance.vnode.el);
|
|
1306
1332
|
movedChildren.forEach((c) => {
|
|
1307
1333
|
const el = c.el;
|
|
1308
1334
|
const style = el.style;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1145,7 +1145,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1145
1145
|
iter._next = iter.next;
|
|
1146
1146
|
iter.next = () => {
|
|
1147
1147
|
const result = iter._next();
|
|
1148
|
-
if (result.
|
|
1148
|
+
if (!result.done) {
|
|
1149
1149
|
result.value = wrapValue(result.value);
|
|
1150
1150
|
}
|
|
1151
1151
|
return result;
|
|
@@ -1272,7 +1272,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1272
1272
|
return res;
|
|
1273
1273
|
}
|
|
1274
1274
|
if (isRef(res)) {
|
|
1275
|
-
|
|
1275
|
+
const value = targetIsArray && isIntegerKey(key) ? res : res.value;
|
|
1276
|
+
return isReadonly2 && isObject(value) ? readonly(value) : value;
|
|
1276
1277
|
}
|
|
1277
1278
|
if (isObject(res)) {
|
|
1278
1279
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
@@ -2622,14 +2623,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2622
2623
|
let isHmrUpdating = false;
|
|
2623
2624
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2624
2625
|
{
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
reload: tryWrap(reload)
|
|
2631
|
-
};
|
|
2632
|
-
}
|
|
2626
|
+
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
2627
|
+
createRecord: tryWrap(createRecord),
|
|
2628
|
+
rerender: tryWrap(rerender),
|
|
2629
|
+
reload: tryWrap(reload)
|
|
2630
|
+
};
|
|
2633
2631
|
}
|
|
2634
2632
|
const map = /* @__PURE__ */ new Map();
|
|
2635
2633
|
function registerHMR(instance) {
|
|
@@ -2996,9 +2994,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2996
2994
|
insert(mainAnchor, container, anchor);
|
|
2997
2995
|
const mount = (container2, anchor2) => {
|
|
2998
2996
|
if (shapeFlag & 16) {
|
|
2999
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3000
|
-
parentComponent.ce._teleportTarget = container2;
|
|
3001
|
-
}
|
|
3002
2997
|
mountChildren(
|
|
3003
2998
|
children,
|
|
3004
2999
|
container2,
|
|
@@ -3020,6 +3015,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3020
3015
|
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3021
3016
|
namespace = "mathml";
|
|
3022
3017
|
}
|
|
3018
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3019
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3020
|
+
}
|
|
3023
3021
|
if (!disabled) {
|
|
3024
3022
|
mount(target, targetAnchor);
|
|
3025
3023
|
updateCssVars(n2, false);
|
|
@@ -5179,12 +5177,13 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5179
5177
|
|
|
5180
5178
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5181
5179
|
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
5180
|
+
const hasProps = Object.keys(props).length > 0;
|
|
5182
5181
|
if (name !== "default") props.name = name;
|
|
5183
5182
|
return openBlock(), createBlock(
|
|
5184
5183
|
Fragment,
|
|
5185
5184
|
null,
|
|
5186
5185
|
[createVNode("slot", props, fallback && fallback())],
|
|
5187
|
-
64
|
|
5186
|
+
hasProps ? -2 : 64
|
|
5188
5187
|
);
|
|
5189
5188
|
}
|
|
5190
5189
|
let slot = slots[name];
|
|
@@ -10314,31 +10313,28 @@ Component that was made reactive: `,
|
|
|
10314
10313
|
};
|
|
10315
10314
|
|
|
10316
10315
|
function h(type, propsOrChildren, children) {
|
|
10317
|
-
|
|
10316
|
+
try {
|
|
10318
10317
|
setBlockTracking(-1);
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
if (isVNode(propsOrChildren)) {
|
|
10329
|
-
return doCreateVNode(type, null, [propsOrChildren]);
|
|
10318
|
+
const l = arguments.length;
|
|
10319
|
+
if (l === 2) {
|
|
10320
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
10321
|
+
if (isVNode(propsOrChildren)) {
|
|
10322
|
+
return createVNode(type, null, [propsOrChildren]);
|
|
10323
|
+
}
|
|
10324
|
+
return createVNode(type, propsOrChildren);
|
|
10325
|
+
} else {
|
|
10326
|
+
return createVNode(type, null, propsOrChildren);
|
|
10330
10327
|
}
|
|
10331
|
-
return doCreateVNode(type, propsOrChildren);
|
|
10332
10328
|
} else {
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
children = [children];
|
|
10329
|
+
if (l > 3) {
|
|
10330
|
+
children = Array.prototype.slice.call(arguments, 2);
|
|
10331
|
+
} else if (l === 3 && isVNode(children)) {
|
|
10332
|
+
children = [children];
|
|
10333
|
+
}
|
|
10334
|
+
return createVNode(type, propsOrChildren, children);
|
|
10340
10335
|
}
|
|
10341
|
-
|
|
10336
|
+
} finally {
|
|
10337
|
+
setBlockTracking(1);
|
|
10342
10338
|
}
|
|
10343
10339
|
}
|
|
10344
10340
|
|
|
@@ -10548,7 +10544,7 @@ Component that was made reactive: `,
|
|
|
10548
10544
|
return true;
|
|
10549
10545
|
}
|
|
10550
10546
|
|
|
10551
|
-
const version = "3.5.
|
|
10547
|
+
const version = "3.5.22";
|
|
10552
10548
|
const warn = warn$1 ;
|
|
10553
10549
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10554
10550
|
const devtools = devtools$1 ;
|
|
@@ -10765,11 +10761,11 @@ Component that was made reactive: `,
|
|
|
10765
10761
|
const resolve = () => finishLeave(el, done);
|
|
10766
10762
|
addTransitionClass(el, leaveFromClass);
|
|
10767
10763
|
if (!el._enterCancelled) {
|
|
10768
|
-
forceReflow();
|
|
10764
|
+
forceReflow(el);
|
|
10769
10765
|
addTransitionClass(el, leaveActiveClass);
|
|
10770
10766
|
} else {
|
|
10771
10767
|
addTransitionClass(el, leaveActiveClass);
|
|
10772
|
-
forceReflow();
|
|
10768
|
+
forceReflow(el);
|
|
10773
10769
|
}
|
|
10774
10770
|
nextFrame(() => {
|
|
10775
10771
|
if (!el._isLeaving) {
|
|
@@ -10915,8 +10911,9 @@ Component that was made reactive: `,
|
|
|
10915
10911
|
if (s === "auto") return 0;
|
|
10916
10912
|
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
10917
10913
|
}
|
|
10918
|
-
function forceReflow() {
|
|
10919
|
-
|
|
10914
|
+
function forceReflow(el) {
|
|
10915
|
+
const targetDocument = el ? el.ownerDocument : document;
|
|
10916
|
+
return targetDocument.body.offsetHeight;
|
|
10920
10917
|
}
|
|
10921
10918
|
|
|
10922
10919
|
function patchClass(el, value, isSVG) {
|
|
@@ -11422,7 +11419,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11422
11419
|
);
|
|
11423
11420
|
}
|
|
11424
11421
|
if (_def.shadowRoot !== false) {
|
|
11425
|
-
this.attachShadow(
|
|
11422
|
+
this.attachShadow(
|
|
11423
|
+
extend({}, _def.shadowRootOptions, {
|
|
11424
|
+
mode: "open"
|
|
11425
|
+
})
|
|
11426
|
+
);
|
|
11426
11427
|
this._root = this.shadowRoot;
|
|
11427
11428
|
} else {
|
|
11428
11429
|
this._root = this;
|
|
@@ -11482,9 +11483,18 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11482
11483
|
this._app && this._app.unmount();
|
|
11483
11484
|
if (this._instance) this._instance.ce = void 0;
|
|
11484
11485
|
this._app = this._instance = null;
|
|
11486
|
+
if (this._teleportTargets) {
|
|
11487
|
+
this._teleportTargets.clear();
|
|
11488
|
+
this._teleportTargets = void 0;
|
|
11489
|
+
}
|
|
11485
11490
|
}
|
|
11486
11491
|
});
|
|
11487
11492
|
}
|
|
11493
|
+
_processMutations(mutations) {
|
|
11494
|
+
for (const m of mutations) {
|
|
11495
|
+
this._setAttr(m.attributeName);
|
|
11496
|
+
}
|
|
11497
|
+
}
|
|
11488
11498
|
/**
|
|
11489
11499
|
* resolve inner component definition (handle possible async component)
|
|
11490
11500
|
*/
|
|
@@ -11495,11 +11505,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11495
11505
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
11496
11506
|
this._setAttr(this.attributes[i].name);
|
|
11497
11507
|
}
|
|
11498
|
-
this._ob = new MutationObserver((
|
|
11499
|
-
for (const m of mutations) {
|
|
11500
|
-
this._setAttr(m.attributeName);
|
|
11501
|
-
}
|
|
11502
|
-
});
|
|
11508
|
+
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
11503
11509
|
this._ob.observe(this, { attributes: true });
|
|
11504
11510
|
const resolve = (def, isAsync = false) => {
|
|
11505
11511
|
this._resolved = true;
|
|
@@ -11615,7 +11621,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11615
11621
|
}
|
|
11616
11622
|
if (shouldReflect) {
|
|
11617
11623
|
const ob = this._ob;
|
|
11618
|
-
|
|
11624
|
+
if (ob) {
|
|
11625
|
+
this._processMutations(ob.takeRecords());
|
|
11626
|
+
ob.disconnect();
|
|
11627
|
+
}
|
|
11619
11628
|
if (val === true) {
|
|
11620
11629
|
this.setAttribute(hyphenate(key), "");
|
|
11621
11630
|
} else if (typeof val === "string" || typeof val === "number") {
|
|
@@ -11719,7 +11728,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11719
11728
|
* Only called when shadowRoot is false
|
|
11720
11729
|
*/
|
|
11721
11730
|
_renderSlots() {
|
|
11722
|
-
const outlets =
|
|
11731
|
+
const outlets = this._getSlots();
|
|
11723
11732
|
const scopeId = this._instance.type.__scopeId;
|
|
11724
11733
|
for (let i = 0; i < outlets.length; i++) {
|
|
11725
11734
|
const o = outlets[i];
|
|
@@ -11745,6 +11754,19 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11745
11754
|
parent.removeChild(o);
|
|
11746
11755
|
}
|
|
11747
11756
|
}
|
|
11757
|
+
/**
|
|
11758
|
+
* @internal
|
|
11759
|
+
*/
|
|
11760
|
+
_getSlots() {
|
|
11761
|
+
const roots = [this];
|
|
11762
|
+
if (this._teleportTargets) {
|
|
11763
|
+
roots.push(...this._teleportTargets);
|
|
11764
|
+
}
|
|
11765
|
+
return roots.reduce((res, i) => {
|
|
11766
|
+
res.push(...Array.from(i.querySelectorAll("slot")));
|
|
11767
|
+
return res;
|
|
11768
|
+
}, []);
|
|
11769
|
+
}
|
|
11748
11770
|
/**
|
|
11749
11771
|
* @internal
|
|
11750
11772
|
*/
|
|
@@ -11834,7 +11856,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11834
11856
|
prevChildren.forEach(callPendingCbs);
|
|
11835
11857
|
prevChildren.forEach(recordPosition);
|
|
11836
11858
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
11837
|
-
forceReflow();
|
|
11859
|
+
forceReflow(instance.vnode.el);
|
|
11838
11860
|
movedChildren.forEach((c) => {
|
|
11839
11861
|
const el = c.el;
|
|
11840
11862
|
const style = el.style;
|