@vue/runtime-dom 3.6.0-rc.6 → 3.6.0-rc.8
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 +24 -55
- 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 +24 -55
- 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.8
|
|
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.8
|
|
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.8
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -449,6 +449,8 @@ function setupFlagsHandler(target) {
|
|
|
449
449
|
function warn$2(msg, ...args) {
|
|
450
450
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
451
451
|
}
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region packages/reactivity/src/system.ts
|
|
452
454
|
const notifyBuffer = [];
|
|
453
455
|
let batchDepth = 0;
|
|
454
456
|
let activeSub = void 0;
|
|
@@ -3531,7 +3533,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3531
3533
|
else done();
|
|
3532
3534
|
},
|
|
3533
3535
|
clone(node) {
|
|
3534
|
-
return cloneHooks(node);
|
|
3536
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3535
3537
|
}
|
|
3536
3538
|
};
|
|
3537
3539
|
return hooks;
|
|
@@ -4369,7 +4371,7 @@ function defineAsyncComponent(source) {
|
|
|
4369
4371
|
name: "AsyncComponentWrapper",
|
|
4370
4372
|
__asyncLoader: load,
|
|
4371
4373
|
__asyncHydrate(el, instance, hydrate) {
|
|
4372
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4374
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4373
4375
|
},
|
|
4374
4376
|
get __asyncResolved() {
|
|
4375
4377
|
return getResolvedComp();
|
|
@@ -4488,10 +4490,10 @@ const useAsyncComponentState = (delay, timeout, onError, instance = currentInsta
|
|
|
4488
4490
|
* shared between core and vapor
|
|
4489
4491
|
* @internal
|
|
4490
4492
|
*/
|
|
4491
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4493
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4492
4494
|
const wasConnected = el.isConnected;
|
|
4493
4495
|
let patched = false;
|
|
4494
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4496
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4495
4497
|
const performHydrate = () => {
|
|
4496
4498
|
if (patched) {
|
|
4497
4499
|
{
|
|
@@ -5330,37 +5332,32 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
5330
5332
|
function withAsyncContext(getAwaitable) {
|
|
5331
5333
|
const ctx = getCurrentGenericInstance();
|
|
5332
5334
|
const inSSRSetup = isInSSRComponentSetup;
|
|
5333
|
-
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
5334
5335
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
5335
5336
|
let awaitable = getAwaitable();
|
|
5336
5337
|
setCurrentInstance(null, void 0);
|
|
5337
5338
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5338
5339
|
const restore = () => {
|
|
5339
|
-
const
|
|
5340
|
+
const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5340
5341
|
setCurrentInstance(ctx);
|
|
5341
5342
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
5342
|
-
|
|
5343
|
-
return () => {
|
|
5344
|
-
if (reset) reset();
|
|
5345
|
-
if (resetStoppedScope) resetStoppedScope.reset();
|
|
5346
|
-
};
|
|
5343
|
+
return stoppedScope;
|
|
5347
5344
|
};
|
|
5348
5345
|
const cleanup = () => {
|
|
5349
5346
|
setCurrentInstance(null, void 0);
|
|
5350
5347
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5351
5348
|
};
|
|
5352
5349
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
5353
|
-
const
|
|
5350
|
+
const stoppedScope = restore();
|
|
5354
5351
|
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
5355
|
-
if (
|
|
5352
|
+
if (stoppedScope) stoppedScope.reset();
|
|
5356
5353
|
cleanup();
|
|
5357
5354
|
}));
|
|
5358
5355
|
throw e;
|
|
5359
5356
|
});
|
|
5360
5357
|
return [awaitable, () => {
|
|
5361
|
-
const
|
|
5358
|
+
const stoppedScope = restore();
|
|
5362
5359
|
Promise.resolve().then(() => {
|
|
5363
|
-
if (
|
|
5360
|
+
if (stoppedScope) stoppedScope.reset();
|
|
5364
5361
|
cleanup();
|
|
5365
5362
|
});
|
|
5366
5363
|
}];
|
|
@@ -7194,24 +7191,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7194
7191
|
}
|
|
7195
7192
|
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
7196
7193
|
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
|
-
}
|
|
7194
|
+
else performTransitionLeave(el, transition, () => {
|
|
7195
|
+
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
7196
|
+
else hostInsert(el, container, anchor);
|
|
7197
|
+
}, true, true);
|
|
7215
7198
|
} else hostInsert(el, container, anchor);
|
|
7216
7199
|
};
|
|
7217
7200
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
@@ -7443,13 +7426,15 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
|
|
|
7443
7426
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
7444
7427
|
const performRemove = () => {
|
|
7445
7428
|
remove();
|
|
7446
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
7429
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
7447
7430
|
};
|
|
7448
7431
|
if (force || isElement && transition && !transition.persisted) {
|
|
7449
7432
|
const { leave, delayLeave } = transition;
|
|
7450
7433
|
const performLeave = () => {
|
|
7434
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7451
7435
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
7452
|
-
|
|
7436
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
7437
|
+
else leave(el, performRemove);
|
|
7453
7438
|
};
|
|
7454
7439
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
7455
7440
|
else performLeave();
|
|
@@ -8732,7 +8717,7 @@ function isMemoSame(cached, memo) {
|
|
|
8732
8717
|
}
|
|
8733
8718
|
//#endregion
|
|
8734
8719
|
//#region packages/runtime-core/src/index.ts
|
|
8735
|
-
const version = "3.6.0-rc.
|
|
8720
|
+
const version = "3.6.0-rc.8";
|
|
8736
8721
|
const warn = warn$1;
|
|
8737
8722
|
/**
|
|
8738
8723
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9679,13 +9664,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9679
9664
|
_renderSlots() {
|
|
9680
9665
|
const outlets = this._getSlots();
|
|
9681
9666
|
const scopeId = this._instance.type.__scopeId;
|
|
9682
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
9683
9667
|
for (let i = 0; i < outlets.length; i++) {
|
|
9684
9668
|
const o = outlets[i];
|
|
9685
9669
|
const slotName = o.getAttribute("name") || "default";
|
|
9686
9670
|
const content = this._slots[slotName];
|
|
9687
9671
|
const parent = o.parentNode;
|
|
9688
|
-
const replacementNodes = [];
|
|
9689
9672
|
if (content) for (const n of content) {
|
|
9690
9673
|
if (scopeId && n.nodeType === 1) {
|
|
9691
9674
|
const id = scopeId + "-s";
|
|
@@ -9695,20 +9678,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9695
9678
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
9696
9679
|
}
|
|
9697
9680
|
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
9681
|
}
|
|
9682
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
9705
9683
|
parent.removeChild(o);
|
|
9706
|
-
slotReplacements.set(o, {
|
|
9707
|
-
nodes: replacementNodes,
|
|
9708
|
-
usedFallback: !content
|
|
9709
|
-
});
|
|
9710
9684
|
}
|
|
9711
|
-
this._updateSlotNodes(slotReplacements);
|
|
9712
9685
|
}
|
|
9713
9686
|
/**
|
|
9714
9687
|
* @internal
|
|
@@ -9747,7 +9720,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9747
9720
|
* @internal
|
|
9748
9721
|
*/
|
|
9749
9722
|
_hasShadowRoot() {
|
|
9750
|
-
return this.
|
|
9723
|
+
return this._root !== this;
|
|
9751
9724
|
}
|
|
9752
9725
|
/**
|
|
9753
9726
|
* @internal
|
|
@@ -9792,10 +9765,6 @@ var VueElement = class extends VueElementBase {
|
|
|
9792
9765
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
9793
9766
|
this._app = this._instance = null;
|
|
9794
9767
|
}
|
|
9795
|
-
/**
|
|
9796
|
-
* Only called when shadowRoot is false
|
|
9797
|
-
*/
|
|
9798
|
-
_updateSlotNodes(replacements) {}
|
|
9799
9768
|
_createVNode() {
|
|
9800
9769
|
const baseProps = {};
|
|
9801
9770
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|