49 lines
788 B
TypeScript
49 lines
788 B
TypeScript
|
export interface MouseState {
|
||
|
clicked?: boolean
|
||
|
dragging?: boolean
|
||
|
resizing?: boolean
|
||
|
coordsInWrapper?: {
|
||
|
mouseX: number
|
||
|
mouseY: number
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export interface PdfFile {
|
||
|
file: File,
|
||
|
pages: PdfPage[]
|
||
|
expanded?: boolean
|
||
|
}
|
||
|
|
||
|
export interface PdfPage {
|
||
|
image: string
|
||
|
drawnFields: DrawnField[]
|
||
|
}
|
||
|
|
||
|
export interface DrawnField {
|
||
|
left: number
|
||
|
top: number
|
||
|
width: number
|
||
|
height: number
|
||
|
type: MarkType
|
||
|
/**
|
||
|
* npub of a counter part
|
||
|
*/
|
||
|
counterpart: string
|
||
|
}
|
||
|
|
||
|
export interface DrawTool {
|
||
|
identifier: MarkType
|
||
|
label: string
|
||
|
icon: JSX.Element,
|
||
|
defaultValue?: string
|
||
|
selected?: boolean
|
||
|
active?: boolean
|
||
|
}
|
||
|
|
||
|
export enum MarkType {
|
||
|
SIGNATURE = 'SIGNATURE',
|
||
|
JOBTITLE = 'JOBTITLE',
|
||
|
FULLNAME = 'FULLNAME',
|
||
|
DATE = 'DATE',
|
||
|
DATETIME = 'DATETIME'
|
||
|
}
|