@vtj/materials 0.16.15 → 0.16.17

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.5.30
2
+ * vue v3.5.32
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1955,16 +1955,16 @@ var Vue = (function (exports) {
1955
1955
  return ret;
1956
1956
  }
1957
1957
  class ObjectRefImpl {
1958
- constructor(_object, _key, _defaultValue) {
1958
+ constructor(_object, key, _defaultValue) {
1959
1959
  this._object = _object;
1960
- this._key = _key;
1961
1960
  this._defaultValue = _defaultValue;
1962
1961
  this["__v_isRef"] = true;
1963
1962
  this._value = void 0;
1963
+ this._key = isSymbol(key) ? key : String(key);
1964
1964
  this._raw = toRaw(_object);
1965
1965
  let shallow = true;
1966
1966
  let obj = _object;
1967
- if (!isArray(_object) || !isIntegerKey(String(_key))) {
1967
+ if (!isArray(_object) || isSymbol(this._key) || !isIntegerKey(this._key)) {
1968
1968
  do {
1969
1969
  shallow = !isProxy(obj) || isShallow(obj);
1970
1970
  } while (shallow && (obj = obj["__v_raw"]));
@@ -2764,6 +2764,13 @@ var Vue = (function (exports) {
2764
2764
  }
2765
2765
 
2766
2766
  let isHmrUpdating = false;
2767
+ const setHmrUpdating = (v) => {
2768
+ try {
2769
+ return isHmrUpdating;
2770
+ } finally {
2771
+ isHmrUpdating = v;
2772
+ }
2773
+ };
2767
2774
  const hmrDirtyComponents = /* @__PURE__ */ new Map();
2768
2775
  {
2769
2776
  getGlobalThis().__VUE_HMR_RUNTIME__ = {
@@ -3229,6 +3236,7 @@ var Vue = (function (exports) {
3229
3236
  };
3230
3237
  }
3231
3238
 
3239
+ const pendingMounts = /* @__PURE__ */ new WeakMap();
3232
3240
  const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3233
3241
  const isTeleport = (type) => type.__isTeleport;
3234
3242
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
@@ -3270,88 +3278,84 @@ var Vue = (function (exports) {
3270
3278
  o: { insert, querySelector, createText, createComment }
3271
3279
  } = internals;
3272
3280
  const disabled = isTeleportDisabled(n2.props);
3273
- let { shapeFlag, children, dynamicChildren } = n2;
3281
+ let { dynamicChildren } = n2;
3274
3282
  if (isHmrUpdating) {
3275
3283
  optimized = false;
3276
3284
  dynamicChildren = null;
3277
3285
  }
3286
+ const mount = (vnode, container2, anchor2) => {
3287
+ if (vnode.shapeFlag & 16) {
3288
+ mountChildren(
3289
+ vnode.children,
3290
+ container2,
3291
+ anchor2,
3292
+ parentComponent,
3293
+ parentSuspense,
3294
+ namespace,
3295
+ slotScopeIds,
3296
+ optimized
3297
+ );
3298
+ }
3299
+ };
3300
+ const mountToTarget = (vnode = n2) => {
3301
+ const disabled2 = isTeleportDisabled(vnode.props);
3302
+ const target = vnode.target = resolveTarget(vnode.props, querySelector);
3303
+ const targetAnchor = prepareAnchor(target, vnode, createText, insert);
3304
+ if (target) {
3305
+ if (namespace !== "svg" && isTargetSVG(target)) {
3306
+ namespace = "svg";
3307
+ } else if (namespace !== "mathml" && isTargetMathML(target)) {
3308
+ namespace = "mathml";
3309
+ }
3310
+ if (parentComponent && parentComponent.isCE) {
3311
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3312
+ }
3313
+ if (!disabled2) {
3314
+ mount(vnode, target, targetAnchor);
3315
+ updateCssVars(vnode, false);
3316
+ }
3317
+ } else if (!disabled2) {
3318
+ warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
3319
+ }
3320
+ };
3321
+ const queuePendingMount = (vnode) => {
3322
+ const mountJob = () => {
3323
+ if (pendingMounts.get(vnode) !== mountJob) return;
3324
+ pendingMounts.delete(vnode);
3325
+ if (isTeleportDisabled(vnode.props)) {
3326
+ mount(vnode, container, vnode.anchor);
3327
+ updateCssVars(vnode, true);
3328
+ }
3329
+ mountToTarget(vnode);
3330
+ };
3331
+ pendingMounts.set(vnode, mountJob);
3332
+ queuePostRenderEffect(mountJob, parentSuspense);
3333
+ };
3278
3334
  if (n1 == null) {
3279
3335
  const placeholder = n2.el = createComment("teleport start") ;
3280
3336
  const mainAnchor = n2.anchor = createComment("teleport end") ;
3281
3337
  insert(placeholder, container, anchor);
3282
3338
  insert(mainAnchor, container, anchor);
3283
- const mount = (container2, anchor2) => {
3284
- if (shapeFlag & 16) {
3285
- mountChildren(
3286
- children,
3287
- container2,
3288
- anchor2,
3289
- parentComponent,
3290
- parentSuspense,
3291
- namespace,
3292
- slotScopeIds,
3293
- optimized
3294
- );
3295
- }
3296
- };
3297
- const mountToTarget = () => {
3298
- const target = n2.target = resolveTarget(n2.props, querySelector);
3299
- const targetAnchor = prepareAnchor(target, n2, createText, insert);
3300
- if (target) {
3301
- if (namespace !== "svg" && isTargetSVG(target)) {
3302
- namespace = "svg";
3303
- } else if (namespace !== "mathml" && isTargetMathML(target)) {
3304
- namespace = "mathml";
3305
- }
3306
- if (parentComponent && parentComponent.isCE) {
3307
- (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
3308
- }
3309
- if (!disabled) {
3310
- mount(target, targetAnchor);
3311
- updateCssVars(n2, false);
3312
- }
3313
- } else if (!disabled) {
3314
- warn$1(
3315
- "Invalid Teleport target on mount:",
3316
- target,
3317
- `(${typeof target})`
3318
- );
3319
- }
3320
- };
3339
+ if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
3340
+ queuePendingMount(n2);
3341
+ return;
3342
+ }
3321
3343
  if (disabled) {
3322
- mount(container, mainAnchor);
3344
+ mount(n2, container, mainAnchor);
3323
3345
  updateCssVars(n2, true);
3324
3346
  }
3325
- if (isTeleportDeferred(n2.props)) {
3326
- n2.el.__isMounted = false;
3327
- queuePostRenderEffect(() => {
3328
- mountToTarget();
3329
- delete n2.el.__isMounted;
3330
- }, parentSuspense);
3331
- } else {
3332
- mountToTarget();
3333
- }
3347
+ mountToTarget();
3334
3348
  } else {
3335
- if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
3336
- queuePostRenderEffect(() => {
3337
- TeleportImpl.process(
3338
- n1,
3339
- n2,
3340
- container,
3341
- anchor,
3342
- parentComponent,
3343
- parentSuspense,
3344
- namespace,
3345
- slotScopeIds,
3346
- optimized,
3347
- internals
3348
- );
3349
- }, parentSuspense);
3349
+ n2.el = n1.el;
3350
+ const mainAnchor = n2.anchor = n1.anchor;
3351
+ const pendingMount = pendingMounts.get(n1);
3352
+ if (pendingMount) {
3353
+ pendingMount.flags |= 8;
3354
+ pendingMounts.delete(n1);
3355
+ queuePendingMount(n2);
3350
3356
  return;
3351
3357
  }
3352
- n2.el = n1.el;
3353
3358
  n2.targetStart = n1.targetStart;
3354
- const mainAnchor = n2.anchor = n1.anchor;
3355
3359
  const target = n2.target = n1.target;
3356
3360
  const targetAnchor = n2.targetAnchor = n1.targetAnchor;
3357
3361
  const wasDisabled = isTeleportDisabled(n1.props);
@@ -3444,13 +3448,19 @@ var Vue = (function (exports) {
3444
3448
  target,
3445
3449
  props
3446
3450
  } = vnode;
3451
+ let shouldRemove = doRemove || !isTeleportDisabled(props);
3452
+ const pendingMount = pendingMounts.get(vnode);
3453
+ if (pendingMount) {
3454
+ pendingMount.flags |= 8;
3455
+ pendingMounts.delete(vnode);
3456
+ shouldRemove = false;
3457
+ }
3447
3458
  if (target) {
3448
3459
  hostRemove(targetStart);
3449
3460
  hostRemove(targetAnchor);
3450
3461
  }
3451
3462
  doRemove && hostRemove(anchor);
3452
3463
  if (shapeFlag & 16) {
3453
- const shouldRemove = doRemove || !isTeleportDisabled(props);
3454
3464
  for (let i = 0; i < children.length; i++) {
3455
3465
  const child = children[i];
3456
3466
  unmount(
@@ -3816,7 +3826,7 @@ var Vue = (function (exports) {
3816
3826
  callHook(hook, [el]);
3817
3827
  },
3818
3828
  enter(el) {
3819
- if (leavingVNodesCache[key] === vnode) return;
3829
+ if (!isHmrUpdating && leavingVNodesCache[key] === vnode) return;
3820
3830
  let hook = onEnter;
3821
3831
  let afterHook = onAfterEnter;
3822
3832
  let cancelHook = onEnterCancelled;
@@ -7051,11 +7061,12 @@ If you want to remount the same app, move your app creation logic into a factory
7051
7061
  }
7052
7062
  return nextProp !== prevProp;
7053
7063
  }
7054
- function updateHOCHostEl({ vnode, parent }, el) {
7064
+ function updateHOCHostEl({ vnode, parent, suspense }, el) {
7055
7065
  while (parent) {
7056
7066
  const root = parent.subTree;
7057
7067
  if (root.suspense && root.suspense.activeBranch === vnode) {
7058
- root.el = vnode.el;
7068
+ root.suspense.vnode.el = root.el = el;
7069
+ vnode = root;
7059
7070
  }
7060
7071
  if (root === vnode) {
7061
7072
  (vnode = parent.vnode).el = el;
@@ -7064,6 +7075,9 @@ If you want to remount the same app, move your app creation logic into a factory
7064
7075
  break;
7065
7076
  }
7066
7077
  }
7078
+ if (suspense && suspense.activeBranch === vnode) {
7079
+ suspense.vnode.el = el;
7080
+ }
7067
7081
  }
7068
7082
 
7069
7083
  const internalObjectProto = {};
@@ -7905,10 +7919,17 @@ If you want to remount the same app, move your app creation logic into a factory
7905
7919
  }
7906
7920
  hostInsert(el, container, anchor);
7907
7921
  if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
7922
+ const isHmr = isHmrUpdating;
7908
7923
  queuePostRenderEffect(() => {
7909
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
7910
- needCallTransitionHooks && transition.enter(el);
7911
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
7924
+ let prev;
7925
+ prev = setHmrUpdating(isHmr);
7926
+ try {
7927
+ vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
7928
+ needCallTransitionHooks && transition.enter(el);
7929
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
7930
+ } finally {
7931
+ setHmrUpdating(prev);
7932
+ }
7912
7933
  }, parentSuspense);
7913
7934
  }
7914
7935
  };
@@ -8829,7 +8850,8 @@ If you want to remount the same app, move your app creation logic into a factory
8829
8850
  shapeFlag,
8830
8851
  patchFlag,
8831
8852
  dirs,
8832
- cacheIndex
8853
+ cacheIndex,
8854
+ memo
8833
8855
  } = vnode;
8834
8856
  if (patchFlag === -2) {
8835
8857
  optimized = false;
@@ -8891,10 +8913,14 @@ If you want to remount the same app, move your app creation logic into a factory
8891
8913
  remove(vnode);
8892
8914
  }
8893
8915
  }
8894
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
8916
+ const shouldInvalidateMemo = memo != null && cacheIndex == null;
8917
+ if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs || shouldInvalidateMemo) {
8895
8918
  queuePostRenderEffect(() => {
8896
8919
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
8897
8920
  shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
8921
+ if (shouldInvalidateMemo) {
8922
+ vnode.el = null;
8923
+ }
8898
8924
  }, parentSuspense);
8899
8925
  }
8900
8926
  };
@@ -9448,6 +9474,7 @@ If you want to remount the same app, move your app creation logic into a factory
9448
9474
  pendingId: suspenseId++,
9449
9475
  timeout: typeof timeout === "number" ? timeout : -1,
9450
9476
  activeBranch: null,
9477
+ isFallbackMountPending: false,
9451
9478
  pendingBranch: null,
9452
9479
  isInFallback: !isHydrating,
9453
9480
  isHydrating,
@@ -9497,7 +9524,7 @@ If you want to remount the same app, move your app creation logic into a factory
9497
9524
  }
9498
9525
  };
9499
9526
  }
9500
- if (activeBranch) {
9527
+ if (activeBranch && !suspense.isFallbackMountPending) {
9501
9528
  if (parentNode(activeBranch.el) === container2) {
9502
9529
  anchor = next(activeBranch);
9503
9530
  }
@@ -9510,6 +9537,7 @@ If you want to remount the same app, move your app creation logic into a factory
9510
9537
  move(pendingBranch, container2, anchor, 0);
9511
9538
  }
9512
9539
  }
9540
+ suspense.isFallbackMountPending = false;
9513
9541
  setActiveBranch(suspense, pendingBranch);
9514
9542
  suspense.pendingBranch = null;
9515
9543
  suspense.isInFallback = false;
@@ -9545,6 +9573,7 @@ If you want to remount the same app, move your app creation logic into a factory
9545
9573
  triggerEvent(vnode2, "onFallback");
9546
9574
  const anchor2 = next(activeBranch);
9547
9575
  const mountFallback = () => {
9576
+ suspense.isFallbackMountPending = false;
9548
9577
  if (!suspense.isInFallback) {
9549
9578
  return;
9550
9579
  }
@@ -9564,6 +9593,7 @@ If you want to remount the same app, move your app creation logic into a factory
9564
9593
  };
9565
9594
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
9566
9595
  if (delayEnter) {
9596
+ suspense.isFallbackMountPending = true;
9567
9597
  activeBranch.transition.afterLeave = mountFallback;
9568
9598
  }
9569
9599
  suspense.isInFallback = true;
@@ -9598,6 +9628,7 @@ If you want to remount the same app, move your app creation logic into a factory
9598
9628
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
9599
9629
  return;
9600
9630
  }
9631
+ unsetCurrentInstance();
9601
9632
  instance.asyncResolved = true;
9602
9633
  const { vnode: vnode2 } = instance;
9603
9634
  {
@@ -10114,6 +10145,10 @@ Component that was made reactive: `,
10114
10145
  const incoming = toMerge[key];
10115
10146
  if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {
10116
10147
  ret[key] = existing ? [].concat(existing, incoming) : incoming;
10148
+ } else if (incoming == null && existing == null && // mergeProps({ 'onUpdate:modelValue': undefined }) should not retain
10149
+ // the model listener.
10150
+ !isModelListener(key)) {
10151
+ ret[key] = incoming;
10117
10152
  }
10118
10153
  } else if (key !== "") {
10119
10154
  ret[key] = toMerge[key];
@@ -10784,7 +10819,7 @@ Component that was made reactive: `,
10784
10819
  return true;
10785
10820
  }
10786
10821
 
10787
- const version = "3.5.30";
10822
+ const version = "3.5.32";
10788
10823
  const warn = warn$1 ;
10789
10824
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10790
10825
  const devtools = devtools$1 ;
@@ -12344,7 +12379,8 @@ Expected function or array of functions, received type ${typeof value}.`
12344
12379
  if (elValue === newValue) {
12345
12380
  return;
12346
12381
  }
12347
- if (document.activeElement === el && el.type !== "range") {
12382
+ const rootNode = el.getRootNode();
12383
+ if ((rootNode instanceof Document || rootNode instanceof ShadowRoot) && rootNode.activeElement === el && el.type !== "range") {
12348
12384
  if (lazy && value === oldValue) {
12349
12385
  return;
12350
12386
  }
@@ -16335,7 +16371,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16335
16371
  loop.body = createBlockStatement([
16336
16372
  createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
16337
16373
  createCompoundExpression([
16338
- `if (_cached`,
16374
+ `if (_cached && _cached.el`,
16339
16375
  ...keyExp ? [` && _cached.key === `, keyExp] : [],
16340
16376
  ` && ${context.helperString(
16341
16377
  IS_MEMO_SAME