import { type SkFont } from "@shopify/react-native-skia"; import { type SharedValue } from "react-native-reanimated"; import type { ResolvedScrubActionConfig } from "../core/resolveConfig"; import type { SingleEngineState } from "../core/useLiveChartEngine"; import { type ChartPadding } from "../draw/line"; import type { BadgeMetrics, CandleGap, CandlePoint, LiveChartPalette, ScrubActionPoint, ScrubPoint } from "../types"; import { type CrosshairState } from "./crosshairShared"; export type { CrosshairState, TooltipLayout } from "./crosshairShared"; export type { ScrubPoint }; export { computeCandleTooltipLayout, computeCrosshairOpacity, computeLineGapTooltipLayout, computeScrubTime, computeTooltipLayout, computeTooltipLayoutMulti, deriveCrosshairTooltipSingle, deriveScrubValueSingle, HIDDEN_TOOLTIP, } from "./crosshairShared"; export interface CrosshairChartOpts { mode: "line" | "candle"; candles?: SharedValue; liveCandle?: SharedValue; candleWidthSecs?: number; gaps?: CandleGap[]; bridgeNoTrades?: boolean; bridgeUnavailable?: boolean; bridgeUnknown?: boolean; } /** * Single-series crosshair + scrub. Use `useCrosshairSeries` for `LiveChartSeries`. */ export declare function useCrosshair(engine: SingleEngineState, padding: ChartPadding, _palette: LiveChartPalette, formatValue: (v: number) => string, formatTime: (t: number) => string, font: SkFont, enabled: boolean, onScrub?: (point: ScrubPoint | null) => void, chartOpts?: CrosshairChartOpts, /** Press-and-hold delay (ms) before scrubbing activates. 0 = immediate. */ panGestureDelay?: number, onGestureStart?: () => void, onGestureEnd?: () => void, /** Scrub-action ("order ticket") config; `null`/omitted disables lock mode. */ scrubAction?: ResolvedScrubActionConfig | null, onScrubAction?: (point: ScrubActionPoint) => void, /** Badge geometry (gutter margins / pad) for the action pill. */ badgeMetrics?: BadgeMetrics, /** * Worklet predicate: true when a tap at (x, y) lands on another interactive * overlay (a marker, or a pressable reference-line badge). The scrub-action tap * defers to it (no reticle placed) so that overlay's tap handler can act. * Omitted when nothing coexists. */ deferTapHit?: (x: number, y: number) => boolean, /** Where the tooltip pill sits relative to the scrub line. Default `"side"`. */ tooltipPlacement?: "side" | "top" | "bottom" | "point", /** Render the value row in the default tooltip. Default `true`. */ tooltipShowValue?: boolean, /** Render the time row in the default tooltip. Default `true`. */ tooltipShowTime?: boolean, /** Gap (px) between the tooltip and the plot edge it's pinned to. Default `8`. */ tooltipMargin?: number, /** * Height (px) of a bottom band to exclude from scrub recognition — the * axis-drag "grab the time ruler" strip, so a drag there scrolls instead of * scrubbing (and a vertical drag falls through to the parent). `0` = no * exclusion (the default; scrub covers the whole plot). */ scrubBottomExclude?: number, /** * True while the time-scroll pan owns the touch. The hold-to-scrub pan refuses * to activate while set, so a drag that already started scrolling can never * mature into a scrub (see `delayedPanGuard.shouldStartDelayedPan`). */ scrollActive?: SharedValue, /** * Reject plain-scrub starts beyond either horizontal plot edge and clamp * active drags to those bounds. Scrub-action behavior is unchanged. * Default `false`. */ clampToPlot?: boolean, /** * Candle mode: quantize the plain-scrub X to the hovered candle's center * before it enters `scrubX` (`scrub.snapToCandles`). No-op in line mode. * Default `false`. */ snapToCandles?: boolean): CrosshairState; //# sourceMappingURL=useCrosshair.d.ts.map