@oxyhq/services 5.21.5 → 5.21.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 (177) hide show
  1. package/lib/commonjs/crypto/keyManager.js +67 -22
  2. package/lib/commonjs/crypto/keyManager.js.map +1 -1
  3. package/lib/commonjs/index.js +66 -0
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/commonjs/ui/components/BottomSheetRouter.js +100 -286
  6. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
  7. package/lib/commonjs/ui/components/GroupedItem.js +0 -3
  8. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  9. package/lib/commonjs/ui/components/OxyProvider.js +14 -19
  10. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  11. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +57 -0
  12. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -0
  13. package/lib/commonjs/ui/components/profile/EditBioModal.js +24 -156
  14. package/lib/commonjs/ui/components/profile/EditBioModal.js.map +1 -1
  15. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +28 -178
  16. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +1 -1
  17. package/lib/commonjs/ui/components/profile/EditEmailModal.js +32 -159
  18. package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +1 -1
  19. package/lib/commonjs/ui/components/profile/EditLocationModal.js +45 -227
  20. package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +1 -1
  21. package/lib/commonjs/ui/components/profile/EditUsernameModal.js +30 -155
  22. package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +1 -1
  23. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +177 -0
  24. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -0
  25. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +10 -123
  26. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  27. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -32
  28. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +2 -31
  30. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/useFileFiltering.js +76 -0
  32. package/lib/commonjs/ui/hooks/useFileFiltering.js.map +1 -0
  33. package/lib/commonjs/ui/navigation/bottomSheetManager.js +43 -145
  34. package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
  35. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +0 -2
  36. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/FileManagementScreen.js +2 -2
  38. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  39. package/lib/commonjs/ui/utils/authHelpers.js +164 -0
  40. package/lib/commonjs/ui/utils/authHelpers.js.map +1 -0
  41. package/lib/commonjs/ui/utils/avatarUtils.js +18 -61
  42. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  43. package/lib/module/crypto/keyManager.js +67 -22
  44. package/lib/module/crypto/keyManager.js.map +1 -1
  45. package/lib/module/index.js +6 -0
  46. package/lib/module/index.js.map +1 -1
  47. package/lib/module/ui/components/BottomSheetRouter.js +102 -284
  48. package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
  49. package/lib/module/ui/components/GroupedItem.js +0 -3
  50. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  51. package/lib/module/ui/components/OxyProvider.js +14 -19
  52. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  53. package/lib/module/ui/components/fileManagement/AnimatedButton.js +50 -0
  54. package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -0
  55. package/lib/module/ui/components/profile/EditBioModal.js +24 -156
  56. package/lib/module/ui/components/profile/EditBioModal.js.map +1 -1
  57. package/lib/module/ui/components/profile/EditDisplayNameModal.js +28 -178
  58. package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +1 -1
  59. package/lib/module/ui/components/profile/EditEmailModal.js +32 -159
  60. package/lib/module/ui/components/profile/EditEmailModal.js.map +1 -1
  61. package/lib/module/ui/components/profile/EditLocationModal.js +45 -227
  62. package/lib/module/ui/components/profile/EditLocationModal.js.map +1 -1
  63. package/lib/module/ui/components/profile/EditUsernameModal.js +30 -155
  64. package/lib/module/ui/components/profile/EditUsernameModal.js.map +1 -1
  65. package/lib/module/ui/hooks/mutations/mutationFactory.js +173 -0
  66. package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -0
  67. package/lib/module/ui/hooks/mutations/useAccountMutations.js +10 -122
  68. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  69. package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -32
  70. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  71. package/lib/module/ui/hooks/queries/useServicesQueries.js +2 -31
  72. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  73. package/lib/module/ui/hooks/useFileFiltering.js +72 -0
  74. package/lib/module/ui/hooks/useFileFiltering.js.map +1 -0
  75. package/lib/module/ui/navigation/bottomSheetManager.js +37 -135
  76. package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
  77. package/lib/module/ui/screens/AccountSettingsScreen.js +0 -2
  78. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  79. package/lib/module/ui/screens/FileManagementScreen.js +2 -2
  80. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  81. package/lib/module/ui/utils/authHelpers.js +154 -0
  82. package/lib/module/ui/utils/authHelpers.js.map +1 -0
  83. package/lib/module/ui/utils/avatarUtils.js +18 -61
  84. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  85. package/lib/typescript/commonjs/crypto/keyManager.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/index.d.ts +6 -0
  87. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +2 -7
  89. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts.map +1 -1
  91. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
  93. package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts +1 -0
  98. package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +76 -0
  101. package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
  103. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +1 -1
  105. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +1 -1
  107. package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  108. package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts +29 -0
  109. package/lib/typescript/commonjs/ui/hooks/useFileFiltering.d.ts.map +1 -0
  110. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +11 -60
  111. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts +99 -0
  114. package/lib/typescript/commonjs/ui/utils/authHelpers.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
  116. package/lib/typescript/module/crypto/keyManager.d.ts.map +1 -1
  117. package/lib/typescript/module/index.d.ts +6 -0
  118. package/lib/typescript/module/index.d.ts.map +1 -1
  119. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +2 -7
  120. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
  121. package/lib/typescript/module/ui/components/GroupedItem.d.ts.map +1 -1
  122. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  123. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts +16 -0
  124. package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -0
  125. package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts.map +1 -1
  126. package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts.map +1 -1
  127. package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts.map +1 -1
  128. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts +1 -0
  129. package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts.map +1 -1
  130. package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts.map +1 -1
  131. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +76 -0
  132. package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +1 -0
  133. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +29 -4
  134. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  135. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +1 -1
  136. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  137. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +1 -1
  138. package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  139. package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts +29 -0
  140. package/lib/typescript/module/ui/hooks/useFileFiltering.d.ts.map +1 -0
  141. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +11 -60
  142. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  143. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  144. package/lib/typescript/module/ui/utils/authHelpers.d.ts +99 -0
  145. package/lib/typescript/module/ui/utils/authHelpers.d.ts.map +1 -0
  146. package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
  147. package/package.json +2 -2
  148. package/src/crypto/keyManager.ts +23 -22
  149. package/src/index.ts +25 -0
  150. package/src/ui/components/BottomSheetRouter.tsx +97 -319
  151. package/src/ui/components/GroupedItem.tsx +0 -4
  152. package/src/ui/components/OxyProvider.tsx +13 -18
  153. package/src/ui/components/fileManagement/AnimatedButton.tsx +56 -0
  154. package/src/ui/components/profile/EditBioModal.tsx +38 -176
  155. package/src/ui/components/profile/EditDisplayNameModal.tsx +48 -195
  156. package/src/ui/components/profile/EditEmailModal.tsx +49 -180
  157. package/src/ui/components/profile/EditLocationModal.tsx +76 -263
  158. package/src/ui/components/profile/EditUsernameModal.tsx +47 -175
  159. package/src/ui/hooks/mutations/mutationFactory.ts +215 -0
  160. package/src/ui/hooks/mutations/useAccountMutations.ts +48 -136
  161. package/src/ui/hooks/queries/useAccountQueries.ts +6 -33
  162. package/src/ui/hooks/queries/useServicesQueries.ts +6 -32
  163. package/src/ui/hooks/useFileFiltering.ts +115 -0
  164. package/src/ui/navigation/bottomSheetManager.ts +43 -150
  165. package/src/ui/screens/AccountSettingsScreen.tsx +0 -2
  166. package/src/ui/screens/FileManagementScreen.tsx +2 -2
  167. package/src/ui/utils/authHelpers.ts +183 -0
  168. package/src/ui/utils/avatarUtils.ts +25 -65
  169. package/lib/commonjs/ui/hooks/use-haptic-press.js +0 -21
  170. package/lib/commonjs/ui/hooks/use-haptic-press.js.map +0 -1
  171. package/lib/module/ui/hooks/use-haptic-press.js +0 -17
  172. package/lib/module/ui/hooks/use-haptic-press.js.map +0 -1
  173. package/lib/typescript/commonjs/ui/hooks/use-haptic-press.d.ts +0 -8
  174. package/lib/typescript/commonjs/ui/hooks/use-haptic-press.d.ts.map +0 -1
  175. package/lib/typescript/module/ui/hooks/use-haptic-press.d.ts +0 -8
  176. package/lib/typescript/module/ui/hooks/use-haptic-press.d.ts.map +0 -1
  177. package/src/ui/hooks/use-haptic-press.ts +0 -15
@@ -4,6 +4,7 @@ import { useAccountStore } from '../stores/accountStore';
4
4
  import { useAuthStore } from '../stores/authStore';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
6
  import { queryKeys, invalidateUserQueries, invalidateAccountQueries } from '../hooks/queries/queryKeys';
7
+ import { authenticatedApiCall } from './authHelpers';
7
8
 
8
9
  /**
9
10
  * Updates file visibility to public for avatar use.
@@ -57,7 +58,7 @@ export function refreshAvatarInStore(
57
58
  /**
58
59
  * Updates user profile with avatar and handles all side effects (query invalidation, accountStore update).
59
60
  * This function can be used from within OxyContext provider without requiring useOxy hook.
60
- *
61
+ *
61
62
  * @param updates - Profile updates including avatar
62
63
  * @param oxyServices - OxyServices instance
63
64
  * @param activeSessionId - Active session ID
@@ -72,72 +73,31 @@ export async function updateProfileWithAvatar(
72
73
  queryClient: QueryClient,
73
74
  syncSession?: () => Promise<User>
74
75
  ): Promise<User> {
75
- // Ensure we have a valid token before making the request
76
- if (!oxyServices.hasValidToken() && activeSessionId) {
77
- try {
78
- await oxyServices.getTokenBySession(activeSessionId);
79
- } catch (tokenError) {
80
- const errorMessage = tokenError instanceof Error ? tokenError.message : String(tokenError);
81
- if (errorMessage.includes('AUTH_REQUIRED_OFFLINE_SESSION') || errorMessage.includes('offline')) {
82
- if (syncSession) {
83
- try {
84
- await syncSession();
85
- await oxyServices.getTokenBySession(activeSessionId);
86
- } catch (syncError) {
87
- throw new Error('Session needs to be synced. Please try again.');
88
- }
89
- } else {
90
- throw tokenError;
91
- }
92
- } else {
93
- throw tokenError;
94
- }
95
- }
76
+ const data = await authenticatedApiCall<User>(
77
+ oxyServices,
78
+ activeSessionId,
79
+ () => oxyServices.updateProfile(updates),
80
+ syncSession
81
+ );
82
+
83
+ // Update cache with server response
84
+ queryClient.setQueryData(queryKeys.accounts.current(), data);
85
+ if (activeSessionId) {
86
+ queryClient.setQueryData(queryKeys.users.profile(activeSessionId), data);
96
87
  }
97
88
 
98
- try {
99
- const data = await oxyServices.updateProfile(updates);
100
-
101
- // Update cache with server response
102
- queryClient.setQueryData(queryKeys.accounts.current(), data);
103
- if (activeSessionId) {
104
- queryClient.setQueryData(queryKeys.users.profile(activeSessionId), data);
105
- }
106
-
107
- // Update authStore so frontend components see the changes immediately
108
- useAuthStore.getState().setUser(data);
109
-
110
- // If avatar was updated, refresh accountStore with cache-busted URL
111
- if (updates.avatar && activeSessionId) {
112
- refreshAvatarInStore(activeSessionId, updates.avatar, oxyServices);
113
- }
114
-
115
- // Invalidate all related queries to refresh everywhere
116
- invalidateUserQueries(queryClient);
117
- invalidateAccountQueries(queryClient);
118
-
119
- return data;
120
- } catch (error: any) {
121
- const errorMessage = error?.message || '';
122
- const status = error?.status || error?.response?.status;
123
-
124
- // Handle authentication errors
125
- if (status === 401 || errorMessage.includes('Authentication required') || errorMessage.includes('Invalid or missing authorization header')) {
126
- if (activeSessionId && syncSession) {
127
- try {
128
- await syncSession();
129
- await oxyServices.getTokenBySession(activeSessionId);
130
- // Retry the update after getting token
131
- return await updateProfileWithAvatar(updates, oxyServices, activeSessionId, queryClient, syncSession);
132
- } catch (retryError) {
133
- throw new Error('Authentication failed. Please sign in again.');
134
- }
135
- } else {
136
- throw new Error('No active session. Please sign in.');
137
- }
138
- }
139
-
140
- throw error;
89
+ // Update authStore so frontend components see the changes immediately
90
+ useAuthStore.getState().setUser(data);
91
+
92
+ // If avatar was updated, refresh accountStore with cache-busted URL
93
+ if (updates.avatar && activeSessionId) {
94
+ refreshAvatarInStore(activeSessionId, updates.avatar, oxyServices);
141
95
  }
96
+
97
+ // Invalidate all related queries to refresh everywhere
98
+ invalidateUserQueries(queryClient);
99
+ invalidateAccountQueries(queryClient);
100
+
101
+ return data;
142
102
  }
143
103
 
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useHapticPress = useHapticPress;
7
- var _react = require("react");
8
- var Haptics = _interopRequireWildcard(require("expo-haptics"));
9
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
- /**
11
- * Hook that returns a memoized callback for haptic feedback on press.
12
- * Provides consistent light haptic feedback across the app.
13
- *
14
- * @returns A stable callback function that triggers haptic feedback
15
- */
16
- function useHapticPress() {
17
- return (0, _react.useCallback)(() => {
18
- Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
19
- }, []);
20
- }
21
- //# sourceMappingURL=use-haptic-press.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","Haptics","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useHapticPress","useCallback","impactAsync","ImpactFeedbackStyle","Light"],"sourceRoot":"../../../../src","sources":["ui/hooks/use-haptic-press.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAwC,SAAAE,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAExC;AACA;AACA;AACA;AACA;AACA;AACO,SAASkB,cAAcA,CAAA,EAAG;EAC/B,OAAO,IAAAC,kBAAW,EAAC,MAAM;IACvBtB,OAAO,CAACuB,WAAW,CAACvB,OAAO,CAACwB,mBAAmB,CAACC,KAAK,CAAC;EACxD,CAAC,EAAE,EAAE,CAAC;AACR","ignoreList":[]}
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- import { useCallback } from 'react';
4
- import * as Haptics from 'expo-haptics';
5
-
6
- /**
7
- * Hook that returns a memoized callback for haptic feedback on press.
8
- * Provides consistent light haptic feedback across the app.
9
- *
10
- * @returns A stable callback function that triggers haptic feedback
11
- */
12
- export function useHapticPress() {
13
- return useCallback(() => {
14
- Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
15
- }, []);
16
- }
17
- //# sourceMappingURL=use-haptic-press.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useCallback","Haptics","useHapticPress","impactAsync","ImpactFeedbackStyle","Light"],"sourceRoot":"../../../../src","sources":["ui/hooks/use-haptic-press.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,OAAO,KAAKC,OAAO,MAAM,cAAc;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAA,EAAG;EAC/B,OAAOF,WAAW,CAAC,MAAM;IACvBC,OAAO,CAACE,WAAW,CAACF,OAAO,CAACG,mBAAmB,CAACC,KAAK,CAAC;EACxD,CAAC,EAAE,EAAE,CAAC;AACR","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- /**
2
- * Hook that returns a memoized callback for haptic feedback on press.
3
- * Provides consistent light haptic feedback across the app.
4
- *
5
- * @returns A stable callback function that triggers haptic feedback
6
- */
7
- export declare function useHapticPress(): () => void;
8
- //# sourceMappingURL=use-haptic-press.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-haptic-press.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/use-haptic-press.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,cAAc,eAI7B"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Hook that returns a memoized callback for haptic feedback on press.
3
- * Provides consistent light haptic feedback across the app.
4
- *
5
- * @returns A stable callback function that triggers haptic feedback
6
- */
7
- export declare function useHapticPress(): () => void;
8
- //# sourceMappingURL=use-haptic-press.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-haptic-press.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/use-haptic-press.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,cAAc,eAI7B"}
@@ -1,15 +0,0 @@
1
- import { useCallback } from 'react';
2
- import * as Haptics from 'expo-haptics';
3
-
4
- /**
5
- * Hook that returns a memoized callback for haptic feedback on press.
6
- * Provides consistent light haptic feedback across the app.
7
- *
8
- * @returns A stable callback function that triggers haptic feedback
9
- */
10
- export function useHapticPress() {
11
- return useCallback(() => {
12
- Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
13
- }, []);
14
- }
15
-