@@ -7,35 +7,73 @@ import type {
77} from 'react-native' ;
88import type { SharedValue } from 'react-native-reanimated' ;
99
10+ /**
11+ * Props for the ImageViewer component
12+ */
1013export interface ImageViewerProps {
14+ /** The image source to display */
1115 source : ImageSourcePropType ;
16+ /** Optional styles to apply to the image */
1217 imageStyle ?: ImageStyle ;
18+ /** Whether to enable pan down to close gesture */
1319 enablePanDownToClose ?: boolean ;
20+ /** Shared value for layout translation on Y axis */
1421 layoutTranslateY : SharedValue < number > ;
22+ /** Callback function when the viewer is closed */
1523 onClose ?: ( ) => void ;
1624}
25+
26+ /**
27+ * Props for the Gallery component
28+ */
1729export interface GalleryProps
18- extends Omit < FlatListProps < ImageSourcePropType > , 'data' > {
30+ extends Omit < FlatListProps < ImageSourcePropType > , 'data' | 'renderItem' > {
31+ /** Array of image sources to display in the gallery */
1932 data : ImageSourcePropType [ ] ;
33+ /** Optional styles to apply to the gallery container */
2034 style ?: ViewStyle ;
35+ /** Optional styles to apply to each image */
2136 imageStyle ?: ImageStyle ;
37+ /** Optional styles to apply to the gallery container */
2238 containerStyle ?: ViewStyle ;
39+ /** Optional styles to apply to the content container */
2340 contentContainerStyle ?: ViewStyle ;
41+ /** Color of the backdrop (default: 'black') */
2442 backdropColor ?: string ;
43+ /** Initial index to display (default: 0) */
2544 initialIndex ?: number ;
45+ /** Whether to enable pan down to close gesture */
2646 enablePanDownToClose ?: boolean ;
47+ /** Function to render header content */
2748 renderHeader ?: ( ) => React . ReactNode ;
49+ /** Function to render footer content */
2850 renderFooter ?: ( ) => React . ReactNode ;
2951}
52+
53+ /**
54+ * Reference methods for the Gallery component
55+ */
3056export interface GalleryRef {
57+ /** Show the gallery at the specified index */
3158 show : ( index ?: number ) => void ;
59+ /** Hide the gallery */
3260 hide : ( ) => void ;
61+ /** Whether the gallery is currently visible */
3362 isVisible : boolean ;
3463}
64+
65+ /**
66+ * Internal control interface for the Gallery component
67+ */
3568export interface GalleryControl {
69+ /** Show the gallery at the specified index */
3670 show : ( index ?: number ) => void ;
71+ /** Hide the gallery */
3772 hide : ( ) => void ;
73+ /** Shared value indicating whether the gallery is visible */
3874 isVisible : SharedValue < boolean > ;
75+ /** Shared value for translation on Y axis */
3976 translateY : SharedValue < number > ;
77+ /** Reference to the FlatList component */
4078 flatListRef : React . RefObject < FlatList > ;
4179}
0 commit comments