UNPKG

@innovatrics/dot-auto-capture-ui

Version:
31 lines (30 loc) 1.42 kB
import type { AppStateInstruction, BaseComponentsUiProps, CustomizationContextProps, HTMLElementWithProps, UiProps } from './common'; import type { CornerValues, CustomElement, DeepRequired, EyeGazeInstructionCode } from '../../../ui-common/src/types'; export * from './common'; declare global { namespace JSX { interface IntrinsicElements { 'x-dot-eye-gaze-liveness-ui': CustomElement<{ props: EyeGazeLivenessUiProps; }>; } } } export type EyeGazeInstructions = Record<EyeGazeInstructionCode, string>; type CustomizableInstructions = Omit<EyeGazeInstructions, 'mouth_score_too_high' | 'mouth_score_too_low'>; export type EyeGazeLivenessUiProps<I = CustomizableInstructions, SI = EyeGazeStateInstructions> = UiProps<I, SI> & Omit<BaseComponentsUiProps<string>, 'placeholder'> & { collectionPhasePlaceholder?: string; corners: Array<CornerValues>; }; type RequiredUiProps = DeepRequired<EyeGazeLivenessUiProps<EyeGazeInstructions>>; export type EyeGazeProps = CustomizationContextProps<RequiredUiProps> & { collectionPhasePlaceholder: string; }; export type HTMLEyeGazeLivenessUiElement = HTMLElementWithProps<EyeGazeLivenessUiProps>; export type EyeGazeStateInstructions = { done?: AppStateInstruction; loading?: AppStateInstruction; }; export type UiEyeGazeStateInstructions = { [key: string]: DeepRequired<AppStateInstruction>; };