@still-void/ui 1.1.0 → 2.0.0

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/client/index.ts","../../../src/react/client/ThemeProvider.tsx","../../../src/tokens/colors.ts","../../../src/behaviors/themeManager.ts","../../../src/recipes/cx.ts","../../../src/react/client/ThemeToggle.tsx","../../../src/react/client/CopyButton.tsx","../../../src/behaviors/clipboard.ts","../../../src/recipes/article.ts","../../../src/react/client/TableOfContents.tsx","../../../src/react/client/hooks.ts","../../../src/behaviors/readingProgress.ts","../../../src/behaviors/scrollSpy.ts","../../../src/react/client/ReadingProgress.tsx"],"sourcesContent":["/**\n * @still-void/ui/react/client — Client Components.\n * The build prepends 'use client' to this entry; import from here only what\n * needs interactivity and compose into Server Components via slots.\n */\nexport * from './ThemeProvider';\nexport * from './ThemeToggle';\nexport * from './CopyButton';\nexport * from './TableOfContents';\nexport * from './ReadingProgress';\nexport * from './hooks';\n","import {\n createContext,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from 'react';\nimport {\n createThemeManager,\n type ThemeManager,\n type ThemeState,\n} from '../../behaviors/themeManager';\nimport {\n DEFAULT_ACCENT,\n DEFAULT_MODE,\n type AccentName,\n type ThemeMode,\n} from '../../tokens/colors';\n\nexport interface ThemeContextValue {\n mode: ThemeMode;\n accent: AccentName;\n setMode: (mode: ThemeMode) => void;\n setAccent: (accent: AccentName) => void;\n toggleMode: () => void;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n children: ReactNode;\n defaultMode?: ThemeMode;\n defaultAccent?: AccentName;\n /** localStorage key; null disables persistence. */\n storageKey?: string | null;\n}\n\n/**\n * Wraps the app and drives data-theme/data-accent on <html> via the\n * framework-agnostic theme manager. For zero-flash SSR, also render the\n * attributes on <html> in your root layout:\n * <html data-theme=\"dark\" data-accent=\"cyan\" suppressHydrationWarning>\n */\nexport function ThemeProvider({\n children,\n defaultMode = DEFAULT_MODE,\n defaultAccent = DEFAULT_ACCENT,\n storageKey,\n}: ThemeProviderProps) {\n const managerRef = useRef<ThemeManager | null>(null);\n const [state, setState] = useState<ThemeState>({ mode: defaultMode, accent: defaultAccent });\n\n useEffect(() => {\n const manager = createThemeManager({ defaultMode, defaultAccent, storageKey });\n managerRef.current = manager;\n setState(manager.getState());\n const unsubscribe = manager.subscribe(setState);\n return () => {\n unsubscribe();\n manager.destroy();\n managerRef.current = null;\n };\n // Recreating the manager on default changes would clobber user choice.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const value = useMemo<ThemeContextValue>(\n () => ({\n mode: state.mode,\n accent: state.accent,\n setMode: (mode) => managerRef.current?.setMode(mode),\n setAccent: (accent) => managerRef.current?.setAccent(accent),\n toggleMode: () => managerRef.current?.toggleMode(),\n }),\n [state],\n );\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme(): ThemeContextValue {\n const ctx = useContext(ThemeContext);\n if (!ctx) throw new Error('useTheme must be used within ThemeProvider');\n return ctx;\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 {\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","/** 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 type { ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { useTheme } from './ThemeProvider';\n\nexport interface ThemeToggleProps extends ComponentPropsWithoutRef<'button'> {}\n\n/** Dark/light toggle. Compose into <Header actions={...} />. */\nexport function ThemeToggle({ className, ...rest }: ThemeToggleProps) {\n const { mode, toggleMode } = useTheme();\n const next = mode === 'dark' ? 'light' : 'dark';\n return (\n <button\n type=\"button\"\n onClick={toggleMode}\n className={cx('sv-header__link', className)}\n aria-label={`Switch to ${next} theme`}\n {...rest}\n >\n {mode === 'dark' ? 'Light' : 'Dark'}\n </button>\n );\n}\n","import { useEffect, useRef, useState, type ComponentPropsWithoutRef } from 'react';\nimport { copyToClipboard } from '../../behaviors/clipboard';\nimport { codeBlockClasses } from '../../recipes/article';\nimport { cx } from '../../recipes/cx';\n\nconst COPIED_FEEDBACK_MS = 2000;\n\nexport interface CopyButtonProps extends ComponentPropsWithoutRef<'button'> {\n /** Text copied to the clipboard. */\n code: string;\n label?: string;\n copiedLabel?: string;\n}\n\n/** Copy-to-clipboard button for <CodeBlock actions={...} />. */\nexport function CopyButton({\n code,\n label = 'Copy',\n copiedLabel = 'Copied',\n className,\n ...rest\n}: CopyButtonProps) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n async function handleCopy(): Promise<void> {\n const ok = await copyToClipboard(code);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), COPIED_FEEDBACK_MS);\n }\n\n return (\n <button\n type=\"button\"\n onClick={handleCopy}\n className={cx(copied ? codeBlockClasses.copyCopied : codeBlockClasses.copy, className)}\n aria-live=\"polite\"\n {...rest}\n >\n {copied ? copiedLabel : label}\n </button>\n );\n}\n","/** Copy text to the clipboard. Returns false when the Clipboard API is unavailable or denied. */\nexport async function copyToClipboard(text: string): Promise<boolean> {\n if (!navigator.clipboard?.writeText) return false;\n try {\n await navigator.clipboard.writeText(text);\n return true;\n } catch {\n return false;\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 { useMemo, type ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { tableOfContents, tocLink } from '../../recipes/article';\nimport type { TocItem } from '../../types';\nimport { useScrollSpy } from './hooks';\n\nexport interface TableOfContentsProps extends ComponentPropsWithoutRef<'nav'> {\n items: TocItem[];\n /** IntersectionObserver rootMargin override. */\n rootMargin?: string;\n}\n\n/** Article table of contents with scroll-spy active state. */\nexport function TableOfContents({ items, rootMargin, className, ...rest }: TableOfContentsProps) {\n const ids = useMemo(() => items.map((item) => item.id), [items]);\n const activeId = useScrollSpy(ids, rootMargin);\n\n return (\n <nav className={cx(tableOfContents(), className)} aria-label=\"Table of contents\" {...rest}>\n {items.map((item) => (\n <a\n key={item.id}\n href={`#${item.id}`}\n className={tocLink({ active: item.id === activeId, depth: item.depth })}\n aria-current={item.id === activeId ? 'true' : undefined}\n >\n {item.label}\n </a>\n ))}\n </nav>\n );\n}\n","import { useEffect, useState } from 'react';\nimport { createReadingProgress } from '../../behaviors/readingProgress';\nimport { createScrollSpy } from '../../behaviors/scrollSpy';\n\n/** Reports which heading id is currently active while scrolling. */\nexport function useScrollSpy(ids: readonly string[], rootMargin?: string): string | null {\n const [activeId, setActiveId] = useState<string | null>(null);\n const key = ids.join('|');\n\n useEffect(() => {\n const spy = createScrollSpy(ids, { onChange: setActiveId, rootMargin });\n return () => spy.destroy();\n // `key` captures ids content; the array identity itself may change per render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key, rootMargin]);\n\n return activeId;\n}\n\n/**\n * Reading progress of the page (or target element), in [0, 1].\n *\n * The visual bar is driven by the `--sv-reading-progress` CSS var (written on\n * every rAF-throttled scroll tick regardless of this hook), so React state\n * only needs to update when the *reported* value's bucket changes — not on\n * every scroll frame. `step` sets the bucket size; the default (1, i.e. only\n * the 0 and 1 buckets) keeps re-renders to a couple per page for consumers\n * that don't need the numeric value, while `announce` on `<ReadingProgress>`\n * passes 0.1 for a coarse 10%-step live value.\n */\nexport function useReadingProgress(target?: HTMLElement | null, step = 1): number {\n const [percent, setPercent] = useState(0);\n\n useEffect(() => {\n const progress = createReadingProgress({\n target: target ?? undefined,\n onChange: (value) => {\n const bucket = step > 0 ? Math.round(value / step) * step : value;\n setPercent((prev) => (prev === bucket ? prev : bucket));\n },\n });\n return () => progress.destroy();\n }, [target, step]);\n\n return percent;\n}\n","import { READING_PROGRESS_VAR } from '../recipes/article';\n\n// jsdom (used in tests) doesn't implement requestAnimationFrame; fall back to\n// a timer so the throttling logic stays testable outside a real browser.\nconst raf: (cb: () => void) => number =\n typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function'\n ? (cb) => window.requestAnimationFrame(cb)\n : (cb) => setTimeout(cb, 16) as unknown as number;\nconst cancelRaf: (id: number) => void =\n typeof window !== 'undefined' && typeof window.cancelAnimationFrame === 'function'\n ? (id) => window.cancelAnimationFrame(id)\n : (id) => clearTimeout(id as unknown as ReturnType<typeof setTimeout>);\n\nexport interface ReadingProgressOptions {\n /** Element whose scroll extent defines 100%. Defaults to the document. */\n target?: HTMLElement;\n /** Receives progress in [0, 1]. */\n onChange?: (percent: number) => void;\n /** Element that receives the CSS var (default: <html>). Pass null to skip. */\n varTarget?: HTMLElement | null;\n}\n\nexport interface ReadingProgress {\n getPercent: () => number;\n destroy: () => void;\n}\n\n/**\n * Tracks document (or element) reading progress. Writes the\n * `--sv-reading-progress` CSS var consumed by `.sv-reading-progress__bar`.\n */\nexport function createReadingProgress(options: ReadingProgressOptions = {}): ReadingProgress {\n const varTarget =\n options.varTarget === null ? null : (options.varTarget ?? document.documentElement);\n let percent = 0;\n\n function measure(): number {\n if (options.target) {\n const rect = options.target.getBoundingClientRect();\n const viewport = window.innerHeight;\n const total = rect.height - viewport;\n if (total <= 0) return 1;\n return Math.min(1, Math.max(0, -rect.top / total));\n }\n const doc = document.documentElement;\n const total = doc.scrollHeight - window.innerHeight;\n if (total <= 0) return 1;\n return Math.min(1, Math.max(0, window.scrollY / total));\n }\n\n function update(): void {\n percent = measure();\n varTarget?.style.setProperty(READING_PROGRESS_VAR, String(percent));\n options.onChange?.(percent);\n }\n\n // Coalesce scroll/resize bursts into one measurement per animation frame —\n // without this, `measure()` (a forced layout read) runs once per event.\n let frame: number | null = null;\n function onFrame(): void {\n frame = null;\n update();\n }\n function schedule(): void {\n if (frame !== null) return;\n frame = raf(onFrame);\n }\n\n update();\n window.addEventListener('scroll', schedule, { passive: true });\n window.addEventListener('resize', schedule, { passive: true });\n\n return {\n getPercent: () => percent,\n destroy() {\n window.removeEventListener('scroll', schedule);\n window.removeEventListener('resize', schedule);\n if (frame !== null) cancelRaf(frame);\n },\n };\n}\n","export interface ScrollSpyOptions {\n /** Called whenever the active heading changes. `null` when none is visible. */\n onChange: (activeId: string | null) => void;\n /** Forwarded to IntersectionObserver. Default biases toward the reading line. */\n rootMargin?: string;\n threshold?: number | number[];\n}\n\nexport interface ScrollSpy {\n destroy: () => void;\n}\n\n/**\n * Watches headings by id and reports which one is active.\n * Framework-agnostic core used by the React TableOfContents.\n */\nexport function createScrollSpy(ids: readonly string[], options: ScrollSpyOptions): ScrollSpy {\n const visible = new Map<string, number>();\n\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n visible.set(entry.target.id, entry.intersectionRatio);\n } else {\n visible.delete(entry.target.id);\n }\n }\n // First visible id in document order wins.\n const active = ids.find((id) => visible.has(id)) ?? null;\n options.onChange(active);\n },\n {\n rootMargin: options.rootMargin ?? '0px 0px -70% 0px',\n threshold: options.threshold ?? 0,\n },\n );\n\n for (const id of ids) {\n const el = document.getElementById(id);\n if (el) observer.observe(el);\n }\n\n return {\n destroy: () => observer.disconnect(),\n };\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { readingProgress, readingProgressClasses } from '../../recipes/article';\nimport { useReadingProgress } from './hooks';\n\nexport interface ReadingProgressProps extends ComponentPropsWithoutRef<'div'> {\n /** Element whose scroll extent defines 100%. Defaults to the document. */\n target?: HTMLElement | null;\n /**\n * Expose progress to assistive tech as a live `role=\"progressbar\"`,\n * updated in coarse 10% steps. Off by default: the bar is a visual aid for\n * a value the user already has (their own scroll position), and a value\n * that changes continuously during scroll would otherwise spam screen\n * readers with `aria-valuenow` updates.\n */\n announce?: boolean;\n}\n\n/**\n * Fixed top progress bar. Motion is linear by spec. The fill is driven by\n * the `--sv-reading-progress` CSS var (see style.css), not React state, so\n * scrolling doesn't re-render this component on every frame.\n */\nexport function ReadingProgress({ target, announce, className, ...rest }: ReadingProgressProps) {\n const percent = useReadingProgress(target, announce ? 0.1 : 1);\n const a11yProps = announce\n ? {\n role: 'progressbar' as const,\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n 'aria-valuenow': Math.round(percent * 100),\n 'aria-label': 'Reading progress',\n }\n : { 'aria-hidden': true as const };\n\n return (\n <div className={cx(readingProgress(), className)} {...a11yProps} {...rest}>\n <div className={readingProgressClasses.bar} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAQO;;;ACHA,IAAM,SAAS;AAAA,EACpB,MAAM;AAAA,IACJ,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA;AAAA;AAAA,IAGP,OAAO;AAAA,EACT;AAAA,EACA,OAAO;AAAA,IACL,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKP,OAAO;AAAA,EACT;AACF;AAEO,IAAM,UAAU;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT;AAkEO,IAAM,aAAa,OAAO,KAAK,MAAM;AACrC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import_jsx_runtime","import_react","import_react","total","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/react/client/index.ts","../../../src/react/client/ThemeProvider.tsx","../../../src/tokens/colors.ts","../../../src/behaviors/themeManager.ts","../../../src/recipes/cx.ts","../../../src/react/client/ThemeToggle.tsx","../../../src/react/client/CopyButton.tsx","../../../src/behaviors/clipboard.ts","../../../src/recipes/article.ts","../../../src/react/client/TableOfContents.tsx","../../../src/react/client/hooks.ts","../../../src/behaviors/readingProgress.ts","../../../src/behaviors/scrollSpy.ts","../../../src/react/client/ReadingProgress.tsx","../../../src/components/ui/dialog.tsx","../../../src/lib/utils.ts","../../../src/components/ui/select.tsx","../../../src/components/ui/dropdown-menu.tsx","../../../src/components/ui/tabs.tsx","../../../src/components/ui/tooltip.tsx"],"sourcesContent":["/**\n * @still-void/ui/react/client — Client Components.\n * The build prepends 'use client' to this entry; import from here only what\n * needs interactivity and compose into Server Components via slots.\n */\nexport * from './ThemeProvider';\nexport * from './ThemeToggle';\nexport * from './CopyButton';\nexport * from './TableOfContents';\nexport * from './ReadingProgress';\nexport * from './hooks';\n\n// Client-only shadcn/ui components (require state, browser APIs, Radix UI interactivity)\nexport * from './shadcn';\n\n// DOM/localStorage behaviors — client-only.\nexport * from '../../behaviors/themeManager';\nexport * from '../../behaviors/scrollSpy';\nexport {\n createReadingProgress,\n type ReadingProgressOptions,\n type ReadingProgress as ReadingProgressController,\n} from '../../behaviors/readingProgress';\nexport * from '../../behaviors/clipboard';\n","import {\n createContext,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from 'react';\nimport {\n createThemeManager,\n type ThemeManager,\n type ThemeState,\n} from '../../behaviors/themeManager';\nimport {\n DEFAULT_ACCENT,\n DEFAULT_MODE,\n type AccentName,\n type ThemeMode,\n} from '../../tokens/colors';\n\nexport interface ThemeContextValue {\n mode: ThemeMode;\n accent: AccentName;\n setMode: (mode: ThemeMode) => void;\n setAccent: (accent: AccentName) => void;\n toggleMode: () => void;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n children: ReactNode;\n defaultMode?: ThemeMode;\n defaultAccent?: AccentName;\n /** localStorage key; null disables persistence. */\n storageKey?: string | null;\n}\n\n/**\n * Wraps the app and drives data-theme/data-accent on <html> via the\n * framework-agnostic theme manager. For zero-flash SSR, also render the\n * attributes on <html> in your root layout:\n * <html data-theme=\"dark\" data-accent=\"cyan\" suppressHydrationWarning>\n */\nexport function ThemeProvider({\n children,\n defaultMode = DEFAULT_MODE,\n defaultAccent = DEFAULT_ACCENT,\n storageKey,\n}: ThemeProviderProps) {\n const managerRef = useRef<ThemeManager | null>(null);\n const [state, setState] = useState<ThemeState>({ mode: defaultMode, accent: defaultAccent });\n\n useEffect(() => {\n const manager = createThemeManager({ defaultMode, defaultAccent, storageKey });\n managerRef.current = manager;\n setState(manager.getState());\n const unsubscribe = manager.subscribe(setState);\n return () => {\n unsubscribe();\n manager.destroy();\n managerRef.current = null;\n };\n // Recreating the manager on default changes would clobber user choice.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const value = useMemo<ThemeContextValue>(\n () => ({\n mode: state.mode,\n accent: state.accent,\n setMode: (mode) => managerRef.current?.setMode(mode),\n setAccent: (accent) => managerRef.current?.setAccent(accent),\n toggleMode: () => managerRef.current?.toggleMode(),\n }),\n [state],\n );\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme(): ThemeContextValue {\n const ctx = useContext(ThemeContext);\n if (!ctx) throw new Error('useTheme must be used within ThemeProvider');\n return ctx;\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 {\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","/** 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 type { ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { useTheme } from './ThemeProvider';\n\nexport interface ThemeToggleProps extends ComponentPropsWithoutRef<'button'> {}\n\n/** Dark/light toggle. Compose into <Header actions={...} />. */\nexport function ThemeToggle({ className, ...rest }: ThemeToggleProps) {\n const { mode, toggleMode } = useTheme();\n const next = mode === 'dark' ? 'light' : 'dark';\n return (\n <button\n type=\"button\"\n onClick={toggleMode}\n className={cx('sv-header__link', className)}\n aria-label={`Switch to ${next} theme`}\n {...rest}\n >\n {mode === 'dark' ? 'Light' : 'Dark'}\n </button>\n );\n}\n","import { useEffect, useRef, useState, type ComponentPropsWithoutRef } from 'react';\nimport { copyToClipboard } from '../../behaviors/clipboard';\nimport { codeBlockClasses } from '../../recipes/article';\nimport { cx } from '../../recipes/cx';\n\nconst COPIED_FEEDBACK_MS = 2000;\n\nexport interface CopyButtonProps extends ComponentPropsWithoutRef<'button'> {\n /** Text copied to the clipboard. */\n code: string;\n label?: string;\n copiedLabel?: string;\n}\n\n/** Copy-to-clipboard button for <CodeBlock actions={...} />. */\nexport function CopyButton({\n code,\n label = 'Copy',\n copiedLabel = 'Copied',\n className,\n ...rest\n}: CopyButtonProps) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n async function handleCopy(): Promise<void> {\n const ok = await copyToClipboard(code);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), COPIED_FEEDBACK_MS);\n }\n\n return (\n <button\n type=\"button\"\n onClick={handleCopy}\n className={cx(copied ? codeBlockClasses.copyCopied : codeBlockClasses.copy, className)}\n aria-live=\"polite\"\n {...rest}\n >\n {copied ? copiedLabel : label}\n </button>\n );\n}\n","/** Copy text to the clipboard. Returns false when the Clipboard API is unavailable or denied. */\nexport async function copyToClipboard(text: string): Promise<boolean> {\n if (typeof navigator === 'undefined' || !navigator.clipboard?.writeText) return false;\n try {\n await navigator.clipboard.writeText(text);\n return true;\n } catch {\n return false;\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 { useMemo, type ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { tableOfContents, tocLink } from '../../recipes/article';\nimport type { TocItem } from '../../types';\nimport { useScrollSpy } from './hooks';\n\nexport interface TableOfContentsProps extends ComponentPropsWithoutRef<'nav'> {\n items: TocItem[];\n /** IntersectionObserver rootMargin override. */\n rootMargin?: string;\n}\n\n/** Article table of contents with scroll-spy active state. */\nexport function TableOfContents({ items, rootMargin, className, ...rest }: TableOfContentsProps) {\n const ids = useMemo(() => items.map((item) => item.id), [items]);\n const activeId = useScrollSpy(ids, rootMargin);\n\n return (\n <nav className={cx(tableOfContents(), className)} aria-label=\"Table of contents\" {...rest}>\n {items.map((item) => (\n <a\n key={item.id}\n href={`#${item.id}`}\n className={tocLink({ active: item.id === activeId, depth: item.depth })}\n aria-current={item.id === activeId ? 'true' : undefined}\n >\n {item.label}\n </a>\n ))}\n </nav>\n );\n}\n","import { useEffect, useState } from 'react';\nimport { createReadingProgress } from '../../behaviors/readingProgress';\nimport { createScrollSpy } from '../../behaviors/scrollSpy';\n\n/** Reports which heading id is currently active while scrolling. */\nexport function useScrollSpy(ids: readonly string[], rootMargin?: string): string | null {\n const [activeId, setActiveId] = useState<string | null>(null);\n const key = ids.join('|');\n\n useEffect(() => {\n const spy = createScrollSpy(ids, { onChange: setActiveId, rootMargin });\n return () => spy.destroy();\n // `key` captures ids content; the array identity itself may change per render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key, rootMargin]);\n\n return activeId;\n}\n\n/**\n * Reading progress of the page (or target element), in [0, 1].\n *\n * The visual bar is driven by the `--sv-reading-progress` CSS var (written on\n * every rAF-throttled scroll tick regardless of this hook), so React state\n * only needs to update when the *reported* value's bucket changes — not on\n * every scroll frame. `step` sets the bucket size; the default (1, i.e. only\n * the 0 and 1 buckets) keeps re-renders to a couple per page for consumers\n * that don't need the numeric value, while `announce` on `<ReadingProgress>`\n * passes 0.1 for a coarse 10%-step live value.\n */\nexport function useReadingProgress(target?: HTMLElement | null, step = 1): number {\n const [percent, setPercent] = useState(0);\n\n useEffect(() => {\n const progress = createReadingProgress({\n target: target ?? undefined,\n onChange: (value) => {\n const bucket = step > 0 ? Math.round(value / step) * step : value;\n setPercent((prev) => (prev === bucket ? prev : bucket));\n },\n });\n return () => progress.destroy();\n }, [target, step]);\n\n return percent;\n}\n","import { READING_PROGRESS_VAR } from '../recipes/article';\n\n// Guards against environments without requestAnimationFrame (e.g. this module\n// evaluated at import time outside a browser/jsdom window) by falling back to\n// a timer. Modern jsdom (the test environment here) does implement rAF, so\n// the fallback branch below is not exercised by this suite — verified\n// unreachable-in-tests, not untested application logic.\nconst raf: (cb: () => void) => number =\n typeof window !== 'undefined' && typeof window.requestAnimationFrame === 'function'\n ? (cb) => window.requestAnimationFrame(cb)\n : /* v8 ignore next */ (cb) => setTimeout(cb, 16) as unknown as number;\nconst cancelRaf: (id: number) => void =\n typeof window !== 'undefined' && typeof window.cancelAnimationFrame === 'function'\n ? (id) => window.cancelAnimationFrame(id)\n : /* v8 ignore next */ (id) => clearTimeout(id as unknown as ReturnType<typeof setTimeout>);\n\nexport interface ReadingProgressOptions {\n /** Element whose scroll extent defines 100%. Defaults to the document. */\n target?: HTMLElement;\n /** Receives progress in [0, 1]. */\n onChange?: (percent: number) => void;\n /** Element that receives the CSS var (default: <html>). Pass null to skip. */\n varTarget?: HTMLElement | null;\n}\n\nexport interface ReadingProgress {\n getPercent: () => number;\n destroy: () => void;\n}\n\n/**\n * Tracks document (or element) reading progress. Writes the\n * `--sv-reading-progress` CSS var consumed by `.sv-reading-progress__bar`.\n */\nexport function createReadingProgress(options: ReadingProgressOptions = {}): ReadingProgress {\n const varTarget =\n options.varTarget === null ? null : (options.varTarget ?? document.documentElement);\n let percent = 0;\n\n function measure(): number {\n if (options.target) {\n const rect = options.target.getBoundingClientRect();\n const viewport = window.innerHeight;\n const total = rect.height - viewport;\n if (total <= 0) return 1;\n return Math.min(1, Math.max(0, -rect.top / total));\n }\n const doc = document.documentElement;\n const total = doc.scrollHeight - window.innerHeight;\n if (total <= 0) return 1;\n return Math.min(1, Math.max(0, window.scrollY / total));\n }\n\n function update(): void {\n percent = measure();\n varTarget?.style.setProperty(READING_PROGRESS_VAR, String(percent));\n options.onChange?.(percent);\n }\n\n // Coalesce scroll/resize bursts into one measurement per animation frame —\n // without this, `measure()` (a forced layout read) runs once per event.\n let frame: number | null = null;\n function onFrame(): void {\n frame = null;\n update();\n }\n function schedule(): void {\n if (frame !== null) return;\n frame = raf(onFrame);\n }\n\n update();\n window.addEventListener('scroll', schedule, { passive: true });\n window.addEventListener('resize', schedule, { passive: true });\n\n return {\n getPercent: () => percent,\n destroy() {\n window.removeEventListener('scroll', schedule);\n window.removeEventListener('resize', schedule);\n if (frame !== null) cancelRaf(frame);\n },\n };\n}\n","export interface ScrollSpyOptions {\n /** Called whenever the active heading changes. `null` when none is visible. */\n onChange: (activeId: string | null) => void;\n /** Forwarded to IntersectionObserver. Default biases toward the reading line. */\n rootMargin?: string;\n threshold?: number | number[];\n}\n\nexport interface ScrollSpy {\n destroy: () => void;\n}\n\n/**\n * Watches headings by id and reports which one is active.\n * Framework-agnostic core used by the React TableOfContents.\n */\nexport function createScrollSpy(ids: readonly string[], options: ScrollSpyOptions): ScrollSpy {\n const visible = new Map<string, number>();\n\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n visible.set(entry.target.id, entry.intersectionRatio);\n } else {\n visible.delete(entry.target.id);\n }\n }\n // First visible id in document order wins.\n const active = ids.find((id) => visible.has(id)) ?? null;\n options.onChange(active);\n },\n {\n rootMargin: options.rootMargin ?? '0px 0px -70% 0px',\n threshold: options.threshold ?? 0,\n },\n );\n\n for (const id of ids) {\n const el = document.getElementById(id);\n if (el) observer.observe(el);\n }\n\n return {\n destroy: () => observer.disconnect(),\n };\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport { cx } from '../../recipes/cx';\nimport { readingProgress, readingProgressClasses } from '../../recipes/article';\nimport { useReadingProgress } from './hooks';\n\nexport interface ReadingProgressProps extends ComponentPropsWithoutRef<'div'> {\n /** Element whose scroll extent defines 100%. Defaults to the document. */\n target?: HTMLElement | null;\n /**\n * Expose progress to assistive tech as a live `role=\"progressbar\"`,\n * updated in coarse 10% steps. Off by default: the bar is a visual aid for\n * a value the user already has (their own scroll position), and a value\n * that changes continuously during scroll would otherwise spam screen\n * readers with `aria-valuenow` updates.\n */\n announce?: boolean;\n}\n\n/**\n * Fixed top progress bar. Motion is linear by spec. The fill is driven by\n * the `--sv-reading-progress` CSS var (see style.css), not React state, so\n * scrolling doesn't re-render this component on every frame.\n */\nexport function ReadingProgress({ target, announce, className, ...rest }: ReadingProgressProps) {\n const percent = useReadingProgress(target, announce ? 0.1 : 1);\n const a11yProps = announce\n ? {\n role: 'progressbar' as const,\n 'aria-valuemin': 0,\n 'aria-valuemax': 100,\n 'aria-valuenow': Math.round(percent * 100),\n 'aria-label': 'Reading progress',\n }\n : { 'aria-hidden': true as const };\n\n return (\n <div className={cx(readingProgress(), className)} {...a11yProps} {...rest}>\n <div className={readingProgressClasses.bar} />\n </div>\n );\n}\n","import * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { cn } from \"../../lib/utils\"\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-sv-border bg-sv-surface p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className\n )}\n {...props}\n />\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-sv-text-2\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport * as SelectPrimitive from \"@radix-ui/react-select\"\nimport { cn } from \"../../lib/utils\"\n\nconst Select = SelectPrimitive.Root\nconst SelectGroup = SelectPrimitive.Group\nconst SelectValue = SelectPrimitive.Value\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-10 w-full items-center justify-between rounded-md border border-sv-border bg-sv-surface px-3 py-2 text-sm ring-offset-background placeholder:text-sv-text-2 focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className\n )}\n {...props}\n />\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-pointer items-center justify-center py-1\",\n className\n )}\n {...props}\n />\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-pointer items-center justify-center py-1\",\n className\n )}\n {...props}\n />\n))\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-sv-border bg-sv-surface text-sv-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-sv-surface-2 focus:text-sv-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n />\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n {...props}\n />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-sv-border\", className)}\n {...props}\n />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectItem,\n SelectLabel,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n}\n","import * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { cn } from \"../../lib/utils\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm font-medium outline-none focus:bg-sv-surface data-[state=open]:bg-sv-surface-2\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"min-w-[8rem] overflow-hidden rounded-md border border-sv-border bg-sv-surface p-1 text-sv-text\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"min-w-[8rem] overflow-hidden rounded-md border border-sv-border bg-sv-surface p-1 text-sv-text\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-sv-surface-2 focus:text-sv-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-sv-surface-2 focus:text-sv-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-sv-surface-2 focus:text-sv-text data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-sv-border\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n)\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n","import * as React from \"react\"\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\"\nimport { cn } from \"../../lib/utils\"\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n \"inline-flex h-10 items-center justify-center rounded-md bg-sv-surface-2 p-1 text-sv-text-2\",\n className\n )}\n {...props}\n />\n))\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-sv-surface data-[state=active]:text-sv-text data-[state=active]:shadow-sm\",\n className\n )}\n {...props}\n />\n))\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\nimport { cn } from \"../../lib/utils\"\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md border border-sv-border bg-sv-surface px-3 py-1.5 text-sm text-sv-text animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAQO;;;ACHA,IAAM,SAAS;AAAA,EACpB,MAAM;AAAA,IACJ,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA;AAAA;AAAA,IAGP,OAAO;AAAA,EACT;AAAA,EACA,OAAO;AAAA,IACL,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,MAAM;AAAA,IACN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKP,OAAO;AAAA,EACT;AACF;AAEO,IAAM,UAAU;AAAA,EACrB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT;AAkEO,IAAM,aAAa,OAAO,KAAK,MAAM;AACrC,IAA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,cAAoB,kBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAe;AAAA,EAAd;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAA4B,sBAAQ;;;ACjDhD,IAAAC,SAAuB;AACvB,uBAAkC;AAahC,IAAAC,uBAAA;AAVF,IAAM,kBAAmC;AAEzC,IAAM,UAA2B;AAEjC,IAAM,iBAAkC;AAExC,IAAM,iBAAuB,kBAG3B,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,eAAe,cAA+B,yBAAQ;","names":["import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_react","total","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime","React","import_jsx_runtime"]}
@@ -1,5 +1,10 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ import * as SelectPrimitive from '@radix-ui/react-select';
5
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
6
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
7
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
8
 
4
9
  /**
5
10
  * Still Void color tokens.
@@ -59,13 +64,13 @@ interface ThemeProviderProps {
59
64
  * attributes on <html> in your root layout:
60
65
  * <html data-theme="dark" data-accent="cyan" suppressHydrationWarning>
61
66
  */
62
- declare function ThemeProvider({ children, defaultMode, defaultAccent, storageKey, }: ThemeProviderProps): react.JSX.Element;
67
+ declare function ThemeProvider({ children, defaultMode, defaultAccent, storageKey, }: ThemeProviderProps): React.JSX.Element;
63
68
  declare function useTheme(): ThemeContextValue;
64
69
 
65
70
  interface ThemeToggleProps extends ComponentPropsWithoutRef<'button'> {
66
71
  }
67
72
  /** Dark/light toggle. Compose into <Header actions={...} />. */
68
- declare function ThemeToggle({ className, ...rest }: ThemeToggleProps): react.JSX.Element;
73
+ declare function ThemeToggle({ className, ...rest }: ThemeToggleProps): React.JSX.Element;
69
74
 
70
75
  interface CopyButtonProps extends ComponentPropsWithoutRef<'button'> {
71
76
  /** Text copied to the clipboard. */
@@ -74,7 +79,7 @@ interface CopyButtonProps extends ComponentPropsWithoutRef<'button'> {
74
79
  copiedLabel?: string;
75
80
  }
76
81
  /** Copy-to-clipboard button for <CodeBlock actions={...} />. */
77
- declare function CopyButton({ code, label, copiedLabel, className, ...rest }: CopyButtonProps): react.JSX.Element;
82
+ declare function CopyButton({ code, label, copiedLabel, className, ...rest }: CopyButtonProps): React.JSX.Element;
78
83
 
79
84
  interface TocItem {
80
85
  id: string;
@@ -88,7 +93,7 @@ interface TableOfContentsProps extends ComponentPropsWithoutRef<'nav'> {
88
93
  rootMargin?: string;
89
94
  }
90
95
  /** Article table of contents with scroll-spy active state. */
91
- declare function TableOfContents({ items, rootMargin, className, ...rest }: TableOfContentsProps): react.JSX.Element;
96
+ declare function TableOfContents({ items, rootMargin, className, ...rest }: TableOfContentsProps): React.JSX.Element;
92
97
 
93
98
  interface ReadingProgressProps extends ComponentPropsWithoutRef<'div'> {
94
99
  /** Element whose scroll extent defines 100%. Defaults to the document. */
@@ -107,7 +112,7 @@ interface ReadingProgressProps extends ComponentPropsWithoutRef<'div'> {
107
112
  * the `--sv-reading-progress` CSS var (see style.css), not React state, so
108
113
  * scrolling doesn't re-render this component on every frame.
109
114
  */
110
- declare function ReadingProgress({ target, announce, className, ...rest }: ReadingProgressProps): react.JSX.Element;
115
+ declare function ReadingProgress$1({ target, announce, className, ...rest }: ReadingProgressProps): React.JSX.Element;
111
116
 
112
117
  /** Reports which heading id is currently active while scrolling. */
113
118
  declare function useScrollSpy(ids: readonly string[], rootMargin?: string): string | null;
@@ -124,4 +129,133 @@ declare function useScrollSpy(ids: readonly string[], rootMargin?: string): stri
124
129
  */
125
130
  declare function useReadingProgress(target?: HTMLElement | null, step?: number): number;
126
131
 
127
- export { CopyButton, type CopyButtonProps, ReadingProgress, type ReadingProgressProps, TableOfContents, type TableOfContentsProps, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, useReadingProgress, useScrollSpy, useTheme };
132
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
133
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
134
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
135
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
136
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
137
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
138
+ declare const DialogHeader: {
139
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
140
+ displayName: string;
141
+ };
142
+ declare const DialogFooter: {
143
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
144
+ displayName: string;
145
+ };
146
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
147
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
148
+
149
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
150
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
151
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
152
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
153
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
154
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
155
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
156
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
157
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
158
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
159
+
160
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
161
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
162
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
163
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
164
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
165
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
166
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
167
+ inset?: boolean;
168
+ } & React.RefAttributes<HTMLDivElement>>;
169
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
170
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
171
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
172
+ inset?: boolean;
173
+ } & React.RefAttributes<HTMLDivElement>>;
174
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
175
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
176
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
177
+ inset?: boolean;
178
+ } & React.RefAttributes<HTMLDivElement>>;
179
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
180
+ declare const DropdownMenuShortcut: {
181
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
182
+ displayName: string;
183
+ };
184
+
185
+ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
186
+ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
187
+ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
188
+ declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
189
+
190
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
191
+ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
192
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
193
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
194
+
195
+ interface ThemeState {
196
+ mode: ThemeMode;
197
+ accent: AccentName;
198
+ }
199
+ interface ThemeManagerOptions {
200
+ /** Element receiving data-theme / data-accent. Defaults to <html>. */
201
+ root?: HTMLElement;
202
+ defaultMode?: ThemeMode;
203
+ defaultAccent?: AccentName;
204
+ /** localStorage key. Pass null to disable persistence. */
205
+ storageKey?: string | null;
206
+ }
207
+ interface ThemeManager {
208
+ getState: () => ThemeState;
209
+ setMode: (mode: ThemeMode) => void;
210
+ setAccent: (accent: AccentName) => void;
211
+ toggleMode: () => void;
212
+ subscribe: (listener: (state: ThemeState) => void) => () => void;
213
+ destroy: () => void;
214
+ }
215
+ declare const DEFAULT_STORAGE_KEY = "still-void-theme";
216
+ /**
217
+ * Framework-agnostic theme controller. Applies `data-theme` and `data-accent`
218
+ * attributes; theme.css does the rest via CSS vars. If the server already
219
+ * rendered the attributes (RSC/SSR), those win over defaults, so there is
220
+ * no flash of wrong theme.
221
+ */
222
+ declare function createThemeManager(options?: ThemeManagerOptions): ThemeManager;
223
+
224
+ interface ScrollSpyOptions {
225
+ /** Called whenever the active heading changes. `null` when none is visible. */
226
+ onChange: (activeId: string | null) => void;
227
+ /** Forwarded to IntersectionObserver. Default biases toward the reading line. */
228
+ rootMargin?: string;
229
+ threshold?: number | number[];
230
+ }
231
+ interface ScrollSpy {
232
+ destroy: () => void;
233
+ }
234
+ /**
235
+ * Watches headings by id and reports which one is active.
236
+ * Framework-agnostic core used by the React TableOfContents.
237
+ */
238
+ declare function createScrollSpy(ids: readonly string[], options: ScrollSpyOptions): ScrollSpy;
239
+
240
+ interface ReadingProgressOptions {
241
+ /** Element whose scroll extent defines 100%. Defaults to the document. */
242
+ target?: HTMLElement;
243
+ /** Receives progress in [0, 1]. */
244
+ onChange?: (percent: number) => void;
245
+ /** Element that receives the CSS var (default: <html>). Pass null to skip. */
246
+ varTarget?: HTMLElement | null;
247
+ }
248
+ interface ReadingProgress {
249
+ getPercent: () => number;
250
+ destroy: () => void;
251
+ }
252
+ /**
253
+ * Tracks document (or element) reading progress. Writes the
254
+ * `--sv-reading-progress` CSS var consumed by `.sv-reading-progress__bar`.
255
+ */
256
+ declare function createReadingProgress(options?: ReadingProgressOptions): ReadingProgress;
257
+
258
+ /** Copy text to the clipboard. Returns false when the Clipboard API is unavailable or denied. */
259
+ declare function copyToClipboard(text: string): Promise<boolean>;
260
+
261
+ export { CopyButton, type CopyButtonProps, DEFAULT_STORAGE_KEY, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ReadingProgress$1 as ReadingProgress, type ReadingProgress as ReadingProgressController, type ReadingProgressOptions, type ReadingProgressProps, type ScrollSpy, type ScrollSpyOptions, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, TableOfContents, type TableOfContentsProps, Tabs, TabsContent, TabsList, TabsTrigger, type ThemeContextValue, type ThemeManager, type ThemeManagerOptions, ThemeProvider, type ThemeProviderProps, type ThemeState, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, copyToClipboard, createReadingProgress, createScrollSpy, createThemeManager, useReadingProgress, useScrollSpy, useTheme };
@@ -1,5 +1,10 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ import * as SelectPrimitive from '@radix-ui/react-select';
5
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
6
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
7
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
8
 
4
9
  /**
5
10
  * Still Void color tokens.
@@ -59,13 +64,13 @@ interface ThemeProviderProps {
59
64
  * attributes on <html> in your root layout:
60
65
  * <html data-theme="dark" data-accent="cyan" suppressHydrationWarning>
61
66
  */
62
- declare function ThemeProvider({ children, defaultMode, defaultAccent, storageKey, }: ThemeProviderProps): react.JSX.Element;
67
+ declare function ThemeProvider({ children, defaultMode, defaultAccent, storageKey, }: ThemeProviderProps): React.JSX.Element;
63
68
  declare function useTheme(): ThemeContextValue;
64
69
 
65
70
  interface ThemeToggleProps extends ComponentPropsWithoutRef<'button'> {
66
71
  }
67
72
  /** Dark/light toggle. Compose into <Header actions={...} />. */
68
- declare function ThemeToggle({ className, ...rest }: ThemeToggleProps): react.JSX.Element;
73
+ declare function ThemeToggle({ className, ...rest }: ThemeToggleProps): React.JSX.Element;
69
74
 
70
75
  interface CopyButtonProps extends ComponentPropsWithoutRef<'button'> {
71
76
  /** Text copied to the clipboard. */
@@ -74,7 +79,7 @@ interface CopyButtonProps extends ComponentPropsWithoutRef<'button'> {
74
79
  copiedLabel?: string;
75
80
  }
76
81
  /** Copy-to-clipboard button for <CodeBlock actions={...} />. */
77
- declare function CopyButton({ code, label, copiedLabel, className, ...rest }: CopyButtonProps): react.JSX.Element;
82
+ declare function CopyButton({ code, label, copiedLabel, className, ...rest }: CopyButtonProps): React.JSX.Element;
78
83
 
79
84
  interface TocItem {
80
85
  id: string;
@@ -88,7 +93,7 @@ interface TableOfContentsProps extends ComponentPropsWithoutRef<'nav'> {
88
93
  rootMargin?: string;
89
94
  }
90
95
  /** Article table of contents with scroll-spy active state. */
91
- declare function TableOfContents({ items, rootMargin, className, ...rest }: TableOfContentsProps): react.JSX.Element;
96
+ declare function TableOfContents({ items, rootMargin, className, ...rest }: TableOfContentsProps): React.JSX.Element;
92
97
 
93
98
  interface ReadingProgressProps extends ComponentPropsWithoutRef<'div'> {
94
99
  /** Element whose scroll extent defines 100%. Defaults to the document. */
@@ -107,7 +112,7 @@ interface ReadingProgressProps extends ComponentPropsWithoutRef<'div'> {
107
112
  * the `--sv-reading-progress` CSS var (see style.css), not React state, so
108
113
  * scrolling doesn't re-render this component on every frame.
109
114
  */
110
- declare function ReadingProgress({ target, announce, className, ...rest }: ReadingProgressProps): react.JSX.Element;
115
+ declare function ReadingProgress$1({ target, announce, className, ...rest }: ReadingProgressProps): React.JSX.Element;
111
116
 
112
117
  /** Reports which heading id is currently active while scrolling. */
113
118
  declare function useScrollSpy(ids: readonly string[], rootMargin?: string): string | null;
@@ -124,4 +129,133 @@ declare function useScrollSpy(ids: readonly string[], rootMargin?: string): stri
124
129
  */
125
130
  declare function useReadingProgress(target?: HTMLElement | null, step?: number): number;
126
131
 
127
- export { CopyButton, type CopyButtonProps, ReadingProgress, type ReadingProgressProps, TableOfContents, type TableOfContentsProps, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, useReadingProgress, useScrollSpy, useTheme };
132
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
133
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
134
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
135
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
136
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
137
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
138
+ declare const DialogHeader: {
139
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
140
+ displayName: string;
141
+ };
142
+ declare const DialogFooter: {
143
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
144
+ displayName: string;
145
+ };
146
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
147
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
148
+
149
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
150
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
151
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
152
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
153
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
154
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
155
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
156
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
157
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
158
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
159
+
160
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
161
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
162
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
163
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
164
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
165
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
166
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
167
+ inset?: boolean;
168
+ } & React.RefAttributes<HTMLDivElement>>;
169
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
170
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
171
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
172
+ inset?: boolean;
173
+ } & React.RefAttributes<HTMLDivElement>>;
174
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
175
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
176
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
177
+ inset?: boolean;
178
+ } & React.RefAttributes<HTMLDivElement>>;
179
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
180
+ declare const DropdownMenuShortcut: {
181
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
182
+ displayName: string;
183
+ };
184
+
185
+ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
186
+ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
187
+ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
188
+ declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
189
+
190
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
191
+ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
192
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
193
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
194
+
195
+ interface ThemeState {
196
+ mode: ThemeMode;
197
+ accent: AccentName;
198
+ }
199
+ interface ThemeManagerOptions {
200
+ /** Element receiving data-theme / data-accent. Defaults to <html>. */
201
+ root?: HTMLElement;
202
+ defaultMode?: ThemeMode;
203
+ defaultAccent?: AccentName;
204
+ /** localStorage key. Pass null to disable persistence. */
205
+ storageKey?: string | null;
206
+ }
207
+ interface ThemeManager {
208
+ getState: () => ThemeState;
209
+ setMode: (mode: ThemeMode) => void;
210
+ setAccent: (accent: AccentName) => void;
211
+ toggleMode: () => void;
212
+ subscribe: (listener: (state: ThemeState) => void) => () => void;
213
+ destroy: () => void;
214
+ }
215
+ declare const DEFAULT_STORAGE_KEY = "still-void-theme";
216
+ /**
217
+ * Framework-agnostic theme controller. Applies `data-theme` and `data-accent`
218
+ * attributes; theme.css does the rest via CSS vars. If the server already
219
+ * rendered the attributes (RSC/SSR), those win over defaults, so there is
220
+ * no flash of wrong theme.
221
+ */
222
+ declare function createThemeManager(options?: ThemeManagerOptions): ThemeManager;
223
+
224
+ interface ScrollSpyOptions {
225
+ /** Called whenever the active heading changes. `null` when none is visible. */
226
+ onChange: (activeId: string | null) => void;
227
+ /** Forwarded to IntersectionObserver. Default biases toward the reading line. */
228
+ rootMargin?: string;
229
+ threshold?: number | number[];
230
+ }
231
+ interface ScrollSpy {
232
+ destroy: () => void;
233
+ }
234
+ /**
235
+ * Watches headings by id and reports which one is active.
236
+ * Framework-agnostic core used by the React TableOfContents.
237
+ */
238
+ declare function createScrollSpy(ids: readonly string[], options: ScrollSpyOptions): ScrollSpy;
239
+
240
+ interface ReadingProgressOptions {
241
+ /** Element whose scroll extent defines 100%. Defaults to the document. */
242
+ target?: HTMLElement;
243
+ /** Receives progress in [0, 1]. */
244
+ onChange?: (percent: number) => void;
245
+ /** Element that receives the CSS var (default: <html>). Pass null to skip. */
246
+ varTarget?: HTMLElement | null;
247
+ }
248
+ interface ReadingProgress {
249
+ getPercent: () => number;
250
+ destroy: () => void;
251
+ }
252
+ /**
253
+ * Tracks document (or element) reading progress. Writes the
254
+ * `--sv-reading-progress` CSS var consumed by `.sv-reading-progress__bar`.
255
+ */
256
+ declare function createReadingProgress(options?: ReadingProgressOptions): ReadingProgress;
257
+
258
+ /** Copy text to the clipboard. Returns false when the Clipboard API is unavailable or denied. */
259
+ declare function copyToClipboard(text: string): Promise<boolean>;
260
+
261
+ export { CopyButton, type CopyButtonProps, DEFAULT_STORAGE_KEY, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ReadingProgress$1 as ReadingProgress, type ReadingProgress as ReadingProgressController, type ReadingProgressOptions, type ReadingProgressProps, type ScrollSpy, type ScrollSpyOptions, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, TableOfContents, type TableOfContentsProps, Tabs, TabsContent, TabsList, TabsTrigger, type ThemeContextValue, type ThemeManager, type ThemeManagerOptions, ThemeProvider, type ThemeProviderProps, type ThemeState, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, copyToClipboard, createReadingProgress, createScrollSpy, createThemeManager, useReadingProgress, useScrollSpy, useTheme };