vue 3.6.0-alpha.5 → 3.6.0-alpha.6

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.6.0-alpha.5
2
+ * vue v3.6.0-alpha.6
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.6.0-alpha.5
2
+ * vue v3.6.0-alpha.6
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -4369,7 +4369,8 @@ var Vue = (function (exports) {
4369
4369
  node,
4370
4370
  container,
4371
4371
  null,
4372
- parentComponent
4372
+ parentComponent,
4373
+ parentSuspense
4373
4374
  );
4374
4375
  } else {
4375
4376
  mountComponent(
@@ -7185,29 +7186,7 @@ If you want to remount the same app, move your app creation logic into a factory
7185
7186
  }
7186
7187
  root = cloneVNode(root, fallthroughAttrs, false, true);
7187
7188
  } else if (!accessedAttrs && root.type !== Comment) {
7188
- const allAttrs = Object.keys(attrs);
7189
- const eventAttrs = [];
7190
- const extraAttrs = [];
7191
- for (let i = 0, l = allAttrs.length; i < l; i++) {
7192
- const key = allAttrs[i];
7193
- if (isOn(key)) {
7194
- if (!isModelListener(key)) {
7195
- eventAttrs.push(key[2].toLowerCase() + key.slice(3));
7196
- }
7197
- } else {
7198
- extraAttrs.push(key);
7199
- }
7200
- }
7201
- if (extraAttrs.length) {
7202
- warn$1(
7203
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
7204
- );
7205
- }
7206
- if (eventAttrs.length) {
7207
- warn$1(
7208
- `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
7209
- );
7210
- }
7189
+ warnExtraneousAttributes(attrs);
7211
7190
  }
7212
7191
  }
7213
7192
  }
@@ -7259,6 +7238,31 @@ If you want to remount the same app, move your app creation logic into a factory
7259
7238
  };
7260
7239
  return [normalizeVNode(childRoot), setRoot];
7261
7240
  };
7241
+ function warnExtraneousAttributes(attrs) {
7242
+ const allAttrs = Object.keys(attrs);
7243
+ const eventAttrs = [];
7244
+ const extraAttrs = [];
7245
+ for (let i = 0, l = allAttrs.length; i < l; i++) {
7246
+ const key = allAttrs[i];
7247
+ if (isOn(key)) {
7248
+ if (!isModelListener(key)) {
7249
+ eventAttrs.push(key[2].toLowerCase() + key.slice(3));
7250
+ }
7251
+ } else {
7252
+ extraAttrs.push(key);
7253
+ }
7254
+ }
7255
+ if (extraAttrs.length) {
7256
+ warn$1(
7257
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
7258
+ );
7259
+ }
7260
+ if (eventAttrs.length) {
7261
+ warn$1(
7262
+ `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
7263
+ );
7264
+ }
7265
+ }
7262
7266
  function filterSingleRoot(children, recurse = true) {
7263
7267
  let singleRoot;
7264
7268
  for (let i = 0; i < children.length; i++) {
@@ -8511,7 +8515,8 @@ If you want to remount the same app, move your app creation logic into a factory
8511
8515
  n2,
8512
8516
  container,
8513
8517
  anchor,
8514
- parentComponent
8518
+ parentComponent,
8519
+ parentSuspense
8515
8520
  );
8516
8521
  }
8517
8522
  } else {
@@ -8572,7 +8577,42 @@ If you want to remount the same app, move your app creation logic into a factory
8572
8577
  }
8573
8578
  if (isHmrUpdating) initialVNode.el = null;
8574
8579
  if (instance.asyncDep) {
8575
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
8580
+ if (parentSuspense) {
8581
+ const hydratedEl = instance.vnode.el;
8582
+ parentSuspense.registerDep(instance, (setupResult) => {
8583
+ const { vnode } = instance;
8584
+ {
8585
+ pushWarningContext(vnode);
8586
+ }
8587
+ handleSetupResult(instance, setupResult, false);
8588
+ if (hydratedEl) {
8589
+ vnode.el = hydratedEl;
8590
+ }
8591
+ const placeholder = !hydratedEl && instance.subTree.el;
8592
+ setupRenderEffect(
8593
+ instance,
8594
+ vnode,
8595
+ // component may have been moved before resolve.
8596
+ // if this is not a hydration, instance.subTree will be the comment
8597
+ // placeholder.
8598
+ hostParentNode(hydratedEl || instance.subTree.el),
8599
+ // anchor will not be used if this is hydration, so only need to
8600
+ // consider the comment placeholder case.
8601
+ hydratedEl ? null : getNextHostNode(instance.subTree),
8602
+ parentSuspense,
8603
+ namespace,
8604
+ optimized
8605
+ );
8606
+ if (placeholder) {
8607
+ vnode.placeholder = null;
8608
+ hostRemove(placeholder);
8609
+ }
8610
+ updateHOCHostEl(instance, vnode.el);
8611
+ {
8612
+ popWarningContext();
8613
+ }
8614
+ });
8615
+ }
8576
8616
  if (!initialVNode.el) {
8577
8617
  const placeholder = instance.subTree = createVNode(Comment);
8578
8618
  processCommentNode(null, placeholder, container, anchor);
@@ -9901,7 +9941,7 @@ app.use(vaporInteropPlugin)
9901
9941
  m: move,
9902
9942
  um: unmount,
9903
9943
  n: next,
9904
- o: { parentNode, remove }
9944
+ o: { parentNode }
9905
9945
  } = rendererInternals;
9906
9946
  let parentSuspenseId;
9907
9947
  const isSuspensible = isVNodeSuspensible(vnode);
@@ -10076,12 +10116,11 @@ app.use(vaporInteropPlugin)
10076
10116
  next() {
10077
10117
  return suspense.activeBranch && next(suspense.activeBranch);
10078
10118
  },
10079
- registerDep(instance, setupRenderEffect, optimized2) {
10119
+ registerDep(instance, onResolve) {
10080
10120
  const isInPendingSuspense = !!suspense.pendingBranch;
10081
10121
  if (isInPendingSuspense) {
10082
10122
  suspense.deps++;
10083
10123
  }
10084
- const hydratedEl = instance.vnode.el;
10085
10124
  instance.asyncDep.catch((err) => {
10086
10125
  handleError(err, instance, 0);
10087
10126
  }).then((asyncSetupResult) => {
@@ -10089,37 +10128,7 @@ app.use(vaporInteropPlugin)
10089
10128
  return;
10090
10129
  }
10091
10130
  instance.asyncResolved = true;
10092
- const { vnode: vnode2 } = instance;
10093
- {
10094
- pushWarningContext(vnode2);
10095
- }
10096
- handleSetupResult(instance, asyncSetupResult, false);
10097
- if (hydratedEl) {
10098
- vnode2.el = hydratedEl;
10099
- }
10100
- const placeholder = !hydratedEl && instance.subTree.el;
10101
- setupRenderEffect(
10102
- instance,
10103
- vnode2,
10104
- // component may have been moved before resolve.
10105
- // if this is not a hydration, instance.subTree will be the comment
10106
- // placeholder.
10107
- parentNode(hydratedEl || instance.subTree.el),
10108
- // anchor will not be used if this is hydration, so only need to
10109
- // consider the comment placeholder case.
10110
- hydratedEl ? null : next(instance.subTree),
10111
- suspense,
10112
- namespace,
10113
- optimized2
10114
- );
10115
- if (placeholder) {
10116
- vnode2.placeholder = null;
10117
- remove(placeholder);
10118
- }
10119
- updateHOCHostEl(instance, vnode2.el);
10120
- {
10121
- popWarningContext();
10122
- }
10131
+ onResolve(asyncSetupResult);
10123
10132
  if (isInPendingSuspense && --suspense.deps === 0) {
10124
10133
  suspense.resolve();
10125
10134
  }
@@ -11287,7 +11296,7 @@ Component that was made reactive: `,
11287
11296
  return true;
11288
11297
  }
11289
11298
 
11290
- const version = "3.6.0-alpha.5";
11299
+ const version = "3.6.0-alpha.6";
11291
11300
  const warn = warn$1 ;
11292
11301
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11293
11302
  const devtools = devtools$1 ;
@@ -18465,7 +18474,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
18465
18474
  `stop,prevent,self,ctrl,shift,alt,meta,exact,middle`
18466
18475
  );
18467
18476
  const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right");
18468
- const isKeyboardEvent = /* @__PURE__ */ makeMap(`onkeyup,onkeydown,onkeypress`);
18477
+ const isKeyboardEvent = /* @__PURE__ */ makeMap(
18478
+ `onkeyup,onkeydown,onkeypress`
18479
+ );
18469
18480
  const resolveModifiers = (key, modifiers, context, loc) => {
18470
18481
  const keyModifiers = [];
18471
18482
  const nonKeyModifiers = [];