import type { BlogTag, BlogPost } from "../types/types.js"; export interface BlogPostHeaderProps { title: string; description: string | undefined; image: string | undefined; tags: BlogTag[] | undefined; author: string; date: string; readTime: string; } export interface BlogPostContentProps { htmlContent: string; } export interface BlogPostTagsProps { tags?: BlogTag[]; } export interface BlogPostAuthorProps { author: string; organization?: string; } export interface BlogPostMetaProps { date: string; readTime: string; } export interface CompleteBlogPostItemsConfig { title?: boolean; description?: boolean; meta?: boolean; author?: boolean; divider?: boolean; image?: boolean; content?: boolean; tags?: boolean; } /** * Static HTML rendering utilities for LeafPad blog content. * * All methods return plain HTML strings ready to be injected via `innerHTML`. * Import the bundled stylesheet to apply default styles: * ```ts * import '@leafpad/blogs/src/styles/style.css'; * ``` * * @example * ```ts * // Full post with sidebar TOC * const html = BlogPostFormat.blogPost({ post, toc: true }); * * // Cards listing * const html = BlogPostFormat.blogCards({ posts, urlPrefix: '/blog' }); * ``` */ export declare class BlogPostFormat { private static resolveCompleteBlogPostItemsConfig; /** * Render a complete post header: image, title, description, tags, and meta. * Use individual `header*` methods for granular control. */ static header({ title, description, image, tags, author, date, readTime }: BlogPostHeaderProps): string; /** Render the post hero ``, or empty string if no image provided. */ static headerImage({ image, title }: { image: string | undefined; title: string; }): string; /** Render an `

` title with a slugified `id` attribute for anchor linking. */ static headerTitle({ title }: { title: string; }): string; /** Render the SEO description as a `

`, or empty string if not provided. */ static headerDescription({ description }: { description: string | undefined; }): string; /** Render inline tag badge `` elements, or empty string if no tags. */ static headerTags({ tags }: { tags: BlogTag[] | undefined; }): string; /** Render the post meta row with calendar and clock SVG icons for date and read time. */ static headerMeta({ author, date, readTime }: { author: string; date: string; readTime: string; }): string; /** Render the post HTML body wrapped in `

`. */ static content({ htmlContent }: BlogPostContentProps): string; /** Render a tags section with a "Tags" heading. Returns empty string if no tags. */ static tags({ tags }: BlogPostTagsProps): string; /** Render the author avatar (initials) with name and organization. */ static author({ author, organization }: BlogPostAuthorProps): string; /** Render a compact date + read time display (no icons). */ static meta({ date, readTime }: BlogPostMetaProps): string; /** Render an `
` separator. */ static divider(): string; /** * Render multiple blog posts as a grid of cards. * @param posts - Array of BlogPost objects * @param urlPrefix - URL prefix for card links (default: '/blogs') */ static blogCards({ posts, urlPrefix }: { posts: BlogPost[]; urlPrefix?: string; }): string; /** * Render a single blog post as a card with image, title, excerpt, meta, and a read-more link. * @param post - The BlogPost to render * @param urlPrefix - URL prefix for the read-more link (default: '/blogs') */ static blogCard({ post, urlPrefix }: { post: BlogPost; urlPrefix?: string; }): string; /** * Render a full blog post with an adjacent `