declare const RELATIVE_DAY_KINDS: readonly ["today", "tomorrow", "yesterday", "this_week", "next_week", "last_week", "this_month", "next_month", "last_month", "before_today", "next_days", "past_days"]; type RelativeDayKind = (typeof RELATIVE_DAY_KINDS)[number]; /** The zone the host reads this person's day in (their saved zone, or the browser's while it follows). `null` clears. */ declare function setReadersTimeZone(zone: string | null | undefined): void; /** The zone a relative day is worked out in: the host's mirrored zone, else this browser's, else UTC. */ declare function readersTimeZone(): string; interface RelativeWindowOptions { zone?: string; now?: Date; /** First day of the week, Sunday 0 ... Saturday 6. Monday (1) by default, the organization knob's default. */ weekStart?: number; /** A moment column (created_at, a datetime): the window is the reader's local midnights as instants. */ instants?: boolean; } /** * One relative window as exact bounds, half-open [from, to), or `null` when `window` is not a relative * window this knows (it is then left for the store to judge). A date-only column gets calendar days. */ declare function relativeWindowBounds(window: unknown, opts?: RelativeWindowOptions): { from?: string; to?: string; } | null; /** What the filter needs to know about a column to cut its window: the key and whether it holds moments. */ interface RelativeFieldLookup { byKey(key: string): { instants: boolean; } | null; byId(id: string): { instants: boolean; } | null; } /** A lookup over the table's Fields (a moment column is `created_at` / `updated_at` or `config.kind === "datetime"`). */ declare function lookupFromFields(fields: ReadonlyArray<{ id: string; key: string; config?: Record | null; }>): RelativeFieldLookup; /** Does this filter hold a relative window anywhere? (Cheap test so a filter without one never loads Fields.) */ declare function holdsRelativeDays(filter: unknown): boolean; /** * The filter with every relative window worked out for THIS reader, now. Flat filters (`{ due_on: { relative } }`) and * Rule `within` nodes, at any depth. A window it cannot place (an unknown column, an unknown kind) is left as it was. * Never mutates its input. */ declare function resolveRelativeDays(filter: unknown, lookup: RelativeFieldLookup, opts?: Omit): unknown; /** `"sunday"` .. `"saturday"` as `Date.getUTCDay()` counts; anything else is Monday, the knob's default. */ declare function weekStartIndexOf(word: string | null | undefined): number; export { RELATIVE_DAY_KINDS as R, relativeWindowBounds as d, resolveRelativeDays as e, holdsRelativeDays as h, lookupFromFields as l, readersTimeZone as r, setReadersTimeZone as s, weekStartIndexOf as w }; export type { RelativeDayKind as a, RelativeFieldLookup as b, RelativeWindowOptions as c };