@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 CHANGED
@@ -1 +1,5 @@
1
1
  export { ErrorCode } from './frontend-telemetry.js';
2
+
3
+ const PageTransitionEventKey = 'pagetransition';
4
+
5
+ export { PageTransitionEventKey };
package/native-bridge.js CHANGED
@@ -1 +1 @@
1
-
1
+ import './frontend-telemetry.js';
@@ -1,3 +1,5 @@
1
+ import './frontend-telemetry.js';
2
+
1
3
  const OnAuthSuccessEventKey = 'onauthsuccess';
2
4
  const ErrorEventKey = 'error';
3
5
  const NativeDependenciesEventKey = 'nativedependencies';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/types",
3
- "version": "0.45.1",
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.43.1",
40
- "description": "@icanbwell/types. repo version: 1.43.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
+ };
@@ -1,8 +1,9 @@
1
1
  import type rnBiometrics from 'react-native-biometrics';
2
2
  import type TypedEmitter from 'typed-emitter';
3
- import { OnAuthSuccessEventKey, type OnAuthSuccessEventData, ErrorEventKey, type ErrorEventData, type NativeDependenciesEventKey } from './native-components';
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;