@zean-chat/react-native 0.1.17 → 0.1.18

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.
@@ -1,6 +1,8 @@
1
1
  import type { IconName, NeutralColors } from './sdk.interface';
2
2
  import type { ZeanColorScheme } from '../interfaces';
3
3
  import type { DeviceType } from '@zean/shared/constants/widget';
4
+ /** The version the SDK's error reports name (ADR 0050). */
5
+ export declare const SDK_VERSION: string;
4
6
  /** How long the connection is down before the chat says so: a short blip is not worth a notice. */
5
7
  export declare const OFFLINE_NOTICE_MS = 3000;
6
8
  /** Android's navigation bar with its three buttons, in points: the gesture bar is half as tall. */
@@ -104,6 +104,15 @@ export interface ChatModalProps {
104
104
  colorScheme?: ZeanColorScheme;
105
105
  maxPhotos?: number;
106
106
  }
107
+ export interface ChatErrorBoundaryProps {
108
+ children: ReactNode;
109
+ onError: (error: Error) => void;
110
+ /** The chat shows: a screen that failed draws again once it opens anew. */
111
+ visible: boolean;
112
+ }
113
+ export interface ChatErrorBoundaryState {
114
+ failed: boolean;
115
+ }
107
116
  export interface ChatScreenProps {
108
117
  state: ChatState;
109
118
  insets: ScreenInsets;
@@ -1,5 +1,5 @@
1
1
  import type { ChatColors, ScreenInsets } from './sdk.interface';
2
- import type { AppBundle, ChatStorage } from '@zean/sdk-core';
2
+ import type { AppBundle, ChatStorage, SdkErrorSource } from '@zean/sdk-core';
3
3
  import type { DeviceDetails } from '@zean/shared/interfaces/widget';
4
4
  import type { ZeanColorScheme, ZeanStorage } from '../interfaces';
5
5
  /** `{name}` in a text, filled from `values`. */
@@ -26,6 +26,8 @@ export declare function appBundle(): AppBundle | undefined;
26
26
  * back to memory too.
27
27
  */
28
28
  export declare function chatStorage(storage?: ZeanStorage): ChatStorage;
29
+ /** Who the chat's own errors come from, on their way to Sentry through the backend (ADR 0050). */
30
+ export declare function errorSource(): SdkErrorSource;
29
31
  /** A development build: the phone becomes a Test device, which App settings send Test events as. */
30
32
  export declare function isDevBuild(): boolean;
31
33
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zean-chat/react-native",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "In-app support chat for React Native and Expo, iOS and Android. Pure JS, no native module. A free Intercom, Crisp and Zendesk mobile SDK alternative.",
5
5
  "keywords": [
6
6
  "react-native",