@vue/runtime-dom 3.5.4 → 3.5.6
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 +70 -55
- 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 +65 -51
- package/dist/runtime-dom.global.prod.js +2 -2
- package/package.json +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.6
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
import { warn, h, BaseTransition, assertNumber, BaseTransitionPropsValidators, getCurrentInstance, onBeforeMount, watchPostEffect, onMounted, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, unref, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core';
|
|
6
|
+
import { warn, h, BaseTransition, assertNumber, BaseTransitionPropsValidators, getCurrentInstance, onBeforeMount, watchPostEffect, onMounted, onUnmounted, Fragment, Static, camelize, callWithAsyncErrorHandling, defineComponent, nextTick, unref, createVNode, useTransitionState, onUpdated, toRaw, getTransitionRawChildren, setTransitionHooks, resolveTransitionHooks, Text, isRuntimeOnly, createRenderer, createHydrationRenderer } from '@vue/runtime-core';
|
|
7
7
|
export * from '@vue/runtime-core';
|
|
8
8
|
import { extend, isObject, toNumber, isArray, isString, hyphenate, capitalize, includeBooleanAttr, isSymbol, isSpecialBooleanAttr, isFunction, NOOP, isOn, isModelListener, isPlainObject, hasOwn, camelize as camelize$1, EMPTY_OBJ, looseToNumber, looseIndexOf, isSet, looseEqual, invokeArrayFns, isHTMLTag, isSVGTag, isMathMLTag } from '@vue/shared';
|
|
9
9
|
|
|
@@ -885,6 +885,7 @@ class VueElement extends BaseClass {
|
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
887
|
connectedCallback() {
|
|
888
|
+
if (!this.isConnected) return;
|
|
888
889
|
if (!this.shadowRoot) {
|
|
889
890
|
this._parseSlots();
|
|
890
891
|
}
|
|
@@ -927,7 +928,7 @@ class VueElement extends BaseClass {
|
|
|
927
928
|
this._ob = null;
|
|
928
929
|
}
|
|
929
930
|
this._app && this._app.unmount();
|
|
930
|
-
this._instance.ce = void 0;
|
|
931
|
+
if (this._instance) this._instance.ce = void 0;
|
|
931
932
|
this._app = this._instance = null;
|
|
932
933
|
}
|
|
933
934
|
});
|
|
@@ -1146,7 +1147,7 @@ class VueElement extends BaseClass {
|
|
|
1146
1147
|
}
|
|
1147
1148
|
}
|
|
1148
1149
|
/**
|
|
1149
|
-
* Only called when
|
|
1150
|
+
* Only called when shadowRoot is false
|
|
1150
1151
|
*/
|
|
1151
1152
|
_parseSlots() {
|
|
1152
1153
|
const slots = this._slots = {};
|
|
@@ -1158,10 +1159,10 @@ class VueElement extends BaseClass {
|
|
|
1158
1159
|
}
|
|
1159
1160
|
}
|
|
1160
1161
|
/**
|
|
1161
|
-
* Only called when
|
|
1162
|
+
* Only called when shadowRoot is false
|
|
1162
1163
|
*/
|
|
1163
1164
|
_renderSlots() {
|
|
1164
|
-
const outlets = this.querySelectorAll("slot");
|
|
1165
|
+
const outlets = (this._teleportTarget || this).querySelectorAll("slot");
|
|
1165
1166
|
const scopeId = this._instance.type.__scopeId;
|
|
1166
1167
|
for (let i = 0; i < outlets.length; i++) {
|
|
1167
1168
|
const o = outlets[i];
|
|
@@ -1340,7 +1341,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
1340
1341
|
child,
|
|
1341
1342
|
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
1342
1343
|
);
|
|
1343
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
1344
|
+
} else if (!!(process.env.NODE_ENV !== "production") && child.type !== Text) {
|
|
1344
1345
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
1345
1346
|
}
|
|
1346
1347
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.6
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -468,7 +468,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
468
468
|
/**
|
|
469
469
|
* @internal
|
|
470
470
|
*/
|
|
471
|
-
this.
|
|
471
|
+
this.next = void 0;
|
|
472
472
|
/**
|
|
473
473
|
* @internal
|
|
474
474
|
*/
|
|
@@ -498,9 +498,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
500
|
if (!(this.flags & 8)) {
|
|
501
|
-
this
|
|
502
|
-
this.nextEffect = batchedEffect;
|
|
503
|
-
batchedEffect = this;
|
|
501
|
+
batch(this);
|
|
504
502
|
}
|
|
505
503
|
}
|
|
506
504
|
run() {
|
|
@@ -561,7 +559,12 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
561
559
|
}
|
|
562
560
|
}
|
|
563
561
|
let batchDepth = 0;
|
|
564
|
-
let
|
|
562
|
+
let batchedSub;
|
|
563
|
+
function batch(sub) {
|
|
564
|
+
sub.flags |= 8;
|
|
565
|
+
sub.next = batchedSub;
|
|
566
|
+
batchedSub = sub;
|
|
567
|
+
}
|
|
565
568
|
function startBatch() {
|
|
566
569
|
batchDepth++;
|
|
567
570
|
}
|
|
@@ -570,15 +573,16 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
570
573
|
return;
|
|
571
574
|
}
|
|
572
575
|
let error;
|
|
573
|
-
while (
|
|
574
|
-
let e =
|
|
575
|
-
|
|
576
|
+
while (batchedSub) {
|
|
577
|
+
let e = batchedSub;
|
|
578
|
+
batchedSub = void 0;
|
|
576
579
|
while (e) {
|
|
577
|
-
const next = e.
|
|
578
|
-
e.
|
|
580
|
+
const next = e.next;
|
|
581
|
+
e.next = void 0;
|
|
579
582
|
e.flags &= ~8;
|
|
580
583
|
if (e.flags & 1) {
|
|
581
584
|
try {
|
|
585
|
+
;
|
|
582
586
|
e.trigger();
|
|
583
587
|
} catch (err) {
|
|
584
588
|
if (!error) error = err;
|
|
@@ -599,9 +603,11 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
599
603
|
function cleanupDeps(sub) {
|
|
600
604
|
let head;
|
|
601
605
|
let tail = sub.depsTail;
|
|
602
|
-
|
|
606
|
+
let link = tail;
|
|
607
|
+
while (link) {
|
|
608
|
+
const prev = link.prevDep;
|
|
603
609
|
if (link.version === -1) {
|
|
604
|
-
if (link === tail) tail =
|
|
610
|
+
if (link === tail) tail = prev;
|
|
605
611
|
removeSub(link);
|
|
606
612
|
removeDep(link);
|
|
607
613
|
} else {
|
|
@@ -609,13 +615,14 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
609
615
|
}
|
|
610
616
|
link.dep.activeLink = link.prevActiveLink;
|
|
611
617
|
link.prevActiveLink = void 0;
|
|
618
|
+
link = prev;
|
|
612
619
|
}
|
|
613
620
|
sub.deps = head;
|
|
614
621
|
sub.depsTail = tail;
|
|
615
622
|
}
|
|
616
623
|
function isDirty(sub) {
|
|
617
624
|
for (let link = sub.deps; link; link = link.nextDep) {
|
|
618
|
-
if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) {
|
|
625
|
+
if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
|
|
619
626
|
return true;
|
|
620
627
|
}
|
|
621
628
|
}
|
|
@@ -635,7 +642,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
635
642
|
computed.globalVersion = globalVersion;
|
|
636
643
|
const dep = computed.dep;
|
|
637
644
|
computed.flags |= 2;
|
|
638
|
-
if (dep.version > 0 && !computed.isSSR && !isDirty(computed)) {
|
|
645
|
+
if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
|
|
639
646
|
computed.flags &= ~2;
|
|
640
647
|
return;
|
|
641
648
|
}
|
|
@@ -737,6 +744,14 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
737
744
|
}
|
|
738
745
|
|
|
739
746
|
let globalVersion = 0;
|
|
747
|
+
class Link {
|
|
748
|
+
constructor(sub, dep) {
|
|
749
|
+
this.sub = sub;
|
|
750
|
+
this.dep = dep;
|
|
751
|
+
this.version = dep.version;
|
|
752
|
+
this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
740
755
|
class Dep {
|
|
741
756
|
constructor(computed) {
|
|
742
757
|
this.computed = computed;
|
|
@@ -759,16 +774,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
759
774
|
}
|
|
760
775
|
let link = this.activeLink;
|
|
761
776
|
if (link === void 0 || link.sub !== activeSub) {
|
|
762
|
-
link = this.activeLink =
|
|
763
|
-
dep: this,
|
|
764
|
-
sub: activeSub,
|
|
765
|
-
version: this.version,
|
|
766
|
-
nextDep: void 0,
|
|
767
|
-
prevDep: void 0,
|
|
768
|
-
nextSub: void 0,
|
|
769
|
-
prevSub: void 0,
|
|
770
|
-
prevActiveLink: void 0
|
|
771
|
-
};
|
|
777
|
+
link = this.activeLink = new Link(activeSub, this);
|
|
772
778
|
if (!activeSub.deps) {
|
|
773
779
|
activeSub.deps = activeSub.depsTail = link;
|
|
774
780
|
} else {
|
|
@@ -831,7 +837,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
831
837
|
}
|
|
832
838
|
}
|
|
833
839
|
for (let link = this.subs; link; link = link.prevSub) {
|
|
834
|
-
link.sub.notify()
|
|
840
|
+
if (link.sub.notify()) {
|
|
841
|
+
;
|
|
842
|
+
link.sub.dep.notify();
|
|
843
|
+
}
|
|
835
844
|
}
|
|
836
845
|
} finally {
|
|
837
846
|
endBatch();
|
|
@@ -1900,8 +1909,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
1900
1909
|
*/
|
|
1901
1910
|
notify() {
|
|
1902
1911
|
this.flags |= 16;
|
|
1903
|
-
if (
|
|
1904
|
-
|
|
1912
|
+
if (!(this.flags & 8) && // avoid infinite self recursion
|
|
1913
|
+
activeSub !== this) {
|
|
1914
|
+
batch(this);
|
|
1915
|
+
return true;
|
|
1905
1916
|
}
|
|
1906
1917
|
}
|
|
1907
1918
|
get value() {
|
|
@@ -2049,20 +2060,12 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2049
2060
|
remove(scope.effects, effect);
|
|
2050
2061
|
}
|
|
2051
2062
|
};
|
|
2052
|
-
if (once) {
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
};
|
|
2059
|
-
} else {
|
|
2060
|
-
const _getter = getter;
|
|
2061
|
-
getter = () => {
|
|
2062
|
-
_getter();
|
|
2063
|
-
watchHandle();
|
|
2064
|
-
};
|
|
2065
|
-
}
|
|
2063
|
+
if (once && cb) {
|
|
2064
|
+
const _cb = cb;
|
|
2065
|
+
cb = (...args) => {
|
|
2066
|
+
_cb(...args);
|
|
2067
|
+
watchHandle();
|
|
2068
|
+
};
|
|
2066
2069
|
}
|
|
2067
2070
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
2068
2071
|
const job = (immediateFirstRun) => {
|
|
@@ -2681,7 +2684,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2681
2684
|
dirtyInstances.delete(instance);
|
|
2682
2685
|
} else if (instance.parent) {
|
|
2683
2686
|
queueJob(() => {
|
|
2687
|
+
isHmrUpdating = true;
|
|
2684
2688
|
instance.parent.update();
|
|
2689
|
+
isHmrUpdating = false;
|
|
2685
2690
|
dirtyInstances.delete(instance);
|
|
2686
2691
|
});
|
|
2687
2692
|
} else if (instance.appContext.reload) {
|
|
@@ -2972,6 +2977,9 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
2972
2977
|
insert(mainAnchor, container, anchor);
|
|
2973
2978
|
const mount = (container2, anchor2) => {
|
|
2974
2979
|
if (shapeFlag & 16) {
|
|
2980
|
+
if (parentComponent && parentComponent.isCE) {
|
|
2981
|
+
parentComponent.ce._teleportTarget = container2;
|
|
2982
|
+
}
|
|
2975
2983
|
mountChildren(
|
|
2976
2984
|
children,
|
|
2977
2985
|
container2,
|
|
@@ -4002,7 +4010,11 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4002
4010
|
remove(cur);
|
|
4003
4011
|
}
|
|
4004
4012
|
} else if (shapeFlag & 8) {
|
|
4005
|
-
|
|
4013
|
+
let clientText = vnode.children;
|
|
4014
|
+
if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
|
|
4015
|
+
clientText = clientText.slice(1);
|
|
4016
|
+
}
|
|
4017
|
+
if (el.textContent !== clientText) {
|
|
4006
4018
|
if (!isMismatchAllowed(el, 0 /* TEXT */)) {
|
|
4007
4019
|
warn$1(
|
|
4008
4020
|
`Hydration text content mismatch on`,
|
|
@@ -4201,7 +4213,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4201
4213
|
}
|
|
4202
4214
|
};
|
|
4203
4215
|
const isTemplateNode = (node) => {
|
|
4204
|
-
return node.nodeType === 1 && node.tagName
|
|
4216
|
+
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
4205
4217
|
};
|
|
4206
4218
|
return [hydrate, hydrateNode];
|
|
4207
4219
|
}
|
|
@@ -4553,7 +4565,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4553
4565
|
load().then(() => {
|
|
4554
4566
|
loaded.value = true;
|
|
4555
4567
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
4556
|
-
|
|
4568
|
+
instance.parent.update();
|
|
4557
4569
|
}
|
|
4558
4570
|
}).catch((err) => {
|
|
4559
4571
|
onError(err);
|
|
@@ -7226,6 +7238,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7226
7238
|
}
|
|
7227
7239
|
}
|
|
7228
7240
|
if (instance.asyncDep) {
|
|
7241
|
+
if (isHmrUpdating) initialVNode.el = null;
|
|
7229
7242
|
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
|
|
7230
7243
|
if (!initialVNode.el) {
|
|
7231
7244
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
@@ -10341,7 +10354,7 @@ Component that was made reactive: `,
|
|
|
10341
10354
|
return true;
|
|
10342
10355
|
}
|
|
10343
10356
|
|
|
10344
|
-
const version = "3.5.
|
|
10357
|
+
const version = "3.5.6";
|
|
10345
10358
|
const warn = warn$1 ;
|
|
10346
10359
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10347
10360
|
const devtools = devtools$1 ;
|
|
@@ -11222,6 +11235,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11222
11235
|
}
|
|
11223
11236
|
}
|
|
11224
11237
|
connectedCallback() {
|
|
11238
|
+
if (!this.isConnected) return;
|
|
11225
11239
|
if (!this.shadowRoot) {
|
|
11226
11240
|
this._parseSlots();
|
|
11227
11241
|
}
|
|
@@ -11264,7 +11278,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11264
11278
|
this._ob = null;
|
|
11265
11279
|
}
|
|
11266
11280
|
this._app && this._app.unmount();
|
|
11267
|
-
this._instance.ce = void 0;
|
|
11281
|
+
if (this._instance) this._instance.ce = void 0;
|
|
11268
11282
|
this._app = this._instance = null;
|
|
11269
11283
|
}
|
|
11270
11284
|
});
|
|
@@ -11483,7 +11497,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11483
11497
|
}
|
|
11484
11498
|
}
|
|
11485
11499
|
/**
|
|
11486
|
-
* Only called when
|
|
11500
|
+
* Only called when shadowRoot is false
|
|
11487
11501
|
*/
|
|
11488
11502
|
_parseSlots() {
|
|
11489
11503
|
const slots = this._slots = {};
|
|
@@ -11495,10 +11509,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11495
11509
|
}
|
|
11496
11510
|
}
|
|
11497
11511
|
/**
|
|
11498
|
-
* Only called when
|
|
11512
|
+
* Only called when shadowRoot is false
|
|
11499
11513
|
*/
|
|
11500
11514
|
_renderSlots() {
|
|
11501
|
-
const outlets = this.querySelectorAll("slot");
|
|
11515
|
+
const outlets = (this._teleportTarget || this).querySelectorAll("slot");
|
|
11502
11516
|
const scopeId = this._instance.type.__scopeId;
|
|
11503
11517
|
for (let i = 0; i < outlets.length; i++) {
|
|
11504
11518
|
const o = outlets[i];
|
|
@@ -11665,7 +11679,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11665
11679
|
child,
|
|
11666
11680
|
resolveTransitionHooks(child, cssTransitionProps, state, instance)
|
|
11667
11681
|
);
|
|
11668
|
-
} else {
|
|
11682
|
+
} else if (child.type !== Text) {
|
|
11669
11683
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
11670
11684
|
}
|
|
11671
11685
|
}
|