@react-motion-router/core 2.0.0-beta.sha-7a69b61 → 2.0.0-beta.sha-01914d6

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.
@@ -5,6 +5,7 @@ import { ScreenChild } from './common/types';
5
5
  import { NavigationBase } from './NavigationBase';
6
6
  import { ScreenBase } from './ScreenBase';
7
7
  interface ScreenTransitionLayerProps {
8
+ id: string;
8
9
  children: ScreenChild | ScreenChild[];
9
10
  navigation: NavigationBase;
10
11
  hasUAVisualTransition: boolean;
@@ -11,7 +11,7 @@ interface ScreenTransitionProviderProps {
11
11
  focused: boolean;
12
12
  }
13
13
  interface ScreenTransitionProviderState {
14
- zIndex: React.CSSProperties["zIndex"];
14
+ zIndex: React.CSSProperties['zIndex'];
15
15
  }
16
16
  export declare class ScreenTransitionProvider extends Component<ScreenTransitionProviderProps, ScreenTransitionProviderState> {
17
17
  readonly ref: import('react').RefObject<HTMLElement>;
@@ -25,7 +25,7 @@ export declare class ScreenTransitionProvider extends Component<ScreenTransition
25
25
  componentDidMount(): void;
26
26
  componentWillUnmount(): void;
27
27
  get animationEffect(): AnimationEffect | null;
28
- setZIndex(zIndex: React.CSSProperties["zIndex"]): Promise<void>;
28
+ setZIndex(zIndex: React.CSSProperties['zIndex']): Promise<void>;
29
29
  render(): JSX.Element;
30
30
  }
31
31
  export {};
@@ -6,7 +6,7 @@ import { ParallelEffect } from '../../web-animations-extension/build';
6
6
  import { SharedElement } from './SharedElement';
7
7
  interface SharedElementTransitionLayerProps {
8
8
  navigation: NavigationBase;
9
- direction: "forwards" | "backwards";
9
+ direction: 'forwards' | 'backwards';
10
10
  }
11
11
  interface SharedElementTransitionLayerState {
12
12
  }
@@ -6,6 +6,7 @@ export type ScreenChild<E extends ScreenBase = ScreenBase> = E extends ScreenBas
6
6
  export interface AnimationEffectFactoryProps<R extends HTMLElement = HTMLElement> {
7
7
  ref: R | null;
8
8
  index: number;
9
+ screens: string[];
9
10
  exiting: boolean;
10
11
  timeline: AnimationTimeline | null;
11
12
  playbackRate: number;
@@ -24,8 +25,8 @@ export interface LazyExoticComponent<T extends React.ComponentType<any>> extends
24
25
  default: T;
25
26
  };
26
27
  }
27
- export type ScreenState<P extends ScreenBaseProps = ScreenBaseProps> = Map<string, Pick<RoutePropBase<P["config"], PlainObject>, "config" | "params">>;
28
- export interface RoutePropBase<C extends ScreenBaseProps["config"] = {}, P extends PlainObject = PlainObject> {
28
+ export type ScreenState<P extends ScreenBaseProps = ScreenBaseProps> = Map<string, Pick<RoutePropBase<P['config'], PlainObject>, 'config' | 'params'>>;
29
+ export interface RoutePropBase<C extends ScreenBaseProps['config'] = {}, P extends PlainObject = PlainObject> {
29
30
  path: string;
30
31
  resolvedPathname?: string;
31
32
  config: NonNullable<C>;
@@ -39,12 +40,12 @@ export type PlainObject<T = any> = {
39
40
  [key: string]: T;
40
41
  };
41
42
  export interface RouterBaseEventMap extends HTMLElementEventMap {
42
- "transition-start": TransitionStartEvent;
43
- "transition-cancel": TransitionCancelEvent;
44
- "transition-end": TransitionEndEvent;
45
- "motion-progress-start": MotionProgressStartEvent;
46
- "motion-progress": MotionProgressEvent;
47
- "motion-progress-end": MotionProgressEndEvent;
43
+ 'transition-start': TransitionStartEvent;
44
+ 'transition-cancel': TransitionCancelEvent;
45
+ 'transition-end': TransitionEndEvent;
46
+ 'motion-progress-start': MotionProgressStartEvent;
47
+ 'motion-progress': MotionProgressEvent;
48
+ 'motion-progress-end': MotionProgressEndEvent;
48
49
  }
49
50
  export type RouterHTMLElement<E extends RouterBaseEventMap, T extends HTMLElement = HTMLDivElement> = T & {
50
51
  addEventListener<K extends keyof E>(type: K, listener: (this: T, ev: E[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -61,12 +62,12 @@ export interface PathPattern {
61
62
  pattern: string;
62
63
  caseSensitive: boolean;
63
64
  }
64
- export type AnimationDirection = "normal" | "reverse";
65
+ export type AnimationDirection = 'normal' | 'reverse';
65
66
  declare enum SharedElementTransitionTypeEnum {
66
- "morph" = 0,
67
- "fade-through" = 1,
68
- "fade" = 2,
69
- "cross-fade" = 3
67
+ 'morph' = 0,
68
+ 'fade-through' = 1,
69
+ 'fade' = 2,
70
+ 'cross-fade' = 3
70
71
  }
71
72
  export type SharedElementTransitionType = keyof typeof SharedElementTransitionTypeEnum;
72
73
  export interface SharedElementNode {
@@ -81,8 +82,8 @@ export type StylableElement = Element & {
81
82
  style: CSSStyleDeclaration;
82
83
  };
83
84
  export declare function isStylableElement(element: any): element is StylableElement;
84
- export interface LoadNavigationTransition extends Omit<NavigationTransition, "navigationType"> {
85
- navigationType: "load";
85
+ export interface LoadNavigationTransition extends Omit<NavigationTransition, 'navigationType'> {
86
+ navigationType: 'load';
86
87
  }
87
88
  declare global {
88
89
  interface NavigateEvent extends Event {
package/build/index.js CHANGED
@@ -257,10 +257,11 @@ class be extends st {
257
257
  this.props.navigation.removeEventListener("transition-start", this.onAnimationStart), this.props.navigation.removeEventListener("transition-end", this.onAnimationEnd), this.props.navigation.removeEventListener("transition-cancel", this.onAnimationEnd);
258
258
  }
259
259
  get animationEffect() {
260
- const t = this.props.animation, { animation: e, direction: n, hasUAVisualTransition: r } = this.context, { timeline: a, playbackRate: o } = e, { index: l, exiting: m, ref: p } = this;
260
+ const t = this.props.animation, { animation: e, direction: n, hasUAVisualTransition: r } = this.context, { timeline: a, playbackRate: o } = e, { index: l, exiting: m, ref: p } = this, w = this.context.screens.map((R) => R.current?.name);
261
261
  return t?.({
262
262
  ref: p.current,
263
263
  index: l,
264
+ screens: w,
264
265
  exiting: m,
265
266
  timeline: a,
266
267
  direction: n,
@@ -574,8 +575,8 @@ function $t(s) {
574
575
  t = t.to("ms").value;
575
576
  else if (typeof t == "string")
576
577
  throw TypeError("Unknown effect duration keyword.");
577
- const p = t / e, w = p * e / Math.abs(n), k = r + w + a;
578
- t = new CSSUnitValue(p / k * 100, "percent");
578
+ const p = t / e, w = p * e / Math.abs(n), R = r + w + a;
579
+ t = new CSSUnitValue(p / R * 100, "percent");
579
580
  const T = CSS.percent(t.to("percent").value * e / Math.abs(n));
580
581
  return o !== null && (l = h(o, "percent") / m.value), {
581
582
  ...s,
@@ -849,11 +850,11 @@ class $e extends Ot {
849
850
  } = M.getComputedTiming();
850
851
  r.activeDuration = r.activeDuration ? h(r.activeDuration, "ms") + h(Vt, "ms") : Vt, n.duration = n.duration instanceof CSSNumericValue ? n.duration.to("ms").value : n.duration, L = L instanceof CSSNumericValue ? L.to("ms").value : L, typeof L != "string" && (n.duration === "auto" ? n.duration = h(L, "ms") : typeof n.duration != "string" && (n.duration = n.duration ? n.duration + L : L));
851
852
  }
852
- const { timeline: m, startTime: p, currentTime: w } = A.get(this) ?? {}, k = m instanceof E ? "percent" : "ms";
853
+ const { timeline: m, startTime: p, currentTime: w } = A.get(this) ?? {}, R = m instanceof E ? "percent" : "ms";
853
854
  let { duration: T = 0, iterations: X = 1 } = r;
854
855
  if (T === "auto" && (T = 0), typeof T == "string")
855
856
  throw new TypeError("Unknown effect duration keyword.");
856
- return r.duration = T, r.activeDuration = Et(T) * X, r.startTime = p ?? void 0, r.localTime = w, r.currentIteration = ne(r, ee(r, i(this, St, ie))), m instanceof E ? $t(r) : (m instanceof DocumentTimeline && (r.progress = w && h(w, k) / h(l, k)), r);
857
+ return r.duration = T, r.activeDuration = Et(T) * X, r.startTime = p ?? void 0, r.localTime = w, r.currentIteration = ne(r, ee(r, i(this, St, ie))), m instanceof E ? $t(r) : (m instanceof DocumentTimeline && (r.progress = w && h(w, R) / h(l, R)), r);
857
858
  }
858
859
  updateTiming(t) {
859
860
  c(this, J, {
@@ -870,13 +871,13 @@ J = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakSet(), ie = func
870
871
  const { playbackRate: s = 1 } = A.get(this) ?? {};
871
872
  return s < 0 ? "backwards" : "forwards";
872
873
  };
873
- var d, x, ht, v, S, P, u, y, R, z, O, ot, W, mt, Rt, Q, lt, q, tt, kt, Kt, xt, qt, Ct, zt, B, G, ct, gt, Mt, I, V, D, $, yt, Lt, Pt;
874
+ var d, x, ht, v, S, P, u, y, k, z, O, ot, W, mt, Rt, Q, lt, q, tt, kt, Kt, xt, qt, Ct, zt, B, G, ct, gt, Mt, I, V, D, $, yt, Lt, Pt;
874
875
  const se = class extends EventTarget {
875
876
  constructor(t, e) {
876
877
  super(), g(this, mt), g(this, Q), g(this, q), g(this, kt), g(this, xt), g(this, Ct), g(this, B), g(this, gt), g(this, I), g(this, D), j(this, "id", ""), j(this, "oncancel", null), j(this, "onfinish", null), j(this, "onremove", null), g(this, d, void 0), g(this, x, void 0), g(this, ht, "active"), g(this, v, {
877
878
  task: null,
878
879
  playbackRate: null
879
- }), g(this, S, new nt()), g(this, P, new nt()), g(this, u, null), g(this, y, null), g(this, R, []), g(this, z, null), g(this, O, !1), g(this, ot, 0), g(this, W, 1), g(this, ct, () => {
880
+ }), g(this, S, new nt()), g(this, P, new nt()), g(this, u, null), g(this, y, null), g(this, k, []), g(this, z, null), g(this, O, !1), g(this, ot, 0), g(this, W, 1), g(this, ct, () => {
880
881
  f(this, B, G).call(this);
881
882
  }), g(this, yt, () => {
882
883
  var n;
@@ -941,7 +942,7 @@ const se = class extends EventTarget {
941
942
  this.playState !== "paused" && (this.currentTime === null && c(this, O, !0), i(this, v).task && (i(this, v).task = null), f(this, Q, lt).call(this), i(this, v).task = "pause");
942
943
  }
943
944
  persist() {
944
- i(this, R).forEach((t) => t.persist()), c(this, ht, "persisted");
945
+ i(this, k).forEach((t) => t.persist()), c(this, ht, "persisted");
945
946
  }
946
947
  finish() {
947
948
  var t;
@@ -956,15 +957,15 @@ const se = class extends EventTarget {
956
957
  const o = h(i(this, d).currentTime, a);
957
958
  c(this, u, o - r / n);
958
959
  }
959
- i(this, v).task === "pause" && i(this, u) !== null && (c(this, y, null), f(this, q, tt).call(this), i(this, S).resolve(this)), i(this, v).task === "play" && i(this, u) !== null && (f(this, q, tt).call(this), i(this, S).resolve(this)), f(this, I, V).call(this, !0), i(this, R).forEach((a) => a.finish());
960
+ i(this, v).task === "pause" && i(this, u) !== null && (c(this, y, null), f(this, q, tt).call(this), i(this, S).resolve(this)), i(this, v).task === "play" && i(this, u) !== null && (f(this, q, tt).call(this), i(this, S).resolve(this)), f(this, I, V).call(this, !0), i(this, k).forEach((a) => a.finish());
960
961
  }
961
962
  commitStyles() {
962
- i(this, R).forEach((t) => {
963
+ i(this, k).forEach((t) => {
963
964
  t.effect instanceof pt && (t.effect.target === null || t.effect.pseudoElement !== null) || t.commitStyles();
964
965
  });
965
966
  }
966
967
  cancel() {
967
- this.playState !== "idle" && (f(this, D, $).call(this), i(this, S).reject(new DOMException("The user aborted a request", "AbortError")), f(this, q, tt).call(this), c(this, S, new nt()), i(this, P).state === "pending" && i(this, P).reject(new DOMException("The user aborted a request", "AbortError")), c(this, P, new nt()), i(this, R).forEach((t) => t.cancel())), c(this, u, null), c(this, y, null);
968
+ this.playState !== "idle" && (f(this, D, $).call(this), i(this, S).reject(new DOMException("The user aborted a request", "AbortError")), f(this, q, tt).call(this), c(this, S, new nt()), i(this, P).state === "pending" && i(this, P).reject(new DOMException("The user aborted a request", "AbortError")), c(this, P, new nt()), i(this, k).forEach((t) => t.cancel())), c(this, u, null), c(this, y, null);
968
969
  }
969
970
  updatePlaybackRate(t) {
970
971
  var e;
@@ -998,12 +999,12 @@ const se = class extends EventTarget {
998
999
  super.removeEventListener(t, e, n);
999
1000
  }
1000
1001
  set playbackRate(t) {
1001
- c(this, W, t), i(this, R).forEach((e) => {
1002
+ c(this, W, t), i(this, k).forEach((e) => {
1002
1003
  e.playbackRate *= t;
1003
1004
  });
1004
1005
  }
1005
1006
  set startTime(t) {
1006
- c(this, u, h(t)), i(this, R).forEach((e) => e.startTime = t);
1007
+ c(this, u, h(t)), i(this, k).forEach((e) => e.startTime = t);
1007
1008
  }
1008
1009
  set currentTime(t) {
1009
1010
  var e;
@@ -1018,22 +1019,22 @@ const se = class extends EventTarget {
1018
1019
  if (r === t)
1019
1020
  return;
1020
1021
  i(this, d) instanceof E && i(this, d).removeEventListener("update", i(this, ct));
1021
- const a = this.playState, o = r instanceof E ? "percent" : "ms", l = h(this.currentTime, o), { progress: m = null, endTime: p = 0 } = ((e = i(this, x)) == null ? void 0 : e.getComputedTiming()) ?? {}, w = h(p, o), k = r instanceof E, T = t instanceof E, X = t instanceof DocumentTimeline, C = this.pending;
1022
+ const a = this.playState, o = r instanceof E ? "percent" : "ms", l = h(this.currentTime, o), { progress: m = null, endTime: p = 0 } = ((e = i(this, x)) == null ? void 0 : e.getComputedTiming()) ?? {}, w = h(p, o), R = r instanceof E, T = t instanceof E, X = t instanceof DocumentTimeline, C = this.pending;
1022
1023
  if (T)
1023
- c(this, d, t), t.addEventListener("update", i(this, ct)), f(this, D, $).call(this), c(this, O, !0), c(this, u, null), c(this, y, null), (a === "running" || a === "finished") && ((!i(this, S) || i(this, S).state === "resolved") && f(this, Q, lt).call(this), i(this, v).task = "play", i(this, R).forEach((M) => M.pause())), a === "paused" && m !== null && c(this, y, m * w), C && ((!i(this, S) || i(this, S).state === "resolved") && f(this, Q, lt).call(this), a === "paused" ? i(this, v).task = "pause" : i(this, v).task = "play"), i(this, u) !== null && c(this, y, null), f(this, I, V).call(this, !1);
1024
+ c(this, d, t), t.addEventListener("update", i(this, ct)), f(this, D, $).call(this), c(this, O, !0), c(this, u, null), c(this, y, null), (a === "running" || a === "finished") && ((!i(this, S) || i(this, S).state === "resolved") && f(this, Q, lt).call(this), i(this, v).task = "play", i(this, k).forEach((M) => M.pause())), a === "paused" && m !== null && c(this, y, m * w), C && ((!i(this, S) || i(this, S).state === "resolved") && f(this, Q, lt).call(this), a === "paused" ? i(this, v).task = "pause" : i(this, v).task = "play"), i(this, u) !== null && c(this, y, null), f(this, I, V).call(this, !1);
1024
1025
  else if (X) {
1025
- if (c(this, d, t), k) {
1026
+ if (c(this, d, t), R) {
1026
1027
  if (l !== null && m !== null) {
1027
1028
  const { endTime: M = 0 } = ((n = i(this, x)) == null ? void 0 : n.getComputedTiming()) ?? {}, L = h(M, "ms");
1028
1029
  this.currentTime = m * L;
1029
1030
  }
1030
1031
  switch (a) {
1031
1032
  case "paused":
1032
- i(this, R).forEach((M) => M.pause());
1033
+ i(this, k).forEach((M) => M.pause());
1033
1034
  break;
1034
1035
  case "running":
1035
1036
  case "finished":
1036
- i(this, R).forEach((M) => M.play());
1037
+ i(this, k).forEach((M) => M.play());
1037
1038
  }
1038
1039
  }
1039
1040
  } else
@@ -1100,7 +1101,7 @@ const se = class extends EventTarget {
1100
1101
  return i(this, x);
1101
1102
  }
1102
1103
  };
1103
- d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakSet(), Rt = function(s) {
1104
+ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), y = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakSet(), Rt = function(s) {
1104
1105
  var t;
1105
1106
  const e = h(((t = i(this, d)) == null ? void 0 : t.currentTime) ?? null);
1106
1107
  if (s === null && e !== null)
@@ -1109,7 +1110,7 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
1109
1110
  }, Q = /* @__PURE__ */ new WeakSet(), lt = function() {
1110
1111
  i(this, S).state !== "pending" && c(this, S, new nt()), cancelAnimationFrame(i(this, ot)), c(this, ot, requestAnimationFrame(() => {
1111
1112
  var s;
1112
- (((s = i(this, d)) == null ? void 0 : s.currentTime) ?? null) !== null && (f(this, Ct, zt).call(this), i(this, v).task === "play" && (i(this, u) !== null || i(this, y) !== null) ? f(this, kt, Kt).call(this) : i(this, v).task === "pause" && f(this, xt, qt).call(this), Promise.all(i(this, R).map((t) => t.finished)).then(i(this, yt)), Promise.all(i(this, R).map((t) => new Promise((e) => t.onremove = e))).then(i(this, Pt)), Promise.all(i(this, R).map((t) => new Promise((e) => t.oncancel = e))).then(i(this, Lt)).then(() => c(this, ht, "removed")));
1113
+ (((s = i(this, d)) == null ? void 0 : s.currentTime) ?? null) !== null && (f(this, Ct, zt).call(this), i(this, v).task === "play" && (i(this, u) !== null || i(this, y) !== null) ? f(this, kt, Kt).call(this) : i(this, v).task === "pause" && f(this, xt, qt).call(this), Promise.all(i(this, k).map((t) => t.finished)).then(i(this, yt)), Promise.all(i(this, k).map((t) => new Promise((e) => t.onremove = e))).then(i(this, Pt)), Promise.all(i(this, k).map((t) => new Promise((e) => t.oncancel = e))).then(i(this, Lt)).then(() => c(this, ht, "removed")));
1113
1114
  }));
1114
1115
  }, q = /* @__PURE__ */ new WeakSet(), tt = function() {
1115
1116
  cancelAnimationFrame(i(this, ot)), i(this, v).task = null;
@@ -1127,14 +1128,14 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
1127
1128
  const r = this.playbackRate;
1128
1129
  r === 0 ? (c(this, y, null), c(this, u, h(t, e))) : c(this, u, h(t, e) - n / r);
1129
1130
  }
1130
- i(this, S).state === "pending" && i(this, S).resolve(this), f(this, I, V).call(this, !1), f(this, B, G).call(this), i(this, v).task = null, this.timeline instanceof DocumentTimeline && i(this, R).forEach((n) => n.play());
1131
+ i(this, S).state === "pending" && i(this, S).resolve(this), f(this, I, V).call(this, !1), f(this, B, G).call(this), i(this, v).task = null, this.timeline instanceof DocumentTimeline && i(this, k).forEach((n) => n.play());
1131
1132
  }, xt = /* @__PURE__ */ new WeakSet(), qt = function() {
1132
1133
  var s;
1133
1134
  const t = ((s = this.timeline) == null ? void 0 : s.currentTime) ?? null;
1134
1135
  if (t === null)
1135
1136
  return;
1136
1137
  const e = i(this, d) instanceof E ? "percent" : "ms", n = t;
1137
- i(this, u) !== null && i(this, y) === null && c(this, y, (h(n, e) - i(this, u)) * this.playbackRate), f(this, D, $).call(this), c(this, u, null), i(this, S).resolve(this), f(this, I, V).call(this, !1), f(this, B, G).call(this), i(this, v).task = null, i(this, R).forEach((r) => r.pause());
1138
+ i(this, u) !== null && i(this, y) === null && c(this, y, (h(n, e) - i(this, u)) * this.playbackRate), f(this, D, $).call(this), c(this, u, null), i(this, S).resolve(this), f(this, I, V).call(this, !1), f(this, B, G).call(this), i(this, v).task = null, i(this, k).forEach((r) => r.pause());
1138
1139
  }, Ct = /* @__PURE__ */ new WeakSet(), zt = function() {
1139
1140
  if (i(this, O) && !(!i(this, d) || !i(this, d).currentTime) && !(this.playState === "idle" || this.playState === "paused" && i(this, y) !== null)) {
1140
1141
  if (i(this, d) instanceof E) {
@@ -1158,7 +1159,7 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
1158
1159
  r = i(this, y);
1159
1160
  else
1160
1161
  return;
1161
- i(this, R).forEach((a) => a.currentTime = r);
1162
+ i(this, k).forEach((a) => a.currentTime = r);
1162
1163
  }, ct = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakSet(), Mt = function() {
1163
1164
  var s;
1164
1165
  let t = i(this, x);
@@ -1176,7 +1177,7 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
1176
1177
  const n = i(this, d) instanceof E ? document.timeline : i(this, d);
1177
1178
  e.push(new Me(t, n));
1178
1179
  }
1179
- c(this, R, e);
1180
+ c(this, k, e);
1180
1181
  }, I = /* @__PURE__ */ new WeakSet(), V = function(s) {
1181
1182
  var t, e;
1182
1183
  const n = ((t = i(this, d)) == null ? void 0 : t.currentTime) ?? null, r = i(this, d) instanceof E ? "percent" : "ms";
@@ -1190,9 +1191,9 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
1190
1191
  p = p.to("ms").value;
1191
1192
  else if (typeof p == "string")
1192
1193
  throw new TypeError("Unknown effect duration keyword.");
1193
- const k = o + p * m + l;
1194
+ const R = o + p * m + l;
1194
1195
  let T = h(i(this, z), r);
1195
- w > 0 && a >= k && i(this, z) !== null ? ((T === null || T < k) && (T = k), c(this, y, s ? a : T)) : w < 0 && a <= 0 ? ((T === null || T > 0) && (T = 0), c(this, y, s ? a : T)) : w !== 0 && (s && i(this, y) !== null && (n !== null ? c(this, u, h(n, r) - i(this, y) / w) : c(this, u, null)), c(this, y, null));
1196
+ w > 0 && a >= R && i(this, z) !== null ? ((T === null || T < R) && (T = R), c(this, y, s ? a : T)) : w < 0 && a <= 0 ? ((T === null || T > 0) && (T = 0), c(this, y, s ? a : T)) : w !== 0 && (s && i(this, y) !== null && (n !== null ? c(this, u, h(n, r) - i(this, y) / w) : c(this, u, null)), c(this, y, null));
1196
1197
  }
1197
1198
  f(this, B, G).call(this), c(this, z, this.currentTime), this.playState === "finished" ? i(this, P).state === "pending" && i(this, yt).call(this) : i(this, P).state === "resolved" && c(this, P, new nt());
1198
1199
  }, D = /* @__PURE__ */ new WeakSet(), $ = function() {
@@ -1219,8 +1220,8 @@ class At extends Ot {
1219
1220
  getComputedTiming() {
1220
1221
  const t = this.getTiming(), e = { ...t };
1221
1222
  for (let w = 0; w < this.children.length; w++) {
1222
- const k = this.children.item(w);
1223
- if (!k)
1223
+ const R = this.children.item(w);
1224
+ if (!R)
1224
1225
  continue;
1225
1226
  let {
1226
1227
  delay: T = 0,
@@ -1228,7 +1229,7 @@ class At extends Ot {
1228
1229
  duration: C = "auto",
1229
1230
  activeDuration: M = 0,
1230
1231
  endTime: L = 0
1231
- } = k.getComputedTiming();
1232
+ } = R.getComputedTiming();
1232
1233
  t.delay = t.delay ? Math.min(t.delay, T) : T, t.endDelay = t.endDelay ? Math.max(t.endDelay, X) : X, e.endTime = e.endTime ? Math.max(h(e.endTime, "ms"), h(L, "ms")) : L, e.activeDuration = e.activeDuration ? Math.max(h(e.activeDuration, "ms"), h(M, "ms")) : M, t.duration = t.duration instanceof CSSNumericValue ? t.duration.to("ms").value : t.duration, C = C instanceof CSSNumericValue ? C.to("ms").value : C, typeof C != "string" && (t.duration === "auto" ? t.duration = h(C, "ms") : typeof t.duration != "string" && (t.duration = t.duration ? Math.max(t.duration, C) : C));
1233
1234
  }
1234
1235
  const { timeline: n, startTime: r, currentTime: a } = A.get(this) ?? {}, o = n instanceof E ? "percent" : "ms";
@@ -1401,8 +1402,8 @@ class Ve extends st {
1401
1402
  const m = l.getBoundingClientRect(), p = a.clone(), w = l.clone();
1402
1403
  if (!w || !p)
1403
1404
  continue;
1404
- const k = Array.from(/* @__PURE__ */ new Set([...l.styles, ...a.styles]));
1405
- a.transitionType !== "morph" ? (w.id = `${r}-start`, w.style.position = "absolute", w.style.gridArea = "1 / 1", w.style.margin = "0", this.copyStyles(l.ref.current?.firstElementChild, w, k), this.copyStyles(a.ref.current?.firstElementChild, p, k), w.style.width = `${m.width}px`, w.style.height = `${m.height}px`, p.style.width = `${o.width}px`, p.style.height = `${o.height}px`, this.ref.current?.prepend(w)) : (this.copyStyles(l.ref.current?.firstElementChild, p, k), p.style.width = `${m.width}px`, p.style.height = `${m.height}px`), p.id = `${r}${a.transitionType === "morph" ? "" : "-end"}`, p.style.position = "absolute", p.style.gridArea = "1 / 1", p.style.margin = "0", this.ref.current?.prepend(p), l.hide(), a.hide();
1405
+ const R = Array.from(/* @__PURE__ */ new Set([...l.styles, ...a.styles]));
1406
+ a.transitionType !== "morph" ? (w.id = `${r}-start`, w.style.position = "absolute", w.style.gridArea = "1 / 1", w.style.margin = "0", this.copyStyles(l.ref.current?.firstElementChild, w, R), this.copyStyles(a.ref.current?.firstElementChild, p, R), w.style.width = `${m.width}px`, w.style.height = `${m.height}px`, p.style.width = `${o.width}px`, p.style.height = `${o.height}px`, this.ref.current?.prepend(w)) : (this.copyStyles(l.ref.current?.firstElementChild, p, R), p.style.width = `${m.width}px`, p.style.height = `${m.height}px`), p.id = `${r}${a.transitionType === "morph" ? "" : "-end"}`, p.style.position = "absolute", p.style.gridArea = "1 / 1", p.style.margin = "0", this.ref.current?.prepend(p), l.hide(), a.hide();
1406
1407
  const T = async () => {
1407
1408
  this.props.direction === "forwards" ? a.unhide() : l.unhide(), p.remove(), w.remove();
1408
1409
  };
@@ -1435,7 +1436,7 @@ class je extends st {
1435
1436
  sharedElementTransitionLayer = K();
1436
1437
  animation = new Oe();
1437
1438
  #t = "normal";
1438
- #e = new Array();
1439
+ #e = [];
1439
1440
  state = {
1440
1441
  gestureNavigating: !1,
1441
1442
  progress: 1
@@ -1496,7 +1497,7 @@ class je extends st {
1496
1497
  /* @__PURE__ */ b(
1497
1498
  "div",
1498
1499
  {
1499
- className: "screen-transition-layer",
1500
+ className: this.props.id,
1500
1501
  style: {
1501
1502
  width: "100%",
1502
1503
  height: "100%",
@@ -1627,6 +1628,7 @@ class Nt extends st {
1627
1628
  children: /* @__PURE__ */ b(wt.Provider, { value: this, children: /* @__PURE__ */ b(
1628
1629
  je,
1629
1630
  {
1631
+ id: `${this.id}-transition-provider`,
1630
1632
  ref: this.screenTransitionLayer,
1631
1633
  navigation: this.navigation,
1632
1634
  hasUAVisualTransition: this.hasUAVisualTransition,