@exyconn/common 1.0.0 → 2.0.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 (46) hide show
  1. package/README.md +121 -36
  2. package/dist/client/index.d.mts +2 -2
  3. package/dist/client/index.d.ts +2 -2
  4. package/dist/client/index.js +2330 -176
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/index.mjs +2284 -178
  7. package/dist/client/index.mjs.map +1 -1
  8. package/dist/client/utils/index.d.mts +123 -1
  9. package/dist/client/utils/index.d.ts +123 -1
  10. package/dist/client/utils/index.js +207 -0
  11. package/dist/client/utils/index.js.map +1 -1
  12. package/dist/client/utils/index.mjs +204 -1
  13. package/dist/client/utils/index.mjs.map +1 -1
  14. package/dist/index-BLltj-zN.d.ts +1236 -0
  15. package/dist/index-CIUdLBjA.d.mts +1236 -0
  16. package/dist/{index-iTKxFa78.d.ts → index-DEzgM15j.d.ts} +10 -2
  17. package/dist/{index-ClWtDfwk.d.ts → index-DNFVgQx8.d.ts} +544 -2
  18. package/dist/{index-CcrANHAQ.d.mts → index-DbV04Dx8.d.mts} +10 -2
  19. package/dist/{index-DSW6JfD-.d.mts → index-DfqEP6Oe.d.mts} +544 -2
  20. package/dist/index.d.mts +582 -7
  21. package/dist/index.d.ts +582 -7
  22. package/dist/index.js +3428 -221
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.mjs +3430 -223
  25. package/dist/index.mjs.map +1 -1
  26. package/dist/server/index.d.mts +1 -1
  27. package/dist/server/index.d.ts +1 -1
  28. package/dist/server/index.js +197 -0
  29. package/dist/server/index.js.map +1 -1
  30. package/dist/server/index.mjs +194 -2
  31. package/dist/server/index.mjs.map +1 -1
  32. package/dist/server/utils/index.d.mts +73 -1
  33. package/dist/server/utils/index.d.ts +73 -1
  34. package/dist/server/utils/index.js +199 -0
  35. package/dist/server/utils/index.js.map +1 -1
  36. package/dist/server/utils/index.mjs +195 -1
  37. package/dist/server/utils/index.mjs.map +1 -1
  38. package/dist/shared/index.d.mts +1 -1
  39. package/dist/shared/index.d.ts +1 -1
  40. package/dist/shared/index.js +296 -0
  41. package/dist/shared/index.js.map +1 -1
  42. package/dist/shared/index.mjs +274 -1
  43. package/dist/shared/index.mjs.map +1 -1
  44. package/package.json +9 -2
  45. package/dist/index-BNdT-2X4.d.ts +0 -229
  46. package/dist/index-Du0LLt9f.d.mts +0 -229
@@ -0,0 +1,1236 @@
1
+ import { ApiResponse, HttpClientOptions, PaginatedResponse, createHttpClient, isForbidden, isNotFound, isServerError, isStatusError, isSuccess, isUnauthorized, parseError, parseFullResponse, parseResponse, withAbortSignal, withFormData, withTimeout } from './client/http/index.js';
2
+ import { ClientLogger, ClientLoggerConfig, LogLevel, clientLogger, createClientLogger } from './client/logger/index.js';
3
+ import { ApiUrlBuilder, ApiUrlConfig, EventEmitter, NpmRegistryResponse, PackageCheckResult, PackageJson, PackageVersion, addDays, appEvents, camelToKebab, capitalize, capitalizeWords, checkPackage, copyToClipboard, createApiEndpoints, createApiUrlBuilder, createEmptyPaginationMeta, createErrorResponse, createEventEmitter, createSuccessResponse, endOfDay, formatDate, formatDateForInput, formatDateTime, formatDateTimeForInput, formatPackageCheckResult, formatRelativeTime, generateNcuCommand, getErrorMessage, getNextPage, getPrevPage, getResponseData, hasData, hasMorePages, isClipboardAvailable, isErrorResponse, isFuture, isPast, isSuccessResponse, isToday, kebabToCamel, packageCheck, readFromClipboard, slugify, slugifyUnique, startOfDay, truncate, truncateWords, unslugify } from './client/utils/index.js';
4
+ import { RefObject } from 'react';
5
+
6
+ interface UseToggleReturn {
7
+ /** Current boolean value */
8
+ value: boolean;
9
+ /** Toggle the value */
10
+ toggle: () => void;
11
+ /** Set to true */
12
+ setTrue: () => void;
13
+ /** Set to false */
14
+ setFalse: () => void;
15
+ /** Set to specific value */
16
+ setValue: (value: boolean) => void;
17
+ }
18
+ /**
19
+ * Hook to manage boolean state with toggle functionality
20
+ * @param initialValue - Initial boolean value (default: false)
21
+ */
22
+ declare function useToggle(initialValue?: boolean): UseToggleReturn;
23
+
24
+ interface UseCounterOptions {
25
+ /** Minimum value */
26
+ min?: number;
27
+ /** Maximum value */
28
+ max?: number;
29
+ /** Step value for increment/decrement */
30
+ step?: number;
31
+ }
32
+ interface UseCounterReturn {
33
+ /** Current count value */
34
+ count: number;
35
+ /** Increment by step */
36
+ increment: () => void;
37
+ /** Decrement by step */
38
+ decrement: () => void;
39
+ /** Set to specific value */
40
+ set: (value: number) => void;
41
+ /** Reset to initial value */
42
+ reset: () => void;
43
+ }
44
+ /**
45
+ * Hook to manage numeric counter with min/max bounds
46
+ * @param initialValue - Initial counter value (default: 0)
47
+ * @param options - Configuration options
48
+ */
49
+ declare function useCounter(initialValue?: number, options?: UseCounterOptions): UseCounterReturn;
50
+
51
+ /**
52
+ * Hook that returns a default value when state is null or undefined
53
+ * @param initialValue - Initial value (can be null/undefined)
54
+ * @param defaultValue - Default value to use when state is null/undefined
55
+ */
56
+ declare function useDefault<T>(initialValue: T | null | undefined, defaultValue: T): [T, (value: T | null | undefined) => void];
57
+
58
+ /**
59
+ * Hook to get the previous value of a state or prop
60
+ * @param value - Current value to track
61
+ * @param initialValue - Optional initial previous value
62
+ */
63
+ declare function usePrevious<T>(value: T, initialValue?: T): T | undefined;
64
+
65
+ type ObjectStateUpdate<T> = Partial<T> | ((prevState: T) => Partial<T>);
66
+ interface UseObjectStateReturn<T extends object> {
67
+ /** Current state object */
68
+ state: T;
69
+ /** Update state with partial object (merges with existing) */
70
+ setState: (update: ObjectStateUpdate<T>) => void;
71
+ /** Reset to initial state */
72
+ resetState: () => void;
73
+ /** Set a single property */
74
+ setProperty: <K extends keyof T>(key: K, value: T[K]) => void;
75
+ /** Remove a property (sets to undefined) */
76
+ removeProperty: <K extends keyof T>(key: K) => void;
77
+ }
78
+ /**
79
+ * Hook to manage object state with partial updates
80
+ * @param initialState - Initial state object
81
+ */
82
+ declare function useObjectState<T extends object>(initialState: T): UseObjectStateReturn<T>;
83
+
84
+ interface UseHistoryStateReturn<T> {
85
+ /** Current state value */
86
+ state: T;
87
+ /** Set new state (adds to history) */
88
+ setState: (value: T | ((prev: T) => T)) => void;
89
+ /** Undo to previous state */
90
+ undo: () => void;
91
+ /** Redo to next state */
92
+ redo: () => void;
93
+ /** Clear all history and reset to current or initial */
94
+ clear: (value?: T) => void;
95
+ /** Can undo? */
96
+ canUndo: boolean;
97
+ /** Can redo? */
98
+ canRedo: boolean;
99
+ /** Full history array */
100
+ history: T[];
101
+ /** Current position in history */
102
+ pointer: number;
103
+ /** Go to specific position in history */
104
+ go: (index: number) => void;
105
+ }
106
+ interface UseHistoryStateOptions {
107
+ /** Maximum history length (default: 100) */
108
+ maxLength?: number;
109
+ }
110
+ /**
111
+ * Hook to manage state with undo/redo functionality
112
+ * @param initialValue - Initial state value
113
+ * @param options - Configuration options
114
+ */
115
+ declare function useHistoryState<T>(initialValue: T, options?: UseHistoryStateOptions): UseHistoryStateReturn<T>;
116
+
117
+ interface UseQueueReturn<T> {
118
+ /** Current queue items */
119
+ queue: T[];
120
+ /** Add item to end of queue */
121
+ enqueue: (item: T) => void;
122
+ /** Add multiple items to end of queue */
123
+ enqueueAll: (items: T[]) => void;
124
+ /** Remove and return first item */
125
+ dequeue: () => T | undefined;
126
+ /** Peek at first item without removing */
127
+ peek: () => T | undefined;
128
+ /** Clear the queue */
129
+ clear: () => void;
130
+ /** Queue size */
131
+ size: number;
132
+ /** Is queue empty? */
133
+ isEmpty: boolean;
134
+ /** First item in queue */
135
+ first: T | undefined;
136
+ /** Last item in queue */
137
+ last: T | undefined;
138
+ }
139
+ /**
140
+ * Hook to manage a FIFO queue
141
+ * @param initialValue - Initial queue items (default: [])
142
+ */
143
+ declare function useQueue<T>(initialValue?: T[]): UseQueueReturn<T>;
144
+
145
+ interface UseListReturn<T> {
146
+ /** Current list items */
147
+ list: T[];
148
+ /** Set entire list */
149
+ set: (newList: T[]) => void;
150
+ /** Add item to end */
151
+ push: (item: T) => void;
152
+ /** Add item to beginning */
153
+ unshift: (item: T) => void;
154
+ /** Remove item at index */
155
+ removeAt: (index: number) => void;
156
+ /** Remove first matching item */
157
+ remove: (item: T) => void;
158
+ /** Remove items matching predicate */
159
+ removeWhere: (predicate: (item: T) => boolean) => void;
160
+ /** Update item at index */
161
+ updateAt: (index: number, item: T) => void;
162
+ /** Update item at index with function */
163
+ updateWhere: (predicate: (item: T) => boolean, updater: (item: T) => T) => void;
164
+ /** Insert item at index */
165
+ insertAt: (index: number, item: T) => void;
166
+ /** Move item from one index to another */
167
+ move: (fromIndex: number, toIndex: number) => void;
168
+ /** Clear the list */
169
+ clear: () => void;
170
+ /** Reset to initial value */
171
+ reset: () => void;
172
+ /** Filter items */
173
+ filter: (predicate: (item: T) => boolean) => void;
174
+ /** Sort items */
175
+ sort: (compareFn?: (a: T, b: T) => number) => void;
176
+ /** Reverse items */
177
+ reverse: () => void;
178
+ /** List size */
179
+ size: number;
180
+ /** Is list empty? */
181
+ isEmpty: boolean;
182
+ /** First item */
183
+ first: T | undefined;
184
+ /** Last item */
185
+ last: T | undefined;
186
+ }
187
+ /**
188
+ * Hook to manage array/list with utility methods
189
+ * @param initialValue - Initial list items (default: [])
190
+ */
191
+ declare function useList<T>(initialValue?: T[]): UseListReturn<T>;
192
+
193
+ interface UseMapReturn<K, V> {
194
+ /** Current map */
195
+ map: Map<K, V>;
196
+ /** Get value by key */
197
+ get: (key: K) => V | undefined;
198
+ /** Set key-value pair */
199
+ set: (key: K, value: V) => void;
200
+ /** Set multiple entries */
201
+ setAll: (entries: Iterable<[K, V]>) => void;
202
+ /** Check if key exists */
203
+ has: (key: K) => boolean;
204
+ /** Delete by key */
205
+ remove: (key: K) => void;
206
+ /** Delete multiple keys */
207
+ removeAll: (keys: K[]) => void;
208
+ /** Clear the map */
209
+ clear: () => void;
210
+ /** Reset to initial value */
211
+ reset: () => void;
212
+ /** Map size */
213
+ size: number;
214
+ /** All keys */
215
+ keys: K[];
216
+ /** All values */
217
+ values: V[];
218
+ /** All entries */
219
+ entries: [K, V][];
220
+ /** Is map empty? */
221
+ isEmpty: boolean;
222
+ }
223
+ /**
224
+ * Hook to manage Map state with utility methods
225
+ * @param initialValue - Initial entries (default: [])
226
+ */
227
+ declare function useMap<K, V>(initialValue?: Iterable<[K, V]>): UseMapReturn<K, V>;
228
+
229
+ interface UseSetReturn<T> {
230
+ /** Current set */
231
+ set: Set<T>;
232
+ /** Add item to set */
233
+ add: (item: T) => void;
234
+ /** Add multiple items */
235
+ addAll: (items: Iterable<T>) => void;
236
+ /** Check if item exists */
237
+ has: (item: T) => boolean;
238
+ /** Remove item from set */
239
+ remove: (item: T) => void;
240
+ /** Remove multiple items */
241
+ removeAll: (items: Iterable<T>) => void;
242
+ /** Toggle item (add if not exists, remove if exists) */
243
+ toggle: (item: T) => void;
244
+ /** Clear the set */
245
+ clear: () => void;
246
+ /** Reset to initial value */
247
+ reset: () => void;
248
+ /** Set size */
249
+ size: number;
250
+ /** All values as array */
251
+ values: T[];
252
+ /** Is set empty? */
253
+ isEmpty: boolean;
254
+ }
255
+ /**
256
+ * Hook to manage Set state with utility methods
257
+ * @param initialValue - Initial items (default: [])
258
+ */
259
+ declare function useSet<T>(initialValue?: Iterable<T>): UseSetReturn<T>;
260
+
261
+ /**
262
+ * Debounce a value with configurable delay
263
+ * @param value - Value to debounce
264
+ * @param delay - Delay in milliseconds (default: 500)
265
+ */
266
+ declare function useDebounce<T>(value: T, delay?: number): T;
267
+
268
+ /**
269
+ * Throttle a value with configurable interval
270
+ * @param value - Value to throttle
271
+ * @param interval - Minimum interval between updates in milliseconds (default: 500)
272
+ */
273
+ declare function useThrottle<T>(value: T, interval?: number): T;
274
+
275
+ interface UseTimeoutReturn {
276
+ /** Reset the timeout */
277
+ reset: () => void;
278
+ /** Clear/cancel the timeout */
279
+ clear: () => void;
280
+ }
281
+ /**
282
+ * Hook to manage setTimeout declaratively
283
+ * @param callback - Function to call after timeout
284
+ * @param delay - Delay in milliseconds (null to disable)
285
+ */
286
+ declare function useTimeout(callback: () => void, delay: number | null): UseTimeoutReturn;
287
+
288
+ /**
289
+ * Run a callback on an interval
290
+ * @param callback - Function to call on each interval
291
+ * @param delay - Interval delay in ms (null to pause)
292
+ */
293
+ declare function useInterval(callback: () => void, delay: number | null): void;
294
+
295
+ /**
296
+ * Hook to run interval conditionally
297
+ * @param callback - Function to call on each interval
298
+ * @param delay - Interval delay in milliseconds
299
+ * @param when - Condition to run the interval
300
+ * @param immediate - Run callback immediately when condition becomes true
301
+ */
302
+ declare function useIntervalWhen(callback: () => void, delay: number, when: boolean, immediate?: boolean): void;
303
+
304
+ /**
305
+ * Hook to run callback at random intervals
306
+ * @param callback - Function to call on each interval
307
+ * @param minDelay - Minimum delay in milliseconds
308
+ * @param maxDelay - Maximum delay in milliseconds
309
+ * @param enabled - Whether the interval is enabled (default: true)
310
+ */
311
+ declare function useRandomInterval(callback: () => void, minDelay: number, maxDelay: number, enabled?: boolean): void;
312
+
313
+ interface UseCountdownOptions {
314
+ /** Interval in milliseconds (default: 1000) */
315
+ interval?: number;
316
+ /** Callback when countdown reaches zero */
317
+ onComplete?: () => void;
318
+ /** Auto-start the countdown (default: false) */
319
+ autoStart?: boolean;
320
+ }
321
+ interface UseCountdownReturn {
322
+ /** Current countdown value in milliseconds */
323
+ count: number;
324
+ /** Start the countdown */
325
+ start: () => void;
326
+ /** Pause the countdown */
327
+ pause: () => void;
328
+ /** Resume the countdown */
329
+ resume: () => void;
330
+ /** Reset to initial value */
331
+ reset: (newCount?: number) => void;
332
+ /** Is countdown running? */
333
+ isRunning: boolean;
334
+ /** Is countdown complete? */
335
+ isComplete: boolean;
336
+ /** Formatted time { days, hours, minutes, seconds } */
337
+ formatted: {
338
+ days: number;
339
+ hours: number;
340
+ minutes: number;
341
+ seconds: number;
342
+ };
343
+ }
344
+ /**
345
+ * Hook to manage countdown timer
346
+ * @param initialCount - Initial countdown value in milliseconds
347
+ * @param options - Configuration options
348
+ */
349
+ declare function useCountdown(initialCount: number, options?: UseCountdownOptions): UseCountdownReturn;
350
+
351
+ interface UseContinuousRetryOptions {
352
+ /** Maximum number of retry attempts (default: Infinity) */
353
+ maxAttempts?: number;
354
+ /** Delay between retries in milliseconds (default: 1000) */
355
+ delay?: number;
356
+ /** Whether to use exponential backoff (default: false) */
357
+ exponentialBackoff?: boolean;
358
+ /** Maximum delay when using exponential backoff (default: 30000) */
359
+ maxDelay?: number;
360
+ /** Auto-start retrying (default: true) */
361
+ autoStart?: boolean;
362
+ }
363
+ interface UseContinuousRetryReturn {
364
+ /** Number of attempts made */
365
+ attempts: number;
366
+ /** Last error encountered */
367
+ error: Error | null;
368
+ /** Is currently retrying? */
369
+ isRetrying: boolean;
370
+ /** Has succeeded? */
371
+ isSuccess: boolean;
372
+ /** Has reached max attempts? */
373
+ isMaxAttempts: boolean;
374
+ /** Start/restart retrying */
375
+ start: () => void;
376
+ /** Stop retrying */
377
+ stop: () => void;
378
+ /** Reset state */
379
+ reset: () => void;
380
+ }
381
+ /**
382
+ * Hook to continuously retry a function until success
383
+ * @param callback - Async function to retry (return true for success, false for retry)
384
+ * @param options - Configuration options
385
+ */
386
+ declare function useContinuousRetry(callback: () => Promise<boolean> | boolean, options?: UseContinuousRetryOptions): UseContinuousRetryReturn;
387
+
388
+ interface WindowSize {
389
+ width: number;
390
+ height: number;
391
+ }
392
+ /**
393
+ * Track window dimensions with resize updates
394
+ * @param debounceMs - Debounce resize events (default: 100ms)
395
+ */
396
+ declare function useWindowSize(debounceMs?: number): WindowSize;
397
+
398
+ interface WindowScrollPosition {
399
+ /** Horizontal scroll position */
400
+ x: number;
401
+ /** Vertical scroll position */
402
+ y: number;
403
+ /** Scroll direction (up, down, left, right, or null) */
404
+ direction: 'up' | 'down' | 'left' | 'right' | null;
405
+ /** Is scrolling? */
406
+ isScrolling: boolean;
407
+ }
408
+ interface UseWindowScrollReturn extends WindowScrollPosition {
409
+ /** Scroll to position */
410
+ scrollTo: (options: ScrollToOptions) => void;
411
+ /** Scroll to top */
412
+ scrollToTop: (behavior?: ScrollBehavior) => void;
413
+ /** Scroll to bottom */
414
+ scrollToBottom: (behavior?: ScrollBehavior) => void;
415
+ }
416
+ /**
417
+ * Hook to track and control window scroll position
418
+ */
419
+ declare function useWindowScroll(): UseWindowScrollReturn;
420
+
421
+ interface UseDocumentTitleOptions {
422
+ /** Restore previous title on unmount (default: true) */
423
+ restoreOnUnmount?: boolean;
424
+ /** Title template, use %s for title placeholder */
425
+ template?: string;
426
+ }
427
+ /**
428
+ * Hook to set document title
429
+ * @param title - Document title
430
+ * @param options - Configuration options
431
+ */
432
+ declare function useDocumentTitle(title: string, options?: UseDocumentTitleOptions): void;
433
+
434
+ interface UsePageTitleOptions {
435
+ /** Suffix to append to the title (e.g., organization name) */
436
+ suffix?: string;
437
+ /** Separator between title and suffix (default: ' | ') */
438
+ separator?: string;
439
+ /** Whether to restore original title on unmount (default: true) */
440
+ restoreOnUnmount?: boolean;
441
+ }
442
+ /**
443
+ * Set the document title with optional suffix
444
+ * @param title - Page title
445
+ * @param options - Configuration options
446
+ */
447
+ declare function usePageTitle(title: string, options?: UsePageTitleOptions): void;
448
+
449
+ /**
450
+ * Hook to dynamically change favicon
451
+ * @param href - URL of the favicon image
452
+ * @param restoreOnUnmount - Whether to restore original favicon on unmount (default: true)
453
+ */
454
+ declare function useFavicon(href: string, restoreOnUnmount?: boolean): void;
455
+
456
+ interface UseVisibilityChangeReturn {
457
+ /** Is document visible? */
458
+ isVisible: boolean;
459
+ /** Visibility state ('visible', 'hidden', 'prerender') */
460
+ visibilityState: DocumentVisibilityState;
461
+ /** Time when visibility last changed */
462
+ lastChanged: Date | null;
463
+ }
464
+ /**
465
+ * Hook to track document visibility state
466
+ * @param onVisibilityChange - Optional callback when visibility changes
467
+ */
468
+ declare function useVisibilityChange(onVisibilityChange?: (isVisible: boolean) => void): UseVisibilityChangeReturn;
469
+
470
+ interface UsePageLeaveOptions {
471
+ /** Show confirmation dialog on page leave (default: false) */
472
+ showConfirmation?: boolean;
473
+ /** Custom confirmation message (browser may override) */
474
+ confirmationMessage?: string;
475
+ }
476
+ /**
477
+ * Hook to detect when user is leaving the page
478
+ * @param onLeave - Callback when user attempts to leave
479
+ * @param options - Configuration options
480
+ */
481
+ declare function usePageLeave(onLeave?: () => void, options?: UsePageLeaveOptions): void;
482
+
483
+ /**
484
+ * Hook to lock body scroll
485
+ * @param locked - Whether scroll should be locked (default: true)
486
+ */
487
+ declare function useLockBodyScroll(locked?: boolean): void;
488
+
489
+ /**
490
+ * Hook to check if rendering on client side
491
+ * Useful for SSR/SSG environments
492
+ */
493
+ declare function useIsClient(): boolean;
494
+
495
+ /**
496
+ * Hook to check if it's the first render
497
+ */
498
+ declare function useIsFirstRender(): boolean;
499
+
500
+ type EventMap = WindowEventMap & DocumentEventMap & HTMLElementEventMap;
501
+ /**
502
+ * Hook to attach event listeners declaratively
503
+ * @param eventName - Name of the event to listen for
504
+ * @param handler - Event handler function
505
+ * @param element - Target element (default: window)
506
+ * @param options - AddEventListener options
507
+ */
508
+ declare function useEventListener<K extends keyof EventMap>(eventName: K, handler: (event: EventMap[K]) => void, element?: HTMLElement | Window | Document | null, options?: boolean | AddEventListenerOptions): void;
509
+
510
+ interface UseKeyPressOptions {
511
+ /** Target element (default: document) */
512
+ target?: HTMLElement | Document | Window | null;
513
+ /** Event type: 'keydown' | 'keyup' | 'keypress' */
514
+ event?: 'keydown' | 'keyup' | 'keypress';
515
+ /** Prevent default behavior */
516
+ preventDefault?: boolean;
517
+ /** Stop event propagation */
518
+ stopPropagation?: boolean;
519
+ }
520
+ interface UseKeyPressReturn {
521
+ /** Is the key currently pressed? */
522
+ pressed: boolean;
523
+ /** Event object from last press */
524
+ event: KeyboardEvent | null;
525
+ }
526
+ /**
527
+ * Hook to detect key press
528
+ * @param targetKey - Key to detect (e.g., 'Enter', 'Escape', 'a')
529
+ * @param callback - Optional callback when key is pressed
530
+ * @param options - Configuration options
531
+ */
532
+ declare function useKeyPress(targetKey: string | string[], callback?: (event: KeyboardEvent) => void, options?: UseKeyPressOptions): UseKeyPressReturn;
533
+
534
+ interface UseHoverReturn<T extends HTMLElement = HTMLElement> {
535
+ /** Ref to attach to the target element */
536
+ ref: React.RefObject<T | null>;
537
+ /** Is element being hovered? */
538
+ isHovered: boolean;
539
+ /** Bind props to spread on element */
540
+ bind: {
541
+ onMouseEnter: () => void;
542
+ onMouseLeave: () => void;
543
+ };
544
+ }
545
+ /**
546
+ * Hook to detect hover state
547
+ * @param onHoverChange - Optional callback when hover state changes
548
+ */
549
+ declare function useHover<T extends HTMLElement = HTMLElement>(onHoverChange?: (isHovered: boolean) => void): UseHoverReturn<T>;
550
+
551
+ type EventType = 'mousedown' | 'mouseup' | 'touchstart' | 'touchend';
552
+ /**
553
+ * Hook to detect clicks outside of an element
554
+ * @param callback - Function to call when click outside occurs
555
+ * @param events - Event types to listen for (default: ['mousedown', 'touchstart'])
556
+ */
557
+ declare function useClickAway<T extends HTMLElement = HTMLElement>(callback: (event: MouseEvent | TouchEvent) => void, events?: EventType[]): React.RefObject<T | null>;
558
+
559
+ /**
560
+ * useOnClickOutside Hook
561
+ * Detect clicks outside of a referenced element
562
+ */
563
+
564
+ type Handler = (event: MouseEvent | TouchEvent) => void;
565
+ /**
566
+ * Detect clicks outside of a referenced element
567
+ * @param ref - React ref to the element
568
+ * @param handler - Callback when click outside occurs
569
+ * @param enabled - Whether the hook is enabled (default: true)
570
+ */
571
+ declare function useOnClickOutside<T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: Handler, enabled?: boolean): void;
572
+
573
+ interface UseLongPressOptions {
574
+ /** Threshold in milliseconds (default: 400) */
575
+ threshold?: number;
576
+ /** Callback on long press */
577
+ onLongPress?: (event: React.MouseEvent | React.TouchEvent) => void;
578
+ /** Callback on regular click */
579
+ onClick?: (event: React.MouseEvent | React.TouchEvent) => void;
580
+ /** Callback when press starts */
581
+ onStart?: (event: React.MouseEvent | React.TouchEvent) => void;
582
+ /** Callback when press ends */
583
+ onFinish?: (event: React.MouseEvent | React.TouchEvent) => void;
584
+ /** Callback when press is cancelled */
585
+ onCancel?: (event: React.MouseEvent | React.TouchEvent) => void;
586
+ }
587
+ interface UseLongPressReturn {
588
+ /** Is currently pressing? */
589
+ isPressed: boolean;
590
+ /** Is long press achieved? */
591
+ isLongPress: boolean;
592
+ /** Bind props to spread on element */
593
+ bind: {
594
+ onMouseDown: (e: React.MouseEvent) => void;
595
+ onMouseUp: (e: React.MouseEvent) => void;
596
+ onMouseLeave: (e: React.MouseEvent) => void;
597
+ onTouchStart: (e: React.TouchEvent) => void;
598
+ onTouchEnd: (e: React.TouchEvent) => void;
599
+ };
600
+ }
601
+ /**
602
+ * Hook to detect long press gesture
603
+ * @param options - Configuration options
604
+ */
605
+ declare function useLongPress(options?: UseLongPressOptions): UseLongPressReturn;
606
+
607
+ interface MousePosition {
608
+ /** X position relative to viewport */
609
+ x: number;
610
+ /** Y position relative to viewport */
611
+ y: number;
612
+ /** X position relative to page */
613
+ pageX: number;
614
+ /** Y position relative to page */
615
+ pageY: number;
616
+ /** X position relative to element (if ref provided) */
617
+ elementX: number;
618
+ /** Y position relative to element (if ref provided) */
619
+ elementY: number;
620
+ /** Is mouse within element bounds? */
621
+ isInElement: boolean;
622
+ }
623
+ interface UseMouseOptions {
624
+ /** Whether to track (default: true) */
625
+ enabled?: boolean;
626
+ }
627
+ interface UseMouseReturn<T extends HTMLElement = HTMLElement> extends MousePosition {
628
+ /** Ref to attach to element for relative positioning */
629
+ ref: React.RefObject<T | null>;
630
+ }
631
+ /**
632
+ * Hook to track mouse position
633
+ * @param options - Configuration options
634
+ */
635
+ declare function useMouse<T extends HTMLElement = HTMLElement>(options?: UseMouseOptions): UseMouseReturn<T>;
636
+
637
+ interface UseCopyToClipboardReturn {
638
+ /** Copy text to clipboard */
639
+ copy: (text: string) => Promise<boolean>;
640
+ /** Whether copy was successful (resets after timeout) */
641
+ copied: boolean;
642
+ /** Error message if copy failed */
643
+ error: string | null;
644
+ /** Reset state */
645
+ reset: () => void;
646
+ }
647
+ /**
648
+ * Copy text to clipboard with feedback
649
+ * @param resetDelay - Time in ms before copied state resets (default: 2000)
650
+ */
651
+ declare function useCopyToClipboard(resetDelay?: number): UseCopyToClipboardReturn;
652
+
653
+ /**
654
+ * Track a media query match
655
+ * @param query - CSS media query string (e.g., '(min-width: 768px)')
656
+ */
657
+ declare function useMediaQuery(query: string): boolean;
658
+ declare const useIsMobile: () => boolean;
659
+ declare const useIsTablet: () => boolean;
660
+ declare const useIsDesktop: () => boolean;
661
+ declare const useIsMobileOrTablet: () => boolean;
662
+
663
+ interface OrientationState {
664
+ /** Device orientation angle */
665
+ angle: number;
666
+ /** Orientation type */
667
+ type: OrientationType;
668
+ /** Is portrait? */
669
+ isPortrait: boolean;
670
+ /** Is landscape? */
671
+ isLandscape: boolean;
672
+ }
673
+ /**
674
+ * Hook to track device/screen orientation
675
+ */
676
+ declare function useOrientation(): OrientationState;
677
+
678
+ interface BatteryState {
679
+ /** Is battery API supported? */
680
+ isSupported: boolean;
681
+ /** Is device charging? */
682
+ charging: boolean;
683
+ /** Time until fully charged (seconds), Infinity if not charging */
684
+ chargingTime: number;
685
+ /** Time until discharged (seconds), Infinity if charging */
686
+ dischargingTime: number;
687
+ /** Battery level (0 to 1) */
688
+ level: number;
689
+ /** Battery percentage (0 to 100) */
690
+ percentage: number;
691
+ }
692
+ /**
693
+ * Hook to track battery status
694
+ */
695
+ declare function useBattery(): BatteryState;
696
+
697
+ interface NetworkState {
698
+ /** Is online? */
699
+ online: boolean;
700
+ /** Is offline? */
701
+ offline: boolean;
702
+ /** Connection downlink speed (Mbps) */
703
+ downlink?: number;
704
+ /** Effective connection type */
705
+ effectiveType?: 'slow-2g' | '2g' | '3g' | '4g';
706
+ /** Round-trip time (ms) */
707
+ rtt?: number;
708
+ /** Is data saver enabled? */
709
+ saveData?: boolean;
710
+ /** Connection type */
711
+ type?: string;
712
+ /** Time when status last changed */
713
+ since?: Date;
714
+ }
715
+ /**
716
+ * Hook to track network status
717
+ */
718
+ declare function useNetworkState(): NetworkState;
719
+
720
+ interface UseIdleOptions {
721
+ /** Idle timeout in milliseconds (default: 60000 = 1 minute) */
722
+ timeout?: number;
723
+ /** Events to consider as activity */
724
+ events?: string[];
725
+ /** Initial idle state */
726
+ initialState?: boolean;
727
+ /** Callback when user becomes idle */
728
+ onIdle?: () => void;
729
+ /** Callback when user becomes active */
730
+ onActive?: () => void;
731
+ }
732
+ interface UseIdleReturn {
733
+ /** Is user idle? */
734
+ isIdle: boolean;
735
+ /** Last active timestamp */
736
+ lastActive: Date;
737
+ /** Reset idle timer */
738
+ reset: () => void;
739
+ /** Start tracking */
740
+ start: () => void;
741
+ /** Stop tracking */
742
+ stop: () => void;
743
+ }
744
+ /**
745
+ * Hook to detect user idle state
746
+ * @param options - Configuration options
747
+ */
748
+ declare function useIdle(options?: UseIdleOptions): UseIdleReturn;
749
+
750
+ interface GeolocationState {
751
+ /** Is loading? */
752
+ loading: boolean;
753
+ /** Error message */
754
+ error: string | null;
755
+ /** Latitude */
756
+ latitude: number | null;
757
+ /** Longitude */
758
+ longitude: number | null;
759
+ /** Accuracy in meters */
760
+ accuracy: number | null;
761
+ /** Altitude in meters */
762
+ altitude: number | null;
763
+ /** Altitude accuracy in meters */
764
+ altitudeAccuracy: number | null;
765
+ /** Heading in degrees */
766
+ heading: number | null;
767
+ /** Speed in m/s */
768
+ speed: number | null;
769
+ /** Timestamp */
770
+ timestamp: number | null;
771
+ }
772
+ interface UseGeolocationOptions {
773
+ /** Enable high accuracy mode */
774
+ enableHighAccuracy?: boolean;
775
+ /** Maximum age of cached position (ms) */
776
+ maximumAge?: number;
777
+ /** Timeout for getting position (ms) */
778
+ timeout?: number;
779
+ /** Watch position continuously */
780
+ watch?: boolean;
781
+ }
782
+ interface UseGeolocationReturn extends GeolocationState {
783
+ /** Refresh position */
784
+ refresh: () => void;
785
+ /** Is geolocation supported? */
786
+ isSupported: boolean;
787
+ }
788
+ /**
789
+ * Hook to track geolocation
790
+ * @param options - Configuration options
791
+ */
792
+ declare function useGeolocation(options?: UseGeolocationOptions): UseGeolocationReturn;
793
+
794
+ interface UsePreferredLanguageReturn {
795
+ /** Primary preferred language */
796
+ language: string;
797
+ /** All preferred languages */
798
+ languages: readonly string[];
799
+ }
800
+ /**
801
+ * Hook to get user's preferred language
802
+ */
803
+ declare function usePreferredLanguage(): UsePreferredLanguageReturn;
804
+
805
+ type ThemeMode = 'light' | 'dark';
806
+ /**
807
+ * Detect and track system color scheme preference
808
+ * @returns Current theme mode based on system preference
809
+ */
810
+ declare function useThemeDetector(): ThemeMode;
811
+
812
+ type SetValue<T> = T | ((prevValue: T) => T);
813
+ interface UseLocalStorageOptions<T> {
814
+ /** Serialize function (default: JSON.stringify) */
815
+ serializer?: (value: T) => string;
816
+ /** Deserialize function (default: JSON.parse) */
817
+ deserializer?: (value: string) => T;
818
+ /** Enable cross-tab synchronization (default: true) */
819
+ syncTabs?: boolean;
820
+ /** Enable logging (default: false) */
821
+ debug?: boolean;
822
+ }
823
+ /**
824
+ * Hook to persist state in localStorage with cross-tab sync
825
+ * @param key - localStorage key
826
+ * @param initialValue - initial/fallback value
827
+ * @param options - configuration options
828
+ */
829
+ declare function useLocalStorage<T>(key: string, initialValue: T, options?: UseLocalStorageOptions<T>): [T, (value: SetValue<T>) => void, () => void];
830
+
831
+ interface UseSessionStorageOptions<T> {
832
+ /** Serialize function (default: JSON.stringify) */
833
+ serializer?: (value: T) => string;
834
+ /** Deserialize function (default: JSON.parse) */
835
+ deserializer?: (value: string) => T;
836
+ /** Enable logging (default: false) */
837
+ debug?: boolean;
838
+ }
839
+ /**
840
+ * Hook to persist state in sessionStorage
841
+ * @param key - sessionStorage key
842
+ * @param initialValue - initial/fallback value
843
+ * @param options - configuration options
844
+ */
845
+ declare function useSessionStorage<T>(key: string, initialValue: T, options?: UseSessionStorageOptions<T>): [T, (value: SetValue<T>) => void, () => void];
846
+
847
+ interface UseFetchOptions<T> extends Omit<RequestInit, 'body'> {
848
+ /** Request body (will be JSON.stringify'd if object) */
849
+ body?: BodyInit | object | null;
850
+ /** Skip initial fetch */
851
+ skip?: boolean;
852
+ /** Transform response data */
853
+ transform?: (data: unknown) => T;
854
+ /** Retry count on failure */
855
+ retries?: number;
856
+ /** Retry delay in ms */
857
+ retryDelay?: number;
858
+ /** Cache key (default: url) */
859
+ cacheKey?: string;
860
+ /** Cache time in ms */
861
+ cacheTime?: number;
862
+ /** Callback on success */
863
+ onSuccess?: (data: T) => void;
864
+ /** Callback on error */
865
+ onError?: (error: Error) => void;
866
+ }
867
+ interface UseFetchReturn<T> {
868
+ /** Response data */
869
+ data: T | null;
870
+ /** Is loading? */
871
+ loading: boolean;
872
+ /** Error */
873
+ error: Error | null;
874
+ /** Refetch data */
875
+ refetch: () => Promise<T | null>;
876
+ /** Abort current request */
877
+ abort: () => void;
878
+ /** Is fetching? (includes refetch) */
879
+ isFetching: boolean;
880
+ /** HTTP status code */
881
+ status: number | null;
882
+ }
883
+ /**
884
+ * Hook for data fetching with caching and retry support
885
+ * @param url - URL to fetch
886
+ * @param options - Fetch options
887
+ */
888
+ declare function useFetch<T = unknown>(url: string | null, options?: UseFetchOptions<T>): UseFetchReturn<T>;
889
+
890
+ type ScriptStatus = 'idle' | 'loading' | 'ready' | 'error';
891
+ interface UseScriptOptions {
892
+ /** Should load script immediately (default: true) */
893
+ shouldLoad?: boolean;
894
+ /** Remove script on unmount (default: false) */
895
+ removeOnUnmount?: boolean;
896
+ /** Script attributes */
897
+ attributes?: Record<string, string>;
898
+ }
899
+ interface UseScriptReturn {
900
+ /** Script loading status */
901
+ status: ScriptStatus;
902
+ /** Is script ready? */
903
+ ready: boolean;
904
+ /** Is loading? */
905
+ loading: boolean;
906
+ /** Has error? */
907
+ error: boolean;
908
+ /** Load script manually */
909
+ load: () => void;
910
+ /** Remove script */
911
+ remove: () => void;
912
+ }
913
+ /**
914
+ * Hook to dynamically load external scripts
915
+ * @param src - Script source URL
916
+ * @param options - Configuration options
917
+ */
918
+ declare function useScript(src: string, options?: UseScriptOptions): UseScriptReturn;
919
+
920
+ interface RenderInfo {
921
+ /** Component name (if provided) */
922
+ name: string;
923
+ /** Total render count */
924
+ renders: number;
925
+ /** Time since last render (ms) */
926
+ sinceLastRender: number;
927
+ /** Timestamp of last render */
928
+ timestamp: number;
929
+ }
930
+ /**
931
+ * Hook to track render information for debugging
932
+ * @param componentName - Optional component name for identification
933
+ */
934
+ declare function useRenderInfo(componentName?: string): RenderInfo;
935
+
936
+ /**
937
+ * Hook to count component renders
938
+ */
939
+ declare function useRenderCount(): number;
940
+
941
+ interface UseLoggerOptions {
942
+ /** Log props changes */
943
+ logProps?: boolean;
944
+ /** Log lifecycle events */
945
+ logLifecycle?: boolean;
946
+ /** Custom logger function */
947
+ logger?: (...args: unknown[]) => void;
948
+ }
949
+ /**
950
+ * Hook to log component lifecycle and changes
951
+ * @param componentName - Name of the component
952
+ * @param props - Props to track changes
953
+ * @param options - Configuration options
954
+ */
955
+ declare function useLogger(componentName: string, props?: Record<string, unknown>, options?: UseLoggerOptions): void;
956
+
957
+ interface Dimensions {
958
+ /** Element width */
959
+ width: number;
960
+ /** Element height */
961
+ height: number;
962
+ /** Top position relative to viewport */
963
+ top: number;
964
+ /** Left position relative to viewport */
965
+ left: number;
966
+ /** Bottom position relative to viewport */
967
+ bottom: number;
968
+ /** Right position relative to viewport */
969
+ right: number;
970
+ /** X position (same as left) */
971
+ x: number;
972
+ /** Y position (same as top) */
973
+ y: number;
974
+ }
975
+ interface UseMeasureReturn<T extends HTMLElement = HTMLElement> {
976
+ /** Ref to attach to element */
977
+ ref: React.RefCallback<T>;
978
+ /** Element dimensions */
979
+ dimensions: Dimensions;
980
+ /** Manually trigger measurement */
981
+ measure: () => void;
982
+ }
983
+ /**
984
+ * Hook to measure element dimensions
985
+ */
986
+ declare function useMeasure<T extends HTMLElement = HTMLElement>(): UseMeasureReturn<T>;
987
+
988
+ interface UseIntersectionObserverOptions {
989
+ /** Root element (default: viewport) */
990
+ root?: Element | null;
991
+ /** Root margin (default: '0px') */
992
+ rootMargin?: string;
993
+ /** Intersection threshold(s) (default: 0) */
994
+ threshold?: number | number[];
995
+ /** Freeze after first intersection */
996
+ freezeOnceVisible?: boolean;
997
+ /** Initial visibility state */
998
+ initialIsIntersecting?: boolean;
999
+ /** Callback when intersection changes */
1000
+ onChange?: (isIntersecting: boolean, entry: IntersectionObserverEntry) => void;
1001
+ }
1002
+ interface UseIntersectionObserverReturn<T extends Element = Element> {
1003
+ /** Ref to attach to element */
1004
+ ref: React.RefCallback<T>;
1005
+ /** Is element intersecting? */
1006
+ isIntersecting: boolean;
1007
+ /** Full intersection entry */
1008
+ entry: IntersectionObserverEntry | null;
1009
+ }
1010
+ /**
1011
+ * Hook to observe element intersection with viewport
1012
+ * @param options - IntersectionObserver options
1013
+ */
1014
+ declare function useIntersectionObserver<T extends Element = Element>(options?: UseIntersectionObserverOptions): UseIntersectionObserverReturn<T>;
1015
+
1016
+ type SnackbarSeverity = 'success' | 'error' | 'warning' | 'info';
1017
+ interface SnackbarState {
1018
+ open: boolean;
1019
+ message: string;
1020
+ severity: SnackbarSeverity;
1021
+ autoHideDuration?: number;
1022
+ }
1023
+ interface UseSnackbarReturn {
1024
+ /** Current snackbar state */
1025
+ state: SnackbarState;
1026
+ /** Show snackbar with message */
1027
+ show: (message: string, severity?: SnackbarSeverity, duration?: number) => void;
1028
+ /** Show success snackbar */
1029
+ success: (message: string, duration?: number) => void;
1030
+ /** Show error snackbar */
1031
+ error: (message: string, duration?: number) => void;
1032
+ /** Show warning snackbar */
1033
+ warning: (message: string, duration?: number) => void;
1034
+ /** Show info snackbar */
1035
+ info: (message: string, duration?: number) => void;
1036
+ /** Close snackbar */
1037
+ close: () => void;
1038
+ }
1039
+ /**
1040
+ * Manage snackbar/toast notification state
1041
+ * @param defaultDuration - Default auto-hide duration in ms
1042
+ */
1043
+ declare function useSnackbar(defaultDuration?: number): UseSnackbarReturn;
1044
+
1045
+ declare const index_ApiResponse: typeof ApiResponse;
1046
+ declare const index_ApiUrlBuilder: typeof ApiUrlBuilder;
1047
+ declare const index_ApiUrlConfig: typeof ApiUrlConfig;
1048
+ type index_BatteryState = BatteryState;
1049
+ declare const index_ClientLogger: typeof ClientLogger;
1050
+ declare const index_ClientLoggerConfig: typeof ClientLoggerConfig;
1051
+ type index_Dimensions = Dimensions;
1052
+ declare const index_EventEmitter: typeof EventEmitter;
1053
+ type index_GeolocationState = GeolocationState;
1054
+ declare const index_HttpClientOptions: typeof HttpClientOptions;
1055
+ declare const index_LogLevel: typeof LogLevel;
1056
+ type index_MousePosition = MousePosition;
1057
+ type index_NetworkState = NetworkState;
1058
+ declare const index_NpmRegistryResponse: typeof NpmRegistryResponse;
1059
+ type index_ObjectStateUpdate<T> = ObjectStateUpdate<T>;
1060
+ type index_OrientationState = OrientationState;
1061
+ declare const index_PackageCheckResult: typeof PackageCheckResult;
1062
+ declare const index_PackageJson: typeof PackageJson;
1063
+ declare const index_PackageVersion: typeof PackageVersion;
1064
+ declare const index_PaginatedResponse: typeof PaginatedResponse;
1065
+ type index_RenderInfo = RenderInfo;
1066
+ type index_ScriptStatus = ScriptStatus;
1067
+ type index_SetValue<T> = SetValue<T>;
1068
+ type index_SnackbarSeverity = SnackbarSeverity;
1069
+ type index_SnackbarState = SnackbarState;
1070
+ type index_ThemeMode = ThemeMode;
1071
+ type index_UseContinuousRetryOptions = UseContinuousRetryOptions;
1072
+ type index_UseContinuousRetryReturn = UseContinuousRetryReturn;
1073
+ type index_UseCopyToClipboardReturn = UseCopyToClipboardReturn;
1074
+ type index_UseCountdownOptions = UseCountdownOptions;
1075
+ type index_UseCountdownReturn = UseCountdownReturn;
1076
+ type index_UseCounterOptions = UseCounterOptions;
1077
+ type index_UseCounterReturn = UseCounterReturn;
1078
+ type index_UseDocumentTitleOptions = UseDocumentTitleOptions;
1079
+ type index_UseFetchOptions<T> = UseFetchOptions<T>;
1080
+ type index_UseFetchReturn<T> = UseFetchReturn<T>;
1081
+ type index_UseGeolocationOptions = UseGeolocationOptions;
1082
+ type index_UseGeolocationReturn = UseGeolocationReturn;
1083
+ type index_UseHistoryStateOptions = UseHistoryStateOptions;
1084
+ type index_UseHistoryStateReturn<T> = UseHistoryStateReturn<T>;
1085
+ type index_UseHoverReturn<T extends HTMLElement = HTMLElement> = UseHoverReturn<T>;
1086
+ type index_UseIdleOptions = UseIdleOptions;
1087
+ type index_UseIdleReturn = UseIdleReturn;
1088
+ type index_UseIntersectionObserverOptions = UseIntersectionObserverOptions;
1089
+ type index_UseIntersectionObserverReturn<T extends Element = Element> = UseIntersectionObserverReturn<T>;
1090
+ type index_UseKeyPressOptions = UseKeyPressOptions;
1091
+ type index_UseKeyPressReturn = UseKeyPressReturn;
1092
+ type index_UseListReturn<T> = UseListReturn<T>;
1093
+ type index_UseLocalStorageOptions<T> = UseLocalStorageOptions<T>;
1094
+ type index_UseLoggerOptions = UseLoggerOptions;
1095
+ type index_UseLongPressOptions = UseLongPressOptions;
1096
+ type index_UseLongPressReturn = UseLongPressReturn;
1097
+ type index_UseMapReturn<K, V> = UseMapReturn<K, V>;
1098
+ type index_UseMeasureReturn<T extends HTMLElement = HTMLElement> = UseMeasureReturn<T>;
1099
+ type index_UseMouseOptions = UseMouseOptions;
1100
+ type index_UseMouseReturn<T extends HTMLElement = HTMLElement> = UseMouseReturn<T>;
1101
+ type index_UseObjectStateReturn<T extends object> = UseObjectStateReturn<T>;
1102
+ type index_UsePageLeaveOptions = UsePageLeaveOptions;
1103
+ type index_UsePageTitleOptions = UsePageTitleOptions;
1104
+ type index_UsePreferredLanguageReturn = UsePreferredLanguageReturn;
1105
+ type index_UseQueueReturn<T> = UseQueueReturn<T>;
1106
+ type index_UseScriptOptions = UseScriptOptions;
1107
+ type index_UseScriptReturn = UseScriptReturn;
1108
+ type index_UseSessionStorageOptions<T> = UseSessionStorageOptions<T>;
1109
+ type index_UseSetReturn<T> = UseSetReturn<T>;
1110
+ type index_UseSnackbarReturn = UseSnackbarReturn;
1111
+ type index_UseTimeoutReturn = UseTimeoutReturn;
1112
+ type index_UseToggleReturn = UseToggleReturn;
1113
+ type index_UseVisibilityChangeReturn = UseVisibilityChangeReturn;
1114
+ type index_UseWindowScrollReturn = UseWindowScrollReturn;
1115
+ type index_WindowScrollPosition = WindowScrollPosition;
1116
+ type index_WindowSize = WindowSize;
1117
+ declare const index_addDays: typeof addDays;
1118
+ declare const index_appEvents: typeof appEvents;
1119
+ declare const index_camelToKebab: typeof camelToKebab;
1120
+ declare const index_capitalize: typeof capitalize;
1121
+ declare const index_capitalizeWords: typeof capitalizeWords;
1122
+ declare const index_checkPackage: typeof checkPackage;
1123
+ declare const index_clientLogger: typeof clientLogger;
1124
+ declare const index_copyToClipboard: typeof copyToClipboard;
1125
+ declare const index_createApiEndpoints: typeof createApiEndpoints;
1126
+ declare const index_createApiUrlBuilder: typeof createApiUrlBuilder;
1127
+ declare const index_createClientLogger: typeof createClientLogger;
1128
+ declare const index_createEmptyPaginationMeta: typeof createEmptyPaginationMeta;
1129
+ declare const index_createErrorResponse: typeof createErrorResponse;
1130
+ declare const index_createEventEmitter: typeof createEventEmitter;
1131
+ declare const index_createHttpClient: typeof createHttpClient;
1132
+ declare const index_createSuccessResponse: typeof createSuccessResponse;
1133
+ declare const index_endOfDay: typeof endOfDay;
1134
+ declare const index_formatDate: typeof formatDate;
1135
+ declare const index_formatDateForInput: typeof formatDateForInput;
1136
+ declare const index_formatDateTime: typeof formatDateTime;
1137
+ declare const index_formatDateTimeForInput: typeof formatDateTimeForInput;
1138
+ declare const index_formatPackageCheckResult: typeof formatPackageCheckResult;
1139
+ declare const index_formatRelativeTime: typeof formatRelativeTime;
1140
+ declare const index_generateNcuCommand: typeof generateNcuCommand;
1141
+ declare const index_getErrorMessage: typeof getErrorMessage;
1142
+ declare const index_getNextPage: typeof getNextPage;
1143
+ declare const index_getPrevPage: typeof getPrevPage;
1144
+ declare const index_getResponseData: typeof getResponseData;
1145
+ declare const index_hasData: typeof hasData;
1146
+ declare const index_hasMorePages: typeof hasMorePages;
1147
+ declare const index_isClipboardAvailable: typeof isClipboardAvailable;
1148
+ declare const index_isErrorResponse: typeof isErrorResponse;
1149
+ declare const index_isForbidden: typeof isForbidden;
1150
+ declare const index_isFuture: typeof isFuture;
1151
+ declare const index_isNotFound: typeof isNotFound;
1152
+ declare const index_isPast: typeof isPast;
1153
+ declare const index_isServerError: typeof isServerError;
1154
+ declare const index_isStatusError: typeof isStatusError;
1155
+ declare const index_isSuccess: typeof isSuccess;
1156
+ declare const index_isSuccessResponse: typeof isSuccessResponse;
1157
+ declare const index_isToday: typeof isToday;
1158
+ declare const index_isUnauthorized: typeof isUnauthorized;
1159
+ declare const index_kebabToCamel: typeof kebabToCamel;
1160
+ declare const index_packageCheck: typeof packageCheck;
1161
+ declare const index_parseError: typeof parseError;
1162
+ declare const index_parseFullResponse: typeof parseFullResponse;
1163
+ declare const index_parseResponse: typeof parseResponse;
1164
+ declare const index_readFromClipboard: typeof readFromClipboard;
1165
+ declare const index_slugify: typeof slugify;
1166
+ declare const index_slugifyUnique: typeof slugifyUnique;
1167
+ declare const index_startOfDay: typeof startOfDay;
1168
+ declare const index_truncate: typeof truncate;
1169
+ declare const index_truncateWords: typeof truncateWords;
1170
+ declare const index_unslugify: typeof unslugify;
1171
+ declare const index_useBattery: typeof useBattery;
1172
+ declare const index_useClickAway: typeof useClickAway;
1173
+ declare const index_useContinuousRetry: typeof useContinuousRetry;
1174
+ declare const index_useCopyToClipboard: typeof useCopyToClipboard;
1175
+ declare const index_useCountdown: typeof useCountdown;
1176
+ declare const index_useCounter: typeof useCounter;
1177
+ declare const index_useDebounce: typeof useDebounce;
1178
+ declare const index_useDefault: typeof useDefault;
1179
+ declare const index_useDocumentTitle: typeof useDocumentTitle;
1180
+ declare const index_useEventListener: typeof useEventListener;
1181
+ declare const index_useFavicon: typeof useFavicon;
1182
+ declare const index_useFetch: typeof useFetch;
1183
+ declare const index_useGeolocation: typeof useGeolocation;
1184
+ declare const index_useHistoryState: typeof useHistoryState;
1185
+ declare const index_useHover: typeof useHover;
1186
+ declare const index_useIdle: typeof useIdle;
1187
+ declare const index_useIntersectionObserver: typeof useIntersectionObserver;
1188
+ declare const index_useInterval: typeof useInterval;
1189
+ declare const index_useIntervalWhen: typeof useIntervalWhen;
1190
+ declare const index_useIsClient: typeof useIsClient;
1191
+ declare const index_useIsDesktop: typeof useIsDesktop;
1192
+ declare const index_useIsFirstRender: typeof useIsFirstRender;
1193
+ declare const index_useIsMobile: typeof useIsMobile;
1194
+ declare const index_useIsMobileOrTablet: typeof useIsMobileOrTablet;
1195
+ declare const index_useIsTablet: typeof useIsTablet;
1196
+ declare const index_useKeyPress: typeof useKeyPress;
1197
+ declare const index_useList: typeof useList;
1198
+ declare const index_useLocalStorage: typeof useLocalStorage;
1199
+ declare const index_useLockBodyScroll: typeof useLockBodyScroll;
1200
+ declare const index_useLogger: typeof useLogger;
1201
+ declare const index_useLongPress: typeof useLongPress;
1202
+ declare const index_useMap: typeof useMap;
1203
+ declare const index_useMeasure: typeof useMeasure;
1204
+ declare const index_useMediaQuery: typeof useMediaQuery;
1205
+ declare const index_useMouse: typeof useMouse;
1206
+ declare const index_useNetworkState: typeof useNetworkState;
1207
+ declare const index_useObjectState: typeof useObjectState;
1208
+ declare const index_useOnClickOutside: typeof useOnClickOutside;
1209
+ declare const index_useOrientation: typeof useOrientation;
1210
+ declare const index_usePageLeave: typeof usePageLeave;
1211
+ declare const index_usePageTitle: typeof usePageTitle;
1212
+ declare const index_usePreferredLanguage: typeof usePreferredLanguage;
1213
+ declare const index_usePrevious: typeof usePrevious;
1214
+ declare const index_useQueue: typeof useQueue;
1215
+ declare const index_useRandomInterval: typeof useRandomInterval;
1216
+ declare const index_useRenderCount: typeof useRenderCount;
1217
+ declare const index_useRenderInfo: typeof useRenderInfo;
1218
+ declare const index_useScript: typeof useScript;
1219
+ declare const index_useSessionStorage: typeof useSessionStorage;
1220
+ declare const index_useSet: typeof useSet;
1221
+ declare const index_useSnackbar: typeof useSnackbar;
1222
+ declare const index_useThemeDetector: typeof useThemeDetector;
1223
+ declare const index_useThrottle: typeof useThrottle;
1224
+ declare const index_useTimeout: typeof useTimeout;
1225
+ declare const index_useToggle: typeof useToggle;
1226
+ declare const index_useVisibilityChange: typeof useVisibilityChange;
1227
+ declare const index_useWindowScroll: typeof useWindowScroll;
1228
+ declare const index_useWindowSize: typeof useWindowSize;
1229
+ declare const index_withAbortSignal: typeof withAbortSignal;
1230
+ declare const index_withFormData: typeof withFormData;
1231
+ declare const index_withTimeout: typeof withTimeout;
1232
+ declare namespace index {
1233
+ export { index_ApiResponse as ApiResponse, index_ApiUrlBuilder as ApiUrlBuilder, index_ApiUrlConfig as ApiUrlConfig, type index_BatteryState as BatteryState, index_ClientLogger as ClientLogger, index_ClientLoggerConfig as ClientLoggerConfig, type index_Dimensions as Dimensions, index_EventEmitter as EventEmitter, type index_GeolocationState as GeolocationState, index_HttpClientOptions as HttpClientOptions, index_LogLevel as LogLevel, type index_MousePosition as MousePosition, type index_NetworkState as NetworkState, index_NpmRegistryResponse as NpmRegistryResponse, type index_ObjectStateUpdate as ObjectStateUpdate, type index_OrientationState as OrientationState, index_PackageCheckResult as PackageCheckResult, index_PackageJson as PackageJson, index_PackageVersion as PackageVersion, index_PaginatedResponse as PaginatedResponse, type index_RenderInfo as RenderInfo, type index_ScriptStatus as ScriptStatus, type index_SetValue as SetValue, type index_SnackbarSeverity as SnackbarSeverity, type index_SnackbarState as SnackbarState, type index_ThemeMode as ThemeMode, type index_UseContinuousRetryOptions as UseContinuousRetryOptions, type index_UseContinuousRetryReturn as UseContinuousRetryReturn, type index_UseCopyToClipboardReturn as UseCopyToClipboardReturn, type index_UseCountdownOptions as UseCountdownOptions, type index_UseCountdownReturn as UseCountdownReturn, type index_UseCounterOptions as UseCounterOptions, type index_UseCounterReturn as UseCounterReturn, type index_UseDocumentTitleOptions as UseDocumentTitleOptions, type index_UseFetchOptions as UseFetchOptions, type index_UseFetchReturn as UseFetchReturn, type index_UseGeolocationOptions as UseGeolocationOptions, type index_UseGeolocationReturn as UseGeolocationReturn, type index_UseHistoryStateOptions as UseHistoryStateOptions, type index_UseHistoryStateReturn as UseHistoryStateReturn, type index_UseHoverReturn as UseHoverReturn, type index_UseIdleOptions as UseIdleOptions, type index_UseIdleReturn as UseIdleReturn, type index_UseIntersectionObserverOptions as UseIntersectionObserverOptions, type index_UseIntersectionObserverReturn as UseIntersectionObserverReturn, type index_UseKeyPressOptions as UseKeyPressOptions, type index_UseKeyPressReturn as UseKeyPressReturn, type index_UseListReturn as UseListReturn, type index_UseLocalStorageOptions as UseLocalStorageOptions, type index_UseLoggerOptions as UseLoggerOptions, type index_UseLongPressOptions as UseLongPressOptions, type index_UseLongPressReturn as UseLongPressReturn, type index_UseMapReturn as UseMapReturn, type index_UseMeasureReturn as UseMeasureReturn, type index_UseMouseOptions as UseMouseOptions, type index_UseMouseReturn as UseMouseReturn, type index_UseObjectStateReturn as UseObjectStateReturn, type index_UsePageLeaveOptions as UsePageLeaveOptions, type index_UsePageTitleOptions as UsePageTitleOptions, type index_UsePreferredLanguageReturn as UsePreferredLanguageReturn, type index_UseQueueReturn as UseQueueReturn, type index_UseScriptOptions as UseScriptOptions, type index_UseScriptReturn as UseScriptReturn, type index_UseSessionStorageOptions as UseSessionStorageOptions, type index_UseSetReturn as UseSetReturn, type index_UseSnackbarReturn as UseSnackbarReturn, type index_UseTimeoutReturn as UseTimeoutReturn, type index_UseToggleReturn as UseToggleReturn, type index_UseVisibilityChangeReturn as UseVisibilityChangeReturn, type index_UseWindowScrollReturn as UseWindowScrollReturn, type index_WindowScrollPosition as WindowScrollPosition, type index_WindowSize as WindowSize, index_addDays as addDays, index_appEvents as appEvents, index_camelToKebab as camelToKebab, index_capitalize as capitalize, index_capitalizeWords as capitalizeWords, index_checkPackage as checkPackage, index_clientLogger as clientLogger, index_copyToClipboard as copyToClipboard, index_createApiEndpoints as createApiEndpoints, index_createApiUrlBuilder as createApiUrlBuilder, index_createClientLogger as createClientLogger, index_createEmptyPaginationMeta as createEmptyPaginationMeta, index_createErrorResponse as createErrorResponse, index_createEventEmitter as createEventEmitter, index_createHttpClient as createHttpClient, index_createSuccessResponse as createSuccessResponse, index_endOfDay as endOfDay, index_formatDate as formatDate, index_formatDateForInput as formatDateForInput, index_formatDateTime as formatDateTime, index_formatDateTimeForInput as formatDateTimeForInput, index_formatPackageCheckResult as formatPackageCheckResult, index_formatRelativeTime as formatRelativeTime, index_generateNcuCommand as generateNcuCommand, index_getErrorMessage as getErrorMessage, index_getNextPage as getNextPage, index_getPrevPage as getPrevPage, index_getResponseData as getResponseData, index_hasData as hasData, index_hasMorePages as hasMorePages, index_isClipboardAvailable as isClipboardAvailable, index_isErrorResponse as isErrorResponse, index_isForbidden as isForbidden, index_isFuture as isFuture, index_isNotFound as isNotFound, index_isPast as isPast, index_isServerError as isServerError, index_isStatusError as isStatusError, index_isSuccess as isSuccess, index_isSuccessResponse as isSuccessResponse, index_isToday as isToday, index_isUnauthorized as isUnauthorized, index_kebabToCamel as kebabToCamel, index_packageCheck as packageCheck, index_parseError as parseError, index_parseFullResponse as parseFullResponse, index_parseResponse as parseResponse, index_readFromClipboard as readFromClipboard, index_slugify as slugify, index_slugifyUnique as slugifyUnique, index_startOfDay as startOfDay, index_truncate as truncate, index_truncateWords as truncateWords, index_unslugify as unslugify, index_useBattery as useBattery, index_useClickAway as useClickAway, index_useContinuousRetry as useContinuousRetry, index_useCopyToClipboard as useCopyToClipboard, index_useCountdown as useCountdown, index_useCounter as useCounter, index_useDebounce as useDebounce, index_useDefault as useDefault, index_useDocumentTitle as useDocumentTitle, index_useEventListener as useEventListener, index_useFavicon as useFavicon, index_useFetch as useFetch, index_useGeolocation as useGeolocation, index_useHistoryState as useHistoryState, index_useHover as useHover, index_useIdle as useIdle, index_useIntersectionObserver as useIntersectionObserver, index_useInterval as useInterval, index_useIntervalWhen as useIntervalWhen, index_useIsClient as useIsClient, index_useIsDesktop as useIsDesktop, index_useIsFirstRender as useIsFirstRender, index_useIsMobile as useIsMobile, index_useIsMobileOrTablet as useIsMobileOrTablet, index_useIsTablet as useIsTablet, index_useKeyPress as useKeyPress, index_useList as useList, index_useLocalStorage as useLocalStorage, index_useLockBodyScroll as useLockBodyScroll, index_useLogger as useLogger, index_useLongPress as useLongPress, index_useMap as useMap, index_useMeasure as useMeasure, index_useMediaQuery as useMediaQuery, index_useMouse as useMouse, index_useNetworkState as useNetworkState, index_useObjectState as useObjectState, index_useOnClickOutside as useOnClickOutside, index_useOrientation as useOrientation, index_usePageLeave as usePageLeave, index_usePageTitle as usePageTitle, index_usePreferredLanguage as usePreferredLanguage, index_usePrevious as usePrevious, index_useQueue as useQueue, index_useRandomInterval as useRandomInterval, index_useRenderCount as useRenderCount, index_useRenderInfo as useRenderInfo, index_useScript as useScript, index_useSessionStorage as useSessionStorage, index_useSet as useSet, index_useSnackbar as useSnackbar, index_useThemeDetector as useThemeDetector, index_useThrottle as useThrottle, index_useTimeout as useTimeout, index_useToggle as useToggle, index_useVisibilityChange as useVisibilityChange, index_useWindowScroll as useWindowScroll, index_useWindowSize as useWindowSize, index_withAbortSignal as withAbortSignal, index_withFormData as withFormData, index_withTimeout as withTimeout };
1234
+ }
1235
+
1236
+ export { useIntersectionObserver as $, useLockBodyScroll as A, useIsClient as B, useIsFirstRender as C, useEventListener as D, useKeyPress as E, useHover as F, useClickAway as G, useOnClickOutside as H, useLongPress as I, useMouse as J, useCopyToClipboard as K, useMediaQuery as L, useOrientation as M, useBattery as N, useNetworkState as O, useIdle as P, useGeolocation as Q, usePreferredLanguage as R, useThemeDetector as S, useLocalStorage as T, useSessionStorage as U, useFetch as V, useScript as W, useRenderInfo as X, useRenderCount as Y, useLogger as Z, useMeasure as _, useCounter as a, type UseSnackbarReturn as a$, useSnackbar as a0, type UseToggleReturn as a1, type UseCounterOptions as a2, type UseCounterReturn as a3, type ObjectStateUpdate as a4, type UseObjectStateReturn as a5, type UseHistoryStateReturn as a6, type UseHistoryStateOptions as a7, type UseQueueReturn as a8, type UseListReturn as a9, useIsMobileOrTablet as aA, type OrientationState as aB, type BatteryState as aC, type NetworkState as aD, type UseIdleOptions as aE, type UseIdleReturn as aF, type GeolocationState as aG, type UseGeolocationOptions as aH, type UseGeolocationReturn as aI, type UsePreferredLanguageReturn as aJ, type ThemeMode as aK, type SetValue as aL, type UseLocalStorageOptions as aM, type UseSessionStorageOptions as aN, type UseFetchOptions as aO, type UseFetchReturn as aP, type ScriptStatus as aQ, type UseScriptOptions as aR, type UseScriptReturn as aS, type RenderInfo as aT, type UseLoggerOptions as aU, type Dimensions as aV, type UseMeasureReturn as aW, type UseIntersectionObserverOptions as aX, type UseIntersectionObserverReturn as aY, type SnackbarSeverity as aZ, type SnackbarState as a_, type UseMapReturn as aa, type UseSetReturn as ab, type UseTimeoutReturn as ac, type UseCountdownOptions as ad, type UseCountdownReturn as ae, type UseContinuousRetryOptions as af, type UseContinuousRetryReturn as ag, type WindowSize as ah, type WindowScrollPosition as ai, type UseWindowScrollReturn as aj, type UseDocumentTitleOptions as ak, type UsePageTitleOptions as al, type UseVisibilityChangeReturn as am, type UsePageLeaveOptions as an, type UseKeyPressOptions as ao, type UseKeyPressReturn as ap, type UseHoverReturn as aq, type UseLongPressOptions as ar, type UseLongPressReturn as as, type MousePosition as at, type UseMouseOptions as au, type UseMouseReturn as av, type UseCopyToClipboardReturn as aw, useIsMobile as ax, useIsTablet as ay, useIsDesktop as az, useDefault as b, usePrevious as c, useObjectState as d, useHistoryState as e, useQueue as f, useList as g, useMap as h, index as i, useSet as j, useDebounce as k, useThrottle as l, useTimeout as m, useInterval as n, useIntervalWhen as o, useRandomInterval as p, useCountdown as q, useContinuousRetry as r, useWindowSize as s, useWindowScroll as t, useToggle as u, useDocumentTitle as v, usePageTitle as w, useFavicon as x, useVisibilityChange as y, usePageLeave as z };