import { Fragment } from 'react' import { Link } from 'wouter' import { cn } from '@/client/lib/cn' import { getWorkspaceThemeStyle } from '@/client/runtime/workspace-theme' import { COLOR_THEMES, DEFAULT_WORKSPACE_THEME } from '@/lib/themes' import type { ColorTheme, WorkspaceTheme } from '@/lib/themes' const TEXTURES = [ { label: 'Checker', className: 'texture-checker' }, { label: 'Grid', className: 'texture-grid' }, { label: 'Noise', className: 'texture-noise' }, { label: 'Linear gradient', className: 'texture-gradient-linear' }, { label: 'Inset shadow', className: 'texture-inset-shadow' } ] as const type SurfaceMode = 'base' | 'dark' | 'widget' | 'vivid' type SurfaceConfig = { mode: SurfaceMode label: string description: string } const SURFACES: SurfaceConfig[] = [ { mode: 'base', label: 'Base', description: 'Workspace tokens' }, { mode: 'dark', label: 'Dark', description: 'Dark variant' }, { mode: 'widget', label: 'Widget', description: 'Redefined tokens' }, { mode: 'vivid', label: 'Vivid', description: 'data-vivid' } ] const COLOR_THEME_KEYS = Object.keys(COLOR_THEMES) as ColorTheme[] type TexturePreviewProps = { color: ColorTheme mode: SurfaceMode textureClassName: string textureLabel: string } function TexturePreview({ color, mode, textureClassName, textureLabel }: TexturePreviewProps) { const theme: WorkspaceTheme = { ...DEFAULT_WORKSPACE_THEME, color } const style = getWorkspaceThemeStyle(theme, mode === 'widget' ? 'widget' : 'workspace') const isVivid = mode === 'vivid' return (
Aa 123 Primary
) } export function TextureLabPage() { return (
← Dev pages

Playground

Texture lab

Every texture across every color theme. Each row compares the base surface, dark variant, widget token derivation, and a vivid container.

{COLOR_THEME_KEYS.map(color => (

{COLOR_THEMES[color].label}

{color}
Texture
{SURFACES.map(surface => (

{surface.label}

{surface.description}

))} {TEXTURES.map(texture => (

{texture.label}

{texture.className}

{SURFACES.map(surface => (
))}
))}
))}
) }