@react-motion-router/stack 2.0.0-beta.sha-20ff5ff → 2.0.0-beta.sha-679879e

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/build/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { NavigationBase as ht, resolveBaseURLFromPattern as dt, matchRoute as Y, ScreenBase as ft, RouterBase as vt, cloneAndInject as gt, includesRoute as pt, useNavigationBase as mt, useRouterBase as yt, useRouteBase as wt, useParamsBase as Et } from "@react-motion-router/core";
2
2
  import { createRef as Pt, startTransition as N, useDebugValue as j, useEffect as C, useState as St, useRef as $, useCallback as bt } from "react";
3
- import { GestureTimeline as Lt, springToLinear as _t, easingToLinear as A } from "web-animations-extension";
3
+ import { GestureTimeline as _t, springToLinear as Lt, easingToLinear as A } from "web-animations-extension";
4
4
  import { jsx as ut } from "react/jsx-runtime";
5
- var g = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Tt = {}, T = {};
6
- Object.defineProperty(T, "__esModule", { value: !0 });
5
+ var g = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Rt = {}, R = {};
6
+ Object.defineProperty(R, "__esModule", { value: !0 });
7
7
  var rt;
8
8
  (function(n) {
9
9
  n[n.tap = 0] = "tap", n[n.longpress = 1] = "longpress", n[n.pinchstart = 2] = "pinchstart", n[n.pinch = 3] = "pinch", n[n.pinchend = 4] = "pinchend", n[n.rotatestart = 5] = "rotatestart", n[n.rotate = 6] = "rotate", n[n.rotateend = 7] = "rotateend", n[n.swipestart = 8] = "swipestart", n[n.swipe = 9] = "swipe", n[n.swipeend = 10] = "swipeend", n[n.panstart = 11] = "panstart", n[n.pan = 12] = "pan", n[n.panend = 13] = "panend", n[n.doubletap = 14] = "doubletap";
10
10
  })(rt || (rt = {}));
11
- class Rt extends TouchEvent {
11
+ class kt extends TouchEvent {
12
12
  constructor(t, e) {
13
13
  if (super(t, {
14
14
  touches: Array.from(e.touches),
@@ -27,12 +27,12 @@ class Rt extends TouchEvent {
27
27
  this.gestureTarget = e.touches[0].target, this.x = e.touches[0].clientX, this.y = e.touches[0].clientY;
28
28
  }
29
29
  }
30
- T.default = Rt;
31
- var W = {}, kt = g && g.__importDefault || function(n) {
30
+ R.default = kt;
31
+ var W = {}, Tt = g && g.__importDefault || function(n) {
32
32
  return n && n.__esModule ? n : { default: n };
33
33
  };
34
34
  Object.defineProperty(W, "__esModule", { value: !0 });
35
- const It = kt(T);
35
+ const It = Tt(R);
36
36
  class xt extends It.default {
37
37
  constructor(t, e) {
38
38
  super("longpress", t), this.duration = 0, this.duration = e;
@@ -43,19 +43,19 @@ var q = {}, Ft = g && g.__importDefault || function(n) {
43
43
  return n && n.__esModule ? n : { default: n };
44
44
  };
45
45
  Object.defineProperty(q, "__esModule", { value: !0 });
46
- const Ot = Ft(T);
46
+ const Ot = Ft(R);
47
47
  class Dt extends Ot.default {
48
48
  constructor(t) {
49
49
  super("tap", t), this.duration = 0;
50
50
  }
51
51
  }
52
52
  q.default = Dt;
53
- var G = {}, Kt = g && g.__importDefault || function(n) {
53
+ var G = {}, Mt = g && g.__importDefault || function(n) {
54
54
  return n && n.__esModule ? n : { default: n };
55
55
  };
56
56
  Object.defineProperty(G, "__esModule", { value: !0 });
57
- const Mt = Kt(T);
58
- class Bt extends Mt.default {
57
+ const Kt = Mt(R);
58
+ class Bt extends Kt.default {
59
59
  constructor(t) {
60
60
  super("doubletap", t);
61
61
  }
@@ -66,7 +66,7 @@ var F = {}, Yt = g && g.__importDefault || function(n) {
66
66
  };
67
67
  Object.defineProperty(F, "__esModule", { value: !0 });
68
68
  F.SwipeEndEvent = F.SwipeStartEvent = void 0;
69
- const Ct = Yt(T);
69
+ const Ct = Yt(R);
70
70
  var st;
71
71
  (function(n) {
72
72
  n[n.start = 0] = "start", n[n.end = 1] = "end";
@@ -110,7 +110,7 @@ var O = {}, Ht = g && g.__importDefault || function(n) {
110
110
  };
111
111
  Object.defineProperty(O, "__esModule", { value: !0 });
112
112
  O.PanEndEvent = O.PanStartEvent = void 0;
113
- const Nt = Ht(T);
113
+ const Nt = Ht(R);
114
114
  var it;
115
115
  (function(n) {
116
116
  n[n.start = 0] = "start", n[n.end = 1] = "end";
@@ -161,7 +161,7 @@ var D = {}, Wt = g && g.__importDefault || function(n) {
161
161
  };
162
162
  Object.defineProperty(D, "__esModule", { value: !0 });
163
163
  D.PinchEndEvent = D.PinchStartEvent = void 0;
164
- const qt = Wt(T);
164
+ const qt = Wt(R);
165
165
  var at;
166
166
  (function(n) {
167
167
  n[n.start = 0] = "start", n[n.end = 1] = "end";
@@ -203,12 +203,12 @@ class Zt extends J {
203
203
  }
204
204
  }
205
205
  D.PinchEndEvent = Zt;
206
- var K = {}, Jt = g && g.__importDefault || function(n) {
206
+ var M = {}, Jt = g && g.__importDefault || function(n) {
207
207
  return n && n.__esModule ? n : { default: n };
208
208
  };
209
- Object.defineProperty(K, "__esModule", { value: !0 });
210
- K.RotateEndEvent = K.RotateStartEvent = void 0;
211
- const Qt = Jt(T);
209
+ Object.defineProperty(M, "__esModule", { value: !0 });
210
+ M.RotateEndEvent = M.RotateStartEvent = void 0;
211
+ const Qt = Jt(R);
212
212
  var ot;
213
213
  (function(n) {
214
214
  n[n.start = 0] = "start", n[n.end = 1] = "end";
@@ -242,27 +242,27 @@ class te extends Q {
242
242
  super(t, e);
243
243
  }
244
244
  }
245
- K.default = te;
245
+ M.default = te;
246
246
  class ee extends Q {
247
247
  constructor(t, e) {
248
248
  super(t, e, "start");
249
249
  }
250
250
  }
251
- K.RotateStartEvent = ee;
251
+ M.RotateStartEvent = ee;
252
252
  class ne extends Q {
253
253
  constructor(t, e) {
254
254
  super(t, e, "end");
255
255
  }
256
256
  }
257
- K.RotateEndEvent = ne;
258
- var R = {};
259
- Object.defineProperty(R, "__esModule", { value: !0 });
260
- R.closest = R.Vec2 = R.assert = void 0;
257
+ M.RotateEndEvent = ne;
258
+ var k = {};
259
+ Object.defineProperty(k, "__esModule", { value: !0 });
260
+ k.closest = k.Vec2 = k.assert = void 0;
261
261
  function re(n, t) {
262
262
  if (!n)
263
263
  throw new Error(t);
264
264
  }
265
- R.assert = re;
265
+ k.assert = re;
266
266
  class se {
267
267
  constructor(t, e) {
268
268
  this._x = 0, this._y = 0, this._clientX = 0, this._clientY = 0, this._clientX = t, this._clientY = e, this._x = this.translateX(t), this._y = this.translateY(e);
@@ -307,21 +307,21 @@ class se {
307
307
  return Math.sqrt(Math.pow(this._clientX, 2) + Math.pow(this._clientY, 2));
308
308
  }
309
309
  }
310
- R.Vec2 = se;
310
+ k.Vec2 = se;
311
311
  function ie(n, t) {
312
312
  return t.reduce((e, r) => {
313
313
  let s = Math.abs(e - n), i = Math.abs(r - n);
314
314
  return s === i ? e > r ? e : r : i < s ? r : e;
315
315
  });
316
316
  }
317
- R.closest = ie;
317
+ k.closest = ie;
318
318
  (function(n) {
319
- var t = g && g.__createBinding || (Object.create ? function(u, a, h, m) {
320
- m === void 0 && (m = h), Object.defineProperty(u, m, { enumerable: !0, get: function() {
319
+ var t = g && g.__createBinding || (Object.create ? function(u, a, h, P) {
320
+ P === void 0 && (P = h), Object.defineProperty(u, P, { enumerable: !0, get: function() {
321
321
  return a[h];
322
322
  } });
323
- } : function(u, a, h, m) {
324
- m === void 0 && (m = h), u[m] = a[h];
323
+ } : function(u, a, h, P) {
324
+ P === void 0 && (P = h), u[P] = a[h];
325
325
  }), e = g && g.__setModuleDefault || (Object.create ? function(u, a) {
326
326
  Object.defineProperty(u, "default", { enumerable: !0, value: a });
327
327
  } : function(u, a) {
@@ -338,7 +338,7 @@ R.closest = ie;
338
338
  return u && u.__esModule ? u : { default: u };
339
339
  };
340
340
  Object.defineProperty(n, "__esModule", { value: !0 }), n.RotateEndEvent = n.RotateEvent = n.RotateStartEvent = n.PinchEndEvent = n.PinchEvent = n.PinchStartEvent = n.PanEndEvent = n.PanEvent = n.PanStartEvent = n.SwipeEndEvent = n.SwipeEvent = n.SwipeStartEvent = n.DoubleTapEvent = n.LongPressEvent = n.GestureEvent = n.TapEvent = void 0;
341
- const i = s(T);
341
+ const i = s(R);
342
342
  n.GestureEvent = i.default;
343
343
  const o = s(W);
344
344
  n.LongPressEvent = o.default;
@@ -358,31 +358,31 @@ R.closest = ie;
358
358
  } }), Object.defineProperty(n, "PanStartEvent", { enumerable: !0, get: function() {
359
359
  return d.PanStartEvent;
360
360
  } });
361
- const P = r(D);
362
- n.PinchEvent = P.default, Object.defineProperty(n, "PinchEndEvent", { enumerable: !0, get: function() {
363
- return P.PinchEndEvent;
361
+ const w = r(D);
362
+ n.PinchEvent = w.default, Object.defineProperty(n, "PinchEndEvent", { enumerable: !0, get: function() {
363
+ return w.PinchEndEvent;
364
364
  } }), Object.defineProperty(n, "PinchStartEvent", { enumerable: !0, get: function() {
365
- return P.PinchStartEvent;
365
+ return w.PinchStartEvent;
366
366
  } });
367
- const w = r(K);
368
- n.RotateEvent = w.default, Object.defineProperty(n, "RotateEndEvent", { enumerable: !0, get: function() {
369
- return w.RotateEndEvent;
367
+ const E = r(M);
368
+ n.RotateEvent = E.default, Object.defineProperty(n, "RotateEndEvent", { enumerable: !0, get: function() {
369
+ return E.RotateEndEvent;
370
370
  } }), Object.defineProperty(n, "RotateStartEvent", { enumerable: !0, get: function() {
371
- return w.RotateStartEvent;
371
+ return E.RotateStartEvent;
372
372
  } });
373
- const v = R;
373
+ const v = k;
374
374
  var p;
375
375
  (function(u) {
376
376
  u[u.right = 0] = "right", u[u.up = 1] = "up", u[u.left = 2] = "left", u[u.down = 3] = "down";
377
377
  })(p || (p = {}));
378
- class y {
378
+ class m {
379
379
  constructor() {
380
380
  this.touchStart = new TouchEvent("touchstart") || {}, this.touchMove = new TouchEvent("touchmove") || {}, this.touchEnd = new TouchEvent("touchend") || {}, this.touchCancel = new TouchEvent("touchcancel") || {}, this.velocity = 0, this.dxDy = new v.Vec2(0, 0), this.scale = 1, this.rotation = 0, this.rotationDeg = 0, this.anchor = new v.Vec2(0, 0), this.octant = 0, this.isPanning = !1, this.isPinching = !1, this.isSwiping = !1, this.isRotating = !1, this.touchStartTime = 0, this.touchEndTime = 0, this.lastTouchTime = 0, this.taps = 0, this.scaleBase = 0, this.touchMoved = !1, this.touchDown = !1, this.shouldFire = !1, this.pointers = 0, this.isLongPress = !1, this.longPressTimeout = 0, this.touchStartListener = this.onTouchStart.bind(this), this.touchMoveListener = this.onTouchMove.bind(this), this.touchEndListener = this.onTouchEnd.bind(this), this.touchCancelListener = this.onTouchCancel.bind(this), this.currentTarget = window, this.config = {
381
381
  longPressDuration: 500,
382
382
  tapDelay: 500,
383
383
  minPointers: 1,
384
384
  numberOfTaps: 0
385
- }, y.listening || (TouchEvent && window.addEventListener("touchstart", this.touchStartListener, !0), y.listening = !0);
385
+ }, m.listening || (TouchEvent && window.addEventListener("touchstart", this.touchStartListener, !0), m.listening = !0);
386
386
  }
387
387
  bind(a) {
388
388
  this.unbind(this.currentTarget), a.addEventListener("touchmove", this.touchMoveListener, !0), a.addEventListener("touchend", this.touchEndListener, !0), a.addEventListener("touchcancel", this.touchCancelListener, !0), this.currentTarget = a;
@@ -412,13 +412,13 @@ R.closest = ie;
412
412
  }
413
413
  if (a.touches.length === 1) {
414
414
  if (this.scaleBase = 0, this.isPinching) {
415
- const h = new P.PinchEndEvent(a, {
415
+ const h = new w.PinchEndEvent(a, {
416
416
  scale: this.scale
417
417
  });
418
418
  this.dispatchEvent(h), this.isPinching = !1;
419
419
  }
420
420
  if (this.isRotating) {
421
- const h = new w.RotateEndEvent(a, {
421
+ const h = new E.RotateEndEvent(a, {
422
422
  rotation: this.rotation,
423
423
  rotationDeg: this.rotationDeg,
424
424
  anchor: this.anchor
@@ -440,15 +440,15 @@ R.closest = ie;
440
440
  return;
441
441
  }
442
442
  this.shouldFire = !0, this.touchStartTime = a.timeStamp, this.touchDown = !0, this.pointers || this.bind(a.touches[0].target), this.pointers = this.touchStart.touches.length;
443
- const m = parseFloat(this.currentTarget.dataset.longpressduration || "0") || this.config.longPressDuration;
443
+ const P = parseFloat(this.currentTarget.dataset.longpressduration || "0") || this.config.longPressDuration;
444
444
  if (this.longPressTimeout || (this.longPressTimeout = setTimeout(() => {
445
445
  if (!this.touchMoved && this.touchDown) {
446
- const E = Date.now() - this.touchStartTime, b = new o.default(this.touchStart, E);
446
+ const y = Date.now() - this.touchStartTime, b = new o.default(this.touchStart, y);
447
447
  this.dispatchEvent(b), this.isLongPress = !0, this.longPressTimeout = 0;
448
448
  }
449
- }, m)), this.touchStart.touches.length > 1) {
450
- const E = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), b = new v.Vec2(this.touchStart.touches[1].clientX, this.touchStart.touches[1].clientY);
451
- this.scaleBase = E.substract(b).magnitude;
449
+ }, P)), this.touchStart.touches.length > 1) {
450
+ const y = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), b = new v.Vec2(this.touchStart.touches[1].clientX, this.touchStart.touches[1].clientY);
451
+ this.scaleBase = y.substract(b).magnitude;
452
452
  } else
453
453
  this.scaleBase = 0;
454
454
  }
@@ -456,32 +456,32 @@ R.closest = ie;
456
456
  if (!this.shouldFire)
457
457
  return;
458
458
  if (this.touchMoved = !0, this.touchMove = a, a.touches.length > 1 && this.touchStart.touches.length > 1 && (a.touches[1].clientX !== this.touchStart.touches[1].clientX || a.touches[1].clientY !== this.touchStart.touches[1].clientY)) {
459
- const L = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY), U = new v.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY), et = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), nt = L.substract(U);
459
+ const _ = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY), U = new v.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY), et = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), nt = _.substract(U);
460
460
  if (this.scaleBase && Math.abs(this.scaleBase - nt.magnitude) > 10) {
461
461
  const I = nt.magnitude / this.scaleBase;
462
462
  if (this.scale = I, this.isPinching) {
463
- const H = new P.default(a, {
463
+ const H = new w.default(a, {
464
464
  scale: I
465
465
  });
466
466
  this.dispatchEvent(H);
467
467
  } else {
468
- const H = new P.PinchStartEvent(a, {
468
+ const H = new w.PinchStartEvent(a, {
469
469
  scale: I
470
470
  });
471
471
  this.dispatchEvent(H), this.isPinching = !0;
472
472
  }
473
473
  }
474
- this.anchor = L;
474
+ this.anchor = _;
475
475
  let B = Math.atan2(et.clientY - U.clientY, et.clientX - U.clientX);
476
476
  if (B < 0 ? B += 1.5708 : B -= 1.5708, this.rotation = B, this.rotationDeg = B * 180 / Math.PI, this.anchor = this.anchor, this.isRotating) {
477
- const I = new w.default(a, {
477
+ const I = new E.default(a, {
478
478
  anchor: this.anchor,
479
479
  rotation: this.rotation,
480
480
  rotationDeg: this.rotationDeg
481
481
  });
482
482
  this.dispatchEvent(I);
483
483
  } else {
484
- const I = new w.RotateStartEvent(a, {
484
+ const I = new E.RotateStartEvent(a, {
485
485
  anchor: this.anchor,
486
486
  rotation: this.rotation,
487
487
  rotationDeg: this.rotationDeg
@@ -489,52 +489,52 @@ R.closest = ie;
489
489
  this.dispatchEvent(I), this.isRotating = !0;
490
490
  }
491
491
  }
492
- const h = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), E = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY).substract(h), b = E.magnitude, k = {
493
- x: E.x / b,
494
- y: E.y / b
495
- }, S = Math.atan2(k.y, k.x);
492
+ const h = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), y = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY).substract(h), b = y.magnitude, T = {
493
+ x: y.x / b,
494
+ y: y.y / b
495
+ }, S = Math.atan2(T.y, T.x);
496
496
  this.octant = Math.round(4 * S / (2 * Math.PI) + 4) % 4;
497
- const X = (a.timeStamp - this.touchStart.timeStamp) / 1e3, M = E.magnitude / X;
497
+ const X = (a.timeStamp - this.touchStart.timeStamp) / 1e3, K = y.magnitude / X;
498
498
  if (this.isSwiping) {
499
- const L = new f.default(a, {
499
+ const _ = new f.default(a, {
500
500
  direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
501
- velocity: M
501
+ velocity: K
502
502
  });
503
- this.dispatchEvent(L);
503
+ this.dispatchEvent(_);
504
504
  } else {
505
- const L = new f.SwipeStartEvent(a, {
505
+ const _ = new f.SwipeStartEvent(a, {
506
506
  direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
507
- velocity: M
507
+ velocity: K
508
508
  });
509
- this.dispatchEvent(L), this.isSwiping = !0;
509
+ this.dispatchEvent(_), this.isSwiping = !0;
510
510
  }
511
- if (this.dxDy = E, this.velocity = M, this.isPanning) {
512
- const L = new d.default(a, {
513
- translation: E,
514
- velocity: M
511
+ if (this.dxDy = y, this.velocity = K, this.isPanning) {
512
+ const _ = new d.default(a, {
513
+ translation: y,
514
+ velocity: K
515
515
  });
516
- this.dispatchEvent(L);
516
+ this.dispatchEvent(_);
517
517
  } else {
518
- const L = new d.PanStartEvent(a, {
519
- translation: E,
520
- velocity: M
518
+ const _ = new d.PanStartEvent(a, {
519
+ translation: y,
520
+ velocity: K
521
521
  });
522
- this.dispatchEvent(L), this.isPanning = !0;
522
+ this.dispatchEvent(_), this.isPanning = !0;
523
523
  }
524
524
  }
525
525
  onTouchEnd(a) {
526
526
  const h = parseInt(this.currentTarget.dataset.numberoftaps || "0") || this.config.numberOfTaps;
527
527
  if (this.taps++, this.shouldFire = this.taps > h, this.shouldFire) {
528
528
  this.touchEnd = a, this.touchEndTime = a.timeStamp;
529
- const m = parseFloat(this.currentTarget.dataset.tapdelay || "0") || this.config.tapDelay;
529
+ const P = parseFloat(this.currentTarget.dataset.tapdelay || "0") || this.config.tapDelay;
530
530
  if (!this.touchMoved && !this.isLongPress)
531
- if (this.taps === 1 || this.touchEndTime - this.lastTouchTime < m) {
531
+ if (this.taps === 1 || this.touchEndTime - this.lastTouchTime < P) {
532
532
  if (this.taps % 2 === h) {
533
533
  const b = new l.default(a);
534
534
  this.dispatchEvent(b), this.taps = 0;
535
535
  }
536
- const E = new c.default(a);
537
- this.dispatchEvent(E);
536
+ const y = new c.default(a);
537
+ this.dispatchEvent(y);
538
538
  } else
539
539
  this.taps = 0;
540
540
  }
@@ -544,8 +544,8 @@ R.closest = ie;
544
544
  this.shouldFire && (this.touchCancel = a, this.unbind(this.currentTarget), this.clean());
545
545
  }
546
546
  }
547
- n.default = y, y.listening = !1, TouchEvent && (window.gestureProvider = new y());
548
- })(Tt);
547
+ n.default = m, m.listening = !1, TouchEvent && (window.gestureProvider = new m());
548
+ })(Rt);
549
549
  class ae extends Event {
550
550
  routerId;
551
551
  route;
@@ -938,7 +938,7 @@ function Ee(n, { x: t, y: e }, r, s) {
938
938
  function Pe(n) {
939
939
  return n === "left" || n === "right" || n === "horizontal";
940
940
  }
941
- const _ = {
941
+ const L = {
942
942
  gestureHysteresis: 0.5,
943
943
  gestureMinFlingVelocity: 400,
944
944
  gestureAreaWidth: 100,
@@ -969,11 +969,11 @@ class Qe extends vt {
969
969
  constructor(t, e) {
970
970
  super(t, e);
971
971
  const {
972
- gestureAreaWidth: r = _.gestureAreaWidth,
973
- gestureDirection: s = _.gestureDirection,
974
- gestureDisabled: i = _.gestureDisabled,
975
- gestureHysteresis: o = _.gestureHysteresis,
976
- gestureMinFlingVelocity: c = _.gestureMinFlingVelocity
972
+ gestureAreaWidth: r = L.gestureAreaWidth,
973
+ gestureDirection: s = L.gestureDirection,
974
+ gestureDisabled: i = L.gestureDisabled,
975
+ gestureHysteresis: o = L.gestureHysteresis,
976
+ gestureMinFlingVelocity: c = L.gestureMinFlingVelocity
977
977
  } = t.config?.screenConfig ?? {};
978
978
  this.state = {
979
979
  screenStack: [],
@@ -994,11 +994,11 @@ class Qe extends vt {
994
994
  (s) => x(s.ref) && s.ref.current?.focused
995
995
  )?.props.config;
996
996
  return document.title = r?.title ?? document.title, {
997
- gestureDirection: r?.gestureDirection ?? _.gestureDirection,
998
- gestureAreaWidth: r?.gestureAreaWidth ?? _.gestureAreaWidth,
999
- gestureMinFlingVelocity: r?.gestureMinFlingVelocity ?? _.gestureMinFlingVelocity,
1000
- gestureHysteresis: r?.gestureHysteresis ?? _.gestureHysteresis,
1001
- gestureDisabled: r?.gestureDisabled ?? _.gestureDisabled,
997
+ gestureDirection: r?.gestureDirection ?? L.gestureDirection,
998
+ gestureAreaWidth: r?.gestureAreaWidth ?? L.gestureAreaWidth,
999
+ gestureMinFlingVelocity: r?.gestureMinFlingVelocity ?? L.gestureMinFlingVelocity,
1000
+ gestureHysteresis: r?.gestureHysteresis ?? L.gestureHysteresis,
1001
+ gestureDisabled: r?.gestureDisabled ?? L.gestureDisabled,
1002
1002
  documentTitle: r?.title
1003
1003
  };
1004
1004
  }
@@ -1070,7 +1070,7 @@ class Qe extends vt {
1070
1070
  s = this.ref.current.clientHeight, i = 0;
1071
1071
  break;
1072
1072
  }
1073
- this.screenTransitionLayer.current.animation.timeline = new Lt(
1073
+ this.screenTransitionLayer.current.animation.timeline = new _t(
1074
1074
  {
1075
1075
  source: this.ref.current,
1076
1076
  type: "swipe",
@@ -1204,19 +1204,19 @@ class Qe extends vt {
1204
1204
  this.setState(
1205
1205
  { screenStack: o, fromKey: r, transition: i, destinationKey: s },
1206
1206
  async () => {
1207
- const { initialPathname: d } = this.props.config ?? {}, [P] = c;
1208
- if (d && c.length === 1 && P.url && !Y(
1207
+ const { initialPathname: d } = this.props.config ?? {}, [w] = c;
1208
+ if (d && c.length === 1 && w.url && !Y(
1209
1209
  d,
1210
- P.url.pathname,
1210
+ w.url.pathname,
1211
1211
  this.baseURLPattern.pathname
1212
1212
  ))
1213
1213
  return (window.navigation.transition?.finished ?? Promise.resolve()).then(() => {
1214
1214
  this.navigation.replace(d).finished.then(() => {
1215
- const y = t.destination.getState() ?? {};
1216
- this.navigation.push(t.destination.url, y);
1215
+ const m = t.destination.getState() ?? {};
1216
+ this.navigation.push(t.destination.url, m);
1217
1217
  });
1218
1218
  }), l();
1219
- const w = t.signal;
1219
+ const E = t.signal;
1220
1220
  this.navigation.current?.key === void 0 && f(new Error("Current key is undefined"));
1221
1221
  const v = this.getScreenRefByKey(
1222
1222
  this.navigation.current.key
@@ -1224,7 +1224,7 @@ class Qe extends vt {
1224
1224
  await this.dispatchLifecycleHandlers(
1225
1225
  v,
1226
1226
  null,
1227
- w
1227
+ E
1228
1228
  ).catch(f), this.setState(
1229
1229
  { destinationKey: null, fromKey: null, transition: null },
1230
1230
  l
@@ -1244,31 +1244,22 @@ class Qe extends vt {
1244
1244
  if (!o)
1245
1245
  return t.preventDefault();
1246
1246
  const c = () => {
1247
- const l = this.state.transition !== null, f = this.state.transition ?? window.navigation.transition, d = f?.from?.key ?? null, P = e.findIndex(
1247
+ const l = this.state.transition ?? window.navigation.transition, f = l?.from?.key ?? null, d = e.findIndex(
1248
1248
  (w) => w.key === this.navigation.current?.key
1249
1249
  );
1250
- return e.splice(P, 1, o), new Promise(
1251
- (w, v) => N(() => {
1250
+ return e.splice(d, 1, o), new Promise(
1251
+ (w, E) => N(() => {
1252
1252
  this.setState(
1253
- { destinationKey: i, fromKey: d, transition: f, screenStack: e },
1253
+ { destinationKey: i, fromKey: f, transition: l, screenStack: e },
1254
1254
  async () => {
1255
- const p = t.signal, y = this.getScreenRefByKey(String(d)), u = this.getScreenRefByKey(
1255
+ const v = t.signal, p = this.getScreenRefByKey(
1256
1256
  String(i)
1257
- ), a = this.dispatchLifecycleHandlers(
1258
- u,
1257
+ );
1258
+ await this.dispatchLifecycleHandlers(
1259
+ p,
1259
1260
  null,
1260
- p
1261
- ).catch(v);
1262
- if (l) {
1263
- const h = this.screenTransitionLayer.current?.animation.currentTime ?? 0;
1264
- this.screenTransitionLayer.current?.animation.cancel(), await new Promise(requestAnimationFrame);
1265
- const m = this.screenTransition(
1266
- u,
1267
- y
1268
- );
1269
- m && (m.currentTime = h), m?.updatePlaybackRate(1), await m?.finished.catch(v);
1270
- }
1271
- await a, this.setState(
1261
+ v
1262
+ ).catch(E), this.setState(
1272
1263
  { destinationKey: null, fromKey: null, transition: null },
1273
1264
  w
1274
1265
  );
@@ -1296,41 +1287,41 @@ class Qe extends vt {
1296
1287
  this.baseURLPattern.pathname,
1297
1288
  p.props.caseSensitive
1298
1289
  ) : !1));
1299
- const d = (e[f]?.key || l?.from.key) ?? null, P = e.findIndex(
1290
+ const d = (e[f]?.key || l?.from.key) ?? null, w = e.findIndex(
1300
1291
  (p) => p.key === t.destination.key
1301
- ), w = (e[P]?.key || window.navigation.currentEntry?.key) ?? null;
1292
+ ), E = (e[w]?.key || window.navigation.currentEntry?.key) ?? null;
1302
1293
  if (t.navigationType === "push") {
1303
- const p = new URL(r.url).pathname, y = this.cloneScreenChildFromPathname(
1294
+ const p = new URL(r.url).pathname, m = this.cloneScreenChildFromPathname(
1304
1295
  p,
1305
- w
1296
+ E
1306
1297
  );
1307
- if (!y)
1298
+ if (!m)
1308
1299
  return Promise.resolve();
1309
1300
  e.splice(
1310
1301
  f + 1,
1311
1302
  1 / 0,
1312
1303
  // Remove all screens after current
1313
- y
1304
+ m
1314
1305
  );
1315
1306
  }
1316
1307
  const v = new AbortController();
1317
1308
  return new Promise(
1318
- (p, y) => N(() => {
1309
+ (p, m) => N(() => {
1319
1310
  this.setState(
1320
- { controller: v, destinationKey: w, fromKey: d, transition: l, screenStack: e },
1311
+ { controller: v, destinationKey: E, fromKey: d, transition: l, screenStack: e },
1321
1312
  async () => {
1322
- v.signal.onabort = y;
1313
+ v.signal.onabort = m;
1323
1314
  const u = t.signal, a = this.getScreenRefByKey(String(d)), h = this.getScreenRefByKey(
1324
- String(w)
1325
- ), m = this.dispatchLifecycleHandlers(
1315
+ String(E)
1316
+ ), P = this.dispatchLifecycleHandlers(
1326
1317
  h,
1327
1318
  a,
1328
1319
  u
1329
- ).catch(y), E = this.screenTransition(
1320
+ ).catch(m), y = this.screenTransition(
1330
1321
  h,
1331
1322
  a
1332
1323
  );
1333
- E?.updatePlaybackRate(1), E?.finished.catch(y), await m, this.setState(
1324
+ y?.updatePlaybackRate(1), y?.finished.catch(m), await P, this.setState(
1334
1325
  {
1335
1326
  destinationKey: null,
1336
1327
  fromKey: null,
@@ -1377,7 +1368,7 @@ class Qe extends vt {
1377
1368
  }
1378
1369
  }
1379
1370
  }
1380
- function Le() {
1371
+ function _e() {
1381
1372
  return j("Stack.Navigation"), mt();
1382
1373
  }
1383
1374
  function tn() {
@@ -1389,11 +1380,11 @@ function en() {
1389
1380
  function nn(n, t) {
1390
1381
  return j("Stack.Params"), Et(n, t);
1391
1382
  }
1392
- function _e(n) {
1393
- const t = Le();
1383
+ function Le(n) {
1384
+ const t = _e();
1394
1385
  return n ?? t;
1395
1386
  }
1396
- function Te(n, t = {}) {
1387
+ function Re(n, t = {}) {
1397
1388
  const e = $(null), r = bt(
1398
1389
  (s) => {
1399
1390
  s.forEach((i) => {
@@ -1418,7 +1409,7 @@ function ct(n, t, e, r) {
1418
1409
  };
1419
1410
  }, [n, t, e, r]);
1420
1411
  }
1421
- function Re(n, { forceThreshold: t = Se } = {}) {
1412
+ function ke(n, { forceThreshold: t = Se } = {}) {
1422
1413
  const e = $(null), r = () => n(!0), s = (i) => {
1423
1414
  const o = i.touches[0];
1424
1415
  o && o.force >= t && n(!0);
@@ -1439,21 +1430,21 @@ function rn({
1439
1430
  children: l,
1440
1431
  ...f
1441
1432
  }) {
1442
- const d = _e(i), P = c?.type === "onsight", w = c?.type === "onhover", v = c?.type === "force", p = Te(
1433
+ const d = Le(i), w = c?.type === "onsight", E = c?.type === "onhover", v = c?.type === "force", p = Re(
1443
1434
  (S) => {
1444
1435
  !S.isIntersecting || !n || d.preload(s, { params: e });
1445
1436
  },
1446
- P ? c : {}
1447
- ), y = Re(
1437
+ w ? c : {}
1438
+ ), m = ke(
1448
1439
  (S) => {
1449
1440
  !S || !n || d.preload(s, { params: e });
1450
1441
  },
1451
- w ? c : {}
1442
+ E ? c : {}
1452
1443
  );
1453
1444
  C(() => {
1454
1445
  !n || !v || d.preload(s, { params: e });
1455
1446
  }, [n, s, d, v, e]);
1456
- const [u, a] = St(void 0), h = d?.routerId, E = !u?.includes(window.location.origin) ? "noopener noreferrer" : t ? "prev" : "next";
1447
+ const [u, a] = St(void 0), h = d?.routerId, y = !u?.includes(window.location.origin) ? "noopener noreferrer" : t ? "prev" : "next";
1457
1448
  C(() => {
1458
1449
  if (t && d.canGoBack())
1459
1450
  a(d.previous.url?.href);
@@ -1465,16 +1456,16 @@ function rn({
1465
1456
  const b = (S) => {
1466
1457
  t ? (S.preventDefault(), d.goBack()) : r === "replace" && s && (S.preventDefault(), d.replace(s)), o?.(S);
1467
1458
  };
1468
- let k;
1459
+ let T;
1469
1460
  switch (c?.type) {
1470
1461
  case "onhover":
1471
- k = y;
1462
+ T = m;
1472
1463
  break;
1473
1464
  case "onsight":
1474
- k = p;
1465
+ T = p;
1475
1466
  break;
1476
1467
  default:
1477
- k = null;
1468
+ T = null;
1478
1469
  }
1479
1470
  return /* @__PURE__ */ ut(
1480
1471
  "a",
@@ -1482,8 +1473,8 @@ function rn({
1482
1473
  href: u,
1483
1474
  "data-router-id": h,
1484
1475
  onClick: b,
1485
- rel: E,
1486
- ref: k,
1476
+ rel: y,
1477
+ ref: T,
1487
1478
  ...f,
1488
1479
  children: l
1489
1480
  }
@@ -1496,7 +1487,7 @@ const sn = [
1496
1487
  {
1497
1488
  transform: "translateX(0vw)"
1498
1489
  }
1499
- ], ke = [
1490
+ ], Te = [
1500
1491
  {
1501
1492
  transform: "translateX(100vw)"
1502
1493
  },
@@ -1629,7 +1620,7 @@ const sn = [
1629
1620
  opacity: 1,
1630
1621
  transform: "translateY(0vh)"
1631
1622
  }
1632
- ], Ke = [
1623
+ ], Me = [
1633
1624
  {
1634
1625
  opacity: 0,
1635
1626
  transform: "translateY(96vw)"
@@ -1638,7 +1629,7 @@ const sn = [
1638
1629
  opacity: 1,
1639
1630
  transform: "translateY(0vw)"
1640
1631
  }
1641
- ], Me = [
1632
+ ], Ke = [
1642
1633
  {
1643
1634
  opacity: 0,
1644
1635
  transform: "translateY(0vw)"
@@ -1712,7 +1703,7 @@ function He(n) {
1712
1703
  return (t) => Math.pow(t, n);
1713
1704
  }
1714
1705
  const tt = {
1715
- ..._t({
1706
+ ...Lt({
1716
1707
  mass: 3,
1717
1708
  stiffness: 1e3,
1718
1709
  damping: 500,
@@ -1741,7 +1732,7 @@ const tt = {
1741
1732
  function mn({ ref: n, direction: t, playbackRate: e, index: r }) {
1742
1733
  let i = [
1743
1734
  Ie,
1744
- ke
1735
+ Te
1745
1736
  ][r];
1746
1737
  const o = {
1747
1738
  playbackRate: e,
@@ -1804,8 +1795,8 @@ function Sn({ ref: n, direction: t, index: e, playbackRate: r }) {
1804
1795
  }
1805
1796
  function bn({ ref: n, direction: t, index: e, playbackRate: r }) {
1806
1797
  const s = [
1807
- Me,
1808
- Ke
1798
+ Ke,
1799
+ Me
1809
1800
  ];
1810
1801
  let i;
1811
1802
  e === 0 ? i = Ne : i = lt;
@@ -1817,7 +1808,7 @@ function bn({ ref: n, direction: t, index: e, playbackRate: r }) {
1817
1808
  };
1818
1809
  return t === "reverse" && (o = o.toReversed()), new KeyframeEffect(n, o, c);
1819
1810
  }
1820
- function Ln({ ref: n, direction: t, index: e, playbackRate: r }) {
1811
+ function _n({ ref: n, direction: t, index: e, playbackRate: r }) {
1821
1812
  const i = [
1822
1813
  Xe,
1823
1814
  Ce
@@ -1829,7 +1820,7 @@ function Ln({ ref: n, direction: t, index: e, playbackRate: r }) {
1829
1820
  };
1830
1821
  return new KeyframeEffect(n, i, o);
1831
1822
  }
1832
- function _n({ disabled: n, children: t, ...e }) {
1823
+ function Ln({ disabled: n, children: t, ...e }) {
1833
1824
  const r = $(null);
1834
1825
  return C(() => {
1835
1826
  if (n)
@@ -1856,7 +1847,7 @@ export {
1856
1847
  rn as Anchor,
1857
1848
  gn as FadeInKeyframes,
1858
1849
  pn as FadeOutKeyframes,
1859
- _n as GestureRegion,
1850
+ Ln as GestureRegion,
1860
1851
  de as HistoryEntry,
1861
1852
  fe as Navigation,
1862
1853
  Qe as Router,
@@ -1880,13 +1871,13 @@ export {
1880
1871
  Pn as androidFadeInFromBottomSheet,
1881
1872
  je as androidFadeInFromBottomSheetKeyframes,
1882
1873
  bn as androidFadeInFromRight,
1883
- Ke as androidFadeInFromRightKeyframes,
1874
+ Me as androidFadeInFromRightKeyframes,
1884
1875
  Ne as androidFadeOutToBottomOptions,
1885
- Me as androidFadeOutToLeftKeyframes,
1876
+ Ke as androidFadeOutToLeftKeyframes,
1886
1877
  Sn as androidRevealFromBottom,
1887
1878
  Be as androidRevealFromBottomKeyframes,
1888
1879
  Ve as androidRevealFromBottomOptions,
1889
- Ln as androidScaleFromCentre,
1880
+ _n as androidScaleFromCentre,
1890
1881
  Ce as androidScaleFromCentreKeyframes,
1891
1882
  $e as androidScaleFromCentreOptions,
1892
1883
  Xe as androidScaleToCentreKeyframes,
@@ -1896,14 +1887,14 @@ export {
1896
1887
  yn as iOSSlideInFromLeft,
1897
1888
  xe as iOSSlideInFromLeftKeyframes,
1898
1889
  mn as iOSSlideInFromRight,
1899
- ke as iOSSlideInFromRightKeyframes,
1890
+ Te as iOSSlideInFromRightKeyframes,
1900
1891
  Ie as iOSSlideOutToLeftKeyframes,
1901
1892
  Fe as iOSSlideOutToRightKeyframes,
1902
1893
  Pe as isHorizontalDirection,
1903
1894
  Ee as isOutOfBounds,
1904
1895
  x as isRefObject,
1905
1896
  we as isSupportedDirection,
1906
- Le as useNavigation,
1897
+ _e as useNavigation,
1907
1898
  nn as useParams,
1908
1899
  en as useRoute,
1909
1900
  tn as useRouter