react-navigation-reanimated-top-tabs 0.2.0 → 0.3.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.
- package/README.md +5 -17
- package/lib/commonjs/components/elements/TabBarBaseComponent.js +2 -2
- package/lib/commonjs/components/elements/TabBarBaseComponent.js.map +1 -1
- package/lib/commonjs/components/elements/TabBarLabelBaseComponent.js +2 -2
- package/lib/commonjs/components/elements/TabBarLabelBaseComponent.js.map +1 -1
- package/lib/commonjs/components/wrappers/GestureWrapper.js +2 -2
- package/lib/commonjs/components/wrappers/GestureWrapper.js.map +1 -1
- package/lib/commonjs/components/wrappers/ScreenWrapper.js +2 -2
- package/lib/commonjs/components/wrappers/ScreenWrapper.js.map +1 -1
- package/lib/commonjs/components/wrappers/ScrollView.js +5 -5
- package/lib/commonjs/components/wrappers/ScrollView.js.map +1 -1
- package/lib/commonjs/context/{TopTabContext.hooks.js → TabContext.hooks.js} +5 -5
- package/lib/commonjs/context/TabContext.hooks.js.map +1 -0
- package/lib/commonjs/context/{TopTabContext.js → TabContext.js} +5 -5
- package/lib/commonjs/context/TabContext.js.map +1 -0
- package/lib/commonjs/hooks/{TopTab.hooks.js → Tab.hooks.js} +23 -10
- package/lib/commonjs/hooks/Tab.hooks.js.map +1 -0
- package/lib/commonjs/index.js +16 -76
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigator/createReanimatedTopTabNavigator.js +2 -2
- package/lib/commonjs/navigator/createReanimatedTopTabNavigator.js.map +1 -1
- package/lib/module/components/elements/TabBarBaseComponent.js +1 -1
- package/lib/module/components/elements/TabBarBaseComponent.js.map +1 -1
- package/lib/module/components/elements/TabBarLabelBaseComponent.js +1 -1
- package/lib/module/components/elements/TabBarLabelBaseComponent.js.map +1 -1
- package/lib/module/components/wrappers/GestureWrapper.js +1 -1
- package/lib/module/components/wrappers/GestureWrapper.js.map +1 -1
- package/lib/module/components/wrappers/ScreenWrapper.js +1 -1
- package/lib/module/components/wrappers/ScreenWrapper.js.map +1 -1
- package/lib/module/components/wrappers/ScrollView.js +1 -1
- package/lib/module/components/wrappers/ScrollView.js.map +1 -1
- package/lib/module/context/{TopTabContext.hooks.js → TabContext.hooks.js} +4 -4
- package/lib/module/context/TabContext.hooks.js.map +1 -0
- package/lib/module/context/{TopTabContext.js → TabContext.js} +4 -4
- package/lib/module/context/TabContext.js.map +1 -0
- package/lib/module/hooks/{TopTab.hooks.js → Tab.hooks.js} +20 -9
- package/lib/module/hooks/Tab.hooks.js.map +1 -0
- package/lib/module/index.js +18 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigator/createReanimatedTopTabNavigator.js +1 -1
- package/lib/module/navigator/createReanimatedTopTabNavigator.js.map +1 -1
- package/lib/typescript/commonjs/src/components/elements/TabBarBaseComponent.d.ts +1 -2
- package/lib/typescript/commonjs/src/components/elements/TabBarBaseComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/elements/TabBarLabelBaseComponent.d.ts +1 -2
- package/lib/typescript/commonjs/src/components/elements/TabBarLabelBaseComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/context/{TopTabContext.d.ts → TabContext.d.ts} +1 -1
- package/lib/typescript/commonjs/src/context/TabContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/context/{TopTabContext.hooks.d.ts → TabContext.hooks.d.ts} +2 -2
- package/lib/typescript/commonjs/src/context/TabContext.hooks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/{TopTab.hooks.d.ts → Tab.hooks.d.ts} +1 -1
- package/lib/typescript/commonjs/src/hooks/Tab.hooks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +33 -8
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/elements/TabBarBaseComponent.d.ts +1 -2
- package/lib/typescript/module/src/components/elements/TabBarBaseComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/components/elements/TabBarLabelBaseComponent.d.ts +1 -2
- package/lib/typescript/module/src/components/elements/TabBarLabelBaseComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/context/{TopTabContext.d.ts → TabContext.d.ts} +1 -1
- package/lib/typescript/module/src/context/TabContext.d.ts.map +1 -0
- package/lib/typescript/module/src/context/{TopTabContext.hooks.d.ts → TabContext.hooks.d.ts} +2 -2
- package/lib/typescript/module/src/context/TabContext.hooks.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/{TopTab.hooks.d.ts → Tab.hooks.d.ts} +1 -1
- package/lib/typescript/module/src/hooks/Tab.hooks.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +33 -8
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/elements/TabBarBaseComponent.tsx +2 -2
- package/src/components/elements/TabBarLabelBaseComponent.tsx +2 -2
- package/src/components/wrappers/GestureWrapper.tsx +1 -1
- package/src/components/wrappers/ScreenWrapper.tsx +1 -1
- package/src/components/wrappers/ScrollView.tsx +1 -1
- package/src/context/{TopTabContext.hooks.ts → TabContext.hooks.ts} +3 -3
- package/src/context/{TopTabContext.tsx → TabContext.tsx} +3 -3
- package/src/hooks/{TopTab.hooks.ts → Tab.hooks.ts} +22 -7
- package/src/index.tsx +24 -10
- package/src/navigator/createReanimatedTopTabNavigator.tsx +1 -1
- package/lib/commonjs/context/TopTabContext.hooks.js.map +0 -1
- package/lib/commonjs/context/TopTabContext.js.map +0 -1
- package/lib/commonjs/hooks/TopTab.hooks.js.map +0 -1
- package/lib/module/context/TopTabContext.hooks.js.map +0 -1
- package/lib/module/context/TopTabContext.js.map +0 -1
- package/lib/module/hooks/TopTab.hooks.js.map +0 -1
- package/lib/typescript/commonjs/src/context/TopTabContext.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/context/TopTabContext.hooks.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/hooks/TopTab.hooks.d.ts.map +0 -1
- package/lib/typescript/module/src/context/TopTabContext.d.ts.map +0 -1
- package/lib/typescript/module/src/context/TopTabContext.hooks.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/TopTab.hooks.d.ts.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { StyleSheet } from 'react-native';
|
|
4
4
|
import Reanimated, { interpolateColor, useAnimatedStyle } from 'react-native-reanimated';
|
|
5
|
-
import { useTabContext } from "../../hooks/
|
|
5
|
+
import { useTabContext } from "../../hooks/Tab.hooks.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export const TabBarLabelBaseComponent = ({
|
|
8
8
|
index,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Reanimated","interpolateColor","useAnimatedStyle","useTabContext","jsx","_jsx","TabBarLabelBaseComponent","index","props","transformationX","style","backgroundColor","value","textStyle","color","View","styles","wrapper","children","Text","text","title","create","fontWeight","textTransform","borderRadius","height","justifyContent","paddingHorizontal","paddingVertical"],"sourceRoot":"../../../../src","sources":["components/elements/TabBarLabelBaseComponent.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,OAAOC,UAAU,IACfC,gBAAgB,EAChBC,gBAAgB,QACX,yBAAyB;AAChC,SAASC,aAAa,QAAQ,
|
|
1
|
+
{"version":3,"names":["StyleSheet","Reanimated","interpolateColor","useAnimatedStyle","useTabContext","jsx","_jsx","TabBarLabelBaseComponent","index","props","transformationX","style","backgroundColor","value","textStyle","color","View","styles","wrapper","children","Text","text","title","create","fontWeight","textTransform","borderRadius","height","justifyContent","paddingHorizontal","paddingVertical"],"sourceRoot":"../../../../src","sources":["components/elements/TabBarLabelBaseComponent.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,OAAOC,UAAU,IACfC,gBAAgB,EAChBC,gBAAgB,QACX,yBAAyB;AAChC,SAASC,aAAa,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQtD,OAAO,MA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reList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
5
5
|
import Reanimated, { Easing, interpolate, runOnJS, useAnimatedReaction, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
6
|
-
import { useTabContext } from "../../hooks/
|
|
6
|
+
import { useTabContext } from "../../hooks/Tab.hooks.js";
|
|
7
7
|
|
|
8
8
|
//TODO: types
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useRef","useState","Gesture","GestureDetector","Reanimated","Easing","interpolate","runOnJS","useAnimatedReaction","useAnimatedStyle","useSharedValue","withTiming","useTabContext","jsx","_jsx","GestureWrapper","children","currentScreenIndex","currentYPosition","gestureEnabled","headerHeight","screenProperties","transformationY","screenRefs","movedY","gestureRef","Pan","withTimingConfig","duration","easing","bezier","_gestureEnabled","setGestureEnabled","value","nextValue","_scrollTo","index","scrollTo","Object","values","refs","current","y","animated","gesture","activeOffsetY","onTouchesMove","state","stateManager","map","scrollY","fail","onUpdate","translationY","Math","abs","onEnd","velocityY","gestureValue","changeOffset","destination","onFinalize","simultaneousWithExternalGesture","nativeGesture","withRef","enabled","style","flex","transform","translateY","View"],"sourceRoot":"../../../../src","sources":["components/wrappers/GestureWrapper.tsx"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACjD,SAASC,OAAO,EAAEC,eAAe,QAAQ,8BAA8B;AACvE,OAAOC,UAAU,IACfC,MAAM,EACNC,WAAW,EACXC,OAAO,EACPC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,aAAa,QAAQ,
|
|
1
|
+
{"version":3,"names":["useMemo","useRef","useState","Gesture","GestureDetector","Reanimated","Easing","interpolate","runOnJS","useAnimatedReaction","useAnimatedStyle","useSharedValue","withTiming","useTabContext","jsx","_jsx","GestureWrapper","children","currentScreenIndex","currentYPosition","gestureEnabled","headerHeight","screenProperties","transformationY","screenRefs","movedY","gestureRef","Pan","withTimingConfig","duration","easing","bezier","_gestureEnabled","setGestureEnabled","value","nextValue","_scrollTo","index","scrollTo","Object","values","refs","current","y","animated","gesture","activeOffsetY","onTouchesMove","state","stateManager","map","scrollY","fail","onUpdate","translationY","Math","abs","onEnd","velocityY","gestureValue","changeOffset","destination","onFinalize","simultaneousWithExternalGesture","nativeGesture","withRef","enabled","style","flex","transform","translateY","View"],"sourceRoot":"../../../../src","sources":["components/wrappers/GestureWrapper.tsx"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACjD,SAASC,OAAO,EAAEC,eAAe,QAAQ,8BAA8B;AACvE,OAAOC,UAAU,IACfC,MAAM,EACNC,WAAW,EACXC,OAAO,EACPC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,aAAa,QAAQ,0BAAuB;;AAErD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAC;EAAEC;AAAc,CAAC,KAAK;EACnD,MAAM;IACJC,kBAAkB;IAClBC,gBAAgB;IAChBC,cAAc;IACdC,YAAY;IACZC,gBAAgB;IAChBC,eAAe;IACfC;EACF,CAAC,GAAGX,aAAa,CAAC,CAAC;EAEnB,MAAMY,MAAM,GAAGd,cAAc,CAAC,CAAC,CAAC;EAEhC,MAAMe,UAAU,GAAGzB,MAAM,CAACE,OAAO,CAACwB,GAAG,CAAC,CAAC,CAAC;EAExC,MAAMC,gBAAgB,GAAG;IACvBC,QAAQ,EAAE,GAAG;IACbC,MAAM,EAAExB,MAAM,CAACyB,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;EAC1C,CAAU;EA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AC,CACAC,OAAO,CAACvC,UAAU,CAAC,CACnBwC,OAAO,CAAClC,eAAe,CAAC,EAC7B,CAACA,eAAe,CAClB,CAAC;EAED,MAAMmC,KAAK,GAAGzD,gBAAgB,CAC5B,OAAO;IACL0D,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE,CACT;MACEC,UAAU,EAAE/D,WAAW,CACrBgB,eAAe,CAACW,KAAK,EACrB,CAAC,CAAC,EAAE,CAACb,YAAY,CAACa,KAAK,CAAC,EACxB,CAAC,CAAC,EAAE,CAACb,YAAY,CAACa,KAAK,CAAC,EACxB,OACF;IACF,CAAC;EAEL,CAAC,CAAC,EACF,EACF,CAAC;EAED,oBACEnB,IAAA,CAACX,eAAe;IAACyC,OAAO,EAAEA,OAAQ;IAAA5B,QAAA,eAChCF,IAAA,CAACV,UAAU,CAACkE,IAAI;MAACJ,KAAK,EAAEA,KAAM;MAAAlD,QAAA,EAAEA;IAAQ,CAAkB;EAAC,CAC5C,CAAC;AAEtB,CAAC","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useRoute } from '@react-navigation/native';
|
|
4
4
|
import Reanimated from 'react-native-reanimated';
|
|
5
|
-
import { useTabContext } from "../../hooks/
|
|
5
|
+
import { useTabContext } from "../../hooks/Tab.hooks.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export const ScreenWrapper = ({
|
|
8
8
|
children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRoute","Reanimated","useTabContext","jsx","_jsx","ScreenWrapper","children","viewProps","key","screenProperties","onLayout","event","screen","outerLayout","value","nativeEvent","layout","View"],"sourceRoot":"../../../../src","sources":["components/wrappers/ScreenWrapper.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AAEnD,OAAOC,UAAU,MAA8B,yBAAyB;AACxE,SAASC,aAAa,QAAQ,
|
|
1
|
+
{"version":3,"names":["useRoute","Reanimated","useTabContext","jsx","_jsx","ScreenWrapper","children","viewProps","key","screenProperties","onLayout","event","screen","outerLayout","value","nativeEvent","layout","View"],"sourceRoot":"../../../../src","sources":["components/wrappers/ScreenWrapper.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AAEnD,OAAOC,UAAU,MAA8B,yBAAyB;AACxE,SAASC,aAAa,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAKtD,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,QAAQ;EACR,GAAGC;AACe,CAAC,KAAK;EACxB,MAAM;IAAEC;EAAI,CAAC,GAAGR,QAAQ,CAAC,CAAC;EAC1B,MAAM;IAAES;EAAiB,CAAC,GAAGP,aAAa,CAAC,CAAC;EAE5C,MAAMQ,QAAQ,GAAIC,KAAwB,IAAK;IAC7C,MAAMC,MAAM,GAAGH,gBAAgB,CAACD,GAAG,CAAC;IACpC,IAAI,CAACI,MAAM,EAAE,MAAM,8CAA8C;IACjEA,MAAM,CAACC,WAAW,CAACC,KAAK,GAAGH,KAAK,CAACI,WAAW,CAACC,MAAM;EACrD,CAAC;EAED,oBACEZ,IAAA,CAACH,UAAU,CAACgB,IAAI;IAAA,GAAKV,SAAS;IAAEG,QAAQ,EAAEA,QAAS;IAAAJ,QAAA,EAChDA;EAAQ,CACM,CAAC;AAEtB,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { StyleSheet } from 'react-native';
|
|
4
4
|
import { GestureDetector } from 'react-native-gesture-handler';
|
|
5
5
|
import Reanimated from 'react-native-reanimated';
|
|
6
|
-
import { useScreenGesture, useScreenProperties, useScreenScrollable, useTabContext } from "../../hooks/
|
|
6
|
+
import { useScreenGesture, useScreenProperties, useScreenScrollable, useTabContext } from "../../hooks/Tab.hooks.js";
|
|
7
7
|
import { useRef } from 'react';
|
|
8
8
|
import { useRoute } from '@react-navigation/native';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","GestureDetector","Reanimated","useScreenGesture","useScreenProperties","useScreenScrollable","useTabContext","useRef","useRoute","jsx","_jsx","ScrollView","children","style","props","gesture","animatedStyle","scrollProps","innerLayout","screenRefs","key","_ref","onLayout","event","value","nativeEvent","layout","setRef","ref","contentContainerStyle","_style","create","flexGrow"],"sourceRoot":"../../../../src","sources":["components/wrappers/ScrollView.tsx"],"mappings":";;AAAA,SAGEA,UAAU,QACL,cAAc;AACrB,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,OAAOC,UAAU,MAA8B,yBAAyB;AACxE,SACEC,gBAAgB,EAChBC,mBAAmB,EACnBC,mBAAmB,EACnBC,aAAa,QACR,
|
|
1
|
+
{"version":3,"names":["StyleSheet","GestureDetector","Reanimated","useScreenGesture","useScreenProperties","useScreenScrollable","useTabContext","useRef","useRoute","jsx","_jsx","ScrollView","children","style","props","gesture","animatedStyle","scrollProps","innerLayout","screenRefs","key","_ref","onLayout","event","value","nativeEvent","layout","setRef","ref","contentContainerStyle","_style","create","flexGrow"],"sourceRoot":"../../../../src","sources":["components/wrappers/ScrollView.tsx"],"mappings":";;AAAA,SAGEA,UAAU,QACL,cAAc;AACrB,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,OAAOC,UAAU,MAA8B,yBAAyB;AACxE,SACEC,gBAAgB,EAChBC,mBAAmB,EACnBC,mBAAmB,EACnBC,aAAa,QACR,0BAAuB;AAC9B,SAASC,MAAM,QAAQ,OAAO;AAC9B,SAASC,QAAQ,QAAQ,0BAA0B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAKpD,OAAO,MAAMC,UAAU,GAAGA,CAAC;EACzBC,QAAQ;EACRC,KAAK;EACL,GAAGC;AACe,CAAC,KAAK;EACxB,MAAMC,OAAO,GAAGZ,gBAAgB,CAAC,CAAC;EAClC,MAAM;IAAEU,KAAK,EAAEG,aAAa;IAAE,GAAGC;EAAY,CAAC,GAAGZ,mBAAmB,CAAC,CAAC;EACtE,MAAM;IAAEa;EAAY,CAAC,GAAGd,mBAAmB,CAAC,CAAC;EAC7C,MAAM;IAAEe;EAAW,CAAC,GAAGb,aAAa,CAAC,CAAC;EAEtC,MAAM;IAAEc;EAAI,CAAC,GAAGZ,QAAQ,CAAC,CAAC;EAE1B,MAAMa,IAAI,GAAGd,MAAM,CAAwB,IAAI,CAAC;EAEhD,MAAMe,QAAQ,GAAIC,KAAwB,IAAK;IAC7CL,WAAW,CAACM,KAAK,GAAGD,KAAK,CAACE,WAAW,CAACC,MAAM;IAC5CP,UAAU,CAACQ,MAAM,CAACP,GAAG,EAAEC,IAAI,CAAC;EAC9B,CAAC;EAED,oBACEX,IAAA,CAACT,eAAe;IAACc,OAAO,EAAEA,OAAQ;IAAAH,QAAA,eAChCF,IAAA,CAACR,UAAU,CAACS,UAAU;MAAA,GAChBM,WAAW;MAAA,GACXH,KAAK;MACTc,GAAG,EAAEP,IAAK;MACVQ,qBAAqB,EAAEC,MAAM,CAACD,qBAAsB;MACpDP,QAAQ,EAAEA,QAAS;MACnBT,KAAK,EAAE,CAACA,KAAK,EAAEG,aAAa,CAAE;MAAAJ,QAAA,EAE7BA;IAAQ,CACY;EAAC,CACT,CAAC;AAEtB,CAAC;AAED,MAAMkB,MAAM,GAAG9B,UAAU,CAAC+B,MAAM,CAAC;EAC/BF,qBAAqB,EAAE;IACrBG,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -29,7 +29,7 @@ const useResetApproachingScreenScrollOffset = ({
|
|
|
29
29
|
runOnJS(resetApproachingScreenOffset)(approachingIndex, approachingScreenOffset > 0 && currentYPosition.value === 0);
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
const getTargetIndex = (currentValue, previousValue) => {
|
|
33
33
|
'worklet';
|
|
34
34
|
|
|
35
35
|
if (currentValue > (previousValue ?? 0)) {
|
|
@@ -37,8 +37,8 @@ function getTargetIndex(currentValue, previousValue) {
|
|
|
37
37
|
} else {
|
|
38
38
|
return Math.floor(currentValue);
|
|
39
39
|
}
|
|
40
|
-
}
|
|
41
|
-
export const
|
|
40
|
+
};
|
|
41
|
+
export const TabContextHooks = {
|
|
42
42
|
useResetApproachingScreenScrollOffset
|
|
43
43
|
};
|
|
44
|
-
//# sourceMappingURL=
|
|
44
|
+
//# sourceMappingURL=TabContext.hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["runOnJS","useAnimatedReaction","useResetApproachingScreenScrollOffset","screenRefs","transformationX","screenProperties","currentYPosition","resetApproachingScreenOffset","index","shouldReset","scrollTo","Object","values","refs","current","y","animated","value","previous","approachingIndex","getTargetIndex","approachingScreenOffset","map","scrollY","currentValue","previousValue","Math","ceil","floor","TabContextHooks"],"sourceRoot":"../../../src","sources":["context/TabContext.hooks.ts"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,mBAAmB,QAAQ,yBAAyB;AAGtE,MAAMC,qCAAqC,GAAGA,CAAC;EAC7CC,UAAU;EACVC,eAAe;EACfC,gBAAgB;EAChBC;AAIF,CAAC,KAAK;EACJ,MAAMC,4BAA4B,GAAGA,CACnCC,KAAa,EACbC,WAAoB,KACjB;IACH,IAAIA,WAAW,EAAE;MACf;MACA,MAAM;QAAEC;MAAS,CAAC,GAAGC,MAAM,CAACC,MAAM,CAACT,UAAU,CAACU,IAAI,CAACC,OAAO,CAAC,CAACN,KAAK,CAAC,EAC9DM,OAAO,IAAI;QAAEJ,QAAQ,EAAEA,CAAA,KAAM;MAAK,CAAC;MAEvCA,QAAQ,CAAC;QAAEK,CAAC,EAAE,CAAC;QAAEC,QAAQ,EAAE;MAAM,CAAC,CAAC;IACrC;EACF,CAAC;EAEDf,mBAAmB,CACjB,MAAMG,eAAe,CAACa,KAAK,EAC3B,CAACH,OAAO,EAAEI,QAAQ,KAAK;IACrB,MAAMC,gBAAgB,GAAGC,cAAc,CAACN,OAAO,EAAEI,QAAQ,CAAC;IAE1D,MAAMG,uBAAuB,GAC3BV,MAAM,CAACC,MAAM,CAACP,gBAAgB,CAAC,CAACiB,GAAG,CAAC,CAAC;MAAEC;IAAQ,CAAC,KAAKA,OAAO,CAACN,KAAK,CAAC,CACjEE,gBAAgB,CACjB,IAAI,CAAC,CAAC;IAETnB,OAAO,CAACO,4BAA4B,CAAC,CACnCY,gBAAgB,EAChBE,uBAAuB,GAAG,CAAC,IAAIf,gBAAgB,CAACW,KAAK,KAAK,CAC5D,CAAC;EACH,CACF,CAAC;AACH,CAAC;AAED,MAAMG,cAAc,GAAGA,CAACI,YAAoB,EAAEC,aAA4B,KAAK;EAC7E,SAAS;;EACT,IAAID,YAAY,IAAIC,aAAa,IAAI,CAAC,CAAC,EAAE;IACvC,OAAOC,IAAI,CAACC,IAAI,CAACH,YAAY,CAAC;EAChC,CAAC,MAAM;IACL,OAAOE,IAAI,CAACE,KAAK,CAACJ,YAAY,CAAC;EACjC;AACF,CAAC;AAED,OAAO,MAAMK,eAAe,GAAG;EAC7B3B;AACF,CAAC","ignoreList":[]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { createContext, memo, useRef } from 'react';
|
|
4
4
|
import { Gesture } from 'react-native-gesture-handler';
|
|
5
5
|
import { interpolate, useAnimatedReaction, useDerivedValue, useSharedValue } from 'react-native-reanimated';
|
|
6
|
-
import { useScreenRefs } from "../hooks/
|
|
7
|
-
import {
|
|
6
|
+
import { useScreenRefs } from "../hooks/Tab.hooks.js";
|
|
7
|
+
import { TabContextHooks } from "./TabContext.hooks.js";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
export const Context = /*#__PURE__*/createContext({});
|
|
10
10
|
export const Provider = /*#__PURE__*/memo(({
|
|
@@ -40,7 +40,7 @@ export const Provider = /*#__PURE__*/memo(({
|
|
|
40
40
|
if (currentYPosition.value === -headerHeight.value) return;
|
|
41
41
|
transformationY.value = interpolate(value, inputRange.value, outputRange.value, 'clamp');
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
TabContextHooks.useResetApproachingScreenScrollOffset({
|
|
44
44
|
screenRefs,
|
|
45
45
|
currentYPosition,
|
|
46
46
|
screenProperties,
|
|
@@ -79,4 +79,4 @@ export const Provider = /*#__PURE__*/memo(({
|
|
|
79
79
|
})
|
|
80
80
|
});
|
|
81
81
|
});
|
|
82
|
-
//# sourceMappingURL=
|
|
82
|
+
//# sourceMappingURL=TabContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","memo","useRef","Gesture","interpolate","useAnimatedReaction","useDerivedValue","useSharedValue","useScreenRefs","TabContextHooks","jsx","_jsx","Context","Provider","children","config","screenProperties","transformationY","transformationX","currentYPosition","gestureEnabled","currentScreenIndex","navHeight","headerHeight","closeOffset","topTabHeight","topTapNativeRef","Native","current","screenRefs","Object","keys","inputRange","map","_","idx","outputRange","type","value","useResetApproachingScreenScrollOffset"],"sourceRoot":"../../../src","sources":["context/TabContext.tsx"],"mappings":";;AACA,SAASA,aAAa,EAAEC,IAAI,EAAEC,MAAM,QAAQ,OAAO;AACnD,SAASC,OAAO,QAAQ,8BAA8B;AACtD,SACEC,WAAW,EACXC,mBAAmB,EACnBC,eAAe,EACfC,cAAc,QACT,yBAAyB;AAChC,SAASC,aAAa,QAAQ,uBAAoB;AAClD,SAASC,eAAe,QAAQ,uBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAErD,OAAO,MAAMC,OAAO,gBAAGZ,aAAa,CAClC,CAAC,CACH,CAAC;AAED,OAAO,MAAMa,QAAQ,gBAAGZ,IAAI,CAC1B,CAAC;EACCa,QAAQ;EACRC,MAAM;EACNC;AAC6C,CAAC,KAAK;EACnD,MAAMC,eAAe,GAAGV,cAAc,CAAC,CAAC,CAAC;EACzC,MAAMW,eAAe,GAAGX,cAAc,CAAC,CAAC,CAAC;EACzC,MAAMY,gBAAgB,GAAGZ,cAAc,CAAC,CAAC,CAAC;EAE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UAAU;IACVV,gBAAgB;IAChBH,gBAAgB;IAChBE;EACF,CAAC,CAAC;EAEF,oBACEP,IAAA,CAACC,OAAO,CAACC,QAAQ;IACfyB,KAAK,EAAE;MACLd,WAAW;MACXT,MAAM;MACNM,kBAAkB;MAClBF,gBAAgB;MAChBC,cAAc;MACdG,YAAY;MACZD,SAAS;MACTN,gBAAgB;MAChBS,YAAY;MACZC,eAAe;MACfR,eAAe;MACfD,eAAe;MACfY;IACF,CAAE;IAAAf,QAAA,EAEDA,QAAQ,CAAC;MACRe,UAAU;MACVL,WAAW;MACXT,MAAM;MACNM,kBAAkB;MAClBF,gBAAgB;MAChBC,cAAc;MACdG,YAAY;MACZD,SAAS;MACTN,gBAAgB;MAChBS,YAAY;MACZC,eAAe;MACfR,eAAe;MACfD;IACF,CAAC;EAAC,CACc,CAAC;AAEvB,CACF,CAAC","ignoreList":[]}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useRoute } from '@react-navigation/native';
|
|
4
|
-
import { Context } from "../context/
|
|
4
|
+
import { Context } from "../context/TabContext.js";
|
|
5
5
|
import { useContext } from 'react';
|
|
6
6
|
import { useAnimatedProps, useAnimatedScrollHandler, useAnimatedStyle, useDerivedValue, withTiming } from 'react-native-reanimated';
|
|
7
7
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
8
8
|
import { useWindowDimensions } from 'react-native';
|
|
9
|
-
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import { HeaderHeightContext } from '@react-navigation/elements';
|
|
11
|
+
export const useTabContext = () => {
|
|
12
|
+
if (__DEV__) {
|
|
13
|
+
const stack = new Error().stack;
|
|
14
|
+
const isOutsideLibrary = stack && !stack.includes('react-navigation-reanimated-top-tabs');
|
|
15
|
+
if (isOutsideLibrary) {
|
|
16
|
+
console.warn('[react-navigation-reanimated-top-tabs]: You are directly using the tab context, which may lead to unexpected behavior. Please use the provided hooks or API for better stability.');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return useContext(Context);
|
|
20
|
+
};
|
|
10
21
|
export const useScreenGesture = () => {
|
|
11
22
|
const {
|
|
12
23
|
key
|
|
@@ -26,7 +37,8 @@ export const useScreenScrollable = () => {
|
|
|
26
37
|
height
|
|
27
38
|
} = useWindowDimensions();
|
|
28
39
|
const {
|
|
29
|
-
bottom
|
|
40
|
+
bottom,
|
|
41
|
+
top
|
|
30
42
|
} = useSafeAreaInsets();
|
|
31
43
|
const {
|
|
32
44
|
currentYPosition,
|
|
@@ -36,10 +48,7 @@ export const useScreenScrollable = () => {
|
|
|
36
48
|
topTabHeight,
|
|
37
49
|
transformationY
|
|
38
50
|
} = useTabContext();
|
|
39
|
-
|
|
40
|
-
//TODO: Navigation header hook is available if Tabs are rendered inside the Stack (createNavigationStack())
|
|
41
|
-
//useHeaderHeight();
|
|
42
|
-
const navigationHeader = 50;
|
|
51
|
+
const navigationHeader = React.useContext(HeaderHeightContext) ?? 0;
|
|
43
52
|
const animatedProps = useAnimatedProps(() => ({
|
|
44
53
|
scrollEnabled: !gestureEnabled.value || currentYPosition.value === -headerHeight.value
|
|
45
54
|
}));
|
|
@@ -52,7 +61,7 @@ export const useScreenScrollable = () => {
|
|
|
52
61
|
});
|
|
53
62
|
const oppositeHeaderState = useDerivedValue(() => transformationY.value >= 0 ? headerHeight.value : 0);
|
|
54
63
|
const style = useAnimatedStyle(() => ({
|
|
55
|
-
minHeight: height - topTabHeight.value - oppositeHeaderState.value - navigationHeader
|
|
64
|
+
minHeight: height - top - topTabHeight.value - oppositeHeaderState.value - navigationHeader
|
|
56
65
|
}));
|
|
57
66
|
return {
|
|
58
67
|
animatedProps,
|
|
@@ -87,6 +96,8 @@ export const useHeader = () => {
|
|
|
87
96
|
hideHeader
|
|
88
97
|
};
|
|
89
98
|
};
|
|
99
|
+
|
|
100
|
+
//TODO: make it private
|
|
90
101
|
export const useScreenRefs = keys => {
|
|
91
102
|
const refs = {
|
|
92
103
|
current: keys.reduce((prev, key) => ({
|
|
@@ -107,4 +118,4 @@ export const useScreenRefs = keys => {
|
|
|
107
118
|
refs
|
|
108
119
|
};
|
|
109
120
|
};
|
|
110
|
-
//# sourceMappingURL=
|
|
121
|
+
//# sourceMappingURL=Tab.hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useRoute","Context","useContext","useAnimatedProps","useAnimatedScrollHandler","useAnimatedStyle","useDerivedValue","withTiming","useSafeAreaInsets","useWindowDimensions","React","HeaderHeightContext","useTabContext","__DEV__","stack","Error","isOutsideLibrary","includes","console","warn","useScreenGesture","key","screenProperties","nativeRef","nativeGesture","useScreenScrollable","height","bottom","top","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/Tab.hooks.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,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;AAClD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,mBAAmB,QAAQ,4BAA4B;AAEhE,OAAO,MAAMC,aAAa,GAAGA,CAAA,KAAM;EACjC,IAAIC,OAAO,EAAE;IACX,MAAMC,KAAK,GAAG,IAAIC,KAAK,CAAC,CAAC,CAACD,KAAK;IAC/B,MAAME,gBAAgB,GACpBF,KAAK,IAAI,CAACA,KAAK,CAACG,QAAQ,CAAC,sC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I,CAACG,MAAM,CAClB,CAACC,IAAI,EAAEtC,GAAG,MAAM;MACd,GAAGsC,IAAI;MACP,CAACtC,GAAG,GAAG;QAAEoC,OAAO,EAAE;MAAK;IACzB,CAAC,CAAC,EACF,CAAC,CACH;EACF,CAAC;EAED,MAAMG,MAAM,GAAGA,CAACvC,GAAW,EAAEwC,GAAQ,KAAK;IACxCL,IAAI,CAACC,OAAO,GAAG;MAAE,GAAGD,IAAI,CAACC,OAAO;MAAE,CAACpC,GAAG,GAAGwC;IAAI,CAAC;EAChD,CAAC;EAED,OAAO;IAAED,MAAM;IAAEJ;EAAK,CAAC;AACzB,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { ScrollView } from "./components/wrappers/ScrollView.js";
|
|
4
|
+
import { ScreenWrapper } from "./components/wrappers/ScreenWrapper.js";
|
|
5
|
+
import { TabBarBaseComponent } from "./components/elements/TabBarBaseComponent.js";
|
|
6
|
+
import { TabBarLabelBaseComponent } from "./components/elements/TabBarLabelBaseComponent.js";
|
|
7
|
+
import { useHeader, useScreenGesture, useScreenProperties, useScreenScrollable, useTabContext } from "./hooks/Tab.hooks.js";
|
|
4
8
|
export { createReanimatedTopTabNavigator } from "./navigator/createReanimatedTopTabNavigator.js";
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export const TabHooks = {
|
|
10
|
+
useHeader,
|
|
11
|
+
useScreenProperties,
|
|
12
|
+
useScreenScrollable,
|
|
13
|
+
useScreenGesture,
|
|
14
|
+
useTabContext
|
|
15
|
+
};
|
|
16
|
+
export const Tab = {
|
|
17
|
+
ScrollView,
|
|
18
|
+
ScreenWrapper,
|
|
19
|
+
TabBarBaseComponent,
|
|
20
|
+
TabBarLabelBaseComponent
|
|
21
|
+
};
|
|
11
22
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["ScrollView","ScreenWrapper","TabBarBaseComponent","TabBarLabelBaseComponent","useHeader","useScreenGesture","useScreenProperties","useScreenScrollable","useTabContext","createReanimatedTopTabNavigator","TabHooks","Tab"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,qCAAkC;AAC7D,SAASC,aAAa,QAAQ,wCAAqC;AACnE,SAASC,mBAAmB,QAAQ,8CAA2C;AAC/E,SAASC,wBAAwB,QAAQ,mDAAgD;AACzF,SACEC,SAAS,EACTC,gBAAgB,EAChBC,mBAAmB,EACnBC,mBAAmB,EACnBC,aAAa,QACR,sBAAmB;AAG1B,SAASC,+BAA+B,QAAQ,gDAA6C;AAE7F,OAAO,MAAMC,QAAQ,GAAG;EACtBN,SAAS;EACTE,mBAAmB;EACnBC,mBAAmB;EACnBF,gBAAgB;EAChBG;AACF,CAAC;AAED,OAAO,MAAMG,GAAG,GAAG;EACjBX,UAAU;EACVC,aAAa;EACbC,mBAAmB;EACnBC;AACF,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createNavigatorFactory, TabActions, TabRouter, useNavigationBuilder } from '@react-navigation/native';
|
|
4
4
|
import { GestureWrapper } from "../components/wrappers/GestureWrapper.js";
|
|
5
5
|
import { TabBarBaseComponent } from "../components/elements/TabBarBaseComponent.js";
|
|
6
|
-
import { Provider } from "../context/
|
|
6
|
+
import { Provider } from "../context/TabContext.js";
|
|
7
7
|
import { omit } from 'lodash';
|
|
8
8
|
import { useCallback, useMemo, useRef } from 'react';
|
|
9
9
|
import { Gesture } from 'react-native-gesture-handler';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createNavigatorFactory","TabActions","TabRouter","useNavigationBuilder","GestureWrapper","TabBarBaseComponent","Provider","omit","useCallback","useMemo","useRef","Gesture","Reanimated","makeMutable","ReanimatedTabView","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","TabViewNavigator","HeaderComponent","TabBarComponent","children","config","initialRouteName","screenOptions","NavigationContent","descriptors","navigation","state","defaultScreenOptions","_config","routes","map","screenProperties","reduce","prev","route","key","innerLayout","height","width","x","y","nativeGesture","Native","outerLayout","scrollY","current","onIndexChange","currentScreenIndex","gestureEnabled","index","navigate","name","value","navigationState","restOptions","options","tabBarLabel","focused","title","undefined","dispatch","jumpTo","params","target","renderTabBar","props","renderScene","render","headerHeight","transformationY","View","onLayout","nativeEvent","layout","createReanimatedTopTabNavigator"],"sourceRoot":"../../../src","sources":["navigator/createReanimatedTopTabNavigator.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EAEtBC,UAAU,EAEVC,SAAS,EACTC,oBAAoB,QACf,0BAA0B;AAEjC,SAASC,cAAc,QAAQ,0CAAuC;AACtE,SAEEC,mBAAmB,QACd,+CAA4C;AACnD,SAASC,QAAQ,QAAQ,
|
|
1
|
+
{"version":3,"names":["createNavigatorFactory","TabActions","TabRouter","useNavigationBuilder","GestureWrapper","TabBarBaseComponent","Provider","omit","useCallback","useMemo","useRef","Gesture","Reanimated","makeMutable","ReanimatedTabView","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","TabViewNavigator","HeaderComponent","TabBarComponent","children","config","initialRouteName","screenOptions","NavigationContent","descriptors","navigation","state","defaultScreenOptions","_config","routes","map","screenProperties","reduce","prev","route","key","innerLayout","height","width","x","y","nativeGesture","Native","outerLayout","scrollY","current","onIndexChange","currentScreenIndex","gestureEnabled","index","navigate","name","value","navigationState","restOptions","options","tabBarLabel","focused","title","undefined","dispatch","jumpTo","params","target","renderTabBar","props","renderScene","render","headerHeight","transformationY","View","onLayout","nativeEvent","layout","createReanimatedTopTabNavigator"],"sourceRoot":"../../../src","sources":["navigator/createReanimatedTopTabNavigator.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EAEtBC,UAAU,E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K;UAC7BJ,YAAY,CAAChB,KAAK,GAAGoB,WAAW,CAACC,MAAM,CAACpC,MAAM;QAChD,CAAE;QAAAlB,QAAA,EAEDF,eAAe,gBACdN,IAAA,CAACM,eAAe;UACdmD,YAAY,EAAEA,YAAa;UAC3BC,eAAe,EAAEA;QAAgB,CAClC,CAAC,GACA;MAAI,CACO,CAAC,eAClB1D,IAAA,CAACY,iBAAiB;QAAAJ,QAAA,eAChBR,IAAA,CAACZ,cAAc;UAAAoB,QAAA,eACbR,IAAA,CAACF,iBAAiB;YAChB4C,eAAe,EAAEA,eAAgB;YACjCP,aAAa,EAAEA,aAAa,CAC1BC,kBAAkB,EAClBC,cACF,CAAE;YACFkB,WAAW,EAAEA,WAAY;YACzBF,YAAY,EAAEA;UAAa,CAC5B;QAAC,CACY;MAAC,CACA,CAAC;IAAA,CACpB;EACH,CACO,CAAC;AAEf,CAAC;AAED,OAAO,MAAMU,+BAA+B,GAAGA,CAAA,KAG7C/E,sBAAsB,CAKpBqB,gBAAgB,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -14,11 +14,10 @@ export interface RenderTabsParams {
|
|
|
14
14
|
navigationState: NavigationState;
|
|
15
15
|
position: SharedValue<number>;
|
|
16
16
|
}
|
|
17
|
-
interface TabBarProps extends RenderTabsParams {
|
|
17
|
+
export interface TabBarProps extends RenderTabsParams {
|
|
18
18
|
children?: React.ReactNode;
|
|
19
19
|
navigate: (route: Route) => void;
|
|
20
20
|
style?: AnimatedStyle;
|
|
21
21
|
}
|
|
22
22
|
export declare const TabBarBaseComponent: ({ children, navigate, navigationState, position, style, }: TabBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export {};
|
|
24
23
|
//# sourceMappingURL=TabBarBaseComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBarBaseComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/elements/TabBarBaseComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,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AC,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 +1,7 @@
|
|
|
1
|
-
interface TabBarLabelTypes {
|
|
1
|
+
export interface TabBarLabelTypes {
|
|
2
2
|
focused: boolean;
|
|
3
3
|
index: number;
|
|
4
4
|
title: string;
|
|
5
5
|
}
|
|
6
6
|
export declare const TabBarLabelBaseComponent: ({ index, ...props }: TabBarLabelTypes) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
8
7
|
//# sourceMappingURL=TabBarLabelBaseComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBarLabelBaseComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/elements/TabBarLabelBaseComponent.tsx"],"names":[],"mappings":"AAOA,
|
|
1
|
+
{"version":3,"file":"TabBarLabelBaseComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/elements/TabBarLabelBaseComponent.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,wBAAwB,wBAGlC,gBAAgB,4CAgClB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type ReanimatedTopTabNavigation } from '../types';
|
|
2
2
|
export declare const Context: import("react").Context<ReanimatedTopTabNavigation.ContextType>;
|
|
3
3
|
export declare const Provider: import("react").MemoExoticComponent<({ children, config, screenProperties, }: ReanimatedTopTabNavigation.TopTabContextProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=TabContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabContext.d.ts","sourceRoot":"","sources":["../../../../../src/context/TabContext.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"}
|
package/lib/typescript/commonjs/src/context/{TopTabContext.hooks.d.ts → TabContext.hooks.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReanimatedTopTabNavigation } from 'react-navigation-reanimated-top-tabs';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const TabContextHooks: {
|
|
3
3
|
useResetApproachingScreenScrollOffset: ({ screenRefs, transformationX, screenProperties, currentYPosition, }: Pick<ReanimatedTopTabNavigation.ContextType, "screenRefs" | "screenProperties" | "currentYPosition" | "transformationX">) => void;
|
|
4
4
|
};
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=TabContext.hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabContext.hooks.d.ts","sourceRoot":"","sources":["../../../../../src/context/TabContext.hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAmDvF,eAAO,MAAM,eAAe;kHA5CzB,IAAI,CACL,0BAA0B,CAAC,WAAW,EACtC,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,iBAAiB,CAC3E;CA2CA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tab.hooks.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/Tab.hooks.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa,2DAazB,CAAC;AAEF,eAAO,MAAM,gBAAgB,2GAS5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CA+C/B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;CAO/B,CAAC;AAEF,eAAO,MAAM,SAAS;;CAQrB,CAAC;AAGF,eAAO,MAAM,aAAa,SAAU,MAAM,EAAE;kBAWrB,MAAM,OAAO,GAAG;;;qBAJD,GAAG;;;CASxC,CAAC"}
|
|
@@ -1,10 +1,35 @@
|
|
|
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
1
|
export { type ReanimatedTopTabNavigation } from './types';
|
|
2
|
+
export { createReanimatedTopTabNavigator } from './navigator/createReanimatedTopTabNavigator';
|
|
3
|
+
export declare const TabHooks: {
|
|
4
|
+
useHeader: () => {
|
|
5
|
+
hideHeader: () => void;
|
|
6
|
+
};
|
|
7
|
+
useScreenProperties: () => {
|
|
8
|
+
innerLayout: import("react-native-reanimated").SharedValue<import("react-native").LayoutRectangle>;
|
|
9
|
+
nativeGesture: import("react-native-gesture-handler").NativeGesture;
|
|
10
|
+
outerLayout: import("react-native-reanimated").SharedValue<import("react-native").LayoutRectangle>;
|
|
11
|
+
scrollY: import("react-native-reanimated").SharedValue<number>;
|
|
12
|
+
};
|
|
13
|
+
useScreenScrollable: () => {
|
|
14
|
+
animatedProps: Partial<{
|
|
15
|
+
scrollEnabled: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
bounces: boolean;
|
|
18
|
+
contentContainerStyle: {
|
|
19
|
+
paddingBottom: number;
|
|
20
|
+
};
|
|
21
|
+
onScroll: import("react-native-reanimated").ScrollHandlerProcessed<Record<string, unknown>>;
|
|
22
|
+
style: {
|
|
23
|
+
minHeight: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
useScreenGesture: () => import("react-native-gesture-handler/lib/typescript/handlers/gestures/nativeGesture").NativeGesture;
|
|
27
|
+
useTabContext: () => import("./types").ReanimatedTopTabNavigation.ContextType;
|
|
28
|
+
};
|
|
29
|
+
export declare const Tab: {
|
|
30
|
+
ScrollView: ({ children, style, ...props }: import("./components/wrappers/ScrollView").ScreenWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
ScreenWrapper: ({ children, ...viewProps }: import("./components/wrappers/ScreenWrapper").ScreenWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
TabBarBaseComponent: ({ children, navigate, navigationState, position, style, }: import("./components/elements/TabBarBaseComponent").TabBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
TabBarLabelBaseComponent: ({ index, ...props }: import("./components/elements/TabBarLabelBaseComponent").TabBarLabelTypes) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
};
|
|
10
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAE9F,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;CAMpB,CAAC;AAEF,eAAO,MAAM,GAAG;;;;;CAKf,CAAC"}
|
|
@@ -14,11 +14,10 @@ export interface RenderTabsParams {
|
|
|
14
14
|
navigationState: NavigationState;
|
|
15
15
|
position: SharedValue<number>;
|
|
16
16
|
}
|
|
17
|
-
interface TabBarProps extends RenderTabsParams {
|
|
17
|
+
export interface TabBarProps extends RenderTabsParams {
|
|
18
18
|
children?: React.ReactNode;
|
|
19
19
|
navigate: (route: Route) => void;
|
|
20
20
|
style?: AnimatedStyle;
|
|
21
21
|
}
|
|
22
22
|
export declare const TabBarBaseComponent: ({ children, navigate, navigationState, position, style, }: TabBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export {};
|
|
24
23
|
//# sourceMappingURL=TabBarBaseComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,MAAM,WAAW,WAAY,SAAQ,gBAAgB;IACnD,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 +1,7 @@
|
|
|
1
|
-
interface TabBarLabelTypes {
|
|
1
|
+
export interface TabBarLabelTypes {
|
|
2
2
|
focused: boolean;
|
|
3
3
|
index: number;
|
|
4
4
|
title: string;
|
|
5
5
|
}
|
|
6
6
|
export declare const TabBarLabelBaseComponent: ({ index, ...props }: TabBarLabelTypes) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
8
7
|
//# sourceMappingURL=TabBarLabelBaseComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBarLabelBaseComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/elements/TabBarLabelBaseComponent.tsx"],"names":[],"mappings":"AAOA,
|
|
1
|
+
{"version":3,"file":"TabBarLabelBaseComponent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/elements/TabBarLabelBaseComponent.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,wBAAwB,wBAGlC,gBAAgB,4CAgClB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type ReanimatedTopTabNavigation } from '../types';
|
|
2
2
|
export declare const Context: import("react").Context<ReanimatedTopTabNavigation.ContextType>;
|
|
3
3
|
export declare const Provider: import("react").MemoExoticComponent<({ children, config, screenProperties, }: ReanimatedTopTabNavigation.TopTabContextProps) => import("react/jsx-runtime").JSX.Element>;
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=TabContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabContext.d.ts","sourceRoot":"","sources":["../../../../../src/context/TabContext.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"}
|
package/lib/typescript/module/src/context/{TopTabContext.hooks.d.ts → TabContext.hooks.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReanimatedTopTabNavigation } from 'react-navigation-reanimated-top-tabs';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const TabContextHooks: {
|
|
3
3
|
useResetApproachingScreenScrollOffset: ({ screenRefs, transformationX, screenProperties, currentYPosition, }: Pick<ReanimatedTopTabNavigation.ContextType, "screenRefs" | "screenProperties" | "currentYPosition" | "transformationX">) => void;
|
|
4
4
|
};
|
|
5
|
-
//# sourceMappingURL=
|
|
5
|
+
//# sourceMappingURL=TabContext.hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabContext.hooks.d.ts","sourceRoot":"","sources":["../../../../../src/context/TabContext.hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAmDvF,eAAO,MAAM,eAAe;kHA5CzB,IAAI,CACL,0BAA0B,CAAC,WAAW,EACtC,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,iBAAiB,CAC3E;CA2CA,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tab.hooks.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/Tab.hooks.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa,2DAazB,CAAC;AAEF,eAAO,MAAM,gBAAgB,2GAS5B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;CA+C/B,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;CAO/B,CAAC;AAEF,eAAO,MAAM,SAAS;;CAQrB,CAAC;AAGF,eAAO,MAAM,aAAa,SAAU,MAAM,EAAE;kBAWrB,MAAM,OAAO,GAAG;;;qBAJD,GAAG;;;CASxC,CAAC"}
|
|
@@ -1,10 +1,35 @@
|
|
|
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
1
|
export { type ReanimatedTopTabNavigation } from './types';
|
|
2
|
+
export { createReanimatedTopTabNavigator } from './navigator/createReanimatedTopTabNavigator';
|
|
3
|
+
export declare const TabHooks: {
|
|
4
|
+
useHeader: () => {
|
|
5
|
+
hideHeader: () => void;
|
|
6
|
+
};
|
|
7
|
+
useScreenProperties: () => {
|
|
8
|
+
innerLayout: import("react-native-reanimated").SharedValue<import("react-native").LayoutRectangle>;
|
|
9
|
+
nativeGesture: import("react-native-gesture-handler").NativeGesture;
|
|
10
|
+
outerLayout: import("react-native-reanimated").SharedValue<import("react-native").LayoutRectangle>;
|
|
11
|
+
scrollY: import("react-native-reanimated").SharedValue<number>;
|
|
12
|
+
};
|
|
13
|
+
useScreenScrollable: () => {
|
|
14
|
+
animatedProps: Partial<{
|
|
15
|
+
scrollEnabled: boolean;
|
|
16
|
+
}>;
|
|
17
|
+
bounces: boolean;
|
|
18
|
+
contentContainerStyle: {
|
|
19
|
+
paddingBottom: number;
|
|
20
|
+
};
|
|
21
|
+
onScroll: import("react-native-reanimated").ScrollHandlerProcessed<Record<string, unknown>>;
|
|
22
|
+
style: {
|
|
23
|
+
minHeight: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
useScreenGesture: () => import("react-native-gesture-handler/lib/typescript/handlers/gestures/nativeGesture").NativeGesture;
|
|
27
|
+
useTabContext: () => import("./types").ReanimatedTopTabNavigation.ContextType;
|
|
28
|
+
};
|
|
29
|
+
export declare const Tab: {
|
|
30
|
+
ScrollView: ({ children, style, ...props }: import("./components/wrappers/ScrollView").ScreenWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
ScreenWrapper: ({ children, ...viewProps }: import("./components/wrappers/ScreenWrapper").ScreenWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
TabBarBaseComponent: ({ children, navigate, navigationState, position, style, }: import("./components/elements/TabBarBaseComponent").TabBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
TabBarLabelBaseComponent: ({ index, ...props }: import("./components/elements/TabBarLabelBaseComponent").TabBarLabelTypes) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
};
|
|
10
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAE9F,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;CAMpB,CAAC;AAEF,eAAO,MAAM,GAAG;;;;;CAKf,CAAC"}
|