@oxyhq/services 0.1.17 → 5.1.7

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 (183) hide show
  1. package/README.md +17 -138
  2. package/UI_COMPONENTS.md +142 -0
  3. package/lib/commonjs/assets/OxyLogo.svg +1 -0
  4. package/lib/commonjs/assets/assets/OxyLogo.svg +1 -0
  5. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  6. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  7. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  8. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  9. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  10. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  11. package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  12. package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  13. package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  14. package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  15. package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  16. package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  17. package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  18. package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  19. package/lib/commonjs/core/index.js +783 -0
  20. package/lib/commonjs/core/index.js.map +1 -0
  21. package/lib/commonjs/index.js +128 -0
  22. package/lib/commonjs/index.js.map +1 -0
  23. package/lib/commonjs/models/interfaces.js +2 -0
  24. package/lib/commonjs/models/interfaces.js.map +1 -0
  25. package/lib/commonjs/package.json +1 -0
  26. package/lib/commonjs/ui/components/FontLoader.js +181 -0
  27. package/lib/commonjs/ui/components/FontLoader.js.map +1 -0
  28. package/lib/commonjs/ui/components/OxyLogo.js +56 -0
  29. package/lib/commonjs/ui/components/OxyLogo.js.map +1 -0
  30. package/lib/commonjs/ui/components/OxyProvider.js +464 -0
  31. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -0
  32. package/lib/commonjs/ui/components/OxySignInButton.js +178 -0
  33. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -0
  34. package/lib/commonjs/ui/components/bottomSheet/index.js +37 -0
  35. package/lib/commonjs/ui/components/bottomSheet/index.js.map +1 -0
  36. package/lib/commonjs/ui/context/OxyContext.js +296 -0
  37. package/lib/commonjs/ui/context/OxyContext.js.map +1 -0
  38. package/lib/commonjs/ui/index.js +136 -0
  39. package/lib/commonjs/ui/index.js.map +1 -0
  40. package/lib/commonjs/ui/navigation/OxyRouter.js +140 -0
  41. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -0
  42. package/lib/commonjs/ui/navigation/types.js +6 -0
  43. package/lib/commonjs/ui/navigation/types.js.map +1 -0
  44. package/lib/commonjs/ui/screens/AccountCenterScreen.js +280 -0
  45. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -0
  46. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +578 -0
  47. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -0
  48. package/lib/commonjs/ui/screens/SignInScreen.js +230 -0
  49. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -0
  50. package/lib/commonjs/ui/screens/SignUpScreen.js +673 -0
  51. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -0
  52. package/lib/commonjs/ui/styles/FONTS.md +126 -0
  53. package/lib/commonjs/ui/styles/fonts.js +84 -0
  54. package/lib/commonjs/ui/styles/fonts.js.map +1 -0
  55. package/lib/commonjs/ui/styles/index.js +28 -0
  56. package/lib/commonjs/ui/styles/index.js.map +1 -0
  57. package/lib/commonjs/ui/styles/theme.js +122 -0
  58. package/lib/commonjs/ui/styles/theme.js.map +1 -0
  59. package/lib/module/assets/OxyLogo.svg +1 -0
  60. package/lib/module/assets/assets/OxyLogo.svg +1 -0
  61. package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  62. package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  63. package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  64. package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  65. package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  66. package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  67. package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  68. package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  69. package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  70. package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  71. package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  72. package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  73. package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  74. package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  75. package/lib/module/core/index.js +777 -0
  76. package/lib/module/core/index.js.map +1 -0
  77. package/lib/module/index.js +29 -0
  78. package/lib/module/index.js.map +1 -0
  79. package/lib/module/models/interfaces.js +2 -0
  80. package/lib/module/models/interfaces.js.map +1 -0
  81. package/lib/module/package.json +1 -0
  82. package/lib/module/ui/components/FontLoader.js +176 -0
  83. package/lib/module/ui/components/FontLoader.js.map +1 -0
  84. package/lib/module/ui/components/OxyLogo.js +49 -0
  85. package/lib/module/ui/components/OxyLogo.js.map +1 -0
  86. package/lib/module/ui/components/OxyProvider.js +458 -0
  87. package/lib/module/ui/components/OxyProvider.js.map +1 -0
  88. package/lib/module/ui/components/OxySignInButton.js +172 -0
  89. package/lib/module/ui/components/OxySignInButton.js.map +1 -0
  90. package/lib/module/ui/components/bottomSheet/index.js +8 -0
  91. package/lib/module/ui/components/bottomSheet/index.js.map +1 -0
  92. package/lib/module/ui/context/OxyContext.js +291 -0
  93. package/lib/module/ui/context/OxyContext.js.map +1 -0
  94. package/lib/module/ui/index.js +25 -0
  95. package/lib/module/ui/index.js.map +1 -0
  96. package/lib/module/ui/navigation/OxyRouter.js +133 -0
  97. package/lib/module/ui/navigation/OxyRouter.js.map +1 -0
  98. package/lib/module/ui/navigation/types.js +4 -0
  99. package/lib/module/ui/navigation/types.js.map +1 -0
  100. package/lib/module/ui/screens/AccountCenterScreen.js +275 -0
  101. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -0
  102. package/lib/module/ui/screens/AccountOverviewScreen.js +573 -0
  103. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -0
  104. package/lib/module/ui/screens/SignInScreen.js +224 -0
  105. package/lib/module/ui/screens/SignInScreen.js.map +1 -0
  106. package/lib/module/ui/screens/SignUpScreen.js +668 -0
  107. package/lib/module/ui/screens/SignUpScreen.js.map +1 -0
  108. package/lib/module/ui/styles/FONTS.md +126 -0
  109. package/lib/module/ui/styles/fonts.js +81 -0
  110. package/lib/module/ui/styles/fonts.js.map +1 -0
  111. package/lib/module/ui/styles/index.js +5 -0
  112. package/lib/module/ui/styles/index.js.map +1 -0
  113. package/lib/module/ui/styles/theme.js +115 -0
  114. package/lib/module/ui/styles/theme.js.map +1 -0
  115. package/lib/typescript/core/index.d.ts +304 -0
  116. package/lib/typescript/core/index.d.ts.map +1 -0
  117. package/lib/typescript/index.d.ts +11 -0
  118. package/lib/typescript/index.d.ts.map +1 -0
  119. package/lib/typescript/models/interfaces.d.ts +98 -0
  120. package/lib/typescript/models/interfaces.d.ts.map +1 -0
  121. package/lib/typescript/ui/components/FontLoader.d.ts +15 -0
  122. package/lib/typescript/ui/components/FontLoader.d.ts.map +1 -0
  123. package/lib/typescript/ui/components/OxyLogo.d.ts +29 -0
  124. package/lib/typescript/ui/components/OxyLogo.d.ts.map +1 -0
  125. package/lib/typescript/ui/components/OxyProvider.d.ts +12 -0
  126. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -0
  127. package/lib/typescript/ui/components/OxySignInButton.d.ts +65 -0
  128. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -0
  129. package/lib/typescript/ui/components/bottomSheet/index.d.ts +3 -0
  130. package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -0
  131. package/lib/typescript/ui/context/OxyContext.d.ts +26 -0
  132. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -0
  133. package/lib/typescript/ui/index.d.ts +15 -0
  134. package/lib/typescript/ui/index.d.ts.map +1 -0
  135. package/lib/typescript/ui/navigation/OxyRouter.d.ts +5 -0
  136. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -0
  137. package/lib/typescript/ui/navigation/types.d.ts +107 -0
  138. package/lib/typescript/ui/navigation/types.d.ts.map +1 -0
  139. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +5 -0
  140. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -0
  141. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +5 -0
  142. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -0
  143. package/lib/typescript/ui/screens/SignInScreen.d.ts +5 -0
  144. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -0
  145. package/lib/typescript/ui/screens/SignUpScreen.d.ts +5 -0
  146. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -0
  147. package/lib/typescript/ui/styles/fonts.d.ts +21 -0
  148. package/lib/typescript/ui/styles/fonts.d.ts.map +1 -0
  149. package/lib/typescript/ui/styles/index.d.ts +3 -0
  150. package/lib/typescript/ui/styles/index.d.ts.map +1 -0
  151. package/lib/typescript/ui/styles/theme.d.ts +69 -0
  152. package/lib/typescript/ui/styles/theme.d.ts.map +1 -0
  153. package/package.json +95 -51
  154. package/src/assets/OxyLogo.svg +1 -0
  155. package/src/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
  156. package/src/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
  157. package/src/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
  158. package/src/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
  159. package/src/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
  160. package/src/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
  161. package/src/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
  162. package/src/core/index.ts +768 -0
  163. package/src/index.ts +46 -0
  164. package/src/models/interfaces.ts +128 -0
  165. package/src/ui/components/FontLoader.tsx +180 -0
  166. package/src/ui/components/OxyLogo.tsx +73 -0
  167. package/src/ui/components/OxyProvider.tsx +490 -0
  168. package/src/ui/components/OxySignInButton.tsx +207 -0
  169. package/src/ui/components/bottomSheet/index.tsx +12 -0
  170. package/src/ui/context/OxyContext.tsx +344 -0
  171. package/src/ui/index.ts +27 -0
  172. package/src/ui/navigation/OxyRouter.tsx +137 -0
  173. package/src/ui/navigation/types.ts +124 -0
  174. package/src/ui/screens/AccountCenterScreen.tsx +240 -0
  175. package/src/ui/screens/AccountOverviewScreen.tsx +519 -0
  176. package/src/ui/screens/SignInScreen.tsx +210 -0
  177. package/src/ui/screens/SignUpScreen.tsx +607 -0
  178. package/src/ui/styles/FONTS.md +126 -0
  179. package/src/ui/styles/fonts.ts +77 -0
  180. package/src/ui/styles/index.ts +2 -0
  181. package/src/ui/styles/theme.ts +142 -0
  182. package/dist/index.d.ts +0 -152
  183. package/dist/index.js +0 -1
@@ -0,0 +1,458 @@
1
+ "use strict";
2
+
3
+ // filepath: /home/nate/OxyServicesandApi/OxyHQServices/src/ui/components/OxyProvider.tsx
4
+ import React, { useCallback, useRef, useState, useEffect } from 'react';
5
+ import { View, StyleSheet, Dimensions, Platform, Animated, StatusBar, Keyboard } from 'react-native';
6
+ import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
7
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
8
+ import { OxyContextProvider, useOxy } from '../context/OxyContext';
9
+ import OxyRouter from '../navigation/OxyRouter';
10
+ import { FontLoader, setupFonts } from './FontLoader';
11
+
12
+ // Import bottom sheet components directly - no longer a peer dependency
13
+ import { BottomSheetModal, BottomSheetBackdrop, BottomSheetModalProvider, BottomSheetView } from './bottomSheet';
14
+
15
+ // Initialize fonts automatically
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
+ setupFonts();
18
+ const {
19
+ height,
20
+ width
21
+ } = Dimensions.get('window');
22
+
23
+ /**
24
+ * Enhanced OxyProvider component
25
+ *
26
+ * This component serves two purposes:
27
+ * 1. As a context provider for authentication and session management across the app
28
+ * 2. As a UI component for authentication and account management using a bottom sheet
29
+ */
30
+ const OxyProvider = props => {
31
+ const {
32
+ oxyServices,
33
+ children,
34
+ contextOnly = false,
35
+ onAuthStateChange,
36
+ storageKeyPrefix,
37
+ ...bottomSheetProps
38
+ } = props;
39
+
40
+ // Create internal bottom sheet ref
41
+ const internalBottomSheetRef = useRef(null);
42
+
43
+ // If contextOnly is true, we just provide the context without the bottom sheet UI
44
+ if (contextOnly) {
45
+ return /*#__PURE__*/_jsx(OxyContextProvider, {
46
+ oxyServices: oxyServices,
47
+ storageKeyPrefix: storageKeyPrefix,
48
+ onAuthStateChange: onAuthStateChange,
49
+ children: children
50
+ });
51
+ }
52
+
53
+ // Otherwise, provide both the context and the bottom sheet UI
54
+ return /*#__PURE__*/_jsx(OxyContextProvider, {
55
+ oxyServices: oxyServices,
56
+ storageKeyPrefix: storageKeyPrefix,
57
+ onAuthStateChange: onAuthStateChange,
58
+ bottomSheetRef: internalBottomSheetRef,
59
+ children: /*#__PURE__*/_jsx(FontLoader, {
60
+ children: /*#__PURE__*/_jsx(GestureHandlerRootView, {
61
+ style: styles.gestureHandlerRoot,
62
+ children: /*#__PURE__*/_jsxs(BottomSheetModalProvider, {
63
+ children: [/*#__PURE__*/_jsx(StatusBar, {
64
+ translucent: true,
65
+ backgroundColor: "transparent"
66
+ }), /*#__PURE__*/_jsxs(SafeAreaProvider, {
67
+ children: [/*#__PURE__*/_jsx(OxyBottomSheet, {
68
+ ...bottomSheetProps,
69
+ bottomSheetRef: internalBottomSheetRef,
70
+ oxyServices: oxyServices
71
+ }), children]
72
+ })]
73
+ })
74
+ })
75
+ })
76
+ });
77
+ };
78
+
79
+ /**
80
+ * OxyBottomSheet component - A bottom sheet-based authentication and account management UI
81
+ *
82
+ * This is the original OxyProvider UI functionality, now extracted into its own component
83
+ * and reimplemented using BottomSheetModal for better Android compatibility
84
+ */
85
+ const OxyBottomSheet = ({
86
+ oxyServices,
87
+ initialScreen = 'SignIn',
88
+ onClose,
89
+ onAuthenticated,
90
+ theme = 'light',
91
+ customStyles = {},
92
+ bottomSheetRef,
93
+ autoPresent = false
94
+ }) => {
95
+ // Use the internal ref (which is passed as a prop from OxyProvider)
96
+ const modalRef = useRef(null);
97
+
98
+ // Set up effect to sync the internal ref with our modal ref
99
+ useEffect(() => {
100
+ if (bottomSheetRef && modalRef.current) {
101
+ // We need to expose certain methods to the internal ref
102
+ const methodsToExpose = ['snapToIndex', 'snapToPosition', 'close', 'expand', 'collapse'];
103
+ methodsToExpose.forEach(method => {
104
+ if (modalRef.current && typeof modalRef.current[method] === 'function') {
105
+ // Properly forward methods from modalRef to bottomSheetRef
106
+ // @ts-ignore - We're doing a runtime compatibility layer
107
+ bottomSheetRef.current = bottomSheetRef.current || {};
108
+ // @ts-ignore - Dynamic method assignment
109
+ bottomSheetRef.current[method] = (...args) => {
110
+ // @ts-ignore - Dynamic method call
111
+ return modalRef.current?.[method]?.(...args);
112
+ };
113
+ }
114
+ });
115
+
116
+ // Add a method to navigate between screens
117
+ // @ts-ignore - Adding custom method
118
+ bottomSheetRef.current._navigateToScreen = screenName => {
119
+ // Access the navigation function exposed by OxyRouter
120
+ // Use internal mechanism to notify router about navigation
121
+ // We'll use a simple event-based approach
122
+ if (typeof document !== 'undefined') {
123
+ // For web - use a custom event
124
+ const event = new CustomEvent('oxy:navigate', {
125
+ detail: screenName
126
+ });
127
+ document.dispatchEvent(event);
128
+ } else {
129
+ // For React Native - use the navigation prop directly if available
130
+ console.log(`Requesting navigation to ${screenName}`);
131
+ // We'll implement a simpler mechanism in OxyRouter
132
+ }
133
+ };
134
+ }
135
+ }, [bottomSheetRef, modalRef]);
136
+
137
+ // Use percentage-based snap points for better cross-platform compatibility
138
+ const [snapPoints, setSnapPoints] = useState(['60%', '85%']);
139
+
140
+ // Animation values - we'll use these for content animations
141
+ const fadeAnim = useRef(new Animated.Value(0)).current;
142
+ const slideAnim = useRef(new Animated.Value(50)).current;
143
+ const handleScaleAnim = useRef(new Animated.Value(1)).current;
144
+
145
+ // Track keyboard status
146
+ const [keyboardVisible, setKeyboardVisible] = useState(false);
147
+ const [keyboardHeight, setKeyboardHeight] = useState(0);
148
+ const insets = useSafeAreaInsets();
149
+
150
+ // Get the authentication context
151
+ const oxyContext = useOxy();
152
+
153
+ // Handle keyboard events
154
+ useEffect(() => {
155
+ const keyboardWillShowListener = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', event => {
156
+ setKeyboardVisible(true);
157
+ // Get keyboard height from event
158
+ const keyboardHeightValue = event.endCoordinates.height;
159
+ setKeyboardHeight(keyboardHeightValue);
160
+
161
+ // Ensure the bottom sheet remains visible when keyboard opens
162
+ // by adjusting to the highest snap point
163
+ if (modalRef.current) {
164
+ modalRef.current.snapToIndex(1);
165
+ }
166
+ });
167
+ const keyboardWillHideListener = Keyboard.addListener(Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', () => {
168
+ setKeyboardVisible(false);
169
+ setKeyboardHeight(0);
170
+ });
171
+
172
+ // Cleanup listeners
173
+ return () => {
174
+ keyboardWillShowListener.remove();
175
+ keyboardWillHideListener.remove();
176
+ };
177
+ }, []);
178
+
179
+ // Present the modal when component mounts, but only if autoPresent is true
180
+ useEffect(() => {
181
+ // Add expand method that handles presentation and animations
182
+ if (bottomSheetRef && modalRef.current) {
183
+ // Override expand to handle initial presentation
184
+ // @ts-ignore - Dynamic method assignment
185
+ bottomSheetRef.current.expand = () => {
186
+ // Only present if not already presented
187
+ modalRef.current?.present();
188
+
189
+ // Start content animations after presenting
190
+ Animated.parallel([Animated.timing(fadeAnim, {
191
+ toValue: 1,
192
+ duration: 300,
193
+ useNativeDriver: Platform.OS === 'ios' // Only use native driver on iOS
194
+ }), Animated.spring(slideAnim, {
195
+ toValue: 0,
196
+ friction: 8,
197
+ tension: 40,
198
+ useNativeDriver: Platform.OS === 'ios' // Only use native driver on iOS
199
+ })]).start();
200
+ };
201
+ }
202
+
203
+ // Auto-present if the autoPresent prop is true
204
+ if (autoPresent && modalRef.current) {
205
+ // Small delay to allow everything to initialize
206
+ const timer = setTimeout(() => {
207
+ modalRef.current?.present();
208
+
209
+ // Start content animations after presenting
210
+ Animated.parallel([Animated.timing(fadeAnim, {
211
+ toValue: 1,
212
+ duration: 300,
213
+ useNativeDriver: Platform.OS === 'ios' // Only use native driver on iOS
214
+ }), Animated.spring(slideAnim, {
215
+ toValue: 0,
216
+ friction: 8,
217
+ tension: 40,
218
+ useNativeDriver: Platform.OS === 'ios' // Only use native driver on iOS
219
+ })]).start();
220
+ }, 100);
221
+ return () => clearTimeout(timer);
222
+ }
223
+ }, [bottomSheetRef, modalRef, fadeAnim, slideAnim, autoPresent]);
224
+
225
+ // Handle authentication success from the bottom sheet screens
226
+ const handleAuthenticated = useCallback(user => {
227
+ // Call the prop callback if provided
228
+ if (onAuthenticated) {
229
+ onAuthenticated(user);
230
+ }
231
+ }, [onAuthenticated]);
232
+
233
+ // Handle indicator animation - subtle pulse effect
234
+ useEffect(() => {
235
+ const pulseAnimation = Animated.sequence([Animated.timing(handleScaleAnim, {
236
+ toValue: 1.1,
237
+ duration: 300,
238
+ useNativeDriver: Platform.OS === 'ios' // Only use native driver on iOS
239
+ }), Animated.timing(handleScaleAnim, {
240
+ toValue: 1,
241
+ duration: 300,
242
+ useNativeDriver: Platform.OS === 'ios' // Only use native driver on iOS
243
+ })]);
244
+
245
+ // Run the animation once when component mounts
246
+ pulseAnimation.start();
247
+ }, []);
248
+
249
+ // Handle backdrop rendering
250
+ const renderBackdrop = useCallback(props => /*#__PURE__*/_jsx(BottomSheetBackdrop, {
251
+ ...props,
252
+ disappearsOnIndex: -1,
253
+ appearsOnIndex: 0,
254
+ opacity: 0.5
255
+ }), []);
256
+
257
+ // Background style based on theme
258
+ const getBackgroundStyle = () => {
259
+ const baseColor = customStyles.backgroundColor || (theme === 'light' ? '#FFFFFF' : '#121212');
260
+ return {
261
+ backgroundColor: baseColor,
262
+ // Make sure there's no transparency
263
+ opacity: 1,
264
+ // Additional Android-specific styles
265
+ ...Platform.select({
266
+ android: {
267
+ elevation: 24
268
+ }
269
+ })
270
+ };
271
+ };
272
+
273
+ // Method to adjust snap points from Router
274
+ const adjustSnapPoints = useCallback(points => {
275
+ // Ensure snap points are high enough when keyboard is visible
276
+ if (keyboardVisible) {
277
+ // If keyboard is visible, make sure we use higher snap points
278
+ // to ensure the sheet content remains visible
279
+ const highestPoint = points[points.length - 1];
280
+ setSnapPoints([highestPoint, highestPoint]);
281
+ } else {
282
+ setSnapPoints(points);
283
+ }
284
+ }, [keyboardVisible]);
285
+
286
+ // Method to programmatically navigate to a specific screen
287
+ const navigateToScreen = useCallback(screenName => {
288
+ // If we have a router component with navigate method, use it
289
+ if (modalRef.current) {
290
+ // Store the navigate function on the modal ref so it can be accessed externally
291
+ // @ts-ignore - Adding custom property for external navigation
292
+ modalRef.current._navigateToScreen = screen => {
293
+ // This will be populated by the OxyRouter component when it renders
294
+ console.log(`Navigating to ${screen} programmatically`);
295
+ };
296
+ }
297
+ }, []);
298
+
299
+ // Close the bottom sheet with animation
300
+ const handleClose = useCallback(() => {
301
+ // Animate content out
302
+ Animated.timing(fadeAnim, {
303
+ toValue: 0,
304
+ duration: Platform.OS === 'android' ? 100 : 200,
305
+ // Faster on Android
306
+ useNativeDriver: Platform.OS === 'ios' // Only use native driver on iOS
307
+ }).start(() => {
308
+ // Dismiss the sheet
309
+ modalRef.current?.dismiss();
310
+ if (onClose) {
311
+ setTimeout(() => {
312
+ onClose();
313
+ }, Platform.OS === 'android' ? 150 : 100);
314
+ }
315
+ });
316
+ }, [onClose, fadeAnim]);
317
+
318
+ // Handle sheet index changes
319
+ const handleSheetChanges = useCallback(index => {
320
+ if (index === -1 && onClose) {
321
+ onClose();
322
+ } else if (index === 1) {
323
+ // Pulse animation when expanded to full height
324
+ Animated.sequence([Animated.timing(handleScaleAnim, {
325
+ toValue: 1.2,
326
+ duration: 200,
327
+ useNativeDriver: Platform.OS === 'ios' // Only use native driver on iOS
328
+ }), Animated.timing(handleScaleAnim, {
329
+ toValue: 1,
330
+ duration: 200,
331
+ useNativeDriver: Platform.OS === 'ios' // Only use native driver on iOS
332
+ })]).start();
333
+ } else if (index === 0 && keyboardVisible) {
334
+ // If keyboard is visible and user tries to go to a smaller snap point,
335
+ // force the sheet to stay at the highest point for better visibility
336
+ modalRef.current?.snapToIndex(1);
337
+ }
338
+ }, [onClose, handleScaleAnim, keyboardVisible]);
339
+ return /*#__PURE__*/_jsx(BottomSheetModal, {
340
+ ref: modalRef,
341
+ index: 0,
342
+ snapPoints: snapPoints,
343
+ enablePanDownToClose: true,
344
+ backdropComponent: renderBackdrop,
345
+ handleComponent: () => /*#__PURE__*/_jsx(Animated.View, {
346
+ style: {
347
+ alignItems: 'center',
348
+ paddingVertical: 8,
349
+ ...(Platform.OS === 'ios' ? {
350
+ transform: [{
351
+ scale: handleScaleAnim
352
+ }]
353
+ } : {})
354
+ },
355
+ children: /*#__PURE__*/_jsx(View, {
356
+ style: [styles.indicator, {
357
+ backgroundColor: customStyles.handleColor || (theme === 'light' ? '#CCCCCC' : '#444444')
358
+ }]
359
+ })
360
+ }),
361
+ backgroundStyle: [getBackgroundStyle(), {
362
+ borderTopLeftRadius: 35,
363
+ borderTopRightRadius: 35
364
+ }],
365
+ handleIndicatorStyle: {
366
+ backgroundColor: customStyles.handleColor || (theme === 'light' ? '#CCCCCC' : '#444444'),
367
+ width: 40,
368
+ height: 4
369
+ },
370
+ onChange: handleSheetChanges
371
+ // Adding additional props to improve layout behavior
372
+ ,
373
+ keyboardBehavior: "interactive",
374
+ keyboardBlurBehavior: "restore",
375
+ android_keyboardInputMode: "adjustResize",
376
+ enableOverDrag: true,
377
+ enableContentPanningGesture: true,
378
+ enableHandlePanningGesture: true,
379
+ overDragResistanceFactor: 2.5,
380
+ enableBlurKeyboardOnGesture: true
381
+ // Log sheet animations for debugging
382
+ ,
383
+ onAnimate: (fromIndex, toIndex) => {
384
+ console.log(`Animating from index ${fromIndex} to ${toIndex}`);
385
+ },
386
+ children: /*#__PURE__*/_jsx(BottomSheetView, {
387
+ style: [styles.contentContainer,
388
+ // Override padding if provided in customStyles
389
+ customStyles.contentPadding !== undefined && {
390
+ padding: customStyles.contentPadding
391
+ },
392
+ // Add bottom padding when keyboard is visible to ensure content is not covered
393
+ keyboardVisible && {
394
+ paddingBottom: Math.max(keyboardHeight - insets.bottom, 0)
395
+ }],
396
+ children: /*#__PURE__*/_jsx(Animated.View, {
397
+ style: [styles.animatedContent,
398
+ // Apply animations - conditionally for Android
399
+ Platform.OS === 'android' ? {
400
+ opacity: 1 // No fade animation on Android
401
+ } : {
402
+ opacity: fadeAnim,
403
+ transform: [{
404
+ translateY: slideAnim
405
+ }]
406
+ }],
407
+ children: /*#__PURE__*/_jsx(OxyRouter, {
408
+ oxyServices: oxyServices,
409
+ initialScreen: initialScreen,
410
+ onClose: handleClose,
411
+ onAuthenticated: handleAuthenticated,
412
+ theme: theme,
413
+ adjustSnapPoints: adjustSnapPoints
414
+ })
415
+ })
416
+ })
417
+ });
418
+ };
419
+ const styles = StyleSheet.create({
420
+ contentContainer: {
421
+ flex: 1,
422
+ padding: 16,
423
+ width: '100%',
424
+ height: '100%',
425
+ backgroundColor: 'transparent' // Make this transparent to let the bottom sheet background show through
426
+ },
427
+ animatedContent: {
428
+ flex: 1,
429
+ width: '100%',
430
+ height: '100%'
431
+ },
432
+ indicator: {
433
+ width: 40,
434
+ height: 4,
435
+ alignSelf: 'center',
436
+ marginTop: 8,
437
+ marginBottom: 8,
438
+ borderRadius: 35
439
+ },
440
+ errorContainer: {
441
+ flex: 1,
442
+ justifyContent: 'center',
443
+ alignItems: 'center'
444
+ },
445
+ gestureHandlerRoot: {
446
+ flex: 1,
447
+ position: 'relative',
448
+ backgroundColor: 'transparent',
449
+ ...Platform.select({
450
+ android: {
451
+ height: '100%',
452
+ width: '100%'
453
+ }
454
+ })
455
+ }
456
+ });
457
+ export default OxyProvider;
458
+ //# sourceMappingURL=OxyProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useCallback","useRef","useState","useEffect","View","StyleSheet","Dimensions","Platform","Animated","StatusBar","Keyboard","SafeAreaProvider","useSafeAreaInsets","GestureHandlerRootView","OxyContextProvider","useOxy","OxyRouter","FontLoader","setupFonts","BottomSheetModal","BottomSheetBackdrop","BottomSheetModalProvider","BottomSheetView","jsx","_jsx","jsxs","_jsxs","height","width","get","OxyProvider","props","oxyServices","children","contextOnly","onAuthStateChange","storageKeyPrefix","bottomSheetProps","internalBottomSheetRef","bottomSheetRef","style","styles","gestureHandlerRoot","translucent","backgroundColor","OxyBottomSheet","initialScreen","onClose","onAuthenticated","theme","customStyles","autoPresent","modalRef","current","methodsToExpose","forEach","method","args","_navigateToScreen","screenName","document","event","CustomEvent","detail","dispatchEvent","console","log","snapPoints","setSnapPoints","fadeAnim","Value","slideAnim","handleScaleAnim","keyboardVisible","setKeyboardVisible","keyboardHeight","setKeyboardHeight","insets","oxyContext","keyboardWillShowListener","addListener","OS","keyboardHeightValue","endCoordinates","snapToIndex","keyboardWillHideListener","remove","expand","present","parallel","timing","toValue","duration","useNativeDriver","spring","friction","tension","start","timer","setTimeout","clearTimeout","handleAuthenticated","user","pulseAnimation","sequence","renderBackdrop","disappearsOnIndex","appearsOnIndex","opacity","getBackgroundStyle","baseColor","select","android","elevation","adjustSnapPoints","points","highestPoint","length","navigateToScreen","screen","handleClose","dismiss","handleSheetChanges","index","ref","enablePanDownToClose","backdropComponent","handleComponent","alignItems","paddingVertical","transform","scale","indicator","handleColor","backgroundStyle","borderTopLeftRadius","borderTopRightRadius","handleIndicatorStyle","onChange","keyboardBehavior","keyboardBlurBehavior","android_keyboardInputMode","enableOverDrag","enableContentPanningGesture","enableHandlePanningGesture","overDragResistanceFactor","enableBlurKeyboardOnGesture","onAnimate","fromIndex","toIndex","contentContainer","contentPadding","undefined","padding","paddingBottom","Math","max","bottom","animatedContent","translateY","create","flex","alignSelf","marginTop","marginBottom","borderRadius","errorContainer","justifyContent","position"],"sourceRoot":"../../../../src","sources":["ui/components/OxyProvider.tsx"],"mappings":";;AAAA;AACA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AACvE,SAASC,IAAI,EAAQC,UAAU,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,QAAuB,cAAc;AACzH,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,gCAAgC;AACpF,SAASC,sBAAsB,QAAQ,8BAA8B;AAMrE,SAASC,kBAAkB,EAAEC,MAAM,QAAQ,uBAAuB;AAClE,OAAOC,SAAS,MAAM,yBAAyB;AAC/C,SAASC,UAAU,EAAEC,UAAU,QAAQ,cAAc;;AAErD;AACA,SAASC,gBAAgB,EAAEC,mBAAmB,EAA4BC,wBAAwB,EAAEC,eAAe,QAAQ,eAAe;;AAE1I;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACAR,UAAU,CAAC,CAAC;AAEZ,MAAM;EAAES,MAAM;EAA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AAK,EAAEA,KAAM;UACbiE,gBAAgB,EAAEA;QAAiB,CACtC;MAAC,CACS;IAAC,CACH;EAAC,CACJ,CAAC;AAE3B,CAAC;AAED,MAAMzE,MAAM,GAAGpC,UAAU,CAAC2J,MAAM,CAAC;EAC7BV,gBAAgB,EAAE;IACdW,IAAI,EAAE,CAAC;IACPR,OAAO,EAAE,EAAE;IACX7H,KAAK,EAAE,MAAM;IACbD,MAAM,EAAE,MAAM;IACdiB,eAAe,EAAE,aAAa,CAAE;EACpC,CAAC;EACDkH,eAAe,EAAE;IACbG,IAAI,EAAE,CAAC;IACPrI,KAAK,EAAE,MAAM;IACbD,MAAM,EAAE;EACZ,CAAC;EACDyG,SAAS,EAAE;IACPxG,KAAK,EAAE,EAAE;IACTD,MAAM,EAAE,CAAC;IACTuI,SAAS,EAAE,QAAQ;IACnBC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,YAAY,EAAE;EAClB,CAAC;EACDC,cAAc,EAAE;IACZL,IAAI,EAAE,CAAC;IACPM,cAAc,EAAE,QAAQ;IACxBvC,UAAU,EAAE;EAChB,CAAC;EACDtF,kBAAkB,EAAE;IAChBuH,IAAI,EAAE,CAAC;IACPO,QAAQ,EAAE,UAAU;IACpB5H,eAAe,EAAE,aAAa;IAC9B,GAAGrC,QAAQ,CAACwG,MAAM,CAAC;MACfC,OAAO,EAAE;QACLrF,MAAM,EAAE,MAAM;QACdC,KAAK,EAAE;MACX;IACJ,CAAC;EACL;AACJ,CAAC,CAAC;AAEF,eAAeE,WAAW","ignoreList":[]}
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { TouchableOpacity, Text, View, StyleSheet, Platform } from 'react-native';
5
+ import { useOxy } from '../context/OxyContext';
6
+ import OxyLogo from './OxyLogo';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ /**
9
+ * A pre-styled button component for signing in with Oxy services
10
+ *
11
+ * This component automatically integrates with the OxyProvider context
12
+ * and will control the authentication bottom sheet when pressed.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * // Basic usage
17
+ * <OxySignInButton />
18
+ *
19
+ * // Custom styling
20
+ * <OxySignInButton
21
+ * variant="contained"
22
+ * style={{ marginTop: 20 }}
23
+ * text="Login with Oxy"
24
+ * />
25
+ *
26
+ * // Custom handler
27
+ * <OxySignInButton onPress={() => {
28
+ * // Custom authentication flow
29
+ * console.log('Custom auth flow initiated');
30
+ * }} />
31
+ * ```
32
+ */
33
+ export const OxySignInButton = ({
34
+ variant = 'default',
35
+ onPress,
36
+ style,
37
+ textStyle,
38
+ text = 'Sign in with Oxy',
39
+ disabled = false,
40
+ showWhenAuthenticated = false
41
+ }) => {
42
+ // Get all needed values from context in a single call
43
+ const {
44
+ user,
45
+ showBottomSheet
46
+ } = useOxy();
47
+
48
+ // Don't show the button if already authenticated (unless explicitly overridden)
49
+ if (user && !showWhenAuthenticated) return null;
50
+
51
+ // Default handler that uses the context methods
52
+ const handlePress = () => {
53
+ if (onPress) {
54
+ onPress();
55
+ return;
56
+ }
57
+
58
+ // Default behavior: open the bottom sheet and navigate to SignIn
59
+ if (showBottomSheet) {
60
+ // Show the bottom sheet and navigate to SignIn
61
+ showBottomSheet('SignIn');
62
+ } else {
63
+ console.warn('OxySignInButton: showBottomSheet is not available. Either provide an onPress prop or ensure this component is used within an OxyProvider.');
64
+ }
65
+ };
66
+
67
+ // Determine the button style based on the variant
68
+ const getButtonStyle = () => {
69
+ switch (variant) {
70
+ case 'outline':
71
+ return [styles.buttonOutline, style];
72
+ case 'contained':
73
+ return [styles.buttonContained, style];
74
+ default:
75
+ return [styles.buttonDefault, style];
76
+ }
77
+ };
78
+
79
+ // Determine the text style based on the variant
80
+ const getTextStyle = () => {
81
+ switch (variant) {
82
+ case 'outline':
83
+ return [styles.textOutline, textStyle];
84
+ case 'contained':
85
+ return [styles.textContained, textStyle];
86
+ default:
87
+ return [styles.textDefault, textStyle];
88
+ }
89
+ };
90
+
91
+ // This function was previously used for logo container styling
92
+ // Now removed as we're not using the container anymore
93
+
94
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
95
+ style: [styles.button, getButtonStyle(), disabled && styles.buttonDisabled],
96
+ onPress: handlePress,
97
+ disabled: disabled,
98
+ children: /*#__PURE__*/_jsxs(View, {
99
+ style: styles.buttonContent,
100
+ children: [/*#__PURE__*/_jsx(OxyLogo, {
101
+ width: 20,
102
+ height: 20,
103
+ fillColor: variant === 'contained' ? 'white' : '#d169e5',
104
+ secondaryFillColor: variant === 'contained' ? '#d169e5' : undefined,
105
+ style: disabled ? {
106
+ opacity: 0.6
107
+ } : undefined
108
+ }), /*#__PURE__*/_jsx(Text, {
109
+ style: [styles.text, getTextStyle(), disabled && styles.textDisabled],
110
+ children: text
111
+ })]
112
+ })
113
+ });
114
+ };
115
+ const styles = StyleSheet.create({
116
+ button: {
117
+ padding: 14,
118
+ borderRadius: 35,
119
+ alignItems: 'center',
120
+ justifyContent: 'center'
121
+ },
122
+ buttonDefault: {
123
+ backgroundColor: '#FFFFFF',
124
+ borderWidth: 1,
125
+ borderColor: '#DDDDDD',
126
+ shadowColor: '#000000',
127
+ shadowOffset: {
128
+ width: 0,
129
+ height: 2
130
+ },
131
+ shadowOpacity: 0.1,
132
+ shadowRadius: 4,
133
+ elevation: 2
134
+ },
135
+ buttonOutline: {
136
+ backgroundColor: 'transparent',
137
+ borderWidth: 1,
138
+ borderColor: '#d169e5'
139
+ },
140
+ buttonContained: {
141
+ backgroundColor: '#d169e5'
142
+ },
143
+ buttonDisabled: {
144
+ opacity: 0.6
145
+ },
146
+ buttonContent: {
147
+ flexDirection: 'row',
148
+ alignItems: 'center',
149
+ justifyContent: 'center'
150
+ },
151
+ text: {
152
+ fontFamily: Platform.OS === 'web' ? 'Phudu' : 'Phudu-SemiBold',
153
+ fontWeight: Platform.OS === 'web' ? '600' : undefined,
154
+ // Only apply fontWeight on web
155
+ fontSize: 16,
156
+ marginLeft: 10
157
+ },
158
+ textDefault: {
159
+ color: '#333333'
160
+ },
161
+ textOutline: {
162
+ color: '#d169e5'
163
+ },
164
+ textContained: {
165
+ color: '#FFFFFF'
166
+ },
167
+ textDisabled: {
168
+ color: '#888888'
169
+ }
170
+ });
171
+ export default OxySignInButton;
172
+ //# sourceMappingURL=OxySignInButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","TouchableOpacity","Text","View","StyleSheet","Platform","useOxy","OxyLogo","jsx","_jsx","jsxs","_jsxs","OxySignInButton","variant","onPress","style","textStyle","text","disabled","showWhenAuthenticated","user","showBottomSheet","handlePress","console","warn","getButtonStyle","styles","buttonOutline","buttonContained","buttonDefault","getTextStyle","textOutline","textContained","textDefault","button","buttonDisabled","children","buttonContent","width","height","fillColor","secondaryFillColor","undefined","opacity","textDisabled","create","padding","borderRadius","alignItems","justifyContent","backgroundColor","borderWidth","borderColor","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","flexDirection","fontFamily","OS","fontWeight","fontSize","marginLeft","color"],"sourceRoot":"../../../../src","sources":["ui/components/OxySignInButton.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,EAAEC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAmCC,QAAQ,QAAQ,cAAc;AAClH,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAOC,OAAO,MAAM,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA6ChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAA+C,GAAGA,CAAC;EAC5DC,OAAO,GAAG,SAAS;EACnBC,OAAO;EACPC,KAAK;EACLC,SAAS;EACTC,IAAI,GAAG,kBAAkB;EACzBC,QAAQ,GAAG,KAAK;EAChBC,qBAAqB,GAAG;A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Q,OAAO,EAAE;EACb,CAAC;EACDN,aAAa,EAAE;IACXqB,aAAa,EAAE,KAAK;IACpBV,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EACpB,CAAC;EACDhC,IAAI,EAAE;IACF0C,UAAU,EAAEtD,QAAQ,CAACuD,EAAE,KAAK,KAAK,GAAG,OAAO,GAAG,gBAAgB;IAC9DC,UAAU,EAAExD,QAAQ,CAACuD,EAAE,KAAK,KAAK,GAAG,KAAK,GAAGlB,SAAS;IAAE;IACvDoB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EAChB,CAAC;EACD9B,WAAW,EAAE;IACT+B,KAAK,EAAE;EACX,CAAC;EACDjC,WAAW,EAAE;IACTiC,KAAK,EAAE;EACX,CAAC;EACDhC,aAAa,EAAE;IACXgC,KAAK,EAAE;EACX,CAAC;EACDpB,YAAY,EAAE;IACVoB,KAAK,EAAE;EACX;AACJ,CAAC,CAAC;AAEF,eAAepD,eAAe","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ import { BottomSheetModal, BottomSheetBackdrop, BottomSheetBackdropProps, BottomSheetModalProvider, BottomSheetView } from '@gorhom/bottom-sheet';
4
+
5
+ // Re-export components from @gorhom/bottom-sheet
6
+ // This allows us to use these components internally without requiring the consumer to install @gorhom/bottom-sheet
7
+ export { BottomSheetModal, BottomSheetBackdrop, BottomSheetBackdropProps, BottomSheetModalProvider, BottomSheetView };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BottomSheetModal","BottomSheetBackdrop","BottomSheetBackdropProps","BottomSheetModalProvider","BottomSheetView"],"sourceRoot":"../../../../../src","sources":["ui/components/bottomSheet/index.tsx"],"mappings":";;AACA,SAASA,gBAAgB,EAAEC,mBAAmB,EAAEC,wBAAwB,EAAEC,wBAAwB,EAAEC,eAAe,QAAQ,sBAAsB;;AAEjJ;AACA;AACA,SACIJ,gBAAgB,EAChBC,mBAAmB,EACnBC,wBAAwB,EACxBC,wBAAwB,EACxBC,eAAe","ignoreList":[]}