@almadar/ui 3.1.3 → 3.1.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useEventBus } from "./useEventBus";
|
|
2
|
+
import type { EventPayload } from "@almadar/core";
|
|
2
3
|
/**
|
|
3
4
|
* Hook to bridge UI events to state machine dispatch
|
|
4
5
|
*
|
|
@@ -6,7 +7,7 @@ import { useEventBus } from "./useEventBus";
|
|
|
6
7
|
* @param validEvents - Optional array of valid event names (filters which events to handle)
|
|
7
8
|
* @param eventBusInstance - Optional event bus instance (for testing, uses hook if not provided)
|
|
8
9
|
*/
|
|
9
|
-
export declare function useUIEvents<E extends string>(dispatch: (event: E, payload?:
|
|
10
|
+
export declare function useUIEvents<E extends string>(dispatch: (event: E, payload?: EventPayload) => void, validEvents?: readonly E[], eventBusInstance?: ReturnType<typeof useEventBus>): void;
|
|
10
11
|
/**
|
|
11
12
|
* Hook for selected entity tracking
|
|
12
13
|
* Many list UIs need to track which item is selected.
|