@vue/runtime-dom 3.6.0-alpha.5 → 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 +105 -74
- 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 +105 -74
- 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-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
|
**/
|
|
@@ -2000,6 +2000,16 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2000
2000
|
return;
|
|
2001
2001
|
}
|
|
2002
2002
|
this.flags = 1024;
|
|
2003
|
+
this.reset();
|
|
2004
|
+
const sub = this.subs;
|
|
2005
|
+
if (sub !== void 0) {
|
|
2006
|
+
unlink(sub);
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
* @internal
|
|
2011
|
+
*/
|
|
2012
|
+
reset() {
|
|
2003
2013
|
let dep = this.deps;
|
|
2004
2014
|
while (dep !== void 0) {
|
|
2005
2015
|
const node = dep.dep;
|
|
@@ -2010,10 +2020,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2010
2020
|
dep = unlink(dep, this);
|
|
2011
2021
|
}
|
|
2012
2022
|
}
|
|
2013
|
-
const sub = this.subs;
|
|
2014
|
-
if (sub !== void 0) {
|
|
2015
|
-
unlink(sub);
|
|
2016
|
-
}
|
|
2017
2023
|
cleanup(this);
|
|
2018
2024
|
}
|
|
2019
2025
|
}
|
|
@@ -2825,6 +2831,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2825
2831
|
|
|
2826
2832
|
let isHmrUpdating = false;
|
|
2827
2833
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2834
|
+
const hmrDirtyComponentsMode = /* @__PURE__ */ new Map();
|
|
2828
2835
|
{
|
|
2829
2836
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
2830
2837
|
createRecord: tryWrap(createRecord),
|
|
@@ -2888,9 +2895,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2888
2895
|
const record = map.get(id);
|
|
2889
2896
|
if (!record) return;
|
|
2890
2897
|
newComp = normalizeClassComponent(newComp);
|
|
2898
|
+
const isVapor = record.initialDef.__vapor;
|
|
2891
2899
|
updateComponentDef(record.initialDef, newComp);
|
|
2892
2900
|
const instances = [...record.instances];
|
|
2893
|
-
if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2901
|
+
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2894
2902
|
for (const instance of instances) {
|
|
2895
2903
|
if (instance.root && instance.root.ce && instance !== instance.root) {
|
|
2896
2904
|
instance.root.ce._removeChildStyle(instance.type);
|
|
@@ -2910,6 +2918,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2910
2918
|
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2911
2919
|
}
|
|
2912
2920
|
dirtyInstances.add(instance);
|
|
2921
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2913
2922
|
instance.appContext.propsCache.delete(instance.type);
|
|
2914
2923
|
instance.appContext.emitsCache.delete(instance.type);
|
|
2915
2924
|
instance.appContext.optionsCache.delete(instance.type);
|
|
@@ -2950,6 +2959,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2950
2959
|
}
|
|
2951
2960
|
queuePostFlushCb(() => {
|
|
2952
2961
|
hmrDirtyComponents.clear();
|
|
2962
|
+
hmrDirtyComponentsMode.clear();
|
|
2953
2963
|
});
|
|
2954
2964
|
}
|
|
2955
2965
|
function updateComponentDef(oldComp, newComp) {
|
|
@@ -3580,7 +3590,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3580
3590
|
onAppearCancelled: TransitionHookValidator
|
|
3581
3591
|
};
|
|
3582
3592
|
const recursiveGetSubtree = (instance) => {
|
|
3583
|
-
const subTree = instance.type
|
|
3593
|
+
const subTree = isVaporComponent(instance.type) ? instance.block : instance.subTree;
|
|
3584
3594
|
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
3585
3595
|
};
|
|
3586
3596
|
const BaseTransitionImpl = {
|
|
@@ -3887,7 +3897,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3887
3897
|
}
|
|
3888
3898
|
function setTransitionHooks(vnode, hooks) {
|
|
3889
3899
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3890
|
-
if (vnode.type
|
|
3900
|
+
if (isVaporComponent(vnode.type)) {
|
|
3891
3901
|
getVaporInterface(vnode.component, vnode).setTransitionHooks(
|
|
3892
3902
|
vnode.component,
|
|
3893
3903
|
hooks
|
|
@@ -4296,7 +4306,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
4296
4306
|
node,
|
|
4297
4307
|
container,
|
|
4298
4308
|
null,
|
|
4299
|
-
parentComponent
|
|
4309
|
+
parentComponent,
|
|
4310
|
+
parentSuspense
|
|
4300
4311
|
);
|
|
4301
4312
|
} else {
|
|
4302
4313
|
mountComponent(
|
|
@@ -7112,29 +7123,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7112
7123
|
}
|
|
7113
7124
|
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
7114
7125
|
} else if (!accessedAttrs && root.type !== Comment) {
|
|
7115
|
-
|
|
7116
|
-
const eventAttrs = [];
|
|
7117
|
-
const extraAttrs = [];
|
|
7118
|
-
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
7119
|
-
const key = allAttrs[i];
|
|
7120
|
-
if (isOn(key)) {
|
|
7121
|
-
if (!isModelListener(key)) {
|
|
7122
|
-
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
7123
|
-
}
|
|
7124
|
-
} else {
|
|
7125
|
-
extraAttrs.push(key);
|
|
7126
|
-
}
|
|
7127
|
-
}
|
|
7128
|
-
if (extraAttrs.length) {
|
|
7129
|
-
warn$1(
|
|
7130
|
-
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
|
|
7131
|
-
);
|
|
7132
|
-
}
|
|
7133
|
-
if (eventAttrs.length) {
|
|
7134
|
-
warn$1(
|
|
7135
|
-
`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
|
|
7136
|
-
);
|
|
7137
|
-
}
|
|
7126
|
+
warnExtraneousAttributes(attrs);
|
|
7138
7127
|
}
|
|
7139
7128
|
}
|
|
7140
7129
|
}
|
|
@@ -7186,6 +7175,31 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7186
7175
|
};
|
|
7187
7176
|
return [normalizeVNode(childRoot), setRoot];
|
|
7188
7177
|
};
|
|
7178
|
+
function warnExtraneousAttributes(attrs) {
|
|
7179
|
+
const allAttrs = Object.keys(attrs);
|
|
7180
|
+
const eventAttrs = [];
|
|
7181
|
+
const extraAttrs = [];
|
|
7182
|
+
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
7183
|
+
const key = allAttrs[i];
|
|
7184
|
+
if (isOn(key)) {
|
|
7185
|
+
if (!isModelListener(key)) {
|
|
7186
|
+
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
7187
|
+
}
|
|
7188
|
+
} else {
|
|
7189
|
+
extraAttrs.push(key);
|
|
7190
|
+
}
|
|
7191
|
+
}
|
|
7192
|
+
if (extraAttrs.length) {
|
|
7193
|
+
warn$1(
|
|
7194
|
+
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
|
|
7195
|
+
);
|
|
7196
|
+
}
|
|
7197
|
+
if (eventAttrs.length) {
|
|
7198
|
+
warn$1(
|
|
7199
|
+
`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
|
|
7200
|
+
);
|
|
7201
|
+
}
|
|
7202
|
+
}
|
|
7189
7203
|
function filterSingleRoot(children, recurse = true) {
|
|
7190
7204
|
let singleRoot;
|
|
7191
7205
|
for (let i = 0; i < children.length; i++) {
|
|
@@ -7935,7 +7949,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7935
7949
|
);
|
|
7936
7950
|
break;
|
|
7937
7951
|
case VaporSlot:
|
|
7938
|
-
getVaporInterface(parentComponent, n2).slot(
|
|
7952
|
+
getVaporInterface(parentComponent, n2).slot(
|
|
7953
|
+
n1,
|
|
7954
|
+
n2,
|
|
7955
|
+
container,
|
|
7956
|
+
anchor,
|
|
7957
|
+
parentComponent
|
|
7958
|
+
);
|
|
7939
7959
|
break;
|
|
7940
7960
|
default:
|
|
7941
7961
|
if (shapeFlag & 1) {
|
|
@@ -8438,7 +8458,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8438
8458
|
n2,
|
|
8439
8459
|
container,
|
|
8440
8460
|
anchor,
|
|
8441
|
-
parentComponent
|
|
8461
|
+
parentComponent,
|
|
8462
|
+
parentSuspense
|
|
8442
8463
|
);
|
|
8443
8464
|
}
|
|
8444
8465
|
} else {
|
|
@@ -8499,7 +8520,42 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8499
8520
|
}
|
|
8500
8521
|
if (isHmrUpdating) initialVNode.el = null;
|
|
8501
8522
|
if (instance.asyncDep) {
|
|
8502
|
-
|
|
8523
|
+
if (parentSuspense) {
|
|
8524
|
+
const hydratedEl = instance.vnode.el;
|
|
8525
|
+
parentSuspense.registerDep(instance, (setupResult) => {
|
|
8526
|
+
const { vnode } = instance;
|
|
8527
|
+
{
|
|
8528
|
+
pushWarningContext(vnode);
|
|
8529
|
+
}
|
|
8530
|
+
handleSetupResult(instance, setupResult, false);
|
|
8531
|
+
if (hydratedEl) {
|
|
8532
|
+
vnode.el = hydratedEl;
|
|
8533
|
+
}
|
|
8534
|
+
const placeholder = !hydratedEl && instance.subTree.el;
|
|
8535
|
+
setupRenderEffect(
|
|
8536
|
+
instance,
|
|
8537
|
+
vnode,
|
|
8538
|
+
// component may have been moved before resolve.
|
|
8539
|
+
// if this is not a hydration, instance.subTree will be the comment
|
|
8540
|
+
// placeholder.
|
|
8541
|
+
hostParentNode(hydratedEl || instance.subTree.el),
|
|
8542
|
+
// anchor will not be used if this is hydration, so only need to
|
|
8543
|
+
// consider the comment placeholder case.
|
|
8544
|
+
hydratedEl ? null : getNextHostNode(instance.subTree),
|
|
8545
|
+
parentSuspense,
|
|
8546
|
+
namespace,
|
|
8547
|
+
optimized
|
|
8548
|
+
);
|
|
8549
|
+
if (placeholder) {
|
|
8550
|
+
vnode.placeholder = null;
|
|
8551
|
+
hostRemove(placeholder);
|
|
8552
|
+
}
|
|
8553
|
+
updateHOCHostEl(instance, vnode.el);
|
|
8554
|
+
{
|
|
8555
|
+
popWarningContext();
|
|
8556
|
+
}
|
|
8557
|
+
});
|
|
8558
|
+
}
|
|
8503
8559
|
if (!initialVNode.el) {
|
|
8504
8560
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
8505
8561
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -9080,7 +9136,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9080
9136
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
9081
9137
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
9082
9138
|
if (shapeFlag & 6) {
|
|
9083
|
-
if (type
|
|
9139
|
+
if (isVaporComponent(type)) {
|
|
9084
9140
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor);
|
|
9085
9141
|
} else {
|
|
9086
9142
|
move(
|
|
@@ -9190,7 +9246,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9190
9246
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
9191
9247
|
}
|
|
9192
9248
|
if (shapeFlag & 256) {
|
|
9193
|
-
if (vnode.type
|
|
9249
|
+
if (isVaporComponent(vnode.type)) {
|
|
9194
9250
|
getVaporInterface(parentComponent, vnode).deactivate(
|
|
9195
9251
|
vnode,
|
|
9196
9252
|
parentComponent.ctx.getStorageContainer()
|
|
@@ -9207,7 +9263,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9207
9263
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
9208
9264
|
}
|
|
9209
9265
|
if (shapeFlag & 6) {
|
|
9210
|
-
if (type
|
|
9266
|
+
if (isVaporComponent(type)) {
|
|
9211
9267
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
9212
9268
|
return;
|
|
9213
9269
|
} else {
|
|
@@ -9339,7 +9395,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9339
9395
|
};
|
|
9340
9396
|
const getNextHostNode = (vnode) => {
|
|
9341
9397
|
if (vnode.shapeFlag & 6) {
|
|
9342
|
-
if (vnode.type
|
|
9398
|
+
if (isVaporComponent(vnode.type)) {
|
|
9343
9399
|
return hostNextSibling(vnode.anchor);
|
|
9344
9400
|
}
|
|
9345
9401
|
return getNextHostNode(vnode.component.subTree);
|
|
@@ -9529,6 +9585,12 @@ app.use(vaporInteropPlugin)
|
|
|
9529
9585
|
}
|
|
9530
9586
|
return res;
|
|
9531
9587
|
}
|
|
9588
|
+
function isVaporComponent(type) {
|
|
9589
|
+
if (isHmrUpdating && hmrDirtyComponentsMode.has(type)) {
|
|
9590
|
+
return hmrDirtyComponentsMode.get(type);
|
|
9591
|
+
}
|
|
9592
|
+
return type.__vapor;
|
|
9593
|
+
}
|
|
9532
9594
|
function getInheritedScopeIds(vnode, parentComponent) {
|
|
9533
9595
|
const inheritedScopeIds = [];
|
|
9534
9596
|
let currentParent = parentComponent;
|
|
@@ -9828,7 +9890,7 @@ app.use(vaporInteropPlugin)
|
|
|
9828
9890
|
m: move,
|
|
9829
9891
|
um: unmount,
|
|
9830
9892
|
n: next,
|
|
9831
|
-
o: { parentNode
|
|
9893
|
+
o: { parentNode }
|
|
9832
9894
|
} = rendererInternals;
|
|
9833
9895
|
let parentSuspenseId;
|
|
9834
9896
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
@@ -10003,12 +10065,11 @@ app.use(vaporInteropPlugin)
|
|
|
10003
10065
|
next() {
|
|
10004
10066
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
10005
10067
|
},
|
|
10006
|
-
registerDep(instance,
|
|
10068
|
+
registerDep(instance, onResolve) {
|
|
10007
10069
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
10008
10070
|
if (isInPendingSuspense) {
|
|
10009
10071
|
suspense.deps++;
|
|
10010
10072
|
}
|
|
10011
|
-
const hydratedEl = instance.vnode.el;
|
|
10012
10073
|
instance.asyncDep.catch((err) => {
|
|
10013
10074
|
handleError(err, instance, 0);
|
|
10014
10075
|
}).then((asyncSetupResult) => {
|
|
@@ -10016,37 +10077,7 @@ app.use(vaporInteropPlugin)
|
|
|
10016
10077
|
return;
|
|
10017
10078
|
}
|
|
10018
10079
|
instance.asyncResolved = true;
|
|
10019
|
-
|
|
10020
|
-
{
|
|
10021
|
-
pushWarningContext(vnode2);
|
|
10022
|
-
}
|
|
10023
|
-
handleSetupResult(instance, asyncSetupResult, false);
|
|
10024
|
-
if (hydratedEl) {
|
|
10025
|
-
vnode2.el = hydratedEl;
|
|
10026
|
-
}
|
|
10027
|
-
const placeholder = !hydratedEl && instance.subTree.el;
|
|
10028
|
-
setupRenderEffect(
|
|
10029
|
-
instance,
|
|
10030
|
-
vnode2,
|
|
10031
|
-
// component may have been moved before resolve.
|
|
10032
|
-
// if this is not a hydration, instance.subTree will be the comment
|
|
10033
|
-
// placeholder.
|
|
10034
|
-
parentNode(hydratedEl || instance.subTree.el),
|
|
10035
|
-
// anchor will not be used if this is hydration, so only need to
|
|
10036
|
-
// consider the comment placeholder case.
|
|
10037
|
-
hydratedEl ? null : next(instance.subTree),
|
|
10038
|
-
suspense,
|
|
10039
|
-
namespace,
|
|
10040
|
-
optimized2
|
|
10041
|
-
);
|
|
10042
|
-
if (placeholder) {
|
|
10043
|
-
vnode2.placeholder = null;
|
|
10044
|
-
remove(placeholder);
|
|
10045
|
-
}
|
|
10046
|
-
updateHOCHostEl(instance, vnode2.el);
|
|
10047
|
-
{
|
|
10048
|
-
popWarningContext();
|
|
10049
|
-
}
|
|
10080
|
+
onResolve(asyncSetupResult);
|
|
10050
10081
|
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
10051
10082
|
suspense.resolve();
|
|
10052
10083
|
}
|
|
@@ -11214,7 +11245,7 @@ Component that was made reactive: `,
|
|
|
11214
11245
|
return true;
|
|
11215
11246
|
}
|
|
11216
11247
|
|
|
11217
|
-
const version = "3.6.0-alpha.
|
|
11248
|
+
const version = "3.6.0-alpha.7";
|
|
11218
11249
|
const warn = warn$1 ;
|
|
11219
11250
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11220
11251
|
const devtools = devtools$1 ;
|