@sqlrooms/ui 0.29.0-rc.1 → 0.29.0-rc.3

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.
Files changed (75) hide show
  1. package/dist/components/accordion.d.ts +2 -2
  2. package/dist/components/accordion.d.ts.map +1 -1
  3. package/dist/components/accordion.js +3 -3
  4. package/dist/components/accordion.js.map +1 -1
  5. package/dist/components/alert.js +1 -1
  6. package/dist/components/alert.js.map +1 -1
  7. package/dist/components/card.js +1 -1
  8. package/dist/components/card.js.map +1 -1
  9. package/dist/components/editable-text.d.ts.map +1 -1
  10. package/dist/components/editable-text.js +34 -8
  11. package/dist/components/editable-text.js.map +1 -1
  12. package/dist/components/error-pane.d.ts.map +1 -1
  13. package/dist/components/error-pane.js +2 -2
  14. package/dist/components/error-pane.js.map +1 -1
  15. package/dist/components/hover-card.d.ts +7 -0
  16. package/dist/components/hover-card.d.ts.map +1 -0
  17. package/dist/components/hover-card.js +15 -0
  18. package/dist/components/hover-card.js.map +1 -0
  19. package/dist/components/progress.d.ts.map +1 -1
  20. package/dist/components/progress.js.map +1 -1
  21. package/dist/components/resizable.d.ts +302 -20
  22. package/dist/components/resizable.d.ts.map +1 -1
  23. package/dist/components/resizable.js +12 -5
  24. package/dist/components/resizable.js.map +1 -1
  25. package/dist/components/run-button.d.ts +19 -0
  26. package/dist/components/run-button.d.ts.map +1 -0
  27. package/dist/components/run-button.js +17 -0
  28. package/dist/components/run-button.js.map +1 -0
  29. package/dist/components/sidebar.d.ts.map +1 -1
  30. package/dist/components/sidebar.js +7 -4
  31. package/dist/components/sidebar.js.map +1 -1
  32. package/dist/components/sonner.d.ts +4 -0
  33. package/dist/components/sonner.d.ts.map +1 -0
  34. package/dist/components/sonner.js +37 -0
  35. package/dist/components/sonner.js.map +1 -0
  36. package/dist/components/tab-strip.d.ts +12 -5
  37. package/dist/components/tab-strip.d.ts.map +1 -1
  38. package/dist/components/tab-strip.js +27 -11
  39. package/dist/components/tab-strip.js.map +1 -1
  40. package/dist/hooks/use-mobile.d.ts.map +1 -1
  41. package/dist/hooks/use-mobile.js.map +1 -1
  42. package/dist/hooks/useDebounce.d.ts +33 -0
  43. package/dist/hooks/useDebounce.d.ts.map +1 -0
  44. package/dist/hooks/useDebounce.js +45 -0
  45. package/dist/hooks/useDebounce.js.map +1 -0
  46. package/dist/hooks/useDebouncedCallback.d.ts +45 -0
  47. package/dist/hooks/useDebouncedCallback.d.ts.map +1 -0
  48. package/dist/hooks/useDebouncedCallback.js +70 -0
  49. package/dist/hooks/useDebouncedCallback.js.map +1 -0
  50. package/dist/hooks/useDebouncedValue.d.ts +23 -0
  51. package/dist/hooks/useDebouncedValue.d.ts.map +1 -0
  52. package/dist/hooks/useDebouncedValue.js +40 -0
  53. package/dist/hooks/useDebouncedValue.js.map +1 -0
  54. package/dist/index.d.ts +31 -27
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +30 -27
  57. package/dist/index.js.map +1 -1
  58. package/dist/theme/theme-provider.d.ts +22 -1
  59. package/dist/theme/theme-provider.d.ts.map +1 -1
  60. package/dist/theme/theme-provider.js +59 -20
  61. package/dist/theme/theme-provider.js.map +1 -1
  62. package/package.json +5 -5
  63. package/tailwind-preset.css +78 -0
  64. package/dist/components/toast.d.ts +0 -16
  65. package/dist/components/toast.d.ts.map +0 -1
  66. package/dist/components/toast.js +0 -35
  67. package/dist/components/toast.js.map +0 -1
  68. package/dist/components/toaster.d.ts +0 -3
  69. package/dist/components/toaster.d.ts.map +0 -1
  70. package/dist/components/toaster.js +0 -24
  71. package/dist/components/toaster.js.map +0 -1
  72. package/dist/hooks/use-toast.d.ts +0 -45
  73. package/dist/hooks/use-toast.d.ts.map +0 -1
  74. package/dist/hooks/use-toast.js +0 -129
  75. package/dist/hooks/use-toast.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -2,67 +2,71 @@
2
2
  * {@include ../README.md}
3
3
  * @packageDocumentation
4
4
  */
5
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from './components/accordion';
6
- export { Alert, AlertTitle, AlertDescription } from './components/alert';
5
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from './components/accordion';
6
+ export { Alert, AlertDescription, AlertTitle } from './components/alert';
7
7
  export { AspectRatio } from './components/aspect-ratio';
8
8
  export { Badge, badgeVariants, type BadgeProps } from './components/badge';
9
- export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, } from './components/breadcrumb';
9
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from './components/breadcrumb';
10
10
  export { Button, buttonVariants, type ButtonProps } from './components/button';
11
11
  export { Calendar, type CalendarProps } from './components/calendar';
12
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, } from './components/card';
12
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from './components/card';
13
13
  export { Checkbox } from './components/checkbox';
14
14
  export { ComboboxDemo } from './components/combobox';
15
- export { Collapsible, CollapsibleTrigger, CollapsibleContent, } from './components/collapsible';
16
- export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from './components/command';
17
- export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, } from './components/context-menu';
18
- export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './components/dialog';
19
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, DrawerHandle, } from './components/drawer';
20
- export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from './components/dropdown-menu';
15
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger, } from './components/collapsible';
16
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from './components/command';
17
+ export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, } from './components/context-menu';
18
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './components/dialog';
19
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, } from './components/drawer';
20
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from './components/dropdown-menu';
21
21
  export { EditableText } from './components/editable-text';
22
22
  export { ErrorBoundary } from './components/error-boundary';
23
23
  export { ErrorPane } from './components/error-pane';
24
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from './components/form';
24
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, } from './components/form';
25
25
  export { Input } from './components/input';
26
26
  export { Label } from './components/label';
27
- export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarShortcut, } from './components/menu-bar';
28
- export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from './components/pagination';
29
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, } from './components/popover';
27
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, } from './components/menu-bar';
28
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from './components/pagination';
29
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, } from './components/popover';
30
30
  export { ProgressModal } from './components/progress-modal';
31
31
  export { Progress } from './components/progress';
32
32
  export { RadioGroup, RadioGroupItem } from './components/radio-group';
33
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './components/resizable';
33
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from './components/resizable';
34
+ export type { ResizablePanelOrientation, ResizablePanelHandle, } from './components/resizable';
35
+ export { RunButton, type RunButtonProps } from './components/run-button';
34
36
  export { TabStrip, type TabDescriptor, type TabStripProps, } from './components/tab-strip';
35
37
  export { ScrollableRow } from './components/scrollable-row';
36
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './components/select';
38
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from './components/select';
37
39
  export { ScrollArea, ScrollBar } from './components/scroll-area';
38
40
  export { Separator } from './components/separator';
39
- export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, } from './components/sheet';
40
- export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarInput, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from './components/sidebar';
41
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, } from './components/sheet';
42
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from './components/sidebar';
41
43
  export { SkeletonPane } from './components/skeleton-pane';
42
44
  export { Skeleton } from './components/skeleton';
43
45
  export { Slider } from './components/slider';
44
46
  export { SpinnerPane } from './components/spinner-pane';
45
47
  export { Spinner } from './components/spinner';
46
48
  export { Switch } from './components/switch';
47
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './components/table';
48
- export { Tabs, TabsList, TabsTrigger, TabsContent } from './components/tabs';
49
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from './components/table';
50
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/tabs';
49
51
  export { Textarea } from './components/textarea';
50
52
  export { ThemeSwitch } from './components/theme-switch';
51
- export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, } from './components/toast';
52
- export { Toaster } from './components/toaster';
53
53
  export { ToggleGroup, ToggleGroupItem } from './components/toggle-group';
54
54
  export { Toggle, toggleVariants } from './components/toggle';
55
55
  export { CopyButton, type CopyButtonProps } from './components/copy-button';
56
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, } from './components/tooltip';
56
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from './components/tooltip';
57
57
  export { Tree, type TreeNodeData } from './components/tree';
58
- export { useToast, toast as legacyToast, reducer } from './hooks/use-toast';
59
58
  export { toast, type ExternalToast } from 'sonner';
60
59
  export { useAspectRatioDimensions, type Dimensions, type UseAspectRatioDimensionsProps, } from './hooks/useAspectRatioDimensions';
61
60
  export { useDisclosure, type UseDisclosureReturnValue, } from './hooks/useDisclosure';
62
- export { useRelativeCoordinates } from './hooks/useRelativeCoordinates';
61
+ export { useDebounce } from './hooks/useDebounce';
62
+ export { useDebouncedCallback } from './hooks/useDebouncedCallback';
63
+ export { useDebouncedValue } from './hooks/useDebouncedValue';
63
64
  export { useIsMobile } from './hooks/use-mobile';
64
- export { cn } from './lib/utils';
65
+ export { useRelativeCoordinates } from './hooks/useRelativeCoordinates';
65
66
  export { resolveFontSizeClass, type FontSizeToken } from './lib/fontSize';
66
- export { ThemeProvider, useTheme } from './theme/theme-provider';
67
+ export { cn } from './lib/utils';
68
+ export { DEFAULT_THEME, DEFAULT_THEME_STORAGE_KEY, getResolvedTheme, getTheme, getThemePreference, ThemeProvider, useTheme, type ResolvedTheme, type Theme, } from './theme/theme-provider';
67
69
  export { Slot } from '@radix-ui/react-slot';
70
+ export { Toaster } from './components/sonner';
71
+ export { HoverCard, HoverCardContent, HoverCardTrigger, } from './components/hover-card';
68
72
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAC,KAAK,EAAE,aAAa,EAAE,KAAK,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,MAAM,EAAE,cAAc,EAAE,KAAK,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAC,QAAQ,EAAE,KAAK,aAAa,EAAC,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,uBAAuB,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C,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAC,sBAAsB,EAAC,MAAM,gCAAgC,CAAC;AAGtE,OAAO,EAAC,oBAAoB,EAAE,KAAK,aAAa,EAAC,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAC,EAAE,EAAC,MAAM,aAAa,CAAC;AAG/B,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,KAAK,GACX,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAC,IAAI,EAAC,MAAM,sBAAsB,CAAC;AAE1C,OAAO,EAAC,OAAO,EAAC,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -3,71 +3,74 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
  // Components
6
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent, } from './components/accordion';
7
- export { Alert, AlertTitle, AlertDescription } from './components/alert';
6
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from './components/accordion';
7
+ export { Alert, AlertDescription, AlertTitle } from './components/alert';
8
8
  export { AspectRatio } from './components/aspect-ratio';
9
9
  export { Badge, badgeVariants } from './components/badge';
10
- export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, } from './components/breadcrumb';
10
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from './components/breadcrumb';
11
11
  export { Button, buttonVariants } from './components/button';
12
12
  export { Calendar } from './components/calendar';
13
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, } from './components/card';
13
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from './components/card';
14
14
  export { Checkbox } from './components/checkbox';
15
15
  export { ComboboxDemo } from './components/combobox';
16
- export { Collapsible, CollapsibleTrigger, CollapsibleContent, } from './components/collapsible';
17
- export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from './components/command';
18
- export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, } from './components/context-menu';
19
- export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './components/dialog';
20
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, DrawerHandle, } from './components/drawer';
21
- export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from './components/dropdown-menu';
16
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger, } from './components/collapsible';
17
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from './components/command';
18
+ export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, } from './components/context-menu';
19
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './components/dialog';
20
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, } from './components/drawer';
21
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from './components/dropdown-menu';
22
22
  export { EditableText } from './components/editable-text';
23
23
  export { ErrorBoundary } from './components/error-boundary';
24
24
  export { ErrorPane } from './components/error-pane';
25
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from './components/form';
25
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, } from './components/form';
26
26
  export { Input } from './components/input';
27
27
  export { Label } from './components/label';
28
- export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarShortcut, } from './components/menu-bar';
29
- export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from './components/pagination';
30
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, } from './components/popover';
28
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, } from './components/menu-bar';
29
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from './components/pagination';
30
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, } from './components/popover';
31
31
  export { ProgressModal } from './components/progress-modal';
32
32
  export { Progress } from './components/progress';
33
33
  export { RadioGroup, RadioGroupItem } from './components/radio-group';
34
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './components/resizable';
34
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from './components/resizable';
35
+ export { RunButton } from './components/run-button';
35
36
  export { TabStrip, } from './components/tab-strip';
36
37
  export { ScrollableRow } from './components/scrollable-row';
37
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './components/select';
38
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from './components/select';
38
39
  export { ScrollArea, ScrollBar } from './components/scroll-area';
39
40
  export { Separator } from './components/separator';
40
- export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, } from './components/sheet';
41
- export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarInput, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from './components/sidebar';
41
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, } from './components/sheet';
42
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, } from './components/sidebar';
42
43
  export { SkeletonPane } from './components/skeleton-pane';
43
44
  export { Skeleton } from './components/skeleton';
44
45
  export { Slider } from './components/slider';
45
46
  export { SpinnerPane } from './components/spinner-pane';
46
47
  export { Spinner } from './components/spinner';
47
48
  export { Switch } from './components/switch';
48
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './components/table';
49
- export { Tabs, TabsList, TabsTrigger, TabsContent } from './components/tabs';
49
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from './components/table';
50
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/tabs';
50
51
  export { Textarea } from './components/textarea';
51
52
  export { ThemeSwitch } from './components/theme-switch';
52
- export { ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, } from './components/toast';
53
- export { Toaster } from './components/toaster';
54
53
  export { ToggleGroup, ToggleGroupItem } from './components/toggle-group';
55
54
  export { Toggle, toggleVariants } from './components/toggle';
56
55
  export { CopyButton } from './components/copy-button';
57
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, } from './components/tooltip';
56
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from './components/tooltip';
58
57
  export { Tree } from './components/tree';
59
58
  // Hooks
60
- export { useToast, toast as legacyToast, reducer } from './hooks/use-toast';
61
59
  export { toast } from 'sonner';
62
60
  export { useAspectRatioDimensions, } from './hooks/useAspectRatioDimensions';
63
61
  export { useDisclosure, } from './hooks/useDisclosure';
64
- export { useRelativeCoordinates } from './hooks/useRelativeCoordinates';
62
+ export { useDebounce } from './hooks/useDebounce';
63
+ export { useDebouncedCallback } from './hooks/useDebouncedCallback';
64
+ export { useDebouncedValue } from './hooks/useDebouncedValue';
65
65
  export { useIsMobile } from './hooks/use-mobile';
66
+ export { useRelativeCoordinates } from './hooks/useRelativeCoordinates';
66
67
  // Utilities
67
- export { cn } from './lib/utils';
68
68
  export { resolveFontSizeClass } from './lib/fontSize';
69
+ export { cn } from './lib/utils';
69
70
  // Theme
70
- export { ThemeProvider, useTheme } from './theme/theme-provider';
71
+ export { DEFAULT_THEME, DEFAULT_THEME_STORAGE_KEY, getResolvedTheme, getTheme, getThemePreference, ThemeProvider, useTheme, } from './theme/theme-provider';
71
72
  // Re-export from Radix
72
73
  export { Slot } from '@radix-ui/react-slot';
74
+ export { Toaster } from './components/sonner';
75
+ export { HoverCard, HoverCardContent, HoverCardTrigger, } from './components/hover-card';
73
76
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,aAAa;AACb,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAC,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAC,KAAK,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,MAAM,EAAE,cAAc,EAAmB,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAC,QAAQ,E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AAM,sBAAsB,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\n\n// Components\nexport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from './components/accordion';\n\nexport {Alert, AlertTitle, AlertDescription} from './components/alert';\n\nexport {AspectRatio} from './components/aspect-ratio';\n\nexport {Badge, badgeVariants, type BadgeProps} from './components/badge';\n\nexport {\n Breadcrumb,\n BreadcrumbList,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbPage,\n BreadcrumbSeparator,\n BreadcrumbEllipsis,\n} from './components/breadcrumb';\n\nexport {Button, buttonVariants, type ButtonProps} from './components/button';\n\nexport {Calendar, type CalendarProps} from './components/calendar';\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n} from './components/card';\n\nexport {Checkbox} from './components/checkbox';\n\nexport {ComboboxDemo} from './components/combobox';\n\nexport {\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n} from './components/collapsible';\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n} from './components/command';\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n} from './components/context-menu';\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './components/dialog';\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n DrawerHandle,\n} from './components/drawer';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './components/dropdown-menu';\n\nexport {EditableText} from './components/editable-text';\n\nexport {ErrorBoundary} from './components/error-boundary';\n\nexport {ErrorPane} from './components/error-pane';\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n} from './components/form';\n\nexport {Input} from './components/input';\n\nexport {Label} from './components/label';\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarShortcut,\n} from './components/menu-bar';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n} from './components/pagination';\n\nexport {\n Popover,\n PopoverTrigger,\n PopoverContent,\n PopoverAnchor,\n} from './components/popover';\n\nexport {ProgressModal} from './components/progress-modal';\n\nexport {Progress} from './components/progress';\n\nexport {RadioGroup, RadioGroupItem} from './components/radio-group';\n\nexport {\n ResizablePanelGroup,\n ResizablePanel,\n ResizableHandle,\n} from './components/resizable';\n\nexport {\n TabStrip,\n type TabDescriptor,\n type TabStripProps,\n} from './components/tab-strip';\n\nexport {ScrollableRow} from './components/scrollable-row';\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n} from './components/select';\n\nexport {ScrollArea, ScrollBar} from './components/scroll-area';\n\nexport {Separator} from './components/separator';\n\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n} from './components/sheet';\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarInput,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from './components/sidebar';\n\nexport {SkeletonPane} from './components/skeleton-pane';\n\nexport {Skeleton} from './components/skeleton';\n\nexport {Slider} from './components/slider';\n\nexport {SpinnerPane} from './components/spinner-pane';\n\nexport {Spinner} from './components/spinner';\n\nexport {Switch} from './components/switch';\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n} from './components/table';\n\nexport {Tabs, TabsList, TabsTrigger, TabsContent} from './components/tabs';\n\nexport {Textarea} from './components/textarea';\n\nexport {ThemeSwitch} from './components/theme-switch';\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n} from './components/toast';\n\nexport {Toaster} from './components/toaster';\n\nexport {ToggleGroup, ToggleGroupItem} from './components/toggle-group';\n\nexport {Toggle, toggleVariants} from './components/toggle';\n\nexport {CopyButton, type CopyButtonProps} from './components/copy-button';\n\nexport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n TooltipProvider,\n} from './components/tooltip';\n\nexport {Tree, type TreeNodeData} from './components/tree';\n\n// Hooks\nexport {useToast, toast as legacyToast, reducer} from './hooks/use-toast';\nexport {toast, type ExternalToast} from 'sonner';\n\nexport {\n useAspectRatioDimensions,\n type Dimensions,\n type UseAspectRatioDimensionsProps,\n} from './hooks/useAspectRatioDimensions';\n\nexport {\n useDisclosure,\n type UseDisclosureReturnValue,\n} from './hooks/useDisclosure';\n\nexport {useRelativeCoordinates} from './hooks/useRelativeCoordinates';\nexport {useIsMobile} from './hooks/use-mobile';\n\n// Utilities\nexport {cn} from './lib/utils';\nexport {resolveFontSizeClass, type FontSizeToken} from './lib/fontSize';\n\n// Theme\nexport {ThemeProvider, useTheme} from './theme/theme-provider';\n\n// Re-export from Radix\nexport {Slot} from '@radix-ui/react-slot';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,aAAa;AACb,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAC,KAAK,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAC,MAAM,EAAE,cAAc,EAAmB,MAAM,qBAAqB,CAAC;AAE7E,OAAO,EAAC,QAAQ,EAAqB,MAAM,uBAAuB,CAAC;AAEnE,OAAO,EACL,IAAI,EACJ,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,GACV,MAAM,mBAAmB,CAAC;AAE3B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jB,MAAM,yBAAyB,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\n\n// Components\nexport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from './components/accordion';\n\nexport {Alert, AlertDescription, AlertTitle} from './components/alert';\n\nexport {AspectRatio} from './components/aspect-ratio';\n\nexport {Badge, badgeVariants, type BadgeProps} from './components/badge';\n\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbPage,\n BreadcrumbSeparator,\n} from './components/breadcrumb';\n\nexport {Button, buttonVariants, type ButtonProps} from './components/button';\n\nexport {Calendar, type CalendarProps} from './components/calendar';\n\nexport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardHeader,\n CardTitle,\n} from './components/card';\n\nexport {Checkbox} from './components/checkbox';\n\nexport {ComboboxDemo} from './components/combobox';\n\nexport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from './components/collapsible';\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n} from './components/command';\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n} from './components/context-menu';\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n} from './components/dialog';\n\nexport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHandle,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n} from './components/drawer';\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from './components/dropdown-menu';\n\nexport {EditableText} from './components/editable-text';\n\nexport {ErrorBoundary} from './components/error-boundary';\n\nexport {ErrorPane} from './components/error-pane';\n\nexport {\n Form,\n FormControl,\n FormDescription,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n useFormField,\n} from './components/form';\n\nexport {Input} from './components/input';\n\nexport {Label} from './components/label';\n\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n MenubarGroup,\n MenubarItem,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n} from './components/menu-bar';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n} from './components/pagination';\n\nexport {\n Popover,\n PopoverAnchor,\n PopoverContent,\n PopoverTrigger,\n} from './components/popover';\n\nexport {ProgressModal} from './components/progress-modal';\n\nexport {Progress} from './components/progress';\n\nexport {RadioGroup, RadioGroupItem} from './components/radio-group';\n\nexport {\n ResizableHandle,\n ResizablePanel,\n ResizablePanelGroup,\n} from './components/resizable';\nexport type {\n ResizablePanelOrientation,\n ResizablePanelHandle,\n} from './components/resizable';\n\nexport {RunButton, type RunButtonProps} from './components/run-button';\n\nexport {\n TabStrip,\n type TabDescriptor,\n type TabStripProps,\n} from './components/tab-strip';\n\nexport {ScrollableRow} from './components/scrollable-row';\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n} from './components/select';\n\nexport {ScrollArea, ScrollBar} from './components/scroll-area';\n\nexport {Separator} from './components/separator';\n\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetOverlay,\n SheetPortal,\n SheetTitle,\n SheetTrigger,\n} from './components/sheet';\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from './components/sidebar';\n\nexport {SkeletonPane} from './components/skeleton-pane';\n\nexport {Skeleton} from './components/skeleton';\n\nexport {Slider} from './components/slider';\n\nexport {SpinnerPane} from './components/spinner-pane';\n\nexport {Spinner} from './components/spinner';\n\nexport {Switch} from './components/switch';\n\nexport {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n} from './components/table';\n\nexport {Tabs, TabsContent, TabsList, TabsTrigger} from './components/tabs';\n\nexport {Textarea} from './components/textarea';\n\nexport {ThemeSwitch} from './components/theme-switch';\n\nexport {ToggleGroup, ToggleGroupItem} from './components/toggle-group';\n\nexport {Toggle, toggleVariants} from './components/toggle';\n\nexport {CopyButton, type CopyButtonProps} from './components/copy-button';\n\nexport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from './components/tooltip';\n\nexport {Tree, type TreeNodeData} from './components/tree';\n\n// Hooks\nexport {toast, type ExternalToast} from 'sonner';\n\nexport {\n useAspectRatioDimensions,\n type Dimensions,\n type UseAspectRatioDimensionsProps,\n} from './hooks/useAspectRatioDimensions';\n\nexport {\n useDisclosure,\n type UseDisclosureReturnValue,\n} from './hooks/useDisclosure';\n\nexport {useDebounce} from './hooks/useDebounce';\nexport {useDebouncedCallback} from './hooks/useDebouncedCallback';\nexport {useDebouncedValue} from './hooks/useDebouncedValue';\n\nexport {useIsMobile} from './hooks/use-mobile';\nexport {useRelativeCoordinates} from './hooks/useRelativeCoordinates';\n\n// Utilities\nexport {resolveFontSizeClass, type FontSizeToken} from './lib/fontSize';\nexport {cn} from './lib/utils';\n\n// Theme\nexport {\n DEFAULT_THEME,\n DEFAULT_THEME_STORAGE_KEY,\n getResolvedTheme,\n getTheme,\n getThemePreference,\n ThemeProvider,\n useTheme,\n type ResolvedTheme,\n type Theme,\n} from './theme/theme-provider';\n\n// Re-export from Radix\nexport {Slot} from '@radix-ui/react-slot';\n\nexport {Toaster} from './components/sonner';\n\nexport {\n HoverCard,\n HoverCardContent,\n HoverCardTrigger,\n} from './components/hover-card';\n"]}
@@ -2,7 +2,14 @@
2
2
  * Available theme options
3
3
  * @typedef {'dark' | 'light' | 'system'} Theme
4
4
  */
5
- type Theme = 'dark' | 'light' | 'system';
5
+ export type Theme = 'dark' | 'light' | 'system';
6
+ export type ResolvedTheme = Exclude<Theme, 'system'>;
7
+ export declare const DEFAULT_THEME: Theme;
8
+ export declare const DEFAULT_THEME_STORAGE_KEY = "sqlrooms-ui-theme";
9
+ type GetThemeOptions = {
10
+ defaultTheme?: Theme;
11
+ storageKey?: string;
12
+ };
6
13
  /**
7
14
  * Props for the ThemeProvider component
8
15
  * @interface ThemeProviderProps
@@ -23,8 +30,22 @@ type ThemeProviderProps = {
23
30
  */
24
31
  type ThemeProviderState = {
25
32
  theme: Theme;
33
+ resolvedTheme: ResolvedTheme;
26
34
  setTheme: (theme: Theme) => void;
27
35
  };
36
+ /**
37
+ * Returns the currently stored theme preference without requiring React context.
38
+ * Falls back to the provided default when storage is unavailable or invalid.
39
+ */
40
+ export declare function getThemePreference({ defaultTheme, storageKey, }?: GetThemeOptions): Theme;
41
+ /**
42
+ * Resolves a theme preference to the concrete light/dark theme currently in use.
43
+ */
44
+ export declare function getResolvedTheme(theme: Theme): ResolvedTheme;
45
+ /**
46
+ * Returns the concrete light/dark theme currently in use.
47
+ */
48
+ export declare function getTheme(options?: GetThemeOptions): ResolvedTheme;
28
49
  /**
29
50
  * ThemeProvider component that manages and provides theme context to its children.
30
51
  * Handles system theme detection and persistence of theme preference.
@@ -1 +1 @@
1
- {"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../src/theme/theme-provider.tsx"],"names":[],"mappings":"AAQA;;;GAGG;AACH,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEzC;;;;;;GAMG;AACH,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;GAKG;AACH,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC,CAAC;AASF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAAuB,EACvB,UAAgC,EAChC,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAqDpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,QAAQ,0BAOpB,CAAC"}
1
+ {"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../../src/theme/theme-provider.tsx"],"names":[],"mappings":"AAQA;;;GAGG;AACH,M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} from "react/jsx-runtime";
2
2
  import { createContext, useContext, useEffect, useLayoutEffect, useState, } from 'react';
3
+ export const DEFAULT_THEME = 'system';
4
+ export const DEFAULT_THEME_STORAGE_KEY = 'sqlrooms-ui-theme';
3
5
  const initialState = {
4
- theme: 'system',
6
+ theme: DEFAULT_THEME,
7
+ resolvedTheme: getResolvedTheme(DEFAULT_THEME),
5
8
  setTheme: () => null,
6
9
  };
7
10
  const ThemeProviderContext = createContext(initialState);
11
+ function isTheme(value) {
12
+ return value === 'light' || value === 'dark' || value === 'system';
13
+ }
14
+ /**
15
+ * Returns the currently stored theme preference without requiring React context.
16
+ * Falls back to the provided default when storage is unavailable or invalid.
17
+ */
18
+ export function getThemePreference({ defaultTheme = DEFAULT_THEME, storageKey = DEFAULT_THEME_STORAGE_KEY, } = {}) {
19
+ if (typeof window === 'undefined')
20
+ return defaultTheme;
21
+ try {
22
+ const storedTheme = window.localStorage.getItem(storageKey);
23
+ return isTheme(storedTheme) ? storedTheme : defaultTheme;
24
+ }
25
+ catch {
26
+ return defaultTheme;
27
+ }
28
+ }
29
+ /**
30
+ * Resolves a theme preference to the concrete light/dark theme currently in use.
31
+ */
32
+ export function getResolvedTheme(theme) {
33
+ if (theme !== 'system')
34
+ return theme;
35
+ if (typeof window === 'undefined')
36
+ return 'light';
37
+ if (typeof window.matchMedia !== 'function')
38
+ return 'light';
39
+ return window.matchMedia('(prefers-color-scheme: dark)').matches
40
+ ? 'dark'
41
+ : 'light';
42
+ }
43
+ /**
44
+ * Returns the concrete light/dark theme currently in use.
45
+ */
46
+ export function getTheme(options = {}) {
47
+ return getResolvedTheme(getThemePreference(options));
48
+ }
8
49
  /**
9
50
  * ThemeProvider component that manages and provides theme context to its children.
10
51
  * Handles system theme detection and persistence of theme preference.
@@ -30,17 +71,9 @@ const ThemeProviderContext = createContext(initialState);
30
71
  * }
31
72
  * ```
32
73
  */
33
- export function ThemeProvider({ children, defaultTheme = 'system', storageKey = 'sqlrooms-ui-theme', ...props }) {
34
- const [theme, setTheme] = useState(() => {
35
- if (typeof window === 'undefined')
36
- return defaultTheme;
37
- try {
38
- return window.localStorage.getItem(storageKey) || defaultTheme;
39
- }
40
- catch {
41
- return defaultTheme;
42
- }
43
- });
74
+ export function ThemeProvider({ children, defaultTheme = DEFAULT_THEME, storageKey = DEFAULT_THEME_STORAGE_KEY, ...props }) {
75
+ const [theme, setTheme] = useState(() => getThemePreference({ defaultTheme, storageKey }));
76
+ const [resolvedTheme, setResolvedTheme] = useState(() => getResolvedTheme(theme));
44
77
  // Apply theme class before paint to avoid a light-theme flash on initial load.
45
78
  // (useLayoutEffect on the client, fall back to useEffect in non-DOM environments)
46
79
  const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
@@ -48,19 +81,25 @@ export function ThemeProvider({ children, defaultTheme = 'system', storageKey =
48
81
  if (typeof window === 'undefined')
49
82
  return;
50
83
  const root = window.document.documentElement;
84
+ const resolved = getResolvedTheme(theme);
51
85
  root.classList.remove('light', 'dark');
52
- if (theme === 'system') {
53
- const systemTheme = window.matchMedia('(prefers-color-scheme: dark)')
54
- .matches
55
- ? 'dark'
56
- : 'light';
57
- root.classList.add(systemTheme);
58
- return;
86
+ root.classList.add(resolved);
87
+ setResolvedTheme(resolved);
88
+ if (theme === 'system' && typeof window.matchMedia === 'function') {
89
+ const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
90
+ const listener = () => {
91
+ const next = getResolvedTheme(theme);
92
+ root.classList.remove('light', 'dark');
93
+ root.classList.add(next);
94
+ setResolvedTheme(next);
95
+ };
96
+ mediaQuery.addEventListener('change', listener);
97
+ return () => mediaQuery.removeEventListener('change', listener);
59
98
  }
60
- root.classList.add(theme);
61
99
  }, [theme]);
62
100
  const value = {
63
101
  theme,
102
+ resolvedTheme,
64
103
  setTheme: (theme) => {
65
104
  if (typeof window !== 'undefined') {
66
105
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"theme-provider.js","sourceRoot":"","sources":["../../src/theme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OAAO;gBACR,CAAC,CAAC,MAAM;gBACR,CAAC,CAAC,OAAO,CAAC;YAEZ,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAChC,OAAO;QACT,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,MAAM,KAAK,GAAG;QACZ,KAAK;QACL,QAAQ,EAAE,CAAC,KAAY,EAAE,EAAE;YACzB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;gBAClC,IAAI,CAAC;oBACH,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;gBACjD,CAAC;gBAAC,MAAM,CAAC;oBACP,mDAAmD;gBACrD,CAAC;YACH,CAAC;YACD,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;KACF,CAAC;IAEF,OAAO,CACL,KAAC,oBAAoB,CAAC,QAAQ,OAAK,KAAK,EAAE,KAAK,EAAE,KAAK,YACnD,QAAQ,GACqB,CACjC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAEjD,IAAI,OAAO,KAAK,SAAS;QACvB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAElE,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n useEffect,\n useLayoutEffect,\n useState,\n} from 'react';\n\n/**\n * Available theme options\n * @typedef {'dark' | 'light' | 'system'} Theme\n */\ntype Theme = 'dark' | 'light' | 'system';\n\n/**\n * Props for the ThemeProvider component\n * @interface ThemeProviderProps\n * @property {React.ReactNode} children - Child components that will have access to the theme context\n * @property {Theme} [defaultTheme='system'] - Initial theme to use if none is stored\n * @property {string} [storageKey='sqlrooms-ui-theme'] - Local storage key to persist theme preference\n */\ntype ThemeProviderProps = {\n children: React.ReactNode;\n defaultTheme?: Theme;\n storageKey?: string;\n};\n\n/**\n * Theme context state\n * @interface ThemeProviderState\n * @property {Theme} theme - Current active theme\n * @property {(theme: Theme) => void} setTheme - Function to update the current theme\n */\ntype ThemeProviderState = {\n theme: Theme;\n setTheme: (theme: Theme) => void;\n};\n\nconst initialState: ThemeProviderState = {\n theme: 'system',\n setTheme: () => null,\n};\n\nconst ThemeProviderContext = createContext<ThemeProviderState>(initialState);\n\n/**\n * ThemeProvider component that manages and provides theme context to its children.\n * Handles system theme detection and persistence of theme preference.\n *\n * @example\n * ```tsx\n * // Basic usage with default settings\n * function App() {\n * return (\n * <ThemeProvider>\n * <YourApp />\n * </ThemeProvider>\n * );\n * }\n *\n * // Custom default theme and storage key\n * function App() {\n * return (\n * <ThemeProvider defaultTheme=\"dark\" storageKey=\"my-app-theme\">\n * <YourApp />\n * </ThemeProvider>\n * );\n * }\n * ```\n */\nexport function ThemeProvider({\n children,\n defaultTheme = 'system',\n storageKey = 'sqlrooms-ui-theme',\n ...props\n}: ThemeProviderProps) {\n const [theme, setTheme] = useState<Theme>(() => {\n if (typeof window === 'undefined') return defaultTheme;\n try {\n return (window.localStorage.getItem(storageKey) as Theme) || defaultTheme;\n } catch {\n return defaultTheme;\n }\n });\n\n // Apply theme class before paint to avoid a light-theme flash on initial load.\n // (useLayoutEffect on the client, fall back to useEffect in non-DOM environments)\n const useIsomorphicLayoutEffect =\n typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n\n useIsomorphicLayoutEffect(() => {\n if (typeof window === 'undefined') return;\n const root = window.document.documentElement;\n\n root.classList.remove('light', 'dark');\n\n if (theme === 'system') {\n const systemTheme = window.matchMedia('(prefers-color-scheme: dark)')\n .matches\n ? 'dark'\n : 'light';\n\n root.classList.add(systemTheme);\n return;\n }\n\n root.classList.add(theme);\n }, [theme]);\n\n const value = {\n theme,\n setTheme: (theme: Theme) => {\n if (typeof window !== 'undefined') {\n try {\n window.localStorage.setItem(storageKey, theme);\n } catch {\n // ignore (e.g. SSR, private mode, blocked storage)\n }\n }\n setTheme(theme);\n },\n };\n\n return (\n <ThemeProviderContext.Provider {...props} value={value}>\n {children}\n </ThemeProviderContext.Provider>\n );\n}\n\n/**\n * Hook to access the current theme and theme setter function.\n * Must be used within a ThemeProvider component.\n *\n * @example\n * ```tsx\n * import { Button } from '@sqlrooms/ui';\n *\n * function ThemeToggle() {\n * const { theme, setTheme } = useTheme();\n * const isDark = theme === 'dark';\n *\n * return (\n * <Button\n * variant=\"outline\"\n * size=\"sm\"\n * onClick={() => setTheme(isDark ? 'light' : 'dark')}\n * >\n * {isDark ? '☀️ Light' : '🌙 Dark'}\n * </Button>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * import { ThemeSwitch } from '@sqlrooms/ui';\n *\n * function AppHeader() {\n * return (\n * <nav className=\"border-b\">\n * <div className=\"flex h-16 items-center px-4\">\n * <div className=\"ml-auto\">\n * <ThemeSwitch />\n * </div>\n * </div>\n * </nav>\n * );\n * }\n * ```\n *\n * @returns {ThemeProviderState} Object containing current theme and setTheme function\n * @throws {Error} If used outside of a ThemeProvider\n */\nexport const useTheme = () => {\n const context = useContext(ThemeProviderContext);\n\n if (context === undefined)\n throw new Error('useTheme must be used within a ThemeProvider');\n\n return context;\n};\n"]}
1
+ {"version":3,"file":"theme-provider.js","sourceRoot":"","sources":["../../src/theme/theme-provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,SAAS,EACT,eAAe,EACf,QAAQ,GACT,MAAM,OAAO,CAAC;AASf,MAAM,CAAC,MAAM,aAAa,GAAU,QAAQ,CAAC;AAC7C,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC;AAgC7D,MAAM,YAAY,GAAuB;IACvC,KAAK,EAA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OAAO,EAAE,MAAM,CAAC,CAAC;gBACvC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACzB,gBAAgB,CAAC,IAAI,CAAC,CAAC;YACzB,CAAC,CAAC;YACF,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;YAChD,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAClE,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,MAAM,KAAK,GAAG;QACZ,KAAK;QACL,aAAa;QACb,QAAQ,EAAE,CAAC,KAAY,EAAE,EAAE;YACzB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;gBAClC,IAAI,CAAC;oBACH,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;gBACjD,CAAC;gBAAC,MAAM,CAAC;oBACP,mDAAmD;gBACrD,CAAC;YACH,CAAC;YACD,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;KACF,CAAC;IAEF,OAAO,CACL,KAAC,oBAAoB,CAAC,QAAQ,OAAK,KAAK,EAAE,KAAK,EAAE,KAAK,YACnD,QAAQ,GACqB,CACjC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IAC3B,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;IAEjD,IAAI,OAAO,KAAK,SAAS;QACvB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAElE,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n useEffect,\n useLayoutEffect,\n useState,\n} from 'react';\n\n/**\n * Available theme options\n * @typedef {'dark' | 'light' | 'system'} Theme\n */\nexport type Theme = 'dark' | 'light' | 'system';\nexport type ResolvedTheme = Exclude<Theme, 'system'>;\n\nexport const DEFAULT_THEME: Theme = 'system';\nexport const DEFAULT_THEME_STORAGE_KEY = 'sqlrooms-ui-theme';\n\ntype GetThemeOptions = {\n defaultTheme?: Theme;\n storageKey?: string;\n};\n\n/**\n * Props for the ThemeProvider component\n * @interface ThemeProviderProps\n * @property {React.ReactNode} children - Child components that will have access to the theme context\n * @property {Theme} [defaultTheme='system'] - Initial theme to use if none is stored\n * @property {string} [storageKey='sqlrooms-ui-theme'] - Local storage key to persist theme preference\n */\ntype ThemeProviderProps = {\n children: React.ReactNode;\n defaultTheme?: Theme;\n storageKey?: string;\n};\n\n/**\n * Theme context state\n * @interface ThemeProviderState\n * @property {Theme} theme - Current active theme\n * @property {(theme: Theme) => void} setTheme - Function to update the current theme\n */\ntype ThemeProviderState = {\n theme: Theme;\n resolvedTheme: ResolvedTheme;\n setTheme: (theme: Theme) => void;\n};\n\nconst initialState: ThemeProviderState = {\n theme: DEFAULT_THEME,\n resolvedTheme: getResolvedTheme(DEFAULT_THEME),\n setTheme: () => null,\n};\n\nconst ThemeProviderContext = createContext<ThemeProviderState>(initialState);\n\nfunction isTheme(value: string | null): value is Theme {\n return value === 'light' || value === 'dark' || value === 'system';\n}\n\n/**\n * Returns the currently stored theme preference without requiring React context.\n * Falls back to the provided default when storage is unavailable or invalid.\n */\nexport function getThemePreference({\n defaultTheme = DEFAULT_THEME,\n storageKey = DEFAULT_THEME_STORAGE_KEY,\n}: GetThemeOptions = {}): Theme {\n if (typeof window === 'undefined') return defaultTheme;\n\n try {\n const storedTheme = window.localStorage.getItem(storageKey);\n return isTheme(storedTheme) ? storedTheme : defaultTheme;\n } catch {\n return defaultTheme;\n }\n}\n\n/**\n * Resolves a theme preference to the concrete light/dark theme currently in use.\n */\nexport function getResolvedTheme(theme: Theme): ResolvedTheme {\n if (theme !== 'system') return theme;\n if (typeof window === 'undefined') return 'light';\n if (typeof window.matchMedia !== 'function') return 'light';\n\n return window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light';\n}\n\n/**\n * Returns the concrete light/dark theme currently in use.\n */\nexport function getTheme(options: GetThemeOptions = {}): ResolvedTheme {\n return getResolvedTheme(getThemePreference(options));\n}\n\n/**\n * ThemeProvider component that manages and provides theme context to its children.\n * Handles system theme detection and persistence of theme preference.\n *\n * @example\n * ```tsx\n * // Basic usage with default settings\n * function App() {\n * return (\n * <ThemeProvider>\n * <YourApp />\n * </ThemeProvider>\n * );\n * }\n *\n * // Custom default theme and storage key\n * function App() {\n * return (\n * <ThemeProvider defaultTheme=\"dark\" storageKey=\"my-app-theme\">\n * <YourApp />\n * </ThemeProvider>\n * );\n * }\n * ```\n */\nexport function ThemeProvider({\n children,\n defaultTheme = DEFAULT_THEME,\n storageKey = DEFAULT_THEME_STORAGE_KEY,\n ...props\n}: ThemeProviderProps) {\n const [theme, setTheme] = useState<Theme>(() =>\n getThemePreference({defaultTheme, storageKey}),\n );\n\n const [resolvedTheme, setResolvedTheme] = useState<ResolvedTheme>(() =>\n getResolvedTheme(theme),\n );\n\n // Apply theme class before paint to avoid a light-theme flash on initial load.\n // (useLayoutEffect on the client, fall back to useEffect in non-DOM environments)\n const useIsomorphicLayoutEffect =\n typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n\n useIsomorphicLayoutEffect(() => {\n if (typeof window === 'undefined') return;\n const root = window.document.documentElement;\n const resolved = getResolvedTheme(theme);\n\n root.classList.remove('light', 'dark');\n root.classList.add(resolved);\n setResolvedTheme(resolved);\n\n if (theme === 'system' && typeof window.matchMedia === 'function') {\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n const listener = () => {\n const next = getResolvedTheme(theme);\n root.classList.remove('light', 'dark');\n root.classList.add(next);\n setResolvedTheme(next);\n };\n mediaQuery.addEventListener('change', listener);\n return () => mediaQuery.removeEventListener('change', listener);\n }\n }, [theme]);\n\n const value = {\n theme,\n resolvedTheme,\n setTheme: (theme: Theme) => {\n if (typeof window !== 'undefined') {\n try {\n window.localStorage.setItem(storageKey, theme);\n } catch {\n // ignore (e.g. SSR, private mode, blocked storage)\n }\n }\n setTheme(theme);\n },\n };\n\n return (\n <ThemeProviderContext.Provider {...props} value={value}>\n {children}\n </ThemeProviderContext.Provider>\n );\n}\n\n/**\n * Hook to access the current theme and theme setter function.\n * Must be used within a ThemeProvider component.\n *\n * @example\n * ```tsx\n * import { Button } from '@sqlrooms/ui';\n *\n * function ThemeToggle() {\n * const { theme, setTheme } = useTheme();\n * const isDark = theme === 'dark';\n *\n * return (\n * <Button\n * variant=\"outline\"\n * size=\"sm\"\n * onClick={() => setTheme(isDark ? 'light' : 'dark')}\n * >\n * {isDark ? '☀️ Light' : '🌙 Dark'}\n * </Button>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * import { ThemeSwitch } from '@sqlrooms/ui';\n *\n * function AppHeader() {\n * return (\n * <nav className=\"border-b\">\n * <div className=\"flex h-16 items-center px-4\">\n * <div className=\"ml-auto\">\n * <ThemeSwitch />\n * </div>\n * </div>\n * </nav>\n * );\n * }\n * ```\n *\n * @returns {ThemeProviderState} Object containing current theme and setTheme function\n * @throws {Error} If used outside of a ThemeProvider\n */\nexport const useTheme = () => {\n const context = useContext(ThemeProviderContext);\n\n if (context === undefined)\n throw new Error('useTheme must be used within a ThemeProvider');\n\n return context;\n};\n"]}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sqlrooms/ui",
3
- "version": "0.29.0-rc.1",
3
+ "version": "0.29.0-rc.3",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "author": "SQLRooms Contributors",
7
7
  "license": "MIT",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/sqlrooms/sqlrooms.git"
10
+ "url": "git+https://github.com/sqlrooms/sqlrooms.git"
11
11
  },
12
12
  "files": [
13
13
  "dist",
@@ -37,6 +37,7 @@
37
37
  "@radix-ui/react-context-menu": "^2.2.16",
38
38
  "@radix-ui/react-dialog": "^1.1.15",
39
39
  "@radix-ui/react-dropdown-menu": "^2.1.16",
40
+ "@radix-ui/react-hover-card": "^1.1.15",
40
41
  "@radix-ui/react-label": "^2.1.7",
41
42
  "@radix-ui/react-menubar": "^1.1.16",
42
43
  "@radix-ui/react-popover": "^1.1.15",
@@ -49,7 +50,6 @@
49
50
  "@radix-ui/react-slot": "^1.2.3",
50
51
  "@radix-ui/react-switch": "^1.2.6",
51
52
  "@radix-ui/react-tabs": "^1.1.13",
52
- "@radix-ui/react-toast": "^1.2.15",
53
53
  "@radix-ui/react-toggle": "^1.1.10",
54
54
  "@radix-ui/react-toggle-group": "^1.1.11",
55
55
  "@radix-ui/react-tooltip": "^1.2.8",
@@ -61,7 +61,7 @@
61
61
  "lucide-react": "^0.556.0",
62
62
  "react-day-picker": "^8.10.1",
63
63
  "react-hook-form": "^7.63.0",
64
- "react-resizable-panels": "^3.0.6",
64
+ "react-resizable-panels": "^4.7.6",
65
65
  "sonner": "^2.0.7",
66
66
  "tailwind-merge": "^2.6.0",
67
67
  "tailwindcss-animate": "^1.0.7",
@@ -71,5 +71,5 @@
71
71
  "peerDependencies": {
72
72
  "tailwindcss": "^4.1.18"
73
73
  },
74
- "gitHead": "69f127fd34bd7f2ce3d75d6098dbf8c1f5ab50f3"
74
+ "gitHead": "089c926fc0cf71fc3bc7db4da8f3509f84485f94"
75
75
  }