@hrnec06/react_utils 1.1.0 → 1.2.1

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/index.d.ts DELETED
@@ -1,40 +0,0 @@
1
- import { DependencyList } from 'react';
2
- import { Vector2, ReactUtils } from '@hrnec06/util';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
-
5
- interface KeyListenerOptions {
6
- ctrl?: boolean;
7
- shift?: boolean;
8
- alt?: boolean;
9
- }
10
- declare function useKeyListener(key: string, options?: KeyListenerOptions): boolean;
11
-
12
- declare function useListener<E extends keyof GlobalEventHandlersEventMap>(element: Node, event: E, listener: (event: GlobalEventHandlersEventMap[E]) => void, deps?: DependencyList): void;
13
-
14
- declare function useUpdatedRef<V>(value: V): React.RefObject<V>;
15
-
16
- declare function useUpdateEffect(callback: React.EffectCallback, value: unknown[]): void;
17
-
18
- declare function useWindowSize(): Vector2;
19
-
20
- declare function useSignal<T>(value: T): Signal<T>;
21
- declare class Signal<T> {
22
- private _value;
23
- private setState;
24
- constructor(_value: T, setState: ReactUtils.SetState<T>);
25
- set value(value: T);
26
- get value(): T;
27
- }
28
-
29
- interface DebugProps {
30
- value: unknown;
31
- openPaths?: string[];
32
- excludePaths?: string[];
33
- size?: 'normal' | 'big' | 'tiny';
34
- compactArrays?: number;
35
- autoHeight?: boolean;
36
- openRoot?: boolean;
37
- }
38
- declare function Debug({ value, openPaths, excludePaths, size, compactArrays, autoHeight, openRoot }: DebugProps): react_jsx_runtime.JSX.Element;
39
-
40
- export { Debug as Debugger, useKeyListener, useListener, useSignal, useUpdateEffect, useUpdatedRef, useWindowSize };