@onekeyfe/react-native-native-list 3.0.157 → 3.0.159

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 (199) hide show
  1. package/README.md +21 -5
  2. package/android/build.gradle +7 -0
  3. package/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +20 -0
  4. package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +711 -0
  5. package/android/src/main/java/com/onekey/nativelist/NativeListActionRenderer.kt +169 -0
  6. package/android/src/main/java/com/onekey/nativelist/NativeListActivityDetailsView.kt +179 -0
  7. package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +264 -0
  8. package/android/src/main/java/com/onekey/nativelist/NativeListAdapter.kt +20 -6
  9. package/android/src/main/java/com/onekey/nativelist/NativeListContainerSlotAdapter.kt +53 -0
  10. package/android/src/main/java/com/onekey/nativelist/NativeListDataRowRenderer.kt +487 -0
  11. package/android/src/main/java/com/onekey/nativelist/NativeListEndAlignment.kt +5 -0
  12. package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +820 -0
  13. package/android/src/main/java/com/onekey/nativelist/NativeListImageSlot.kt +147 -0
  14. package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +453 -0
  15. package/android/src/main/java/com/onekey/nativelist/NativeListMarketRenderer.kt +997 -0
  16. package/android/src/main/java/com/onekey/nativelist/NativeListMediaPreviewSlot.kt +268 -0
  17. package/android/src/main/java/com/onekey/nativelist/NativeListMediaTileRenderer.kt +243 -0
  18. package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +232 -0
  19. package/android/src/main/java/com/onekey/nativelist/NativeListMetricCardRenderer.kt +551 -0
  20. package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +27 -1
  21. package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +475 -0
  22. package/android/src/main/java/com/onekey/nativelist/NativeListRailRenderer.kt +143 -0
  23. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +42 -0
  24. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +415 -0
  25. package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +163 -0
  26. package/android/src/main/java/com/onekey/nativelist/NativeListRowHost.kt +70 -0
  27. package/android/src/main/java/com/onekey/nativelist/NativeListScrollPositionTracker.kt +59 -0
  28. package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +763 -0
  29. package/android/src/main/java/com/onekey/nativelist/NativeListSystemRenderer.kt +464 -0
  30. package/android/src/main/java/com/onekey/nativelist/NativeListTextView.kt +25 -0
  31. package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +432 -124
  32. package/android/src/main/java/com/onekey/nativelist/NativeListWalletGroupRenderer.kt +407 -0
  33. package/android/src/main/res/values/native_scroll_coordinator_ids.xml +5 -0
  34. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListEndAlignmentTest.kt +34 -0
  35. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListScrollPositionTrackerTest.kt +44 -0
  36. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListSelectorBackgroundColorTest.kt +34 -0
  37. package/docs/DESIGN.md +520 -9
  38. package/docs/MIGRATION_BASELINE.md +117 -0
  39. package/docs/ROW_TEMPLATES.md +404 -0
  40. package/docs/SPEC.md +621 -0
  41. package/docs/STYLE_SPEC.md +988 -0
  42. package/docs/images/list-capabilities.svg +39 -0
  43. package/docs/images/row-action.svg +17 -0
  44. package/docs/images/row-activity.svg +24 -0
  45. package/docs/images/row-data.svg +24 -0
  46. package/docs/images/row-identity.svg +25 -0
  47. package/docs/images/row-market.svg +23 -0
  48. package/docs/images/row-media-tile.svg +26 -0
  49. package/docs/images/row-message.svg +20 -0
  50. package/docs/images/row-metric-card.svg +33 -0
  51. package/docs/images/row-rail.svg +18 -0
  52. package/docs/images/row-section-header.svg +19 -0
  53. package/docs/images/row-style-regions.svg +30 -0
  54. package/docs/images/row-system.svg +30 -0
  55. package/docs/images/row-wallet-group.svg +26 -0
  56. package/ios/HybridNativeList.swift +30 -0
  57. package/ios/NativeListAccessoryStack.swift +680 -0
  58. package/ios/NativeListActionRenderer.swift +108 -0
  59. package/ios/NativeListActivityDetailsView.swift +291 -0
  60. package/ios/NativeListActivityRenderer.swift +201 -0
  61. package/ios/NativeListDataRowRenderer.swift +444 -0
  62. package/ios/NativeListIdentityRenderer.swift +685 -0
  63. package/ios/NativeListImageSlot.swift +140 -0
  64. package/ios/NativeListLeadingVisual.swift +372 -0
  65. package/ios/NativeListMarketRenderer.swift +698 -0
  66. package/ios/NativeListMediaPreviewSlot.swift +259 -0
  67. package/ios/NativeListMediaTileRenderer.swift +190 -0
  68. package/ios/NativeListMessageRenderer.swift +168 -0
  69. package/ios/NativeListMetricCardRenderer.swift +420 -0
  70. package/ios/NativeListModels.swift +36 -1
  71. package/ios/NativeListRailRenderer.swift +152 -0
  72. package/ios/NativeListRendererCell.swift +311 -0
  73. package/ios/NativeListRendererRegistry.swift +50 -0
  74. package/ios/NativeListResolvedText.swift +130 -0
  75. package/ios/NativeListRowHost.swift +63 -0
  76. package/ios/NativeListScrollPositionTracker.swift +30 -0
  77. package/ios/NativeListSectionHeaderRenderer.swift +734 -0
  78. package/ios/NativeListSystemRenderer.swift +568 -0
  79. package/ios/NativeListTextLabel.swift +42 -0
  80. package/ios/NativeListTextStyles.swift +236 -0
  81. package/ios/NativeListWalletGroupRenderer.swift +255 -0
  82. package/ios/RNCNativeListView.swift +282 -184
  83. package/ios/tests/NativeListActivityPresentationTests.swift +97 -0
  84. package/ios/tests/NativeListLifecycleTests.swift +241 -0
  85. package/ios/tests/NativeListMediaVisibilityTests.swift +109 -0
  86. package/ios/tests/NativeListScrollPositionTrackerTests.swift +25 -0
  87. package/lib/module/NativeList.js +56 -3
  88. package/lib/module/NativeList.web.js +5 -0
  89. package/lib/module/models.js +54 -0
  90. package/lib/module/validation.js +386 -28
  91. package/lib/module/web/NativeListWebEngine.js +148 -936
  92. package/lib/module/web/templates/ActionRowRenderer.js +97 -0
  93. package/lib/module/web/templates/ActivityRowRenderer.js +95 -0
  94. package/lib/module/web/templates/DataRowRenderer.js +145 -0
  95. package/lib/module/web/templates/IdentityRowRenderer.js +289 -0
  96. package/lib/module/web/templates/MarketRowRenderer.js +310 -0
  97. package/lib/module/web/templates/MediaTileRowRenderer.js +132 -0
  98. package/lib/module/web/templates/MessageRowRenderer.js +165 -0
  99. package/lib/module/web/templates/MetricCardRowRenderer.js +172 -0
  100. package/lib/module/web/templates/RailRowRenderer.js +98 -0
  101. package/lib/module/web/templates/RowContainerStyle.js +100 -0
  102. package/lib/module/web/templates/RowElements.js +93 -0
  103. package/lib/module/web/templates/RowRendererRegistry.js +70 -0
  104. package/lib/module/web/templates/RowText.js +121 -0
  105. package/lib/module/web/templates/RowVisual.js +43 -0
  106. package/lib/module/web/templates/SectionHeaderRowRenderer.js +146 -0
  107. package/lib/module/web/templates/SystemRowRenderer.js +161 -0
  108. package/lib/module/web/templates/WalletGroupRowRenderer.js +96 -0
  109. package/lib/nitrogen/generated/android/c++/JFunc_void_bool.hpp +75 -0
  110. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +39 -3
  111. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +6 -0
  112. package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +15 -0
  113. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/Func_void_bool.kt +78 -0
  114. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +26 -0
  115. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/views/HybridNativeListManager.kt +24 -9
  116. package/lib/nitrogen/generated/android/nativelistOnLoad.cpp +2 -0
  117. package/lib/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Bridge.cpp +8 -0
  118. package/lib/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Bridge.hpp +37 -0
  119. package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +23 -2
  120. package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +32 -0
  121. package/lib/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
  122. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +3 -0
  123. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +54 -0
  124. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +6 -0
  125. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +8 -2
  126. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +6 -0
  127. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +11 -2
  128. package/lib/nitrogen/generated/shared/json/NativeListConfig.json +3 -0
  129. package/lib/typescript/src/NativeList.nitro.d.ts +3 -0
  130. package/lib/typescript/src/NativeList.types.d.ts +14 -1
  131. package/lib/typescript/src/models.d.ts +199 -18
  132. package/lib/typescript/src/web/NativeListWebEngine.d.ts +18 -16
  133. package/lib/typescript/src/web/templates/ActionRowRenderer.d.ts +15 -0
  134. package/lib/typescript/src/web/templates/ActivityRowRenderer.d.ts +15 -0
  135. package/lib/typescript/src/web/templates/DataRowRenderer.d.ts +15 -0
  136. package/lib/typescript/src/web/templates/IdentityRowRenderer.d.ts +16 -0
  137. package/lib/typescript/src/web/templates/MarketRowRenderer.d.ts +30 -0
  138. package/lib/typescript/src/web/templates/MediaTileRowRenderer.d.ts +15 -0
  139. package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +44 -0
  140. package/lib/typescript/src/web/templates/MetricCardRowRenderer.d.ts +15 -0
  141. package/lib/typescript/src/web/templates/RailRowRenderer.d.ts +28 -0
  142. package/lib/typescript/src/web/templates/RowContainerStyle.d.ts +9 -0
  143. package/lib/typescript/src/web/templates/RowElements.d.ts +38 -0
  144. package/lib/typescript/src/web/templates/RowRendererRegistry.d.ts +83 -0
  145. package/lib/typescript/src/web/templates/RowText.d.ts +9 -0
  146. package/lib/typescript/src/web/templates/RowVisual.d.ts +20 -0
  147. package/lib/typescript/src/web/templates/SectionHeaderRowRenderer.d.ts +15 -0
  148. package/lib/typescript/src/web/templates/SystemRowRenderer.d.ts +16 -0
  149. package/lib/typescript/src/web/templates/WalletGroupRowRenderer.d.ts +20 -0
  150. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +75 -0
  151. package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +39 -3
  152. package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +6 -0
  153. package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +15 -0
  154. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/Func_void_bool.kt +78 -0
  155. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +26 -0
  156. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/views/HybridNativeListManager.kt +24 -9
  157. package/nitrogen/generated/android/nativelistOnLoad.cpp +2 -0
  158. package/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Bridge.cpp +8 -0
  159. package/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Bridge.hpp +37 -0
  160. package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +23 -2
  161. package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +32 -0
  162. package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
  163. package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +3 -0
  164. package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +54 -0
  165. package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +6 -0
  166. package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +8 -2
  167. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +6 -0
  168. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +11 -2
  169. package/nitrogen/generated/shared/json/NativeListConfig.json +3 -0
  170. package/package.json +7 -6
  171. package/react-native-native-list.podspec +6 -0
  172. package/scripts/enable-container-slots.mjs +58 -0
  173. package/scripts/enable-container-slots.test.mjs +58 -0
  174. package/src/NativeList.nitro.ts +3 -0
  175. package/src/NativeList.tsx +84 -2
  176. package/src/NativeList.types.ts +14 -1
  177. package/src/NativeList.web.tsx +5 -0
  178. package/src/models.ts +320 -20
  179. package/src/validation.ts +641 -49
  180. package/src/web/NativeListWebEngine.ts +361 -1932
  181. package/src/web/templates/ActionRowRenderer.ts +123 -0
  182. package/src/web/templates/ActivityRowRenderer.ts +159 -0
  183. package/src/web/templates/DataRowRenderer.ts +212 -0
  184. package/src/web/templates/IdentityRowRenderer.ts +527 -0
  185. package/src/web/templates/MarketRowRenderer.ts +467 -0
  186. package/src/web/templates/MediaTileRowRenderer.ts +182 -0
  187. package/src/web/templates/MessageRowRenderer.ts +306 -0
  188. package/src/web/templates/MetricCardRowRenderer.ts +337 -0
  189. package/src/web/templates/RailRowRenderer.ts +136 -0
  190. package/src/web/templates/RowContainerStyle.ts +131 -0
  191. package/src/web/templates/RowElements.ts +160 -0
  192. package/src/web/templates/RowRendererRegistry.ts +111 -0
  193. package/src/web/templates/RowText.ts +181 -0
  194. package/src/web/templates/RowVisual.ts +115 -0
  195. package/src/web/templates/SectionHeaderRowRenderer.ts +243 -0
  196. package/src/web/templates/SystemRowRenderer.ts +282 -0
  197. package/src/web/templates/WalletGroupRowRenderer.ts +131 -0
  198. package/android/src/main/java/com/onekey/nativelist/NativeListRowView.kt +0 -4538
  199. package/ios/NativeListCell.swift +0 -4300
@@ -4,6 +4,7 @@ import React, {
4
4
  useImperativeHandle,
5
5
  useMemo,
6
6
  useRef,
7
+ useState,
7
8
  } from 'react';
8
9
  import {
9
10
  OneKeyImageCache,
@@ -13,6 +14,7 @@ import {
13
14
  NativeAvatarPrefetchModel,
14
15
  NativeAvatarPrefetchQueue,
15
16
  } from './avatarPrefetch';
17
+ import { View } from 'react-native';
16
18
  import { callback, getHostComponent } from 'react-native-nitro-modules';
17
19
  import type {
18
20
  NativeListMethods,
@@ -96,6 +98,10 @@ export const NativeList = forwardRef<NativeListRef, NativeListProps>(
96
98
  function NativeList(
97
99
  {
98
100
  snapshot,
101
+ listHeader,
102
+ listFooter,
103
+ listEmpty,
104
+ scrollPositionThresholds,
99
105
  webVirtualizationEnabled: _webVirtualizationEnabled,
100
106
  webSectionIndexContainerRef: _webSectionIndexContainerRef,
101
107
  keyboardDismissMode = 'none',
@@ -106,6 +112,7 @@ export const NativeList = forwardRef<NativeListRef, NativeListProps>(
106
112
  onReorder,
107
113
  onEndReached,
108
114
  onVisibleRangeChanged,
115
+ onScrollPositionThresholdChange,
109
116
  onRefresh,
110
117
  onScrollToIndexFailed,
111
118
  initialScrollIndex,
@@ -116,6 +123,21 @@ export const NativeList = forwardRef<NativeListRef, NativeListProps>(
116
123
  },
117
124
  forwardedRef
118
125
  ) {
126
+ const [slotHeights, setSlotHeights] = useState([0, 0, 0]);
127
+ const containerSlotHeightsJson = JSON.stringify(slotHeights);
128
+ const slotInset =
129
+ snapshot.layout.contentPaddingHorizontal ??
130
+ snapshot.layout.contentPadding ??
131
+ 0;
132
+ if (
133
+ snapshot.layout.orientation === 'horizontal' &&
134
+ (listHeader || listEmpty || listFooter)
135
+ ) {
136
+ throw new Error(
137
+ 'NativeList container slots require vertical orientation'
138
+ );
139
+ }
140
+ const slotContents = [listHeader, listEmpty, listFooter];
119
141
  const normalizedKeyboardShouldPersistTaps =
120
142
  keyboardShouldPersistTaps === true
121
143
  ? 'always'
@@ -130,6 +152,7 @@ export const NativeList = forwardRef<NativeListRef, NativeListProps>(
130
152
  onReorder,
131
153
  onEndReached,
132
154
  onVisibleRangeChanged,
155
+ onScrollPositionThresholdChange,
133
156
  onRefresh,
134
157
  onScrollToIndexFailed,
135
158
  });
@@ -140,9 +163,29 @@ export const NativeList = forwardRef<NativeListRef, NativeListProps>(
140
163
  onReorder,
141
164
  onEndReached,
142
165
  onVisibleRangeChanged,
166
+ onScrollPositionThresholdChange,
143
167
  onRefresh,
144
168
  onScrollToIndexFailed,
145
169
  };
170
+ const scrollPositionThresholdsJson = useMemo(() => {
171
+ if (
172
+ !scrollPositionThresholds ||
173
+ scrollPositionThresholds.enabled === false
174
+ )
175
+ return '';
176
+ const { start, end } = scrollPositionThresholds;
177
+ if (
178
+ !Number.isFinite(start) ||
179
+ !Number.isFinite(end) ||
180
+ start < 0 ||
181
+ end <= start
182
+ ) {
183
+ throw new Error(
184
+ 'scrollPositionThresholds requires 0 <= start < end and finite values'
185
+ );
186
+ }
187
+ return JSON.stringify({ start, end });
188
+ }, [scrollPositionThresholds]);
146
189
  const snapshotJson = useMemo(() => serializeSnapshot(snapshot), [snapshot]);
147
190
  const snapshotRef = useRef(snapshot);
148
191
  const previousSnapshotJsonRef = useRef(snapshotJson);
@@ -391,8 +434,13 @@ export const NativeList = forwardRef<NativeListRef, NativeListProps>(
391
434
  }),
392
435
  onRowAction: callback((payloadJson: string) => {
393
436
  const payload = parsePayload<RowActionEvent>(payloadJson);
394
- if (payload.actionKey === 'nativeList.refresh')
437
+ if (
438
+ payload.actionKey === 'nativeList.refresh' &&
439
+ payload.rowKey === undefined
440
+ ) {
395
441
  callbacksRef.current.onRefresh?.();
442
+ return;
443
+ }
396
444
  callbacksRef.current.onRowAction?.(payload);
397
445
  }),
398
446
  onActionAnchorInvalidated: callback((payloadJson: string) => {
@@ -427,6 +475,13 @@ export const NativeList = forwardRef<NativeListRef, NativeListProps>(
427
475
  parsePayload<EndReachedEvent>(payloadJson)
428
476
  );
429
477
  }),
478
+ onScrollPositionThresholdChange: callback(
479
+ (isBeyondThreshold: boolean) => {
480
+ callbacksRef.current.onScrollPositionThresholdChange?.({
481
+ isBeyondThreshold,
482
+ });
483
+ }
484
+ ),
430
485
  onVisibleRangeChanged: callback((payloadJson: string) => {
431
486
  const payload = parsePayload<VisibleRangeChangedEvent>(payloadJson);
432
487
  const previous = avatarRangeRef.current;
@@ -450,9 +505,36 @@ export const NativeList = forwardRef<NativeListRef, NativeListProps>(
450
505
  {...viewProps}
451
506
  {...nativeCallbacks}
452
507
  snapshotJson={snapshotJson}
508
+ containerSlotHeightsJson={containerSlotHeightsJson}
509
+ scrollPositionThresholdsJson={scrollPositionThresholdsJson}
453
510
  keyboardDismissMode={keyboardDismissMode}
454
511
  keyboardShouldPersistTaps={normalizedKeyboardShouldPersistTaps}
455
- />
512
+ >
513
+ {slotContents.map((content, index) => (
514
+ <View
515
+ key={index}
516
+ collapsable={false}
517
+ style={{
518
+ position: 'absolute',
519
+ left: slotInset,
520
+ right: slotInset,
521
+ top: 0,
522
+ }}
523
+ onLayout={(event) => {
524
+ const height = Math.ceil(event.nativeEvent.layout.height);
525
+ setSlotHeights((previous) =>
526
+ previous[index] === height
527
+ ? previous
528
+ : previous.map((value, slot) =>
529
+ slot === index ? height : value
530
+ )
531
+ );
532
+ }}
533
+ >
534
+ {content}
535
+ </View>
536
+ ))}
537
+ </NativeListHost>
456
538
  );
457
539
  }
458
540
  );
@@ -1,4 +1,4 @@
1
- import type { RefObject } from 'react';
1
+ import type { ReactNode, RefObject } from 'react';
2
2
  import type { View, ViewProps } from 'react-native';
3
3
  import type {
4
4
  ActionAnchorInvalidatedEvent,
@@ -119,6 +119,10 @@ export type NativeListRef = Readonly<{
119
119
  export type NativeListProps = Omit<ViewProps, 'children'> &
120
120
  Readonly<{
121
121
  snapshot: NativeListSnapshot;
122
+ /** Native-only, container-owned scroll content. Never rendered as a data row. */
123
+ listHeader?: ReactNode;
124
+ listFooter?: ReactNode;
125
+ listEmpty?: ReactNode;
122
126
  /** Web only. Defaults to true and is ignored by the native host. */
123
127
  webVirtualizationEnabled?: boolean;
124
128
  /** Web only. Hosts the section index inside this container. */
@@ -136,6 +140,15 @@ export type NativeListProps = Omit<ViewProps, 'children'> &
136
140
  onReorder?: (event: ReorderEvent) => void;
137
141
  onEndReached?: (event: EndReachedEvent) => void;
138
142
  onVisibleRangeChanged?: (event: VisibleRangeChangedEvent) => void;
143
+ /** Native only. Emits initial state and hysteresis transitions, not scroll frames. */
144
+ scrollPositionThresholds?: Readonly<{
145
+ start: number;
146
+ end: number;
147
+ enabled?: boolean;
148
+ }>;
149
+ onScrollPositionThresholdChange?: (
150
+ event: Readonly<{ isBeyondThreshold: boolean }>
151
+ ) => void;
139
152
  onRefresh?: () => void;
140
153
  onScrollToIndexFailed?: (info: ScrollToIndexFailedInfo) => void;
141
154
  }> &
@@ -82,6 +82,11 @@ export const NativeList = forwardRef<NativeListRef, NativeListProps>(
82
82
  function NativeList(
83
83
  {
84
84
  snapshot,
85
+ listHeader: _listHeader,
86
+ listEmpty: _listEmpty,
87
+ listFooter: _listFooter,
88
+ scrollPositionThresholds: _scrollPositionThresholds,
89
+ onScrollPositionThresholdChange: _onScrollPositionThresholdChange,
85
90
  webVirtualizationEnabled = true,
86
91
  webSectionIndexContainerRef,
87
92
  keyboardDismissMode: _keyboardDismissMode,