@vue/runtime-dom 3.5.4 → 3.5.5
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 +7 -6
- package/dist/runtime-dom.cjs.prod.js +6 -5
- package/dist/runtime-dom.d.ts +2 -2
- package/dist/runtime-dom.esm-browser.js +35 -22
- package/dist/runtime-dom.esm-browser.prod.js +2 -2
- package/dist/runtime-dom.esm-bundler.js +8 -7
- package/dist/runtime-dom.global.js +35 -22
- package/dist/runtime-dom.global.prod.js +2 -2
- 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.5
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -822,6 +822,7 @@ class VueElement extends BaseClass {
|
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
connectedCallback() {
|
|
825
|
+
if (!this.isConnected) return;
|
|
825
826
|
if (!this.shadowRoot) {
|
|
826
827
|
this._parseSlots();
|
|
827
828
|
}
|
|
@@ -864,7 +865,7 @@ class VueElement extends BaseClass {
|
|
|
864
865
|
this._ob = null;
|
|
865
866
|
}
|
|
866
867
|
this._app && this._app.unmount();
|
|
867
|
-
this._instance.ce = void 0;
|
|
868
|
+
if (this._instance) this._instance.ce = void 0;
|
|
868
869
|
this._app = this._instance = null;
|
|
869
870
|
}
|
|
870
871
|
});
|
|
@@ -1083,7 +1084,7 @@ class VueElement extends BaseClass {
|
|
|
1083
1084
|
}
|
|
1084
1085
|
}
|
|
1085
1086
|
/**
|
|
1086
|
-
* Only called when
|
|
1087
|
+
* Only called when shadowRoot is false
|
|
1087
1088
|
*/
|
|
1088
1089
|
_parseSlots() {
|
|
1089
1090
|
const slots = this._slots = {};
|
|
@@ -1095,10 +1096,10 @@ class VueElement extends BaseClass {
|
|
|
1095
1096
|
}
|
|
1096
1097
|
}
|
|
1097
1098
|
/**
|
|
1098
|
-
* Only called when
|
|
1099
|
+
* Only called when shadowRoot is false
|
|
1099
1100
|
*/
|
|
1100
1101
|
_renderSlots() {
|
|
1101
|
-
const outlets = this.querySelectorAll("slot");
|
|
1102
|
+
const outlets = (this._teleportTarget || this).querySelectorAll("slot");
|
|
1102
1103
|
const scopeId = this._instance.type.__scopeId;
|
|
1103
1104
|
for (let i = 0; i < outlets.length; i++) {
|
|
1104
1105
|
const o = outlets[i];
|
|
@@ -1277,7 +1278,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
1277
1278
|
child,
|
|
1278
1279
|
runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
1279
1280
|
);
|
|
1280
|
-
} else {
|
|
1281
|
+
} else if (child.type !== runtimeCore.Text) {
|
|
1281
1282
|
runtimeCore.warn(`<TransitionGroup> children must be keyed.`);
|
|
1282
1283
|
}
|
|
1283
1284
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.5
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -786,6 +786,7 @@ class VueElement extends BaseClass {
|
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
788
|
connectedCallback() {
|
|
789
|
+
if (!this.isConnected) return;
|
|
789
790
|
if (!this.shadowRoot) {
|
|
790
791
|
this._parseSlots();
|
|
791
792
|
}
|
|
@@ -828,7 +829,7 @@ class VueElement extends BaseClass {
|
|
|
828
829
|
this._ob = null;
|
|
829
830
|
}
|
|
830
831
|
this._app && this._app.unmount();
|
|
831
|
-
this._instance.ce = void 0;
|
|
832
|
+
if (this._instance) this._instance.ce = void 0;
|
|
832
833
|
this._app = this._instance = null;
|
|
833
834
|
}
|
|
834
835
|
});
|
|
@@ -1013,7 +1014,7 @@ class VueElement extends BaseClass {
|
|
|
1013
1014
|
}
|
|
1014
1015
|
}
|
|
1015
1016
|
/**
|
|
1016
|
-
* Only called when
|
|
1017
|
+
* Only called when shadowRoot is false
|
|
1017
1018
|
*/
|
|
1018
1019
|
_parseSlots() {
|
|
1019
1020
|
const slots = this._slots = {};
|
|
@@ -1025,10 +1026,10 @@ class VueElement extends BaseClass {
|
|
|
1025
1026
|
}
|
|
1026
1027
|
}
|
|
1027
1028
|
/**
|
|
1028
|
-
* Only called when
|
|
1029
|
+
* Only called when shadowRoot is false
|
|
1029
1030
|
*/
|
|
1030
1031
|
_renderSlots() {
|
|
1031
|
-
const outlets = this.querySelectorAll("slot");
|
|
1032
|
+
const outlets = (this._teleportTarget || this).querySelectorAll("slot");
|
|
1032
1033
|
const scopeId = this._instance.type.__scopeId;
|
|
1033
1034
|
for (let i = 0; i < outlets.length; i++) {
|
|
1034
1035
|
const o = outlets[i];
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -159,11 +159,11 @@ export declare class VueElement extends BaseClass implements ComponentCustomElem
|
|
|
159
159
|
private _createVNode;
|
|
160
160
|
private _applyStyles;
|
|
161
161
|
/**
|
|
162
|
-
* Only called when
|
|
162
|
+
* Only called when shadowRoot is false
|
|
163
163
|
*/
|
|
164
164
|
private _parseSlots;
|
|
165
165
|
/**
|
|
166
|
-
* Only called when
|
|
166
|
+
* Only called when shadowRoot is false
|
|
167
167
|
*/
|
|
168
168
|
private _renderSlots;
|
|
169
169
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.5
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -596,9 +596,11 @@ function prepareDeps(sub) {
|
|
|
596
596
|
function cleanupDeps(sub) {
|
|
597
597
|
let head;
|
|
598
598
|
let tail = sub.depsTail;
|
|
599
|
-
|
|
599
|
+
let link = tail;
|
|
600
|
+
while (link) {
|
|
601
|
+
const prev = link.prevDep;
|
|
600
602
|
if (link.version === -1) {
|
|
601
|
-
if (link === tail) tail =
|
|
603
|
+
if (link === tail) tail = prev;
|
|
602
604
|
removeSub(link);
|
|
603
605
|
removeDep(link);
|
|
604
606
|
} else {
|
|
@@ -606,6 +608,7 @@ function cleanupDeps(sub) {
|
|
|
606
608
|
}
|
|
607
609
|
link.dep.activeLink = link.prevActiveLink;
|
|
608
610
|
link.prevActiveLink = void 0;
|
|
611
|
+
link = prev;
|
|
609
612
|
}
|
|
610
613
|
sub.deps = head;
|
|
611
614
|
sub.depsTail = tail;
|
|
@@ -734,6 +737,14 @@ function cleanupEffect(e) {
|
|
|
734
737
|
}
|
|
735
738
|
|
|
736
739
|
let globalVersion = 0;
|
|
740
|
+
class Link {
|
|
741
|
+
constructor(sub, dep) {
|
|
742
|
+
this.sub = sub;
|
|
743
|
+
this.dep = dep;
|
|
744
|
+
this.version = dep.version;
|
|
745
|
+
this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
746
|
+
}
|
|
747
|
+
}
|
|
737
748
|
class Dep {
|
|
738
749
|
constructor(computed) {
|
|
739
750
|
this.computed = computed;
|
|
@@ -756,16 +767,7 @@ class Dep {
|
|
|
756
767
|
}
|
|
757
768
|
let link = this.activeLink;
|
|
758
769
|
if (link === void 0 || link.sub !== activeSub) {
|
|
759
|
-
link = this.activeLink =
|
|
760
|
-
dep: this,
|
|
761
|
-
sub: activeSub,
|
|
762
|
-
version: this.version,
|
|
763
|
-
nextDep: void 0,
|
|
764
|
-
prevDep: void 0,
|
|
765
|
-
nextSub: void 0,
|
|
766
|
-
prevSub: void 0,
|
|
767
|
-
prevActiveLink: void 0
|
|
768
|
-
};
|
|
770
|
+
link = this.activeLink = new Link(activeSub, this);
|
|
769
771
|
if (!activeSub.deps) {
|
|
770
772
|
activeSub.deps = activeSub.depsTail = link;
|
|
771
773
|
} else {
|
|
@@ -2678,7 +2680,9 @@ function reload(id, newComp) {
|
|
|
2678
2680
|
dirtyInstances.delete(instance);
|
|
2679
2681
|
} else if (instance.parent) {
|
|
2680
2682
|
queueJob(() => {
|
|
2683
|
+
isHmrUpdating = true;
|
|
2681
2684
|
instance.parent.update();
|
|
2685
|
+
isHmrUpdating = false;
|
|
2682
2686
|
dirtyInstances.delete(instance);
|
|
2683
2687
|
});
|
|
2684
2688
|
} else if (instance.appContext.reload) {
|
|
@@ -2969,6 +2973,9 @@ const TeleportImpl = {
|
|
|
2969
2973
|
insert(mainAnchor, container, anchor);
|
|
2970
2974
|
const mount = (container2, anchor2) => {
|
|
2971
2975
|
if (shapeFlag & 16) {
|
|
2976
|
+
if (parentComponent && parentComponent.isCE) {
|
|
2977
|
+
parentComponent.ce._teleportTarget = container2;
|
|
2978
|
+
}
|
|
2972
2979
|
mountChildren(
|
|
2973
2980
|
children,
|
|
2974
2981
|
container2,
|
|
@@ -3999,7 +4006,11 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
3999
4006
|
remove(cur);
|
|
4000
4007
|
}
|
|
4001
4008
|
} else if (shapeFlag & 8) {
|
|
4002
|
-
|
|
4009
|
+
let clientText = vnode.children;
|
|
4010
|
+
if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
|
|
4011
|
+
clientText = clientText.slice(1);
|
|
4012
|
+
}
|
|
4013
|
+
if (el.textContent !== clientText) {
|
|
4003
4014
|
if (!isMismatchAllowed(el, 0 /* TEXT */)) {
|
|
4004
4015
|
warn$1(
|
|
4005
4016
|
`Hydration text content mismatch on`,
|
|
@@ -4198,7 +4209,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4198
4209
|
}
|
|
4199
4210
|
};
|
|
4200
4211
|
const isTemplateNode = (node) => {
|
|
4201
|
-
return node.nodeType === 1 && node.tagName
|
|
4212
|
+
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
4202
4213
|
};
|
|
4203
4214
|
return [hydrate, hydrateNode];
|
|
4204
4215
|
}
|
|
@@ -4550,7 +4561,7 @@ function defineAsyncComponent(source) {
|
|
|
4550
4561
|
load().then(() => {
|
|
4551
4562
|
loaded.value = true;
|
|
4552
4563
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
4553
|
-
|
|
4564
|
+
instance.parent.update();
|
|
4554
4565
|
}
|
|
4555
4566
|
}).catch((err) => {
|
|
4556
4567
|
onError(err);
|
|
@@ -7232,6 +7243,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7232
7243
|
}
|
|
7233
7244
|
}
|
|
7234
7245
|
if (instance.asyncDep) {
|
|
7246
|
+
if (isHmrUpdating) initialVNode.el = null;
|
|
7235
7247
|
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
|
|
7236
7248
|
if (!initialVNode.el) {
|
|
7237
7249
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
@@ -10383,7 +10395,7 @@ function isMemoSame(cached, memo) {
|
|
|
10383
10395
|
return true;
|
|
10384
10396
|
}
|
|
10385
10397
|
|
|
10386
|
-
const version = "3.5.
|
|
10398
|
+
const version = "3.5.5";
|
|
10387
10399
|
const warn = warn$1 ;
|
|
10388
10400
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10389
10401
|
const devtools = devtools$1 ;
|
|
@@ -11283,6 +11295,7 @@ class VueElement extends BaseClass {
|
|
|
11283
11295
|
}
|
|
11284
11296
|
}
|
|
11285
11297
|
connectedCallback() {
|
|
11298
|
+
if (!this.isConnected) return;
|
|
11286
11299
|
if (!this.shadowRoot) {
|
|
11287
11300
|
this._parseSlots();
|
|
11288
11301
|
}
|
|
@@ -11325,7 +11338,7 @@ class VueElement extends BaseClass {
|
|
|
11325
11338
|
this._ob = null;
|
|
11326
11339
|
}
|
|
11327
11340
|
this._app && this._app.unmount();
|
|
11328
|
-
this._instance.ce = void 0;
|
|
11341
|
+
if (this._instance) this._instance.ce = void 0;
|
|
11329
11342
|
this._app = this._instance = null;
|
|
11330
11343
|
}
|
|
11331
11344
|
});
|
|
@@ -11544,7 +11557,7 @@ class VueElement extends BaseClass {
|
|
|
11544
11557
|
}
|
|
11545
11558
|
}
|
|
11546
11559
|
/**
|
|
11547
|
-
* Only called when
|
|
11560
|
+
* Only called when shadowRoot is false
|
|
11548
11561
|
*/
|
|
11549
11562
|
_parseSlots() {
|
|
11550
11563
|
const slots = this._slots = {};
|
|
@@ -11556,10 +11569,10 @@ class VueElement extends BaseClass {
|
|
|
11556
11569
|
}
|
|
11557
11570
|
}
|
|
11558
11571
|
/**
|
|
11559
|
-
* Only called when
|
|
11572
|
+
* Only called when shadowRoot is false
|
|
11560
11573
|
*/
|
|
11561
11574
|
_renderSlots() {
|
|
11562
|
-
const outlets = this.querySelectorAll("slot");
|
|
11575
|
+
const outlets = (this._teleportTarget || this).querySelectorAll("slot");
|
|
11563
11576
|
const scopeId = this._instance.type.__scopeId;
|
|
11564
11577
|
for (let i = 0; i < outlets.length; i++) {
|
|
11565
11578
|
const o = outlets[i];
|
|
@@ -11738,7 +11751,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
11738
11751
|
child,
|
|
11739
11752
|
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
11740
11753
|
);
|
|
11741
|
-
} else {
|
|
11754
|
+
} else if (child.type !== Text) {
|
|
11742
11755
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
11743
11756
|
}
|
|
11744
11757
|
}
|