@vue/runtime-dom 3.5.31 → 3.5.32
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 +1 -1
- package/dist/runtime-dom.cjs.prod.js +1 -1
- package/dist/runtime-dom.esm-browser.js +74 -71
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +1 -1
- package/dist/runtime-dom.global.js +74 -71
- 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.32
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3188,6 +3188,7 @@ function createPathGetter(ctx, path) {
|
|
|
3188
3188
|
};
|
|
3189
3189
|
}
|
|
3190
3190
|
|
|
3191
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3191
3192
|
const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
|
|
3192
3193
|
const isTeleport = (type) => type.__isTeleport;
|
|
3193
3194
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
@@ -3229,91 +3230,86 @@ const TeleportImpl = {
|
|
|
3229
3230
|
o: { insert, querySelector, createText, createComment }
|
|
3230
3231
|
} = internals;
|
|
3231
3232
|
const disabled = isTeleportDisabled(n2.props);
|
|
3232
|
-
let {
|
|
3233
|
+
let { dynamicChildren } = n2;
|
|
3233
3234
|
if (isHmrUpdating) {
|
|
3234
3235
|
optimized = false;
|
|
3235
3236
|
dynamicChildren = null;
|
|
3236
3237
|
}
|
|
3238
|
+
const mount = (vnode, container2, anchor2) => {
|
|
3239
|
+
if (vnode.shapeFlag & 16) {
|
|
3240
|
+
mountChildren(
|
|
3241
|
+
vnode.children,
|
|
3242
|
+
container2,
|
|
3243
|
+
anchor2,
|
|
3244
|
+
parentComponent,
|
|
3245
|
+
parentSuspense,
|
|
3246
|
+
namespace,
|
|
3247
|
+
slotScopeIds,
|
|
3248
|
+
optimized
|
|
3249
|
+
);
|
|
3250
|
+
}
|
|
3251
|
+
};
|
|
3252
|
+
const mountToTarget = (vnode = n2) => {
|
|
3253
|
+
const disabled2 = isTeleportDisabled(vnode.props);
|
|
3254
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
3255
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
3256
|
+
if (target) {
|
|
3257
|
+
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
3258
|
+
namespace = "svg";
|
|
3259
|
+
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3260
|
+
namespace = "mathml";
|
|
3261
|
+
}
|
|
3262
|
+
if (parentComponent && parentComponent.isCE) {
|
|
3263
|
+
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3264
|
+
}
|
|
3265
|
+
if (!disabled2) {
|
|
3266
|
+
mount(vnode, target, targetAnchor);
|
|
3267
|
+
updateCssVars(vnode, false);
|
|
3268
|
+
}
|
|
3269
|
+
} else if (!disabled2) {
|
|
3270
|
+
warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
3271
|
+
}
|
|
3272
|
+
};
|
|
3273
|
+
const queuePendingMount = (vnode) => {
|
|
3274
|
+
const mountJob = () => {
|
|
3275
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3276
|
+
pendingMounts.delete(vnode);
|
|
3277
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
3278
|
+
mount(vnode, container, vnode.anchor);
|
|
3279
|
+
updateCssVars(vnode, true);
|
|
3280
|
+
}
|
|
3281
|
+
mountToTarget(vnode);
|
|
3282
|
+
};
|
|
3283
|
+
pendingMounts.set(vnode, mountJob);
|
|
3284
|
+
queuePostRenderEffect(mountJob, parentSuspense);
|
|
3285
|
+
};
|
|
3237
3286
|
if (n1 == null) {
|
|
3238
3287
|
const placeholder = n2.el = createComment("teleport start") ;
|
|
3239
3288
|
const mainAnchor = n2.anchor = createComment("teleport end") ;
|
|
3240
3289
|
insert(placeholder, container, anchor);
|
|
3241
3290
|
insert(mainAnchor, container, anchor);
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
container2,
|
|
3247
|
-
anchor2,
|
|
3248
|
-
parentComponent,
|
|
3249
|
-
parentSuspense,
|
|
3250
|
-
namespace,
|
|
3251
|
-
slotScopeIds,
|
|
3252
|
-
optimized
|
|
3253
|
-
);
|
|
3254
|
-
}
|
|
3255
|
-
};
|
|
3256
|
-
const mountToTarget = () => {
|
|
3257
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3258
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3259
|
-
if (target) {
|
|
3260
|
-
if (namespace !== "svg" && isTargetSVG(target)) {
|
|
3261
|
-
namespace = "svg";
|
|
3262
|
-
} else if (namespace !== "mathml" && isTargetMathML(target)) {
|
|
3263
|
-
namespace = "mathml";
|
|
3264
|
-
}
|
|
3265
|
-
if (parentComponent && parentComponent.isCE) {
|
|
3266
|
-
(parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3267
|
-
}
|
|
3268
|
-
if (!disabled) {
|
|
3269
|
-
mount(target, targetAnchor);
|
|
3270
|
-
updateCssVars(n2, false);
|
|
3271
|
-
}
|
|
3272
|
-
} else if (!disabled) {
|
|
3273
|
-
warn$1(
|
|
3274
|
-
"Invalid Teleport target on mount:",
|
|
3275
|
-
target,
|
|
3276
|
-
`(${typeof target})`
|
|
3277
|
-
);
|
|
3278
|
-
}
|
|
3279
|
-
};
|
|
3291
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3292
|
+
queuePendingMount(n2);
|
|
3293
|
+
return;
|
|
3294
|
+
}
|
|
3280
3295
|
if (disabled) {
|
|
3281
|
-
mount(container, mainAnchor);
|
|
3296
|
+
mount(n2, container, mainAnchor);
|
|
3282
3297
|
updateCssVars(n2, true);
|
|
3283
3298
|
}
|
|
3284
|
-
|
|
3285
|
-
n2.el.__isMounted = false;
|
|
3286
|
-
queuePostRenderEffect(() => {
|
|
3287
|
-
if (n2.el.__isMounted !== false) return;
|
|
3288
|
-
mountToTarget();
|
|
3289
|
-
delete n2.el.__isMounted;
|
|
3290
|
-
}, parentSuspense);
|
|
3291
|
-
} else {
|
|
3292
|
-
mountToTarget();
|
|
3293
|
-
}
|
|
3299
|
+
mountToTarget();
|
|
3294
3300
|
} else {
|
|
3295
3301
|
n2.el = n1.el;
|
|
3296
|
-
n2.targetStart = n1.targetStart;
|
|
3297
3302
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
3298
|
-
const
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
n1,
|
|
3304
|
-
n2,
|
|
3305
|
-
container,
|
|
3306
|
-
anchor,
|
|
3307
|
-
parentComponent,
|
|
3308
|
-
parentSuspense,
|
|
3309
|
-
namespace,
|
|
3310
|
-
slotScopeIds,
|
|
3311
|
-
optimized,
|
|
3312
|
-
internals
|
|
3313
|
-
);
|
|
3314
|
-
}, parentSuspense);
|
|
3303
|
+
const pendingMount = pendingMounts.get(n1);
|
|
3304
|
+
if (pendingMount) {
|
|
3305
|
+
pendingMount.flags |= 8;
|
|
3306
|
+
pendingMounts.delete(n1);
|
|
3307
|
+
queuePendingMount(n2);
|
|
3315
3308
|
return;
|
|
3316
3309
|
}
|
|
3310
|
+
n2.targetStart = n1.targetStart;
|
|
3311
|
+
const target = n2.target = n1.target;
|
|
3312
|
+
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3317
3313
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3318
3314
|
const currentContainer = wasDisabled ? container : target;
|
|
3319
3315
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -3404,13 +3400,19 @@ const TeleportImpl = {
|
|
|
3404
3400
|
target,
|
|
3405
3401
|
props
|
|
3406
3402
|
} = vnode;
|
|
3403
|
+
let shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3404
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
3405
|
+
if (pendingMount) {
|
|
3406
|
+
pendingMount.flags |= 8;
|
|
3407
|
+
pendingMounts.delete(vnode);
|
|
3408
|
+
shouldRemove = false;
|
|
3409
|
+
}
|
|
3407
3410
|
if (target) {
|
|
3408
3411
|
hostRemove(targetStart);
|
|
3409
3412
|
hostRemove(targetAnchor);
|
|
3410
3413
|
}
|
|
3411
3414
|
doRemove && hostRemove(anchor);
|
|
3412
3415
|
if (shapeFlag & 16) {
|
|
3413
|
-
const shouldRemove = doRemove || !isTeleportDisabled(props);
|
|
3414
3416
|
for (let i = 0; i < children.length; i++) {
|
|
3415
3417
|
const child = children[i];
|
|
3416
3418
|
unmount(
|
|
@@ -9587,6 +9589,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9587
9589
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
9588
9590
|
return;
|
|
9589
9591
|
}
|
|
9592
|
+
unsetCurrentInstance();
|
|
9590
9593
|
instance.asyncResolved = true;
|
|
9591
9594
|
const { vnode: vnode2 } = instance;
|
|
9592
9595
|
{
|
|
@@ -10791,7 +10794,7 @@ function isMemoSame(cached, memo) {
|
|
|
10791
10794
|
return true;
|
|
10792
10795
|
}
|
|
10793
10796
|
|
|
10794
|
-
const version = "3.5.
|
|
10797
|
+
const version = "3.5.32";
|
|
10795
10798
|
const warn = warn$1 ;
|
|
10796
10799
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10797
10800
|
const devtools = devtools$1 ;
|