import type { Marker, MarkerData } from '@edgepdf/types'; import type { CreateMarkerOptions } from '@edgepdf/viewer-js'; /** * Return type for useMarkers hook */ export interface UseMarkersReturn { /** Current markers */ markers: Marker[]; /** Add a new marker */ addMarker: (options: CreateMarkerOptions) => Marker | null; /** Remove a marker by ID */ removeMarker: (id: string) => boolean; /** Update a marker */ updateMarker: (id: string, updates: Partial) => boolean; /** Get a marker by ID */ getMarker: (id: string) => Marker | null; /** Get all markers */ getAllMarkers: () => Marker[]; /** Export markers as JSON */ exportMarkers: () => MarkerData; /** Import markers from JSON */ importMarkers: (data: MarkerData) => boolean; /** Clear all markers */ clearMarkers: () => void; /** Focus on a marker by panning and zooming to its position */ focusMarker: (markerOrId: string | Marker, options?: { zoom?: number; animate?: boolean; duration?: number; offsetLeft?: number; offsetRight?: number; offsetTop?: number; offsetBottom?: number; }) => boolean; } /** * Hook to manage markers in the viewer * * Provides functions to add, remove, update, and manage markers. * * @returns Marker management functions and current markers * * @example * ```tsx * function MarkerControls() { * const { markers, addMarker, removeMarker } = useMarkers(); * * const handleAddMarker = () => { * addMarker({ * position: [100, 200], * x: 100, * y: 200, * zoom: 1, * label: 'New Marker' * }); * }; * * return ( *
* * {markers.map(marker => ( *
* {marker.label} * *
* ))} *
* ); * } * ``` */ export declare function useMarkers(): UseMarkersReturn; //# sourceMappingURL=use-markers.d.ts.map