@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.
@@ -22936,11 +22936,13 @@ const withCurrentHandlers = (computed, props) => {
22936
22936
  * - It runs the update no matter what. A transition is about the animation,
22937
22937
  * never about the change.
22938
22938
  * - It swallows the rejection a SKIPPED transition produces. Starting a
22939
- * transition while another is running skips that other one, and a skipped
22940
- * transition rejects its promises; nothing is waiting on them, so the
22941
- * rejection surfaces as an unhandled error (a full error overlay in dev) for
22942
- * something that is not an error at all — two updates close together is
22943
- * normal in a list that is being edited.
22939
+ * transition while another is running skips that other one, and so does the
22940
+ * document going hidden or its viewport changing size mid-movement; a skipped
22941
+ * transition rejects `ready` with a DOMException that has no stack. Nothing
22942
+ * is waiting on it, so the rejection surfaces as an unhandled error (a full
22943
+ * error overlay in dev, an `unhandledrejection` in an app's error reporting)
22944
+ * for something that is not an error at all — two updates close together is
22945
+ * normal in a list that is being edited, and a phone locks its screen.
22944
22946
  *
22945
22947
  * navi calls it from wherever it animates a DOM change itself (see list.jsx),
22946
22948
  * which is why an application using navi finds the API already there.
@@ -23002,12 +23004,22 @@ const startViewTransition$2 = (updateCallback) => {
23002
23004
  };
23003
23005
 
23004
23006
  // "Skipped" is an outcome, not a failure — anything else is still a real error
23005
- // and must keep travelling.
23007
+ // and must keep travelling. The browser skips for three reasons and names them
23008
+ // differently: `skipTransition()` / another transition starting is an
23009
+ // "AbortError" that says skipped, while a document hidden mid-movement, a
23010
+ // snapshot containing block that changed size (address bar folding, keyboard
23011
+ // opening) and the DOM-update timeout are "InvalidStateError"s that say
23012
+ // aborted. All three are recognized by the message: the name alone would let
23013
+ // an update callback throwing its own InvalidStateError pass for a skip.
23006
23014
  const ignoreSkip = (e) => {
23007
23015
  if (e && e.name === "AbortError") {
23008
23016
  return;
23009
23017
  }
23010
- if (e && typeof e.message === "string" && e.message.includes("skipped")) {
23018
+ if (
23019
+ e &&
23020
+ typeof e.message === "string" &&
23021
+ /^Transition was (?:skipped|aborted)/.test(e.message)
23022
+ ) {
23011
23023
  return;
23012
23024
  }
23013
23025
  throw e;