/** * nuxt-x-marketing TypeScript Interfaces * * Standardized data structures for marketing components. * Use these interfaces when passing data to components. */ // ============================================================================= // Core Prop Types // ============================================================================= /** * Standard image prop object * @example { src: '/hero.jpg', alt: 'Hero image' } */ export interface ImageProp { /** Image URL (required) */ src: string /** Alt text for accessibility */ alt?: string } /** * Standard video prop object * @example { src: '/demo.mp4', poster: '/poster.jpg' } */ export interface VideoProp { /** Video URL (required) */ src: string /** Poster image URL */ poster?: string } /** * Standard button prop object (matches Nuxt UI conventions) * @example { label: 'Get Started', color: 'primary', to: '/signup' } */ export interface ButtonProp { /** Button text (required) */ label: string /** Button color: primary, secondary, neutral, success, warning, error */ color?: 'primary' | 'secondary' | 'neutral' | 'success' | 'warning' | 'error' | 'white' /** Button variant: solid, outline, ghost, subtle, link */ variant?: 'solid' | 'outline' | 'ghost' | 'subtle' | 'link' /** Navigation target (NuxtLink) */ to?: string /** External link (uses instead) */ href?: string /** Icon name (Heroicons/Lucide format) */ icon?: string /** Size: xs, sm, md, lg, xl */ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' } /** * Standard logo prop object * @example { src: '/logo.svg', srcDark: '/logo-dark.svg', alt: 'Company' } */ export interface LogoProp { /** Light mode logo URL (required) */ src: string /** Dark mode logo URL (optional, falls back to src) */ srcDark?: string /** Alt text */ alt?: string } // ============================================================================= // Content Types // ============================================================================= /** * Blog post author */ export interface Author { /** Author name */ name: string /** Author title/role */ title?: string /** Avatar image URL */ avatar?: string /** Short bio */ bio?: string /** Social media links */ social?: { twitter?: string linkedin?: string github?: string [key: string]: string | undefined } } /** * Blog post object * @example * { * title: 'Getting Started', * slug: 'getting-started', * img: { src: '/blog/cover.jpg', alt: 'Cover' }, * date: '2024-01-15', * author: { name: 'Jane Doe', avatar: '/avatars/jane.jpg' } * } */ export interface BlogPost { /** Post title */ title: string /** URL slug */ slug: string /** Featured image (new object format) */ img?: ImageProp /** Post excerpt/summary */ excerpt?: string /** Full post description */ description?: string /** Publication date (ISO string or Date) */ date?: string | Date /** Reading time (e.g., "5 min read") */ readingTime?: string | number /** Category name */ category?: string /** Array of tags */ tags?: string[] /** Post author */ author?: Author /** Whether post is published */ published?: boolean } /** * Feature item for Features component * @example * { * icon: 'i-lucide-rocket', * title: 'Fast', * description: 'Lightning fast performance', * img: { src: '/features/fast.jpg' } * } */ export interface Feature { /** Icon name (Heroicons/Lucide format) */ icon?: string /** Feature title */ title: string /** Feature description */ description?: string /** Feature image (new object format) */ img?: ImageProp /** Link URL */ link?: string } /** * Pricing plan for Pricing components * @example * { * name: 'Pro', * price: { monthly: '$29', yearly: '$279' }, * features: ['Unlimited projects', 'Priority support'], * button: { label: 'Get Pro' }, * popular: true * } */ export interface PricingPlan { /** Plan name */ name: string /** Plan description */ description?: string /** Price (string or object for monthly/yearly) */ price: string | { monthly: string; yearly: string } /** Billing period text (e.g., "/month") */ period?: string /** List of feature strings */ features: string[] /** CTA button (new object format) */ button?: ButtonProp /** Mark as popular/highlighted */ popular?: boolean } /** * Testimonial for Testimonials component * @example * { * quote: 'Amazing product!', * name: 'John Doe', * title: 'CEO', * company: 'Acme Inc', * avatar: '/testimonials/john.jpg', * rating: 5 * } */ export interface Testimonial { /** Testimonial quote text */ quote: string /** Person's name */ name: string /** Job title */ title?: string /** Company name */ company?: string /** Avatar image URL */ avatar?: string /** Company logo URL */ logo?: string /** Star rating (1-5) */ rating?: 1 | 2 | 3 | 4 | 5 } /** * Navigation link item */ export interface NavLink { /** Link label */ label: string /** Link URL */ to?: string /** External link */ href?: string /** Icon name */ icon?: string /** Child links (dropdown) */ children?: NavLink[] } /** * Footer link column */ export interface FooterColumn { /** Column title */ title: string /** Links in this column */ links: NavLink[] } /** * Social media link */ export interface SocialLink { /** Platform name (twitter, linkedin, github, etc.) */ platform: string /** Profile URL */ url: string /** Icon name (optional, defaults to platform icon) */ icon?: string } // ============================================================================= // Component Size Scale // ============================================================================= /** * Standard size scale used across components */ export type ComponentSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' // ============================================================================= // Layout Types // ============================================================================= /** * Section background variants */ export type SectionBackground = 'default' | 'subtle' | 'bold' | 'gradient' | 'pattern' /** * Section padding options */ export type SectionPadding = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl'