@onairos/react-native 3.0.42 → 3.0.44

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/src/index.ts CHANGED
@@ -3,38 +3,32 @@
3
3
  * A React Native implementation for Onairos personalized data integration
4
4
  */
5
5
 
6
- // Main components
7
- import { Onairos } from './components/Onairos';
8
- import { OnairosButton } from './components/OnairosButton';
9
- import { Overlay } from './components/Overlay';
10
- import { UniversalOnboarding } from './components/UniversalOnboarding';
11
-
12
- // Export main components
13
- export { Onairos } from './components/Onairos';
14
- export { OnairosButton } from './components/OnairosButton';
15
- export { Overlay } from './components/Overlay';
16
- export { UniversalOnboarding } from './components/UniversalOnboarding';
17
-
18
- // Export Portal components
19
- export { Portal, PortalHost } from './utils/Portal';
20
-
21
- // Screen Components
22
- export { ConnectorScreen } from './components/screens/ConnectorScreen';
23
- export { PinCreationScreen } from './components/screens/PinCreationScreen';
24
- export { LoadingScreen } from './components/screens/LoadingScreen';
25
- // export { SignInScreen } from './components/screens/SignInScreen';
6
+ // Export types first to avoid circular dependencies
7
+ export type {
8
+ OnairosButtonProps,
9
+ DataTier,
10
+ UniversalOnboardingProps,
11
+ ConnectionStatus,
12
+ PlatformListProps,
13
+ PinInputProps,
14
+ TrainingModalProps,
15
+ OAuthWebViewProps,
16
+ PlatformConfig,
17
+ ApiResponse,
18
+ CredentialsResult,
19
+ OverlayProps,
20
+ BiometricOptions,
21
+ PinRequirements,
22
+ } from './types';
26
23
 
27
- // Onboarding Components
28
- export { OAuthWebView } from './components/onboarding/OAuthWebView';
29
- export { PlatformConnector } from './components/onboarding/PlatformConnector';
30
- export { OnboardingHeader } from './components/onboarding/OnboardingHeader';
31
- export { PinInput } from './components/onboarding/PinInput';
24
+ export type { StorageOptions, OnairosCredentials } from './utils/secureStorage';
25
+ export type { OAuthConfig } from './services/oauthService';
26
+ export type { ApiErrorType, ApiError } from './utils/onairosApi';
32
27
 
33
- // Hooks
34
- export { useCredentials } from './hooks/useCredentials';
35
- export { useConnections } from './hooks/useConnections';
28
+ // Export constants
29
+ export { COLORS, PLATFORMS, API_ENDPOINTS, STORAGE_KEYS, PIN_REQUIREMENTS, DEEP_LINK_CONFIG } from './constants';
36
30
 
37
- // Utilities
31
+ // Export utilities
38
32
  export {
39
33
  storeCredentials,
40
34
  getCredentials,
@@ -67,7 +61,7 @@ export {
67
61
  isDebugMode,
68
62
  } from './utils/debugHelper';
69
63
 
70
- // Services
64
+ // Export services
71
65
  export {
72
66
  connectPlatform,
73
67
  disconnectPlatform,
@@ -76,52 +70,53 @@ export {
76
70
  storePlatformConnection,
77
71
  } from './services/oauthService';
78
72
 
79
- // Types
80
- export type {
81
- OnairosButtonProps,
82
- DataTier,
83
- UniversalOnboardingProps,
84
- ConnectionStatus,
85
- PlatformListProps,
86
- PinInputProps,
87
- TrainingModalProps,
88
- OAuthWebViewProps,
89
- PlatformConfig,
90
- ApiResponse,
91
- CredentialsResult,
92
- OverlayProps,
93
- BiometricOptions,
94
- PinRequirements,
95
- } from './types';
96
-
97
- export type { StorageOptions, OnairosCredentials } from './utils/secureStorage';
98
- export type { OAuthConfig } from './services/oauthService';
99
- export type { ApiErrorType, ApiError } from './utils/onairosApi';
100
-
101
- // Constants
102
- export { COLORS, PLATFORMS, API_ENDPOINTS, STORAGE_KEYS, PIN_REQUIREMENTS, DEEP_LINK_CONFIG } from './constants';
103
-
104
- // API and Services
73
+ // Export API and Services
105
74
  export { onairosApi } from './api';
106
75
  export { OAuthService } from './services/oauthService';
107
76
  export * from './utils/secureStorage';
108
77
  export * from './utils/encryption';
109
78
 
110
- // Define component types for default export using React.ComponentType
111
- import * as React from 'react';
112
- import type { OnairosButtonProps, UniversalOnboardingProps } from './types';
113
- import { PortalHost } from './utils/Portal';
79
+ // Export hooks
80
+ export { useCredentials } from './hooks/useCredentials';
81
+ export { useConnections } from './hooks/useConnections';
114
82
 
115
- interface OverlayComponent extends React.FC<any> {}
116
- interface OnairosComponent extends React.FC<any> {}
83
+ // Export Portal components
84
+ export { Portal, PortalHost } from './utils/Portal';
85
+
86
+ // Screen Components
87
+ export { ConnectorScreen } from './components/screens/ConnectorScreen';
88
+ export { PinCreationScreen } from './components/screens/PinCreationScreen';
89
+ export { LoadingScreen } from './components/screens/LoadingScreen';
90
+
91
+ // Onboarding Components
92
+ export { OAuthWebView } from './components/onboarding/OAuthWebView';
93
+ export { PlatformConnector } from './components/onboarding/PlatformConnector';
94
+ export { OnboardingHeader } from './components/onboarding/OnboardingHeader';
95
+
96
+ // Core Components - Export these last to avoid circular dependencies
97
+ export { PlatformList } from './components/PlatformList';
98
+ export { PinInput } from './components/PinInput';
99
+ export { TrainingModal } from './components/TrainingModal';
100
+ export { Overlay } from './components/Overlay';
101
+ export { UniversalOnboarding } from './components/UniversalOnboarding';
102
+ export { OnairosButton } from './components/OnairosButton';
103
+ export { Onairos } from './components/Onairos';
117
104
 
118
105
  // Define the public components for default export
106
+ import * as React from 'react';
107
+ import { Onairos } from './components/Onairos';
108
+ import { OnairosButton } from './components/OnairosButton';
109
+ import { Overlay } from './components/Overlay';
110
+ import { UniversalOnboarding } from './components/UniversalOnboarding';
111
+ import { PortalHost } from './utils/Portal';
112
+
113
+ // Simple default export object - main types are available through named exports
119
114
  const components = {
120
- Onairos: Onairos as OnairosComponent,
121
- OnairosButton: OnairosButton,
122
- OnairosOverlay: Overlay as OverlayComponent,
123
- UniversalOnboarding: UniversalOnboarding as React.ComponentType<UniversalOnboardingProps>,
124
- PortalHost: PortalHost,
115
+ Onairos: Onairos as any,
116
+ OnairosButton: OnairosButton as any,
117
+ OnairosOverlay: Overlay as any,
118
+ UniversalOnboarding: UniversalOnboarding as any,
119
+ PortalHost: PortalHost as any,
125
120
  };
126
121
 
127
122
  // Export the components as the default export
package/types/index.d.ts CHANGED
@@ -81,7 +81,9 @@ export interface OnairosButtonProps {
81
81
  /** Whether the button is enabled */
82
82
  enabled?: boolean;
83
83
  /** Button form style */
84
- buttonForm?: 'default' | 'login' | 'signup';
84
+ buttonForm?: 'default' | 'login' | 'signup' | 'connect';
85
+ /** If true, makes API call automatically and returns result without showing UI */
86
+ auto?: boolean;
85
87
  /** Called when authentication is rejected */
86
88
  onRejection?: (error?: string) => void;
87
89
  /** Called when authentication is completed successfully */
@@ -94,6 +96,8 @@ export interface OnairosButtonProps {
94
96
  swerv?: boolean;
95
97
  /** Enable debug logging */
96
98
  debug?: boolean;
99
+ /** Enable dark mode styling */
100
+ darkMode?: boolean;
97
101
  /** Preferred platform to highlight */
98
102
  preferredPlatform?: string;
99
103
  /** Whether to use test mode */