import { a as createTheme, i as ThemeTokens, n as ThemeFamilyInput, r as ThemeMode, t as ThemeFamily } from "./theme-tokens-IjR_iAF6.js";
import { t as ModuleTheme } from "./module-theme-CHZkkCvf.js";
import { n as calendarDate, t as CalendarDate } from "./calendar-date-CNNsHVof.js";
import { n as SelectionUnit, t as SelectionMode } from "./selection-types-DhmKlruR.js";
import { d as ValidationReason, f as ValidationResult, g as LabelOverrides, m as customScope, p as ValidationScope, r as CalendarConfig, t as SchemeMode, u as BuiltInValidationScope } from "./ui-context--f27L7Ww.js";
import { a as DateRuleReason, i as DateRuleRangeInput, n as DateRuleDayInput, o as compileDateRules, t as DateRuleConfig } from "./date-rule-engine-CNfIfs0F.js";
import { i as ChangeReason, n as CalendarChangeDetails, r as CalendarValue, t as AnyCalendarValue } from "./public-value-B1i8vw8Z.js";
import { C as presetYesterday, S as presetTomorrow, T as resolvePresetLabel, _ as presetNextWeek, a as PresetLabel, b as presetThisWeek, c as PresetValidationContext, d as definePreset, f as presetLast7Days, g as presetNextMonth, h as presetLastYear, i as PresetInput, l as commonPresets, m as presetLastWeek, n as Preset, o as PresetResult, p as presetLastMonth, r as PresetContext, s as PresetStatus, t as EvaluatedPreset, u as compilePresets, v as presetNextYear, w as relativePresets, x as presetToday, y as presetThisMonth } from "./preset-engine-B3wu3xXQ.js";
import { n as CalendarProviderProps } from "./provider-C6X3UtlL.js";
import { a as isCustomAppearance, i as createAppearance, n as CalendarAppearance, r as CustomAppearance, t as AppearanceTokens } from "./appearance-tokens-CcCd5YXE.js";
import { n as createCalendarConfig, t as CalendarConfigOptions } from "./config-pnelHZKe.js";
//#region src/core/timezone-boundary.d.ts
/** Nonexistent local time (spring-forward gap) resolution. */
type NonexistentTimePolicy = "next-valid" | "previous-valid" | "reject";
/** Ambiguous local time (fall-back fold) resolution. */
type AmbiguousTimePolicy = "earlier" | "later";
//#endregion
//#region src/hooks/use-today.d.ts
/**
* SSR-safe "today" Date. Returns `null` on the server and during the first
* client render, then resolves to `new Date()` after mount.
*
* Use this instead of `new Date()` as the initial value for a controlled
* `` in SSR contexts (Next.js, Remix, etc.).
* `new Date()` evaluated on the server vs the client returns different
* timestamps — and across midnight even different days — which causes a
* React hydration mismatch and can leave two day cells visually selected.
*
* @example
* const today = useToday();
* const [date, setDate] = useState(null);
* useEffect(() => { if (today && !date) setDate(today); }, [today]);
* return ;
*/
declare function useToday(): Date | null;
//#endregion
//#region src/react/calendar.d.ts
/**
* The v3 root: the visual shell plus the store provider. It renders the single
* grid container every module places itself into (`@container cal-root`), tags
* it with `data-theme` / `data-readonly` / `data-testid`, and wraps the children
* in a `CalendarProvider`. The provider sits OUTSIDE the DOM node so the store
* is available to the shell's descendants.
*
* Styling is data-attribute + token driven (see styles/layers.css): the shell
* carries neutral `--c-*` defaults that a theme overrides in the `cal-themes`
* layer.
*/
type CalendarProps = CalendarProviderProps & {
/**
* Theme: built-in family name (e.g. `"noir"`, rendered as `data-theme`) or
* a `createTheme` token object (applied as inline light-dark() CSS vars).
*/
theme?: string | ThemeFamily;
/**
* Appearance — the non-color visual axis (shape, spacing, motion). A built-in
* name (e.g. `"zenith"`, rendered as `data-appearance`) or a
* `createAppearance` token object (inline `--cal-*` vars). Omit for the v3
* default look. Independent of `theme` (colors).
*/
appearance?: CalendarAppearance;
/**
* Root grid columns. A number → that many equal `minmax(0, 1fr)` tracks; a
* string → a raw `grid-template-columns` value. Modules place themselves with
* their `col` prop (`col={2}` spans 2, `col="1 / 3"` raw). Omit for the
* default single column (modules stack). Parent declares `cols`, children get
* `col` — same mental model as CSS Grid.
*/
cols?: number | string;
/**
* Decorative gradient mode (v2 parity): soft accent glows in the shell's
* corners and a gradient fill on selected cells. Pure CSS, token-driven —
* follows the active theme and scheme. Default `false`.
*/
gradient?: boolean;
/** Light/dark choice. `"auto"` (default) follows the OS via `color-scheme`. */
scheme?: SchemeMode;
/**
* Controlled scheme. Provide together with `scheme` to own the light/dark
* choice: the toolbar theme toggle calls this with the next resolved scheme
* instead of flipping internal state. Omit for uncontrolled (the toggle owns
* the flip, seeded from `scheme`).
*/
onSchemeChange?: (scheme: "light" | "dark") => void;
/** Extra class on the root shell (user escape hatch). */
className?: string;
/** `id` on the root shell (label targets, anchors). */
id?: string;
/** Inline style on the root shell — merged over theme/appearance vars. */
style?: React.CSSProperties;
/** Test handle on the root. Default `"dateforge-calendar"`. */
"data-testid"?: string;
/** Root-level aria label overrides (module → root → English default). */
labels?: LabelOverrides;
};
declare function Calendar({ theme, appearance, cols, gradient, scheme, onSchemeChange, className, id, style, "data-testid": testId, labels, children, ...providerProps }: CalendarProps): import("react/jsx-runtime").JSX.Element;
//#endregion
export { type AmbiguousTimePolicy, type AnyCalendarValue, type AppearanceTokens, type BuiltInValidationScope, Calendar, type CalendarAppearance, type CalendarChangeDetails, type CalendarConfig, type CalendarConfigOptions, type CalendarDate, type CalendarProps, type CalendarValue, type ChangeReason, type CustomAppearance, type DateRuleConfig, type DateRuleDayInput, type DateRuleRangeInput, type DateRuleReason, type EvaluatedPreset, type ModuleTheme, type NonexistentTimePolicy, type Preset, type PresetContext, type PresetInput, type PresetLabel, type PresetResult, type PresetStatus, type PresetValidationContext, type SelectionMode, type SelectionUnit, type ThemeFamily, type ThemeFamilyInput, type ThemeMode, type ThemeTokens, type ValidationReason, type ValidationResult, type ValidationScope, calendarDate, commonPresets, compileDateRules, compileDateRules as createDisabled, compilePresets, createAppearance, createCalendarConfig, createTheme, customScope, definePreset, isCustomAppearance, presetLast7Days, presetLastMonth, presetLastWeek, presetLastYear, presetNextMonth, presetNextWeek, presetNextYear, presetThisMonth, presetThisWeek, presetToday, presetTomorrow, presetYesterday, relativePresets, resolvePresetLabel, useToday };