@umituz/react-native-design-system 4.27.29 → 4.27.30

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.
@@ -19,6 +19,8 @@ export declare function getTouchTargetSize(): number;
19
19
  export declare function getIPadScreenPadding(): number;
20
20
  /**
21
21
  * Get font scale for iPad
22
+ * Optimized for readability - Apple HIG recommends slightly larger fonts on iPad
23
+ * but not too large to avoid crowding
22
24
  */
23
25
  export declare function getIPadFontScale(): number;
24
26
  export interface IPadLayoutInfo {
@@ -13,6 +13,7 @@ export { AlertContainer } from './AlertContainer';
13
13
  export { AlertInline } from './AlertInline';
14
14
  export { AlertModal } from './AlertModal';
15
15
  export { AlertToast } from './AlertToast';
16
- export type { AlertType, AlertMode, AlertPosition, AlertAction, AlertOptions, Alert } from './AlertTypes';
16
+ export { AlertType, AlertMode } from './AlertTypes';
17
+ export type { AlertPosition, AlertAction, AlertOptions, Alert } from './AlertTypes';
17
18
  export * from './components';
18
19
  export * from './hooks';
@@ -46,7 +46,7 @@ export declare const SIZE_CONSTRAINTS: {
46
46
  readonly INPUT_MAX_LARGE: 200;
47
47
  readonly ICON_MAX_SMALL: 120;
48
48
  readonly ICON_MAX_TABLET: 180;
49
- readonly CONTENT_MAX_TABLET: 600;
49
+ readonly CONTENT_MAX_TABLET: 672;
50
50
  readonly MODAL_MIN_SMALL: 250;
51
51
  readonly MODAL_MIN_STANDARD: 300;
52
52
  readonly MODAL_MIN_TABLET: 350;
@@ -1,6 +1,10 @@
1
1
  /**
2
2
  * Store Factory
3
- * Create Zustand stores with AsyncStorage persistence and actions
3
+ * Create Zustand stores with optional persistence and actions
4
+ *
5
+ * NOTE: For persistence, provide a storage implementation.
6
+ * Use `storageRepository` from '@umituz/react-native-design-system/storage'
7
+ * for a centralized AsyncStorage abstraction.
4
8
  */
5
9
  import type { StoreApi } from 'zustand';
6
10
  import type { StoreConfig } from '../types/Store';
@@ -33,6 +33,22 @@ export type { IStorageRepository } from './application/ports/IStorageRepository'
33
33
  export { AsyncStorageRepository, storageRepository, } from './infrastructure/repositories/AsyncStorageRepository';
34
34
  export { storageService } from './infrastructure/adapters/StorageService';
35
35
  export type { StateStorage } from './domain/types/Store';
36
+ /**
37
+ * Persistent storage export
38
+ *
39
+ * AsyncStorage natively provides the Promise-based API that state management libraries expect.
40
+ * This is a centralized export for all persistent stores to use.
41
+ *
42
+ * @example
43
+ * import { createStore, persistentStorage } from '@umituz/react-native-design-system/storage';
44
+ *
45
+ * createStore({
46
+ * persist: true,
47
+ * storage: persistentStorage,
48
+ * ...
49
+ * });
50
+ */
51
+ export { persistentStorage, zustandStorage } from './infrastructure/adapters/ZustandStorageAdapter';
36
52
  export { useStorage } from './presentation/hooks/useStorage';
37
53
  export { useStorageState } from './presentation/hooks/useStorageState';
38
54
  export { useStore } from './presentation/hooks/useStore';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Persistent Storage Adapter
3
+ *
4
+ * Provides AsyncStorage in a format compatible with state management persist middleware.
5
+ *
6
+ * AsyncStorage natively supports the Promise-based API that state libraries expect:
7
+ * - getItem: (key: string) => Promise<string | null>
8
+ * - setItem: (key: string, value: string) => Promise<void>
9
+ * - removeItem: (key: string) => Promise<void>
10
+ *
11
+ * This is a centralized export point for persistent stores throughout the app.
12
+ *
13
+ * @example
14
+ * import { createStore, persistentStorage } from '@umituz/react-native-design-system/storage';
15
+ *
16
+ * const store = createStore({
17
+ * persist: true,
18
+ * storage: persistentStorage,
19
+ * ...
20
+ * });
21
+ */
22
+ /**
23
+ * Persistent storage export
24
+ *
25
+ * AsyncStorage instance that can be used directly with state management persist middleware.
26
+ * No wrapping needed - AsyncStorage already provides the correct interface.
27
+ */
28
+ export declare const persistentStorage: import("@react-native-async-storage/async-storage").AsyncStorageStatic;
29
+ /**
30
+ * @deprecated Use persistentStorage instead
31
+ */
32
+ export declare const zustandStorage: import("@react-native-async-storage/async-storage").AsyncStorageStatic;
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Utilities - Public API
2
+ * Utilities Index
3
+ * Exports utility functions from various utility subfolders
3
4
  */
4
- export * from './clipboard';
5
- export * from './sharing';
5
+ export * from "./clipboard";
6
+ export * from "./sharing";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-design-system",
3
- "version": "4.27.29",
3
+ "version": "4.27.30",
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",
@@ -17,8 +17,9 @@ export { AlertInline } from './AlertInline';
17
17
  export { AlertModal } from './AlertModal';
18
18
  export { AlertToast } from './AlertToast';
19
19
 
20
- // Types
21
- export type { AlertType, AlertMode, AlertPosition, AlertAction, AlertOptions, Alert } from './AlertTypes';
20
+ // Types - Enums exported as values
21
+ export { AlertType, AlertMode } from './AlertTypes';
22
+ export type { AlertPosition, AlertAction, AlertOptions, Alert } from './AlertTypes';
22
23
 
23
24
  // Sub-exports
24
25
  export * from './components';
@@ -128,25 +128,25 @@ export { storageService } from './infrastructure/adapters/StorageService';
128
128
  export type { StateStorage } from './domain/types/Store';
129
129
 
130
130
  // =============================================================================
131
- // ZUSTAND STORAGE - Sync API for Zustand persist middleware
131
+ // PERSISTENT STORAGE - Sync API for state management persist middleware
132
132
  // =============================================================================
133
133
 
134
134
  /**
135
- * Zustand-compatible storage export
135
+ * Persistent storage export
136
136
  *
137
- * AsyncStorage natively provides the Promise-based API that Zustand persist expects.
138
- * This is a centralized export for all Zustand stores to use.
137
+ * AsyncStorage natively provides the Promise-based API that state management libraries expect.
138
+ * This is a centralized export for all persistent stores to use.
139
139
  *
140
140
  * @example
141
- * import { createStore, zustandStorage } from '@umituz/react-native-design-system/storage';
141
+ * import { createStore, persistentStorage } from '@umituz/react-native-design-system/storage';
142
142
  *
143
143
  * createStore({
144
144
  * persist: true,
145
- * storage: zustandStorage,
145
+ * storage: persistentStorage,
146
146
  * ...
147
147
  * });
148
148
  */
149
- export { zustandStorage } from './infrastructure/adapters/ZustandStorageAdapter';
149
+ export { persistentStorage, zustandStorage } from './infrastructure/adapters/ZustandStorageAdapter';
150
150
 
151
151
  // =============================================================================
152
152
  // PRESENTATION LAYER - Hooks
@@ -1,21 +1,21 @@
1
1
  /**
2
- * Zustand Storage Adapter
2
+ * Persistent Storage Adapter
3
3
  *
4
- * Provides AsyncStorage in a format compatible with Zustand persist middleware.
4
+ * Provides AsyncStorage in a format compatible with state management persist middleware.
5
5
  *
6
- * AsyncStorage natively supports the Promise-based API that Zustand expects:
6
+ * AsyncStorage natively supports the Promise-based API that state libraries expect:
7
7
  * - getItem: (key: string) => Promise<string | null>
8
8
  * - setItem: (key: string, value: string) => Promise<void>
9
9
  * - removeItem: (key: string) => Promise<void>
10
10
  *
11
- * This is a centralized export point for Zustand stores throughout the app.
11
+ * This is a centralized export point for persistent stores throughout the app.
12
12
  *
13
13
  * @example
14
- * import { createStore, zustandStorage } from '@umituz/react-native-design-system/storage';
14
+ * import { createStore, persistentStorage } from '@umituz/react-native-design-system/storage';
15
15
  *
16
16
  * const store = createStore({
17
17
  * persist: true,
18
- * storage: zustandStorage,
18
+ * storage: persistentStorage,
19
19
  * ...
20
20
  * });
21
21
  */
@@ -23,9 +23,14 @@
23
23
  import AsyncStorage from '@react-native-async-storage/async-storage';
24
24
 
25
25
  /**
26
- * Zustand-compatible storage export
26
+ * Persistent storage export
27
27
  *
28
- * AsyncStorage instance that can be used directly with Zustand's persist middleware.
28
+ * AsyncStorage instance that can be used directly with state management persist middleware.
29
29
  * No wrapping needed - AsyncStorage already provides the correct interface.
30
30
  */
31
+ export const persistentStorage = AsyncStorage;
32
+
33
+ /**
34
+ * @deprecated Use persistentStorage instead
35
+ */
31
36
  export const zustandStorage = AsyncStorage;