@vtj/materials 0.12.19 → 0.12.21

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.13
2
+ * vue v3.5.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -399,6 +399,10 @@ var Vue = (function (exports) {
399
399
  * @internal
400
400
  */
401
401
  this._active = true;
402
+ /**
403
+ * @internal track `on` calls, allow `on` call multiple times
404
+ */
405
+ this._on = 0;
402
406
  /**
403
407
  * @internal
404
408
  */
@@ -469,14 +473,20 @@ var Vue = (function (exports) {
469
473
  * @internal
470
474
  */
471
475
  on() {
472
- activeEffectScope = this;
476
+ if (++this._on === 1) {
477
+ this.prevScope = activeEffectScope;
478
+ activeEffectScope = this;
479
+ }
473
480
  }
474
481
  /**
475
482
  * This should only be called on non-detached scopes
476
483
  * @internal
477
484
  */
478
485
  off() {
479
- activeEffectScope = this.parent;
486
+ if (this._on > 0 && --this._on === 0) {
487
+ activeEffectScope = this.prevScope;
488
+ this.prevScope = void 0;
489
+ }
480
490
  }
481
491
  stop(fromParent) {
482
492
  if (this._active) {
@@ -558,7 +568,7 @@ var Vue = (function (exports) {
558
568
  }
559
569
  resume() {
560
570
  if (this.flags & 64) {
561
- this.flags &= ~64;
571
+ this.flags &= -65;
562
572
  if (pausedQueueEffects.has(this)) {
563
573
  pausedQueueEffects.delete(this);
564
574
  this.trigger();
@@ -598,7 +608,7 @@ var Vue = (function (exports) {
598
608
  cleanupDeps(this);
599
609
  activeSub = prevEffect;
600
610
  shouldTrack = prevShouldTrack;
601
- this.flags &= ~2;
611
+ this.flags &= -3;
602
612
  }
603
613
  }
604
614
  stop() {
@@ -609,7 +619,7 @@ var Vue = (function (exports) {
609
619
  this.deps = this.depsTail = void 0;
610
620
  cleanupEffect(this);
611
621
  this.onStop && this.onStop();
612
- this.flags &= ~1;
622
+ this.flags &= -2;
613
623
  }
614
624
  }
615
625
  trigger() {
@@ -659,7 +669,7 @@ var Vue = (function (exports) {
659
669
  while (e) {
660
670
  const next = e.next;
661
671
  e.next = void 0;
662
- e.flags &= ~8;
672
+ e.flags &= -9;
663
673
  e = next;
664
674
  }
665
675
  }
@@ -670,7 +680,7 @@ var Vue = (function (exports) {
670
680
  while (e) {
671
681
  const next = e.next;
672
682
  e.next = void 0;
673
- e.flags &= ~8;
683
+ e.flags &= -9;
674
684
  if (e.flags & 1) {
675
685
  try {
676
686
  ;
@@ -726,17 +736,16 @@ var Vue = (function (exports) {
726
736
  if (computed.flags & 4 && !(computed.flags & 16)) {
727
737
  return;
728
738
  }
729
- computed.flags &= ~16;
739
+ computed.flags &= -17;
730
740
  if (computed.globalVersion === globalVersion) {
731
741
  return;
732
742
  }
733
743
  computed.globalVersion = globalVersion;
734
- const dep = computed.dep;
735
- computed.flags |= 2;
736
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
737
- computed.flags &= ~2;
744
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
738
745
  return;
739
746
  }
747
+ computed.flags |= 2;
748
+ const dep = computed.dep;
740
749
  const prevSub = activeSub;
741
750
  const prevShouldTrack = shouldTrack;
742
751
  activeSub = computed;
@@ -745,6 +754,7 @@ var Vue = (function (exports) {
745
754
  prepareDeps(computed);
746
755
  const value = computed.fn(computed._value);
747
756
  if (dep.version === 0 || hasChanged(value, computed._value)) {
757
+ computed.flags |= 128;
748
758
  computed._value = value;
749
759
  dep.version++;
750
760
  }
@@ -755,7 +765,7 @@ var Vue = (function (exports) {
755
765
  activeSub = prevSub;
756
766
  shouldTrack = prevShouldTrack;
757
767
  cleanupDeps(computed);
758
- computed.flags &= ~2;
768
+ computed.flags &= -3;
759
769
  }
760
770
  }
761
771
  function removeSub(link, soft = false) {
@@ -774,7 +784,7 @@ var Vue = (function (exports) {
774
784
  if (dep.subs === link) {
775
785
  dep.subs = prevSub;
776
786
  if (!prevSub && dep.computed) {
777
- dep.computed.flags &= ~4;
787
+ dep.computed.flags &= -5;
778
788
  for (let l = dep.computed.deps; l; l = l.nextDep) {
779
789
  removeSub(l, true);
780
790
  }
@@ -1707,14 +1717,14 @@ var Vue = (function (exports) {
1707
1717
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1708
1718
  return target;
1709
1719
  }
1710
- const existingProxy = proxyMap.get(target);
1711
- if (existingProxy) {
1712
- return existingProxy;
1713
- }
1714
1720
  const targetType = getTargetType(target);
1715
1721
  if (targetType === 0 /* INVALID */) {
1716
1722
  return target;
1717
1723
  }
1724
+ const existingProxy = proxyMap.get(target);
1725
+ if (existingProxy) {
1726
+ return existingProxy;
1727
+ }
1718
1728
  const proxy = new Proxy(
1719
1729
  target,
1720
1730
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2558,11 +2568,11 @@ var Vue = (function (exports) {
2558
2568
  queue.splice(i, 1);
2559
2569
  i--;
2560
2570
  if (cb.flags & 4) {
2561
- cb.flags &= ~1;
2571
+ cb.flags &= -2;
2562
2572
  }
2563
2573
  cb();
2564
2574
  if (!(cb.flags & 4)) {
2565
- cb.flags &= ~1;
2575
+ cb.flags &= -2;
2566
2576
  }
2567
2577
  }
2568
2578
  }
@@ -2587,10 +2597,10 @@ var Vue = (function (exports) {
2587
2597
  continue;
2588
2598
  }
2589
2599
  if (cb.flags & 4) {
2590
- cb.flags &= ~1;
2600
+ cb.flags &= -2;
2591
2601
  }
2592
2602
  if (!(cb.flags & 8)) cb();
2593
- cb.flags &= ~1;
2603
+ cb.flags &= -2;
2594
2604
  }
2595
2605
  activePostFlushCbs = null;
2596
2606
  postFlushIndex = 0;
@@ -2626,7 +2636,7 @@ var Vue = (function (exports) {
2626
2636
  for (; flushIndex < queue.length; flushIndex++) {
2627
2637
  const job = queue[flushIndex];
2628
2638
  if (job) {
2629
- job.flags &= ~1;
2639
+ job.flags &= -2;
2630
2640
  }
2631
2641
  }
2632
2642
  flushIndex = -1;
@@ -3115,7 +3125,7 @@ var Vue = (function (exports) {
3115
3125
  namespace,
3116
3126
  slotScopeIds
3117
3127
  );
3118
- traverseStaticChildren(n1, n2, true);
3128
+ traverseStaticChildren(n1, n2, false);
3119
3129
  } else if (!optimized) {
3120
3130
  patchChildren(
3121
3131
  n1,
@@ -4794,6 +4804,9 @@ Server rendered element contains fewer child nodes than client vdom.`
4794
4804
  {
4795
4805
  devtoolsComponentAdded(instance2);
4796
4806
  }
4807
+ {
4808
+ instance2.__keepAliveStorageContainer = storageContainer;
4809
+ }
4797
4810
  };
4798
4811
  function unmount(vnode) {
4799
4812
  resetShapeFlag(vnode);
@@ -4881,7 +4894,7 @@ Server rendered element contains fewer child nodes than client vdom.`
4881
4894
  );
4882
4895
  const { include, exclude, max } = props;
4883
4896
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
4884
- vnode.shapeFlag &= ~256;
4897
+ vnode.shapeFlag &= -257;
4885
4898
  current = vnode;
4886
4899
  return rawVNode;
4887
4900
  }
@@ -4968,8 +4981,8 @@ Server rendered element contains fewer child nodes than client vdom.`
4968
4981
  }, target);
4969
4982
  }
4970
4983
  function resetShapeFlag(vnode) {
4971
- vnode.shapeFlag &= ~256;
4972
- vnode.shapeFlag &= ~512;
4984
+ vnode.shapeFlag &= -257;
4985
+ vnode.shapeFlag &= -513;
4973
4986
  }
4974
4987
  function getInnerChild(vnode) {
4975
4988
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5084,14 +5097,16 @@ If this is a native custom element, make sure to exclude it from component resol
5084
5097
  if (sourceIsArray || isString(source)) {
5085
5098
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5086
5099
  let needsWrap = false;
5100
+ let isReadonlySource = false;
5087
5101
  if (sourceIsReactiveArray) {
5088
5102
  needsWrap = !isShallow(source);
5103
+ isReadonlySource = isReadonly(source);
5089
5104
  source = shallowReadArray(source);
5090
5105
  }
5091
5106
  ret = new Array(source.length);
5092
5107
  for (let i = 0, l = source.length; i < l; i++) {
5093
5108
  ret[i] = renderItem(
5094
- needsWrap ? toReactive(source[i]) : source[i],
5109
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5095
5110
  i,
5096
5111
  void 0,
5097
5112
  cached && cached[i]
@@ -6110,11 +6125,9 @@ If this is a native custom element, make sure to exclude it from component resol
6110
6125
  }
6111
6126
  {
6112
6127
  context.reload = () => {
6113
- render(
6114
- cloneVNode(vnode),
6115
- rootContainer,
6116
- namespace
6117
- );
6128
+ const cloned = cloneVNode(vnode);
6129
+ cloned.el = null;
6130
+ render(cloned, rootContainer, namespace);
6118
6131
  };
6119
6132
  }
6120
6133
  if (isHydrate && hydrate) {
@@ -6637,7 +6650,7 @@ If you want to remount the same app, move your app creation logic into a factory
6637
6650
  return rawSlot;
6638
6651
  }
6639
6652
  const normalized = withCtx((...args) => {
6640
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
6653
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
6641
6654
  warn$1(
6642
6655
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
6643
6656
  );
@@ -6676,7 +6689,7 @@ If you want to remount the same app, move your app creation logic into a factory
6676
6689
  };
6677
6690
  const assignSlots = (slots, children, optimized) => {
6678
6691
  for (const key in children) {
6679
- if (optimized || key !== "_") {
6692
+ if (optimized || !isInternalKey(key)) {
6680
6693
  slots[key] = children[key];
6681
6694
  }
6682
6695
  }
@@ -7362,8 +7375,8 @@ If you want to remount the same app, move your app creation logic into a factory
7362
7375
  endMeasure(instance, `init`);
7363
7376
  }
7364
7377
  }
7378
+ if (isHmrUpdating) initialVNode.el = null;
7365
7379
  if (instance.asyncDep) {
7366
- if (isHmrUpdating) initialVNode.el = null;
7367
7380
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
7368
7381
  if (!initialVNode.el) {
7369
7382
  const placeholder = instance.subTree = createVNode(Comment);
@@ -7925,7 +7938,13 @@ If you want to remount the same app, move your app creation logic into a factory
7925
7938
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
7926
7939
  } else {
7927
7940
  const { leave, delayLeave, afterLeave } = transition;
7928
- const remove2 = () => hostInsert(el, container, anchor);
7941
+ const remove2 = () => {
7942
+ if (vnode.ctx.isUnmounted) {
7943
+ hostRemove(el);
7944
+ } else {
7945
+ hostInsert(el, container, anchor);
7946
+ }
7947
+ };
7929
7948
  const performLeave = () => {
7930
7949
  leave(el, () => {
7931
7950
  remove2();
@@ -7958,7 +7977,9 @@ If you want to remount the same app, move your app creation logic into a factory
7958
7977
  optimized = false;
7959
7978
  }
7960
7979
  if (ref != null) {
7980
+ pauseTracking();
7961
7981
  setRef(ref, null, parentSuspense, vnode, true);
7982
+ resetTracking();
7962
7983
  }
7963
7984
  if (cacheIndex != null) {
7964
7985
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -8070,12 +8091,27 @@ If you want to remount the same app, move your app creation logic into a factory
8070
8091
  if (instance.type.__hmrId) {
8071
8092
  unregisterHMR(instance);
8072
8093
  }
8073
- const { bum, scope, job, subTree, um, m, a } = instance;
8094
+ const {
8095
+ bum,
8096
+ scope,
8097
+ job,
8098
+ subTree,
8099
+ um,
8100
+ m,
8101
+ a,
8102
+ parent,
8103
+ slots: { __: slotCacheKeys }
8104
+ } = instance;
8074
8105
  invalidateMount(m);
8075
8106
  invalidateMount(a);
8076
8107
  if (bum) {
8077
8108
  invokeArrayFns(bum);
8078
8109
  }
8110
+ if (parent && isArray(slotCacheKeys)) {
8111
+ slotCacheKeys.forEach((v) => {
8112
+ parent.renderCache[v] = void 0;
8113
+ });
8114
+ }
8079
8115
  scope.stop();
8080
8116
  if (job) {
8081
8117
  job.flags |= 8;
@@ -8171,8 +8207,8 @@ If you want to remount the same app, move your app creation logic into a factory
8171
8207
  effect.flags |= 32;
8172
8208
  job.flags |= 4;
8173
8209
  } else {
8174
- effect.flags &= ~32;
8175
- job.flags &= ~4;
8210
+ effect.flags &= -33;
8211
+ job.flags &= -5;
8176
8212
  }
8177
8213
  }
8178
8214
  function needTransition(parentSuspense, transition) {
@@ -8199,6 +8235,9 @@ If you want to remount the same app, move your app creation logic into a factory
8199
8235
  if (c2.type === Comment && !c2.el) {
8200
8236
  c2.el = c1.el;
8201
8237
  }
8238
+ {
8239
+ c2.el && (c2.el.__vnode = c2);
8240
+ }
8202
8241
  }
8203
8242
  }
8204
8243
  }
@@ -9516,8 +9555,8 @@ If you want to remount the same app, move your app creation logic into a factory
9516
9555
  if (n2.shapeFlag & 6 && n1.component) {
9517
9556
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
9518
9557
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
9519
- n1.shapeFlag &= ~256;
9520
- n2.shapeFlag &= ~512;
9558
+ n1.shapeFlag &= -257;
9559
+ n2.shapeFlag &= -513;
9521
9560
  return false;
9522
9561
  }
9523
9562
  }
@@ -9966,7 +10005,7 @@ Component that was made reactive: `,
9966
10005
  const { props, children } = instance.vnode;
9967
10006
  const isStateful = isStatefulComponent(instance);
9968
10007
  initProps(instance, props, isStateful, isSSR);
9969
- initSlots(instance, children, optimized);
10008
+ initSlots(instance, children, optimized || isSSR);
9970
10009
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
9971
10010
  isSSR && setInSSRSetupState(false);
9972
10011
  return setupResult;
@@ -10295,13 +10334,15 @@ Component that was made reactive: `,
10295
10334
  if (obj.__isVue) {
10296
10335
  return ["div", vueStyle, `VueInstance`];
10297
10336
  } else if (isRef(obj)) {
10337
+ pauseTracking();
10338
+ const value = obj.value;
10339
+ resetTracking();
10298
10340
  return [
10299
10341
  "div",
10300
10342
  {},
10301
10343
  ["span", vueStyle, genRefFlag(obj)],
10302
10344
  "<",
10303
- // avoid debugger accessing value affecting behavior
10304
- formatValue("_value" in obj ? obj._value : obj),
10345
+ formatValue(value),
10305
10346
  `>`
10306
10347
  ];
10307
10348
  } else if (isReactive(obj)) {
@@ -10482,7 +10523,7 @@ Component that was made reactive: `,
10482
10523
  return true;
10483
10524
  }
10484
10525
 
10485
- const version = "3.5.13";
10526
+ const version = "3.5.14";
10486
10527
  const warn = warn$1 ;
10487
10528
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10488
10529
  const devtools = devtools$1 ;
@@ -11281,7 +11322,7 @@ Expected function or array of functions, received type ${typeof value}.`
11281
11322
  }
11282
11323
  return false;
11283
11324
  }
11284
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
11325
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
11285
11326
  return false;
11286
11327
  }
11287
11328
  if (key === "form") {
@@ -11758,6 +11799,7 @@ Expected function or array of functions, received type ${typeof value}.`
11758
11799
  instance.vnode.el,
11759
11800
  moveClass
11760
11801
  )) {
11802
+ prevChildren = [];
11761
11803
  return;
11762
11804
  }
11763
11805
  prevChildren.forEach(callPendingCbs);
@@ -11781,6 +11823,7 @@ Expected function or array of functions, received type ${typeof value}.`
11781
11823
  };
11782
11824
  el.addEventListener("transitionend", cb);
11783
11825
  });
11826
+ prevChildren = [];
11784
11827
  });
11785
11828
  return () => {
11786
11829
  const rawProps = toRaw(props);
@@ -14417,6 +14460,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14417
14460
  }
14418
14461
  }
14419
14462
  let cachedAsArray = false;
14463
+ const slotCacheKeys = [];
14420
14464
  if (toCache.length === children.length && node.type === 1) {
14421
14465
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
14422
14466
  node.codegenNode.children = getCacheExpression(
@@ -14426,6 +14470,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14426
14470
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
14427
14471
  const slot = getSlotNode(node.codegenNode, "default");
14428
14472
  if (slot) {
14473
+ slotCacheKeys.push(context.cached.length);
14429
14474
  slot.returns = getCacheExpression(
14430
14475
  createArrayExpression(slot.returns)
14431
14476
  );
@@ -14435,6 +14480,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14435
14480
  const slotName = findDir(node, "slot", true);
14436
14481
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
14437
14482
  if (slot) {
14483
+ slotCacheKeys.push(context.cached.length);
14438
14484
  slot.returns = getCacheExpression(
14439
14485
  createArrayExpression(slot.returns)
14440
14486
  );
@@ -14444,9 +14490,18 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14444
14490
  }
14445
14491
  if (!cachedAsArray) {
14446
14492
  for (const child of toCache) {
14493
+ slotCacheKeys.push(context.cached.length);
14447
14494
  child.codegenNode = context.cache(child.codegenNode);
14448
14495
  }
14449
14496
  }
14497
+ if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
14498
+ node.codegenNode.children.properties.push(
14499
+ createObjectProperty(
14500
+ `__`,
14501
+ createSimpleExpression(JSON.stringify(slotCacheKeys), false)
14502
+ )
14503
+ );
14504
+ }
14450
14505
  function getCacheExpression(value) {
14451
14506
  const exp = context.cache(value);
14452
14507
  if (inFor && context.hmr) {
@@ -17091,8 +17146,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17091
17146
  context.onError(createCompilerError(44, exp.loc));
17092
17147
  return createTransformProps();
17093
17148
  }
17094
- const maybeRef = false;
17095
- if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
17149
+ if (!expString.trim() || !isMemberExpression(exp) && true) {
17096
17150
  context.onError(
17097
17151
  createCompilerError(42, exp.loc)
17098
17152
  );