vue 3.5.14 → 3.5.16
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 +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +56 -24
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +56 -24
- package/dist/vue.global.prod.js +4 -4
- package/dist/vue.runtime.esm-browser.js +53 -24
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +53 -24
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +6 -6
package/dist/vue.cjs.js
CHANGED
package/dist/vue.cjs.prod.js
CHANGED
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2144,11 +2144,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2144
2144
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
2145
2145
|
boundCleanup
|
|
2146
2146
|
];
|
|
2147
|
+
oldValue = newValue;
|
|
2147
2148
|
call ? call(cb, 3, args) : (
|
|
2148
2149
|
// @ts-expect-error
|
|
2149
2150
|
cb(...args)
|
|
2150
2151
|
);
|
|
2151
|
-
oldValue = newValue;
|
|
2152
2152
|
} finally {
|
|
2153
2153
|
activeWatcher = currentWatcher;
|
|
2154
2154
|
}
|
|
@@ -3073,15 +3073,16 @@ const TeleportImpl = {
|
|
|
3073
3073
|
updateCssVars(n2, true);
|
|
3074
3074
|
}
|
|
3075
3075
|
if (isTeleportDeferred(n2.props)) {
|
|
3076
|
+
n2.el.__isMounted = false;
|
|
3076
3077
|
queuePostRenderEffect(() => {
|
|
3077
3078
|
mountToTarget();
|
|
3078
|
-
n2.el.__isMounted
|
|
3079
|
+
delete n2.el.__isMounted;
|
|
3079
3080
|
}, parentSuspense);
|
|
3080
3081
|
} else {
|
|
3081
3082
|
mountToTarget();
|
|
3082
3083
|
}
|
|
3083
3084
|
} else {
|
|
3084
|
-
if (isTeleportDeferred(n2.props) &&
|
|
3085
|
+
if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
|
|
3085
3086
|
queuePostRenderEffect(() => {
|
|
3086
3087
|
TeleportImpl.process(
|
|
3087
3088
|
n1,
|
|
@@ -3095,7 +3096,6 @@ const TeleportImpl = {
|
|
|
3095
3096
|
optimized,
|
|
3096
3097
|
internals
|
|
3097
3098
|
);
|
|
3098
|
-
delete n1.el.__isMounted;
|
|
3099
3099
|
}, parentSuspense);
|
|
3100
3100
|
return;
|
|
3101
3101
|
}
|
|
@@ -4083,6 +4083,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4083
4083
|
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4084
4084
|
const content = el.content.firstChild;
|
|
4085
4085
|
if (needCallTransitionHooks) {
|
|
4086
|
+
const cls = content.getAttribute("class");
|
|
4087
|
+
if (cls) content.$cls = cls;
|
|
4086
4088
|
transition.beforeEnter(content);
|
|
4087
4089
|
}
|
|
4088
4090
|
replaceNode(content, el, parentComponent);
|
|
@@ -4335,7 +4337,12 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
4335
4337
|
let actual;
|
|
4336
4338
|
let expected;
|
|
4337
4339
|
if (key === "class") {
|
|
4338
|
-
|
|
4340
|
+
if (el.$cls) {
|
|
4341
|
+
actual = el.$cls;
|
|
4342
|
+
delete el.$cls;
|
|
4343
|
+
} else {
|
|
4344
|
+
actual = el.getAttribute("class");
|
|
4345
|
+
}
|
|
4339
4346
|
expected = normalizeClass(clientValue);
|
|
4340
4347
|
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
|
4341
4348
|
mismatchType = 2 /* CLASS */;
|
|
@@ -4630,14 +4637,25 @@ function defineAsyncComponent(source) {
|
|
|
4630
4637
|
name: "AsyncComponentWrapper",
|
|
4631
4638
|
__asyncLoader: load,
|
|
4632
4639
|
__asyncHydrate(el, instance, hydrate) {
|
|
4640
|
+
let patched = false;
|
|
4633
4641
|
const doHydrate = hydrateStrategy ? () => {
|
|
4642
|
+
const performHydrate = () => {
|
|
4643
|
+
if (patched) {
|
|
4644
|
+
warn$1(
|
|
4645
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
|
|
4646
|
+
);
|
|
4647
|
+
return;
|
|
4648
|
+
}
|
|
4649
|
+
hydrate();
|
|
4650
|
+
};
|
|
4634
4651
|
const teardown = hydrateStrategy(
|
|
4635
|
-
|
|
4652
|
+
performHydrate,
|
|
4636
4653
|
(cb) => forEachElement(el, cb)
|
|
4637
4654
|
);
|
|
4638
4655
|
if (teardown) {
|
|
4639
4656
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
4640
4657
|
}
|
|
4658
|
+
(instance.u || (instance.u = [])).push(() => patched = true);
|
|
4641
4659
|
} : hydrate;
|
|
4642
4660
|
if (resolvedComp) {
|
|
4643
4661
|
doHydrate();
|
|
@@ -6183,9 +6201,15 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6183
6201
|
},
|
|
6184
6202
|
provide(key, value) {
|
|
6185
6203
|
if (key in context.provides) {
|
|
6186
|
-
|
|
6187
|
-
|
|
6188
|
-
|
|
6204
|
+
if (hasOwn(context.provides, key)) {
|
|
6205
|
+
warn$1(
|
|
6206
|
+
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
6207
|
+
);
|
|
6208
|
+
} else {
|
|
6209
|
+
warn$1(
|
|
6210
|
+
`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
|
|
6211
|
+
);
|
|
6212
|
+
}
|
|
6189
6213
|
}
|
|
6190
6214
|
context.provides[key] = value;
|
|
6191
6215
|
return app;
|
|
@@ -6222,7 +6246,7 @@ function provide(key, value) {
|
|
|
6222
6246
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
6223
6247
|
const instance = currentInstance || currentRenderingInstance;
|
|
6224
6248
|
if (instance || currentApp) {
|
|
6225
|
-
|
|
6249
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
6226
6250
|
if (provides && key in provides) {
|
|
6227
6251
|
return provides[key];
|
|
6228
6252
|
} else if (arguments.length > 1) {
|
|
@@ -7219,7 +7243,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7219
7243
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
7220
7244
|
// which also requires the correct parent container
|
|
7221
7245
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
7222
|
-
oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
|
|
7246
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
|
|
7223
7247
|
// In other cases, the parent container is not actually used so we
|
|
7224
7248
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
7225
7249
|
fallbackContainer
|
|
@@ -10571,7 +10595,7 @@ function isMemoSame(cached, memo) {
|
|
|
10571
10595
|
return true;
|
|
10572
10596
|
}
|
|
10573
10597
|
|
|
10574
|
-
const version = "3.5.
|
|
10598
|
+
const version = "3.5.16";
|
|
10575
10599
|
const warn = warn$1 ;
|
|
10576
10600
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10577
10601
|
const devtools = devtools$1 ;
|
|
@@ -11472,13 +11496,10 @@ class VueElement extends BaseClass {
|
|
|
11472
11496
|
this._root = this;
|
|
11473
11497
|
}
|
|
11474
11498
|
}
|
|
11475
|
-
if (!this._def.__asyncLoader) {
|
|
11476
|
-
this._resolveProps(this._def);
|
|
11477
|
-
}
|
|
11478
11499
|
}
|
|
11479
11500
|
connectedCallback() {
|
|
11480
11501
|
if (!this.isConnected) return;
|
|
11481
|
-
if (!this.shadowRoot) {
|
|
11502
|
+
if (!this.shadowRoot && !this._resolved) {
|
|
11482
11503
|
this._parseSlots();
|
|
11483
11504
|
}
|
|
11484
11505
|
this._connected = true;
|
|
@@ -11491,8 +11512,7 @@ class VueElement extends BaseClass {
|
|
|
11491
11512
|
}
|
|
11492
11513
|
if (!this._instance) {
|
|
11493
11514
|
if (this._resolved) {
|
|
11494
|
-
this.
|
|
11495
|
-
this._update();
|
|
11515
|
+
this._mount(this._def);
|
|
11496
11516
|
} else {
|
|
11497
11517
|
if (parent && parent._pendingResolve) {
|
|
11498
11518
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -11508,7 +11528,15 @@ class VueElement extends BaseClass {
|
|
|
11508
11528
|
_setParent(parent = this._parent) {
|
|
11509
11529
|
if (parent) {
|
|
11510
11530
|
this._instance.parent = parent._instance;
|
|
11511
|
-
this.
|
|
11531
|
+
this._inheritParentContext(parent);
|
|
11532
|
+
}
|
|
11533
|
+
}
|
|
11534
|
+
_inheritParentContext(parent = this._parent) {
|
|
11535
|
+
if (parent && this._app) {
|
|
11536
|
+
Object.setPrototypeOf(
|
|
11537
|
+
this._app._context.provides,
|
|
11538
|
+
parent._instance.provides
|
|
11539
|
+
);
|
|
11512
11540
|
}
|
|
11513
11541
|
}
|
|
11514
11542
|
disconnectedCallback() {
|
|
@@ -11558,9 +11586,7 @@ class VueElement extends BaseClass {
|
|
|
11558
11586
|
}
|
|
11559
11587
|
}
|
|
11560
11588
|
this._numberProps = numberProps;
|
|
11561
|
-
|
|
11562
|
-
this._resolveProps(def);
|
|
11563
|
-
}
|
|
11589
|
+
this._resolveProps(def);
|
|
11564
11590
|
if (this.shadowRoot) {
|
|
11565
11591
|
this._applyStyles(styles);
|
|
11566
11592
|
} else if (styles) {
|
|
@@ -11584,6 +11610,7 @@ class VueElement extends BaseClass {
|
|
|
11584
11610
|
def.name = "VueElement";
|
|
11585
11611
|
}
|
|
11586
11612
|
this._app = this._createApp(def);
|
|
11613
|
+
this._inheritParentContext();
|
|
11587
11614
|
if (def.configureApp) {
|
|
11588
11615
|
def.configureApp(this._app);
|
|
11589
11616
|
}
|
|
@@ -11668,7 +11695,9 @@ class VueElement extends BaseClass {
|
|
|
11668
11695
|
}
|
|
11669
11696
|
}
|
|
11670
11697
|
_update() {
|
|
11671
|
-
|
|
11698
|
+
const vnode = this._createVNode();
|
|
11699
|
+
if (this._app) vnode.appContext = this._app._context;
|
|
11700
|
+
render(vnode, this._root);
|
|
11672
11701
|
}
|
|
11673
11702
|
_createVNode() {
|
|
11674
11703
|
const baseProps = {};
|
|
@@ -18007,6 +18036,9 @@ const ignoreSideEffectTags = (node, context) => {
|
|
|
18007
18036
|
};
|
|
18008
18037
|
|
|
18009
18038
|
function isValidHTMLNesting(parent, child) {
|
|
18039
|
+
if (parent === "template") {
|
|
18040
|
+
return true;
|
|
18041
|
+
}
|
|
18010
18042
|
if (parent in onlyValidChildren) {
|
|
18011
18043
|
return onlyValidChildren[parent].has(child);
|
|
18012
18044
|
}
|