@momo-kits/foundation 0.160.1-beta.2 → 0.160.1-beta.5

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.
@@ -1,7 +1,6 @@
1
1
  import React, { useContext, useRef, useState } from 'react';
2
2
  import { SafeAreaProvider } from 'react-native-safe-area-context';
3
3
  import Navigator from './Navigator';
4
- import ScaleSizeProvider from './ScaleSizeProvider';
5
4
  import { WidgetContainerProps } from './types';
6
5
  import { ApplicationContext, MiniAppContext } from '../Context';
7
6
  import Localize from './Localize';
@@ -74,12 +73,9 @@ const WidgetContainer: React.FC<WidgetContainerProps> = ({
74
73
  };
75
74
 
76
75
  return (
77
- <View style={{ height: height ?? '100%', minHeight:1 }}>
76
+ <View style={{ height: height ?? '100%', minHeight: 1 }}>
78
77
  <SafeAreaProvider>
79
78
  <MiniAppContext.Provider value={mergedContext}>
80
- <ScaleSizeProvider
81
- scaleSizeMaxRate={mergedContext?.scaleSizeMaxRate}
82
- >
83
79
  <ApplicationContext.Provider
84
80
  value={{
85
81
  navigator: navigator.current,
@@ -157,7 +153,6 @@ const WidgetContainer: React.FC<WidgetContainerProps> = ({
157
153
  </ReactNavigationContainer>
158
154
  </NavigationIndependentTree>
159
155
  </ApplicationContext.Provider>
160
- </ScaleSizeProvider>
161
156
  </MiniAppContext.Provider>
162
157
  </SafeAreaProvider>
163
158
  </View>
@@ -16,7 +16,6 @@ export * from './Components/SearchHeader';
16
16
  import { exportHeaderTitle, setAutomationID, useComponentId } from './utils';
17
17
  import Navigation from './Navigation';
18
18
  import Navigator from './Navigator';
19
- import ScaleSizeProvider from './ScaleSizeProvider';
20
19
  import { useTooltipPortal } from './TooltipPortal';
21
20
 
22
21
  export {
@@ -29,6 +28,5 @@ export {
29
28
  Navigation,
30
29
  Navigator,
31
30
  exportHeaderTitle,
32
- ScaleSizeProvider,
33
31
  useTooltipPortal,
34
32
  };
@@ -107,11 +107,6 @@ export type Theme = {
107
107
  };
108
108
  };
109
109
 
110
- export type ScaleSizeProviderProps = {
111
- scaleSizeMaxRate?: number;
112
- children: ViewProps['children'];
113
- };
114
-
115
110
  export type Context = {
116
111
  [key: string]: any;
117
112
  theme: Theme;
package/Text/utils.ts CHANGED
@@ -9,7 +9,7 @@ const MAX_FONT_SCALE = 1.2;
9
9
  const useScaleSize = (size: number) => {
10
10
  const { width } = useWindowDimensions();
11
11
  const context = useContext<any>(MiniAppContext);
12
- const allowFontScale = context?.designSystemConfig?.allowFontScale ?? true;
12
+ const allowFontScale = context?.designSystemConfig?.isBaselineEnabled;
13
13
  if (!allowFontScale) return size;
14
14
 
15
15
  const deviceScale = width / DEFAULT_SCREEN_SIZE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.160.1-beta.2",
3
+ "version": "0.160.1-beta.5",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},