@vue/runtime-dom 3.6.0-alpha.6 → 3.6.0-alpha.7
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.d.ts +1 -1
- package/dist/runtime-dom.esm-browser.js +36 -14
- 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 +36 -14
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
package/dist/runtime-dom.cjs.js
CHANGED
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-alpha.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-alpha.7
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1997,6 +1997,16 @@ class EffectScope {
|
|
|
1997
1997
|
return;
|
|
1998
1998
|
}
|
|
1999
1999
|
this.flags = 1024;
|
|
2000
|
+
this.reset();
|
|
2001
|
+
const sub = this.subs;
|
|
2002
|
+
if (sub !== void 0) {
|
|
2003
|
+
unlink(sub);
|
|
2004
|
+
}
|
|
2005
|
+
}
|
|
2006
|
+
/**
|
|
2007
|
+
* @internal
|
|
2008
|
+
*/
|
|
2009
|
+
reset() {
|
|
2000
2010
|
let dep = this.deps;
|
|
2001
2011
|
while (dep !== void 0) {
|
|
2002
2012
|
const node = dep.dep;
|
|
@@ -2007,10 +2017,6 @@ class EffectScope {
|
|
|
2007
2017
|
dep = unlink(dep, this);
|
|
2008
2018
|
}
|
|
2009
2019
|
}
|
|
2010
|
-
const sub = this.subs;
|
|
2011
|
-
if (sub !== void 0) {
|
|
2012
|
-
unlink(sub);
|
|
2013
|
-
}
|
|
2014
2020
|
cleanup(this);
|
|
2015
2021
|
}
|
|
2016
2022
|
}
|
|
@@ -2822,6 +2828,7 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2822
2828
|
|
|
2823
2829
|
let isHmrUpdating = false;
|
|
2824
2830
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2831
|
+
const hmrDirtyComponentsMode = /* @__PURE__ */ new Map();
|
|
2825
2832
|
{
|
|
2826
2833
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
2827
2834
|
createRecord: tryWrap(createRecord),
|
|
@@ -2885,9 +2892,10 @@ function reload(id, newComp) {
|
|
|
2885
2892
|
const record = map.get(id);
|
|
2886
2893
|
if (!record) return;
|
|
2887
2894
|
newComp = normalizeClassComponent(newComp);
|
|
2895
|
+
const isVapor = record.initialDef.__vapor;
|
|
2888
2896
|
updateComponentDef(record.initialDef, newComp);
|
|
2889
2897
|
const instances = [...record.instances];
|
|
2890
|
-
if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2898
|
+
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2891
2899
|
for (const instance of instances) {
|
|
2892
2900
|
if (instance.root && instance.root.ce && instance !== instance.root) {
|
|
2893
2901
|
instance.root.ce._removeChildStyle(instance.type);
|
|
@@ -2907,6 +2915,7 @@ function reload(id, newComp) {
|
|
|
2907
2915
|
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2908
2916
|
}
|
|
2909
2917
|
dirtyInstances.add(instance);
|
|
2918
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2910
2919
|
instance.appContext.propsCache.delete(instance.type);
|
|
2911
2920
|
instance.appContext.emitsCache.delete(instance.type);
|
|
2912
2921
|
instance.appContext.optionsCache.delete(instance.type);
|
|
@@ -2947,6 +2956,7 @@ function reload(id, newComp) {
|
|
|
2947
2956
|
}
|
|
2948
2957
|
queuePostFlushCb(() => {
|
|
2949
2958
|
hmrDirtyComponents.clear();
|
|
2959
|
+
hmrDirtyComponentsMode.clear();
|
|
2950
2960
|
});
|
|
2951
2961
|
}
|
|
2952
2962
|
function updateComponentDef(oldComp, newComp) {
|
|
@@ -3577,7 +3587,7 @@ const BaseTransitionPropsValidators = {
|
|
|
3577
3587
|
onAppearCancelled: TransitionHookValidator
|
|
3578
3588
|
};
|
|
3579
3589
|
const recursiveGetSubtree = (instance) => {
|
|
3580
|
-
const subTree = instance.type
|
|
3590
|
+
const subTree = isVaporComponent(instance.type) ? instance.block : instance.subTree;
|
|
3581
3591
|
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
3582
3592
|
};
|
|
3583
3593
|
const BaseTransitionImpl = {
|
|
@@ -3884,7 +3894,7 @@ function getInnerChild$1(vnode) {
|
|
|
3884
3894
|
}
|
|
3885
3895
|
function setTransitionHooks(vnode, hooks) {
|
|
3886
3896
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3887
|
-
if (vnode.type
|
|
3897
|
+
if (isVaporComponent(vnode.type)) {
|
|
3888
3898
|
getVaporInterface(vnode.component, vnode).setTransitionHooks(
|
|
3889
3899
|
vnode.component,
|
|
3890
3900
|
hooks
|
|
@@ -7973,7 +7983,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7973
7983
|
);
|
|
7974
7984
|
break;
|
|
7975
7985
|
case VaporSlot:
|
|
7976
|
-
getVaporInterface(parentComponent, n2).slot(
|
|
7986
|
+
getVaporInterface(parentComponent, n2).slot(
|
|
7987
|
+
n1,
|
|
7988
|
+
n2,
|
|
7989
|
+
container,
|
|
7990
|
+
anchor,
|
|
7991
|
+
parentComponent
|
|
7992
|
+
);
|
|
7977
7993
|
break;
|
|
7978
7994
|
default:
|
|
7979
7995
|
if (shapeFlag & 1) {
|
|
@@ -9154,7 +9170,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9154
9170
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
9155
9171
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
9156
9172
|
if (shapeFlag & 6) {
|
|
9157
|
-
if (type
|
|
9173
|
+
if (isVaporComponent(type)) {
|
|
9158
9174
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor);
|
|
9159
9175
|
} else {
|
|
9160
9176
|
move(
|
|
@@ -9264,7 +9280,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9264
9280
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
9265
9281
|
}
|
|
9266
9282
|
if (shapeFlag & 256) {
|
|
9267
|
-
if (vnode.type
|
|
9283
|
+
if (isVaporComponent(vnode.type)) {
|
|
9268
9284
|
getVaporInterface(parentComponent, vnode).deactivate(
|
|
9269
9285
|
vnode,
|
|
9270
9286
|
parentComponent.ctx.getStorageContainer()
|
|
@@ -9281,7 +9297,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9281
9297
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
9282
9298
|
}
|
|
9283
9299
|
if (shapeFlag & 6) {
|
|
9284
|
-
if (type
|
|
9300
|
+
if (isVaporComponent(type)) {
|
|
9285
9301
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
9286
9302
|
return;
|
|
9287
9303
|
} else {
|
|
@@ -9413,7 +9429,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9413
9429
|
};
|
|
9414
9430
|
const getNextHostNode = (vnode) => {
|
|
9415
9431
|
if (vnode.shapeFlag & 6) {
|
|
9416
|
-
if (vnode.type
|
|
9432
|
+
if (isVaporComponent(vnode.type)) {
|
|
9417
9433
|
return hostNextSibling(vnode.anchor);
|
|
9418
9434
|
}
|
|
9419
9435
|
return getNextHostNode(vnode.component.subTree);
|
|
@@ -9603,6 +9619,12 @@ app.use(vaporInteropPlugin)
|
|
|
9603
9619
|
}
|
|
9604
9620
|
return res;
|
|
9605
9621
|
}
|
|
9622
|
+
function isVaporComponent(type) {
|
|
9623
|
+
if (isHmrUpdating && hmrDirtyComponentsMode.has(type)) {
|
|
9624
|
+
return hmrDirtyComponentsMode.get(type);
|
|
9625
|
+
}
|
|
9626
|
+
return type.__vapor;
|
|
9627
|
+
}
|
|
9606
9628
|
function getInheritedScopeIds(vnode, parentComponent) {
|
|
9607
9629
|
const inheritedScopeIds = [];
|
|
9608
9630
|
let currentParent = parentComponent;
|
|
@@ -11271,7 +11293,7 @@ function isMemoSame(cached, memo) {
|
|
|
11271
11293
|
return true;
|
|
11272
11294
|
}
|
|
11273
11295
|
|
|
11274
|
-
const version = "3.6.0-alpha.
|
|
11296
|
+
const version = "3.6.0-alpha.7";
|
|
11275
11297
|
const warn = warn$1 ;
|
|
11276
11298
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11277
11299
|
const devtools = devtools$1 ;
|