sigit.io/src/types/drawing.ts

57 lines
975 B
TypeScript
Raw Normal View History

export interface MouseState {
clicked?: boolean
dragging?: boolean
resizing?: boolean
coordsInWrapper?: {
mouseX: number
mouseY: number
}
}
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 {
2024-08-19 18:05:14 +02:00
TEXT = 'TEXT',
SIGNATURE = 'SIGNATURE',
JOBTITLE = 'JOBTITLE',
FULLNAME = 'FULLNAME',
2024-08-19 18:05:14 +02:00
INITIALS = 'INITIALS',
DATETIME = 'DATETIME',
DATE = 'DATE',
2024-08-19 18:05:14 +02:00
NUMBER = 'NUMBER',
IMAGES = 'IMAGES',
CHECKBOX = 'CHECKBOX',
MULTIPLE = 'MULTIPLE',
FILE = 'FILE',
RADIO = 'RADIO',
SELECT = 'SELECT',
CELLS = 'CELLS',
STAMP = 'STAMP',
PAYMENT = 'PAYMENT',
PHONE = 'PHONE'
}