import { $Values } from 'utility-types' ; internal export const ON_DOM_ELEMENT_ENTER = 'ON_DOM_ELEMENT_ENTER' ; internal export const ON_DOM_ELEMENT_LEAVE = 'ON_DOM_ELEMENT_LEAVE' ; internal export const ON_DOM_ELEMENT_CLICK = 'ON_DOM_ELEMENT_CLICK' ; internal export const DOMElementType = Object . freeze ( { LineAnnotationMarker : 'LineAnnotationMarker' as const , } ) ; internal export type DOMElementType = $Values < typeof DOMElementType > ; internal export interface DOMElement { type : DOMElementType ; id : string ; createdBySpecId : string ; datum : unknown ; } interface DOMElementEnterAction { type : typeof ON_DOM_ELEMENT_ENTER ; element : DOMElement ; } interface DOMElementLeaveAction { type : typeof ON_DOM_ELEMENT_LEAVE ; } interface DOMElementClickAction { type : typeof ON_DOM_ELEMENT_CLICK ; } internal export function onDOMElementLeave ( ) { return { type : ON_DOM_ELEMENT_LEAVE } ; } internal export function onDOMElementEnter ( element ) { return { type : ON_DOM_ELEMENT_ENTER , element } ; } internal export function onDOMElementClick ( ) { return { type : ON_DOM_ELEMENT_CLICK } ; } internal export type DOMElementActions = DOMElementEnterAction | DOMElementLeaveAction ;