export interface CalendarDay{ /** ISO `yyyy-mm-dd` date identity. Invalid dates and later duplicate dates are omitted; the * first valid occurrence owns counts, scale, paint, selection, focus, and events. */ date:string;value:number;}export interface CalendarCell{date:string;value:number; /** 0-based week column, counting from the grid's first (earliest-containing) anchor week — see `buildCalendarGrid()`'s `firstDayOfWeek` parameter. */ week:number; /** * Day-of-week position within the row, relative to `firstDayOfWeek`: 0 for * the anchor weekday itself, up to 6 for the day immediately before it. * With the default `firstDayOfWeek` of 0, this is the familiar 0 (Sunday) * .. 6 (Saturday) numbering, unchanged from before `firstDayOfWeek` existed. */ weekday:number;} /** Resource envelope for caller-owned calendar collections and their sparse date span. */ export declare const MAX_CALENDAR_INPUT_DAYS=10000;export declare const MAX_CALENDAR_WEEKS=530; /** Parses a `yyyy-mm-dd` string as UTC midnight, avoiding local-timezone day-boundary drift. */ export declare function parseIsoDate(iso:string):Date; /** * Lays `days` out onto a GitHub-style week grid, 7 rows deep. `days` need not * be sorted or contiguous; the grid spans from the earliest to the latest * date present, anchored at the `firstDayOfWeek`-weekday on/before the * earliest date (`firstDayOfWeek` is 0–6, Sunday-first by default — same * numbering as `CalendarCell.weekday`). With the default `firstDayOfWeek` of * 0, this is the Sunday on/before the earliest date, exactly as before this * parameter existed. * * An entry whose `date` doesn't parse to a valid calendar date (e.g. `''` or * `'2026-03'`) is dropped rather than included: `parseIsoDate` on a malformed * string yields an `Invalid Date` (`getTime()` is `NaN`), and letting that * single `NaN` reach the min/max below would poison `firstWeekStart` (and * therefore every cell's `week`) for the whole grid instead of just the bad * entry. Likewise, an entry whose `date` is numerically well-formed but * calendar-invalid (e.g. `'2026-02-30'`, which `Date.UTC` silently rolls * over into March) is dropped rather than silently renormalized — see * `isCalendarValid()`. * * `monthLabelText`, when it returns a string for a given `(jsMonth, year)`, overrides that * month's locale-derived label — mirrors calendar `data.weekdayLabelText`'s override-with- * fallback shape, letting month labels track the same locale signal (e.g. an app's own i18n * store) as every other localizable string on the component. Absent that override, `locale` * (typically the host's `effectiveLocale`) drives the default label the same way it drives * every other locale-derived string on the same canvas (weekday labels, formatted values) — * so a calendar's month and weekday labels never disagree on language. */ export declare function buildCalendarGrid(days:readonly CalendarDay[],firstDayOfWeek?:number,monthLabelText?:(jsMonth:number,year:number)=>string|undefined,locale?:string):{cells:CalendarCell[];weekCount:number;firstWeekStart:Date;monthLabels:{week:number;label:string;}[]; /** True when input cardinality or a sparse span exceeded the bounded projection. */ truncated:boolean;}; /** Splits `value`'s rank within `sorted` (ascending, pre-sorted by the caller) into `bucketCount` quartile-style buckets. */ export declare function quartileBucket(value:number,sorted:number[],bucketCount:number):number;