@buoy-gg/bottom-sheet 1.7.2

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.
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ export { BottomSheet } from './BottomSheet';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ // Export the main BottomSheet component (based on JsModal)
4
+ export { BottomSheet } from './components/BottomSheet';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * BottomSheet - Ultra-optimized modal component for true 60FPS performance
3
+ *
4
+ * Achieves 60FPS by following key principles:
5
+ * 1. ALWAYS use native driver (useNativeDriver: true)
6
+ * 2. Use transforms instead of layout properties (translateY instead of height)
7
+ * 3. Use interpolation for all calculations (no JS thread math)
8
+ * 4. Minimize PanResponder JS work (direct setValue, no state updates)
9
+ *
10
+ * Based on the proven JsModal component from @buoy-gg/shared-ui
11
+ */
12
+ import { ReactNode } from "react";
13
+ import { ViewStyle } from "react-native";
14
+ declare const defaultTheme: {
15
+ background: string;
16
+ panel: string;
17
+ border: string;
18
+ primary: string;
19
+ secondary: string;
20
+ muted: string;
21
+ success: string;
22
+ error: string;
23
+ info: string;
24
+ };
25
+ export type BottomSheetMode = "bottomSheet" | "floating";
26
+ export interface BottomSheetHeaderConfig {
27
+ title?: string;
28
+ subtitle?: string;
29
+ customContent?: ReactNode;
30
+ hideCloseButton?: boolean;
31
+ }
32
+ interface CustomStyles {
33
+ container?: ViewStyle;
34
+ content?: ViewStyle;
35
+ }
36
+ export interface BottomSheetProps {
37
+ visible: boolean;
38
+ onClose: () => void;
39
+ children: ReactNode;
40
+ header?: BottomSheetHeaderConfig;
41
+ styles?: CustomStyles;
42
+ minHeight?: number;
43
+ maxHeight?: number;
44
+ initialHeight?: number;
45
+ initialMode?: BottomSheetMode;
46
+ onModeChange?: (mode: BottomSheetMode) => void;
47
+ footer?: ReactNode;
48
+ footerHeight?: number;
49
+ onBack?: () => void;
50
+ theme?: Partial<typeof defaultTheme>;
51
+ }
52
+ export declare const BottomSheet: import("react").NamedExoticComponent<BottomSheetProps>;
53
+ export {};
54
+ //# sourceMappingURL=BottomSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAUL,SAAS,EAEV,MAAM,OAAO,CAAC;AACf,OAAO,EASL,SAAS,EAIV,MAAM,cAAc,CAAC;AA+FtB,QAAA,MAAM,YAAY;;;;;;;;;;CAUjB,CAAC;AAKF,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAC/C,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,YAAY,CAAC,CAAC;CACtC;AA4mCD,eAAO,MAAM,WAAW,wDAA6B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { BottomSheet } from './BottomSheet';
2
+ export type { BottomSheetProps, BottomSheetMode, BottomSheetHeaderConfig } from './BottomSheet';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { BottomSheet } from './components/BottomSheet';
2
+ export type { BottomSheetProps, BottomSheetMode, BottomSheetHeaderConfig } from './components/BottomSheet';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@buoy-gg/bottom-sheet",
3
+ "version": "1.7.2",
4
+ "description": "bottom-sheet package",
5
+ "main": "lib/commonjs/index.js",
6
+ "module": "lib/module/index.js",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index.tsx",
9
+ "source": "src/index.tsx",
10
+ "files": [
11
+ "lib"
12
+ ],
13
+ "sideEffects": false,
14
+ "scripts": {
15
+ "build": "bob build",
16
+ "typecheck": "tsc --noEmit",
17
+ "prepublishOnly": "bob build",
18
+ "clean": "rimraf lib",
19
+ "test": "pnpm run typecheck",
20
+ "postinstall": "echo \"Run pnpm build to compile this package\""
21
+ },
22
+ "dependencies": {
23
+ "@buoy-gg/shared-ui": "workspace:*"
24
+ },
25
+ "peerDependencies": {
26
+ "react": "*",
27
+ "react-native": "*"
28
+ },
29
+ "devDependencies": {
30
+ "@types/react": "^19.1.0",
31
+ "@types/react-native": "^0.73.0",
32
+ "typescript": "~5.8.3"
33
+ },
34
+ "react-native-builder-bob": {
35
+ "source": "src",
36
+ "output": "lib",
37
+ "targets": [
38
+ [
39
+ "commonjs",
40
+ {
41
+ "sourceMaps": false
42
+ }
43
+ ],
44
+ [
45
+ "module",
46
+ {
47
+ "sourceMaps": false
48
+ }
49
+ ],
50
+ "typescript"
51
+ ]
52
+ },
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "https://github.com/LovesWorking/react-native-buoy.git",
56
+ "directory": "packages/bottom-sheet"
57
+ },
58
+ "bugs": {
59
+ "url": "https://github.com/LovesWorking/react-native-buoy/issues"
60
+ },
61
+ "homepage": "https://github.com/LovesWorking/react-native-buoy/tree/main/packages/bottom-sheet#readme",
62
+ "publishConfig": {
63
+ "access": "public",
64
+ "tag": "latest"
65
+ }
66
+ }