@lodev09/react-native-true-sheet 2.0.6 → 4.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 +36 -8
- package/RNTrueSheet.podspec +20 -0
- package/android/build.gradle +26 -14
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerView.kt +108 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerViewManager.kt +21 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentView.kt +46 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentViewManager.kt +21 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterView.kt +47 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterViewManager.kt +21 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetModule.kt +165 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetPackage.kt +36 -4
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +257 -303
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt +855 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewManager.kt +104 -82
- package/android/src/main/java/com/lodev09/truesheet/events/DetentChangeEvent.kt +26 -0
- package/android/src/main/java/com/lodev09/truesheet/events/DidDismissEvent.kt +20 -0
- package/android/src/main/java/com/lodev09/truesheet/events/DidPresentEvent.kt +26 -0
- package/android/src/main/java/com/lodev09/truesheet/events/DragBeginEvent.kt +26 -0
- package/android/src/main/java/com/lodev09/truesheet/events/DragChangeEvent.kt +26 -0
- package/android/src/main/java/com/lodev09/truesheet/events/DragEndEvent.kt +26 -0
- package/android/src/main/java/com/lodev09/truesheet/events/MountEvent.kt +20 -0
- package/android/src/main/java/com/lodev09/truesheet/events/PositionChangeEvent.kt +32 -0
- package/android/src/main/java/com/lodev09/truesheet/events/SizeChangeEvent.kt +27 -0
- package/android/src/main/java/com/lodev09/truesheet/events/WillDismissEvent.kt +20 -0
- package/android/src/main/java/com/lodev09/truesheet/events/WillPresentEvent.kt +26 -0
- package/android/src/main/java/com/lodev09/truesheet/{core/Utils.kt → utils/ScreenUtils.kt} +47 -17
- package/android/src/main/res/values/styles.xml +8 -0
- package/ios/TrueSheetComponentDescriptor.h +24 -0
- package/ios/TrueSheetContainerView.h +47 -0
- package/ios/TrueSheetContainerView.mm +117 -0
- package/ios/TrueSheetContentView.h +37 -0
- package/ios/TrueSheetContentView.mm +114 -0
- package/ios/TrueSheetFooterView.h +27 -0
- package/ios/TrueSheetFooterView.mm +101 -0
- package/ios/TrueSheetModule.h +44 -0
- package/ios/TrueSheetModule.mm +133 -0
- package/ios/TrueSheetView.h +53 -0
- package/ios/TrueSheetView.mm +433 -0
- package/ios/TrueSheetViewController.h +53 -0
- package/ios/TrueSheetViewController.mm +649 -0
- package/ios/events/OnDetentChangeEvent.h +28 -0
- package/ios/events/OnDetentChangeEvent.mm +30 -0
- package/ios/events/OnDidDismissEvent.h +26 -0
- package/ios/events/OnDidDismissEvent.mm +25 -0
- package/ios/events/OnDidPresentEvent.h +28 -0
- package/ios/events/OnDidPresentEvent.mm +30 -0
- package/ios/events/OnDragBeginEvent.h +28 -0
- package/ios/events/OnDragBeginEvent.mm +30 -0
- package/ios/events/OnDragChangeEvent.h +28 -0
- package/ios/events/OnDragChangeEvent.mm +30 -0
- package/ios/events/OnDragEndEvent.h +28 -0
- package/ios/events/OnDragEndEvent.mm +30 -0
- package/ios/events/OnMountEvent.h +26 -0
- package/ios/events/OnMountEvent.mm +25 -0
- package/ios/events/OnPositionChangeEvent.h +29 -0
- package/ios/events/OnPositionChangeEvent.mm +32 -0
- package/ios/events/OnSizeChangeEvent.h +28 -0
- package/ios/events/OnSizeChangeEvent.mm +30 -0
- package/ios/events/OnWillDismissEvent.h +26 -0
- package/ios/events/OnWillDismissEvent.mm +25 -0
- package/ios/events/OnWillPresentEvent.h +28 -0
- package/ios/events/OnWillPresentEvent.mm +30 -0
- package/ios/utils/GestureUtil.h +25 -0
- package/ios/utils/GestureUtil.mm +26 -0
- package/ios/utils/LayoutUtil.h +44 -0
- package/ios/utils/LayoutUtil.mm +50 -0
- package/ios/utils/WindowUtil.h +27 -0
- package/ios/utils/WindowUtil.mm +42 -0
- package/lib/module/TrueSheet.js +231 -135
- package/lib/module/TrueSheet.js.map +1 -1
- package/lib/module/TrueSheetGrabber.js +16 -14
- package/lib/module/TrueSheetGrabber.js.map +1 -1
- package/lib/module/fabric/TrueSheetContainerViewNativeComponent.ts +8 -0
- package/lib/module/fabric/TrueSheetContentViewNativeComponent.ts +8 -0
- package/lib/module/fabric/TrueSheetFooterViewNativeComponent.ts +8 -0
- package/lib/module/fabric/TrueSheetViewNativeComponent.ts +63 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/reanimated/ReanimatedTrueSheet.js +87 -0
- package/lib/module/reanimated/ReanimatedTrueSheet.js.map +1 -0
- package/lib/module/reanimated/ReanimatedTrueSheetProvider.js +72 -0
- package/lib/module/reanimated/ReanimatedTrueSheetProvider.js.map +1 -0
- package/lib/module/reanimated/index.js +6 -0
- package/lib/module/reanimated/index.js.map +1 -0
- package/lib/module/reanimated/useReanimatedPositionChangeHandler.js +19 -0
- package/lib/module/reanimated/useReanimatedPositionChangeHandler.js.map +1 -0
- package/lib/module/specs/NativeTrueSheetModule.js +12 -0
- package/lib/module/specs/NativeTrueSheetModule.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/TrueSheet.d.ts +79 -0
- package/lib/typescript/src/TrueSheet.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheet.types.d.ts +260 -0
- package/lib/typescript/src/TrueSheet.types.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/TrueSheetGrabber.d.ts +1 -1
- package/lib/typescript/src/TrueSheetGrabber.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetContainerViewNativeComponent.d.ts +6 -0
- package/lib/typescript/src/fabric/TrueSheetContainerViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetContentViewNativeComponent.d.ts +6 -0
- package/lib/typescript/src/fabric/TrueSheetContentViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetFooterViewNativeComponent.d.ts +6 -0
- package/lib/typescript/src/fabric/TrueSheetFooterViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts +44 -0
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/{commonjs/src → src}/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/reanimated/ReanimatedTrueSheet.d.ts +43 -0
- package/lib/typescript/src/reanimated/ReanimatedTrueSheet.d.ts.map +1 -0
- package/lib/typescript/src/reanimated/ReanimatedTrueSheetProvider.d.ts +57 -0
- package/lib/typescript/src/reanimated/ReanimatedTrueSheetProvider.d.ts.map +1 -0
- package/lib/typescript/src/reanimated/index.d.ts +4 -0
- package/lib/typescript/src/reanimated/index.d.ts.map +1 -0
- package/lib/typescript/src/reanimated/useReanimatedPositionChangeHandler.d.ts +6 -0
- package/lib/typescript/src/reanimated/useReanimatedPositionChangeHandler.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeTrueSheetModule.d.ts +34 -0
- package/lib/typescript/src/specs/NativeTrueSheetModule.d.ts.map +1 -0
- package/package.json +104 -75
- package/react-native.config.js +17 -0
- package/src/TrueSheet.tsx +285 -188
- package/src/TrueSheet.types.ts +119 -106
- package/src/TrueSheetGrabber.tsx +29 -28
- package/src/__mocks__/index.js +60 -12
- package/src/fabric/TrueSheetContainerViewNativeComponent.ts +8 -0
- package/src/fabric/TrueSheetContentViewNativeComponent.ts +8 -0
- package/src/fabric/TrueSheetFooterViewNativeComponent.ts +8 -0
- package/src/fabric/TrueSheetViewNativeComponent.ts +63 -0
- package/src/index.ts +4 -3
- package/src/reanimated/ReanimatedTrueSheet.tsx +95 -0
- package/src/reanimated/ReanimatedTrueSheetProvider.tsx +92 -0
- package/src/reanimated/index.ts +3 -0
- package/src/reanimated/useReanimatedPositionChangeHandler.ts +26 -0
- package/src/specs/NativeTrueSheetModule.ts +38 -0
- package/TrueSheet.podspec +0 -49
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetDialog.kt +0 -413
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetEvent.kt +0 -22
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewModule.kt +0 -63
- package/android/src/main/java/com/lodev09/truesheet/core/KeyboardManager.kt +0 -58
- package/android/src/main/java/com/lodev09/truesheet/core/RootSheetView.kt +0 -102
- package/ios/Extensions/UIBlurEffect+withTint.swift +0 -62
- package/ios/Extensions/UIView+pinTo.swift +0 -74
- package/ios/Extensions/UIViewController+detentForSize.swift +0 -134
- package/ios/TrueSheet-Bridging-Header.h +0 -14
- package/ios/TrueSheetEvent.swift +0 -48
- package/ios/TrueSheetView.swift +0 -467
- package/ios/TrueSheetViewController.swift +0 -275
- package/ios/TrueSheetViewManager.m +0 -53
- package/ios/TrueSheetViewManager.swift +0 -48
- package/ios/Utils/Logger.swift +0 -39
- package/ios/Utils/Promise.swift +0 -25
- package/lib/commonjs/TrueSheet.js +0 -258
- package/lib/commonjs/TrueSheet.js.map +0 -1
- package/lib/commonjs/TrueSheet.types.js +0 -6
- package/lib/commonjs/TrueSheet.types.js.map +0 -1
- package/lib/commonjs/TrueSheetFooter.js +0 -19
- package/lib/commonjs/TrueSheetFooter.js.map +0 -1
- package/lib/commonjs/TrueSheetGrabber.js +0 -54
- package/lib/commonjs/TrueSheetGrabber.js.map +0 -1
- package/lib/commonjs/TrueSheetModule.js +0 -19
- package/lib/commonjs/TrueSheetModule.js.map +0 -1
- package/lib/commonjs/__mocks__/index.js +0 -52
- package/lib/commonjs/__mocks__/index.js.map +0 -1
- package/lib/commonjs/index.js +0 -39
- package/lib/commonjs/index.js.map +0 -1
- package/lib/module/TrueSheetFooter.js +0 -14
- package/lib/module/TrueSheetFooter.js.map +0 -1
- package/lib/module/TrueSheetModule.js +0 -15
- package/lib/module/TrueSheetModule.js.map +0 -1
- package/lib/module/__mocks__/index.js +0 -21
- package/lib/module/__mocks__/index.js.map +0 -1
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/TrueSheet.d.ts +0 -70
- package/lib/typescript/commonjs/src/TrueSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/TrueSheet.types.d.ts +0 -241
- package/lib/typescript/commonjs/src/TrueSheet.types.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/TrueSheetFooter.d.ts +0 -7
- package/lib/typescript/commonjs/src/TrueSheetFooter.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/TrueSheetGrabber.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/TrueSheetModule.d.ts +0 -2
- package/lib/typescript/commonjs/src/TrueSheetModule.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/TrueSheet.d.ts +0 -70
- package/lib/typescript/module/src/TrueSheet.d.ts.map +0 -1
- package/lib/typescript/module/src/TrueSheet.types.d.ts +0 -241
- package/lib/typescript/module/src/TrueSheet.types.d.ts.map +0 -1
- package/lib/typescript/module/src/TrueSheetFooter.d.ts +0 -7
- package/lib/typescript/module/src/TrueSheetFooter.d.ts.map +0 -1
- package/lib/typescript/module/src/TrueSheetGrabber.d.ts +0 -39
- package/lib/typescript/module/src/TrueSheetGrabber.d.ts.map +0 -1
- package/lib/typescript/module/src/TrueSheetModule.d.ts +0 -2
- package/lib/typescript/module/src/TrueSheetModule.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -4
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/src/TrueSheetFooter.tsx +0 -17
- package/src/TrueSheetModule.ts +0 -19
- /package/lib/{typescript/module → module}/package.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { View } from 'react-native';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
const GRABBER_DEFAULT_HEIGHT = 4;
|
|
6
6
|
const GRABBER_DEFAULT_WIDTH = 32;
|
|
@@ -22,12 +22,12 @@ export const TrueSheetGrabber = props => {
|
|
|
22
22
|
} = props;
|
|
23
23
|
if (!visible) return null;
|
|
24
24
|
return /*#__PURE__*/_jsx(View, {
|
|
25
|
-
style: [
|
|
25
|
+
style: [styles.wrapper, style, {
|
|
26
26
|
height: GRABBER_DEFAULT_HEIGHT * 4,
|
|
27
27
|
top: topOffset
|
|
28
28
|
}],
|
|
29
29
|
children: /*#__PURE__*/_jsx(View, {
|
|
30
|
-
style: [
|
|
30
|
+
style: [styles.grabber, {
|
|
31
31
|
height,
|
|
32
32
|
width,
|
|
33
33
|
backgroundColor: color
|
|
@@ -35,15 +35,17 @@ export const TrueSheetGrabber = props => {
|
|
|
35
35
|
})
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
38
|
+
const styles = StyleSheet.create({
|
|
39
|
+
wrapper: {
|
|
40
|
+
position: 'absolute',
|
|
41
|
+
alignSelf: 'center',
|
|
42
|
+
paddingHorizontal: 12,
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
justifyContent: 'center',
|
|
45
|
+
zIndex: 9999
|
|
46
|
+
},
|
|
47
|
+
grabber: {
|
|
48
|
+
borderRadius: GRABBER_DEFAULT_HEIGHT / 2
|
|
49
|
+
}
|
|
50
|
+
});
|
|
49
51
|
//# sourceMappingURL=TrueSheetGrabber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","jsx","_jsx","GRABBER_DEFAULT_HEIGHT","GRABBER_DEFAULT_WIDTH","GRABBER_DEFAULT_COLOR","TrueSheetGrabber","props","visible","color","width","height","topOffset","style","
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","jsx","_jsx","GRABBER_DEFAULT_HEIGHT","GRABBER_DEFAULT_WIDTH","GRABBER_DEFAULT_COLOR","TrueSheetGrabber","props","visible","color","width","height","topOffset","style","styles","wrapper","top","children","grabber","backgroundColor","create","position","alignSelf","paddingHorizontal","alignItems","justifyContent","zIndex","borderRadius"],"sourceRoot":"../../src","sources":["TrueSheetGrabber.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAyD,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjG,MAAMC,sBAAsB,GAAG,CAAC;AAChC,MAAMC,qBAAqB,GAAG,EAAE;;AAEhC;AACA,MAAMC,qBAAqB,GAAG,oBAAoB;AAwClD;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAIC,KAA4B,IAAK;EAChE,MAAM;IACJC,OAAO,GAAG,IAAI;IACdC,KAAK,GAAGJ,qBAAqB;IAC7BK,KAAK,GAAGN,qBAAqB;IAC7BO,MAAM,GAAGR,sBAAsB;IAC/BS,SAAS,GAAG,CAAC;IACbC;EACF,CAAC,GAAGN,KAAK;EAET,IAAI,CAACC,OAAO,EAAE,OAAO,IAAI;EAEzB,oBACEN,IAAA,CAACF,IAAI;IAACa,KAAK,EAAE,CAACC,MAAM,CAACC,OAAO,EAAEF,KAAK,EAAE;MAAEF,MAAM,EAAER,sBAAsB,GAAG,CAAC;MAAEa,GAAG,EAAEJ;IAAU,CAAC,CAAE;IAAAK,QAAA,eAC3Ff,IAAA,CAACF,IAAI;MAACa,KAAK,EAAE,CAACC,MAAM,CAACI,OAAO,EAAE;QAAEP,MAAM;QAAED,KAAK;QAAES,eAAe,EAAEV;MAAM,CAAC;IAAE,CAAE;EAAC,CACxE,CAAC;AAEX,CAAC;AAED,MAAMK,MAAM,GAAGf,UAAU,CAACqB,MAAM,CAAC;EAC/BL,OAAO,EAAE;IACPM,QAAQ,EAAE,UAAU;IACpBC,SAAS,EAAE,QAAQ;IACnBC,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,MAAM,EAAE;EACV,CAAC;EACDR,OAAO,EAAE;IACPS,YAAY,EAAExB,sBAAsB,GAAG;EACzC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
import { codegenNativeComponent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
// No props needed - container accesses props from parent TrueSheetView
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default codegenNativeComponent<NativeProps>('TrueSheetContainerView', {});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
import { codegenNativeComponent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
// No props needed - size will be controlled by parent
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default codegenNativeComponent<NativeProps>('TrueSheetContentView', {});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
import { codegenNativeComponent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export interface NativeProps extends ViewProps {
|
|
5
|
+
// Footer-specific props can be added here if needed
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default codegenNativeComponent<NativeProps>('TrueSheetFooterView', {});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
import type {
|
|
3
|
+
DirectEventHandler,
|
|
4
|
+
Double,
|
|
5
|
+
Int32,
|
|
6
|
+
WithDefault,
|
|
7
|
+
Float,
|
|
8
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
9
|
+
import { codegenNativeComponent } from 'react-native';
|
|
10
|
+
|
|
11
|
+
export interface DetentInfoEventPayload {
|
|
12
|
+
index: Int32;
|
|
13
|
+
position: Double;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface PositionChangeEventPayload {
|
|
17
|
+
index: Int32;
|
|
18
|
+
position: Double;
|
|
19
|
+
transitioning: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface SizeChangeEventPayload {
|
|
23
|
+
width: Double;
|
|
24
|
+
height: Double;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface NativeProps extends ViewProps {
|
|
28
|
+
// Array properties
|
|
29
|
+
detents?: ReadonlyArray<Float>;
|
|
30
|
+
|
|
31
|
+
// Number properties - use 0 as default to avoid nil insertion
|
|
32
|
+
maxHeight?: WithDefault<Double, 0>;
|
|
33
|
+
background?: WithDefault<Int32, 0>;
|
|
34
|
+
cornerRadius?: WithDefault<Double, -1>;
|
|
35
|
+
initialDetentIndex?: WithDefault<Int32, -1>;
|
|
36
|
+
dimmedIndex?: WithDefault<Int32, 0>;
|
|
37
|
+
|
|
38
|
+
// String properties - use empty string as default to avoid nil insertion
|
|
39
|
+
blurTint?: WithDefault<string, ''>;
|
|
40
|
+
keyboardMode?: WithDefault<'resize' | 'pan', 'resize'>;
|
|
41
|
+
|
|
42
|
+
// Boolean properties - match defaults from TrueSheet.types.ts
|
|
43
|
+
grabber?: WithDefault<boolean, true>;
|
|
44
|
+
dismissible?: WithDefault<boolean, true>;
|
|
45
|
+
dimmed?: WithDefault<boolean, true>;
|
|
46
|
+
initialDetentAnimated?: WithDefault<boolean, true>;
|
|
47
|
+
edgeToEdgeFullScreen?: WithDefault<boolean, false>;
|
|
48
|
+
|
|
49
|
+
// Event handlers
|
|
50
|
+
onMount?: DirectEventHandler<null>;
|
|
51
|
+
onWillPresent?: DirectEventHandler<DetentInfoEventPayload>;
|
|
52
|
+
onDidPresent?: DirectEventHandler<DetentInfoEventPayload>;
|
|
53
|
+
onWillDismiss?: DirectEventHandler<null>;
|
|
54
|
+
onDidDismiss?: DirectEventHandler<null>;
|
|
55
|
+
onDetentChange?: DirectEventHandler<DetentInfoEventPayload>;
|
|
56
|
+
onDragBegin?: DirectEventHandler<DetentInfoEventPayload>;
|
|
57
|
+
onDragChange?: DirectEventHandler<DetentInfoEventPayload>;
|
|
58
|
+
onDragEnd?: DirectEventHandler<DetentInfoEventPayload>;
|
|
59
|
+
onPositionChange?: DirectEventHandler<PositionChangeEventPayload>;
|
|
60
|
+
onSizeChange?: DirectEventHandler<SizeChangeEventPayload>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export default codegenNativeComponent<NativeProps>('TrueSheetView');
|
package/lib/module/index.js
CHANGED
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,gBAAa;AAC3B,cAAc,sBAAmB;AACjC,cAAc,uBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,cAAc,gBAAa;AAC3B,cAAc,sBAAmB;AACjC,cAAc,uBAAoB;AAClC,cAAc,uBAAc","ignoreList":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import Animated, { withSpring, withTiming, Easing } from 'react-native-reanimated';
|
|
5
|
+
import { Platform } from 'react-native';
|
|
6
|
+
import { TrueSheet } from "../TrueSheet.js";
|
|
7
|
+
import { useReanimatedTrueSheet } from "./ReanimatedTrueSheetProvider.js";
|
|
8
|
+
import { useReanimatedPositionChangeHandler } from "./useReanimatedPositionChangeHandler.js";
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
const SPRING_CONFIG = {
|
|
11
|
+
damping: 500,
|
|
12
|
+
stiffness: 1000,
|
|
13
|
+
mass: 3,
|
|
14
|
+
overshootClamping: true
|
|
15
|
+
};
|
|
16
|
+
const TIMING_CONFIG = {
|
|
17
|
+
duration: 300,
|
|
18
|
+
easing: Easing.bezier(0.25, 0.1, 0.25, 1)
|
|
19
|
+
};
|
|
20
|
+
// Create animated version of TrueSheet
|
|
21
|
+
const AnimatedTrueSheet = Animated.createAnimatedComponent(TrueSheet);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Reanimated-enabled version of TrueSheet that automatically syncs position with the provider's shared value.
|
|
25
|
+
* Must be used within a ReanimatedTrueSheetProvider.
|
|
26
|
+
*
|
|
27
|
+
* NOTE: `onPositionChange` is now under UI thread.
|
|
28
|
+
* Make sure you add `worklet` if you want to override this.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* import { ReanimatedTrueSheet, ReanimatedTrueSheetProvider } from '@lodev09/react-native-true-sheet'
|
|
33
|
+
*
|
|
34
|
+
* function MyScreen() {
|
|
35
|
+
* const sheetRef = useRef<TrueSheet>(null)
|
|
36
|
+
*
|
|
37
|
+
* return (
|
|
38
|
+
* <ReanimatedTrueSheetProvider>
|
|
39
|
+
* <View>
|
|
40
|
+
* <ReanimatedTrueSheet
|
|
41
|
+
* ref={sheetRef}
|
|
42
|
+
* detents={[0.25, 0.5, 1]}
|
|
43
|
+
* initialDetentIndex={1}
|
|
44
|
+
* >
|
|
45
|
+
* <Text>Sheet Content</Text>
|
|
46
|
+
* </ReanimatedTrueSheet>
|
|
47
|
+
* </View>
|
|
48
|
+
* </ReanimatedTrueSheetProvider>
|
|
49
|
+
* )
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export const ReanimatedTrueSheet = /*#__PURE__*/forwardRef((props, ref) => {
|
|
54
|
+
const {
|
|
55
|
+
onPositionChange,
|
|
56
|
+
...rest
|
|
57
|
+
} = props;
|
|
58
|
+
const {
|
|
59
|
+
animatedPosition,
|
|
60
|
+
animatedIndex
|
|
61
|
+
} = useReanimatedTrueSheet();
|
|
62
|
+
const positionChangeHandler = useReanimatedPositionChangeHandler(payload => {
|
|
63
|
+
'worklet';
|
|
64
|
+
|
|
65
|
+
// When transitioning=true, we animate the position manually for smooth transitions.
|
|
66
|
+
// This is used when native can't provide real-time position updates during animations.
|
|
67
|
+
if (payload.transitioning) {
|
|
68
|
+
if (Platform.OS === 'android') {
|
|
69
|
+
animatedPosition.value = withTiming(payload.position, TIMING_CONFIG);
|
|
70
|
+
} else {
|
|
71
|
+
animatedPosition.value = withSpring(payload.position, SPRING_CONFIG);
|
|
72
|
+
}
|
|
73
|
+
} else {
|
|
74
|
+
animatedPosition.value = payload.position;
|
|
75
|
+
}
|
|
76
|
+
animatedIndex.value = payload.index;
|
|
77
|
+
onPositionChange?.({
|
|
78
|
+
nativeEvent: payload
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
return /*#__PURE__*/_jsx(AnimatedTrueSheet, {
|
|
82
|
+
ref: ref,
|
|
83
|
+
onPositionChange: positionChangeHandler,
|
|
84
|
+
...rest
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=ReanimatedTrueSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Animated","withSpring","withTiming","Easing","Platform","TrueSheet","useReanimatedTrueSheet","useReanimatedPositionChangeHandler","jsx","_jsx","SPRING_CONFIG","damping","stiffness","mass","overshootClamping","TIMING_CONFIG","duration","easing","bezier","AnimatedTrueSheet","createAnimatedComponent","ReanimatedTrueSheet","props","ref","onPositionChange","rest","animatedPosition","animatedIndex","positionChangeHandler","payload","transitioning","OS","value","position","index","nativeEvent"],"sourceRoot":"../../../src","sources":["reanimated/ReanimatedTrueSheet.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,OAAOC,QAAQ,IAGbC,UAAU,EACVC,UAAU,EACVC,MAAM,QACD,yBAAyB;AAChC,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,SAAS,QAAQ,iBAAc;AAExC,SAASC,sBAAsB,QAAQ,kCAA+B;AACtE,SAASC,kCAAkC,QAAQ,yCAAsC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE1F,MAAMC,aAA+B,GAAG;EACtCC,OAAO,EAAE,GAAG;EACZC,SAAS,EAAE,IAAI;EACfC,IAAI,EAAE,CAAC;EACPC,iBAAiB,EAAE;AACrB,CAAC;AAED,MAAMC,aAA+B,GAAG;EACtCC,QAAQ,EAAE,GAAG;EACbC,MAAM,EAAEd,MAAM,CAACe,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAC1C,CAAC;AAWD;AACA,MAAMC,iBAAiB,GAAGnB,QAAQ,CAACoB,uBAAuB,CAACf,SAAS,CAAC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMgB,mBAAmB,gBAAGtB,UAAU,CAAsC,CAACuB,KAAK,EAAEC,GAAG,KAAK;EACjG,MAAM;IAAEC,gBAAgB;IAAE,GAAGC;EAAK,CAAC,GAAGH,KAAK;EAE3C,MAAM;IAAEI,gBAAgB;IAAEC;EAAc,CAAC,GAAGrB,sBAAsB,CAAC,CAAC;EAEpE,MAAMsB,qBAAqB,GAAGrB,kCAAkC,CAAEsB,OAAO,IAAK;IAC5E,SAAS;;IAET;IACA;IACA,IAAIA,OAAO,CAACC,aAAa,EAAE;MACzB,IAAI1B,QAAQ,CAAC2B,EAAE,KAAK,SAAS,EAAE;QAC7BL,gBAAgB,CAACM,KAAK,GAAG9B,UAAU,CAAC2B,OAAO,CAACI,QAAQ,EAAElB,aAAa,CAAC;MACtE,CAAC,MAAM;QACLW,gBAAgB,CAACM,KAAK,GAAG/B,UAAU,CAAC4B,OAAO,CAACI,QAAQ,EAAEvB,aAAa,CAAC;MACtE;IACF,CAAC,MAAM;MACLgB,gBAAgB,CAACM,KAAK,GAAGH,OAAO,CAACI,QAAQ;IAC3C;IAEAN,aAAa,CAACK,KAAK,GAAGH,OAAO,CAACK,KAAK;IACnCV,gBAAgB,GAAG;MAAEW,WAAW,EAAEN;IAAQ,CAAwB,CAAC;EACrE,CAAC,CAAC;EAEF,oBAAOpB,IAAA,CAACU,iBAAiB;IAACI,GAAG,EAAEA,GAAI;IAACC,gBAAgB,EAAEI,qBAAsB;IAAA,GAAKH;EAAI,CAAG,CAAC;AAC3F,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext, useMemo } from 'react';
|
|
4
|
+
import { useWindowDimensions } from 'react-native';
|
|
5
|
+
import { useSharedValue } from 'react-native-reanimated';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const ReanimatedTrueSheetContext = /*#__PURE__*/createContext(null);
|
|
8
|
+
/**
|
|
9
|
+
* Provider component that manages shared values for Reanimated TrueSheet.
|
|
10
|
+
* Wrap your app or component tree with this provider to enable Reanimated integration.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { ReanimatedTrueSheetProvider } from '@lodev09/react-native-true-sheet'
|
|
15
|
+
*
|
|
16
|
+
* function App() {
|
|
17
|
+
* return (
|
|
18
|
+
* <ReanimatedTrueSheetProvider>
|
|
19
|
+
* <YourApp />
|
|
20
|
+
* </ReanimatedTrueSheetProvider>
|
|
21
|
+
* )
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export const ReanimatedTrueSheetProvider = ({
|
|
26
|
+
children
|
|
27
|
+
}) => {
|
|
28
|
+
const {
|
|
29
|
+
height
|
|
30
|
+
} = useWindowDimensions();
|
|
31
|
+
const animatedPosition = useSharedValue(height);
|
|
32
|
+
const animatedIndex = useSharedValue(-1);
|
|
33
|
+
const value = useMemo(() => ({
|
|
34
|
+
animatedPosition,
|
|
35
|
+
animatedIndex
|
|
36
|
+
}), [animatedPosition, animatedIndex]);
|
|
37
|
+
return /*#__PURE__*/_jsx(ReanimatedTrueSheetContext.Provider, {
|
|
38
|
+
value: value,
|
|
39
|
+
children: children
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Hook to access the Reanimated TrueSheet context.
|
|
45
|
+
* Returns the shared values for sheet position and detent index that can be used in animations.
|
|
46
|
+
*
|
|
47
|
+
* @throws Error if used outside of ReanimatedTrueSheetProvider
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* import { useReanimatedTrueSheet } from '@lodev09/react-native-true-sheet'
|
|
52
|
+
* import { useAnimatedStyle } from 'react-native-reanimated'
|
|
53
|
+
*
|
|
54
|
+
* function MyComponent() {
|
|
55
|
+
* const { animatedPosition, animatedIndex } = useReanimatedTrueSheet()
|
|
56
|
+
*
|
|
57
|
+
* const animatedStyle = useAnimatedStyle(() => ({
|
|
58
|
+
* transform: [{ translateY: -animatedPosition.value }]
|
|
59
|
+
* }))
|
|
60
|
+
*
|
|
61
|
+
* return <Animated.View style={animatedStyle}>...</Animated.View>
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export const useReanimatedTrueSheet = () => {
|
|
66
|
+
const context = useContext(ReanimatedTrueSheetContext);
|
|
67
|
+
if (!context) {
|
|
68
|
+
throw new Error('useReanimatedTrueSheet must be used within a ReanimatedTrueSheetProvider. ' + 'Make sure to wrap your component tree with <ReanimatedTrueSheetProvider>.');
|
|
69
|
+
}
|
|
70
|
+
return context;
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=ReanimatedTrueSheetProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createContext","useContext","useMemo","useWindowDimensions","useSharedValue","jsx","_jsx","ReanimatedTrueSheetContext","ReanimatedTrueSheetProvider","children","height","animatedPosition","animatedIndex","value","Provider","useReanimatedTrueSheet","context","Error"],"sourceRoot":"../../../src","sources":["reanimated/ReanimatedTrueSheetProvider.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAwB,OAAO;AAC1E,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SAASC,cAAc,QAA0B,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAa3E,MAAMC,0BAA0B,gBAAGP,aAAa,CAAyC,IAAI,CAAC;AAM9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMQ,2BAA2B,GAAGA,CAAC;EAAEC;AAA2C,CAAC,KAAK;EAC7F,MAAM;IAAEC;EAAO,CAAC,GAAGP,mBAAmB,CAAC,CAAC;EACxC,MAAMQ,gBAAgB,GAAGP,cAAc,CAACM,MAAM,CAAC;EAC/C,MAAME,aAAa,GAAGR,cAAc,CAAC,CAAC,CAAC,CAAC;EAExC,MAAMS,KAAK,GAAGX,OAAO,CACnB,OAAO;IACLS,gBAAgB;IAChBC;EACF,CAAC,CAAC,EACF,CAACD,gBAAgB,EAAEC,aAAa,CAClC,CAAC;EAED,oBACEN,IAAA,CAACC,0BAA0B,CAACO,QAAQ;IAACD,KAAK,EAAEA,KAAM;IAAAJ,QAAA,EAC/CA;EAAQ,CAC0B,CAAC;AAE1C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMM,sBAAsB,GAAGA,CAAA,KAAuC;EAC3E,MAAMC,OAAO,GAAGf,UAAU,CAACM,0BAA0B,CAAC;EAEtD,IAAI,CAACS,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CACb,4EAA4E,GAC1E,2EACJ,CAAC;EACH;EAEA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["reanimated/index.ts"],"mappings":";;AAAA,cAAc,0BAAuB;AACrC,cAAc,kCAA+B;AAC7C,cAAc,yCAAsC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEvent, useHandler } from 'react-native-reanimated';
|
|
4
|
+
export const useReanimatedPositionChangeHandler = (handler, dependencies = []) => {
|
|
5
|
+
const {
|
|
6
|
+
context,
|
|
7
|
+
doDependenciesDiffer
|
|
8
|
+
} = useHandler({
|
|
9
|
+
onPositionChange: handler
|
|
10
|
+
}, dependencies);
|
|
11
|
+
return useEvent(event => {
|
|
12
|
+
'worklet';
|
|
13
|
+
|
|
14
|
+
if (handler && event.eventName.endsWith('onPositionChange')) {
|
|
15
|
+
handler(event, context);
|
|
16
|
+
}
|
|
17
|
+
}, ['onPositionChange'], doDependenciesDiffer);
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=useReanimatedPositionChangeHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEvent","useHandler","useReanimatedPositionChangeHandler","handler","dependencies","context","doDependenciesDiffer","onPositionChange","event","eventName","endsWith"],"sourceRoot":"../../../src","sources":["reanimated/useReanimatedPositionChangeHandler.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,UAAU,QAAQ,yBAAyB;AAS9D,OAAO,MAAMC,kCAAkC,GAAGA,CAChDC,OAA8B,EAC9BC,YAA4B,GAAG,EAAE,KAC9B;EACH,MAAM;IAAEC,OAAO;IAAEC;EAAqB,CAAC,GAAGL,UAAU,CAAC;IAAEM,gBAAgB,EAAEJ;EAAQ,CAAC,EAAEC,YAAY,CAAC;EAEjG,OAAOJ,QAAQ,CACZQ,KAAK,IAAK;IACT,SAAS;;IACT,IAAIL,OAAO,IAAIK,KAAK,CAACC,SAAS,CAACC,QAAQ,CAAC,kBAAkB,CAAC,EAAE;MAC3DP,OAAO,CAACK,KAAK,EAAEH,OAAO,CAAC;IACzB;EACF,CAAC,EACD,CAAC,kBAAkB,CAAC,EACpBC,oBACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TurboModule spec for TrueSheet imperative API
|
|
5
|
+
* Provides promise-based async operations with proper error handling
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
11
|
+
export default TurboModuleRegistry.get('TrueSheetModule');
|
|
12
|
+
//# sourceMappingURL=NativeTrueSheetModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","get"],"sourceRoot":"../../../src","sources":["specs/NativeTrueSheetModule.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,mBAAmB,QAAQ,cAAc;AA6BlD,eAAeA,mBAAmB,CAACC,GAAG,CAAO,iBAAiB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { PureComponent, type ReactNode } from 'react';
|
|
2
|
+
import type { TrueSheetProps } from './TrueSheet.types';
|
|
3
|
+
interface TrueSheetState {
|
|
4
|
+
shouldRenderNativeView: boolean;
|
|
5
|
+
containerWidth?: number;
|
|
6
|
+
containerHeight?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class TrueSheet extends PureComponent<TrueSheetProps, TrueSheetState> {
|
|
9
|
+
displayName: string;
|
|
10
|
+
private readonly nativeRef;
|
|
11
|
+
/**
|
|
12
|
+
* Map of sheet names against their instances.
|
|
13
|
+
*/
|
|
14
|
+
private static readonly instances;
|
|
15
|
+
/**
|
|
16
|
+
* Resolver to be called when mount event is received
|
|
17
|
+
*/
|
|
18
|
+
private presentationResolver;
|
|
19
|
+
constructor(props: TrueSheetProps);
|
|
20
|
+
private validateDetents;
|
|
21
|
+
private static getInstance;
|
|
22
|
+
private get handle();
|
|
23
|
+
/**
|
|
24
|
+
* Present the sheet by given `name` (Promise-based)
|
|
25
|
+
* @param name - Sheet name (must match sheet's name prop)
|
|
26
|
+
* @param index - Detent index (default: 0)
|
|
27
|
+
* @returns Promise that resolves when sheet is fully presented
|
|
28
|
+
* @throws Error if sheet not found or presentation fails
|
|
29
|
+
*/
|
|
30
|
+
static present(name: string, index?: number): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Dismiss the sheet by given `name` (Promise-based)
|
|
33
|
+
* @param name - Sheet name
|
|
34
|
+
* @returns Promise that resolves when sheet is fully dismissed
|
|
35
|
+
* @throws Error if sheet not found or dismissal fails
|
|
36
|
+
*/
|
|
37
|
+
static dismiss(name: string): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Resize the sheet by given `name` (Promise-based)
|
|
40
|
+
* @param name - Sheet name
|
|
41
|
+
* @param index - New detent index
|
|
42
|
+
* @returns Promise that resolves when resize is complete
|
|
43
|
+
* @throws Error if sheet not found
|
|
44
|
+
*/
|
|
45
|
+
static resize(name: string, index: number): Promise<void>;
|
|
46
|
+
private registerInstance;
|
|
47
|
+
private unregisterInstance;
|
|
48
|
+
private onDetentChange;
|
|
49
|
+
private onWillPresent;
|
|
50
|
+
private onDidPresent;
|
|
51
|
+
private onWillDismiss;
|
|
52
|
+
private onDidDismiss;
|
|
53
|
+
private onMount;
|
|
54
|
+
private onDragBegin;
|
|
55
|
+
private onDragChange;
|
|
56
|
+
private onDragEnd;
|
|
57
|
+
private onPositionChange;
|
|
58
|
+
private onSizeChange;
|
|
59
|
+
/**
|
|
60
|
+
* Present the Sheet by `index` (Promise-based)
|
|
61
|
+
* @param index - Detent index (default: 0)
|
|
62
|
+
*/
|
|
63
|
+
present(index?: number): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Resizes the Sheet programmatically by `index`.
|
|
66
|
+
* This is an alias of the `present(index)` method.
|
|
67
|
+
*/
|
|
68
|
+
resize(index: number): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Dismisses the Sheet
|
|
71
|
+
*/
|
|
72
|
+
dismiss(): Promise<void>;
|
|
73
|
+
componentDidMount(): void;
|
|
74
|
+
componentDidUpdate(prevProps: TrueSheetProps): void;
|
|
75
|
+
componentWillUnmount(): void;
|
|
76
|
+
render(): ReactNode;
|
|
77
|
+
}
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=TrueSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheet.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAGb,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,cAAc,EAYf,MAAM,mBAAmB,CAAC;AAuB3B,UAAU,cAAc;IACtB,sBAAsB,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,SAAU,SAAQ,aAAa,CAAC,cAAc,EAAE,cAAc,CAAC;IAC1E,WAAW,SAAe;IAE1B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IAExD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAqC;IAEtE;;OAEG;IACH,OAAO,CAAC,oBAAoB,CAA6B;gBAE7C,KAAK,EAAE,cAAc;IA8BjC,OAAO,CAAC,eAAe;IAkCvB,OAAO,CAAC,MAAM,CAAC,WAAW;IAU1B,OAAO,KAAK,MAAM,GAOjB;IAED;;;;;;OAMG;WACiB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAS3E;;;;;OAKG;WACiB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IASxD;;;;;;OAMG;WACiB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAStE,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,OAAO;IAUf,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,YAAY;IAYpB;;;OAGG;IACU,OAAO,CAAC,KAAK,GAAE,MAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBtD;;;OAGG;IACU,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD;;OAEG;IACU,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrC,iBAAiB,IAAI,IAAI;IAIzB,kBAAkB,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI;IASnD,oBAAoB,IAAI,IAAI;IAO5B,MAAM,IAAI,SAAS;CAmFpB"}
|