@nemigo/helpers 0.11.2 → 0.11.4
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/html.d.ts +3 -2
- package/package.json +1 -1
package/dist/html.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare const preventStopHook: <T extends Event = Event>(call?: CanBeNull
|
|
|
37
37
|
* @param usePreventStop - Условие для вызова {@link preventStop}
|
|
38
38
|
* @param condition - Условие для вызова основного коллбэка
|
|
39
39
|
*/
|
|
40
|
-
export declare const enterKeyHook: <T extends
|
|
40
|
+
export declare const enterKeyHook: <T extends KeyboardEvent = KeyboardEvent>(call?: CanBeNullable<(e: T) => CanBePromise>, { onkeydown, usePreventStop, condition, }?: {
|
|
41
41
|
onkeydown?: (e: T) => void;
|
|
42
42
|
usePreventStop?: "enter" | unknown | ((e: T, isEnter: boolean) => unknown);
|
|
43
43
|
condition?: ((e: T) => unknown) | unknown;
|
|
@@ -56,6 +56,7 @@ export type TargetKeyboardEvent<N extends HTMLElement = HTMLDivElement> = Target
|
|
|
56
56
|
* Проверяет, является ли событие клавиатурным.
|
|
57
57
|
*/
|
|
58
58
|
export declare const isKeyboardEvent: (e: any) => e is KeyboardEvent;
|
|
59
|
+
export type MouseBoardEvent = MouseEvent | TargetKeyboardEvent;
|
|
59
60
|
/**
|
|
60
61
|
* Создаёт обработчик контекстного меню.
|
|
61
62
|
*
|
|
@@ -75,7 +76,7 @@ export declare const ctxMenuHook: <N extends HTMLElement = HTMLDivElement>(call:
|
|
|
75
76
|
} | {
|
|
76
77
|
isKeyboardEvent: false;
|
|
77
78
|
event: MouseEvent;
|
|
78
|
-
}) => void) => (e: TargetKeyboardEvent<N>
|
|
79
|
+
}) => void) => (e: MouseEvent | TargetKeyboardEvent<N>) => void;
|
|
79
80
|
/**
|
|
80
81
|
* Создаёт слушатель события на указанном элементе.
|
|
81
82
|
*
|