@vue/runtime-dom 3.5.0-beta.1 → 3.5.0-beta.2

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/runtime-dom v3.5.0-beta.1
2
+ * @vue/runtime-dom v3.5.0-beta.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -793,7 +793,6 @@ class VueElement extends BaseClass {
793
793
  this._ob = null;
794
794
  if (this.shadowRoot && _createApp !== createApp) {
795
795
  this._root = this.shadowRoot;
796
- this._mount(_def);
797
796
  } else {
798
797
  if (this.shadowRoot) {
799
798
  runtimeCore.warn(
@@ -806,9 +805,9 @@ class VueElement extends BaseClass {
806
805
  } else {
807
806
  this._root = this;
808
807
  }
809
- if (!this._def.__asyncLoader) {
810
- this._resolveProps(this._def);
811
- }
808
+ }
809
+ if (!this._def.__asyncLoader) {
810
+ this._resolveProps(this._def);
812
811
  }
813
812
  }
814
813
  connectedCallback() {
@@ -1008,6 +1007,7 @@ class VueElement extends BaseClass {
1008
1007
  vnode.ce = (instance) => {
1009
1008
  this._instance = instance;
1010
1009
  instance.ce = this;
1010
+ instance.isCE = true;
1011
1011
  {
1012
1012
  instance.ceReload = (newStyles) => {
1013
1013
  if (this._styles) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.5.0-beta.1
2
+ * @vue/runtime-dom v3.5.0-beta.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -762,7 +762,6 @@ class VueElement extends BaseClass {
762
762
  this._ob = null;
763
763
  if (this.shadowRoot && _createApp !== createApp) {
764
764
  this._root = this.shadowRoot;
765
- this._mount(_def);
766
765
  } else {
767
766
  if (_def.shadowRoot !== false) {
768
767
  this.attachShadow({ mode: "open" });
@@ -770,9 +769,9 @@ class VueElement extends BaseClass {
770
769
  } else {
771
770
  this._root = this;
772
771
  }
773
- if (!this._def.__asyncLoader) {
774
- this._resolveProps(this._def);
775
- }
772
+ }
773
+ if (!this._def.__asyncLoader) {
774
+ this._resolveProps(this._def);
776
775
  }
777
776
  }
778
777
  connectedCallback() {
@@ -963,6 +962,7 @@ class VueElement extends BaseClass {
963
962
  vnode.ce = (instance) => {
964
963
  this._instance = instance;
965
964
  instance.ce = this;
965
+ instance.isCE = true;
966
966
  const dispatch = (event, args) => {
967
967
  this.dispatchEvent(
968
968
  new CustomEvent(
@@ -1351,9 +1351,18 @@ export type NativeElements = {
1351
1351
  [K in keyof IntrinsicElementAttributes]: IntrinsicElementAttributes[K] & ReservedProps;
1352
1352
  };
1353
1353
 
1354
+ /**
1355
+ * This is a stub implementation to prevent the need to use dom types.
1356
+ *
1357
+ * To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`.
1358
+ */
1359
+ type DomStub = {};
1360
+ type DomType<T> = typeof globalThis extends {
1361
+ window: unknown;
1362
+ } ? T : DomStub;
1354
1363
  declare module '@vue/reactivity' {
1355
1364
  interface RefUnwrapBailTypes {
1356
- runtimeDOMBailTypes: Node | Window;
1365
+ runtimeDOMBailTypes: DomType<Node | Window>;
1357
1366
  }
1358
1367
  }
1359
1368
  declare module '@vue/runtime-core' {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.5.0-beta.1
2
+ * @vue/runtime-dom v3.5.0-beta.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -465,11 +465,11 @@ class ReactiveEffect {
465
465
  }
466
466
  }
467
467
  pause() {
468
- this.flags |= 128;
468
+ this.flags |= 64;
469
469
  }
470
470
  resume() {
471
- if (this.flags & 128) {
472
- this.flags &= ~128;
471
+ if (this.flags & 64) {
472
+ this.flags &= ~64;
473
473
  if (pausedQueueEffects.has(this)) {
474
474
  pausedQueueEffects.delete(this);
475
475
  this.trigger();
@@ -483,9 +483,6 @@ class ReactiveEffect {
483
483
  if (this.flags & 2 && !(this.flags & 32)) {
484
484
  return;
485
485
  }
486
- if (this.flags & 64) {
487
- return this.trigger();
488
- }
489
486
  if (!(this.flags & 8)) {
490
487
  this.flags |= 8;
491
488
  this.nextEffect = batchedEffect;
@@ -529,7 +526,7 @@ class ReactiveEffect {
529
526
  }
530
527
  }
531
528
  trigger() {
532
- if (this.flags & 128) {
529
+ if (this.flags & 64) {
533
530
  pausedQueueEffects.add(this);
534
531
  } else if (this.scheduler) {
535
532
  this.scheduler();
@@ -559,6 +556,7 @@ function endBatch() {
559
556
  batchDepth--;
560
557
  return;
561
558
  }
559
+ batchDepth--;
562
560
  let error;
563
561
  while (batchedEffect) {
564
562
  let e = batchedEffect;
@@ -577,7 +575,6 @@ function endBatch() {
577
575
  e = next;
578
576
  }
579
577
  }
580
- batchDepth--;
581
578
  if (error) throw error;
582
579
  }
583
580
  function prepareDeps(sub) {
@@ -980,26 +977,26 @@ const arrayInstrumentations = {
980
977
  });
981
978
  },
982
979
  every(fn, thisArg) {
983
- return apply(this, "every", fn, thisArg);
980
+ return apply(this, "every", fn, thisArg, void 0, arguments);
984
981
  },
985
982
  filter(fn, thisArg) {
986
- return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive));
983
+ return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
987
984
  },
988
985
  find(fn, thisArg) {
989
- return apply(this, "find", fn, thisArg, toReactive);
986
+ return apply(this, "find", fn, thisArg, toReactive, arguments);
990
987
  },
991
988
  findIndex(fn, thisArg) {
992
- return apply(this, "findIndex", fn, thisArg);
989
+ return apply(this, "findIndex", fn, thisArg, void 0, arguments);
993
990
  },
994
991
  findLast(fn, thisArg) {
995
- return apply(this, "findLast", fn, thisArg, toReactive);
992
+ return apply(this, "findLast", fn, thisArg, toReactive, arguments);
996
993
  },
997
994
  findLastIndex(fn, thisArg) {
998
- return apply(this, "findLastIndex", fn, thisArg);
995
+ return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
999
996
  },
1000
997
  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
1001
998
  forEach(fn, thisArg) {
1002
- return apply(this, "forEach", fn, thisArg);
999
+ return apply(this, "forEach", fn, thisArg, void 0, arguments);
1003
1000
  },
1004
1001
  includes(...args) {
1005
1002
  return searchProxy(this, "includes", args);
@@ -1015,7 +1012,7 @@ const arrayInstrumentations = {
1015
1012
  return searchProxy(this, "lastIndexOf", args);
1016
1013
  },
1017
1014
  map(fn, thisArg) {
1018
- return apply(this, "map", fn, thisArg);
1015
+ return apply(this, "map", fn, thisArg, void 0, arguments);
1019
1016
  },
1020
1017
  pop() {
1021
1018
  return noTracking(this, "pop");
@@ -1034,7 +1031,7 @@ const arrayInstrumentations = {
1034
1031
  },
1035
1032
  // slice could use ARRAY_ITERATE but also seems to beg for range tracking
1036
1033
  some(fn, thisArg) {
1037
- return apply(this, "some", fn, thisArg);
1034
+ return apply(this, "some", fn, thisArg, void 0, arguments);
1038
1035
  },
1039
1036
  splice(...args) {
1040
1037
  return noTracking(this, "splice", args);
@@ -1070,8 +1067,13 @@ function iterator(self, method, wrapValue) {
1070
1067
  }
1071
1068
  return iter;
1072
1069
  }
1073
- function apply(self, method, fn, thisArg, wrappedRetFn) {
1070
+ const arrayProto = Array.prototype;
1071
+ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1074
1072
  const arr = shallowReadArray(self);
1073
+ let methodFn;
1074
+ if ((methodFn = arr[method]) !== arrayProto[method]) {
1075
+ return methodFn.apply(arr, args);
1076
+ }
1075
1077
  let needsWrap = false;
1076
1078
  let wrappedFn = fn;
1077
1079
  if (arr !== self) {
@@ -1086,7 +1088,7 @@ function apply(self, method, fn, thisArg, wrappedRetFn) {
1086
1088
  };
1087
1089
  }
1088
1090
  }
1089
- const result = arr[method](wrappedFn, thisArg);
1091
+ const result = methodFn.call(arr, wrappedFn, thisArg);
1090
1092
  return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
1091
1093
  }
1092
1094
  function reduce(self, method, fn, args) {
@@ -3491,6 +3493,7 @@ const logMismatchError = () => {
3491
3493
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
3492
3494
  const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
3493
3495
  const getContainerType = (container) => {
3496
+ if (container.nodeType !== 1) return void 0;
3494
3497
  if (isSVGContainer(container)) return "svg";
3495
3498
  if (isMathMLContainer(container)) return "mathml";
3496
3499
  return void 0;
@@ -4419,7 +4422,7 @@ const KeepAliveImpl = {
4419
4422
  function pruneCache(filter) {
4420
4423
  cache.forEach((vnode, key) => {
4421
4424
  const name = getComponentName(vnode.type);
4422
- if (name && (!filter || !filter(name))) {
4425
+ if (name && !filter(name)) {
4423
4426
  pruneCacheEntry(key);
4424
4427
  }
4425
4428
  });
@@ -4538,6 +4541,7 @@ function matches(pattern, name) {
4538
4541
  } else if (isString(pattern)) {
4539
4542
  return pattern.split(",").includes(name);
4540
4543
  } else if (isRegExp(pattern)) {
4544
+ pattern.lastIndex = 0;
4541
4545
  return pattern.test(name);
4542
4546
  }
4543
4547
  return false;
@@ -8060,7 +8064,6 @@ function doWatch(source, cb, {
8060
8064
  const effect = new ReactiveEffect(getter);
8061
8065
  let scheduler;
8062
8066
  if (flush === "sync") {
8063
- effect.flags |= 64;
8064
8067
  scheduler = job;
8065
8068
  } else if (flush === "post") {
8066
8069
  scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
@@ -10305,7 +10308,7 @@ function isMemoSame(cached, memo) {
10305
10308
  return true;
10306
10309
  }
10307
10310
 
10308
- const version = "3.5.0-beta.1";
10311
+ const version = "3.5.0-beta.2";
10309
10312
  const warn = warn$1 ;
10310
10313
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10311
10314
  const devtools = devtools$1 ;
@@ -11174,7 +11177,6 @@ class VueElement extends BaseClass {
11174
11177
  this._ob = null;
11175
11178
  if (this.shadowRoot && _createApp !== createApp) {
11176
11179
  this._root = this.shadowRoot;
11177
- this._mount(_def);
11178
11180
  } else {
11179
11181
  if (this.shadowRoot) {
11180
11182
  warn(
@@ -11187,9 +11189,9 @@ class VueElement extends BaseClass {
11187
11189
  } else {
11188
11190
  this._root = this;
11189
11191
  }
11190
- if (!this._def.__asyncLoader) {
11191
- this._resolveProps(this._def);
11192
- }
11192
+ }
11193
+ if (!this._def.__asyncLoader) {
11194
+ this._resolveProps(this._def);
11193
11195
  }
11194
11196
  }
11195
11197
  connectedCallback() {
@@ -11389,6 +11391,7 @@ class VueElement extends BaseClass {
11389
11391
  vnode.ce = (instance) => {
11390
11392
  this._instance = instance;
11391
11393
  instance.ce = this;
11394
+ instance.isCE = true;
11392
11395
  {
11393
11396
  instance.ceReload = (newStyles) => {
11394
11397
  if (this._styles) {