@oxy.so/services 13.0.0 → 13.2.0

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 (132) hide show
  1. package/lib/commonjs/ui/components/ExpoImage.js +13 -0
  2. package/lib/commonjs/ui/components/ExpoImage.js.map +1 -0
  3. package/lib/commonjs/ui/components/ExpoImage.macos.js +80 -0
  4. package/lib/commonjs/ui/components/ExpoImage.macos.js.map +1 -0
  5. package/lib/commonjs/ui/components/KeyboardBoundary.macos.js +19 -0
  6. package/lib/commonjs/ui/components/KeyboardBoundary.macos.js.map +1 -0
  7. package/lib/commonjs/ui/components/fileManagement/FileViewer.js +3 -3
  8. package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
  9. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +2 -2
  10. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
  11. package/lib/commonjs/ui/context/OxyContext.js +17 -15
  12. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  13. package/lib/commonjs/ui/hooks/accountQueryPersistence.js +50 -15
  14. package/lib/commonjs/ui/hooks/accountQueryPersistence.js.map +1 -1
  15. package/lib/commonjs/ui/hooks/persistedQueryCache.js +10 -4
  16. package/lib/commonjs/ui/hooks/persistedQueryCache.js.map +1 -1
  17. package/lib/commonjs/ui/hooks/queryClient.js +9 -15
  18. package/lib/commonjs/ui/hooks/queryClient.js.map +1 -1
  19. package/lib/commonjs/ui/oauth/nativeAuthTransport.js +1 -1
  20. package/lib/commonjs/ui/oauth/nativeAuthTransport.js.map +1 -1
  21. package/lib/commonjs/ui/screens/AvatarCropScreen.js +2 -2
  22. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  23. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +2 -2
  24. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  25. package/lib/commonjs/ui/screens/FileManagementScreen.js +4 -4
  26. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  27. package/lib/commonjs/ui/screens/OxyOneScreen.js +2 -2
  28. package/lib/commonjs/ui/screens/OxyOneScreen.js.map +1 -1
  29. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +2 -2
  30. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  31. package/lib/commonjs/ui/utils/imageSize.macos.js +23 -0
  32. package/lib/commonjs/ui/utils/imageSize.macos.js.map +1 -0
  33. package/lib/module/ui/components/ExpoImage.js +14 -0
  34. package/lib/module/ui/components/ExpoImage.js.map +1 -0
  35. package/lib/module/ui/components/ExpoImage.macos.js +76 -0
  36. package/lib/module/ui/components/ExpoImage.macos.js.map +1 -0
  37. package/lib/module/ui/components/KeyboardBoundary.macos.js +14 -0
  38. package/lib/module/ui/components/KeyboardBoundary.macos.js.map +1 -0
  39. package/lib/module/ui/components/fileManagement/FileViewer.js +1 -1
  40. package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
  41. package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
  42. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
  43. package/lib/module/ui/context/OxyContext.js +17 -14
  44. package/lib/module/ui/context/OxyContext.js.map +1 -1
  45. package/lib/module/ui/hooks/accountQueryPersistence.js +50 -15
  46. package/lib/module/ui/hooks/accountQueryPersistence.js.map +1 -1
  47. package/lib/module/ui/hooks/persistedQueryCache.js +10 -4
  48. package/lib/module/ui/hooks/persistedQueryCache.js.map +1 -1
  49. package/lib/module/ui/hooks/queryClient.js +9 -15
  50. package/lib/module/ui/hooks/queryClient.js.map +1 -1
  51. package/lib/module/ui/oauth/nativeAuthTransport.js +1 -1
  52. package/lib/module/ui/oauth/nativeAuthTransport.js.map +1 -1
  53. package/lib/module/ui/screens/AvatarCropScreen.js +1 -1
  54. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  55. package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
  56. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  57. package/lib/module/ui/screens/FileManagementScreen.js +1 -1
  58. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  59. package/lib/module/ui/screens/OxyOneScreen.js +1 -1
  60. package/lib/module/ui/screens/OxyOneScreen.js.map +1 -1
  61. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
  62. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  63. package/lib/module/ui/utils/imageSize.macos.js +18 -0
  64. package/lib/module/ui/utils/imageSize.macos.js.map +1 -0
  65. package/lib/typescript/commonjs/index.d.ts +1 -1
  66. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/ui/components/ExpoImage.d.ts +12 -0
  68. package/lib/typescript/commonjs/ui/components/ExpoImage.d.ts.map +1 -0
  69. package/lib/typescript/commonjs/ui/components/ExpoImage.macos.d.ts +16 -0
  70. package/lib/typescript/commonjs/ui/components/ExpoImage.macos.d.ts.map +1 -0
  71. package/lib/typescript/commonjs/ui/components/KeyboardBoundary.macos.d.ts +10 -0
  72. package/lib/typescript/commonjs/ui/components/KeyboardBoundary.macos.d.ts.map +1 -0
  73. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/ui/hooks/accountQueryPersistence.d.ts +22 -4
  75. package/lib/typescript/commonjs/ui/hooks/accountQueryPersistence.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/ui/hooks/persistedQueryCache.d.ts +5 -3
  77. package/lib/typescript/commonjs/ui/hooks/persistedQueryCache.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts +5 -4
  79. package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
  81. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  82. package/lib/typescript/commonjs/ui/index.d.ts +1 -1
  83. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/ui/oauth/nativeAuthTransport.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/ui/types/navigation.d.ts +2 -0
  86. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/ui/utils/imageSize.macos.d.ts +6 -0
  88. package/lib/typescript/commonjs/ui/utils/imageSize.macos.d.ts.map +1 -0
  89. package/lib/typescript/module/index.d.ts +1 -1
  90. package/lib/typescript/module/index.d.ts.map +1 -1
  91. package/lib/typescript/module/ui/components/ExpoImage.d.ts +12 -0
  92. package/lib/typescript/module/ui/components/ExpoImage.d.ts.map +1 -0
  93. package/lib/typescript/module/ui/components/ExpoImage.macos.d.ts +16 -0
  94. package/lib/typescript/module/ui/components/ExpoImage.macos.d.ts.map +1 -0
  95. package/lib/typescript/module/ui/components/KeyboardBoundary.macos.d.ts +10 -0
  96. package/lib/typescript/module/ui/components/KeyboardBoundary.macos.d.ts.map +1 -0
  97. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  98. package/lib/typescript/module/ui/hooks/accountQueryPersistence.d.ts +22 -4
  99. package/lib/typescript/module/ui/hooks/accountQueryPersistence.d.ts.map +1 -1
  100. package/lib/typescript/module/ui/hooks/persistedQueryCache.d.ts +5 -3
  101. package/lib/typescript/module/ui/hooks/persistedQueryCache.d.ts.map +1 -1
  102. package/lib/typescript/module/ui/hooks/queryClient.d.ts +5 -4
  103. package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
  104. package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
  105. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  106. package/lib/typescript/module/ui/index.d.ts +1 -1
  107. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  108. package/lib/typescript/module/ui/oauth/nativeAuthTransport.d.ts.map +1 -1
  109. package/lib/typescript/module/ui/types/navigation.d.ts +2 -0
  110. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  111. package/lib/typescript/module/ui/utils/imageSize.macos.d.ts +6 -0
  112. package/lib/typescript/module/ui/utils/imageSize.macos.d.ts.map +1 -0
  113. package/package.json +33 -32
  114. package/src/index.ts +1 -1
  115. package/src/ui/components/ExpoImage.macos.tsx +59 -0
  116. package/src/ui/components/ExpoImage.tsx +11 -0
  117. package/src/ui/components/KeyboardBoundary.macos.tsx +8 -0
  118. package/src/ui/components/fileManagement/FileViewer.tsx +1 -1
  119. package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
  120. package/src/ui/context/OxyContext.tsx +27 -19
  121. package/src/ui/hooks/accountQueryPersistence.ts +61 -16
  122. package/src/ui/hooks/persistedQueryCache.ts +13 -5
  123. package/src/ui/hooks/queryClient.ts +12 -18
  124. package/src/ui/index.ts +1 -1
  125. package/src/ui/oauth/nativeAuthTransport.ts +5 -1
  126. package/src/ui/screens/AvatarCropScreen.tsx +1 -1
  127. package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
  128. package/src/ui/screens/FileManagementScreen.tsx +1 -1
  129. package/src/ui/screens/OxyOneScreen.tsx +1 -1
  130. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
  131. package/src/ui/types/navigation.ts +2 -0
  132. package/src/ui/utils/imageSize.macos.ts +18 -0
@@ -46,7 +46,7 @@ import Animated, {
46
46
  withTiming,
47
47
  } from 'react-native-reanimated';
48
48
  import { useQuery, keepPreviousData } from '@tanstack/react-query';
49
- import { Image as ExpoImage } from 'expo-image';
49
+ import { ExpoImage } from '../components/ExpoImage';
50
50
  import { useTheme } from '@oxy.so/bloom/theme';
51
51
  import { logger } from '@oxy.so/core';
52
52
  import { useOxy } from '../context/oxyRuntimeContext';
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useCallback, useMemo } from 'react';
2
2
  import { View, StyleSheet, type TextInputProps } from 'react-native';
3
- import { Image as ExpoImage } from 'expo-image';
3
+ import { ExpoImage } from '../components/ExpoImage';
4
4
  import Ionicons from '../icons/Ionicons';
5
5
  import type { BaseScreenProps } from '../types/navigation';
6
6
  import { useTheme } from '@oxy.so/bloom/theme';
@@ -8,7 +8,7 @@ import { type ComponentRef, useState, useCallback, useMemo, useRef } from 'react
8
8
  import { View, StyleSheet, ScrollView, RefreshControl, useWindowDimensions } from 'react-native';
9
9
  import { Text } from '@oxy.so/bloom/typography';
10
10
  import { useQueryClient } from '@tanstack/react-query';
11
- import { Image as ExpoImage } from 'expo-image';
11
+ import { ExpoImage } from '../components/ExpoImage';
12
12
  import type { FileManagementScreenProps } from '../types/fileManagement';
13
13
  import { toast } from '@oxy.so/bloom/toast';
14
14
  import { surfaces } from '@oxy.so/bloom/surfaces';
@@ -1,6 +1,6 @@
1
1
  import { useContext, useState } from 'react';
2
2
  import { Linking, View } from 'react-native';
3
- import { Image as ExpoImage } from 'expo-image';
3
+ import { ExpoImage } from '../components/ExpoImage';
4
4
  import { SubscriptionPlans } from '@oxy.so/bloom/subscription-plans';
5
5
  import {
6
6
  SegmentedControl,
@@ -12,7 +12,7 @@ import {
12
12
  type LayoutChangeEvent,
13
13
  } from 'react-native';
14
14
  import { Text } from '@oxy.so/bloom/typography';
15
- import { Image as ExpoImage } from 'expo-image';
15
+ import { ExpoImage } from '../../components/ExpoImage';
16
16
  import Ionicons from '../../icons/Ionicons';
17
17
  import MaterialCommunityIcons from '../../icons/MaterialCommunityIcons';
18
18
  import type { FileMetadata } from '@oxy.so/core';
@@ -150,6 +150,8 @@ export interface OxyProviderProps {
150
150
  * account switch and deleted on sign-out. `RequireOxyAuth` waits for the
151
151
  * signed-in account's cache to restore, so another account's rows never
152
152
  * render. Works with the SDK's client or one passed as `queryClient`.
153
+ * A single query opts in with `meta: { persist: 'account' }` and needs no
154
+ * declaration here (`AccountQueryMeta`).
153
155
  */
154
156
  accountQueries?: AccountQueriesConfig;
155
157
  /**
@@ -0,0 +1,18 @@
1
+ /**
2
+ * react-native-macos fork of `imageSize.ts`: expo-image has no macOS
3
+ * implementation (see `components/ExpoImage.macos.tsx`), so the size comes
4
+ * from react-native's `Image.getSize`, which react-native-macos answers through
5
+ * NSImage. Fresco, the reason the Android fork avoids it, is Android-only.
6
+ */
7
+ import { Image } from 'react-native';
8
+
9
+ export interface ImageSize {
10
+ width: number;
11
+ height: number;
12
+ }
13
+
14
+ export function getImageSize(uri: string): Promise<ImageSize> {
15
+ return new Promise<ImageSize>((resolve, reject) => {
16
+ Image.getSize(uri, (width, height) => resolve({ width, height }), reject);
17
+ });
18
+ }