@vue/compat 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/vue-compat.d.ts +5 -12
- package/dist/vue.cjs.js +25 -56
- package/dist/vue.cjs.prod.js +25 -56
- package/dist/vue.esm-browser.js +25 -56
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +25 -56
- package/dist/vue.global.js +25 -56
- package/dist/vue.global.prod.js +3 -3
- package/dist/vue.runtime.esm-browser.js +25 -56
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +25 -56
- package/dist/vue.runtime.global.js +25 -56
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.8
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -539,6 +539,8 @@ function setupFlagsHandler(target) {
|
|
|
539
539
|
function warn$2(msg, ...args) {
|
|
540
540
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
541
541
|
}
|
|
542
|
+
//#endregion
|
|
543
|
+
//#region packages/reactivity/src/system.ts
|
|
542
544
|
const notifyBuffer = [];
|
|
543
545
|
let batchDepth = 0;
|
|
544
546
|
let activeSub = void 0;
|
|
@@ -3975,7 +3977,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3975
3977
|
else done();
|
|
3976
3978
|
},
|
|
3977
3979
|
clone(node) {
|
|
3978
|
-
return cloneHooks(node);
|
|
3980
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3979
3981
|
}
|
|
3980
3982
|
};
|
|
3981
3983
|
return hooks;
|
|
@@ -4813,7 +4815,7 @@ function defineAsyncComponent(source) {
|
|
|
4813
4815
|
name: "AsyncComponentWrapper",
|
|
4814
4816
|
__asyncLoader: load,
|
|
4815
4817
|
__asyncHydrate(el, instance, hydrate) {
|
|
4816
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4818
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4817
4819
|
},
|
|
4818
4820
|
get __asyncResolved() {
|
|
4819
4821
|
return getResolvedComp();
|
|
@@ -4932,10 +4934,10 @@ const useAsyncComponentState = (delay, timeout, onError, instance = currentInsta
|
|
|
4932
4934
|
* shared between core and vapor
|
|
4933
4935
|
* @internal
|
|
4934
4936
|
*/
|
|
4935
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4937
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4936
4938
|
const wasConnected = el.isConnected;
|
|
4937
4939
|
let patched = false;
|
|
4938
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4940
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4939
4941
|
const performHydrate = () => {
|
|
4940
4942
|
if (patched) {
|
|
4941
4943
|
{
|
|
@@ -6184,37 +6186,32 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
6184
6186
|
function withAsyncContext(getAwaitable) {
|
|
6185
6187
|
const ctx = getCurrentGenericInstance();
|
|
6186
6188
|
const inSSRSetup = isInSSRComponentSetup;
|
|
6187
|
-
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
6188
6189
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
6189
6190
|
let awaitable = getAwaitable();
|
|
6190
6191
|
setCurrentInstance(null, void 0);
|
|
6191
6192
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
6192
6193
|
const restore = () => {
|
|
6193
|
-
const
|
|
6194
|
+
const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
6194
6195
|
setCurrentInstance(ctx);
|
|
6195
6196
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
6196
|
-
|
|
6197
|
-
return () => {
|
|
6198
|
-
if (reset) reset();
|
|
6199
|
-
if (resetStoppedScope) resetStoppedScope.reset();
|
|
6200
|
-
};
|
|
6197
|
+
return stoppedScope;
|
|
6201
6198
|
};
|
|
6202
6199
|
const cleanup = () => {
|
|
6203
6200
|
setCurrentInstance(null, void 0);
|
|
6204
6201
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
6205
6202
|
};
|
|
6206
6203
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
6207
|
-
const
|
|
6204
|
+
const stoppedScope = restore();
|
|
6208
6205
|
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
6209
|
-
if (
|
|
6206
|
+
if (stoppedScope) stoppedScope.reset();
|
|
6210
6207
|
cleanup();
|
|
6211
6208
|
}));
|
|
6212
6209
|
throw e;
|
|
6213
6210
|
});
|
|
6214
6211
|
return [awaitable, () => {
|
|
6215
|
-
const
|
|
6212
|
+
const stoppedScope = restore();
|
|
6216
6213
|
Promise.resolve().then(() => {
|
|
6217
|
-
if (
|
|
6214
|
+
if (stoppedScope) stoppedScope.reset();
|
|
6218
6215
|
cleanup();
|
|
6219
6216
|
});
|
|
6220
6217
|
}];
|
|
@@ -6539,7 +6536,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6539
6536
|
if (options.el) return vm.$mount(options.el);
|
|
6540
6537
|
else return vm;
|
|
6541
6538
|
}
|
|
6542
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6539
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.8`;
|
|
6543
6540
|
Vue.config = singletonApp.config;
|
|
6544
6541
|
Vue.use = (plugin, ...options) => {
|
|
6545
6542
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8505,24 +8502,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8505
8502
|
}
|
|
8506
8503
|
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
8507
8504
|
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
8508
|
-
else {
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
else hostInsert(el, container, anchor);
|
|
8513
|
-
};
|
|
8514
|
-
const performLeave = () => {
|
|
8515
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8516
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
8517
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
8518
|
-
else leave(el, () => {
|
|
8519
|
-
remove();
|
|
8520
|
-
afterLeave && afterLeave();
|
|
8521
|
-
});
|
|
8522
|
-
};
|
|
8523
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
8524
|
-
else performLeave();
|
|
8525
|
-
}
|
|
8505
|
+
else performTransitionLeave(el, transition, () => {
|
|
8506
|
+
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
8507
|
+
else hostInsert(el, container, anchor);
|
|
8508
|
+
}, true, true);
|
|
8526
8509
|
} else hostInsert(el, container, anchor);
|
|
8527
8510
|
};
|
|
8528
8511
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
@@ -8756,13 +8739,15 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
|
|
|
8756
8739
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
8757
8740
|
const performRemove = () => {
|
|
8758
8741
|
remove();
|
|
8759
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8742
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
8760
8743
|
};
|
|
8761
8744
|
if (force || isElement && transition && !transition.persisted) {
|
|
8762
8745
|
const { leave, delayLeave } = transition;
|
|
8763
8746
|
const performLeave = () => {
|
|
8747
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8764
8748
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
8765
|
-
|
|
8749
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
8750
|
+
else leave(el, performRemove);
|
|
8766
8751
|
};
|
|
8767
8752
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
8768
8753
|
else performLeave();
|
|
@@ -10093,7 +10078,7 @@ function isMemoSame(cached, memo) {
|
|
|
10093
10078
|
}
|
|
10094
10079
|
//#endregion
|
|
10095
10080
|
//#region packages/runtime-core/src/index.ts
|
|
10096
|
-
const version = "3.6.0-rc.
|
|
10081
|
+
const version = "3.6.0-rc.8";
|
|
10097
10082
|
const warn = warn$1;
|
|
10098
10083
|
/**
|
|
10099
10084
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -11090,13 +11075,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11090
11075
|
_renderSlots() {
|
|
11091
11076
|
const outlets = this._getSlots();
|
|
11092
11077
|
const scopeId = this._instance.type.__scopeId;
|
|
11093
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
11094
11078
|
for (let i = 0; i < outlets.length; i++) {
|
|
11095
11079
|
const o = outlets[i];
|
|
11096
11080
|
const slotName = o.getAttribute("name") || "default";
|
|
11097
11081
|
const content = this._slots[slotName];
|
|
11098
11082
|
const parent = o.parentNode;
|
|
11099
|
-
const replacementNodes = [];
|
|
11100
11083
|
if (content) for (const n of content) {
|
|
11101
11084
|
if (scopeId && n.nodeType === 1) {
|
|
11102
11085
|
const id = scopeId + "-s";
|
|
@@ -11106,20 +11089,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11106
11089
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
11107
11090
|
}
|
|
11108
11091
|
parent.insertBefore(n, o);
|
|
11109
|
-
replacementNodes.push(n);
|
|
11110
|
-
}
|
|
11111
|
-
else while (o.firstChild) {
|
|
11112
|
-
const child = o.firstChild;
|
|
11113
|
-
parent.insertBefore(child, o);
|
|
11114
|
-
replacementNodes.push(child);
|
|
11115
11092
|
}
|
|
11093
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
11116
11094
|
parent.removeChild(o);
|
|
11117
|
-
slotReplacements.set(o, {
|
|
11118
|
-
nodes: replacementNodes,
|
|
11119
|
-
usedFallback: !content
|
|
11120
|
-
});
|
|
11121
11095
|
}
|
|
11122
|
-
this._updateSlotNodes(slotReplacements);
|
|
11123
11096
|
}
|
|
11124
11097
|
/**
|
|
11125
11098
|
* @internal
|
|
@@ -11158,7 +11131,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11158
11131
|
* @internal
|
|
11159
11132
|
*/
|
|
11160
11133
|
_hasShadowRoot() {
|
|
11161
|
-
return this.
|
|
11134
|
+
return this._root !== this;
|
|
11162
11135
|
}
|
|
11163
11136
|
/**
|
|
11164
11137
|
* @internal
|
|
@@ -11203,10 +11176,6 @@ var VueElement = class extends VueElementBase {
|
|
|
11203
11176
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
11204
11177
|
this._app = this._instance = null;
|
|
11205
11178
|
}
|
|
11206
|
-
/**
|
|
11207
|
-
* Only called when shadowRoot is false
|
|
11208
|
-
*/
|
|
11209
|
-
_updateSlotNodes(replacements) {}
|
|
11210
11179
|
_createVNode() {
|
|
11211
11180
|
const baseProps = {};
|
|
11212
11181
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|