@vue/runtime-core 3.4.34 → 3.4.35
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-core.cjs.js +50 -34
- package/dist/runtime-core.cjs.prod.js +50 -46
- package/dist/runtime-core.d.ts +2 -2
- package/dist/runtime-core.esm-bundler.js +50 -34
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.35
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2980,14 +2980,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
2980
2980
|
if (validatePropName(normalizedKey)) {
|
|
2981
2981
|
const opt = raw[key];
|
|
2982
2982
|
const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2983
|
+
const propType = prop.type;
|
|
2984
|
+
let shouldCast = false;
|
|
2985
|
+
let shouldCastTrue = true;
|
|
2986
|
+
if (shared.isArray(propType)) {
|
|
2987
|
+
for (let index = 0; index < propType.length; ++index) {
|
|
2988
|
+
const type = propType[index];
|
|
2989
|
+
const typeName = shared.isFunction(type) && type.name;
|
|
2990
|
+
if (typeName === "Boolean") {
|
|
2991
|
+
shouldCast = true;
|
|
2992
|
+
break;
|
|
2993
|
+
} else if (typeName === "String") {
|
|
2994
|
+
shouldCastTrue = false;
|
|
2995
|
+
}
|
|
2990
2996
|
}
|
|
2997
|
+
} else {
|
|
2998
|
+
shouldCast = shared.isFunction(propType) && propType.name === "Boolean";
|
|
2999
|
+
}
|
|
3000
|
+
prop[0 /* shouldCast */] = shouldCast;
|
|
3001
|
+
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
3002
|
+
if (shouldCast || shared.hasOwn(prop, "default")) {
|
|
3003
|
+
needCastKeys.push(normalizedKey);
|
|
2991
3004
|
}
|
|
2992
3005
|
}
|
|
2993
3006
|
}
|
|
@@ -3018,17 +3031,6 @@ function getType(ctor) {
|
|
|
3018
3031
|
}
|
|
3019
3032
|
return "";
|
|
3020
3033
|
}
|
|
3021
|
-
function isSameType(a, b) {
|
|
3022
|
-
return getType(a) === getType(b);
|
|
3023
|
-
}
|
|
3024
|
-
function getTypeIndex(type, expectedTypes) {
|
|
3025
|
-
if (shared.isArray(expectedTypes)) {
|
|
3026
|
-
return expectedTypes.findIndex((t) => isSameType(t, type));
|
|
3027
|
-
} else if (shared.isFunction(expectedTypes)) {
|
|
3028
|
-
return isSameType(expectedTypes, type) ? 0 : -1;
|
|
3029
|
-
}
|
|
3030
|
-
return -1;
|
|
3031
|
-
}
|
|
3032
3034
|
function validateProps(rawProps, props, instance) {
|
|
3033
3035
|
const resolvedValues = reactivity.toRaw(props);
|
|
3034
3036
|
const options = instance.propsOptions[0];
|
|
@@ -3368,15 +3370,11 @@ const TeleportImpl = {
|
|
|
3368
3370
|
if (n1 == null) {
|
|
3369
3371
|
const placeholder = n2.el = createComment("teleport start") ;
|
|
3370
3372
|
const mainAnchor = n2.anchor = createComment("teleport end") ;
|
|
3371
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3372
|
-
const targetStart = n2.targetStart = createText("");
|
|
3373
|
-
const targetAnchor = n2.targetAnchor = createText("");
|
|
3374
3373
|
insert(placeholder, container, anchor);
|
|
3375
3374
|
insert(mainAnchor, container, anchor);
|
|
3376
|
-
|
|
3375
|
+
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3376
|
+
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3377
3377
|
if (target) {
|
|
3378
|
-
insert(targetStart, target);
|
|
3379
|
-
insert(targetAnchor, target);
|
|
3380
3378
|
if (namespace === "svg" || isTargetSVG(target)) {
|
|
3381
3379
|
namespace = "svg";
|
|
3382
3380
|
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
@@ -3548,7 +3546,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
3548
3546
|
}
|
|
3549
3547
|
}
|
|
3550
3548
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3551
|
-
o: { nextSibling, parentNode, querySelector }
|
|
3549
|
+
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3552
3550
|
}, hydrateChildren) {
|
|
3553
3551
|
const target = vnode.target = resolveTarget(
|
|
3554
3552
|
vnode.props,
|
|
@@ -3567,20 +3565,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3567
3565
|
slotScopeIds,
|
|
3568
3566
|
optimized
|
|
3569
3567
|
);
|
|
3570
|
-
vnode.
|
|
3568
|
+
vnode.targetStart = targetNode;
|
|
3569
|
+
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
3571
3570
|
} else {
|
|
3572
3571
|
vnode.anchor = nextSibling(node);
|
|
3573
3572
|
let targetAnchor = targetNode;
|
|
3574
3573
|
while (targetAnchor) {
|
|
3575
|
-
targetAnchor
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3574
|
+
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
3575
|
+
if (targetAnchor.data === "teleport start anchor") {
|
|
3576
|
+
vnode.targetStart = targetAnchor;
|
|
3577
|
+
} else if (targetAnchor.data === "teleport anchor") {
|
|
3578
|
+
vnode.targetAnchor = targetAnchor;
|
|
3579
|
+
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
3580
|
+
break;
|
|
3581
|
+
}
|
|
3580
3582
|
}
|
|
3583
|
+
targetAnchor = nextSibling(targetAnchor);
|
|
3584
|
+
}
|
|
3585
|
+
if (!vnode.targetAnchor) {
|
|
3586
|
+
prepareAnchor(target, vnode, createText, insert);
|
|
3581
3587
|
}
|
|
3582
3588
|
hydrateChildren(
|
|
3583
|
-
targetNode,
|
|
3589
|
+
targetNode && nextSibling(targetNode),
|
|
3584
3590
|
vnode,
|
|
3585
3591
|
target,
|
|
3586
3592
|
parentComponent,
|
|
@@ -3606,6 +3612,16 @@ function updateCssVars(vnode) {
|
|
|
3606
3612
|
ctx.ut();
|
|
3607
3613
|
}
|
|
3608
3614
|
}
|
|
3615
|
+
function prepareAnchor(target, vnode, createText, insert) {
|
|
3616
|
+
const targetStart = vnode.targetStart = createText("");
|
|
3617
|
+
const targetAnchor = vnode.targetAnchor = createText("");
|
|
3618
|
+
targetStart[TeleportEndKey] = targetAnchor;
|
|
3619
|
+
if (target) {
|
|
3620
|
+
insert(targetStart, target);
|
|
3621
|
+
insert(targetAnchor, target);
|
|
3622
|
+
}
|
|
3623
|
+
return targetAnchor;
|
|
3624
|
+
}
|
|
3609
3625
|
|
|
3610
3626
|
let hasLoggedMismatchError = false;
|
|
3611
3627
|
const logMismatchError = () => {
|
|
@@ -8117,7 +8133,7 @@ function isMemoSame(cached, memo) {
|
|
|
8117
8133
|
return true;
|
|
8118
8134
|
}
|
|
8119
8135
|
|
|
8120
|
-
const version = "3.4.
|
|
8136
|
+
const version = "3.4.35";
|
|
8121
8137
|
const warn = warn$1 ;
|
|
8122
8138
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8123
8139
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.35
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2215,14 +2215,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
2215
2215
|
if (validatePropName(normalizedKey)) {
|
|
2216
2216
|
const opt = raw[key];
|
|
2217
2217
|
const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2218
|
+
const propType = prop.type;
|
|
2219
|
+
let shouldCast = false;
|
|
2220
|
+
let shouldCastTrue = true;
|
|
2221
|
+
if (shared.isArray(propType)) {
|
|
2222
|
+
for (let index = 0; index < propType.length; ++index) {
|
|
2223
|
+
const type = propType[index];
|
|
2224
|
+
const typeName = shared.isFunction(type) && type.name;
|
|
2225
|
+
if (typeName === "Boolean") {
|
|
2226
|
+
shouldCast = true;
|
|
2227
|
+
break;
|
|
2228
|
+
} else if (typeName === "String") {
|
|
2229
|
+
shouldCastTrue = false;
|
|
2230
|
+
}
|
|
2225
2231
|
}
|
|
2232
|
+
} else {
|
|
2233
|
+
shouldCast = shared.isFunction(propType) && propType.name === "Boolean";
|
|
2234
|
+
}
|
|
2235
|
+
prop[0 /* shouldCast */] = shouldCast;
|
|
2236
|
+
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
2237
|
+
if (shouldCast || shared.hasOwn(prop, "default")) {
|
|
2238
|
+
needCastKeys.push(normalizedKey);
|
|
2226
2239
|
}
|
|
2227
2240
|
}
|
|
2228
2241
|
}
|
|
@@ -2239,29 +2252,6 @@ function validatePropName(key) {
|
|
|
2239
2252
|
}
|
|
2240
2253
|
return false;
|
|
2241
2254
|
}
|
|
2242
|
-
function getType(ctor) {
|
|
2243
|
-
if (ctor === null) {
|
|
2244
|
-
return "null";
|
|
2245
|
-
}
|
|
2246
|
-
if (typeof ctor === "function") {
|
|
2247
|
-
return ctor.name || "";
|
|
2248
|
-
} else if (typeof ctor === "object") {
|
|
2249
|
-
const name = ctor.constructor && ctor.constructor.name;
|
|
2250
|
-
return name || "";
|
|
2251
|
-
}
|
|
2252
|
-
return "";
|
|
2253
|
-
}
|
|
2254
|
-
function isSameType(a, b) {
|
|
2255
|
-
return getType(a) === getType(b);
|
|
2256
|
-
}
|
|
2257
|
-
function getTypeIndex(type, expectedTypes) {
|
|
2258
|
-
if (shared.isArray(expectedTypes)) {
|
|
2259
|
-
return expectedTypes.findIndex((t) => isSameType(t, type));
|
|
2260
|
-
} else if (shared.isFunction(expectedTypes)) {
|
|
2261
|
-
return isSameType(expectedTypes, type) ? 0 : -1;
|
|
2262
|
-
}
|
|
2263
|
-
return -1;
|
|
2264
|
-
}
|
|
2265
2255
|
|
|
2266
2256
|
const isInternalKey = (key) => key[0] === "_" || key === "$stable";
|
|
2267
2257
|
const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
@@ -2457,15 +2447,11 @@ const TeleportImpl = {
|
|
|
2457
2447
|
if (n1 == null) {
|
|
2458
2448
|
const placeholder = n2.el = createText("");
|
|
2459
2449
|
const mainAnchor = n2.anchor = createText("");
|
|
2460
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
2461
|
-
const targetStart = n2.targetStart = createText("");
|
|
2462
|
-
const targetAnchor = n2.targetAnchor = createText("");
|
|
2463
2450
|
insert(placeholder, container, anchor);
|
|
2464
2451
|
insert(mainAnchor, container, anchor);
|
|
2465
|
-
|
|
2452
|
+
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
2453
|
+
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
2466
2454
|
if (target) {
|
|
2467
|
-
insert(targetStart, target);
|
|
2468
|
-
insert(targetAnchor, target);
|
|
2469
2455
|
if (namespace === "svg" || isTargetSVG(target)) {
|
|
2470
2456
|
namespace = "svg";
|
|
2471
2457
|
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
@@ -2629,7 +2615,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
2629
2615
|
}
|
|
2630
2616
|
}
|
|
2631
2617
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
2632
|
-
o: { nextSibling, parentNode, querySelector }
|
|
2618
|
+
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
2633
2619
|
}, hydrateChildren) {
|
|
2634
2620
|
const target = vnode.target = resolveTarget(
|
|
2635
2621
|
vnode.props,
|
|
@@ -2648,20 +2634,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
2648
2634
|
slotScopeIds,
|
|
2649
2635
|
optimized
|
|
2650
2636
|
);
|
|
2651
|
-
vnode.
|
|
2637
|
+
vnode.targetStart = targetNode;
|
|
2638
|
+
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
2652
2639
|
} else {
|
|
2653
2640
|
vnode.anchor = nextSibling(node);
|
|
2654
2641
|
let targetAnchor = targetNode;
|
|
2655
2642
|
while (targetAnchor) {
|
|
2656
|
-
targetAnchor
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2643
|
+
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
2644
|
+
if (targetAnchor.data === "teleport start anchor") {
|
|
2645
|
+
vnode.targetStart = targetAnchor;
|
|
2646
|
+
} else if (targetAnchor.data === "teleport anchor") {
|
|
2647
|
+
vnode.targetAnchor = targetAnchor;
|
|
2648
|
+
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
2649
|
+
break;
|
|
2650
|
+
}
|
|
2661
2651
|
}
|
|
2652
|
+
targetAnchor = nextSibling(targetAnchor);
|
|
2653
|
+
}
|
|
2654
|
+
if (!vnode.targetAnchor) {
|
|
2655
|
+
prepareAnchor(target, vnode, createText, insert);
|
|
2662
2656
|
}
|
|
2663
2657
|
hydrateChildren(
|
|
2664
|
-
targetNode,
|
|
2658
|
+
targetNode && nextSibling(targetNode),
|
|
2665
2659
|
vnode,
|
|
2666
2660
|
target,
|
|
2667
2661
|
parentComponent,
|
|
@@ -2687,6 +2681,16 @@ function updateCssVars(vnode) {
|
|
|
2687
2681
|
ctx.ut();
|
|
2688
2682
|
}
|
|
2689
2683
|
}
|
|
2684
|
+
function prepareAnchor(target, vnode, createText, insert) {
|
|
2685
|
+
const targetStart = vnode.targetStart = createText("");
|
|
2686
|
+
const targetAnchor = vnode.targetAnchor = createText("");
|
|
2687
|
+
targetStart[TeleportEndKey] = targetAnchor;
|
|
2688
|
+
if (target) {
|
|
2689
|
+
insert(targetStart, target);
|
|
2690
|
+
insert(targetAnchor, target);
|
|
2691
|
+
}
|
|
2692
|
+
return targetAnchor;
|
|
2693
|
+
}
|
|
2690
2694
|
|
|
2691
2695
|
let hasLoggedMismatchError = false;
|
|
2692
2696
|
const logMismatchError = () => {
|
|
@@ -6301,7 +6305,7 @@ function isMemoSame(cached, memo) {
|
|
|
6301
6305
|
return true;
|
|
6302
6306
|
}
|
|
6303
6307
|
|
|
6304
|
-
const version = "3.4.
|
|
6308
|
+
const version = "3.4.35";
|
|
6305
6309
|
const warn$1 = shared.NOOP;
|
|
6306
6310
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6307
6311
|
const devtools = void 0;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -846,7 +846,7 @@ declare enum TeleportMoveTypes {
|
|
|
846
846
|
REORDER = 2
|
|
847
847
|
}
|
|
848
848
|
declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void;
|
|
849
|
-
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
849
|
+
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector, insert, createText }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
850
850
|
export declare const Teleport: {
|
|
851
851
|
new (): {
|
|
852
852
|
$props: VNodeProps & TeleportProps;
|
|
@@ -1146,7 +1146,7 @@ export declare function registerRuntimeCompiler(_compile: any): void;
|
|
|
1146
1146
|
export declare const isRuntimeOnly: () => boolean;
|
|
1147
1147
|
|
|
1148
1148
|
export type WatchEffect = (onCleanup: OnCleanup) => void;
|
|
1149
|
-
export type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T);
|
|
1149
|
+
export type WatchSource<T = any> = Ref<T, any> | ComputedRef<T> | (() => T);
|
|
1150
1150
|
export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
|
|
1151
1151
|
type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
|
|
1152
1152
|
type MapSources<T, Immediate> = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.35
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2986,14 +2986,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
2986
2986
|
if (validatePropName(normalizedKey)) {
|
|
2987
2987
|
const opt = raw[key];
|
|
2988
2988
|
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2989
|
+
const propType = prop.type;
|
|
2990
|
+
let shouldCast = false;
|
|
2991
|
+
let shouldCastTrue = true;
|
|
2992
|
+
if (isArray(propType)) {
|
|
2993
|
+
for (let index = 0; index < propType.length; ++index) {
|
|
2994
|
+
const type = propType[index];
|
|
2995
|
+
const typeName = isFunction(type) && type.name;
|
|
2996
|
+
if (typeName === "Boolean") {
|
|
2997
|
+
shouldCast = true;
|
|
2998
|
+
break;
|
|
2999
|
+
} else if (typeName === "String") {
|
|
3000
|
+
shouldCastTrue = false;
|
|
3001
|
+
}
|
|
2996
3002
|
}
|
|
3003
|
+
} else {
|
|
3004
|
+
shouldCast = isFunction(propType) && propType.name === "Boolean";
|
|
3005
|
+
}
|
|
3006
|
+
prop[0 /* shouldCast */] = shouldCast;
|
|
3007
|
+
prop[1 /* shouldCastTrue */] = shouldCastTrue;
|
|
3008
|
+
if (shouldCast || hasOwn(prop, "default")) {
|
|
3009
|
+
needCastKeys.push(normalizedKey);
|
|
2997
3010
|
}
|
|
2998
3011
|
}
|
|
2999
3012
|
}
|
|
@@ -3024,17 +3037,6 @@ function getType(ctor) {
|
|
|
3024
3037
|
}
|
|
3025
3038
|
return "";
|
|
3026
3039
|
}
|
|
3027
|
-
function isSameType(a, b) {
|
|
3028
|
-
return getType(a) === getType(b);
|
|
3029
|
-
}
|
|
3030
|
-
function getTypeIndex(type, expectedTypes) {
|
|
3031
|
-
if (isArray(expectedTypes)) {
|
|
3032
|
-
return expectedTypes.findIndex((t) => isSameType(t, type));
|
|
3033
|
-
} else if (isFunction(expectedTypes)) {
|
|
3034
|
-
return isSameType(expectedTypes, type) ? 0 : -1;
|
|
3035
|
-
}
|
|
3036
|
-
return -1;
|
|
3037
|
-
}
|
|
3038
3040
|
function validateProps(rawProps, props, instance) {
|
|
3039
3041
|
const resolvedValues = toRaw(props);
|
|
3040
3042
|
const options = instance.propsOptions[0];
|
|
@@ -3374,15 +3376,11 @@ const TeleportImpl = {
|
|
|
3374
3376
|
if (n1 == null) {
|
|
3375
3377
|
const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText("");
|
|
3376
3378
|
const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText("");
|
|
3377
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3378
|
-
const targetStart = n2.targetStart = createText("");
|
|
3379
|
-
const targetAnchor = n2.targetAnchor = createText("");
|
|
3380
3379
|
insert(placeholder, container, anchor);
|
|
3381
3380
|
insert(mainAnchor, container, anchor);
|
|
3382
|
-
|
|
3381
|
+
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3382
|
+
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3383
3383
|
if (target) {
|
|
3384
|
-
insert(targetStart, target);
|
|
3385
|
-
insert(targetAnchor, target);
|
|
3386
3384
|
if (namespace === "svg" || isTargetSVG(target)) {
|
|
3387
3385
|
namespace = "svg";
|
|
3388
3386
|
} else if (namespace === "mathml" || isTargetMathML(target)) {
|
|
@@ -3554,7 +3552,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
3554
3552
|
}
|
|
3555
3553
|
}
|
|
3556
3554
|
function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
|
|
3557
|
-
o: { nextSibling, parentNode, querySelector }
|
|
3555
|
+
o: { nextSibling, parentNode, querySelector, insert, createText }
|
|
3558
3556
|
}, hydrateChildren) {
|
|
3559
3557
|
const target = vnode.target = resolveTarget(
|
|
3560
3558
|
vnode.props,
|
|
@@ -3573,20 +3571,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3573
3571
|
slotScopeIds,
|
|
3574
3572
|
optimized
|
|
3575
3573
|
);
|
|
3576
|
-
vnode.
|
|
3574
|
+
vnode.targetStart = targetNode;
|
|
3575
|
+
vnode.targetAnchor = targetNode && nextSibling(targetNode);
|
|
3577
3576
|
} else {
|
|
3578
3577
|
vnode.anchor = nextSibling(node);
|
|
3579
3578
|
let targetAnchor = targetNode;
|
|
3580
3579
|
while (targetAnchor) {
|
|
3581
|
-
targetAnchor
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3580
|
+
if (targetAnchor && targetAnchor.nodeType === 8) {
|
|
3581
|
+
if (targetAnchor.data === "teleport start anchor") {
|
|
3582
|
+
vnode.targetStart = targetAnchor;
|
|
3583
|
+
} else if (targetAnchor.data === "teleport anchor") {
|
|
3584
|
+
vnode.targetAnchor = targetAnchor;
|
|
3585
|
+
target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
|
|
3586
|
+
break;
|
|
3587
|
+
}
|
|
3586
3588
|
}
|
|
3589
|
+
targetAnchor = nextSibling(targetAnchor);
|
|
3590
|
+
}
|
|
3591
|
+
if (!vnode.targetAnchor) {
|
|
3592
|
+
prepareAnchor(target, vnode, createText, insert);
|
|
3587
3593
|
}
|
|
3588
3594
|
hydrateChildren(
|
|
3589
|
-
targetNode,
|
|
3595
|
+
targetNode && nextSibling(targetNode),
|
|
3590
3596
|
vnode,
|
|
3591
3597
|
target,
|
|
3592
3598
|
parentComponent,
|
|
@@ -3612,6 +3618,16 @@ function updateCssVars(vnode) {
|
|
|
3612
3618
|
ctx.ut();
|
|
3613
3619
|
}
|
|
3614
3620
|
}
|
|
3621
|
+
function prepareAnchor(target, vnode, createText, insert) {
|
|
3622
|
+
const targetStart = vnode.targetStart = createText("");
|
|
3623
|
+
const targetAnchor = vnode.targetAnchor = createText("");
|
|
3624
|
+
targetStart[TeleportEndKey] = targetAnchor;
|
|
3625
|
+
if (target) {
|
|
3626
|
+
insert(targetStart, target);
|
|
3627
|
+
insert(targetAnchor, target);
|
|
3628
|
+
}
|
|
3629
|
+
return targetAnchor;
|
|
3630
|
+
}
|
|
3615
3631
|
|
|
3616
3632
|
let hasLoggedMismatchError = false;
|
|
3617
3633
|
const logMismatchError = () => {
|
|
@@ -8186,7 +8202,7 @@ function isMemoSame(cached, memo) {
|
|
|
8186
8202
|
return true;
|
|
8187
8203
|
}
|
|
8188
8204
|
|
|
8189
|
-
const version = "3.4.
|
|
8205
|
+
const version = "3.4.35";
|
|
8190
8206
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8191
8207
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8192
8208
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.35",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/shared": "3.4.
|
|
50
|
-
"@vue/reactivity": "3.4.
|
|
49
|
+
"@vue/shared": "3.4.35",
|
|
50
|
+
"@vue/reactivity": "3.4.35"
|
|
51
51
|
}
|
|
52
52
|
}
|