/** * CaptureStatusOverlay — screen-level visual feedback for the * panorama capture lifecycle. * * Lives in the SDK because the existing shutter-button colour change * is hidden by the user's finger during a hold. An overlay above * the preview is the only reliable channel for "you ARE recording * right now" feedback. * * ┌──────────────────────────────────────────────────┐ * │ ● REC Hold steady, pan slowly… │ ← banner * ├──────────────────────────────────────────────────┤ * │ ┌──────────────────────────────────────────────┐ │ * │ │ │ │ * │ │ ⬛ red glow border │ │ * │ │ around the preview │ │ * │ │ │ │ * │ └──────────────────────────────────────────────┘ │ * └──────────────────────────────────────────────────┘ * * The component is intentionally pure-presentational: it takes a * `phase` prop and renders the matching UI. Recording vs stitching * vs idle is the host's source of truth — typically derived from * `useVideoCapture().state` and a local "isStitching" boolean. * * The overlay renders nothing in `idle` so the host can render it * unconditionally without conditional layout shifts. */ import React from 'react'; import { type StyleProp, type ViewStyle } from 'react-native'; import { type DeviceOrientation } from './useDeviceOrientation'; export type CaptureStatusPhase = 'idle' | 'recording' | 'stitching'; export interface CaptureStatusOverlayProps { /** * Current phase. `idle` renders nothing. `recording` shows the * REC banner + glowing border (GREEN normally, RED when `tooFast`). * `stitching` swaps to a neutral "Stitching..." banner with no border * (recording is over; UI cue should de-escalate). */ phase: CaptureStatusPhase; /** * Optional override for the recording-phase message. Defaults to * "Hold steady — pan slowly". Useful if the host wants direction * hints (e.g. "Pan down across the rack") for a specific audit * type. */ recordingMessage?: string; /** * v0.16 — speed feedback. When `false` (default) the recording banner + * border are GREEN ("your pace is fine"); when `true` they turn RED to * signal the pan is too fast. This consolidates the old always-red border * + separate amber "slow down" pill into one calm-by-default cue. */ tooFast?: boolean; /** * Optional override for the stitching-phase message. Defaults to * "Stitching panorama…". */ stitchingMessage?: string; /** * If set, the recording-phase banner shows a live countdown * ("REC 4s left") computed against this value. Set to the * shutter's `maxHoldMs` so the user can see how long they have * left before the auto-stop fires. Pair with a fresh value * each time recording starts so the timer resets per capture. * * `recordingStartedAt` is the timestamp (Date.now()) when the * recording phase began — required for the countdown math. */ countdownMs?: number; recordingStartedAt?: number; /** * Top inset to offset the banner below the status bar / notch. * Defaults to 0 — host apps using `react-native-safe-area-context` * should pass `insets.top` here so the banner doesn't disappear * behind the notch. */ topInset?: number; /** Outer style passthrough. */ style?: StyleProp; } export declare function CaptureStatusOverlay({ phase, recordingMessage, tooFast, stitchingMessage, countdownMs, recordingStartedAt, topInset, style, }: CaptureStatusOverlayProps): React.JSX.Element | null; /** * Compute the style placing the banner at user-perceived top-center * with text reading in the user's view direction. * * Approach: direct absolute positioning + percentage-translate self- * centering (works on the banner's own measured dimensions, so the * banner's text content can be any width). * * For each orientation, anchor the banner to the layout edge that * corresponds to user-perceived top: * * portrait → layout-top + horizontally centered + 0° * portrait-upside-down → layout-bottom + horizontally centered + 180° * landscape-left → layout-right + vertically centered + 90° * landscape-right → layout-left + vertically centered + -90° * * In landscape, the banner is rotated around its center so its text * (originally horizontal in layout) reads horizontally in the user's * view. The translateY('-50%') aligns the banner's center with the * layout's vertical center, which maps to user-horizontal-center * post-rotation. * * RN supports `'50%'` for absolute positions and percentage values in * translateX/Y since 0.70 — the percentage in a translate is relative * to the element's OWN dimensions, which is exactly what self- * centering an unknown-width element needs. */ export declare function bannerStyleForOrientation(orientation: DeviceOrientation, topInset: number, jsLandscape?: boolean): ViewStyle; //# sourceMappingURL=CaptureStatusOverlay.d.ts.map