@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,107 @@
1
+ import { OxyServices } from '../../core';
2
+ import { User } from '../../models/interfaces';
3
+ import { ComponentType, ReactNode } from 'react';
4
+ /**
5
+ * Base props for all screens in the Oxy UI system
6
+ */
7
+ export interface BaseScreenProps {
8
+ oxyServices: OxyServices;
9
+ navigate: (screen: string, props?: any) => void;
10
+ goBack: () => void;
11
+ onClose?: () => void;
12
+ onAuthenticated?: (user: User) => void;
13
+ theme: 'light' | 'dark';
14
+ }
15
+ /**
16
+ * Route configuration for OxyRouter
17
+ */
18
+ export interface RouteConfig {
19
+ component: ComponentType<any>;
20
+ snapPoints: string[];
21
+ }
22
+ /**
23
+ * Props for OxyRouter component
24
+ */
25
+ export interface OxyRouterProps {
26
+ oxyServices: OxyServices;
27
+ initialScreen: string;
28
+ onClose?: () => void;
29
+ onAuthenticated?: (user: User) => void;
30
+ theme: 'light' | 'dark';
31
+ adjustSnapPoints: (snapPoints: string[]) => void;
32
+ }
33
+ /**
34
+ * Props for the OxyProvider component
35
+ */
36
+ export interface OxyProviderProps {
37
+ /**
38
+ * Instance of OxyServices
39
+ */
40
+ oxyServices: OxyServices;
41
+ /**
42
+ * Initial screen to display
43
+ * @default "SignIn"
44
+ */
45
+ initialScreen?: 'SignIn' | 'SignUp' | 'AccountCenter';
46
+ /**
47
+ * Callback when the bottom sheet is closed
48
+ */
49
+ onClose?: () => void;
50
+ /**
51
+ * Callback when a user successfully authenticates
52
+ */
53
+ onAuthenticated?: (user: User) => void;
54
+ /**
55
+ * UI theme
56
+ * @default "light"
57
+ */
58
+ theme?: 'light' | 'dark';
59
+ /**
60
+ * @internal
61
+ * Reference to the bottom sheet component (for internal use only)
62
+ * @deprecated External bottom sheet ref is no longer required as OxyProvider handles the bottom sheet internally
63
+ * @hidden
64
+ */
65
+ bottomSheetRef?: React.RefObject<any>;
66
+ /**
67
+ * Whether to automatically present the bottom sheet when component mounts
68
+ * @default false
69
+ */
70
+ autoPresent?: boolean;
71
+ /**
72
+ * Custom styles for the bottom sheet
73
+ */
74
+ customStyles?: {
75
+ /**
76
+ * Background color of the bottom sheet
77
+ */
78
+ backgroundColor?: string;
79
+ /**
80
+ * Color of the handle indicator
81
+ */
82
+ handleColor?: string;
83
+ /**
84
+ * Content padding
85
+ */
86
+ contentPadding?: number;
87
+ };
88
+ /**
89
+ * Child components to render within the provider
90
+ */
91
+ children?: ReactNode;
92
+ /**
93
+ * When true, only provides the authentication context without rendering the bottom sheet UI
94
+ * @default false
95
+ */
96
+ contextOnly?: boolean;
97
+ /**
98
+ * Callback when authentication state changes
99
+ */
100
+ onAuthStateChange?: (user: User | null) => void;
101
+ /**
102
+ * Prefix for keys in AsyncStorage
103
+ * @default "oxy"
104
+ */
105
+ storageKeyPrefix?: string;
106
+ }
107
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAC9B,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACvC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IAEzB;;;OAGG;IACH,aAAa,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,eAAe,CAAC;IAEtD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAEvC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEzB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAEtC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE;QACb;;WAEG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAEhD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { BaseScreenProps } from '../navigation/types';
3
+ declare const AccountCenterScreen: React.FC<BaseScreenProps>;
4
+ export default AccountCenterScreen;
5
+ //# sourceMappingURL=AccountCenterScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountCenterScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/AccountCenterScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuIlD,CAAC;AAwFF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { BaseScreenProps } from '../navigation/types';
3
+ declare const AccountOverviewScreen: React.FC<BaseScreenProps>;
4
+ export default AccountOverviewScreen;
5
+ //# sourceMappingURL=AccountOverviewScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccountOverviewScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/AccountOverviewScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAaxC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkUpD,CAAC;AAkLF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { BaseScreenProps } from '../navigation/types';
3
+ declare const SignInScreen: React.FC<BaseScreenProps>;
4
+ export default SignInScreen;
5
+ //# sourceMappingURL=SignInScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignInScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SignInScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAaxC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAKtD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyI3C,CAAC;AAsDF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { BaseScreenProps } from '../navigation/types';
3
+ declare const SignUpScreen: React.FC<BaseScreenProps>;
4
+ export default SignUpScreen;
5
+ //# sourceMappingURL=SignUpScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignUpScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SignUpScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAe3D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmZ3C,CAAC;AAwLF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { TextStyle } from 'react-native';
2
+ /**
3
+ * Font family names for use across the app
4
+ *
5
+ * For web platforms, we use the CSS font name with weights
6
+ * For native platforms, we use the specific static font file names
7
+ */
8
+ export declare const fontFamilies: {
9
+ phudu: string;
10
+ phuduLight: string;
11
+ phuduMedium: string;
12
+ phuduSemiBold: string;
13
+ phuduBold: string;
14
+ phuduExtraBold: string;
15
+ phuduBlack: string;
16
+ };
17
+ /**
18
+ * Font styles that can be reused across the app
19
+ */
20
+ export declare const fontStyles: Record<string, TextStyle>;
21
+ //# sourceMappingURL=fonts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../../src/ui/styles/fonts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;;CA0CxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAqBhD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './fonts';
2
+ export * from './theme';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,69 @@
1
+ import { TextStyle } from 'react-native';
2
+ export interface ThemeColors {
3
+ text: string;
4
+ background: string;
5
+ inputBackground: string;
6
+ placeholder: string;
7
+ primary: string;
8
+ border: string;
9
+ error: string;
10
+ success: string;
11
+ warning: string;
12
+ secondaryText: string;
13
+ }
14
+ export interface Theme {
15
+ colors: ThemeColors;
16
+ fonts: {
17
+ title: TextStyle;
18
+ body: TextStyle;
19
+ button: TextStyle;
20
+ label: TextStyle;
21
+ };
22
+ }
23
+ export declare const getTheme: (theme: "light" | "dark") => Theme;
24
+ export declare const useThemeColors: (theme: "light" | "dark") => ThemeColors;
25
+ export declare const createCommonStyles: (theme: "light" | "dark") => {
26
+ container: {
27
+ backgroundColor: string;
28
+ };
29
+ scrollContainer: {
30
+ flexGrow: number;
31
+ padding: number;
32
+ };
33
+ input: {
34
+ height: number;
35
+ borderRadius: number;
36
+ paddingHorizontal: number;
37
+ borderWidth: number;
38
+ fontSize: number;
39
+ backgroundColor: string;
40
+ borderColor: string;
41
+ color: string;
42
+ };
43
+ button: {
44
+ backgroundColor: string;
45
+ height: number;
46
+ borderRadius: number;
47
+ alignItems: "center";
48
+ justifyContent: "center";
49
+ marginTop: number;
50
+ };
51
+ buttonText: {
52
+ fontFamily: string;
53
+ fontSize: number;
54
+ fontWeight: "600";
55
+ color: string;
56
+ };
57
+ errorContainer: {
58
+ backgroundColor: string;
59
+ padding: number;
60
+ borderRadius: number;
61
+ marginBottom: number;
62
+ };
63
+ errorText: {
64
+ fontSize: number;
65
+ fontWeight: "500";
66
+ color: string;
67
+ };
68
+ };
69
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/ui/styles/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,SAAS,EAAE,MAAM,cAAc,CAAC;AAG/D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE;QACL,KAAK,EAAE,SAAS,CAAC;QACjB,IAAI,EAAE,SAAS,CAAC;QAChB,MAAM,EAAE,SAAS,CAAC;QAClB,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;CACH;AA4DD,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,GAAG,MAAM,KAAG,KAElD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,OAAO,GAAG,MAAM,KAAG,WAExD,CAAC;AAGF,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDzD,CAAC"}
package/package.json CHANGED
@@ -1,71 +1,115 @@
1
1
  {
2
2
  "name": "@oxyhq/services",
3
- "version": "0.1.17",
4
- "description": "Authentication, user management, and karma system for Oxy applications",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "build": "webpack --config webpack.config.js",
10
- "test": "jest --passWithNoTests",
11
- "prepare": "npm run build",
12
- "prepublishOnly": "npm test"
13
- },
3
+ "version": "5.1.7",
4
+ "description": "Reusable OxyHQ module to handle authentication, user management, karma system and more 🚀",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index.ts",
9
+ "source": "src/index.ts",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "mock.js",
14
+ "UI_COMPONENTS.md",
15
+ "assets"
16
+ ],
14
17
  "keywords": [
15
- "auth",
16
- "user-management",
17
- "karma",
18
- "wallet",
19
- "transactions"
18
+ "react-native",
19
+ "ios",
20
+ "android",
21
+ "web",
22
+ "OxyHQ",
23
+ "authentication",
24
+ "bottom-sheet"
20
25
  ],
21
- "author": "Oxy",
26
+ "repository": "https://github.com/oxyhq/oxyhqservices",
27
+ "author": "OxyHQ",
22
28
  "license": "MIT",
29
+ "bugs": {
30
+ "url": "https://github.com/oxyhq/oxyhqservices/issues"
31
+ },
32
+ "homepage": "https://oxy.so",
33
+ "scripts": {
34
+ "typescript": "tsc --skipLibCheck --noEmit",
35
+ "lint": "biome lint --error-on-warnings ./src",
36
+ "build": "bob build && yarn copy-assets && yarn copy-dts && yarn delete-dts.js && yarn delete-debug-view",
37
+ "copy-assets": "copyfiles -u 1 \"src/assets/**/*\" lib/commonjs/assets && copyfiles -u 1 \"src/assets/**/*\" lib/module/assets",
38
+ "copy-dts": "copyfiles -u 1 \"src/**/*.d.ts\" lib/typescript",
39
+ "delete-debug-view": "rm -rf ./lib/commonjs/components/bottomSheetDebugView ./lib/module/components/bottomSheetDebugView ./lib/typescript/components/bottomSheetDebugView || true",
40
+ "delete-dts.js": "find ./lib/commonjs -name '*.d.js*' -delete && find ./lib/module -name '*.d.js*' -delete",
41
+ "release": "rm -rf lib && yarn build && release-it",
42
+ "example": "yarn --cwd example",
43
+ "bootstrap": "yarn install && yarn example"
44
+ },
23
45
  "dependencies": {
24
- "@babel/runtime": "^7.26.10",
25
- "axios": "^1.6.2",
26
- "jwt-decode": "^4.0.0"
46
+ "@gorhom/bottom-sheet": "^5.1.0",
47
+ "@react-native-async-storage/async-storage": "^2.1.2",
48
+ "axios": "^1.9.0",
49
+ "expo-font": "^13.3.1",
50
+ "invariant": "^2.2.4",
51
+ "jwt-decode": "^4.0.0",
52
+ "react-native-safe-area-context": "^5.4.0",
53
+ "react-test-renderer": "^18.3.1"
27
54
  },
28
55
  "devDependencies": {
29
- "@react-native-async-storage/async-storage": "^2.1.2",
30
- "@types/jest": "^29.5.10",
31
- "@types/node": "^20.10.0",
32
- "@types/react": "^18.2.38",
33
- "@types/react-native": "^0.73.0",
34
- "expo-secure-store": "^14.0.1",
35
- "jest": "^29.7.0",
36
- "ts-jest": "^29.1.1",
37
- "ts-loader": "^9.5.2",
38
- "typescript": "^5.3.2",
39
- "webpack": "^5.98.0",
40
- "webpack-cli": "^6.0.1"
56
+ "@commitlint/cli": "^17.6.5",
57
+ "@commitlint/config-conventional": "^17.6.5",
58
+ "@release-it/conventional-changelog": "^8.0.1",
59
+ "@testing-library/jest-dom": "^6.4.2",
60
+ "@testing-library/react": "^14.2.1",
61
+ "@testing-library/react-native": "^12.4.3",
62
+ "@types/invariant": "^2.2.34",
63
+ "@types/jest": "^29.5.14",
64
+ "@types/jwt-decode": "^2.2.1",
65
+ "@types/react": "~18.3.12",
66
+ "@types/react-native": "~0.73.0",
67
+ "copyfiles": "^2.4.1",
68
+ "husky": "^4.3.8",
69
+ "lint-staged": "^13.2.2",
70
+ "metro-react-native-babel-preset": "^0.77.0",
71
+ "react": "18.3.1",
72
+ "react-native": "0.76.0",
73
+ "react-native-builder-bob": "^0.30.3",
74
+ "react-native-gesture-handler": "^2.20.2",
75
+ "react-native-reanimated": "^3.16.1",
76
+ "react-native-svg": "^14.2.0",
77
+ "release-it": "^17.6.0",
78
+ "typescript": "^5.3.0"
41
79
  },
42
80
  "peerDependencies": {
43
- "react": "18.3.1",
44
- "react-dom": "18.3.1",
45
- "react-native": ">=0.70.0"
81
+ "@types/react": "*",
82
+ "@types/react-native": "*",
83
+ "axios": "^1.9.0",
84
+ "invariant": "^2.2.4",
85
+ "jwt-decode": "^4.0.0",
86
+ "react": "*",
87
+ "react-native": "*",
88
+ "react-native-gesture-handler": ">=2.16.1",
89
+ "react-native-reanimated": ">=3.16.0",
90
+ "react-native-safe-area-context": "^5.4.0",
91
+ "react-native-svg": ">=13.0.0"
46
92
  },
47
93
  "peerDependenciesMeta": {
48
- "react-dom": {
49
- "optional": true
50
- },
51
- "react-native": {
94
+ "@types/react-native": {
52
95
  "optional": true
53
96
  },
54
- "expo-secure-store": {
55
- "optional": true
56
- },
57
- "@react-native-async-storage/async-storage": {
97
+ "@types/react": {
58
98
  "optional": true
59
99
  }
60
100
  },
61
- "optionalPeerDependencies": {
62
- "expo-secure-store": "^12.0.0",
63
- "@react-native-async-storage/async-storage": "^1.22.0"
101
+ "react-native-builder-bob": {
102
+ "source": "src",
103
+ "output": "lib",
104
+ "targets": [
105
+ "commonjs",
106
+ "module",
107
+ "typescript"
108
+ ]
64
109
  },
65
- "files": [
66
- "dist"
67
- ],
68
- "publishConfig": {
69
- "access": "public"
110
+ "resolutions": {
111
+ "@gorhom/bottom-sheet": "^5.1.0",
112
+ "react-native-gesture-handler": "^2.20.2",
113
+ "react-native-reanimated": "^3.16.1"
70
114
  }
71
115
  }
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 294.84 174.42"><defs><style>.cls-1{fill:#d169e5;}.cls-2{fill:#fefefe;}</style></defs><path class="cls-2" d="M241.03,24.83c-3.42-9.32-9.47-19.01-19.05-22.86-6.33-2.55-13.1-2.6-19.49-.26-.52.19-2.22,1.12-2.54,1.12-.22,0-3.3-1.39-4.05-1.61-15.97-4.57-30.37,9.5-39.44,20.8-1.15,1.43-2.29,2.92-3.27,4.48-.35.28-.56-.8-.69-1.06C146.04,12.12,135.23-.4,118.95,1c-12.75,1.09-21.09,11.26-22.59,23.5-6.56-7.9-15.05-14.75-25.16-17.42-15.67-4.13-33.09-.39-45.34,10.17C-3.79,42.81-5.21,97.16,7.9,131.37c9.4,24.5,28.9,43.2,56.85,40.1,11.33-1.25,21.77-5.76,29.87-13.81.13-.03,1.58,1.62,1.9,1.91,2.63,2.38,5.97,4.23,9.43,5.07,17.29,4.17,30.59-11.83,39.99-23.82.21-.05.29.13.41.26,1.22,1.26,2.48,3.38,3.67,4.83,4.4,5.34,10.34,11.44,16.49,14.67,6.58,3.46,14.76,4.48,21.74,1.59,6.43,11.54,20.66,15.21,32.49,9.8,15.49-7.08,28.86-30.53,36.97-45.03,9.26-16.56,18.94-34.11,26.22-51.62,7.51-18.09,19.12-51.35,2.09-67.08-13.19-12.18-31.47-2.47-40.24,9.94l-4.77,6.65Z"/><path class="cls-1" d="M241.03,24.83l4.77-6.65c8.77-12.41,27.04-22.12,40.24-9.94,17.03,15.73,5.42,48.99-2.09,67.08-7.27,17.51-16.96,35.06-26.22,51.62-8.11,14.5-21.48,37.95-36.97,45.03-11.83,5.41-26.07,1.74-32.49-9.8-6.98,2.89-15.16,1.87-21.74-1.59-6.15-3.23-12.09-9.34-16.49-14.67-1.19-1.45-2.46-3.56-3.67-4.83-.12-.13-.2-.3-.41-.26-9.4,11.99-22.7,28-39.99,23.82-3.46-.84-6.8-2.69-9.43-5.07-.32-.29-1.77-1.94-1.9-1.91-8.1,8.04-18.53,12.55-29.87,13.81-27.95,3.09-47.46-15.6-56.85-40.1C-5.21,97.16-3.79,42.81,25.86,17.24c12.25-10.56,29.66-14.3,45.34-10.17,10.11,2.67,18.6,9.52,25.16,17.42,1.5-12.24,9.84-22.4,22.59-23.5,16.29-1.4,27.1,11.12,33.56,24.44.13.26.34,1.34.69,1.06.98-1.56,2.12-3.05,3.27-4.48,9.07-11.31,23.46-25.37,39.44-20.8.75.22,3.83,1.61,4.05,1.61.32,0,2.02-.93,2.54-1.12,6.4-2.33,13.16-2.28,19.49.26,9.58,3.85,15.64,13.54,19.05,22.86ZM234.36,72.83c-.88-9.38-1.79-18.77-3.55-28.03s-6.28-28.62-17.53-29.63-15.8,12.97-16.25,22.08c-.74,15.27,4.07,34.76,8.66,49.33,1.38,4.37,3,10.74,6.08,14.08,2.11,2.28,5.31,4.24,8.25,5.17-7.02,9.48-14.5,19.44-18.34,30.74-2.02,5.96-3.84,17.45,2.68,21.32,9.11,5.41,18.68-5.84,23.72-12.25,5.64-7.18,10.62-15.76,15.13-23.7,7.64-13.46,15.57-27.88,22.11-41.89,6.55-14.02,15.36-34.93,14.36-50.48-.25-3.85-2.02-10.44-6.3-11.53-8.54-2.18-17.65,11.65-21.44,17.8-7.07,11.49-12.42,24.19-17.22,36.77l-.37.21ZM150.69,57.99c-.11.08-.3-.27-.36-.38-.89-1.66-1.61-4.13-2.39-5.94-3.05-7.11-6.55-15.22-10.16-22.01s-11.12-16.46-20.3-12.96-6.07,17.71-4.28,24.7c3.59,13.98,9.21,27.75,14.81,41.02-5.93,11.33-11.94,22.65-17.47,34.19-3.8,7.92-10.58,22.31-4.93,30.54,6.13,8.92,18.44-3.44,22.73-8.57l19.09-23.41.39.27c6.19,10.08,12.58,21.57,21.85,29.14,6.31,5.16,15.72,6.95,17.45-3.38,1.09-6.53-3.31-16.75-5.87-22.86-4.2-10-9.25-19.64-14.62-29.05l-.13-.52c1.51-2.98,3.38-5.75,5.03-8.65,4-7.06,7.7-14.28,11.61-21.39,4.97-9.05,14.77-23.79,13.86-34.3-.31-3.61-2.31-8.51-6.42-8.92-8.41-.84-18.76,11.28-23.48,17.35-6.12,7.86-11.53,16.49-16.43,25.15ZM55,20.71c-28.18,1.93-38.49,35.65-39.8,59.2-1.68,30.16,10.02,82.97,50.53,76.2,32.13-5.37,37.37-46.47,34.97-72.86s-12.51-64.81-45.7-62.54ZM195.7,113.99c.31.07.32-.1.47-.28,1-1.16,1.69-3.21,2.78-4.4l.06-.37c-3.26-4.14-4.87-9.22-6.52-14.16-1.44-4.32-2.5-8.78-3.91-13.09-.07-.2-.12-.7-.38-.7-1.27,2.82-3.17,5.34-4.31,8.21,4.29,8.08,8.46,16.26,11.81,24.79Z"/><path class="cls-2" d="M55,20.71c33.19-2.27,43.33,36.41,45.7,62.54s-2.84,67.49-34.97,72.86c-40.5,6.77-52.21-46.03-50.53-76.2,1.31-23.56,11.62-57.27,39.8-59.2ZM55.99,59.37c-4.57.62-7.12,6.56-8.21,10.46-3.47,12.39-1.15,36.95,5.85,47.99,4,6.3,10.59,7.71,14.1.13,5.48-11.82,4.06-35.72-.36-47.87-1.84-5.06-5-11.57-11.38-10.7Z"/><path class="cls-2" d="M150.69,57.99c4.9-8.66,10.31-17.29,16.43-25.15,4.73-6.07,15.07-18.19,23.48-17.35,4.11.41,6.1,5.31,6.42,8.92.91,10.52-8.89,25.26-13.86,34.3-3.9,7.11-7.61,14.33-11.61,21.39-1.64,2.9-3.52,5.67-5.03,8.65l.13.52c5.37,9.41,10.42,19.05,14.62,29.05,2.57,6.11,6.97,16.33,5.87,22.86-1.73,10.33-11.14,8.54-17.45,3.38-9.27-7.57-15.67-19.07-21.85-29.14l-.39-.27-19.09,23.41c-4.29,5.13-16.6,17.49-22.73,8.57-5.66-8.23,1.13-22.63,4.93-30.54,5.53-11.54,11.54-22.86,17.47-34.19-5.61-13.27-11.22-27.03-14.81-41.02-1.8-6.99-4.69-21.27,4.28-24.7s16.55,5.88,20.3,12.96,7.11,14.9,10.16,22.01c.78,1.81,1.5,4.29,2.39,5.94.06.11.25.46.36.38Z"/><path class="cls-2" d="M234.36,72.83l.37-.21c4.8-12.59,10.15-25.29,17.22-36.77,3.79-6.16,12.9-19.98,21.44-17.8,4.28,1.09,6.06,7.68,6.3,11.53.99,15.56-7.82,36.47-14.36,50.48-6.54,14.01-14.47,28.42-22.11,41.89-4.51,7.95-9.49,16.53-15.13,23.7-5.03,6.41-14.61,17.66-23.72,12.25-6.52-3.87-4.71-15.36-2.68-21.32,3.84-11.31,11.32-21.27,18.34-30.74-2.94-.93-6.15-2.89-8.25-5.17-3.09-3.34-4.71-9.71-6.08-14.08-4.59-14.57-9.4-34.06-8.66-49.33.44-9.11,4.77-23.11,16.25-22.08s15.83,20.68,17.53,29.63,2.67,18.65,3.55,28.03Z"/><path class="cls-2" d="M195.7,113.99c-3.35-8.52-7.52-16.71-11.81-24.79,1.14-2.87,3.04-5.39,4.31-8.21.25,0,.31.5.38.7,1.41,4.31,2.47,8.77,3.91,13.09,1.65,4.94,3.26,10.02,6.52,14.16l-.06.37c-1.09,1.19-1.78,3.24-2.78,4.4-.15.17-.16.35-.47.28Z"/><path class="cls-1" d="M55.99,59.37c6.38-.87,9.53,5.65,11.38,10.7,4.42,12.14,5.84,36.05.36,47.87-3.51,7.58-10.1,6.17-14.1-.13-7-11.03-9.32-35.6-5.85-47.99,1.09-3.9,3.64-9.84,8.21-10.46Z"/></svg>