@oxyhq/services 6.9.11 → 6.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ui/components/FollowButton.js +135 -118
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +6 -2
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +9 -3
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +134 -74
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useWebSSO.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +30 -11
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +1 -0
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +0 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/fileStore.js +6 -6
- package/lib/commonjs/ui/stores/fileStore.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +6 -3
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +137 -121
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +7 -2
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +9 -3
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +132 -72
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useWebSSO.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +30 -11
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +1 -0
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +0 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/stores/fileStore.js +6 -6
- package/lib/module/ui/stores/fileStore.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +6 -3
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts +12 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts +5 -0
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/feedback/types.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/feedback/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts +7 -1
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts +31 -0
- package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts +12 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/GroupedSection.d.ts +5 -0
- package/lib/typescript/module/ui/components/GroupedSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/types.d.ts +2 -2
- package/lib/typescript/module/ui/components/feedback/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts +7 -1
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useFollow.d.ts +31 -0
- package/lib/typescript/module/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/ui/components/FollowButton.tsx +117 -109
- package/src/ui/components/GroupedSection.tsx +5 -0
- package/src/ui/components/feedback/types.ts +2 -2
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
- package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
- package/src/ui/components/internal/GroupedPillButtons.tsx +17 -8
- package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSummaryStep.tsx +1 -1
- package/src/ui/context/hooks/useAuthOperations.ts +8 -3
- package/src/ui/hooks/mutations/useServicesMutations.ts +3 -3
- package/src/ui/hooks/useAuth.ts +10 -4
- package/src/ui/hooks/useFollow.ts +161 -74
- package/src/ui/hooks/useWebSSO.ts +3 -3
- package/src/ui/screens/EditProfileFieldScreen.tsx +28 -16
- package/src/ui/screens/FAQScreen.tsx +2 -1
- package/src/ui/screens/FeedbackScreen.tsx +7 -7
- package/src/ui/screens/FileManagementScreen.tsx +1 -2
- package/src/ui/screens/HistoryViewScreen.tsx +5 -1
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +1 -1
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +1 -1
- package/src/ui/stores/fileStore.ts +9 -9
- package/src/ui/utils/fileManagement.ts +16 -10
|
@@ -5,6 +5,15 @@ import { toast } from '../../lib/sonner';
|
|
|
5
5
|
import type { RouteName } from '../navigation/routes';
|
|
6
6
|
import { updateAvatarVisibility } from '@oxyhq/core';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Extended File interface that includes a `uri` property for mobile preview support.
|
|
10
|
+
* React Native file pickers return URI-based references that need to be preserved
|
|
11
|
+
* on the File object for preview rendering.
|
|
12
|
+
*/
|
|
13
|
+
interface FileWithUri extends File {
|
|
14
|
+
uri?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
8
17
|
/**
|
|
9
18
|
* Format file size in bytes to human-readable string
|
|
10
19
|
*/
|
|
@@ -69,12 +78,12 @@ export async function convertDocumentPickerAssetToFile(
|
|
|
69
78
|
index: number
|
|
70
79
|
): Promise<File | null> {
|
|
71
80
|
try {
|
|
72
|
-
let file:
|
|
81
|
+
let file: FileWithUri | null = null;
|
|
73
82
|
|
|
74
83
|
// Priority 1: Use doc.file if available (web native File API)
|
|
75
84
|
// This is the most efficient path as it doesn't require fetching
|
|
76
85
|
if (doc.file && doc.file instanceof globalThis.File) {
|
|
77
|
-
file = doc.file as
|
|
86
|
+
file = doc.file as FileWithUri;
|
|
78
87
|
// Ensure file has required properties
|
|
79
88
|
if (!file.name && doc.name) {
|
|
80
89
|
// Create new File with proper name if missing
|
|
@@ -82,8 +91,7 @@ export async function convertDocumentPickerAssetToFile(
|
|
|
82
91
|
}
|
|
83
92
|
// Preserve URI for preview if available (useful for mobile previews)
|
|
84
93
|
if (doc.uri) {
|
|
85
|
-
|
|
86
|
-
(file as any).uri = doc.uri;
|
|
94
|
+
file.uri = doc.uri;
|
|
87
95
|
}
|
|
88
96
|
return file;
|
|
89
97
|
}
|
|
@@ -101,10 +109,9 @@ export async function convertDocumentPickerAssetToFile(
|
|
|
101
109
|
const blob = await response.blob();
|
|
102
110
|
const fileName = doc.name || `file-${index + 1}`;
|
|
103
111
|
const fileType = doc.mimeType || blob.type || 'application/octet-stream';
|
|
104
|
-
file = new globalThis.File([blob], fileName, { type: fileType });
|
|
112
|
+
file = new globalThis.File([blob], fileName, { type: fileType }) as FileWithUri;
|
|
105
113
|
// Preserve URI for preview
|
|
106
|
-
|
|
107
|
-
(file as any).uri = doc.uri;
|
|
114
|
+
file.uri = doc.uri;
|
|
108
115
|
return file;
|
|
109
116
|
}
|
|
110
117
|
|
|
@@ -119,10 +126,9 @@ export async function convertDocumentPickerAssetToFile(
|
|
|
119
126
|
throw new Error(`Failed to fetch file: ${response.statusText}`);
|
|
120
127
|
}
|
|
121
128
|
const blob = await response.blob();
|
|
122
|
-
file = new globalThis.File([blob], fileName, { type: fileType });
|
|
129
|
+
file = new globalThis.File([blob], fileName, { type: fileType }) as FileWithUri;
|
|
123
130
|
// Preserve URI for preview (especially important for mobile)
|
|
124
|
-
|
|
125
|
-
(file as any).uri = doc.uri;
|
|
131
|
+
file.uri = doc.uri;
|
|
126
132
|
return file;
|
|
127
133
|
} catch (error: unknown) {
|
|
128
134
|
console.error('Failed to read file from URI:', error);
|