@vue/runtime-dom 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/runtime-dom.cjs.js +1 -1
- package/dist/runtime-dom.cjs.prod.js +1 -1
- package/dist/runtime-dom.esm-browser.js +70 -33
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +1 -1
- package/dist/runtime-dom.global.js +70 -33
- 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-beta.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-beta.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2590,6 +2590,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2590
2590
|
}
|
|
2591
2591
|
flushIndex = 0;
|
|
2592
2592
|
jobsLength = 0;
|
|
2593
|
+
jobs.length = 0;
|
|
2593
2594
|
flushPostFlushCbs(seen);
|
|
2594
2595
|
currentFlushPromise = null;
|
|
2595
2596
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
@@ -2647,6 +2648,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2647
2648
|
function normalizeClassComponent(component) {
|
|
2648
2649
|
return isClassComponent(component) ? component.__vccOpts : component;
|
|
2649
2650
|
}
|
|
2651
|
+
function hasDirtyAncestor(instance, dirtyInstances) {
|
|
2652
|
+
let parent = instance.parent;
|
|
2653
|
+
while (parent) {
|
|
2654
|
+
if (dirtyInstances.has(parent)) return true;
|
|
2655
|
+
parent = parent.parent;
|
|
2656
|
+
}
|
|
2657
|
+
return false;
|
|
2658
|
+
}
|
|
2650
2659
|
function rerender(id, newRender) {
|
|
2651
2660
|
const record = map.get(id);
|
|
2652
2661
|
if (!record) return;
|
|
@@ -2678,42 +2687,69 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2678
2687
|
const isVapor = record.initialDef.__vapor;
|
|
2679
2688
|
updateComponentDef(record.initialDef, newComp);
|
|
2680
2689
|
const instances = [...record.instances];
|
|
2681
|
-
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2690
|
+
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2682
2691
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
const
|
|
2686
|
-
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2687
|
-
if (!dirtyInstances) {
|
|
2688
|
-
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2689
|
-
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2690
|
-
}
|
|
2691
|
-
dirtyInstances.add(instance);
|
|
2692
|
-
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2693
|
-
instance.appContext.propsCache.delete(instance.type);
|
|
2694
|
-
instance.appContext.emitsCache.delete(instance.type);
|
|
2695
|
-
instance.appContext.optionsCache.delete(instance.type);
|
|
2696
|
-
if (instance.ceReload) {
|
|
2697
|
-
dirtyInstances.add(instance);
|
|
2698
|
-
instance.ceReload(newComp.styles);
|
|
2699
|
-
dirtyInstances.delete(instance);
|
|
2700
|
-
} else if (instance.parent) queueJob(() => {
|
|
2701
|
-
isHmrUpdating = true;
|
|
2692
|
+
const dirtyInstances = new Set(instances);
|
|
2693
|
+
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2694
|
+
for (const instance of instances) {
|
|
2702
2695
|
const parent = instance.parent;
|
|
2703
|
-
if (parent
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2696
|
+
if (parent) {
|
|
2697
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2698
|
+
rerenderedParents.add(parent);
|
|
2699
|
+
parent.hmrRerender();
|
|
2700
|
+
}
|
|
2701
|
+
} else instance.hmrReload(newComp);
|
|
2702
|
+
}
|
|
2703
|
+
} else {
|
|
2704
|
+
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2705
|
+
const dirtyInstanceSet = new Set(instances);
|
|
2706
|
+
for (const instance of instances) {
|
|
2707
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
2708
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2709
|
+
if (!dirtyInstances) {
|
|
2710
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2711
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2707
2712
|
}
|
|
2708
|
-
|
|
2709
|
-
|
|
2713
|
+
dirtyInstances.add(instance);
|
|
2714
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2715
|
+
instance.appContext.propsCache.delete(instance.type);
|
|
2716
|
+
instance.appContext.emitsCache.delete(instance.type);
|
|
2717
|
+
instance.appContext.optionsCache.delete(instance.type);
|
|
2718
|
+
if (instance.ceReload) {
|
|
2719
|
+
dirtyInstances.add(instance);
|
|
2720
|
+
instance.ceReload(newComp.styles);
|
|
2721
|
+
dirtyInstances.delete(instance);
|
|
2722
|
+
} else if (instance.parent) {
|
|
2723
|
+
const parent = instance.parent;
|
|
2724
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2725
|
+
let updates = parentUpdates.get(parent);
|
|
2726
|
+
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2727
|
+
updates.push([instance, dirtyInstances]);
|
|
2728
|
+
}
|
|
2729
|
+
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2730
|
+
else if (typeof window !== "undefined") window.location.reload();
|
|
2731
|
+
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2732
|
+
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2733
|
+
}
|
|
2734
|
+
parentUpdates.forEach((updates, parent) => {
|
|
2735
|
+
queueJob(() => {
|
|
2736
|
+
isHmrUpdating = true;
|
|
2737
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2738
|
+
else {
|
|
2739
|
+
const i = parent;
|
|
2740
|
+
if (!(i.effect.flags & 1024)) {
|
|
2741
|
+
i.renderCache = [];
|
|
2742
|
+
i.effect.run();
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
nextTick(() => {
|
|
2746
|
+
isHmrUpdating = false;
|
|
2747
|
+
});
|
|
2748
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2749
|
+
dirtyInstances.delete(instance);
|
|
2750
|
+
});
|
|
2710
2751
|
});
|
|
2711
|
-
dirtyInstances.delete(instance);
|
|
2712
2752
|
});
|
|
2713
|
-
else if (instance.appContext.reload) instance.appContext.reload();
|
|
2714
|
-
else if (typeof window !== "undefined") window.location.reload();
|
|
2715
|
-
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2716
|
-
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2717
2753
|
}
|
|
2718
2754
|
queuePostFlushCb(() => {
|
|
2719
2755
|
hmrDirtyComponents.clear();
|
|
@@ -4661,6 +4697,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4661
4697
|
slot: vaporSlot,
|
|
4662
4698
|
fallback
|
|
4663
4699
|
};
|
|
4700
|
+
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
4664
4701
|
return ret;
|
|
4665
4702
|
}
|
|
4666
4703
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
@@ -8365,7 +8402,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8365
8402
|
}
|
|
8366
8403
|
//#endregion
|
|
8367
8404
|
//#region packages/runtime-core/src/index.ts
|
|
8368
|
-
const version = "3.6.0-beta.
|
|
8405
|
+
const version = "3.6.0-beta.14";
|
|
8369
8406
|
const warn = warn$1;
|
|
8370
8407
|
/**
|
|
8371
8408
|
* Runtime error messages. Only exposed in dev or esm builds.
|