import type { FlatListProps, NativeScrollEvent, NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native'; import type { PageDim } from './NativePdfUtil'; export type PageMeasurement = { /** * Display height of the page. */ itemHeight: number; /** * Position (dp) within the FlatList. */ offset: number; }; /** * Optional props, forwarded to the underlying `FlatList` component. */ type BaseListProps = { /** * These styles will be applied to the scroll view content container which * wraps all of the child views. */ contentContainerStyle?: StyleProp; /** * Instead of starting at the top with the first item, start at * initialScrollIndex. */ initialScrollIndex?: number; /** * Rendered when the list is empty. Can be a React Component Class, a render * function, or a rendered element. */ ListEmptyComponent?: FlatListProps['ListEmptyComponent']; /** * Called when the momentum scroll starts (scroll which occurs as the scroll * view starts gliding). */ onMomentumScrollBegin?: (event: NativeSyntheticEvent) => void; /** * Called when the momentum scroll ends (scroll which occurs as the scroll * view glides to a stop). */ onMomentumScrollEnd?: (event: NativeSyntheticEvent) => void; /** * Fires at most once per frame during scrolling. The frequency of the events * can be controlled using the scrollEventThrottle prop. */ onScroll?: (event: NativeSyntheticEvent) => void; /** * Called when the user begins to drag the scroll view. */ onScrollBeginDrag?: (event: NativeSyntheticEvent) => void; /** * Called when the user stops dragging the scroll view and it either stops or * begins to glide. */ onScrollEndDrag?: (event: NativeSyntheticEvent) => void; /** * A RefreshControl component, used to provide pull-to-refresh * functionality for the ScrollView. */ refreshControl?: FlatListProps['refreshControl']; /** * Render a custom scroll component, e.g. with a differently styled `RefreshControl`. */ renderScrollComponent?: FlatListProps['renderScrollComponent']; /** * This controls how often the scroll event will be fired while scrolling * (in events per seconds). A higher number yields better accuracy for code * that is tracking the scroll position, but can lead to scroll performance * problems due to the volume of information being send over the bridge. The * default value is zero, which means the scroll event will be sent only once * each time the view is scrolled. * Only available on iOS. */ scrollEventThrottle?: number; }; export type PdfRef = { /** * Scroll to the specified page (0-indexed). */ scrollToIndex(index: number): void; /** * Scroll to the specified offset. */ scrollToOffset(offset: number): void; }; /** * Display a pdf. */ export declare const Pdf: import("react").ForwardRefExoticComponent void; /** * Callback to handle pdf load completion. * * Passed the page count of the loaded pdf. */ onLoadComplete?: (numberOfPages: number) => void; /** * Callback to receive layout details of all pages. */ onMeasurePages?: (measurements: PageMeasurement[]) => void; /** * Size pages such that each page can be displayed without cutoff. Applies * when device is in the specified orientation. */ shrinkToFit?: "never" | "portrait" | "landscape" | "always"; /** * Document to display. */ source: string; /** * Used to locate this view in end-to-end tests. */ testID?: string; } & import("react").RefAttributes>; export {}; //# sourceMappingURL=Pdf.d.ts.map