@vue/runtime-dom 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/runtime-dom.cjs.js +17 -12
- package/dist/runtime-dom.cjs.prod.js +17 -12
- package/dist/runtime-dom.d.ts +1 -0
- package/dist/runtime-dom.esm-browser.js +53 -24
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +17 -12
- package/dist/runtime-dom.global.js +53 -24
- 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.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -886,13 +886,10 @@ class VueElement extends BaseClass {
|
|
|
886
886
|
this._root = this;
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
if (!this._def.__asyncLoader) {
|
|
890
|
-
this._resolveProps(this._def);
|
|
891
|
-
}
|
|
892
889
|
}
|
|
893
890
|
connectedCallback() {
|
|
894
891
|
if (!this.isConnected) return;
|
|
895
|
-
if (!this.shadowRoot) {
|
|
892
|
+
if (!this.shadowRoot && !this._resolved) {
|
|
896
893
|
this._parseSlots();
|
|
897
894
|
}
|
|
898
895
|
this._connected = true;
|
|
@@ -905,8 +902,7 @@ class VueElement extends BaseClass {
|
|
|
905
902
|
}
|
|
906
903
|
if (!this._instance) {
|
|
907
904
|
if (this._resolved) {
|
|
908
|
-
this.
|
|
909
|
-
this._update();
|
|
905
|
+
this._mount(this._def);
|
|
910
906
|
} else {
|
|
911
907
|
if (parent && parent._pendingResolve) {
|
|
912
908
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -922,7 +918,15 @@ class VueElement extends BaseClass {
|
|
|
922
918
|
_setParent(parent = this._parent) {
|
|
923
919
|
if (parent) {
|
|
924
920
|
this._instance.parent = parent._instance;
|
|
925
|
-
this.
|
|
921
|
+
this._inheritParentContext(parent);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
_inheritParentContext(parent = this._parent) {
|
|
925
|
+
if (parent && this._app) {
|
|
926
|
+
Object.setPrototypeOf(
|
|
927
|
+
this._app._context.provides,
|
|
928
|
+
parent._instance.provides
|
|
929
|
+
);
|
|
926
930
|
}
|
|
927
931
|
}
|
|
928
932
|
disconnectedCallback() {
|
|
@@ -972,9 +976,7 @@ class VueElement extends BaseClass {
|
|
|
972
976
|
}
|
|
973
977
|
}
|
|
974
978
|
this._numberProps = numberProps;
|
|
975
|
-
|
|
976
|
-
this._resolveProps(def);
|
|
977
|
-
}
|
|
979
|
+
this._resolveProps(def);
|
|
978
980
|
if (this.shadowRoot) {
|
|
979
981
|
this._applyStyles(styles);
|
|
980
982
|
} else if (!!(process.env.NODE_ENV !== "production") && styles) {
|
|
@@ -998,6 +1000,7 @@ class VueElement extends BaseClass {
|
|
|
998
1000
|
def.name = "VueElement";
|
|
999
1001
|
}
|
|
1000
1002
|
this._app = this._createApp(def);
|
|
1003
|
+
this._inheritParentContext();
|
|
1001
1004
|
if (def.configureApp) {
|
|
1002
1005
|
def.configureApp(this._app);
|
|
1003
1006
|
}
|
|
@@ -1082,7 +1085,9 @@ class VueElement extends BaseClass {
|
|
|
1082
1085
|
}
|
|
1083
1086
|
}
|
|
1084
1087
|
_update() {
|
|
1085
|
-
|
|
1088
|
+
const vnode = this._createVNode();
|
|
1089
|
+
if (this._app) vnode.appContext = this._app._context;
|
|
1090
|
+
render(vnode, this._root);
|
|
1086
1091
|
}
|
|
1087
1092
|
_createVNode() {
|
|
1088
1093
|
const baseProps = {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2074,11 +2074,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2074
2074
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
2075
2075
|
boundCleanup
|
|
2076
2076
|
];
|
|
2077
|
+
oldValue = newValue;
|
|
2077
2078
|
call ? call(cb, 3, args) : (
|
|
2078
2079
|
// @ts-expect-error
|
|
2079
2080
|
cb(...args)
|
|
2080
2081
|
);
|
|
2081
|
-
oldValue = newValue;
|
|
2082
2082
|
} finally {
|
|
2083
2083
|
activeWatcher = currentWatcher;
|
|
2084
2084
|
}
|
|
@@ -3003,15 +3003,16 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3003
3003
|
updateCssVars(n2, true);
|
|
3004
3004
|
}
|
|
3005
3005
|
if (isTeleportDeferred(n2.props)) {
|
|
3006
|
+
n2.el.__isMounted = false;
|
|
3006
3007
|
queuePostRenderEffect(() => {
|
|
3007
3008
|
mountToTarget();
|
|
3008
|
-
n2.el.__isMounted
|
|
3009
|
+
delete n2.el.__isMounted;
|
|
3009
3010
|
}, parentSuspense);
|
|
3010
3011
|
} else {
|
|
3011
3012
|
mountToTarget();
|
|
3012
3013
|
}
|
|
3013
3014
|
} else {
|
|
3014
|
-
if (isTeleportDeferred(n2.props) &&
|
|
3015
|
+
if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
|
|
3015
3016
|
queuePostRenderEffect(() => {
|
|
3016
3017
|
TeleportImpl.process(
|
|
3017
3018
|
n1,
|
|
@@ -3025,7 +3026,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3025
3026
|
optimized,
|
|
3026
3027
|
internals
|
|
3027
3028
|
);
|
|
3028
|
-
delete n1.el.__isMounted;
|
|
3029
3029
|
}, parentSuspense);
|
|
3030
3030
|
return;
|
|
3031
3031
|
}
|
|
@@ -4013,6 +4013,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
4013
4013
|
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4014
4014
|
const content = el.content.firstChild;
|
|
4015
4015
|
if (needCallTransitionHooks) {
|
|
4016
|
+
const cls = content.getAttribute("class");
|
|
4017
|
+
if (cls) content.$cls = cls;
|
|
4016
4018
|
transition.beforeEnter(content);
|
|
4017
4019
|
}
|
|
4018
4020
|
replaceNode(content, el, parentComponent);
|
|
@@ -4265,7 +4267,12 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4265
4267
|
let actual;
|
|
4266
4268
|
let expected;
|
|
4267
4269
|
if (key === "class") {
|
|
4268
|
-
|
|
4270
|
+
if (el.$cls) {
|
|
4271
|
+
actual = el.$cls;
|
|
4272
|
+
delete el.$cls;
|
|
4273
|
+
} else {
|
|
4274
|
+
actual = el.getAttribute("class");
|
|
4275
|
+
}
|
|
4269
4276
|
expected = normalizeClass(clientValue);
|
|
4270
4277
|
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
|
4271
4278
|
mismatchType = 2 /* CLASS */;
|
|
@@ -4560,14 +4567,25 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4560
4567
|
name: "AsyncComponentWrapper",
|
|
4561
4568
|
__asyncLoader: load,
|
|
4562
4569
|
__asyncHydrate(el, instance, hydrate) {
|
|
4570
|
+
let patched = false;
|
|
4563
4571
|
const doHydrate = hydrateStrategy ? () => {
|
|
4572
|
+
const performHydrate = () => {
|
|
4573
|
+
if (patched) {
|
|
4574
|
+
warn$1(
|
|
4575
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
|
|
4576
|
+
);
|
|
4577
|
+
return;
|
|
4578
|
+
}
|
|
4579
|
+
hydrate();
|
|
4580
|
+
};
|
|
4564
4581
|
const teardown = hydrateStrategy(
|
|
4565
|
-
|
|
4582
|
+
performHydrate,
|
|
4566
4583
|
(cb) => forEachElement(el, cb)
|
|
4567
4584
|
);
|
|
4568
4585
|
if (teardown) {
|
|
4569
4586
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
4570
4587
|
}
|
|
4588
|
+
(instance.u || (instance.u = [])).push(() => patched = true);
|
|
4571
4589
|
} : hydrate;
|
|
4572
4590
|
if (resolvedComp) {
|
|
4573
4591
|
doHydrate();
|
|
@@ -6104,9 +6122,15 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6104
6122
|
},
|
|
6105
6123
|
provide(key, value) {
|
|
6106
6124
|
if (key in context.provides) {
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6125
|
+
if (hasOwn(context.provides, key)) {
|
|
6126
|
+
warn$1(
|
|
6127
|
+
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
6128
|
+
);
|
|
6129
|
+
} else {
|
|
6130
|
+
warn$1(
|
|
6131
|
+
`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
|
|
6132
|
+
);
|
|
6133
|
+
}
|
|
6110
6134
|
}
|
|
6111
6135
|
context.provides[key] = value;
|
|
6112
6136
|
return app;
|
|
@@ -6143,7 +6167,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6143
6167
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
6144
6168
|
const instance = currentInstance || currentRenderingInstance;
|
|
6145
6169
|
if (instance || currentApp) {
|
|
6146
|
-
|
|
6170
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
6147
6171
|
if (provides && key in provides) {
|
|
6148
6172
|
return provides[key];
|
|
6149
6173
|
} else if (arguments.length > 1) {
|
|
@@ -7140,7 +7164,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7140
7164
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
7141
7165
|
// which also requires the correct parent container
|
|
7142
7166
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
7143
|
-
oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
|
|
7167
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
|
|
7144
7168
|
// In other cases, the parent container is not actually used so we
|
|
7145
7169
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
7146
7170
|
fallbackContainer
|
|
@@ -10450,7 +10474,7 @@ Component that was made reactive: `,
|
|
|
10450
10474
|
return true;
|
|
10451
10475
|
}
|
|
10452
10476
|
|
|
10453
|
-
const version = "3.5.
|
|
10477
|
+
const version = "3.5.16";
|
|
10454
10478
|
const warn = warn$1 ;
|
|
10455
10479
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10456
10480
|
const devtools = devtools$1 ;
|
|
@@ -11332,13 +11356,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11332
11356
|
this._root = this;
|
|
11333
11357
|
}
|
|
11334
11358
|
}
|
|
11335
|
-
if (!this._def.__asyncLoader) {
|
|
11336
|
-
this._resolveProps(this._def);
|
|
11337
|
-
}
|
|
11338
11359
|
}
|
|
11339
11360
|
connectedCallback() {
|
|
11340
11361
|
if (!this.isConnected) return;
|
|
11341
|
-
if (!this.shadowRoot) {
|
|
11362
|
+
if (!this.shadowRoot && !this._resolved) {
|
|
11342
11363
|
this._parseSlots();
|
|
11343
11364
|
}
|
|
11344
11365
|
this._connected = true;
|
|
@@ -11351,8 +11372,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11351
11372
|
}
|
|
11352
11373
|
if (!this._instance) {
|
|
11353
11374
|
if (this._resolved) {
|
|
11354
|
-
this.
|
|
11355
|
-
this._update();
|
|
11375
|
+
this._mount(this._def);
|
|
11356
11376
|
} else {
|
|
11357
11377
|
if (parent && parent._pendingResolve) {
|
|
11358
11378
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -11368,7 +11388,15 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11368
11388
|
_setParent(parent = this._parent) {
|
|
11369
11389
|
if (parent) {
|
|
11370
11390
|
this._instance.parent = parent._instance;
|
|
11371
|
-
this.
|
|
11391
|
+
this._inheritParentContext(parent);
|
|
11392
|
+
}
|
|
11393
|
+
}
|
|
11394
|
+
_inheritParentContext(parent = this._parent) {
|
|
11395
|
+
if (parent && this._app) {
|
|
11396
|
+
Object.setPrototypeOf(
|
|
11397
|
+
this._app._context.provides,
|
|
11398
|
+
parent._instance.provides
|
|
11399
|
+
);
|
|
11372
11400
|
}
|
|
11373
11401
|
}
|
|
11374
11402
|
disconnectedCallback() {
|
|
@@ -11418,9 +11446,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11418
11446
|
}
|
|
11419
11447
|
}
|
|
11420
11448
|
this._numberProps = numberProps;
|
|
11421
|
-
|
|
11422
|
-
this._resolveProps(def);
|
|
11423
|
-
}
|
|
11449
|
+
this._resolveProps(def);
|
|
11424
11450
|
if (this.shadowRoot) {
|
|
11425
11451
|
this._applyStyles(styles);
|
|
11426
11452
|
} else if (styles) {
|
|
@@ -11444,6 +11470,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11444
11470
|
def.name = "VueElement";
|
|
11445
11471
|
}
|
|
11446
11472
|
this._app = this._createApp(def);
|
|
11473
|
+
this._inheritParentContext();
|
|
11447
11474
|
if (def.configureApp) {
|
|
11448
11475
|
def.configureApp(this._app);
|
|
11449
11476
|
}
|
|
@@ -11528,7 +11555,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11528
11555
|
}
|
|
11529
11556
|
}
|
|
11530
11557
|
_update() {
|
|
11531
|
-
|
|
11558
|
+
const vnode = this._createVNode();
|
|
11559
|
+
if (this._app) vnode.appContext = this._app._context;
|
|
11560
|
+
render(vnode, this._root);
|
|
11532
11561
|
}
|
|
11533
11562
|
_createVNode() {
|
|
11534
11563
|
const baseProps = {};
|