hybrid-navigation 2.10.0 → 2.10.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/lib/ReactRegistry.d.ts +2 -4
- package/package.json +4 -1
- package/src/ReactRegistry.tsx +5 -7
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/.name +0 -1
- package/android/.idea/gradle.xml +0 -16
- package/android/.idea/misc.xml +0 -9
- package/android/.idea/modules/android.iml +0 -18
- package/android/.idea/modules.xml +0 -8
- package/android/.idea/vcs.xml +0 -6
- package/android/local.properties +0 -8
package/lib/ReactRegistry.d.ts
CHANGED
|
@@ -9,14 +9,12 @@ export interface InjectedProps {
|
|
|
9
9
|
garden: Garden;
|
|
10
10
|
sceneId: string;
|
|
11
11
|
}
|
|
12
|
-
declare type ComponentType = ReturnType<ComponentProvider>;
|
|
13
12
|
export declare const NavigationContext: React.Context<any>;
|
|
14
|
-
export declare type HOC = (WrappedComponent: ComponentType) => ComponentType
|
|
13
|
+
export declare type HOC = (WrappedComponent: React.ComponentType<any>) => React.ComponentType<any>;
|
|
15
14
|
export declare class ReactRegistry {
|
|
16
15
|
static registerEnded: boolean;
|
|
17
16
|
static startRegisterComponent(hoc?: HOC): void;
|
|
18
17
|
static endRegisterComponent(): void;
|
|
19
18
|
static registerComponent(appKey: string, getComponentFunc: ComponentProvider, routeConfig?: RouteConfig): void;
|
|
20
19
|
}
|
|
21
|
-
export declare function withNavigationItem(item: NavigationItem): (WrappedComponent: ComponentType) => ComponentType
|
|
22
|
-
export {};
|
|
20
|
+
export declare function withNavigationItem(item: NavigationItem): (WrappedComponent: React.ComponentType<any>) => React.ComponentType<any>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hybrid-navigation",
|
|
3
3
|
"description": "React Native Navigation that supports seamless navigation between Native and React.",
|
|
4
|
-
"version": "2.10.
|
|
4
|
+
"version": "2.10.1",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
7
7
|
"react-native": "src/index",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"ios",
|
|
14
14
|
"HybridNavigation.podspec",
|
|
15
15
|
"!android/build",
|
|
16
|
+
"!android/.gradle",
|
|
17
|
+
"!android/.idea",
|
|
18
|
+
"!android/local.properties",
|
|
16
19
|
"!ios/build",
|
|
17
20
|
"!**/__tests__"
|
|
18
21
|
],
|
package/src/ReactRegistry.tsx
CHANGED
|
@@ -26,17 +26,15 @@ interface Props {
|
|
|
26
26
|
sceneId: string
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
function getDisplayName(WrappedComponent: ComponentType) {
|
|
29
|
+
function getDisplayName(WrappedComponent: React.ComponentType<any>) {
|
|
32
30
|
return WrappedComponent.displayName || WrappedComponent.name || 'Component'
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
export const NavigationContext = createContext<any>(null)
|
|
36
34
|
|
|
37
35
|
function withNavigator(moduleName: string) {
|
|
38
|
-
return function (WrappedComponent: ComponentType) {
|
|
39
|
-
const FC = React.forwardRef((props: Props, ref: React.Ref<ComponentType
|
|
36
|
+
return function (WrappedComponent: React.ComponentType<any>) {
|
|
37
|
+
const FC = React.forwardRef((props: Props, ref: React.Ref<React.ComponentType<any>>) => {
|
|
40
38
|
const { sceneId } = props
|
|
41
39
|
|
|
42
40
|
const navigator = Navigator.of(sceneId)
|
|
@@ -87,7 +85,7 @@ function withNavigator(moduleName: string) {
|
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
|
|
90
|
-
export type HOC = (WrappedComponent: ComponentType) => ComponentType
|
|
88
|
+
export type HOC = (WrappedComponent: React.ComponentType<any>) => React.ComponentType<any>
|
|
91
89
|
let wrap: HOC | undefined
|
|
92
90
|
|
|
93
91
|
export class ReactRegistry {
|
|
@@ -128,7 +126,7 @@ export class ReactRegistry {
|
|
|
128
126
|
}
|
|
129
127
|
|
|
130
128
|
export function withNavigationItem(item: NavigationItem) {
|
|
131
|
-
return function (WrappedComponent: ComponentType): ComponentType {
|
|
129
|
+
return function (WrappedComponent: React.ComponentType<any>): React.ComponentType<any> {
|
|
132
130
|
let navigationItem = (WrappedComponent as any).navigationItem
|
|
133
131
|
if (navigationItem) {
|
|
134
132
|
;(WrappedComponent as any).navigationItem = { ...navigationItem, ...item }
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
package/android/.idea/.name
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ReactAppCompatActivity.java
|
package/android/.idea/gradle.xml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="GradleMigrationSettings" migrationVersion="1" />
|
|
4
|
-
<component name="GradleSettings">
|
|
5
|
-
<option name="linkedExternalProjectsSettings">
|
|
6
|
-
<GradleProjectSettings>
|
|
7
|
-
<option name="delegatedBuild" value="true" />
|
|
8
|
-
<option name="testRunner" value="GRADLE" />
|
|
9
|
-
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
|
10
|
-
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
|
11
|
-
<option name="gradleJvm" value="adopt-11" />
|
|
12
|
-
<option name="resolveModulePerSourceSet" value="false" />
|
|
13
|
-
</GradleProjectSettings>
|
|
14
|
-
</option>
|
|
15
|
-
</component>
|
|
16
|
-
</project>
|
package/android/.idea/misc.xml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectRootManager" version="2" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
|
|
4
|
-
<output url="file://$PROJECT_DIR$/build/classes" />
|
|
5
|
-
</component>
|
|
6
|
-
<component name="ProjectType">
|
|
7
|
-
<option name="id" value="Android" />
|
|
8
|
-
</component>
|
|
9
|
-
</project>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module external.linked.project.id=":" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="FacetManager">
|
|
4
|
-
<facet type="android-gradle" name="Android-Gradle">
|
|
5
|
-
<configuration>
|
|
6
|
-
<option name="GRADLE_PROJECT_PATH" value=":" />
|
|
7
|
-
<option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" />
|
|
8
|
-
<option name="LAST_KNOWN_AGP_VERSION" />
|
|
9
|
-
</configuration>
|
|
10
|
-
</facet>
|
|
11
|
-
</component>
|
|
12
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
13
|
-
<exclude-output />
|
|
14
|
-
<content url="file://$MODULE_DIR$/../.." />
|
|
15
|
-
<orderEntry type="inheritedJdk" />
|
|
16
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
17
|
-
</component>
|
|
18
|
-
</module>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/modules/android.iml" filepath="$PROJECT_DIR$/.idea/modules/android.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/android/.idea/vcs.xml
DELETED
package/android/local.properties
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
## This file must *NOT* be checked into Version Control Systems,
|
|
2
|
-
# as it contains information specific to your local configuration.
|
|
3
|
-
#
|
|
4
|
-
# Location of the SDK. This is only used by Gradle.
|
|
5
|
-
# For customization when using a Version Control System, please read the
|
|
6
|
-
# header note.
|
|
7
|
-
#Sat Dec 18 22:42:49 CST 2021
|
|
8
|
-
sdk.dir=/Users/listen/Library/Android/sdk
|