react-native-ui-lib 8.3.1 → 8.3.2-snapshot.7740
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/package.json
CHANGED
|
@@ -9,6 +9,7 @@ const BRANCH_CATEGORIES = [
|
|
|
9
9
|
{name: 'fixes', branch: 'fix/', title: ':wrench: Fixes'},
|
|
10
10
|
{name: 'infra', branch: 'infra/', title: ':gear: Maintenance & Infra'}
|
|
11
11
|
];
|
|
12
|
+
const SILENT_PRS = ['none', 'n/a', 'na'];
|
|
12
13
|
|
|
13
14
|
function getBranchPrefixes() {
|
|
14
15
|
return BRANCH_CATEGORIES.map(category => category.branch);
|
|
@@ -95,7 +96,7 @@ function isSilent(pr) {
|
|
|
95
96
|
return true;
|
|
96
97
|
} else {
|
|
97
98
|
const changelog = pr.info.changelog.toLowerCase();
|
|
98
|
-
if (changelog
|
|
99
|
+
if (SILENT_PRS.includes(changelog)) {
|
|
99
100
|
return true;
|
|
100
101
|
}
|
|
101
102
|
}
|
|
@@ -2,6 +2,7 @@ import _filter from "lodash/filter";
|
|
|
2
2
|
import _noop from "lodash/noop"; // TODO: support commented props
|
|
3
3
|
import React, { useMemo, useEffect, useState, useCallback } from 'react';
|
|
4
4
|
import { useAnimatedReaction, useSharedValue, withTiming, runOnJS } from 'react-native-reanimated';
|
|
5
|
+
import { SafeAreaContextPackage } from "../../optionalDependencies";
|
|
5
6
|
import { useOrientation, useThemeProps } from "../../hooks";
|
|
6
7
|
import { Constants } from "../../commons/new";
|
|
7
8
|
import TabBarContext from "./TabBarContext";
|
|
@@ -11,12 +12,9 @@ import TabPage from "./TabPage";
|
|
|
11
12
|
import PageCarousel from "./PageCarousel";
|
|
12
13
|
import useImperativeTabControllerHandle, { TabControllerImperativeMethods } from "./useImperativeTabControllerHandle";
|
|
13
14
|
export { TabControllerBarProps, TabControllerItemProps, TabControllerImperativeMethods };
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
right
|
|
18
|
-
} = Constants.getSafeAreaInsets();
|
|
19
|
-
return Constants.windowWidth - (useSafeArea && Constants.isIphoneX ? left + right : 0);
|
|
15
|
+
const useSafeAreaInsets = SafeAreaContextPackage?.useSafeAreaInsets ?? (() => Constants.getSafeAreaInsets());
|
|
16
|
+
const getScreenWidth = (useSafeArea, left, right) => {
|
|
17
|
+
return Constants.windowWidth - (useSafeArea ? left + right : 0);
|
|
20
18
|
};
|
|
21
19
|
|
|
22
20
|
/**
|
|
@@ -37,13 +35,17 @@ const TabController = React.forwardRef((props, ref) => {
|
|
|
37
35
|
useSafeArea = false,
|
|
38
36
|
children
|
|
39
37
|
} = themeProps;
|
|
40
|
-
const
|
|
38
|
+
const {
|
|
39
|
+
left,
|
|
40
|
+
right
|
|
41
|
+
} = useSafeAreaInsets();
|
|
42
|
+
const [screenWidth, setScreenWidth] = useState(getScreenWidth(useSafeArea, left, right));
|
|
41
43
|
if (items?.length < 2) {
|
|
42
44
|
console.warn('TabController component expect a minimum of 2 items');
|
|
43
45
|
}
|
|
44
46
|
useOrientation({
|
|
45
47
|
onOrientationChange: () => {
|
|
46
|
-
setScreenWidth(getScreenWidth(useSafeArea));
|
|
48
|
+
setScreenWidth(getScreenWidth(useSafeArea, left, right));
|
|
47
49
|
}
|
|
48
50
|
});
|
|
49
51
|
const pageWidth = useMemo(() => {
|