@react-native-oh/react-native-harmony 0.72.86 → 0.77.18
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/LICENSE +21 -0
- package/LICENSE-Meta +21 -0
- package/Libraries/Alert/delegates/AlertDelegate.harmony.ts +84 -0
- package/Libraries/Alert/{AlertManager.ts → delegates/AlertManager.harmony.ts} +10 -4
- package/Libraries/Animated/shouldUseTurboAnimatedModule.harmony.ts +10 -0
- package/Libraries/Components/AccessibilityInfo/delegates/AccessibilityInfoDelegate.harmony.ts +44 -0
- package/Libraries/Components/AccessibilityInfo/{NativeAccessibilityInfoHarmony.ts → delegates/NativeAccessibilityInfoHarmony.harmony.ts} +9 -2
- package/Libraries/Components/Keyboard/delegates/KeyboardAvoidingViewDelegate.harmony.ts +42 -0
- package/Libraries/Components/RefreshControl/delegates/RefreshControlDelegate.harmony.tsx +29 -0
- package/Libraries/Components/SafeAreaView/SafeAreaView.harmony.tsx +93 -31
- package/Libraries/Components/ScrollView/delegates/ScrollViewDelegate.harmony.tsx +41 -0
- package/Libraries/Components/ScrollView/delegates/ScrollViewNativeComponentDelegate.harmony.ts +89 -0
- package/Libraries/Components/ScrollView/processDecelerationRate.harmony.ts +19 -0
- package/Libraries/Components/StatusBar/delegates/NativeStatusBarManagerHarmony.harmony.ts +53 -0
- package/Libraries/Components/StatusBar/delegates/StatusBarDelegate.harmony.ts +83 -0
- package/Libraries/Components/TextInput/delegates/TextInputDelegate.harmony.tsx +98 -0
- package/Libraries/Components/TextInput/delegates/TextInputStateDelegate.harmony.tsx +20 -0
- package/Libraries/Components/Touchable/delegates/TouchableHighlightDelegate.harmony.ts +14 -0
- package/Libraries/Components/Touchable/delegates/TouchableNativeFeedbackDelegate.harmony.ts +14 -0
- package/Libraries/Components/Touchable/delegates/TouchableWithoutFeedbackDelegate.harmony.ts +14 -0
- package/Libraries/Components/delegates/ButtonDelegate.harmony.ts +41 -0
- package/Libraries/Core/setUpPlatform.harmony.js +30 -0
- package/Libraries/Image/AssetSourceResolver.harmony.ts +1 -5
- package/Libraries/Image/Image.harmony.ts +17 -0
- package/Libraries/NativeComponent/BaseViewConfig.harmony.js +12 -326
- package/Libraries/NativeComponent/delegates/ViewConfigIgnoreDelegate.harmony.ts +13 -0
- package/Libraries/ReactNative/delegates/BridgelessUIManagerDelegate.harmony.ts +14 -0
- package/Libraries/ReactNative/delegates/I18nManagerDelegate.harmony.ts +22 -0
- package/Libraries/Settings/Settings.harmony.ts +20 -0
- package/Libraries/Share/delegates/ShareDelegate.harmony.ts +42 -0
- package/Libraries/StyleSheet/NativePlatformColor.harmony.ts +15 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.harmony.ts +8 -1
- package/Libraries/Utilities/BackHandler.harmony.ts +10 -0
- package/Libraries/Utilities/NativePlatformConstantsHarmony.harmony.ts +17 -0
- package/Libraries/Utilities/Platform.harmony.ts +38 -13
- package/Libraries/Vibration/delegates/VibrationDelegate.harmony.ts +14 -0
- package/NOTICE.md +846 -0
- package/README.md +2 -2
- package/index.js +53 -63
- package/jest.config.js +0 -7
- package/metro.config.d.ts +17 -0
- package/metro.config.js +398 -115
- package/package.json +58 -37
- package/react-native.config.js +57 -9
- package/react_native_openharmony.har +0 -0
- package/tsconfig.json +10 -4
- package/types/index.harmony.d.ts +99 -0
- package/Libraries/Alert/Alert.harmony.js +0 -77
- package/Libraries/Animated/NativeAnimatedHelper.harmony.js +0 -601
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.harmony.js +0 -441
- package/Libraries/Components/Button/Button.harmony.js +0 -451
- package/Libraries/Components/Image/Image.flow.harmony.js +0 -53
- package/Libraries/Components/Image/Image.harmony.js +0 -317
- package/Libraries/Components/Image/NativeImageLoaderHarmony.js +0 -38
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.harmony.js +0 -256
- package/Libraries/Components/RefreshControl/RefreshControl.harmony.js +0 -210
- package/Libraries/Components/ScrollView/ScrollView.harmony.js +0 -1951
- package/Libraries/Components/ScrollView/processDecelerationRate.harmony.js +0 -24
- package/Libraries/Components/StatusBar/NativeStatusBarManagerHarmony.js +0 -71
- package/Libraries/Components/StatusBar/StatusBar.harmony.js +0 -447
- package/Libraries/Components/TextInput/TextInput.harmony.js +0 -1716
- package/Libraries/Components/TextInput/TextInputState.harmony.js +0 -220
- package/Libraries/Components/Touchable/TouchableHighlight.harmony.js +0 -396
- package/Libraries/Components/Touchable/TouchableNativeFeedback.harmony.js +0 -364
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.harmony.js +0 -227
- package/Libraries/Components/View/View.harmony.js +0 -149
- package/Libraries/Core/setUpReactDevTools.harmony.js +0 -93
- package/Libraries/ReactNative/I18nManager.harmony.js +0 -78
- package/Libraries/ReactNative/UIManager.harmony.js +0 -210
- package/Libraries/Settings/Settings.harmony.js +0 -15
- package/Libraries/Share/Share.harmony.js +0 -174
- package/Libraries/StyleSheet/NativePlatformColor.ts +0 -8
- package/Libraries/Utilities/BackHandler.harmony.js +0 -109
- package/Libraries/Utilities/NativePlatformConstants.harmony.ts +0 -8
- package/Libraries/Utilities/Platform.d.ts +0 -117
- package/Libraries/Utilities/createPerformanceLogger.harmony.js +0 -328
- package/Libraries/Vibration/Vibration.harmony.js +0 -88
- package/harmony/.keep +0 -0
- package/harmony/rnoh-hvigor-plugin-0.2.0.tgz +0 -0
- package/react_native_openharmony_release.har +0 -0
- package/types/index.d.ts +0 -108
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@ Please refer to: [RNOH repo](https://gitcode.com/openharmony-sig/ohos_react_nati
|
|
|
4
4
|
|
|
5
5
|
# Documentation
|
|
6
6
|
|
|
7
|
-
- [中文](https://gitcode.com/openharmony-sig/ohos_react_native/blob/
|
|
8
|
-
- [English](https://gitcode.com/openharmony-sig/ohos_react_native/blob/
|
|
7
|
+
- [中文](https://gitcode.com/openharmony-sig/ohos_react_native/blob/0.77.1-rc.1-ohos/docs/zh-cn/README.md)
|
|
8
|
+
- [English](https://gitcode.com/openharmony-sig/ohos_react_native/blob/0.77.1-rc.1-ohos/docs/en/README.md)
|
|
9
9
|
|
|
10
10
|
# License
|
|
11
11
|
|
package/index.js
CHANGED
|
@@ -1,100 +1,90 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE-MIT file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
1
|
module.exports = {
|
|
9
2
|
get AccessibilityInfo() {
|
|
10
3
|
return require('./Libraries/Components/AccessibilityInfo/AccessibilityInfo')
|
|
11
4
|
.default;
|
|
12
5
|
},
|
|
13
6
|
get ActivityIndicator() {
|
|
14
|
-
return require('
|
|
7
|
+
return require('./Libraries/Components/ActivityIndicator/ActivityIndicator')
|
|
15
8
|
.default;
|
|
16
9
|
},
|
|
17
10
|
get Alert() {
|
|
18
|
-
return require('./Libraries/Alert/Alert
|
|
11
|
+
return require('./Libraries/Alert/Alert');
|
|
19
12
|
},
|
|
20
13
|
get Animated() {
|
|
21
|
-
return require('
|
|
14
|
+
return require('./Libraries/Animated/Animated').default;
|
|
22
15
|
},
|
|
23
16
|
get Appearance() {
|
|
24
|
-
return require('
|
|
17
|
+
return require('./Libraries/Utilities/Appearance');
|
|
25
18
|
},
|
|
26
19
|
get AppRegistry() {
|
|
27
|
-
return require('
|
|
20
|
+
return require('./Libraries/ReactNative/AppRegistry');
|
|
28
21
|
},
|
|
29
22
|
get AppState() {
|
|
30
|
-
return require('
|
|
23
|
+
return require('./Libraries/AppState/AppState');
|
|
31
24
|
},
|
|
32
25
|
get BackHandler() {
|
|
33
|
-
return require('./Libraries/Utilities/BackHandler');
|
|
26
|
+
return require('./Libraries/Utilities/BackHandler').default;
|
|
34
27
|
},
|
|
35
28
|
get Button() {
|
|
36
|
-
return require('./Libraries/Components/Button
|
|
29
|
+
return require('./Libraries/Components/Button').default;
|
|
37
30
|
},
|
|
38
31
|
get DevSettings() {
|
|
39
|
-
return require('
|
|
32
|
+
return require('./Libraries/Utilities/DevSettings');
|
|
40
33
|
},
|
|
41
34
|
get Dimensions() {
|
|
42
|
-
return require('
|
|
35
|
+
return require('./Libraries/Utilities/Dimensions').default;
|
|
43
36
|
},
|
|
44
37
|
get DeviceEventEmitter() {
|
|
45
|
-
return require('
|
|
46
|
-
.default;
|
|
38
|
+
return require('./Libraries/EventEmitter/RCTDeviceEventEmitter').default;
|
|
47
39
|
},
|
|
48
40
|
get DrawerLayoutAndroid() {
|
|
49
|
-
return require('
|
|
41
|
+
return require('./Libraries/Components/DrawerAndroid/DrawerLayoutAndroid');
|
|
50
42
|
},
|
|
51
43
|
get Easing() {
|
|
52
|
-
return require('
|
|
44
|
+
return require('./Libraries/Animated/Easing').default;
|
|
53
45
|
},
|
|
54
46
|
get findNodeHandle() {
|
|
55
|
-
return require('
|
|
56
|
-
.findNodeHandle;
|
|
47
|
+
return require('./Libraries/ReactNative/RendererProxy').findNodeHandle;
|
|
57
48
|
},
|
|
58
49
|
get FlatList() {
|
|
59
|
-
return require('
|
|
50
|
+
return require('./Libraries/Lists/FlatList');
|
|
60
51
|
},
|
|
61
52
|
get Image() {
|
|
62
|
-
return require('./Libraries/
|
|
53
|
+
return require('./Libraries/Image/Image').default;
|
|
63
54
|
},
|
|
64
55
|
get ImageBackground() {
|
|
65
|
-
return require('
|
|
56
|
+
return require('./Libraries/Image/ImageBackground');
|
|
66
57
|
},
|
|
67
58
|
get I18nManager() {
|
|
68
59
|
return require('./Libraries/ReactNative/I18nManager');
|
|
69
60
|
},
|
|
70
61
|
get LayoutAnimation() {
|
|
71
|
-
return require('
|
|
62
|
+
return require('./Libraries/LayoutAnimation/LayoutAnimation');
|
|
72
63
|
},
|
|
73
64
|
get Linking() {
|
|
74
|
-
return require('
|
|
65
|
+
return require('./Libraries/Linking/Linking');
|
|
75
66
|
},
|
|
76
67
|
get LogBox() {
|
|
77
|
-
return require('
|
|
68
|
+
return require('./Libraries/LogBox/LogBox').default;
|
|
78
69
|
},
|
|
79
70
|
get Modal() {
|
|
80
|
-
return require('
|
|
71
|
+
return require('./Libraries/Modal/Modal');
|
|
81
72
|
},
|
|
82
73
|
get Keyboard() {
|
|
83
|
-
return require('
|
|
74
|
+
return require('./Libraries/Components/Keyboard/Keyboard');
|
|
84
75
|
},
|
|
85
76
|
get KeyboardAvoidingView() {
|
|
86
77
|
return require('./Libraries/Components/Keyboard/KeyboardAvoidingView')
|
|
87
78
|
.default;
|
|
88
79
|
},
|
|
89
80
|
get NativeEventEmitter() {
|
|
90
|
-
return require('
|
|
91
|
-
.default;
|
|
81
|
+
return require('./Libraries/EventEmitter/NativeEventEmitter').default;
|
|
92
82
|
},
|
|
93
83
|
get NativeModules() {
|
|
94
|
-
return require('
|
|
84
|
+
return require('./Libraries/BatchedBridge/NativeModules');
|
|
95
85
|
},
|
|
96
86
|
get PixelRatio() {
|
|
97
|
-
return require('
|
|
87
|
+
return require('./Libraries/Utilities/PixelRatio').default;
|
|
98
88
|
},
|
|
99
89
|
get Platform() {
|
|
100
90
|
return require('./Libraries/Utilities/Platform');
|
|
@@ -104,22 +94,23 @@ module.exports = {
|
|
|
104
94
|
.PlatformColor;
|
|
105
95
|
},
|
|
106
96
|
get Pressable() {
|
|
107
|
-
return require('
|
|
108
|
-
.default;
|
|
97
|
+
return require('./Libraries/Components/Pressable/Pressable').default;
|
|
109
98
|
},
|
|
110
99
|
get RefreshControl() {
|
|
111
100
|
return require('./Libraries/Components/RefreshControl/RefreshControl');
|
|
112
101
|
},
|
|
113
102
|
get requireNativeComponent() {
|
|
114
|
-
return require('
|
|
115
|
-
.default;
|
|
103
|
+
return require('./Libraries/ReactNative/requireNativeComponent').default;
|
|
116
104
|
},
|
|
117
105
|
get RootTagContext() {
|
|
118
|
-
return require('
|
|
106
|
+
return require('./Libraries/ReactNative/RootTag').RootTagContext;
|
|
119
107
|
},
|
|
120
108
|
get SafeAreaView() {
|
|
121
109
|
return require('./Libraries/Components/SafeAreaView/SafeAreaView').default;
|
|
122
110
|
},
|
|
111
|
+
get Settings() {
|
|
112
|
+
return require('./Libraries/Settings/Settings').default;
|
|
113
|
+
},
|
|
123
114
|
get Share() {
|
|
124
115
|
return require('./Libraries/Share/Share');
|
|
125
116
|
},
|
|
@@ -127,28 +118,28 @@ module.exports = {
|
|
|
127
118
|
return require('./Libraries/Components/ScrollView/ScrollView');
|
|
128
119
|
},
|
|
129
120
|
get StatusBar() {
|
|
130
|
-
return require('./Libraries/Components/StatusBar/StatusBar
|
|
121
|
+
return require('./Libraries/Components/StatusBar/StatusBar');
|
|
131
122
|
},
|
|
132
123
|
get StyleSheet() {
|
|
133
|
-
return require('
|
|
124
|
+
return require('./Libraries/StyleSheet/StyleSheet');
|
|
134
125
|
},
|
|
135
126
|
get Switch() {
|
|
136
|
-
return require('
|
|
127
|
+
return require('./Libraries/Components/Switch/Switch').default;
|
|
137
128
|
},
|
|
138
129
|
get Systrace() {
|
|
139
|
-
return require('
|
|
130
|
+
return require('./Libraries/Performance/Systrace');
|
|
140
131
|
},
|
|
141
132
|
get Text() {
|
|
142
|
-
return require('
|
|
133
|
+
return require('./Libraries/Text/Text');
|
|
143
134
|
},
|
|
144
135
|
get TextInput() {
|
|
145
|
-
return require('./Libraries/Components/TextInput/TextInput
|
|
136
|
+
return require('./Libraries/Components/TextInput/TextInput');
|
|
146
137
|
},
|
|
147
138
|
get ToastAndroid() {
|
|
148
|
-
return require('
|
|
139
|
+
return require('./Libraries/Components/ToastAndroid/ToastAndroid.android');
|
|
149
140
|
},
|
|
150
141
|
get Touchable() {
|
|
151
|
-
return require('
|
|
142
|
+
return require('./Libraries/Components/Touchable/Touchable').default;
|
|
152
143
|
},
|
|
153
144
|
get TouchableHighlight() {
|
|
154
145
|
return require('./Libraries/Components/Touchable/TouchableHighlight');
|
|
@@ -157,62 +148,61 @@ module.exports = {
|
|
|
157
148
|
return require('./Libraries/Components/Touchable/TouchableNativeFeedback');
|
|
158
149
|
},
|
|
159
150
|
get TouchableOpacity() {
|
|
160
|
-
return require('
|
|
151
|
+
return require('./Libraries/Components/Touchable/TouchableOpacity');
|
|
161
152
|
},
|
|
162
153
|
get TouchableWithoutFeedback() {
|
|
163
154
|
return require('./Libraries/Components/Touchable/TouchableWithoutFeedback');
|
|
164
155
|
},
|
|
165
156
|
get TurboModuleRegistry() {
|
|
166
|
-
return require('
|
|
157
|
+
return require('./Libraries/TurboModule/TurboModuleRegistry');
|
|
167
158
|
},
|
|
168
159
|
get UIManager() {
|
|
169
160
|
return require('./Libraries/ReactNative/UIManager');
|
|
170
161
|
},
|
|
171
162
|
get unstable_batchedUpdates() {
|
|
172
|
-
return require('
|
|
163
|
+
return require('./Libraries/ReactNative/RendererProxy')
|
|
173
164
|
.unstable_batchedUpdates;
|
|
174
165
|
},
|
|
175
166
|
get useAnimatedValue() {
|
|
176
|
-
return require('
|
|
167
|
+
return require('./Libraries/Animated/useAnimatedValue').default;
|
|
177
168
|
},
|
|
178
169
|
get useColorScheme() {
|
|
179
|
-
return require('
|
|
170
|
+
return require('./Libraries/Utilities/useColorScheme').default;
|
|
180
171
|
},
|
|
181
172
|
get useWindowDimensions() {
|
|
182
|
-
return require('
|
|
183
|
-
.default;
|
|
173
|
+
return require('./Libraries/Utilities/useWindowDimensions').default;
|
|
184
174
|
},
|
|
185
175
|
get View() {
|
|
186
176
|
return require('./Libraries/Components/View/View');
|
|
187
177
|
},
|
|
188
178
|
get InteractionManager() {
|
|
189
|
-
return require('
|
|
179
|
+
return require('./Libraries/Interaction/InteractionManager');
|
|
190
180
|
},
|
|
191
181
|
get PanResponder() {
|
|
192
|
-
return require('
|
|
182
|
+
return require('./Libraries/Interaction/PanResponder').default;
|
|
193
183
|
},
|
|
194
184
|
get processColor() {
|
|
195
|
-
return require('
|
|
185
|
+
return require('./Libraries/StyleSheet/processColor').default;
|
|
196
186
|
},
|
|
197
187
|
get SectionList() {
|
|
198
|
-
return require('
|
|
188
|
+
return require('./Libraries/Lists/SectionList').default;
|
|
199
189
|
},
|
|
200
190
|
get Vibration() {
|
|
201
191
|
return require('./Libraries/Vibration/Vibration');
|
|
202
192
|
},
|
|
203
193
|
get VirtualizedList() {
|
|
204
|
-
return require('
|
|
194
|
+
return require('./Libraries/Lists/VirtualizedList');
|
|
205
195
|
},
|
|
206
196
|
// BEGIN: react-native-harmony specific exports
|
|
207
197
|
get registerViewConfig() {
|
|
208
|
-
return require('
|
|
198
|
+
return require('./Libraries/Renderer/shims/ReactNativeViewConfigRegistry')
|
|
209
199
|
.register;
|
|
210
200
|
},
|
|
211
201
|
get ReactNativeViewAttributes() {
|
|
212
|
-
return require('
|
|
202
|
+
return require('./Libraries/Components/View/ReactNativeViewAttributes');
|
|
213
203
|
},
|
|
214
204
|
get dispatchCommand() {
|
|
215
|
-
return require('
|
|
205
|
+
return require('./Libraries/Renderer/shims/ReactNative').default
|
|
216
206
|
.dispatchCommand;
|
|
217
207
|
},
|
|
218
208
|
// END: react-native-harmony specific exports
|
package/jest.config.js
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2024 Huawei Technologies Co., Ltd.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE-MIT file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
1
|
/** @type {import('ts-jest').JestConfigWithTsJest} */
|
|
9
2
|
module.exports = {
|
|
10
3
|
preset: 'ts-jest',
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { InputConfigT } from '@react-native/metro-config';
|
|
2
|
+
|
|
3
|
+
interface HarmonyMetroConfigOptions {
|
|
4
|
+
reactNativeHarmonyPackageName?: string;
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
__reactNativeHarmonyPattern?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
__reactNativeInteropLibraryPackagePattern?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function createHarmonyMetroConfig(
|
|
16
|
+
options?: HarmonyMetroConfigOptions
|
|
17
|
+
): InputConfigT;
|