@still-void/ui 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/index.ts","../../src/recipes/cx.ts","../../src/recipes/shell.ts","../../src/react/components/Shell.tsx","../../src/recipes/content.ts","../../src/tokens/colors.ts","../../src/tokens/categories.ts","../../src/react/components/Content.tsx","../../src/recipes/article.ts","../../src/react/components/Article.tsx"],"sourcesContent":["/**\n * @quiet-tech/ui/react — Server Component safe React adapter.\n * Nothing here uses hooks, state, or browser APIs, so every component can\n * render inside a Next.js Server Component. Interactive pieces live in\n * '@quiet-tech/ui/react/client'.\n */\nexport * from './components/Shell';\nexport * from './components/Content';\nexport * from './components/Article';\n\n// Re-export data contracts and recipe types consumers need for props.\nexport type { PostSummary, TocItem, NavItem } from '../types';\nexport type { CalloutKind } from '../recipes/article';\nexport type { ThemeMode, AccentName } from '../tokens/colors';\n","/** Minimal class-name joiner. Falsy values are dropped. */\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(' ');\n}\n","import { cx } from './cx';\n\n/**\n * Shell recipes: Header, Logo, Footer.\n * Recipes are pure functions returning class strings — no DOM, no framework.\n * Safe in Next.js Server Components; usable via [class] in Angular, :class in Vue.\n */\n\nexport interface HeaderOptions {\n /** Frosted glass background (sticky headers). */\n glass?: boolean;\n}\n\nexport function header(options: HeaderOptions = {}): string {\n return cx('qt-header', options.glass !== false && 'qt-glass');\n}\n\nexport const headerClasses = {\n nav: 'qt-header__nav',\n link: 'qt-header__link',\n linkActive: cx('qt-header__link', 'qt-header__link--active'),\n actions: 'qt-header__actions',\n} as const;\n\nexport function logo(): string {\n return 'qt-logo';\n}\n\nexport const logoClasses = {\n dot: 'qt-logo__dot',\n} as const;\n\nexport function footer(): string {\n return 'qt-footer';\n}\n\nexport const footerClasses = {\n links: 'qt-footer__links',\n link: 'qt-footer__link',\n} as const;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { footer, footerClasses, header, headerClasses, logo, logoClasses } from '../../recipes/shell';\nimport type { NavItem } from '../../types';\n\n/*\n * Shell components are Server Component safe: no hooks, no browser APIs.\n * Interactivity (theme toggle) is composed in via the `actions` slot —\n * pass <ThemeToggle /> from '@quiet-tech/ui/react/client'.\n */\n\nexport interface LogoProps extends ComponentPropsWithoutRef<'a'> {\n label: string;\n href?: string;\n}\n\nexport function Logo({ label, href = '/', className, ...rest }: LogoProps) {\n return (\n <a href={href} className={cx(logo(), className)} {...rest}>\n <span className={logoClasses.dot} aria-hidden=\"true\" />\n {label}\n </a>\n );\n}\n\nexport interface HeaderProps extends ComponentPropsWithoutRef<'header'> {\n /** Usually a <Logo />. */\n logo?: ReactNode;\n items?: NavItem[];\n /** Right-side slot — theme toggle, search, etc. */\n actions?: ReactNode;\n /** Frosted glass background (default true). */\n glass?: boolean;\n}\n\nexport function Header({ logo: logoSlot, items = [], actions, glass, className, ...rest }: HeaderProps) {\n return (\n <header className={cx(header({ glass }), className)} {...rest}>\n {logoSlot}\n {items.length > 0 && (\n <nav className={headerClasses.nav}>\n {items.map((item) => (\n <a\n key={item.href}\n href={item.href}\n className={item.active ? headerClasses.linkActive : headerClasses.link}\n aria-current={item.active ? 'page' : undefined}\n >\n {item.label}\n </a>\n ))}\n </nav>\n )}\n {actions && <div className={headerClasses.actions}>{actions}</div>}\n </header>\n );\n}\n\nexport interface FooterProps extends ComponentPropsWithoutRef<'footer'> {\n author?: string;\n links?: NavItem[];\n children?: ReactNode;\n}\n\nexport function Footer({ author, links = [], children, className, ...rest }: FooterProps) {\n return (\n <footer className={cx(footer(), className)} {...rest}>\n {author && <span>{author}</span>}\n {links.length > 0 && (\n <div className={footerClasses.links}>\n {links.map((link) => (\n <a key={link.href} href={link.href} className={footerClasses.link}>\n {link.label}\n </a>\n ))}\n </div>\n )}\n {children}\n </footer>\n );\n}\n","import { cx } from './cx';\n\n/**\n * Content recipes: CategoryPill, PostCard, FeaturedPostCard, PostGrid,\n * Sidebar, Hero, Skeleton. Pure functions — Server Component safe.\n */\n\nexport interface CategoryPillOptions {\n interactive?: boolean;\n active?: boolean;\n}\n\nexport function categoryPill(options: CategoryPillOptions = {}): string {\n return cx(\n 'qt-pill',\n options.interactive && 'qt-pill--interactive',\n options.active && 'qt-pill--active',\n );\n}\n\nexport const categoryPillClasses = {\n dot: 'qt-pill__dot',\n} as const;\n\nexport interface PostCardOptions {\n dense?: boolean;\n hover?: boolean;\n}\n\nexport function postCard(options: PostCardOptions = {}): string {\n return cx(\n 'qt-post-card',\n options.dense && 'qt-post-card--dense',\n options.hover !== false && 'qt-card-hover',\n );\n}\n\nexport const postCardClasses = {\n meta: 'qt-post-card__meta',\n title: 'qt-post-card__title',\n excerpt: 'qt-post-card__excerpt',\n} as const;\n\nexport function featuredPostCard(): string {\n return cx('qt-featured-card', 'qt-gradient-border', 'qt-card-hover');\n}\n\nexport const featuredPostCardClasses = {\n body: 'qt-featured-card__body',\n title: 'qt-featured-card__title',\n visual: 'qt-featured-card__visual',\n} as const;\n\nexport function postGrid(): string {\n return 'qt-post-grid';\n}\n\nexport interface LayoutOptions {\n withSidebar?: boolean;\n}\n\nexport function layout(options: LayoutOptions = {}): string {\n return cx('qt-layout', options.withSidebar && 'qt-layout--with-sidebar');\n}\n\nexport function sidebar(): string {\n return 'qt-sidebar';\n}\n\nexport const sidebarClasses = {\n sectionTitle: 'qt-sidebar__section-title',\n} as const;\n\nexport function hero(): string {\n return 'qt-hero';\n}\n\nexport const heroClasses = {\n eyebrow: 'qt-hero__eyebrow',\n title: 'qt-hero__title',\n description: 'qt-hero__description',\n} as const;\n\nexport interface SkeletonOptions {\n small?: boolean;\n}\n\nexport function skeletonLine(options: SkeletonOptions = {}): string {\n return cx('qt-skeleton', 'qt-skeleton-line', options.small && 'qt-skeleton-line--sm');\n}\n\nexport function cardSkeleton(): string {\n return 'qt-card-skeleton';\n}\n","/**\n * Quiet Tech color tokens.\n * Values ported literally from the Quiet Tech spec (blog.kalleopinheiro.dev).\n * Do not round or \"approximate\" — fidelity rule.\n */\nexport const colors = {\n dark: {\n bg: '#0A0A0C',\n bgElev: '#111114',\n surface: '#16161B',\n surface2: '#1C1C22',\n border: 'rgba(255,255,255,0.08)',\n borderStrong: 'rgba(255,255,255,0.14)',\n text: '#EDEDF0',\n text2: '#8B8B96',\n // Corrected from #5A5A66 (~2.6:1 on surface) to meet WCAG AA 4.5:1 — text3 is used for\n // real copy (metadata, TOC links), not decoration, so it must be readable, not just muted.\n text3: '#83838F',\n },\n light: {\n bg: '#F7F7F5',\n bgElev: '#FFFFFF',\n surface: '#FFFFFF',\n surface2: '#F2F2EF',\n border: 'rgba(0,0,0,0.08)',\n borderStrong: 'rgba(0,0,0,0.14)',\n text: '#16161B',\n text2: '#5A5A66',\n // Corrected from #8B8B96 (~3.1:1 on white) to meet WCAG AA 4.5:1, same reasoning as dark.\n text3: '#6F6F78',\n },\n} as const;\n\nexport const accents = {\n cyan: 'oklch(0.78 0.12 210)',\n violet: 'oklch(0.72 0.14 295)',\n mint: 'oklch(0.78 0.10 160)',\n amber: 'oklch(0.78 0.12 75)',\n} as const;\n\nexport type ThemeMode = keyof typeof colors;\nexport type AccentName = keyof typeof accents;\nexport type ColorScheme = (typeof colors)[ThemeMode];\n\nexport const themeModes = Object.keys(colors) as ThemeMode[];\nexport const accentNames = Object.keys(accents) as AccentName[];\n\nexport const DEFAULT_MODE: ThemeMode = 'dark';\nexport const DEFAULT_ACCENT: AccentName = 'cyan';\n","import { accents, type AccentName } from './colors';\n\n/**\n * Blog categories from the prototype. Categories render as a colored dot + label\n * (never an emoji). The pill also accepts any CSS color for whitelabel use.\n */\nexport type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';\n\nexport const defaultCategoryColors: Record<CategoryName, AccentName> = {\n ia: 'violet',\n prompt: 'amber',\n dev: 'mint',\n arch: 'cyan',\n ts: 'cyan',\n};\n\n/** Resolve an accent name or raw CSS color to a CSS color value. */\nexport function resolveAccentColor(color: AccentName | (string & {})): string {\n return color in accents ? accents[color as AccentName] : color;\n}\n\n/** Resolve a category name, accent name, or raw CSS color to a CSS color value. */\nexport function resolveCategoryColor(\n color: CategoryName | AccentName | (string & {}),\n): string {\n if (color in defaultCategoryColors) {\n return accents[defaultCategoryColors[color as CategoryName]];\n }\n return resolveAccentColor(color);\n}\n","import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport {\n cardSkeleton,\n categoryPill,\n categoryPillClasses,\n featuredPostCard,\n featuredPostCardClasses,\n hero,\n heroClasses,\n layout,\n postCard,\n postCardClasses,\n postGrid,\n sidebar,\n sidebarClasses,\n skeletonLine,\n} from '../../recipes/content';\nimport { resolveCategoryColor } from '../../tokens/categories';\nimport type { PostSummary } from '../../types';\n\n/* All components in this file are Server Component safe. */\n\nexport interface CategoryPillProps extends ComponentPropsWithoutRef<'span'> {\n label: string;\n /** Accent name ('cyan'), category name ('ia'), or any CSS color. */\n color?: string;\n active?: boolean;\n interactive?: boolean;\n}\n\nexport function CategoryPill({\n label,\n color,\n active,\n interactive,\n className,\n style,\n ...rest\n}: CategoryPillProps) {\n const pillStyle: CSSProperties | undefined = color\n ? ({ ...style, '--qt-pill-color': resolveCategoryColor(color) } as CSSProperties)\n : style;\n return (\n <span className={cx(categoryPill({ active, interactive }), className)} style={pillStyle} {...rest}>\n <span className={categoryPillClasses.dot} aria-hidden=\"true\" />\n {label}\n </span>\n );\n}\n\nfunction PostMeta({ post }: { post: PostSummary }) {\n if (!post.category && !post.date && post.readMinutes === undefined) return null;\n return (\n <div className={postCardClasses.meta}>\n {post.category && <CategoryPill label={post.category.label} color={post.category.color} />}\n {post.date && <span>{post.date}</span>}\n {post.readMinutes !== undefined && <span>{post.readMinutes} min</span>}\n </div>\n );\n}\n\nexport interface PostCardProps extends ComponentPropsWithoutRef<'article'> {\n post: PostSummary;\n dense?: boolean;\n}\n\nexport function PostCard({ post, dense, className, children, ...rest }: PostCardProps) {\n return (\n <article className={cx(postCard({ dense }), className)} {...rest}>\n <PostMeta post={post} />\n <h3 className={postCardClasses.title}>\n <a href={post.href}>{post.title}</a>\n </h3>\n {!dense && post.excerpt && <p className={postCardClasses.excerpt}>{post.excerpt}</p>}\n {children}\n </article>\n );\n}\n\nexport interface FeaturedPostCardProps extends ComponentPropsWithoutRef<'article'> {\n post: PostSummary;\n /** Custom visual slot (illustration, image). */\n visual?: ReactNode;\n}\n\nexport function FeaturedPostCard({ post, visual, className, children, ...rest }: FeaturedPostCardProps) {\n return (\n <article className={cx(featuredPostCard(), className)} {...rest}>\n <div className={featuredPostCardClasses.body}>\n <PostMeta post={post} />\n <h2 className={featuredPostCardClasses.title}>\n <a href={post.href}>{post.title}</a>\n </h2>\n {post.excerpt && <p className={postCardClasses.excerpt}>{post.excerpt}</p>}\n {children}\n </div>\n {visual && <div className={featuredPostCardClasses.visual}>{visual}</div>}\n </article>\n );\n}\n\nexport interface PostGridProps extends ComponentPropsWithoutRef<'div'> {}\n\nexport function PostGrid({ className, ...rest }: PostGridProps) {\n return <div className={cx(postGrid(), className)} {...rest} />;\n}\n\nexport interface LayoutProps extends ComponentPropsWithoutRef<'div'> {\n withSidebar?: boolean;\n}\n\nexport function Layout({ withSidebar, className, ...rest }: LayoutProps) {\n return <div className={cx(layout({ withSidebar }), className)} {...rest} />;\n}\n\nexport interface SidebarProps extends ComponentPropsWithoutRef<'aside'> {}\n\nexport function Sidebar({ className, ...rest }: SidebarProps) {\n return <aside className={cx(sidebar(), className)} {...rest} />;\n}\n\nexport interface SidebarSectionProps extends ComponentPropsWithoutRef<'section'> {\n title: string;\n}\n\nexport function SidebarSection({ title, children, ...rest }: SidebarSectionProps) {\n return (\n <section {...rest}>\n <h4 className={sidebarClasses.sectionTitle}>{title}</h4>\n {children}\n </section>\n );\n}\n\nexport interface HeroProps extends ComponentPropsWithoutRef<'section'> {\n eyebrow?: string;\n title: string;\n description?: string;\n}\n\nexport function Hero({ eyebrow, title, description, className, children, ...rest }: HeroProps) {\n return (\n <section className={cx(hero(), className)} {...rest}>\n {eyebrow && <span className={heroClasses.eyebrow}>{eyebrow}</span>}\n <h1 className={heroClasses.title}>{title}</h1>\n {description && <p className={heroClasses.description}>{description}</p>}\n {children}\n </section>\n );\n}\n\nexport interface SkeletonProps extends ComponentPropsWithoutRef<'div'> {\n small?: boolean;\n}\n\nexport function Skeleton({ small, className, ...rest }: SkeletonProps) {\n return <div className={cx(skeletonLine({ small }), className)} aria-hidden=\"true\" {...rest} />;\n}\n\nexport function CardSkeleton({ className, ...rest }: ComponentPropsWithoutRef<'div'>) {\n return (\n <div className={cx(cardSkeleton(), className)} aria-hidden=\"true\" {...rest}>\n <Skeleton small />\n <Skeleton />\n <Skeleton />\n </div>\n );\n}\n","import { cx } from './cx';\n\n/**\n * Article recipes: CodeBlock, Callout, TableOfContents, ReadingProgress,\n * ArticleHeader, Prose. Pure functions — Server Component safe.\n */\n\nexport function codeBlock(): string {\n return 'qt-code-block';\n}\n\nexport const codeBlockClasses = {\n header: 'qt-code-block__header',\n pre: 'qt-code-block__pre',\n copy: 'qt-code-block__copy',\n copyCopied: cx('qt-code-block__copy', 'qt-code-block__copy--copied'),\n} as const;\n\nexport type CalloutKind = 'note' | 'warn' | 'aha';\n\nexport function callout(kind: CalloutKind): string {\n return cx('qt-callout', `qt-callout--${kind}`);\n}\n\nexport const calloutClasses = {\n label: 'qt-callout__label',\n} as const;\n\nexport const calloutLabels: Record<CalloutKind, string> = {\n note: 'Note',\n warn: 'Warn',\n aha: 'Aha!',\n};\n\nexport function tableOfContents(): string {\n return 'qt-toc';\n}\n\nexport interface TocLinkOptions {\n active?: boolean;\n /** Heading depth, 2 (h2) or 3 (h3). Depth 3 indents. */\n depth?: 2 | 3;\n}\n\nexport function tocLink(options: TocLinkOptions = {}): string {\n return cx(\n 'qt-toc__link',\n options.active && 'qt-toc__link--active',\n options.depth === 3 && 'qt-toc__link--depth-3',\n );\n}\n\nexport function readingProgress(): string {\n return 'qt-reading-progress';\n}\n\nexport const readingProgressClasses = {\n bar: 'qt-reading-progress__bar',\n} as const;\n\n/** CSS var read by `.qt-reading-progress__bar` (0 → 1). */\nexport const READING_PROGRESS_VAR = '--qt-reading-progress';\n\nexport function articleHeader(): string {\n return 'qt-article-header';\n}\n\nexport const articleHeaderClasses = {\n title: 'qt-article-header__title',\n meta: 'qt-article-header__meta',\n author: 'qt-article-header__author',\n} as const;\n\nexport function prose(): string {\n return 'qt-prose';\n}\n\nexport const proseClasses = {\n lead: 'qt-prose__lead',\n} as const;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport {\n articleHeader,\n articleHeaderClasses,\n callout,\n calloutClasses,\n calloutLabels,\n codeBlock,\n codeBlockClasses,\n prose,\n proseClasses,\n type CalloutKind,\n} from '../../recipes/article';\n\n/*\n * Article components are Server Component safe.\n * Interactive pieces (copy button, scroll spy) live in the client entry\n * and are composed in via slots.\n */\n\nexport interface CodeBlockProps extends ComponentPropsWithoutRef<'figure'> {\n /** Raw source shown when `rendered` is absent. */\n code: string;\n language?: string;\n filename?: string;\n /**\n * Pre-highlighted markup (e.g. Shiki output rendered on the server).\n * The prototype's regex tokenizer was demo-only and is intentionally\n * not part of the library.\n */\n rendered?: ReactNode;\n /** Header slot — pass <CopyButton code={code} /> from the client entry. */\n actions?: ReactNode;\n}\n\nexport function CodeBlock({\n code,\n language,\n filename,\n rendered,\n actions,\n className,\n ...rest\n}: CodeBlockProps) {\n return (\n <figure className={cx(codeBlock(), className)} {...rest}>\n <figcaption className={codeBlockClasses.header}>\n <span>{filename ?? language ?? 'code'}</span>\n {actions}\n </figcaption>\n <pre className={codeBlockClasses.pre}>\n {rendered ?? <code>{code}</code>}\n </pre>\n </figure>\n );\n}\n\nexport interface CalloutProps extends ComponentPropsWithoutRef<'aside'> {\n kind: CalloutKind;\n /** Override the default kind label. */\n label?: string;\n}\n\nexport function Callout({ kind, label, className, children, ...rest }: CalloutProps) {\n return (\n <aside className={cx(callout(kind), className)} {...rest}>\n <span className={calloutClasses.label}>{label ?? calloutLabels[kind]}</span>\n <div>{children}</div>\n </aside>\n );\n}\n\nexport interface ArticleHeaderProps extends ComponentPropsWithoutRef<'header'> {\n title: string;\n author?: string;\n date?: string;\n readMinutes?: number;\n /** Slot above the title — usually a <CategoryPill />. */\n eyebrow?: ReactNode;\n}\n\nexport function ArticleHeader({\n title,\n author,\n date,\n readMinutes,\n eyebrow,\n className,\n ...rest\n}: ArticleHeaderProps) {\n return (\n <header className={cx(articleHeader(), className)} {...rest}>\n {eyebrow}\n <h1 className={articleHeaderClasses.title}>{title}</h1>\n {(author || date || readMinutes !== undefined) && (\n <div className={articleHeaderClasses.meta}>\n {author && <span className={articleHeaderClasses.author}>{author}</span>}\n {date && <span>{date}</span>}\n {readMinutes !== undefined && <span>{readMinutes} min</span>}\n </div>\n )}\n </header>\n );\n}\n\nexport interface ProseProps extends ComponentPropsWithoutRef<'div'> {}\n\n/** Typography wrapper for article/MDX content. */\nexport function Prose({ className, ...rest }: ProseProps) {\n return <div className={cx(prose(), className)} {...rest} />;\n}\n\nexport interface LeadProps extends ComponentPropsWithoutRef<'p'> {}\n\n/** Lead paragraph inside <Prose>. */\nexport function Lead({ className, ...rest }: LeadProps) {\n return <p className={cx(proseClasses.lead, className)} {...rest} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,SAAS,MAAM,OAAyD;AAC7E,SAAO,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AACvC;;;ACUO,SAAS,OAAO,UAAyB,CAAC,GAAW;AAC1D,SAAO,GAAG,aAAa,QAAQ,UAAU,SAAS,UAAU;AAC9D;AAEO,I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AC,WAAM,WAAW,GAAG,QAAQ,IAAI,GAAG,SAAS,GAAI,GAAG,MAClD;AAAA,iDAAC,UAAK,WAAW,eAAe,OAAQ,mBAAS,cAAc,IAAI,GAAE;AAAA,IACrE,6CAAC,SAAK,UAAS;AAAA,KACjB;AAEJ;AAWO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAuB;AACrB,SACE,8CAAC,YAAO,WAAW,GAAG,cAAc,GAAG,SAAS,GAAI,GAAG,MACpD;AAAA;AAAA,IACD,6CAAC,QAAG,WAAW,qBAAqB,OAAQ,iBAAM;AAAA,KAChD,UAAU,QAAQ,gBAAgB,WAClC,8CAAC,SAAI,WAAW,qBAAqB,MAClC;AAAA,gBAAU,6CAAC,UAAK,WAAW,qBAAqB,QAAS,kBAAO;AAAA,MAChE,QAAQ,6CAAC,UAAM,gBAAK;AAAA,MACpB,gBAAgB,UAAa,8CAAC,UAAM;AAAA;AAAA,QAAY;AAAA,SAAI;AAAA,OACvD;AAAA,KAEJ;AAEJ;AAKO,SAAS,MAAM,EAAE,WAAW,GAAG,KAAK,GAAe;AACxD,SAAO,6CAAC,SAAI,WAAW,GAAG,MAAM,GAAG,SAAS,GAAI,GAAG,MAAM;AAC3D;AAKO,SAAS,KAAK,EAAE,WAAW,GAAG,KAAK,GAAc;AACtD,SAAO,6CAAC,OAAE,WAAW,GAAG,aAAa,MAAM,SAAS,GAAI,GAAG,MAAM;AACnE;","names":["import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/react/index.ts","../../src/recipes/cx.ts","../../src/recipes/shell.ts","../../src/react/components/Shell.tsx","../../src/recipes/content.ts","../../src/tokens/colors.ts","../../src/tokens/categories.ts","../../src/react/components/Content.tsx","../../src/recipes/article.ts","../../src/react/components/Article.tsx","../../src/behaviors/themeManager.ts","../../src/react/components/ThemeScript.tsx"],"sourcesContent":["/**\n * @still-void/ui/react — Server Component safe React adapter.\n * Nothing here uses hooks, state, or browser APIs, so every component can\n * render inside a Next.js Server Component. Interactive pieces live in\n * '@still-void/ui/react/client'.\n */\nexport * from './components/Shell';\nexport * from './components/Content';\nexport * from './components/Article';\nexport * from './components/ThemeScript';\n\n// Re-export data contracts and recipe types consumers need for props.\nexport type { PostSummary, TocItem, NavItem } from '../types';\nexport type { CalloutKind } from '../recipes/article';\nexport type { ThemeMode, AccentName } from '../tokens/colors';\n","/** Minimal class-name joiner. Falsy values are dropped. */\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(' ');\n}\n","import { cx } from './cx';\n\n/**\n * Shell recipes: Header, Logo, Footer.\n * Recipes are pure functions returning class strings — no DOM, no framework.\n * Safe in Next.js Server Components; usable via [class] in Angular, :class in Vue.\n */\n\nexport interface HeaderOptions {\n /** Frosted glass background (sticky headers). */\n glass?: boolean;\n}\n\nexport function header(options: HeaderOptions = {}): string {\n return cx('sv-header', options.glass !== false && 'sv-glass');\n}\n\nexport const headerClasses = {\n nav: 'sv-header__nav',\n link: 'sv-header__link',\n linkActive: cx('sv-header__link', 'sv-header__link--active'),\n actions: 'sv-header__actions',\n} as const;\n\nexport function logo(): string {\n return 'sv-logo';\n}\n\nexport const logoClasses = {\n dot: 'sv-logo__dot',\n} as const;\n\nexport function footer(): string {\n return 'sv-footer';\n}\n\nexport const footerClasses = {\n links: 'sv-footer__links',\n link: 'sv-footer__link',\n} as const;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { footer, footerClasses, header, headerClasses, logo, logoClasses } from '../../recipes/shell';\nimport type { NavItem } from '../../types';\n\n/*\n * Shell components are Server Component safe: no hooks, no browser APIs.\n * Interactivity (theme toggle) is composed in via the `actions` slot —\n * pass <ThemeToggle /> from '@still-void/ui/react/client'.\n */\n\nexport interface LogoProps extends ComponentPropsWithoutRef<'a'> {\n label: string;\n href?: string;\n}\n\nexport function Logo({ label, href = '/', className, ...rest }: LogoProps) {\n return (\n <a href={href} className={cx(logo(), className)} {...rest}>\n <span className={logoClasses.dot} aria-hidden=\"true\" />\n {label}\n </a>\n );\n}\n\nexport interface HeaderProps extends ComponentPropsWithoutRef<'header'> {\n /** Usually a <Logo />. */\n logo?: ReactNode;\n items?: NavItem[];\n /** Right-side slot — theme toggle, search, etc. */\n actions?: ReactNode;\n /** Frosted glass background (default true). */\n glass?: boolean;\n}\n\nexport function Header({ logo: logoSlot, items = [], actions, glass, className, ...rest }: HeaderProps) {\n return (\n <header className={cx(header({ glass }), className)} {...rest}>\n {logoSlot}\n {items.length > 0 && (\n <nav className={headerClasses.nav}>\n {items.map((item) => (\n <a\n key={item.href}\n href={item.href}\n className={item.active ? headerClasses.linkActive : headerClasses.link}\n aria-current={item.active ? 'page' : undefined}\n >\n {item.label}\n </a>\n ))}\n </nav>\n )}\n {actions && <div className={headerClasses.actions}>{actions}</div>}\n </header>\n );\n}\n\nexport interface FooterProps extends ComponentPropsWithoutRef<'footer'> {\n author?: string;\n links?: NavItem[];\n children?: ReactNode;\n}\n\nexport function Footer({ author, links = [], children, className, ...rest }: FooterProps) {\n return (\n <footer className={cx(footer(), className)} {...rest}>\n {author && <span>{author}</span>}\n {links.length > 0 && (\n <div className={footerClasses.links}>\n {links.map((link) => (\n <a key={link.href} href={link.href} className={footerClasses.link}>\n {link.label}\n </a>\n ))}\n </div>\n )}\n {children}\n </footer>\n );\n}\n","import { cx } from './cx';\n\n/**\n * Content recipes: CategoryPill, PostCard, FeaturedPostCard, PostGrid,\n * Sidebar, Hero, Skeleton. Pure functions — Server Component safe.\n */\n\nexport interface CategoryPillOptions {\n interactive?: boolean;\n active?: boolean;\n}\n\nexport function categoryPill(options: CategoryPillOptions = {}): string {\n return cx(\n 'sv-pill',\n options.interactive && 'sv-pill--interactive',\n options.active && 'sv-pill--active',\n );\n}\n\nexport const categoryPillClasses = {\n dot: 'sv-pill__dot',\n} as const;\n\nexport interface PostCardOptions {\n dense?: boolean;\n hover?: boolean;\n}\n\nexport function postCard(options: PostCardOptions = {}): string {\n return cx(\n 'sv-post-card',\n options.dense && 'sv-post-card--dense',\n options.hover !== false && 'sv-card-hover',\n );\n}\n\nexport const postCardClasses = {\n meta: 'sv-post-card__meta',\n title: 'sv-post-card__title',\n excerpt: 'sv-post-card__excerpt',\n} as const;\n\nexport function featuredPostCard(): string {\n return cx('sv-featured-card', 'sv-gradient-border', 'sv-card-hover');\n}\n\nexport const featuredPostCardClasses = {\n body: 'sv-featured-card__body',\n title: 'sv-featured-card__title',\n visual: 'sv-featured-card__visual',\n} as const;\n\nexport function postGrid(): string {\n return 'sv-post-grid';\n}\n\nexport interface LayoutOptions {\n withSidebar?: boolean;\n}\n\nexport function layout(options: LayoutOptions = {}): string {\n return cx('sv-layout', options.withSidebar && 'sv-layout--with-sidebar');\n}\n\nexport function sidebar(): string {\n return 'sv-sidebar';\n}\n\nexport const sidebarClasses = {\n sectionTitle: 'sv-sidebar__section-title',\n} as const;\n\nexport function hero(): string {\n return 'sv-hero';\n}\n\nexport const heroClasses = {\n eyebrow: 'sv-hero__eyebrow',\n title: 'sv-hero__title',\n description: 'sv-hero__description',\n} as const;\n\nexport interface SkeletonOptions {\n small?: boolean;\n}\n\nexport function skeletonLine(options: SkeletonOptions = {}): string {\n return cx('sv-skeleton', 'sv-skeleton-line', options.small && 'sv-skeleton-line--sm');\n}\n\nexport function cardSkeleton(): string {\n return 'sv-card-skeleton';\n}\n","/**\n * Still Void color tokens.\n * Values ported literally from the Still Void spec (blog.kalleopinheiro.dev).\n * Do not round or \"approximate\" — fidelity rule.\n */\nexport const colors = {\n dark: {\n bg: '#0A0A0C',\n bgElev: '#111114',\n surface: '#16161B',\n surface2: '#1C1C22',\n border: 'rgba(255,255,255,0.08)',\n borderStrong: 'rgba(255,255,255,0.14)',\n text: '#EDEDF0',\n text2: '#8B8B96',\n // Corrected from #5A5A66 (~2.6:1 on surface) to meet WCAG AA 4.5:1 — text3 is used for\n // real copy (metadata, TOC links), not decoration, so it must be readable, not just muted.\n text3: '#83838F',\n },\n light: {\n bg: '#F7F7F5',\n bgElev: '#FFFFFF',\n surface: '#FFFFFF',\n surface2: '#F2F2EF',\n border: 'rgba(0,0,0,0.08)',\n borderStrong: 'rgba(0,0,0,0.14)',\n text: '#16161B',\n text2: '#5A5A66',\n // Corrected from #8B8B96 (~3.1:1 on white) to meet WCAG AA 4.5:1, same reasoning as dark.\n // A further step from #6F6F78 to #6D6D76: the first fix cleared white/paper (≥4.7:1) but\n // was only ~4.44:1 against surface2 (#F2F2EF), the darkest of the light surfaces — still a\n // failure. Verified against bg/bgElev/surface/surface2 together, not just one background.\n text3: '#6D6D76',\n },\n} as const;\n\nexport const accents = {\n cyan: 'oklch(0.78 0.12 210)',\n violet: 'oklch(0.72 0.14 295)',\n mint: 'oklch(0.78 0.10 160)',\n amber: 'oklch(0.78 0.12 75)',\n} as const;\n\n/**\n * Text/UI-safe accent variants (\"ink\"). `accents` above is tuned for surface use\n * (dots, gradient border, progress bar) and fails WCAG AA as text on light\n * backgrounds (e.g. cyan is ~1.8:1 on white). These preserve the dark-mode\n * values (already ≥6.9:1) and darken each hue for light mode to clear 4.5:1\n * against both light surfaces. Used anywhere the accent colors text: prose\n * links, active TOC state, callout labels, hero eyebrow, copy-success, focus ring.\n */\nexport const accentsInk = {\n dark: {\n cyan: 'oklch(0.78 0.12 210)',\n violet: 'oklch(0.72 0.14 295)',\n mint: 'oklch(0.78 0.10 160)',\n amber: 'oklch(0.78 0.12 75)',\n },\n light: {\n cyan: 'oklch(0.525 0.09 210)',\n violet: 'oklch(0.545 0.14 295)',\n mint: 'oklch(0.52 0.1 160)',\n amber: 'oklch(0.535 0.11 75)',\n },\n} as const;\n\n/**\n * Semantic state colors — independent of the switchable `accent`, so a\n * consumer picking `data-accent=\"amber\"` never collides a warning with the\n * site accent. Fixed per meaning in both surface and text/UI (\"ink\") forms,\n * same split as `accents`/`accentsInk`.\n */\nexport const semantic = {\n dark: {\n danger: 'oklch(0.68 0.19 25)',\n success: 'oklch(0.75 0.15 150)',\n info: 'oklch(0.78 0.12 210)',\n warning: 'oklch(0.78 0.12 75)',\n },\n light: {\n danger: 'oklch(0.68 0.19 25)',\n success: 'oklch(0.75 0.15 150)',\n info: 'oklch(0.78 0.12 210)',\n warning: 'oklch(0.78 0.12 75)',\n },\n} as const;\n\nexport const semanticInk = {\n dark: {\n danger: 'oklch(0.68 0.19 25)',\n success: 'oklch(0.75 0.15 150)',\n info: 'oklch(0.78 0.12 210)',\n warning: 'oklch(0.78 0.12 75)',\n },\n light: {\n danger: 'oklch(0.555 0.19 25)',\n success: 'oklch(0.515 0.14 150)',\n info: 'oklch(0.525 0.09 210)',\n warning: 'oklch(0.535 0.11 75)',\n },\n} as const;\n\nexport type ThemeMode = keyof typeof colors;\nexport type AccentName = keyof typeof accents;\nexport type ColorScheme = (typeof colors)[ThemeMode];\nexport type SemanticName = keyof (typeof semantic)['dark'];\n\nexport const themeModes = Object.keys(colors) as ThemeMode[];\nexport const accentNames = Object.keys(accents) as AccentName[];\n\nexport const DEFAULT_MODE: ThemeMode = 'dark';\nexport const DEFAULT_ACCENT: AccentName = 'cyan';\n","import { accents, type AccentName } from './colors';\n\n/**\n * Blog categories from the prototype. Categories render as a colored dot + label\n * (never an emoji). The pill also accepts any CSS color for whitelabel use.\n */\nexport type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';\n\nexport const defaultCategoryColors: Record<CategoryName, AccentName> = {\n ia: 'violet',\n prompt: 'amber',\n dev: 'mint',\n arch: 'cyan',\n ts: 'cyan',\n};\n\nconst hasOwn = <T extends object>(obj: T, key: string): key is Extract<keyof T, string> =>\n Object.prototype.hasOwnProperty.call(obj, key);\n\n/** Resolve an accent name or raw CSS color to a CSS color value. */\nexport function resolveAccentColor(color: AccentName | (string & {})): string {\n return hasOwn(accents, color) ? accents[color] : color;\n}\n\n/** Resolve a category name, accent name, or raw CSS color to a CSS color value. */\nexport function resolveCategoryColor(\n color: CategoryName | AccentName | (string & {}),\n): string {\n if (hasOwn(defaultCategoryColors, color)) {\n return accents[defaultCategoryColors[color]];\n }\n return resolveAccentColor(color);\n}\n","import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport {\n cardSkeleton,\n categoryPill,\n categoryPillClasses,\n featuredPostCard,\n featuredPostCardClasses,\n hero,\n heroClasses,\n layout,\n postCard,\n postCardClasses,\n postGrid,\n sidebar,\n sidebarClasses,\n skeletonLine,\n} from '../../recipes/content';\nimport { resolveCategoryColor } from '../../tokens/categories';\nimport type { PostSummary } from '../../types';\n\n/* All components in this file are Server Component safe. */\n\ninterface CategoryPillBaseProps {\n label: string;\n /** Accent name ('cyan'), category name ('ia'), or any CSS color. */\n color?: string;\n active?: boolean;\n}\n\nexport type CategoryPillProps =\n | (CategoryPillBaseProps & { interactive: true } & Omit<\n ComponentPropsWithoutRef<'button'>,\n 'color'\n >)\n | (CategoryPillBaseProps & { interactive?: false } & Omit<\n ComponentPropsWithoutRef<'span'>,\n 'color'\n >);\n\n/**\n * Categories render as a colored dot + label. When `interactive`, this is a\n * real <button> (toggle semantics via `aria-pressed`) — a `<span>` with a\n * pointer cursor is not operable by keyboard or assistive tech.\n */\nexport function CategoryPill({ label, color, active, interactive, className, style, ...rest }: CategoryPillProps) {\n const pillStyle: CSSProperties | undefined = color\n ? ({ ...style, '--sv-pill-color': resolveCategoryColor(color) } as CSSProperties)\n : style;\n const content = (\n <>\n <span className={categoryPillClasses.dot} aria-hidden=\"true\" />\n {label}\n </>\n );\n\n if (interactive) {\n return (\n <button\n type=\"button\"\n aria-pressed={active ?? false}\n className={cx(categoryPill({ active, interactive }), className)}\n style={pillStyle}\n {...(rest as ComponentPropsWithoutRef<'button'>)}\n >\n {content}\n </button>\n );\n }\n\n return (\n <span\n className={cx(categoryPill({ active, interactive }), className)}\n style={pillStyle}\n {...(rest as ComponentPropsWithoutRef<'span'>)}\n >\n {content}\n </span>\n );\n}\n\nfunction PostMeta({ post }: { post: PostSummary }) {\n if (!post.category && !post.date && post.readMinutes === undefined) return null;\n return (\n <div className={postCardClasses.meta}>\n {post.category && <CategoryPill label={post.category.label} color={post.category.color} />}\n {post.date && <span>{post.date}</span>}\n {post.readMinutes !== undefined && <span>{post.readMinutes} min</span>}\n </div>\n );\n}\n\nexport interface PostCardProps extends ComponentPropsWithoutRef<'article'> {\n post: PostSummary;\n dense?: boolean;\n}\n\nexport function PostCard({ post, dense, className, children, ...rest }: PostCardProps) {\n return (\n <article className={cx(postCard({ dense }), className)} {...rest}>\n <PostMeta post={post} />\n <h3 className={postCardClasses.title}>\n <a href={post.href}>{post.title}</a>\n </h3>\n {!dense && post.excerpt && <p className={postCardClasses.excerpt}>{post.excerpt}</p>}\n {children}\n </article>\n );\n}\n\nexport interface FeaturedPostCardProps extends ComponentPropsWithoutRef<'article'> {\n post: PostSummary;\n /** Custom visual slot (illustration, image). */\n visual?: ReactNode;\n}\n\nexport function FeaturedPostCard({ post, visual, className, children, ...rest }: FeaturedPostCardProps) {\n return (\n <article className={cx(featuredPostCard(), className)} {...rest}>\n <div className={featuredPostCardClasses.body}>\n <PostMeta post={post} />\n <h2 className={featuredPostCardClasses.title}>\n <a href={post.href}>{post.title}</a>\n </h2>\n {post.excerpt && <p className={postCardClasses.excerpt}>{post.excerpt}</p>}\n {children}\n </div>\n {visual && <div className={featuredPostCardClasses.visual}>{visual}</div>}\n </article>\n );\n}\n\nexport interface PostGridProps extends ComponentPropsWithoutRef<'div'> {}\n\nexport function PostGrid({ className, ...rest }: PostGridProps) {\n return <div className={cx(postGrid(), className)} {...rest} />;\n}\n\nexport interface LayoutProps extends ComponentPropsWithoutRef<'div'> {\n withSidebar?: boolean;\n}\n\nexport function Layout({ withSidebar, className, ...rest }: LayoutProps) {\n return <div className={cx(layout({ withSidebar }), className)} {...rest} />;\n}\n\nexport interface SidebarProps extends ComponentPropsWithoutRef<'aside'> {}\n\nexport function Sidebar({ className, ...rest }: SidebarProps) {\n return <aside className={cx(sidebar(), className)} {...rest} />;\n}\n\nexport interface SidebarSectionProps extends ComponentPropsWithoutRef<'section'> {\n title: string;\n}\n\nexport function SidebarSection({ title, children, ...rest }: SidebarSectionProps) {\n return (\n <section {...rest}>\n <h4 className={sidebarClasses.sectionTitle}>{title}</h4>\n {children}\n </section>\n );\n}\n\nexport interface HeroProps extends ComponentPropsWithoutRef<'section'> {\n eyebrow?: string;\n title: string;\n description?: string;\n}\n\nexport function Hero({ eyebrow, title, description, className, children, ...rest }: HeroProps) {\n return (\n <section className={cx(hero(), className)} {...rest}>\n {eyebrow && <span className={heroClasses.eyebrow}>{eyebrow}</span>}\n <h1 className={heroClasses.title}>{title}</h1>\n {description && <p className={heroClasses.description}>{description}</p>}\n {children}\n </section>\n );\n}\n\nexport interface SkeletonProps extends ComponentPropsWithoutRef<'div'> {\n small?: boolean;\n}\n\nexport function Skeleton({ small, className, ...rest }: SkeletonProps) {\n return <div className={cx(skeletonLine({ small }), className)} aria-hidden=\"true\" {...rest} />;\n}\n\nexport function CardSkeleton({ className, ...rest }: ComponentPropsWithoutRef<'div'>) {\n return (\n <div className={cx(cardSkeleton(), className)} aria-hidden=\"true\" {...rest}>\n <Skeleton small />\n <Skeleton />\n <Skeleton />\n </div>\n );\n}\n","import { cx } from './cx';\n\n/**\n * Article recipes: CodeBlock, Callout, TableOfContents, ReadingProgress,\n * ArticleHeader, Prose. Pure functions — Server Component safe.\n */\n\nexport function codeBlock(): string {\n return 'sv-code-block';\n}\n\nexport const codeBlockClasses = {\n header: 'sv-code-block__header',\n pre: 'sv-code-block__pre',\n copy: 'sv-code-block__copy',\n copyCopied: cx('sv-code-block__copy', 'sv-code-block__copy--copied'),\n} as const;\n\nexport type CalloutKind = 'note' | 'warn' | 'aha';\n\nexport function callout(kind: CalloutKind): string {\n return cx('sv-callout', `sv-callout--${kind}`);\n}\n\nexport const calloutClasses = {\n label: 'sv-callout__label',\n} as const;\n\nexport const calloutLabels: Record<CalloutKind, string> = {\n note: 'Note',\n warn: 'Warn',\n aha: 'Aha!',\n};\n\nexport function tableOfContents(): string {\n return 'sv-toc';\n}\n\nexport interface TocLinkOptions {\n active?: boolean;\n /** Heading depth, 2 (h2) or 3 (h3). Depth 3 indents. */\n depth?: 2 | 3;\n}\n\nexport function tocLink(options: TocLinkOptions = {}): string {\n return cx(\n 'sv-toc__link',\n options.active && 'sv-toc__link--active',\n options.depth === 3 && 'sv-toc__link--depth-3',\n );\n}\n\nexport function readingProgress(): string {\n return 'sv-reading-progress';\n}\n\nexport const readingProgressClasses = {\n bar: 'sv-reading-progress__bar',\n} as const;\n\n/** CSS var read by `.sv-reading-progress__bar` (0 → 1). */\nexport const READING_PROGRESS_VAR = '--sv-reading-progress';\n\nexport function articleHeader(): string {\n return 'sv-article-header';\n}\n\nexport const articleHeaderClasses = {\n title: 'sv-article-header__title',\n meta: 'sv-article-header__meta',\n author: 'sv-article-header__author',\n} as const;\n\nexport function prose(): string {\n return 'sv-prose';\n}\n\nexport const proseClasses = {\n lead: 'sv-prose__lead',\n} as const;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport { cx } from '../../recipes/cx';\nimport {\n articleHeader,\n articleHeaderClasses,\n callout,\n calloutClasses,\n calloutLabels,\n codeBlock,\n codeBlockClasses,\n prose,\n proseClasses,\n type CalloutKind,\n} from '../../recipes/article';\n\n/*\n * Article components are Server Component safe.\n * Interactive pieces (copy button, scroll spy) live in the client entry\n * and are composed in via slots.\n */\n\nexport interface CodeBlockProps extends ComponentPropsWithoutRef<'figure'> {\n /** Raw source shown when `rendered` is absent. */\n code: string;\n language?: string;\n filename?: string;\n /**\n * Pre-highlighted markup (e.g. Shiki output rendered on the server).\n * The prototype's regex tokenizer was demo-only and is intentionally\n * not part of the library.\n */\n rendered?: ReactNode;\n /** Header slot — pass <CopyButton code={code} /> from the client entry. */\n actions?: ReactNode;\n}\n\nexport function CodeBlock({\n code,\n language,\n filename,\n rendered,\n actions,\n className,\n ...rest\n}: CodeBlockProps) {\n return (\n <figure className={cx(codeBlock(), className)} {...rest}>\n <figcaption className={codeBlockClasses.header}>\n <span>{filename ?? language ?? 'code'}</span>\n {actions}\n </figcaption>\n <pre className={codeBlockClasses.pre}>\n {rendered ?? <code>{code}</code>}\n </pre>\n </figure>\n );\n}\n\nexport interface CalloutProps extends ComponentPropsWithoutRef<'aside'> {\n kind: CalloutKind;\n /** Override the default kind label. */\n label?: string;\n}\n\nexport function Callout({ kind, label, className, children, ...rest }: CalloutProps) {\n return (\n <aside className={cx(callout(kind), className)} {...rest}>\n <span className={calloutClasses.label}>{label ?? calloutLabels[kind]}</span>\n <div>{children}</div>\n </aside>\n );\n}\n\nexport interface ArticleHeaderProps extends ComponentPropsWithoutRef<'header'> {\n title: string;\n author?: string;\n date?: string;\n readMinutes?: number;\n /** Slot above the title — usually a <CategoryPill />. */\n eyebrow?: ReactNode;\n}\n\nexport function ArticleHeader({\n title,\n author,\n date,\n readMinutes,\n eyebrow,\n className,\n ...rest\n}: ArticleHeaderProps) {\n return (\n <header className={cx(articleHeader(), className)} {...rest}>\n {eyebrow}\n <h1 className={articleHeaderClasses.title}>{title}</h1>\n {(author || date || readMinutes !== undefined) && (\n <div className={articleHeaderClasses.meta}>\n {author && <span className={articleHeaderClasses.author}>{author}</span>}\n {date && <span>{date}</span>}\n {readMinutes !== undefined && <span>{readMinutes} min</span>}\n </div>\n )}\n </header>\n );\n}\n\nexport interface ProseProps extends ComponentPropsWithoutRef<'div'> {}\n\n/** Typography wrapper for article/MDX content. */\nexport function Prose({ className, ...rest }: ProseProps) {\n return <div className={cx(prose(), className)} {...rest} />;\n}\n\nexport interface LeadProps extends ComponentPropsWithoutRef<'p'> {}\n\n/** Lead paragraph inside <Prose>. */\nexport function Lead({ className, ...rest }: LeadProps) {\n return <p className={cx(proseClasses.lead, className)} {...rest} />;\n}\n","import {\n DEFAULT_ACCENT,\n DEFAULT_MODE,\n accentNames,\n themeModes,\n type AccentName,\n type ThemeMode,\n} from '../tokens/colors';\n\nexport interface ThemeState {\n mode: ThemeMode;\n accent: AccentName;\n}\n\nexport interface ThemeManagerOptions {\n /** Element receiving data-theme / data-accent. Defaults to <html>. */\n root?: HTMLElement;\n defaultMode?: ThemeMode;\n defaultAccent?: AccentName;\n /** localStorage key. Pass null to disable persistence. */\n storageKey?: string | null;\n}\n\nexport interface ThemeManager {\n getState: () => ThemeState;\n setMode: (mode: ThemeMode) => void;\n setAccent: (accent: AccentName) => void;\n toggleMode: () => void;\n subscribe: (listener: (state: ThemeState) => void) => () => void;\n destroy: () => void;\n}\n\nexport const DEFAULT_STORAGE_KEY = 'still-void-theme';\n\nfunction isMode(value: unknown): value is ThemeMode {\n return themeModes.includes(value as ThemeMode);\n}\n\nfunction isAccent(value: unknown): value is AccentName {\n return accentNames.includes(value as AccentName);\n}\n\nfunction readStorage(key: string): Partial<ThemeState> {\n try {\n const raw = window.localStorage.getItem(key);\n if (!raw) return {};\n const parsed: unknown = JSON.parse(raw);\n if (typeof parsed !== 'object' || parsed === null) return {};\n const { mode, accent } = parsed as Record<string, unknown>;\n return {\n ...(isMode(mode) ? { mode } : {}),\n ...(isAccent(accent) ? { accent } : {}),\n };\n } catch {\n return {};\n }\n}\n\n/**\n * Framework-agnostic theme controller. Applies `data-theme` and `data-accent`\n * attributes; theme.css does the rest via CSS vars. If the server already\n * rendered the attributes (RSC/SSR), those win over defaults, so there is\n * no flash of wrong theme.\n */\nexport function createThemeManager(options: ThemeManagerOptions = {}): ThemeManager {\n const root = options.root ?? document.documentElement;\n const storageKey = options.storageKey === null ? null : (options.storageKey ?? DEFAULT_STORAGE_KEY);\n\n const ssrMode = root.getAttribute('data-theme');\n const ssrAccent = root.getAttribute('data-accent');\n const stored = storageKey ? readStorage(storageKey) : {};\n\n let state: ThemeState = {\n mode: stored.mode ?? (isMode(ssrMode) ? ssrMode : (options.defaultMode ?? DEFAULT_MODE)),\n accent:\n stored.accent ?? (isAccent(ssrAccent) ? ssrAccent : (options.defaultAccent ?? DEFAULT_ACCENT)),\n };\n\n const listeners = new Set<(state: ThemeState) => void>();\n\n function apply(): void {\n root.setAttribute('data-theme', state.mode);\n root.setAttribute('data-accent', state.accent);\n if (storageKey) {\n try {\n window.localStorage.setItem(storageKey, JSON.stringify(state));\n } catch {\n // storage unavailable (private mode, quota) — theme still applies\n }\n }\n for (const listener of listeners) listener(state);\n }\n\n apply();\n\n return {\n getState: () => state,\n setMode(mode) {\n state = { ...state, mode };\n apply();\n },\n setAccent(accent) {\n state = { ...state, accent };\n apply();\n },\n toggleMode() {\n state = { ...state, mode: state.mode === 'dark' ? 'light' : 'dark' };\n apply();\n },\n subscribe(listener) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n destroy() {\n listeners.clear();\n },\n };\n}\n","import { DEFAULT_STORAGE_KEY } from '../../behaviors/themeManager';\nimport { accentNames, themeModes } from '../../tokens/colors';\n\nexport interface ThemeScriptProps {\n /** Must match the `storageKey` passed to `<ThemeProvider>` (or `createThemeManager`). */\n storageKey?: string;\n /** CSP nonce forwarded to the inline `<script>`. */\n nonce?: string;\n}\n\n/**\n * Render once, as early as possible in `<head>` or right after `<html>` opens\n * (before the rest of the document): a blocking inline script that applies a\n * stored theme preference to `<html>` before first paint.\n *\n * Without this, the first paint uses whatever `data-theme`/`data-accent` the\n * server rendered — `<ThemeProvider>` only reconciles localStorage on mount,\n * so a returning visitor who chose light mode sees a dark flash until\n * hydration. This component is server-safe (no hooks, no browser APIs at\n * render time) and can be composed inside `<html>` from a Server Component.\n */\n/**\n * `JSON.stringify` doesn't escape `<`, so a value containing `</script>`\n * (e.g. a `storageKey` derived from user input) would close the real\n * `<script>` tag early and let whatever follows run as raw HTML — a classic\n * JSON-in-script-tag XSS. `<` is a valid JS string escape the parser\n * decodes back to `<` at runtime, so this is purely a serialization-time\n * fix with no effect on the parsed value.\n */\nfunction toScriptLiteral(value: unknown): string {\n return JSON.stringify(value).replace(/</g, '\\\\u003c');\n}\n\nexport function ThemeScript({ storageKey = DEFAULT_STORAGE_KEY, nonce }: ThemeScriptProps = {}) {\n const modes = toScriptLiteral(themeModes);\n const accents = toScriptLiteral(accentNames);\n const key = toScriptLiteral(storageKey);\n\n const script = `(function(){try{var s=JSON.parse(localStorage.getItem(${key})||\"null\");if(!s)return;var m=${modes},a=${accents},r=document.documentElement;if(m.indexOf(s.mode)!==-1)r.setAttribute(\"data-theme\",s.mode);if(a.indexOf(s.accent)!==-1)r.setAttribute(\"data-accent\",s.accent);}catch(e){}})();`;\n\n // eslint-disable-next-line react/no-danger\n return <script nonce={nonce} dangerouslySetInnerHTML={{ __html: script }} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,SAAS,MAAM,OAAyD;AAC7E,SAAO,MAAM,OAAO,OAAO,EAAE,KAAK,GAAG;AACvC;;;ACUO,SAAS,OAAO,UAAyB,CAAC,GAAW;AAC1D,SAAO,GAAG,aAAa,QAAQ,UAAU,SAAS,UAAU;AAC9D;AAEO,IAAM,gBAAgB;AAAA,EAC3B,KAAK;AAAA,EACL,MAAM;AAAA,EACN,YAAY,GAAG,mBAAmB,yBAAyB;AAAA,EAC3D,SAAS;AACX;AAEO,SAAS,OAAe;AAC7B,SAAO;AACT;AAEO,IAAM,cAAc;AAAA,EACzB,KAAK;AACP;AAEO,SAAS,SAAiB;AAC/B,SAAO;AACT;AAEO,IAAM,gBAAgB;AAAA,EAC3B,OAAO;AAAA,EACP,MAAM;AACR;;;ACrBI;AAFG,SAAS,KAAK,EAAE,OAAO,OAAO,KAAK,WAAW,GAAG,KAAK,GAAc;AACzE,SACE,6CAAC,OAAE,MAAY,WAAW,GAAG,KAAK,GAAG,SAAS,GAAI,GAAG,MACnD;AAAA,gDAAC,UAAK,WAAW,YAAY,KAAK,eAAY,QAA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AAC,YAAO,OAAc,yBAAyB,EAAE,QAAQ,OAAO,GAAG;AAC5E;","names":["import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","accents"]}
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
3
- import { N as NavItem, P as PostSummary, C as CalloutKind } from '../article-CNQxbFAz.cjs';
4
- export { A as AccentName, T as ThemeMode, d as TocItem } from '../article-CNQxbFAz.cjs';
3
+ import { N as NavItem, P as PostSummary, C as CalloutKind } from '../article-Dl8rGW5l.cjs';
4
+ export { A as AccentName, T as ThemeMode, d as TocItem } from '../article-Dl8rGW5l.cjs';
5
5
 
6
6
  interface LogoProps extends ComponentPropsWithoutRef<'a'> {
7
7
  label: string;
@@ -25,13 +25,22 @@ interface FooterProps extends ComponentPropsWithoutRef<'footer'> {
25
25
  }
26
26
  declare function Footer({ author, links, children, className, ...rest }: FooterProps): react.JSX.Element;
27
27
 
28
- interface CategoryPillProps extends ComponentPropsWithoutRef<'span'> {
28
+ interface CategoryPillBaseProps {
29
29
  label: string;
30
30
  /** Accent name ('cyan'), category name ('ia'), or any CSS color. */
31
31
  color?: string;
32
32
  active?: boolean;
33
- interactive?: boolean;
34
33
  }
34
+ type CategoryPillProps = (CategoryPillBaseProps & {
35
+ interactive: true;
36
+ } & Omit<ComponentPropsWithoutRef<'button'>, 'color'>) | (CategoryPillBaseProps & {
37
+ interactive?: false;
38
+ } & Omit<ComponentPropsWithoutRef<'span'>, 'color'>);
39
+ /**
40
+ * Categories render as a colored dot + label. When `interactive`, this is a
41
+ * real <button> (toggle semantics via `aria-pressed`) — a `<span>` with a
42
+ * pointer cursor is not operable by keyboard or assistive tech.
43
+ */
35
44
  declare function CategoryPill({ label, color, active, interactive, className, style, ...rest }: CategoryPillProps): react.JSX.Element;
36
45
  interface PostCardProps extends ComponentPropsWithoutRef<'article'> {
37
46
  post: PostSummary;
@@ -109,4 +118,12 @@ interface LeadProps extends ComponentPropsWithoutRef<'p'> {
109
118
  /** Lead paragraph inside <Prose>. */
110
119
  declare function Lead({ className, ...rest }: LeadProps): react.JSX.Element;
111
120
 
112
- export { ArticleHeader, type ArticleHeaderProps, Callout, CalloutKind, type CalloutProps, CardSkeleton, CategoryPill, type CategoryPillProps, CodeBlock, type CodeBlockProps, FeaturedPostCard, type FeaturedPostCardProps, Footer, type FooterProps, Header, type HeaderProps, Hero, type HeroProps, Layout, type LayoutProps, Lead, type LeadProps, Logo, type LogoProps, NavItem, PostCard, type PostCardProps, PostGrid, type PostGridProps, PostSummary, Prose, type ProseProps, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps };
121
+ interface ThemeScriptProps {
122
+ /** Must match the `storageKey` passed to `<ThemeProvider>` (or `createThemeManager`). */
123
+ storageKey?: string;
124
+ /** CSP nonce forwarded to the inline `<script>`. */
125
+ nonce?: string;
126
+ }
127
+ declare function ThemeScript({ storageKey, nonce }?: ThemeScriptProps): react.JSX.Element;
128
+
129
+ export { ArticleHeader, type ArticleHeaderProps, Callout, CalloutKind, type CalloutProps, CardSkeleton, CategoryPill, type CategoryPillProps, CodeBlock, type CodeBlockProps, FeaturedPostCard, type FeaturedPostCardProps, Footer, type FooterProps, Header, type HeaderProps, Hero, type HeroProps, Layout, type LayoutProps, Lead, type LeadProps, Logo, type LogoProps, NavItem, PostCard, type PostCardProps, PostGrid, type PostGridProps, PostSummary, Prose, type ProseProps, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps, ThemeScript, type ThemeScriptProps };
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
3
- import { N as NavItem, P as PostSummary, C as CalloutKind } from '../article-CNQxbFAz.js';
4
- export { A as AccentName, T as ThemeMode, d as TocItem } from '../article-CNQxbFAz.js';
3
+ import { N as NavItem, P as PostSummary, C as CalloutKind } from '../article-Dl8rGW5l.js';
4
+ export { A as AccentName, T as ThemeMode, d as TocItem } from '../article-Dl8rGW5l.js';
5
5
 
6
6
  interface LogoProps extends ComponentPropsWithoutRef<'a'> {
7
7
  label: string;
@@ -25,13 +25,22 @@ interface FooterProps extends ComponentPropsWithoutRef<'footer'> {
25
25
  }
26
26
  declare function Footer({ author, links, children, className, ...rest }: FooterProps): react.JSX.Element;
27
27
 
28
- interface CategoryPillProps extends ComponentPropsWithoutRef<'span'> {
28
+ interface CategoryPillBaseProps {
29
29
  label: string;
30
30
  /** Accent name ('cyan'), category name ('ia'), or any CSS color. */
31
31
  color?: string;
32
32
  active?: boolean;
33
- interactive?: boolean;
34
33
  }
34
+ type CategoryPillProps = (CategoryPillBaseProps & {
35
+ interactive: true;
36
+ } & Omit<ComponentPropsWithoutRef<'button'>, 'color'>) | (CategoryPillBaseProps & {
37
+ interactive?: false;
38
+ } & Omit<ComponentPropsWithoutRef<'span'>, 'color'>);
39
+ /**
40
+ * Categories render as a colored dot + label. When `interactive`, this is a
41
+ * real <button> (toggle semantics via `aria-pressed`) — a `<span>` with a
42
+ * pointer cursor is not operable by keyboard or assistive tech.
43
+ */
35
44
  declare function CategoryPill({ label, color, active, interactive, className, style, ...rest }: CategoryPillProps): react.JSX.Element;
36
45
  interface PostCardProps extends ComponentPropsWithoutRef<'article'> {
37
46
  post: PostSummary;
@@ -109,4 +118,12 @@ interface LeadProps extends ComponentPropsWithoutRef<'p'> {
109
118
  /** Lead paragraph inside <Prose>. */
110
119
  declare function Lead({ className, ...rest }: LeadProps): react.JSX.Element;
111
120
 
112
- export { ArticleHeader, type ArticleHeaderProps, Callout, CalloutKind, type CalloutProps, CardSkeleton, CategoryPill, type CategoryPillProps, CodeBlock, type CodeBlockProps, FeaturedPostCard, type FeaturedPostCardProps, Footer, type FooterProps, Header, type HeaderProps, Hero, type HeroProps, Layout, type LayoutProps, Lead, type LeadProps, Logo, type LogoProps, NavItem, PostCard, type PostCardProps, PostGrid, type PostGridProps, PostSummary, Prose, type ProseProps, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps };
121
+ interface ThemeScriptProps {
122
+ /** Must match the `storageKey` passed to `<ThemeProvider>` (or `createThemeManager`). */
123
+ storageKey?: string;
124
+ /** CSP nonce forwarded to the inline `<script>`. */
125
+ nonce?: string;
126
+ }
127
+ declare function ThemeScript({ storageKey, nonce }?: ThemeScriptProps): react.JSX.Element;
128
+
129
+ export { ArticleHeader, type ArticleHeaderProps, Callout, CalloutKind, type CalloutProps, CardSkeleton, CategoryPill, type CategoryPillProps, CodeBlock, type CodeBlockProps, FeaturedPostCard, type FeaturedPostCardProps, Footer, type FooterProps, Header, type HeaderProps, Hero, type HeroProps, Layout, type LayoutProps, Lead, type LeadProps, Logo, type LogoProps, NavItem, PostCard, type PostCardProps, PostGrid, type PostGridProps, PostSummary, Prose, type ProseProps, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps, ThemeScript, type ThemeScriptProps };
@@ -5,26 +5,26 @@ function cx(...parts) {
5
5
 
6
6
  // src/recipes/shell.ts
7
7
  function header(options = {}) {
8
- return cx("qt-header", options.glass !== false && "qt-glass");
8
+ return cx("sv-header", options.glass !== false && "sv-glass");
9
9
  }
10
10
  var headerClasses = {
11
- nav: "qt-header__nav",
12
- link: "qt-header__link",
13
- linkActive: cx("qt-header__link", "qt-header__link--active"),
14
- actions: "qt-header__actions"
11
+ nav: "sv-header__nav",
12
+ link: "sv-header__link",
13
+ linkActive: cx("sv-header__link", "sv-header__link--active"),
14
+ actions: "sv-header__actions"
15
15
  };
16
16
  function logo() {
17
- return "qt-logo";
17
+ return "sv-logo";
18
18
  }
19
19
  var logoClasses = {
20
- dot: "qt-logo__dot"
20
+ dot: "sv-logo__dot"
21
21
  };
22
22
  function footer() {
23
- return "qt-footer";
23
+ return "sv-footer";
24
24
  }
25
25
  var footerClasses = {
26
- links: "qt-footer__links",
27
- link: "qt-footer__link"
26
+ links: "sv-footer__links",
27
+ link: "sv-footer__link"
28
28
  };
29
29
 
30
30
  // src/react/components/Shell.tsx
@@ -62,59 +62,59 @@ function Footer({ author, links = [], children, className, ...rest }) {
62
62
  // src/recipes/content.ts
63
63
  function categoryPill(options = {}) {
64
64
  return cx(
65
- "qt-pill",
66
- options.interactive && "qt-pill--interactive",
67
- options.active && "qt-pill--active"
65
+ "sv-pill",
66
+ options.interactive && "sv-pill--interactive",
67
+ options.active && "sv-pill--active"
68
68
  );
69
69
  }
70
70
  var categoryPillClasses = {
71
- dot: "qt-pill__dot"
71
+ dot: "sv-pill__dot"
72
72
  };
73
73
  function postCard(options = {}) {
74
74
  return cx(
75
- "qt-post-card",
76
- options.dense && "qt-post-card--dense",
77
- options.hover !== false && "qt-card-hover"
75
+ "sv-post-card",
76
+ options.dense && "sv-post-card--dense",
77
+ options.hover !== false && "sv-card-hover"
78
78
  );
79
79
  }
80
80
  var postCardClasses = {
81
- meta: "qt-post-card__meta",
82
- title: "qt-post-card__title",
83
- excerpt: "qt-post-card__excerpt"
81
+ meta: "sv-post-card__meta",
82
+ title: "sv-post-card__title",
83
+ excerpt: "sv-post-card__excerpt"
84
84
  };
85
85
  function featuredPostCard() {
86
- return cx("qt-featured-card", "qt-gradient-border", "qt-card-hover");
86
+ return cx("sv-featured-card", "sv-gradient-border", "sv-card-hover");
87
87
  }
88
88
  var featuredPostCardClasses = {
89
- body: "qt-featured-card__body",
90
- title: "qt-featured-card__title",
91
- visual: "qt-featured-card__visual"
89
+ body: "sv-featured-card__body",
90
+ title: "sv-featured-card__title",
91
+ visual: "sv-featured-card__visual"
92
92
  };
93
93
  function postGrid() {
94
- return "qt-post-grid";
94
+ return "sv-post-grid";
95
95
  }
96
96
  function layout(options = {}) {
97
- return cx("qt-layout", options.withSidebar && "qt-layout--with-sidebar");
97
+ return cx("sv-layout", options.withSidebar && "sv-layout--with-sidebar");
98
98
  }
99
99
  function sidebar() {
100
- return "qt-sidebar";
100
+ return "sv-sidebar";
101
101
  }
102
102
  var sidebarClasses = {
103
- sectionTitle: "qt-sidebar__section-title"
103
+ sectionTitle: "sv-sidebar__section-title"
104
104
  };
105
105
  function hero() {
106
- return "qt-hero";
106
+ return "sv-hero";
107
107
  }
108
108
  var heroClasses = {
109
- eyebrow: "qt-hero__eyebrow",
110
- title: "qt-hero__title",
111
- description: "qt-hero__description"
109
+ eyebrow: "sv-hero__eyebrow",
110
+ title: "sv-hero__title",
111
+ description: "sv-hero__description"
112
112
  };
113
113
  function skeletonLine(options = {}) {
114
- return cx("qt-skeleton", "qt-skeleton-line", options.small && "qt-skeleton-line--sm");
114
+ return cx("sv-skeleton", "sv-skeleton-line", options.small && "sv-skeleton-line--sm");
115
115
  }
116
116
  function cardSkeleton() {
117
- return "qt-card-skeleton";
117
+ return "sv-card-skeleton";
118
118
  }
119
119
 
120
120
  // src/tokens/colors.ts
@@ -142,7 +142,10 @@ var colors = {
142
142
  text: "#16161B",
143
143
  text2: "#5A5A66",
144
144
  // Corrected from #8B8B96 (~3.1:1 on white) to meet WCAG AA 4.5:1, same reasoning as dark.
145
- text3: "#6F6F78"
145
+ // A further step from #6F6F78 to #6D6D76: the first fix cleared white/paper (≥4.7:1) but
146
+ // was only ~4.44:1 against surface2 (#F2F2EF), the darkest of the light surfaces — still a
147
+ // failure. Verified against bg/bgElev/surface/surface2 together, not just one background.
148
+ text3: "#6D6D76"
146
149
  }
147
150
  };
148
151
  var accents = {
@@ -162,32 +165,47 @@ var defaultCategoryColors = {
162
165
  arch: "cyan",
163
166
  ts: "cyan"
164
167
  };
168
+ var hasOwn = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
165
169
  function resolveAccentColor(color) {
166
- return color in accents ? accents[color] : color;
170
+ return hasOwn(accents, color) ? accents[color] : color;
167
171
  }
168
172
  function resolveCategoryColor(color) {
169
- if (color in defaultCategoryColors) {
173
+ if (hasOwn(defaultCategoryColors, color)) {
170
174
  return accents[defaultCategoryColors[color]];
171
175
  }
172
176
  return resolveAccentColor(color);
173
177
  }
174
178
 
175
179
  // src/react/components/Content.tsx
176
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
177
- function CategoryPill({
178
- label,
179
- color,
180
- active,
181
- interactive,
182
- className,
183
- style,
184
- ...rest
185
- }) {
186
- const pillStyle = color ? { ...style, "--qt-pill-color": resolveCategoryColor(color) } : style;
187
- return /* @__PURE__ */ jsxs2("span", { className: cx(categoryPill({ active, interactive }), className), style: pillStyle, ...rest, children: [
180
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
181
+ function CategoryPill({ label, color, active, interactive, className, style, ...rest }) {
182
+ const pillStyle = color ? { ...style, "--sv-pill-color": resolveCategoryColor(color) } : style;
183
+ const content = /* @__PURE__ */ jsxs2(Fragment, { children: [
188
184
  /* @__PURE__ */ jsx2("span", { className: categoryPillClasses.dot, "aria-hidden": "true" }),
189
185
  label
190
186
  ] });
187
+ if (interactive) {
188
+ return /* @__PURE__ */ jsx2(
189
+ "button",
190
+ {
191
+ type: "button",
192
+ "aria-pressed": active ?? false,
193
+ className: cx(categoryPill({ active, interactive }), className),
194
+ style: pillStyle,
195
+ ...rest,
196
+ children: content
197
+ }
198
+ );
199
+ }
200
+ return /* @__PURE__ */ jsx2(
201
+ "span",
202
+ {
203
+ className: cx(categoryPill({ active, interactive }), className),
204
+ style: pillStyle,
205
+ ...rest,
206
+ children: content
207
+ }
208
+ );
191
209
  }
192
210
  function PostMeta({ post }) {
193
211
  if (!post.category && !post.date && post.readMinutes === void 0) return null;
@@ -255,19 +273,19 @@ function CardSkeleton({ className, ...rest }) {
255
273
 
256
274
  // src/recipes/article.ts
257
275
  function codeBlock() {
258
- return "qt-code-block";
276
+ return "sv-code-block";
259
277
  }
260
278
  var codeBlockClasses = {
261
- header: "qt-code-block__header",
262
- pre: "qt-code-block__pre",
263
- copy: "qt-code-block__copy",
264
- copyCopied: cx("qt-code-block__copy", "qt-code-block__copy--copied")
279
+ header: "sv-code-block__header",
280
+ pre: "sv-code-block__pre",
281
+ copy: "sv-code-block__copy",
282
+ copyCopied: cx("sv-code-block__copy", "sv-code-block__copy--copied")
265
283
  };
266
284
  function callout(kind) {
267
- return cx("qt-callout", `qt-callout--${kind}`);
285
+ return cx("sv-callout", `sv-callout--${kind}`);
268
286
  }
269
287
  var calloutClasses = {
270
- label: "qt-callout__label"
288
+ label: "sv-callout__label"
271
289
  };
272
290
  var calloutLabels = {
273
291
  note: "Note",
@@ -275,18 +293,18 @@ var calloutLabels = {
275
293
  aha: "Aha!"
276
294
  };
277
295
  function articleHeader() {
278
- return "qt-article-header";
296
+ return "sv-article-header";
279
297
  }
280
298
  var articleHeaderClasses = {
281
- title: "qt-article-header__title",
282
- meta: "qt-article-header__meta",
283
- author: "qt-article-header__author"
299
+ title: "sv-article-header__title",
300
+ meta: "sv-article-header__meta",
301
+ author: "sv-article-header__author"
284
302
  };
285
303
  function prose() {
286
- return "qt-prose";
304
+ return "sv-prose";
287
305
  }
288
306
  var proseClasses = {
289
- lead: "qt-prose__lead"
307
+ lead: "sv-prose__lead"
290
308
  };
291
309
 
292
310
  // src/react/components/Article.tsx
@@ -342,6 +360,22 @@ function Prose({ className, ...rest }) {
342
360
  function Lead({ className, ...rest }) {
343
361
  return /* @__PURE__ */ jsx3("p", { className: cx(proseClasses.lead, className), ...rest });
344
362
  }
363
+
364
+ // src/behaviors/themeManager.ts
365
+ var DEFAULT_STORAGE_KEY = "still-void-theme";
366
+
367
+ // src/react/components/ThemeScript.tsx
368
+ import { jsx as jsx4 } from "react/jsx-runtime";
369
+ function toScriptLiteral(value) {
370
+ return JSON.stringify(value).replace(/</g, "\\u003c");
371
+ }
372
+ function ThemeScript({ storageKey = DEFAULT_STORAGE_KEY, nonce } = {}) {
373
+ const modes = toScriptLiteral(themeModes);
374
+ const accents2 = toScriptLiteral(accentNames);
375
+ const key = toScriptLiteral(storageKey);
376
+ const script = `(function(){try{var s=JSON.parse(localStorage.getItem(${key})||"null");if(!s)return;var m=${modes},a=${accents2},r=document.documentElement;if(m.indexOf(s.mode)!==-1)r.setAttribute("data-theme",s.mode);if(a.indexOf(s.accent)!==-1)r.setAttribute("data-accent",s.accent);}catch(e){}})();`;
377
+ return /* @__PURE__ */ jsx4("script", { nonce, dangerouslySetInnerHTML: { __html: script } });
378
+ }
345
379
  export {
346
380
  ArticleHeader,
347
381
  Callout,
@@ -360,6 +394,7 @@ export {
360
394
  Prose,
361
395
  Sidebar,
362
396
  SidebarSection,
363
- Skeleton
397
+ Skeleton,
398
+ ThemeScript
364
399
  };
365
400
  //# sourceMappingURL=index.js.map