/** * FocusHighlightContext * * Provides focus highlight state to components without requiring config recreation. * This context allows the focusMap to change without recreating Puck config, * which prevents flickering during collaborative editing. */ import React from 'react'; import type { FocusHighlight } from '../collaboration/utils/focusRegionMap.js'; /** * Context value for focus highlighting. */ export interface FocusHighlightContextValue { /** Map of component IDs to their focus highlight info */ focusMap: Map; } /** * Context for providing focus highlight state to wrapped components. */ export declare const FocusHighlightContext: React.Context; /** * Props for FocusHighlightProvider. */ export interface FocusHighlightProviderProps { /** Map of component IDs to their focus highlight info */ focusMap: Map; /** Child components */ children: React.ReactNode; } /** * Provider for focus highlight context. * Wrap your Puck editor with this to enable focus highlighting without config recreation. * * @example * ```tsx * const focusMap = createFocusRegionMap(data, otherActors); * * * * * ``` */ export declare function FocusHighlightProvider({ focusMap, children, }: FocusHighlightProviderProps): React.ReactElement; /** * Hook to access focus highlight context. * Returns null if not within a FocusHighlightProvider. */ export declare function useFocusHighlight(): FocusHighlightContextValue | null; /** * Hook to get focus highlight for a specific component ID. * Returns undefined if the component has no focus highlight. */ export declare function useFocusHighlightForComponent(id: string): FocusHighlight | undefined;