@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
|
@@ -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
|
**/
|
|
@@ -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.8
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -451,6 +451,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
451
451
|
function warn$2(msg, ...args) {
|
|
452
452
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
453
453
|
}
|
|
454
|
+
//#endregion
|
|
455
|
+
//#region packages/reactivity/src/system.ts
|
|
454
456
|
const notifyBuffer = [];
|
|
455
457
|
let batchDepth = 0;
|
|
456
458
|
let activeSub = void 0;
|
|
@@ -3529,7 +3531,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3529
3531
|
else done();
|
|
3530
3532
|
},
|
|
3531
3533
|
clone(node) {
|
|
3532
|
-
return cloneHooks(node);
|
|
3534
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3533
3535
|
}
|
|
3534
3536
|
};
|
|
3535
3537
|
return hooks;
|
|
@@ -4367,7 +4369,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4367
4369
|
name: "AsyncComponentWrapper",
|
|
4368
4370
|
__asyncLoader: load,
|
|
4369
4371
|
__asyncHydrate(el, instance, hydrate) {
|
|
4370
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4372
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4371
4373
|
},
|
|
4372
4374
|
get __asyncResolved() {
|
|
4373
4375
|
return getResolvedComp();
|
|
@@ -4486,10 +4488,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4486
4488
|
* shared between core and vapor
|
|
4487
4489
|
* @internal
|
|
4488
4490
|
*/
|
|
4489
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4491
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4490
4492
|
const wasConnected = el.isConnected;
|
|
4491
4493
|
let patched = false;
|
|
4492
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4494
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4493
4495
|
const performHydrate = () => {
|
|
4494
4496
|
if (patched) {
|
|
4495
4497
|
{
|
|
@@ -5328,37 +5330,32 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5328
5330
|
function withAsyncContext(getAwaitable) {
|
|
5329
5331
|
const ctx = getCurrentGenericInstance();
|
|
5330
5332
|
const inSSRSetup = isInSSRComponentSetup;
|
|
5331
|
-
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
5332
5333
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
5333
5334
|
let awaitable = getAwaitable();
|
|
5334
5335
|
setCurrentInstance(null, void 0);
|
|
5335
5336
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5336
5337
|
const restore = () => {
|
|
5337
|
-
const
|
|
5338
|
+
const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5338
5339
|
setCurrentInstance(ctx);
|
|
5339
5340
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
5340
|
-
|
|
5341
|
-
return () => {
|
|
5342
|
-
if (reset) reset();
|
|
5343
|
-
if (resetStoppedScope) resetStoppedScope.reset();
|
|
5344
|
-
};
|
|
5341
|
+
return stoppedScope;
|
|
5345
5342
|
};
|
|
5346
5343
|
const cleanup = () => {
|
|
5347
5344
|
setCurrentInstance(null, void 0);
|
|
5348
5345
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5349
5346
|
};
|
|
5350
5347
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
5351
|
-
const
|
|
5348
|
+
const stoppedScope = restore();
|
|
5352
5349
|
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
5353
|
-
if (
|
|
5350
|
+
if (stoppedScope) stoppedScope.reset();
|
|
5354
5351
|
cleanup();
|
|
5355
5352
|
}));
|
|
5356
5353
|
throw e;
|
|
5357
5354
|
});
|
|
5358
5355
|
return [awaitable, () => {
|
|
5359
|
-
const
|
|
5356
|
+
const stoppedScope = restore();
|
|
5360
5357
|
Promise.resolve().then(() => {
|
|
5361
|
-
if (
|
|
5358
|
+
if (stoppedScope) stoppedScope.reset();
|
|
5362
5359
|
cleanup();
|
|
5363
5360
|
});
|
|
5364
5361
|
}];
|
|
@@ -7192,24 +7189,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7192
7189
|
}
|
|
7193
7190
|
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
7194
7191
|
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
|
-
}
|
|
7192
|
+
else performTransitionLeave(el, transition, () => {
|
|
7193
|
+
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
7194
|
+
else hostInsert(el, container, anchor);
|
|
7195
|
+
}, true, true);
|
|
7213
7196
|
} else hostInsert(el, container, anchor);
|
|
7214
7197
|
};
|
|
7215
7198
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
@@ -7441,13 +7424,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7441
7424
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
7442
7425
|
const performRemove = () => {
|
|
7443
7426
|
remove();
|
|
7444
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
7427
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
7445
7428
|
};
|
|
7446
7429
|
if (force || isElement && transition && !transition.persisted) {
|
|
7447
7430
|
const { leave, delayLeave } = transition;
|
|
7448
7431
|
const performLeave = () => {
|
|
7432
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7449
7433
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
7450
|
-
|
|
7434
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
7435
|
+
else leave(el, performRemove);
|
|
7451
7436
|
};
|
|
7452
7437
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
7453
7438
|
else performLeave();
|
|
@@ -8730,7 +8715,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8730
8715
|
}
|
|
8731
8716
|
//#endregion
|
|
8732
8717
|
//#region packages/runtime-core/src/index.ts
|
|
8733
|
-
const version = "3.6.0-rc.
|
|
8718
|
+
const version = "3.6.0-rc.8";
|
|
8734
8719
|
const warn = warn$1;
|
|
8735
8720
|
/**
|
|
8736
8721
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9677,13 +9662,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9677
9662
|
_renderSlots() {
|
|
9678
9663
|
const outlets = this._getSlots();
|
|
9679
9664
|
const scopeId = this._instance.type.__scopeId;
|
|
9680
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
9681
9665
|
for (let i = 0; i < outlets.length; i++) {
|
|
9682
9666
|
const o = outlets[i];
|
|
9683
9667
|
const slotName = o.getAttribute("name") || "default";
|
|
9684
9668
|
const content = this._slots[slotName];
|
|
9685
9669
|
const parent = o.parentNode;
|
|
9686
|
-
const replacementNodes = [];
|
|
9687
9670
|
if (content) for (const n of content) {
|
|
9688
9671
|
if (scopeId && n.nodeType === 1) {
|
|
9689
9672
|
const id = scopeId + "-s";
|
|
@@ -9693,20 +9676,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9693
9676
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
9694
9677
|
}
|
|
9695
9678
|
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
9679
|
}
|
|
9680
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
9703
9681
|
parent.removeChild(o);
|
|
9704
|
-
slotReplacements.set(o, {
|
|
9705
|
-
nodes: replacementNodes,
|
|
9706
|
-
usedFallback: !content
|
|
9707
|
-
});
|
|
9708
9682
|
}
|
|
9709
|
-
this._updateSlotNodes(slotReplacements);
|
|
9710
9683
|
}
|
|
9711
9684
|
/**
|
|
9712
9685
|
* @internal
|
|
@@ -9745,7 +9718,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9745
9718
|
* @internal
|
|
9746
9719
|
*/
|
|
9747
9720
|
_hasShadowRoot() {
|
|
9748
|
-
return this.
|
|
9721
|
+
return this._root !== this;
|
|
9749
9722
|
}
|
|
9750
9723
|
/**
|
|
9751
9724
|
* @internal
|
|
@@ -9790,10 +9763,6 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9790
9763
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
9791
9764
|
this._app = this._instance = null;
|
|
9792
9765
|
}
|
|
9793
|
-
/**
|
|
9794
|
-
* Only called when shadowRoot is false
|
|
9795
|
-
*/
|
|
9796
|
-
_updateSlotNodes(replacements) {}
|
|
9797
9766
|
_createVNode() {
|
|
9798
9767
|
const baseProps = {};
|
|
9799
9768
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|