import type { PointGroup } from 'signature_pad';
export interface SignatureConfirmPayload {
/** Data URL of the captured signature rendered as PNG. */
png: string;
/** SVG string trimmed to the stroke bounding box. */
svg: string;
/** Physical width in millimetres, derived from CSS px. */
widthMm: number;
/** Physical height in millimetres, derived from CSS px. */
heightMm: number;
/** ISO-8601 UTC timestamp for when `confirm()` resolved. */
capturedAt: string;
/** Hex-encoded SHA-256 digest of the PNG bytes. */
sha256: string;
/** Raw stroke data from `signature_pad.toData()` — optional for replays. */
strokes?: PointGroup[];
}
export interface SignatureCaptureProps {
/** Opaque instance id — emitted as `data-component-id` for the agent registry. */
id?: string;
/** Called with the export payload when the user confirms the signature. */
onConfirm?: (payload: SignatureConfirmPayload) => void;
/** Called after the pad is cleared (explicit user action). */
onClear?: () => void;
/** Called when the user starts drawing a new stroke. */
onStart?: () => void;
/** CSS width of the pad. Default 400. */
width?: number | string;
/** CSS height of the pad. Default 200. */
height?: number | string;
/** Pen colour override — defaults to `var(--foreground)`. */
penColor?: string;
/** Background override — defaults to `var(--background)`. */
backgroundColor?: string;
/** Show the typed-name fallback toggle. Default `true`. */
allowTypedFallback?: boolean;
/**
* When set, on confirm() the captured PNG data URL is written into a hidden
* `` so consumers can POST the signature declaratively.
* The PNG data URL satisfies the server's `data:image/png` prefix check.
* Default off.
*/
name?: string;
/** Disable the entire component. */
disabled?: boolean;
/** Accessible label for the pad region. */
ariaLabel?: string;
/** Extra class names on the wrapper. */
className?: string;
}
export interface SignatureCaptureHandle {
clear: () => void;
undo: () => void;
isEmpty: () => boolean;
confirm: () => Promise;
}
declare const wrapperVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
declare const actionButtonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
declare const confirmButtonVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
export declare const SignatureCapture: import("react").ForwardRefExoticComponent>;
export { wrapperVariants as signatureWrapperVariants, actionButtonVariants as signatureActionButtonVariants, confirmButtonVariants as signatureConfirmButtonVariants, };
//# sourceMappingURL=signature-capture.d.ts.map