react-native-header-motion 0.4.0 → 1.0.0-beta.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.
- package/README.md +400 -335
- package/lib/module/components/Bridge.js +16 -0
- package/lib/module/components/Bridge.js.map +1 -0
- package/lib/module/components/FlatList.js +5 -62
- package/lib/module/components/FlatList.js.map +1 -1
- package/lib/module/components/Header.js +71 -13
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/HeaderDynamic.js +34 -0
- package/lib/module/components/HeaderDynamic.js.map +1 -0
- package/lib/module/components/HeaderMotion.js +59 -23
- package/lib/module/components/HeaderMotion.js.map +1 -1
- package/lib/module/components/HeaderPanBoundary.js +54 -0
- package/lib/module/components/HeaderPanBoundary.js.map +1 -0
- package/lib/module/components/NavigationBridge.js +20 -0
- package/lib/module/components/NavigationBridge.js.map +1 -0
- package/lib/module/components/ScrollManager.js +7 -5
- package/lib/module/components/ScrollManager.js.map +1 -1
- package/lib/module/components/ScrollView.js +6 -47
- package/lib/module/components/ScrollView.js.map +1 -1
- package/lib/module/components/createHeaderMotionScrollable.js +136 -0
- package/lib/module/components/createHeaderMotionScrollable.js.map +1 -0
- package/lib/module/components/index.js +3 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/context.js +8 -1
- package/lib/module/context.js.map +1 -1
- package/lib/module/hooks/index.js +1 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useActiveScrollId.js +7 -6
- package/lib/module/hooks/useActiveScrollId.js.map +1 -1
- package/lib/module/hooks/useHeaderMotionBridge.js +14 -0
- package/lib/module/hooks/useHeaderMotionBridge.js.map +1 -0
- package/lib/module/hooks/useMotionProgress.js +10 -36
- package/lib/module/hooks/useMotionProgress.js.map +1 -1
- package/lib/module/hooks/useMotionProgress.test.js +56 -0
- package/lib/module/hooks/useMotionProgress.test.js.map +1 -0
- package/lib/module/hooks/useScrollManager.js +219 -109
- package/lib/module/hooks/useScrollManager.js.map +1 -1
- package/lib/module/index.js +21 -18
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/defaults.js +2 -1
- package/lib/module/utils/defaults.js.map +1 -1
- package/lib/module/utils/header.js +24 -0
- package/lib/module/utils/header.js.map +1 -0
- package/lib/module/utils/headerOffsetStyle.js +31 -0
- package/lib/module/utils/headerOffsetStyle.js.map +1 -0
- package/lib/module/utils/index.js +3 -0
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/refreshControl.js +93 -0
- package/lib/module/utils/refreshControl.js.map +1 -0
- package/lib/module/utils/values.js +36 -0
- package/lib/module/utils/values.js.map +1 -1
- package/lib/typescript/src/components/Bridge.d.ts +19 -0
- package/lib/typescript/src/components/Bridge.d.ts.map +1 -0
- package/lib/typescript/src/components/FlatList.d.ts +7 -15
- package/lib/typescript/src/components/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/components/Header.d.ts +73 -12
- package/lib/typescript/src/components/Header.d.ts.map +1 -1
- package/lib/typescript/src/components/HeaderDynamic.d.ts +11 -0
- package/lib/typescript/src/components/HeaderDynamic.d.ts.map +1 -0
- package/lib/typescript/src/components/HeaderMotion.d.ts +37 -18
- package/lib/typescript/src/components/HeaderMotion.d.ts.map +1 -1
- package/lib/typescript/src/components/HeaderPanBoundary.d.ts +11 -0
- package/lib/typescript/src/components/HeaderPanBoundary.d.ts.map +1 -0
- package/lib/typescript/src/components/NavigationBridge.d.ts +19 -0
- package/lib/typescript/src/components/NavigationBridge.d.ts.map +1 -0
- package/lib/typescript/src/components/ScrollManager.d.ts +18 -25
- package/lib/typescript/src/components/ScrollManager.d.ts.map +1 -1
- package/lib/typescript/src/components/ScrollView.d.ts +7 -14
- package/lib/typescript/src/components/ScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/createHeaderMotionScrollable.d.ts +86 -0
- package/lib/typescript/src/components/createHeaderMotionScrollable.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +3 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/context.d.ts +3 -13
- package/lib/typescript/src/context.d.ts.map +1 -1
- package/lib/typescript/src/hooks/index.d.ts +1 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useActiveScrollId.d.ts +7 -6
- package/lib/typescript/src/hooks/useActiveScrollId.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useHeaderMotionBridge.d.ts +10 -0
- package/lib/typescript/src/hooks/useHeaderMotionBridge.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useMotionProgress.d.ts +8 -25
- package/lib/typescript/src/hooks/useMotionProgress.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useMotionProgress.test.d.ts +2 -0
- package/lib/typescript/src/hooks/useMotionProgress.test.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useScrollManager.d.ts +63 -31
- package/lib/typescript/src/hooks/useScrollManager.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +56 -26
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +63 -15
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/defaults.d.ts +3 -2
- package/lib/typescript/src/utils/defaults.d.ts.map +1 -1
- package/lib/typescript/src/utils/header.d.ts +10 -0
- package/lib/typescript/src/utils/header.d.ts.map +1 -0
- package/lib/typescript/src/utils/headerOffsetStyle.d.ts +19 -0
- package/lib/typescript/src/utils/headerOffsetStyle.d.ts.map +1 -0
- package/lib/typescript/src/utils/index.d.ts +3 -0
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/refreshControl.d.ts +150 -0
- package/lib/typescript/src/utils/refreshControl.d.ts.map +1 -0
- package/lib/typescript/src/utils/values.d.ts +4 -1
- package/lib/typescript/src/utils/values.d.ts.map +1 -1
- package/package.json +13 -5
- package/src/components/Bridge.tsx +29 -0
- package/src/components/FlatList.tsx +18 -84
- package/src/components/Header.tsx +159 -23
- package/src/components/HeaderDynamic.tsx +45 -0
- package/src/components/HeaderMotion.tsx +114 -41
- package/src/components/HeaderPanBoundary.tsx +92 -0
- package/src/components/NavigationBridge.tsx +30 -0
- package/src/components/ScrollManager.tsx +38 -43
- package/src/components/ScrollView.tsx +16 -68
- package/src/components/createHeaderMotionScrollable.tsx +438 -0
- package/src/components/index.ts +3 -1
- package/src/context.ts +12 -18
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useActiveScrollId.ts +7 -6
- package/src/hooks/useHeaderMotionBridge.ts +15 -0
- package/src/hooks/useMotionProgress.test.ts +67 -0
- package/src/hooks/useMotionProgress.ts +12 -37
- package/src/hooks/useScrollManager.ts +310 -129
- package/src/index.ts +82 -36
- package/src/types.ts +85 -25
- package/src/utils/defaults.ts +7 -1
- package/src/utils/header.tsx +52 -0
- package/src/utils/headerOffsetStyle.ts +40 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/refreshControl.tsx +118 -0
- package/src/utils/values.ts +57 -1
- package/lib/module/components/HeaderBase.js +0 -59
- package/lib/module/components/HeaderBase.js.map +0 -1
- package/lib/module/hooks/refreshControl.js +0 -31
- package/lib/module/hooks/refreshControl.js.map +0 -1
- package/lib/typescript/src/components/HeaderBase.d.ts +0 -34
- package/lib/typescript/src/components/HeaderBase.d.ts.map +0 -1
- package/lib/typescript/src/hooks/refreshControl.d.ts +0 -13
- package/lib/typescript/src/hooks/refreshControl.d.ts.map +0 -1
- package/src/components/HeaderBase.tsx +0 -51
- package/src/hooks/refreshControl.ts +0 -55
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAK,EACV,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { MeasureAnimatedHeader, ProgressThreshold } from '../types';
|
|
1
|
+
import type { HeaderMotionOffsetStrategy, MeasureAnimatedHeader, ProgressThreshold } from '../types';
|
|
2
2
|
declare const DEFAULT_PROGRESS_THRESHOLD: ProgressThreshold;
|
|
3
3
|
declare const DEFAULT_MEASURE_DYNAMIC: MeasureAnimatedHeader;
|
|
4
|
+
declare const DEFAULT_HEADER_OFFSET_STRATEGY: HeaderMotionOffsetStrategy;
|
|
4
5
|
declare const DEFAULT_SCROLL_ID = "__HEADER_MOTION_DEFAULT_SCROLL_ID__";
|
|
5
|
-
export { DEFAULT_MEASURE_DYNAMIC, DEFAULT_PROGRESS_THRESHOLD, DEFAULT_SCROLL_ID, };
|
|
6
|
+
export { DEFAULT_HEADER_OFFSET_STRATEGY, DEFAULT_MEASURE_DYNAMIC, DEFAULT_PROGRESS_THRESHOLD, DEFAULT_SCROLL_ID, };
|
|
6
7
|
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../src/utils/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../../src/utils/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,0BAA0B,EAC1B,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB,QAAA,MAAM,0BAA0B,EAAE,iBACb,CAAC;AACtB,QAAA,MAAM,uBAAuB,EAAE,qBACF,CAAC;AAC9B,QAAA,MAAM,8BAA8B,EAAE,0BAAsC,CAAC;AAI7E,QAAA,MAAM,iBAAiB,wCAAwC,CAAC;AAEhE,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,0BAA0B,EAC1B,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
export type SlottableElementProps = {
|
|
4
|
+
onLayout?: ViewProps['onLayout'];
|
|
5
|
+
};
|
|
6
|
+
export type SlottableElement = ReactElement<SlottableElementProps>;
|
|
7
|
+
export declare function composeOnLayoutHandlers(userHandler: ViewProps['onLayout'], internalHandler: ViewProps['onLayout']): (e: Parameters<NonNullable<ViewProps["onLayout"]>>[0]) => void;
|
|
8
|
+
export declare function resolveSlottableChild(componentName: string, child: ReactElement): SlottableElement;
|
|
9
|
+
export declare function cloneWithOnLayout(child: SlottableElement, onLayout: ViewProps['onLayout'], componentName: string): ReactElement<SlottableElementProps, string | import("react").JSXElementConstructor<any>>;
|
|
10
|
+
//# sourceMappingURL=header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/utils/header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAC;AAEnE,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,SAAS,CAAC,UAAU,CAAC,EAClC,eAAe,EAAE,SAAS,CAAC,UAAU,CAAC,IAE9B,GAAG,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAI7D;AAED,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,YAAY,GAQH,gBAAgB,CACjC;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,EAC/B,aAAa,EAAE,MAAM,4FAWtB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
2
|
+
import type { HeaderMotionOffsetStrategy } from '../types';
|
|
3
|
+
type HeaderOffsetValue = number | SharedValue<number>;
|
|
4
|
+
type HeaderOffsetStyle = undefined | {
|
|
5
|
+
paddingTop: HeaderOffsetValue;
|
|
6
|
+
} | {
|
|
7
|
+
marginTop: HeaderOffsetValue;
|
|
8
|
+
} | {
|
|
9
|
+
top: HeaderOffsetValue;
|
|
10
|
+
paddingBottom: HeaderOffsetValue;
|
|
11
|
+
} | {
|
|
12
|
+
transform: [{
|
|
13
|
+
translateY: HeaderOffsetValue;
|
|
14
|
+
}];
|
|
15
|
+
paddingBottom: HeaderOffsetValue;
|
|
16
|
+
};
|
|
17
|
+
export declare function resolveHeaderOffsetStyle(originalHeaderHeight: HeaderOffsetValue, headerOffsetStrategy?: HeaderMotionOffsetStrategy): HeaderOffsetStyle;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=headerOffsetStyle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headerOffsetStyle.d.ts","sourceRoot":"","sources":["../../../../src/utils/headerOffsetStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAG3D,KAAK,iBAAiB,GAAG,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAEtD,KAAK,iBAAiB,GAClB,SAAS,GACT;IAAE,UAAU,EAAE,iBAAiB,CAAA;CAAE,GACjC;IAAE,SAAS,EAAE,iBAAiB,CAAA;CAAE,GAChC;IAAE,GAAG,EAAE,iBAAiB,CAAC;IAAC,aAAa,EAAE,iBAAiB,CAAA;CAAE,GAC5D;IACE,SAAS,EAAE,CAAC;QAAE,UAAU,EAAE,iBAAiB,CAAA;KAAE,CAAC,CAAC;IAC/C,aAAa,EAAE,iBAAiB,CAAC;CAClC,CAAC;AAEN,wBAAgB,wBAAwB,CACtC,oBAAoB,EAAE,iBAAiB,EACvC,oBAAoB,GAAE,0BAA2D,GAChF,iBAAiB,CAoBnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import { RefreshControl, type RefreshControlProps } from 'react-native';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
declare const AnimatedRefreshControl: import("react-native-reanimated/lib/typescript/createAnimatedComponent").AnimatedComponentType<Readonly<Readonly<Omit<Readonly<Omit<Readonly<{
|
|
5
|
+
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
|
|
6
|
+
onAccessibilityTap?: (() => unknown) | undefined;
|
|
7
|
+
onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
|
|
8
|
+
onMagicTap?: (() => unknown) | undefined;
|
|
9
|
+
onAccessibilityEscape?: (() => unknown) | undefined;
|
|
10
|
+
}>, "onMoveShouldSetResponder" | "onMoveShouldSetResponderCapture" | "onResponderGrant" | "onResponderMove" | "onResponderReject" | "onResponderRelease" | "onResponderStart" | "onResponderEnd" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "onStartShouldSetResponderCapture" | "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
11
|
+
onMoveShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
12
|
+
onMoveShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
13
|
+
onResponderGrant?: ((e: import("react-native").GestureResponderEvent) => void | boolean) | undefined;
|
|
14
|
+
onResponderMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
15
|
+
onResponderReject?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
16
|
+
onResponderRelease?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
17
|
+
onResponderStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
18
|
+
onResponderEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
19
|
+
onResponderTerminate?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
20
|
+
onResponderTerminationRequest?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
21
|
+
onStartShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
22
|
+
onStartShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
23
|
+
}>, "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
24
|
+
onMouseEnter?: ((event: import("react-native").MouseEvent) => void) | undefined;
|
|
25
|
+
onMouseLeave?: ((event: import("react-native").MouseEvent) => void) | undefined;
|
|
26
|
+
}>, "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
27
|
+
onClick?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
28
|
+
onClickCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
29
|
+
onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
30
|
+
onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
31
|
+
onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
32
|
+
onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
33
|
+
onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
34
|
+
onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
35
|
+
onPointerCancel?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
36
|
+
onPointerCancelCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
37
|
+
onPointerDown?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
38
|
+
onPointerDownCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
39
|
+
onPointerUp?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
40
|
+
onPointerUpCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
41
|
+
onPointerOver?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
42
|
+
onPointerOverCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
43
|
+
onPointerOut?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
44
|
+
onPointerOutCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
45
|
+
onGotPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
46
|
+
onGotPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
47
|
+
onLostPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
48
|
+
onLostPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
49
|
+
}>, "onClick" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
50
|
+
onBlur?: ((event: import("react-native").BlurEvent) => void) | undefined;
|
|
51
|
+
onBlurCapture?: ((event: import("react-native").BlurEvent) => void) | undefined;
|
|
52
|
+
onFocus?: ((event: import("react-native").FocusEvent) => void) | undefined;
|
|
53
|
+
onFocusCapture?: ((event: import("react-native").FocusEvent) => void) | undefined;
|
|
54
|
+
}>, "onClick" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
55
|
+
onTouchCancel?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
56
|
+
onTouchCancelCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
57
|
+
onTouchEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
58
|
+
onTouchEndCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
59
|
+
onTouchMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
60
|
+
onTouchMoveCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
61
|
+
onTouchStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
62
|
+
onTouchStartCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
63
|
+
}>, "onClick" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
64
|
+
nativeBackgroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
|
|
65
|
+
nativeForegroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
|
|
66
|
+
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
67
|
+
hasTVPreferredFocus?: boolean | undefined;
|
|
68
|
+
nextFocusDown?: number | undefined;
|
|
69
|
+
nextFocusForward?: number | undefined;
|
|
70
|
+
nextFocusLeft?: number | undefined;
|
|
71
|
+
nextFocusRight?: number | undefined;
|
|
72
|
+
nextFocusUp?: number | undefined;
|
|
73
|
+
focusable?: boolean | undefined;
|
|
74
|
+
tabIndex?: 0 | -1;
|
|
75
|
+
onClick?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
|
|
76
|
+
}>, "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
77
|
+
shouldRasterizeIOS?: boolean | undefined;
|
|
78
|
+
}>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<Omit<Readonly<{
|
|
79
|
+
accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
|
|
80
|
+
"aria-labelledby"?: string | undefined;
|
|
81
|
+
accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
|
|
82
|
+
"aria-live"?: ("polite" | "assertive" | "off") | undefined;
|
|
83
|
+
importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
|
|
84
|
+
screenReaderFocusable?: boolean;
|
|
85
|
+
}>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & Omit<Readonly<{
|
|
86
|
+
accessibilityIgnoresInvertColors?: boolean | undefined;
|
|
87
|
+
accessibilityViewIsModal?: boolean | undefined;
|
|
88
|
+
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
89
|
+
accessibilityLargeContentTitle?: string | undefined;
|
|
90
|
+
"aria-modal"?: boolean | undefined;
|
|
91
|
+
accessibilityElementsHidden?: boolean | undefined;
|
|
92
|
+
accessibilityLanguage?: string | undefined;
|
|
93
|
+
accessibilityRespondsToUserInteraction?: boolean | undefined;
|
|
94
|
+
}>, "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & {
|
|
95
|
+
accessible?: boolean | undefined;
|
|
96
|
+
accessibilityLabel?: string | undefined;
|
|
97
|
+
accessibilityHint?: string | undefined;
|
|
98
|
+
"aria-label"?: string | undefined;
|
|
99
|
+
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
100
|
+
role?: import("react-native").Role | undefined;
|
|
101
|
+
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
102
|
+
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
103
|
+
"aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
|
|
104
|
+
"aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
|
|
105
|
+
"aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
|
|
106
|
+
"aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
|
|
107
|
+
accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
|
|
108
|
+
"aria-busy"?: boolean | undefined;
|
|
109
|
+
"aria-checked"?: (boolean | undefined) | "mixed";
|
|
110
|
+
"aria-disabled"?: boolean | undefined;
|
|
111
|
+
"aria-expanded"?: boolean | undefined;
|
|
112
|
+
"aria-selected"?: boolean | undefined;
|
|
113
|
+
"aria-hidden"?: boolean | undefined;
|
|
114
|
+
}>, "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
115
|
+
children?: React.ReactNode;
|
|
116
|
+
style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp | undefined;
|
|
117
|
+
collapsable?: boolean | undefined;
|
|
118
|
+
collapsableChildren?: boolean | undefined;
|
|
119
|
+
id?: string;
|
|
120
|
+
testID?: string | undefined;
|
|
121
|
+
nativeID?: string | undefined;
|
|
122
|
+
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
123
|
+
hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/EdgeInsetsPropType").EdgeInsetsOrSizeProp | undefined;
|
|
124
|
+
pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
|
|
125
|
+
removeClippedSubviews?: boolean | undefined;
|
|
126
|
+
experimental_accessibilityOrder?: Array<string> | undefined;
|
|
127
|
+
}>, never>>, "title" | "tintColor" | "titleColor" | "enabled" | "colors" | "progressBackgroundColor" | "size" | "onRefresh" | "refreshing" | "progressViewOffset"> & Omit<Readonly<{
|
|
128
|
+
tintColor?: import("react-native").ColorValue | undefined;
|
|
129
|
+
titleColor?: import("react-native").ColorValue | undefined;
|
|
130
|
+
title?: string | undefined;
|
|
131
|
+
}>, "enabled" | "colors" | "progressBackgroundColor" | "size" | "onRefresh" | "refreshing" | "progressViewOffset"> & Omit<Readonly<{
|
|
132
|
+
enabled?: boolean | undefined;
|
|
133
|
+
colors?: ReadonlyArray<import("react-native").ColorValue> | undefined;
|
|
134
|
+
progressBackgroundColor?: import("react-native").ColorValue | undefined;
|
|
135
|
+
size?: ("default" | "large") | undefined;
|
|
136
|
+
}>, "onRefresh" | "refreshing" | "progressViewOffset"> & Omit<Readonly<{
|
|
137
|
+
onRefresh?: (() => void | Promise<void>) | undefined;
|
|
138
|
+
refreshing: boolean;
|
|
139
|
+
progressViewOffset?: number | undefined;
|
|
140
|
+
}>, never>>>, typeof RefreshControl>;
|
|
141
|
+
type MaybeShared<T> = T | SharedValue<T | undefined>;
|
|
142
|
+
export interface ResolveRefreshControlOptions {
|
|
143
|
+
refreshControl?: MaybeShared<ReactElement<RefreshControlProps>>;
|
|
144
|
+
refreshing?: MaybeShared<boolean>;
|
|
145
|
+
onRefresh?: MaybeShared<() => void>;
|
|
146
|
+
progressViewOffset: MaybeShared<number> | SharedValue<number>;
|
|
147
|
+
}
|
|
148
|
+
export declare function resolveRefreshControl({ refreshControl, refreshing, onRefresh, progressViewOffset, }: ResolveRefreshControlOptions): ReactElement<RefreshControlProps | React.ComponentProps<typeof AnimatedRefreshControl>> | undefined;
|
|
149
|
+
export {};
|
|
150
|
+
//# sourceMappingURL=refreshControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshControl.d.ts","sourceRoot":"","sources":["../../../../src/utils/refreshControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAK3D,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAAmD,CAAC;AAEhF,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;AAErD,MAAM,WAAW,4BAA4B;IAC3C,cAAc,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAChE,UAAU,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,IAAI,CAAC,CAAC;IACpC,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/D;AAED,wBAAgB,qBAAqB,CAAC,EACpC,cAAc,EACd,UAAU,EACV,SAAS,EACT,kBAAkB,GACnB,EAAE,4BAA4B,GAC3B,YAAY,CACV,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,sBAAsB,CAAC,CAC1E,GACD,SAAS,CAYZ"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
2
|
+
import type { ScrollValue, ScrollValues } from '../types';
|
|
2
3
|
export declare function getInitialScrollValue(): ScrollValue;
|
|
4
|
+
export declare function ensureScrollValueRegistered(scrollValues: SharedValue<ScrollValues>, id: string): ScrollValues;
|
|
5
|
+
export declare function warnIfMissingActiveScrollId(scrollValues: ScrollValues, id: string, activeScrollId: string | undefined): void;
|
|
3
6
|
//# sourceMappingURL=values.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../../../src/utils/values.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../../../src/utils/values.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG1D,wBAAgB,qBAAqB,IAAI,WAAW,CAGnD;AAED,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,WAAW,CAAC,YAAY,CAAC,EACvC,EAAE,EAAE,MAAM,GACT,YAAY,CAiBd;AAED,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,YAAY,EAC1B,EAAE,EAAE,MAAM,EACV,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,IAAI,CA0BN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-header-motion",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
4
|
"description": "Smooth, animated collapsible headers with scroll-based motion control in React Native",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -76,17 +76,19 @@
|
|
|
76
76
|
"jest": "^29.7.0",
|
|
77
77
|
"lefthook": "^2.0.3",
|
|
78
78
|
"prettier": "^2.8.8",
|
|
79
|
-
"react": "19.
|
|
80
|
-
"react-native": "0.
|
|
79
|
+
"react": "19.2.0",
|
|
80
|
+
"react-native": "0.83.2",
|
|
81
81
|
"react-native-builder-bob": "^0.40.17",
|
|
82
|
-
"react-native-
|
|
83
|
-
"react-native-
|
|
82
|
+
"react-native-gesture-handler": "2.30.0",
|
|
83
|
+
"react-native-reanimated": "4.2.1",
|
|
84
|
+
"react-native-worklets": "0.7.2",
|
|
84
85
|
"release-it": "^19.0.4",
|
|
85
86
|
"typescript": "^5.9.2"
|
|
86
87
|
},
|
|
87
88
|
"peerDependencies": {
|
|
88
89
|
"react": "*",
|
|
89
90
|
"react-native": "*",
|
|
91
|
+
"react-native-gesture-handler": "^2.0.0",
|
|
90
92
|
"react-native-reanimated": ">=4.0.0",
|
|
91
93
|
"react-native-worklets": ">=0.4.0"
|
|
92
94
|
},
|
|
@@ -114,6 +116,12 @@
|
|
|
114
116
|
},
|
|
115
117
|
"jest": {
|
|
116
118
|
"preset": "react-native",
|
|
119
|
+
"setupFilesAfterEnv": [
|
|
120
|
+
"<rootDir>/jest-setup.js"
|
|
121
|
+
],
|
|
122
|
+
"transformIgnorePatterns": [
|
|
123
|
+
"node_modules/(?!(react-native|@react-native|react-native-reanimated|react-native-worklets)/)"
|
|
124
|
+
],
|
|
117
125
|
"modulePathIgnorePatterns": [
|
|
118
126
|
"<rootDir>/example/node_modules",
|
|
119
127
|
"<rootDir>/lib/"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useHeaderMotionBridge } from '../hooks/useHeaderMotionBridge';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { HeaderMotionBridgeValue } from '../types';
|
|
4
|
+
|
|
5
|
+
type HeaderRenderChildren = (value: HeaderMotionBridgeValue) => ReactNode;
|
|
6
|
+
|
|
7
|
+
export interface HeaderMotionBridgeProps {
|
|
8
|
+
/**
|
|
9
|
+
* Render function that receives the current HeaderMotion context value.
|
|
10
|
+
*
|
|
11
|
+
* Use this when you need to pass the library's context across a React tree
|
|
12
|
+
* boundary, most commonly into a navigation-rendered header.
|
|
13
|
+
*/
|
|
14
|
+
children: HeaderRenderChildren;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Reads the current HeaderMotion context and exposes it through a render
|
|
19
|
+
* function so it can be forwarded into another subtree.
|
|
20
|
+
*/
|
|
21
|
+
export function Bridge({ children }: HeaderMotionBridgeProps) {
|
|
22
|
+
if (typeof children !== 'function') {
|
|
23
|
+
throw new Error(
|
|
24
|
+
'HeaderMotion.Bridge only accepts a render function as its child.'
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return children(useHeaderMotionBridge());
|
|
29
|
+
}
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Animated, {
|
|
3
|
-
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import Animated, {
|
|
3
|
+
type FlatListPropsWithLayout,
|
|
4
|
+
} from 'react-native-reanimated';
|
|
5
|
+
import {
|
|
6
|
+
createHeaderMotionScrollable,
|
|
7
|
+
type HeaderMotionScrollableOwnProps,
|
|
8
|
+
} from './createHeaderMotionScrollable';
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
export type HeaderMotionFlatListProps<T = any> = FlatListPropsWithLayout<T> &
|
|
11
|
+
HeaderMotionScrollableOwnProps<Animated.FlatList<T>>;
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Optional unique identifier for this scroll view.
|
|
12
|
-
* Use this when you have multiple scroll views (e.g. in tabs) to track them separately.
|
|
13
|
-
*/
|
|
14
|
-
scrollId?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Optional animated ref to use for the flat list.
|
|
17
|
-
* When provided, the scroll manager will use this ref instead of creating its own.
|
|
18
|
-
*/
|
|
19
|
-
animatedRef?: AnimatedRef<any>;
|
|
20
|
-
};
|
|
13
|
+
type FlatListComponent = <T = any>(
|
|
14
|
+
props: HeaderMotionFlatListProps<T>
|
|
15
|
+
) => ReactElement | null;
|
|
21
16
|
|
|
22
17
|
/**
|
|
23
18
|
* Animated FlatList component that integrates with HeaderMotion.
|
|
@@ -36,69 +31,8 @@ export type HeaderMotionFlatListProps<T = any> = ComponentProps<
|
|
|
36
31
|
* </HeaderMotion>
|
|
37
32
|
* ```
|
|
38
33
|
*/
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
onScrollBeginDrag,
|
|
45
|
-
onScrollEndDrag,
|
|
46
|
-
onMomentumScrollBegin,
|
|
47
|
-
onMomentumScrollEnd,
|
|
48
|
-
...props
|
|
49
|
-
}: HeaderMotionFlatListProps<T>) {
|
|
50
|
-
return (
|
|
51
|
-
<HeaderMotionScrollManager
|
|
52
|
-
scrollId={scrollId}
|
|
53
|
-
animatedRef={animatedRef}
|
|
54
|
-
refreshControl={props.refreshControl}
|
|
55
|
-
refreshing={props.refreshing}
|
|
56
|
-
onRefresh={props.onRefresh}
|
|
57
|
-
progressViewOffset={props.progressViewOffset}
|
|
58
|
-
onScroll={onScroll}
|
|
59
|
-
onScrollBeginDrag={onScrollBeginDrag}
|
|
60
|
-
onScrollEndDrag={onScrollEndDrag}
|
|
61
|
-
onMomentumScrollBegin={onMomentumScrollBegin}
|
|
62
|
-
onMomentumScrollEnd={onMomentumScrollEnd}
|
|
63
|
-
>
|
|
64
|
-
{(
|
|
65
|
-
{
|
|
66
|
-
onScroll: managedOnScroll,
|
|
67
|
-
refreshControl: managedRefreshControl,
|
|
68
|
-
...scrollViewProps
|
|
69
|
-
},
|
|
70
|
-
{ originalHeaderHeight, minHeightContentContainerStyle }
|
|
71
|
-
) => (
|
|
72
|
-
<Animated.FlatList
|
|
73
|
-
{...scrollViewProps}
|
|
74
|
-
{...props}
|
|
75
|
-
onScroll={managedOnScroll}
|
|
76
|
-
{...(managedRefreshControl && {
|
|
77
|
-
refreshControl: managedRefreshControl,
|
|
78
|
-
})}
|
|
79
|
-
renderScrollComponent={(scrollComponentProps) => (
|
|
80
|
-
<AnimatedScrollContainer
|
|
81
|
-
{...scrollComponentProps}
|
|
82
|
-
contentContainerStyle={[
|
|
83
|
-
minHeightContentContainerStyle,
|
|
84
|
-
{ paddingTop: originalHeaderHeight },
|
|
85
|
-
contentContainerStyle,
|
|
86
|
-
]}
|
|
87
|
-
/>
|
|
88
|
-
)}
|
|
89
|
-
/>
|
|
90
|
-
)}
|
|
91
|
-
</HeaderMotionScrollManager>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const AnimatedScrollContainer = forwardRef<
|
|
96
|
-
ComponentRef<typeof Animated.ScrollView>,
|
|
97
|
-
ScrollViewProps
|
|
98
|
-
>(({ children, contentContainerStyle, ...rest }, ref) => {
|
|
99
|
-
return (
|
|
100
|
-
<Animated.ScrollView {...rest} ref={ref}>
|
|
101
|
-
<Animated.View style={contentContainerStyle}>{children}</Animated.View>
|
|
102
|
-
</Animated.ScrollView>
|
|
103
|
-
);
|
|
104
|
-
});
|
|
34
|
+
export const FlatList = createHeaderMotionScrollable(Animated.FlatList, {
|
|
35
|
+
displayName: 'HeaderMotion.FlatList',
|
|
36
|
+
contentContainerMode: 'renderScrollComponent',
|
|
37
|
+
isComponentAnimated: true,
|
|
38
|
+
}) as FlatListComponent;
|