@momo-kits/foundation 0.169.19-beta.1 → 0.169.19-beta.3

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.
Files changed (38) hide show
  1. package/Application/BottomSheet.tsx +2 -2
  2. package/Application/BottomTab/BottomTabBar.styles.ts +1 -1
  3. package/Application/BottomTab/DuoTabBar.styles.ts +1 -1
  4. package/Application/BottomTab/TabBarIcon.tsx +1 -1
  5. package/Application/Components/HeaderExtendHeader.tsx +2 -6
  6. package/Application/Components/HeaderLeft.tsx +5 -9
  7. package/Application/Components/HeaderRight.styles.ts +1 -5
  8. package/Application/Components/HeaderRight.tsx +21 -7
  9. package/Application/Components/SearchHeader.tsx +3 -5
  10. package/Application/Components/useHeaderRightWidth.ts +2 -2
  11. package/Application/ModalScreen.tsx +2 -2
  12. package/Application/StackScreen.tsx +2 -6
  13. package/Application/TooltipPortal.tsx +3 -3
  14. package/Application/__tests__/headerLayout.test.ts +1 -2
  15. package/Application/headerLayout.ts +13 -10
  16. package/Application/hooks.ts +1 -1
  17. package/Application/navigationOptions.tsx +12 -5
  18. package/Button/index.tsx +2 -2
  19. package/Divider/DashDivider.tsx +2 -2
  20. package/Divider/index.tsx +3 -3
  21. package/FoundationList/index.tsx +1 -1
  22. package/Icon/types.ts +2 -1
  23. package/Image/index.tsx +7 -62
  24. package/Image/styles.ts +0 -2
  25. package/Image/types.ts +1 -9
  26. package/Input/Input.tsx +2 -2
  27. package/Input/InputMoney.tsx +2 -7
  28. package/Input/InputMoneyView.tsx +2 -2
  29. package/Input/InputOTP.tsx +2 -2
  30. package/Input/InputPhoneNumber.tsx +2 -2
  31. package/Input/InputSearch.tsx +2 -2
  32. package/Input/InputTextArea.tsx +2 -2
  33. package/Input/SearchTextTyping.tsx +2 -2
  34. package/Input/SystemTextInput.tsx +1 -2
  35. package/Input/TextTyping.tsx +2 -7
  36. package/Layout/screenHeader.tsx +20 -16
  37. package/Pagination/types.ts +2 -6
  38. package/package.json +26 -28
@@ -204,7 +204,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
204
204
  onRequestClose={() => {
205
205
  handleDismiss();
206
206
  }}
207
- style={StyleSheet.absoluteFill}
207
+ style={StyleSheet.absoluteFillObject}
208
208
  isModalKit={true}
209
209
  supportedOrientations={isDuo ? DUO_ORIENTATIONS : undefined}
210
210
  >
@@ -219,7 +219,7 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
219
219
  style={styles.container}
220
220
  >
221
221
  <Pressable
222
- style={StyleSheet.absoluteFill}
222
+ style={StyleSheet.absoluteFillObject}
223
223
  onPress={() => {
224
224
  action.current = 'touch';
225
225
  handleDismiss();
@@ -68,7 +68,7 @@ export const styles = StyleSheet.create({
68
68
  },
69
69
  // custom label content over the label text, centered and unclipped
70
70
  ctaLabelOverlay: {
71
- ...{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0},
71
+ ...StyleSheet.absoluteFillObject,
72
72
  alignItems: 'center',
73
73
  justifyContent: 'center',
74
74
  },
@@ -57,7 +57,7 @@ export const styles = StyleSheet.create({
57
57
  },
58
58
  // custom label content over the label text, centered and unclipped
59
59
  railCtaLabelOverlay: {
60
- ...{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0},
60
+ ...StyleSheet.absoluteFillObject,
61
61
  alignItems: 'center',
62
62
  justifyContent: 'center',
63
63
  },
@@ -150,7 +150,7 @@ const styles = StyleSheet.create({
150
150
  height: TabBarMetrics.iconSize,
151
151
  },
152
152
  layer: {
153
- ...{position: 'absolute', top: 0, bottom: 0, left: 0, right: 0},
153
+ ...StyleSheet.absoluteFillObject,
154
154
  alignItems: 'center',
155
155
  justifyContent: 'center',
156
156
  },
@@ -17,7 +17,6 @@ import BackgroundImageView from './BackgroundImageView';
17
17
  import { type AnimatedCompatValue } from '../utils';
18
18
  import { useNormalizedSharedValue } from '../hooks';
19
19
  import { useScreenLayout } from '../../Layout';
20
- import { getHeaderMargin } from '../../Layout/utils';
21
20
  import {
22
21
  HeaderBarMetrics,
23
22
  type HeaderContentLayout,
@@ -71,11 +70,8 @@ const HeaderExtendHeader: React.FC<{
71
70
  const layout = useScreenLayout();
72
71
  const headerLayout = useHeaderLayout(contentLayout);
73
72
  // collapsed into the bar, the search follows back and the right cluster into the
74
- // frame, or the side margin React Navigation adds on large iOS windows (the larger)
75
- let frameShift = headerLayout.frameInset - sidePadding;
76
- if (!layout.sideBar) {
77
- frameShift = Math.max(frameShift, getHeaderMargin(layout.width));
78
- }
73
+ // frame; both already sit `sidePadding` from the edge on large iOS windows
74
+ const frameShift = headerLayout.frameInset - sidePadding;
79
75
 
80
76
  const backLeft = buttonSize + sidePadding + titleGap;
81
77
  const defaultLeft = layout.sideBar ? SCREEN_PADDING : backLeft;
@@ -1,4 +1,4 @@
1
- import { BackHandler, StyleSheet, View } from 'react-native';
1
+ import { BackHandler, useWindowDimensions, View } from 'react-native';
2
2
  import type { HeaderBackProps } from '../types';
3
3
  import React, { useCallback, useContext, useEffect } from 'react';
4
4
  import { ApplicationContext, MiniAppContext } from '../../Context';
@@ -8,11 +8,12 @@ import { SideBarButton } from './SideBarButton';
8
8
  import Animated from 'react-native-reanimated';
9
9
  import { useSideBarItemStyle } from '../../Layout/utils';
10
10
  import { useSideBarCounterStyle } from './DuoQuickReturnHeader';
11
- import { HeaderBarMetrics } from '../headerLayout';
11
+ import { getHeaderRowInset } from '../headerLayout';
12
12
 
13
13
  /**
14
14
  * Header back button, also bound to the Android hardware back. `preventBack`
15
15
  * confirms in a popup first; the iPhone Duo side bar uses the 48pt side bar button.
16
+ * In the bar it sits `sidePadding` from the window edge on every iPhone width.
16
17
  */
17
18
  const HeaderLeft: React.FC<HeaderBackProps> = ({
18
19
  tintColor,
@@ -25,6 +26,7 @@ const HeaderLeft: React.FC<HeaderBackProps> = ({
25
26
  const { navigator } = useContext(ApplicationContext);
26
27
  const sideBarStyle = useSideBarItemStyle('left', 0);
27
28
  const counterStyle = useSideBarCounterStyle();
29
+ const { width } = useWindowDimensions();
28
30
 
29
31
  const goBack = useCallback(() => {
30
32
  const canGoBack = navigator?.ref?.current?.canGoBack?.();
@@ -98,7 +100,7 @@ const HeaderLeft: React.FC<HeaderBackProps> = ({
98
100
  }
99
101
 
100
102
  return (
101
- <View style={styles.headerLeft}>
103
+ <View style={{ marginLeft: getHeaderRowInset(width) }}>
102
104
  <NavigationButton
103
105
  accessibilityLabel="btn_navigation_back"
104
106
  icon="arrow-back"
@@ -109,10 +111,4 @@ const HeaderLeft: React.FC<HeaderBackProps> = ({
109
111
  );
110
112
  };
111
113
 
112
- const styles = StyleSheet.create({
113
- headerLeft: {
114
- marginLeft: HeaderBarMetrics.sidePadding,
115
- },
116
- });
117
-
118
114
  export { HeaderLeft };
@@ -2,7 +2,7 @@ import { Platform, StyleSheet } from 'react-native';
2
2
  import { Colors, Spacing } from '../../Consts';
3
3
  import { HeaderBarMetrics } from '../headerLayout';
4
4
 
5
- const { buttonSize, pillWidth, pillHeight, sidePadding } = HeaderBarMetrics;
5
+ const { buttonSize, pillWidth, pillHeight } = HeaderBarMetrics;
6
6
 
7
7
  export const styles = StyleSheet.create({
8
8
  navigationButton: {
@@ -48,7 +48,6 @@ export const styles = StyleSheet.create({
48
48
  flexDirection: 'row',
49
49
  justifyContent: 'center',
50
50
  alignItems: 'center',
51
- paddingRight: sidePadding,
52
51
  },
53
52
  toolkitContainer: {
54
53
  height: pillHeight,
@@ -134,9 +133,6 @@ export const styles = StyleSheet.create({
134
133
  },
135
134
  }),
136
135
  },
137
- onBoarding: {
138
- marginRight: Spacing.M,
139
- },
140
136
  toolkitWide: {
141
137
  width: pillWidth,
142
138
  },
@@ -1,10 +1,16 @@
1
1
  import React, { useCallback, useContext, useEffect } from 'react';
2
- import { type LayoutChangeEvent, TouchableOpacity, View } from 'react-native';
2
+ import {
3
+ type LayoutChangeEvent,
4
+ TouchableOpacity,
5
+ useWindowDimensions,
6
+ View,
7
+ } from 'react-native';
3
8
  import { NavigationRouteContext } from '@react-navigation/native';
4
9
  import { ApplicationContext } from '../../Context';
5
10
  import { Text } from '../../Text';
6
11
  import Animated from 'react-native-reanimated';
7
- import { useSideBarItemStyle } from '../../Layout/utils';
12
+ import { getHeaderMargin, useSideBarItemStyle } from '../../Layout/utils';
13
+ import { getHeaderRowInset } from '../headerLayout';
8
14
  import { useSideBarCounterStyle } from './DuoQuickReturnHeader';
9
15
  import { HeaderToolkitAction } from './HeaderToolkitAction';
10
16
  import { styles } from './HeaderRight.styles';
@@ -13,7 +19,8 @@ import { setHeaderRightWidth } from './useHeaderRightWidth';
13
19
  /**
14
20
  * Header right slot: a custom `headerRight` render function, the onboarding skip
15
21
  * button, or the toolkit (stacked vertically in the floating iPhone Duo side bar).
16
- * The bar toolkit reports its width so header searches stop short of it.
22
+ * The bar toolkit sits `sidePadding` from the window edge and reports its width
23
+ * from that edge so header searches stop short of it.
17
24
  */
18
25
  const HeaderRight: React.FC<any> = props => {
19
26
  const { translate } = useContext(ApplicationContext);
@@ -22,14 +29,18 @@ const HeaderRight: React.FC<any> = props => {
22
29
  const sideBarStyle = useSideBarItemStyle('right', 1);
23
30
  const counterStyle = useSideBarCounterStyle();
24
31
  const routeKey = useContext(NavigationRouteContext)?.key;
32
+ const { width } = useWindowDimensions();
33
+ const rowMargin = getHeaderMargin(width);
34
+ const rowInset = getHeaderRowInset(width);
25
35
 
26
36
  const handleToolkitLayout = useCallback(
27
37
  (event: LayoutChangeEvent) => {
28
38
  if (routeKey) {
29
- setHeaderRightWidth(routeKey, event.nativeEvent.layout.width);
39
+ const toolkitWidth = event.nativeEvent.layout.width + rowMargin;
40
+ setHeaderRightWidth(routeKey, toolkitWidth);
30
41
  }
31
42
  },
32
- [routeKey],
43
+ [routeKey, rowMargin],
33
44
  );
34
45
 
35
46
  useEffect(() => {
@@ -46,7 +57,7 @@ const HeaderRight: React.FC<any> = props => {
46
57
 
47
58
  if (useOnBoarding && onPress) {
48
59
  return (
49
- <TouchableOpacity onPress={onPress} style={styles.onBoarding}>
60
+ <TouchableOpacity onPress={onPress} style={{ marginRight: rowInset }}>
50
61
  <Text typography={'action_s_bold'}>
51
62
  {buttonOnBoarding || translate?.('skip')}
52
63
  </Text>
@@ -70,7 +81,10 @@ const HeaderRight: React.FC<any> = props => {
70
81
  }
71
82
 
72
83
  return (
73
- <View style={styles.headerRightButton} onLayout={handleToolkitLayout}>
84
+ <View
85
+ style={[styles.headerRightButton, { paddingRight: rowInset }]}
86
+ onLayout={handleToolkitLayout}
87
+ >
74
88
  <HeaderToolkitAction {...props.headerRight} tintColor={props.tintColor} />
75
89
  </View>
76
90
  );
@@ -8,7 +8,6 @@ import { ApplicationContext, MiniAppContext } from '../../Context';
8
8
  import { Text } from '../../Text';
9
9
  import { useNormalizedSharedValue } from '../hooks';
10
10
  import { useScreenLayout } from '../../Layout';
11
- import { getHeaderMargin } from '../../Layout/utils';
12
11
  import { HeaderBarMetrics } from '../headerLayout';
13
12
  import { useHeaderRightWidth } from './useHeaderRightWidth';
14
13
 
@@ -47,10 +46,9 @@ const SearchHeader = React.forwardRef<InputRef, SearchHeaderProps>(
47
46
  const headerRightWidth = props?.headerRightWidth ?? defaultRightWidth;
48
47
 
49
48
  // iPhone Duo side bar holds back: the search shares the content width with the buttons only
50
- // large iOS windows: React Navigation narrows the header row by a margin each side
51
- const headerMargin = getHeaderMargin(layout.width);
52
- const rowWidth =
53
- layout.width - leftPosition - sidePadding - headerMargin * 2;
49
+ // back ends at leftPosition and the measured right cluster counts from the window
50
+ // edge, so the large iOS header row margin is already netted out on both sides
51
+ const rowWidth = layout.width - leftPosition - sidePadding;
54
52
  let searchMaxWidth = rowWidth - headerRightWidth;
55
53
  if (layout.sideBar) {
56
54
  searchMaxWidth = layout.contentWidth - Spacing.M * 2 - headerRightWidth;
@@ -16,8 +16,8 @@ const subscribe = (listener: () => void) => {
16
16
  };
17
17
 
18
18
  /**
19
- * Records the laid out width of a route's header right, side padding included;
20
- * `undefined` clears it when the header right unmounts.
19
+ * Records how far a route's header right reaches in from the window edge, side
20
+ * padding included; `undefined` clears it when the header right unmounts.
21
21
  */
22
22
  const setHeaderRightWidth = (routeKey: string, width?: number) => {
23
23
  if (widths.get(routeKey) === width) {
@@ -170,7 +170,7 @@ const Modal: React.FC<ModalParams> = props => {
170
170
  transparent
171
171
  visible={true}
172
172
  onRequestClose={handleDismiss}
173
- style={StyleSheet.absoluteFill}
173
+ style={StyleSheet.absoluteFillObject}
174
174
  isModalKit={true}
175
175
  supportedOrientations={isDuo ? DUO_ORIENTATIONS : undefined}
176
176
  >
@@ -179,7 +179,7 @@ const Modal: React.FC<ModalParams> = props => {
179
179
  behavior={Platform.OS === 'ios' ? 'padding' : undefined}
180
180
  >
181
181
  <Pressable
182
- style={StyleSheet.absoluteFill}
182
+ style={StyleSheet.absoluteFillObject}
183
183
  onPress={() => handleDismiss(undefined, barrierDismissible)}
184
184
  >
185
185
  <Animated.View style={[styles.overlayContent, scrimStyle]} />
@@ -1,4 +1,5 @@
1
1
  import React, { useContext, useEffect, useLayoutEffect, useRef } from 'react';
2
+ import { InteractionManager } from 'react-native';
2
3
  import { useHeaderHeight } from '@react-navigation/elements';
3
4
  import { ScreenTrackingParams } from './types';
4
5
  import Navigation from './Navigation';
@@ -13,12 +14,7 @@ const TRACKING_TIMEOUT = 5000;
13
14
  const ELEMENT_IDLE_TIMEOUT = 2000;
14
15
  const LOADING_IDLE_TIMEOUT = 2000;
15
16
 
16
- // RN 0.87+: InteractionManager đã bị xoá khỏi react-native → thay bằng requestIdleCallback.
17
- // Giữ nguyên shape trả về { cancel } để code bên dưới (timeoutInteraction?.cancel?.()) không đổi.
18
- const runAfterInteractions = (task: () => void) => {
19
- const handle = requestIdleCallback(() => task());
20
- return { cancel: () => cancelIdleCallback(handle) };
21
- };
17
+ const runAfterInteractions = InteractionManager.runAfterInteractions;
22
18
 
23
19
  /**
24
20
  * Hosts a feature screen in the stack: applies its header options, provides
@@ -8,13 +8,13 @@ import React, {
8
8
  useReducer,
9
9
  useRef,
10
10
  } from 'react';
11
- import { StyleSheet, View, type ViewInstance } from 'react-native';
11
+ import { StyleSheet, View } from 'react-native';
12
12
 
13
13
  interface TooltipPortalContextValue {
14
14
  register: (id: string, content: ReactNode) => void;
15
15
  unregister: (id: string, immediate?: boolean) => void;
16
16
  portals: Map<string, ReactNode>;
17
- hostRef: RefObject<ViewInstance | null>;
17
+ hostRef: RefObject<View | null>;
18
18
  }
19
19
 
20
20
  const TooltipPortalContext = createContext<TooltipPortalContextValue | null>(
@@ -30,7 +30,7 @@ export const TooltipPortalProvider: React.FC<{ children: ReactNode }> = ({
30
30
  }) => {
31
31
  // The ref map updates synchronously; the reducer only triggers re-renders.
32
32
  const portalsRef = useRef<Map<string, ReactNode>>(new Map());
33
- const hostRef = useRef<ViewInstance>(null);
33
+ const hostRef = useRef<View>(null);
34
34
  const [updateCounter, forceUpdate] = useReducer((x: number) => x + 1, 0);
35
35
  const pendingUpdateRef = useRef<any>(null);
36
36
 
@@ -69,7 +69,7 @@ describe('getHeaderFrameOptions', () => {
69
69
  isDuo: false,
70
70
  contentLayout,
71
71
  });
72
- return { layout, isDuo: false, headerMargin: 0, edgePadding: NO_EDGE };
72
+ return { layout, isDuo: false, edgePadding: NO_EDGE };
73
73
  };
74
74
 
75
75
  it('leaves the options alone when contentLayout is unset', () => {
@@ -103,7 +103,6 @@ describe('getHeaderFrameOptions', () => {
103
103
  const options = getHeaderFrameOptions({
104
104
  layout,
105
105
  isDuo: true,
106
- headerMargin: 0,
107
106
  edgePadding: DUO_EDGE,
108
107
  contentLayout: 'stretch',
109
108
  });
@@ -85,8 +85,6 @@ type EdgePadding = { left: number; right: number };
85
85
  type HeaderFrameInput = {
86
86
  layout: HeaderLayout;
87
87
  isDuo: boolean;
88
- // side margin @react-navigation/elements already adds to the row
89
- headerMargin: number;
90
88
  // padding of the plain row containers: the iPhone Duo status bar clearance, else 0
91
89
  edgePadding: EdgePadding;
92
90
  contentLayout?: HeaderContentLayout;
@@ -123,6 +121,14 @@ const getHeaderLayout = ({
123
121
  };
124
122
  };
125
123
 
124
+ /**
125
+ * Inset from the React Navigation header row that puts an item `sidePadding` from
126
+ * the window edge: large iOS windows already inset that row by `getHeaderMargin`.
127
+ */
128
+ const getHeaderRowInset = (width: number) => {
129
+ return HeaderBarMetrics.sidePadding - getHeaderMargin(width);
130
+ };
131
+
126
132
  /**
127
133
  * Widest a title can be between back and the right cluster of the header row.
128
134
  */
@@ -189,7 +195,6 @@ const getEdgeFrameOptions = (
189
195
  const getHeaderFrameOptions = ({
190
196
  layout,
191
197
  isDuo,
192
- headerMargin,
193
198
  edgePadding,
194
199
  contentLayout,
195
200
  }: HeaderFrameInput): StackNavigationOptions | undefined => {
@@ -199,12 +204,11 @@ const getHeaderFrameOptions = ({
199
204
  if (contentLayout !== 'stretch' || isDuo) {
200
205
  return getEdgeFrameOptions(edgePadding);
201
206
  }
202
- // the header content row already sits this far in on large iOS windows
207
+ // back and toolkit already net out the header row margin of large iOS windows
203
208
  const shift = layout.frameInset - layout.sidePadding;
204
- const containerShift = Math.max(0, shift - headerMargin);
205
209
  return {
206
- headerLeftContainerStyle: { paddingLeft: containerShift },
207
- headerRightContainerStyle: { paddingRight: containerShift },
210
+ headerLeftContainerStyle: { paddingLeft: shift },
211
+ headerRightContainerStyle: { paddingRight: shift },
208
212
  headerTitleContainerStyle: {
209
213
  ...TITLE_CONTAINER_RESET,
210
214
  left: layout.titleGap,
@@ -225,17 +229,15 @@ const useHeaderFrameOptions = (
225
229
  const rowOptions = getHeaderRowOptions(screenLayout);
226
230
  const edgeLeft = rowOptions.headerLeftContainerStyle?.paddingLeft ?? 0;
227
231
  const edgeRight = rowOptions.headerRightContainerStyle?.paddingRight ?? 0;
228
- const headerMargin = getHeaderMargin(screenLayout.width);
229
232
  const isDuo = isIPhoneDuo();
230
233
  return useMemo(() => {
231
234
  return getHeaderFrameOptions({
232
235
  layout,
233
236
  isDuo,
234
- headerMargin,
235
237
  edgePadding: { left: edgeLeft, right: edgeRight },
236
238
  contentLayout,
237
239
  });
238
- }, [contentLayout, isDuo, layout, headerMargin, edgeLeft, edgeRight]);
240
+ }, [contentLayout, isDuo, layout, edgeLeft, edgeRight]);
239
241
  };
240
242
 
241
243
  export type { HeaderContentLayout, HeaderLayout };
@@ -247,6 +249,7 @@ export {
247
249
  getHeaderFrameOptions,
248
250
  getHeaderLayout,
249
251
  getSearchHeaderHeight,
252
+ getHeaderRowInset,
250
253
  getTitleBudget,
251
254
  useHeaderLayout,
252
255
  useHeaderFrameOptions,
@@ -54,7 +54,7 @@ const useAppState = () => {
54
54
 
55
55
  useEffect(() => {
56
56
  const subscription = AppState.addEventListener('change', nextAppState => {
57
- const wasInBackground = /inactive|background/.test(appState.current ?? '');
57
+ const wasInBackground = /inactive|background/.test(appState.current);
58
58
  const isReturning = wasInBackground && nextAppState === 'active';
59
59
  isBackgroundToForeground.current = isReturning;
60
60
  appState.current = nextAppState;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Platform } from 'react-native';
2
+ import { Dimensions, Platform } from 'react-native';
3
3
  import {
4
4
  CardStyleInterpolators,
5
5
  type StackCardInterpolatedStyle,
@@ -13,7 +13,11 @@ import { HeaderBackground } from './Components/HeaderBackground';
13
13
  import { HeaderLeft } from './Components/HeaderLeft';
14
14
  import { HeaderRight } from './Components/HeaderRight';
15
15
  import { HeaderTitle, TitleCustom } from './Components/HeaderTitle';
16
- import { HeaderBarMetrics, TITLE_CONTAINER_RESET } from './headerLayout';
16
+ import {
17
+ getHeaderRowInset,
18
+ HeaderBarMetrics,
19
+ TITLE_CONTAINER_RESET,
20
+ } from './headerLayout';
17
21
  import type { HeaderTitleProps, NavigationOptions } from './types';
18
22
 
19
23
  const CARD_SHADOW_OPACITY = 0.3;
@@ -144,8 +148,9 @@ const exportHeaderTitle = (
144
148
  };
145
149
 
146
150
  /**
147
- * React Navigation options from screen params: design system header left,
148
- * title and right, and swipe back off for screens that own their back flow.
151
+ * React Navigation options from screen params: design system header left, title
152
+ * (`sidePadding` from the window edge with hidden back) and right, and swipe back
153
+ * off for screens that own their back flow.
149
154
  */
150
155
  const getOptions = (
151
156
  params: NavigationOptions,
@@ -167,9 +172,11 @@ const getOptions = (
167
172
  };
168
173
  if (params.hiddenBack) {
169
174
  headerLeft = null;
175
+ // options are static, so the window width is read once when they are built
176
+ const { width } = Dimensions.get('window');
170
177
  options.headerTitleContainerStyle = {
171
178
  ...TITLE_CONTAINER_RESET,
172
- left: HeaderBarMetrics.sidePadding,
179
+ left: getHeaderRowInset(width),
173
180
  };
174
181
  }
175
182
  options = {
package/Button/index.tsx CHANGED
@@ -192,10 +192,10 @@ const Button: FC<ButtonProps> = ({
192
192
 
193
193
  const sizeStyle = getSizeStyle();
194
194
  const typeStyle = getTypeStyle(type, theme, color);
195
- const containerStyle = StyleSheet.flatten([
195
+ const containerStyle: ViewStyle = StyleSheet.flatten([
196
196
  full && { width: '100%' },
197
197
  loading && { opacity: 0.75 },
198
- ]) as ViewStyle;
198
+ ]);
199
199
  const buttonStyle = StyleSheet.flatten([sizeStyle, typeStyle]);
200
200
 
201
201
  const animatedStyle = useAnimatedStyle(() => {
@@ -1,5 +1,5 @@
1
1
  import React, { useContext } from 'react';
2
- import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
2
+ import { StyleSheet, View, ViewStyle } from 'react-native';
3
3
  import { ApplicationContext } from '../Context';
4
4
  import { Spacing } from '../Consts';
5
5
  import Svg, { Line } from 'react-native-svg';
@@ -8,7 +8,7 @@ export interface DashDividerProps {
8
8
  /**
9
9
  * Custom styles for dash divider
10
10
  */
11
- style?: StyleProp<ViewStyle>;
11
+ style?: ViewStyle;
12
12
  }
13
13
 
14
14
  /** 1px dashed horizontal line in the default border color. */
package/Divider/index.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { useContext } from 'react';
2
- import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
2
+ import { StyleSheet, View, ViewStyle } from 'react-native';
3
3
  import { ApplicationContext } from '../Context';
4
4
  import { Spacing } from '../Consts';
5
5
  import { DashDivider } from './DashDivider';
@@ -8,7 +8,7 @@ export interface DividerProps {
8
8
  /**
9
9
  * Custom styles for divider
10
10
  */
11
- style?: StyleProp<ViewStyle>;
11
+ style?: ViewStyle;
12
12
 
13
13
  /**
14
14
  * Enable margin vertical 4px
@@ -34,10 +34,10 @@ const Divider: React.FC<DividerProps> = ({
34
34
  return (
35
35
  <View
36
36
  style={[
37
+ style,
37
38
  styles.divider,
38
39
  useMargin ? styles.margin : styles.noMargin,
39
40
  { backgroundColor: theme.colors.border.default },
40
- style,
41
41
  ]}
42
42
  />
43
43
  );
@@ -10,7 +10,7 @@ type CombinedListProps<ItemT> = FlatListProps<ItemT> &
10
10
  * switch to it without type changes.
11
11
  */
12
12
  const FoundationList = <ItemT,>(props: CombinedListProps<ItemT>) => {
13
- return <FlashList {...(props as FlashListProps<ItemT>)} />;
13
+ return <FlashList {...props} />;
14
14
  };
15
15
 
16
16
  export { FoundationList };
package/Icon/types.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { ImageStyle, StyleProp } from 'react-native';
1
+ import { ImageStyle } from 'react-native-fast-image';
2
+ import { StyleProp } from 'react-native';
2
3
 
3
4
  export type IconProps = {
4
5
  /**
package/Image/index.tsx CHANGED
@@ -1,11 +1,6 @@
1
1
  import React, { useContext, useRef, useState } from 'react';
2
- import {
3
- ImageBackground,
4
- ImageSourcePropType,
5
- StyleSheet,
6
- View,
7
- } from 'react-native';
8
- import FastImage, { FastImageProps } from 'react-native-fast-image';
2
+ import { StyleSheet, View } from 'react-native';
3
+ import FastImage from 'react-native-fast-image';
9
4
  import styles from './styles';
10
5
  import {
11
6
  ApplicationContext,
@@ -29,10 +24,6 @@ export const getImageName = (source: any): string => {
29
24
  return '';
30
25
  };
31
26
 
32
- const isDataUriSource = (source: any): boolean => {
33
- return typeof source?.uri === 'string' && source.uri.startsWith('data:');
34
- };
35
-
36
27
  /**
37
28
  * FastImage that shows a skeleton while loading (if `loading`) or inside a
38
29
  * loading `SkeletonProvider`, and a fail icon on error.
@@ -57,7 +48,6 @@ const Image: React.FC<ImageProps> = ({
57
48
  const [status, setStatus] = useState<Status>('success');
58
49
 
59
50
  const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
60
- const useFastImage = !isDataUriSource(source);
61
51
 
62
52
  const imageName = getImageName(source);
63
53
  let accessibilityLabel: any = `img|${imageName}`;
@@ -91,61 +81,16 @@ const Image: React.FC<ImageProps> = ({
91
81
  return children;
92
82
  };
93
83
 
94
- if (!useFastImage) {
95
- // RN <Image> throws when given children (skeleton / fail icon), so use
96
- // ImageBackground, which renders them on top of the image like FastImage.
97
- return (
98
- <ImageBackground
99
- {...(rest as any)}
100
- {...{
101
- accessibilityLabel: rest.accessibilityLabel ?? accessibilityLabel,
102
- }}
103
- source={source as ImageSourcePropType}
104
- style={[
105
- styles.dataUriContainer,
106
- styles.container,
107
- style,
108
- showBaseLineDebug && styles.debugBaseLine,
109
- ]}
110
- onLoadStart={() => {
111
- hasErrorRef.current = false;
112
- if (status !== 'loading' && loading) {
113
- setStatus('loading');
114
- }
115
- }}
116
- onLoad={() => {
117
- hasErrorRef.current = false;
118
- }}
119
- onLoadEnd={() => {
120
- let current: Status = 'success';
121
- if (hasErrorRef.current) {
122
- current = 'error';
123
- }
124
- setStatus(prevState =>
125
- prevState !== current ? current : prevState,
126
- );
127
- }}
128
- onError={() => {
129
- hasErrorRef.current = true;
130
- }}
131
- >
132
- {renderContent()}
133
- </ImageBackground>
134
- );
135
- }
136
-
137
84
  return (
138
85
  <FastImage
139
86
  {...rest}
140
87
  {...{ accessibilityLabel: rest.accessibilityLabel ?? accessibilityLabel }}
141
88
  source={source}
142
- style={
143
- [
144
- styles.container,
145
- style,
146
- showBaseLineDebug && styles.debugBaseLine,
147
- ] as FastImageProps['style']
148
- }
89
+ style={[
90
+ styles.container,
91
+ style,
92
+ showBaseLineDebug && styles.debugBaseLine,
93
+ ]}
149
94
  onProgress={event => {
150
95
  hasErrorRef.current = false;
151
96
  if (status !== 'loading' && loading) {
package/Image/styles.ts CHANGED
@@ -3,7 +3,5 @@ import { Colors } from '../Consts';
3
3
 
4
4
  export default StyleSheet.create({
5
5
  container: {},
6
- // same clipping as FastImage's container, so borderRadius rounds the image
7
- dataUriContainer: { overflow: 'hidden' },
8
6
  debugBaseLine: { borderWidth: 1, borderColor: Colors.green_06 },
9
7
  });
package/Image/types.ts CHANGED
@@ -1,14 +1,6 @@
1
- import { ImageStyle, StyleProp } from 'react-native';
2
1
  import { FastImageProps } from 'react-native-fast-image';
3
2
 
4
- /**
5
- * `style` uses React Native's own `ImageStyle`: from RN 0.87 (Strict TS API)
6
- * react-native no longer exports `FlexStyle`/`ShadowStyleIOS`, which
7
- * react-native-fast-image's `ImageStyle` extends, so that type lost layout
8
- * props such as `width`, `margin*` or `position`.
9
- */
10
- export interface ImageProps extends Omit<FastImageProps, 'style'> {
11
- style?: StyleProp<ImageStyle>;
3
+ export interface ImageProps extends FastImageProps {
12
4
  loading?: boolean;
13
5
  accessibilityLabel?: any;
14
6
  params?: any;
package/Input/Input.tsx CHANGED
@@ -6,10 +6,10 @@ import React, {
6
6
  useState,
7
7
  } from 'react';
8
8
  import {
9
+ TextInput,
9
10
  TextInputFocusEvent,
10
11
  TouchableOpacity,
11
12
  View,
12
- type TextInputInstance,
13
13
  } from 'react-native';
14
14
  import { useComponentId } from '../Application';
15
15
  import { Icon } from '../Icon';
@@ -81,7 +81,7 @@ const Input = forwardRef(
81
81
  const [isFocused, setIsFocused] = useState(false);
82
82
  const [internalText, setInternalText] = useState(defaultValue || '');
83
83
  const hasValue = value !== undefined ? !!value : !!internalText;
84
- const inputRef = useRef<TextInputInstance | null>(null);
84
+ const inputRef = useRef<TextInput | null>(null);
85
85
  const componentName = 'Input';
86
86
 
87
87
  const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
@@ -7,12 +7,7 @@ import React, {
7
7
  useRef,
8
8
  useState,
9
9
  } from 'react';
10
- import {
11
- Platform,
12
- TextInputFocusEvent,
13
- View,
14
- type TextInputInstance,
15
- } from 'react-native';
10
+ import { Platform, TextInput, TextInputFocusEvent, View } from 'react-native';
16
11
  import { useComponentId } from '../Application';
17
12
  import { ComponentContext, MiniAppContext } from '../Context';
18
13
  import { ErrorView } from './ErrorView';
@@ -61,7 +56,7 @@ const InputMoney = forwardRef(
61
56
  const [displayValue, setDisplayValue] = useState('');
62
57
  const [numericValue, setNumericValue] = useState('');
63
58
  const [lastDisplayValue, setLastDisplayValue] = useState('');
64
- const inputRef = useRef<TextInputInstance>(null);
59
+ const inputRef = useRef<TextInput>(null);
65
60
  const caretDigitsAfter = useRef<number | undefined>(undefined);
66
61
  const lastRawText = useRef('');
67
62
  const [caretSelection, setCaretSelection] = useState<{
@@ -2,11 +2,11 @@ import React, { RefObject, useContext } from 'react';
2
2
  import {
3
3
  Pressable,
4
4
  Text,
5
+ TextInput,
5
6
  TextInputFocusEvent,
6
7
  TextInputProps,
7
8
  TouchableOpacity,
8
9
  View,
9
- type TextInputInstance,
10
10
  } from 'react-native';
11
11
  import { ApplicationContext } from '../Context';
12
12
  import { Icon } from '../Icon';
@@ -43,7 +43,7 @@ type InputMoneyViewProps = Pick<
43
43
  componentId: string;
44
44
  displayValue: string;
45
45
  caretSelection?: { start: number; end: number };
46
- inputRef: RefObject<TextInputInstance | null>;
46
+ inputRef: RefObject<TextInput | null>;
47
47
  focusAtEnd: () => void;
48
48
  onClearText: () => void;
49
49
  onChangeText: (text: string) => void;
@@ -9,10 +9,10 @@ import React, {
9
9
  } from 'react';
10
10
  import {
11
11
  PixelRatio,
12
+ TextInput,
12
13
  TextInputFocusEvent,
13
14
  TouchableOpacity,
14
15
  View,
15
- type TextInputInstance,
16
16
  } from 'react-native';
17
17
  import Animated, {
18
18
  cancelAnimation,
@@ -116,7 +116,7 @@ const InputOTP = forwardRef(
116
116
  ) => {
117
117
  const [value, setValue] = useState('');
118
118
  const [isFocused, setIsFocused] = useState(false);
119
- const inputRef = useRef<TextInputInstance | null>(null);
119
+ const inputRef = useRef<TextInput | null>(null);
120
120
  const { theme } = useContext(ApplicationContext);
121
121
  const context = useContext<any>(MiniAppContext);
122
122
 
@@ -6,10 +6,10 @@ import React, {
6
6
  useState,
7
7
  } from 'react';
8
8
  import {
9
+ TextInput,
9
10
  TextInputFocusEvent,
10
11
  TouchableOpacity,
11
12
  View,
12
- type TextInputInstance,
13
13
  } from 'react-native';
14
14
  import { useComponentId } from '../Application';
15
15
  import {
@@ -79,7 +79,7 @@ const InputPhoneNumber = forwardRef(
79
79
  const [isFocused, setIsFocused] = useState(false);
80
80
  const [internalText, setInternalText] = useState(defaultValue || '');
81
81
  const hasValue = value !== undefined ? !!value : !!internalText;
82
- const inputRef = useRef<TextInputInstance | null>(null);
82
+ const inputRef = useRef<TextInput | null>(null);
83
83
  const componentName = 'InputPhoneNumber';
84
84
 
85
85
  const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
@@ -7,10 +7,10 @@ import React, {
7
7
  useState,
8
8
  } from 'react';
9
9
  import {
10
+ TextInput,
10
11
  TextInputFocusEvent,
11
12
  TouchableOpacity,
12
13
  View,
13
- type TextInputInstance,
14
14
  } from 'react-native';
15
15
  import { useComponentId } from '../Application';
16
16
  import { HeaderBarMetrics } from '../Application/headerLayout';
@@ -76,7 +76,7 @@ const InputSearch: ForwardRefRenderFunction<InputRef, InputSearchProps> = (
76
76
  const [internalText, setInternalText] = useState(defaultValue || '');
77
77
  const currentValue = value !== undefined ? value : internalText;
78
78
  const hasValue = !!currentValue;
79
- const inputRef = useRef<TextInputInstance | null>(null);
79
+ const inputRef = useRef<TextInput | null>(null);
80
80
 
81
81
  const componentName = 'InputSearch';
82
82
 
@@ -7,10 +7,10 @@ import React, {
7
7
  useState,
8
8
  } from 'react';
9
9
  import {
10
+ TextInput,
10
11
  TextInputFocusEvent,
11
12
  TouchableOpacity,
12
13
  View,
13
- type TextInputInstance,
14
14
  } from 'react-native';
15
15
  import { setAutomationID, useComponentId } from '../Application';
16
16
  import { ApplicationContext, MiniAppContext } from '../Context';
@@ -70,7 +70,7 @@ const InputTextArea = forwardRef(
70
70
  const inputFontFamily = exportFontFamily('regular');
71
71
  const [isFocused, setIsFocused] = useState(false);
72
72
  const [inputValue, setInputValue] = useState(defaultValue ?? '');
73
- const inputRef = useRef<TextInputInstance | null>(null);
73
+ const inputRef = useRef<TextInput | null>(null);
74
74
 
75
75
  useEffect(() => {
76
76
  setInputValue(value ?? '');
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable react-hooks/exhaustive-deps */
2
2
  import React, { FC, useEffect, useRef } from 'react';
3
- import { TextInput, type TextInputInstance } from 'react-native';
3
+ import { TextInput } from 'react-native';
4
4
  import { useScaleSize, exportFontFamily } from '../Text';
5
5
  import styles from './styles';
6
6
 
@@ -13,7 +13,7 @@ export const TextTyping: FC<any> = ({
13
13
  timeDelayEnd = 2000,
14
14
  timeDelayNextChar = 20,
15
15
  }) => {
16
- const textRef = useRef<TextInputInstance>(null);
16
+ const textRef = useRef<TextInput>(null);
17
17
  const scaledFontSize = useScaleSize(12);
18
18
  const typingFontFamily = exportFontFamily('regular');
19
19
 
@@ -4,12 +4,11 @@ import {
4
4
  TextInput,
5
5
  TextInputProps,
6
6
  TouchableOpacity,
7
- type TextInputInstance,
8
7
  } from 'react-native';
9
8
  import { Styles } from '../Consts';
10
9
 
11
10
  interface SystemTextInputProps extends TextInputProps {
12
- ref?: React.RefObject<TextInputInstance | null>;
11
+ ref?: React.RefObject<TextInput | null>;
13
12
  }
14
13
 
15
14
  /**
@@ -1,11 +1,6 @@
1
1
  /* eslint-disable react-hooks/exhaustive-deps */
2
2
  import React, { FC, memo, useEffect, useRef } from 'react';
3
- import {
4
- Platform,
5
- TextInput,
6
- TextStyle,
7
- type TextInputInstance,
8
- } from 'react-native';
3
+ import { Platform, TextInput, TextStyle } from 'react-native';
9
4
  import { Colors } from '../Consts';
10
5
  import { useScaleSize, exportFontFamily } from '../Text';
11
6
 
@@ -26,7 +21,7 @@ const TextTyping: FC<TextTypingProps> = ({
26
21
  timeDelayNextChar = 20,
27
22
  inputStyle = {},
28
23
  }) => {
29
- const textRef = useRef<TextInputInstance>(null);
24
+ const textRef = useRef<TextInput>(null);
30
25
  const scaledFontSize = useScaleSize(12);
31
26
  const inputFontFamily = exportFontFamily('regular');
32
27
 
@@ -13,8 +13,11 @@ import {
13
13
  SearchHeader,
14
14
  } from '../Application';
15
15
  import { DuoGlassBackground } from '../Application/Components/DuoGlassBackground';
16
- import { type HeaderContentLayout } from '../Application/headerLayout';
17
- import { getHeaderMargin } from './utils';
16
+ import {
17
+ getHeaderRowInset,
18
+ type HeaderContentLayout,
19
+ TITLE_CONTAINER_RESET,
20
+ } from '../Application/headerLayout';
18
21
  import { useHeaderBarOptions } from './useHeaderBarOptions';
19
22
  import { HeaderType } from './types';
20
23
 
@@ -242,10 +245,11 @@ export const useScreenHeader = ({
242
245
  // the search field spans the content, clear of the side bar and status bar
243
246
  // clusters; kept as numbers so the setter below stays stable
244
247
  let searchWidth = layout.width - Spacing.M * 2;
245
- let searchLeft = Spacing.M;
248
+ // past back, or at the row start when back is hidden or floats in the side bar
249
+ const rowStartLeft = getHeaderRowInset(layout.width);
250
+ const searchLeft = layout.sideBar ? rowStartLeft : Spacing.M;
246
251
  if (layout.sideBar) {
247
252
  searchWidth = layout.contentWidth - Spacing.M * 2;
248
- searchLeft = Spacing.M - getHeaderMargin(layout.width);
249
253
  }
250
254
  const clearance = layout.statusBarClearance;
251
255
  if (clearance) {
@@ -259,25 +263,18 @@ export const useScreenHeader = ({
259
263
  const setSearchHeader = useCallback(
260
264
  (params: SearchHeaderProps) => {
261
265
  searchHeaderParams.current = params;
266
+ const hasBack = !params?.hiddenBack;
262
267
  const options: StackNavigationOptions = {
263
268
  ...searchOptions,
264
269
  headerRight: undefined,
265
270
  headerTitleContainerStyle: {
271
+ ...TITLE_CONTAINER_RESET,
266
272
  width: searchWidth,
267
273
  maxWidth: searchWidth,
268
- marginLeft: 0,
269
- marginEnd: 0,
270
- marginStart: 0,
271
- marginHorizontal: 0,
272
- marginVertical: 0,
273
- margin: 0,
274
- left: searchLeft,
274
+ left: hasBack ? searchLeft : rowStartLeft,
275
275
  },
276
276
  headerLeft: (props: any) => {
277
- if (params?.hiddenBack) {
278
- return null;
279
- }
280
- return <HeaderLeft {...props} floating />;
277
+ return hasBack && <HeaderLeft {...props} floating />;
281
278
  },
282
279
  headerTitle: () => (
283
280
  <SearchHeader {...params} animatedValue={sharedValue} />
@@ -286,7 +283,14 @@ export const useScreenHeader = ({
286
283
 
287
284
  navigation?.instance?.setOptions(options);
288
285
  },
289
- [navigation?.instance, sharedValue, searchOptions, searchWidth, searchLeft],
286
+ [
287
+ navigation?.instance,
288
+ sharedValue,
289
+ searchOptions,
290
+ searchWidth,
291
+ searchLeft,
292
+ rowStartLeft,
293
+ ],
290
294
  );
291
295
 
292
296
  useEffect(() => {
@@ -1,8 +1,4 @@
1
- import {
2
- ScrollViewProps,
3
- ViewStyle,
4
- type ScrollViewInstance,
5
- } from 'react-native';
1
+ import {ScrollView, ScrollViewProps, ViewStyle} from 'react-native';
6
2
  import {Ref} from 'react';
7
3
 
8
4
  export type PaginationProps = {
@@ -36,7 +32,7 @@ export interface ScrollIndicatorProps extends ScrollViewProps {
36
32
  * Optional. Represents a reference to the ScrollView component.
37
33
  * It can be used to access the instance methods of the ScrollView.
38
34
  */
39
- scrollViewRef?: Ref<ScrollViewInstance>;
35
+ scrollViewRef?: Ref<ScrollView>;
40
36
  }
41
37
 
42
38
  export type ChildPaginationProps = Omit<PaginationProps, 'type'>;
package/package.json CHANGED
@@ -1,41 +1,39 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.169.19-beta.1",
3
+ "version": "0.169.19-beta.3",
4
4
  "description": "React Native Component Kits",
5
+ "main": "index.ts",
6
+ "scripts": {},
5
7
  "keywords": [
6
8
  "@momo-kits/foundation"
7
9
  ],
8
- "license": "MoMo",
9
- "main": "index.ts",
10
- "publishConfig": {
11
- "registry": "https://registry.npmjs.org/"
12
- },
13
- "scripts": {},
14
10
  "dependencies": {
15
- "@react-navigation/bottom-tabs": "7.21.0",
16
- "@react-navigation/core": "7.24.0",
17
- "@react-navigation/elements": "2.9.45",
18
- "@react-navigation/native": "7.5.1",
19
- "@react-navigation/routers": "7.6.5",
20
- "@react-navigation/stack": "7.12.1",
11
+ "react-native-fast-image": "git+https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-native-fast-image.git#v8.11.0",
12
+ "@react-navigation/bottom-tabs": "7.4.2",
13
+ "@react-navigation/core": "7.12.1",
14
+ "@react-navigation/elements": "2.5.2",
15
+ "@react-navigation/native": "7.1.14",
16
+ "@react-navigation/routers": "7.4.1",
17
+ "@react-navigation/stack": "7.4.2",
18
+ "react-native-gesture-handler": "2.27.1",
19
+ "react-native-linear-gradient": "git+https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-native-linear-gradient#v3.0.0",
20
+ "react-native-reanimated": "4.1.3",
21
+ "react-native-worklets": "0.6.1",
22
+ "react-native-safe-area-context": "5.5.2",
23
+ "react-native-reserved-regions": "0.2.0",
21
24
  "@shopify/flash-list": "2.1.0",
22
- "lottie-react-native": "7.3.6",
23
- "react-native-fast-image": "git+https://oauth2:k_r5y_gV6sX9-TqQxgcd@gitlab.mservice.com.vn/momo-platform/public/react-native-fast-image.git#v8.11.0",
24
- "react-native-gesture-handler": "3.4.0",
25
- "react-native-linear-gradient": "git+https://oauth2:k_r5y_gV6sX9-TqQxgcd@gitlab.mservice.com.vn/momo-platform/public/react-native-linear-gradient#v3.0.0",
26
- "react-native-reanimated": "4.7.1",
27
- "react-native-safe-area-context": "5.7.0",
28
- "react-native-reserved-regions": "0.2.0"
29
- },
30
- "devDependencies": {
31
- "@types/color": "3.0.6",
32
- "react-native-reanimated": "4.7.1",
33
- "react-native-worklets": "0.13.0"
25
+ "lottie-react-native": "7.2.4"
34
26
  },
35
27
  "peerDependencies": {
36
28
  "react-native": "*",
37
29
  "react-native-svg": "*",
38
- "react-native-reanimated": ">=4.7.0",
39
- "react-native-worklets": ">=0.13.0"
40
- }
30
+ "react-native-worklets": "0.6.1"
31
+ },
32
+ "devDependencies": {
33
+ "@types/color": "3.0.6"
34
+ },
35
+ "publishConfig": {
36
+ "registry": "https://registry.npmjs.org/"
37
+ },
38
+ "license": "MoMo"
41
39
  }