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.
@@ -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.0",
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
  ],
@@ -26,17 +26,15 @@ interface Props {
26
26
  sceneId: string
27
27
  }
28
28
 
29
- type ComponentType = ReturnType<ComponentProvider>
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 }
File without changes
File without changes
File without changes
@@ -1 +0,0 @@
1
- ReactAppCompatActivity.java
@@ -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>
@@ -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>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
- </component>
6
- </project>
@@ -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