react-native-screen-transitions 3.2.0-beta.3 → 3.2.0

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.
Files changed (132) hide show
  1. package/README.md +327 -672
  2. package/lib/commonjs/shared/components/screen-lifecycle.js +9 -133
  3. package/lib/commonjs/shared/components/screen-lifecycle.js.map +1 -1
  4. package/lib/commonjs/shared/constants.js +1 -0
  5. package/lib/commonjs/shared/constants.js.map +1 -1
  6. package/lib/commonjs/shared/hooks/animation/use-screen-animation.js +3 -0
  7. package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +1 -1
  8. package/lib/commonjs/shared/hooks/lifecycle/use-close-transition.js +127 -0
  9. package/lib/commonjs/shared/hooks/lifecycle/use-close-transition.js.map +1 -0
  10. package/lib/commonjs/shared/hooks/lifecycle/use-open-transition.js +35 -0
  11. package/lib/commonjs/shared/hooks/lifecycle/use-open-transition.js.map +1 -0
  12. package/lib/commonjs/shared/hooks/lifecycle/use-screen-events.js +58 -0
  13. package/lib/commonjs/shared/hooks/lifecycle/use-screen-events.js.map +1 -0
  14. package/lib/commonjs/shared/hooks/navigation/use-history.js +24 -0
  15. package/lib/commonjs/shared/hooks/navigation/use-history.js.map +1 -0
  16. package/lib/commonjs/shared/index.js +7 -0
  17. package/lib/commonjs/shared/index.js.map +1 -1
  18. package/lib/commonjs/shared/providers/screen/keys.provider.js +0 -4
  19. package/lib/commonjs/shared/providers/screen/keys.provider.js.map +1 -1
  20. package/lib/commonjs/shared/providers/screen/screen-composer.js +7 -5
  21. package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -1
  22. package/lib/commonjs/shared/providers/stack/direct.provider.js +9 -0
  23. package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
  24. package/lib/commonjs/shared/providers/stack/managed.provider.js +9 -0
  25. package/lib/commonjs/shared/providers/stack/managed.provider.js.map +1 -1
  26. package/lib/commonjs/shared/stores/animation.store.js +3 -13
  27. package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
  28. package/lib/commonjs/shared/stores/history.store.js +185 -0
  29. package/lib/commonjs/shared/stores/history.store.js.map +1 -0
  30. package/lib/commonjs/shared/types/stack.types.js.map +1 -1
  31. package/lib/commonjs/shared/utils/animation/start-screen-transition.js +5 -1
  32. package/lib/commonjs/shared/utils/animation/start-screen-transition.js.map +1 -1
  33. package/lib/commonjs/shared/utils/bounds/index.js +19 -4
  34. package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
  35. package/lib/module/shared/components/screen-lifecycle.js +9 -132
  36. package/lib/module/shared/components/screen-lifecycle.js.map +1 -1
  37. package/lib/module/shared/constants.js +1 -0
  38. package/lib/module/shared/constants.js.map +1 -1
  39. package/lib/module/shared/hooks/animation/use-screen-animation.js +3 -0
  40. package/lib/module/shared/hooks/animation/use-screen-animation.js.map +1 -1
  41. package/lib/module/shared/hooks/lifecycle/use-close-transition.js +122 -0
  42. package/lib/module/shared/hooks/lifecycle/use-close-transition.js.map +1 -0
  43. package/lib/module/shared/hooks/lifecycle/use-open-transition.js +32 -0
  44. package/lib/module/shared/hooks/lifecycle/use-open-transition.js.map +1 -0
  45. package/lib/module/shared/hooks/lifecycle/use-screen-events.js +54 -0
  46. package/lib/module/shared/hooks/lifecycle/use-screen-events.js.map +1 -0
  47. package/lib/module/shared/hooks/navigation/use-history.js +20 -0
  48. package/lib/module/shared/hooks/navigation/use-history.js.map +1 -0
  49. package/lib/module/shared/index.js +1 -0
  50. package/lib/module/shared/index.js.map +1 -1
  51. package/lib/module/shared/providers/screen/keys.provider.js +0 -4
  52. package/lib/module/shared/providers/screen/keys.provider.js.map +1 -1
  53. package/lib/module/shared/providers/screen/screen-composer.js +7 -5
  54. package/lib/module/shared/providers/screen/screen-composer.js.map +1 -1
  55. package/lib/module/shared/providers/stack/direct.provider.js +10 -1
  56. package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
  57. package/lib/module/shared/providers/stack/managed.provider.js +10 -1
  58. package/lib/module/shared/providers/stack/managed.provider.js.map +1 -1
  59. package/lib/module/shared/stores/animation.store.js +4 -14
  60. package/lib/module/shared/stores/animation.store.js.map +1 -1
  61. package/lib/module/shared/stores/history.store.js +181 -0
  62. package/lib/module/shared/stores/history.store.js.map +1 -0
  63. package/lib/module/shared/types/stack.types.js.map +1 -1
  64. package/lib/module/shared/utils/animation/start-screen-transition.js +5 -1
  65. package/lib/module/shared/utils/animation/start-screen-transition.js.map +1 -1
  66. package/lib/module/shared/utils/bounds/index.js +19 -4
  67. package/lib/module/shared/utils/bounds/index.js.map +1 -1
  68. package/lib/typescript/blank-stack/types.d.ts +0 -3
  69. package/lib/typescript/blank-stack/types.d.ts.map +1 -1
  70. package/lib/typescript/component-stack/types.d.ts +0 -3
  71. package/lib/typescript/component-stack/types.d.ts.map +1 -1
  72. package/lib/typescript/shared/components/screen-lifecycle.d.ts +4 -1
  73. package/lib/typescript/shared/components/screen-lifecycle.d.ts.map +1 -1
  74. package/lib/typescript/shared/constants.d.ts.map +1 -1
  75. package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts.map +1 -1
  76. package/lib/typescript/shared/hooks/lifecycle/use-close-transition.d.ts +13 -0
  77. package/lib/typescript/shared/hooks/lifecycle/use-close-transition.d.ts.map +1 -0
  78. package/lib/typescript/shared/hooks/lifecycle/use-open-transition.d.ts +11 -0
  79. package/lib/typescript/shared/hooks/lifecycle/use-open-transition.d.ts.map +1 -0
  80. package/lib/typescript/shared/hooks/lifecycle/use-screen-events.d.ts +7 -0
  81. package/lib/typescript/shared/hooks/lifecycle/use-screen-events.d.ts.map +1 -0
  82. package/lib/typescript/shared/hooks/navigation/use-history.d.ts +37 -0
  83. package/lib/typescript/shared/hooks/navigation/use-history.d.ts.map +1 -0
  84. package/lib/typescript/shared/index.d.ts +3 -2
  85. package/lib/typescript/shared/index.d.ts.map +1 -1
  86. package/lib/typescript/shared/providers/screen/keys.provider.d.ts +0 -6
  87. package/lib/typescript/shared/providers/screen/keys.provider.d.ts.map +1 -1
  88. package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
  89. package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
  90. package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -1
  91. package/lib/typescript/shared/stores/animation.store.d.ts +3 -4
  92. package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
  93. package/lib/typescript/shared/stores/history.store.d.ts +82 -0
  94. package/lib/typescript/shared/stores/history.store.d.ts.map +1 -0
  95. package/lib/typescript/shared/types/animation.types.d.ts +8 -0
  96. package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
  97. package/lib/typescript/shared/types/bounds.types.d.ts +1 -1
  98. package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
  99. package/lib/typescript/shared/types/stack.types.d.ts +1 -0
  100. package/lib/typescript/shared/types/stack.types.d.ts.map +1 -1
  101. package/lib/typescript/shared/utils/animation/start-screen-transition.d.ts.map +1 -1
  102. package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
  103. package/package.json +1 -1
  104. package/src/blank-stack/types.ts +0 -8
  105. package/src/component-stack/types.ts +0 -9
  106. package/src/shared/__tests__/history.store.test.ts +550 -0
  107. package/src/shared/components/screen-lifecycle.tsx +13 -149
  108. package/src/shared/constants.ts +1 -0
  109. package/src/shared/hooks/animation/use-screen-animation.tsx +4 -0
  110. package/src/shared/hooks/lifecycle/use-close-transition.ts +147 -0
  111. package/src/shared/hooks/lifecycle/use-open-transition.ts +30 -0
  112. package/src/shared/hooks/lifecycle/use-screen-events.ts +62 -0
  113. package/src/shared/hooks/navigation/use-history.ts +63 -0
  114. package/src/shared/index.ts +1 -0
  115. package/src/shared/providers/screen/keys.provider.tsx +0 -16
  116. package/src/shared/providers/screen/screen-composer.tsx +6 -10
  117. package/src/shared/providers/stack/direct.provider.tsx +11 -1
  118. package/src/shared/providers/stack/managed.provider.tsx +11 -1
  119. package/src/shared/stores/animation.store.ts +6 -20
  120. package/src/shared/stores/history.store.ts +201 -0
  121. package/src/shared/types/animation.types.ts +9 -0
  122. package/src/shared/types/bounds.types.ts +1 -0
  123. package/src/shared/types/stack.types.ts +1 -0
  124. package/src/shared/utils/animation/start-screen-transition.ts +4 -1
  125. package/src/shared/utils/bounds/index.ts +29 -3
  126. package/lib/commonjs/shared/utils/read-shared-value.js +0 -17
  127. package/lib/commonjs/shared/utils/read-shared-value.js.map +0 -1
  128. package/lib/module/shared/utils/read-shared-value.js +0 -14
  129. package/lib/module/shared/utils/read-shared-value.js.map +0 -1
  130. package/lib/typescript/shared/utils/read-shared-value.d.ts +0 -7
  131. package/lib/typescript/shared/utils/read-shared-value.d.ts.map +0 -1
  132. package/src/shared/utils/read-shared-value.ts +0 -15
@@ -1 +1 @@
1
- {"version":3,"file":"animation.store.d.ts","sourceRoot":"","sources":["../../../../src/shared/stores/animation.store.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,WAAW,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B,CAAC;AAiBF,iBAAS,YAAY,CACpB,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,GACxC,WAAW,CAAC,MAAM,CAAC,CAErB;AAED,iBAAS,MAAM,CAAC,GAAG,EAAE,SAAS,qBAE7B;AAED,iBAAS,KAAK,CAAC,QAAQ,EAAE,SAAS,QASjC;AAED,iBAAS,cAAc,SAGtB;AAED,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC"}
1
+ {"version":3,"file":"animation.store.d.ts","sourceRoot":"","sources":["../../../../src/shared/stores/animation.store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC9B,CAAC;AAkBF,iBAAS,YAAY,CACpB,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,MAAM,iBAAiB,GAC3B,WAAW,CAAC,MAAM,CAAC,CAErB;AAED,iBAAS,MAAM,CAAC,GAAG,EAAE,SAAS,qBAE7B;AAED,iBAAS,KAAK,CAAC,QAAQ,EAAE,SAAS,QAGjC;AAED,eAAO,MAAM,cAAc;;;;CAI1B,CAAC"}
@@ -0,0 +1,82 @@
1
+ import type { ScreenKey } from "../types/screen.types";
2
+ import type { BaseStackDescriptor } from "../types/stack.types";
3
+ interface HistoryEntry {
4
+ descriptor: BaseStackDescriptor;
5
+ navigatorKey: string;
6
+ timestamp: number;
7
+ }
8
+ /**
9
+ * Subscribe for useSyncExternalStore compatibility
10
+ */
11
+ declare function subscribe(listener: () => void): () => void;
12
+ /**
13
+ * Get current snapshot for useSyncExternalStore
14
+ */
15
+ declare function getSnapshot(): ReadonlyMap<ScreenKey, HistoryEntry>;
16
+ /**
17
+ * Add or move screen to top (most recent).
18
+ * LRU behavior: if exists, delete and re-add to move to end.
19
+ * @param descriptor - The screen descriptor
20
+ * @param navigatorKey - The navigator's key (for cleanup on unmount)
21
+ * @param historyKey - Optional custom key (defaults to navigatorKey:routeName)
22
+ */
23
+ declare function focus(descriptor: BaseStackDescriptor, navigatorKey: string, historyKey?: ScreenKey): void;
24
+ /**
25
+ * Get most recent entry (for forward nav).
26
+ */
27
+ declare function getMostRecent(): HistoryEntry | undefined;
28
+ /**
29
+ * Get N most recent entries (most recent first).
30
+ */
31
+ declare function getRecent(n: number): HistoryEntry[];
32
+ /**
33
+ * Get entry by key.
34
+ */
35
+ declare function get(key: ScreenKey): HistoryEntry | undefined;
36
+ /**
37
+ * Check if key exists.
38
+ */
39
+ declare function has(key: ScreenKey): boolean;
40
+ /**
41
+ * Get all entries for a navigator (in recency order, most recent first).
42
+ */
43
+ declare function getByNavigator(navigatorKey: string): HistoryEntry[];
44
+ /**
45
+ * Get path between two screens (for multi-waypoint interpolation).
46
+ * Returns keys in order from 'from' to 'to'.
47
+ */
48
+ declare function getPath(fromKey: ScreenKey, toKey: ScreenKey): ScreenKey[];
49
+ /**
50
+ * Clear all entries for a navigator (on unmount).
51
+ */
52
+ declare function clearNavigator(navigatorKey: string): void;
53
+ /**
54
+ * Get current size of history.
55
+ */
56
+ declare function size(): number;
57
+ /**
58
+ * Convert to array (in recency order, oldest first).
59
+ */
60
+ declare function toArray(): HistoryEntry[];
61
+ /**
62
+ * Clear all history entries (for testing).
63
+ * @internal
64
+ */
65
+ declare function _reset(): void;
66
+ export declare const HistoryStore: {
67
+ focus: typeof focus;
68
+ getMostRecent: typeof getMostRecent;
69
+ getRecent: typeof getRecent;
70
+ get: typeof get;
71
+ has: typeof has;
72
+ getByNavigator: typeof getByNavigator;
73
+ getPath: typeof getPath;
74
+ clearNavigator: typeof clearNavigator;
75
+ size: typeof size;
76
+ toArray: typeof toArray;
77
+ subscribe: typeof subscribe;
78
+ getSnapshot: typeof getSnapshot;
79
+ _reset: typeof _reset;
80
+ };
81
+ export type { HistoryEntry };
82
+ //# sourceMappingURL=history.store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history.store.d.ts","sourceRoot":"","sources":["../../../../src/shared/stores/history.store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,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E,YAAY,EAAE,CAAC"}
@@ -32,6 +32,14 @@ export type ScreenTransitionState = {
32
32
  * Use this to trigger different animations when navigating back vs forward.
33
33
  */
34
34
  closing: number;
35
+ /**
36
+ * Whether this screen is in the process of entering.
37
+ * - `0`: Screen is closing or inactive
38
+ * - `1`: Screen is opening/entering
39
+ *
40
+ * Use this to trigger different animations when navigating back vs forward.
41
+ */
42
+ entering: number;
35
43
  /**
36
44
  * Whether this screen is currently animating.
37
45
  * - `0`: No animation in progress
@@ -1 +1 @@
1
- {"version":3,"file":"animation.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/animation.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,WAAW,yBAAyB;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QACR;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,MAAM,qBAAqB,GAAG;IACnC;;;;;;;OAOG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,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,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,eAAe,CAAC;CACxB"}
1
+ {"version":3,"file":"animation.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/animation.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,WAAW,yBAAyB;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE;QACR;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE,UAAU,CAAC;CACnB;AAED,MAAM,MAAM,qBAAqB,GAAG;IACnC;;;;;;;OAOG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,OAAO,EAAE,aAAa,CAAC;IAEvB;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACxC;;OAEG;IACH,QAAQ,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAE5C;;OAEG;IACH,OAAO,EAAE,qBAAqB,CAAC;IAE/B;;OAEG;IACH,IAAI,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAExC;;OAEG;IACH,OAAO,EAAE;QACR;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;KACf,CAAC;IAEF;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;;;;;OAUG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,MAAM,EAAE,qBAAqB,CAAC;IAE9B;;;OAGG;IACH,QAAQ,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAE5C;;;OAGG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,MAAM,uBAAuB,GAAG,CACrC,KAAK,EAAE,wBAAwB,KAC3B,2BAA2B,CAAC;AAEjC,MAAM,MAAM,2BAA2B,GAAG;IACzC;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAE1B;;OAEG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAE1B;;OAEG;IACH,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,KAAK,CAAC,EAAE,eAAe,CAAC;CACxB"}
@@ -22,6 +22,6 @@ export type BoundsAccessor = {
22
22
  getSnapshot: (id: string, key?: string) => Snapshot | null;
23
23
  getLink: (id: string) => BoundsLink | null;
24
24
  interpolateStyle: (id: string, property: keyof StyleProps, fallback?: number) => number;
25
- interpolateBounds: (id: string, property: keyof MeasuredDimensions, fallback?: number) => number;
25
+ interpolateBounds: (id: string, property: keyof MeasuredDimensions, fallbackOrTargetKey?: number | string, fallback?: number) => number;
26
26
  };
27
27
  //# sourceMappingURL=bounds.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bounds.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/bounds.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EACX,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,+BAA+B,CAAC;AAEvC;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAE5D,MAAM,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,CAAC,CAAC,SAAS,oBAAoB,EAAE,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAClE,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,QAAQ,GAAG,IAAI,CAAC;IAC3D,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,UAAU,GAAG,IAAI,CAAC;IAC3C,gBAAgB,EAAE,CACjB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,UAAU,EAC1B,QAAQ,CAAC,EAAE,MAAM,KACb,MAAM,CAAC;IACZ,iBA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,kBAAkB,EAClC,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,EACrC,QAAQ,CAAC,EAAE,MAAM,KACb,MAAM,CAAC;CACZ,CAAC"}
@@ -22,6 +22,7 @@ export interface BaseStackNavigation {
22
22
  };
23
23
  dispatch: (action: any) => void;
24
24
  addListener?: (event: any, callback: any) => () => void;
25
+ emit?: (event: any) => any;
25
26
  }
26
27
  /**
27
28
  * Base descriptor interface - generic over route, navigation, and options.
@@ -1 +1 @@
1
- {"version":3,"file":"stack.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/stack.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,QAAQ,EAAE,MAAM;QACf,MAAM,EAAE,KAAK,CAAC;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAC/B,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,MAAM,IAAI,CAAC;CACxD;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB,CACnC,MAAM,SAAS,cAAc,GAAG,cAAc,EAC9C,WAAW,SAAS,mBAAmB,GAAG,mBAAmB,EAC7D,QAAQ,SAAS,sBAAsB,GAAG,sBAAsB;IAEhE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,WAAW,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,CAAC,EAA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AAE,QAAQ,EAAE,GAAG,KAAK,MAAM,IAAI,CAAC;IACxD,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB,CACnC,MAAM,SAAS,cAAc,GAAG,cAAc,EAC9C,WAAW,SAAS,mBAAmB,GAAG,mBAAmB,EAC7D,QAAQ,SAAS,sBAAsB,GAAG,sBAAsB;IAEhE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,WAAW,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc,CAC9B,WAAW,SAAS,mBAAmB,GAAG,mBAAmB;IAE7D,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,UAAU,EAAE,WAAW,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc,CAC9B,MAAM,SAAS,cAAc,GAAG,cAAc;IAE9C,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,CACxB,WAAW,SAAS,mBAAmB,GAAG,mBAAmB,IAC1D;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC3B,CAAC;AAEF,oBAAY,SAAS;IACpB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,SAAS,cAAc;CACvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"start-screen-transition.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/animation/start-screen-transition.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,UAAU,0BAA0B;IACnC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,qBAAqB,GAAI,mEAMnC,0BAA0B,SA0C5B,CAAC"}
1
+ {"version":3,"file":"start-screen-transition.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/animation/start-screen-transition.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,UAAU,0BAA0B;IACnC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,qBAAqB,GAAI,mEAMnC,0BAA0B,SA6C5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACX,wBAAwB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AAkK3E,eAAO,MAAM,YAAY,GACxB,OAAO,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KAC7C,cA+EF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACX,wBAAwB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AAkK3E,eAAO,MAAM,YAAY,GACxB,OAAO,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KAC7C,cAyGF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-screen-transitions",
3
- "version": "3.2.0-beta.3",
3
+ "version": "3.2.0",
4
4
  "description": "Easy screen transitions for React Native and Expo",
5
5
  "author": "Ed",
6
6
  "license": "MIT",
@@ -12,10 +12,6 @@ import type {
12
12
  } from "@react-navigation/native";
13
13
  import type { ScreenTransitionConfig } from "../shared";
14
14
  import type { OverlayProps } from "../shared/types/overlay.types";
15
- import type {
16
- BaseStackScene,
17
- DescriptorMap,
18
- } from "../shared/types/stack.types";
19
15
 
20
16
  export type BlankStackNavigationEventMap = {};
21
17
 
@@ -55,8 +51,6 @@ export type BlankStackNavigationHelpers = NavigationHelpers<
55
51
  BlankStackNavigationEventMap
56
52
  >;
57
53
 
58
- export type BlankStackScene = BaseStackScene<BlankStackDescriptor>;
59
-
60
54
  type BlankStackNavigationConfig = {
61
55
  DISABLE_NATIVE_SCREENS?: boolean;
62
56
  };
@@ -105,5 +99,3 @@ export type BlankStackDescriptor = Descriptor<
105
99
  BlankStackNavigationProp<ParamListBase>,
106
100
  RouteProp<ParamListBase>
107
101
  >;
108
-
109
- export type BlankStackDescriptorMap = DescriptorMap<BlankStackDescriptor>;
@@ -12,10 +12,6 @@ import type {
12
12
  } from "@react-navigation/native";
13
13
  import type { ScreenTransitionConfig } from "../shared";
14
14
  import type { OverlayProps } from "../shared/types/overlay.types";
15
- import type {
16
- BaseStackScene,
17
- DescriptorMap,
18
- } from "../shared/types/stack.types";
19
15
 
20
16
  export type ComponentStackNavigationEventMap = {};
21
17
 
@@ -55,8 +51,6 @@ export type ComponentStackNavigationHelpers = NavigationHelpers<
55
51
  ComponentStackNavigationEventMap
56
52
  >;
57
53
 
58
- export type ComponentStackScene = BaseStackScene<ComponentStackDescriptor>;
59
-
60
54
  type ComponentStackNavigationConfig = {};
61
55
 
62
56
  /**
@@ -95,6 +89,3 @@ export type ComponentStackDescriptor = Descriptor<
95
89
  ComponentStackNavigationProp<ParamListBase>,
96
90
  RouteProp<ParamListBase>
97
91
  >;
98
-
99
- export type ComponentStackDescriptorMap =
100
- DescriptorMap<ComponentStackDescriptor>;