Files
wanderer/assets/js/hooks/Mapper/events/index.ts
Dmitry Popov cb41a33546 Custom signatures (#37)
* feat(signatures): Add custom info to system signatures

* feat(connections): Add custom info to system connections

* feat(Map): Add system signature type

* feat(Map): Update wormhole types info

* feat(Map): Add undo action for removed systems

* feat(Map): Delete systems on Backspace hotkey

* feat(Map): Update k-space systems background & styles

* feat(Map): Update systems status background styles

* feat(Map): add support for new wh type data. add signatures settings modal menu; reworked signatures widget - was added info of wormhole;

---------

Co-authored-by: achichenkov <aleksei.chichenkov@telleqt.ai>
2024-10-24 13:10:17 +04:00

13 lines
351 B
TypeScript

import { createEvent } from 'react-event-hook';
import { Command, CommandData } from '@/hooks/Mapper/types/mapHandlers.ts';
export interface MapEvent<T extends Command> {
name: T;
data: CommandData[T];
}
const { useMapEventListener, emitMapEvent } = createEvent('map-event')<MapEvent<Command>>();
export { useMapEventListener, emitMapEvent };