hybrid-navigation 2.13.0-beta.4 → 2.13.0

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.
@@ -28,9 +28,9 @@ export declare class Navigation implements Navigation {
28
28
  private wrap?;
29
29
  private hoc?;
30
30
  private registerEnded;
31
- startRegisterReactComponent(hoc?: HOC): void;
32
- endRegisterReactComponent(): void;
33
- registerReactComponent(appKey: string, getComponentFunc: ComponentProvider, routeConfig?: RouteConfig): void;
31
+ startRegisterComponent(hoc?: HOC): void;
32
+ endRegisterComponent(): void;
33
+ registerComponent(appKey: string, getComponentFunc: ComponentProvider, routeConfig?: RouteConfig): void;
34
34
  setNavigationComponentWrap(wrap: (moduleName: string) => HOC): void;
35
35
  addGlobalVisibilityEventListener(listener: GlobalVisibilityEventListener): NavigationSubscription;
36
36
  addVisibilityEventListener(sceneId: string, listener: VisibilityEventListener): NavigationSubscription;
package/lib/Navigation.js CHANGED
@@ -25,12 +25,12 @@ export class Navigation {
25
25
  wrap;
26
26
  hoc;
27
27
  registerEnded = false;
28
- startRegisterReactComponent(hoc) {
28
+ startRegisterComponent(hoc) {
29
29
  this.hoc = hoc;
30
30
  this.registerEnded = false;
31
31
  NavigationModule.startRegisterReactComponent();
32
32
  }
33
- endRegisterReactComponent() {
33
+ endRegisterComponent() {
34
34
  if (this.registerEnded) {
35
35
  console.warn(`Please don't call ReactRegistry#endRegisterComponent multiple times.`);
36
36
  return;
@@ -38,7 +38,7 @@ export class Navigation {
38
38
  this.registerEnded = true;
39
39
  NavigationModule.endRegisterReactComponent();
40
40
  }
41
- registerReactComponent(appKey, getComponentFunc, routeConfig) {
41
+ registerComponent(appKey, getComponentFunc, routeConfig) {
42
42
  if (routeConfig) {
43
43
  this.registerRoute(appKey, routeConfig);
44
44
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { Garden } from './Garden';
3
3
  import type { NavigationItem } from './Options';
4
4
  import { Navigator } from './Navigator';
5
- export interface NavigationComponentProps {
5
+ export interface NavigationProps {
6
6
  navigator: Navigator;
7
7
  garden: Garden;
8
8
  sceneId: string;
@@ -10,7 +10,7 @@ export interface NavigationComponentProps {
10
10
  /**
11
11
  * @deprecated Use NavigationComponentProps instead.
12
12
  */
13
- export declare type InjectedProps = NavigationComponentProps;
13
+ export declare type InjectedProps = NavigationProps;
14
14
  interface NativeProps {
15
15
  sceneId: string;
16
16
  }
@@ -5,13 +5,13 @@ export class ReactRegistry {
5
5
  * @param hoc
6
6
  */
7
7
  static startRegisterComponent(hoc) {
8
- Navigation.startRegisterReactComponent(hoc);
8
+ Navigation.startRegisterComponent(hoc);
9
9
  }
10
10
  /**
11
11
  * @deprecated Use Navigation.endRegisterComponent() instead.
12
12
  */
13
13
  static endRegisterComponent() {
14
- Navigation.endRegisterReactComponent();
14
+ Navigation.endRegisterComponent();
15
15
  }
16
16
  /**
17
17
  *
@@ -21,6 +21,6 @@ export class ReactRegistry {
21
21
  * @param routeConfig
22
22
  */
23
23
  static registerComponent(appKey, getComponentFunc, routeConfig) {
24
- Navigation.registerReactComponent(appKey, getComponentFunc, routeConfig);
24
+ Navigation.registerComponent(appKey, getComponentFunc, routeConfig);
25
25
  }
26
26
  }
package/lib/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- import { withNavigationItem, NavigationComponentProps, InjectedProps } from './NavigationComponentWrap';
1
+ import { withNavigationItem, NavigationProps, InjectedProps } from './NavigationComponentWrap';
2
2
  import Navigation from './Navigation';
3
3
  declare function statusBarHeight(): number;
4
4
  declare function toolbarHeight(): number;
5
5
  declare function topBarHeight(): number;
6
6
  export default Navigation;
7
7
  export { RESULT_OK, RESULT_CANCEL } from './Navigation';
8
- export { withNavigationItem, NavigationComponentProps, InjectedProps, statusBarHeight, toolbarHeight, topBarHeight, };
8
+ export { withNavigationItem, NavigationProps, InjectedProps, statusBarHeight, toolbarHeight, topBarHeight, };
9
9
  export * from './Navigator';
10
10
  export * from './Garden';
11
11
  export * from './ReactRegistry';
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.13.0-beta.4",
4
+ "version": "2.13.0",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "./lib/index.d.ts",
7
7
  "react-native": "src/index",
package/src/Navigation.ts CHANGED
@@ -64,13 +64,13 @@ export class Navigation implements Navigation {
64
64
  private hoc?: HOC
65
65
  private registerEnded = false
66
66
 
67
- startRegisterReactComponent(hoc?: HOC) {
67
+ startRegisterComponent(hoc?: HOC) {
68
68
  this.hoc = hoc
69
69
  this.registerEnded = false
70
70
  NavigationModule.startRegisterReactComponent()
71
71
  }
72
72
 
73
- endRegisterReactComponent() {
73
+ endRegisterComponent() {
74
74
  if (this.registerEnded) {
75
75
  console.warn(`Please don't call ReactRegistry#endRegisterComponent multiple times.`)
76
76
  return
@@ -79,7 +79,7 @@ export class Navigation implements Navigation {
79
79
  NavigationModule.endRegisterReactComponent()
80
80
  }
81
81
 
82
- registerReactComponent(
82
+ registerComponent(
83
83
  appKey: string,
84
84
  getComponentFunc: ComponentProvider,
85
85
  routeConfig?: RouteConfig,
@@ -5,7 +5,7 @@ import type { NavigationItem } from './Options'
5
5
 
6
6
  import { Navigator, NavigationContext } from './Navigator'
7
7
 
8
- export interface NavigationComponentProps {
8
+ export interface NavigationProps {
9
9
  navigator: Navigator
10
10
  garden: Garden
11
11
  sceneId: string
@@ -14,7 +14,7 @@ export interface NavigationComponentProps {
14
14
  /**
15
15
  * @deprecated Use NavigationComponentProps instead.
16
16
  */
17
- export type InjectedProps = NavigationComponentProps
17
+ export type InjectedProps = NavigationProps
18
18
 
19
19
  interface NativeProps {
20
20
  sceneId: string
@@ -9,14 +9,14 @@ export class ReactRegistry {
9
9
  * @param hoc
10
10
  */
11
11
  static startRegisterComponent(hoc?: HOC) {
12
- Navigation.startRegisterReactComponent(hoc)
12
+ Navigation.startRegisterComponent(hoc)
13
13
  }
14
14
 
15
15
  /**
16
16
  * @deprecated Use Navigation.endRegisterComponent() instead.
17
17
  */
18
18
  static endRegisterComponent() {
19
- Navigation.endRegisterReactComponent()
19
+ Navigation.endRegisterComponent()
20
20
  }
21
21
 
22
22
  /**
@@ -31,6 +31,6 @@ export class ReactRegistry {
31
31
  getComponentFunc: ComponentProvider,
32
32
  routeConfig?: RouteConfig,
33
33
  ) {
34
- Navigation.registerReactComponent(appKey, getComponentFunc, routeConfig)
34
+ Navigation.registerComponent(appKey, getComponentFunc, routeConfig)
35
35
  }
36
36
  }
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  withNavigation,
3
3
  withNavigationItem,
4
- NavigationComponentProps,
4
+ NavigationProps,
5
5
  InjectedProps,
6
6
  } from './NavigationComponentWrap'
7
7
 
@@ -27,7 +27,7 @@ export { RESULT_OK, RESULT_CANCEL } from './Navigation'
27
27
 
28
28
  export {
29
29
  withNavigationItem,
30
- NavigationComponentProps,
30
+ NavigationProps,
31
31
  InjectedProps,
32
32
  statusBarHeight,
33
33
  toolbarHeight,