@sudobility/components 2.0.3

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 (145) hide show
  1. package/README.md +169 -0
  2. package/dist/hooks/useClickOutside.d.ts +3 -0
  3. package/dist/hooks/useClickOutside.d.ts.map +1 -0
  4. package/dist/hooks/useCodeLoader.d.ts +8 -0
  5. package/dist/hooks/useCodeLoader.d.ts.map +1 -0
  6. package/dist/hooks/useCopyToClipboard.d.ts +64 -0
  7. package/dist/hooks/useCopyToClipboard.d.ts.map +1 -0
  8. package/dist/index.d.ts +1069 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.esm.js +13064 -0
  11. package/dist/index.umd.js +67 -0
  12. package/dist/lib/index.d.ts +8 -0
  13. package/dist/lib/index.d.ts.map +1 -0
  14. package/dist/lib/utils.d.ts +4 -0
  15. package/dist/lib/utils.d.ts.map +1 -0
  16. package/dist/ui/alert.d.ts +20 -0
  17. package/dist/ui/alert.d.ts.map +1 -0
  18. package/dist/ui/animated-section.d.ts +28 -0
  19. package/dist/ui/animated-section.d.ts.map +1 -0
  20. package/dist/ui/button.d.ts +13 -0
  21. package/dist/ui/button.d.ts.map +1 -0
  22. package/dist/ui/card.d.ts +39 -0
  23. package/dist/ui/card.d.ts.map +1 -0
  24. package/dist/ui/comparison-section.d.ts +58 -0
  25. package/dist/ui/comparison-section.d.ts.map +1 -0
  26. package/dist/ui/confirmation-dialog.d.ts +16 -0
  27. package/dist/ui/confirmation-dialog.d.ts.map +1 -0
  28. package/dist/ui/content-container.d.ts +15 -0
  29. package/dist/ui/content-container.d.ts.map +1 -0
  30. package/dist/ui/design-system-components.d.ts +53 -0
  31. package/dist/ui/design-system-components.d.ts.map +1 -0
  32. package/dist/ui/dropdown.d.ts +20 -0
  33. package/dist/ui/dropdown.d.ts.map +1 -0
  34. package/dist/ui/email-accounts-list.d.ts +27 -0
  35. package/dist/ui/email-accounts-list.d.ts.map +1 -0
  36. package/dist/ui/email-input-group.d.ts +53 -0
  37. package/dist/ui/email-input-group.d.ts.map +1 -0
  38. package/dist/ui/empty-state.d.ts +11 -0
  39. package/dist/ui/empty-state.d.ts.map +1 -0
  40. package/dist/ui/feature-card.d.ts +17 -0
  41. package/dist/ui/feature-card.d.ts.map +1 -0
  42. package/dist/ui/feature-grid.d.ts +52 -0
  43. package/dist/ui/feature-grid.d.ts.map +1 -0
  44. package/dist/ui/flex-container.d.ts +13 -0
  45. package/dist/ui/flex-container.d.ts.map +1 -0
  46. package/dist/ui/form-field-group.d.ts +58 -0
  47. package/dist/ui/form-field-group.d.ts.map +1 -0
  48. package/dist/ui/free-email-banner.d.ts +20 -0
  49. package/dist/ui/free-email-banner.d.ts.map +1 -0
  50. package/dist/ui/gradient-button.d.ts +15 -0
  51. package/dist/ui/gradient-button.d.ts.map +1 -0
  52. package/dist/ui/hero-banner-with-badge.d.ts +20 -0
  53. package/dist/ui/hero-banner-with-badge.d.ts.map +1 -0
  54. package/dist/ui/icon-container.d.ts +12 -0
  55. package/dist/ui/icon-container.d.ts.map +1 -0
  56. package/dist/ui/index.d.ts +110 -0
  57. package/dist/ui/index.d.ts.map +1 -0
  58. package/dist/ui/input.d.ts +6 -0
  59. package/dist/ui/input.d.ts.map +1 -0
  60. package/dist/ui/internal-link-clusters.d.ts +65 -0
  61. package/dist/ui/internal-link-clusters.d.ts.map +1 -0
  62. package/dist/ui/label.d.ts +5 -0
  63. package/dist/ui/label.d.ts.map +1 -0
  64. package/dist/ui/loading-state.d.ts +11 -0
  65. package/dist/ui/loading-state.d.ts.map +1 -0
  66. package/dist/ui/logo.d.ts +15 -0
  67. package/dist/ui/logo.d.ts.map +1 -0
  68. package/dist/ui/metrics-grid.d.ts +20 -0
  69. package/dist/ui/metrics-grid.d.ts.map +1 -0
  70. package/dist/ui/modal.d.ts +38 -0
  71. package/dist/ui/modal.d.ts.map +1 -0
  72. package/dist/ui/no-content.d.ts +9 -0
  73. package/dist/ui/no-content.d.ts.map +1 -0
  74. package/dist/ui/page-container.d.ts +13 -0
  75. package/dist/ui/page-container.d.ts.map +1 -0
  76. package/dist/ui/process-steps.d.ts +18 -0
  77. package/dist/ui/process-steps.d.ts.map +1 -0
  78. package/dist/ui/section-badge.d.ts +11 -0
  79. package/dist/ui/section-badge.d.ts.map +1 -0
  80. package/dist/ui/section-header.d.ts +27 -0
  81. package/dist/ui/section-header.d.ts.map +1 -0
  82. package/dist/ui/section.d.ts +16 -0
  83. package/dist/ui/section.d.ts.map +1 -0
  84. package/dist/ui/select.d.ts +14 -0
  85. package/dist/ui/select.d.ts.map +1 -0
  86. package/dist/ui/smart-link.d.ts +23 -0
  87. package/dist/ui/smart-link.d.ts.map +1 -0
  88. package/dist/ui/spinner.d.ts +11 -0
  89. package/dist/ui/spinner.d.ts.map +1 -0
  90. package/dist/ui/status-badge.d.ts +17 -0
  91. package/dist/ui/status-badge.d.ts.map +1 -0
  92. package/dist/ui/status-indicator.d.ts +10 -0
  93. package/dist/ui/status-indicator.d.ts.map +1 -0
  94. package/dist/ui/switch.d.ts +4 -0
  95. package/dist/ui/switch.d.ts.map +1 -0
  96. package/dist/ui/table-of-contents.d.ts +19 -0
  97. package/dist/ui/table-of-contents.d.ts.map +1 -0
  98. package/dist/ui/tabs.d.ts +7 -0
  99. package/dist/ui/tabs.d.ts.map +1 -0
  100. package/dist/ui/typography.d.ts +50 -0
  101. package/dist/ui/typography.d.ts.map +1 -0
  102. package/dist/ui/use-case-grid.d.ts +17 -0
  103. package/dist/ui/use-case-grid.d.ts.map +1 -0
  104. package/dist/ui/wallet-icon.d.ts +13 -0
  105. package/dist/ui/wallet-icon.d.ts.map +1 -0
  106. package/dist/ui/wallet-selection.d.ts +49 -0
  107. package/dist/ui/wallet-selection.d.ts.map +1 -0
  108. package/dist/utils/css-optimization.d.ts +81 -0
  109. package/dist/utils/css-optimization.d.ts.map +1 -0
  110. package/dist/utils/formatFileSize.d.ts +42 -0
  111. package/dist/utils/formatFileSize.d.ts.map +1 -0
  112. package/dist/utils/image-optimization.d.ts +75 -0
  113. package/dist/utils/image-optimization.d.ts.map +1 -0
  114. package/dist/utils/index.d.ts +13 -0
  115. package/dist/utils/index.d.ts.map +1 -0
  116. package/dist/utils/lazy-components.d.ts +54 -0
  117. package/dist/utils/lazy-components.d.ts.map +1 -0
  118. package/dist/utils/lazy-loading.d.ts +96 -0
  119. package/dist/utils/lazy-loading.d.ts.map +1 -0
  120. package/dist/utils/navigation.d.ts +133 -0
  121. package/dist/utils/navigation.d.ts.map +1 -0
  122. package/dist/utils/navigationHelpers.d.ts +89 -0
  123. package/dist/utils/navigationHelpers.d.ts.map +1 -0
  124. package/dist/utils/storage.d.ts +250 -0
  125. package/dist/utils/storage.d.ts.map +1 -0
  126. package/dist/utils/treeShaking.d.ts +124 -0
  127. package/dist/utils/treeShaking.d.ts.map +1 -0
  128. package/dist/utils/walletBrowserDetection.d.ts +17 -0
  129. package/dist/utils/walletBrowserDetection.d.ts.map +1 -0
  130. package/package.json +149 -0
  131. package/vendor/@johnqh/design-system/colors.d.ts +1064 -0
  132. package/vendor/@johnqh/design-system/colors.d.ts.map +1 -0
  133. package/vendor/@johnqh/design-system/index.d.ts +123 -0
  134. package/vendor/@johnqh/design-system/index.d.ts.map +1 -0
  135. package/vendor/@johnqh/design-system/index.esm.js +3543 -0
  136. package/vendor/@johnqh/design-system/index.umd.js +1 -0
  137. package/vendor/@johnqh/design-system/package.json +9 -0
  138. package/vendor/@johnqh/design-system/simple-variants.d.ts +72 -0
  139. package/vendor/@johnqh/design-system/simple-variants.d.ts.map +1 -0
  140. package/vendor/@johnqh/design-system/tokens.d.ts +307 -0
  141. package/vendor/@johnqh/design-system/tokens.d.ts.map +1 -0
  142. package/vendor/@johnqh/design-system/typography.d.ts +112 -0
  143. package/vendor/@johnqh/design-system/typography.d.ts.map +1 -0
  144. package/vendor/@johnqh/design-system/variants.d.ts +35 -0
  145. package/vendor/@johnqh/design-system/variants.d.ts.map +1 -0
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Platform-agnostic navigation service
3
+ * Automatically selects the appropriate navigation implementation based on platform
4
+ */
5
+ interface UINavigationConfig {
6
+ defaultRoute?: string;
7
+ enableHistory?: boolean;
8
+ }
9
+ interface UINavigationOptions {
10
+ replace?: boolean;
11
+ state?: any;
12
+ }
13
+ interface UINavigationState {
14
+ currentRoute: string;
15
+ currentPath: string;
16
+ history: string[];
17
+ searchParams: URLSearchParams;
18
+ params: Record<string, string>;
19
+ }
20
+ interface UINavigationService {
21
+ navigate: (route: string, options?: UINavigationOptions) => void;
22
+ getCurrentRoute: () => string;
23
+ getCurrentState: () => UINavigationState;
24
+ getCurrentPath: () => string;
25
+ getSearchParams: () => URLSearchParams;
26
+ getHistory: () => string[];
27
+ goBack: (fallbackPath?: string) => void;
28
+ replace: (route: string, options?: UINavigationOptions) => void;
29
+ canGoBack: () => boolean;
30
+ isSupported: () => boolean;
31
+ }
32
+ interface UINavigationHook {
33
+ navigate: (route: string, options?: UINavigationOptions) => void;
34
+ goBack: (fallbackPath?: string) => void;
35
+ replace: (route: string, options?: UINavigationOptions) => void;
36
+ currentPath: string;
37
+ searchParams: URLSearchParams;
38
+ params: Record<string, string>;
39
+ canGoBack: boolean;
40
+ isSupported: boolean;
41
+ }
42
+ interface UILocationHook {
43
+ pathname: string;
44
+ search: string;
45
+ hash: string;
46
+ searchParams: URLSearchParams;
47
+ state: Record<string, any>;
48
+ key: string;
49
+ }
50
+ /**
51
+ * Get the default navigation service instance (singleton pattern)
52
+ */
53
+ export declare function getUINavigationService(config?: Partial<UINavigationConfig>): UINavigationService;
54
+ /**
55
+ * Platform-agnostic navigation hook
56
+ * Drop-in replacement for React Router's useNavigate
57
+ */
58
+ export declare function useNavigation(): UINavigationHook;
59
+ /**
60
+ * Platform-agnostic location hook
61
+ * Drop-in replacement for React Router's useLocation
62
+ */
63
+ export declare function useLocation(): UILocationHook;
64
+ /**
65
+ * Platform-agnostic search params hook
66
+ * Drop-in replacement for React Router's useSearchParams
67
+ */
68
+ export declare function useSearchParams(): [
69
+ URLSearchParams,
70
+ (params: URLSearchParams | Record<string, string>) => void
71
+ ];
72
+ /**
73
+ * Convenience functions for common navigation operations
74
+ */
75
+ export declare const navigationHelper: {
76
+ /**
77
+ * Navigate to a path
78
+ * @param path Target path
79
+ * @param options Navigation options
80
+ */
81
+ navigate: (path: string, options?: UINavigationOptions) => void;
82
+ /**
83
+ * Go back to previous screen
84
+ * @param fallbackPath Fallback path if no history
85
+ */
86
+ goBack: (fallbackPath?: string) => void;
87
+ /**
88
+ * Replace current route
89
+ * @param path Target path
90
+ * @param options Navigation options
91
+ */
92
+ replace: (path: string, options?: UINavigationOptions) => void;
93
+ /**
94
+ * Get current path
95
+ */
96
+ getCurrentPath: () => string;
97
+ /**
98
+ * Get search parameters
99
+ */
100
+ getSearchParams: () => URLSearchParams;
101
+ /**
102
+ * Navigate to mail app
103
+ */
104
+ goToMail: () => void;
105
+ /**
106
+ * Navigate to preferences
107
+ */
108
+ goToPreferences: () => void;
109
+ /**
110
+ * Navigate to compose page
111
+ * @param type Compose type (compose, reply, forward)
112
+ * @param params Additional parameters
113
+ */
114
+ goToCompose: (type?: string, params?: Record<string, string>) => void;
115
+ /**
116
+ * Navigate to connect wallet page
117
+ */
118
+ goToConnect: () => void;
119
+ /**
120
+ * Navigate to delegate page
121
+ */
122
+ goToDelegate: () => void;
123
+ /**
124
+ * Navigate to home page
125
+ */
126
+ goToHome: () => void;
127
+ /**
128
+ * Check if can go back
129
+ */
130
+ canGoBack: () => boolean;
131
+ };
132
+ export type { UINavigationService, UINavigationHook, UILocationHook, UINavigationConfig, UINavigationOptions, UINavigationState, };
133
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/utils/navigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,UAAU,kBAAkB;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC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agnostic navigation structures and functions
4
+ */
5
+ export interface NavigationItem {
6
+ label: string;
7
+ href: string;
8
+ isExternal?: boolean;
9
+ isActive?: boolean;
10
+ }
11
+ export interface BreadcrumbItem {
12
+ label: string;
13
+ href?: string;
14
+ current?: boolean;
15
+ }
16
+ export declare const getActiveNavItem: (currentPath: string, items: NavigationItem[]) => NavigationItem | null;
17
+ export declare const createBreadcrumb: (path: string, customLabel?: string, pathLabels?: Record<string, string>) => BreadcrumbItem[];
18
+ export interface CTAButton {
19
+ label: string;
20
+ href: string;
21
+ variant?: string;
22
+ isExternal?: boolean;
23
+ }
24
+ export declare const navigationUtils: {
25
+ /**
26
+ * Check if a path is currently active
27
+ */
28
+ isActivePath: (currentPath: string, targetPath: string, exact?: boolean) => boolean;
29
+ /**
30
+ * Get parent path from current path
31
+ */
32
+ getParentPath: (path: string) => string;
33
+ /**
34
+ * Extract route parameters from path patterns
35
+ */
36
+ extractParams: (pattern: string, path: string) => Record<string, string>;
37
+ /**
38
+ * Build URL with query parameters
39
+ */
40
+ buildUrlWithParams: (path: string, params: Record<string, string | number | boolean>) => string;
41
+ /**
42
+ * Parse query parameters from URL
43
+ */
44
+ parseQueryParams: (search: string) => Record<string, string>;
45
+ /**
46
+ * Normalize path (remove trailing slash, ensure leading slash)
47
+ */
48
+ normalizePath: (path: string) => string;
49
+ /**
50
+ * Check if URL is external
51
+ */
52
+ isExternalUrl: (url: string) => boolean;
53
+ };
54
+ declare const _default: {
55
+ getActiveNavItem: (currentPath: string, items: NavigationItem[]) => NavigationItem | null;
56
+ createBreadcrumb: (path: string, customLabel?: string, pathLabels?: Record<string, string>) => BreadcrumbItem[];
57
+ navigationUtils: {
58
+ /**
59
+ * Check if a path is currently active
60
+ */
61
+ isActivePath: (currentPath: string, targetPath: string, exact?: boolean) => boolean;
62
+ /**
63
+ * Get parent path from current path
64
+ */
65
+ getParentPath: (path: string) => string;
66
+ /**
67
+ * Extract route parameters from path patterns
68
+ */
69
+ extractParams: (pattern: string, path: string) => Record<string, string>;
70
+ /**
71
+ * Build URL with query parameters
72
+ */
73
+ buildUrlWithParams: (path: string, params: Record<string, string | number | boolean>) => string;
74
+ /**
75
+ * Parse query parameters from URL
76
+ */
77
+ parseQueryParams: (search: string) => Record<string, string>;
78
+ /**
79
+ * Normalize path (remove trailing slash, ensure leading slash)
80
+ */
81
+ normalizePath: (path: string) => string;
82
+ /**
83
+ * Check if URL is external
84
+ */
85
+ isExternalUrl: (url: string) => boolean;
86
+ };
87
+ };
88
+ export default _default;
89
+ //# sourceMappingURL=navigationHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigationHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/navigationHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAGD,eAAO,MAAM,gBAAgB,GAC3B,aAAa,MAAM,EACnB,OAAO,cAAc,EAAE,KACtB,cAAc,GAAG,IAEnB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,MAAM,MAAM,EACZ,cAAc,MAAM,EACpB,aAAa,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAClC,cAAc,EAwChB,CAAC;AAGF,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAGD,eAAO,MAAM,eAAe;IAC1B;;OAEG;gCAEY,MAAM,cACP,MAAM,sBAEjB,OAAO;IAOV;;OAEG;0BACmB,MAAM,KAAG,MAAM;IAMrC;;OAEG;6BACsB,MAAM,QAAQ,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAgBtE;;OAEG;+BAEK,MAAM,UACJ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,KAChD,MAAM;IAQT;;OAEG;+BACwB,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAW1D;;OAEG;0BACmB,MAAM,KAAG,MAAM;IAcrC;;OAEG;yBACkB,MAAM,KAAG,OAAO;CAWtC,CAAC;;oCAnKa,MAAM,SACZ,cAAc,EAAE,KACtB,cAAc,GAAG,IAAI;6BAKhB,MAAM,gBACE,MAAM,eACP,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAClC,cAAc,EAAE;;QAoDjB;;WAEG;oCAEY,MAAM,cACP,MAAM,sBAEjB,OAAO;QAOV;;WAEG;8BACmB,MAAM,KAAG,MAAM;QAMrC;;WAEG;iCACsB,MAAM,QAAQ,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;QAgBtE;;WAEG;mCAEK,MAAM,UACJ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,KAChD,MAAM;QAQT;;WAEG;mCACwB,MAAM,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;QAW1D;;WAEG;8BACmB,MAAM,KAAG,MAAM;QAcrC;;WAEG;6BACkB,MAAM,KAAG,OAAO;;;AAavC,wBAIE"}
@@ -0,0 +1,250 @@
1
+ /**
2
+ * @fileoverview Cross-Platform Storage Management System
3
+ * @description Provides unified storage interface with TTL support, caching strategies, and platform abstraction
4
+ *
5
+ * @example Basic Usage
6
+ * ```typescript
7
+ * import { walletStorage, themeStorage } from '@/utils/storage';
8
+ *
9
+ * // Store user wallet data with 7-day TTL
10
+ * walletStorage.set('0x742d35cc...', {
11
+ * username: 'alice.eth',
12
+ * addresses: ['alice@0xmail.box'],
13
+ * lastLogin: Date.now()
14
+ * });
15
+ *
16
+ * // Retrieve cached data
17
+ * const userData = walletStorage.get('0x742d35cc...');
18
+ * if (userData) {
19
+ * console.log(`Welcome back ${userData.username}!`);
20
+ * }
21
+ *
22
+ * // Store theme preference permanently
23
+ * themeStorage.set('darkMode', true);
24
+ * ```
25
+ *
26
+ * @example Custom Storage Manager
27
+ * ```typescript
28
+ * import { StorageManager } from '@/utils/storage';
29
+ *
30
+ * // Create custom storage with 1-hour TTL
31
+ * const apiCache = new StorageManager({
32
+ * prefix: 'api-cache',
33
+ * ttl: 60 * 60 * 1000, // 1 hour
34
+ * storageType: 'localStorage'
35
+ * });
36
+ *
37
+ * // Cache API responses
38
+ * apiCache.set('user-123', apiResponse, 30 * 60 * 1000); // 30 min override
39
+ * ```
40
+ *
41
+ * @description Storage Types:
42
+ * - **walletStorage**: User authentication data (7-day TTL)
43
+ * - **appStorage**: General application data (no TTL)
44
+ * - **themeStorage**: UI preferences (no TTL)
45
+ *
46
+ * @description Features:
47
+ * - **TTL Support**: Automatic expiration and cleanup
48
+ * - **Platform Abstraction**: Works on web and React Native
49
+ * - **Error Handling**: Graceful fallbacks for storage failures
50
+ * - **Type Safety**: Full TypeScript support with generics
51
+ * - **Prefix Management**: Isolated storage namespaces
52
+ */
53
+ export interface PlatformStorage {
54
+ getItem: (key: string) => string | null;
55
+ setItem: (key: string, value: string) => void;
56
+ removeItem: (key: string) => void;
57
+ clear: () => void;
58
+ getAllKeys?: () => string[];
59
+ }
60
+ export type StorageType = 'localStorage' | 'sessionStorage' | 'asyncStorage' | 'memory';
61
+ /**
62
+ * Configuration options for creating a storage manager
63
+ */
64
+ interface StorageOptions {
65
+ /** Prefix for all storage keys to avoid conflicts */
66
+ prefix?: string;
67
+ /** Default TTL in milliseconds for all stored items */
68
+ ttl?: number;
69
+ /** Platform-specific storage implementation */
70
+ platformStorage?: PlatformStorage;
71
+ /** Storage type identifier */
72
+ storageType?: StorageType;
73
+ }
74
+ /**
75
+ * Cross-platform storage manager with TTL and caching capabilities
76
+ *
77
+ * @description Provides a unified interface for data persistence across
78
+ * different platforms (web localStorage, React Native AsyncStorage, etc.)
79
+ * with built-in expiration handling and error recovery.
80
+ *
81
+ * @example Basic Operations
82
+ * ```typescript
83
+ * const storage = new StorageManager({ prefix: 'myapp', ttl: 60000 });
84
+ *
85
+ * // Store with default TTL (1 minute)
86
+ * storage.set('user', { name: 'Alice', id: 123 });
87
+ *
88
+ * // Store with custom TTL (5 minutes)
89
+ * storage.set('session', sessionData, 5 * 60 * 1000);
90
+ *
91
+ * // Retrieve (returns undefined if expired)
92
+ * const user = storage.get('user');
93
+ *
94
+ * // Clear all items with pattern
95
+ * storage.clear('user-'); // Removes all keys starting with 'user-'
96
+ * ```
97
+ */
98
+ declare class StorageManager {
99
+ private prefix;
100
+ private defaultTTL?;
101
+ private platformStorage;
102
+ constructor(options?: StorageOptions);
103
+ private createFallbackStorage;
104
+ private getKey;
105
+ private isExpired;
106
+ /**
107
+ * Stores a value with optional TTL
108
+ *
109
+ * @template T - Type of value being stored
110
+ * @param key - Storage key (will be prefixed)
111
+ * @param value - Data to store (must be JSON serializable)
112
+ * @param ttl - Time-to-live in milliseconds (overrides default)
113
+ *
114
+ * @description Behavior:
115
+ * - Values are JSON serialized with metadata (timestamp, TTL)
116
+ * - TTL parameter overrides the manager's default TTL
117
+ * - Storage errors are logged but don't throw exceptions
118
+ * - Supports any JSON-serializable data type
119
+ *
120
+ * @example Usage
121
+ * ```typescript
122
+ * // Store with default TTL
123
+ * storage.set('user-123', { name: 'Alice', email: 'alice@example.com' });
124
+ *
125
+ * // Store with custom 5-minute TTL
126
+ * storage.set('session', sessionData, 5 * 60 * 1000);
127
+ *
128
+ * // Store permanently (no TTL)
129
+ * storage.set('preferences', userPrefs, undefined);
130
+ * ```
131
+ */
132
+ set<T>(key: string, value: T, ttl?: number): void;
133
+ /**
134
+ * Retrieves a stored value with automatic expiration handling
135
+ *
136
+ * @template T - Expected type of stored value
137
+ * @param key - Storage key to retrieve
138
+ * @param defaultValue - Value to return if key doesn't exist or is expired
139
+ * @returns Stored value or defaultValue
140
+ *
141
+ * @description Behavior:
142
+ * - Returns undefined if key doesn't exist and no defaultValue provided
143
+ * - Automatically removes expired items from storage
144
+ * - Handles JSON parsing errors gracefully
145
+ * - Type-safe return values with TypeScript generics
146
+ *
147
+ * @example Usage
148
+ * ```typescript
149
+ * // Get with undefined fallback
150
+ * const user = storage.get<User>('user-123');
151
+ * if (user) {
152
+ * console.log(`Hello ${user.name}!`);
153
+ * }
154
+ *
155
+ * // Get with default value
156
+ * const theme = storage.get('theme', 'light');
157
+ *
158
+ * // Type-safe retrieval
159
+ * const settings = storage.get<AppSettings>('settings', defaultSettings);
160
+ * ```
161
+ */
162
+ get<T>(key: string, defaultValue?: T): T | undefined;
163
+ remove(key: string): void;
164
+ clear(pattern?: string): void;
165
+ has(key: string): boolean;
166
+ getAllKeys(): string[];
167
+ }
168
+ /**
169
+ * General application storage for temporary and session data
170
+ *
171
+ * @description Configuration:
172
+ * - Prefix: 'mailbox'
173
+ * - TTL: None (permanent storage)
174
+ * - Use case: App settings, UI state, temporary data
175
+ *
176
+ * @example Usage
177
+ * ```typescript
178
+ * import { appStorage } from '@/utils/storage';
179
+ *
180
+ * // Store temporary app state
181
+ * appStorage.set('sidebar-collapsed', true);
182
+ * appStorage.set('last-visited-page', '/inbox');
183
+ *
184
+ * // Retrieve app state
185
+ * const isCollapsed = appStorage.get('sidebar-collapsed', false);
186
+ * ```
187
+ */
188
+ export declare const appStorage: StorageManager;
189
+ /**
190
+ * Theme and UI preference storage
191
+ *
192
+ * @description Configuration:
193
+ * - Prefix: 'mailbox-theme'
194
+ * - TTL: None (permanent storage)
195
+ * - Use case: Dark/light mode, layout preferences, UI customization
196
+ *
197
+ * @example Usage
198
+ * ```typescript
199
+ * import { themeStorage } from '@/utils/storage';
200
+ *
201
+ * // Store user preferences
202
+ * themeStorage.set('darkMode', true);
203
+ * themeStorage.set('fontSize', 'large');
204
+ * themeStorage.set('compactMode', false);
205
+ *
206
+ * // Load preferences on app start
207
+ * const isDark = themeStorage.get('darkMode', false);
208
+ * ```
209
+ */
210
+ export declare const themeStorage: StorageManager;
211
+ /**
212
+ * Wallet authentication and user data storage with 7-day TTL
213
+ *
214
+ * @description Configuration:
215
+ * - Prefix: 'walletUser'
216
+ * - TTL: 7 days (604,800,000 ms)
217
+ * - Use case: Authentication tokens, user profiles, wallet data
218
+ *
219
+ * @example Usage
220
+ * ```typescript
221
+ * import { walletStorage } from '@/utils/storage';
222
+ * import type { WalletUserData } from './types';
223
+ *
224
+ * // Store user authentication data
225
+ * const userData: WalletUserData = {
226
+ * id: 'user123',
227
+ * username: 'alice.eth',
228
+ * addresses: ['alice@0xmail.box'],
229
+ * mailboxes: [...]
230
+ * };
231
+ *
232
+ * walletStorage.set('0x742d35cc...', userData);
233
+ *
234
+ * // Retrieve user data (automatically expires after 7 days)
235
+ * const user = walletStorage.get<WalletUserData>('0x742d35cc...');
236
+ * if (user) {
237
+ * console.log(`Welcome back ${user.username}!`);
238
+ * } else {
239
+ * console.log('Please authenticate again');
240
+ * }
241
+ * ```
242
+ */
243
+ export declare const walletStorage: StorageManager;
244
+ export declare const createSimpleStorage: (platformStorage?: PlatformStorage) => {
245
+ setItem: (key: string, value: string) => void;
246
+ getItem: (key: string) => string | null;
247
+ removeItem: (key: string) => void;
248
+ };
249
+ export default StorageManager;
250
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/utils/storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAGH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACxC,OAAO,EAAE,CAA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AE,MAAM,GAAG,OAAO;IAUzB,UAAU,IAAI,MAAM,EAAE;CAgBvB;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,gBAAuB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,YAAY,gBAAkD,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,aAAa,gBAGxB,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,kBAAkB,eAAe;mBAMlD,MAAM,SAAS,MAAM;mBAOrB,MAAM,KAAG,MAAM,GAAG,IAAI;sBAQnB,MAAM;CAQ3B,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Tree-shaking optimization utilities
3
+ * Helps eliminate unused code and optimize bundle sizes
4
+ */
5
+ export declare const deadCodeElimination: {
6
+ createPureFunction: <T extends (...args: unknown[]) => any>(fn: T) => T;
7
+ isDevelopment: boolean;
8
+ isProduction: boolean;
9
+ isTest: boolean;
10
+ createFeatureFlags: (customFlags?: Record<string, boolean | string>) => {
11
+ enableAnalytics: boolean;
12
+ enableDebugTools: boolean;
13
+ enablePerformanceMonitoring: boolean;
14
+ };
15
+ };
16
+ export declare const createConditionalImports: (imports: Record<string, () => Promise<any>>) => Record<string, () => Promise<any>>;
17
+ export declare const utils: {
18
+ createDebounce: (delay: number) => <T extends (...args: unknown[]) => unknown>(func: T) => T;
19
+ memoize: <T extends (...args: unknown[]) => any>(fn: T) => T;
20
+ isDeepEqual: (a: any, b: any) => boolean;
21
+ createThrottle: (delay: number) => <T extends (...args: unknown[]) => unknown>(func: T) => T;
22
+ };
23
+ export declare const createSelectiveExports: (modules: Record<string, Record<string, string>>) => Record<string, Record<string, () => Promise<any>>>;
24
+ export declare const bundleAnalysis: {
25
+ getModuleSize: (moduleName: string) => Promise<number>;
26
+ usageTracker: Set<string>;
27
+ trackUsage: (moduleName: string) => void;
28
+ getUsageReport: () => string[];
29
+ estimateImpact: (moduleNames: string[]) => Promise<{
30
+ total: number;
31
+ modules: Record<string, number>;
32
+ }>;
33
+ };
34
+ export declare const cssOptimization: {
35
+ inlineCriticalCSS: (css: string) => void;
36
+ loadAsyncCSS: (href: string) => void;
37
+ removeUnusedCSS: (selectors: string[]) => {
38
+ used: string[];
39
+ unused: string[];
40
+ } | undefined;
41
+ };
42
+ export declare const createTreeShakingConfig: (options?: {
43
+ features?: Record<string, boolean | string>;
44
+ criticalCSS?: string;
45
+ enableUsageTracking?: boolean;
46
+ }) => {
47
+ features: {
48
+ enableAnalytics: boolean;
49
+ enableDebugTools: boolean;
50
+ enablePerformanceMonitoring: boolean;
51
+ };
52
+ initialize: () => void;
53
+ cleanup: () => void;
54
+ getReport: () => {
55
+ usage: string[];
56
+ features: {
57
+ enableAnalytics: boolean;
58
+ enableDebugTools: boolean;
59
+ enablePerformanceMonitoring: boolean;
60
+ };
61
+ };
62
+ };
63
+ declare const _default: {
64
+ deadCodeElimination: {
65
+ createPureFunction: <T extends (...args: unknown[]) => any>(fn: T) => T;
66
+ isDevelopment: boolean;
67
+ isProduction: boolean;
68
+ isTest: boolean;
69
+ createFeatureFlags: (customFlags?: Record<string, boolean | string>) => {
70
+ enableAnalytics: boolean;
71
+ enableDebugTools: boolean;
72
+ enablePerformanceMonitoring: boolean;
73
+ };
74
+ };
75
+ createConditionalImports: (imports: Record<string, () => Promise<any>>) => Record<string, () => Promise<any>>;
76
+ utils: {
77
+ createDebounce: (delay: number) => <T extends (...args: unknown[]) => unknown>(func: T) => T;
78
+ memoize: <T extends (...args: unknown[]) => any>(fn: T) => T;
79
+ isDeepEqual: (a: any, b: any) => boolean;
80
+ createThrottle: (delay: number) => <T extends (...args: unknown[]) => unknown>(func: T) => T;
81
+ };
82
+ createSelectiveExports: (modules: Record<string, Record<string, string>>) => Record<string, Record<string, () => Promise<any>>>;
83
+ bundleAnalysis: {
84
+ getModuleSize: (moduleName: string) => Promise<number>;
85
+ usageTracker: Set<string>;
86
+ trackUsage: (moduleName: string) => void;
87
+ getUsageReport: () => string[];
88
+ estimateImpact: (moduleNames: string[]) => Promise<{
89
+ total: number;
90
+ modules: Record<string, number>;
91
+ }>;
92
+ };
93
+ cssOptimization: {
94
+ inlineCriticalCSS: (css: string) => void;
95
+ loadAsyncCSS: (href: string) => void;
96
+ removeUnusedCSS: (selectors: string[]) => {
97
+ used: string[];
98
+ unused: string[];
99
+ } | undefined;
100
+ };
101
+ createTreeShakingConfig: (options?: {
102
+ features?: Record<string, boolean | string>;
103
+ criticalCSS?: string;
104
+ enableUsageTracking?: boolean;
105
+ }) => {
106
+ features: {
107
+ enableAnalytics: boolean;
108
+ enableDebugTools: boolean;
109
+ enablePerformanceMonitoring: boolean;
110
+ };
111
+ initialize: () => void;
112
+ cleanup: () => void;
113
+ getReport: () => {
114
+ usage: string[];
115
+ features: {
116
+ enableAnalytics: boolean;
117
+ enableDebugTools: boolean;
118
+ enablePerformanceMonitoring: boolean;
119
+ };
120
+ };
121
+ };
122
+ };
123
+ export default _default;
124
+ //# sourceMappingURL=treeShaking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"treeShaking.d.ts","sourceRoot":"","sources":["../../src/utils/treeShaking.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,mBAAmB;yBAEK,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,GAAG,MAClE,CAAC,KACJ,CAAC;;;;uCAQ8B,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;;;;;CAOnE,CAAC;AAGF,eAAO,MAAM,wBAAwB,GACnC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,0BAEI,OAAO,CAAC,GAAG,CAAC,CAc5D,CAAC;AAGF,eAAO,MAAM,KAAK;4BAEQ,MAAM,MACpB,CAAC,SAAS,CAAC,GAAG,IAAI,EA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C,GAAG,CAAC,CAAC,0BAEI,OAAO,CAAC,GAAG,CAAC;;gCAmBnC,MAAM,MACpB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,CAAC,KAKlD,CAAC;kBAKD,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC,KAAG,CAAC;yBAczC,GAAG,KAAK,GAAG,KAAG,OAAO;gCAmBd,MAAM,MACpB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,CAAC,KAQlD,CAAC;;sCAOF,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,yCAIxB,OAAO,CAAC,GAAG,CAAC;;oCAmBP,MAAM,KAAG,OAAO,CAAC,MAAM,CAAC;;iCAmB3B,MAAM;;sCAgBhB,MAAM,EAAE,KACpB,OAAO,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;SAAE,CAAC;;;iCAsBrC,MAAM;6BASV,MAAM;qCAcE,MAAM,EAAE;;;;;wCAyB5B;QACP,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,CAAC;QAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B;;;;;;;;;;;;;;;;;;AAmCH,wBAQE"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Wallet browser detection and automatic connection utilities
3
+ */
4
+ export interface WalletBrowserInfo {
5
+ isWalletBrowser: boolean;
6
+ walletType: 'metamask' | 'trustwallet' | 'coinbase' | 'rainbow' | 'phantom' | 'solflare' | 'exodus' | 'unknown';
7
+ hasEthereum: boolean;
8
+ hasSolana: boolean;
9
+ provider: any;
10
+ }
11
+ export declare function detectWalletBrowser(): WalletBrowserInfo;
12
+ export declare function autoConnectWalletBrowser(): Promise<{
13
+ success: boolean;
14
+ address?: string;
15
+ error?: string;
16
+ }>;
17
+ //# sourceMappingURL=walletBrowserDetection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walletBrowserDetection.d.ts","sourceRoot":"","sources":["../../src/utils/walletBrowserDetection.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EACN,UAAU,GACV,aAAa,GACb,UAAU,GACV,SAAS,GACT,SAAS,GACT,UAAU,GACV,QAAQ,GACR,SAAS,CAAC;IACd,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC;CACf;AAED,wBAAgB,mBAAmB,IAAI,iBAAiB,CA2EvD;AAED,wBAAsB,wBAAwB,IAAI,OAAO,CAAC;IACxD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAiDD"}