Files
evilspins/types/types.ts
valere 90cbc0be18
Some checks failed
Deploy App / build (push) Failing after 25s
Deploy App / deploy (push) Has been skipped
imporve cards animations
2025-11-23 20:42:49 +01:00

62 lines
1.1 KiB
TypeScript

// types.ts
export type BoxType = 'playlist' | 'compilation'
export interface BoxSide {
duration: number
color1: string
color2: string
name?: string
description?: string
}
export interface Box {
id: string
type: BoxType
name: string
description: string
state: BoxState
duration: number
tracks?: Track[]
sides?: {
A: BoxSide
B: BoxSide
}
activeSide: 'A' | 'B'
}
export interface Artist {
id: number
name: string
url: string
coverId: string
}
export interface Track {
id: number
side?: 'A' | 'B'
order?: number
boxId: string
title: string
artist?: Artist | number | string
start?: number
duration?: number
url: string
coverId?: string
date?: Date
card?: { suit: CardSuit; rank: CardRank }
link?: string
type: BoxType
year?: number
}
export interface Playlist {
id: number
date: Date
title: string
url: string
filename: string
}
export type BoxState = 'box-hidden' | 'box-list' | 'box-selected'
export type CardSuit = '♠' | '♣' | '♦' | '♥'
export type CardRank = 'A' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | 'J' | 'Q' | 'K'