@momo-kits/foundation 0.157.2-test.1 → 0.157.3-beta.20

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 (51) hide show
  1. package/Application/BottomSheet.tsx +32 -1
  2. package/Application/ModalScreen.tsx +34 -23
  3. package/Application/types.ts +30 -2
  4. package/Badge/Badge.tsx +0 -2
  5. package/Badge/BadgeDot.tsx +0 -2
  6. package/Badge/BadgeDotAnimation.tsx +0 -2
  7. package/Badge/BadgeRibbon.tsx +0 -2
  8. package/Button/index.tsx +0 -2
  9. package/CheckBox/index.tsx +0 -2
  10. package/Context/index.ts +0 -10
  11. package/Divider/DashDivider.tsx +0 -2
  12. package/Divider/index.tsx +1 -3
  13. package/Icon/index.tsx +0 -2
  14. package/IconButton/index.tsx +0 -1
  15. package/Image/index.tsx +0 -2
  16. package/Input/Input.tsx +0 -2
  17. package/Input/InputDropDown.tsx +0 -2
  18. package/Input/InputMoney.tsx +0 -2
  19. package/Input/InputOTP.tsx +0 -2
  20. package/Input/InputPhoneNumber.tsx +0 -2
  21. package/Input/InputSearch.tsx +1 -5
  22. package/Input/InputTextArea.tsx +0 -2
  23. package/Layout/Card.tsx +1 -2
  24. package/Layout/FloatingButton.tsx +0 -2
  25. package/Layout/Item.tsx +0 -2
  26. package/Layout/ItemList.tsx +0 -2
  27. package/Layout/ItemSectionList.tsx +0 -2
  28. package/Layout/Screen.tsx +70 -268
  29. package/Layout/Section.tsx +3 -3
  30. package/Layout/TrackingScope.tsx +0 -2
  31. package/Layout/index.ts +1 -2
  32. package/Layout/utils.ts +2 -15
  33. package/Loader/DotLoader.tsx +0 -2
  34. package/Loader/Loader.tsx +1 -3
  35. package/Loader/ProgressBar.tsx +0 -2
  36. package/Loader/Spinner.tsx +0 -2
  37. package/Pagination/Dot.tsx +0 -2
  38. package/Pagination/PaginationDot.tsx +0 -2
  39. package/Pagination/PaginationNumber.tsx +0 -2
  40. package/Pagination/PaginationScroll.tsx +0 -2
  41. package/Pagination/PaginationWhiteDot.tsx +0 -2
  42. package/Popup/PopupNotify.tsx +0 -2
  43. package/Popup/PopupPromotion.tsx +0 -2
  44. package/Popup/index.tsx +1 -1
  45. package/Radio/index.tsx +1 -2
  46. package/Skeleton/index.tsx +0 -2
  47. package/Switch/index.tsx +0 -2
  48. package/Tag/index.tsx +0 -2
  49. package/Text/index.tsx +0 -2
  50. package/package.json +34 -34
  51. package/internal.ts +0 -2
@@ -29,6 +29,7 @@ import Animated, {
29
29
  withTiming,
30
30
  } from 'react-native-reanimated';
31
31
  import layoutStyles from '../Layout/styles';
32
+ import { version } from '../package.json';
32
33
 
33
34
  const BottomSheet: React.FC<BottomSheetParams> = props => {
34
35
  const { theme, navigator } = useContext(ApplicationContext);
@@ -54,10 +55,40 @@ const BottomSheet: React.FC<BottomSheetParams> = props => {
54
55
  useDivider = true,
55
56
  footerComponent,
56
57
  leftOptions,
57
- }: BottomSheetParams = props.route.params;
58
+ screen_name,
59
+ componentName,
60
+ componentLabel,
61
+ description,
62
+ title,
63
+ } = props as BottomSheetParams;
58
64
 
59
65
  const translateY = useSharedValue(heightDevice);
60
66
 
67
+ /**
68
+ * Fire auto_popup_displayed tracking event on mount
69
+ */
70
+ useEffect(() => {
71
+ if (typeof context?.autoTracking !== 'function') {
72
+ return;
73
+ }
74
+
75
+ context.autoTracking({
76
+ ...context,
77
+ eventName: 'auto_popup_displayed',
78
+ screen_name: screen_name ?? context.screenName,
79
+ miniapp_version: context.miniapp_version,
80
+ tracking_source: 1,
81
+ app_id: context.appId,
82
+ feature_code: context.feature_code,
83
+ kits_version: version,
84
+ component_name: componentName,
85
+ component_label: componentLabel,
86
+ description,
87
+ title,
88
+ });
89
+ // eslint-disable-next-line react-hooks/exhaustive-deps
90
+ }, []);
91
+
61
92
  const openAnimation = useCallback(() => {
62
93
  translateY.value = withTiming(0, {
63
94
  duration: 350,
@@ -1,14 +1,14 @@
1
1
  import React, { useCallback, useContext, useEffect, useRef } from 'react';
2
2
  import {
3
3
  Animated,
4
+ BackHandler,
4
5
  Easing,
5
6
  KeyboardAvoidingView,
7
+ Modal as ModalRN,
6
8
  Platform,
7
9
  Pressable,
8
10
  StyleSheet,
9
11
  View,
10
- Modal as ModalRN,
11
- BackHandler,
12
12
  } from 'react-native';
13
13
 
14
14
  import { ApplicationContext, MiniAppContext } from '../Context';
@@ -17,6 +17,7 @@ import Navigation from './Navigation';
17
17
  import { ModalParams } from './types';
18
18
  import BottomSheet from './BottomSheet';
19
19
  import { runOnJS } from 'react-native-reanimated';
20
+ import { version } from '../package.json';
20
21
 
21
22
  const ModalScreen: React.FC<any> = props => {
22
23
  if (props.route?.params?.isBottomSheet) {
@@ -28,14 +29,44 @@ const ModalScreen: React.FC<any> = props => {
28
29
  const Modal: React.FC<ModalParams> = props => {
29
30
  const { navigator } = useContext(ApplicationContext);
30
31
  const context = useContext<any>(MiniAppContext);
31
- const modalParams = useRef<any>(undefined);
32
32
  const {
33
33
  screen,
34
34
  barrierDismissible,
35
35
  modalStyle,
36
36
  useNativeModal = false,
37
+ screen_name,
38
+ componentName,
39
+ componentLabel,
40
+ description,
41
+ title,
37
42
  } = props.route.params;
38
43
  const Component = useRef(screen).current;
44
+
45
+ /**
46
+ * Fire auto_popup_displayed tracking event on mount
47
+ */
48
+ useEffect(() => {
49
+ if (typeof context?.autoTracking !== 'function') {
50
+ return;
51
+ }
52
+
53
+ context.autoTracking({
54
+ ...context,
55
+ eventName: 'auto_popup_displayed',
56
+ screen_name: screen_name ?? context.screenName,
57
+ miniapp_version: context.miniapp_version,
58
+ tracking_source: 1,
59
+ app_id: context.appId,
60
+ feature_code: context.feature_code,
61
+ kits_version: version,
62
+ component_name: componentName,
63
+ component_label: componentLabel,
64
+ description,
65
+ title,
66
+ });
67
+ // eslint-disable-next-line react-hooks/exhaustive-deps
68
+ }, []);
69
+
39
70
  const opacity = useRef(new Animated.Value(0)).current;
40
71
  const scale = useRef(new Animated.Value(0.8)).current;
41
72
 
@@ -50,26 +81,6 @@ const Modal: React.FC<ModalParams> = props => {
50
81
  Container = ModalRN;
51
82
  }
52
83
 
53
- if (screen != null) {
54
- const screenProps = screen?.()?.props || {};
55
- modalParams.current = {
56
- title: screenProps?.title || '',
57
- description: screenProps?.description || '',
58
- };
59
- }
60
-
61
- useEffect(() => {
62
- const item: any = {
63
- screenName: params.screen,
64
- componentName: 'Modal',
65
- ...modalParams.current,
66
- };
67
- context?.autoTracking?.({
68
- ...context,
69
- ...item,
70
- });
71
- }, [context, params.screen]);
72
-
73
84
  useEffect(() => {
74
85
  Animated.parallel([
75
86
  Animated.timing(opacity, {
@@ -185,7 +185,35 @@ export type ScreenTrackingParams = {
185
185
  value2?: any;
186
186
  };
187
187
 
188
- export type ModalParams = {
188
+ export type ModalTrackingProps = {
189
+ /**
190
+ * Optional. Screen name for auto_popup_displayed tracking event.
191
+ * Falls back to the current screen's name from context if not provided.
192
+ */
193
+ screen_name?: string;
194
+
195
+ /**
196
+ * Optional. Component name for auto_popup_displayed tracking event.
197
+ */
198
+ componentName?: string;
199
+
200
+ /**
201
+ * Optional. Component label for auto_popup_displayed tracking event.
202
+ */
203
+ componentLabel?: string;
204
+
205
+ /**
206
+ * Optional. Description for auto_popup_displayed tracking event.
207
+ */
208
+ description?: string;
209
+
210
+ /**
211
+ * Optional. Title for auto_popup_displayed tracking event.
212
+ */
213
+ title?: string;
214
+ };
215
+
216
+ export type ModalParams = ModalTrackingProps & {
189
217
  [key: string]: any;
190
218
  screen: React.ComponentType;
191
219
  onDismiss?: () => void;
@@ -194,7 +222,7 @@ export type ModalParams = {
194
222
  useNativeModal?: boolean;
195
223
  };
196
224
 
197
- export type BottomSheetParams = {
225
+ export type BottomSheetParams = ModalTrackingProps & {
198
226
  [key: string]: any;
199
227
  screen: React.ComponentType;
200
228
  options: {
package/Badge/Badge.tsx CHANGED
@@ -6,7 +6,6 @@ import { ApplicationContext, MiniAppContext } from '../Context';
6
6
  import { BadgeProps } from './types';
7
7
  import { Colors, Radius, Spacing } from '../Consts';
8
8
  import { Text, useScaleSize } from '../Text';
9
- import { useScreenRegistry } from '../Layout/utils';
10
9
 
11
10
  const Badge: FC<BadgeProps> = ({
12
11
  label = '',
@@ -14,7 +13,6 @@ const Badge: FC<BadgeProps> = ({
14
13
  backgroundColor,
15
14
  accessibilityLabel,
16
15
  }) => {
17
- useScreenRegistry('Badge');
18
16
  const { theme } = useContext(ApplicationContext);
19
17
  const context = useContext<any>(MiniAppContext);
20
18
  const { componentId } = useComponentId('Badge', accessibilityLabel);
@@ -3,10 +3,8 @@ import { View } from 'react-native';
3
3
  import { BadgeDotProps } from './types';
4
4
  import styles from './styles';
5
5
  import { MiniAppContext } from '../Context';
6
- import { useScreenRegistry } from '../Layout/utils';
7
6
 
8
7
  const BadgeDot: FC<BadgeDotProps> = ({ size = 'large', style }) => {
9
- useScreenRegistry('BadgeDot');
10
8
  const context = useContext<any>(MiniAppContext);
11
9
  let dotStyle;
12
10
  let dotContainerStyle;
@@ -2,12 +2,10 @@ import React, { useEffect, useRef } from 'react';
2
2
  import { Animated, View } from 'react-native';
3
3
  import { BadgeDotProps } from './types';
4
4
  import styles from './styles';
5
- import { useScreenRegistry } from '../Layout/utils';
6
5
 
7
6
  const DURATION = 500;
8
7
 
9
8
  const BadgeDotAnimation = ({ size, style }: BadgeDotProps) => {
10
- useScreenRegistry('BadgeDotAnimation');
11
9
  // Refs for animated values
12
10
  const scaleAnim = useRef(new Animated.Value(1)).current;
13
11
  const waveScaleAnim = useRef(new Animated.Value(1)).current;
@@ -7,7 +7,6 @@ import { ApplicationContext, MiniAppContext } from '../Context';
7
7
  import { Text } from '../Text';
8
8
  import { Colors } from '../Consts';
9
9
  import { Image } from '../Image';
10
- import { useScreenRegistry } from '../Layout/utils';
11
10
 
12
11
  const BadgeRibbon: FC<BadgeRibbonProps> = ({
13
12
  position = 'top_right',
@@ -15,7 +14,6 @@ const BadgeRibbon: FC<BadgeRibbonProps> = ({
15
14
  isRound = false,
16
15
  style = {},
17
16
  }) => {
18
- useScreenRegistry('BadgeRibbon');
19
17
  const { theme } = useContext(ApplicationContext);
20
18
  const context = useContext<any>(MiniAppContext);
21
19
  const isRight = position === 'top_right' || position === 'bottom_right';
package/Button/index.tsx CHANGED
@@ -28,7 +28,6 @@ import Reanimated, {
28
28
  useSharedValue,
29
29
  withTiming,
30
30
  } from 'react-native-reanimated';
31
- import { useScreenRegistry } from '../Layout';
32
31
 
33
32
  const AnimationLinear = Animated.createAnimatedComponent(LinearGradient);
34
33
 
@@ -74,7 +73,6 @@ const Button: FC<ButtonProps> = ({
74
73
  }) => {
75
74
  const { theme, config } = useContext(ApplicationContext);
76
75
  const context = useContext<any>(MiniAppContext);
77
- useScreenRegistry('Button');
78
76
  const skeleton = useContext(SkeletonContext);
79
77
  const animationRef = useRef<LottieView>(null);
80
78
  const pressAnim = useSharedValue(0);
@@ -10,7 +10,6 @@ import {
10
10
  } from '../Context';
11
11
  import { Text } from '../Text';
12
12
  import { Icon } from '../Icon';
13
- import { useScreenRegistry } from '../Layout';
14
13
 
15
14
  const CheckBox: FC<CheckBoxProps> = ({
16
15
  value,
@@ -25,7 +24,6 @@ const CheckBox: FC<CheckBoxProps> = ({
25
24
  }) => {
26
25
  const { theme } = useContext(ApplicationContext);
27
26
  const context = useContext<any>(MiniAppContext);
28
- useScreenRegistry('CheckBox');
29
27
  const haveValue = value || indeterminate;
30
28
  const iconSource = indeterminate ? 'ic_minus' : 'ic_checked';
31
29
  let borderColor = theme.colors.text.default;
package/Context/index.ts CHANGED
@@ -2,17 +2,8 @@ import { Platform } from 'react-native';
2
2
  import { createContext } from 'react';
3
3
  import { defaultContext } from '../Consts';
4
4
 
5
- export type ScreenRegistryContextType = {
6
- register: (id: string, name: string) => void;
7
- unregister: (id: string) => void;
8
- };
9
-
10
5
  const Context = createContext({});
11
6
  const ApplicationContext = createContext(defaultContext);
12
- const ScreenRegistryContext = createContext<ScreenRegistryContextType>({
13
- register: () => {},
14
- unregister: () => {},
15
- });
16
7
 
17
8
  const MiniAppContext = (Platform as any).MiniAppContext ?? Context;
18
9
  const ScreenContext = (Platform as any).ScreenContext ?? Context;
@@ -29,7 +20,6 @@ export {
29
20
  ApplicationContext,
30
21
  MiniAppContext,
31
22
  ScreenContext,
32
- ScreenRegistryContext,
33
23
  ComponentContext,
34
24
  SkeletonContext,
35
25
  TrackingScopeContext,
@@ -3,7 +3,6 @@ import { 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';
6
- import { useScreenRegistry } from '../Layout/utils';
7
6
 
8
7
  export interface DashDividerProps {
9
8
  /**
@@ -13,7 +12,6 @@ export interface DashDividerProps {
13
12
  }
14
13
 
15
14
  const DashDivider: React.FC<DashDividerProps> = ({ style }) => {
16
- useScreenRegistry('DashDivider');
17
15
  const { theme } = useContext(ApplicationContext);
18
16
  const borderColor = theme.colors.border.default;
19
17
 
package/Divider/index.tsx CHANGED
@@ -3,7 +3,6 @@ import { View, ViewStyle } from 'react-native';
3
3
  import { ApplicationContext } from '../Context';
4
4
  import { Spacing } from '../Consts';
5
5
  import { DashDivider } from './DashDivider';
6
- import { useScreenRegistry } from '../Layout';
7
6
 
8
7
  export interface DividerProps {
9
8
  /**
@@ -26,9 +25,8 @@ const Divider: React.FC<DividerProps> = ({
26
25
  }) => {
27
26
  const { theme } = useContext(ApplicationContext);
28
27
 
29
- useScreenRegistry('Divider');
30
-
31
28
  if (type === 'dash') return <DashDivider style={style} />;
29
+
32
30
  return (
33
31
  <View
34
32
  style={[
package/Icon/index.tsx CHANGED
@@ -6,7 +6,6 @@ import { ApplicationContext, MiniAppContext } from '../Context';
6
6
  import { Image } from '../Image';
7
7
  import { StyleSheet } from 'react-native';
8
8
  import { Colors } from '../Consts';
9
- import { useScreenRegistry } from '../Layout';
10
9
 
11
10
  const Icon: React.FC<IconProps> = ({
12
11
  source = 'ic_back',
@@ -17,7 +16,6 @@ const Icon: React.FC<IconProps> = ({
17
16
  }) => {
18
17
  const { theme } = useContext(ApplicationContext);
19
18
  const context = useContext<any>(MiniAppContext);
20
- useScreenRegistry('Icon');
21
19
 
22
20
  const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
23
21
 
@@ -43,7 +43,6 @@ const IconButton: React.FC<IconButtonProps> = ({
43
43
  params,
44
44
  ...rest
45
45
  }) => {
46
- useScreenRegistry('IconButton');
47
46
  const { theme } = useContext(ApplicationContext);
48
47
  const context = useContext<any>(MiniAppContext);
49
48
 
package/Image/index.tsx CHANGED
@@ -12,7 +12,6 @@ import { Skeleton } from '../Skeleton';
12
12
  import { Icon } from '../Icon';
13
13
  import { Styles } from '../Consts';
14
14
  import { ImageProps } from './types';
15
- import { useScreenRegistry } from '../Layout';
16
15
 
17
16
  type Status = 'success' | 'loading' | 'error';
18
17
 
@@ -37,7 +36,6 @@ const Image: React.FC<ImageProps> = ({
37
36
  const skeleton = useContext(SkeletonContext);
38
37
  const error = useRef(false);
39
38
  const [status, setStatus] = useState<Status>('success');
40
- useScreenRegistry('Image');
41
39
 
42
40
  const showBaseLineDebug = context?.features?.showBaseLineDebug ?? false;
43
41
 
package/Input/Input.tsx CHANGED
@@ -31,7 +31,6 @@ import {
31
31
  ComponentContext,
32
32
  MiniAppContext,
33
33
  } from '../Context';
34
- import { useScreenRegistry } from '../Layout/utils';
35
34
 
36
35
  /**
37
36
  * Input default component
@@ -73,7 +72,6 @@ const Input = forwardRef(
73
72
  }: InputProps,
74
73
  ref,
75
74
  ) => {
76
- useScreenRegistry('Input');
77
75
  const { theme } = useContext(ApplicationContext);
78
76
  const context = useContext<any>(MiniAppContext);
79
77
  const scaledFontSize = useScaleSize(14);
@@ -17,7 +17,6 @@ import { InputDropDownProps } from './index';
17
17
  import { Text, useScaleSize } from '../Text';
18
18
  import styles from './styles';
19
19
  import { Spacing } from '../Consts';
20
- import { useScreenRegistry } from '../Layout/utils';
21
20
 
22
21
  const InputDropDown = ({
23
22
  value,
@@ -39,7 +38,6 @@ const InputDropDown = ({
39
38
  multiline,
40
39
  ...props
41
40
  }: InputDropDownProps) => {
42
- useScreenRegistry('InputDropDown');
43
41
  const { theme } = useContext(ApplicationContext);
44
42
  const context = useContext<any>(MiniAppContext);
45
43
  const scaleHeight = useScaleSize(size === 'small' ? 48 : 56, 1.1);
@@ -34,7 +34,6 @@ import { InputMoneyProps } from './index';
34
34
  import styles from './styles';
35
35
  import { formatNumberToMoney } from './utils';
36
36
  import SystemTextInput from './SystemTextInput';
37
- import { useScreenRegistry } from '../Layout/utils';
38
37
 
39
38
  const InputMoney = forwardRef(
40
39
  (
@@ -66,7 +65,6 @@ const InputMoney = forwardRef(
66
65
  }: InputMoneyProps,
67
66
  ref,
68
67
  ) => {
69
- useScreenRegistry('InputMoney');
70
68
  const { theme } = useContext(ApplicationContext);
71
69
  const context = useContext<any>(MiniAppContext);
72
70
  const scaleHeight = useScaleSize(size === 'small' ? 48 : 56, 1.1);
@@ -28,7 +28,6 @@ import {
28
28
  ComponentContext,
29
29
  MiniAppContext,
30
30
  } from '../Context';
31
- import { useScreenRegistry } from '../Layout/utils';
32
31
 
33
32
  const OTPCaret: FC<CaretProps> = ({ index, length }) => {
34
33
  const DURATION = 300;
@@ -91,7 +90,6 @@ const InputOTP = forwardRef(
91
90
  }: InputOTPProps,
92
91
  ref,
93
92
  ) => {
94
- useScreenRegistry('InputOTP');
95
93
  const MAX_LENGTH = 10;
96
94
  const [value, setValue] = useState('');
97
95
  const [focused, setFocused] = useState(false);
@@ -33,7 +33,6 @@ import styles from './styles';
33
33
  import SystemTextInput from './SystemTextInput';
34
34
  import { Image } from '../Image';
35
35
  import { Typography } from '../Text/types';
36
- import { useScreenRegistry } from '../Layout/utils';
37
36
 
38
37
  /**
39
38
  * Input default component
@@ -66,7 +65,6 @@ const InputPhoneNumber = forwardRef(
66
65
  }: InputPhoneNumberProps,
67
66
  ref,
68
67
  ) => {
69
- useScreenRegistry('InputPhoneNumber');
70
68
  const { theme } = useContext(ApplicationContext);
71
69
  const context = useContext<any>(MiniAppContext);
72
70
  const scaleHeight = useScaleSize(size === 'small' ? 48 : 56, 1.1);
@@ -28,7 +28,6 @@ import { InputRef, InputSearchProps } from './index';
28
28
  import styles from './styles';
29
29
  import { Styles } from '../Consts';
30
30
  import SystemTextInput from './SystemTextInput';
31
- import { useScreenRegistry } from '../Layout/utils';
32
31
 
33
32
  const TextTyping: FC<any> = ({
34
33
  data = [],
@@ -142,7 +141,6 @@ const InputSearch: ForwardRefRenderFunction<InputRef, InputSearchProps> = (
142
141
  },
143
142
  ref,
144
143
  ) => {
145
- useScreenRegistry('InputSearch');
146
144
  const { theme } = useContext(ApplicationContext);
147
145
  const context = useContext<any>(MiniAppContext);
148
146
  const scaledFontSize = useScaleSize(14);
@@ -350,6 +348,4 @@ const InputSearch: ForwardRefRenderFunction<InputRef, InputSearchProps> = (
350
348
  );
351
349
  };
352
350
 
353
- const ForwardedInputSearch = forwardRef(InputSearch);
354
- ForwardedInputSearch.displayName = 'InputSearch';
355
- export default ForwardedInputSearch;
351
+ export default forwardRef(InputSearch);
@@ -22,7 +22,6 @@ import { InputTextAreaProps } from './index';
22
22
  import styles from './styles';
23
23
  import SystemTextInput from './SystemTextInput';
24
24
  import { useComponentId } from '../Application';
25
- import { useScreenRegistry } from '../Layout/utils';
26
25
 
27
26
  const InputTextArea = forwardRef(
28
27
  (
@@ -48,7 +47,6 @@ const InputTextArea = forwardRef(
48
47
  }: InputTextAreaProps,
49
48
  ref,
50
49
  ) => {
51
- useScreenRegistry('InputTextArea');
52
50
  const componentName = 'InputTextArea';
53
51
 
54
52
  const { componentId } = useComponentId(
package/Layout/Card.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { Dimensions, View, ViewProps } from 'react-native';
3
- import { useGridSystem, useScreenRegistry } from './utils';
3
+ import { useGridSystem } from './utils';
4
4
  import { GridContextProps } from './types';
5
5
  import { GridContext, GridSystem } from './index';
6
6
  import { Image } from '../Image';
@@ -27,7 +27,6 @@ const Card: React.FC<CardProps> = ({
27
27
  useShadow = false,
28
28
  ...props
29
29
  }) => {
30
- useScreenRegistry('Card');
31
30
  const { showGrid, theme } = useContext(ApplicationContext);
32
31
  const { numberOfColumns } = useGridSystem();
33
32
 
@@ -14,7 +14,6 @@ import {
14
14
  } from 'react-native';
15
15
  import { ApplicationContext } from '../Context';
16
16
  import { Icon } from '../Icon';
17
- import { useScreenRegistry } from './utils';
18
17
 
19
18
  export interface FloatingButtonProps {
20
19
  label?: string;
@@ -39,7 +38,6 @@ export const FloatingButton: React.FC<FloatingButtonProps> = ({
39
38
  animatedValue,
40
39
  bottom = 12,
41
40
  }: FloatingButtonProps) => {
42
- useScreenRegistry('FloatingButton');
43
41
  const { theme } = useContext(ApplicationContext);
44
42
  const maxWidth = useRef(0);
45
43
  const minWidth = size === 'small' ? 36 : 48;
package/Layout/Item.tsx CHANGED
@@ -2,7 +2,6 @@ import React, { useContext } from 'react';
2
2
  import { View, ViewProps } from 'react-native';
3
3
  import { GridContext } from './index';
4
4
  import { ApplicationContext, MiniAppContext } from '../Context';
5
- import { useScreenRegistry } from './utils';
6
5
  import styles from './styles';
7
6
  import { SpanNumber } from './types';
8
7
 
@@ -24,7 +23,6 @@ const Item: React.FC<ItemProps> = ({
24
23
  children,
25
24
  style,
26
25
  }) => {
27
- useScreenRegistry('Item');
28
26
  const { showGrid } = useContext(ApplicationContext);
29
27
  const context = useContext<any>(MiniAppContext);
30
28
  const grid = useContext(GridContext);
@@ -4,7 +4,6 @@ import Item from './Item';
4
4
  import { GridContext } from './index';
5
5
  import styles from './styles';
6
6
  import { SpanNumber } from './types';
7
- import { useScreenRegistry } from './utils';
8
7
 
9
8
  export interface ItemListProps extends FlatListProps<any> {
10
9
  /**
@@ -25,7 +24,6 @@ const ItemList = forwardRef(
25
24
  }: ItemListProps,
26
25
  ref,
27
26
  ) => {
28
- useScreenRegistry('ItemList');
29
27
  const { gutterSize, numberOfColumns } = useContext(GridContext);
30
28
  const widthItem = (widthSpan ?? numberOfColumns) as SpanNumber;
31
29
  const numColumns = Math.floor(numberOfColumns / widthItem);
@@ -4,7 +4,6 @@ import Item from './Item';
4
4
  import { GridContext } from './index';
5
5
  import styles from './styles';
6
6
  import { SpanNumber } from './types';
7
- import { useScreenRegistry } from './utils';
8
7
 
9
8
  export interface ItemSectionListProps extends SectionListProps<any> {
10
9
  /**
@@ -20,7 +19,6 @@ const ItemSectionList: FC<ItemSectionListProps> = ({
20
19
  contentContainerStyle,
21
20
  ...props
22
21
  }) => {
23
- useScreenRegistry('ItemSectionList');
24
22
  const { gutterSize, numberOfColumns } = useContext(GridContext);
25
23
  const widthItem = (widthSpan ?? numberOfColumns) as SpanNumber;
26
24
  const _renderItem = (item: any) => {