@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
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -861,13 +861,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
861
861
|
_renderSlots() {
|
|
862
862
|
const outlets = this._getSlots();
|
|
863
863
|
const scopeId = this._instance.type.__scopeId;
|
|
864
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
865
864
|
for (let i = 0; i < outlets.length; i++) {
|
|
866
865
|
const o = outlets[i];
|
|
867
866
|
const slotName = o.getAttribute("name") || "default";
|
|
868
867
|
const content = this._slots[slotName];
|
|
869
868
|
const parent = o.parentNode;
|
|
870
|
-
const replacementNodes = [];
|
|
871
869
|
if (content) for (const n of content) {
|
|
872
870
|
if (scopeId && n.nodeType === 1) {
|
|
873
871
|
const id = scopeId + "-s";
|
|
@@ -877,20 +875,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
877
875
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
878
876
|
}
|
|
879
877
|
parent.insertBefore(n, o);
|
|
880
|
-
replacementNodes.push(n);
|
|
881
|
-
}
|
|
882
|
-
else while (o.firstChild) {
|
|
883
|
-
const child = o.firstChild;
|
|
884
|
-
parent.insertBefore(child, o);
|
|
885
|
-
replacementNodes.push(child);
|
|
886
878
|
}
|
|
879
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
887
880
|
parent.removeChild(o);
|
|
888
|
-
slotReplacements.set(o, {
|
|
889
|
-
nodes: replacementNodes,
|
|
890
|
-
usedFallback: !content
|
|
891
|
-
});
|
|
892
881
|
}
|
|
893
|
-
this._updateSlotNodes(slotReplacements);
|
|
894
882
|
}
|
|
895
883
|
/**
|
|
896
884
|
* @internal
|
|
@@ -929,7 +917,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
929
917
|
* @internal
|
|
930
918
|
*/
|
|
931
919
|
_hasShadowRoot() {
|
|
932
|
-
return this.
|
|
920
|
+
return this._root !== this;
|
|
933
921
|
}
|
|
934
922
|
/**
|
|
935
923
|
* @internal
|
|
@@ -974,10 +962,6 @@ var VueElement = class extends VueElementBase {
|
|
|
974
962
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
975
963
|
this._app = this._instance = null;
|
|
976
964
|
}
|
|
977
|
-
/**
|
|
978
|
-
* Only called when shadowRoot is false
|
|
979
|
-
*/
|
|
980
|
-
_updateSlotNodes(replacements) {}
|
|
981
965
|
_createVNode() {
|
|
982
966
|
const baseProps = {};
|
|
983
967
|
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
|
**/
|
|
@@ -825,13 +825,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
825
825
|
_renderSlots() {
|
|
826
826
|
const outlets = this._getSlots();
|
|
827
827
|
const scopeId = this._instance.type.__scopeId;
|
|
828
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
829
828
|
for (let i = 0; i < outlets.length; i++) {
|
|
830
829
|
const o = outlets[i];
|
|
831
830
|
const slotName = o.getAttribute("name") || "default";
|
|
832
831
|
const content = this._slots[slotName];
|
|
833
832
|
const parent = o.parentNode;
|
|
834
|
-
const replacementNodes = [];
|
|
835
833
|
if (content) for (const n of content) {
|
|
836
834
|
if (scopeId && n.nodeType === 1) {
|
|
837
835
|
const id = scopeId + "-s";
|
|
@@ -841,20 +839,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
841
839
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
842
840
|
}
|
|
843
841
|
parent.insertBefore(n, o);
|
|
844
|
-
replacementNodes.push(n);
|
|
845
|
-
}
|
|
846
|
-
else while (o.firstChild) {
|
|
847
|
-
const child = o.firstChild;
|
|
848
|
-
parent.insertBefore(child, o);
|
|
849
|
-
replacementNodes.push(child);
|
|
850
842
|
}
|
|
843
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
851
844
|
parent.removeChild(o);
|
|
852
|
-
slotReplacements.set(o, {
|
|
853
|
-
nodes: replacementNodes,
|
|
854
|
-
usedFallback: !content
|
|
855
|
-
});
|
|
856
845
|
}
|
|
857
|
-
this._updateSlotNodes(slotReplacements);
|
|
858
846
|
}
|
|
859
847
|
/**
|
|
860
848
|
* @internal
|
|
@@ -893,7 +881,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
893
881
|
* @internal
|
|
894
882
|
*/
|
|
895
883
|
_hasShadowRoot() {
|
|
896
|
-
return this.
|
|
884
|
+
return this._root !== this;
|
|
897
885
|
}
|
|
898
886
|
/**
|
|
899
887
|
* @internal
|
|
@@ -926,10 +914,6 @@ var VueElement = class extends VueElementBase {
|
|
|
926
914
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
927
915
|
this._app = this._instance = null;
|
|
928
916
|
}
|
|
929
|
-
/**
|
|
930
|
-
* Only called when shadowRoot is false
|
|
931
|
-
*/
|
|
932
|
-
_updateSlotNodes(replacements) {}
|
|
933
917
|
_createVNode() {
|
|
934
918
|
const baseProps = {};
|
|
935
919
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -1372,10 +1372,6 @@ export declare abstract class VueElementBase<E = Element, C = Component, Def ext
|
|
|
1372
1372
|
protected abstract _mount(def: Def): void;
|
|
1373
1373
|
protected abstract _update(): void;
|
|
1374
1374
|
protected abstract _unmount(): void;
|
|
1375
|
-
protected abstract _updateSlotNodes(slot: Map<Node, {
|
|
1376
|
-
nodes: Node[];
|
|
1377
|
-
usedFallback: boolean;
|
|
1378
|
-
}>): void;
|
|
1379
1375
|
constructor(def: Def, props: Record<string, any> | undefined, createAppFn: CreateAppFunction<E, C>);
|
|
1380
1376
|
connectedCallback(): void;
|
|
1381
1377
|
disconnectedCallback(): void;
|
|
@@ -1409,13 +1405,6 @@ export declare class VueElement extends VueElementBase<Element, Component, Inner
|
|
|
1409
1405
|
protected _mount(def: InnerComponentDef): void;
|
|
1410
1406
|
protected _update(): void;
|
|
1411
1407
|
protected _unmount(): void;
|
|
1412
|
-
/**
|
|
1413
|
-
* Only called when shadowRoot is false
|
|
1414
|
-
*/
|
|
1415
|
-
protected _updateSlotNodes(replacements: Map<Node, {
|
|
1416
|
-
nodes: Node[];
|
|
1417
|
-
usedFallback: boolean;
|
|
1418
|
-
}>): void;
|
|
1419
1408
|
private _createVNode;
|
|
1420
1409
|
}
|
|
1421
1410
|
export declare function useHost(caller?: string): VueElementBase | null;
|
|
@@ -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
|
**/
|
|
@@ -3531,7 +3531,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3531
3531
|
else done();
|
|
3532
3532
|
},
|
|
3533
3533
|
clone(node) {
|
|
3534
|
-
return cloneHooks(node);
|
|
3534
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3535
3535
|
}
|
|
3536
3536
|
};
|
|
3537
3537
|
return hooks;
|
|
@@ -4369,7 +4369,7 @@ function defineAsyncComponent(source) {
|
|
|
4369
4369
|
name: "AsyncComponentWrapper",
|
|
4370
4370
|
__asyncLoader: load,
|
|
4371
4371
|
__asyncHydrate(el, instance, hydrate) {
|
|
4372
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4372
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4373
4373
|
},
|
|
4374
4374
|
get __asyncResolved() {
|
|
4375
4375
|
return getResolvedComp();
|
|
@@ -4488,10 +4488,10 @@ const useAsyncComponentState = (delay, timeout, onError, instance = currentInsta
|
|
|
4488
4488
|
* shared between core and vapor
|
|
4489
4489
|
* @internal
|
|
4490
4490
|
*/
|
|
4491
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4491
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4492
4492
|
const wasConnected = el.isConnected;
|
|
4493
4493
|
let patched = false;
|
|
4494
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4494
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4495
4495
|
const performHydrate = () => {
|
|
4496
4496
|
if (patched) {
|
|
4497
4497
|
{
|
|
@@ -7194,24 +7194,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7194
7194
|
}
|
|
7195
7195
|
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
7196
7196
|
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
7197
|
-
else {
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
else hostInsert(el, container, anchor);
|
|
7202
|
-
};
|
|
7203
|
-
const performLeave = () => {
|
|
7204
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7205
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
7206
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
7207
|
-
else leave(el, () => {
|
|
7208
|
-
remove();
|
|
7209
|
-
afterLeave && afterLeave();
|
|
7210
|
-
});
|
|
7211
|
-
};
|
|
7212
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
7213
|
-
else performLeave();
|
|
7214
|
-
}
|
|
7197
|
+
else performTransitionLeave(el, transition, () => {
|
|
7198
|
+
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
7199
|
+
else hostInsert(el, container, anchor);
|
|
7200
|
+
}, true, true);
|
|
7215
7201
|
} else hostInsert(el, container, anchor);
|
|
7216
7202
|
};
|
|
7217
7203
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
@@ -7443,13 +7429,15 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
|
|
|
7443
7429
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
7444
7430
|
const performRemove = () => {
|
|
7445
7431
|
remove();
|
|
7446
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
7432
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
7447
7433
|
};
|
|
7448
7434
|
if (force || isElement && transition && !transition.persisted) {
|
|
7449
7435
|
const { leave, delayLeave } = transition;
|
|
7450
7436
|
const performLeave = () => {
|
|
7437
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7451
7438
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
7452
|
-
|
|
7439
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
7440
|
+
else leave(el, performRemove);
|
|
7453
7441
|
};
|
|
7454
7442
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
7455
7443
|
else performLeave();
|
|
@@ -8732,7 +8720,7 @@ function isMemoSame(cached, memo) {
|
|
|
8732
8720
|
}
|
|
8733
8721
|
//#endregion
|
|
8734
8722
|
//#region packages/runtime-core/src/index.ts
|
|
8735
|
-
const version = "3.6.0-rc.
|
|
8723
|
+
const version = "3.6.0-rc.7";
|
|
8736
8724
|
const warn = warn$1;
|
|
8737
8725
|
/**
|
|
8738
8726
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9679,13 +9667,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9679
9667
|
_renderSlots() {
|
|
9680
9668
|
const outlets = this._getSlots();
|
|
9681
9669
|
const scopeId = this._instance.type.__scopeId;
|
|
9682
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
9683
9670
|
for (let i = 0; i < outlets.length; i++) {
|
|
9684
9671
|
const o = outlets[i];
|
|
9685
9672
|
const slotName = o.getAttribute("name") || "default";
|
|
9686
9673
|
const content = this._slots[slotName];
|
|
9687
9674
|
const parent = o.parentNode;
|
|
9688
|
-
const replacementNodes = [];
|
|
9689
9675
|
if (content) for (const n of content) {
|
|
9690
9676
|
if (scopeId && n.nodeType === 1) {
|
|
9691
9677
|
const id = scopeId + "-s";
|
|
@@ -9695,20 +9681,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9695
9681
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
9696
9682
|
}
|
|
9697
9683
|
parent.insertBefore(n, o);
|
|
9698
|
-
replacementNodes.push(n);
|
|
9699
|
-
}
|
|
9700
|
-
else while (o.firstChild) {
|
|
9701
|
-
const child = o.firstChild;
|
|
9702
|
-
parent.insertBefore(child, o);
|
|
9703
|
-
replacementNodes.push(child);
|
|
9704
9684
|
}
|
|
9685
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
9705
9686
|
parent.removeChild(o);
|
|
9706
|
-
slotReplacements.set(o, {
|
|
9707
|
-
nodes: replacementNodes,
|
|
9708
|
-
usedFallback: !content
|
|
9709
|
-
});
|
|
9710
9687
|
}
|
|
9711
|
-
this._updateSlotNodes(slotReplacements);
|
|
9712
9688
|
}
|
|
9713
9689
|
/**
|
|
9714
9690
|
* @internal
|
|
@@ -9747,7 +9723,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9747
9723
|
* @internal
|
|
9748
9724
|
*/
|
|
9749
9725
|
_hasShadowRoot() {
|
|
9750
|
-
return this.
|
|
9726
|
+
return this._root !== this;
|
|
9751
9727
|
}
|
|
9752
9728
|
/**
|
|
9753
9729
|
* @internal
|
|
@@ -9792,10 +9768,6 @@ var VueElement = class extends VueElementBase {
|
|
|
9792
9768
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
9793
9769
|
this._app = this._instance = null;
|
|
9794
9770
|
}
|
|
9795
|
-
/**
|
|
9796
|
-
* Only called when shadowRoot is false
|
|
9797
|
-
*/
|
|
9798
|
-
_updateSlotNodes(replacements) {}
|
|
9799
9771
|
_createVNode() {
|
|
9800
9772
|
const baseProps = {};
|
|
9801
9773
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|