import type { BadgeMetrics, ChartInsets, LiveChartPoint } from "../types"; export { BADGE_DOT_GAP, BADGE_MARGIN_RIGHT, BADGE_PILL_PAD_X, BADGE_PILL_PAD_Y, BADGE_TAIL_LEN, } from "../constants"; export interface ChartPadding { top: number; right: number; bottom: number; left: number; } export declare const DEFAULT_PADDING: ChartPadding; /** * Combined tail + rounded-cap offset. * The pill body starts `tl` px to the right of the gutter left edge (= dot x), * so the tail spans the gap between the dot and the pill body. * * When `showTail` is false there is no tail geometry at all, so the pill body * starts flush at the gutter left edge (+ dotGap) and no cap inset is reserved. */ export declare function badgeTailAndCap(fontSize: number, showTail?: boolean, badge?: BadgeMetrics): number; /** * Text left-edge X so the label is horizontally centered in the badge pill. * Uses the ASYMMETRIC layout: tail gap (`tl`) on the left, `BADGE_MARGIN_RIGHT` on * the right. Both `useBadge` and `GridOverlay` (when badge is shown) call this so * the badge text and y-axis labels share the exact same horizontal position. * * Layout: |dot| tl |PAD_X| text |PAD_X| BADGE_MARGIN_RIGHT |canvas edge * ↑ same x for grid labels and badge text */ export declare function pillTextLeftX(canvasWidth: number, paddingRight: number, tl: number, textWidth: number, badge?: BadgeMetrics): number; /** * Symmetric gutter centering — used for y-axis labels when badge is NOT shown. * When badge IS shown, use `pillTextLeftX` instead so labels align with badge text. */ export declare function gutterCenteredTextLeftX(canvasWidth: number, paddingRight: number, textWidth: number): number; /** * Right-aligned text positioning — used for y-axis labels when inline series * labels occupy the left portion of the right gutter. */ export declare function gutterRightAlignedTextLeftX(canvasWidth: number, textWidth: number, rightMargin?: number): number; /** * Minimum `padding.right` for the badge gutter. * * Layout: |dot| BADGE_DOT_GAP | tl | PAD_X | text | PAD_X | BADGE_MARGIN_RIGHT |canvas edge */ export declare function minPaddingRightForBadgeYAxisAlign(fontSize: number, textWidth: number, showTail?: boolean, badge?: BadgeMetrics): number; /** Auto-right-padding: badge needs space for the pill, y-axis labels need less. */ export declare function resolveAutoRight(yAxis: boolean, badge: boolean, showTail?: boolean, badgeMetrics?: BadgeMetrics): number; /** * Minimum `padding.left` for a badge pill drawn in the left chart margin (label width + horizontal padding + dot gap). * `resolveChartLayout` does not call this; it remains available for custom layouts or `resolvePadding(..., badgeOnLeft: true)`. */ export declare function minPaddingLeftForBadge(textWidth: number, badge?: BadgeMetrics): number; /** Default left inset, or a wider inset when `badgeOnLeft` is true (see `minPaddingLeftForBadge`). */ export declare function resolveAutoLeft(badgeOnLeft: boolean, badgeMetrics?: BadgeMetrics): number; /** * Minimum inset from the canvas edge so the live-dot pulse ring is not clipped. * Matches `DotOverlay`: circle radius up to `maxRadius` with a centered stroke. * * Used by `resolveChartLayout` when `pulse` is set; keep in sync with `DotOverlay` pulse rendering. * * @see `resolveChartLayout` in `hooks/resolveChartLayout.ts` * @see `DotOverlay` in `components/DotOverlay.tsx` */ export declare function pulseRadialOutset(maxRadius: number, strokeWidth: number): number; /** * Conservative canvas footprint for a blurred live-dot glow. Two blur radii * retain the visible low-opacity falloff without over-inflating chart gutters. * Keep this in sync with the `Circle` + `BlurMask` rendering in the dot overlays. */ export declare function dotGlowRadialOutset(radius: number, blur: number): number; /** * Minimum `padding.right` when the live dot (and pulse) sit on the inner edge of the * right gutter and y-axis labels are centered in that gutter (`gutterCenteredTextLeftX`). * Otherwise the pulse can overlap labels to the right of the dot. */ export declare function minPaddingRightForYAxisWithPulse(pulseOutlet: number, yAxisLabelTextWidth: number, gap?: number): number; export declare function resolvePadding(override?: ChartInsets, yAxis?: boolean, badge?: boolean, badgeOnLeft?: boolean, xAxis?: boolean, showTail?: boolean, badgeMetrics?: BadgeMetrics): ChartPadding; /** * Build screen-space points as a flat number array [x0, y0, x1, y1, ...]. * Includes one point before the window for smooth left-edge entry, * and appends a live tip at (now, displayValue). * * Flat layout avoids ~150 tuple object allocations per frame. * * Pass `out` to reuse a persistent array instead of allocating a fresh one each * frame (it is cleared and refilled). The per-frame allocation otherwise scales * with the visible point count, so pooling it cuts UI-thread GC pressure on * busy / wide-window charts. Callers that pool `out` must ping-pong two buffers * so the returned reference still changes each frame (Reanimated's value-equality * check skips notifying subscribers when the reference is unchanged). */ export declare function buildLinePoints(data: LiveChartPoint[], displayValue: number, now: number, windowSecs: number, displayMin: number, displayMax: number, canvasWidth: number, canvasHeight: number, padding: ChartPadding, out?: number[], omitTipBeyondData?: boolean): number[]; //# sourceMappingURL=line.d.ts.map