@expo-harmony/expo-router 55.0.16-harmony.1
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/README.md +45 -0
- package/index.d.ts +1 -0
- package/index.js +3 -0
- package/package.json +114 -0
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# @expo-harmony/expo-router
|
|
2
|
+
|
|
3
|
+
[**GitHub 仓库**](https://github.com/renbaoshuo/expo-harmony/tree/master/packages/expo-router)
|
|
4
|
+
|
|
5
|
+
为 HarmonyOS 上的 React Native 应用提供 Expo Router 的原生集成载体,组合 Linking、Screens 和 Safe Area,并支持按需接入 Gesture Handler、Reanimated 和 Worklets,与官方同版本的 expo-router 配套使用。
|
|
6
|
+
|
|
7
|
+
安装官方 Expo Router 和 HarmonyOS 集成包:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install expo-router @expo-harmony/expo-router
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
应用入口继续使用官方 `expo-router/entry`,业务代码也应始终从 `expo-router` 导入,不要直接导入 `@expo-harmony/expo-router`:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"main": "expo-router/entry"
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
在 `app.json` 中注册官方 `expo-router` Config Plugin。使用 Expo Harmony 预构建时,应将 `@expo-harmony/prebuild-config` 放在其他 Config Plugin 之后:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"expo": {
|
|
26
|
+
"scheme": "example",
|
|
27
|
+
"plugins": [
|
|
28
|
+
"expo-router",
|
|
29
|
+
"@expo-harmony/prebuild-config"
|
|
30
|
+
],
|
|
31
|
+
"harmony": {
|
|
32
|
+
"bundleName": "com.example.app"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`@expo-harmony/expo-router` 不提供独立的 Config Plugin;安装该包即表示启用 HarmonyOS 原生集成。如果应用需要手势或动画能力,还需同时安装对应的官方 JavaScript 包和匹配版本的 `@react-native-ohos/react-native-gesture-handler`、`@react-native-ohos/react-native-reanimated`、`@react-native-ohos/react-native-worklets` 原生产物。
|
|
39
|
+
|
|
40
|
+
## Author
|
|
41
|
+
|
|
42
|
+
**expo-harmony** © [Baoshuo](https://github.com/renbaoshuo), Released under the MIT License.<br>
|
|
43
|
+
Authored and maintained by Baoshuo with help from [contributors](https://github.com/renbaoshuo/expo-harmony/contributors).
|
|
44
|
+
|
|
45
|
+
> [Personal Website](https://baoshuo.ren) · [Blog](https://blog.baoshuo.ren) · GitHub [@renbaoshuo](https://github.com/renbaoshuo) · Twitter [@baoshuo](https://twitter.com/baoshuo)
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@expo-harmony/expo-router",
|
|
3
|
+
"version": "55.0.16-harmony.1",
|
|
4
|
+
"description": "HarmonyOS port of expo-router",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react-native",
|
|
7
|
+
"expo",
|
|
8
|
+
"expo-harmony",
|
|
9
|
+
"harmonyos"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/renbaoshuo/expo-harmony/tree/master/packages/expo-router#readme",
|
|
12
|
+
"bugs": "https://github.com/renbaoshuo/expo-harmony/issues",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Baoshuo <i@baoshuo.ren>",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/renbaoshuo/expo-harmony.git",
|
|
18
|
+
"directory": "packages/expo-router"
|
|
19
|
+
},
|
|
20
|
+
"main": "index.js",
|
|
21
|
+
"types": "index.d.ts",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@expo-harmony/expo-linking": "55.0.16-harmony.1",
|
|
24
|
+
"@react-native-ohos/react-native-safe-area-context": "5.6.3",
|
|
25
|
+
"@react-native-ohos/react-native-screens": "https://raw.atomgit.com/baoshuo/rntpc_react-native-screens/blobs/b9139c34288098501987574752912021df9997e0/react-native-ohos-react-native-screens-4.26.2-rnoh084.0.tgz"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@react-native-ohos/react-native-gesture-handler": "2.30.1",
|
|
29
|
+
"@react-native-ohos/react-native-reanimated": "4.0.2-beta.1",
|
|
30
|
+
"@react-native-ohos/react-native-worklets": "1.0.0",
|
|
31
|
+
"expo-router": "55.0.16"
|
|
32
|
+
},
|
|
33
|
+
"peerDependenciesMeta": {
|
|
34
|
+
"@react-native-ohos/react-native-gesture-handler": {
|
|
35
|
+
"optional": true
|
|
36
|
+
},
|
|
37
|
+
"@react-native-ohos/react-native-reanimated": {
|
|
38
|
+
"optional": true
|
|
39
|
+
},
|
|
40
|
+
"@react-native-ohos/react-native-worklets": {
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@babel/core": "7.29.7",
|
|
46
|
+
"@react-native-oh/react-native-harmony": "0.84.1",
|
|
47
|
+
"react": "19.2.3",
|
|
48
|
+
"react-native": "0.84.1",
|
|
49
|
+
"react-native-gesture-handler": "2.30.0",
|
|
50
|
+
"react-native-reanimated": "4.2.1",
|
|
51
|
+
"react-native-safe-area-context": "5.6.2",
|
|
52
|
+
"react-native-screens": "4.26.2",
|
|
53
|
+
"react-native-worklets": "0.7.4"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=20"
|
|
57
|
+
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
},
|
|
61
|
+
"harmony": {
|
|
62
|
+
"modules": {
|
|
63
|
+
"@react-native-ohos/react-native-gesture-handler": {
|
|
64
|
+
"version": "2.30.1",
|
|
65
|
+
"mainHarPath": "harmony",
|
|
66
|
+
"ohPackageName": "@react-native-ohos/react-native-gesture-handler",
|
|
67
|
+
"etsPackageClassName": "RnohReactNativeHarmonyGestureHandlerPackage",
|
|
68
|
+
"cppPackageClassName": "GestureHandlerPackage",
|
|
69
|
+
"cmakeLibraryTargetName": "rnoh_gesture_handler"
|
|
70
|
+
},
|
|
71
|
+
"@react-native-ohos/react-native-reanimated": {
|
|
72
|
+
"version": "4.0.2-beta.1",
|
|
73
|
+
"mainHarPath": "harmony",
|
|
74
|
+
"ohPackageName": "@react-native-ohos/react-native-reanimated",
|
|
75
|
+
"etsPackageClassName": "ReanimatedPackage",
|
|
76
|
+
"etsPackageImport": "named",
|
|
77
|
+
"cppPackageClassName": "ReanimatedPackage",
|
|
78
|
+
"cmakeLibraryTargetName": "rnoh_reanimated"
|
|
79
|
+
},
|
|
80
|
+
"@react-native-ohos/react-native-safe-area-context": {
|
|
81
|
+
"version": "5.6.3",
|
|
82
|
+
"mainHarPath": "harmony",
|
|
83
|
+
"ohPackageName": "@react-native-ohos/react-native-safe-area-context",
|
|
84
|
+
"etsPackageClassName": "SafeAreaViewPackage",
|
|
85
|
+
"etsPackageImport": "named",
|
|
86
|
+
"cppPackageClassName": "SafeAreaViewPackage",
|
|
87
|
+
"cmakeLibraryTargetName": "rnoh_safe_area"
|
|
88
|
+
},
|
|
89
|
+
"@react-native-ohos/react-native-screens": {
|
|
90
|
+
"version": "4.26.2-rnoh084.0",
|
|
91
|
+
"mainHarPath": "harmony",
|
|
92
|
+
"ohPackageName": [
|
|
93
|
+
{
|
|
94
|
+
"harName": "screens.har",
|
|
95
|
+
"packageName": "@react-native-ohos/react-native-screens",
|
|
96
|
+
"version": "4.26.2"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"etsPackageClassName": "RNOHScreensPackage",
|
|
100
|
+
"cppPackageClassName": "RnohReactNativeHarmonyScreensPackage",
|
|
101
|
+
"cmakeLibraryTargetName": "rnoh_screens"
|
|
102
|
+
},
|
|
103
|
+
"@react-native-ohos/react-native-worklets": {
|
|
104
|
+
"version": "1.0.0",
|
|
105
|
+
"mainHarPath": "harmony",
|
|
106
|
+
"ohPackageName": "@react-native-ohos/react-native-worklets",
|
|
107
|
+
"etsPackageClassName": "ReanimatedWorkletPackage",
|
|
108
|
+
"etsPackageImport": "named",
|
|
109
|
+
"cppPackageClassName": "ReanimatedWorkletPackage",
|
|
110
|
+
"cmakeLibraryTargetName": "rnoh_worklets"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|