@react-native-oh/react-native-harmony 0.72.23 → 0.72.27

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 (44) hide show
  1. package/Libraries/Alert/Alert.harmony.js +71 -71
  2. package/Libraries/Alert/AlertManager.ts +35 -35
  3. package/Libraries/Animated/NativeAnimatedHelper.harmony.js +601 -601
  4. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.harmony.js +445 -426
  5. package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.harmony.js +30 -0
  6. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.harmony.js +26 -0
  7. package/Libraries/Components/Button/Button.harmony.js +450 -450
  8. package/Libraries/Components/Image/Image.flow.harmony.js +53 -0
  9. package/Libraries/Components/Image/Image.harmony.js +299 -0
  10. package/Libraries/Components/Image/NativeImageLoaderHarmony.js +38 -0
  11. package/Libraries/Components/RefreshControl/RefreshControl.harmony.js +210 -208
  12. package/Libraries/Components/SafeAreaView/SafeAreaView.harmony.tsx +76 -75
  13. package/Libraries/Components/ScrollView/ScrollView.harmony.js +1951 -1930
  14. package/Libraries/Components/ScrollView/processDecelerationRate.harmony.js +24 -24
  15. package/Libraries/Components/StatusBar/NativeStatusBarManagerHarmony.js +71 -68
  16. package/Libraries/Components/StatusBar/StatusBar.harmony.js +447 -447
  17. package/Libraries/Components/TextInput/TextInput.harmony.js +1707 -1697
  18. package/Libraries/Components/TextInput/TextInputState.harmony.js +220 -220
  19. package/Libraries/Components/Touchable/TouchableHighlight.harmony.js +396 -396
  20. package/Libraries/Components/Touchable/TouchableNativeFeedback.harmony.js +364 -364
  21. package/Libraries/Components/Touchable/TouchableWithoutFeedback.harmony.js +227 -227
  22. package/Libraries/Components/View/View.harmony.js +149 -149
  23. package/Libraries/Core/setUpReactDevTools.harmony.js +93 -93
  24. package/Libraries/Image/AssetSourceResolver.harmony.ts +78 -78
  25. package/Libraries/NativeComponent/BaseViewConfig.harmony.js +337 -337
  26. package/Libraries/ReactNative/UIManager.harmony.js +210 -210
  27. package/Libraries/Settings/Settings.harmony.js +15 -15
  28. package/Libraries/Share/Share.harmony.js +174 -0
  29. package/Libraries/StyleSheet/NativePlatformColor.ts +8 -8
  30. package/Libraries/StyleSheet/PlatformColorValueTypes.harmony.ts +14 -14
  31. package/Libraries/Utilities/BackHandler.harmony.js +109 -109
  32. package/Libraries/Utilities/{NativePlatformConstantsHarmony.ts → NativePlatformConstants.harmony.ts} +8 -8
  33. package/Libraries/Utilities/Platform.d.ts +117 -117
  34. package/Libraries/Utilities/Platform.harmony.ts +33 -33
  35. package/Libraries/Utilities/createPerformanceLogger.harmony.js +328 -328
  36. package/Libraries/Vibration/Vibration.harmony.js +88 -88
  37. package/index.js +212 -202
  38. package/jest.config.js +5 -5
  39. package/metro.config.js +348 -349
  40. package/package.json +58 -55
  41. package/react-native.config.js +10 -10
  42. package/{rnoh-4.1.0.404-vmall.har → react_native_openharmony.har} +0 -0
  43. package/tsconfig.json +13 -13
  44. package/types/index.d.ts +101 -101
@@ -1,24 +1,24 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- * @flow strict-local
9
- */
10
-
11
- //RNOH patch - fix return values for Platform.OS = ios
12
-
13
- function processDecelerationRate(
14
- decelerationRate: number | "normal" | "fast"
15
- ): number {
16
- if (decelerationRate === "normal") {
17
- return 0.998;
18
- } else if (decelerationRate === "fast") {
19
- return 0.99;
20
- }
21
- return decelerationRate;
22
- }
23
-
24
- module.exports = processDecelerationRate;
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ * @flow strict-local
9
+ */
10
+
11
+ //RNOH patch - fix return values for Platform.OS = ios
12
+
13
+ function processDecelerationRate(
14
+ decelerationRate: number | "normal" | "fast"
15
+ ): number {
16
+ if (decelerationRate === "normal") {
17
+ return 0.998;
18
+ } else if (decelerationRate === "fast") {
19
+ return 0.99;
20
+ }
21
+ return decelerationRate;
22
+ }
23
+
24
+ module.exports = processDecelerationRate;
@@ -1,68 +1,71 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict
8
- * @format
9
- */
10
-
11
- import type { TurboModule } from "react-native/Libraries/TurboModule/RCTExport";
12
-
13
- import * as TurboModuleRegistry from "react-native/Libraries/TurboModule/TurboModuleRegistry";
14
-
15
- export interface Spec extends TurboModule {
16
- +getConstants: () => {|
17
- +HEIGHT: number,
18
- +DEFAULT_BACKGROUND_COLOR: number,
19
- |};
20
- +setColor: (color: string) => void;
21
- +setTranslucent: (translucent: boolean) => void;
22
-
23
- /**
24
- * - statusBarStyles can be:
25
- * - 'default'
26
- * - 'dark-content'
27
- */
28
- +setStyle: (statusBarStyle?: ?string) => void;
29
- +setHidden: (hidden: boolean) => void;
30
- }
31
-
32
- const NativeModule = TurboModuleRegistry.getEnforcing<Spec>("StatusBarManager");
33
- let constants = null;
34
-
35
- const NativeStatusBarManager = {
36
- getConstants(): {|
37
- +HEIGHT: number,
38
- +DEFAULT_BACKGROUND_COLOR?: number,
39
- |} {
40
- if (constants == null) {
41
- constants = NativeModule.getConstants();
42
- }
43
- return constants;
44
- },
45
-
46
- setColor(color: number): void {
47
- NativeModule.setColor(color);
48
- },
49
-
50
- setTranslucent(translucent: boolean): void {
51
- NativeModule.setTranslucent(translucent);
52
- },
53
-
54
- /**
55
- * - statusBarStyles can be:
56
- * - 'default'
57
- * - 'dark-content'
58
- */
59
- setStyle(statusBarStyle?: ?string): void {
60
- NativeModule.setStyle(statusBarStyle);
61
- },
62
-
63
- setHidden(hidden: boolean): void {
64
- NativeModule.setHidden(hidden);
65
- },
66
- };
67
-
68
- export default NativeStatusBarManager;
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict
8
+ * @format
9
+ */
10
+
11
+ import type { TurboModule } from "react-native/Libraries/TurboModule/RCTExport";
12
+
13
+ import * as TurboModuleRegistry from "react-native/Libraries/TurboModule/TurboModuleRegistry";
14
+
15
+ export interface Spec extends TurboModule {
16
+ +getConstants: () => {|
17
+ +HEIGHT: number,
18
+ +DEFAULT_BACKGROUND_COLOR: number,
19
+ |};
20
+ +setColor: (color: string, animated: boolean) => void;
21
+ +setTranslucent: (translucent: boolean) => void;
22
+
23
+ /**
24
+ * - statusBarStyles can be:
25
+ * - 'default'
26
+ * - 'dark-content'
27
+ */
28
+ +setStyle: (statusBarStyle?: ?string, animated: boolean) => void;
29
+ /**
30
+ * - withAnimation can be: 'none' | 'slide'
31
+ */
32
+ +setHidden: (hidden: boolean, withAnimation: string) => void;
33
+ }
34
+
35
+ const NativeModule = TurboModuleRegistry.getEnforcing<Spec>("StatusBarManager");
36
+ let constants = null;
37
+
38
+ const NativeStatusBarManager = {
39
+ getConstants(): {|
40
+ +HEIGHT: number,
41
+ +DEFAULT_BACKGROUND_COLOR?: number,
42
+ |} {
43
+ if (constants == null) {
44
+ constants = NativeModule.getConstants();
45
+ }
46
+ return constants;
47
+ },
48
+
49
+ setColor(color: number, animated: boolean): void {
50
+ NativeModule.setColor(color, animated);
51
+ },
52
+
53
+ setTranslucent(translucent: boolean): void {
54
+ NativeModule.setTranslucent(translucent);
55
+ },
56
+
57
+ /**
58
+ * - statusBarStyles can be:
59
+ * - 'default'
60
+ * - 'dark-content'
61
+ */
62
+ setStyle(statusBarStyle?: ?string, animated: boolean): void {
63
+ NativeModule.setStyle(statusBarStyle, animated);
64
+ },
65
+
66
+ setHidden(hidden: boolean, withAnimation: string): void {
67
+ NativeModule.setHidden(hidden, withAnimation);
68
+ },
69
+ };
70
+
71
+ export default NativeStatusBarManager;