@icanbwell/types 0.45.1 → 0.46.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.
- package/index.js +4 -0
- package/native-bridge.js +1 -1
- package/native-components.js +2 -0
- package/package.json +3 -3
- package/src/index.d.ts +6 -0
- package/src/native-bridge.d.ts +3 -1
- package/src/native-components.d.ts +2 -0
package/index.js
CHANGED
package/native-bridge.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import './frontend-telemetry.js';
|
package/native-components.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icanbwell/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"typedoc": {
|
|
5
5
|
"entryPoint": "./src/index.ts",
|
|
6
6
|
"tsconfig": "./tsconfig.lib.json"
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"import": "./index.js"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
"repoVersion": "1.
|
|
40
|
-
"description": "@icanbwell/types. repo version: 1.
|
|
39
|
+
"repoVersion": "1.44.0",
|
|
40
|
+
"description": "@icanbwell/types. repo version: 1.44.0",
|
|
41
41
|
"module": "./index.js",
|
|
42
42
|
"main": "./index.js",
|
|
43
43
|
"type": "module",
|
package/src/index.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export * from './lib';
|
|
2
2
|
export * from './frontend-telemetry';
|
|
3
3
|
export * from './native-plugins';
|
|
4
|
+
export declare const PageTransitionEventKey = "pagetransition";
|
|
5
|
+
export type PageTransitionEventPayload = {
|
|
6
|
+
id?: string;
|
|
7
|
+
path: string;
|
|
8
|
+
pageTitle?: string;
|
|
9
|
+
};
|
package/src/native-bridge.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type rnBiometrics from 'react-native-biometrics';
|
|
2
2
|
import type TypedEmitter from 'typed-emitter';
|
|
3
|
-
import { OnAuthSuccessEventKey,
|
|
3
|
+
import type { OnAuthSuccessEventKey, OnAuthSuccessEventData, ErrorEventKey, ErrorEventData, NativeDependenciesEventKey } from './native-components';
|
|
4
4
|
import { openSettings, PermissionStatus } from 'react-native-permissions';
|
|
5
5
|
import { NativeDependencies } from './native-plugins';
|
|
6
|
+
import { PageTransitionEventKey, PageTransitionEventPayload } from '.';
|
|
6
7
|
export type NativeEvents<T = any> = {
|
|
7
8
|
openwebview: (url: string) => void;
|
|
8
9
|
closewebview: (data: T) => void;
|
|
@@ -10,6 +11,7 @@ export type NativeEvents<T = any> = {
|
|
|
10
11
|
[OnAuthSuccessEventKey]: (data: OnAuthSuccessEventData) => void;
|
|
11
12
|
[ErrorEventKey]: (data: ErrorEventData) => void;
|
|
12
13
|
[NativeDependenciesEventKey]: (data: NativeDependencies) => void;
|
|
14
|
+
[PageTransitionEventKey]: (data: PageTransitionEventPayload) => void;
|
|
13
15
|
};
|
|
14
16
|
export type NativeBridgeEmittableEvents = Pick<NativeEvents, 'onauthsuccess' | 'error' | 'nativedependencies'>;
|
|
15
17
|
export type NativeEventEmitter = TypedEmitter<NativeEvents>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PageTransitionEventKey, PageTransitionEventPayload } from '.';
|
|
1
2
|
import { NativeDependencies } from './native-plugins';
|
|
2
3
|
export type OnAuthSuccessEventData = {
|
|
3
4
|
user: {
|
|
@@ -16,6 +17,7 @@ export type EventKeyToDataMap = {
|
|
|
16
17
|
[OnAuthSuccessEventKey]: OnAuthSuccessEventData;
|
|
17
18
|
[ErrorEventKey]: ErrorEventData;
|
|
18
19
|
[NativeDependenciesEventKey]: NativeDependencies;
|
|
20
|
+
[PageTransitionEventKey]: PageTransitionEventPayload;
|
|
19
21
|
};
|
|
20
22
|
type OnEventData<T extends keyof EventKeyToDataMap> = {
|
|
21
23
|
key: T;
|