import { type GestureResponderEvent } from "react-native"; import { type StyleProp, type ViewStyle } from "../../style/index.js"; import { type CalendarSkin } from "./calendar.styles.js"; /** Fluid month cell (pure, tested): the skin's preferred cell, shrunk so seven * fit the measured container (32px floor), or kept as-is while unmeasured or * when the container fits. Converges: the grid re-lays-out at 7*cell, which is * never wider than the measurement that produced it. */ export declare function monthCellSize(preferred: number, measuredWidth: number, chrome: number): number; export interface CalendarEvent { /** Day of month the event falls on (1-based). */ day: number; /** Title shown on the event block in the week/day timelines and read to assistive tech. */ title?: string; /** Start hour, 0-24; fractions are minutes (9.5 = 9:30). Untimed events (no start) mark the day with a dot but stay out of the timelines. */ start?: number; /** End hour, 0-24; defaults to one hour after `start`. */ end?: number; /** Longer detail shown in the day peek's hover card when a pointer hovers the event block. */ description?: string; } export interface CalendarProps { /** Month + year label shown in the header, e.g. "June 2026". */ month?: string; /** The day number currently selected (CONTROLLED, primary highlight). Omit for uncontrolled use. */ selected?: number; /** Initial selected day for uncontrolled use (a bare calendar highlights the day on press). */ defaultSelected?: number; /** The day number that is today (primary highlight when unselected). */ today?: number; /** Number of days in the month. */ daysInMonth?: number; /** Weekday (0=Sun .. 6=Sat) the 1st falls on; sets leading blank cells. */ startWeekday?: number; /** Events to mark: dots on their days in the month grid and week strip, timed blocks in the week/day timelines. */ events?: CalendarEvent[]; /** Fired with the day number when a day cell is pressed (and when week/day chevron paging moves the selection). */ onSelect?: (day: number) => void; /** Fired with the event when a timed block in the week/day timeline is pressed. */ onEventPress?: (event: CalendarEvent) => void; /** Fired when the previous chevron is pressed in the month view, or when week/day paging would cross into the previous month. */ onPrev?: (event: GestureResponderEvent) => void; /** Fired when the next chevron is pressed in the month view, or when week/day paging would cross into the next month. */ onNext?: (event: GestureResponderEvent) => void; /** Seven-day strip over an hour timeline; chevrons page by week. */ week?: boolean; /** Single-day hour timeline; chevrons page by day. */ day?: boolean; /** Month view: pressing a day that has events also opens that day's hour timeline in an anchored overlay (a tooltip-style day peek) beside the cell — to its right, to its left when the right lacks room, and below it when neither side fits — dismissed by an outside tap or Escape. */ dayPeek?: boolean; /** Month view: two-tap range selection — the first press sets the start day, the second (later) press the end; a press before the start restarts. Days between carry a tinted band. */ range?: boolean; /** The range's start day (CONTROLLED with `rangeEnd`). Omit both for uncontrolled use. */ rangeStart?: number; /** The range's end day (CONTROLLED with `rangeStart`). */ rangeEnd?: number; /** Initial range start for uncontrolled use. */ defaultRangeStart?: number; /** Initial range end for uncontrolled use. */ defaultRangeEnd?: number; /** Fired as the range is picked: with (start, undefined) after the first press, (start, end) after the second. */ onRangeChange?: (start?: number, end?: number) => void; /** First hour of the week/day timeline (0-24; default 0, the full day). */ startHour?: number; /** Last hour of the week/day timeline (0-24; default 24). The scroller initially windows 8 AM–5 PM and scrolls to the rest. */ endHour?: number; /** Timeline labels in 24-hour format (CONTROLLED). Omit to let the built-in 12h/24h toggle manage it. */ hour24?: boolean; /** Initial hour format for uncontrolled use (default false = 12-hour AM/PM). */ defaultHour24?: boolean; /** Fired when the hour format changes (true = 24-hour). */ onHour24Change?: (hour24: boolean) => void; /** Tighter cells and smaller type, for dense surfaces. */ compact?: boolean; /** E2E hook forwarded to the root element. */ testID?: string; /** Outer layout composition only (width/flex within a parent), never a restyle hook. */ style?: StyleProp; } /** Build a Calendar component from a platform skin. */ export declare function createCalendar(skin: CalendarSkin): (props: CalendarProps) => import("react").JSX.Element; //# sourceMappingURL=calendar.shared.d.ts.map