react-navigation-reanimated-top-tabs 0.2.0 → 0.4.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 (199) hide show
  1. package/README.md +5 -17
  2. package/lib/commonjs/components/ReanimatedTopTab/ReanimatedTabView.js +5 -3
  3. package/lib/commonjs/components/ReanimatedTopTab/ReanimatedTabView.js.map +1 -1
  4. package/lib/commonjs/components/elements/TabBarBaseComponent.js +6 -5
  5. package/lib/commonjs/components/elements/TabBarBaseComponent.js.map +1 -1
  6. package/lib/commonjs/components/elements/TabBarLabelBaseComponent.js +2 -4
  7. package/lib/commonjs/components/elements/TabBarLabelBaseComponent.js.map +1 -1
  8. package/lib/commonjs/components/wrappers/GestureWrapper.js +18 -26
  9. package/lib/commonjs/components/wrappers/GestureWrapper.js.map +1 -1
  10. package/lib/commonjs/components/wrappers/ScreenWrapper.js +4 -4
  11. package/lib/commonjs/components/wrappers/ScreenWrapper.js.map +1 -1
  12. package/lib/commonjs/components/wrappers/ScrollView.js +27 -16
  13. package/lib/commonjs/components/wrappers/ScrollView.js.map +1 -1
  14. package/lib/commonjs/context/Context.helpers.js +19 -0
  15. package/lib/commonjs/context/Context.helpers.js.map +1 -0
  16. package/lib/commonjs/context/Context.hooks.js +216 -0
  17. package/lib/commonjs/context/Context.hooks.js.map +1 -0
  18. package/lib/commonjs/context/Context.js +68 -0
  19. package/lib/commonjs/context/Context.js.map +1 -0
  20. package/lib/commonjs/hooks/useHeader.js +30 -0
  21. package/lib/commonjs/hooks/useHeader.js.map +1 -0
  22. package/lib/commonjs/hooks/useScreenGesture.js +21 -0
  23. package/lib/commonjs/hooks/useScreenGesture.js.map +1 -0
  24. package/lib/commonjs/hooks/useScreenProperties.js +21 -0
  25. package/lib/commonjs/hooks/useScreenProperties.js.map +1 -0
  26. package/lib/commonjs/hooks/useScreenScrollable.js +64 -0
  27. package/lib/commonjs/hooks/useScreenScrollable.js.map +1 -0
  28. package/lib/commonjs/hooks/useTabContext.js +11 -0
  29. package/lib/commonjs/hooks/useTabContext.js.map +1 -0
  30. package/lib/commonjs/hooks/useTabOffset.js +18 -0
  31. package/lib/commonjs/hooks/useTabOffset.js.map +1 -0
  32. package/lib/commonjs/index.js +34 -80
  33. package/lib/commonjs/index.js.map +1 -1
  34. package/lib/commonjs/navigator/createReanimatedTopTabNavigator.js +14 -29
  35. package/lib/commonjs/navigator/createReanimatedTopTabNavigator.js.map +1 -1
  36. package/lib/commonjs/services/Warning.service.js +16 -0
  37. package/lib/commonjs/services/Warning.service.js.map +1 -0
  38. package/lib/module/components/ReanimatedTopTab/ReanimatedTabView.js +8 -6
  39. package/lib/module/components/ReanimatedTopTab/ReanimatedTabView.js.map +1 -1
  40. package/lib/module/components/elements/TabBarBaseComponent.js +5 -4
  41. package/lib/module/components/elements/TabBarBaseComponent.js.map +1 -1
  42. package/lib/module/components/elements/TabBarLabelBaseComponent.js +2 -4
  43. package/lib/module/components/elements/TabBarLabelBaseComponent.js.map +1 -1
  44. package/lib/module/components/wrappers/GestureWrapper.js +18 -27
  45. package/lib/module/components/wrappers/GestureWrapper.js.map +1 -1
  46. package/lib/module/components/wrappers/ScreenWrapper.js +3 -3
  47. package/lib/module/components/wrappers/ScreenWrapper.js.map +1 -1
  48. package/lib/module/components/wrappers/ScrollView.js +23 -12
  49. package/lib/module/components/wrappers/ScrollView.js.map +1 -1
  50. package/lib/module/context/Context.helpers.js +15 -0
  51. package/lib/module/context/Context.helpers.js.map +1 -0
  52. package/lib/module/context/Context.hooks.js +213 -0
  53. package/lib/module/context/Context.hooks.js.map +1 -0
  54. package/lib/module/context/Context.js +64 -0
  55. package/lib/module/context/Context.js.map +1 -0
  56. package/lib/module/hooks/useHeader.js +25 -0
  57. package/lib/module/hooks/useHeader.js.map +1 -0
  58. package/lib/module/hooks/useScreenGesture.js +16 -0
  59. package/lib/module/hooks/useScreenGesture.js.map +1 -0
  60. package/lib/module/hooks/useScreenProperties.js +16 -0
  61. package/lib/module/hooks/useScreenProperties.js.map +1 -0
  62. package/lib/module/hooks/useScreenScrollable.js +57 -0
  63. package/lib/module/hooks/useScreenScrollable.js.map +1 -0
  64. package/lib/module/hooks/useTabContext.js +6 -0
  65. package/lib/module/hooks/useTabContext.js.map +1 -0
  66. package/lib/module/hooks/useTabOffset.js +12 -0
  67. package/lib/module/hooks/useTabOffset.js.map +1 -0
  68. package/lib/module/index.js +33 -8
  69. package/lib/module/index.js.map +1 -1
  70. package/lib/module/navigator/createReanimatedTopTabNavigator.js +13 -27
  71. package/lib/module/navigator/createReanimatedTopTabNavigator.js.map +1 -1
  72. package/lib/module/services/Warning.service.js +12 -0
  73. package/lib/module/services/Warning.service.js.map +1 -0
  74. package/lib/typescript/src/components/ReanimatedTopTab/AnimationHelper.d.ts.map +1 -0
  75. package/lib/typescript/src/components/ReanimatedTopTab/ReanimatedTabView.d.ts.map +1 -0
  76. package/lib/typescript/src/components/ReanimatedTopTab/types.d.ts.map +1 -0
  77. package/lib/typescript/{module/src → src}/components/elements/TabBarBaseComponent.d.ts +1 -2
  78. package/lib/typescript/src/components/elements/TabBarBaseComponent.d.ts.map +1 -0
  79. package/lib/typescript/{commonjs/src → src}/components/elements/TabBarLabelBaseComponent.d.ts +1 -2
  80. package/lib/typescript/src/components/elements/TabBarLabelBaseComponent.d.ts.map +1 -0
  81. package/lib/typescript/src/components/wrappers/GestureWrapper.d.ts +7 -0
  82. package/lib/typescript/src/components/wrappers/GestureWrapper.d.ts.map +1 -0
  83. package/lib/typescript/src/components/wrappers/ScreenWrapper.d.ts.map +1 -0
  84. package/lib/typescript/src/components/wrappers/ScrollView.d.ts +5 -0
  85. package/lib/typescript/src/components/wrappers/ScrollView.d.ts.map +1 -0
  86. package/lib/typescript/{commonjs/src/context/TopTabContext.d.ts → src/context/Context.d.ts} +2 -2
  87. package/lib/typescript/src/context/Context.d.ts.map +1 -0
  88. package/lib/typescript/src/context/Context.helpers.d.ts +4 -0
  89. package/lib/typescript/src/context/Context.helpers.d.ts.map +1 -0
  90. package/lib/typescript/src/context/Context.hooks.d.ts +15 -0
  91. package/lib/typescript/src/context/Context.hooks.d.ts.map +1 -0
  92. package/lib/typescript/src/hooks/useHeader.d.ts +10 -0
  93. package/lib/typescript/src/hooks/useHeader.d.ts.map +1 -0
  94. package/lib/typescript/src/hooks/useScreenGesture.d.ts +2 -0
  95. package/lib/typescript/src/hooks/useScreenGesture.d.ts.map +1 -0
  96. package/lib/typescript/src/hooks/useScreenProperties.d.ts +10 -0
  97. package/lib/typescript/src/hooks/useScreenProperties.d.ts.map +1 -0
  98. package/lib/typescript/src/hooks/useScreenScrollable.d.ts +14 -0
  99. package/lib/typescript/src/hooks/useScreenScrollable.d.ts.map +1 -0
  100. package/lib/typescript/src/hooks/useTabContext.d.ts +2 -0
  101. package/lib/typescript/src/hooks/useTabContext.d.ts.map +1 -0
  102. package/lib/typescript/src/hooks/useTabOffset.d.ts +2 -0
  103. package/lib/typescript/src/hooks/useTabOffset.d.ts.map +1 -0
  104. package/lib/typescript/src/index.d.ts +45 -0
  105. package/lib/typescript/src/index.d.ts.map +1 -0
  106. package/lib/typescript/src/navigator/createReanimatedTopTabNavigator.d.ts.map +1 -0
  107. package/lib/typescript/src/services/Warning.service.d.ts +5 -0
  108. package/lib/typescript/src/services/Warning.service.d.ts.map +1 -0
  109. package/lib/typescript/{module/src → src}/types.d.ts +24 -17
  110. package/lib/typescript/src/types.d.ts.map +1 -0
  111. package/package.json +24 -38
  112. package/src/components/ReanimatedTopTab/ReanimatedTabView.tsx +7 -6
  113. package/src/components/elements/TabBarBaseComponent.tsx +7 -3
  114. package/src/components/elements/TabBarLabelBaseComponent.tsx +4 -3
  115. package/src/components/wrappers/GestureWrapper.tsx +27 -29
  116. package/src/components/wrappers/ScreenWrapper.tsx +4 -3
  117. package/src/components/wrappers/ScrollView.tsx +33 -19
  118. package/src/context/Context.helpers.tsx +10 -0
  119. package/src/context/Context.hooks.ts +253 -0
  120. package/src/context/Context.tsx +69 -0
  121. package/src/hooks/useHeader.ts +30 -0
  122. package/src/hooks/useScreenGesture.ts +13 -0
  123. package/src/hooks/useScreenProperties.ts +11 -0
  124. package/src/hooks/useScreenScrollable.ts +69 -0
  125. package/src/hooks/useTabContext.ts +4 -0
  126. package/src/hooks/useTabOffset.ts +8 -0
  127. package/src/index.tsx +34 -10
  128. package/src/navigator/createReanimatedTopTabNavigator.tsx +8 -32
  129. package/src/services/Warning.service.ts +11 -0
  130. package/src/types.ts +23 -19
  131. package/lib/commonjs/context/TopTabContext.hooks.js +0 -48
  132. package/lib/commonjs/context/TopTabContext.hooks.js.map +0 -1
  133. package/lib/commonjs/context/TopTabContext.js +0 -86
  134. package/lib/commonjs/context/TopTabContext.js.map +0 -1
  135. package/lib/commonjs/hooks/TopTab.hooks.js +0 -120
  136. package/lib/commonjs/hooks/TopTab.hooks.js.map +0 -1
  137. package/lib/module/context/TopTabContext.hooks.js +0 -44
  138. package/lib/module/context/TopTabContext.hooks.js.map +0 -1
  139. package/lib/module/context/TopTabContext.js +0 -82
  140. package/lib/module/context/TopTabContext.js.map +0 -1
  141. package/lib/module/hooks/TopTab.hooks.js +0 -110
  142. package/lib/module/hooks/TopTab.hooks.js.map +0 -1
  143. package/lib/typescript/commonjs/src/components/ReanimatedTopTab/AnimationHelper.d.ts.map +0 -1
  144. package/lib/typescript/commonjs/src/components/ReanimatedTopTab/ReanimatedTabView.d.ts.map +0 -1
  145. package/lib/typescript/commonjs/src/components/ReanimatedTopTab/types.d.ts.map +0 -1
  146. package/lib/typescript/commonjs/src/components/elements/TabBarBaseComponent.d.ts +0 -24
  147. package/lib/typescript/commonjs/src/components/elements/TabBarBaseComponent.d.ts.map +0 -1
  148. package/lib/typescript/commonjs/src/components/elements/TabBarLabelBaseComponent.d.ts.map +0 -1
  149. package/lib/typescript/commonjs/src/components/wrappers/GestureWrapper.d.ts +0 -2
  150. package/lib/typescript/commonjs/src/components/wrappers/GestureWrapper.d.ts.map +0 -1
  151. package/lib/typescript/commonjs/src/components/wrappers/ScreenWrapper.d.ts.map +0 -1
  152. package/lib/typescript/commonjs/src/components/wrappers/ScrollView.d.ts +0 -6
  153. package/lib/typescript/commonjs/src/components/wrappers/ScrollView.d.ts.map +0 -1
  154. package/lib/typescript/commonjs/src/context/TopTabContext.d.ts.map +0 -1
  155. package/lib/typescript/commonjs/src/context/TopTabContext.hooks.d.ts +0 -5
  156. package/lib/typescript/commonjs/src/context/TopTabContext.hooks.d.ts.map +0 -1
  157. package/lib/typescript/commonjs/src/hooks/TopTab.hooks.d.ts +0 -33
  158. package/lib/typescript/commonjs/src/hooks/TopTab.hooks.d.ts.map +0 -1
  159. package/lib/typescript/commonjs/src/index.d.ts +0 -10
  160. package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
  161. package/lib/typescript/commonjs/src/navigator/createReanimatedTopTabNavigator.d.ts.map +0 -1
  162. package/lib/typescript/commonjs/src/types.d.ts +0 -56
  163. package/lib/typescript/commonjs/src/types.d.ts.map +0 -1
  164. package/lib/typescript/module/src/components/ReanimatedTopTab/AnimationHelper.d.ts +0 -11
  165. package/lib/typescript/module/src/components/ReanimatedTopTab/AnimationHelper.d.ts.map +0 -1
  166. package/lib/typescript/module/src/components/ReanimatedTopTab/ReanimatedTabView.d.ts +0 -14
  167. package/lib/typescript/module/src/components/ReanimatedTopTab/ReanimatedTabView.d.ts.map +0 -1
  168. package/lib/typescript/module/src/components/ReanimatedTopTab/types.d.ts +0 -30
  169. package/lib/typescript/module/src/components/ReanimatedTopTab/types.d.ts.map +0 -1
  170. package/lib/typescript/module/src/components/elements/TabBarBaseComponent.d.ts.map +0 -1
  171. package/lib/typescript/module/src/components/elements/TabBarLabelBaseComponent.d.ts +0 -8
  172. package/lib/typescript/module/src/components/elements/TabBarLabelBaseComponent.d.ts.map +0 -1
  173. package/lib/typescript/module/src/components/wrappers/GestureWrapper.d.ts +0 -2
  174. package/lib/typescript/module/src/components/wrappers/GestureWrapper.d.ts.map +0 -1
  175. package/lib/typescript/module/src/components/wrappers/ScreenWrapper.d.ts +0 -6
  176. package/lib/typescript/module/src/components/wrappers/ScreenWrapper.d.ts.map +0 -1
  177. package/lib/typescript/module/src/components/wrappers/ScrollView.d.ts +0 -6
  178. package/lib/typescript/module/src/components/wrappers/ScrollView.d.ts.map +0 -1
  179. package/lib/typescript/module/src/context/TopTabContext.d.ts +0 -4
  180. package/lib/typescript/module/src/context/TopTabContext.d.ts.map +0 -1
  181. package/lib/typescript/module/src/context/TopTabContext.hooks.d.ts +0 -5
  182. package/lib/typescript/module/src/context/TopTabContext.hooks.d.ts.map +0 -1
  183. package/lib/typescript/module/src/hooks/TopTab.hooks.d.ts +0 -33
  184. package/lib/typescript/module/src/hooks/TopTab.hooks.d.ts.map +0 -1
  185. package/lib/typescript/module/src/index.d.ts +0 -10
  186. package/lib/typescript/module/src/index.d.ts.map +0 -1
  187. package/lib/typescript/module/src/navigator/createReanimatedTopTabNavigator.d.ts +0 -4
  188. package/lib/typescript/module/src/navigator/createReanimatedTopTabNavigator.d.ts.map +0 -1
  189. package/lib/typescript/module/src/types.d.ts.map +0 -1
  190. package/src/context/TopTabContext.hooks.ts +0 -55
  191. package/src/context/TopTabContext.tsx +0 -115
  192. package/src/hooks/TopTab.hooks.ts +0 -112
  193. /package/lib/{typescript/commonjs → commonjs}/package.json +0 -0
  194. /package/lib/{typescript/module → module}/package.json +0 -0
  195. /package/lib/typescript/{commonjs/src → src}/components/ReanimatedTopTab/AnimationHelper.d.ts +0 -0
  196. /package/lib/typescript/{commonjs/src → src}/components/ReanimatedTopTab/ReanimatedTabView.d.ts +0 -0
  197. /package/lib/typescript/{commonjs/src → src}/components/ReanimatedTopTab/types.d.ts +0 -0
  198. /package/lib/typescript/{commonjs/src → src}/components/wrappers/ScreenWrapper.d.ts +0 -0
  199. /package/lib/typescript/{commonjs/src → src}/navigator/createReanimatedTopTabNavigator.d.ts +0 -0
@@ -1,110 +0,0 @@
1
- "use strict";
2
-
3
- import { useRoute } from '@react-navigation/native';
4
- import { Context } from "../context/TopTabContext.js";
5
- import { useContext } from 'react';
6
- import { useAnimatedProps, useAnimatedScrollHandler, useAnimatedStyle, useDerivedValue, withTiming } from 'react-native-reanimated';
7
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
8
- import { useWindowDimensions } from 'react-native';
9
- export const useTabContext = () => useContext(Context);
10
- export const useScreenGesture = () => {
11
- const {
12
- key
13
- } = useRoute();
14
- const {
15
- screenProperties
16
- } = useTabContext();
17
- const nativeRef = screenProperties[key]?.nativeGesture;
18
- if (!nativeRef) throw 'GestureRef does not exist for this route';
19
- return nativeRef;
20
- };
21
- export const useScreenScrollable = () => {
22
- const {
23
- key
24
- } = useRoute();
25
- const {
26
- height
27
- } = useWindowDimensions();
28
- const {
29
- bottom
30
- } = useSafeAreaInsets();
31
- const {
32
- currentYPosition,
33
- gestureEnabled,
34
- headerHeight,
35
- screenProperties,
36
- topTabHeight,
37
- transformationY
38
- } = useTabContext();
39
-
40
- //TODO: Navigation header hook is available if Tabs are rendered inside the Stack (createNavigationStack())
41
- //useHeaderHeight();
42
- const navigationHeader = 50;
43
- const animatedProps = useAnimatedProps(() => ({
44
- scrollEnabled: !gestureEnabled.value || currentYPosition.value === -headerHeight.value
45
- }));
46
- const onScroll = useAnimatedScrollHandler(({
47
- contentOffset
48
- }) => {
49
- const scrollPosition = screenProperties[key]?.scrollY;
50
- if (!scrollPosition) throw 'ScrollPosition property does not exist for this route';
51
- scrollPosition.value = contentOffset.y;
52
- });
53
- const oppositeHeaderState = useDerivedValue(() => transformationY.value >= 0 ? headerHeight.value : 0);
54
- const style = useAnimatedStyle(() => ({
55
- minHeight: height - topTabHeight.value - oppositeHeaderState.value - navigationHeader
56
- }));
57
- return {
58
- animatedProps,
59
- bounces: false,
60
- contentContainerStyle: {
61
- paddingBottom: bottom
62
- },
63
- onScroll,
64
- style
65
- };
66
- };
67
- export const useScreenProperties = () => {
68
- const {
69
- key
70
- } = useRoute();
71
- const {
72
- screenProperties
73
- } = useTabContext();
74
- const screen = screenProperties[key];
75
- if (!screen) throw 'No screen properties registered for this route';
76
- return screen;
77
- };
78
- export const useHeader = () => {
79
- const {
80
- headerHeight,
81
- transformationX
82
- } = useTabContext();
83
- const hideHeader = () => {
84
- transformationX.value = withTiming(-headerHeight.value);
85
- };
86
- return {
87
- hideHeader
88
- };
89
- };
90
- export const useScreenRefs = keys => {
91
- const refs = {
92
- current: keys.reduce((prev, key) => ({
93
- ...prev,
94
- [key]: {
95
- current: null
96
- }
97
- }), {})
98
- };
99
- const setRef = (key, ref) => {
100
- refs.current = {
101
- ...refs.current,
102
- [key]: ref
103
- };
104
- };
105
- return {
106
- setRef,
107
- refs
108
- };
109
- };
110
- //# sourceMappingURL=TopTab.hooks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useRoute","Context","useContext","useAnimatedProps","useAnimatedScrollHandler","useAnimatedStyle","useDerivedValue","withTiming","useSafeAreaInsets","useWindowDimensions","useTabContext","useScreenGesture","key","screenProperties","nativeRef","nativeGesture","useScreenScrollable","height","bottom","currentYPosition","gestureEnabled","headerHeight","topTabHeight","transformationY","navigationHeader","animatedProps","scrollEnabled","value","onScroll","contentOffset","scrollPosition","scrollY","y","oppositeHeaderState","style","minHeight","bounces","contentContainerStyle","paddingBottom","useScreenProperties","screen","useHeader","transformationX","hideHeader","useScreenRefs","keys","refs","current","reduce","prev","setRef","ref"],"sourceRoot":"../../../src","sources":["hooks/TopTab.hooks.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,SAASC,OAAO,QAAQ,6BAA0B;AAClD,SAASC,UAAU,QAAQ,OAAO;AAClC,SACEC,gBAAgB,EAChBC,wBAAwB,EACxBC,gBAAgB,EAChBC,eAAe,EACfC,UAAU,QACL,yBAAyB;AAChC,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,mBAAmB,QAAQ,cAAc;AAElD,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAMR,UAAU,CAACD,OAAO,CAAC;AAEtD,OAAO,MAAMU,gBAAgB,GAAGA,CAAA,KAAM;EACpC,MAAM;IAAEC;EAAI,CAAC,GAAGZ,QAAQ,CAAC,CAAC;EAC1B,MAAM;IAAEa;EAAiB,CAAC,GAAGH,aAAa,CAAC,CAAC;EAE5C,MAAMI,SAAS,GAAGD,gBAAgB,CAACD,GAAG,CAAC,EAAEG,aAAa;EAEtD,IAAI,CAACD,SAAS,EAAE,MAAM,0CAA0C;EAEhE,OAAOA,SAAS;AAClB,CAAC;AAED,OAAO,MAAME,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAM;IAAEJ;EAAI,CAAC,GAAGZ,QAAQ,CAAC,CAAC;EAC1B,MAAM;IAAEiB;EAAO,CAAC,GAAGR,mBAAmB,CAAC,CAAC;EACxC,MAAM;IAAES;EAAO,CAAC,GAAGV,iBAAiB,CAAC,CAAC;EACtC,MAAM;IACJW,gBAAgB;IAChBC,cAAc;IACdC,YAAY;IACZR,gBAAgB;IAChBS,YAAY;IACZC;EACF,CAAC,GAAGb,aAAa,CAAC,CAAC;;EAEnB;EACA;EACA,MAAMc,gBAAgB,GAAG,EAAE;EAE3B,MAAMC,aAAa,GAAGtB,gBAAgB,CAAC,OAAO;IAC5CuB,aAAa,EACX,CAACN,cAAc,CAACO,KAAK,IAAIR,gBAAgB,CAACQ,KAAK,KAAK,CAACN,YAAY,CAACM;EACtE,CAAC,CAAC,CAAC;EAEH,MAAMC,QAAQ,GAAGxB,wBAAwB,CAAC,CAAC;IAAEyB;EAAc,CAAC,KAAK;IAC/D,MAAMC,cAAc,GAAGjB,gBAAgB,CAACD,GAAG,CAAC,EAAEmB,OAAO;IACrD,IAAI,CAACD,cAAc,EACjB,MAAM,uDAAuD;IAC/DA,cAAc,CAACH,KAAK,GAAGE,aAAa,CAACG,CAAC;EACxC,CAAC,CAAC;EAEF,MAAMC,mBAAmB,GAAG3B,eAAe,CAAC,MAC1CiB,eAAe,CAACI,KAAK,IAAI,CAAC,GAAGN,YAAY,CAACM,KAAK,GAAG,CACpD,CAAC;EAED,MAAMO,KAAK,GAAG7B,gBAAgB,CAAC,OAAO;IACpC8B,SAAS,EACPlB,MAAM,GACNK,YAAY,CAACK,KAAK,GAClBM,mBAAmB,CAACN,KAAK,GACzBH;EACJ,CAAC,CAAC,CAAC;EAEH,OAAO;IACLC,aAAa;IACbW,OAAO,EAAE,KAAK;IACdC,qBAAqB,EAAE;MAAEC,aAAa,EAAEpB;IAAO,CAAC;IAChDU,QAAQ;IACRM;EACF,CAAC;AACH,CAAC;AAED,OAAO,MAAMK,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAM;IAAE3B;EAAI,CAAC,GAAGZ,QAAQ,CAAC,CAAC;EAC1B,MAAM;IAAEa;EAAiB,CAAC,GAAGH,aAAa,CAAC,CAAC;EAC5C,MAAM8B,MAAM,GAAG3B,gBAAgB,CAACD,GAAG,CAAC;EACpC,IAAI,CAAC4B,MAAM,EAAE,MAAM,gDAAgD;EAEnE,OAAOA,MAAM;AACf,CAAC;AAED,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEpB,YAAY;IAAEqB;EAAgB,CAAC,GAAGhC,aAAa,CAAC,CAAC;EAEzD,MAAMiC,UAAU,GAAGA,CAAA,KAAM;IACvBD,eAAe,CAACf,KAAK,GAAGpB,UAAU,CAAC,CAACc,YAAY,CAACM,KAAK,CAAC;EACzD,CAAC;EAED,OAAO;IAAEgB;EAAW,CAAC;AACvB,CAAC;AAED,OAAO,MAAMC,aAAa,GAAIC,IAAc,IAAK;EAC/C,MAAMC,IAAI,GAAG;IACXC,OAAO,EAAEF,IAAI,CAACG,MAAM,CAClB,CAACC,IAAI,EAAErC,GAAG,MAAM;MACd,GAAGqC,IAAI;MACP,CAACrC,GAAG,GAAG;QAAEmC,OAAO,EAAE;MAAK;IACzB,CAAC,CAAC,EACF,CAAC,CACH;EACF,CAAC;EAED,MAAMG,MAAM,GAAGA,CAACtC,GAAW,EAAEuC,GAAQ,KAAK;IACxCL,IAAI,CAACC,OAAO,GAAG;MAAE,GAAGD,IAAI,CAACC,OAAO;MAAE,CAACnC,GAAG,GAAGuC;IAAI,CAAC;EAChD,CAAC;EAED,OAAO;IAAED,MAAM;IAAEJ;EAAK,CAAC;AACzB,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnimationHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ReanimatedTopTab/AnimationHelper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAkFtD,eAAO,MAAM,eAAe;0BALC,MAAM;sBA1E1B,kBAAkB,CACvB,6BAA6B,GAAG,4BAA4B,CAC7D,kBACe,MAAM,SACf,MAAM,mBACI,sBAAsB,CAAC,eAAe;mBA6BhD,uBAAuB,CAAC,6BAA6B,CAAC,4BACnC,MAAM,SACzB,MAAM,mBACI,sBAAsB,CAAC,eAAe;;;;CA8CxD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReanimatedTabView.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ReanimatedTopTab/ReanimatedTabView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAiBvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,WAAW,sBAAsB;IACrC,eAAe,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,eAAe,EAAE,sBAAsB,CAAC,eAAe,CAAC;IACxD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,sBAAsB,CAAC,qBAAqB,CAAC;IACrE,WAAW,EAAE,CAAC,MAAM,EAAE,sBAAsB,CAAC,UAAU,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5E,YAAY,CAAC,EAAE,CACb,MAAM,EAAE,sBAAsB,CAAC,gBAAgB,KAC5C,KAAK,CAAC,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,oDA6J7B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ReanimatedTopTab/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,yBAAiB,sBAAsB,CAAC;IACtC,UAAiB,KAAK;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;QACpC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAED,KAAY,eAAe,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,EAAE,CAAA;KAAE,CAAC;IAEjE,UAAiB,gBAAgB;QAC/B,eAAe,EAAE,eAAe,CAAC;QACjC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;KAC/B;IAED,UAAiB,UAAU;QACzB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAC/B,KAAK,EAAE,KAAK,CAAC;KACd;IAED,UAAiB,cAAc;QAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;KAChC;IAED,KAAY,qBAAqB,GAAG;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAC3E"}
@@ -1,24 +0,0 @@
1
- import * as React from 'react';
2
- import { type AnimatedStyle, type SharedValue } from 'react-native-reanimated';
3
- export interface Route {
4
- key: string;
5
- name?: string;
6
- tabBarLabel?: () => React.ReactNode;
7
- title?: string;
8
- }
9
- export type NavigationState = {
10
- index: number;
11
- routes: Route[];
12
- };
13
- export interface RenderTabsParams {
14
- navigationState: NavigationState;
15
- position: SharedValue<number>;
16
- }
17
- interface TabBarProps extends RenderTabsParams {
18
- children?: React.ReactNode;
19
- navigate: (route: Route) => void;
20
- style?: AnimatedStyle;
21
- }
22
- export declare const TabBarBaseComponent: ({ children, navigate, navigationState, position, style, }: TabBarProps) => import("react/jsx-runtime").JSX.Element;
23
- export {};
24
- //# sourceMappingURL=TabBarBaseComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabBarBaseComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/elements/TabBarBaseComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAmB,EACjB,KAAK,aAAa,EAElB,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,EAAE,CAAA;CAAE,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED,UAAU,WAAY,SAAQ,gBAAgB;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,8DAM7B,WAAW,4CA8Cb,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabBarLabelBaseComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/elements/TabBarLabelBaseComponent.tsx"],"names":[],"mappings":"AAOA,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,wBAAwB,wBAGlC,gBAAgB,4CAgClB,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const GestureWrapper: ({ children }: any) => import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=GestureWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GestureWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wrappers/GestureWrapper.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc,iBAAkB,GAAG,4CAwH/C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScreenWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wrappers/ScreenWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACtE,OAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGzE,MAAM,WAAW,kBACf,SAAQ,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CAAG;AAEvD,eAAO,MAAM,aAAa,+BAGvB,kBAAkB,4CAepB,CAAC"}
@@ -1,6 +0,0 @@
1
- import { type ScrollViewProps } from 'react-native';
2
- import { type AnimatedProps } from 'react-native-reanimated';
3
- export interface ScreenWrapperProps extends AnimatedProps<Omit<ScrollViewProps, 'onScroll'>> {
4
- }
5
- export declare const ScrollView: ({ children, style, ...props }: ScreenWrapperProps) => import("react/jsx-runtime").JSX.Element;
6
- //# sourceMappingURL=ScrollView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wrappers/ScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AAEtB,OAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAUzE,MAAM,WAAW,kBACf,SAAQ,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CAAG;AAE7D,eAAO,MAAM,UAAU,kCAIpB,kBAAkB,4CA6BpB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopTabContext.d.ts","sourceRoot":"","sources":["../../../../../src/context/TopTabContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAY3D,eAAO,MAAM,OAAO,iEAEnB,CAAC;AAEF,eAAO,MAAM,QAAQ,gFAKhB,0BAA0B,CAAC,kBAAkB,6CA6FjD,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { ReanimatedTopTabNavigation } from 'react-navigation-reanimated-top-tabs';
2
- export declare const TopTabContextHooks: {
3
- useResetApproachingScreenScrollOffset: ({ screenRefs, transformationX, screenProperties, currentYPosition, }: Pick<ReanimatedTopTabNavigation.ContextType, "screenRefs" | "screenProperties" | "currentYPosition" | "transformationX">) => void;
4
- };
5
- //# sourceMappingURL=TopTabContext.hooks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopTabContext.hooks.d.ts","sourceRoot":"","sources":["../../../../../src/context/TopTabContext.hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAmDvF,eAAO,MAAM,kBAAkB;kHA5C5B,IAAI,CACL,0BAA0B,CAAC,WAAW,EACtC,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,iBAAiB,CAC3E;CA2CA,CAAC"}
@@ -1,33 +0,0 @@
1
- export declare const useTabContext: () => import("..").ReanimatedTopTabNavigation.ContextType;
2
- export declare const useScreenGesture: () => import("react-native-gesture-handler/lib/typescript/handlers/gestures/nativeGesture").NativeGesture;
3
- export declare const useScreenScrollable: () => {
4
- animatedProps: Partial<{
5
- scrollEnabled: boolean;
6
- }>;
7
- bounces: boolean;
8
- contentContainerStyle: {
9
- paddingBottom: number;
10
- };
11
- onScroll: import("react-native-reanimated").ScrollHandlerProcessed<Record<string, unknown>>;
12
- style: {
13
- minHeight: number;
14
- };
15
- };
16
- export declare const useScreenProperties: () => {
17
- innerLayout: import("react-native-reanimated").SharedValue<import("react-native").LayoutRectangle>;
18
- nativeGesture: import("react-native-gesture-handler").NativeGesture;
19
- outerLayout: import("react-native-reanimated").SharedValue<import("react-native").LayoutRectangle>;
20
- scrollY: import("react-native-reanimated").SharedValue<number>;
21
- };
22
- export declare const useHeader: () => {
23
- hideHeader: () => void;
24
- };
25
- export declare const useScreenRefs: (keys: string[]) => {
26
- setRef: (key: string, ref: any) => void;
27
- refs: {
28
- current: Record<string, {
29
- current: any;
30
- }>;
31
- };
32
- };
33
- //# sourceMappingURL=TopTab.hooks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopTab.hooks.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/TopTab.hooks.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa,2DAA4B,CAAC;AAEvD,eAAO,MAAM,gBAAgB,2GAS5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CAgD/B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;CAO/B,CAAC;AAEF,eAAO,MAAM,SAAS;;CAQrB,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,MAAM,EAAE;kBAWrB,MAAM,OAAO,GAAG;;;qBAJD,GAAG;;;CASxC,CAAC"}
@@ -1,10 +0,0 @@
1
- export { Provider, Context } from './context/TopTabContext';
2
- export { createReanimatedTopTabNavigator } from './navigator/createReanimatedTopTabNavigator';
3
- export { ScrollView } from './components/wrappers/ScrollView';
4
- export { ScreenWrapper } from './components/wrappers/ScreenWrapper';
5
- export { GestureWrapper } from './components/wrappers/GestureWrapper';
6
- export { TabBarBaseComponent } from './components/elements/TabBarBaseComponent';
7
- export { TabBarLabelBaseComponent } from './components/elements/TabBarLabelBaseComponent';
8
- export { useTabContext, useHeader, useScreenProperties, useScreenScrollable, useScreenGesture, } from './hooks/TopTab.hooks';
9
- export { type ReanimatedTopTabNavigation } from './types';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EACL,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createReanimatedTopTabNavigator.d.ts","sourceRoot":"","sources":["../../../../../src/navigator/createReanimatedTopTabNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,kBAAkB,EAGxB,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAwK3D,eAAO,MAAM,+BAA+B,GAC1C,MAAM,SAAS,aAAa,+OAvJ3B,0BAA0B,CAAC,qBAAqB,6CA8J5B,CAAC"}
@@ -1,56 +0,0 @@
1
- import { TabBarBaseComponent } from './components/elements/TabBarBaseComponent';
2
- import * as React from 'react';
3
- import { type ReactNode } from 'react';
4
- import { type LayoutRectangle } from 'react-native';
5
- import { type NativeGesture } from 'react-native-gesture-handler';
6
- import { type SharedValue } from 'react-native-reanimated';
7
- import { type StackNavigationOptions } from '@react-navigation/stack';
8
- export declare namespace ReanimatedTopTabNavigation {
9
- interface ContextType {
10
- screenRefs: {
11
- refs: {
12
- current: Record<string, {
13
- current: any;
14
- }>;
15
- };
16
- setRef(key: string, ref: any): void;
17
- };
18
- closeOffset: SharedValue<number>;
19
- config: string[];
20
- currentScreenIndex: SharedValue<number>;
21
- currentYPosition: SharedValue<number>;
22
- gestureEnabled: SharedValue<boolean>;
23
- headerHeight: SharedValue<number>;
24
- navHeight: SharedValue<number>;
25
- screenProperties: Record<string, {
26
- innerLayout: SharedValue<LayoutRectangle>;
27
- nativeGesture: NativeGesture;
28
- outerLayout: SharedValue<LayoutRectangle>;
29
- scrollY: SharedValue<number>;
30
- }>;
31
- topTabHeight: SharedValue<number>;
32
- topTapNativeRef: NativeGesture;
33
- transformationX: SharedValue<number>;
34
- transformationY: SharedValue<number>;
35
- }
36
- interface TabViewNavigatorProps {
37
- HeaderComponent?: React.ComponentType<Pick<ContextType, 'transformationY' | 'headerHeight'>>;
38
- TabBarComponent?: typeof TabBarBaseComponent;
39
- children: ReactNode;
40
- config?: string[];
41
- initialRouteName?: string;
42
- screenOptions?: StackNavigationOptions;
43
- }
44
- type TopTabContextProps = Pick<ContextType, 'screenProperties' | 'config'> & {
45
- children: (props: ContextType) => React.ReactNode;
46
- };
47
- interface NavigationOptions {
48
- tabBarLabel?: (props: {
49
- focused: boolean;
50
- index: number;
51
- title: string;
52
- }) => React.ReactNode;
53
- title?: string;
54
- }
55
- }
56
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEtE,yBAAiB,0BAA0B,CAAC;IAC1C,UAAiB,WAAW;QAC1B,UAAU,EAAE;YACV,IAAI,EAAE;gBAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;oBAAE,OAAO,EAAE,GAAG,CAAA;iBAAE,CAAC,CAAA;aAAE,CAAC;YACpD,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;SACrC,CAAC;QACF,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACjC,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACxC,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACtC,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;QACrC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QAC/B,gBAAgB,EAAE,MAAM,CACtB,MAAM,EACN;YACE,WAAW,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;YAC1C,aAAa,EAAE,aAAa,CAAC;YAC7B,WAAW,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;YAC1C,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;SAC9B,CACF,CAAC;QACF,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,eAAe,EAAE,aAAa,CAAC;QAC/B,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACrC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;KACtC;IAED,UAAiB,qBAAqB;QACpC,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CACnC,IAAI,CAAC,WAAW,EAAE,iBAAiB,GAAG,cAAc,CAAC,CACtD,CAAC;QACF,eAAe,CAAC,EAAE,OAAO,mBAAmB,CAAC;QAC7C,QAAQ,EAAE,SAAS,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,aAAa,CAAC,EAAE,sBAAsB,CAAC;KACxC;IAED,KAAY,kBAAkB,GAAG,IAAI,CACnC,WAAW,EACX,kBAAkB,GAAG,QAAQ,CAC9B,GAAG;QACF,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,KAAK,CAAC,SAAS,CAAC;KACnD,CAAC;IAEF,UAAiB,iBAAiB;QAChC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;YACpB,OAAO,EAAE,OAAO,CAAC;YACjB,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;SACf,KAAK,KAAK,CAAC,SAAS,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;CACF"}
@@ -1,11 +0,0 @@
1
- import type { GestureStateChangeEvent, GestureUpdateEvent, PanGestureChangeEventPayload, PanGestureHandlerEventPayload } from 'react-native-gesture-handler';
2
- import type { ReanimatedTabViewTypes } from './types';
3
- export declare const AnimationHelper: {
4
- animation: (newValue: number, duration?: number) => number;
5
- onChange: (event: GestureUpdateEvent<PanGestureHandlerEventPayload & PanGestureChangeEventPayload>, animationValue: number, width: number, navigationState: ReanimatedTabViewTypes.NavigationState) => number;
6
- onEnd: (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>, minimumValueToChangeView: number, width: number, navigationState: ReanimatedTabViewTypes.NavigationState) => {
7
- index: number;
8
- value: number;
9
- };
10
- };
11
- //# sourceMappingURL=AnimationHelper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnimationHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ReanimatedTopTab/AnimationHelper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAkFtD,eAAO,MAAM,eAAe;0BALC,MAAM;sBA1E1B,kBAAkB,CACvB,6BAA6B,GAAG,4BAA4B,CAC7D,kBACe,MAAM,SACf,MAAM,mBACI,sBAAsB,CAAC,eAAe;mBA6BhD,uBAAuB,CAAC,6BAA6B,CAAC,4BACnC,MAAM,SACzB,MAAM,mBACI,sBAAsB,CAAC,eAAe;;;;CA8CxD,CAAC"}
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import type { ReanimatedTabViewTypes } from './types';
3
- export interface ReanimatedTabViewProps {
4
- LazyPlaceholder?: () => React.ReactNode;
5
- lazy?: boolean;
6
- navigationState: ReanimatedTabViewTypes.NavigationState;
7
- onIndexChange: (index: number) => void;
8
- percentageTrigger?: number;
9
- positionInterpolation?: ReanimatedTabViewTypes.PositionInterpolation;
10
- renderScene: (params: ReanimatedTabViewTypes.SceneProps) => React.ReactNode;
11
- renderTabBar?: (params: ReanimatedTabViewTypes.RenderTabsParams) => React.ReactNode;
12
- }
13
- export declare const ReanimatedTabView: React.NamedExoticComponent<ReanimatedTabViewProps>;
14
- //# sourceMappingURL=ReanimatedTabView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReanimatedTabView.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ReanimatedTopTab/ReanimatedTabView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAiBvE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,WAAW,sBAAsB;IACrC,eAAe,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,eAAe,EAAE,sBAAsB,CAAC,eAAe,CAAC;IACxD,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,sBAAsB,CAAC,qBAAqB,CAAC;IACrE,WAAW,EAAE,CAAC,MAAM,EAAE,sBAAsB,CAAC,UAAU,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5E,YAAY,CAAC,EAAE,CACb,MAAM,EAAE,sBAAsB,CAAC,gBAAgB,KAC5C,KAAK,CAAC,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,oDA6J7B,CAAC"}
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import type { SharedValue } from 'react-native-reanimated';
3
- export declare namespace ReanimatedTabViewTypes {
4
- interface Route {
5
- key: string;
6
- name: string;
7
- tabBarLabel?: () => React.ReactNode;
8
- title?: string;
9
- }
10
- type NavigationState = {
11
- index: number;
12
- routes: Route[];
13
- };
14
- interface RenderTabsParams {
15
- navigationState: NavigationState;
16
- position: SharedValue<number>;
17
- }
18
- interface SceneProps {
19
- jumpTo?: (key: string) => void;
20
- route: Route;
21
- }
22
- interface SceneMapRoutes {
23
- [key: string]: React.ReactNode;
24
- }
25
- type PositionInterpolation = {
26
- input: number[];
27
- output: number[];
28
- };
29
- }
30
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ReanimatedTopTab/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,yBAAiB,sBAAsB,CAAC;IACtC,UAAiB,KAAK;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;QACpC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;IAED,KAAY,eAAe,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,EAAE,CAAA;KAAE,CAAC;IAEjE,UAAiB,gBAAgB;QAC/B,eAAe,EAAE,eAAe,CAAC;QACjC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;KAC/B;IAED,UAAiB,UAAU;QACzB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAC/B,KAAK,EAAE,KAAK,CAAC;KACd;IAED,UAAiB,cAAc;QAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;KAChC;IAED,KAAY,qBAAqB,GAAG;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAC3E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabBarBaseComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/elements/TabBarBaseComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAmB,EACjB,KAAK,aAAa,EAElB,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,EAAE,CAAA;CAAE,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,eAAe,CAAC;IACjC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED,UAAU,WAAY,SAAQ,gBAAgB;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,8DAM7B,WAAW,4CA8Cb,CAAC"}
@@ -1,8 +0,0 @@
1
- interface TabBarLabelTypes {
2
- focused: boolean;
3
- index: number;
4
- title: string;
5
- }
6
- export declare const TabBarLabelBaseComponent: ({ index, ...props }: TabBarLabelTypes) => import("react/jsx-runtime").JSX.Element;
7
- export {};
8
- //# sourceMappingURL=TabBarLabelBaseComponent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TabBarLabelBaseComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/elements/TabBarLabelBaseComponent.tsx"],"names":[],"mappings":"AAOA,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,wBAAwB,wBAGlC,gBAAgB,4CAgClB,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const GestureWrapper: ({ children }: any) => import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=GestureWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GestureWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wrappers/GestureWrapper.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc,iBAAkB,GAAG,4CAwH/C,CAAC"}
@@ -1,6 +0,0 @@
1
- import { type ViewProps } from 'react-native';
2
- import { type AnimatedProps } from 'react-native-reanimated';
3
- export interface ScreenWrapperProps extends AnimatedProps<Omit<ViewProps, 'onLayout'>> {
4
- }
5
- export declare const ScreenWrapper: ({ children, ...viewProps }: ScreenWrapperProps) => import("react/jsx-runtime").JSX.Element;
6
- //# sourceMappingURL=ScreenWrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScreenWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wrappers/ScreenWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACtE,OAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGzE,MAAM,WAAW,kBACf,SAAQ,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;CAAG;AAEvD,eAAO,MAAM,aAAa,+BAGvB,kBAAkB,4CAepB,CAAC"}
@@ -1,6 +0,0 @@
1
- import { type ScrollViewProps } from 'react-native';
2
- import { type AnimatedProps } from 'react-native-reanimated';
3
- export interface ScreenWrapperProps extends AnimatedProps<Omit<ScrollViewProps, 'onScroll'>> {
4
- }
5
- export declare const ScrollView: ({ children, style, ...props }: ScreenWrapperProps) => import("react/jsx-runtime").JSX.Element;
6
- //# sourceMappingURL=ScrollView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../../../../../src/components/wrappers/ScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AAEtB,OAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAUzE,MAAM,WAAW,kBACf,SAAQ,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CAAG;AAE7D,eAAO,MAAM,UAAU,kCAIpB,kBAAkB,4CA6BpB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type ReanimatedTopTabNavigation } from '../types';
2
- export declare const Context: import("react").Context<ReanimatedTopTabNavigation.ContextType>;
3
- export declare const Provider: import("react").MemoExoticComponent<({ children, config, screenProperties, }: ReanimatedTopTabNavigation.TopTabContextProps) => import("react/jsx-runtime").JSX.Element>;
4
- //# sourceMappingURL=TopTabContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopTabContext.d.ts","sourceRoot":"","sources":["../../../../../src/context/TopTabContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAY3D,eAAO,MAAM,OAAO,iEAEnB,CAAC;AAEF,eAAO,MAAM,QAAQ,gFAKhB,0BAA0B,CAAC,kBAAkB,6CA6FjD,CAAC"}
@@ -1,5 +0,0 @@
1
- import type { ReanimatedTopTabNavigation } from 'react-navigation-reanimated-top-tabs';
2
- export declare const TopTabContextHooks: {
3
- useResetApproachingScreenScrollOffset: ({ screenRefs, transformationX, screenProperties, currentYPosition, }: Pick<ReanimatedTopTabNavigation.ContextType, "screenRefs" | "screenProperties" | "currentYPosition" | "transformationX">) => void;
4
- };
5
- //# sourceMappingURL=TopTabContext.hooks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopTabContext.hooks.d.ts","sourceRoot":"","sources":["../../../../../src/context/TopTabContext.hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAmDvF,eAAO,MAAM,kBAAkB;kHA5C5B,IAAI,CACL,0BAA0B,CAAC,WAAW,EACtC,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,iBAAiB,CAC3E;CA2CA,CAAC"}
@@ -1,33 +0,0 @@
1
- export declare const useTabContext: () => import("..").ReanimatedTopTabNavigation.ContextType;
2
- export declare const useScreenGesture: () => import("react-native-gesture-handler/lib/typescript/handlers/gestures/nativeGesture").NativeGesture;
3
- export declare const useScreenScrollable: () => {
4
- animatedProps: Partial<{
5
- scrollEnabled: boolean;
6
- }>;
7
- bounces: boolean;
8
- contentContainerStyle: {
9
- paddingBottom: number;
10
- };
11
- onScroll: import("react-native-reanimated").ScrollHandlerProcessed<Record<string, unknown>>;
12
- style: {
13
- minHeight: number;
14
- };
15
- };
16
- export declare const useScreenProperties: () => {
17
- innerLayout: import("react-native-reanimated").SharedValue<import("react-native").LayoutRectangle>;
18
- nativeGesture: import("react-native-gesture-handler").NativeGesture;
19
- outerLayout: import("react-native-reanimated").SharedValue<import("react-native").LayoutRectangle>;
20
- scrollY: import("react-native-reanimated").SharedValue<number>;
21
- };
22
- export declare const useHeader: () => {
23
- hideHeader: () => void;
24
- };
25
- export declare const useScreenRefs: (keys: string[]) => {
26
- setRef: (key: string, ref: any) => void;
27
- refs: {
28
- current: Record<string, {
29
- current: any;
30
- }>;
31
- };
32
- };
33
- //# sourceMappingURL=TopTab.hooks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopTab.hooks.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/TopTab.hooks.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,aAAa,2DAA4B,CAAC;AAEvD,eAAO,MAAM,gBAAgB,2GAS5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CAgD/B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;CAO/B,CAAC;AAEF,eAAO,MAAM,SAAS;;CAQrB,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,MAAM,EAAE;kBAWrB,MAAM,OAAO,GAAG;;;qBAJD,GAAG;;;CASxC,CAAC"}
@@ -1,10 +0,0 @@
1
- export { Provider, Context } from './context/TopTabContext';
2
- export { createReanimatedTopTabNavigator } from './navigator/createReanimatedTopTabNavigator';
3
- export { ScrollView } from './components/wrappers/ScrollView';
4
- export { ScreenWrapper } from './components/wrappers/ScreenWrapper';
5
- export { GestureWrapper } from './components/wrappers/GestureWrapper';
6
- export { TabBarBaseComponent } from './components/elements/TabBarBaseComponent';
7
- export { TabBarLabelBaseComponent } from './components/elements/TabBarLabelBaseComponent';
8
- export { useTabContext, useHeader, useScreenProperties, useScreenScrollable, useScreenGesture, } from './hooks/TopTab.hooks';
9
- export { type ReanimatedTopTabNavigation } from './types';
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EACL,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,SAAS,CAAC"}
@@ -1,4 +0,0 @@
1
- import { type ParamListBase, type TabNavigationState } from '@react-navigation/native';
2
- import { type ReanimatedTopTabNavigation } from '../types';
3
- export declare const createReanimatedTopTabNavigator: <Params extends ParamListBase>() => import("@react-navigation/core").TypedNavigator<ParamListBase, TabNavigationState<Params>, ReanimatedTopTabNavigation.NavigationOptions, {}, ({ HeaderComponent, TabBarComponent, children, config, initialRouteName, screenOptions, }: ReanimatedTopTabNavigation.TabViewNavigatorProps) => import("react/jsx-runtime").JSX.Element>;
4
- //# sourceMappingURL=createReanimatedTopTabNavigator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createReanimatedTopTabNavigator.d.ts","sourceRoot":"","sources":["../../../../../src/navigator/createReanimatedTopTabNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,kBAAkB,EAGxB,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAwK3D,eAAO,MAAM,+BAA+B,GAC1C,MAAM,SAAS,aAAa,+OAvJ3B,0BAA0B,CAAC,qBAAqB,6CA8J5B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEtE,yBAAiB,0BAA0B,CAAC;IAC1C,UAAiB,WAAW;QAC1B,UAAU,EAAE;YACV,IAAI,EAAE;gBAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;oBAAE,OAAO,EAAE,GAAG,CAAA;iBAAE,CAAC,CAAA;aAAE,CAAC;YACpD,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;SACrC,CAAC;QACF,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACjC,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACxC,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACtC,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;QACrC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QAC/B,gBAAgB,EAAE,MAAM,CACtB,MAAM,EACN;YACE,WAAW,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;YAC1C,aAAa,EAAE,aAAa,CAAC;YAC7B,WAAW,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;YAC1C,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;SAC9B,CACF,CAAC;QACF,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,eAAe,EAAE,aAAa,CAAC;QAC/B,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QACrC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;KACtC;IAED,UAAiB,qBAAqB;QACpC,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CACnC,IAAI,CAAC,WAAW,EAAE,iBAAiB,GAAG,cAAc,CAAC,CACtD,CAAC;QACF,eAAe,CAAC,EAAE,OAAO,mBAAmB,CAAC;QAC7C,QAAQ,EAAE,SAAS,CAAC;QACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,aAAa,CAAC,EAAE,sBAAsB,CAAC;KACxC;IAED,KAAY,kBAAkB,GAAG,IAAI,CACnC,WAAW,EACX,kBAAkB,GAAG,QAAQ,CAC9B,GAAG;QACF,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,KAAK,CAAC,SAAS,CAAC;KACnD,CAAC;IAEF,UAAiB,iBAAiB;QAChC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;YACpB,OAAO,EAAE,OAAO,CAAC;YACjB,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;SACf,KAAK,KAAK,CAAC,SAAS,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB;CACF"}
@@ -1,55 +0,0 @@
1
- import { runOnJS, useAnimatedReaction } from 'react-native-reanimated';
2
- import type { ReanimatedTopTabNavigation } from 'react-navigation-reanimated-top-tabs';
3
-
4
- const useResetApproachingScreenScrollOffset = ({
5
- screenRefs,
6
- transformationX,
7
- screenProperties,
8
- currentYPosition,
9
- }: Pick<
10
- ReanimatedTopTabNavigation.ContextType,
11
- 'screenRefs' | 'screenProperties' | 'currentYPosition' | 'transformationX'
12
- >) => {
13
- const resetApproachingScreenOffset = (
14
- index: number,
15
- shouldReset: boolean
16
- ) => {
17
- if (shouldReset) {
18
- //NOTE: use reanimated scrollTo does not work
19
- const { scrollTo } = Object.values(screenRefs.refs.current)[index]
20
- ?.current ?? { scrollTo: () => null };
21
-
22
- scrollTo({ y: 0, animated: false });
23
- }
24
- };
25
-
26
- useAnimatedReaction(
27
- () => transformationX.value,
28
- (current, previous) => {
29
- const approachingIndex = getTargetIndex(current, previous);
30
-
31
- const approachingScreenOffset =
32
- Object.values(screenProperties).map(({ scrollY }) => scrollY.value)[
33
- approachingIndex
34
- ] ?? -1;
35
-
36
- runOnJS(resetApproachingScreenOffset)(
37
- approachingIndex,
38
- approachingScreenOffset > 0 && currentYPosition.value === 0
39
- );
40
- }
41
- );
42
- };
43
-
44
- function getTargetIndex(currentValue: number, previousValue: number | null) {
45
- 'worklet';
46
- if (currentValue > (previousValue ?? 0)) {
47
- return Math.ceil(currentValue);
48
- } else {
49
- return Math.floor(currentValue);
50
- }
51
- }
52
-
53
- export const TopTabContextHooks = {
54
- useResetApproachingScreenScrollOffset,
55
- };