/** * The venues view's pure presentation fold: conference-card filtering * (text/rank/field/window), the watched-first ordering, countdown formatting, * and the CCF-A journal directory's own text/field filter. DOM-free so the * fold is unit-testable; the wire types come from the host's * `listVenueDeadlines` result. * @module dsh-client-ui-mimir/client/venues-view */ import type { VenueDeadlineView, VenueJournalView } from 'dsh-mimir/types'; /** The conferences/journals toggle of the venues view. */ export type VenueMode = 'conferences' | 'journals'; /** One active filter set of the conference list. */ export interface VenueFilter { /** Free text matched case-insensitively against title, full name, dblp key. */ readonly query: string; /** Keep only one CCF rank; null passes every rank. */ readonly rank: 'A' | 'B' | 'C' | null; /** Keep only one ccfddl field code (exact, case-insensitive); null passes all. */ readonly sub: string | null; /** Keep only editions whose next deadline lands within this many days; null passes all. */ readonly withinDays: number | null; } /** The blank filter (everything passes). */ export declare const EMPTY_VENUE_FILTER: VenueFilter; /** * Calendar days from `nowMs` to one ISO instant, in the host's local zone, * so a deadline later today is 0 — the same rule the host's `daysUntil` * applies to `withinDays`, so the card countdown and the server filter never * disagree. (`Math.ceil` on the raw gap said "1 day left" for a deadline * five minutes away.) */ export declare function venueDaysLeft(iso: string, nowMs: number): number; /** * Countdown urgency of one deadline: `soon` inside 30 days (the highlighted * card state), `past`/null for everything else. */ export declare function venueCountdownState(daysLeft: number): 'soon' | null; /** * Filter and order the conference list. The ordering is watched-first, then * next-deadline ascending, deadline-less (fully past) editions last, ties by * title — the answer to "what closes next that I care about". * @param venues - the catalog as the host served it. * @param watched - series keys the selected project watches. * @param filter - the active narrowing fields. * @param nowMs - the reference instant (injectable for tests). * @returns the visible cards in display order. */ export declare function filterVenues(venues: readonly VenueDeadlineView[], watched: readonly string[], filter: VenueFilter, nowMs: number): VenueDeadlineView[]; /** The distinct field codes present in the served catalog, sorted (the filter dropdown). */ export declare function venueFilterSubs(venues: readonly VenueDeadlineView[]): string[]; /** * Count the catalog's deadlines landing inside `withinDays` days — the * overview's "upcoming DDL" stat chip. */ export declare function countUpcomingDeadlines(venues: readonly VenueDeadlineView[], withinDays: number, nowMs: number): number; /** * Filter the static journal directory by free text (title and full name) * and/or one field label; a null selector passes everything on its axis. */ export declare function filterJournals(journals: readonly VenueJournalView[], query: string, sub: string | null): VenueJournalView[]; /** The distinct field labels of the journal directory, in first-appearance order. */ export declare function journalSubs(journals: readonly VenueJournalView[]): string[]; //# sourceMappingURL=venues-view.d.ts.map