2024-07-11 16:16:36 +02:00
|
|
|
export interface MouseState {
|
|
|
|
clicked?: boolean
|
|
|
|
dragging?: boolean
|
|
|
|
resizing?: boolean
|
|
|
|
coordsInWrapper?: {
|
|
|
|
mouseX: number
|
|
|
|
mouseY: number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface PdfFile {
|
2024-08-06 17:53:55 +02:00
|
|
|
file: File
|
2024-07-11 16:16:36 +02:00
|
|
|
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
|
2024-08-06 17:53:55 +02:00
|
|
|
icon: JSX.Element
|
2024-07-11 16:16:36 +02:00
|
|
|
defaultValue?: string
|
|
|
|
selected?: boolean
|
|
|
|
active?: boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum MarkType {
|
|
|
|
SIGNATURE = 'SIGNATURE',
|
|
|
|
JOBTITLE = 'JOBTITLE',
|
|
|
|
FULLNAME = 'FULLNAME',
|
|
|
|
DATE = 'DATE',
|
|
|
|
DATETIME = 'DATETIME'
|
2024-08-06 17:53:55 +02:00
|
|
|
}
|