@momo-kits/foundation 0.81.43-beta.12 → 0.81.43-beta.17

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.
@@ -3,29 +3,45 @@ import {Platform} from 'react-native';
3
3
  import {BottomTabProps, NavigationScreenProps} from './types';
4
4
  import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
5
5
  import {createStackNavigator} from '@react-navigation/stack';
6
+ import {useSafeAreaInsets} from 'react-native-safe-area-context';
7
+ import {NavigationContainer} from '@react-navigation/native';
6
8
  import {Icon} from '../Icon';
7
9
  import {Text} from '../Text';
8
10
  import {ApplicationContext} from './index';
9
11
  import {getStackOptions} from './utils';
10
12
  import StackScreen from './StackScreen';
11
- import {useSafeAreaInsets} from 'react-native-safe-area-context';
12
13
 
13
14
  const Tab = createBottomTabNavigator();
14
15
  const Stack = createStackNavigator();
15
16
 
16
17
  const TabScreen: React.FC<NavigationScreenProps> = ({route}) => {
18
+ if (route.params?.nested) {
19
+ return (
20
+ <Stack.Navigator>
21
+ <Stack.Screen
22
+ name="Stack"
23
+ component={StackScreen}
24
+ initialParams={{screen: route.params?.screen}}
25
+ options={{...getStackOptions(), ...route.params?.options}}
26
+ />
27
+ </Stack.Navigator>
28
+ );
29
+ }
17
30
  return (
18
- <Stack.Navigator>
19
- <Stack.Screen
20
- name="Stack"
21
- component={StackScreen}
22
- initialParams={{screen: route.params?.screen}}
23
- options={{...getStackOptions(), ...route.params?.options}}
24
- />
25
- </Stack.Navigator>
31
+ <NavigationContainer independent={true}>
32
+ <Stack.Navigator>
33
+ <Stack.Screen
34
+ name="Stack"
35
+ component={StackScreen}
36
+ initialParams={{screen: route.params?.screen}}
37
+ options={{...getStackOptions(), ...route.params?.options}}
38
+ />
39
+ </Stack.Navigator>
40
+ </NavigationContainer>
26
41
  );
27
42
  };
28
43
  const BottomTab: React.FC<BottomTabProps> = ({
44
+ nested,
29
45
  tabs,
30
46
  listeners,
31
47
  navigation,
@@ -61,7 +77,7 @@ const BottomTab: React.FC<BottomTabProps> = ({
61
77
  key={item.name}
62
78
  name={item.name}
63
79
  component={TabScreen}
64
- initialParams={item}
80
+ initialParams={{...item, nested}}
65
81
  listeners={listeners}
66
82
  options={{
67
83
  tabBarLabel: ({color, focused}) => {
@@ -31,74 +31,6 @@ import {Icon} from '../Icon';
31
31
  import {PopupNotify} from '../Popup';
32
32
  import {Badge, BadgeDot} from '../Badge';
33
33
 
34
- const styles = StyleSheet.create({
35
- navigationButton: {
36
- height: 28,
37
- width: 28,
38
- borderRadius: 14,
39
- justifyContent: 'center',
40
- alignItems: 'center',
41
- },
42
- headerBackground: {
43
- width: '100%',
44
- height: undefined,
45
- position: 'absolute',
46
- aspectRatio: 375 / 154,
47
- },
48
- headerTitleContainer: {
49
- alignItems: 'center',
50
- justifyContent: 'center',
51
- width: '100%',
52
- },
53
- circle: {width: 36, height: 36, borderRadius: 18},
54
- square: {width: 36, height: 36, borderRadius: Radius.XS},
55
- dotAvatar: {
56
- position: 'absolute',
57
- width: 12,
58
- height: 12,
59
- borderRadius: 6,
60
- bottom: 0,
61
- right: 0,
62
- borderWidth: 1,
63
- borderColor: Colors.black_01,
64
- },
65
- headerButton: {paddingHorizontal: 4},
66
- headerRightButton: {
67
- flexDirection: 'row',
68
- justifyContent: 'center',
69
- alignItems: 'center',
70
- paddingRight: Spacing.S,
71
- },
72
- toolkitContainer: {
73
- marginLeft: Spacing.S,
74
- padding: Spacing.XS,
75
- height: 28,
76
- borderRadius: 14,
77
- borderColor: '#00000066',
78
- justifyContent: 'center',
79
- alignItems: 'center',
80
- flexDirection: 'row',
81
- },
82
- divider: {
83
- width: 1,
84
- height: 12,
85
- marginHorizontal: 4,
86
- },
87
- headerLeft: {
88
- marginLeft: 12,
89
- },
90
- title: {
91
- fontSize: scaleSize(15),
92
- lineHeight: scaleSize(22),
93
- fontWeight: 'bold',
94
- },
95
- badge: {
96
- position: 'absolute',
97
- top: -8,
98
- right: -6,
99
- },
100
- });
101
-
102
34
  const NavigationButton: React.FC<NavigationButtonProps> = ({
103
35
  icon,
104
36
  tintColor,
@@ -119,10 +51,12 @@ const NavigationButton: React.FC<NavigationButtonProps> = ({
119
51
  }
120
52
 
121
53
  const renderBadge = useCallback(() => {
122
- if (!badgeValue && !badgeType) return null;
123
54
  if (badgeType === 'dot') {
124
- return <BadgeDot size="small" style={styles.badge} />;
55
+ return <BadgeDot size="small" style={styles.badgeDot} />;
125
56
  }
57
+
58
+ if (!!badgeValue && isNaN(Number(badgeValue))) return null;
59
+
126
60
  return <Badge label={badgeValue} style={styles.badge} />;
127
61
  }, [badgeType, badgeValue]);
128
62
 
@@ -351,12 +285,12 @@ const HeaderRightAction: React.FC<any> = ({children, ...restProps}) => {
351
285
 
352
286
  const HeaderToolkitAction: React.FC<any> = ({
353
287
  tintColor,
354
- pinnedTool = {key: '', badgeValue: undefined, badgeTye: undefined},
288
+ pinnedTool,
355
289
  preventBack,
356
290
  }) => {
357
291
  const {theme, navigator} = useContext(ApplicationContext);
358
292
  const [toolConfig, setToolConfig] = useState<any>();
359
- const {appCode, onAction} = toolConfig ?? {};
293
+ const {onAction} = toolConfig ?? {};
360
294
 
361
295
  let backgroundColor;
362
296
  if (tintColor != Colors.black_01) {
@@ -367,71 +301,26 @@ const HeaderToolkitAction: React.FC<any> = ({
367
301
  if (navigator?.toolkitConfig) {
368
302
  setToolConfig(navigator?.toolkitConfig);
369
303
  } else {
370
- navigator?.requestApi('getToolkitConfig', [undefined], (config: any) => {
371
- navigator.toolkitConfig = {
372
- configs: [
373
- ...config?.miniappTools?.customTools,
374
- ...config?.defaultTools,
375
- ],
376
- appCode: config?.appCode,
377
- };
378
- setToolConfig({
379
- configs: [
380
- ...config?.miniappTools?.customTools,
381
- ...config?.defaultTools,
382
- ],
383
- appCode: config?.appCode,
384
- });
385
- });
304
+ getToolkitConfig();
386
305
  }
387
306
  }, []);
388
307
 
389
- useEffect(() => {
390
- let addFavorite: any;
391
- let removeFavorite: any;
392
- if (appCode) {
393
- const addSchema = `observerToolkit_addFavorite_${appCode}`;
394
- const removeSchema = `observerToolkit_removeFavorite_${appCode}`;
395
- addFavorite = navigator?.requestApi(
396
- 'observer',
397
- [addSchema],
398
- (data: any) => {
399
- if (data?.status) {
400
- setToolConfig({
401
- ...(toolConfig as HeaderToolkitProps),
402
- hidden: true,
403
- });
404
- }
405
- },
406
- );
407
- addFavorite = navigator?.requestApi(
408
- 'observer',
409
- [removeSchema],
410
- (data: any) => {
411
- if (data?.status) {
412
- setToolConfig({
413
- ...(toolConfig as HeaderToolkitProps),
414
- hidden: false,
415
- });
416
- }
417
- },
418
- );
419
- }
420
-
421
- return () => {
422
- addFavorite?.();
423
- removeFavorite?.();
424
- };
425
- }, [appCode]);
308
+ const getToolkitConfig = () => {
309
+ navigator?.requestApi('getToolsConfig', [undefined], (config: any) => {
310
+ navigator.toolkitConfig = config;
311
+ setToolConfig(navigator?.toolkitConfig);
312
+ });
313
+ };
426
314
 
427
315
  const onMore = () => {
428
316
  onAction?.('onMore');
429
317
  navigator?.requestApi(
430
318
  'showTools',
431
- [toolConfig],
319
+ [undefined],
432
320
  (res: {item: {action?: string; key: string}}) => {
433
321
  const {item} = res;
434
322
  navigator?.toolkitCallback?.(item);
323
+ getToolkitConfig();
435
324
  },
436
325
  );
437
326
  };
@@ -458,23 +347,24 @@ const HeaderToolkitAction: React.FC<any> = ({
458
347
  };
459
348
 
460
349
  const renderPinnedTool = () => {
461
- const pinTool = toolConfig?.configs?.find(
462
- (i: any) => i.key === pinnedTool.key,
350
+ const pinTool = toolConfig?.tools?.find(
351
+ (i: any) => i.key === pinnedTool?.key,
463
352
  );
353
+ const {badgeValue, badgeType} = pinnedTool ?? {};
464
354
 
465
- const {badgeValue, badgeType} = pinnedTool;
466
- const {icon} = pinTool || '';
467
-
468
- if (pinTool && pinnedTool)
355
+ if (pinTool)
469
356
  return (
470
357
  <NavigationButton
471
358
  accessibilityLabel={'UtilityTool'}
472
- icon={icon as string}
359
+ icon={pinTool.icon as string}
473
360
  tintColor={tintColor}
474
361
  badgeValue={badgeValue}
475
362
  badgeType={badgeType}
476
363
  onPress={() => {
477
- navigator?.toolkitCallback?.(pinnedTool.key);
364
+ navigator?.requestApi('onToolAction', [pinTool?.key], () => {
365
+ getToolkitConfig();
366
+ });
367
+ navigator?.toolkitCallback?.(pinTool.key);
478
368
  }}
479
369
  />
480
370
  );
@@ -555,6 +445,79 @@ const HeaderAnimated: React.FC<HeaderAnimatedProps> = ({
555
445
  );
556
446
  };
557
447
 
448
+ const styles = StyleSheet.create({
449
+ navigationButton: {
450
+ height: 28,
451
+ width: 28,
452
+ borderRadius: 14,
453
+ justifyContent: 'center',
454
+ alignItems: 'center',
455
+ },
456
+ headerBackground: {
457
+ width: '100%',
458
+ height: undefined,
459
+ position: 'absolute',
460
+ aspectRatio: 375 / 154,
461
+ },
462
+ headerTitleContainer: {
463
+ alignItems: 'center',
464
+ justifyContent: 'center',
465
+ width: '100%',
466
+ },
467
+ circle: {width: 36, height: 36, borderRadius: 18},
468
+ square: {width: 36, height: 36, borderRadius: Radius.XS},
469
+ dotAvatar: {
470
+ position: 'absolute',
471
+ width: 12,
472
+ height: 12,
473
+ borderRadius: 6,
474
+ bottom: 0,
475
+ right: 0,
476
+ borderWidth: 1,
477
+ borderColor: Colors.black_01,
478
+ },
479
+ headerButton: {paddingHorizontal: 4},
480
+ headerRightButton: {
481
+ flexDirection: 'row',
482
+ justifyContent: 'center',
483
+ alignItems: 'center',
484
+ paddingRight: Spacing.S,
485
+ },
486
+ toolkitContainer: {
487
+ marginLeft: Spacing.S,
488
+ padding: Spacing.XS,
489
+ height: 28,
490
+ borderRadius: 14,
491
+ borderColor: '#00000066',
492
+ justifyContent: 'center',
493
+ alignItems: 'center',
494
+ flexDirection: 'row',
495
+ },
496
+ divider: {
497
+ width: 1,
498
+ height: 12,
499
+ marginHorizontal: 4,
500
+ },
501
+ headerLeft: {
502
+ marginLeft: 12,
503
+ },
504
+ title: {
505
+ fontSize: scaleSize(15),
506
+ lineHeight: scaleSize(22),
507
+ fontWeight: 'bold',
508
+ },
509
+ badge: {
510
+ position: 'absolute',
511
+ top: -Spacing.S,
512
+ right: -6,
513
+ },
514
+ badgeDot: {
515
+ position: 'absolute',
516
+ top: -Spacing.XS,
517
+ right: -Spacing.XS,
518
+ },
519
+ });
520
+
558
521
  export {
559
522
  NavigationButton,
560
523
  HeaderTitle,
@@ -193,6 +193,7 @@ export type BottomTabItemProps = {
193
193
  };
194
194
 
195
195
  export type BottomTabProps = {
196
+ nested?: boolean;
196
197
  tabs: BottomTabItemProps[];
197
198
  initialRouteName?: string;
198
199
  navigation: Navigation;
package/Layout/Card.tsx CHANGED
@@ -29,7 +29,7 @@ const Card: React.FC<CardProps> = ({
29
29
  useShadow = false,
30
30
  ...props
31
31
  }) => {
32
- const {showGrid} = useContext(ApplicationContext);
32
+ const {showGrid, theme} = useContext(ApplicationContext);
33
33
  const {numberOfColumns} = useGridSystem();
34
34
 
35
35
  const gutterSize = 8;
@@ -47,6 +47,7 @@ const Card: React.FC<CardProps> = ({
47
47
  return span * sizePerSpan + (span - 1) * gutterSize;
48
48
  },
49
49
  };
50
+
50
51
  /**
51
52
  * render overlay only dev mode
52
53
  */
@@ -107,8 +108,9 @@ const Card: React.FC<CardProps> = ({
107
108
  if (Array.isArray(children)) {
108
109
  let cursor = 0;
109
110
  let rows: any[] = [];
110
- for (let i = 0; i < children.length; ++i) {
111
- const item = children[i];
111
+ const arrayChild = children.filter(item => !!item);
112
+ for (let i = 0; i < arrayChild.length; ++i) {
113
+ const item = arrayChild[i];
112
114
  const totalSpan = rows
113
115
  .concat([item])
114
116
  .map(i => i.props?.widthSpan)
@@ -124,7 +126,7 @@ const Card: React.FC<CardProps> = ({
124
126
  rows = [item];
125
127
  }
126
128
 
127
- if (i == children.length - 1) {
129
+ if (i == arrayChild.length - 1) {
128
130
  cursor += 1;
129
131
  element.push(addRowView(rows, cursor, true));
130
132
  }
@@ -138,23 +140,21 @@ const Card: React.FC<CardProps> = ({
138
140
  return element;
139
141
  };
140
142
 
141
- const {theme} = useContext(ApplicationContext);
142
143
  return (
143
144
  <GridContext.Provider value={gridContext}>
144
145
  <View
145
146
  {...props}
146
147
  accessibilityLabel={`Card`}
147
148
  style={[
149
+ {backgroundColor: theme.colors.background.surface},
148
150
  style,
149
151
  styles.protectedStyle,
150
152
  styles.card,
151
153
  {
152
154
  width: widthSection,
153
155
  marginHorizontal: margin,
154
- backgroundColor: backgroundImage
155
- ? undefined
156
- : theme.colors.background.surface,
157
156
  },
157
+ !!backgroundImage && {backgroundColor: undefined},
158
158
  useShadow && Shadow.Light,
159
159
  ]}>
160
160
  {!!backgroundImage && (
@@ -1,4 +1,4 @@
1
- import React, {FC, useContext} from 'react';
1
+ import React, {forwardRef, useContext} from 'react';
2
2
  import {FlatList, FlatListProps, View} from 'react-native';
3
3
  import Item, {SpanNumber} from './Item';
4
4
  import {GridContext} from './index';
@@ -11,39 +11,45 @@ export interface ItemListProps extends FlatListProps<any> {
11
11
  widthSpan?: SpanNumber;
12
12
  }
13
13
 
14
- const ItemList: FC<ItemListProps> = ({
15
- renderItem,
16
- widthSpan,
17
- style,
18
- contentContainerStyle,
19
- ...props
20
- }) => {
21
- const {gutterSize, numberOfColumns} = useContext(GridContext);
22
- const widthItem = (widthSpan ?? numberOfColumns) as SpanNumber;
23
- const numColumns = Math.floor(numberOfColumns / widthItem);
24
- const indexBegin = props?.data?.map((_i, index) => index * numColumns);
25
- const _renderItem = (item: any) => {
26
- if (indexBegin?.includes(item?.index)) {
27
- return <Item widthSpan={widthItem}>{renderItem?.(item)}</Item>;
28
- }
14
+ const ItemList = forwardRef(
15
+ (
16
+ {
17
+ renderItem,
18
+ widthSpan,
19
+ style,
20
+ contentContainerStyle,
21
+ ...props
22
+ }: ItemListProps,
23
+ ref,
24
+ ) => {
25
+ const {gutterSize, numberOfColumns} = useContext(GridContext);
26
+ const widthItem = (widthSpan ?? numberOfColumns) as SpanNumber;
27
+ const numColumns = Math.floor(numberOfColumns / widthItem);
28
+ const indexBegin = props?.data?.map((_i, index) => index * numColumns);
29
+ const _renderItem = (item: any) => {
30
+ if (indexBegin?.includes(item?.index)) {
31
+ return <Item widthSpan={widthItem}>{renderItem?.(item)}</Item>;
32
+ }
33
+ return (
34
+ <View style={{paddingLeft: gutterSize}}>
35
+ <Item widthSpan={widthItem}>{renderItem?.(item)}</Item>
36
+ </View>
37
+ );
38
+ };
39
+
29
40
  return (
30
- <View style={{paddingLeft: gutterSize}}>
31
- <Item widthSpan={widthItem}>{renderItem?.(item)}</Item>
32
- </View>
41
+ <FlatList
42
+ ref={ref as React.RefObject<FlatList>}
43
+ {...props}
44
+ numColumns={numColumns}
45
+ renderItem={_renderItem}
46
+ horizontal={false}
47
+ ItemSeparatorComponent={() => <View style={{height: gutterSize}} />}
48
+ style={[style, styles.protectedStyle]}
49
+ contentContainerStyle={[contentContainerStyle, styles.protectedStyle]}
50
+ />
33
51
  );
34
- };
35
-
36
- return (
37
- <FlatList
38
- {...props}
39
- numColumns={numColumns}
40
- renderItem={_renderItem}
41
- horizontal={false}
42
- ItemSeparatorComponent={() => <View style={{height: gutterSize}} />}
43
- style={[style, styles.protectedStyle]}
44
- contentContainerStyle={[contentContainerStyle, styles.protectedStyle]}
45
- />
46
- );
47
- };
52
+ },
53
+ );
48
54
 
49
55
  export default ItemList;
@@ -107,8 +107,9 @@ const Section: React.FC<SectionProps> = ({
107
107
  if (Array.isArray(children)) {
108
108
  let cursor = 0;
109
109
  let rows: any[] = [];
110
- for (let i = 0; i < children.length; ++i) {
111
- const item = children[i];
110
+ const arrayChild = children.filter(item => !!item);
111
+ for (let i = 0; i < arrayChild.length; ++i) {
112
+ const item = arrayChild[i];
112
113
  const totalSpan = rows
113
114
  .concat([item])
114
115
  .map(i => i.props?.widthSpan)
@@ -124,7 +125,7 @@ const Section: React.FC<SectionProps> = ({
124
125
  rows = [item];
125
126
  }
126
127
 
127
- if (i == children.length - 1) {
128
+ if (i == arrayChild.length - 1) {
128
129
  cursor += 1;
129
130
  element.push(addRowView(rows, cursor, true));
130
131
  }
package/Text/index.tsx CHANGED
@@ -84,6 +84,7 @@ const Text: React.FC<TextProps> = ({
84
84
  }
85
85
 
86
86
  return {
87
+ ...typoStyle,
87
88
  fontFamily,
88
89
  fontSize: scaleSize(fontSize),
89
90
  lineHeight: scaleSize(lineHeight),
@@ -104,7 +105,7 @@ const Text: React.FC<TextProps> = ({
104
105
  };
105
106
 
106
107
  Text.defaultProps = {
107
- typography: 'paragraph_default',
108
+ typography: 'body_default_regular',
108
109
  };
109
110
 
110
111
  export {Text, scaleSize};
package/Text/styles.ts CHANGED
@@ -1,4 +1,42 @@
1
1
  export default {
2
+ headline_default_bold: {fontSize: 24, lineHeight: 32, fontWeight: '700'},
3
+ header_m_bold: {fontSize: 18, lineHeight: 28, fontWeight: '700'},
4
+ header_default_bold: {fontSize: 16, lineHeight: 22, fontWeight: '700'},
5
+ header_s_semibold: {fontSize: 14, lineHeight: 20, fontWeight: '600'},
6
+ header_xs_semibold: {fontSize: 12, lineHeight: 16, fontWeight: '600'},
7
+ body_default_regular: {fontSize: 14, lineHeight: 20, fontWeight: '400'},
8
+ body_default_regularstrikethrought: {
9
+ fontSize: 14,
10
+ lineHeight: 20,
11
+ fontWeight: '400',
12
+ textDecorationLine: 'line-through',
13
+ },
14
+ description_default_regular: {
15
+ fontSize: 12,
16
+ lineHeight: 16,
17
+ fontWeight: '400',
18
+ },
19
+ description_default_regularstrikethrought: {
20
+ fontSize: 12,
21
+ lineHeight: 16,
22
+ fontWeight: '400',
23
+ textDecorationLine: 'line-through',
24
+ },
25
+ description_xs_regular: {fontSize: 10, lineHeight: 14, fontWeight: '400'},
26
+ description_xs_regularstrikethrought: {
27
+ fontSize: 10,
28
+ lineHeight: 14,
29
+ fontWeight: '400',
30
+ textDecorationLine: 'line-through',
31
+ },
32
+ label_default_medium: {fontSize: 14, lineHeight: 20, fontWeight: '500'},
33
+ label_s_medium: {fontSize: 12, lineHeight: 16, fontWeight: '500'},
34
+ label_xs_medium: {fontSize: 10, lineHeight: 14, fontWeight: '500'},
35
+ action_default_bold: {fontSize: 16, lineHeight: 22, fontWeight: '700'},
36
+ action_s_bold: {fontSize: 14, lineHeight: 20, fontWeight: '700'},
37
+ action_xs_bold: {fontSize: 12, lineHeight: 16, fontWeight: '700'},
38
+ action_xxs_bold: {fontSize: 10, lineHeight: 14, fontWeight: '700'},
39
+ /**non-support**/
2
40
  headline_default: {
3
41
  fontSize: 28,
4
42
  lineHeight: 34,
package/Text/types.ts CHANGED
@@ -14,27 +14,21 @@ export type TypographyWeight = {
14
14
  };
15
15
 
16
16
  export type Typography =
17
- | 'headline_default'
18
- | 'headline_s'
19
- | 'headline_l'
20
- | 'headline_xl'
21
- | 'title_default'
22
- | 'title_xs'
23
- | 'title_s'
24
- | 'header_default'
25
- | 'header_xs'
26
- | 'header_s'
27
- | 'paragraph_default'
28
- | 'paragraph_bold'
29
- | 'paragraph_italic'
30
- | 'description_default'
31
- | 'description_xs'
32
- | 'description_s'
33
- | 'label_default'
34
- | 'label_xxs'
35
- | 'label_xs'
36
- | 'label_s'
37
- | 'action_default'
38
- | 'action_xxs'
39
- | 'action_xs'
40
- | 'action_s';
17
+ | 'headline_default_bold'
18
+ | 'header_m_bold'
19
+ | 'header_default_bold'
20
+ | 'header_s_semibold'
21
+ | 'header_xs_semibold'
22
+ | 'body_default_regular'
23
+ | 'body_default_regularstrikethrought'
24
+ | 'description_default_regular'
25
+ | 'description_default_regularstrikethrought'
26
+ | 'description_xs_regular'
27
+ | 'description_xs_regularstrikethrought'
28
+ | 'label_default_medium'
29
+ | 'label_s_medium'
30
+ | 'label_xs_medium'
31
+ | 'action_default_bold'
32
+ | 'action_s_bold'
33
+ | 'action_xs_bold'
34
+ | 'action_xxs_bold';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.81.43-beta.12",
3
+ "version": "0.81.43-beta.17",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {
package/verify.js CHANGED
@@ -27,8 +27,9 @@ try {
27
27
  }
28
28
 
29
29
  if (
30
- miniInfo?.name !== '@momo-platform/momo-core' &&
31
- miniInfo?.resolutions?.['@momo-platform/momo-core'] !== packageInfo?.version
30
+ miniInfo?.dependencies?.['@momo-platform/momo-core'] &&
31
+ miniInfo?.dependencies?.['@momo-platform/momo-core'] !==
32
+ packageInfo?.version
32
33
  ) {
33
34
  console.error(
34
35
  `Package ${packageInfo.name} version: ${packageInfo.version} require install resolutions @momo-platform/momo-core ${packageInfo.version}`,