@vue/runtime-dom 3.6.0-rc.6 → 3.6.0-rc.7
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 +3 -19
- package/dist/runtime-dom.cjs.prod.js +3 -19
- package/dist/runtime-dom.d.ts +0 -11
- package/dist/runtime-dom.esm-browser.js +16 -44
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +3 -19
- package/dist/runtime-dom.global.js +16 -44
- 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.6.0-rc.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-rc.7
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -939,13 +939,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
939
939
|
_renderSlots() {
|
|
940
940
|
const outlets = this._getSlots();
|
|
941
941
|
const scopeId = this._instance.type.__scopeId;
|
|
942
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
943
942
|
for (let i = 0; i < outlets.length; i++) {
|
|
944
943
|
const o = outlets[i];
|
|
945
944
|
const slotName = o.getAttribute("name") || "default";
|
|
946
945
|
const content = this._slots[slotName];
|
|
947
946
|
const parent = o.parentNode;
|
|
948
|
-
const replacementNodes = [];
|
|
949
947
|
if (content) for (const n of content) {
|
|
950
948
|
if (scopeId && n.nodeType === 1) {
|
|
951
949
|
const id = scopeId + "-s";
|
|
@@ -955,20 +953,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
955
953
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
956
954
|
}
|
|
957
955
|
parent.insertBefore(n, o);
|
|
958
|
-
replacementNodes.push(n);
|
|
959
|
-
}
|
|
960
|
-
else while (o.firstChild) {
|
|
961
|
-
const child = o.firstChild;
|
|
962
|
-
parent.insertBefore(child, o);
|
|
963
|
-
replacementNodes.push(child);
|
|
964
956
|
}
|
|
957
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
965
958
|
parent.removeChild(o);
|
|
966
|
-
slotReplacements.set(o, {
|
|
967
|
-
nodes: replacementNodes,
|
|
968
|
-
usedFallback: !content
|
|
969
|
-
});
|
|
970
959
|
}
|
|
971
|
-
this._updateSlotNodes(slotReplacements);
|
|
972
960
|
}
|
|
973
961
|
/**
|
|
974
962
|
* @internal
|
|
@@ -1007,7 +995,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
1007
995
|
* @internal
|
|
1008
996
|
*/
|
|
1009
997
|
_hasShadowRoot() {
|
|
1010
|
-
return this.
|
|
998
|
+
return this._root !== this;
|
|
1011
999
|
}
|
|
1012
1000
|
/**
|
|
1013
1001
|
* @internal
|
|
@@ -1054,10 +1042,6 @@ var VueElement = class extends VueElementBase {
|
|
|
1054
1042
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
1055
1043
|
this._app = this._instance = null;
|
|
1056
1044
|
}
|
|
1057
|
-
/**
|
|
1058
|
-
* Only called when shadowRoot is false
|
|
1059
|
-
*/
|
|
1060
|
-
_updateSlotNodes(replacements) {}
|
|
1061
1045
|
_createVNode() {
|
|
1062
1046
|
const baseProps = {};
|
|
1063
1047
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-rc.7
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3529,7 +3529,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3529
3529
|
else done();
|
|
3530
3530
|
},
|
|
3531
3531
|
clone(node) {
|
|
3532
|
-
return cloneHooks(node);
|
|
3532
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3533
3533
|
}
|
|
3534
3534
|
};
|
|
3535
3535
|
return hooks;
|
|
@@ -4367,7 +4367,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4367
4367
|
name: "AsyncComponentWrapper",
|
|
4368
4368
|
__asyncLoader: load,
|
|
4369
4369
|
__asyncHydrate(el, instance, hydrate) {
|
|
4370
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4370
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4371
4371
|
},
|
|
4372
4372
|
get __asyncResolved() {
|
|
4373
4373
|
return getResolvedComp();
|
|
@@ -4486,10 +4486,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4486
4486
|
* shared between core and vapor
|
|
4487
4487
|
* @internal
|
|
4488
4488
|
*/
|
|
4489
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4489
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4490
4490
|
const wasConnected = el.isConnected;
|
|
4491
4491
|
let patched = false;
|
|
4492
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4492
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4493
4493
|
const performHydrate = () => {
|
|
4494
4494
|
if (patched) {
|
|
4495
4495
|
{
|
|
@@ -7192,24 +7192,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7192
7192
|
}
|
|
7193
7193
|
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
7194
7194
|
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
7195
|
-
else {
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
else hostInsert(el, container, anchor);
|
|
7200
|
-
};
|
|
7201
|
-
const performLeave = () => {
|
|
7202
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7203
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
7204
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
7205
|
-
else leave(el, () => {
|
|
7206
|
-
remove();
|
|
7207
|
-
afterLeave && afterLeave();
|
|
7208
|
-
});
|
|
7209
|
-
};
|
|
7210
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
7211
|
-
else performLeave();
|
|
7212
|
-
}
|
|
7195
|
+
else performTransitionLeave(el, transition, () => {
|
|
7196
|
+
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
7197
|
+
else hostInsert(el, container, anchor);
|
|
7198
|
+
}, true, true);
|
|
7213
7199
|
} else hostInsert(el, container, anchor);
|
|
7214
7200
|
};
|
|
7215
7201
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
@@ -7441,13 +7427,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7441
7427
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
7442
7428
|
const performRemove = () => {
|
|
7443
7429
|
remove();
|
|
7444
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
7430
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
7445
7431
|
};
|
|
7446
7432
|
if (force || isElement && transition && !transition.persisted) {
|
|
7447
7433
|
const { leave, delayLeave } = transition;
|
|
7448
7434
|
const performLeave = () => {
|
|
7435
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7449
7436
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
7450
|
-
|
|
7437
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
7438
|
+
else leave(el, performRemove);
|
|
7451
7439
|
};
|
|
7452
7440
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
7453
7441
|
else performLeave();
|
|
@@ -8730,7 +8718,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8730
8718
|
}
|
|
8731
8719
|
//#endregion
|
|
8732
8720
|
//#region packages/runtime-core/src/index.ts
|
|
8733
|
-
const version = "3.6.0-rc.
|
|
8721
|
+
const version = "3.6.0-rc.7";
|
|
8734
8722
|
const warn = warn$1;
|
|
8735
8723
|
/**
|
|
8736
8724
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9677,13 +9665,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9677
9665
|
_renderSlots() {
|
|
9678
9666
|
const outlets = this._getSlots();
|
|
9679
9667
|
const scopeId = this._instance.type.__scopeId;
|
|
9680
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
9681
9668
|
for (let i = 0; i < outlets.length; i++) {
|
|
9682
9669
|
const o = outlets[i];
|
|
9683
9670
|
const slotName = o.getAttribute("name") || "default";
|
|
9684
9671
|
const content = this._slots[slotName];
|
|
9685
9672
|
const parent = o.parentNode;
|
|
9686
|
-
const replacementNodes = [];
|
|
9687
9673
|
if (content) for (const n of content) {
|
|
9688
9674
|
if (scopeId && n.nodeType === 1) {
|
|
9689
9675
|
const id = scopeId + "-s";
|
|
@@ -9693,20 +9679,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9693
9679
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
9694
9680
|
}
|
|
9695
9681
|
parent.insertBefore(n, o);
|
|
9696
|
-
replacementNodes.push(n);
|
|
9697
|
-
}
|
|
9698
|
-
else while (o.firstChild) {
|
|
9699
|
-
const child = o.firstChild;
|
|
9700
|
-
parent.insertBefore(child, o);
|
|
9701
|
-
replacementNodes.push(child);
|
|
9702
9682
|
}
|
|
9683
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
9703
9684
|
parent.removeChild(o);
|
|
9704
|
-
slotReplacements.set(o, {
|
|
9705
|
-
nodes: replacementNodes,
|
|
9706
|
-
usedFallback: !content
|
|
9707
|
-
});
|
|
9708
9685
|
}
|
|
9709
|
-
this._updateSlotNodes(slotReplacements);
|
|
9710
9686
|
}
|
|
9711
9687
|
/**
|
|
9712
9688
|
* @internal
|
|
@@ -9745,7 +9721,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9745
9721
|
* @internal
|
|
9746
9722
|
*/
|
|
9747
9723
|
_hasShadowRoot() {
|
|
9748
|
-
return this.
|
|
9724
|
+
return this._root !== this;
|
|
9749
9725
|
}
|
|
9750
9726
|
/**
|
|
9751
9727
|
* @internal
|
|
@@ -9790,10 +9766,6 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9790
9766
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
9791
9767
|
this._app = this._instance = null;
|
|
9792
9768
|
}
|
|
9793
|
-
/**
|
|
9794
|
-
* Only called when shadowRoot is false
|
|
9795
|
-
*/
|
|
9796
|
-
_updateSlotNodes(replacements) {}
|
|
9797
9769
|
_createVNode() {
|
|
9798
9770
|
const baseProps = {};
|
|
9799
9771
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|