@vue/compat 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/vue.cjs.js +109 -76
- package/dist/vue.cjs.prod.js +204 -47
- package/dist/vue.esm-browser.js +109 -76
- package/dist/vue.esm-browser.prod.js +8 -8
- package/dist/vue.esm-bundler.js +112 -77
- package/dist/vue.global.js +109 -76
- package/dist/vue.global.prod.js +8 -8
- package/dist/vue.runtime.esm-browser.js +109 -76
- package/dist/vue.runtime.esm-browser.prod.js +8 -8
- package/dist/vue.runtime.esm-bundler.js +112 -77
- package/dist/vue.runtime.global.js +109 -76
- package/dist/vue.runtime.global.prod.js +8 -8
- package/package.json +2 -2
package/dist/vue.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-alpha.
|
|
2
|
+
* @vue/compat v3.6.0-alpha.7
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2073,6 +2073,16 @@ var Vue = (function () {
|
|
|
2073
2073
|
return;
|
|
2074
2074
|
}
|
|
2075
2075
|
this.flags = 1024;
|
|
2076
|
+
this.reset();
|
|
2077
|
+
const sub = this.subs;
|
|
2078
|
+
if (sub !== void 0) {
|
|
2079
|
+
unlink(sub);
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
/**
|
|
2083
|
+
* @internal
|
|
2084
|
+
*/
|
|
2085
|
+
reset() {
|
|
2076
2086
|
let dep = this.deps;
|
|
2077
2087
|
while (dep !== void 0) {
|
|
2078
2088
|
const node = dep.dep;
|
|
@@ -2083,10 +2093,6 @@ var Vue = (function () {
|
|
|
2083
2093
|
dep = unlink(dep, this);
|
|
2084
2094
|
}
|
|
2085
2095
|
}
|
|
2086
|
-
const sub = this.subs;
|
|
2087
|
-
if (sub !== void 0) {
|
|
2088
|
-
unlink(sub);
|
|
2089
|
-
}
|
|
2090
2096
|
cleanup(this);
|
|
2091
2097
|
}
|
|
2092
2098
|
}
|
|
@@ -2898,6 +2904,7 @@ var Vue = (function () {
|
|
|
2898
2904
|
|
|
2899
2905
|
let isHmrUpdating = false;
|
|
2900
2906
|
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2907
|
+
const hmrDirtyComponentsMode = /* @__PURE__ */ new Map();
|
|
2901
2908
|
{
|
|
2902
2909
|
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
2903
2910
|
createRecord: tryWrap(createRecord),
|
|
@@ -2961,9 +2968,10 @@ var Vue = (function () {
|
|
|
2961
2968
|
const record = map.get(id);
|
|
2962
2969
|
if (!record) return;
|
|
2963
2970
|
newComp = normalizeClassComponent(newComp);
|
|
2971
|
+
const isVapor = record.initialDef.__vapor;
|
|
2964
2972
|
updateComponentDef(record.initialDef, newComp);
|
|
2965
2973
|
const instances = [...record.instances];
|
|
2966
|
-
if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2974
|
+
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2967
2975
|
for (const instance of instances) {
|
|
2968
2976
|
if (instance.root && instance.root.ce && instance !== instance.root) {
|
|
2969
2977
|
instance.root.ce._removeChildStyle(instance.type);
|
|
@@ -2983,6 +2991,7 @@ var Vue = (function () {
|
|
|
2983
2991
|
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2984
2992
|
}
|
|
2985
2993
|
dirtyInstances.add(instance);
|
|
2994
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2986
2995
|
instance.appContext.propsCache.delete(instance.type);
|
|
2987
2996
|
instance.appContext.emitsCache.delete(instance.type);
|
|
2988
2997
|
instance.appContext.optionsCache.delete(instance.type);
|
|
@@ -3023,6 +3032,7 @@ var Vue = (function () {
|
|
|
3023
3032
|
}
|
|
3024
3033
|
queuePostFlushCb(() => {
|
|
3025
3034
|
hmrDirtyComponents.clear();
|
|
3035
|
+
hmrDirtyComponentsMode.clear();
|
|
3026
3036
|
});
|
|
3027
3037
|
}
|
|
3028
3038
|
function updateComponentDef(oldComp, newComp) {
|
|
@@ -4181,7 +4191,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4181
4191
|
onAppearCancelled: TransitionHookValidator
|
|
4182
4192
|
};
|
|
4183
4193
|
const recursiveGetSubtree = (instance) => {
|
|
4184
|
-
const subTree = instance.type
|
|
4194
|
+
const subTree = isVaporComponent(instance.type) ? instance.block : instance.subTree;
|
|
4185
4195
|
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
4186
4196
|
};
|
|
4187
4197
|
const BaseTransitionImpl = {
|
|
@@ -4491,7 +4501,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4491
4501
|
}
|
|
4492
4502
|
function setTransitionHooks(vnode, hooks) {
|
|
4493
4503
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4494
|
-
if (vnode.type
|
|
4504
|
+
if (isVaporComponent(vnode.type)) {
|
|
4495
4505
|
getVaporInterface(vnode.component, vnode).setTransitionHooks(
|
|
4496
4506
|
vnode.component,
|
|
4497
4507
|
hooks
|
|
@@ -4900,7 +4910,8 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4900
4910
|
node,
|
|
4901
4911
|
container,
|
|
4902
4912
|
null,
|
|
4903
|
-
parentComponent
|
|
4913
|
+
parentComponent,
|
|
4914
|
+
parentSuspense
|
|
4904
4915
|
);
|
|
4905
4916
|
} else {
|
|
4906
4917
|
mountComponent(
|
|
@@ -7681,7 +7692,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
7681
7692
|
return vm;
|
|
7682
7693
|
}
|
|
7683
7694
|
}
|
|
7684
|
-
Vue.version = `2.6.14-compat:${"3.6.0-alpha.
|
|
7695
|
+
Vue.version = `2.6.14-compat:${"3.6.0-alpha.7"}`;
|
|
7685
7696
|
Vue.config = singletonApp.config;
|
|
7686
7697
|
Vue.use = (plugin, ...options) => {
|
|
7687
7698
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8752,29 +8763,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8752
8763
|
}
|
|
8753
8764
|
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
8754
8765
|
} else if (!accessedAttrs && root.type !== Comment) {
|
|
8755
|
-
|
|
8756
|
-
const eventAttrs = [];
|
|
8757
|
-
const extraAttrs = [];
|
|
8758
|
-
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
8759
|
-
const key = allAttrs[i];
|
|
8760
|
-
if (isOn(key)) {
|
|
8761
|
-
if (!isModelListener(key)) {
|
|
8762
|
-
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
8763
|
-
}
|
|
8764
|
-
} else {
|
|
8765
|
-
extraAttrs.push(key);
|
|
8766
|
-
}
|
|
8767
|
-
}
|
|
8768
|
-
if (extraAttrs.length) {
|
|
8769
|
-
warn$1(
|
|
8770
|
-
`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.`
|
|
8771
|
-
);
|
|
8772
|
-
}
|
|
8773
|
-
if (eventAttrs.length) {
|
|
8774
|
-
warn$1(
|
|
8775
|
-
`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.`
|
|
8776
|
-
);
|
|
8777
|
-
}
|
|
8766
|
+
warnExtraneousAttributes(attrs);
|
|
8778
8767
|
}
|
|
8779
8768
|
}
|
|
8780
8769
|
}
|
|
@@ -8847,6 +8836,31 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8847
8836
|
};
|
|
8848
8837
|
return [normalizeVNode(childRoot), setRoot];
|
|
8849
8838
|
};
|
|
8839
|
+
function warnExtraneousAttributes(attrs) {
|
|
8840
|
+
const allAttrs = Object.keys(attrs);
|
|
8841
|
+
const eventAttrs = [];
|
|
8842
|
+
const extraAttrs = [];
|
|
8843
|
+
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
8844
|
+
const key = allAttrs[i];
|
|
8845
|
+
if (isOn(key)) {
|
|
8846
|
+
if (!isModelListener(key)) {
|
|
8847
|
+
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
8848
|
+
}
|
|
8849
|
+
} else {
|
|
8850
|
+
extraAttrs.push(key);
|
|
8851
|
+
}
|
|
8852
|
+
}
|
|
8853
|
+
if (extraAttrs.length) {
|
|
8854
|
+
warn$1(
|
|
8855
|
+
`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.`
|
|
8856
|
+
);
|
|
8857
|
+
}
|
|
8858
|
+
if (eventAttrs.length) {
|
|
8859
|
+
warn$1(
|
|
8860
|
+
`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.`
|
|
8861
|
+
);
|
|
8862
|
+
}
|
|
8863
|
+
}
|
|
8850
8864
|
function filterSingleRoot(children, recurse = true) {
|
|
8851
8865
|
let singleRoot;
|
|
8852
8866
|
for (let i = 0; i < children.length; i++) {
|
|
@@ -9668,7 +9682,13 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9668
9682
|
);
|
|
9669
9683
|
break;
|
|
9670
9684
|
case VaporSlot:
|
|
9671
|
-
getVaporInterface(parentComponent, n2).slot(
|
|
9685
|
+
getVaporInterface(parentComponent, n2).slot(
|
|
9686
|
+
n1,
|
|
9687
|
+
n2,
|
|
9688
|
+
container,
|
|
9689
|
+
anchor,
|
|
9690
|
+
parentComponent
|
|
9691
|
+
);
|
|
9672
9692
|
break;
|
|
9673
9693
|
default:
|
|
9674
9694
|
if (shapeFlag & 1) {
|
|
@@ -10171,7 +10191,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10171
10191
|
n2,
|
|
10172
10192
|
container,
|
|
10173
10193
|
anchor,
|
|
10174
|
-
parentComponent
|
|
10194
|
+
parentComponent,
|
|
10195
|
+
parentSuspense
|
|
10175
10196
|
);
|
|
10176
10197
|
}
|
|
10177
10198
|
} else {
|
|
@@ -10233,7 +10254,42 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10233
10254
|
}
|
|
10234
10255
|
if (isHmrUpdating) initialVNode.el = null;
|
|
10235
10256
|
if (instance.asyncDep) {
|
|
10236
|
-
|
|
10257
|
+
if (parentSuspense) {
|
|
10258
|
+
const hydratedEl = instance.vnode.el;
|
|
10259
|
+
parentSuspense.registerDep(instance, (setupResult) => {
|
|
10260
|
+
const { vnode } = instance;
|
|
10261
|
+
{
|
|
10262
|
+
pushWarningContext(vnode);
|
|
10263
|
+
}
|
|
10264
|
+
handleSetupResult(instance, setupResult, false);
|
|
10265
|
+
if (hydratedEl) {
|
|
10266
|
+
vnode.el = hydratedEl;
|
|
10267
|
+
}
|
|
10268
|
+
const placeholder = !hydratedEl && instance.subTree.el;
|
|
10269
|
+
setupRenderEffect(
|
|
10270
|
+
instance,
|
|
10271
|
+
vnode,
|
|
10272
|
+
// component may have been moved before resolve.
|
|
10273
|
+
// if this is not a hydration, instance.subTree will be the comment
|
|
10274
|
+
// placeholder.
|
|
10275
|
+
hostParentNode(hydratedEl || instance.subTree.el),
|
|
10276
|
+
// anchor will not be used if this is hydration, so only need to
|
|
10277
|
+
// consider the comment placeholder case.
|
|
10278
|
+
hydratedEl ? null : getNextHostNode(instance.subTree),
|
|
10279
|
+
parentSuspense,
|
|
10280
|
+
namespace,
|
|
10281
|
+
optimized
|
|
10282
|
+
);
|
|
10283
|
+
if (placeholder) {
|
|
10284
|
+
vnode.placeholder = null;
|
|
10285
|
+
hostRemove(placeholder);
|
|
10286
|
+
}
|
|
10287
|
+
updateHOCHostEl(instance, vnode.el);
|
|
10288
|
+
{
|
|
10289
|
+
popWarningContext();
|
|
10290
|
+
}
|
|
10291
|
+
});
|
|
10292
|
+
}
|
|
10237
10293
|
if (!initialVNode.el) {
|
|
10238
10294
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
10239
10295
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -10841,7 +10897,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10841
10897
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
10842
10898
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
10843
10899
|
if (shapeFlag & 6) {
|
|
10844
|
-
if (type
|
|
10900
|
+
if (isVaporComponent(type)) {
|
|
10845
10901
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor);
|
|
10846
10902
|
} else {
|
|
10847
10903
|
move(
|
|
@@ -10951,7 +11007,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10951
11007
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
10952
11008
|
}
|
|
10953
11009
|
if (shapeFlag & 256) {
|
|
10954
|
-
if (vnode.type
|
|
11010
|
+
if (isVaporComponent(vnode.type)) {
|
|
10955
11011
|
getVaporInterface(parentComponent, vnode).deactivate(
|
|
10956
11012
|
vnode,
|
|
10957
11013
|
parentComponent.ctx.getStorageContainer()
|
|
@@ -10968,7 +11024,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
10968
11024
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
10969
11025
|
}
|
|
10970
11026
|
if (shapeFlag & 6) {
|
|
10971
|
-
if (type
|
|
11027
|
+
if (isVaporComponent(type)) {
|
|
10972
11028
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
10973
11029
|
return;
|
|
10974
11030
|
} else {
|
|
@@ -11110,7 +11166,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
11110
11166
|
};
|
|
11111
11167
|
const getNextHostNode = (vnode) => {
|
|
11112
11168
|
if (vnode.shapeFlag & 6) {
|
|
11113
|
-
if (vnode.type
|
|
11169
|
+
if (isVaporComponent(vnode.type)) {
|
|
11114
11170
|
return hostNextSibling(vnode.anchor);
|
|
11115
11171
|
}
|
|
11116
11172
|
return getNextHostNode(vnode.component.subTree);
|
|
@@ -11302,6 +11358,12 @@ app.use(vaporInteropPlugin)
|
|
|
11302
11358
|
}
|
|
11303
11359
|
return res;
|
|
11304
11360
|
}
|
|
11361
|
+
function isVaporComponent(type) {
|
|
11362
|
+
if (isHmrUpdating && hmrDirtyComponentsMode.has(type)) {
|
|
11363
|
+
return hmrDirtyComponentsMode.get(type);
|
|
11364
|
+
}
|
|
11365
|
+
return type.__vapor;
|
|
11366
|
+
}
|
|
11305
11367
|
function getInheritedScopeIds(vnode, parentComponent) {
|
|
11306
11368
|
const inheritedScopeIds = [];
|
|
11307
11369
|
let currentParent = parentComponent;
|
|
@@ -11601,7 +11663,7 @@ app.use(vaporInteropPlugin)
|
|
|
11601
11663
|
m: move,
|
|
11602
11664
|
um: unmount,
|
|
11603
11665
|
n: next,
|
|
11604
|
-
o: { parentNode
|
|
11666
|
+
o: { parentNode }
|
|
11605
11667
|
} = rendererInternals;
|
|
11606
11668
|
let parentSuspenseId;
|
|
11607
11669
|
const isSuspensible = isVNodeSuspensible(vnode);
|
|
@@ -11776,12 +11838,11 @@ app.use(vaporInteropPlugin)
|
|
|
11776
11838
|
next() {
|
|
11777
11839
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
11778
11840
|
},
|
|
11779
|
-
registerDep(instance,
|
|
11841
|
+
registerDep(instance, onResolve) {
|
|
11780
11842
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
11781
11843
|
if (isInPendingSuspense) {
|
|
11782
11844
|
suspense.deps++;
|
|
11783
11845
|
}
|
|
11784
|
-
const hydratedEl = instance.vnode.el;
|
|
11785
11846
|
instance.asyncDep.catch((err) => {
|
|
11786
11847
|
handleError(err, instance, 0);
|
|
11787
11848
|
}).then((asyncSetupResult) => {
|
|
@@ -11789,37 +11850,7 @@ app.use(vaporInteropPlugin)
|
|
|
11789
11850
|
return;
|
|
11790
11851
|
}
|
|
11791
11852
|
instance.asyncResolved = true;
|
|
11792
|
-
|
|
11793
|
-
{
|
|
11794
|
-
pushWarningContext(vnode2);
|
|
11795
|
-
}
|
|
11796
|
-
handleSetupResult(instance, asyncSetupResult, false);
|
|
11797
|
-
if (hydratedEl) {
|
|
11798
|
-
vnode2.el = hydratedEl;
|
|
11799
|
-
}
|
|
11800
|
-
const placeholder = !hydratedEl && instance.subTree.el;
|
|
11801
|
-
setupRenderEffect(
|
|
11802
|
-
instance,
|
|
11803
|
-
vnode2,
|
|
11804
|
-
// component may have been moved before resolve.
|
|
11805
|
-
// if this is not a hydration, instance.subTree will be the comment
|
|
11806
|
-
// placeholder.
|
|
11807
|
-
parentNode(hydratedEl || instance.subTree.el),
|
|
11808
|
-
// anchor will not be used if this is hydration, so only need to
|
|
11809
|
-
// consider the comment placeholder case.
|
|
11810
|
-
hydratedEl ? null : next(instance.subTree),
|
|
11811
|
-
suspense,
|
|
11812
|
-
namespace,
|
|
11813
|
-
optimized2
|
|
11814
|
-
);
|
|
11815
|
-
if (placeholder) {
|
|
11816
|
-
vnode2.placeholder = null;
|
|
11817
|
-
remove(placeholder);
|
|
11818
|
-
}
|
|
11819
|
-
updateHOCHostEl(instance, vnode2.el);
|
|
11820
|
-
{
|
|
11821
|
-
popWarningContext();
|
|
11822
|
-
}
|
|
11853
|
+
onResolve(asyncSetupResult);
|
|
11823
11854
|
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
11824
11855
|
suspense.resolve();
|
|
11825
11856
|
}
|
|
@@ -13066,7 +13097,7 @@ Component that was made reactive: `,
|
|
|
13066
13097
|
return true;
|
|
13067
13098
|
}
|
|
13068
13099
|
|
|
13069
|
-
const version = "3.6.0-alpha.
|
|
13100
|
+
const version = "3.6.0-alpha.7";
|
|
13070
13101
|
const warn = warn$1 ;
|
|
13071
13102
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
13072
13103
|
const devtools = devtools$1 ;
|
|
@@ -20941,7 +20972,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
20941
20972
|
`stop,prevent,self,ctrl,shift,alt,meta,exact,middle`
|
|
20942
20973
|
);
|
|
20943
20974
|
const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right");
|
|
20944
|
-
const isKeyboardEvent = /* @__PURE__ */ makeMap(
|
|
20975
|
+
const isKeyboardEvent = /* @__PURE__ */ makeMap(
|
|
20976
|
+
`onkeyup,onkeydown,onkeypress`
|
|
20977
|
+
);
|
|
20945
20978
|
const resolveModifiers = (key, modifiers, context, loc) => {
|
|
20946
20979
|
const keyModifiers = [];
|
|
20947
20980
|
const nonKeyModifiers = [];
|