@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 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts","../src/tokens/colors.ts","../src/tokens/typography.ts","../src/tokens/spacing.ts","../src/tokens/motion.ts","../src/tokens/categories.ts","../src/tokens/zIndex.ts","../src/recipes/cx.ts","../src/recipes/shell.ts","../src/recipes/content.ts","../src/recipes/article.ts","../src/behaviors/themeManager.ts","../src/behaviors/scrollSpy.ts","../src/behaviors/readingProgress.ts","../src/behaviors/clipboard.ts"],"sourcesContent":["/**\n * @still-void/ui — framework-agnostic core.\n * Tokens and recipes are pure data/functions (Server Component safe).\n * Behaviors touch the DOM only when called — import anywhere, call on the client.\n */\n\n// tokens\nexport * from './tokens/colors';\nexport * from './tokens/typography';\nexport * from './tokens/spacing';\nexport * from './tokens/motion';\nexport * from './tokens/categories';\nexport * from './tokens/zIndex';\n\n// data contracts\nexport * from './types';\n\n// recipes (class-name builders)\nexport * from './recipes/cx';\nexport * from './recipes/shell';\nexport * from './recipes/content';\nexport * from './recipes/article';\n\n// behaviors (vanilla DOM, client-side)\nexport * from './behaviors/themeManager';\nexport * from './behaviors/scrollSpy';\nexport * from './behaviors/readingProgress';\nexport * from './behaviors/clipboard';\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","/**\n * Still Void typography tokens.\n * Families are fixed by the spec: Sora (display), Manrope (body), JetBrains Mono (code).\n * System fallbacks are loading fallbacks only — the final family must be the correct one.\n */\nexport const fontFamilies = {\n display: \"'Sora', ui-sans-serif, system-ui, sans-serif\",\n body: \"'Manrope', ui-sans-serif, system-ui, sans-serif\",\n mono: \"'JetBrains Mono', ui-monospace, 'SF Mono', monospace\",\n} as const;\n\nexport const fontWeights = {\n regular: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n} as const;\n\nexport const fontSizes = {\n xs: '0.75rem', // 12px — meta, pills\n sm: '0.8125rem', // 13px — captions, code\n base: '0.9375rem', // 15px — body\n md: '1rem', // 16px — lead paragraphs\n lg: '1.125rem', // 18px — article lead\n xl: '1.375rem', // 22px — card titles, h3\n '2xl': '1.75rem', // 28px — h2\n '3xl': '2.25rem', // 36px — article title\n '4xl': '2.75rem', // 44px — hero display\n} as const;\n\nexport const lineHeights = {\n tight: 1.15,\n snug: 1.3,\n normal: 1.5,\n relaxed: 1.7,\n} as const;\n\nexport const letterSpacings = {\n display: '-0.02em',\n normal: '0',\n wide: '0.08em',\n} as const;\n\nexport type FontFamily = keyof typeof fontFamilies;\nexport type FontSize = keyof typeof fontSizes;\nexport type FontWeight = keyof typeof fontWeights;\n","/**\n * Still Void spacing scale (4→72px) and radii (6/8/12/16/full).\n */\nexport const spacing = {\n 1: '4px',\n 2: '8px',\n 3: '12px',\n 4: '16px',\n 5: '20px',\n 6: '24px',\n 8: '32px',\n 10: '40px',\n 12: '48px',\n 14: '56px',\n 16: '64px',\n 18: '72px',\n} as const;\n\nexport const radii = {\n sm: '6px',\n md: '8px',\n lg: '12px',\n xl: '16px',\n full: '9999px',\n} as const;\n\nexport type SpacingStep = keyof typeof spacing;\nexport type Radius = keyof typeof radii;\n","/**\n * Still Void motion tokens.\n * Hover transitions use the signature easing; the reading progress bar is linear.\n */\nexport const easings = {\n hover: 'cubic-bezier(.3,.7,.4,1)',\n linear: 'linear',\n} as const;\n\nexport const durations = {\n fast: '120ms',\n base: '200ms',\n slow: '320ms',\n} as const;\n\nexport type Easing = keyof typeof easings;\nexport type Duration = keyof typeof durations;\n","import { accents, type AccentName } from './colors';\n\n/**\n * Blog categories from the prototype. Categories render as a colored dot + label\n * (never an emoji). The pill also accepts any CSS color for whitelabel use.\n */\nexport type CategoryName = 'ia' | 'prompt' | 'dev' | 'arch' | 'ts';\n\nexport const defaultCategoryColors: Record<CategoryName, AccentName> = {\n ia: 'violet',\n prompt: 'amber',\n dev: 'mint',\n arch: 'cyan',\n ts: 'cyan',\n};\n\nconst hasOwn = <T extends object>(obj: T, key: string): key is Extract<keyof T, string> =>\n Object.prototype.hasOwnProperty.call(obj, key);\n\n/** Resolve an accent name or raw CSS color to a CSS color value. */\nexport function resolveAccentColor(color: AccentName | (string & {})): string {\n return hasOwn(accents, color) ? accents[color] : color;\n}\n\n/** Resolve a category name, accent name, or raw CSS color to a CSS color value. */\nexport function resolveCategoryColor(\n color: CategoryName | AccentName | (string & {}),\n): string {\n if (hasOwn(defaultCategoryColors, color)) {\n return accents[defaultCategoryColors[color]];\n }\n return resolveAccentColor(color);\n}\n","/**\n * Still Void z-index scale. Named steps instead of arbitrary numbers so new\n * layered components (dropdown, modal, toast, tooltip) stack predictably\n * against the existing sticky header and reading progress bar.\n */\nexport const zIndex = {\n dropdown: 10,\n sticky: 20,\n backdrop: 30,\n modal: 40,\n toast: 50,\n tooltip: 60,\n} as const;\n\nexport type ZIndexStep = keyof typeof zIndex;\n","/** Minimal class-name joiner. Falsy values are dropped. */\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(' ');\n}\n","import { cx } from './cx';\n\n/**\n * Shell recipes: Header, Logo, Footer.\n * Recipes are pure functions returning class strings — no DOM, no framework.\n * Safe in Next.js Server Components; usable via [class] in Angular, :class in Vue.\n */\n\nexport interface HeaderOptions {\n /** Frosted glass background (sticky headers). */\n glass?: boolean;\n}\n\nexport function header(options: HeaderOptions = {}): string {\n return cx('sv-header', options.glass !== false && 'sv-glass');\n}\n\nexport const headerClasses = {\n nav: 'sv-header__nav',\n link: 'sv-header__link',\n linkActive: cx('sv-header__link', 'sv-header__link--active'),\n actions: 'sv-header__actions',\n} as const;\n\nexport function logo(): string {\n return 'sv-logo';\n}\n\nexport const logoClasses = {\n dot: 'sv-logo__dot',\n} as const;\n\nexport function footer(): string {\n return 'sv-footer';\n}\n\nexport const footerClasses = {\n links: 'sv-footer__links',\n link: 'sv-footer__link',\n} as const;\n","import { cx } from './cx';\n\n/**\n * Content recipes: CategoryPill, PostCard, FeaturedPostCard, PostGrid,\n * Sidebar, Hero, Skeleton. Pure functions — Server Component safe.\n */\n\nexport interface CategoryPillOptions {\n interactive?: boolean;\n active?: boolean;\n}\n\nexport function categoryPill(options: CategoryPillOptions = {}): string {\n return cx(\n 'sv-pill',\n options.interactive && 'sv-pill--interactive',\n options.active && 'sv-pill--active',\n );\n}\n\nexport const categoryPillClasses = {\n dot: 'sv-pill__dot',\n} as const;\n\nexport interface PostCardOptions {\n dense?: boolean;\n hover?: boolean;\n}\n\nexport function postCard(options: PostCardOptions = {}): string {\n return cx(\n 'sv-post-card',\n options.dense && 'sv-post-card--dense',\n options.hover !== false && 'sv-card-hover',\n );\n}\n\nexport const postCardClasses = {\n meta: 'sv-post-card__meta',\n title: 'sv-post-card__title',\n excerpt: 'sv-post-card__excerpt',\n} as const;\n\nexport function featuredPostCard(): string {\n return cx('sv-featured-card', 'sv-gradient-border', 'sv-card-hover');\n}\n\nexport const featuredPostCardClasses = {\n body: 'sv-featured-card__body',\n title: 'sv-featured-card__title',\n visual: 'sv-featured-card__visual',\n} as const;\n\nexport function postGrid(): string {\n return 'sv-post-grid';\n}\n\nexport interface LayoutOptions {\n withSidebar?: boolean;\n}\n\nexport function layout(options: LayoutOptions = {}): string {\n return cx('sv-layout', options.withSidebar && 'sv-layout--with-sidebar');\n}\n\nexport function sidebar(): string {\n return 'sv-sidebar';\n}\n\nexport const sidebarClasses = {\n sectionTitle: 'sv-sidebar__section-title',\n} as const;\n\nexport function hero(): string {\n return 'sv-hero';\n}\n\nexport const heroClasses = {\n eyebrow: 'sv-hero__eyebrow',\n title: 'sv-hero__title',\n description: 'sv-hero__description',\n} as const;\n\nexport interface SkeletonOptions {\n small?: boolean;\n}\n\nexport function skeletonLine(options: SkeletonOptions = {}): string {\n return cx('sv-skeleton', 'sv-skeleton-line', options.small && 'sv-skeleton-line--sm');\n}\n\nexport function cardSkeleton(): string {\n return 'sv-card-skeleton';\n}\n","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 {\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","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 { 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","/** 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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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,GAAG,KAAK,IAAI,GAAG,CAAC,KAAK,MAAMA,MAAK,CAAC;AAAA,IACnD;AACA,UAAM,MAAM,SAAS;AACrB,UAAM,QAAQ,IAAI,eAAe,OAAO;AACxC,QAAI,SAAS,EAAG,QAAO;AACvB,WAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,OAAO,UAAU,KAAK,CAAC;AAAA,EACxD;AAEA,WAAS,SAAe;AACtB,cAAU,QAAQ;AAClB,eAAW,MAAM,YAAY,sBAAsB,OAAO,OAAO,CAAC;AAClE,YAAQ,WAAW,OAAO;AAAA,EAC5B;AAIA,MAAI,QAAuB;AAC3B,WAAS,UAAgB;AACvB,YAAQ;AACR,WAAO;AAAA,EACT;AACA,WAAS,WAAiB;AACxB,QAAI,UAAU,KAAM;AACpB,YAAQ,IAAI,OAAO;AAAA,EACrB;AAEA,SAAO;AACP,SAAO,iBAAiB,UAAU,UAAU,EAAE,SAAS,KAAK,CAAC;AAC7D,SAAO,iBAAiB,UAAU,UAAU,EAAE,SAAS,KAAK,CAAC;AAE7D,SAAO;AAAA,IACL,YAAY,MAAM;AAAA,IAClB,UAAU;AACR,aAAO,oBAAoB,UAAU,QAAQ;AAC7C,aAAO,oBAAoB,UAAU,QAAQ;AAC7C,UAAI,UAAU,KAAM,WAAU,KAAK;AAAA,IACrC;AAAA,EACF;AACF;;;AC/EA,eAAsB,gBAAgB,MAAgC;AACpE,MAAI,CAAC,UAAU,WAAW,UAAW,QAAO;AAC5C,MAAI;AACF,UAAM,UAAU,UAAU,UAAU,IAAI;AACxC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":["total"]}
package/dist/index.d.cts DELETED
@@ -1,248 +0,0 @@
1
- import { T as ThemeMode, A as AccentName } from './article-Dl8rGW5l.cjs';
2
- export { C as CalloutKind, a as CategoryName, b as ColorScheme, D as DEFAULT_ACCENT, c as DEFAULT_MODE, N as NavItem, P as PostSummary, R as READING_PROGRESS_VAR, S as SemanticName, d as TocItem, e as TocLinkOptions, f as accentNames, g as accents, h as accentsInk, i as articleHeader, j as articleHeaderClasses, k as callout, l as calloutClasses, m as calloutLabels, n as codeBlock, o as codeBlockClasses, p as colors, q as defaultCategoryColors, r as prose, s as proseClasses, t as readingProgress, u as readingProgressClasses, v as resolveAccentColor, w as resolveCategoryColor, x as semantic, y as semanticInk, z as tableOfContents, B as themeModes, E as tocLink } from './article-Dl8rGW5l.cjs';
3
-
4
- /**
5
- * Still Void typography tokens.
6
- * Families are fixed by the spec: Sora (display), Manrope (body), JetBrains Mono (code).
7
- * System fallbacks are loading fallbacks only — the final family must be the correct one.
8
- */
9
- declare const fontFamilies: {
10
- readonly display: "'Sora', ui-sans-serif, system-ui, sans-serif";
11
- readonly body: "'Manrope', ui-sans-serif, system-ui, sans-serif";
12
- readonly mono: "'JetBrains Mono', ui-monospace, 'SF Mono', monospace";
13
- };
14
- declare const fontWeights: {
15
- readonly regular: 400;
16
- readonly medium: 500;
17
- readonly semibold: 600;
18
- readonly bold: 700;
19
- };
20
- declare const fontSizes: {
21
- readonly xs: "0.75rem";
22
- readonly sm: "0.8125rem";
23
- readonly base: "0.9375rem";
24
- readonly md: "1rem";
25
- readonly lg: "1.125rem";
26
- readonly xl: "1.375rem";
27
- readonly '2xl': "1.75rem";
28
- readonly '3xl': "2.25rem";
29
- readonly '4xl': "2.75rem";
30
- };
31
- declare const lineHeights: {
32
- readonly tight: 1.15;
33
- readonly snug: 1.3;
34
- readonly normal: 1.5;
35
- readonly relaxed: 1.7;
36
- };
37
- declare const letterSpacings: {
38
- readonly display: "-0.02em";
39
- readonly normal: "0";
40
- readonly wide: "0.08em";
41
- };
42
- type FontFamily = keyof typeof fontFamilies;
43
- type FontSize = keyof typeof fontSizes;
44
- type FontWeight = keyof typeof fontWeights;
45
-
46
- /**
47
- * Still Void spacing scale (4→72px) and radii (6/8/12/16/full).
48
- */
49
- declare const spacing: {
50
- readonly 1: "4px";
51
- readonly 2: "8px";
52
- readonly 3: "12px";
53
- readonly 4: "16px";
54
- readonly 5: "20px";
55
- readonly 6: "24px";
56
- readonly 8: "32px";
57
- readonly 10: "40px";
58
- readonly 12: "48px";
59
- readonly 14: "56px";
60
- readonly 16: "64px";
61
- readonly 18: "72px";
62
- };
63
- declare const radii: {
64
- readonly sm: "6px";
65
- readonly md: "8px";
66
- readonly lg: "12px";
67
- readonly xl: "16px";
68
- readonly full: "9999px";
69
- };
70
- type SpacingStep = keyof typeof spacing;
71
- type Radius = keyof typeof radii;
72
-
73
- /**
74
- * Still Void motion tokens.
75
- * Hover transitions use the signature easing; the reading progress bar is linear.
76
- */
77
- declare const easings: {
78
- readonly hover: "cubic-bezier(.3,.7,.4,1)";
79
- readonly linear: "linear";
80
- };
81
- declare const durations: {
82
- readonly fast: "120ms";
83
- readonly base: "200ms";
84
- readonly slow: "320ms";
85
- };
86
- type Easing = keyof typeof easings;
87
- type Duration = keyof typeof durations;
88
-
89
- /**
90
- * Still Void z-index scale. Named steps instead of arbitrary numbers so new
91
- * layered components (dropdown, modal, toast, tooltip) stack predictably
92
- * against the existing sticky header and reading progress bar.
93
- */
94
- declare const zIndex: {
95
- readonly dropdown: 10;
96
- readonly sticky: 20;
97
- readonly backdrop: 30;
98
- readonly modal: 40;
99
- readonly toast: 50;
100
- readonly tooltip: 60;
101
- };
102
- type ZIndexStep = keyof typeof zIndex;
103
-
104
- /** Minimal class-name joiner. Falsy values are dropped. */
105
- declare function cx(...parts: Array<string | false | null | undefined>): string;
106
-
107
- /**
108
- * Shell recipes: Header, Logo, Footer.
109
- * Recipes are pure functions returning class strings — no DOM, no framework.
110
- * Safe in Next.js Server Components; usable via [class] in Angular, :class in Vue.
111
- */
112
- interface HeaderOptions {
113
- /** Frosted glass background (sticky headers). */
114
- glass?: boolean;
115
- }
116
- declare function header(options?: HeaderOptions): string;
117
- declare const headerClasses: {
118
- readonly nav: "sv-header__nav";
119
- readonly link: "sv-header__link";
120
- readonly linkActive: string;
121
- readonly actions: "sv-header__actions";
122
- };
123
- declare function logo(): string;
124
- declare const logoClasses: {
125
- readonly dot: "sv-logo__dot";
126
- };
127
- declare function footer(): string;
128
- declare const footerClasses: {
129
- readonly links: "sv-footer__links";
130
- readonly link: "sv-footer__link";
131
- };
132
-
133
- /**
134
- * Content recipes: CategoryPill, PostCard, FeaturedPostCard, PostGrid,
135
- * Sidebar, Hero, Skeleton. Pure functions — Server Component safe.
136
- */
137
- interface CategoryPillOptions {
138
- interactive?: boolean;
139
- active?: boolean;
140
- }
141
- declare function categoryPill(options?: CategoryPillOptions): string;
142
- declare const categoryPillClasses: {
143
- readonly dot: "sv-pill__dot";
144
- };
145
- interface PostCardOptions {
146
- dense?: boolean;
147
- hover?: boolean;
148
- }
149
- declare function postCard(options?: PostCardOptions): string;
150
- declare const postCardClasses: {
151
- readonly meta: "sv-post-card__meta";
152
- readonly title: "sv-post-card__title";
153
- readonly excerpt: "sv-post-card__excerpt";
154
- };
155
- declare function featuredPostCard(): string;
156
- declare const featuredPostCardClasses: {
157
- readonly body: "sv-featured-card__body";
158
- readonly title: "sv-featured-card__title";
159
- readonly visual: "sv-featured-card__visual";
160
- };
161
- declare function postGrid(): string;
162
- interface LayoutOptions {
163
- withSidebar?: boolean;
164
- }
165
- declare function layout(options?: LayoutOptions): string;
166
- declare function sidebar(): string;
167
- declare const sidebarClasses: {
168
- readonly sectionTitle: "sv-sidebar__section-title";
169
- };
170
- declare function hero(): string;
171
- declare const heroClasses: {
172
- readonly eyebrow: "sv-hero__eyebrow";
173
- readonly title: "sv-hero__title";
174
- readonly description: "sv-hero__description";
175
- };
176
- interface SkeletonOptions {
177
- small?: boolean;
178
- }
179
- declare function skeletonLine(options?: SkeletonOptions): string;
180
- declare function cardSkeleton(): string;
181
-
182
- interface ThemeState {
183
- mode: ThemeMode;
184
- accent: AccentName;
185
- }
186
- interface ThemeManagerOptions {
187
- /** Element receiving data-theme / data-accent. Defaults to <html>. */
188
- root?: HTMLElement;
189
- defaultMode?: ThemeMode;
190
- defaultAccent?: AccentName;
191
- /** localStorage key. Pass null to disable persistence. */
192
- storageKey?: string | null;
193
- }
194
- interface ThemeManager {
195
- getState: () => ThemeState;
196
- setMode: (mode: ThemeMode) => void;
197
- setAccent: (accent: AccentName) => void;
198
- toggleMode: () => void;
199
- subscribe: (listener: (state: ThemeState) => void) => () => void;
200
- destroy: () => void;
201
- }
202
- declare const DEFAULT_STORAGE_KEY = "still-void-theme";
203
- /**
204
- * Framework-agnostic theme controller. Applies `data-theme` and `data-accent`
205
- * attributes; theme.css does the rest via CSS vars. If the server already
206
- * rendered the attributes (RSC/SSR), those win over defaults, so there is
207
- * no flash of wrong theme.
208
- */
209
- declare function createThemeManager(options?: ThemeManagerOptions): ThemeManager;
210
-
211
- interface ScrollSpyOptions {
212
- /** Called whenever the active heading changes. `null` when none is visible. */
213
- onChange: (activeId: string | null) => void;
214
- /** Forwarded to IntersectionObserver. Default biases toward the reading line. */
215
- rootMargin?: string;
216
- threshold?: number | number[];
217
- }
218
- interface ScrollSpy {
219
- destroy: () => void;
220
- }
221
- /**
222
- * Watches headings by id and reports which one is active.
223
- * Framework-agnostic core used by the React TableOfContents.
224
- */
225
- declare function createScrollSpy(ids: readonly string[], options: ScrollSpyOptions): ScrollSpy;
226
-
227
- interface ReadingProgressOptions {
228
- /** Element whose scroll extent defines 100%. Defaults to the document. */
229
- target?: HTMLElement;
230
- /** Receives progress in [0, 1]. */
231
- onChange?: (percent: number) => void;
232
- /** Element that receives the CSS var (default: <html>). Pass null to skip. */
233
- varTarget?: HTMLElement | null;
234
- }
235
- interface ReadingProgress {
236
- getPercent: () => number;
237
- destroy: () => void;
238
- }
239
- /**
240
- * Tracks document (or element) reading progress. Writes the
241
- * `--sv-reading-progress` CSS var consumed by `.sv-reading-progress__bar`.
242
- */
243
- declare function createReadingProgress(options?: ReadingProgressOptions): ReadingProgress;
244
-
245
- /** Copy text to the clipboard. Returns false when the Clipboard API is unavailable or denied. */
246
- declare function copyToClipboard(text: string): Promise<boolean>;
247
-
248
- export { AccentName, type CategoryPillOptions, DEFAULT_STORAGE_KEY, type Duration, type Easing, type FontFamily, type FontSize, type FontWeight, type HeaderOptions, type LayoutOptions, type PostCardOptions, type Radius, type ReadingProgress, type ReadingProgressOptions, type ScrollSpy, type ScrollSpyOptions, type SkeletonOptions, type SpacingStep, type ThemeManager, type ThemeManagerOptions, ThemeMode, type ThemeState, type ZIndexStep, cardSkeleton, categoryPill, categoryPillClasses, copyToClipboard, createReadingProgress, createScrollSpy, createThemeManager, cx, durations, easings, featuredPostCard, featuredPostCardClasses, fontFamilies, fontSizes, fontWeights, footer, footerClasses, header, headerClasses, hero, heroClasses, layout, letterSpacings, lineHeights, logo, logoClasses, postCard, postCardClasses, postGrid, radii, sidebar, sidebarClasses, skeletonLine, spacing, zIndex };
package/dist/index.d.ts DELETED
@@ -1,248 +0,0 @@
1
- import { T as ThemeMode, A as AccentName } from './article-Dl8rGW5l.js';
2
- export { C as CalloutKind, a as CategoryName, b as ColorScheme, D as DEFAULT_ACCENT, c as DEFAULT_MODE, N as NavItem, P as PostSummary, R as READING_PROGRESS_VAR, S as SemanticName, d as TocItem, e as TocLinkOptions, f as accentNames, g as accents, h as accentsInk, i as articleHeader, j as articleHeaderClasses, k as callout, l as calloutClasses, m as calloutLabels, n as codeBlock, o as codeBlockClasses, p as colors, q as defaultCategoryColors, r as prose, s as proseClasses, t as readingProgress, u as readingProgressClasses, v as resolveAccentColor, w as resolveCategoryColor, x as semantic, y as semanticInk, z as tableOfContents, B as themeModes, E as tocLink } from './article-Dl8rGW5l.js';
3
-
4
- /**
5
- * Still Void typography tokens.
6
- * Families are fixed by the spec: Sora (display), Manrope (body), JetBrains Mono (code).
7
- * System fallbacks are loading fallbacks only — the final family must be the correct one.
8
- */
9
- declare const fontFamilies: {
10
- readonly display: "'Sora', ui-sans-serif, system-ui, sans-serif";
11
- readonly body: "'Manrope', ui-sans-serif, system-ui, sans-serif";
12
- readonly mono: "'JetBrains Mono', ui-monospace, 'SF Mono', monospace";
13
- };
14
- declare const fontWeights: {
15
- readonly regular: 400;
16
- readonly medium: 500;
17
- readonly semibold: 600;
18
- readonly bold: 700;
19
- };
20
- declare const fontSizes: {
21
- readonly xs: "0.75rem";
22
- readonly sm: "0.8125rem";
23
- readonly base: "0.9375rem";
24
- readonly md: "1rem";
25
- readonly lg: "1.125rem";
26
- readonly xl: "1.375rem";
27
- readonly '2xl': "1.75rem";
28
- readonly '3xl': "2.25rem";
29
- readonly '4xl': "2.75rem";
30
- };
31
- declare const lineHeights: {
32
- readonly tight: 1.15;
33
- readonly snug: 1.3;
34
- readonly normal: 1.5;
35
- readonly relaxed: 1.7;
36
- };
37
- declare const letterSpacings: {
38
- readonly display: "-0.02em";
39
- readonly normal: "0";
40
- readonly wide: "0.08em";
41
- };
42
- type FontFamily = keyof typeof fontFamilies;
43
- type FontSize = keyof typeof fontSizes;
44
- type FontWeight = keyof typeof fontWeights;
45
-
46
- /**
47
- * Still Void spacing scale (4→72px) and radii (6/8/12/16/full).
48
- */
49
- declare const spacing: {
50
- readonly 1: "4px";
51
- readonly 2: "8px";
52
- readonly 3: "12px";
53
- readonly 4: "16px";
54
- readonly 5: "20px";
55
- readonly 6: "24px";
56
- readonly 8: "32px";
57
- readonly 10: "40px";
58
- readonly 12: "48px";
59
- readonly 14: "56px";
60
- readonly 16: "64px";
61
- readonly 18: "72px";
62
- };
63
- declare const radii: {
64
- readonly sm: "6px";
65
- readonly md: "8px";
66
- readonly lg: "12px";
67
- readonly xl: "16px";
68
- readonly full: "9999px";
69
- };
70
- type SpacingStep = keyof typeof spacing;
71
- type Radius = keyof typeof radii;
72
-
73
- /**
74
- * Still Void motion tokens.
75
- * Hover transitions use the signature easing; the reading progress bar is linear.
76
- */
77
- declare const easings: {
78
- readonly hover: "cubic-bezier(.3,.7,.4,1)";
79
- readonly linear: "linear";
80
- };
81
- declare const durations: {
82
- readonly fast: "120ms";
83
- readonly base: "200ms";
84
- readonly slow: "320ms";
85
- };
86
- type Easing = keyof typeof easings;
87
- type Duration = keyof typeof durations;
88
-
89
- /**
90
- * Still Void z-index scale. Named steps instead of arbitrary numbers so new
91
- * layered components (dropdown, modal, toast, tooltip) stack predictably
92
- * against the existing sticky header and reading progress bar.
93
- */
94
- declare const zIndex: {
95
- readonly dropdown: 10;
96
- readonly sticky: 20;
97
- readonly backdrop: 30;
98
- readonly modal: 40;
99
- readonly toast: 50;
100
- readonly tooltip: 60;
101
- };
102
- type ZIndexStep = keyof typeof zIndex;
103
-
104
- /** Minimal class-name joiner. Falsy values are dropped. */
105
- declare function cx(...parts: Array<string | false | null | undefined>): string;
106
-
107
- /**
108
- * Shell recipes: Header, Logo, Footer.
109
- * Recipes are pure functions returning class strings — no DOM, no framework.
110
- * Safe in Next.js Server Components; usable via [class] in Angular, :class in Vue.
111
- */
112
- interface HeaderOptions {
113
- /** Frosted glass background (sticky headers). */
114
- glass?: boolean;
115
- }
116
- declare function header(options?: HeaderOptions): string;
117
- declare const headerClasses: {
118
- readonly nav: "sv-header__nav";
119
- readonly link: "sv-header__link";
120
- readonly linkActive: string;
121
- readonly actions: "sv-header__actions";
122
- };
123
- declare function logo(): string;
124
- declare const logoClasses: {
125
- readonly dot: "sv-logo__dot";
126
- };
127
- declare function footer(): string;
128
- declare const footerClasses: {
129
- readonly links: "sv-footer__links";
130
- readonly link: "sv-footer__link";
131
- };
132
-
133
- /**
134
- * Content recipes: CategoryPill, PostCard, FeaturedPostCard, PostGrid,
135
- * Sidebar, Hero, Skeleton. Pure functions — Server Component safe.
136
- */
137
- interface CategoryPillOptions {
138
- interactive?: boolean;
139
- active?: boolean;
140
- }
141
- declare function categoryPill(options?: CategoryPillOptions): string;
142
- declare const categoryPillClasses: {
143
- readonly dot: "sv-pill__dot";
144
- };
145
- interface PostCardOptions {
146
- dense?: boolean;
147
- hover?: boolean;
148
- }
149
- declare function postCard(options?: PostCardOptions): string;
150
- declare const postCardClasses: {
151
- readonly meta: "sv-post-card__meta";
152
- readonly title: "sv-post-card__title";
153
- readonly excerpt: "sv-post-card__excerpt";
154
- };
155
- declare function featuredPostCard(): string;
156
- declare const featuredPostCardClasses: {
157
- readonly body: "sv-featured-card__body";
158
- readonly title: "sv-featured-card__title";
159
- readonly visual: "sv-featured-card__visual";
160
- };
161
- declare function postGrid(): string;
162
- interface LayoutOptions {
163
- withSidebar?: boolean;
164
- }
165
- declare function layout(options?: LayoutOptions): string;
166
- declare function sidebar(): string;
167
- declare const sidebarClasses: {
168
- readonly sectionTitle: "sv-sidebar__section-title";
169
- };
170
- declare function hero(): string;
171
- declare const heroClasses: {
172
- readonly eyebrow: "sv-hero__eyebrow";
173
- readonly title: "sv-hero__title";
174
- readonly description: "sv-hero__description";
175
- };
176
- interface SkeletonOptions {
177
- small?: boolean;
178
- }
179
- declare function skeletonLine(options?: SkeletonOptions): string;
180
- declare function cardSkeleton(): string;
181
-
182
- interface ThemeState {
183
- mode: ThemeMode;
184
- accent: AccentName;
185
- }
186
- interface ThemeManagerOptions {
187
- /** Element receiving data-theme / data-accent. Defaults to <html>. */
188
- root?: HTMLElement;
189
- defaultMode?: ThemeMode;
190
- defaultAccent?: AccentName;
191
- /** localStorage key. Pass null to disable persistence. */
192
- storageKey?: string | null;
193
- }
194
- interface ThemeManager {
195
- getState: () => ThemeState;
196
- setMode: (mode: ThemeMode) => void;
197
- setAccent: (accent: AccentName) => void;
198
- toggleMode: () => void;
199
- subscribe: (listener: (state: ThemeState) => void) => () => void;
200
- destroy: () => void;
201
- }
202
- declare const DEFAULT_STORAGE_KEY = "still-void-theme";
203
- /**
204
- * Framework-agnostic theme controller. Applies `data-theme` and `data-accent`
205
- * attributes; theme.css does the rest via CSS vars. If the server already
206
- * rendered the attributes (RSC/SSR), those win over defaults, so there is
207
- * no flash of wrong theme.
208
- */
209
- declare function createThemeManager(options?: ThemeManagerOptions): ThemeManager;
210
-
211
- interface ScrollSpyOptions {
212
- /** Called whenever the active heading changes. `null` when none is visible. */
213
- onChange: (activeId: string | null) => void;
214
- /** Forwarded to IntersectionObserver. Default biases toward the reading line. */
215
- rootMargin?: string;
216
- threshold?: number | number[];
217
- }
218
- interface ScrollSpy {
219
- destroy: () => void;
220
- }
221
- /**
222
- * Watches headings by id and reports which one is active.
223
- * Framework-agnostic core used by the React TableOfContents.
224
- */
225
- declare function createScrollSpy(ids: readonly string[], options: ScrollSpyOptions): ScrollSpy;
226
-
227
- interface ReadingProgressOptions {
228
- /** Element whose scroll extent defines 100%. Defaults to the document. */
229
- target?: HTMLElement;
230
- /** Receives progress in [0, 1]. */
231
- onChange?: (percent: number) => void;
232
- /** Element that receives the CSS var (default: <html>). Pass null to skip. */
233
- varTarget?: HTMLElement | null;
234
- }
235
- interface ReadingProgress {
236
- getPercent: () => number;
237
- destroy: () => void;
238
- }
239
- /**
240
- * Tracks document (or element) reading progress. Writes the
241
- * `--sv-reading-progress` CSS var consumed by `.sv-reading-progress__bar`.
242
- */
243
- declare function createReadingProgress(options?: ReadingProgressOptions): ReadingProgress;
244
-
245
- /** Copy text to the clipboard. Returns false when the Clipboard API is unavailable or denied. */
246
- declare function copyToClipboard(text: string): Promise<boolean>;
247
-
248
- export { AccentName, type CategoryPillOptions, DEFAULT_STORAGE_KEY, type Duration, type Easing, type FontFamily, type FontSize, type FontWeight, type HeaderOptions, type LayoutOptions, type PostCardOptions, type Radius, type ReadingProgress, type ReadingProgressOptions, type ScrollSpy, type ScrollSpyOptions, type SkeletonOptions, type SpacingStep, type ThemeManager, type ThemeManagerOptions, ThemeMode, type ThemeState, type ZIndexStep, cardSkeleton, categoryPill, categoryPillClasses, copyToClipboard, createReadingProgress, createScrollSpy, createThemeManager, cx, durations, easings, featuredPostCard, featuredPostCardClasses, fontFamilies, fontSizes, fontWeights, footer, footerClasses, header, headerClasses, hero, heroClasses, layout, letterSpacings, lineHeights, logo, logoClasses, postCard, postCardClasses, postGrid, radii, sidebar, sidebarClasses, skeletonLine, spacing, zIndex };