@opencosmos/ui 1.3.1 → 1.3.2
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.
- package/.claude/CLAUDE.md +47 -47
- package/LICENSE +21 -0
- package/README.md +21 -21
- package/dist/{hooks-CKW8vE9H.d.ts → hooks-CFPKFXhH.d.ts} +1 -1
- package/dist/{hooks-1b8WaQf1.d.mts → hooks-CeAuZ0i5.d.mts} +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.d.mts +78 -11
- package/dist/index.d.ts +78 -11
- package/dist/index.js +585 -342
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +548 -312
- package/dist/index.mjs.map +1 -1
- package/dist/{providers-CXPDMsl7.d.mts → providers-CzKisd2T.d.mts} +1 -1
- package/dist/{providers-Dn_Msjvz.d.ts → providers-D39-kwai.d.ts} +1 -1
- package/dist/providers.d.mts +1 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js.map +1 -1
- package/dist/providers.mjs.map +1 -1
- package/dist/tokens.js.map +1 -1
- package/dist/{utils-Cs04sxth.d.mts → utils-CkatYLG4.d.mts} +1 -1
- package/dist/{utils-CIIM7dAC.d.ts → utils-Y1Zi7biA.d.ts} +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/utils.mjs.map +1 -1
- package/package.json +256 -256
- package/src/component-registry.ts +4 -4
- package/src/components/data-display/CollapsibleCodeBlock.tsx +1 -1
- package/src/components/data-display/OpenCosmosIcon.tsx +39 -0
- package/src/components/data-display/index.ts +1 -0
- package/src/components/layout/AppSidebar.tsx +277 -0
- package/src/components/layout/CustomizerPanel.tsx +2 -2
- package/src/components/layout/index.ts +1 -0
- package/src/hooks/useTheme.ts +1 -1
- package/src/hooks.ts +1 -1
- package/src/index.ts +6 -4
- package/src/lib/store/customizer.ts +1 -1
- package/src/lib/store/theme.ts +1 -1
- package/src/lib/syntax-parser/index.ts +1 -1
- package/src/providers/ThemeProvider.tsx +2 -2
- package/src/providers.ts +1 -1
- package/src/tokens.ts +3 -3
- package/src/utils.ts +1 -1
package/dist/hooks.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/store/theme.ts","../src/hooks/useTheme.ts","../src/hooks/useMotionPreference.ts","../src/lib/store/customizer.ts","../../tokens/src/color-utils.ts","../../tokens/src/token-graph.ts","../src/lib/colors.ts","../src/hooks/useForm.ts","../src/lib/validation.ts"],"sourcesContent":["/**\n * Theme Store\n * Manages theme and color mode state with localStorage persistence\n */\n\nimport { create } from 'zustand';\nimport { persist } from 'zustand/middleware';\nimport type { ThemeName, ColorMode } from '@thesage/tokens';\n\n// Re-export types for convenience\nexport type { ThemeName, ColorMode };\n\ninterface ThemeState {\n // Current theme and mode\n theme: ThemeName;\n mode: ColorMode;\n\n // Actions\n setTheme: (theme: ThemeName) => void;\n setMode: (mode: ColorMode) => void;\n toggleMode: () => void;\n\n // Computed\n themeConfig: { name: ThemeName; mode: ColorMode };\n}\n\nexport const useThemeStore = create<ThemeState>()(\n persist(\n (set, get) => ({\n // Defaults\n theme: 'volt',\n mode: 'dark',\n\n // Actions\n setTheme: (theme) => set({ theme }),\n setMode: (mode) => set({ mode }),\n toggleMode: () =>\n set((state) => ({ mode: state.mode === 'light' ? 'dark' : 'light' })),\n\n // Computed\n get themeConfig() {\n const state = get();\n return { name: state.theme, mode: state.mode };\n },\n }),\n {\n name: 'ecosystem-theme',\n // Only persist theme and mode\n partialize: (state) => ({\n theme: state.theme,\n mode: state.mode,\n }),\n }\n )\n);\n","'use client';\n\nimport { useThemeStore } from '../lib/store/theme';\nimport type { ThemeName, ColorMode } from '@thesage/tokens';\n\nexport interface ThemeHook {\n /**\n * Current theme name\n */\n theme: ThemeName;\n\n /**\n * Current color mode (light/dark)\n */\n mode: ColorMode;\n\n /**\n * Set the theme\n */\n setTheme: (theme: ThemeName) => void;\n\n /**\n * Set the color mode\n */\n setMode: (mode: ColorMode) => void;\n\n /**\n * Toggle between light and dark mode\n */\n toggleMode: () => void;\n\n /**\n * Combined theme configuration\n */\n themeConfig: { name: ThemeName; mode: ColorMode };\n}\n\n/**\n * Hook to access and control theme settings\n *\n * @example\n * ```tsx\n * function ThemeSelector() {\n * const { theme, mode, setTheme, toggleMode } = useTheme();\n *\n * return (\n * <div>\n * <p>Current: {theme} - {mode}</p>\n * <button onClick={() => setTheme('sage')}>Sage Theme</button>\n * <button onClick={toggleMode}>Toggle Mode</button>\n * </div>\n * );\n * }\n * ```\n */\nexport function useTheme(): ThemeHook {\n return useThemeStore();\n}\n","'use client';\n\nimport { useEffect } from 'react';\nimport { useCustomizer } from '../lib/store/customizer';\n\nexport interface MotionPreference {\n /**\n * Motion intensity level (0-10)\n * 0 = no motion, 10 = full motion\n */\n scale: number;\n\n /**\n * Whether animations should be displayed\n * False when scale is 0 or prefersReducedMotion is true\n */\n shouldAnimate: boolean;\n\n /**\n * System preference for reduced motion\n */\n prefersReducedMotion: boolean;\n}\n\n/**\n * Hook to access motion preferences\n *\n * Automatically syncs with system `prefers-reduced-motion` media query\n * and respects user's manual motion intensity setting.\n *\n * @example\n * ```tsx\n * function AnimatedComponent() {\n * const { scale, shouldAnimate } = useMotionPreference();\n *\n * if (!shouldAnimate) {\n * return <div>Content without animation</div>;\n * }\n *\n * return (\n * <motion.div\n * animate={{ opacity: 1 }}\n * transition={{ duration: 0.3 * (scale / 10) }}\n * >\n * Content with scaled animation\n * </motion.div>\n * );\n * }\n * ```\n */\nexport function useMotionPreference(): MotionPreference {\n const { motion, prefersReducedMotion, setPrefersReducedMotion } = useCustomizer();\n\n // Listen for system prefers-reduced-motion changes\n useEffect(() => {\n // Only run in browser environment\n if (typeof window === 'undefined') return;\n\n const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');\n\n // Set initial value\n setPrefersReducedMotion(mediaQuery.matches);\n\n // Listen for changes\n const handleChange = (e: MediaQueryListEvent) => {\n setPrefersReducedMotion(e.matches);\n };\n\n mediaQuery.addEventListener('change', handleChange);\n return () => mediaQuery.removeEventListener('change', handleChange);\n }, [setPrefersReducedMotion]);\n\n return {\n scale: motion,\n shouldAnimate: motion > 0 && !prefersReducedMotion,\n prefersReducedMotion,\n };\n}\n","import { create } from 'zustand';\nimport { persist } from 'zustand/middleware';\nimport { computeDerivedTokens, type FontTheme } from '@thesage/tokens';\nimport {\n generateColorScale,\n getOptimalForeground,\n} from '../colors';\n\nexport type CustomizationMode = 'simple' | 'advanced';\n\nexport interface ColorPalette {\n /* Metadata */\n name?: string; // Name of the source palette\n description?: string; // Description of the source palette\n\n /* Colors */\n primary: string; // Base hex\n primaryForeground: string; // Calculated contrast\n secondary?: string; // Optional secondary color\n secondaryForeground?: string; // Calculated contrast\n accent?: string; // Optional accent color\n accentForeground?: string; // Calculated contrast\n scale: Record<number, string>; // 50-900 tints/shades\n derivedTokens: Record<string, string>; // Computed dependent tokens\n}\n\nexport interface SavedPalette {\n id: string; // Unique ID\n name: string; // User-defined name\n description: string; // Palette description\n primary: string; // Primary color hex\n accent: string; // Accent color hex\n secondary?: string; // Optional secondary color\n category: 'custom'; // Always 'custom' for user palettes\n wcagAA: boolean; // Calculated accessibility\n wcagAAA: boolean; // Calculated accessibility\n createdAt: number; // Timestamp\n mood: string[]; // Mood tags\n bestFor?: string[]; // Best use cases\n harmony?: string;\n rationale?: string;\n}\n\nexport interface SavedFontTheme extends FontTheme {\n id: string; // Unique ID (overrides FontTheme.id)\n createdAt: number; // Timestamp\n category: 'custom'; // Always 'custom' for user font themes\n}\n\nexport interface ColorCustomization {\n mode: CustomizationMode;\n palette: ColorPalette | null;\n}\n\nexport type ThemeName = 'studio' | 'terra' | 'volt' | 'speedboat';\nexport type ColorMode = 'light' | 'dark';\n\ninterface CustomizerState {\n // Motion settings\n motion: number; // 0-10\n prefersReducedMotion: boolean;\n\n // Color customization\n customizationMode: CustomizationMode;\n customColors: {\n [theme in ThemeName]?: {\n [mode in ColorMode]?: ColorPalette;\n };\n };\n\n // Saved custom palettes\n savedPalettes: SavedPalette[];\n\n // Font theme customization\n customFontThemes: {\n [theme in ThemeName]?: {\n [mode in ColorMode]?: FontTheme;\n };\n };\n\n // Saved custom font themes\n savedFontThemes: SavedFontTheme[];\n\n // Motion actions\n setMotion: (level: number) => void;\n setPrefersReducedMotion: (value: boolean) => void;\n\n // Color customization actions\n setCustomizationMode: (mode: CustomizationMode) => void;\n\n setCustomPrimaryColor: (\n theme: ThemeName,\n mode: ColorMode,\n hexColor: string\n ) => void;\n\n setCustomSecondaryColor: (\n theme: ThemeName,\n mode: ColorMode,\n hexColor: string\n ) => void;\n\n setCustomAccentColor: (\n theme: ThemeName,\n mode: ColorMode,\n hexColor: string\n ) => void;\n\n applyColorPalette: (\n theme: ThemeName,\n mode: ColorMode,\n colors: {\n primary: string;\n secondary?: string;\n accent?: string;\n name?: string;\n description?: string;\n }\n ) => void;\n\n resetCustomColors: (theme: ThemeName, mode?: ColorMode) => void;\n\n getActiveColorPalette: (theme: ThemeName, mode: ColorMode) => ColorPalette | null;\n\n // Saved palette actions\n savePalette: (palette: Omit<SavedPalette, 'id' | 'createdAt' | 'category'>) => void;\n updatePalette: (id: string, updates: Partial<SavedPalette>) => void;\n renamePalette: (id: string, newName: string) => void;\n deletePalette: (id: string) => void;\n reorderPalettes: (palettes: SavedPalette[]) => void;\n getSavedPalettes: () => SavedPalette[];\n\n // Font theme actions\n applyFontTheme: (\n theme: ThemeName,\n mode: ColorMode,\n fontTheme: FontTheme\n ) => void;\n\n resetCustomFonts: (theme: ThemeName, mode?: ColorMode) => void;\n\n getActiveFontTheme: (theme: ThemeName, mode: ColorMode) => FontTheme | null;\n\n // Saved font theme actions\n saveFontTheme: (fontTheme: Omit<SavedFontTheme, 'id' | 'createdAt' | 'category'>) => void;\n updateFontTheme: (id: string, updates: Partial<SavedFontTheme>) => void;\n renameFontTheme: (id: string, newName: string) => void;\n deleteFontTheme: (id: string) => void;\n reorderFontThemes: (fontThemes: SavedFontTheme[]) => void;\n getSavedFontThemes: () => SavedFontTheme[];\n}\n\nexport const useCustomizer = create<CustomizerState>()(\n persist(\n (set, get) => ({\n motion: 5,\n prefersReducedMotion: false,\n customizationMode: 'simple',\n customColors: {},\n savedPalettes: [],\n customFontThemes: {},\n savedFontThemes: [],\n\n setMotion: (level) => set({ motion: level }),\n setPrefersReducedMotion: (value) => set({ prefersReducedMotion: value }),\n setCustomizationMode: (mode) => set({ customizationMode: mode }),\n\n setCustomPrimaryColor: (theme, mode, hexColor) => {\n const state = get();\n const currentPalette = state.customColors[theme]?.[mode];\n\n // Generate complete color palette\n const scale = generateColorScale(hexColor);\n const primaryForeground = getOptimalForeground(hexColor);\n\n // Compute all derived tokens based on dependency graph\n const derivedTokens = computeDerivedTokens('--color-primary', hexColor, mode);\n\n // In simple mode, generate secondary/accent from primary\n const isSimple = state.customizationMode === 'simple';\n\n const palette: ColorPalette = {\n primary: hexColor,\n primaryForeground,\n secondary: isSimple ? undefined : currentPalette?.secondary,\n secondaryForeground: isSimple ? undefined : currentPalette?.secondaryForeground,\n accent: isSimple ? undefined : currentPalette?.accent,\n accentForeground: isSimple ? undefined : currentPalette?.accentForeground,\n scale,\n derivedTokens,\n };\n\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: palette,\n },\n },\n }));\n },\n\n setCustomSecondaryColor: (theme, mode, hexColor) => {\n const state = get();\n const currentPalette = state.customColors[theme]?.[mode];\n\n if (!currentPalette) return;\n\n const secondaryForeground = getOptimalForeground(hexColor);\n const derivedTokens = computeDerivedTokens('--color-secondary', hexColor, mode);\n\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: {\n ...currentPalette,\n secondary: hexColor,\n secondaryForeground,\n derivedTokens: {\n ...currentPalette.derivedTokens,\n ...derivedTokens,\n },\n },\n },\n },\n }));\n },\n\n setCustomAccentColor: (theme, mode, hexColor) => {\n const state = get();\n const currentPalette = state.customColors[theme]?.[mode];\n\n if (!currentPalette) return;\n\n const accentForeground = getOptimalForeground(hexColor);\n const derivedTokens = computeDerivedTokens('--color-accent', hexColor, mode);\n\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: {\n ...currentPalette,\n accent: hexColor,\n accentForeground,\n derivedTokens: {\n ...currentPalette.derivedTokens,\n ...derivedTokens,\n },\n },\n },\n },\n }));\n },\n\n applyColorPalette: (theme, mode, colors: {\n primary: string;\n secondary?: string;\n accent?: string;\n name?: string;\n description?: string;\n }) => {\n // Generate complete color palette with all three colors in a single atomic update\n const scale = generateColorScale(colors.primary);\n const primaryForeground = getOptimalForeground(colors.primary);\n\n // Compute all derived tokens\n let derivedTokens = computeDerivedTokens('--color-primary', colors.primary, mode);\n\n // Add secondary color if provided\n const secondary = colors.secondary;\n const secondaryForeground = secondary ? getOptimalForeground(secondary) : undefined;\n if (secondary) {\n const secondaryDerived = computeDerivedTokens('--color-secondary', secondary, mode);\n derivedTokens = { ...derivedTokens, ...secondaryDerived };\n }\n\n // Add accent color if provided\n const accent = colors.accent;\n const accentForeground = accent ? getOptimalForeground(accent) : undefined;\n if (accent) {\n const accentDerived = computeDerivedTokens('--color-accent', accent, mode);\n derivedTokens = { ...derivedTokens, ...accentDerived };\n }\n\n const palette: ColorPalette = {\n name: colors.name,\n description: colors.description,\n primary: colors.primary,\n primaryForeground,\n secondary,\n secondaryForeground,\n accent,\n accentForeground,\n scale,\n derivedTokens,\n };\n\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: palette,\n },\n },\n }));\n },\n\n resetCustomColors: (theme, mode) => {\n if (mode) {\n // Reset specific mode\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: undefined,\n },\n },\n }));\n } else {\n // Reset entire theme\n set((state) => {\n const { [theme]: _, ...rest } = state.customColors;\n return { customColors: rest };\n });\n }\n },\n\n getActiveColorPalette: (theme, mode) => {\n return get().customColors[theme]?.[mode] || null;\n },\n\n // Saved palette management\n savePalette: (paletteData) => {\n const id = `custom-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n const newPalette: SavedPalette = {\n ...paletteData,\n id,\n category: 'custom',\n createdAt: Date.now(),\n };\n\n set((state) => ({\n savedPalettes: [...state.savedPalettes, newPalette],\n }));\n },\n\n updatePalette: (id, updates) => {\n set((state) => ({\n savedPalettes: state.savedPalettes.map((p) =>\n p.id === id ? { ...p, ...updates } : p\n ),\n }));\n },\n\n renamePalette: (id, newName) => {\n set((state) => ({\n savedPalettes: state.savedPalettes.map((p) =>\n p.id === id ? { ...p, name: newName } : p\n ),\n }));\n },\n\n deletePalette: (id) => {\n set((state) => ({\n savedPalettes: state.savedPalettes.filter((p) => p.id !== id),\n }));\n },\n\n reorderPalettes: (palettes) => {\n set({ savedPalettes: palettes });\n },\n\n getSavedPalettes: () => {\n return get().savedPalettes;\n },\n\n // Font theme management\n applyFontTheme: (theme, mode, fontTheme) => {\n set((state) => ({\n customFontThemes: {\n ...state.customFontThemes,\n [theme]: {\n ...state.customFontThemes[theme],\n [mode]: fontTheme,\n },\n },\n }));\n },\n\n resetCustomFonts: (theme, mode) => {\n if (mode) {\n // Reset specific mode\n set((state) => ({\n customFontThemes: {\n ...state.customFontThemes,\n [theme]: {\n ...state.customFontThemes[theme],\n [mode]: undefined,\n },\n },\n }));\n } else {\n // Reset entire theme\n set((state) => {\n const { [theme]: _, ...rest } = state.customFontThemes;\n return { customFontThemes: rest };\n });\n }\n },\n\n getActiveFontTheme: (theme, mode) => {\n return get().customFontThemes[theme]?.[mode] || null;\n },\n\n // Saved font theme management\n saveFontTheme: (fontThemeData) => {\n const id = `font-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n const newFontTheme: SavedFontTheme = {\n ...fontThemeData,\n id,\n category: 'custom',\n createdAt: Date.now(),\n isCustom: true,\n };\n\n set((state) => ({\n savedFontThemes: [...state.savedFontThemes, newFontTheme],\n }));\n },\n\n updateFontTheme: (id, updates) => {\n set((state) => ({\n savedFontThemes: state.savedFontThemes.map((ft) =>\n ft.id === id ? { ...ft, ...updates } : ft\n ),\n }));\n },\n\n renameFontTheme: (id, newName) => {\n set((state) => ({\n savedFontThemes: state.savedFontThemes.map((ft) =>\n ft.id === id ? { ...ft, name: newName } : ft\n ),\n }));\n },\n\n deleteFontTheme: (id) => {\n set((state) => ({\n savedFontThemes: state.savedFontThemes.filter((ft) => ft.id !== id),\n }));\n },\n\n reorderFontThemes: (fontThemes) => {\n set({ savedFontThemes: fontThemes });\n },\n\n getSavedFontThemes: () => {\n return get().savedFontThemes;\n },\n }),\n {\n name: 'ecosystem-customizer',\n version: 4,\n partialize: (state) => ({\n motion: state.motion,\n prefersReducedMotion: state.prefersReducedMotion,\n customizationMode: state.customizationMode,\n customColors: state.customColors,\n savedPalettes: state.savedPalettes,\n customFontThemes: state.customFontThemes,\n savedFontThemes: state.savedFontThemes,\n }),\n }\n )\n);\n","/**\n * Color Transformation Utilities\n * Standalone utilities for the token system (no external dependencies)\n */\n\n/**\n * Convert hex to RGB\n */\nexport function hexToRgb(hex: string): { r: number; g: number; b: number } | null {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n }\n : null;\n}\n\n/**\n * Convert hex to HSL\n */\nexport function hexToHSL(hex: string): { h: number; s: number; l: number } {\n const rgb = hexToRgb(hex);\n if (!rgb) return { h: 0, s: 0, l: 0 };\n\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h = 0, s = 0, l = (max + min) / 2;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r: h = ((g - b) / d + (g < b ? 6 : 0)) / 6; break;\n case g: h = ((b - r) / d + 2) / 6; break;\n case b: h = ((r - g) / d + 4) / 6; break;\n }\n }\n\n return {\n h: Math.round(h * 360),\n s: Math.round(s * 100),\n l: Math.round(l * 100),\n };\n}\n\n/**\n * Convert HSL to hex\n */\nexport function hslToHex(h: number, s: number, l: number): string {\n h = h / 360;\n s = s / 100;\n l = l / 100;\n\n let r, g, b;\n\n if (s === 0) {\n r = g = b = l;\n } else {\n const hue2rgb = (p: number, q: number, t: number) => {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1/6) return p + (q - p) * 6 * t;\n if (t < 1/2) return q;\n if (t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n };\n\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n const toHex = (x: number) => {\n const hex = Math.round(x * 255).toString(16);\n return hex.length === 1 ? '0' + hex : hex;\n };\n\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\n/**\n * Adjust lightness of a hex color\n */\nexport function adjustLightness(hex: string, percent: number): string {\n const hsl = hexToHSL(hex);\n const newL = Math.max(0, Math.min(100, hsl.l + percent));\n return hslToHex(hsl.h, hsl.s, newL);\n}\n\n/**\n * Adjust saturation of a hex color\n */\nexport function adjustSaturation(hex: string, percent: number): string {\n const hsl = hexToHSL(hex);\n const newS = Math.max(0, Math.min(100, hsl.s + percent));\n return hslToHex(hsl.h, newS, hsl.l);\n}\n\n/**\n * Rotate hue of a hex color\n */\nexport function rotateHue(hex: string, degrees: number): string {\n const hsl = hexToHSL(hex);\n const newH = (hsl.h + degrees) % 360;\n return hslToHex(newH, hsl.s, hsl.l);\n}\n\n/**\n * Add opacity to a hex color (returns rgba CSS value)\n */\nexport function adjustOpacity(hex: string, opacity: number): string {\n const rgb = hexToRgb(hex);\n if (!rgb) return hex;\n return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`;\n}\n\n/**\n * Calculate relative luminance (WCAG formula)\n */\nexport function getLuminance(r: number, g: number, b: number): number {\n const [rs, gs, bs] = [r, g, b].map((c) => {\n const srgb = c / 255;\n return srgb <= 0.03928 ? srgb / 12.92 : Math.pow((srgb + 0.055) / 1.055, 2.4);\n });\n return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;\n}\n\n/**\n * Calculate contrast ratio between two colors (WCAG formula)\n */\nexport function getContrastRatio(hex1: string, hex2: string): number {\n const rgb1 = hexToRgb(hex1);\n const rgb2 = hexToRgb(hex2);\n\n if (!rgb1 || !rgb2) return 0;\n\n const lum1 = getLuminance(rgb1.r, rgb1.g, rgb1.b);\n const lum2 = getLuminance(rgb2.r, rgb2.g, rgb2.b);\n\n const lighter = Math.max(lum1, lum2);\n const darker = Math.min(lum1, lum2);\n\n return (lighter + 0.05) / (darker + 0.05);\n}\n\n/**\n * Get optimal foreground color (white or black) for a background\n */\nexport function getOptimalForeground(\n bgHex: string,\n whiteHex: string = '#ffffff',\n blackHex: string = '#000000'\n): string {\n const whiteRatio = getContrastRatio(bgHex, whiteHex);\n const blackRatio = getContrastRatio(bgHex, blackHex);\n\n return whiteRatio > blackRatio ? whiteHex : blackHex;\n}\n","/**\n * Token Dependency Graph\n * Defines which tokens are computed from other tokens for \"change once, ripple everywhere\"\n */\n\nimport {\n adjustLightness,\n adjustSaturation,\n adjustOpacity,\n rotateHue,\n getOptimalForeground,\n} from './color-utils';\n\nexport type TokenDerivation = {\n source: string; // Which token it derives from\n transform: (sourceValue: string) => string; // How to compute it\n description: string; // Why this derivation exists\n};\n\n/**\n * Primary Color Derivations\n * These tokens automatically update when primary color changes\n */\nexport const primaryColorDerivations: Record<string, TokenDerivation> = {\n // Links use primary color\n '--color-link': {\n source: '--color-primary',\n transform: (primary) => primary,\n description: 'Links inherit primary brand color',\n },\n\n // Focus ring uses primary color\n '--color-ring': {\n source: '--color-primary',\n transform: (primary) => primary,\n description: 'Focus rings use primary for brand consistency',\n },\n\n // Link hover is slightly darker primary\n '--color-link-hover': {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, -10),\n description: 'Link hover is 10% darker for visual feedback',\n },\n\n // Chart primary series\n '--chart-1': {\n source: '--color-primary',\n transform: (primary) => primary,\n description: 'First chart series uses primary',\n },\n\n // Chart secondary series (lighter tint)\n '--chart-2': {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, 20),\n description: 'Second chart series is lighter tint of primary',\n },\n\n // Chart tertiary series (darker shade)\n '--chart-3': {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, -15),\n description: 'Third chart series is darker shade of primary',\n },\n\n // Chart quaternary (desaturated primary)\n '--chart-4': {\n source: '--color-primary',\n transform: (primary) => adjustSaturation(primary, -30),\n description: 'Fourth chart series is muted primary',\n },\n\n // Chart quinary (complementary color)\n '--chart-5': {\n source: '--color-primary',\n transform: (primary) => rotateHue(primary, 180),\n description: 'Fifth chart series is complementary to primary',\n },\n};\n\n/**\n * Secondary Color Derivations\n * These derive from secondary color\n */\nexport const secondaryColorDerivations: Record<string, TokenDerivation> = {\n // Hover states\n '--color-hover': {\n source: '--color-secondary',\n transform: (secondary) => secondary,\n description: 'Hover backgrounds use secondary',\n },\n\n // Active states\n '--color-active': {\n source: '--color-secondary',\n transform: (secondary) => adjustLightness(secondary, -5),\n description: 'Active state is slightly darker secondary',\n },\n\n // Muted backgrounds\n '--color-muted': {\n source: '--color-secondary',\n transform: (secondary) => secondary,\n description: 'Muted sections use secondary color',\n },\n};\n\n/**\n * Accent Color Derivations\n * These derive from accent (used for highlights and CTAs)\n */\nexport const accentColorDerivations: Record<string, TokenDerivation> = {\n // Info semantic color uses accent\n '--color-info': {\n source: '--color-accent',\n transform: (accent) => accent,\n description: 'Info semantic color uses accent',\n },\n\n // Info foreground calculated for contrast\n '--color-info-foreground': {\n source: '--color-accent',\n transform: (accent) => getOptimalForeground(accent),\n description: 'Info foreground calculated for contrast',\n },\n};\n\n/**\n * Mode-Specific Derivations\n * These need different transforms for light vs dark mode\n */\nexport const modeSpecificDerivations: Record<string, {\n light: TokenDerivation;\n dark: TokenDerivation;\n}> = {\n '--color-primary-muted': {\n light: {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, 40),\n description: 'Muted primary for light backgrounds',\n },\n dark: {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, -20),\n description: 'Muted primary for dark backgrounds',\n },\n },\n\n '--color-primary-subtle': {\n light: {\n source: '--color-primary',\n transform: (primary) => adjustOpacity(primary, 0.1),\n description: 'Subtle primary background for light mode',\n },\n dark: {\n source: '--color-primary',\n transform: (primary) => adjustOpacity(primary, 0.2),\n description: 'Subtle primary background for dark mode',\n },\n },\n};\n\n/**\n * Complete dependency graph\n */\nexport const tokenDependencyGraph = {\n primary: primaryColorDerivations,\n secondary: secondaryColorDerivations,\n accent: accentColorDerivations,\n modeSpecific: modeSpecificDerivations,\n};\n\n/**\n * Get all tokens that depend on a source token\n */\nexport function getDependentTokens(sourceToken: string): string[] {\n const dependents: string[] = [];\n\n Object.entries(primaryColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n dependents.push(token);\n }\n });\n\n Object.entries(secondaryColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n dependents.push(token);\n }\n });\n\n Object.entries(accentColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n dependents.push(token);\n }\n });\n\n return dependents;\n}\n\n/**\n * Compute all derived tokens from a source\n */\nexport function computeDerivedTokens(\n sourceToken: string,\n sourceValue: string,\n mode: 'light' | 'dark'\n): Record<string, string> {\n const derived: Record<string, string> = {};\n\n // Compute from primary derivations\n Object.entries(primaryColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n derived[token] = config.transform(sourceValue);\n }\n });\n\n // Compute from secondary derivations\n Object.entries(secondaryColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n derived[token] = config.transform(sourceValue);\n }\n });\n\n // Compute from accent derivations\n Object.entries(accentColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n derived[token] = config.transform(sourceValue);\n }\n });\n\n // Compute mode-specific derivations\n Object.entries(modeSpecificDerivations).forEach(([token, configs]) => {\n const config = configs[mode];\n if (config.source === sourceToken) {\n derived[token] = config.transform(sourceValue);\n }\n });\n\n return derived;\n}\n","/**\n * Semantic Color Utilities\n *\n * Helper functions for working with the design system's color tokens\n * and CSS variables.\n */\n\n/**\n * Color token categories\n */\nexport const colorTokens = {\n // Background colors\n background: 'var(--color-background)',\n backgroundSecondary: 'var(--color-background-secondary)',\n backgroundTertiary: 'var(--color-background-tertiary)',\n surface: 'var(--color-surface)',\n\n // Foreground/Text colors\n foreground: 'var(--color-foreground)',\n foregroundSecondary: 'var(--color-foreground-secondary)',\n foregroundTertiary: 'var(--color-foreground-tertiary)',\n textPrimary: 'var(--color-text-primary)',\n textSecondary: 'var(--color-text-secondary)',\n textMuted: 'var(--color-text-muted)',\n\n // Brand colors\n primary: 'var(--color-primary)',\n primaryForeground: 'var(--color-primary-foreground)',\n secondary: 'var(--color-secondary)',\n secondaryForeground: 'var(--color-secondary-foreground)',\n accent: 'var(--color-accent)',\n accentForeground: 'var(--color-accent-foreground)',\n\n // Semantic colors\n success: 'var(--color-success)',\n successForeground: 'var(--color-success-foreground)',\n warning: 'var(--color-warning)',\n warningForeground: 'var(--color-warning-foreground)',\n error: 'var(--color-error)',\n errorForeground: 'var(--color-error-foreground)',\n info: 'var(--color-info)',\n infoForeground: 'var(--color-info-foreground)',\n\n // Borders\n border: 'var(--color-border)',\n borderSubtle: 'var(--color-border-subtle)',\n\n // Interactive states\n hover: 'var(--color-hover)',\n active: 'var(--color-active)',\n focus: 'var(--color-focus)',\n\n // Links\n link: 'var(--color-link)',\n linkHover: 'var(--color-link-hover)',\n linkHoverForeground: 'var(--color-link-hover-foreground)',\n} as const;\n\n/**\n * Get CSS variable value from computed styles\n *\n * @param variableName - CSS variable name (with or without --)\n * @param element - Element to get computed style from (defaults to document.documentElement)\n * @returns The computed value of the CSS variable\n *\n * @example\n * ```ts\n * const primaryColor = getCSSVariable('--color-primary');\n * // Returns: '#0066ff' (or whatever the current theme's primary color is)\n * ```\n */\nexport function getCSSVariable(\n variableName: string,\n element: HTMLElement = document.documentElement\n): string {\n const name = variableName.startsWith('--') ? variableName : `--${variableName}`;\n return getComputedStyle(element).getPropertyValue(name).trim();\n}\n\n/**\n * Set CSS variable value\n *\n * @param variableName - CSS variable name (with or without --)\n * @param value - Value to set\n * @param element - Element to set the variable on (defaults to document.documentElement)\n *\n * @example\n * ```ts\n * setCSSVariable('--color-primary', '#ff0000');\n * ```\n */\nexport function setCSSVariable(\n variableName: string,\n value: string,\n element: HTMLElement = document.documentElement\n): void {\n const name = variableName.startsWith('--') ? variableName : `--${variableName}`;\n element.style.setProperty(name, value);\n}\n\n/**\n * Get contrasting foreground color for a background color\n *\n * @param backgroundToken - Background color token name (without 'var()')\n * @returns The appropriate foreground color token\n *\n * @example\n * ```ts\n * const foreground = getForegroundColor('--color-primary');\n * // Returns: 'var(--color-primary-foreground)'\n * ```\n */\nexport function getForegroundColor(backgroundToken: string): string {\n // Remove var() wrapper if present\n const token = backgroundToken.replace(/var\\(|\\)/g, '');\n\n // Map background tokens to their foreground pairs\n const foregroundMap: Record<string, string> = {\n '--color-primary': 'var(--color-primary-foreground)',\n '--color-secondary': 'var(--color-secondary-foreground)',\n '--color-accent': 'var(--color-accent-foreground)',\n '--color-success': 'var(--color-success-foreground)',\n '--color-warning': 'var(--color-warning-foreground)',\n '--color-error': 'var(--color-error-foreground)',\n '--color-info': 'var(--color-info-foreground)',\n '--color-background': 'var(--color-foreground)',\n '--color-surface': 'var(--color-text-primary)',\n };\n\n return foregroundMap[token] || 'var(--color-text-primary)';\n}\n\n/**\n * Semantic color groups for different use cases\n */\nexport const semanticColors = {\n /**\n * Status colors for indicating states\n */\n status: {\n success: {\n bg: colorTokens.success,\n fg: colorTokens.successForeground,\n },\n warning: {\n bg: colorTokens.warning,\n fg: colorTokens.warningForeground,\n },\n error: {\n bg: colorTokens.error,\n fg: colorTokens.errorForeground,\n },\n info: {\n bg: colorTokens.info,\n fg: colorTokens.infoForeground,\n },\n },\n\n /**\n * Brand colors for primary UI elements\n */\n brand: {\n primary: {\n bg: colorTokens.primary,\n fg: colorTokens.primaryForeground,\n },\n secondary: {\n bg: colorTokens.secondary,\n fg: colorTokens.secondaryForeground,\n },\n accent: {\n bg: colorTokens.accent,\n fg: colorTokens.accentForeground,\n },\n },\n\n /**\n * Interactive state colors\n */\n interactive: {\n default: {\n bg: colorTokens.background,\n fg: colorTokens.foreground,\n },\n hover: {\n bg: colorTokens.hover,\n fg: colorTokens.foreground,\n },\n active: {\n bg: colorTokens.active,\n fg: colorTokens.foreground,\n },\n focus: {\n border: colorTokens.focus,\n },\n },\n} as const;\n\n/**\n * Helper to create color pairs (background + foreground)\n *\n * @param type - Semantic color type\n * @returns Object with bg and fg (and optionally border)\n *\n * @example\n * ```tsx\n * const errorColors = getSemanticColorPair('error');\n * <div style={{\n * backgroundColor: errorColors.bg,\n * color: errorColors.fg\n * }}>\n * Error message\n * </div>\n * ```\n */\nexport function getSemanticColorPair(\n type: 'success' | 'warning' | 'error' | 'info' | 'primary' | 'secondary' | 'accent'\n): { bg: string; fg: string } {\n if (type === 'primary' || type === 'secondary' || type === 'accent') {\n return semanticColors.brand[type];\n }\n return semanticColors.status[type];\n}\n\n/**\n * Convert hex color to RGB values\n *\n * @param hex - Hex color string (with or without #)\n * @returns Object with r, g, b values (0-255)\n *\n * @example\n * ```ts\n * const rgb = hexToRgb('#0066ff');\n * // Returns: { r: 0, g: 102, b: 255 }\n * ```\n */\nexport function hexToRgb(hex: string): { r: number; g: number; b: number } | null {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n }\n : null;\n}\n\n/**\n * Calculate relative luminance of a color (WCAG formula)\n *\n * @param r - Red value (0-255)\n * @param g - Green value (0-255)\n * @param b - Blue value (0-255)\n * @returns Relative luminance (0-1)\n */\nexport function getLuminance(r: number, g: number, b: number): number {\n const [rs, gs, bs] = [r, g, b].map((c) => {\n const srgb = c / 255;\n return srgb <= 0.03928 ? srgb / 12.92 : Math.pow((srgb + 0.055) / 1.055, 2.4);\n });\n return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;\n}\n\n/**\n * Calculate contrast ratio between two colors (WCAG formula)\n *\n * @param hex1 - First color (hex)\n * @param hex2 - Second color (hex)\n * @returns Contrast ratio (1-21)\n *\n * @example\n * ```ts\n * const ratio = getContrastRatio('#ffffff', '#000000');\n * // Returns: 21 (maximum contrast)\n * ```\n */\nexport function getContrastRatio(hex1: string, hex2: string): number {\n const rgb1 = hexToRgb(hex1);\n const rgb2 = hexToRgb(hex2);\n\n if (!rgb1 || !rgb2) return 0;\n\n const lum1 = getLuminance(rgb1.r, rgb1.g, rgb1.b);\n const lum2 = getLuminance(rgb2.r, rgb2.g, rgb2.b);\n\n const lighter = Math.max(lum1, lum2);\n const darker = Math.min(lum1, lum2);\n\n return (lighter + 0.05) / (darker + 0.05);\n}\n\n/**\n * Check if color pair meets WCAG AA contrast requirements\n *\n * @param foreground - Foreground color (hex)\n * @param background - Background color (hex)\n * @param level - WCAG level ('AA' or 'AAA')\n * @param size - Text size ('normal' or 'large')\n * @returns true if contrast ratio meets requirements\n *\n * @example\n * ```ts\n * const isAccessible = meetsContrastRequirements('#000000', '#ffffff', 'AA', 'normal');\n * // Returns: true\n * ```\n */\nexport function meetsContrastRequirements(\n foreground: string,\n background: string,\n level: 'AA' | 'AAA' = 'AA',\n size: 'normal' | 'large' = 'normal'\n): boolean {\n const ratio = getContrastRatio(foreground, background);\n\n const requirements = {\n AA: { normal: 4.5, large: 3 },\n AAA: { normal: 7, large: 4.5 },\n };\n\n return ratio >= requirements[level][size];\n}\n\n/**\n * Convert hex to HSL for manipulation\n */\nexport function hexToHSL(hex: string): { h: number; s: number; l: number } {\n const rgb = hexToRgb(hex);\n if (!rgb) return { h: 0, s: 0, l: 0 };\n\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h = 0, s = 0; const l = (max + min) / 2;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r: h = ((g - b) / d + (g < b ? 6 : 0)) / 6; break;\n case g: h = ((b - r) / d + 2) / 6; break;\n case b: h = ((r - g) / d + 4) / 6; break;\n }\n }\n\n return {\n h: Math.round(h * 360),\n s: Math.round(s * 100),\n l: Math.round(l * 100),\n };\n}\n\n/**\n * Convert HSL to hex\n */\nexport function hslToHex(h: number, s: number, l: number): string {\n h = h / 360;\n s = s / 100;\n l = l / 100;\n\n let r, g, b;\n\n if (s === 0) {\n r = g = b = l;\n } else {\n const hue2rgb = (p: number, q: number, t: number) => {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1/6) return p + (q - p) * 6 * t;\n if (t < 1/2) return q;\n if (t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n };\n\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n const toHex = (x: number) => {\n const hex = Math.round(x * 255).toString(16);\n return hex.length === 1 ? '0' + hex : hex;\n };\n\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\n/**\n * Adjust lightness of a hex color\n * @param hex - Input color\n * @param percent - Amount to adjust (-100 to 100)\n */\nexport function adjustLightness(hex: string, percent: number): string {\n const hsl = hexToHSL(hex);\n const newL = Math.max(0, Math.min(100, hsl.l + percent));\n return hslToHex(hsl.h, hsl.s, newL);\n}\n\n/**\n * Adjust saturation of a hex color\n * @param hex - Input color\n * @param percent - Amount to adjust (-100 to 100)\n */\nexport function adjustSaturation(hex: string, percent: number): string {\n const hsl = hexToHSL(hex);\n const newS = Math.max(0, Math.min(100, hsl.s + percent));\n return hslToHex(hsl.h, newS, hsl.l);\n}\n\n/**\n * Rotate hue of a hex color\n * @param hex - Input color\n * @param degrees - Degrees to rotate (0-360)\n */\nexport function rotateHue(hex: string, degrees: number): string {\n const hsl = hexToHSL(hex);\n const newH = (hsl.h + degrees) % 360;\n return hslToHex(newH, hsl.s, hsl.l);\n}\n\n/**\n * Add opacity to a hex color (returns rgba CSS value)\n * @param hex - Input color\n * @param opacity - Opacity (0-1)\n */\nexport function adjustOpacity(hex: string, opacity: number): string {\n const rgb = hexToRgb(hex);\n if (!rgb) return hex;\n return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`;\n}\n\n/**\n * Get optimal foreground color (white or black) for a background\n * Uses WCAG contrast formula\n */\nexport function getOptimalForeground(\n bgHex: string,\n whiteHex: string = '#ffffff',\n blackHex: string = '#000000'\n): string {\n const whiteRatio = getContrastRatio(bgHex, whiteHex);\n const blackRatio = getContrastRatio(bgHex, blackHex);\n\n return whiteRatio > blackRatio ? whiteHex : blackHex;\n}\n\n/**\n * Generate a complete tint/shade scale (like Tailwind)\n * Returns 50, 100, 200, ..., 900 variants\n */\nexport function generateColorScale(baseHex: string): Record<number, string> {\n const hsl = hexToHSL(baseHex);\n\n return {\n 50: hslToHex(hsl.h, Math.max(hsl.s - 10, 20), 95),\n 100: hslToHex(hsl.h, Math.max(hsl.s - 5, 30), 90),\n 200: hslToHex(hsl.h, hsl.s, 80),\n 300: hslToHex(hsl.h, hsl.s, 70),\n 400: hslToHex(hsl.h, hsl.s, 60),\n 500: baseHex, // Base color\n 600: hslToHex(hsl.h, Math.min(hsl.s + 5, 100), 45),\n 700: hslToHex(hsl.h, Math.min(hsl.s + 10, 100), 35),\n 800: hslToHex(hsl.h, Math.min(hsl.s + 15, 100), 25),\n 900: hslToHex(hsl.h, Math.min(hsl.s + 20, 100), 15),\n };\n}\n\n/**\n * Color utilities for common operations\n */\nexport const colorUtils = {\n getCSSVariable,\n setCSSVariable,\n getForegroundColor,\n getSemanticColorPair,\n hexToRgb,\n hexToHSL,\n hslToHex,\n adjustLightness,\n adjustSaturation,\n rotateHue,\n adjustOpacity,\n getOptimalForeground,\n generateColorScale,\n getContrastRatio,\n meetsContrastRequirements,\n} as const;\n","'use client';\n\nimport { useState, useCallback } from 'react';\nimport type { FieldValidation, FormErrors } from '../lib/validation';\nimport { validateField, validateForm } from '../lib/validation';\n\nexport interface UseFormOptions<T> {\n /**\n * Initial form values\n */\n initialValues: T;\n\n /**\n * Validation rules for each field\n */\n validations?: Partial<Record<keyof T, FieldValidation>>;\n\n /**\n * Callback fired when form is submitted and valid\n */\n onSubmit?: (values: T) => void | Promise<void>;\n\n /**\n * When to validate fields\n * @default 'onBlur'\n */\n validateOn?: 'onChange' | 'onBlur' | 'onSubmit';\n}\n\nexport interface UseFormReturn<T> {\n /**\n * Current form values\n */\n values: T;\n\n /**\n * Current form errors\n */\n errors: FormErrors;\n\n /**\n * Whether the form is currently submitting\n */\n isSubmitting: boolean;\n\n /**\n * Whether the form has been touched/modified\n */\n isDirty: boolean;\n\n /**\n * Set value for a specific field\n */\n setValue: (name: keyof T, value: any) => void;\n\n /**\n * Set error for a specific field\n */\n setError: (name: keyof T, error: string | undefined) => void;\n\n /**\n * Handle input change event\n */\n handleChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;\n\n /**\n * Handle input blur event\n */\n handleBlur: (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;\n\n /**\n * Handle form submit\n */\n handleSubmit: (e?: React.FormEvent<HTMLFormElement>) => Promise<void>;\n\n /**\n * Reset form to initial values\n */\n reset: () => void;\n\n /**\n * Manually validate all fields\n */\n validate: () => boolean;\n\n /**\n * Get props for a field (value, onChange, onBlur, error)\n */\n getFieldProps: (name: keyof T) => {\n name: string;\n value: any;\n onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;\n onBlur: (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;\n error: boolean;\n };\n}\n\n/**\n * useForm Hook\n *\n * A lightweight form state management hook with built-in validation.\n *\n * Features:\n * - Field-level validation\n * - Configurable validation timing (onChange, onBlur, onSubmit)\n * - Dirty state tracking\n * - Submit handling with loading state\n * - Helper functions for common patterns\n *\n * Example:\n * ```tsx\n * const form = useForm({\n * initialValues: { email: '', password: '' },\n * validations: {\n * email: { required: true, pattern: patterns.email },\n * password: { required: true, minLength: { value: 8, message: 'Min 8 chars' } }\n * },\n * onSubmit: async (values) => {\n * await login(values);\n * }\n * });\n *\n * return (\n * <form onSubmit={form.handleSubmit}>\n * <FormField label=\"Email\" error={form.errors.email}>\n * <TextField {...form.getFieldProps('email')} />\n * </FormField>\n * <Button type=\"submit\" loading={form.isSubmitting}>Submit</Button>\n * </form>\n * );\n * ```\n */\nexport function useForm<T extends Record<string, any>>({\n initialValues,\n validations = {},\n onSubmit,\n validateOn = 'onBlur',\n}: UseFormOptions<T>): UseFormReturn<T> {\n const [values, setValues] = useState<T>(initialValues);\n const [errors, setErrors] = useState<FormErrors>({});\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [isDirty, setIsDirty] = useState(false);\n\n const setValue = useCallback((name: keyof T, value: any) => {\n setValues((prev) => ({ ...prev, [name]: value }));\n setIsDirty(true);\n }, []);\n\n const setError = useCallback((name: keyof T, error: string | undefined) => {\n setErrors((prev) => ({ ...prev, [name as string]: error }));\n }, []);\n\n const validateFieldByName = useCallback(\n (name: keyof T) => {\n const fieldRules = validations[name];\n if (!fieldRules) return;\n\n const error = validateField(values[name], fieldRules);\n setError(name, error);\n return !error;\n },\n [values, validations, setError]\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {\n const { name, value, type } = e.target;\n const fieldValue = type === 'checkbox' ? (e.target as HTMLInputElement).checked : value;\n\n setValue(name as keyof T, fieldValue);\n\n if (validateOn === 'onChange') {\n validateFieldByName(name as keyof T);\n }\n },\n [setValue, validateOn, validateFieldByName]\n );\n\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {\n const { name } = e.target;\n\n if (validateOn === 'onBlur') {\n validateFieldByName(name as keyof T);\n }\n },\n [validateOn, validateFieldByName]\n );\n\n const validate = useCallback(() => {\n const formErrors = validateForm(values, validations as any);\n setErrors(formErrors);\n return Object.keys(formErrors).length === 0;\n }, [values, validations]);\n\n const handleSubmit = useCallback(\n async (e?: React.FormEvent<HTMLFormElement>) => {\n e?.preventDefault();\n\n const isValid = validate();\n if (!isValid) return;\n\n if (onSubmit) {\n setIsSubmitting(true);\n try {\n await onSubmit(values);\n } finally {\n setIsSubmitting(false);\n }\n }\n },\n [validate, onSubmit, values]\n );\n\n const reset = useCallback(() => {\n setValues(initialValues);\n setErrors({});\n setIsDirty(false);\n setIsSubmitting(false);\n }, [initialValues]);\n\n const getFieldProps = useCallback(\n (name: keyof T) => ({\n name: name as string,\n value: values[name] ?? '',\n onChange: handleChange,\n onBlur: handleBlur,\n error: !!errors[name as string],\n }),\n [values, errors, handleChange, handleBlur]\n );\n\n return {\n values,\n errors,\n isSubmitting,\n isDirty,\n setValue,\n setError,\n handleChange,\n handleBlur,\n handleSubmit,\n reset,\n validate,\n getFieldProps,\n };\n}\n","/**\n * Form Validation Utilities\n *\n * Simple validation helpers for form fields.\n * Works seamlessly with FormField and other form components.\n */\n\nexport type ValidationRule = {\n validate: (value: any) => boolean;\n message: string;\n};\n\nexport type FieldValidation = {\n required?: boolean | string;\n minLength?: { value: number; message: string };\n maxLength?: { value: number; message: string };\n pattern?: { value: RegExp; message: string };\n custom?: ValidationRule[];\n};\n\nexport type FormErrors = Record<string, string | undefined>;\n\n/**\n * Common validation patterns\n */\nexport const patterns = {\n email: {\n value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$/i,\n message: 'Invalid email address',\n },\n url: {\n value: /^https?:\\/\\/.+\\..+/,\n message: 'Invalid URL',\n },\n phone: {\n value: /^[\\d\\s\\-\\+\\(\\)]+$/,\n message: 'Invalid phone number',\n },\n alphanumeric: {\n value: /^[a-zA-Z0-9]+$/,\n message: 'Only letters and numbers allowed',\n },\n noSpaces: {\n value: /^\\S+$/,\n message: 'Spaces are not allowed',\n },\n};\n\n/**\n * Validate a single field value against validation rules\n *\n * @param value - The field value to validate\n * @param rules - Validation rules to apply\n * @returns Error message if validation fails, undefined if valid\n *\n * @example\n * ```tsx\n * const error = validateField(email, {\n * required: true,\n * pattern: patterns.email\n * });\n * ```\n */\nexport function validateField(\n value: any,\n rules: FieldValidation\n): string | undefined {\n // Required check\n if (rules.required) {\n const isEmpty =\n value === undefined ||\n value === null ||\n value === '' ||\n (Array.isArray(value) && value.length === 0);\n\n if (isEmpty) {\n return typeof rules.required === 'string'\n ? rules.required\n : 'This field is required';\n }\n }\n\n // Skip other validations if value is empty and not required\n if (!value && !rules.required) {\n return undefined;\n }\n\n // Min length check\n if (rules.minLength && value.length < rules.minLength.value) {\n return rules.minLength.message;\n }\n\n // Max length check\n if (rules.maxLength && value.length > rules.maxLength.value) {\n return rules.maxLength.message;\n }\n\n // Pattern check\n if (rules.pattern && !rules.pattern.value.test(value)) {\n return rules.pattern.message;\n }\n\n // Custom validations\n if (rules.custom) {\n for (const rule of rules.custom) {\n if (!rule.validate(value)) {\n return rule.message;\n }\n }\n }\n\n return undefined;\n}\n\n/**\n * Validate all fields in a form\n *\n * @param values - Object containing all form field values\n * @param validations - Object containing validation rules for each field\n * @returns Object containing errors for each field\n *\n * @example\n * ```tsx\n * const errors = validateForm(\n * { email: 'test', password: '123' },\n * {\n * email: { required: true, pattern: patterns.email },\n * password: { required: true, minLength: { value: 8, message: 'Min 8 chars' } }\n * }\n * );\n * // errors = { email: 'Invalid email address', password: 'Min 8 chars' }\n * ```\n */\nexport function validateForm(\n values: Record<string, any>,\n validations: Record<string, FieldValidation>\n): FormErrors {\n const errors: FormErrors = {};\n\n for (const [field, rules] of Object.entries(validations)) {\n const error = validateField(values[field], rules);\n if (error) {\n errors[field] = error;\n }\n }\n\n return errors;\n}\n\n/**\n * Check if form has any errors\n *\n * @param errors - Form errors object\n * @returns true if there are any errors\n *\n * @example\n * ```tsx\n * if (hasErrors(errors)) {\n * console.log('Form has errors');\n * }\n * ```\n */\nexport function hasErrors(errors: FormErrors): boolean {\n return Object.values(errors).some((error) => error !== undefined);\n}\n\n/**\n * Common validation rule builders\n */\nexport const rules = {\n required: (message = 'This field is required'): FieldValidation => ({\n required: message,\n }),\n\n email: (message = 'Invalid email address'): FieldValidation => ({\n pattern: { value: patterns.email.value, message },\n }),\n\n minLength: (length: number, message?: string): FieldValidation => ({\n minLength: {\n value: length,\n message: message || `Minimum ${length} characters required`,\n },\n }),\n\n maxLength: (length: number, message?: string): FieldValidation => ({\n maxLength: {\n value: length,\n message: message || `Maximum ${length} characters allowed`,\n },\n }),\n\n match: (\n otherValue: any,\n message = 'Values do not match'\n ): FieldValidation => ({\n custom: [\n {\n validate: (value) => value === otherValue,\n message,\n },\n ],\n }),\n};\n"],"mappings":";;;AAKA,SAAS,cAAc;AACvB,SAAS,eAAe;AAoBjB,IAAM,gBAAgB,OAAmB;AAAA,EAC9C;AAAA,IACE,CAAC,KAAK,SAAS;AAAA;AAAA,MAEb,OAAO;AAAA,MACP,MAAM;AAAA;AAAA,MAGN,UAAU,CAAC,UAAU,IAAI,EAAE,MAAM,CAAC;AAAA,MAClC,SAAS,CAAC,SAAS,IAAI,EAAE,KAAK,CAAC;AAAA,MAC/B,YAAY,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;AAAA,IACA;AAAA,EACF;AACF;","names":["create","persist","p","q","hexToRgb","getLuminance","getContrastRatio","hexToHSL","hexToRgb","hslToHex","p","q","getOptimalForeground","getContrastRatio","hexToHSL","hslToHex","create","persist","getOptimalForeground","state"]}
|
|
1
|
+
{"version":3,"sources":["../src/lib/store/theme.ts","../src/hooks/useTheme.ts","../src/hooks/useMotionPreference.ts","../src/lib/store/customizer.ts","../../tokens/src/color-utils.ts","../../tokens/src/token-graph.ts","../src/lib/colors.ts","../src/hooks/useForm.ts","../src/lib/validation.ts"],"sourcesContent":["/**\n * Theme Store\n * Manages theme and color mode state with localStorage persistence\n */\n\nimport { create } from 'zustand';\nimport { persist } from 'zustand/middleware';\nimport type { ThemeName, ColorMode } from '@opencosmos/tokens';\n\n// Re-export types for convenience\nexport type { ThemeName, ColorMode };\n\ninterface ThemeState {\n // Current theme and mode\n theme: ThemeName;\n mode: ColorMode;\n\n // Actions\n setTheme: (theme: ThemeName) => void;\n setMode: (mode: ColorMode) => void;\n toggleMode: () => void;\n\n // Computed\n themeConfig: { name: ThemeName; mode: ColorMode };\n}\n\nexport const useThemeStore = create<ThemeState>()(\n persist(\n (set, get) => ({\n // Defaults\n theme: 'volt',\n mode: 'dark',\n\n // Actions\n setTheme: (theme) => set({ theme }),\n setMode: (mode) => set({ mode }),\n toggleMode: () =>\n set((state) => ({ mode: state.mode === 'light' ? 'dark' : 'light' })),\n\n // Computed\n get themeConfig() {\n const state = get();\n return { name: state.theme, mode: state.mode };\n },\n }),\n {\n name: 'ecosystem-theme',\n // Only persist theme and mode\n partialize: (state) => ({\n theme: state.theme,\n mode: state.mode,\n }),\n }\n )\n);\n","'use client';\n\nimport { useThemeStore } from '../lib/store/theme';\nimport type { ThemeName, ColorMode } from '@opencosmos/tokens';\n\nexport interface ThemeHook {\n /**\n * Current theme name\n */\n theme: ThemeName;\n\n /**\n * Current color mode (light/dark)\n */\n mode: ColorMode;\n\n /**\n * Set the theme\n */\n setTheme: (theme: ThemeName) => void;\n\n /**\n * Set the color mode\n */\n setMode: (mode: ColorMode) => void;\n\n /**\n * Toggle between light and dark mode\n */\n toggleMode: () => void;\n\n /**\n * Combined theme configuration\n */\n themeConfig: { name: ThemeName; mode: ColorMode };\n}\n\n/**\n * Hook to access and control theme settings\n *\n * @example\n * ```tsx\n * function ThemeSelector() {\n * const { theme, mode, setTheme, toggleMode } = useTheme();\n *\n * return (\n * <div>\n * <p>Current: {theme} - {mode}</p>\n * <button onClick={() => setTheme('sage')}>Sage Theme</button>\n * <button onClick={toggleMode}>Toggle Mode</button>\n * </div>\n * );\n * }\n * ```\n */\nexport function useTheme(): ThemeHook {\n return useThemeStore();\n}\n","'use client';\n\nimport { useEffect } from 'react';\nimport { useCustomizer } from '../lib/store/customizer';\n\nexport interface MotionPreference {\n /**\n * Motion intensity level (0-10)\n * 0 = no motion, 10 = full motion\n */\n scale: number;\n\n /**\n * Whether animations should be displayed\n * False when scale is 0 or prefersReducedMotion is true\n */\n shouldAnimate: boolean;\n\n /**\n * System preference for reduced motion\n */\n prefersReducedMotion: boolean;\n}\n\n/**\n * Hook to access motion preferences\n *\n * Automatically syncs with system `prefers-reduced-motion` media query\n * and respects user's manual motion intensity setting.\n *\n * @example\n * ```tsx\n * function AnimatedComponent() {\n * const { scale, shouldAnimate } = useMotionPreference();\n *\n * if (!shouldAnimate) {\n * return <div>Content without animation</div>;\n * }\n *\n * return (\n * <motion.div\n * animate={{ opacity: 1 }}\n * transition={{ duration: 0.3 * (scale / 10) }}\n * >\n * Content with scaled animation\n * </motion.div>\n * );\n * }\n * ```\n */\nexport function useMotionPreference(): MotionPreference {\n const { motion, prefersReducedMotion, setPrefersReducedMotion } = useCustomizer();\n\n // Listen for system prefers-reduced-motion changes\n useEffect(() => {\n // Only run in browser environment\n if (typeof window === 'undefined') return;\n\n const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');\n\n // Set initial value\n setPrefersReducedMotion(mediaQuery.matches);\n\n // Listen for changes\n const handleChange = (e: MediaQueryListEvent) => {\n setPrefersReducedMotion(e.matches);\n };\n\n mediaQuery.addEventListener('change', handleChange);\n return () => mediaQuery.removeEventListener('change', handleChange);\n }, [setPrefersReducedMotion]);\n\n return {\n scale: motion,\n shouldAnimate: motion > 0 && !prefersReducedMotion,\n prefersReducedMotion,\n };\n}\n","import { create } from 'zustand';\nimport { persist } from 'zustand/middleware';\nimport { computeDerivedTokens, type FontTheme } from '@opencosmos/tokens';\nimport {\n generateColorScale,\n getOptimalForeground,\n} from '../colors';\n\nexport type CustomizationMode = 'simple' | 'advanced';\n\nexport interface ColorPalette {\n /* Metadata */\n name?: string; // Name of the source palette\n description?: string; // Description of the source palette\n\n /* Colors */\n primary: string; // Base hex\n primaryForeground: string; // Calculated contrast\n secondary?: string; // Optional secondary color\n secondaryForeground?: string; // Calculated contrast\n accent?: string; // Optional accent color\n accentForeground?: string; // Calculated contrast\n scale: Record<number, string>; // 50-900 tints/shades\n derivedTokens: Record<string, string>; // Computed dependent tokens\n}\n\nexport interface SavedPalette {\n id: string; // Unique ID\n name: string; // User-defined name\n description: string; // Palette description\n primary: string; // Primary color hex\n accent: string; // Accent color hex\n secondary?: string; // Optional secondary color\n category: 'custom'; // Always 'custom' for user palettes\n wcagAA: boolean; // Calculated accessibility\n wcagAAA: boolean; // Calculated accessibility\n createdAt: number; // Timestamp\n mood: string[]; // Mood tags\n bestFor?: string[]; // Best use cases\n harmony?: string;\n rationale?: string;\n}\n\nexport interface SavedFontTheme extends FontTheme {\n id: string; // Unique ID (overrides FontTheme.id)\n createdAt: number; // Timestamp\n category: 'custom'; // Always 'custom' for user font themes\n}\n\nexport interface ColorCustomization {\n mode: CustomizationMode;\n palette: ColorPalette | null;\n}\n\nexport type ThemeName = 'studio' | 'terra' | 'volt' | 'speedboat';\nexport type ColorMode = 'light' | 'dark';\n\ninterface CustomizerState {\n // Motion settings\n motion: number; // 0-10\n prefersReducedMotion: boolean;\n\n // Color customization\n customizationMode: CustomizationMode;\n customColors: {\n [theme in ThemeName]?: {\n [mode in ColorMode]?: ColorPalette;\n };\n };\n\n // Saved custom palettes\n savedPalettes: SavedPalette[];\n\n // Font theme customization\n customFontThemes: {\n [theme in ThemeName]?: {\n [mode in ColorMode]?: FontTheme;\n };\n };\n\n // Saved custom font themes\n savedFontThemes: SavedFontTheme[];\n\n // Motion actions\n setMotion: (level: number) => void;\n setPrefersReducedMotion: (value: boolean) => void;\n\n // Color customization actions\n setCustomizationMode: (mode: CustomizationMode) => void;\n\n setCustomPrimaryColor: (\n theme: ThemeName,\n mode: ColorMode,\n hexColor: string\n ) => void;\n\n setCustomSecondaryColor: (\n theme: ThemeName,\n mode: ColorMode,\n hexColor: string\n ) => void;\n\n setCustomAccentColor: (\n theme: ThemeName,\n mode: ColorMode,\n hexColor: string\n ) => void;\n\n applyColorPalette: (\n theme: ThemeName,\n mode: ColorMode,\n colors: {\n primary: string;\n secondary?: string;\n accent?: string;\n name?: string;\n description?: string;\n }\n ) => void;\n\n resetCustomColors: (theme: ThemeName, mode?: ColorMode) => void;\n\n getActiveColorPalette: (theme: ThemeName, mode: ColorMode) => ColorPalette | null;\n\n // Saved palette actions\n savePalette: (palette: Omit<SavedPalette, 'id' | 'createdAt' | 'category'>) => void;\n updatePalette: (id: string, updates: Partial<SavedPalette>) => void;\n renamePalette: (id: string, newName: string) => void;\n deletePalette: (id: string) => void;\n reorderPalettes: (palettes: SavedPalette[]) => void;\n getSavedPalettes: () => SavedPalette[];\n\n // Font theme actions\n applyFontTheme: (\n theme: ThemeName,\n mode: ColorMode,\n fontTheme: FontTheme\n ) => void;\n\n resetCustomFonts: (theme: ThemeName, mode?: ColorMode) => void;\n\n getActiveFontTheme: (theme: ThemeName, mode: ColorMode) => FontTheme | null;\n\n // Saved font theme actions\n saveFontTheme: (fontTheme: Omit<SavedFontTheme, 'id' | 'createdAt' | 'category'>) => void;\n updateFontTheme: (id: string, updates: Partial<SavedFontTheme>) => void;\n renameFontTheme: (id: string, newName: string) => void;\n deleteFontTheme: (id: string) => void;\n reorderFontThemes: (fontThemes: SavedFontTheme[]) => void;\n getSavedFontThemes: () => SavedFontTheme[];\n}\n\nexport const useCustomizer = create<CustomizerState>()(\n persist(\n (set, get) => ({\n motion: 5,\n prefersReducedMotion: false,\n customizationMode: 'simple',\n customColors: {},\n savedPalettes: [],\n customFontThemes: {},\n savedFontThemes: [],\n\n setMotion: (level) => set({ motion: level }),\n setPrefersReducedMotion: (value) => set({ prefersReducedMotion: value }),\n setCustomizationMode: (mode) => set({ customizationMode: mode }),\n\n setCustomPrimaryColor: (theme, mode, hexColor) => {\n const state = get();\n const currentPalette = state.customColors[theme]?.[mode];\n\n // Generate complete color palette\n const scale = generateColorScale(hexColor);\n const primaryForeground = getOptimalForeground(hexColor);\n\n // Compute all derived tokens based on dependency graph\n const derivedTokens = computeDerivedTokens('--color-primary', hexColor, mode);\n\n // In simple mode, generate secondary/accent from primary\n const isSimple = state.customizationMode === 'simple';\n\n const palette: ColorPalette = {\n primary: hexColor,\n primaryForeground,\n secondary: isSimple ? undefined : currentPalette?.secondary,\n secondaryForeground: isSimple ? undefined : currentPalette?.secondaryForeground,\n accent: isSimple ? undefined : currentPalette?.accent,\n accentForeground: isSimple ? undefined : currentPalette?.accentForeground,\n scale,\n derivedTokens,\n };\n\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: palette,\n },\n },\n }));\n },\n\n setCustomSecondaryColor: (theme, mode, hexColor) => {\n const state = get();\n const currentPalette = state.customColors[theme]?.[mode];\n\n if (!currentPalette) return;\n\n const secondaryForeground = getOptimalForeground(hexColor);\n const derivedTokens = computeDerivedTokens('--color-secondary', hexColor, mode);\n\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: {\n ...currentPalette,\n secondary: hexColor,\n secondaryForeground,\n derivedTokens: {\n ...currentPalette.derivedTokens,\n ...derivedTokens,\n },\n },\n },\n },\n }));\n },\n\n setCustomAccentColor: (theme, mode, hexColor) => {\n const state = get();\n const currentPalette = state.customColors[theme]?.[mode];\n\n if (!currentPalette) return;\n\n const accentForeground = getOptimalForeground(hexColor);\n const derivedTokens = computeDerivedTokens('--color-accent', hexColor, mode);\n\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: {\n ...currentPalette,\n accent: hexColor,\n accentForeground,\n derivedTokens: {\n ...currentPalette.derivedTokens,\n ...derivedTokens,\n },\n },\n },\n },\n }));\n },\n\n applyColorPalette: (theme, mode, colors: {\n primary: string;\n secondary?: string;\n accent?: string;\n name?: string;\n description?: string;\n }) => {\n // Generate complete color palette with all three colors in a single atomic update\n const scale = generateColorScale(colors.primary);\n const primaryForeground = getOptimalForeground(colors.primary);\n\n // Compute all derived tokens\n let derivedTokens = computeDerivedTokens('--color-primary', colors.primary, mode);\n\n // Add secondary color if provided\n const secondary = colors.secondary;\n const secondaryForeground = secondary ? getOptimalForeground(secondary) : undefined;\n if (secondary) {\n const secondaryDerived = computeDerivedTokens('--color-secondary', secondary, mode);\n derivedTokens = { ...derivedTokens, ...secondaryDerived };\n }\n\n // Add accent color if provided\n const accent = colors.accent;\n const accentForeground = accent ? getOptimalForeground(accent) : undefined;\n if (accent) {\n const accentDerived = computeDerivedTokens('--color-accent', accent, mode);\n derivedTokens = { ...derivedTokens, ...accentDerived };\n }\n\n const palette: ColorPalette = {\n name: colors.name,\n description: colors.description,\n primary: colors.primary,\n primaryForeground,\n secondary,\n secondaryForeground,\n accent,\n accentForeground,\n scale,\n derivedTokens,\n };\n\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: palette,\n },\n },\n }));\n },\n\n resetCustomColors: (theme, mode) => {\n if (mode) {\n // Reset specific mode\n set((state) => ({\n customColors: {\n ...state.customColors,\n [theme]: {\n ...state.customColors[theme],\n [mode]: undefined,\n },\n },\n }));\n } else {\n // Reset entire theme\n set((state) => {\n const { [theme]: _, ...rest } = state.customColors;\n return { customColors: rest };\n });\n }\n },\n\n getActiveColorPalette: (theme, mode) => {\n return get().customColors[theme]?.[mode] || null;\n },\n\n // Saved palette management\n savePalette: (paletteData) => {\n const id = `custom-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n const newPalette: SavedPalette = {\n ...paletteData,\n id,\n category: 'custom',\n createdAt: Date.now(),\n };\n\n set((state) => ({\n savedPalettes: [...state.savedPalettes, newPalette],\n }));\n },\n\n updatePalette: (id, updates) => {\n set((state) => ({\n savedPalettes: state.savedPalettes.map((p) =>\n p.id === id ? { ...p, ...updates } : p\n ),\n }));\n },\n\n renamePalette: (id, newName) => {\n set((state) => ({\n savedPalettes: state.savedPalettes.map((p) =>\n p.id === id ? { ...p, name: newName } : p\n ),\n }));\n },\n\n deletePalette: (id) => {\n set((state) => ({\n savedPalettes: state.savedPalettes.filter((p) => p.id !== id),\n }));\n },\n\n reorderPalettes: (palettes) => {\n set({ savedPalettes: palettes });\n },\n\n getSavedPalettes: () => {\n return get().savedPalettes;\n },\n\n // Font theme management\n applyFontTheme: (theme, mode, fontTheme) => {\n set((state) => ({\n customFontThemes: {\n ...state.customFontThemes,\n [theme]: {\n ...state.customFontThemes[theme],\n [mode]: fontTheme,\n },\n },\n }));\n },\n\n resetCustomFonts: (theme, mode) => {\n if (mode) {\n // Reset specific mode\n set((state) => ({\n customFontThemes: {\n ...state.customFontThemes,\n [theme]: {\n ...state.customFontThemes[theme],\n [mode]: undefined,\n },\n },\n }));\n } else {\n // Reset entire theme\n set((state) => {\n const { [theme]: _, ...rest } = state.customFontThemes;\n return { customFontThemes: rest };\n });\n }\n },\n\n getActiveFontTheme: (theme, mode) => {\n return get().customFontThemes[theme]?.[mode] || null;\n },\n\n // Saved font theme management\n saveFontTheme: (fontThemeData) => {\n const id = `font-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n const newFontTheme: SavedFontTheme = {\n ...fontThemeData,\n id,\n category: 'custom',\n createdAt: Date.now(),\n isCustom: true,\n };\n\n set((state) => ({\n savedFontThemes: [...state.savedFontThemes, newFontTheme],\n }));\n },\n\n updateFontTheme: (id, updates) => {\n set((state) => ({\n savedFontThemes: state.savedFontThemes.map((ft) =>\n ft.id === id ? { ...ft, ...updates } : ft\n ),\n }));\n },\n\n renameFontTheme: (id, newName) => {\n set((state) => ({\n savedFontThemes: state.savedFontThemes.map((ft) =>\n ft.id === id ? { ...ft, name: newName } : ft\n ),\n }));\n },\n\n deleteFontTheme: (id) => {\n set((state) => ({\n savedFontThemes: state.savedFontThemes.filter((ft) => ft.id !== id),\n }));\n },\n\n reorderFontThemes: (fontThemes) => {\n set({ savedFontThemes: fontThemes });\n },\n\n getSavedFontThemes: () => {\n return get().savedFontThemes;\n },\n }),\n {\n name: 'ecosystem-customizer',\n version: 4,\n partialize: (state) => ({\n motion: state.motion,\n prefersReducedMotion: state.prefersReducedMotion,\n customizationMode: state.customizationMode,\n customColors: state.customColors,\n savedPalettes: state.savedPalettes,\n customFontThemes: state.customFontThemes,\n savedFontThemes: state.savedFontThemes,\n }),\n }\n )\n);\n","/**\n * Color Transformation Utilities\n * Standalone utilities for the token system (no external dependencies)\n */\n\n/**\n * Convert hex to RGB\n */\nexport function hexToRgb(hex: string): { r: number; g: number; b: number } | null {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n }\n : null;\n}\n\n/**\n * Convert hex to HSL\n */\nexport function hexToHSL(hex: string): { h: number; s: number; l: number } {\n const rgb = hexToRgb(hex);\n if (!rgb) return { h: 0, s: 0, l: 0 };\n\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h = 0, s = 0, l = (max + min) / 2;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r: h = ((g - b) / d + (g < b ? 6 : 0)) / 6; break;\n case g: h = ((b - r) / d + 2) / 6; break;\n case b: h = ((r - g) / d + 4) / 6; break;\n }\n }\n\n return {\n h: Math.round(h * 360),\n s: Math.round(s * 100),\n l: Math.round(l * 100),\n };\n}\n\n/**\n * Convert HSL to hex\n */\nexport function hslToHex(h: number, s: number, l: number): string {\n h = h / 360;\n s = s / 100;\n l = l / 100;\n\n let r, g, b;\n\n if (s === 0) {\n r = g = b = l;\n } else {\n const hue2rgb = (p: number, q: number, t: number) => {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1/6) return p + (q - p) * 6 * t;\n if (t < 1/2) return q;\n if (t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n };\n\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n const toHex = (x: number) => {\n const hex = Math.round(x * 255).toString(16);\n return hex.length === 1 ? '0' + hex : hex;\n };\n\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\n/**\n * Adjust lightness of a hex color\n */\nexport function adjustLightness(hex: string, percent: number): string {\n const hsl = hexToHSL(hex);\n const newL = Math.max(0, Math.min(100, hsl.l + percent));\n return hslToHex(hsl.h, hsl.s, newL);\n}\n\n/**\n * Adjust saturation of a hex color\n */\nexport function adjustSaturation(hex: string, percent: number): string {\n const hsl = hexToHSL(hex);\n const newS = Math.max(0, Math.min(100, hsl.s + percent));\n return hslToHex(hsl.h, newS, hsl.l);\n}\n\n/**\n * Rotate hue of a hex color\n */\nexport function rotateHue(hex: string, degrees: number): string {\n const hsl = hexToHSL(hex);\n const newH = (hsl.h + degrees) % 360;\n return hslToHex(newH, hsl.s, hsl.l);\n}\n\n/**\n * Add opacity to a hex color (returns rgba CSS value)\n */\nexport function adjustOpacity(hex: string, opacity: number): string {\n const rgb = hexToRgb(hex);\n if (!rgb) return hex;\n return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`;\n}\n\n/**\n * Calculate relative luminance (WCAG formula)\n */\nexport function getLuminance(r: number, g: number, b: number): number {\n const [rs, gs, bs] = [r, g, b].map((c) => {\n const srgb = c / 255;\n return srgb <= 0.03928 ? srgb / 12.92 : Math.pow((srgb + 0.055) / 1.055, 2.4);\n });\n return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;\n}\n\n/**\n * Calculate contrast ratio between two colors (WCAG formula)\n */\nexport function getContrastRatio(hex1: string, hex2: string): number {\n const rgb1 = hexToRgb(hex1);\n const rgb2 = hexToRgb(hex2);\n\n if (!rgb1 || !rgb2) return 0;\n\n const lum1 = getLuminance(rgb1.r, rgb1.g, rgb1.b);\n const lum2 = getLuminance(rgb2.r, rgb2.g, rgb2.b);\n\n const lighter = Math.max(lum1, lum2);\n const darker = Math.min(lum1, lum2);\n\n return (lighter + 0.05) / (darker + 0.05);\n}\n\n/**\n * Get optimal foreground color (white or black) for a background\n */\nexport function getOptimalForeground(\n bgHex: string,\n whiteHex: string = '#ffffff',\n blackHex: string = '#000000'\n): string {\n const whiteRatio = getContrastRatio(bgHex, whiteHex);\n const blackRatio = getContrastRatio(bgHex, blackHex);\n\n return whiteRatio > blackRatio ? whiteHex : blackHex;\n}\n","/**\n * Token Dependency Graph\n * Defines which tokens are computed from other tokens for \"change once, ripple everywhere\"\n */\n\nimport {\n adjustLightness,\n adjustSaturation,\n adjustOpacity,\n rotateHue,\n getOptimalForeground,\n} from './color-utils';\n\nexport type TokenDerivation = {\n source: string; // Which token it derives from\n transform: (sourceValue: string) => string; // How to compute it\n description: string; // Why this derivation exists\n};\n\n/**\n * Primary Color Derivations\n * These tokens automatically update when primary color changes\n */\nexport const primaryColorDerivations: Record<string, TokenDerivation> = {\n // Links use primary color\n '--color-link': {\n source: '--color-primary',\n transform: (primary) => primary,\n description: 'Links inherit primary brand color',\n },\n\n // Focus ring uses primary color\n '--color-ring': {\n source: '--color-primary',\n transform: (primary) => primary,\n description: 'Focus rings use primary for brand consistency',\n },\n\n // Link hover is slightly darker primary\n '--color-link-hover': {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, -10),\n description: 'Link hover is 10% darker for visual feedback',\n },\n\n // Chart primary series\n '--chart-1': {\n source: '--color-primary',\n transform: (primary) => primary,\n description: 'First chart series uses primary',\n },\n\n // Chart secondary series (lighter tint)\n '--chart-2': {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, 20),\n description: 'Second chart series is lighter tint of primary',\n },\n\n // Chart tertiary series (darker shade)\n '--chart-3': {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, -15),\n description: 'Third chart series is darker shade of primary',\n },\n\n // Chart quaternary (desaturated primary)\n '--chart-4': {\n source: '--color-primary',\n transform: (primary) => adjustSaturation(primary, -30),\n description: 'Fourth chart series is muted primary',\n },\n\n // Chart quinary (complementary color)\n '--chart-5': {\n source: '--color-primary',\n transform: (primary) => rotateHue(primary, 180),\n description: 'Fifth chart series is complementary to primary',\n },\n};\n\n/**\n * Secondary Color Derivations\n * These derive from secondary color\n */\nexport const secondaryColorDerivations: Record<string, TokenDerivation> = {\n // Hover states\n '--color-hover': {\n source: '--color-secondary',\n transform: (secondary) => secondary,\n description: 'Hover backgrounds use secondary',\n },\n\n // Active states\n '--color-active': {\n source: '--color-secondary',\n transform: (secondary) => adjustLightness(secondary, -5),\n description: 'Active state is slightly darker secondary',\n },\n\n // Muted backgrounds\n '--color-muted': {\n source: '--color-secondary',\n transform: (secondary) => secondary,\n description: 'Muted sections use secondary color',\n },\n};\n\n/**\n * Accent Color Derivations\n * These derive from accent (used for highlights and CTAs)\n */\nexport const accentColorDerivations: Record<string, TokenDerivation> = {\n // Info semantic color uses accent\n '--color-info': {\n source: '--color-accent',\n transform: (accent) => accent,\n description: 'Info semantic color uses accent',\n },\n\n // Info foreground calculated for contrast\n '--color-info-foreground': {\n source: '--color-accent',\n transform: (accent) => getOptimalForeground(accent),\n description: 'Info foreground calculated for contrast',\n },\n};\n\n/**\n * Mode-Specific Derivations\n * These need different transforms for light vs dark mode\n */\nexport const modeSpecificDerivations: Record<string, {\n light: TokenDerivation;\n dark: TokenDerivation;\n}> = {\n '--color-primary-muted': {\n light: {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, 40),\n description: 'Muted primary for light backgrounds',\n },\n dark: {\n source: '--color-primary',\n transform: (primary) => adjustLightness(primary, -20),\n description: 'Muted primary for dark backgrounds',\n },\n },\n\n '--color-primary-subtle': {\n light: {\n source: '--color-primary',\n transform: (primary) => adjustOpacity(primary, 0.1),\n description: 'Subtle primary background for light mode',\n },\n dark: {\n source: '--color-primary',\n transform: (primary) => adjustOpacity(primary, 0.2),\n description: 'Subtle primary background for dark mode',\n },\n },\n};\n\n/**\n * Complete dependency graph\n */\nexport const tokenDependencyGraph = {\n primary: primaryColorDerivations,\n secondary: secondaryColorDerivations,\n accent: accentColorDerivations,\n modeSpecific: modeSpecificDerivations,\n};\n\n/**\n * Get all tokens that depend on a source token\n */\nexport function getDependentTokens(sourceToken: string): string[] {\n const dependents: string[] = [];\n\n Object.entries(primaryColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n dependents.push(token);\n }\n });\n\n Object.entries(secondaryColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n dependents.push(token);\n }\n });\n\n Object.entries(accentColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n dependents.push(token);\n }\n });\n\n return dependents;\n}\n\n/**\n * Compute all derived tokens from a source\n */\nexport function computeDerivedTokens(\n sourceToken: string,\n sourceValue: string,\n mode: 'light' | 'dark'\n): Record<string, string> {\n const derived: Record<string, string> = {};\n\n // Compute from primary derivations\n Object.entries(primaryColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n derived[token] = config.transform(sourceValue);\n }\n });\n\n // Compute from secondary derivations\n Object.entries(secondaryColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n derived[token] = config.transform(sourceValue);\n }\n });\n\n // Compute from accent derivations\n Object.entries(accentColorDerivations).forEach(([token, config]) => {\n if (config.source === sourceToken) {\n derived[token] = config.transform(sourceValue);\n }\n });\n\n // Compute mode-specific derivations\n Object.entries(modeSpecificDerivations).forEach(([token, configs]) => {\n const config = configs[mode];\n if (config.source === sourceToken) {\n derived[token] = config.transform(sourceValue);\n }\n });\n\n return derived;\n}\n","/**\n * Semantic Color Utilities\n *\n * Helper functions for working with the design system's color tokens\n * and CSS variables.\n */\n\n/**\n * Color token categories\n */\nexport const colorTokens = {\n // Background colors\n background: 'var(--color-background)',\n backgroundSecondary: 'var(--color-background-secondary)',\n backgroundTertiary: 'var(--color-background-tertiary)',\n surface: 'var(--color-surface)',\n\n // Foreground/Text colors\n foreground: 'var(--color-foreground)',\n foregroundSecondary: 'var(--color-foreground-secondary)',\n foregroundTertiary: 'var(--color-foreground-tertiary)',\n textPrimary: 'var(--color-text-primary)',\n textSecondary: 'var(--color-text-secondary)',\n textMuted: 'var(--color-text-muted)',\n\n // Brand colors\n primary: 'var(--color-primary)',\n primaryForeground: 'var(--color-primary-foreground)',\n secondary: 'var(--color-secondary)',\n secondaryForeground: 'var(--color-secondary-foreground)',\n accent: 'var(--color-accent)',\n accentForeground: 'var(--color-accent-foreground)',\n\n // Semantic colors\n success: 'var(--color-success)',\n successForeground: 'var(--color-success-foreground)',\n warning: 'var(--color-warning)',\n warningForeground: 'var(--color-warning-foreground)',\n error: 'var(--color-error)',\n errorForeground: 'var(--color-error-foreground)',\n info: 'var(--color-info)',\n infoForeground: 'var(--color-info-foreground)',\n\n // Borders\n border: 'var(--color-border)',\n borderSubtle: 'var(--color-border-subtle)',\n\n // Interactive states\n hover: 'var(--color-hover)',\n active: 'var(--color-active)',\n focus: 'var(--color-focus)',\n\n // Links\n link: 'var(--color-link)',\n linkHover: 'var(--color-link-hover)',\n linkHoverForeground: 'var(--color-link-hover-foreground)',\n} as const;\n\n/**\n * Get CSS variable value from computed styles\n *\n * @param variableName - CSS variable name (with or without --)\n * @param element - Element to get computed style from (defaults to document.documentElement)\n * @returns The computed value of the CSS variable\n *\n * @example\n * ```ts\n * const primaryColor = getCSSVariable('--color-primary');\n * // Returns: '#0066ff' (or whatever the current theme's primary color is)\n * ```\n */\nexport function getCSSVariable(\n variableName: string,\n element: HTMLElement = document.documentElement\n): string {\n const name = variableName.startsWith('--') ? variableName : `--${variableName}`;\n return getComputedStyle(element).getPropertyValue(name).trim();\n}\n\n/**\n * Set CSS variable value\n *\n * @param variableName - CSS variable name (with or without --)\n * @param value - Value to set\n * @param element - Element to set the variable on (defaults to document.documentElement)\n *\n * @example\n * ```ts\n * setCSSVariable('--color-primary', '#ff0000');\n * ```\n */\nexport function setCSSVariable(\n variableName: string,\n value: string,\n element: HTMLElement = document.documentElement\n): void {\n const name = variableName.startsWith('--') ? variableName : `--${variableName}`;\n element.style.setProperty(name, value);\n}\n\n/**\n * Get contrasting foreground color for a background color\n *\n * @param backgroundToken - Background color token name (without 'var()')\n * @returns The appropriate foreground color token\n *\n * @example\n * ```ts\n * const foreground = getForegroundColor('--color-primary');\n * // Returns: 'var(--color-primary-foreground)'\n * ```\n */\nexport function getForegroundColor(backgroundToken: string): string {\n // Remove var() wrapper if present\n const token = backgroundToken.replace(/var\\(|\\)/g, '');\n\n // Map background tokens to their foreground pairs\n const foregroundMap: Record<string, string> = {\n '--color-primary': 'var(--color-primary-foreground)',\n '--color-secondary': 'var(--color-secondary-foreground)',\n '--color-accent': 'var(--color-accent-foreground)',\n '--color-success': 'var(--color-success-foreground)',\n '--color-warning': 'var(--color-warning-foreground)',\n '--color-error': 'var(--color-error-foreground)',\n '--color-info': 'var(--color-info-foreground)',\n '--color-background': 'var(--color-foreground)',\n '--color-surface': 'var(--color-text-primary)',\n };\n\n return foregroundMap[token] || 'var(--color-text-primary)';\n}\n\n/**\n * Semantic color groups for different use cases\n */\nexport const semanticColors = {\n /**\n * Status colors for indicating states\n */\n status: {\n success: {\n bg: colorTokens.success,\n fg: colorTokens.successForeground,\n },\n warning: {\n bg: colorTokens.warning,\n fg: colorTokens.warningForeground,\n },\n error: {\n bg: colorTokens.error,\n fg: colorTokens.errorForeground,\n },\n info: {\n bg: colorTokens.info,\n fg: colorTokens.infoForeground,\n },\n },\n\n /**\n * Brand colors for primary UI elements\n */\n brand: {\n primary: {\n bg: colorTokens.primary,\n fg: colorTokens.primaryForeground,\n },\n secondary: {\n bg: colorTokens.secondary,\n fg: colorTokens.secondaryForeground,\n },\n accent: {\n bg: colorTokens.accent,\n fg: colorTokens.accentForeground,\n },\n },\n\n /**\n * Interactive state colors\n */\n interactive: {\n default: {\n bg: colorTokens.background,\n fg: colorTokens.foreground,\n },\n hover: {\n bg: colorTokens.hover,\n fg: colorTokens.foreground,\n },\n active: {\n bg: colorTokens.active,\n fg: colorTokens.foreground,\n },\n focus: {\n border: colorTokens.focus,\n },\n },\n} as const;\n\n/**\n * Helper to create color pairs (background + foreground)\n *\n * @param type - Semantic color type\n * @returns Object with bg and fg (and optionally border)\n *\n * @example\n * ```tsx\n * const errorColors = getSemanticColorPair('error');\n * <div style={{\n * backgroundColor: errorColors.bg,\n * color: errorColors.fg\n * }}>\n * Error message\n * </div>\n * ```\n */\nexport function getSemanticColorPair(\n type: 'success' | 'warning' | 'error' | 'info' | 'primary' | 'secondary' | 'accent'\n): { bg: string; fg: string } {\n if (type === 'primary' || type === 'secondary' || type === 'accent') {\n return semanticColors.brand[type];\n }\n return semanticColors.status[type];\n}\n\n/**\n * Convert hex color to RGB values\n *\n * @param hex - Hex color string (with or without #)\n * @returns Object with r, g, b values (0-255)\n *\n * @example\n * ```ts\n * const rgb = hexToRgb('#0066ff');\n * // Returns: { r: 0, g: 102, b: 255 }\n * ```\n */\nexport function hexToRgb(hex: string): { r: number; g: number; b: number } | null {\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result\n ? {\n r: parseInt(result[1], 16),\n g: parseInt(result[2], 16),\n b: parseInt(result[3], 16),\n }\n : null;\n}\n\n/**\n * Calculate relative luminance of a color (WCAG formula)\n *\n * @param r - Red value (0-255)\n * @param g - Green value (0-255)\n * @param b - Blue value (0-255)\n * @returns Relative luminance (0-1)\n */\nexport function getLuminance(r: number, g: number, b: number): number {\n const [rs, gs, bs] = [r, g, b].map((c) => {\n const srgb = c / 255;\n return srgb <= 0.03928 ? srgb / 12.92 : Math.pow((srgb + 0.055) / 1.055, 2.4);\n });\n return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;\n}\n\n/**\n * Calculate contrast ratio between two colors (WCAG formula)\n *\n * @param hex1 - First color (hex)\n * @param hex2 - Second color (hex)\n * @returns Contrast ratio (1-21)\n *\n * @example\n * ```ts\n * const ratio = getContrastRatio('#ffffff', '#000000');\n * // Returns: 21 (maximum contrast)\n * ```\n */\nexport function getContrastRatio(hex1: string, hex2: string): number {\n const rgb1 = hexToRgb(hex1);\n const rgb2 = hexToRgb(hex2);\n\n if (!rgb1 || !rgb2) return 0;\n\n const lum1 = getLuminance(rgb1.r, rgb1.g, rgb1.b);\n const lum2 = getLuminance(rgb2.r, rgb2.g, rgb2.b);\n\n const lighter = Math.max(lum1, lum2);\n const darker = Math.min(lum1, lum2);\n\n return (lighter + 0.05) / (darker + 0.05);\n}\n\n/**\n * Check if color pair meets WCAG AA contrast requirements\n *\n * @param foreground - Foreground color (hex)\n * @param background - Background color (hex)\n * @param level - WCAG level ('AA' or 'AAA')\n * @param size - Text size ('normal' or 'large')\n * @returns true if contrast ratio meets requirements\n *\n * @example\n * ```ts\n * const isAccessible = meetsContrastRequirements('#000000', '#ffffff', 'AA', 'normal');\n * // Returns: true\n * ```\n */\nexport function meetsContrastRequirements(\n foreground: string,\n background: string,\n level: 'AA' | 'AAA' = 'AA',\n size: 'normal' | 'large' = 'normal'\n): boolean {\n const ratio = getContrastRatio(foreground, background);\n\n const requirements = {\n AA: { normal: 4.5, large: 3 },\n AAA: { normal: 7, large: 4.5 },\n };\n\n return ratio >= requirements[level][size];\n}\n\n/**\n * Convert hex to HSL for manipulation\n */\nexport function hexToHSL(hex: string): { h: number; s: number; l: number } {\n const rgb = hexToRgb(hex);\n if (!rgb) return { h: 0, s: 0, l: 0 };\n\n const r = rgb.r / 255;\n const g = rgb.g / 255;\n const b = rgb.b / 255;\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h = 0, s = 0; const l = (max + min) / 2;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r: h = ((g - b) / d + (g < b ? 6 : 0)) / 6; break;\n case g: h = ((b - r) / d + 2) / 6; break;\n case b: h = ((r - g) / d + 4) / 6; break;\n }\n }\n\n return {\n h: Math.round(h * 360),\n s: Math.round(s * 100),\n l: Math.round(l * 100),\n };\n}\n\n/**\n * Convert HSL to hex\n */\nexport function hslToHex(h: number, s: number, l: number): string {\n h = h / 360;\n s = s / 100;\n l = l / 100;\n\n let r, g, b;\n\n if (s === 0) {\n r = g = b = l;\n } else {\n const hue2rgb = (p: number, q: number, t: number) => {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1/6) return p + (q - p) * 6 * t;\n if (t < 1/2) return q;\n if (t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n };\n\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n const toHex = (x: number) => {\n const hex = Math.round(x * 255).toString(16);\n return hex.length === 1 ? '0' + hex : hex;\n };\n\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\n/**\n * Adjust lightness of a hex color\n * @param hex - Input color\n * @param percent - Amount to adjust (-100 to 100)\n */\nexport function adjustLightness(hex: string, percent: number): string {\n const hsl = hexToHSL(hex);\n const newL = Math.max(0, Math.min(100, hsl.l + percent));\n return hslToHex(hsl.h, hsl.s, newL);\n}\n\n/**\n * Adjust saturation of a hex color\n * @param hex - Input color\n * @param percent - Amount to adjust (-100 to 100)\n */\nexport function adjustSaturation(hex: string, percent: number): string {\n const hsl = hexToHSL(hex);\n const newS = Math.max(0, Math.min(100, hsl.s + percent));\n return hslToHex(hsl.h, newS, hsl.l);\n}\n\n/**\n * Rotate hue of a hex color\n * @param hex - Input color\n * @param degrees - Degrees to rotate (0-360)\n */\nexport function rotateHue(hex: string, degrees: number): string {\n const hsl = hexToHSL(hex);\n const newH = (hsl.h + degrees) % 360;\n return hslToHex(newH, hsl.s, hsl.l);\n}\n\n/**\n * Add opacity to a hex color (returns rgba CSS value)\n * @param hex - Input color\n * @param opacity - Opacity (0-1)\n */\nexport function adjustOpacity(hex: string, opacity: number): string {\n const rgb = hexToRgb(hex);\n if (!rgb) return hex;\n return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`;\n}\n\n/**\n * Get optimal foreground color (white or black) for a background\n * Uses WCAG contrast formula\n */\nexport function getOptimalForeground(\n bgHex: string,\n whiteHex: string = '#ffffff',\n blackHex: string = '#000000'\n): string {\n const whiteRatio = getContrastRatio(bgHex, whiteHex);\n const blackRatio = getContrastRatio(bgHex, blackHex);\n\n return whiteRatio > blackRatio ? whiteHex : blackHex;\n}\n\n/**\n * Generate a complete tint/shade scale (like Tailwind)\n * Returns 50, 100, 200, ..., 900 variants\n */\nexport function generateColorScale(baseHex: string): Record<number, string> {\n const hsl = hexToHSL(baseHex);\n\n return {\n 50: hslToHex(hsl.h, Math.max(hsl.s - 10, 20), 95),\n 100: hslToHex(hsl.h, Math.max(hsl.s - 5, 30), 90),\n 200: hslToHex(hsl.h, hsl.s, 80),\n 300: hslToHex(hsl.h, hsl.s, 70),\n 400: hslToHex(hsl.h, hsl.s, 60),\n 500: baseHex, // Base color\n 600: hslToHex(hsl.h, Math.min(hsl.s + 5, 100), 45),\n 700: hslToHex(hsl.h, Math.min(hsl.s + 10, 100), 35),\n 800: hslToHex(hsl.h, Math.min(hsl.s + 15, 100), 25),\n 900: hslToHex(hsl.h, Math.min(hsl.s + 20, 100), 15),\n };\n}\n\n/**\n * Color utilities for common operations\n */\nexport const colorUtils = {\n getCSSVariable,\n setCSSVariable,\n getForegroundColor,\n getSemanticColorPair,\n hexToRgb,\n hexToHSL,\n hslToHex,\n adjustLightness,\n adjustSaturation,\n rotateHue,\n adjustOpacity,\n getOptimalForeground,\n generateColorScale,\n getContrastRatio,\n meetsContrastRequirements,\n} as const;\n","'use client';\n\nimport { useState, useCallback } from 'react';\nimport type { FieldValidation, FormErrors } from '../lib/validation';\nimport { validateField, validateForm } from '../lib/validation';\n\nexport interface UseFormOptions<T> {\n /**\n * Initial form values\n */\n initialValues: T;\n\n /**\n * Validation rules for each field\n */\n validations?: Partial<Record<keyof T, FieldValidation>>;\n\n /**\n * Callback fired when form is submitted and valid\n */\n onSubmit?: (values: T) => void | Promise<void>;\n\n /**\n * When to validate fields\n * @default 'onBlur'\n */\n validateOn?: 'onChange' | 'onBlur' | 'onSubmit';\n}\n\nexport interface UseFormReturn<T> {\n /**\n * Current form values\n */\n values: T;\n\n /**\n * Current form errors\n */\n errors: FormErrors;\n\n /**\n * Whether the form is currently submitting\n */\n isSubmitting: boolean;\n\n /**\n * Whether the form has been touched/modified\n */\n isDirty: boolean;\n\n /**\n * Set value for a specific field\n */\n setValue: (name: keyof T, value: any) => void;\n\n /**\n * Set error for a specific field\n */\n setError: (name: keyof T, error: string | undefined) => void;\n\n /**\n * Handle input change event\n */\n handleChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;\n\n /**\n * Handle input blur event\n */\n handleBlur: (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;\n\n /**\n * Handle form submit\n */\n handleSubmit: (e?: React.FormEvent<HTMLFormElement>) => Promise<void>;\n\n /**\n * Reset form to initial values\n */\n reset: () => void;\n\n /**\n * Manually validate all fields\n */\n validate: () => boolean;\n\n /**\n * Get props for a field (value, onChange, onBlur, error)\n */\n getFieldProps: (name: keyof T) => {\n name: string;\n value: any;\n onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;\n onBlur: (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;\n error: boolean;\n };\n}\n\n/**\n * useForm Hook\n *\n * A lightweight form state management hook with built-in validation.\n *\n * Features:\n * - Field-level validation\n * - Configurable validation timing (onChange, onBlur, onSubmit)\n * - Dirty state tracking\n * - Submit handling with loading state\n * - Helper functions for common patterns\n *\n * Example:\n * ```tsx\n * const form = useForm({\n * initialValues: { email: '', password: '' },\n * validations: {\n * email: { required: true, pattern: patterns.email },\n * password: { required: true, minLength: { value: 8, message: 'Min 8 chars' } }\n * },\n * onSubmit: async (values) => {\n * await login(values);\n * }\n * });\n *\n * return (\n * <form onSubmit={form.handleSubmit}>\n * <FormField label=\"Email\" error={form.errors.email}>\n * <TextField {...form.getFieldProps('email')} />\n * </FormField>\n * <Button type=\"submit\" loading={form.isSubmitting}>Submit</Button>\n * </form>\n * );\n * ```\n */\nexport function useForm<T extends Record<string, any>>({\n initialValues,\n validations = {},\n onSubmit,\n validateOn = 'onBlur',\n}: UseFormOptions<T>): UseFormReturn<T> {\n const [values, setValues] = useState<T>(initialValues);\n const [errors, setErrors] = useState<FormErrors>({});\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [isDirty, setIsDirty] = useState(false);\n\n const setValue = useCallback((name: keyof T, value: any) => {\n setValues((prev) => ({ ...prev, [name]: value }));\n setIsDirty(true);\n }, []);\n\n const setError = useCallback((name: keyof T, error: string | undefined) => {\n setErrors((prev) => ({ ...prev, [name as string]: error }));\n }, []);\n\n const validateFieldByName = useCallback(\n (name: keyof T) => {\n const fieldRules = validations[name];\n if (!fieldRules) return;\n\n const error = validateField(values[name], fieldRules);\n setError(name, error);\n return !error;\n },\n [values, validations, setError]\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {\n const { name, value, type } = e.target;\n const fieldValue = type === 'checkbox' ? (e.target as HTMLInputElement).checked : value;\n\n setValue(name as keyof T, fieldValue);\n\n if (validateOn === 'onChange') {\n validateFieldByName(name as keyof T);\n }\n },\n [setValue, validateOn, validateFieldByName]\n );\n\n const handleBlur = useCallback(\n (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {\n const { name } = e.target;\n\n if (validateOn === 'onBlur') {\n validateFieldByName(name as keyof T);\n }\n },\n [validateOn, validateFieldByName]\n );\n\n const validate = useCallback(() => {\n const formErrors = validateForm(values, validations as any);\n setErrors(formErrors);\n return Object.keys(formErrors).length === 0;\n }, [values, validations]);\n\n const handleSubmit = useCallback(\n async (e?: React.FormEvent<HTMLFormElement>) => {\n e?.preventDefault();\n\n const isValid = validate();\n if (!isValid) return;\n\n if (onSubmit) {\n setIsSubmitting(true);\n try {\n await onSubmit(values);\n } finally {\n setIsSubmitting(false);\n }\n }\n },\n [validate, onSubmit, values]\n );\n\n const reset = useCallback(() => {\n setValues(initialValues);\n setErrors({});\n setIsDirty(false);\n setIsSubmitting(false);\n }, [initialValues]);\n\n const getFieldProps = useCallback(\n (name: keyof T) => ({\n name: name as string,\n value: values[name] ?? '',\n onChange: handleChange,\n onBlur: handleBlur,\n error: !!errors[name as string],\n }),\n [values, errors, handleChange, handleBlur]\n );\n\n return {\n values,\n errors,\n isSubmitting,\n isDirty,\n setValue,\n setError,\n handleChange,\n handleBlur,\n handleSubmit,\n reset,\n validate,\n getFieldProps,\n };\n}\n","/**\n * Form Validation Utilities\n *\n * Simple validation helpers for form fields.\n * Works seamlessly with FormField and other form components.\n */\n\nexport type ValidationRule = {\n validate: (value: any) => boolean;\n message: string;\n};\n\nexport type FieldValidation = {\n required?: boolean | string;\n minLength?: { value: number; message: string };\n maxLength?: { value: number; message: string };\n pattern?: { value: RegExp; message: string };\n custom?: ValidationRule[];\n};\n\nexport type FormErrors = Record<string, string | undefined>;\n\n/**\n * Common validation patterns\n */\nexport const patterns = {\n email: {\n value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$/i,\n message: 'Invalid email address',\n },\n url: {\n value: /^https?:\\/\\/.+\\..+/,\n message: 'Invalid URL',\n },\n phone: {\n value: /^[\\d\\s\\-\\+\\(\\)]+$/,\n message: 'Invalid phone number',\n },\n alphanumeric: {\n value: /^[a-zA-Z0-9]+$/,\n message: 'Only letters and numbers allowed',\n },\n noSpaces: {\n value: /^\\S+$/,\n message: 'Spaces are not allowed',\n },\n};\n\n/**\n * Validate a single field value against validation rules\n *\n * @param value - The field value to validate\n * @param rules - Validation rules to apply\n * @returns Error message if validation fails, undefined if valid\n *\n * @example\n * ```tsx\n * const error = validateField(email, {\n * required: true,\n * pattern: patterns.email\n * });\n * ```\n */\nexport function validateField(\n value: any,\n rules: FieldValidation\n): string | undefined {\n // Required check\n if (rules.required) {\n const isEmpty =\n value === undefined ||\n value === null ||\n value === '' ||\n (Array.isArray(value) && value.length === 0);\n\n if (isEmpty) {\n return typeof rules.required === 'string'\n ? rules.required\n : 'This field is required';\n }\n }\n\n // Skip other validations if value is empty and not required\n if (!value && !rules.required) {\n return undefined;\n }\n\n // Min length check\n if (rules.minLength && value.length < rules.minLength.value) {\n return rules.minLength.message;\n }\n\n // Max length check\n if (rules.maxLength && value.length > rules.maxLength.value) {\n return rules.maxLength.message;\n }\n\n // Pattern check\n if (rules.pattern && !rules.pattern.value.test(value)) {\n return rules.pattern.message;\n }\n\n // Custom validations\n if (rules.custom) {\n for (const rule of rules.custom) {\n if (!rule.validate(value)) {\n return rule.message;\n }\n }\n }\n\n return undefined;\n}\n\n/**\n * Validate all fields in a form\n *\n * @param values - Object containing all form field values\n * @param validations - Object containing validation rules for each field\n * @returns Object containing errors for each field\n *\n * @example\n * ```tsx\n * const errors = validateForm(\n * { email: 'test', password: '123' },\n * {\n * email: { required: true, pattern: patterns.email },\n * password: { required: true, minLength: { value: 8, message: 'Min 8 chars' } }\n * }\n * );\n * // errors = { email: 'Invalid email address', password: 'Min 8 chars' }\n * ```\n */\nexport function validateForm(\n values: Record<string, any>,\n validations: Record<string, FieldValidation>\n): FormErrors {\n const errors: FormErrors = {};\n\n for (const [field, rules] of Object.entries(validations)) {\n const error = validateField(values[field], rules);\n if (error) {\n errors[field] = error;\n }\n }\n\n return errors;\n}\n\n/**\n * Check if form has any errors\n *\n * @param errors - Form errors object\n * @returns true if there are any errors\n *\n * @example\n * ```tsx\n * if (hasErrors(errors)) {\n * console.log('Form has errors');\n * }\n * ```\n */\nexport function hasErrors(errors: FormErrors): boolean {\n return Object.values(errors).some((error) => error !== undefined);\n}\n\n/**\n * Common validation rule builders\n */\nexport const rules = {\n required: (message = 'This field is required'): FieldValidation => ({\n required: message,\n }),\n\n email: (message = 'Invalid email address'): FieldValidation => ({\n pattern: { value: patterns.email.value, message },\n }),\n\n minLength: (length: number, message?: string): FieldValidation => ({\n minLength: {\n value: length,\n message: message || `Minimum ${length} characters required`,\n },\n }),\n\n maxLength: (length: number, message?: string): FieldValidation => ({\n maxLength: {\n value: length,\n message: message || `Maximum ${length} characters allowed`,\n },\n }),\n\n match: (\n otherValue: any,\n message = 'Values do not match'\n ): FieldValidation => ({\n custom: [\n {\n validate: (value) => value === otherValue,\n message,\n },\n ],\n }),\n};\n"],"mappings":";;;AAKA,SAAS,cAAc;AACvB,SAAS,eAAe;AAoBjB,IAAM,gBAAgB,OAAmB;AAAA,EAC9C;AAAA,IACE,CAAC,KAAK,SAAS;AAAA;AAAA,MAEb,OAAO;AAAA,MACP,MAAM;AAAA;AAAA,MAGN,UAAU,CAAC,UAAU,IAAI,EAAE,MAAM,CAAC;AAAA,MAClC,SAAS,CAAC,SAAS,IAAI,EAAE,KAAK,CAAC;AAAA,MAC/B,YAAY,MACV,IAAI,CAAC,WAAW,EAAE,MAAM,MAAM,SAAS,UA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b","getLuminance","getContrastRatio","hexToHSL","hexToRgb","hslToHex","p","q","getOptimalForeground","getContrastRatio","hexToHSL","hslToHex","create","persist","getOptimalForeground","state"]}
|
package/dist/index.d.mts
CHANGED
|
@@ -16,8 +16,8 @@ import { Content, Item, Label as Label$1, ScrollDownButton, ScrollUpButton, Sepa
|
|
|
16
16
|
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
17
17
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
18
18
|
import { Accept, FileRejection } from 'react-dropzone';
|
|
19
|
-
import { S as SyntaxType, a as SyntaxToken, B as BreadcrumbItemLegacy, b as Breadcrumbs, c as BreadcrumbsProps } from './utils-
|
|
20
|
-
export { L as Language, R as RouteConfig, T as Transition, V as Variant, d as Variants, e as adjustLightness, f as adjustOpacity, g as adjustSaturation, h as cn, i as collapseVariants, j as colorTokens, k as colorUtils, l as createAnimation, m as detectLanguage, n as drawerVariants, o as durations, p as easings, q as fadeVariants, r as generateBreadcrumbs, s as generateColorScale, t as getCSSVariable, u as getContrastRatio, v as getForegroundColor, w as getLuminance, x as getOptimalForeground, y as getSemanticColorPair, z as hexToHSL, A as hexToRgb, C as hslToHex, D as listVariants, E as meetsContrastRequirements, F as modalVariants, G as parseCode, H as presets, I as rotateHue, J as rotateVariants, K as scaleDuration, M as scaleVariants, N as semanticColors, O as setCSSVariable, P as slideVariants, Q as tokenize, U as transitions } from './utils-
|
|
19
|
+
import { S as SyntaxType, a as SyntaxToken, B as BreadcrumbItemLegacy, b as Breadcrumbs, c as BreadcrumbsProps } from './utils-CkatYLG4.mjs';
|
|
20
|
+
export { L as Language, R as RouteConfig, T as Transition, V as Variant, d as Variants, e as adjustLightness, f as adjustOpacity, g as adjustSaturation, h as cn, i as collapseVariants, j as colorTokens, k as colorUtils, l as createAnimation, m as detectLanguage, n as drawerVariants, o as durations, p as easings, q as fadeVariants, r as generateBreadcrumbs, s as generateColorScale, t as getCSSVariable, u as getContrastRatio, v as getForegroundColor, w as getLuminance, x as getOptimalForeground, y as getSemanticColorPair, z as hexToHSL, A as hexToRgb, C as hslToHex, D as listVariants, E as meetsContrastRequirements, F as modalVariants, G as parseCode, H as presets, I as rotateHue, J as rotateVariants, K as scaleDuration, M as scaleVariants, N as semanticColors, O as setCSSVariable, P as slideVariants, Q as tokenize, U as transitions } from './utils-CkatYLG4.mjs';
|
|
21
21
|
import { Command as Command$1 } from 'cmdk';
|
|
22
22
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
23
23
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
@@ -44,8 +44,8 @@ import { T as ThemeName$1, C as ColorMode$1 } from './index-DscTIrZ2.mjs';
|
|
|
44
44
|
import { Separator as Separator$2, Panel, Group } from 'react-resizable-panels';
|
|
45
45
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
46
46
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
47
|
-
export { p as Providers, T as ThemeProvider, a as ThemeProviderProps } from './providers-
|
|
48
|
-
export { h as Hooks, M as MotionPreference, T as ThemeHook, U as UseFormOptions, a as UseFormReturn, u as useForm, b as useMotionPreference, c as useTheme } from './hooks-
|
|
47
|
+
export { p as Providers, T as ThemeProvider, a as ThemeProviderProps } from './providers-CzKisd2T.mjs';
|
|
48
|
+
export { h as Hooks, M as MotionPreference, T as ThemeHook, U as UseFormOptions, a as UseFormReturn, u as useForm, b as useMotionPreference, c as useTheme } from './hooks-CeAuZ0i5.mjs';
|
|
49
49
|
import * as zustand_middleware from 'zustand/middleware';
|
|
50
50
|
import * as zustand from 'zustand';
|
|
51
51
|
import { a as FontTheme } from './fontThemes-Dh8mtXES.mjs';
|
|
@@ -1589,6 +1589,20 @@ declare const GitHubIcon: ({ ref, size, className }: GitHubIconProps & {
|
|
|
1589
1589
|
ref?: React__default.Ref<SVGSVGElement>;
|
|
1590
1590
|
}) => react_jsx_runtime.JSX.Element;
|
|
1591
1591
|
|
|
1592
|
+
interface OpenCosmosIconProps {
|
|
1593
|
+
/** Size of the icon in pixels @default 20 */
|
|
1594
|
+
size?: number;
|
|
1595
|
+
/** Additional className */
|
|
1596
|
+
className?: string;
|
|
1597
|
+
}
|
|
1598
|
+
/**
|
|
1599
|
+
* OpenCosmos brand icon — an orbital system: outer ring, tilted ellipse, center star.
|
|
1600
|
+
* Uses currentColor so it inherits text color from its parent.
|
|
1601
|
+
*/
|
|
1602
|
+
declare const OpenCosmosIcon: ({ ref, size, className, }: OpenCosmosIconProps & {
|
|
1603
|
+
ref?: React__default.Ref<SVGSVGElement>;
|
|
1604
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1605
|
+
|
|
1592
1606
|
interface HeadingProps {
|
|
1593
1607
|
/**
|
|
1594
1608
|
* Heading content
|
|
@@ -2414,6 +2428,48 @@ declare const SidebarItem: ({ ref, className, isActive, icon, showIcon, depth, h
|
|
|
2414
2428
|
ref?: React$1.Ref<HTMLButtonElement>;
|
|
2415
2429
|
}) => react_jsx_runtime.JSX.Element;
|
|
2416
2430
|
|
|
2431
|
+
declare const APP_SIDEBAR_WIDTH = 280;
|
|
2432
|
+
declare const APP_SIDEBAR_WIDTH_COLLAPSED = 60;
|
|
2433
|
+
interface AppSidebarContextValue {
|
|
2434
|
+
isOpen: boolean;
|
|
2435
|
+
toggle: () => void;
|
|
2436
|
+
open: () => void;
|
|
2437
|
+
close: () => void;
|
|
2438
|
+
}
|
|
2439
|
+
declare function useAppSidebar(): AppSidebarContextValue;
|
|
2440
|
+
interface AppSidebarProviderProps {
|
|
2441
|
+
children: React__default.ReactNode;
|
|
2442
|
+
/** Initial open state used on server and first render @default true */
|
|
2443
|
+
defaultOpen?: boolean;
|
|
2444
|
+
}
|
|
2445
|
+
declare function AppSidebarProvider({ children, defaultOpen }: AppSidebarProviderProps): react_jsx_runtime.JSX.Element;
|
|
2446
|
+
declare function AppSidebarInset({ children, className, }: {
|
|
2447
|
+
children: React__default.ReactNode;
|
|
2448
|
+
className?: string;
|
|
2449
|
+
}): react_jsx_runtime.JSX.Element;
|
|
2450
|
+
interface AppSidebarNavItem {
|
|
2451
|
+
icon: React__default.ReactNode;
|
|
2452
|
+
label: string;
|
|
2453
|
+
href: string;
|
|
2454
|
+
active?: boolean;
|
|
2455
|
+
external?: boolean;
|
|
2456
|
+
}
|
|
2457
|
+
interface AppSidebarProps {
|
|
2458
|
+
/** Icon element always visible (32×32). Clicking it toggles open/closed. */
|
|
2459
|
+
logo?: React__default.ReactNode;
|
|
2460
|
+
/** Wordmark shown next to the logo when expanded */
|
|
2461
|
+
title?: string;
|
|
2462
|
+
/** Navigation items */
|
|
2463
|
+
items?: AppSidebarNavItem[];
|
|
2464
|
+
/** Body slot — rendered in the scrollable mid-section (e.g. conversation history). Only visible when expanded. */
|
|
2465
|
+
children?: React__default.ReactNode;
|
|
2466
|
+
/** Footer slot — auth section, user avatar, sign-in prompt, etc. */
|
|
2467
|
+
footer?: React__default.ReactNode;
|
|
2468
|
+
/** Additional className for the <aside> */
|
|
2469
|
+
className?: string;
|
|
2470
|
+
}
|
|
2471
|
+
declare function AppSidebar({ logo, title, items, children, footer, className, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
|
|
2472
|
+
|
|
2417
2473
|
interface StackProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2418
2474
|
/**
|
|
2419
2475
|
* Content to arrange
|
|
@@ -2854,7 +2910,7 @@ declare const useCustomizer: zustand.UseBoundStore<Omit<zustand.StoreApi<Customi
|
|
|
2854
2910
|
*
|
|
2855
2911
|
* This file serves as the authoritative source for component counts,
|
|
2856
2912
|
* categories, and organization. Used by:
|
|
2857
|
-
* - Documentation (
|
|
2913
|
+
* - Documentation (OpenCosmos Studio)
|
|
2858
2914
|
* - MCP Server registry
|
|
2859
2915
|
* - Marketing materials
|
|
2860
2916
|
* - Internal tooling
|
|
@@ -2864,7 +2920,7 @@ declare const useCustomizer: zustand.UseBoundStore<Omit<zustand.StoreApi<Customi
|
|
|
2864
2920
|
*
|
|
2865
2921
|
* The workflow includes:
|
|
2866
2922
|
* - Creating the component in packages/ui
|
|
2867
|
-
* - Registering in
|
|
2923
|
+
* - Registering in OpenCosmos Studio (apps/web)
|
|
2868
2924
|
* - Updating THIS registry file
|
|
2869
2925
|
* - Updating MCP server registry
|
|
2870
2926
|
* - Version bumping and npm publishing
|
|
@@ -2872,7 +2928,7 @@ declare const useCustomizer: zustand.UseBoundStore<Omit<zustand.StoreApi<Customi
|
|
|
2872
2928
|
* Last Updated: 2026-02-28
|
|
2873
2929
|
*/
|
|
2874
2930
|
declare const BRAND: {
|
|
2875
|
-
readonly productName: "
|
|
2931
|
+
readonly productName: "OpenCosmos UI";
|
|
2876
2932
|
readonly productNameShort: "Sage";
|
|
2877
2933
|
readonly themeNames: {
|
|
2878
2934
|
readonly organic: "Terra";
|
|
@@ -2884,7 +2940,7 @@ declare const BRAND: {
|
|
|
2884
2940
|
};
|
|
2885
2941
|
declare const COMPONENT_REGISTRY: {
|
|
2886
2942
|
/**
|
|
2887
|
-
* Total count of all exported UI components from @
|
|
2943
|
+
* Total count of all exported UI components from @opencosmos/ui
|
|
2888
2944
|
*/
|
|
2889
2945
|
readonly totalCount: 100;
|
|
2890
2946
|
/**
|
|
@@ -3274,6 +3330,8 @@ declare const index$3_GitHubIcon: typeof GitHubIcon;
|
|
|
3274
3330
|
type index$3_GitHubIconProps = GitHubIconProps;
|
|
3275
3331
|
declare const index$3_Heading: typeof Heading;
|
|
3276
3332
|
type index$3_HeadingProps = HeadingProps;
|
|
3333
|
+
declare const index$3_OpenCosmosIcon: typeof OpenCosmosIcon;
|
|
3334
|
+
type index$3_OpenCosmosIconProps = OpenCosmosIconProps;
|
|
3277
3335
|
declare const index$3_StatCard: typeof StatCard;
|
|
3278
3336
|
declare const index$3_StatCardGroup: typeof StatCardGroup;
|
|
3279
3337
|
type index$3_StatCardProps = StatCardProps;
|
|
@@ -3303,13 +3361,21 @@ declare const index$3_statCardVariants: typeof statCardVariants;
|
|
|
3303
3361
|
declare const index$3_timelineVariants: typeof timelineVariants;
|
|
3304
3362
|
declare const index$3_treeNodeVariants: typeof treeNodeVariants;
|
|
3305
3363
|
declare namespace index$3 {
|
|
3306
|
-
export { index$3_AspectImage as AspectImage, type index$3_AspectImageProps as AspectImageProps, index$3_Avatar as Avatar, index$3_AvatarFallback as AvatarFallback, index$3_AvatarImage as AvatarImage, index$3_Badge as Badge, type index$3_BadgeProps as BadgeProps, index$3_Brand as Brand, type index$3_BrandProps as BrandProps, index$3_Calendar as Calendar, index$3_CalendarProps as CalendarProps, index$3_Card as Card, index$3_CardContent as CardContent, index$3_CardDescription as CardDescription, index$3_CardFooter as CardFooter, index$3_CardHeader as CardHeader, type index$3_CardProps as CardProps, index$3_CardTitle as CardTitle, index$3_Code as Code, type index$3_CodeProps as CodeProps, index$3_CollapsibleCodeBlock as CollapsibleCodeBlock, type index$3_CollapsibleCodeBlockProps as CollapsibleCodeBlockProps, index$3_DataTable as DataTable, index$3_DescriptionList as DescriptionList, type index$3_DescriptionListItem as DescriptionListItem, type index$3_DescriptionListProps as DescriptionListProps, index$3_GitHubIcon as GitHubIcon, type index$3_GitHubIconProps as GitHubIconProps, index$3_Heading as Heading, type index$3_HeadingProps as HeadingProps, index$3_StatCard as StatCard, index$3_StatCardGroup as StatCardGroup, type index$3_StatCardProps as StatCardProps, index$3_Table as Table, index$3_TableBody as TableBody, index$3_TableCaption as TableCaption, index$3_TableCell as TableCell, index$3_TableFooter as TableFooter, index$3_TableHead as TableHead, index$3_TableHeader as TableHeader, index$3_TableRow as TableRow, index$3_Text as Text, type index$3_TextProps as TextProps, index$3_Timeline as Timeline, index$3_TimelineItem as TimelineItem, type index$3_TimelineItemProps as TimelineItemProps, type index$3_TimelineProps as TimelineProps, type index$3_TreeNode as TreeNode, index$3_TreeView as TreeView, type index$3_TreeViewProps as TreeViewProps, index$3_Typewriter as Typewriter, type index$3_TypewriterProps as TypewriterProps, index$3_VariableWeightText as VariableWeightText, index$3_badgeVariants as badgeVariants, index$3_cardVariants as cardVariants, index$3_statCardVariants as statCardVariants, index$3_timelineVariants as timelineVariants, index$3_treeNodeVariants as treeNodeVariants };
|
|
3364
|
+
export { index$3_AspectImage as AspectImage, type index$3_AspectImageProps as AspectImageProps, index$3_Avatar as Avatar, index$3_AvatarFallback as AvatarFallback, index$3_AvatarImage as AvatarImage, index$3_Badge as Badge, type index$3_BadgeProps as BadgeProps, index$3_Brand as Brand, type index$3_BrandProps as BrandProps, index$3_Calendar as Calendar, index$3_CalendarProps as CalendarProps, index$3_Card as Card, index$3_CardContent as CardContent, index$3_CardDescription as CardDescription, index$3_CardFooter as CardFooter, index$3_CardHeader as CardHeader, type index$3_CardProps as CardProps, index$3_CardTitle as CardTitle, index$3_Code as Code, type index$3_CodeProps as CodeProps, index$3_CollapsibleCodeBlock as CollapsibleCodeBlock, type index$3_CollapsibleCodeBlockProps as CollapsibleCodeBlockProps, index$3_DataTable as DataTable, index$3_DescriptionList as DescriptionList, type index$3_DescriptionListItem as DescriptionListItem, type index$3_DescriptionListProps as DescriptionListProps, index$3_GitHubIcon as GitHubIcon, type index$3_GitHubIconProps as GitHubIconProps, index$3_Heading as Heading, type index$3_HeadingProps as HeadingProps, index$3_OpenCosmosIcon as OpenCosmosIcon, type index$3_OpenCosmosIconProps as OpenCosmosIconProps, index$3_StatCard as StatCard, index$3_StatCardGroup as StatCardGroup, type index$3_StatCardProps as StatCardProps, index$3_Table as Table, index$3_TableBody as TableBody, index$3_TableCaption as TableCaption, index$3_TableCell as TableCell, index$3_TableFooter as TableFooter, index$3_TableHead as TableHead, index$3_TableHeader as TableHeader, index$3_TableRow as TableRow, index$3_Text as Text, type index$3_TextProps as TextProps, index$3_Timeline as Timeline, index$3_TimelineItem as TimelineItem, type index$3_TimelineItemProps as TimelineItemProps, type index$3_TimelineProps as TimelineProps, type index$3_TreeNode as TreeNode, index$3_TreeView as TreeView, type index$3_TreeViewProps as TreeViewProps, index$3_Typewriter as Typewriter, type index$3_TypewriterProps as TypewriterProps, index$3_VariableWeightText as VariableWeightText, index$3_badgeVariants as badgeVariants, index$3_cardVariants as cardVariants, index$3_statCardVariants as statCardVariants, index$3_timelineVariants as timelineVariants, index$3_treeNodeVariants as treeNodeVariants };
|
|
3307
3365
|
}
|
|
3308
3366
|
|
|
3367
|
+
declare const index$2_APP_SIDEBAR_WIDTH: typeof APP_SIDEBAR_WIDTH;
|
|
3368
|
+
declare const index$2_APP_SIDEBAR_WIDTH_COLLAPSED: typeof APP_SIDEBAR_WIDTH_COLLAPSED;
|
|
3309
3369
|
declare const index$2_Accordion: typeof Accordion;
|
|
3310
3370
|
declare const index$2_AccordionContent: typeof AccordionContent;
|
|
3311
3371
|
declare const index$2_AccordionItem: typeof AccordionItem;
|
|
3312
3372
|
declare const index$2_AccordionTrigger: typeof AccordionTrigger;
|
|
3373
|
+
declare const index$2_AppSidebar: typeof AppSidebar;
|
|
3374
|
+
declare const index$2_AppSidebarInset: typeof AppSidebarInset;
|
|
3375
|
+
type index$2_AppSidebarNavItem = AppSidebarNavItem;
|
|
3376
|
+
type index$2_AppSidebarProps = AppSidebarProps;
|
|
3377
|
+
declare const index$2_AppSidebarProvider: typeof AppSidebarProvider;
|
|
3378
|
+
type index$2_AppSidebarProviderProps = AppSidebarProviderProps;
|
|
3313
3379
|
declare const index$2_AspectRatio: typeof AspectRatio;
|
|
3314
3380
|
declare const index$2_Carousel: typeof Carousel;
|
|
3315
3381
|
type index$2_CarouselApi = CarouselApi;
|
|
@@ -3361,8 +3427,9 @@ declare const index$2_SidebarItem: typeof SidebarItem;
|
|
|
3361
3427
|
declare const index$2_SidebarOverlay: typeof SidebarOverlay;
|
|
3362
3428
|
declare const index$2_Stack: typeof Stack;
|
|
3363
3429
|
type index$2_StackProps = StackProps;
|
|
3430
|
+
declare const index$2_useAppSidebar: typeof useAppSidebar;
|
|
3364
3431
|
declare namespace index$2 {
|
|
3365
|
-
export { index$2_Accordion as Accordion, index$2_AccordionContent as AccordionContent, index$2_AccordionItem as AccordionItem, index$2_AccordionTrigger as AccordionTrigger, index$2_AspectRatio as AspectRatio, index$2_Carousel as Carousel, type index$2_CarouselApi as CarouselApi, index$2_CarouselContent as CarouselContent, index$2_CarouselItem as CarouselItem, index$2_CarouselNext as CarouselNext, index$2_CarouselPrevious as CarouselPrevious, index$2_Collapsible as Collapsible, index$2_CollapsibleContent as CollapsibleContent, index$2_CollapsibleTrigger as CollapsibleTrigger, index$2_Container as Container, type index$2_ContainerProps as ContainerProps, index$2_CustomizerPanel as CustomizerPanel, type index$2_CustomizerPanelProps as CustomizerPanelProps, index$2_DatePicker as DatePicker, index$2_DatePickerProps as DatePickerProps, index$2_Footer as Footer, type index$2_FooterLink as FooterLink, type index$2_FooterProps as FooterProps, type index$2_FooterSection as FooterSection, index$2_GlassSurface as GlassSurface, type index$2_GlassSurfaceProps as GlassSurfaceProps, type index$2_GlassThickness as GlassThickness, type index$2_GlassTint as GlassTint, index$2_Grid as Grid, index$2_GridItem as GridItem, type index$2_GridItemProps as GridItemProps, type index$2_GridProps as GridProps, index$2_Header as Header, type index$2_HeaderNavLink as HeaderNavLink, type index$2_HeaderProps as HeaderProps, index$2_PageLayout as PageLayout, type index$2_PageLayoutProps as PageLayoutProps, index$2_PageTemplate as PageTemplate, type index$2_PageTemplateHeaderConfig as PageTemplateHeaderConfig, type index$2_PageTemplateProps as PageTemplateProps, type index$2_PageTemplateSecondaryNavConfig as PageTemplateSecondaryNavConfig, index$2_ResizableHandle as ResizableHandle, index$2_ResizablePanel as ResizablePanel, index$2_ResizablePanelGroup as ResizablePanelGroup, index$2_ScrollArea as ScrollArea, index$2_ScrollBar as ScrollBar, index$2_Separator as Separator, index$2_Sidebar as Sidebar, index$2_SidebarContent as SidebarContent, index$2_SidebarFooter as SidebarFooter, index$2_SidebarHeader as SidebarHeader, index$2_SidebarItem as SidebarItem, index$2_SidebarOverlay as SidebarOverlay, index$2_Stack as Stack, type index$2_StackProps as StackProps };
|
|
3432
|
+
export { index$2_APP_SIDEBAR_WIDTH as APP_SIDEBAR_WIDTH, index$2_APP_SIDEBAR_WIDTH_COLLAPSED as APP_SIDEBAR_WIDTH_COLLAPSED, index$2_Accordion as Accordion, index$2_AccordionContent as AccordionContent, index$2_AccordionItem as AccordionItem, index$2_AccordionTrigger as AccordionTrigger, index$2_AppSidebar as AppSidebar, index$2_AppSidebarInset as AppSidebarInset, type index$2_AppSidebarNavItem as AppSidebarNavItem, type index$2_AppSidebarProps as AppSidebarProps, index$2_AppSidebarProvider as AppSidebarProvider, type index$2_AppSidebarProviderProps as AppSidebarProviderProps, index$2_AspectRatio as AspectRatio, index$2_Carousel as Carousel, type index$2_CarouselApi as CarouselApi, index$2_CarouselContent as CarouselContent, index$2_CarouselItem as CarouselItem, index$2_CarouselNext as CarouselNext, index$2_CarouselPrevious as CarouselPrevious, index$2_Collapsible as Collapsible, index$2_CollapsibleContent as CollapsibleContent, index$2_CollapsibleTrigger as CollapsibleTrigger, index$2_Container as Container, type index$2_ContainerProps as ContainerProps, index$2_CustomizerPanel as CustomizerPanel, type index$2_CustomizerPanelProps as CustomizerPanelProps, index$2_DatePicker as DatePicker, index$2_DatePickerProps as DatePickerProps, index$2_Footer as Footer, type index$2_FooterLink as FooterLink, type index$2_FooterProps as FooterProps, type index$2_FooterSection as FooterSection, index$2_GlassSurface as GlassSurface, type index$2_GlassSurfaceProps as GlassSurfaceProps, type index$2_GlassThickness as GlassThickness, type index$2_GlassTint as GlassTint, index$2_Grid as Grid, index$2_GridItem as GridItem, type index$2_GridItemProps as GridItemProps, type index$2_GridProps as GridProps, index$2_Header as Header, type index$2_HeaderNavLink as HeaderNavLink, type index$2_HeaderProps as HeaderProps, index$2_PageLayout as PageLayout, type index$2_PageLayoutProps as PageLayoutProps, index$2_PageTemplate as PageTemplate, type index$2_PageTemplateHeaderConfig as PageTemplateHeaderConfig, type index$2_PageTemplateProps as PageTemplateProps, type index$2_PageTemplateSecondaryNavConfig as PageTemplateSecondaryNavConfig, index$2_ResizableHandle as ResizableHandle, index$2_ResizablePanel as ResizablePanel, index$2_ResizablePanelGroup as ResizablePanelGroup, index$2_ScrollArea as ScrollArea, index$2_ScrollBar as ScrollBar, index$2_Separator as Separator, index$2_Sidebar as Sidebar, index$2_SidebarContent as SidebarContent, index$2_SidebarFooter as SidebarFooter, index$2_SidebarHeader as SidebarHeader, index$2_SidebarItem as SidebarItem, index$2_SidebarOverlay as SidebarOverlay, index$2_Stack as Stack, type index$2_StackProps as StackProps, index$2_useAppSidebar as useAppSidebar };
|
|
3366
3433
|
}
|
|
3367
3434
|
|
|
3368
3435
|
declare const index$1_FaultyTerminal: typeof FaultyTerminal;
|
|
@@ -3379,4 +3446,4 @@ declare namespace index {
|
|
|
3379
3446
|
export { index_SplashCursor as SplashCursor, index_TargetCursor as TargetCursor };
|
|
3380
3447
|
}
|
|
3381
3448
|
|
|
3382
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, index$8 as Actions, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnimatedBeam, type AnimatedBeamProps, AspectImage, type AspectImageProps, AspectRatio, Avatar, AvatarFallback, AvatarImage, BRAND, index$1 as Backgrounds, Badge, type BadgeProps, Brand, type BrandProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbItemLegacy, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, BreadcrumbsProps, Button, type ButtonProps, COMPONENT_COUNTS, COMPONENT_REGISTRY, Calendar, CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Code, type CodeProps, Collapsible, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, CollapsibleContent, CollapsibleTrigger, ColorMode$1 as ColorMode, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CustomizerPanel, type CustomizerPanelProps, DOC_EXAMPLES, index$3 as DataDisplay, DataTable, DatePicker, DatePickerProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DragDropHandle, DragDropHandleProps, DragDropItem, DragDropList, DragDropListProps, DragDropTable, DragDropTableProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Dropdown, type DropdownItem, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownProps, EmptyState, type EmptyStateProps, FaultyTerminal, index$4 as Feedback, FileUpload, type FileUploadProps, FilterButton, type FilterButtonProps, Footer, type FooterLink, type FooterProps, type FooterSection, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, index$7 as Forms, GitHubIcon, type GitHubIconProps, GlassSurface, type GlassSurfaceProps, type GlassThickness, type GlassTint, type GradientConfig, Grid, GridItem, type GridItemProps, type GridProps, Header, type HeaderNavLink, type HeaderProps, Heading, type HeadingProps, HeroBlock, type HeroBlockProps, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, index$2 as Layout, Link, type LinkProps, MARKETING_COPY, Magnetic, type MagneticProps, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarTrigger, Modal, type ModalProps, index as Motion, NavLink, type NavLinkProps, index$6 as Navigation, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotificationCenter, type NotificationCenterProps, type NotificationItem, OpenGraphCard, type OpenGraphCardProps, OrbBackground, type OrbBackgroundProps, index$5 as Overlays, PageLayout, type PageLayoutProps, PageTemplate, type PageTemplateHeaderConfig, type PageTemplateProps, type PageTemplateSecondaryNavConfig, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProgressBar, type ProgressBarProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, SecondaryNav, type SecondaryNavItem, type SecondaryNavProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparatorComp as SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarItem, SidebarOverlay, Skeleton, type SkeletonProps, Slider, Spinner, type SpinnerProps, SplashCursor, Stack, type StackProps, StatCard, StatCardGroup, type StatCardProps, Stepper, type StepperProps, StepperStep, type StepperStepProps, Switch, SyntaxToken, SyntaxType, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TargetCursor, TertiaryNav, type TertiaryNavItem, type TertiaryNavProps, Text, TextField, type TextFieldProps, type TextProps, Textarea, type TextareaProps, ThemeName$1 as ThemeName, ThemeSwitcher, type ThemeSwitcherProps, ThemeToggle, type ThemeToggleProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, type Toast, ToastProvider, type ToastProviderProps, type ToastType, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeNode, TreeView, type TreeViewProps, Typewriter, type TypewriterProps, VariableWeightText, WarpBackground, alertVariants, badgeVariants, buttonVariants, cardVariants, emptyStateVariants, fileUploadZoneVariants, labelVariants, navigationMenuTriggerStyle, sheetVariants, statCardVariants, stepperVariants, timelineVariants, toggleVariants, treeNodeVariants, useCustomizer, useFormField, useThemeStore, useToast };
|
|
3449
|
+
export { APP_SIDEBAR_WIDTH, APP_SIDEBAR_WIDTH_COLLAPSED, Accordion, AccordionContent, AccordionItem, AccordionTrigger, index$8 as Actions, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AnimatedBeam, type AnimatedBeamProps, AppSidebar, AppSidebarInset, type AppSidebarNavItem, type AppSidebarProps, AppSidebarProvider, type AppSidebarProviderProps, AspectImage, type AspectImageProps, AspectRatio, Avatar, AvatarFallback, AvatarImage, BRAND, index$1 as Backgrounds, Badge, type BadgeProps, Brand, type BrandProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbItemLegacy, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, BreadcrumbsProps, Button, type ButtonProps, COMPONENT_COUNTS, COMPONENT_REGISTRY, Calendar, CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Code, type CodeProps, Collapsible, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, CollapsibleContent, CollapsibleTrigger, ColorMode$1 as ColorMode, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CustomizerPanel, type CustomizerPanelProps, DOC_EXAMPLES, index$3 as DataDisplay, DataTable, DatePicker, DatePickerProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DragDropHandle, DragDropHandleProps, DragDropItem, DragDropList, DragDropListProps, DragDropTable, DragDropTableProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Dropdown, type DropdownItem, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type DropdownProps, EmptyState, type EmptyStateProps, FaultyTerminal, index$4 as Feedback, FileUpload, type FileUploadProps, FilterButton, type FilterButtonProps, Footer, type FooterLink, type FooterProps, type FooterSection, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, index$7 as Forms, GitHubIcon, type GitHubIconProps, GlassSurface, type GlassSurfaceProps, type GlassThickness, type GlassTint, type GradientConfig, Grid, GridItem, type GridItemProps, type GridProps, Header, type HeaderNavLink, type HeaderProps, Heading, type HeadingProps, HeroBlock, type HeroBlockProps, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, Label, index$2 as Layout, Link, type LinkProps, MARKETING_COPY, Magnetic, type MagneticProps, Menubar, MenubarContent, MenubarGroup, MenubarItem, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarTrigger, Modal, type ModalProps, index as Motion, NavLink, type NavLinkProps, index$6 as Navigation, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotificationCenter, type NotificationCenterProps, type NotificationItem, OpenCosmosIcon, type OpenCosmosIconProps, OpenGraphCard, type OpenGraphCardProps, OrbBackground, type OrbBackgroundProps, index$5 as Overlays, PageLayout, type PageLayoutProps, PageTemplate, type PageTemplateHeaderConfig, type PageTemplateProps, type PageTemplateSecondaryNavConfig, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, ProgressBar, type ProgressBarProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, SecondaryNav, type SecondaryNavItem, type SecondaryNavProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparatorComp as SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarItem, SidebarOverlay, Skeleton, type SkeletonProps, Slider, Spinner, type SpinnerProps, SplashCursor, Stack, type StackProps, StatCard, StatCardGroup, type StatCardProps, Stepper, type StepperProps, StepperStep, type StepperStepProps, Switch, SyntaxToken, SyntaxType, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TargetCursor, TertiaryNav, type TertiaryNavItem, type TertiaryNavProps, Text, TextField, type TextFieldProps, type TextProps, Textarea, type TextareaProps, ThemeName$1 as ThemeName, ThemeSwitcher, type ThemeSwitcherProps, ThemeToggle, type ThemeToggleProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, type Toast, ToastProvider, type ToastProviderProps, type ToastType, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeNode, TreeView, type TreeViewProps, Typewriter, type TypewriterProps, VariableWeightText, WarpBackground, alertVariants, badgeVariants, buttonVariants, cardVariants, emptyStateVariants, fileUploadZoneVariants, labelVariants, navigationMenuTriggerStyle, sheetVariants, statCardVariants, stepperVariants, timelineVariants, toggleVariants, treeNodeVariants, useAppSidebar, useCustomizer, useFormField, useThemeStore, useToast };
|