@jsenv/navi 0.29.380 → 0.29.381

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.
@@ -22296,11 +22296,13 @@ const withCurrentHandlers = (computed, props) => {
22296
22296
  * - It runs the update no matter what. A transition is about the animation,
22297
22297
  * never about the change.
22298
22298
  * - It swallows the rejection a SKIPPED transition produces. Starting a
22299
- * transition while another is running skips that other one, and a skipped
22300
- * transition rejects its promises; nothing is waiting on them, so the
22301
- * rejection surfaces as an unhandled error (a full error overlay in dev) for
22302
- * something that is not an error at all — two updates close together is
22303
- * normal in a list that is being edited.
22299
+ * transition while another is running skips that other one, and so does the
22300
+ * document going hidden or its viewport changing size mid-movement; a skipped
22301
+ * transition rejects `ready` with a DOMException that has no stack. Nothing
22302
+ * is waiting on it, so the rejection surfaces as an unhandled error (a full
22303
+ * error overlay in dev, an `unhandledrejection` in an app's error reporting)
22304
+ * for something that is not an error at all — two updates close together is
22305
+ * normal in a list that is being edited, and a phone locks its screen.
22304
22306
  *
22305
22307
  * navi calls it from wherever it animates a DOM change itself (see list.jsx),
22306
22308
  * which is why an application using navi finds the API already there.
@@ -22362,12 +22364,22 @@ const startViewTransition$2 = (updateCallback) => {
22362
22364
  };
22363
22365
 
22364
22366
  // "Skipped" is an outcome, not a failure — anything else is still a real error
22365
- // and must keep travelling.
22367
+ // and must keep travelling. The browser skips for three reasons and names them
22368
+ // differently: `skipTransition()` / another transition starting is an
22369
+ // "AbortError" that says skipped, while a document hidden mid-movement, a
22370
+ // snapshot containing block that changed size (address bar folding, keyboard
22371
+ // opening) and the DOM-update timeout are "InvalidStateError"s that say
22372
+ // aborted. All three are recognized by the message: the name alone would let
22373
+ // an update callback throwing its own InvalidStateError pass for a skip.
22366
22374
  const ignoreSkip = (e) => {
22367
22375
  if (e && e.name === "AbortError") {
22368
22376
  return;
22369
22377
  }
22370
- if (e && typeof e.message === "string" && e.message.includes("skipped")) {
22378
+ if (
22379
+ e &&
22380
+ typeof e.message === "string" &&
22381
+ /^Transition was (?:skipped|aborted)/.test(e.message)
22382
+ ) {
22371
22383
  return;
22372
22384
  }
22373
22385
  throw e;