| | |
| | |
| | |
| |
|
| | import React from 'react' |
| | import type { LanguageCode } from '@/languages/lib/languages' |
| |
|
| | |
| | export type Theme = 'light' | 'dark' | 'auto' |
| | export type ColorMode = 'light' | 'dark' |
| |
|
| | |
| | export type Locale = LanguageCode |
| |
|
| | |
| | export type VersionId = string |
| | export type ProductId = string |
| | export type CategoryId = string |
| |
|
| | |
| | export interface PageParams { |
| | readonly versionId?: VersionId |
| | readonly productId?: ProductId |
| | readonly categoryId?: CategoryId |
| | } |
| |
|
| | |
| | export interface SearchParams { |
| | readonly [key: string]: string | string[] | undefined |
| | } |
| |
|
| | |
| | export interface RouteContext { |
| | readonly locale: Locale |
| | readonly versionId?: VersionId |
| | readonly productId?: ProductId |
| | readonly categoryId?: CategoryId |
| | } |
| |
|
| | |
| | export interface ThemeConfig { |
| | readonly theme: Theme |
| | readonly colorMode: ColorMode |
| | readonly component: { |
| | readonly colorMode: ColorMode |
| | readonly dayScheme: string |
| | readonly nightScheme: string |
| | } |
| | } |
| |
|
| | |
| | export interface AppError { |
| | readonly message: string |
| | readonly code: string |
| | readonly statusCode: number |
| | readonly context?: Record<string, unknown> |
| | } |
| |
|
| | |
| | export interface NavigationItem { |
| | readonly href: string |
| | readonly title: string |
| | readonly isActive?: boolean |
| | readonly ariaLabel?: string |
| | readonly children?: readonly NavigationItem[] |
| | } |
| |
|
| | |
| | export interface LayoutProps { |
| | readonly children: React.ReactNode |
| | readonly className?: string |
| | } |
| |
|
| | |
| | export interface ComponentProps { |
| | readonly className?: string |
| | readonly children?: React.ReactNode |
| | readonly 'data-testid'?: string |
| | } |
| |
|
| | |
| | export type NonEmptyArray<T> = [T, ...T[]] |
| | export type RequiredFields<T, K extends keyof T> = T & Required<Pick<T, K>> |
| | export type OptionalFields<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>> |
| |
|