@wow-two-beta/ui 0.0.64 → 0.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, ActivityItem, AnimatedNumber, AnnotationMarker, AudioPlayer, AudioWaveform, Avatar, AvatarGroup, Badge, BadgeOverlay, Card, Carousel, CarouselDot, CarouselDots, CarouselNext, CarouselPrev, CarouselSlide, CarouselSlides, CarouselViewport, ChatBubble, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, Comment, CommentThread, Confetti, CountBadge, CountUp, DataGrid, DataTable, DaySeparator, DescriptionList, DiffViewer, EmptyState, EventCalendar, Eyebrow, FeatureCard, Gantt, GradientText, Heading, HeatmapCalendar, Highlight, Image, InfoRow, KeyboardShortcut, List, ListItem, Mark, Marquee, MessageList, MetaInline, MetricChip, NodeEditor, NotificationDot, PDFViewer, PricingCard, Quote, ReactionBar, ScheduleView, ScrollReveal, SectionHeader, Separator, Snippet, Sortable, Sparkline, Stat, Status, StepCard, SwipeActions, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Text, ThreadView, Tilt, Timeline, TimelineDescription, TimelineItem, TimelineTitle, Tree, TreeGroup, TreeItem, Typewriter, VideoPlayer, avatarVariants, badgeVariants, codeVariants, headingVariants, textVariants } from '../chunk-RDRFXVNX.js';
1
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, ActivityItem, AnimatedNumber, AnnotationMarker, AudioPlayer, AudioWaveform, Avatar, AvatarGroup, Badge, BadgeOverlay, Card, Carousel, CarouselDot, CarouselDots, CarouselNext, CarouselPrev, CarouselSlide, CarouselSlides, CarouselViewport, ChatBubble, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, Comment, CommentThread, Confetti, CountBadge, CountUp, DataGrid, DataTable, DaySeparator, DescriptionList, DiffViewer, EmptyState, EventCalendar, Eyebrow, FeatureCard, Gantt, GradientText, Heading, HeatmapCalendar, Highlight, Image, InfoRow, KeyboardShortcut, List, ListItem, Mark, Marquee, MessageList, MetaInline, MetricChip, NodeEditor, NotificationDot, PDFViewer, PricingCard, Quote, ReactionBar, ScheduleView, ScrollReveal, SectionHeader, Separator, Snippet, Sortable, Sparkline, Stat, Status, StepCard, SwipeActions, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Text, ThreadView, Tilt, Timeline, TimelineDescription, TimelineItem, TimelineTitle, Tree, TreeGroup, TreeItem, Typewriter, VideoPlayer, avatarVariants, badgeVariants, codeVariants, headingVariants, textVariants } from '../chunk-FXYEMUV6.js';
2
2
  export { Kbd, Tag, tagVariants } from '../chunk-3SWPYYRQ.js';
3
3
  import '../chunk-4XWLEKH2.js';
4
4
  export { Tooltip } from '../chunk-YQGEF43L.js';
@@ -1,3 +1,4 @@
1
+ import { type ReactNode } from 'react';
1
2
  import { type ColorSwatchVariants } from '../colorSwatch';
2
3
  export interface ColorPickerProps {
3
4
  value?: string | null;
@@ -10,5 +11,7 @@ export interface ColorPickerProps {
10
11
  name?: string;
11
12
  className?: string;
12
13
  'aria-label'?: string;
14
+ /** Custom trigger element; when set, replaces the default swatch + hex-value button. Must be a single focusable element (it becomes the popover trigger via `asChild`). */
15
+ trigger?: ReactNode;
13
16
  }
14
17
  export declare const ColorPicker: import("react").ForwardRefExoticComponent<ColorPickerProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,11 +1,11 @@
1
- export { ADDRESS_COUNTRIES, AddressForm, BUILT_IN_EMOJI, BUILT_IN_FONTS, Calendar, CharacterCount, ChatComposer, Checkbox, CheckboxField, CheckboxGroup, ChoiceCard, CodeEditor, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatch, ColorSwatchPicker, ColorWheel, Combobox, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxSeparator, CronInput, CurrencyInput, DateField, DatePicker, DateRangePicker, Editable, EditableCancel, EditableInput, EditablePreview, EditableSubmit, EmailInput, EmojiPicker, Fieldset, FilePicker, FileUpload, FontPicker, FormErrorMessage, FormField, FormHelperText, GradientPicker, IconPicker, InputAddon, InputGroup, JSONEditor, KeyboardShortcutPicker, Knob, Label, LabeledInput, Legend, Listbox, ListboxEmpty, ListboxGroup, ListboxItem, ListboxSeparator, MarkdownEditor, MaskedInput, MultiSelect, MultiSelectContent, MultiSelectItem, MultiSelectTags, MultiSelectTrigger, NumberInput, PHONE_COUNTRIES, PasswordInput, PasswordStrength, PercentInput, PhoneInput, PinInput, Radio, RadioField, RadioGroup, RangeCalendar, ReactionPicker, RecurrenceEditor, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Slider, Stepper, StepperList, StepperPanel, StepperStep, Switch, SwitchField, TagsInput, TelInput, TextInput, Textarea, TimeField, TimePicker, UrlInput, Wizard, WizardFooter, WizardStep, WizardSteps, colorSwatchVariants, gradientToCss, useWizard } from '../chunk-5YT7XRTW.js';
1
+ export { ADDRESS_COUNTRIES, AddressForm, BUILT_IN_EMOJI, BUILT_IN_FONTS, Calendar, CharacterCount, ChatComposer, Checkbox, CheckboxField, CheckboxGroup, ChoiceCard, CodeEditor, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatch, ColorSwatchPicker, ColorWheel, Combobox, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxSeparator, CronInput, CurrencyInput, DateField, DatePicker, DateRangePicker, Editable, EditableCancel, EditableInput, EditablePreview, EditableSubmit, EmailInput, EmojiPicker, Fieldset, FilePicker, FileUpload, FontPicker, FormErrorMessage, FormField, FormHelperText, GradientPicker, IconPicker, InputAddon, InputGroup, JSONEditor, KeyboardShortcutPicker, Knob, Label, LabeledInput, Legend, Listbox, ListboxEmpty, ListboxGroup, ListboxItem, ListboxSeparator, MarkdownEditor, MaskedInput, MultiSelect, MultiSelectContent, MultiSelectItem, MultiSelectTags, MultiSelectTrigger, NumberInput, PHONE_COUNTRIES, PasswordInput, PasswordStrength, PercentInput, PhoneInput, PinInput, Radio, RadioField, RadioGroup, RangeCalendar, ReactionPicker, RecurrenceEditor, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Slider, Stepper, StepperList, StepperPanel, StepperStep, Switch, SwitchField, TagsInput, TelInput, TextInput, Textarea, TimeField, TimePicker, UrlInput, Wizard, WizardFooter, WizardStep, WizardSteps, colorSwatchVariants, gradientToCss, useWizard } from '../chunk-ZTK5ZQIL.js';
2
2
  import '../chunk-FMTBJJP6.js';
3
3
  import '../chunk-GTBNVI77.js';
4
4
  import '../chunk-ZC4H4PIN.js';
5
5
  import '../chunk-MZZKA3ZS.js';
6
6
  import '../chunk-NOOKDXIZ.js';
7
- import '../chunk-3SWPYYRQ.js';
8
7
  import '../chunk-NW7ULTYL.js';
8
+ import '../chunk-3SWPYYRQ.js';
9
9
  import '../chunk-V267IMBH.js';
10
10
  import '../chunk-MVMDDGW7.js';
11
11
  import '../chunk-DX7FYAKY.js';
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * as utils from './utils';
2
2
  export * as hooks from './hooks';
3
3
  export * as icons from './icons';
4
4
  export * as primitives from './primitives';
5
+ export * as themes from './themes';
5
6
  export * from './actions';
6
7
  export * from './display';
7
8
  export * from './feedback';
package/dist/index.js CHANGED
@@ -1,19 +1,20 @@
1
- export { ADDRESS_COUNTRIES, AddressForm, BUILT_IN_EMOJI, BUILT_IN_FONTS, Calendar, CharacterCount, ChatComposer, Checkbox, CheckboxField, CheckboxGroup, ChoiceCard, CodeEditor, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatch, ColorSwatchPicker, ColorWheel, Combobox, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxSeparator, CronInput, CurrencyInput, DateField, DatePicker, DateRangePicker, Editable, EditableCancel, EditableInput, EditablePreview, EditableSubmit, EmailInput, EmojiPicker, Fieldset, FilePicker, FileUpload, FontPicker, FormErrorMessage, FormField, FormHelperText, GradientPicker, IconPicker, InputAddon, InputGroup, JSONEditor, KeyboardShortcutPicker, Knob, Label, LabeledInput, Legend, Listbox, ListboxEmpty, ListboxGroup, ListboxItem, ListboxSeparator, MarkdownEditor, MaskedInput, MultiSelect, MultiSelectContent, MultiSelectItem, MultiSelectTags, MultiSelectTrigger, NumberInput, PHONE_COUNTRIES, PasswordInput, PasswordStrength, PercentInput, PhoneInput, PinInput, Radio, RadioField, RadioGroup, RangeCalendar, ReactionPicker, RecurrenceEditor, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Slider, Stepper, StepperList, StepperPanel, StepperStep, Switch, SwitchField, TagsInput, TelInput, TextInput, Textarea, TimeField, TimePicker, UrlInput, Wizard, WizardFooter, WizardStep, WizardSteps, colorSwatchVariants, gradientToCss, useWizard } from './chunk-5YT7XRTW.js';
2
- export { AppShell, AppShellAside, AppShellContent, AppShellFooter, AppShellHeader, AppShellMain, AppShellSidebar, AspectRatio, Box, Center, Cluster, Container, Divider, Flex, Frame, Grid, HStack, Navbar, Overlay, PullToRefresh, ResizablePanel, ResizablePanels, ResizableSeparator, ScrollArea, Section, Spacer, Stack, Surface, TwoColumn, VStack, containerVariants, dividerVariants, gridVariants, navbarVariants, resolveGridColumns, resolveGridGap, sectionVariants, stackVariants, useAppShell } from './chunk-NIFL35PJ.js';
1
+ export { Alert, AlertSimple, Banner, BannerSimple, Callout, InlineSpinner, LiveCursor, LoadingOverlay, LoadingState, MeterBar, NotificationCenter, NotificationItem, OnboardingChecklist, OnboardingChecklistTask, PresenceIndicator, ProgressBar, ProgressCircle, ProgressSteps, Skeleton, StatusIndicator, Toast, ToastSimple, Toaster, Tour, TrendIndicator, TypingIndicator, UndoBar, alertSimpleVariants, bannerSimpleVariants, progressFillVariants, progressTrackVariants, skeletonVariants, toastSimpleVariants, toaster, useOnboardingChecklist, useToaster } from './chunk-NEH4ITXL.js';
2
+ export { ADDRESS_COUNTRIES, AddressForm, BUILT_IN_EMOJI, BUILT_IN_FONTS, Calendar, CharacterCount, ChatComposer, Checkbox, CheckboxField, CheckboxGroup, ChoiceCard, CodeEditor, ColorArea, ColorField, ColorPicker, ColorSlider, ColorSwatch, ColorSwatchPicker, ColorWheel, Combobox, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxSeparator, CronInput, CurrencyInput, DateField, DatePicker, DateRangePicker, Editable, EditableCancel, EditableInput, EditablePreview, EditableSubmit, EmailInput, EmojiPicker, Fieldset, FilePicker, FileUpload, FontPicker, FormErrorMessage, FormField, FormHelperText, GradientPicker, IconPicker, InputAddon, InputGroup, JSONEditor, KeyboardShortcutPicker, Knob, Label, LabeledInput, Legend, Listbox, ListboxEmpty, ListboxGroup, ListboxItem, ListboxSeparator, MarkdownEditor, MaskedInput, MultiSelect, MultiSelectContent, MultiSelectItem, MultiSelectTags, MultiSelectTrigger, NumberInput, PHONE_COUNTRIES, PasswordInput, PasswordStrength, PercentInput, PhoneInput, PinInput, Radio, RadioField, RadioGroup, RangeCalendar, ReactionPicker, RecurrenceEditor, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Slider, Stepper, StepperList, StepperPanel, StepperStep, Switch, SwitchField, TagsInput, TelInput, TextInput, Textarea, TimeField, TimePicker, UrlInput, Wizard, WizardFooter, WizardStep, WizardSteps, colorSwatchVariants, gradientToCss, useWizard } from './chunk-ZTK5ZQIL.js';
3
+ export { AppShell, AppShellAside, AppShellContent, AppShellFooter, AppShellHeader, AppShellMain, AppShellSidebar, AspectRatio, Box, Center, Cluster, Container, Divider, Flex, Frame, Grid, HStack, Navbar, Overlay, PullToRefresh, ResizablePanel, ResizablePanels, ResizableSeparator, ScrollArea, Section, Spacer, Stack, Surface, TwoColumn, VStack, containerVariants, dividerVariants, gridVariants, navbarVariants, resolveGridColumns, resolveGridGap, sectionVariants, stackVariants, useAppShell } from './chunk-3BNEDKMS.js';
4
+ export { Spinner, spinnerVariants } from './chunk-7ZDLUNAY.js';
3
5
  export { Breadcrumb, CommandPalette, CommandPaletteContent, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, ContextMenu, ContextMenuContent, ContextMenuTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, Menu, MenuGroup, MenuItem, MenuLabel, MenuSeparator, Menubar, MenubarContent, MenubarMenu, MenubarTrigger, NavItem, NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, Pagination, ScrollSpy, TableOfContents, menuItemVariants, menuLabelVariants, menuSeparatorVariants, menuVariants, useScrollSpy } from './chunk-H3WC7KRX.js';
4
6
  import './chunk-FMTBJJP6.js';
5
7
  export { ActionSheet, ActionSheetAction, ActionSheetCancel, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, BottomSheet, BottomSheetDescription, BottomSheetTitle, HoverCard, HoverCardArrow, HoverCardContent, HoverCardTrigger, Popover, PopoverArrow, PopoverContent, PopoverTrigger, useBottomSheet } from './chunk-GTBNVI77.js';
6
8
  export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from './chunk-ZC4H4PIN.js';
7
9
  export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from './chunk-MZZKA3ZS.js';
8
10
  import './chunk-NOOKDXIZ.js';
11
+ export { Backdrop } from './chunk-NW7ULTYL.js';
12
+ export { themes_exports as themes } from './chunk-LS4EGKUK.js';
9
13
  export { BackToTopButton, Button, ButtonGroup, CopyButton, DisclosureButton, FAB, Link, SegmentedControl, SpeedDial, SpeedDialAction, SpeedDialTrigger, ToggleButton, ToggleButtonGroup, Toolbar, ToolbarButton, ToolbarLink, ToolbarSeparator, buttonVariants, fabVariants, linkVariants, toggleButtonVariants } from './chunk-O4Y52ERR.js';
10
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, ActivityItem, AnimatedNumber, AnnotationMarker, AudioPlayer, AudioWaveform, Avatar, AvatarGroup, Badge, BadgeOverlay, Card, Carousel, CarouselDot, CarouselDots, CarouselNext, CarouselPrev, CarouselSlide, CarouselSlides, CarouselViewport, ChatBubble, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, Comment, CommentThread, Confetti, CountBadge, CountUp, DataGrid, DataTable, DaySeparator, DescriptionList, DiffViewer, EmptyState, EventCalendar, Eyebrow, FeatureCard, Gantt, GradientText, Heading, HeatmapCalendar, Highlight, Image, InfoRow, KeyboardShortcut, List, ListItem, Mark, Marquee, MessageList, MetaInline, MetricChip, NodeEditor, NotificationDot, PDFViewer, PricingCard, Quote, ReactionBar, ScheduleView, ScrollReveal, SectionHeader, Separator, Snippet, Sortable, Sparkline, Stat, Status, StepCard, SwipeActions, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Text, ThreadView, Tilt, Timeline, TimelineDescription, TimelineItem, TimelineTitle, Tree, TreeGroup, TreeItem, Typewriter, VideoPlayer, avatarVariants, badgeVariants, codeVariants, headingVariants, textVariants } from './chunk-RDRFXVNX.js';
14
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityFeed, ActivityItem, AnimatedNumber, AnnotationMarker, AudioPlayer, AudioWaveform, Avatar, AvatarGroup, Badge, BadgeOverlay, Card, Carousel, CarouselDot, CarouselDots, CarouselNext, CarouselPrev, CarouselSlide, CarouselSlides, CarouselViewport, ChatBubble, Code, Collapsible, CollapsibleContent, CollapsibleTrigger, Comment, CommentThread, Confetti, CountBadge, CountUp, DataGrid, DataTable, DaySeparator, DescriptionList, DiffViewer, EmptyState, EventCalendar, Eyebrow, FeatureCard, Gantt, GradientText, Heading, HeatmapCalendar, Highlight, Image, InfoRow, KeyboardShortcut, List, ListItem, Mark, Marquee, MessageList, MetaInline, MetricChip, NodeEditor, NotificationDot, PDFViewer, PricingCard, Quote, ReactionBar, ScheduleView, ScrollReveal, SectionHeader, Separator, Snippet, Sortable, Sparkline, Stat, Status, StepCard, SwipeActions, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeaderCell, TableRow, Tabs, TabsList, TabsPanel, TabsTab, Text, ThreadView, Tilt, Timeline, TimelineDescription, TimelineItem, TimelineTitle, Tree, TreeGroup, TreeItem, Typewriter, VideoPlayer, avatarVariants, badgeVariants, codeVariants, headingVariants, textVariants } from './chunk-FXYEMUV6.js';
11
15
  export { Kbd, Tag, tagVariants } from './chunk-3SWPYYRQ.js';
12
16
  export { Inline } from './chunk-4XWLEKH2.js';
13
17
  export { Tooltip } from './chunk-YQGEF43L.js';
14
- export { Alert, AlertSimple, Banner, BannerSimple, Callout, InlineSpinner, LiveCursor, LoadingOverlay, LoadingState, MeterBar, NotificationCenter, NotificationItem, OnboardingChecklist, OnboardingChecklistTask, PresenceIndicator, ProgressBar, ProgressCircle, ProgressSteps, Skeleton, StatusIndicator, Toast, ToastSimple, Toaster, Tour, TrendIndicator, TypingIndicator, UndoBar, alertSimpleVariants, bannerSimpleVariants, progressFillVariants, progressTrackVariants, skeletonVariants, toastSimpleVariants, toaster, useOnboardingChecklist, useToaster } from './chunk-NEH4ITXL.js';
15
- export { Spinner, spinnerVariants } from './chunk-7ZDLUNAY.js';
16
- export { Backdrop } from './chunk-NW7ULTYL.js';
17
18
  export { hooks_exports as hooks } from './chunk-V267IMBH.js';
18
19
  export { icons_exports as icons } from './chunk-MVMDDGW7.js';
19
20
  export { utils_exports as utils } from './chunk-DX7FYAKY.js';
@@ -1,9 +1,9 @@
1
- export { AppShell, AppShellAside, AppShellContent, AppShellFooter, AppShellHeader, AppShellMain, AppShellSidebar, AspectRatio, Box, Center, Cluster, Container, Divider, Flex, Frame, Grid, HStack, Navbar, Overlay, PullToRefresh, ResizablePanel, ResizablePanels, ResizableSeparator, ScrollArea, Section, Spacer, Stack, Surface, TwoColumn, VStack, containerVariants, dividerVariants, gridVariants, navbarVariants, resolveGridColumns, resolveGridGap, sectionVariants, stackVariants, useAppShell } from '../chunk-NIFL35PJ.js';
1
+ export { AppShell, AppShellAside, AppShellContent, AppShellFooter, AppShellHeader, AppShellMain, AppShellSidebar, AspectRatio, Box, Center, Cluster, Container, Divider, Flex, Frame, Grid, HStack, Navbar, Overlay, PullToRefresh, ResizablePanel, ResizablePanels, ResizableSeparator, ScrollArea, Section, Spacer, Stack, Surface, TwoColumn, VStack, containerVariants, dividerVariants, gridVariants, navbarVariants, resolveGridColumns, resolveGridGap, sectionVariants, stackVariants, useAppShell } from '../chunk-3BNEDKMS.js';
2
+ import '../chunk-7ZDLUNAY.js';
2
3
  import '../chunk-ZC4H4PIN.js';
3
4
  import '../chunk-NOOKDXIZ.js';
4
- export { Inline } from '../chunk-4XWLEKH2.js';
5
- import '../chunk-7ZDLUNAY.js';
6
5
  import '../chunk-NW7ULTYL.js';
6
+ export { Inline } from '../chunk-4XWLEKH2.js';
7
7
  import '../chunk-V267IMBH.js';
8
8
  import '../chunk-DX7FYAKY.js';
9
9
  import '../chunk-XLYJF3HC.js';
@@ -0,0 +1,42 @@
1
+ /** Cylindrical OKLab color: L ∈ [0,1], C ≥ 0, H ∈ [0,360). */
2
+ export interface Oklch {
3
+ l: number;
4
+ c: number;
5
+ h: number;
6
+ }
7
+ /** Wrap a hue into [0,360). */
8
+ export declare function normalizeHue(h: number): number;
9
+ /** True when the OKLCH color maps inside the sRGB gamut (no channel clipping). */
10
+ export declare function isInSrgbGamut(color: Oklch): boolean;
11
+ /**
12
+ * Reduce chroma (keeping L and H) until the color fits the sRGB gamut.
13
+ * Binary search on chroma — cheap, deterministic, good enough for tokens.
14
+ */
15
+ export declare function clampChromaToGamut(color: Oklch): Oklch;
16
+ /** Convert OKLCH → `#rrggbb`. Chroma is gamut-clamped first so output is always valid sRGB. */
17
+ export declare function oklchToHex(color: Oklch): string;
18
+ /**
19
+ * Format OKLCH as a CSS `oklch(L% C H)` string.
20
+ * Rounded for compact, stable output (L→0.1%, C→4dp, H→0.1°).
21
+ */
22
+ export declare function oklchToCss(color: Oklch): string;
23
+ /** WCAG relative luminance for an OKLCH color (via its in-gamut sRGB mapping). */
24
+ export declare function relativeLuminance(color: Oklch): number;
25
+ /** WCAG 2.1 contrast ratio (1–21) between two OKLCH colors. Symmetric. */
26
+ export declare function contrastRatio(a: Oklch, b: Oklch): number;
27
+ /** WCAG 2.1 contrast ratio between two CSS color strings. Supports `oklch(...)` and hex. */
28
+ export declare function contrastRatioCss(a: string, b: string): number;
29
+ /** Parse a token color string (`oklch(L% C H)` or hex) back into OKLCH. Returns null if unparseable. */
30
+ export declare function parseColor(value: string): Oklch | null;
31
+ /** Grouped namespace export (mirrors `ColorExtensions` style elsewhere in the lib). */
32
+ export declare const Oklch: {
33
+ readonly normalizeHue: typeof normalizeHue;
34
+ readonly isInSrgbGamut: typeof isInSrgbGamut;
35
+ readonly clampChromaToGamut: typeof clampChromaToGamut;
36
+ readonly oklchToHex: typeof oklchToHex;
37
+ readonly oklchToCss: typeof oklchToCss;
38
+ readonly parseColor: typeof parseColor;
39
+ readonly relativeLuminance: typeof relativeLuminance;
40
+ readonly contrastRatio: typeof contrastRatio;
41
+ readonly contrastRatioCss: typeof contrastRatioCss;
42
+ };
@@ -0,0 +1,76 @@
1
+ import type { TokenSet } from './Tokens';
2
+ /**
3
+ * Theme lifecycle status.
4
+ *
5
+ * - `validated` — hand-authored from real, visually-verified app tokens; the
6
+ * colors are locked (never auto-nudged), proven in a shipping product.
7
+ * - `candidate` — generated/curated and AA-proven by the engine, but not yet
8
+ * validated against a real app surface.
9
+ */
10
+ export declare const ThemeStatus: {
11
+ readonly Validated: "validated";
12
+ readonly Candidate: "candidate";
13
+ };
14
+ /** A theme's lifecycle status value (`"validated"` | `"candidate"`). */
15
+ export type ThemeStatus = (typeof ThemeStatus)[keyof typeof ThemeStatus];
16
+ /** Contrast / "is this theme proven" metadata, produced by the validator. */
17
+ export interface ThemeMeta {
18
+ /** True iff every foreground↔surface pair clears its WCAG AA threshold in BOTH modes. */
19
+ contrastAA: boolean;
20
+ /**
21
+ * Human-readable pair failures (empty when `contrastAA` is true).
22
+ * Each entry: `"<mode>: <fg> on <bg> = <ratio> (need <threshold>)"`.
23
+ */
24
+ failures?: string[];
25
+ }
26
+ /** A named, validated theme — the unit the registry stores and the emitter renders. */
27
+ export interface Theme {
28
+ /** Stable kebab-case id; drives the `.theme-{id}` class. */
29
+ id: string;
30
+ /** Display name. */
31
+ name: string;
32
+ /** One-line description. */
33
+ description: string;
34
+ /** Free-form tags for filtering/search (e.g. `["dark","cool","brand"]`). */
35
+ tags: string[];
36
+ /** Light-mode token values. */
37
+ light: TokenSet;
38
+ /** Dark-mode token values. */
39
+ dark: TokenSet;
40
+ /** Border-radius scale knob (maps to the lib's `--radius-*`). Optional. */
41
+ radius?: 'sm' | 'md' | 'lg';
42
+ /** Lifecycle status — `validated` (real-app proven, locked) or `candidate` (engine-proven). */
43
+ status: ThemeStatus;
44
+ /** Validation result — `meta.contrastAA === true` ⇒ the theme is "proven". */
45
+ meta: ThemeMeta;
46
+ }
47
+ /** Neutral surface temperature — biases the grey ramp warm/cool/neutral. */
48
+ export type NeutralTemp = 'cool' | 'neutral' | 'warm';
49
+ /** How the accent hue is derived from the primary hue. */
50
+ export type AccentMode = 'complementary' | 'analogous' | 'triadic' | 'mono';
51
+ /** Surface character — `soft` = gentle low-contrast surfaces, `crisp` = punchier separation. */
52
+ export type SurfaceStyle = 'soft' | 'crisp';
53
+ /**
54
+ * The recipe a theme is generated from. Pure inputs → deterministic `Theme`
55
+ * (no randomness; identical seeds always yield identical themes).
56
+ */
57
+ export interface ThemeSeed {
58
+ /** Stable kebab-case id for the produced theme. */
59
+ id: string;
60
+ /** Display name. */
61
+ name: string;
62
+ /** One-line description (optional — a sensible default is derived from the seed). */
63
+ description?: string;
64
+ /** Tags to attach (generator also auto-tags temp/mode/scheme). */
65
+ tags?: string[];
66
+ /** Primary brand hue in degrees, 0–360. */
67
+ primaryHue: number;
68
+ /** Neutral ramp temperature. Default `neutral`. */
69
+ neutralTemp?: NeutralTemp;
70
+ /** Accent derivation. Default `complementary`. */
71
+ accentMode?: AccentMode;
72
+ /** Surface character. Default `crisp`. */
73
+ surface?: SurfaceStyle;
74
+ /** Radius knob to carry through. Optional. */
75
+ radius?: 'sm' | 'md' | 'lg';
76
+ }
@@ -0,0 +1,40 @@
1
+ /** The six tone families that each carry base / -foreground / -soft / -soft-foreground. */
2
+ export declare const TONE_FAMILIES: readonly ["primary", "accent", "destructive", "info", "success", "warning"];
3
+ export type ToneFamilyName = (typeof TONE_FAMILIES)[number];
4
+ /** Surface + chrome tokens (everything that isn't one of the tone families). */
5
+ export declare const SURFACE_TOKENS: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "muted", "muted-foreground", "subtle-foreground", "inverse", "inverse-foreground", "border", "border-strong", "input", "ring"];
6
+ /** The four slot suffixes every tone family expands into. */
7
+ type ToneSlotSuffix = '' | '-foreground' | '-soft' | '-soft-foreground';
8
+ /** A single tone family expanded to its four token keys, e.g. `primary | primary-foreground | …`. */
9
+ type ToneFamilyTokens<F extends string> = F extends string ? `${F}${ToneSlotSuffix}` : never;
10
+ /**
11
+ * Every semantic token key (the part after `--color-`).
12
+ *
13
+ * = surface/chrome tokens ∪ (each tone family × {base,-foreground,-soft,-soft-foreground}).
14
+ * 15 surface + 6×4 tone = 39 keys total.
15
+ */
16
+ export type SemanticToken = (typeof SURFACE_TOKENS)[number] | ToneFamilyTokens<ToneFamilyName>;
17
+ /** A complete set of color values — one CSS color string per semantic token. */
18
+ export type TokenSet = Record<SemanticToken, string>;
19
+ /** Optional radius scale a theme may carry (maps to `--radius-{md,lg,xl}`). */
20
+ export interface RadiusScale {
21
+ md: string;
22
+ lg: string;
23
+ xl: string;
24
+ }
25
+ /** The four slots of one tone family. */
26
+ export interface ToneSlots {
27
+ base: string;
28
+ foreground: string;
29
+ soft: string;
30
+ softForeground: string;
31
+ }
32
+ /**
33
+ * The full, ordered list of every semantic token key — derived from the same
34
+ * constants the type is built from, so it can never drift from `SemanticToken`.
35
+ * Used by the validator/emitter to iterate exhaustively.
36
+ */
37
+ export declare const SEMANTIC_TOKENS: readonly SemanticToken[];
38
+ /** Write a tone family's four slots into a partial token set under the family's keys. */
39
+ export declare function applyToneSlots(target: Partial<TokenSet>, family: ToneFamilyName, slots: ToneSlots): void;
40
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { Theme, ThemeStatus } from './Theme';
2
+ /**
3
+ * Emit the CSS for a single theme: a light `.theme-{id}` block + a
4
+ * `.dark.theme-{id}` block. Returns a string (no trailing newline).
5
+ */
6
+ export declare function themeToCss(theme: Theme): string;
7
+ /** Emit a full stylesheet for many themes, with a generated-file banner. */
8
+ export declare function emitAllThemesCss(themes: Theme[]): string;
9
+ /** Machine-readable manifest entry for one theme (no token payload — index only). */
10
+ export interface ThemeManifestEntry {
11
+ id: string;
12
+ name: string;
13
+ description: string;
14
+ tags: string[];
15
+ /** Lifecycle status — `validated` (real-app proven) or `candidate` (engine-proven). */
16
+ status: ThemeStatus;
17
+ contrastAA: boolean;
18
+ }
19
+ /** Build the `themes.json` manifest payload from the registry. */
20
+ export declare function emitThemesManifest(themes: Theme[]): ThemeManifestEntry[];
@@ -0,0 +1,6 @@
1
+ import type { Theme, ThemeSeed } from './Theme';
2
+ /**
3
+ * Expand a {@link ThemeSeed} into a validated {@link Theme}.
4
+ * Deterministic: same seed in → identical theme out.
5
+ */
6
+ export declare function generateTheme(seed: ThemeSeed): Theme;
@@ -0,0 +1,11 @@
1
+ export { Oklch } from './Oklch';
2
+ export type { Oklch as OklchColor } from './Oklch';
3
+ export { normalizeHue, isInSrgbGamut, clampChromaToGamut, oklchToHex, oklchToCss, parseColor, relativeLuminance, contrastRatio, contrastRatioCss, } from './Oklch';
4
+ export type { SemanticToken, TokenSet, RadiusScale, ToneFamilyName, ToneSlots, } from './Tokens';
5
+ export { SEMANTIC_TOKENS, SURFACE_TOKENS, TONE_FAMILIES, applyToneSlots, } from './Tokens';
6
+ export type { Theme, ThemeMeta, ThemeSeed, NeutralTemp, AccentMode, SurfaceStyle, } from './Theme';
7
+ export { ThemeStatus } from './Theme';
8
+ export { generateTheme } from './generate';
9
+ export { validateTheme, contrastPairs, AA_TEXT, AA_UI } from './validate';
10
+ export { themeToCss, emitAllThemesCss, emitThemesManifest, type ThemeManifestEntry, } from './css';
11
+ export { THEMES, THEME_SEEDS, THEME_IDS, getTheme, validatedThemes, candidateThemes, } from './registry';
@@ -0,0 +1,4 @@
1
+ export { AA_TEXT, AA_UI, Oklch, SEMANTIC_TOKENS, SURFACE_TOKENS, THEMES, THEME_IDS, THEME_SEEDS, TONE_FAMILIES, ThemeStatus, applyToneSlots, candidateThemes, clampChromaToGamut, contrastPairs, contrastRatio, contrastRatioCss, emitAllThemesCss, emitThemesManifest, generateTheme, getTheme, isInSrgbGamut, normalizeHue, oklchToCss, oklchToHex, parseColor, relativeLuminance, themeToCss, validateTheme, validatedThemes } from '../chunk-LS4EGKUK.js';
2
+ import '../chunk-DCHYNTHI.js';
3
+ //# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,3 @@
1
+ import type { ThemeSeed } from './Theme';
2
+ /** The full candidate pool seeds (named editor/brand palettes + hue sweep). */
3
+ export declare const POOL_SEEDS: ThemeSeed[];
@@ -0,0 +1,16 @@
1
+ import type { Theme, ThemeSeed } from './Theme';
2
+ /** The authoring seeds. Order here = order in `THEMES` and the emitted stylesheet. */
3
+ export declare const THEME_SEEDS: ThemeSeed[];
4
+ /**
5
+ * The full registry: validated (real-app-proven) themes FIRST, then the curated
6
+ * candidate presets. Order here = order in the emitted stylesheet / manifest.
7
+ */
8
+ export declare const THEMES: Theme[];
9
+ /** Look up a theme by id. Returns `undefined` when absent. */
10
+ export declare function getTheme(id: string): Theme | undefined;
11
+ /** Themes proven against a real app surface (`status === "validated"`). */
12
+ export declare function validatedThemes(): Theme[];
13
+ /** Engine-proven curated presets not yet app-validated (`status === "candidate"`). */
14
+ export declare function candidateThemes(): Theme[];
15
+ /** Ids of all curated themes, in registry order. */
16
+ export declare const THEME_IDS: string[];
@@ -0,0 +1,25 @@
1
+ import type { Theme, ThemeMeta } from './Theme';
2
+ import { type SemanticToken } from './Tokens';
3
+ /** WCAG AA thresholds. Text = normal-size body text; UI = non-text affordances. */
4
+ export declare const AA_TEXT = 4.5;
5
+ export declare const AA_UI = 3;
6
+ /** One foreground↔background pair to verify, with its required ratio. */
7
+ interface ContrastPair {
8
+ /** Foreground token (text/icon/affordance color). */
9
+ fg: SemanticToken;
10
+ /** Background token the fg sits on. */
11
+ bg: SemanticToken;
12
+ /** Required minimum ratio (AA_TEXT or AA_UI). */
13
+ min: number;
14
+ }
15
+ /**
16
+ * The canonical set of pairs every theme must satisfy.
17
+ * Surface text pairs + each tone family's solid/soft foreground pairs + ring.
18
+ */
19
+ export declare function contrastPairs(): ContrastPair[];
20
+ /**
21
+ * Validate a theme's light AND dark token sets.
22
+ * `contrastAA` is true only when both modes pass every pair.
23
+ */
24
+ export declare function validateTheme(theme: Pick<Theme, 'light' | 'dark'>): ThemeMeta;
25
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { Theme } from './Theme';
2
+ /** Validated themes, merged FIRST into the curated `THEMES` array. */
3
+ export declare const VALIDATED_THEMES: Theme[];