@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.
- package/Application/WidgetContainer.tsx +1 -6
- package/Application/index.ts +0 -2
- package/Application/types.ts +0 -5
- package/Text/utils.ts +1 -1
- package/package.json +1 -1
|
@@ -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>
|
package/Application/index.ts
CHANGED
|
@@ -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
|
};
|
package/Application/types.ts
CHANGED
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?.
|
|
12
|
+
const allowFontScale = context?.designSystemConfig?.isBaselineEnabled;
|
|
13
13
|
if (!allowFontScale) return size;
|
|
14
14
|
|
|
15
15
|
const deviceScale = width / DEFAULT_SCREEN_SIZE;
|