import type { AROverlay } from '../stitching/AROverlay'; /** * The imperative overlay methods exposed on both `` and * `` refs. Identical shape on both so a host can swap components * without rewriting overlay code. */ export interface AROverlayMethods { /** Replace the entire JS-set overlay collection. */ setOverlays: (overlays: AROverlay[]) => void; /** Add one overlay (replaces any existing overlay with the same `id`). */ addOverlay: (overlay: AROverlay) => void; /** * Shallow-merge a patch into the overlay with `id`. No-op if no overlay * with that `id` is currently set. */ updateOverlay: (id: string, patch: Partial) => void; /** Remove the overlay with `id` (no-op if absent). */ removeOverlay: (id: string) => void; /** Remove all JS-set overlays. */ clearOverlays: () => void; /** * Raycast from the screen centre (the crosshair) to the first real-world * surface and resolve its world position `[x, y, z]` in metres (ARKit/ARCore * world frame), or `null` when nothing is hit (e.g. a featureless wall before * any plane is detected). Use it to place an overlay ON the aimed surface at * the real distance — pass the result as a `worldPosition` to * {@link setOverlays} / {@link addOverlay} — instead of guessing a distance. * Resolves `null` (never throws) when the native module / method is absent. */ raycast: () => Promise<[number, number, number] | null>; } /** The `RNSARSession` native-module method name overlays dispatch through. */ export declare const AR_OVERLAY_SET_METHOD: "setOverlays"; /** * The agreed UIManager view-command name for native sides that drive overlays * via per-view command dispatch instead of the module method. The JS layer * dispatches through the module method (there's only one AR view), but the * name is pinned here so the native side can match if it chooses commands. */ export declare const AR_OVERLAY_VIEW_COMMAND: "RNSARCameraViewOverlays"; /** * Build an overlay controller backed by an in-memory ordered set keyed by * `id`. Every mutating call resolves the new full array and pushes it to * native via `RNSARSession.setOverlays`. The controller is the single source * of truth for BOTH the imperative ref methods and the declarative `overlays` * prop (the prop's effect calls `setOverlays` with the prop value). */ export declare function createAROverlayController(): AROverlayMethods & { /** Current JS-set overlays in insertion order (used by tests / diffing). */ getOverlays: () => AROverlay[]; }; //# sourceMappingURL=arOverlayController.d.ts.map