@onekeyfe/react-native-pager-view 6.7.0-alpha.432 → 6.7.0-alpha.435

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.
@@ -2,24 +2,19 @@ import type * as React from 'react';
2
2
  import {
3
3
  codegenNativeCommands,
4
4
  codegenNativeComponent,
5
+ type CodegenTypes,
5
6
  type HostComponent,
6
7
  type ViewProps,
7
8
  } from 'react-native';
8
9
 
9
- import type {
10
- DirectEventHandler,
11
- Double,
12
- Int32,
13
- WithDefault,
14
- } from 'react-native/Libraries/Types/CodegenTypes';
15
10
 
16
11
  export type OnPageScrollEventData = Readonly<{
17
- position: Double;
18
- offset: Double;
12
+ position: CodegenTypes.Double;
13
+ offset: CodegenTypes.Double;
19
14
  }>;
20
15
 
21
16
  export type OnPageSelectedEventData = Readonly<{
22
- position: Double;
17
+ position: CodegenTypes.Double;
23
18
  }>;
24
19
 
25
20
  export type OnPageScrollStateChangedEventData = Readonly<{
@@ -27,32 +22,32 @@ export type OnPageScrollStateChangedEventData = Readonly<{
27
22
  }>;
28
23
 
29
24
  export interface NativeProps extends ViewProps {
30
- scrollEnabled?: WithDefault<boolean, true>;
31
- layoutDirection?: WithDefault<'ltr' | 'rtl', 'ltr'>;
32
- initialPage?: Int32;
33
- orientation?: WithDefault<'horizontal' | 'vertical', 'horizontal'>;
34
- offscreenPageLimit?: Int32;
35
- pageMargin?: Int32;
36
- overScrollMode?: WithDefault<'auto' | 'always' | 'never', 'auto'>;
37
- overdrag?: WithDefault<boolean, false>;
38
- keyboardDismissMode?: WithDefault<'none' | 'on-drag', 'none'>;
25
+ scrollEnabled?: CodegenTypes.WithDefault<boolean, true>;
26
+ layoutDirection?: CodegenTypes.WithDefault<'ltr' | 'rtl', 'ltr'>;
27
+ initialPage?: CodegenTypes.Int32;
28
+ orientation?: CodegenTypes.WithDefault<'horizontal' | 'vertical', 'horizontal'>;
29
+ offscreenPageLimit?: CodegenTypes.Int32;
30
+ pageMargin?: CodegenTypes.Int32;
31
+ overScrollMode?: CodegenTypes.WithDefault<'auto' | 'always' | 'never', 'auto'>;
32
+ overdrag?: CodegenTypes.WithDefault<boolean, false>;
33
+ keyboardDismissMode?: CodegenTypes.WithDefault<'none' | 'on-drag', 'none'>;
39
34
  /**
40
35
  * Controls the sensitivity of scroll gestures on Android.
41
36
  * Higher values make scrolling less sensitive.
42
37
  * Valid range: 2 - 8
43
38
  * @platform android
44
39
  */
45
- scrollSensitivity?: Int32;
40
+ scrollSensitivity?: CodegenTypes.Int32;
46
41
  /**
47
42
  * When true on an inner PagerView, enables gesture coordination with
48
43
  * a parent (outer) PagerView. At sub-tab boundaries the inner pager's
49
44
  * gesture recognizer will not begin, allowing the outer pager to take over.
50
45
  * @platform ios
51
46
  */
52
- nestedScrollEnabled?: WithDefault<boolean, false>;
53
- onPageScroll?: DirectEventHandler<OnPageScrollEventData>;
54
- onPageSelected?: DirectEventHandler<OnPageSelectedEventData>;
55
- onPageScrollStateChanged?: DirectEventHandler<OnPageScrollStateChangedEventData>;
47
+ nestedScrollEnabled?: CodegenTypes.WithDefault<boolean, false>;
48
+ onPageScroll?: CodegenTypes.DirectEventHandler<OnPageScrollEventData>;
49
+ onPageSelected?: CodegenTypes.DirectEventHandler<OnPageSelectedEventData>;
50
+ onPageScrollStateChanged?: CodegenTypes.DirectEventHandler<OnPageScrollStateChangedEventData>;
56
51
  }
57
52
 
58
53
  type PagerViewViewType = HostComponent<NativeProps>;
@@ -60,11 +55,11 @@ type PagerViewViewType = HostComponent<NativeProps>;
60
55
  export interface NativeCommands {
61
56
  setPage: (
62
57
  viewRef: React.ElementRef<PagerViewViewType>,
63
- selectedPage: Int32
58
+ selectedPage: CodegenTypes.Int32
64
59
  ) => void;
65
60
  setPageWithoutAnimation: (
66
61
  viewRef: React.ElementRef<PagerViewViewType>,
67
- selectedPage: Int32
62
+ selectedPage: CodegenTypes.Int32
68
63
  ) => void;
69
64
  setScrollEnabledImperatively: (
70
65
  viewRef: React.ElementRef<PagerViewViewType>,