@sigil-dev/grimoire 0.9.16 → 0.9.17

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.
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "private": false,
7
- "version": "0.9.16",
7
+ "version": "0.9.17",
8
8
  "exports": {
9
9
  ".": "./index.ts",
10
10
  "./server": "./server.ts",
@@ -23,8 +23,8 @@
23
23
  "test": "bun test"
24
24
  },
25
25
  "dependencies": {
26
- "@sigil-dev/compiler": "0.9.16",
27
- "@sigil-dev/runtime": "0.9.16",
26
+ "@sigil-dev/compiler": "0.9.17",
27
+ "@sigil-dev/runtime": "0.9.17",
28
28
  "vite": "^8.0.16"
29
29
  },
30
30
  "peerDependencies": {
@@ -620,7 +620,7 @@ export async function navigate(
620
620
  const doc = document as Document & {
621
621
  startViewTransition?: (
622
622
  cb: () => void,
623
- ) => { finished?: Promise<unknown> } | undefined;
623
+ ) => { finished?: Promise<unknown>; ready?: Promise<unknown> } | undefined;
624
624
  };
625
625
  const animate =
626
626
  typeof doc.startViewTransition === "function" &&
@@ -648,6 +648,9 @@ export async function navigate(
648
648
  (el as HTMLElement).style.removeProperty("view-transition-name");
649
649
  };
650
650
  Promise.resolve(transition?.finished).then(clear, clear);
651
+ // a skipped transition (another navigation, a hidden tab) rejects
652
+ // ready; the swap still runs, so it is not an error worth reporting
653
+ transition?.ready?.catch(() => {});
651
654
  } else {
652
655
  doSwap();
653
656
  }