mirror of
https://github.com/AmanTahiliani/box-box.git
synced 2026-08-08 04:06:18 -04:00
feat(#73): Adaptive Weekend shell and responsive navigation
Implemented by claude via .agents/dev dispatch.
This commit is contained in:
@@ -448,6 +448,120 @@ export interface DriverSummary {
|
||||
rounds: DriverSummaryRound[]
|
||||
}
|
||||
|
||||
// ── Weekend Context ──
|
||||
// Canonical contract for the adaptive Weekend home. Served by
|
||||
// /api/v1/weekend-context (sibling backend story #72) and, until that endpoint
|
||||
// ships, derived client-side from existing endpoints (see lib/weekendContext.ts).
|
||||
export type WeekendState =
|
||||
| 'loading'
|
||||
| 'error'
|
||||
| 'limited_data'
|
||||
| 'between_races'
|
||||
| 'pre_session'
|
||||
| 'between_sessions'
|
||||
| 'session_live'
|
||||
| 'session_settling'
|
||||
| 'post_weekend'
|
||||
| 'season_complete'
|
||||
|
||||
export interface WeekendPodiumEntry {
|
||||
position: number
|
||||
driver_number: number
|
||||
name_acronym: string
|
||||
team_name: string
|
||||
team_colour: string
|
||||
gap: string
|
||||
}
|
||||
|
||||
export type WeekendSessionStatus = 'done' | 'live' | 'next' | 'upcoming'
|
||||
|
||||
export interface WeekendTimelineSession {
|
||||
session_key: number
|
||||
session_name: string
|
||||
session_type: string
|
||||
date_start: string
|
||||
date_end: string
|
||||
status: WeekendSessionStatus
|
||||
}
|
||||
|
||||
export interface WeekendCompletedEvent {
|
||||
meeting_key: number
|
||||
meeting_name: string
|
||||
country_code: string
|
||||
country_flag: string
|
||||
circuit_short_name: string
|
||||
round?: number
|
||||
analysis_session_key: number
|
||||
analysis_session_name: string
|
||||
label: string
|
||||
podium: WeekendPodiumEntry[]
|
||||
story?: string
|
||||
}
|
||||
|
||||
export interface WeekendUpcomingEvent {
|
||||
meeting_key: number
|
||||
meeting_name: string
|
||||
country_code: string
|
||||
country_flag: string
|
||||
circuit_short_name: string
|
||||
circuit_key?: number
|
||||
round?: number
|
||||
date_start?: string
|
||||
next_session_name?: string
|
||||
next_session_start?: string
|
||||
}
|
||||
|
||||
export interface WeekendChampionshipMover {
|
||||
position: number
|
||||
driver_number: number
|
||||
name_acronym: string
|
||||
team_colour: string
|
||||
points: number
|
||||
delta?: number
|
||||
}
|
||||
|
||||
export interface WeekendChampionshipImpact {
|
||||
leaders: WeekendChampionshipMover[]
|
||||
note?: string
|
||||
}
|
||||
|
||||
export interface WeekendBriefingItem {
|
||||
category?: string
|
||||
title: string
|
||||
url: string
|
||||
source: string
|
||||
published_at?: string
|
||||
image_url?: string
|
||||
}
|
||||
|
||||
export type WeekendRoundStatus = 'completed' | 'next' | 'upcoming'
|
||||
|
||||
export interface WeekendSeasonRound {
|
||||
round: number
|
||||
meeting_key: number
|
||||
country_code: string
|
||||
country_flag: string
|
||||
status: WeekendRoundStatus
|
||||
analysis_session_key?: number
|
||||
}
|
||||
|
||||
export interface WeekendContext {
|
||||
state: WeekendState
|
||||
season: number
|
||||
message?: string
|
||||
live?: boolean
|
||||
active_meeting_name?: string
|
||||
active_circuit_short_name?: string
|
||||
last_event?: WeekendCompletedEvent
|
||||
next_event?: WeekendUpcomingEvent
|
||||
last_session?: WeekendCompletedEvent
|
||||
next_session?: WeekendTimelineSession
|
||||
sessions?: WeekendTimelineSession[]
|
||||
championship_impact?: WeekendChampionshipImpact
|
||||
season_rounds?: WeekendSeasonRound[]
|
||||
briefing?: WeekendBriefingItem[]
|
||||
}
|
||||
|
||||
export interface NewsItem {
|
||||
source: string
|
||||
title: string
|
||||
|
||||
Reference in New Issue
Block a user