import { type SkFont } from "@shopify/react-native-skia"; import { type SharedValue } from "react-native-reanimated"; import type { ChartEngineLayout } from "../core/useLiveChartEngine"; import type { YAxisEntry } from "../draw/grid"; import type { ChartPadding } from "../draw/line"; import type { FontConfig, LiveChartPalette, ReferenceLine } from "../types"; /** * Renders one reference line or band into the chart canvas. Handles all four * `ReferenceLine` forms (horizontal line, time-varying line, horizontal value * band, vertical time band) plus the Form-A pill badge (in-range tag + * off-screen chevron pin). * Self-contained so callers can `.map()` over a variable-length array. */ type ReferenceLineOverlayProps = { engine: ChartEngineLayout; padding: ChartPadding; line: ReferenceLine; palette: LiveChartPalette; formatValue: (v: number) => string; font: SkFont; /** * The chart's raw font config — used to build a per-badge font when the line's * {@link ReferenceLineBadgeConfig} sets `fontSize` / `fontFamily` / `fontWeight`. * When no badge font knob is set, the resolved `font` is used as-is. */ fontProp?: FontConfig; /** * Render only the badge + label (`true`) or only the lines / bands (`false`, * default). The caller draws the base pass behind the chart content and the * badge pass **above** the left-edge fade, so badges/labels stay crisp instead * of being erased by the fade's `dstOut` blend. */ badgeLayer?: boolean; /** * Suppress the built-in tag (badge pill + chevron + icon + gutter label) for * this line — used when a custom `renderReferenceLine` element owns the tag. * The line / band stroke and a badged line's dashed connector still draw. No * effect on the base pass. */ suppressTag?: boolean; /** * Suppress the built-in tag only while the line is off-axis. Used by * `renderOffAxisReferenceLine`, so the normal in-range tag remains intact. */ suppressTagWhenOffAxis?: boolean; /** * Measured widths of custom reference-line tags, index-aligned with their * `referenceLines`. When present for a suppressed badged tag, the built-in * connector begins after the custom element instead of the hidden Skia pill. */ customTagWidths?: SharedValue; /** * Per-frame grouping flags (index-aligned): when this line's slot is `true` it's * collapsed into a group count handle, so its tag is suppressed (the line / band * stroke still draws). */ groupHidden?: SharedValue; /** Per-line live value overrides (dragged values), index-aligned with `referenceLines`. */ dragValues?: SharedValue; /** This line's index into {@link dragValues}. */ index?: number; /** Y-axis entries used to match a right-anchored grid endpoint. */ yAxisEntries?: SharedValue | null; /** Enables clipping to the right-anchored Y-axis label column. */ labelRightMargin?: number; /** Gap between the drawn line endpoint and the label column. */ gridEndGap?: number; }; /** * Dispatch to the series or scalar/band renderer without mixing their hook * lifecycles. A stable `id` may therefore switch forms safely across renders. */ export declare function ReferenceLineOverlay(props: ReferenceLineOverlayProps): import("react").JSX.Element; export {}; //# sourceMappingURL=ReferenceLineOverlay.d.ts.map