forked from
quillmatiq.com/augment
Fork of Chiri for Astro for my blog
1import type { TOCItem, ReadingTime } from './content.types'
2
3// TOC component props interface
4export interface TOCProps {
5 toc?: TOCItem[]
6}
7
8// Post layout props interface (generic, not tied to specific data source)
9export interface PostLayoutProps {
10 title: string
11 pubDate: Date
12 image?: string
13 readingTime?: ReadingTime
14 toc?: TOCItem[]
15}
16
17// Transition props interface
18export interface TransitionProps {
19 type: 'post' | 'page'
20 class?: string
21}
22
23// Layout props interface
24export interface LayoutProps extends TransitionProps {
25 title?: string
26 description?: string
27}
28
29// BaseHead component props interface
30export interface BaseHeadProps {
31 title: string
32 description: string
33 ogImage?: string
34}
35
36// ImageOptimizer component props interface
37export interface ImageOptimizerProps {
38 src: string | ImageMetadata
39 alt: string
40 width?: number
41 height?: number
42 quality?: number
43 format?: 'avif' | 'webp' | 'jpeg' | 'png'
44 loading?: 'lazy' | 'eager'
45 decoding?: 'async' | 'sync' | 'auto'
46 class?: string
47 caption?: string
48 priority?: boolean
49}
50
51// FormattedDate component props interface
52export interface FormattedDateProps {
53 date: Date
54 format?: string
55 context?: 'list' | 'post' | 'default'
56}
57
58// GitHub repository data interface
59export interface GitHubRepoData {
60 owner?: {
61 avatar_url: string
62 }
63 description?: string
64 stargazers_count?: number
65 forks_count?: number
66 license?: {
67 spdx_id: string
68 }
69}
70
71// Cached repository data interface
72export interface CachedRepoData {
73 data: GitHubRepoData
74 timestamp: number
75}
76
77// GitHub card UI elements interface
78export interface CardElements {
79 avatar: HTMLElement | null
80 desc: HTMLElement | null
81 stars: HTMLElement | null
82 forks: HTMLElement | null
83 license: HTMLElement | null
84}
85
86// LinkCard metadata interface (fetched from URL)
87export interface LinkCardMetadata {
88 title: string
89 description: string
90 image: string
91 imageAlt: string
92}