@siberiacancode/reactuse 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{_rollupPluginBabelHelpers-Db0KR1gW.js → _rollupPluginBabelHelpers-OMepdpg5.js} +3 -3
- package/dist/cjs/_rollupPluginBabelHelpers-OMepdpg5.js.map +1 -0
- package/dist/cjs/hooks/index.js +2 -2
- package/dist/cjs/hooks/useBattery/useBattery.js +2 -2
- package/dist/cjs/hooks/useBoolean/useBoolean.js +2 -2
- package/dist/cjs/hooks/useClickOutside/useClickOutside.js +2 -2
- package/dist/cjs/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/dist/cjs/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
- package/dist/cjs/hooks/useCounter/useCounter.js +2 -2
- package/dist/cjs/hooks/useDebouncedValue/useDebouncedValue.js +2 -2
- package/dist/cjs/hooks/useDefault/useDefault.js +2 -2
- package/dist/cjs/hooks/useDidUpdate/useDidUpdate.js +1 -1
- package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/cjs/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
- package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js +2 -2
- package/dist/cjs/hooks/useDocumentVisibility/useDocumentVisibility.js.map +1 -1
- package/dist/cjs/hooks/useEvent/useEvent.js +3 -0
- package/dist/cjs/hooks/useEvent/useEvent.js.map +1 -0
- package/dist/cjs/hooks/useEventListener/useEventListener.js +1 -1
- package/dist/cjs/hooks/useFavicon/useFavicon.js +2 -2
- package/dist/cjs/hooks/useHash/useHash.js +2 -2
- package/dist/cjs/hooks/useHotkeys/useHotkeys.js +3 -0
- package/dist/cjs/hooks/useHotkeys/useHotkeys.js.map +1 -0
- package/dist/cjs/hooks/useHover/useHover.js +2 -2
- package/dist/cjs/hooks/useHover/useHover.js.map +1 -1
- package/dist/cjs/hooks/useIdle/useIdle.js +2 -2
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js +3 -0
- package/dist/cjs/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -0
- package/dist/cjs/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
- package/dist/cjs/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
- package/dist/cjs/hooks/useKeyPress/useKeyPress.js +2 -2
- package/dist/cjs/hooks/useKeyPressEvent/useKeyPressEvent.js +1 -1
- package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/cjs/hooks/useKeysPressed/useKeysPressed.js.map +1 -1
- package/dist/cjs/hooks/useLocalStorage/useLocalStorage.js +2 -2
- package/dist/cjs/hooks/useLogger/useLogger.js +2 -2
- package/dist/cjs/hooks/useMediaQuery/useMediaQuery.js +1 -1
- package/dist/cjs/hooks/useMount/useMount.js +1 -1
- package/dist/cjs/hooks/useMutationObserver.js +1 -1
- package/dist/cjs/hooks/useNetwork/useNetwork.js +1 -1
- package/dist/cjs/hooks/useOnline/useOnline.js +1 -1
- package/dist/cjs/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
- package/dist/cjs/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/cjs/hooks/usePrevious/usePrevious.js +1 -1
- package/dist/cjs/hooks/useQueue/useQueue.js +3 -0
- package/dist/cjs/hooks/useQueue/useQueue.js.map +1 -0
- package/dist/cjs/hooks/useRenderCount/useRenderCount.js +1 -1
- package/dist/cjs/hooks/useRerender/useRerender.js +2 -2
- package/dist/cjs/hooks/useScript/useScript.js +2 -2
- package/dist/cjs/hooks/useScript/useScript.js.map +1 -1
- package/dist/cjs/hooks/useSessionStorage/useSessionStorage.js +2 -2
- package/dist/cjs/hooks/useSet/useSet.js +2 -2
- package/dist/cjs/hooks/useStep/useStep.js +2 -2
- package/dist/cjs/hooks/useStorage/useStorage.js +2 -2
- package/dist/cjs/hooks/useStorage/useStorage.js.map +1 -1
- package/dist/cjs/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/cjs/hooks/useToggle/useToggle.js +2 -2
- package/dist/cjs/hooks/useUnmount/useUnmount.js +1 -1
- package/dist/cjs/hooks/useWindowEvent/useWindowEvent.js +1 -1
- package/dist/cjs/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/utils/helpers/debounce.js +1 -1
- package/dist/cjs/utils/helpers/index.js +1 -1
- package/dist/cjs/utils/helpers/isClient.js +1 -1
- package/dist/cjs/utils/helpers/isShallowEqual.js +1 -1
- package/dist/cjs/utils/helpers/throttle.js +1 -1
- package/dist/esm/{_rollupPluginBabelHelpers-Cg3Jntln.js → _rollupPluginBabelHelpers-TF5Io098.js} +3 -3
- package/dist/esm/_rollupPluginBabelHelpers-TF5Io098.js.map +1 -0
- package/dist/esm/hooks/index.js +2 -2
- package/dist/esm/hooks/useBattery/useBattery.js +2 -2
- package/dist/esm/hooks/useBoolean/useBoolean.js +2 -2
- package/dist/esm/hooks/useClickOutside/useClickOutside.js +2 -2
- package/dist/esm/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/dist/esm/hooks/useCopyToClipboard/useCopyToClipboard.js +2 -2
- package/dist/esm/hooks/useCounter/useCounter.js +2 -2
- package/dist/esm/hooks/useDebouncedValue/useDebouncedValue.js +2 -2
- package/dist/esm/hooks/useDefault/useDefault.js +2 -2
- package/dist/esm/hooks/useDidUpdate/useDidUpdate.js +1 -1
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js +2 -2
- package/dist/esm/hooks/useDocumentTitle/useDocumentTitle.js.map +1 -1
- package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js +2 -2
- package/dist/esm/hooks/useDocumentVisibility/useDocumentVisibility.js.map +1 -1
- package/dist/esm/hooks/useEvent/useEvent.js +3 -0
- package/dist/esm/hooks/useEvent/useEvent.js.map +1 -0
- package/dist/esm/hooks/useEventListener/useEventListener.js +1 -1
- package/dist/esm/hooks/useFavicon/useFavicon.js +2 -2
- package/dist/esm/hooks/useHash/useHash.js +2 -2
- package/dist/esm/hooks/useHotkeys/useHotkeys.js +3 -0
- package/dist/esm/hooks/useHotkeys/useHotkeys.js.map +1 -0
- package/dist/esm/hooks/useHover/useHover.js +2 -2
- package/dist/esm/hooks/useHover/useHover.js.map +1 -1
- package/dist/esm/hooks/useIdle/useIdle.js +2 -2
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js +3 -0
- package/dist/esm/hooks/useIntersectionObserver/useIntersectionObserver.js.map +1 -0
- package/dist/esm/hooks/useIsFirstRender/useIsFirstRender.js +1 -1
- package/dist/esm/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.js +1 -1
- package/dist/esm/hooks/useKeyPress/useKeyPress.js +2 -2
- package/dist/esm/hooks/useKeyPressEvent/useKeyPressEvent.js +1 -1
- package/dist/esm/hooks/useKeysPressed/useKeysPressed.js +2 -2
- package/dist/esm/hooks/useKeysPressed/useKeysPressed.js.map +1 -1
- package/dist/esm/hooks/useLocalStorage/useLocalStorage.js +2 -2
- package/dist/esm/hooks/useLogger/useLogger.js +2 -2
- package/dist/esm/hooks/useMediaQuery/useMediaQuery.js +1 -1
- package/dist/esm/hooks/useMount/useMount.js +1 -1
- package/dist/esm/hooks/useMutationObserver.js +1 -1
- package/dist/esm/hooks/useNetwork/useNetwork.js +1 -1
- package/dist/esm/hooks/useOnline/useOnline.js +1 -1
- package/dist/esm/hooks/useOperatingSystem/useOperatingSystem.js +1 -1
- package/dist/esm/hooks/useOrientation/useOrientation.js +2 -2
- package/dist/esm/hooks/usePrevious/usePrevious.js +1 -1
- package/dist/esm/hooks/useQueue/useQueue.js +3 -0
- package/dist/esm/hooks/useQueue/useQueue.js.map +1 -0
- package/dist/esm/hooks/useRenderCount/useRenderCount.js +1 -1
- package/dist/esm/hooks/useRerender/useRerender.js +2 -2
- package/dist/esm/hooks/useScript/useScript.js +2 -2
- package/dist/esm/hooks/useScript/useScript.js.map +1 -1
- package/dist/esm/hooks/useSessionStorage/useSessionStorage.js +2 -2
- package/dist/esm/hooks/useSet/useSet.js +2 -2
- package/dist/esm/hooks/useStep/useStep.js +2 -2
- package/dist/esm/hooks/useStorage/useStorage.js +2 -2
- package/dist/esm/hooks/useStorage/useStorage.js.map +1 -1
- package/dist/esm/hooks/useTimeout/useTimeout.js +2 -2
- package/dist/esm/hooks/useToggle/useToggle.js +2 -2
- package/dist/esm/hooks/useUnmount/useUnmount.js +1 -1
- package/dist/esm/hooks/useWindowEvent/useWindowEvent.js +1 -1
- package/dist/esm/hooks/useWindowSize/useWindowSize.js +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/utils/helpers/debounce.js +1 -1
- package/dist/esm/utils/helpers/index.js +1 -1
- package/dist/esm/utils/helpers/isClient.js +1 -1
- package/dist/esm/utils/helpers/isShallowEqual.js +1 -1
- package/dist/esm/utils/helpers/throttle.js +1 -1
- package/dist/index.d.ts +99 -8
- package/package.json +2 -1
- package/dist/cjs/_rollupPluginBabelHelpers-Db0KR1gW.js.map +0 -1
- package/dist/esm/_rollupPluginBabelHelpers-Cg3Jntln.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,10 +46,10 @@ type UseBooleanReturn = [
|
|
|
46
46
|
declare const useBoolean: (initialValue?: boolean) => UseBooleanReturn;
|
|
47
47
|
|
|
48
48
|
type UseClickOutsideTarget = React.RefObject<Element | null> | (() => Element) | Element;
|
|
49
|
-
type UseClickOutsideReturn<Target extends UseClickOutsideTarget |
|
|
49
|
+
type UseClickOutsideReturn<Target extends UseClickOutsideTarget | UseClickOutsideTarget[]> = React.RefObject<Target>;
|
|
50
50
|
type UseClickOutside = {
|
|
51
|
-
<Target extends UseClickOutsideTarget |
|
|
52
|
-
<Target extends UseClickOutsideTarget |
|
|
51
|
+
<Target extends UseClickOutsideTarget | UseClickOutsideTarget[]>(target: Target, callback: (event: Event) => void): void;
|
|
52
|
+
<Target extends UseClickOutsideTarget | UseClickOutsideTarget[]>(callback: (event: Event) => void, target?: never): UseClickOutsideReturn<Target>;
|
|
53
53
|
};
|
|
54
54
|
declare const useClickOutside: UseClickOutside;
|
|
55
55
|
|
|
@@ -161,7 +161,7 @@ declare const useDefault: <Value>(initialValue: Value | (() => Value), defaultVa
|
|
|
161
161
|
*/
|
|
162
162
|
declare const useDidUpdate: (effect: React.EffectCallback, deps?: React.DependencyList) => void;
|
|
163
163
|
|
|
164
|
-
/** The use document title options
|
|
164
|
+
/** The use document title options */
|
|
165
165
|
interface UseDocumentTitleOptions {
|
|
166
166
|
/** Restore the previous title on unmount */
|
|
167
167
|
restoreOnUnmount?: boolean;
|
|
@@ -197,6 +197,8 @@ declare function useDocumentTitle(value?: string, options?: UseDocumentTitleOpti
|
|
|
197
197
|
*/
|
|
198
198
|
declare const useDocumentVisibility: () => DocumentVisibilityState;
|
|
199
199
|
|
|
200
|
+
declare const useEvent: <Params extends unknown[], Return>(callback: (...args: Params) => Return) => ((...args: Params) => Return);
|
|
201
|
+
|
|
200
202
|
type UseEventListenerTarget = React.RefObject<Element | null> | (() => Element) | Element | Window | Document;
|
|
201
203
|
type UseEventListenerOptions = boolean | AddEventListenerOptions;
|
|
202
204
|
type UseEventListenerReturn<Target extends UseEventListenerTarget = any> = React.RefObject<Target>;
|
|
@@ -245,6 +247,44 @@ type UseHashReturn = [string, (value: string) => void];
|
|
|
245
247
|
*/
|
|
246
248
|
declare const useHash: () => UseHashReturn;
|
|
247
249
|
|
|
250
|
+
/** The use keys pressed params */
|
|
251
|
+
interface UseHotkeysOptions {
|
|
252
|
+
/** The target to attach the event listeners to */
|
|
253
|
+
target?: UseEventListenerTarget;
|
|
254
|
+
/** Enable or disable the event listeners */
|
|
255
|
+
enabled?: boolean;
|
|
256
|
+
/** Whether to prevent the default behavior of the event */
|
|
257
|
+
preventDefault?: boolean;
|
|
258
|
+
/** Alias map for hotkeys */
|
|
259
|
+
aliasMap?: Record<string, string>;
|
|
260
|
+
}
|
|
261
|
+
declare const isHotkeyMatch: (hotkey: string, keys: UseHotkeysKey[]) => boolean;
|
|
262
|
+
type UseHotkeysHotkeys = string[] | string;
|
|
263
|
+
type UseHotkeysKey = {
|
|
264
|
+
key: string;
|
|
265
|
+
code: string;
|
|
266
|
+
alias: string;
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* @name useHotkeys
|
|
270
|
+
* @description - Hook that listens for key press events
|
|
271
|
+
*
|
|
272
|
+
* @param {UseHotkeysHotkeys} hotkeys The key or keys to listen for
|
|
273
|
+
* @param {(event: KeyboardEvent) => void} callback The callback function to be called when the hotkey is pressed
|
|
274
|
+
* @param {UseEventListenerTarget} [options.target=window] The target to attach the event listeners to
|
|
275
|
+
* @param {boolean} [options.enabled=true] Enable or disable the event listeners
|
|
276
|
+
* @param {boolean} [options.preventDefault=true] Whether to prevent the default behavior of the event
|
|
277
|
+
* @param {Record<string, string>} [options.aliasMap] Alias map for hotkeys
|
|
278
|
+
* @returns {useKeysPressedReturns} Array of strings with keys that were press
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
* useHotkeys('control+a', () => console.log('hotkey pressed'));
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* useHotkeys('ControlLeft+KeyA', () => console.log('hotkey pressed'));
|
|
285
|
+
*/
|
|
286
|
+
declare const useHotkeys: (hotkeys: UseHotkeysHotkeys, callback: (event: KeyboardEvent) => void, options?: UseHotkeysOptions) => void;
|
|
287
|
+
|
|
248
288
|
interface UseHoverOptions {
|
|
249
289
|
onEntry?: () => void;
|
|
250
290
|
onLeave?: () => void;
|
|
@@ -306,6 +346,24 @@ interface UseIdleReturn {
|
|
|
306
346
|
*/
|
|
307
347
|
declare const useIdle: (milliseconds?: number, { initialState, events }?: UseIdleOptions) => UseIdleReturn;
|
|
308
348
|
|
|
349
|
+
type UseIntersectionObserverTarget = React.RefObject<Element | null> | (() => Element) | Element;
|
|
350
|
+
interface UseIntersectionObserverOptions extends Omit<IntersectionObserverInit, 'root'> {
|
|
351
|
+
immediate?: boolean;
|
|
352
|
+
onChange?: (entry: IntersectionObserverEntry) => void;
|
|
353
|
+
root?: IntersectionObserverInit['root'] | React.RefObject<Element | null>;
|
|
354
|
+
}
|
|
355
|
+
interface UseIntersectionObserverReturn {
|
|
356
|
+
inView: boolean;
|
|
357
|
+
entry?: IntersectionObserverEntry;
|
|
358
|
+
}
|
|
359
|
+
type UseIntersectionObserver = {
|
|
360
|
+
<Target extends UseIntersectionObserverTarget>(target: Target, options?: UseIntersectionObserverOptions): UseIntersectionObserverReturn;
|
|
361
|
+
<Target extends UseIntersectionObserverTarget>(options?: UseIntersectionObserverOptions, target?: never): UseIntersectionObserverReturn & {
|
|
362
|
+
ref: React.RefObject<Target>;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
declare const useIntersectionObserver: UseIntersectionObserver;
|
|
366
|
+
|
|
309
367
|
/**
|
|
310
368
|
* @name useIsomorphicLayoutEffect
|
|
311
369
|
* @description - Hook conditionally selects either `useLayoutEffect` or `useEffect` based on the environment
|
|
@@ -380,7 +438,7 @@ type UseStorageReturn<Value> = [
|
|
|
380
438
|
remove: () => void
|
|
381
439
|
];
|
|
382
440
|
declare const dispatchStorageEvent: (params: Partial<StorageEvent>) => boolean;
|
|
383
|
-
declare const useStorage: <Value>(key: string, params?: UseStorageInitialValue<Value> | UseStorageOptions<Value>) => readonly [Value, (value: Value) => void, () => void];
|
|
441
|
+
declare const useStorage: <Value>(key: string, params?: UseStorageInitialValue<Value> | UseStorageOptions<Value>) => readonly [Value | undefined, (value: Value) => void, () => void];
|
|
384
442
|
|
|
385
443
|
/**
|
|
386
444
|
* @name useLocalStorage
|
|
@@ -394,7 +452,7 @@ declare const useStorage: <Value>(key: string, params?: UseStorageInitialValue<V
|
|
|
394
452
|
* @example
|
|
395
453
|
* const [value, setValue, removeValue] = useLocalStorage('key', 'value');
|
|
396
454
|
*/
|
|
397
|
-
declare const useLocalStorage: <Value>(key: string, initialValue?: UseStorageInitialValue<Value>, options?: UseStorageOptions<Value>) => readonly [Value, (value: Value) => void, () => void];
|
|
455
|
+
declare const useLocalStorage: <Value>(key: string, initialValue?: UseStorageInitialValue<Value>, options?: UseStorageOptions<Value>) => readonly [Value | undefined, (value: Value) => void, () => void];
|
|
398
456
|
|
|
399
457
|
/**
|
|
400
458
|
* @name useLogger
|
|
@@ -517,6 +575,36 @@ declare const useOrientation: () => UseOrientationReturn;
|
|
|
517
575
|
*/
|
|
518
576
|
declare const usePrevious: <Value>(value: Value) => Value | undefined;
|
|
519
577
|
|
|
578
|
+
/** The use queue return type */
|
|
579
|
+
interface UseQueueReturn<Value> {
|
|
580
|
+
/** The current queue */
|
|
581
|
+
queue: Value[];
|
|
582
|
+
/** Add an element to the queue */
|
|
583
|
+
add: (element: Value) => void;
|
|
584
|
+
/** Remove an element from the queue */
|
|
585
|
+
remove: () => Value;
|
|
586
|
+
/** Clear the queue */
|
|
587
|
+
clear: () => void;
|
|
588
|
+
/** Get the first element of the queue */
|
|
589
|
+
first: Value;
|
|
590
|
+
/** Get the last element of the queue */
|
|
591
|
+
last: Value;
|
|
592
|
+
/** Get the size of the queue */
|
|
593
|
+
size: number;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* @name useQueue
|
|
597
|
+
* @description - Hook that manages a queue
|
|
598
|
+
*
|
|
599
|
+
* @template Value The type of the value
|
|
600
|
+
* @param {Value[]} [initialValue=[]] The initial value of the queue
|
|
601
|
+
* @returns {UseQueueReturn} An object containing the current queue and functions to interact with the queue
|
|
602
|
+
*
|
|
603
|
+
* @example
|
|
604
|
+
* const { queue, add, remove, clear, first, last, size } = useQueue([1, 2, 3]);
|
|
605
|
+
*/
|
|
606
|
+
declare const useQueue: <Value>(initialValue?: Value[]) => UseQueueReturn<Value>;
|
|
607
|
+
|
|
520
608
|
/**
|
|
521
609
|
* @name useRenderCount
|
|
522
610
|
* @description - Hook returns count component render times
|
|
@@ -546,9 +634,12 @@ interface UseRerenderReturns {
|
|
|
546
634
|
*/
|
|
547
635
|
declare const useRerender: () => UseRerenderReturns;
|
|
548
636
|
|
|
637
|
+
/** The use script status */
|
|
549
638
|
type UseScriptStatus = 'loading' | 'ready' | 'error' | 'unknown';
|
|
550
639
|
declare const SCRIPT_STATUS_ATTRIBUTE_NAME = "script-status";
|
|
640
|
+
/** The use script options extends from attributes script tag */
|
|
551
641
|
interface UseScriptOptions extends React.ComponentProps<'script'> {
|
|
642
|
+
/** Whether to remove the script on unmount */
|
|
552
643
|
removeOnUnmount?: boolean;
|
|
553
644
|
}
|
|
554
645
|
/**
|
|
@@ -578,7 +669,7 @@ declare const useScript: (src: string, options?: UseScriptOptions) => UseScriptS
|
|
|
578
669
|
* @example
|
|
579
670
|
* const [value, setValue, removeValue] = useSessionStorage('key', 'value');
|
|
580
671
|
*/
|
|
581
|
-
declare const useSessionStorage: <Value>(key: string, initialValue?: UseStorageInitialValue<Value>, options?: UseStorageOptions<Value>) => readonly [Value, (value: Value) => void, () => void];
|
|
672
|
+
declare const useSessionStorage: <Value>(key: string, initialValue?: UseStorageInitialValue<Value>, options?: UseStorageOptions<Value>) => readonly [Value | undefined, (value: Value) => void, () => void];
|
|
582
673
|
|
|
583
674
|
/**
|
|
584
675
|
* @name useSet
|
|
@@ -734,4 +825,4 @@ declare const useWindowSize: (params?: UseWindowSizeParams) => {
|
|
|
734
825
|
height: number;
|
|
735
826
|
};
|
|
736
827
|
|
|
737
|
-
export { type ConnectionEffectiveType, type ConnectionType, type OperatingSystem, SCRIPT_STATUS_ATTRIBUTE_NAME, type UseClickOutside, type UseClickOutsideReturn, type UseCounter, type UseCounterOptions, type UseCounterParams, type UseCounterReturn, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEventListenerTarget, type UseFaviconOptions, type UseFaviconReturn, type UseHover, type UseHoverOptions, type UseHoverReturn, type UseHoverTarget, type UseIdleReturn, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseNetworkReturn, type UseOrientationReturn, type UseScriptOptions, type UseScriptStatus, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseToggleReturn, type UseWindowSizeReturn, dispatchStorageEvent, getConnection, getOperatingSystem, legacyCopyToClipboard, useBattery, useBoolean, useClickOutside, useCopyToClipboard, useCounter, useDebouncedValue, useDefault, useDidUpdate, useDocumentTitle, useDocumentVisibility, useEventListener, useFavicon, useHash, useHover, useIdle, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeysPressed, useLocalStorage, useLogger, useMediaQuery, useMount, useNetwork, useOnline, useOperatingSystem, useOrientation, usePrevious, useRenderCount, useRerender, useScript, useSessionStorage, useSet, useStep, useStorage, useTimeout, useToggle, useUnmount, useWindowEvent, useWindowSize };
|
|
828
|
+
export { type ConnectionEffectiveType, type ConnectionType, type OperatingSystem, SCRIPT_STATUS_ATTRIBUTE_NAME, type UseClickOutside, type UseClickOutsideReturn, type UseCounter, type UseCounterOptions, type UseCounterParams, type UseCounterReturn, type UseDocumentTitleOptions, type UseDocumentTitleReturn, type UseEventListener, type UseEventListenerOptions, type UseEventListenerReturn, type UseEventListenerTarget, type UseFaviconOptions, type UseFaviconReturn, type UseHover, type UseHoverOptions, type UseHoverReturn, type UseHoverTarget, type UseIdleReturn, type UseIntersectionObserver, type UseIntersectionObserverOptions, type UseIntersectionObserverReturn, type UseIntersectionObserverTarget, type UseKeyPressEvent, type UseKeyPressEventKey, type UseKeyPressKey, type UseKeyPressOptions, type UseNetworkReturn, type UseOrientationReturn, type UseQueueReturn, type UseScriptOptions, type UseScriptStatus, type UseStorageInitialValue, type UseStorageOptions, type UseStorageReturn, type UseToggleReturn, type UseWindowSizeReturn, dispatchStorageEvent, getConnection, getOperatingSystem, isHotkeyMatch, legacyCopyToClipboard, useBattery, useBoolean, useClickOutside, useCopyToClipboard, useCounter, useDebouncedValue, useDefault, useDidUpdate, useDocumentTitle, useDocumentVisibility, useEvent, useEventListener, useFavicon, useHash, useHotkeys, useHover, useIdle, useIntersectionObserver, useIsomorphicLayoutEffect, useKeyPress, useKeyPressEvent, useKeysPressed, useLocalStorage, useLogger, useMediaQuery, useMount, useNetwork, useOnline, useOperatingSystem, useOrientation, usePrevious, useQueue, useRenderCount, useRerender, useScript, useSessionStorage, useSet, useStep, useStorage, useTimeout, useToggle, useUnmount, useWindowEvent, useWindowSize };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siberiacancode/reactuse",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Ultimate tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"module": "dist/esm/index.js",
|
|
33
33
|
"types": "dist/index.d.ts",
|
|
34
34
|
"scripts": {
|
|
35
|
+
"prepublishOnly": "yarn type && yarn unit-test run && yarn build",
|
|
35
36
|
"build": "shx rm -rf dist && rollup -c --bundleConfigAsCjs",
|
|
36
37
|
"lint": "eslint . --ext ts --ext tsx --no-error-on-unmatched-pattern --fix",
|
|
37
38
|
"format": "prettier --write **/*.{ts,jsm,md}",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers-Db0KR1gW.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_rollupPluginBabelHelpers-Cg3Jntln.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|