@onairos/react-native 3.1.16 → 3.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.
Files changed (207) hide show
  1. package/README.md +404 -0
  2. package/lib/commonjs/assets/images/Checkbox.svg +3 -3
  3. package/lib/commonjs/assets/images/EnochE.svg +19 -19
  4. package/lib/commonjs/assets/images/Personalityprofile.svg +3 -3
  5. package/lib/commonjs/assets/images/Personalitytraits.svg +3 -3
  6. package/lib/commonjs/assets/images/Userpreferences.svg +3 -3
  7. package/lib/commonjs/assets/images/arrow.svg +20 -20
  8. package/lib/commonjs/assets/images/basicproficon.svg +43 -43
  9. package/lib/commonjs/assets/images/basicprofile.svg +3 -3
  10. package/lib/commonjs/assets/images/checkmark.svg +4 -4
  11. package/lib/commonjs/assets/images/contentanalysis.svg +3 -3
  12. package/lib/commonjs/assets/images/contenticon.svg +23 -23
  13. package/lib/commonjs/assets/images/personalityicon.svg +18 -18
  14. package/lib/commonjs/assets/images/x-close.svg +3 -3
  15. package/lib/commonjs/components/ModalSheet.js +8 -2
  16. package/lib/commonjs/components/ModalSheet.js.map +1 -1
  17. package/lib/commonjs/components/OnairosButton.js +290 -0
  18. package/lib/commonjs/components/OnairosButton.js.map +1 -0
  19. package/lib/commonjs/components/OnairosSignInButton.js +32 -8
  20. package/lib/commonjs/components/OnairosSignInButton.js.map +1 -1
  21. package/lib/commonjs/components/UniversalOnboarding.js +4 -4
  22. package/lib/commonjs/components/WelcomeScreen.js +29 -13
  23. package/lib/commonjs/components/WelcomeScreen.js.map +1 -1
  24. package/lib/commonjs/config/api.js +2 -2
  25. package/lib/commonjs/hooks/useConnections.js +6 -6
  26. package/lib/commonjs/hooks/useUserConnections.js +10 -10
  27. package/lib/commonjs/index.js +13 -6
  28. package/lib/commonjs/index.js.map +1 -1
  29. package/lib/commonjs/services/apiClient.js +35 -35
  30. package/lib/commonjs/services/apiKeyService.js +99 -99
  31. package/lib/commonjs/services/authService.js +82 -82
  32. package/lib/commonjs/services/biometricPinService.js +10 -10
  33. package/lib/commonjs/services/connectedAccountsService.js +32 -32
  34. package/lib/commonjs/services/googleAuthService.js +15 -15
  35. package/lib/commonjs/services/imageCompressionService.js +15 -15
  36. package/lib/commonjs/services/jwtStorageService.js +59 -59
  37. package/lib/commonjs/services/mobileTrainingService.js +14 -14
  38. package/lib/commonjs/services/pinEncryptionService.js +10 -10
  39. package/lib/commonjs/services/pinStorageUtils.js +15 -15
  40. package/lib/commonjs/services/platformAuthService.js +47 -47
  41. package/lib/commonjs/services/storageService.js +31 -31
  42. package/lib/commonjs/services/trainingApiHelpers.js +33 -33
  43. package/lib/commonjs/services/userConnectionsService.js +24 -24
  44. package/lib/commonjs/utils/Portal.js +4 -4
  45. package/lib/commonjs/utils/api.js +24 -24
  46. package/lib/commonjs/utils/auth.js +18 -18
  47. package/lib/commonjs/utils/crypto.js +13 -13
  48. package/lib/commonjs/utils/encryption.js +12 -12
  49. package/lib/commonjs/utils/eventUtils.js +52 -52
  50. package/lib/commonjs/utils/programmaticFlow.js +16 -16
  51. package/lib/commonjs/utils/retryHelper.js +27 -27
  52. package/lib/module/assets/images/Checkbox.svg +3 -3
  53. package/lib/module/assets/images/EnochE.svg +19 -19
  54. package/lib/module/assets/images/Personalityprofile.svg +3 -3
  55. package/lib/module/assets/images/Personalitytraits.svg +3 -3
  56. package/lib/module/assets/images/Userpreferences.svg +3 -3
  57. package/lib/module/assets/images/arrow.svg +20 -20
  58. package/lib/module/assets/images/basicproficon.svg +43 -43
  59. package/lib/module/assets/images/basicprofile.svg +3 -3
  60. package/lib/module/assets/images/checkmark.svg +4 -4
  61. package/lib/module/assets/images/contentanalysis.svg +3 -3
  62. package/lib/module/assets/images/contenticon.svg +23 -23
  63. package/lib/module/assets/images/personalityicon.svg +18 -18
  64. package/lib/module/assets/images/x-close.svg +3 -3
  65. package/lib/module/components/ModalSheet.js +7 -2
  66. package/lib/module/components/ModalSheet.js.map +1 -1
  67. package/lib/module/components/OnairosButton.js +282 -0
  68. package/lib/module/components/OnairosButton.js.map +1 -0
  69. package/lib/module/components/OnairosSignInButton.js +32 -8
  70. package/lib/module/components/OnairosSignInButton.js.map +1 -1
  71. package/lib/module/components/UniversalOnboarding.js +4 -4
  72. package/lib/module/components/WelcomeScreen.js +25 -10
  73. package/lib/module/components/WelcomeScreen.js.map +1 -1
  74. package/lib/module/config/api.js +2 -2
  75. package/lib/module/hooks/useConnections.js +6 -6
  76. package/lib/module/hooks/useUserConnections.js +10 -10
  77. package/lib/module/index.js +11 -11
  78. package/lib/module/index.js.map +1 -1
  79. package/lib/module/services/apiClient.js +35 -35
  80. package/lib/module/services/apiKeyService.js +99 -99
  81. package/lib/module/services/authService.js +82 -82
  82. package/lib/module/services/biometricPinService.js +10 -10
  83. package/lib/module/services/connectedAccountsService.js +32 -32
  84. package/lib/module/services/googleAuthService.js +15 -15
  85. package/lib/module/services/imageCompressionService.js +15 -15
  86. package/lib/module/services/jwtStorageService.js +59 -59
  87. package/lib/module/services/mobileTrainingService.js +14 -14
  88. package/lib/module/services/pinEncryptionService.js +10 -10
  89. package/lib/module/services/pinStorageUtils.js +15 -15
  90. package/lib/module/services/platformAuthService.js +47 -47
  91. package/lib/module/services/storageService.js +31 -31
  92. package/lib/module/services/trainingApiHelpers.js +33 -33
  93. package/lib/module/services/userConnectionsService.js +24 -24
  94. package/lib/module/utils/Portal.js +4 -4
  95. package/lib/module/utils/api.js +24 -24
  96. package/lib/module/utils/auth.js +18 -18
  97. package/lib/module/utils/crypto.js +13 -13
  98. package/lib/module/utils/encryption.js +12 -12
  99. package/lib/module/utils/eventUtils.js +52 -52
  100. package/lib/module/utils/programmaticFlow.js +16 -16
  101. package/lib/module/utils/retryHelper.js +27 -27
  102. package/lib/typescript/components/ModalSheet.d.ts.map +1 -1
  103. package/lib/typescript/components/OnairosButton.d.ts +37 -0
  104. package/lib/typescript/components/OnairosButton.d.ts.map +1 -0
  105. package/lib/typescript/components/OnairosSignInButton.d.ts.map +1 -1
  106. package/lib/typescript/components/WelcomeScreen.d.ts.map +1 -1
  107. package/lib/typescript/index.d.ts +3 -1
  108. package/lib/typescript/index.d.ts.map +1 -1
  109. package/package.json +145 -163
  110. package/src/api/index.ts +151 -151
  111. package/src/assets/images/Checkbox.svg +3 -3
  112. package/src/assets/images/EnochE.svg +19 -19
  113. package/src/assets/images/Personalityprofile.svg +3 -3
  114. package/src/assets/images/Personalitytraits.svg +3 -3
  115. package/src/assets/images/Userpreferences.svg +3 -3
  116. package/src/assets/images/arrow.svg +20 -20
  117. package/src/assets/images/basicproficon.svg +43 -43
  118. package/src/assets/images/basicprofile.svg +3 -3
  119. package/src/assets/images/checkmark.svg +4 -4
  120. package/src/assets/images/contentanalysis.svg +3 -3
  121. package/src/assets/images/contenticon.svg +23 -23
  122. package/src/assets/images/personalityicon.svg +18 -18
  123. package/src/assets/images/x-close.svg +3 -3
  124. package/src/components/BodyText.tsx +33 -33
  125. package/src/components/BrandMark.tsx +62 -62
  126. package/src/components/CodeInput.tsx +32 -32
  127. package/src/components/DataRequestScreen.tsx +355 -355
  128. package/src/components/EmailInput.tsx +31 -31
  129. package/src/components/EmailVerificationModal.tsx +363 -363
  130. package/src/components/ExistingUserDataConfirmation.tsx +506 -506
  131. package/src/components/GoogleButton.tsx +55 -55
  132. package/src/components/HeadingGroup.tsx +49 -49
  133. package/src/components/ModalHeader.tsx +125 -125
  134. package/src/components/ModalSheet.tsx +59 -57
  135. package/src/components/Onairos.tsx +422 -422
  136. package/src/components/OnairosButton.tsx +339 -0
  137. package/src/components/OnairosSignInButton.tsx +31 -9
  138. package/src/components/Overlay.tsx +506 -506
  139. package/src/components/PersonaImage.tsx +79 -79
  140. package/src/components/PersonaLoadingScreen.tsx +201 -201
  141. package/src/components/PersonalizationConsentScreen.tsx +410 -410
  142. package/src/components/PinCreationScreen.tsx +492 -492
  143. package/src/components/PinInput.tsx +555 -555
  144. package/src/components/PlatformConnectorsStep.tsx +891 -891
  145. package/src/components/PlatformList.tsx +144 -144
  146. package/src/components/PlatformToggle.tsx +226 -226
  147. package/src/components/PrimaryButton.tsx +213 -213
  148. package/src/components/SignInMatchAnimation.tsx +225 -225
  149. package/src/components/SignInStep.tsx +217 -217
  150. package/src/components/TrainingModal.tsx +1047 -1047
  151. package/src/components/UniversalOnboarding.tsx +2887 -2887
  152. package/src/components/VerificationStep.tsx +198 -198
  153. package/src/components/WelcomeScreen.tsx +490 -473
  154. package/src/components/icons/Basicproficon.tsx +30 -30
  155. package/src/components/icons/Basicprofile.tsx +17 -17
  156. package/src/components/icons/Checkbox.tsx +17 -17
  157. package/src/components/icons/Checkmark.tsx +24 -24
  158. package/src/components/icons/Contentanalysis.tsx +17 -17
  159. package/src/components/icons/Contenticon.tsx +30 -30
  160. package/src/components/icons/EnochE.tsx +39 -39
  161. package/src/components/icons/Personalityicon.tsx +22 -22
  162. package/src/components/icons/Personalityprofile.tsx +17 -17
  163. package/src/components/icons/Personalitytraits.tsx +17 -17
  164. package/src/components/icons/Userpreferences.tsx +17 -17
  165. package/src/components/icons/index.ts +12 -12
  166. package/src/components/onboarding/OAuthWebView.tsx +232 -232
  167. package/src/config/api.ts +25 -25
  168. package/src/context/AuthContext.tsx +393 -393
  169. package/src/hooks/useConnectedAccounts.ts +138 -138
  170. package/src/hooks/useConnections.ts +161 -161
  171. package/src/hooks/useCredentials.ts +174 -174
  172. package/src/hooks/useUserConnections.ts +165 -165
  173. package/src/index.js +14 -0
  174. package/src/index.ts +99 -96
  175. package/src/services/apiClient.ts +336 -336
  176. package/src/services/apiKeyService.ts +919 -919
  177. package/src/services/authService.ts +1008 -1008
  178. package/src/services/biometricPinService.ts +192 -192
  179. package/src/services/connectedAccountsService.ts +289 -289
  180. package/src/services/googleAuthService.ts +279 -279
  181. package/src/services/imageCompressionService.ts +302 -302
  182. package/src/services/jwtStorageService.ts +256 -256
  183. package/src/services/mobileTrainingService.ts +203 -203
  184. package/src/services/pinEncryptionService.ts +75 -75
  185. package/src/services/pinStorageUtils.ts +96 -96
  186. package/src/services/platformAuthService.ts +1346 -1346
  187. package/src/services/storageService.ts +451 -451
  188. package/src/services/trainingApiHelpers.ts +66 -66
  189. package/src/services/userConnectionsService.ts +556 -556
  190. package/src/services/youtubeMigrationService.ts +453 -453
  191. package/src/theme/index.ts +239 -239
  192. package/src/types/ambient.d.ts +28 -28
  193. package/src/types/index.ts +265 -265
  194. package/src/types/node-fix.d.ts +18 -18
  195. package/src/types/node-override.d.ts +23 -23
  196. package/src/types/opacity.d.ts +15 -15
  197. package/src/types/types.d.ts +17 -17
  198. package/src/utils/Portal.tsx +82 -82
  199. package/src/utils/api.js +111 -111
  200. package/src/utils/auth.js +103 -103
  201. package/src/utils/crypto.js +59 -59
  202. package/src/utils/encryption.ts +68 -68
  203. package/src/utils/eventUtils.ts +302 -302
  204. package/src/utils/haptics.ts +58 -58
  205. package/src/utils/imagePreloader.ts +2 -2
  206. package/src/utils/programmaticFlow.ts +112 -112
  207. package/src/utils/retryHelper.ts +274 -274
@@ -1,11 +1,11 @@
1
- /**
2
- * Event utility functions for event management
1
+ /**
2
+ * Event utility functions for event management
3
3
  */
4
4
 
5
- /**
6
- * Generate a random alphanumeric event code
7
- * @param length - Length of the code (default: 6)
8
- * @returns Random event code
5
+ /**
6
+ * Generate a random alphanumeric event code
7
+ * @param length - Length of the code (default: 6)
8
+ * @returns Random event code
9
9
  */
10
10
  export const generateEventCode = (length = 6) => {
11
11
  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
@@ -16,10 +16,10 @@ export const generateEventCode = (length = 6) => {
16
16
  return result;
17
17
  };
18
18
 
19
- /**
20
- * Generate a smart event code based on the event title
21
- * @param title - Event title
22
- * @returns Smart event code
19
+ /**
20
+ * Generate a smart event code based on the event title
21
+ * @param title - Event title
22
+ * @returns Smart event code
23
23
  */
24
24
  export const generateSmartEventCode = title => {
25
25
  if (!title.trim()) {
@@ -56,10 +56,10 @@ export const generateSmartEventCode = title => {
56
56
  return code;
57
57
  };
58
58
 
59
- /**
60
- * Validate event code format
61
- * @param code - Event code to validate
62
- * @returns Object with validation result and error message
59
+ /**
60
+ * Validate event code format
61
+ * @param code - Event code to validate
62
+ * @returns Object with validation result and error message
63
63
  */
64
64
  export const validateEventCode = code => {
65
65
  if (!code || !code.trim()) {
@@ -92,10 +92,10 @@ export const validateEventCode = code => {
92
92
  };
93
93
  };
94
94
 
95
- /**
96
- * Format event date for display
97
- * @param dateString - Date string in YYYY-MM-DD format
98
- * @returns Formatted date string
95
+ /**
96
+ * Format event date for display
97
+ * @param dateString - Date string in YYYY-MM-DD format
98
+ * @returns Formatted date string
99
99
  */
100
100
  export const formatEventDate = dateString => {
101
101
  try {
@@ -111,10 +111,10 @@ export const formatEventDate = dateString => {
111
111
  }
112
112
  };
113
113
 
114
- /**
115
- * Check if an event is happening today
116
- * @param eventDate - Event date string
117
- * @returns True if event is today
114
+ /**
115
+ * Check if an event is happening today
116
+ * @param eventDate - Event date string
117
+ * @returns True if event is today
118
118
  */
119
119
  export const isEventToday = eventDate => {
120
120
  try {
@@ -126,10 +126,10 @@ export const isEventToday = eventDate => {
126
126
  }
127
127
  };
128
128
 
129
- /**
130
- * Check if an event is in the past
131
- * @param eventDate - Event date string
132
- * @returns True if event is in the past
129
+ /**
130
+ * Check if an event is in the past
131
+ * @param eventDate - Event date string
132
+ * @returns True if event is in the past
133
133
  */
134
134
  export const isEventPast = eventDate => {
135
135
  try {
@@ -145,11 +145,11 @@ export const isEventPast = eventDate => {
145
145
  }
146
146
  };
147
147
 
148
- /**
149
- * Get event status based on date and active status
150
- * @param eventDate - Event date string
151
- * @param isActive - Whether event is active
152
- * @returns Event status string
148
+ /**
149
+ * Get event status based on date and active status
150
+ * @param eventDate - Event date string
151
+ * @param isActive - Whether event is active
152
+ * @returns Event status string
153
153
  */
154
154
  export const getEventStatus = (eventDate, isActive) => {
155
155
  if (!isActive) {
@@ -164,10 +164,10 @@ export const getEventStatus = (eventDate, isActive) => {
164
164
  return 'Upcoming';
165
165
  };
166
166
 
167
- /**
168
- * Calculate days until event
169
- * @param eventDate - Event date string
170
- * @returns Number of days until event (negative if past)
167
+ /**
168
+ * Calculate days until event
169
+ * @param eventDate - Event date string
170
+ * @returns Number of days until event (negative if past)
171
171
  */
172
172
  export const getDaysUntilEvent = eventDate => {
173
173
  try {
@@ -185,10 +185,10 @@ export const getDaysUntilEvent = eventDate => {
185
185
  }
186
186
  };
187
187
 
188
- /**
189
- * Sort events by date (upcoming first, then past events)
190
- * @param events - Array of events
191
- * @returns Sorted array of events
188
+ /**
189
+ * Sort events by date (upcoming first, then past events)
190
+ * @param events - Array of events
191
+ * @returns Sorted array of events
192
192
  */
193
193
  export const sortEventsByDate = events => {
194
194
  return events.sort((a, b) => {
@@ -214,11 +214,11 @@ export const sortEventsByDate = events => {
214
214
  });
215
215
  };
216
216
 
217
- /**
218
- * Filter events by search query
219
- * @param events - Array of events
220
- * @param query - Search query
221
- * @returns Filtered array of events
217
+ /**
218
+ * Filter events by search query
219
+ * @param events - Array of events
220
+ * @param query - Search query
221
+ * @returns Filtered array of events
222
222
  */
223
223
  export const filterEventsBySearch = (events, query) => {
224
224
  if (!query.trim()) {
@@ -231,20 +231,20 @@ export const filterEventsBySearch = (events, query) => {
231
231
  });
232
232
  };
233
233
 
234
- /**
235
- * Get unique tags from events
236
- * @param events - Array of events
237
- * @returns Array of unique tags
234
+ /**
235
+ * Get unique tags from events
236
+ * @param events - Array of events
237
+ * @returns Array of unique tags
238
238
  */
239
239
  export const getUniqueEventTags = events => {
240
240
  const allTags = events.flatMap(event => event.tags || []);
241
241
  return Array.from(new Set(allTags)).sort();
242
242
  };
243
243
 
244
- /**
245
- * Calculate event statistics
246
- * @param events - Array of events
247
- * @returns Event statistics object
244
+ /**
245
+ * Calculate event statistics
246
+ * @param events - Array of events
247
+ * @returns Event statistics object
248
248
  */
249
249
  export const calculateEventStats = events => {
250
250
  const total = events.length;
@@ -1,18 +1,18 @@
1
- /**
2
- * Programmatic Onairos Flow
3
- *
4
- * This function executes the complete Onairos authentication and onboarding flow
5
- * that can be attached to custom buttons or called programmatically.
1
+ /**
2
+ * Programmatic Onairos Flow
3
+ *
4
+ * This function executes the complete Onairos authentication and onboarding flow
5
+ * that can be attached to custom buttons or called programmatically.
6
6
  */
7
7
 
8
8
  import { initializePlatformAuthService } from '../services/platformAuthService';
9
9
 
10
- /**
11
- * Execute the complete Onairos flow programmatically
12
- * This is the same logic that the OnairosButton uses internally
13
- *
14
- * @param options Configuration options for the flow
15
- * @returns Promise that resolves when flow is complete
10
+ /**
11
+ * Execute the complete Onairos flow programmatically
12
+ * This is the same logic that the OnairosButton uses internally
13
+ *
14
+ * @param options Configuration options for the flow
15
+ * @returns Promise that resolves when flow is complete
16
16
  */
17
17
  export const executeOnairosFlow = async options => {
18
18
  try {
@@ -86,11 +86,11 @@ export const executeOnairosFlow = async options => {
86
86
  }
87
87
  };
88
88
 
89
- /**
90
- * Simple wrapper function that matches the OnairosButton click behavior
91
- *
92
- * @param options Configuration options for the flow
93
- * @returns Promise that resolves when flow is complete
89
+ /**
90
+ * Simple wrapper function that matches the OnairosButton click behavior
91
+ *
92
+ * @param options Configuration options for the flow
93
+ * @returns Promise that resolves when flow is complete
94
94
  */
95
95
  export const startOnairosFlow = async options => {
96
96
  // Pre-check if provided
@@ -1,12 +1,12 @@
1
- /**
2
- * 🔄 Retry Helper Utility
3
- *
4
- * Provides robust retry logic with exponential backoff for network operations.
5
- * Used throughout the Onairos SDK for handling transient failures gracefully.
1
+ /**
2
+ * 🔄 Retry Helper Utility
3
+ *
4
+ * Provides robust retry logic with exponential backoff for network operations.
5
+ * Used throughout the Onairos SDK for handling transient failures gracefully.
6
6
  */
7
7
 
8
- /**
9
- * Default retry options for the Onairos SDK
8
+ /**
9
+ * Default retry options for the Onairos SDK
10
10
  */
11
11
  export const DEFAULT_RETRY_OPTIONS = {
12
12
  maxRetries: 3,
@@ -33,11 +33,11 @@ export const DEFAULT_RETRY_OPTIONS = {
33
33
  }
34
34
  };
35
35
 
36
- /**
37
- * Execute a function with retry logic and exponential backoff
38
- * @param fn Function to execute (should return a Promise)
39
- * @param options Retry configuration options
40
- * @returns Promise with retry result
36
+ /**
37
+ * Execute a function with retry logic and exponential backoff
38
+ * @param fn Function to execute (should return a Promise)
39
+ * @param options Retry configuration options
40
+ * @returns Promise with retry result
41
41
  */
42
42
  export async function withRetry(fn, options = {}) {
43
43
  const config = {
@@ -100,8 +100,8 @@ export async function withRetry(fn, options = {}) {
100
100
  };
101
101
  }
102
102
 
103
- /**
104
- * Retry configuration for API calls
103
+ /**
104
+ * Retry configuration for API calls
105
105
  */
106
106
  export const API_RETRY_OPTIONS = {
107
107
  maxRetries: 3,
@@ -147,8 +147,8 @@ export const API_RETRY_OPTIONS = {
147
147
  }
148
148
  };
149
149
 
150
- /**
151
- * Specialized retry for network/connectivity issues
150
+ /**
151
+ * Specialized retry for network/connectivity issues
152
152
  */
153
153
  export const NETWORK_RETRY_OPTIONS = {
154
154
  maxRetries: 2,
@@ -161,12 +161,12 @@ export const NETWORK_RETRY_OPTIONS = {
161
161
  }
162
162
  };
163
163
 
164
- /**
165
- * Create a retry wrapper for fetch requests
166
- * @param url Request URL
167
- * @param options Fetch options
168
- * @param retryOptions Retry configuration
169
- * @returns Promise with fetch response
164
+ /**
165
+ * Create a retry wrapper for fetch requests
166
+ * @param url Request URL
167
+ * @param options Fetch options
168
+ * @param retryOptions Retry configuration
169
+ * @returns Promise with fetch response
170
170
  */
171
171
  export async function fetchWithRetry(url, options = {}, retryOptions = API_RETRY_OPTIONS) {
172
172
  const result = await withRetry(() => fetch(url, options), retryOptions);
@@ -176,11 +176,11 @@ export async function fetchWithRetry(url, options = {}, retryOptions = API_RETRY
176
176
  return result.data;
177
177
  }
178
178
 
179
- /**
180
- * Health check function with retry for testing connectivity
181
- * @param url URL to check
182
- * @param timeout Timeout in milliseconds
183
- * @returns Promise indicating if the service is reachable
179
+ /**
180
+ * Health check function with retry for testing connectivity
181
+ * @param url URL to check
182
+ * @param timeout Timeout in milliseconds
183
+ * @returns Promise indicating if the service is reachable
184
184
  */
185
185
  export async function healthCheck(url, timeout = 5000) {
186
186
  const startTime = Date.now();
@@ -1 +1 @@
1
- {"version":3,"file":"ModalSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ModalSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,UAAU,eAAe;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuBzC,CAAC;AAeF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ModalSheet.d.ts","sourceRoot":"","sources":["../../../src/components/ModalSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,SAAS,EACV,MAAM,cAAc,CAAC;AAKtB,UAAU,eAAe;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwBzC,CAAC;AAeF,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,UAAU,CAAC"}
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ export interface OnairosButtonProps {
3
+ AppName: string;
4
+ buttonType?: 'normal' | 'pill';
5
+ buttonWidth?: number;
6
+ buttonHeight?: number;
7
+ hasStroke?: boolean;
8
+ enabled?: boolean;
9
+ buttonForm?: 'default' | 'login' | 'signup' | 'connect';
10
+ onResolved?: (token: string, email?: string) => void;
11
+ onRejection?: (error: any) => void;
12
+ preCheck?: () => Promise<boolean>;
13
+ color?: string;
14
+ swerv?: boolean;
15
+ darkMode?: boolean;
16
+ returnLink?: string;
17
+ preferredPlatform?: string;
18
+ autoFetch?: boolean;
19
+ inferenceData?: any;
20
+ textLayout?: 'left' | 'right' | 'center';
21
+ textColor?: string;
22
+ proofMode?: boolean;
23
+ webpageName?: string;
24
+ debug?: boolean;
25
+ testMode?: boolean;
26
+ requestData?: any;
27
+ onPress?: () => void;
28
+ primaryAuthOnly?: boolean;
29
+ useNewWelcomeFlow?: boolean;
30
+ }
31
+ export interface OnairosButtonRef {
32
+ trigger: () => Promise<void>;
33
+ reset: () => Promise<void>;
34
+ }
35
+ export declare const OnairosButton: React.ForwardRefExoticComponent<OnairosButtonProps & React.RefAttributes<OnairosButtonRef>>;
36
+ export default OnairosButton;
37
+ //# sourceMappingURL=OnairosButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OnairosButton.d.ts","sourceRoot":"","sources":["../../../src/components/OnairosButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4E,MAAM,OAAO,CAAC;AAcjG,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxD,UAAU,CAAC,EAAE,CAAC,KAAK,E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AAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA6DlE,CAAC"}
1
+ {"version":3,"file":"OnairosSignInButton.d.ts","sourceRoot":"","sources":["../../../src/components/OnairosSignInButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAMrD,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAkFlE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"WelcomeScreen.d.ts","sourceRoot":"","sources":["../../../src/components/WelcomeScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA4B3D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAID,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiY/C,CAAC;AAmDF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"WelcomeScreen.d.ts","sourceRoot":"","sources":["../../../src/components/WelcomeScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA4B3D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAID,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkZ/C,CAAC;AAmDF,eAAe,aAAa,CAAC"}
@@ -4,8 +4,9 @@
4
4
  *
5
5
  * PUBLIC API - Complete redesigned UI and enhanced functionality
6
6
  */
7
- export type { OnairosProps, DataTier, OnairosConfig, TestModeOptions, UniversalOnboardingProps, ConnectionStatus, PlatformConfig, } from './types';
7
+ export type { OnairosButtonProps, OnairosProps, DataTier, OnairosConfig, TestModeOptions, UniversalOnboardingProps, ConnectionStatus, PlatformConfig, } from './types';
8
8
  export type { OnairosSignInButtonProps } from './components/OnairosSignInButton';
9
+ export { OnairosButton } from './components/OnairosButton';
9
10
  export { OnairosSignInButton } from './components/OnairosSignInButton';
10
11
  export { Onairos } from './components/Onairos';
11
12
  export { UniversalOnboarding } from './components/UniversalOnboarding';
@@ -28,6 +29,7 @@ export { initiateOAuth, initiateNativeAuth, hasNativeSDK, isOAuthCallback, } fro
28
29
  export { updateGoogleClientIds, } from './services/googleAuthService';
29
30
  export { ApiClient } from './services/apiClient';
30
31
  declare const _default: {
32
+ OnairosButton: import("react").ForwardRefExoticComponent<import("./components/OnairosButton").OnairosButtonProps & import("react").RefAttributes<import("./components/OnairosButton").OnairosButtonRef>>;
31
33
  OnairosSignInButton: import("react").FC<import("./components/OnairosSignInButton").OnairosSignInButtonProps>;
32
34
  Onairos: import("react").ForwardRefExoticComponent<import("./types").OnairosProps & import("react").RefAttributes<any>>;
33
35
  UniversalOnboarding: import("react").FC<import("./components/UniversalOnboarding").UniversalOnboardingProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,GACf,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAGjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,M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