/** * News Article Content Type * * Represents a news article or announcement with headline, * summary, featured image, and structured content blocks. */ import { ArticleMetadata } from '../../../components/organisms/article/types'; import { ContentDocument, ContentConfig } from '../types'; /** * News article document interface */ export interface NewsArticle extends ContentDocument<'news'> { /** News headline */ headline: string; /** Short summary for listings */ summary: string; /** Featured image URL */ featuredImage?: string; /** Breaking news flag */ breaking?: boolean; /** News source/outlet */ source?: string; /** Related articles */ relatedArticles?: { title: string; slug: string; }[]; } /** * NewsBuilder provides a fluent API for creating news articles. * * @example * ```typescript * const news = new NewsBuilder() * .headline('New Product Launch Announced') * .summary('Company reveals groundbreaking new product...') * .author('Jane Smith', '/avatars/jane.jpg', 'Technology Reporter') * .publishedAt(new Date()) * .breaking() * .featuredImage('/images/product-launch.jpg') * .paragraph('In a surprise announcement today...') * .quote('This is our most innovative product yet', 'CEO John Doe') * .build(); * * // Convert to ArticleMetadata * const article = news.toArticle(); * ``` */ export declare class NewsBuilder { private article; /** * Sets the news headline */ headline(headline: string): this; /** * Sets the news summary */ summary(summary: string): this; /** * Sets the featured image URL */ featuredImage(url: string): this; /** * Marks the article as breaking news */ breaking(value?: boolean): this; /** * Sets the news source/outlet */ source(source: string): this; /** * Sets the article author */ author(name: string, avatar?: string, role?: string): this; /** * Sets the publication date */ publishedAt(date: Date | string): this; /** * Sets tags for the article */ tags(...tags: string[]): this; /** * Sets the category */ category(category: string): this; /** * Sets the slug */ slug(slug: string): this; /** * Sets the ID */ id(id: string): this; /** * Adds related articles */ relatedArticles(articles: { title: string; slug: string; }[]): this; /** * Adds a heading block */ heading(text: string, level?: 1 | 2 | 3): this; /** * Adds a paragraph block */ paragraph(text: string, emphasis?: boolean): this; /** * Adds a quote block */ quote(text: string, author?: string, source?: string): this; /** * Adds an image block */ image(src: string, alt: string, caption?: string): this; /** * Adds an unordered list */ list(items: string[]): this; /** * Adds an ordered/numbered list */ orderedList(items: string[]): this; /** * Adds a callout/note block */ callout(text: string, variant?: 'info' | 'warning' | 'success' | 'error', title?: string): this; /** * Adds a divider */ divider(style?: 'line' | 'dots' | 'space'): this; /** * Adds a button/CTA */ button(text: string, href?: string, color?: 'primary' | 'secondary' | 'success'): this; /** * Configures rendering options */ config(config: Partial): this; /** * Builds the final NewsArticle object */ build(): NewsArticle; /** * Builds and converts to ArticleMetadata */ toArticle(): ArticleMetadata; /** * Gets the estimated reading time in minutes */ getReadingTime(): number; /** * Resets the builder for reuse */ clear(): this; } /** * Creates a new NewsBuilder instance */ export declare function news(): NewsBuilder;