@applicaster/quick-brick-core 13.0.0-rc.125 → 13.0.0-rc.127

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.
@@ -5,6 +5,7 @@ import { Handle, HandleProps } from "./Handle";
5
5
  import { DraggableBottomSheet } from "./DraggableBottomSheet";
6
6
  import {
7
7
  SafeAreaView,
8
+ useSafeAreaFrame,
8
9
  useSafeAreaInsets,
9
10
  } from "react-native-safe-area-context";
10
11
  import {
@@ -41,17 +42,16 @@ const defaultBottomOffset = platformSelect({
41
42
  android: 0,
42
43
  });
43
44
 
44
- const getSheetHeight = ({ height, bottomOffset, maxHeight, dimensions }) => {
45
+ const getSheetHeight = ({ height, bottomOffset, maxHeight }) => {
45
46
  return platformSelect({
46
47
  ios: height - bottomOffset,
47
48
  default:
48
- !isAndroidVersionAtLeast(35) && isAndroidPlatform()
49
- ? (height || maxHeight) - (bottomOffset + dimensions.statusBarHeight)
50
- : height || maxHeight,
49
+ (height || maxHeight) -
50
+ (!isAndroidVersionAtLeast(35) && isAndroidPlatform() ? bottomOffset : 0),
51
51
  });
52
52
  };
53
53
 
54
- const useGetSheetHeight = (height, maxHeight, dimensions) => {
54
+ const useGetSheetHeight = (height, maxHeight) => {
55
55
  const { bottom = defaultBottomOffset } = useSafeAreaInsets();
56
56
 
57
57
  const bottomOffset = bottom;
@@ -60,7 +60,6 @@ const useGetSheetHeight = (height, maxHeight, dimensions) => {
60
60
  height,
61
61
  bottomOffset,
62
62
  maxHeight,
63
- dimensions,
64
63
  });
65
64
  };
66
65
 
@@ -76,12 +75,14 @@ export function ModalBottomSheetFrame(props: Props) {
76
75
  dimensions,
77
76
  } = props;
78
77
 
78
+ const safeAreaDims = useSafeAreaFrame();
79
+
79
80
  const extraStyles = {
80
81
  backgroundColor,
81
82
  borderTopLeftRadius: cornerRadius,
82
83
  borderTopRightRadius: cornerRadius,
83
84
  maxHeight,
84
- maxWidth: Math.min(Number(maxWidth), dimensions.width),
85
+ maxWidth: Math.min(Number(maxWidth), safeAreaDims.width),
85
86
  };
86
87
 
87
88
  const [height, setHeight] = React.useState(0);
@@ -96,9 +97,7 @@ export function ModalBottomSheetFrame(props: Props) {
96
97
 
97
98
  const { bottom = defaultBottomOffset } = useSafeAreaInsets();
98
99
 
99
- const bottomOffset = bottom;
100
-
101
- const sheetHeight = useGetSheetHeight(height, maxHeight, dimensions);
100
+ const sheetHeight = useGetSheetHeight(height, maxHeight);
102
101
 
103
102
  return (
104
103
  <DraggableBottomSheet
@@ -109,7 +108,7 @@ export function ModalBottomSheetFrame(props: Props) {
109
108
  header={(dragging) => <Handle {...handleProps} focused={dragging} />}
110
109
  maxWidth={maxWidth}
111
110
  {...dimensions}
112
- height={dimensions.height - (Platform.OS === "ios" ? bottomOffset : 0)}
111
+ height={safeAreaDims.height - (Platform.OS === "ios" ? bottom : 0)}
113
112
  >
114
113
  <SafeAreaView
115
114
  edges={["left", "right", "bottom"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-core",
3
- "version": "13.0.0-rc.125",
3
+ "version": "13.0.0-rc.127",
4
4
  "description": "Core package for Applicaster's Quick Brick App",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -28,13 +28,13 @@
28
28
  },
29
29
  "homepage": "https://github.com/applicaster/quickbrick#readme",
30
30
  "dependencies": {
31
- "@applicaster/applicaster-types": "13.0.0-rc.125",
32
- "@applicaster/quick-brick-core-plugins": "13.0.0-rc.125",
33
- "@applicaster/zapp-pipes-v2-client": "13.0.0-rc.125",
34
- "@applicaster/zapp-react-native-bridge": "13.0.0-rc.125",
35
- "@applicaster/zapp-react-native-redux": "13.0.0-rc.125",
36
- "@applicaster/zapp-react-native-ui-components": "13.0.0-rc.125",
37
- "@applicaster/zapp-react-native-utils": "13.0.0-rc.125",
31
+ "@applicaster/applicaster-types": "13.0.0-rc.127",
32
+ "@applicaster/quick-brick-core-plugins": "13.0.0-rc.127",
33
+ "@applicaster/zapp-pipes-v2-client": "13.0.0-rc.127",
34
+ "@applicaster/zapp-react-native-bridge": "13.0.0-rc.127",
35
+ "@applicaster/zapp-react-native-redux": "13.0.0-rc.127",
36
+ "@applicaster/zapp-react-native-ui-components": "13.0.0-rc.127",
37
+ "@applicaster/zapp-react-native-utils": "13.0.0-rc.127",
38
38
  "atob": "^2.1.2",
39
39
  "axios": "^0.28.0",
40
40
  "btoa": "^1.2.1",