@vue/runtime-dom 3.5.14 → 3.5.15
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
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -822,13 +822,10 @@ class VueElement extends BaseClass {
|
|
|
822
822
|
this._root = this;
|
|
823
823
|
}
|
|
824
824
|
}
|
|
825
|
-
if (!this._def.__asyncLoader) {
|
|
826
|
-
this._resolveProps(this._def);
|
|
827
|
-
}
|
|
828
825
|
}
|
|
829
826
|
connectedCallback() {
|
|
830
827
|
if (!this.isConnected) return;
|
|
831
|
-
if (!this.shadowRoot) {
|
|
828
|
+
if (!this.shadowRoot && !this._resolved) {
|
|
832
829
|
this._parseSlots();
|
|
833
830
|
}
|
|
834
831
|
this._connected = true;
|
|
@@ -841,8 +838,7 @@ class VueElement extends BaseClass {
|
|
|
841
838
|
}
|
|
842
839
|
if (!this._instance) {
|
|
843
840
|
if (this._resolved) {
|
|
844
|
-
this.
|
|
845
|
-
this._update();
|
|
841
|
+
this._mount(this._def);
|
|
846
842
|
} else {
|
|
847
843
|
if (parent && parent._pendingResolve) {
|
|
848
844
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -858,7 +854,15 @@ class VueElement extends BaseClass {
|
|
|
858
854
|
_setParent(parent = this._parent) {
|
|
859
855
|
if (parent) {
|
|
860
856
|
this._instance.parent = parent._instance;
|
|
861
|
-
this.
|
|
857
|
+
this._inheritParentContext(parent);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
_inheritParentContext(parent = this._parent) {
|
|
861
|
+
if (parent && this._app) {
|
|
862
|
+
Object.setPrototypeOf(
|
|
863
|
+
this._app._context.provides,
|
|
864
|
+
parent._instance.provides
|
|
865
|
+
);
|
|
862
866
|
}
|
|
863
867
|
}
|
|
864
868
|
disconnectedCallback() {
|
|
@@ -908,9 +912,7 @@ class VueElement extends BaseClass {
|
|
|
908
912
|
}
|
|
909
913
|
}
|
|
910
914
|
this._numberProps = numberProps;
|
|
911
|
-
|
|
912
|
-
this._resolveProps(def);
|
|
913
|
-
}
|
|
915
|
+
this._resolveProps(def);
|
|
914
916
|
if (this.shadowRoot) {
|
|
915
917
|
this._applyStyles(styles);
|
|
916
918
|
} else if (styles) {
|
|
@@ -934,6 +936,7 @@ class VueElement extends BaseClass {
|
|
|
934
936
|
def.name = "VueElement";
|
|
935
937
|
}
|
|
936
938
|
this._app = this._createApp(def);
|
|
939
|
+
this._inheritParentContext();
|
|
937
940
|
if (def.configureApp) {
|
|
938
941
|
def.configureApp(this._app);
|
|
939
942
|
}
|
|
@@ -1018,7 +1021,9 @@ class VueElement extends BaseClass {
|
|
|
1018
1021
|
}
|
|
1019
1022
|
}
|
|
1020
1023
|
_update() {
|
|
1021
|
-
|
|
1024
|
+
const vnode = this._createVNode();
|
|
1025
|
+
if (this._app) vnode.appContext = this._app._context;
|
|
1026
|
+
render(vnode, this._root);
|
|
1022
1027
|
}
|
|
1023
1028
|
_createVNode() {
|
|
1024
1029
|
const baseProps = {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -786,13 +786,10 @@ class VueElement extends BaseClass {
|
|
|
786
786
|
this._root = this;
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
|
-
if (!this._def.__asyncLoader) {
|
|
790
|
-
this._resolveProps(this._def);
|
|
791
|
-
}
|
|
792
789
|
}
|
|
793
790
|
connectedCallback() {
|
|
794
791
|
if (!this.isConnected) return;
|
|
795
|
-
if (!this.shadowRoot) {
|
|
792
|
+
if (!this.shadowRoot && !this._resolved) {
|
|
796
793
|
this._parseSlots();
|
|
797
794
|
}
|
|
798
795
|
this._connected = true;
|
|
@@ -805,8 +802,7 @@ class VueElement extends BaseClass {
|
|
|
805
802
|
}
|
|
806
803
|
if (!this._instance) {
|
|
807
804
|
if (this._resolved) {
|
|
808
|
-
this.
|
|
809
|
-
this._update();
|
|
805
|
+
this._mount(this._def);
|
|
810
806
|
} else {
|
|
811
807
|
if (parent && parent._pendingResolve) {
|
|
812
808
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -822,7 +818,15 @@ class VueElement extends BaseClass {
|
|
|
822
818
|
_setParent(parent = this._parent) {
|
|
823
819
|
if (parent) {
|
|
824
820
|
this._instance.parent = parent._instance;
|
|
825
|
-
this.
|
|
821
|
+
this._inheritParentContext(parent);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
_inheritParentContext(parent = this._parent) {
|
|
825
|
+
if (parent && this._app) {
|
|
826
|
+
Object.setPrototypeOf(
|
|
827
|
+
this._app._context.provides,
|
|
828
|
+
parent._instance.provides
|
|
829
|
+
);
|
|
826
830
|
}
|
|
827
831
|
}
|
|
828
832
|
disconnectedCallback() {
|
|
@@ -872,9 +876,7 @@ class VueElement extends BaseClass {
|
|
|
872
876
|
}
|
|
873
877
|
}
|
|
874
878
|
this._numberProps = numberProps;
|
|
875
|
-
|
|
876
|
-
this._resolveProps(def);
|
|
877
|
-
}
|
|
879
|
+
this._resolveProps(def);
|
|
878
880
|
if (this.shadowRoot) {
|
|
879
881
|
this._applyStyles(styles);
|
|
880
882
|
}
|
|
@@ -891,6 +893,7 @@ class VueElement extends BaseClass {
|
|
|
891
893
|
}
|
|
892
894
|
_mount(def) {
|
|
893
895
|
this._app = this._createApp(def);
|
|
896
|
+
this._inheritParentContext();
|
|
894
897
|
if (def.configureApp) {
|
|
895
898
|
def.configureApp(this._app);
|
|
896
899
|
}
|
|
@@ -973,7 +976,9 @@ class VueElement extends BaseClass {
|
|
|
973
976
|
}
|
|
974
977
|
}
|
|
975
978
|
_update() {
|
|
976
|
-
|
|
979
|
+
const vnode = this._createVNode();
|
|
980
|
+
if (this._app) vnode.appContext = this._app._context;
|
|
981
|
+
render(vnode, this._root);
|
|
977
982
|
}
|
|
978
983
|
_createVNode() {
|
|
979
984
|
const baseProps = {};
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -147,6 +147,7 @@ export declare class VueElement extends BaseClass implements ComponentCustomElem
|
|
|
147
147
|
_def: InnerComponentDef, _props?: Record<string, any>, _createApp?: CreateAppFunction<Element>);
|
|
148
148
|
connectedCallback(): void;
|
|
149
149
|
private _setParent;
|
|
150
|
+
private _inheritParentContext;
|
|
150
151
|
disconnectedCallback(): void;
|
|
151
152
|
/**
|
|
152
153
|
* resolve inner component definition (handle possible async component)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.15
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2071,11 +2071,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2071
2071
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
2072
2072
|
boundCleanup
|
|
2073
2073
|
];
|
|
2074
|
+
oldValue = newValue;
|
|
2074
2075
|
call ? call(cb, 3, args) : (
|
|
2075
2076
|
// @ts-expect-error
|
|
2076
2077
|
cb(...args)
|
|
2077
2078
|
);
|
|
2078
|
-
oldValue = newValue;
|
|
2079
2079
|
} finally {
|
|
2080
2080
|
activeWatcher = currentWatcher;
|
|
2081
2081
|
}
|
|
@@ -3000,15 +3000,16 @@ const TeleportImpl = {
|
|
|
3000
3000
|
updateCssVars(n2, true);
|
|
3001
3001
|
}
|
|
3002
3002
|
if (isTeleportDeferred(n2.props)) {
|
|
3003
|
+
n2.el.__isMounted = false;
|
|
3003
3004
|
queuePostRenderEffect(() => {
|
|
3004
3005
|
mountToTarget();
|
|
3005
|
-
n2.el.__isMounted
|
|
3006
|
+
delete n2.el.__isMounted;
|
|
3006
3007
|
}, parentSuspense);
|
|
3007
3008
|
} else {
|
|
3008
3009
|
mountToTarget();
|
|
3009
3010
|
}
|
|
3010
3011
|
} else {
|
|
3011
|
-
if (isTeleportDeferred(n2.props) &&
|
|
3012
|
+
if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
|
|
3012
3013
|
queuePostRenderEffect(() => {
|
|
3013
3014
|
TeleportImpl.process(
|
|
3014
3015
|
n1,
|
|
@@ -3022,7 +3023,6 @@ const TeleportImpl = {
|
|
|
3022
3023
|
optimized,
|
|
3023
3024
|
internals
|
|
3024
3025
|
);
|
|
3025
|
-
delete n1.el.__isMounted;
|
|
3026
3026
|
}, parentSuspense);
|
|
3027
3027
|
return;
|
|
3028
3028
|
}
|
|
@@ -4010,6 +4010,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4010
4010
|
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4011
4011
|
const content = el.content.firstChild;
|
|
4012
4012
|
if (needCallTransitionHooks) {
|
|
4013
|
+
const cls = content.getAttribute("class");
|
|
4014
|
+
if (cls) content.$cls = cls;
|
|
4013
4015
|
transition.beforeEnter(content);
|
|
4014
4016
|
}
|
|
4015
4017
|
replaceNode(content, el, parentComponent);
|
|
@@ -4262,7 +4264,12 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
4262
4264
|
let actual;
|
|
4263
4265
|
let expected;
|
|
4264
4266
|
if (key === "class") {
|
|
4265
|
-
|
|
4267
|
+
if (el.$cls) {
|
|
4268
|
+
actual = el.$cls;
|
|
4269
|
+
delete el.$cls;
|
|
4270
|
+
} else {
|
|
4271
|
+
actual = el.getAttribute("class");
|
|
4272
|
+
}
|
|
4266
4273
|
expected = normalizeClass(clientValue);
|
|
4267
4274
|
if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
|
|
4268
4275
|
mismatchType = 2 /* CLASS */;
|
|
@@ -4557,14 +4564,25 @@ function defineAsyncComponent(source) {
|
|
|
4557
4564
|
name: "AsyncComponentWrapper",
|
|
4558
4565
|
__asyncLoader: load,
|
|
4559
4566
|
__asyncHydrate(el, instance, hydrate) {
|
|
4567
|
+
let patched = false;
|
|
4560
4568
|
const doHydrate = hydrateStrategy ? () => {
|
|
4569
|
+
const performHydrate = () => {
|
|
4570
|
+
if (patched) {
|
|
4571
|
+
warn$1(
|
|
4572
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
|
|
4573
|
+
);
|
|
4574
|
+
return;
|
|
4575
|
+
}
|
|
4576
|
+
hydrate();
|
|
4577
|
+
};
|
|
4561
4578
|
const teardown = hydrateStrategy(
|
|
4562
|
-
|
|
4579
|
+
performHydrate,
|
|
4563
4580
|
(cb) => forEachElement(el, cb)
|
|
4564
4581
|
);
|
|
4565
4582
|
if (teardown) {
|
|
4566
4583
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
4567
4584
|
}
|
|
4585
|
+
(instance.u || (instance.u = [])).push(() => patched = true);
|
|
4568
4586
|
} : hydrate;
|
|
4569
4587
|
if (resolvedComp) {
|
|
4570
4588
|
doHydrate();
|
|
@@ -6110,9 +6128,15 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6110
6128
|
},
|
|
6111
6129
|
provide(key, value) {
|
|
6112
6130
|
if (key in context.provides) {
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6131
|
+
if (hasOwn(context.provides, key)) {
|
|
6132
|
+
warn$1(
|
|
6133
|
+
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
6134
|
+
);
|
|
6135
|
+
} else {
|
|
6136
|
+
warn$1(
|
|
6137
|
+
`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
|
|
6138
|
+
);
|
|
6139
|
+
}
|
|
6116
6140
|
}
|
|
6117
6141
|
context.provides[key] = value;
|
|
6118
6142
|
return app;
|
|
@@ -6149,7 +6173,7 @@ function provide(key, value) {
|
|
|
6149
6173
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
6150
6174
|
const instance = currentInstance || currentRenderingInstance;
|
|
6151
6175
|
if (instance || currentApp) {
|
|
6152
|
-
|
|
6176
|
+
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
6153
6177
|
if (provides && key in provides) {
|
|
6154
6178
|
return provides[key];
|
|
6155
6179
|
} else if (arguments.length > 1) {
|
|
@@ -7146,7 +7170,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7146
7170
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
7147
7171
|
// which also requires the correct parent container
|
|
7148
7172
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
7149
|
-
oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
|
|
7173
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
|
|
7150
7174
|
// In other cases, the parent container is not actually used so we
|
|
7151
7175
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
7152
7176
|
fallbackContainer
|
|
@@ -10498,7 +10522,7 @@ function isMemoSame(cached, memo) {
|
|
|
10498
10522
|
return true;
|
|
10499
10523
|
}
|
|
10500
10524
|
|
|
10501
|
-
const version = "3.5.
|
|
10525
|
+
const version = "3.5.15";
|
|
10502
10526
|
const warn = warn$1 ;
|
|
10503
10527
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10504
10528
|
const devtools = devtools$1 ;
|
|
@@ -11399,13 +11423,10 @@ class VueElement extends BaseClass {
|
|
|
11399
11423
|
this._root = this;
|
|
11400
11424
|
}
|
|
11401
11425
|
}
|
|
11402
|
-
if (!this._def.__asyncLoader) {
|
|
11403
|
-
this._resolveProps(this._def);
|
|
11404
|
-
}
|
|
11405
11426
|
}
|
|
11406
11427
|
connectedCallback() {
|
|
11407
11428
|
if (!this.isConnected) return;
|
|
11408
|
-
if (!this.shadowRoot) {
|
|
11429
|
+
if (!this.shadowRoot && !this._resolved) {
|
|
11409
11430
|
this._parseSlots();
|
|
11410
11431
|
}
|
|
11411
11432
|
this._connected = true;
|
|
@@ -11418,8 +11439,7 @@ class VueElement extends BaseClass {
|
|
|
11418
11439
|
}
|
|
11419
11440
|
if (!this._instance) {
|
|
11420
11441
|
if (this._resolved) {
|
|
11421
|
-
this.
|
|
11422
|
-
this._update();
|
|
11442
|
+
this._mount(this._def);
|
|
11423
11443
|
} else {
|
|
11424
11444
|
if (parent && parent._pendingResolve) {
|
|
11425
11445
|
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
@@ -11435,7 +11455,15 @@ class VueElement extends BaseClass {
|
|
|
11435
11455
|
_setParent(parent = this._parent) {
|
|
11436
11456
|
if (parent) {
|
|
11437
11457
|
this._instance.parent = parent._instance;
|
|
11438
|
-
this.
|
|
11458
|
+
this._inheritParentContext(parent);
|
|
11459
|
+
}
|
|
11460
|
+
}
|
|
11461
|
+
_inheritParentContext(parent = this._parent) {
|
|
11462
|
+
if (parent && this._app) {
|
|
11463
|
+
Object.setPrototypeOf(
|
|
11464
|
+
this._app._context.provides,
|
|
11465
|
+
parent._instance.provides
|
|
11466
|
+
);
|
|
11439
11467
|
}
|
|
11440
11468
|
}
|
|
11441
11469
|
disconnectedCallback() {
|
|
@@ -11485,9 +11513,7 @@ class VueElement extends BaseClass {
|
|
|
11485
11513
|
}
|
|
11486
11514
|
}
|
|
11487
11515
|
this._numberProps = numberProps;
|
|
11488
|
-
|
|
11489
|
-
this._resolveProps(def);
|
|
11490
|
-
}
|
|
11516
|
+
this._resolveProps(def);
|
|
11491
11517
|
if (this.shadowRoot) {
|
|
11492
11518
|
this._applyStyles(styles);
|
|
11493
11519
|
} else if (styles) {
|
|
@@ -11511,6 +11537,7 @@ class VueElement extends BaseClass {
|
|
|
11511
11537
|
def.name = "VueElement";
|
|
11512
11538
|
}
|
|
11513
11539
|
this._app = this._createApp(def);
|
|
11540
|
+
this._inheritParentContext();
|
|
11514
11541
|
if (def.configureApp) {
|
|
11515
11542
|
def.configureApp(this._app);
|
|
11516
11543
|
}
|
|
@@ -11595,7 +11622,9 @@ class VueElement extends BaseClass {
|
|
|
11595
11622
|
}
|
|
11596
11623
|
}
|
|
11597
11624
|
_update() {
|
|
11598
|
-
|
|
11625
|
+
const vnode = this._createVNode();
|
|
11626
|
+
if (this._app) vnode.appContext = this._app._context;
|
|
11627
|
+
render(vnode, this._root);
|
|
11599
11628
|
}
|
|
11600
11629
|
_createVNode() {
|
|
11601
11630
|
const baseProps = {};
|