@umituz/react-native-design-system 4.25.116 → 4.25.119
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/dist/image/infrastructure/services/ImageConversionService.d.ts +1 -0
- package/dist/tanstack/index.d.ts +1 -1
- package/dist/tanstack/infrastructure/config/PersisterConfig.d.ts +1 -14
- package/dist/tanstack/infrastructure/providers/TanstackProvider.d.ts +11 -38
- package/package.json +1 -1
- package/src/molecules/BaseModal.tsx +10 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Image Infrastructure - Conversion Service
|
|
3
3
|
*
|
|
4
4
|
* Handles format conversion, compression, and thumbnail generation
|
|
5
|
+
* Lazy loads expo-image-manipulator to reduce bundle size
|
|
5
6
|
*/
|
|
6
7
|
import type { ImageSaveOptions, ImageManipulationResult, SaveFormat } from '../../domain/entities/ImageTypes';
|
|
7
8
|
export declare class ImageConversionService {
|
package/dist/tanstack/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { BaseRepository } from './domain/repositories/BaseRepository';
|
|
|
13
13
|
export type { CreateParams, UpdateParams, ListParams, RepositoryOptions, } from './domain/repositories/RepositoryTypes';
|
|
14
14
|
export { RepositoryFactory } from './domain/repositories/RepositoryFactory';
|
|
15
15
|
export { CacheStrategies, createQueryClient, getCacheStrategy, type QueryClientFactoryOptions, } from './infrastructure/config/QueryClientConfig';
|
|
16
|
-
export {
|
|
16
|
+
export { clearPersistedCache, getPersistedCacheSize, type PersisterFactoryOptions, } from './infrastructure/config/PersisterConfig';
|
|
17
17
|
export { getGlobalQueryClient, hasGlobalQueryClient, setGlobalQueryClient, clearGlobalQueryClient, } from './infrastructure/config/QueryClientSingleton';
|
|
18
18
|
export { DevMonitor } from './infrastructure/monitoring/DevMonitor';
|
|
19
19
|
export type { QueryMetrics, CacheStats as QueryCacheStats, DevMonitorOptions, } from './infrastructure/monitoring/DevMonitor.types';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Infrastructure layer - AsyncStorage persistence setup
|
|
4
4
|
*
|
|
5
5
|
* General-purpose persistence configuration for any React Native app
|
|
6
|
+
* Lazy loads TanStack persistence packages to reduce bundle size
|
|
6
7
|
*/
|
|
7
|
-
import type { Persister } from '@tanstack/react-query-persist-client';
|
|
8
8
|
/**
|
|
9
9
|
* Persister factory options
|
|
10
10
|
*/
|
|
@@ -33,19 +33,6 @@ export interface PersisterFactoryOptions {
|
|
|
33
33
|
*/
|
|
34
34
|
throttleTime?: number;
|
|
35
35
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Create an AsyncStorage persister for TanStack Query
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```typescript
|
|
41
|
-
* const persister = createPersister({
|
|
42
|
-
* keyPrefix: 'myapp',
|
|
43
|
-
* maxAge: 24 * 60 * 60 * 1000, // 24 hours
|
|
44
|
-
* busterVersion: '1',
|
|
45
|
-
* });
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
export declare function createPersister(options?: PersisterFactoryOptions): Persister;
|
|
49
36
|
/**
|
|
50
37
|
* Clear all persisted cache data
|
|
51
38
|
* Useful for logout or cache reset scenarios
|
|
@@ -1,53 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
3
|
-
import type { Persister } from '@tanstack/react-query-persist-client';
|
|
4
2
|
import { type QueryClientFactoryOptions } from '../config/QueryClientConfig';
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Persister factory options
|
|
5
|
+
*/
|
|
6
|
+
export interface PersisterFactoryOptions {
|
|
7
|
+
keyPrefix?: string;
|
|
8
|
+
maxAge?: number;
|
|
9
|
+
busterVersion?: string;
|
|
10
|
+
throttleTime?: number;
|
|
11
|
+
}
|
|
6
12
|
/**
|
|
7
13
|
* TanStack provider props
|
|
8
14
|
*/
|
|
9
15
|
export interface TanstackProviderProps {
|
|
10
|
-
/**
|
|
11
|
-
* Child components
|
|
12
|
-
*/
|
|
13
16
|
children: React.ReactNode;
|
|
14
|
-
|
|
15
|
-
* Custom QueryClient instance
|
|
16
|
-
* If not provided, a default one will be created
|
|
17
|
-
*/
|
|
18
|
-
queryClient?: QueryClient;
|
|
19
|
-
/**
|
|
20
|
-
* QueryClient configuration options
|
|
21
|
-
* Only used if queryClient is not provided
|
|
22
|
-
*/
|
|
17
|
+
queryClient?: any;
|
|
23
18
|
queryClientOptions?: QueryClientFactoryOptions;
|
|
24
|
-
/**
|
|
25
|
-
* Enable AsyncStorage persistence
|
|
26
|
-
* @default true
|
|
27
|
-
*/
|
|
28
19
|
enablePersistence?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Enable DevMonitor logging (development only)
|
|
31
|
-
* @default false
|
|
32
|
-
*/
|
|
33
20
|
enableDevTools?: boolean;
|
|
34
|
-
|
|
35
|
-
* Custom persister instance
|
|
36
|
-
* Only used if enablePersistence is true
|
|
37
|
-
*/
|
|
38
|
-
persister?: Persister;
|
|
39
|
-
/**
|
|
40
|
-
* Persister configuration options
|
|
41
|
-
* Only used if enablePersistence is true and persister is not provided
|
|
42
|
-
*/
|
|
21
|
+
persister?: any;
|
|
43
22
|
persisterOptions?: PersisterFactoryOptions;
|
|
44
|
-
/**
|
|
45
|
-
* Callback when persistence is successfully restored
|
|
46
|
-
*/
|
|
47
23
|
onPersistSuccess?: () => void;
|
|
48
|
-
/**
|
|
49
|
-
* Callback when persistence restoration fails
|
|
50
|
-
*/
|
|
51
24
|
onPersistError?: () => void;
|
|
52
25
|
}
|
|
53
26
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-design-system",
|
|
3
|
-
"version": "4.25.
|
|
3
|
+
"version": "4.25.119",
|
|
4
4
|
"description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, onboarding, and loading utilities - TanStack persistence and expo-image-manipulator now lazy loaded",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -41,7 +41,16 @@ export const BaseModal: React.FC<BaseModalProps> = ({
|
|
|
41
41
|
}
|
|
42
42
|
}, [dismissOnBackdrop, onClose]);
|
|
43
43
|
|
|
44
|
-
if (
|
|
44
|
+
if (__DEV__) {
|
|
45
|
+
console.log("[BaseModal] Render:", { visible, testID, hasChildren: !!children });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!visible) {
|
|
49
|
+
if (__DEV__) {
|
|
50
|
+
console.log("[BaseModal] Early returning (visible = false)");
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
45
54
|
|
|
46
55
|
return (
|
|
47
56
|
<Modal
|