@@ -605,7 +605,16 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
605605 animatedNextPositionIndex . value = INITIAL_VALUE ;
606606 animatedContainerHeightDidChange . value = false ;
607607 } ,
608- [ ]
608+ [
609+ animatedAnimationSource ,
610+ animatedAnimationState ,
611+ animatedContainerHeightDidChange ,
612+ animatedCurrentIndex ,
613+ animatedNextPosition ,
614+ animatedNextPositionIndex ,
615+ isAnimatedOnMount ,
616+ isForcedClosing ,
617+ ]
609618 ) ;
610619 const animateToPosition : AnimateToPositionType = useCallback (
611620 function animateToPosition (
@@ -690,50 +699,69 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
690699 keyboardBehavior ,
691700 _providedAnimationConfigs ,
692701 _providedOverrideReduceMotion ,
702+ animateToPositionCompleted ,
703+ animatedAnimationSource ,
704+ animatedAnimationState ,
705+ animatedKeyboardHeightInContainer ,
706+ animatedKeyboardState ,
707+ animatedNextPosition ,
708+ animatedNextPositionIndex ,
709+ animatedPosition ,
710+ animatedSnapPoints ,
711+ stopAnimation ,
693712 ]
694713 ) ;
695714 /**
696715 * Set to position without animation.
697716 *
698717 * @param targetPosition position to be set.
699718 */
700- const setToPosition = useCallback ( function setToPosition (
701- targetPosition : number
702- ) {
703- 'worklet' ;
704- if (
705- targetPosition === animatedPosition . value ||
706- targetPosition === undefined ||
707- ( animatedAnimationState . value === ANIMATION_STATE . RUNNING &&
708- targetPosition === animatedNextPosition . value )
709- ) {
710- return ;
711- }
719+ const setToPosition = useCallback (
720+ function setToPosition ( targetPosition : number ) {
721+ 'worklet' ;
722+ if (
723+ targetPosition === animatedPosition . value ||
724+ targetPosition === undefined ||
725+ ( animatedAnimationState . value === ANIMATION_STATE . RUNNING &&
726+ targetPosition === animatedNextPosition . value )
727+ ) {
728+ return ;
729+ }
712730
713- if ( __DEV__ ) {
714- runOnJS ( print ) ( {
715- component : BottomSheet . name ,
716- method : setToPosition . name ,
717- params : {
718- currentPosition : animatedPosition . value ,
719- targetPosition,
720- } ,
721- } ) ;
722- }
731+ if ( __DEV__ ) {
732+ runOnJS ( print ) ( {
733+ component : ' BottomSheet' ,
734+ method : setToPosition . name ,
735+ params : {
736+ currentPosition : animatedPosition . value ,
737+ targetPosition,
738+ } ,
739+ } ) ;
740+ }
723741
724- /**
725- * store next position
726- */
727- animatedNextPosition . value = targetPosition ;
728- animatedNextPositionIndex . value =
729- animatedSnapPoints . value . indexOf ( targetPosition ) ;
742+ /**
743+ * store next position
744+ */
745+ animatedNextPosition . value = targetPosition ;
746+ animatedNextPositionIndex . value =
747+ animatedSnapPoints . value . indexOf ( targetPosition ) ;
730748
731- stopAnimation ( ) ;
749+ stopAnimation ( ) ;
732750
733- // set values
734- animatedPosition . value = targetPosition ;
735- animatedContainerHeightDidChange . value = false ;
736- } , [ ] ) ;
751+ // set values
752+ animatedPosition . value = targetPosition ;
753+ animatedContainerHeightDidChange . value = false ;
754+ } ,
755+ [
756+ animatedAnimationState ,
757+ animatedContainerHeightDidChange ,
758+ animatedNextPosition ,
759+ animatedNextPositionIndex ,
760+ animatedPosition ,
761+ animatedSnapPoints ,
762+ stopAnimation ,
763+ ]
764+ ) ;
737765 //#endregion
738766
739767 //#region private methods
@@ -845,6 +873,8 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
845873 keyboardBehavior ,
846874 keyboardBlurBehavior ,
847875 _providedIndex ,
876+ android_keyboardInputMode ,
877+ animatedClosedPosition ,
848878 ]
849879 ) ;
850880
@@ -969,7 +999,25 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
969999 animationConfigs
9701000 ) ;
9711001 } ,
972- [ getEvaluatedPosition , animateToPosition , setToPosition , reduceMotion ]
1002+ [
1003+ getEvaluatedPosition ,
1004+ animateToPosition ,
1005+ setToPosition ,
1006+ reduceMotion ,
1007+ animateOnMount ,
1008+ animatedAnimationState ,
1009+ animatedClosedPosition ,
1010+ animatedContainerHeightDidChange ,
1011+ animatedCurrentIndex ,
1012+ animatedIndex ,
1013+ animatedNextPositionIndex ,
1014+ animatedPosition ,
1015+ animatedSnapPoints ,
1016+ isAnimatedOnMount ,
1017+ isForcedClosing ,
1018+ isInTemporaryPosition ,
1019+ isLayoutCalculated ,
1020+ ]
9731021 ) ;
9741022 //#endregion
9751023
@@ -1039,7 +1087,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
10391087 'worklet' ;
10401088 if ( __DEV__ ) {
10411089 print ( {
1042- component : BottomSheet . name ,
1090+ component : ' BottomSheet' ,
10431091 method : handleSnapToPosition . name ,
10441092 params : {
10451093 position,
@@ -1083,12 +1131,11 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
10831131 } ,
10841132 [
10851133 animateToPosition ,
1086- bottomInset ,
1087- topInset ,
10881134 isLayoutCalculated ,
10891135 isForcedClosing ,
10901136 animatedContainerHeight ,
1091- animatedPosition ,
1137+ animatedNextPosition ,
1138+ isInTemporaryPosition ,
10921139 ]
10931140 ) ;
10941141 // biome-ignore lint/correctness/useExhaustiveDependencies(BottomSheet.name): used for debug only
0 commit comments