@vue/compat 3.6.0-beta.13 → 3.6.0-beta.14
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 +1 -1
- package/dist/vue.cjs.js +71 -34
- package/dist/vue.cjs.prod.js +5 -3
- package/dist/vue.esm-browser.js +71 -34
- package/dist/vue.esm-browser.prod.js +3 -3
- package/dist/vue.esm-bundler.js +71 -34
- package/dist/vue.global.js +71 -34
- package/dist/vue.global.prod.js +3 -3
- package/dist/vue.runtime.esm-browser.js +71 -34
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +71 -34
- package/dist/vue.runtime.global.js +71 -34
- 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-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2695,6 +2695,7 @@ function flushJobs(seen) {
|
|
|
2695
2695
|
}
|
|
2696
2696
|
flushIndex = 0;
|
|
2697
2697
|
jobsLength = 0;
|
|
2698
|
+
jobs.length = 0;
|
|
2698
2699
|
flushPostFlushCbs(seen);
|
|
2699
2700
|
currentFlushPromise = null;
|
|
2700
2701
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
@@ -2752,6 +2753,14 @@ function createRecord(id, initialDef) {
|
|
|
2752
2753
|
function normalizeClassComponent(component) {
|
|
2753
2754
|
return isClassComponent(component) ? component.__vccOpts : component;
|
|
2754
2755
|
}
|
|
2756
|
+
function hasDirtyAncestor(instance, dirtyInstances) {
|
|
2757
|
+
let parent = instance.parent;
|
|
2758
|
+
while (parent) {
|
|
2759
|
+
if (dirtyInstances.has(parent)) return true;
|
|
2760
|
+
parent = parent.parent;
|
|
2761
|
+
}
|
|
2762
|
+
return false;
|
|
2763
|
+
}
|
|
2755
2764
|
function rerender(id, newRender) {
|
|
2756
2765
|
const record = map.get(id);
|
|
2757
2766
|
if (!record) return;
|
|
@@ -2783,42 +2792,69 @@ function reload(id, newComp) {
|
|
|
2783
2792
|
const isVapor = record.initialDef.__vapor;
|
|
2784
2793
|
updateComponentDef(record.initialDef, newComp);
|
|
2785
2794
|
const instances = [...record.instances];
|
|
2786
|
-
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2795
|
+
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2787
2796
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
const
|
|
2791
|
-
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2792
|
-
if (!dirtyInstances) {
|
|
2793
|
-
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2794
|
-
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2795
|
-
}
|
|
2796
|
-
dirtyInstances.add(instance);
|
|
2797
|
-
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2798
|
-
instance.appContext.propsCache.delete(instance.type);
|
|
2799
|
-
instance.appContext.emitsCache.delete(instance.type);
|
|
2800
|
-
instance.appContext.optionsCache.delete(instance.type);
|
|
2801
|
-
if (instance.ceReload) {
|
|
2802
|
-
dirtyInstances.add(instance);
|
|
2803
|
-
instance.ceReload(newComp.styles);
|
|
2804
|
-
dirtyInstances.delete(instance);
|
|
2805
|
-
} else if (instance.parent) queueJob(() => {
|
|
2806
|
-
isHmrUpdating = true;
|
|
2797
|
+
const dirtyInstances = new Set(instances);
|
|
2798
|
+
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2799
|
+
for (const instance of instances) {
|
|
2807
2800
|
const parent = instance.parent;
|
|
2808
|
-
if (parent
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2801
|
+
if (parent) {
|
|
2802
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2803
|
+
rerenderedParents.add(parent);
|
|
2804
|
+
parent.hmrRerender();
|
|
2805
|
+
}
|
|
2806
|
+
} else instance.hmrReload(newComp);
|
|
2807
|
+
}
|
|
2808
|
+
} else {
|
|
2809
|
+
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2810
|
+
const dirtyInstanceSet = new Set(instances);
|
|
2811
|
+
for (const instance of instances) {
|
|
2812
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
2813
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2814
|
+
if (!dirtyInstances) {
|
|
2815
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2816
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2812
2817
|
}
|
|
2813
|
-
|
|
2814
|
-
|
|
2818
|
+
dirtyInstances.add(instance);
|
|
2819
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2820
|
+
instance.appContext.propsCache.delete(instance.type);
|
|
2821
|
+
instance.appContext.emitsCache.delete(instance.type);
|
|
2822
|
+
instance.appContext.optionsCache.delete(instance.type);
|
|
2823
|
+
if (instance.ceReload) {
|
|
2824
|
+
dirtyInstances.add(instance);
|
|
2825
|
+
instance.ceReload(newComp.styles);
|
|
2826
|
+
dirtyInstances.delete(instance);
|
|
2827
|
+
} else if (instance.parent) {
|
|
2828
|
+
const parent = instance.parent;
|
|
2829
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2830
|
+
let updates = parentUpdates.get(parent);
|
|
2831
|
+
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2832
|
+
updates.push([instance, dirtyInstances]);
|
|
2833
|
+
}
|
|
2834
|
+
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2835
|
+
else if (typeof window !== "undefined") window.location.reload();
|
|
2836
|
+
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2837
|
+
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2838
|
+
}
|
|
2839
|
+
parentUpdates.forEach((updates, parent) => {
|
|
2840
|
+
queueJob(() => {
|
|
2841
|
+
isHmrUpdating = true;
|
|
2842
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2843
|
+
else {
|
|
2844
|
+
const i = parent;
|
|
2845
|
+
if (!(i.effect.flags & 1024)) {
|
|
2846
|
+
i.renderCache = [];
|
|
2847
|
+
i.effect.run();
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2850
|
+
nextTick(() => {
|
|
2851
|
+
isHmrUpdating = false;
|
|
2852
|
+
});
|
|
2853
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2854
|
+
dirtyInstances.delete(instance);
|
|
2855
|
+
});
|
|
2815
2856
|
});
|
|
2816
|
-
dirtyInstances.delete(instance);
|
|
2817
2857
|
});
|
|
2818
|
-
else if (instance.appContext.reload) instance.appContext.reload();
|
|
2819
|
-
else if (typeof window !== "undefined") window.location.reload();
|
|
2820
|
-
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2821
|
-
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2822
2858
|
}
|
|
2823
2859
|
queuePostFlushCb(() => {
|
|
2824
2860
|
hmrDirtyComponents.clear();
|
|
@@ -5391,6 +5427,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5391
5427
|
slot: vaporSlot,
|
|
5392
5428
|
fallback
|
|
5393
5429
|
};
|
|
5430
|
+
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5394
5431
|
return ret;
|
|
5395
5432
|
}
|
|
5396
5433
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
@@ -6329,7 +6366,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6329
6366
|
if (options.el) return vm.$mount(options.el);
|
|
6330
6367
|
else return vm;
|
|
6331
6368
|
}
|
|
6332
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6369
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.14`;
|
|
6333
6370
|
Vue.config = singletonApp.config;
|
|
6334
6371
|
Vue.use = (plugin, ...options) => {
|
|
6335
6372
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -9869,7 +9906,7 @@ function isMemoSame(cached, memo) {
|
|
|
9869
9906
|
}
|
|
9870
9907
|
//#endregion
|
|
9871
9908
|
//#region packages/runtime-core/src/index.ts
|
|
9872
|
-
const version = "3.6.0-beta.
|
|
9909
|
+
const version = "3.6.0-beta.14";
|
|
9873
9910
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
9874
9911
|
/**
|
|
9875
9912
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-beta.
|
|
2
|
+
* @vue/compat v3.6.0-beta.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2679,6 +2679,7 @@ var Vue = (function() {
|
|
|
2679
2679
|
}
|
|
2680
2680
|
flushIndex = 0;
|
|
2681
2681
|
jobsLength = 0;
|
|
2682
|
+
jobs.length = 0;
|
|
2682
2683
|
flushPostFlushCbs(seen);
|
|
2683
2684
|
currentFlushPromise = null;
|
|
2684
2685
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
@@ -2736,6 +2737,14 @@ var Vue = (function() {
|
|
|
2736
2737
|
function normalizeClassComponent(component) {
|
|
2737
2738
|
return isClassComponent(component) ? component.__vccOpts : component;
|
|
2738
2739
|
}
|
|
2740
|
+
function hasDirtyAncestor(instance, dirtyInstances) {
|
|
2741
|
+
let parent = instance.parent;
|
|
2742
|
+
while (parent) {
|
|
2743
|
+
if (dirtyInstances.has(parent)) return true;
|
|
2744
|
+
parent = parent.parent;
|
|
2745
|
+
}
|
|
2746
|
+
return false;
|
|
2747
|
+
}
|
|
2739
2748
|
function rerender(id, newRender) {
|
|
2740
2749
|
const record = map.get(id);
|
|
2741
2750
|
if (!record) return;
|
|
@@ -2767,42 +2776,69 @@ var Vue = (function() {
|
|
|
2767
2776
|
const isVapor = record.initialDef.__vapor;
|
|
2768
2777
|
updateComponentDef(record.initialDef, newComp);
|
|
2769
2778
|
const instances = [...record.instances];
|
|
2770
|
-
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2779
|
+
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2771
2780
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
const
|
|
2775
|
-
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2776
|
-
if (!dirtyInstances) {
|
|
2777
|
-
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2778
|
-
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2779
|
-
}
|
|
2780
|
-
dirtyInstances.add(instance);
|
|
2781
|
-
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2782
|
-
instance.appContext.propsCache.delete(instance.type);
|
|
2783
|
-
instance.appContext.emitsCache.delete(instance.type);
|
|
2784
|
-
instance.appContext.optionsCache.delete(instance.type);
|
|
2785
|
-
if (instance.ceReload) {
|
|
2786
|
-
dirtyInstances.add(instance);
|
|
2787
|
-
instance.ceReload(newComp.styles);
|
|
2788
|
-
dirtyInstances.delete(instance);
|
|
2789
|
-
} else if (instance.parent) queueJob(() => {
|
|
2790
|
-
isHmrUpdating = true;
|
|
2781
|
+
const dirtyInstances = new Set(instances);
|
|
2782
|
+
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2783
|
+
for (const instance of instances) {
|
|
2791
2784
|
const parent = instance.parent;
|
|
2792
|
-
if (parent
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2785
|
+
if (parent) {
|
|
2786
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2787
|
+
rerenderedParents.add(parent);
|
|
2788
|
+
parent.hmrRerender();
|
|
2789
|
+
}
|
|
2790
|
+
} else instance.hmrReload(newComp);
|
|
2791
|
+
}
|
|
2792
|
+
} else {
|
|
2793
|
+
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2794
|
+
const dirtyInstanceSet = new Set(instances);
|
|
2795
|
+
for (const instance of instances) {
|
|
2796
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
2797
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2798
|
+
if (!dirtyInstances) {
|
|
2799
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2800
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2796
2801
|
}
|
|
2797
|
-
|
|
2798
|
-
|
|
2802
|
+
dirtyInstances.add(instance);
|
|
2803
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2804
|
+
instance.appContext.propsCache.delete(instance.type);
|
|
2805
|
+
instance.appContext.emitsCache.delete(instance.type);
|
|
2806
|
+
instance.appContext.optionsCache.delete(instance.type);
|
|
2807
|
+
if (instance.ceReload) {
|
|
2808
|
+
dirtyInstances.add(instance);
|
|
2809
|
+
instance.ceReload(newComp.styles);
|
|
2810
|
+
dirtyInstances.delete(instance);
|
|
2811
|
+
} else if (instance.parent) {
|
|
2812
|
+
const parent = instance.parent;
|
|
2813
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2814
|
+
let updates = parentUpdates.get(parent);
|
|
2815
|
+
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2816
|
+
updates.push([instance, dirtyInstances]);
|
|
2817
|
+
}
|
|
2818
|
+
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2819
|
+
else if (typeof window !== "undefined") window.location.reload();
|
|
2820
|
+
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2821
|
+
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2822
|
+
}
|
|
2823
|
+
parentUpdates.forEach((updates, parent) => {
|
|
2824
|
+
queueJob(() => {
|
|
2825
|
+
isHmrUpdating = true;
|
|
2826
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2827
|
+
else {
|
|
2828
|
+
const i = parent;
|
|
2829
|
+
if (!(i.effect.flags & 1024)) {
|
|
2830
|
+
i.renderCache = [];
|
|
2831
|
+
i.effect.run();
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
nextTick(() => {
|
|
2835
|
+
isHmrUpdating = false;
|
|
2836
|
+
});
|
|
2837
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2838
|
+
dirtyInstances.delete(instance);
|
|
2839
|
+
});
|
|
2799
2840
|
});
|
|
2800
|
-
dirtyInstances.delete(instance);
|
|
2801
2841
|
});
|
|
2802
|
-
else if (instance.appContext.reload) instance.appContext.reload();
|
|
2803
|
-
else if (typeof window !== "undefined") window.location.reload();
|
|
2804
|
-
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2805
|
-
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2806
2842
|
}
|
|
2807
2843
|
queuePostFlushCb(() => {
|
|
2808
2844
|
hmrDirtyComponents.clear();
|
|
@@ -5317,6 +5353,7 @@ var Vue = (function() {
|
|
|
5317
5353
|
slot: vaporSlot,
|
|
5318
5354
|
fallback
|
|
5319
5355
|
};
|
|
5356
|
+
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5320
5357
|
return ret;
|
|
5321
5358
|
}
|
|
5322
5359
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
@@ -6253,7 +6290,7 @@ var Vue = (function() {
|
|
|
6253
6290
|
if (options.el) return vm.$mount(options.el);
|
|
6254
6291
|
else return vm;
|
|
6255
6292
|
}
|
|
6256
|
-
Vue.version = `2.6.14-compat:3.6.0-beta.
|
|
6293
|
+
Vue.version = `2.6.14-compat:3.6.0-beta.14`;
|
|
6257
6294
|
Vue.config = singletonApp.config;
|
|
6258
6295
|
Vue.use = (plugin, ...options) => {
|
|
6259
6296
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -9713,7 +9750,7 @@ var Vue = (function() {
|
|
|
9713
9750
|
}
|
|
9714
9751
|
//#endregion
|
|
9715
9752
|
//#region packages/runtime-core/src/index.ts
|
|
9716
|
-
const version = "3.6.0-beta.
|
|
9753
|
+
const version = "3.6.0-beta.14";
|
|
9717
9754
|
const warn = warn$1;
|
|
9718
9755
|
/**
|
|
9719
9756
|
* Runtime error messages. Only exposed in dev or esm builds.
|