@rific/scroll-view 0.1.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 (46) hide show
  1. package/README.md +319 -0
  2. package/dist/index.d.mts +210 -0
  3. package/dist/index.d.ts +210 -0
  4. package/dist/index.js +2760 -0
  5. package/dist/index.mjs +2709 -0
  6. package/package.json +105 -0
  7. package/src/CustomList.tsx +127 -0
  8. package/src/FlatList.tsx +139 -0
  9. package/src/PullSearch.tsx +99 -0
  10. package/src/ScrollView.tsx +89 -0
  11. package/src/ScrollViewContext.ts +50 -0
  12. package/src/ScrollViewFooter.tsx +48 -0
  13. package/src/ScrollViewHeader.tsx +159 -0
  14. package/src/ScrollViewProvider.tsx +62 -0
  15. package/src/ScrollViewSettingsContext.ts +27 -0
  16. package/src/ScrollViewSettingsProvider.tsx +31 -0
  17. package/src/SectionList.tsx +195 -0
  18. package/src/__mocks__/auto-paper.ts +8 -0
  19. package/src/__mocks__/flash-list.ts +20 -0
  20. package/src/__mocks__/react-native-gesture-handler.ts +13 -0
  21. package/src/__mocks__/react-native-keyboard-controller.ts +11 -0
  22. package/src/__mocks__/react-native-paper.ts +22 -0
  23. package/src/__mocks__/react-native-reanimated.ts +30 -0
  24. package/src/__mocks__/react-native-safe-area-context.ts +2 -0
  25. package/src/__mocks__/react-native.ts +30 -0
  26. package/src/__tests__/CustomList.test.tsx +61 -0
  27. package/src/__tests__/FlatList.test.tsx +52 -0
  28. package/src/__tests__/PullSearch.test.tsx +38 -0
  29. package/src/__tests__/ScrollView.test.tsx +23 -0
  30. package/src/__tests__/ScrollViewHeader.test.tsx +28 -0
  31. package/src/__tests__/ScrollViewProvider.test.tsx +65 -0
  32. package/src/__tests__/SectionList.test.tsx +88 -0
  33. package/src/index.ts +26 -0
  34. package/src/internal/FAB.tsx +6 -0
  35. package/src/internal/HorizontalDots.tsx +99 -0
  36. package/src/internal/RefreshControl.tsx +5 -0
  37. package/src/internal/ScrollViewChip.tsx +22 -0
  38. package/src/internal/useScrollHandler.ts +101 -0
  39. package/src/internal/useScrollList.ts +64 -0
  40. package/src/internal/useStickyHeaders.ts +149 -0
  41. package/src/out.txt +61 -0
  42. package/src/redux/scrollViewSlice.ts +14 -0
  43. package/src/useKeyboardInset.ts +21 -0
  44. package/src/useScrollInit.ts +112 -0
  45. package/src/useScrollView.ts +8 -0
  46. package/src/useScrollViewSettings.ts +5 -0
package/README.md ADDED
@@ -0,0 +1,319 @@
1
+ # @rific/scroll-view
2
+
3
+ Blur-chrome scroll system for React Native. Drop-in replacements for `ScrollView`, `FlatList`, and `SectionList` with floating headers and footers, pull-to-search, keyboard awareness, horizontal paging, and frosted-glass chrome.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ npm install @rific/scroll-view
9
+ ```
10
+
11
+ ### Peer dependencies
12
+
13
+ ```sh
14
+ npm install @rific/auto-paper react-native-reanimated react-native-gesture-handler react-native-safe-area-context react-native-paper react-native-keyboard-controller
15
+ ```
16
+
17
+ ## Quick start
18
+
19
+ Wrap your screen in `ScrollViewProvider`, add a `ScrollViewHeader`, then drop in one of the scroll components.
20
+
21
+ ```tsx
22
+ import { ScrollViewProvider, ScrollViewHeader, FlatList } from '@rific/scroll-view'
23
+
24
+ export default function MyScreen() {
25
+ return (
26
+ <ScrollViewProvider>
27
+ <ScrollViewHeader title="My Screen" backAction={() => router.back()} />
28
+ <FlatList data={items} renderItem={({ item }) => <Row item={item} />} keyExtractor={(item) => item.id} />
29
+ </ScrollViewProvider>
30
+ )
31
+ }
32
+ ```
33
+
34
+ For app-wide defaults, wrap your root layout with `ScrollViewSettingsProvider`.
35
+
36
+ ```tsx
37
+ import { ScrollViewSettingsProvider } from '@rific/scroll-view'
38
+
39
+ export default function RootLayout({ children }) {
40
+ return (
41
+ <ScrollViewSettingsProvider value={{ snapBack: true }}>
42
+ {children}
43
+ </ScrollViewSettingsProvider>
44
+ )
45
+ }
46
+ ```
47
+
48
+ ---
49
+
50
+ ## Components
51
+
52
+ ### `ScrollViewProvider`
53
+
54
+ Screen-level provider that owns header/footer state and scroll position. Must wrap `ScrollViewHeader`, `ScrollViewFooter`, and the scroll component.
55
+
56
+ | Prop | Type | Default | Description |
57
+ |------|------|---------|-------------|
58
+ | `blur` | `boolean` | system | Enable frosted-glass backdrop on header/footer |
59
+ | `fixed` | `boolean` | `false` | Pin both header and footer (overrides `headerFixed`/`footerFixed`) |
60
+ | `headerFixed` | `boolean` | `false` | Pin header; overrides settings default |
61
+ | `footerFixed` | `boolean` | `false` | Pin footer; overrides settings default |
62
+ | `snapBack` | `boolean` | `false` | Snap header and footer back when scrolling up |
63
+ | `snapBackHeader` | `boolean` | — | Override `snapBack` for header only |
64
+ | `snapBackFooter` | `boolean` | — | Override `snapBack` for footer only |
65
+ | `tabBarHeight` | `number` | `60` | Used to compute safe scroll height |
66
+
67
+ ---
68
+
69
+ ### `ScrollViewHeader`
70
+
71
+ Floating header with blur backdrop, title, back action, trailing action, and built-in progress bar. Place it as a direct child of `ScrollViewProvider`.
72
+
73
+ | Prop | Type | Default | Description |
74
+ |------|------|---------|-------------|
75
+ | `title` | `string` | — | Center title text |
76
+ | `caption` | `string` | — | Subtitle below title |
77
+ | `centerContent` | `ReactNode` | — | Replaces title/caption with custom content |
78
+ | `children` | `ReactNode` | — | Left-side content (icon buttons, etc.) |
79
+ | `backAction` | `() => void` | — | Renders a back button and calls this on press |
80
+ | `backActionFixed` | `boolean` | settings | Keep back button visible as header scrolls away |
81
+ | `trailingAction` | `ReactNode` | — | Right-side floating action |
82
+ | `trailingActionFixed` | `boolean` | `true` | Keep trailing action visible as header scrolls away |
83
+ | `actionSize` | `number` | `48` | Size of floating action buttons |
84
+ | `iconSize` | `number` | `actionSize/2` | Icon size inside action buttons |
85
+ | `actionStyle` | `ViewStyle` | — | Style applied to action button backgrounds |
86
+ | `style` | `ViewStyle` | — | Style applied to the header content area |
87
+ | `topInset` | `boolean` | `true` | Pad for safe area top inset |
88
+
89
+ ---
90
+
91
+ ### `ScrollViewFooter`
92
+
93
+ Floating footer with blur backdrop. Place it as a direct child of `ScrollViewProvider`.
94
+
95
+ | Prop | Type | Description |
96
+ |------|------|-------------|
97
+ | `children` | `ReactNode` | Footer content |
98
+ | `style` | `ViewStyle` | Style applied to the inner row |
99
+
100
+ ---
101
+
102
+ ### `ScrollView`
103
+
104
+ Drop-in for React Native's `ScrollView`. Accepts all `ScrollViewProps` plus:
105
+
106
+ | Prop | Type | Description |
107
+ |------|------|-------------|
108
+ | `footerFixed` | `boolean` | Pin footer for this scroll view; overrides provider |
109
+ | `headerFixed` | `boolean` | Pin header for this scroll view; overrides provider |
110
+ | `gesture` | `GestureType` | Compose with an external RNGH gesture |
111
+ | `keyboardAware` | `boolean` | Add keyboard height to bottom content inset |
112
+ | `onRefresh` | `() => void` | Enables pull-to-refresh |
113
+ | `refreshing` | `boolean` | Controlled refreshing state |
114
+ | `pullSearchHeight` | `number` | Reserve space above content for `PullSearch` |
115
+ | `ref` | `RefObject<RNScrollView>` | Forward ref to the underlying scroll view |
116
+
117
+ ---
118
+
119
+ ### `FlatList`
120
+
121
+ Drop-in for React Native's `FlatList`. Accepts all `FlatListProps<T>` plus:
122
+
123
+ | Prop | Type | Description |
124
+ |------|------|-------------|
125
+ | `renderFilters` | `ReactNode` | Rendered below `ListHeaderComponent`, above list items |
126
+ | `footerFixed` | `boolean` | Pin footer for this list; overrides provider |
127
+ | `headerFixed` | `boolean` | Pin header for this list; overrides provider |
128
+ | `gesture` | `GestureType` | Compose with an external RNGH gesture |
129
+ | `keyboardAware` | `boolean` | Add keyboard height to bottom content inset |
130
+ | `onRefresh` | `() => Promise<void> \| void` | Enables pull-to-refresh |
131
+ | `pullSearchHeight` | `number` | Reserve space above content for `PullSearch` |
132
+ | `ref` | `RefObject<RNFlatList>` | Forward ref to the underlying list |
133
+
134
+ Performance props are user-overridable with sensible defaults:
135
+
136
+ | Prop | Default |
137
+ |------|---------|
138
+ | `initialNumToRender` | `20` |
139
+ | `maxToRenderPerBatch` | `50` |
140
+ | `windowSize` | `100` |
141
+ | `removeClippedSubviews` | `false` |
142
+ | `showsHorizontalScrollIndicator` | `horizontal` |
143
+ | `showsVerticalScrollIndicator` | `!horizontal` |
144
+
145
+ When `horizontal` and `pagingEnabled` are both true and `data` has more than one item, horizontal dot indicators render automatically.
146
+
147
+ ---
148
+
149
+ ### `SectionList`
150
+
151
+ Drop-in for React Native's `SectionList`. Accepts all `SectionListProps<ItemT, SectionT>` (except `horizontal`) plus the same set of library props as `FlatList`. Custom sticky section headers are supported — pass `renderSectionHeader` and `stickySectionHeadersEnabled` and the library renders them via an animated overlay so they properly account for the floating header offset.
152
+
153
+ ---
154
+
155
+ ### `CustomList`
156
+
157
+ Wraps any list component that follows the FlatList scroll API (e.g. FlashList). Pass the component via the `component` prop; all other props are forwarded.
158
+
159
+ ```tsx
160
+ import { FlashList } from '@shopify/flash-list'
161
+ import { CustomList } from '@rific/scroll-view'
162
+
163
+ <CustomList component={FlashList} data={items} renderItem={renderItem} estimatedItemSize={80} />
164
+ ```
165
+
166
+ | Prop | Type | Description |
167
+ |------|------|-------------|
168
+ | `component` | `ComponentType<P>` | The list component to render |
169
+ | `renderFilters` | `ReactNode` | Rendered below `ListHeaderComponent`, above list items |
170
+ | `footerFixed` | `boolean` | Pin footer; overrides provider |
171
+ | `headerFixed` | `boolean` | Pin header; overrides provider |
172
+ | `gesture` | `GestureType` | Compose with an external RNGH gesture |
173
+ | `keyboardAware` | `boolean` | Add keyboard height to bottom content inset |
174
+ | `onRefresh` | `() => Promise<void> \| void` | Enables pull-to-refresh |
175
+ | `pullSearchHeight` | `number` | Reserve space above content for `PullSearch` |
176
+ | `scrollRef` | `RefObject<{ scrollToOffset }>` | Forward ref to the underlying list |
177
+
178
+ The underlying component receives `contentInset`, `contentOffset`, `onScroll`, `refreshControl`, and `scrollEventThrottle` — props it must support for the library to function.
179
+
180
+ ---
181
+
182
+ ### `PullSearch`
183
+
184
+ A search bar that lives above the list content and is revealed by pulling down. Use alongside `pullSearchHeight` on the scroll component.
185
+
186
+ ```tsx
187
+ import { useRef, useState } from 'react'
188
+ import { FlatList, PullSearch, type PullSearchHandle } from '@rific/scroll-view'
189
+
190
+ export default function SearchScreen() {
191
+ const searchRef = useRef<PullSearchHandle>(null)
192
+ const [query, setQuery] = useState('')
193
+ const [searchHeight, setSearchHeight] = useState(0)
194
+
195
+ return (
196
+ <ScrollViewProvider>
197
+ <ScrollViewHeader title="Search" />
198
+ <FlatList
199
+ data={filteredItems}
200
+ renderItem={renderItem}
201
+ keyExtractor={(item) => item.id}
202
+ pullSearchHeight={searchHeight}
203
+ ListHeaderComponent={
204
+ <PullSearch
205
+ ref={searchRef}
206
+ value={query}
207
+ onChangeText={setQuery}
208
+ onHeightChange={setSearchHeight}
209
+ placeholder="Search…"
210
+ debounce
211
+ />
212
+ }
213
+ />
214
+ </ScrollViewProvider>
215
+ )
216
+ }
217
+ ```
218
+
219
+ | Prop | Type | Description |
220
+ |------|------|-------------|
221
+ | `onChangeText` | `(text: string) => void` | Called with trimmed search text |
222
+ | `onHeightChange` | `(height: number) => void` | Required — pass the height back as `pullSearchHeight` |
223
+ | `value` | `string` | Controlled value |
224
+ | `placeholder` | `string` | Placeholder text |
225
+ | `debounce` | `boolean` | Debounce `onChangeText` by 500ms |
226
+
227
+ **Ref methods**: `focus()`, `blur()`
228
+
229
+ ---
230
+
231
+ ## Hooks
232
+
233
+ ### `useScrollView`
234
+
235
+ Access scroll state and progress control from anywhere inside a `ScrollViewProvider`.
236
+
237
+ ```tsx
238
+ const { scrollPosition, scrollHeight, progressing, progress, setProgress, setProgressing } = useScrollView()
239
+ ```
240
+
241
+ | Return | Type | Description |
242
+ |--------|------|-------------|
243
+ | `scrollPosition` | `SharedValue<number>` | Live scroll offset (Reanimated worklet-safe) |
244
+ | `scrollHeight` | `number` | Visible scroll area height (window minus header/footer) |
245
+ | `progressing` | `boolean` | Whether the header progress bar is visible |
246
+ | `progress` | `number \| null` | Progress bar value (0–1), or `null` for indeterminate |
247
+ | `setProgress` | `(p: number \| null) => void` | Set progress; pass `null` for indeterminate |
248
+ | `setProgressing` | `(b: boolean) => void` | Show/hide the progress bar |
249
+
250
+ ```tsx
251
+ // Show an indeterminate progress bar while loading
252
+ useEffect(() => {
253
+ setProgressing(true)
254
+ fetchData().finally(() => setProgressing(false))
255
+ }, [])
256
+ ```
257
+
258
+ ---
259
+
260
+ ### `useScrollViewSettings`
261
+
262
+ Read and update scroll settings at runtime from anywhere inside `ScrollViewSettingsProvider`.
263
+
264
+ ```tsx
265
+ const { settings, set } = useScrollViewSettings()
266
+
267
+ // Toggle snap-back on the fly
268
+ set({ snapBack: true })
269
+ ```
270
+
271
+ ---
272
+
273
+ ### `useKeyboardInset`
274
+
275
+ Returns the current keyboard height, updating as the keyboard animates in and out. Useful when you need the keyboard height outside of a scroll component.
276
+
277
+ ```tsx
278
+ const keyboardHeight = useKeyboardInset()
279
+ ```
280
+
281
+ ---
282
+
283
+ ## Redux integration
284
+
285
+ If your app uses Redux, you can drive scroll settings from the store instead of (or in addition to) `ScrollViewSettingsProvider`.
286
+
287
+ ```ts
288
+ // store.ts
289
+ import { scrollViewReducer } from '@rific/scroll-view'
290
+
291
+ export const store = configureStore({
292
+ reducer: {
293
+ scrollView: scrollViewReducer,
294
+ // ...
295
+ }
296
+ })
297
+ ```
298
+
299
+ ```ts
300
+ // Dispatch initial settings (e.g. from a remote config)
301
+ store.dispatch(scrollViewActions.initialize({ snapBack: true, headerFixed: false, footerFixed: false, backActionFixed: true }))
302
+ ```
303
+
304
+ ---
305
+
306
+ ## Settings reference
307
+
308
+ `ScrollViewSettings` defaults:
309
+
310
+ | Setting | Default | Description |
311
+ |---------|---------|-------------|
312
+ | `headerFixed` | `false` | Pin header globally |
313
+ | `footerFixed` | `false` | Pin footer globally |
314
+ | `snapBack` | `false` | Snap header and footer back when scrolling up |
315
+ | `snapBackHeader` | — | Override `snapBack` for header only |
316
+ | `snapBackFooter` | — | Override `snapBack` for footer only |
317
+ | `backActionFixed` | `true` | Keep back button visible as header scrolls away |
318
+
319
+ Settings cascade: `ScrollViewSettingsProvider` → `ScrollViewProvider` → individual scroll component props. More specific values always win.
@@ -0,0 +1,210 @@
1
+ import * as react from 'react';
2
+ import { ComponentType, ReactNode, RefObject } from 'react';
3
+ import { NativeSyntheticEvent, NativeScrollEvent, StyleProp, ViewStyle, FlatListProps as FlatListProps$1, FlatList as FlatList$1, ScrollViewProps as ScrollViewProps$1, ScrollView as ScrollView$1, SectionListProps as SectionListProps$1, SectionList as SectionList$1 } from 'react-native';
4
+ import { GestureType } from 'react-native-gesture-handler';
5
+ import * as redux from 'redux';
6
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
7
+ import { PayloadAction } from '@reduxjs/toolkit';
8
+ import * as react_native_reanimated from 'react-native-reanimated';
9
+ import { SharedValue } from 'react-native-reanimated';
10
+
11
+ type ScrollToOffsetRef = {
12
+ scrollToOffset: (params: {
13
+ animated?: boolean;
14
+ offset: number;
15
+ }) => void;
16
+ };
17
+ type CustomListProps<P extends object> = Omit<P, 'contentInset' | 'contentOffset' | 'onScroll' | 'refreshControl' | 'scrollEventThrottle'> & {
18
+ component: ComponentType<P>;
19
+ renderFilters?: ReactNode;
20
+ footerFixed?: boolean;
21
+ gesture?: GestureType;
22
+ headerFixed?: boolean;
23
+ keyboardAware?: boolean;
24
+ onMomentumScrollEnd?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
25
+ onRefresh?: () => Promise<void> | void;
26
+ onScrollBeginDrag?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
27
+ onScrollEndDrag?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
28
+ pullSearchHeight?: number;
29
+ scrollRef?: RefObject<ScrollToOffsetRef | null>;
30
+ style?: StyleProp<ViewStyle>;
31
+ };
32
+ declare const CustomListInner: <P extends object>({ component: List, renderFilters, footerFixed: footerFixedProp, gesture, headerFixed: headerFixedProp, keyboardAware, onMomentumScrollEnd: externalMomentumScrollEnd, onRefresh, onScrollBeginDrag: externalScrollBeginDrag, onScrollEndDrag: externalScrollEndDrag, pullSearchHeight, scrollRef, style, ...props }: CustomListProps<P>) => react.JSX.Element;
33
+ declare const CustomList: typeof CustomListInner;
34
+
35
+ type FlatListProps<T> = Omit<FlatListProps$1<T>, 'onRefresh' | 'refreshing'> & {
36
+ renderFilters?: ReactNode;
37
+ footerFixed?: boolean;
38
+ gesture?: GestureType;
39
+ headerFixed?: boolean;
40
+ keyboardAware?: boolean;
41
+ onMomentumScrollEnd?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
42
+ onRefresh?: () => Promise<void> | void;
43
+ onScrollBeginDrag?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
44
+ onScrollEndDrag?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
45
+ pullSearchHeight?: number;
46
+ ref?: RefObject<FlatList$1 | null>;
47
+ };
48
+ declare const FlatListInner: <T>({ contentContainerStyle: externalContentContainerStyle, data, initialNumToRender, maxToRenderPerBatch, renderFilters, footerFixed: footerFixedProp, gesture, headerFixed: headerFixedProp, horizontal, keyboardAware, ListHeaderComponent: externalListHeaderComponent, onMomentumScrollEnd: externalMomentumScrollEnd, onRefresh, onScrollBeginDrag: externalScrollBeginDrag, onScrollEndDrag: externalScrollEndDrag, pagingEnabled, pullSearchHeight, removeClippedSubviews, showsHorizontalScrollIndicator, showsVerticalScrollIndicator, style, onContentSizeChange, ref: externalRef, windowSize, ...props }: FlatListProps<T>) => react.JSX.Element;
49
+ declare const FlatList: typeof FlatListInner;
50
+
51
+ type PullSearchHandle = {
52
+ blur: () => void;
53
+ focus: () => void;
54
+ };
55
+ type PullSearchProps = {
56
+ debounce?: boolean;
57
+ onChangeText: (text: string) => void;
58
+ onHeightChange: (height: number) => void;
59
+ placeholder?: string;
60
+ value?: string;
61
+ };
62
+ declare const PullSearch: react.ForwardRefExoticComponent<PullSearchProps & react.RefAttributes<PullSearchHandle>>;
63
+
64
+ type ScrollViewSettings = {
65
+ backActionFixed: boolean;
66
+ footerFixed: boolean;
67
+ headerFixed: boolean;
68
+ snapBack: boolean;
69
+ snapBackFooter?: boolean;
70
+ snapBackHeader?: boolean;
71
+ };
72
+ declare const defaultScrollViewSettings: ScrollViewSettings;
73
+ type ScrollViewSettingsContextType = {
74
+ settings: ScrollViewSettings;
75
+ set: (patch: Partial<ScrollViewSettings>) => void;
76
+ };
77
+ declare const ScrollViewSettingsContext: react.Context<ScrollViewSettingsContextType>;
78
+
79
+ declare const scrollViewActions: _reduxjs_toolkit.CaseReducerActions<{
80
+ initialize: (_state: {
81
+ backActionFixed: boolean;
82
+ footerFixed: boolean;
83
+ headerFixed: boolean;
84
+ snapBack: boolean;
85
+ snapBackFooter?: boolean | undefined;
86
+ snapBackHeader?: boolean | undefined;
87
+ }, action: PayloadAction<ScrollViewSettings>) => ScrollViewSettings;
88
+ }, "scrollView">;
89
+ declare const scrollViewReducer: redux.Reducer<ScrollViewSettings>;
90
+
91
+ type ScrollViewProps = ScrollViewProps$1 & {
92
+ footerFixed?: boolean;
93
+ gesture?: GestureType;
94
+ headerFixed?: boolean;
95
+ keyboardAware?: boolean;
96
+ onRefresh?: () => void;
97
+ onScrollBeginDrag?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
98
+ onScrollEndDrag?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
99
+ pullSearchHeight?: number;
100
+ ref?: RefObject<ScrollView$1 | null>;
101
+ refreshing?: boolean;
102
+ };
103
+ declare const ScrollViewInner: ({ children, footerFixed: footerFixedProp, gesture, headerFixed: headerFixedProp, horizontal, keyboardAware, onMomentumScrollEnd: externalMomentumScrollEnd, onRefresh, onScrollBeginDrag: externalScrollBeginDrag, onScrollEndDrag: externalScrollEndDrag, pullSearchHeight, refreshing, style, ...props }: ScrollViewProps) => react.JSX.Element;
104
+ declare const ScrollView: typeof ScrollViewInner;
105
+
106
+ type ScrollViewContextType = {
107
+ blur: boolean;
108
+ footerHeight: number;
109
+ footerHeightShared: SharedValue<number>;
110
+ footerFixed: boolean;
111
+ footerOffset: SharedValue<number>;
112
+ headerHeight: number;
113
+ headerHeightShared: SharedValue<number>;
114
+ headerFixed: boolean;
115
+ headerOffset: SharedValue<number>;
116
+ progress: number | null;
117
+ pullSearchHeightShared: SharedValue<number>;
118
+ snapBackFooterShared: SharedValue<boolean>;
119
+ snapBackHeaderShared: SharedValue<boolean>;
120
+ progressing: boolean;
121
+ scrollHeight: number;
122
+ scrollPosition: SharedValue<number>;
123
+ setFooterHeight: (h: number) => void;
124
+ setHeaderHeight: (h: number) => void;
125
+ setProgress: (p: number | null) => void;
126
+ setProgressing: (b: boolean) => void;
127
+ tabBarHeight: number;
128
+ };
129
+ declare const ScrollViewContext: react.Context<ScrollViewContextType>;
130
+
131
+ type ScrollViewFooterProps = {
132
+ children?: ReactNode | ReactNode[];
133
+ style?: ViewStyle;
134
+ };
135
+ declare const ScrollViewFooter: ({ children, style }: ScrollViewFooterProps) => react.JSX.Element;
136
+
137
+ type ScrollViewHeaderProps = {
138
+ actionSize?: number;
139
+ actionStyle?: ViewStyle;
140
+ backAction?: () => void;
141
+ backActionFixed?: boolean;
142
+ caption?: string;
143
+ centerContent?: ReactNode;
144
+ children?: ReactNode | ReactNode[];
145
+ iconSize?: number;
146
+ style?: ViewStyle;
147
+ title?: string;
148
+ topInset?: boolean;
149
+ trailingAction?: ReactNode;
150
+ trailingActionFixed?: boolean;
151
+ };
152
+ declare const ScrollViewHeader: ({ actionSize, actionStyle, backAction, backActionFixed, caption, centerContent, children, iconSize, style, title, topInset, trailingAction, trailingActionFixed }: ScrollViewHeaderProps) => react.JSX.Element;
153
+
154
+ type ScrollViewProviderProps = {
155
+ blur?: boolean;
156
+ children: ReactNode;
157
+ fixed?: boolean;
158
+ footerFixed?: boolean;
159
+ headerFixed?: boolean;
160
+ snapBack?: boolean;
161
+ snapBackFooter?: boolean;
162
+ snapBackHeader?: boolean;
163
+ tabBarHeight?: number;
164
+ };
165
+ declare const ScrollViewProvider: ({ blur, children, fixed, footerFixed, headerFixed, snapBack, snapBackFooter, snapBackHeader, tabBarHeight }: ScrollViewProviderProps) => react.JSX.Element;
166
+
167
+ type ScrollViewSettingsProviderProps = {
168
+ children: ReactNode;
169
+ onChange?: (settings: ScrollViewSettings) => void;
170
+ value?: Partial<ScrollViewSettings>;
171
+ };
172
+ declare const ScrollViewSettingsProvider: ({ children, onChange, value }: ScrollViewSettingsProviderProps) => react.JSX.Element;
173
+
174
+ type SectionListProps<ItemT, SectionT extends {
175
+ data: ReadonlyArray<ItemT>;
176
+ } = {
177
+ data: ReadonlyArray<ItemT>;
178
+ }> = Omit<SectionListProps$1<ItemT, SectionT>, 'horizontal'> & {
179
+ renderFilters?: ReactNode;
180
+ footerFixed?: boolean;
181
+ gesture?: GestureType;
182
+ headerFixed?: boolean;
183
+ keyboardAware?: boolean;
184
+ onMomentumScrollEnd?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
185
+ onScrollBeginDrag?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
186
+ onScrollEndDrag?: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
187
+ pullSearchHeight?: number;
188
+ ref?: RefObject<SectionList$1<ItemT, SectionT> | null>;
189
+ };
190
+ declare const SectionListInner: <ItemT, SectionT extends {
191
+ data: ReadonlyArray<ItemT>;
192
+ } = {
193
+ data: ReadonlyArray<ItemT>;
194
+ }>({ contentContainerStyle: externalContentContainerStyle, initialNumToRender, maxToRenderPerBatch, renderFilters, footerFixed: footerFixedProp, gesture, headerFixed: headerFixedProp, keyboardAware, ListHeaderComponent: externalListHeaderComponent, onMomentumScrollEnd: externalMomentumScrollEnd, onRefresh, onContentSizeChange, onScrollBeginDrag: externalScrollBeginDrag, onScrollEndDrag: externalScrollEndDrag, pullSearchHeight, refreshing, removeClippedSubviews, sections, showsVerticalScrollIndicator, style, ref: externalRef, windowSize, ...props }: SectionListProps<ItemT, SectionT>) => react.JSX.Element;
195
+ declare const SectionList: typeof SectionListInner;
196
+
197
+ declare const useKeyboardInset: () => number;
198
+
199
+ declare const useScrollView: () => {
200
+ progress: number | null;
201
+ progressing: boolean;
202
+ scrollHeight: number;
203
+ scrollPosition: react_native_reanimated.SharedValue<number>;
204
+ setProgress: (p: number | null) => void;
205
+ setProgressing: (b: boolean) => void;
206
+ };
207
+
208
+ declare const useScrollViewSettings: () => ScrollViewSettingsContextType;
209
+
210
+ export { CustomList, type CustomListProps, FlatList, type FlatListProps, PullSearch, type PullSearchHandle, type PullSearchProps, ScrollView, ScrollViewContext, type ScrollViewContextType, ScrollViewFooter, type ScrollViewFooterProps, ScrollViewHeader, type ScrollViewHeaderProps, type ScrollViewProps, ScrollViewProvider, type ScrollViewProviderProps, type ScrollViewSettings, ScrollViewSettingsContext, type ScrollViewSettingsContextType, ScrollViewSettingsProvider, type ScrollViewSettingsProviderProps, SectionList, type SectionListProps, defaultScrollViewSettings, scrollViewActions, scrollViewReducer, useKeyboardInset, useScrollView, useScrollViewSettings };