@sqlrooms/ui 0.29.0-rc.0 → 0.29.0-rc.10

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 (114) hide show
  1. package/LICENSE.md +2 -1
  2. package/README.md +98 -4
  3. package/dist/components/accordion.d.ts +2 -2
  4. package/dist/components/accordion.d.ts.map +1 -1
  5. package/dist/components/accordion.js +3 -3
  6. package/dist/components/accordion.js.map +1 -1
  7. package/dist/components/alert.js +1 -1
  8. package/dist/components/alert.js.map +1 -1
  9. package/dist/components/card.js +1 -1
  10. package/dist/components/card.js.map +1 -1
  11. package/dist/components/combobox.d.ts +67 -1
  12. package/dist/components/combobox.d.ts.map +1 -1
  13. package/dist/components/combobox.js +58 -32
  14. package/dist/components/combobox.js.map +1 -1
  15. package/dist/components/editable-text.d.ts +2 -1
  16. package/dist/components/editable-text.d.ts.map +1 -1
  17. package/dist/components/editable-text.js +38 -11
  18. package/dist/components/editable-text.js.map +1 -1
  19. package/dist/components/error-pane.d.ts.map +1 -1
  20. package/dist/components/error-pane.js +2 -2
  21. package/dist/components/error-pane.js.map +1 -1
  22. package/dist/components/hover-card.d.ts +7 -0
  23. package/dist/components/hover-card.d.ts.map +1 -0
  24. package/dist/components/hover-card.js +15 -0
  25. package/dist/components/hover-card.js.map +1 -0
  26. package/dist/components/modifier-scroll-overlay.d.ts +16 -0
  27. package/dist/components/modifier-scroll-overlay.d.ts.map +1 -0
  28. package/dist/components/modifier-scroll-overlay.js +31 -0
  29. package/dist/components/modifier-scroll-overlay.js.map +1 -0
  30. package/dist/components/progress-modal.d.ts +2 -0
  31. package/dist/components/progress-modal.d.ts.map +1 -1
  32. package/dist/components/progress-modal.js +2 -2
  33. package/dist/components/progress-modal.js.map +1 -1
  34. package/dist/components/progress.d.ts.map +1 -1
  35. package/dist/components/progress.js.map +1 -1
  36. package/dist/components/resizable.d.ts +302 -20
  37. package/dist/components/resizable.d.ts.map +1 -1
  38. package/dist/components/resizable.js +12 -5
  39. package/dist/components/resizable.js.map +1 -1
  40. package/dist/components/run-button.d.ts +19 -0
  41. package/dist/components/run-button.d.ts.map +1 -0
  42. package/dist/components/run-button.js +17 -0
  43. package/dist/components/run-button.js.map +1 -0
  44. package/dist/components/settings-panel-header.d.ts +16 -0
  45. package/dist/components/settings-panel-header.d.ts.map +1 -0
  46. package/dist/components/settings-panel-header.js +9 -0
  47. package/dist/components/settings-panel-header.js.map +1 -0
  48. package/dist/components/sidebar.d.ts +3 -2
  49. package/dist/components/sidebar.d.ts.map +1 -1
  50. package/dist/components/sidebar.js +16 -12
  51. package/dist/components/sidebar.js.map +1 -1
  52. package/dist/components/sonner.d.ts +4 -0
  53. package/dist/components/sonner.d.ts.map +1 -0
  54. package/dist/components/sonner.js +37 -0
  55. package/dist/components/sonner.js.map +1 -0
  56. package/dist/components/switch.d.ts +5 -1
  57. package/dist/components/switch.d.ts.map +1 -1
  58. package/dist/components/switch.js +7 -2
  59. package/dist/components/switch.js.map +1 -1
  60. package/dist/components/tab-strip.d.ts +27 -7
  61. package/dist/components/tab-strip.d.ts.map +1 -1
  62. package/dist/components/tab-strip.js +165 -26
  63. package/dist/components/tab-strip.js.map +1 -1
  64. package/dist/components/textarea.d.ts +3 -0
  65. package/dist/components/textarea.d.ts.map +1 -1
  66. package/dist/components/textarea.js +87 -11
  67. package/dist/components/textarea.js.map +1 -1
  68. package/dist/components/theme-switch.d.ts.map +1 -1
  69. package/dist/components/theme-switch.js +3 -3
  70. package/dist/components/theme-switch.js.map +1 -1
  71. package/dist/components/tree.d.ts.map +1 -1
  72. package/dist/components/tree.js +4 -3
  73. package/dist/components/tree.js.map +1 -1
  74. package/dist/hooks/use-mobile.d.ts.map +1 -1
  75. package/dist/hooks/use-mobile.js +1 -0
  76. package/dist/hooks/use-mobile.js.map +1 -1
  77. package/dist/hooks/useCombobox.d.ts +33 -0
  78. package/dist/hooks/useCombobox.d.ts.map +1 -0
  79. package/dist/hooks/useCombobox.js +30 -0
  80. package/dist/hooks/useCombobox.js.map +1 -0
  81. package/dist/hooks/useDebounce.d.ts +33 -0
  82. package/dist/hooks/useDebounce.d.ts.map +1 -0
  83. package/dist/hooks/useDebounce.js +45 -0
  84. package/dist/hooks/useDebounce.js.map +1 -0
  85. package/dist/hooks/useDebouncedCallback.d.ts +45 -0
  86. package/dist/hooks/useDebouncedCallback.d.ts.map +1 -0
  87. package/dist/hooks/useDebouncedCallback.js +70 -0
  88. package/dist/hooks/useDebouncedCallback.js.map +1 -0
  89. package/dist/hooks/useDebouncedValue.d.ts +23 -0
  90. package/dist/hooks/useDebouncedValue.d.ts.map +1 -0
  91. package/dist/hooks/useDebouncedValue.js +41 -0
  92. package/dist/hooks/useDebouncedValue.js.map +1 -0
  93. package/dist/index.d.ts +36 -29
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.js +34 -28
  96. package/dist/index.js.map +1 -1
  97. package/dist/theme/theme-provider.d.ts +22 -1
  98. package/dist/theme/theme-provider.d.ts.map +1 -1
  99. package/dist/theme/theme-provider.js +59 -20
  100. package/dist/theme/theme-provider.js.map +1 -1
  101. package/package.json +16 -16
  102. package/tailwind-preset.css +78 -0
  103. package/dist/components/toast.d.ts +0 -16
  104. package/dist/components/toast.d.ts.map +0 -1
  105. package/dist/components/toast.js +0 -35
  106. package/dist/components/toast.js.map +0 -1
  107. package/dist/components/toaster.d.ts +0 -3
  108. package/dist/components/toaster.d.ts.map +0 -1
  109. package/dist/components/toaster.js +0 -24
  110. package/dist/components/toaster.js.map +0 -1
  111. package/dist/hooks/use-toast.d.ts +0 -45
  112. package/dist/hooks/use-toast.d.ts.map +0 -1
  113. package/dist/hooks/use-toast.js +0 -129
  114. package/dist/hooks/use-toast.js.map +0 -1
package/dist/index.js CHANGED
@@ -3,71 +3,77 @@
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
- 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';
15
+ export { Combobox, } from './components/combobox';
16
+ export { useCombobox, } from './hooks/useCombobox';
17
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger, } from './components/collapsible';
18
+ export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from './components/command';
19
+ export { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, } from './components/context-menu';
20
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from './components/dialog';
21
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHandle, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, } from './components/drawer';
22
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from './components/dropdown-menu';
22
23
  export { EditableText } from './components/editable-text';
23
24
  export { ErrorBoundary } from './components/error-boundary';
24
25
  export { ErrorPane } from './components/error-pane';
25
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, } from './components/form';
26
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, } from './components/form';
26
27
  export { Input } from './components/input';
28
+ export { SettingsPanelHeader, } from './components/settings-panel-header';
27
29
  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';
30
+ export { ModifierScrollOverlay, } from './components/modifier-scroll-overlay';
31
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, } from './components/menu-bar';
32
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from './components/pagination';
33
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, } from './components/popover';
31
34
  export { ProgressModal } from './components/progress-modal';
32
35
  export { Progress } from './components/progress';
33
36
  export { RadioGroup, RadioGroupItem } from './components/radio-group';
34
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './components/resizable';
37
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup, } from './components/resizable';
38
+ export { RunButton } from './components/run-button';
35
39
  export { TabStrip, } from './components/tab-strip';
36
40
  export { ScrollableRow } from './components/scrollable-row';
37
- export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, } from './components/select';
41
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from './components/select';
38
42
  export { ScrollArea, ScrollBar } from './components/scroll-area';
39
43
  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';
44
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, } from './components/sheet';
45
+ 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
46
  export { SkeletonPane } from './components/skeleton-pane';
43
47
  export { Skeleton } from './components/skeleton';
44
48
  export { Slider } from './components/slider';
45
49
  export { SpinnerPane } from './components/spinner-pane';
46
50
  export { Spinner } from './components/spinner';
47
51
  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';
52
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from './components/table';
53
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/tabs';
50
54
  export { Textarea } from './components/textarea';
51
55
  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
56
  export { ToggleGroup, ToggleGroupItem } from './components/toggle-group';
55
57
  export { Toggle, toggleVariants } from './components/toggle';
56
58
  export { CopyButton } from './components/copy-button';
57
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, } from './components/tooltip';
59
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from './components/tooltip';
58
60
  export { Tree } from './components/tree';
59
61
  // Hooks
60
- export { useToast, toast as legacyToast, reducer } from './hooks/use-toast';
61
62
  export { toast } from 'sonner';
62
63
  export { useAspectRatioDimensions, } from './hooks/useAspectRatioDimensions';
63
64
  export { useDisclosure, } from './hooks/useDisclosure';
64
- export { useRelativeCoordinates } from './hooks/useRelativeCoordinates';
65
+ export { useDebounce } from './hooks/useDebounce';
66
+ export { useDebouncedCallback } from './hooks/useDebouncedCallback';
67
+ export { useDebouncedValue } from './hooks/useDebouncedValue';
65
68
  export { useIsMobile } from './hooks/use-mobile';
69
+ export { useRelativeCoordinates } from './hooks/useRelativeCoordinates';
66
70
  // Utilities
67
- export { cn } from './lib/utils';
68
71
  export { resolveFontSizeClass } from './lib/fontSize';
72
+ export { cn } from './lib/utils';
69
73
  // Theme
70
- export { ThemeProvider, useTheme } from './theme/theme-provider';
74
+ export { DEFAULT_THEME, DEFAULT_THEME_STORAGE_KEY, getResolvedTheme, getTheme, getThemePreference, ThemeProvider, useTheme, } from './theme/theme-provider';
71
75
  // Re-export from Radix
72
76
  export { Slot } from '@radix-ui/react-slot';
77
+ export { Toaster } from './components/sonner';
78
+ export { HoverCard, HoverCardContent, HoverCardTrigger, } from './components/hover-card';
73
79
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceR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KAAK,IAAI,WAAW,EAAE,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAC,KAAK,EAAqB,MAAM,QAAQ,CAAC;AAEjD,OAAO,EACL,wBAAwB,GAGzB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,aAAa,GAEd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAC,sBAAsB,EAAC,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAE/C,YAAY;AACZ,OAAO,EAAC,EAAE,EAAC,MAAM,aAAa,CAAC;AAC/B,OAAO,EAAC,oBAAoB,EAAqB,MAAM,gBAAgB,CAAC;AAExE,QAAQ;AACR,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAE/D,uBAAuB;AACvB,OAAO,EAAC,IAAI,EAAC,MAAM,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,wBA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AEd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAC,oBAAoB,EAAC,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;AAEtE,YAAY;AACZ,OAAO,EAAC,oBAAoB,EAAqB,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAC,EAAE,EAAC,MAAM,aAAa,CAAC;AAE/B,QAAQ;AACR,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,QAAQ,GAGT,MAAM,wBAAwB,CAAC;AAEhC,uBAAuB;AACvB,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","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 {\n Combobox,\n type ComboboxContentProps,\n type ComboboxItemProps,\n type ComboboxRootProps,\n type ComboboxTriggerProps,\n} from './components/combobox';\nexport {\n useCombobox,\n type UseComboboxOptions,\n type UseComboboxReturn,\n} from './hooks/useCombobox';\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 {\n SettingsPanelHeader,\n type SettingsPanelHeaderProps,\n} from './components/settings-panel-header';\n\nexport {Label} from './components/label';\n\nexport {\n ModifierScrollOverlay,\n type ModifierScrollOverlayProps,\n} from './components/modifier-scroll-overlay';\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 TabStripDndMode,\n type TabStripDragData,\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,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAChD,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,KAAgB,CAAC;AAC7C,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAE7D,KAAK,eAAe,GAAG;IACrB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;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,aAAa,EAAE,aAAa,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC,CAAC;AAcF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,YAA4B,EAC5B,UAAsC,GACvC,GAAE,eAAoB,GAAG,KAAK,CAS9B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,aAAa,CAQ5D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,aAAa,CAErE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,YAA4B,EAC5B,UAAsC,EACtC,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAwDpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,QAAQ,0BAOpB,CAAC"}
@@ -1,10 +1,51 @@
1
1
  import { jsx as _jsx } 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/theme-provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,SAAS,EACT,eAAe,EACf,QAAQ,GACT,MAAM,OAAO,CAAC;AAgCf,MAAM,YAAY,GAAuB;IACvC,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;CACrB,CAAC;A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AC,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,EAAE,aAAa;IACpB,aAAa,EAAE,gBAAgB,CAAC,aAAa,CAAC;IAC9C,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;CACrB,CAAC;AAEF,MAAM,oBAAoB,GAAG,aAAa,CAAqB,YAAY,CAAC,CAAC;AAE7E,SAAS,OAAO,CAAC,KAAoB;IACnC,OAAO,KAAK,KAAK,O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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,27 +1,24 @@
1
1
  {
2
2
  "name": "@sqlrooms/ui",
3
- "version": "0.29.0-rc.0",
4
- "type": "module",
5
- "sideEffects": false,
6
- "author": "SQLRooms Contributors",
7
- "license": "MIT",
3
+ "version": "0.29.0-rc.10",
8
4
  "repository": {
9
5
  "type": "git",
10
- "url": "https://github.com/sqlrooms/sqlrooms.git"
6
+ "url": "git+https://github.com/sqlrooms/sqlrooms.git"
11
7
  },
8
+ "license": "MIT",
9
+ "author": "SQLRooms Contributors",
10
+ "sideEffects": false,
11
+ "type": "module",
12
+ "main": "dist/index.js",
13
+ "module": "dist/index.js",
14
+ "types": "dist/index.d.ts",
12
15
  "files": [
13
16
  "dist",
14
17
  "tailwind-preset.css"
15
18
  ],
16
- "publishConfig": {
17
- "access": "public"
18
- },
19
- "main": "dist/index.js",
20
- "types": "dist/index.d.ts",
21
- "module": "dist/index.js",
22
19
  "scripts": {
23
- "dev": "tsc -w",
24
20
  "build": "tsc",
21
+ "dev": "tsc -w",
25
22
  "lint": "eslint .",
26
23
  "typecheck": "tsc --noEmit",
27
24
  "typedoc": "typedoc"
@@ -37,6 +34,7 @@
37
34
  "@radix-ui/react-context-menu": "^2.2.16",
38
35
  "@radix-ui/react-dialog": "^1.1.15",
39
36
  "@radix-ui/react-dropdown-menu": "^2.1.16",
37
+ "@radix-ui/react-hover-card": "^1.1.15",
40
38
  "@radix-ui/react-label": "^2.1.7",
41
39
  "@radix-ui/react-menubar": "^1.1.16",
42
40
  "@radix-ui/react-popover": "^1.1.15",
@@ -49,7 +47,6 @@
49
47
  "@radix-ui/react-slot": "^1.2.3",
50
48
  "@radix-ui/react-switch": "^1.2.6",
51
49
  "@radix-ui/react-tabs": "^1.1.13",
52
- "@radix-ui/react-toast": "^1.2.15",
53
50
  "@radix-ui/react-toggle": "^1.1.10",
54
51
  "@radix-ui/react-toggle-group": "^1.1.11",
55
52
  "@radix-ui/react-tooltip": "^1.2.8",
@@ -61,7 +58,7 @@
61
58
  "lucide-react": "^0.556.0",
62
59
  "react-day-picker": "^8.10.1",
63
60
  "react-hook-form": "^7.63.0",
64
- "react-resizable-panels": "^3.0.6",
61
+ "react-resizable-panels": "^4.7.6",
65
62
  "sonner": "^2.0.7",
66
63
  "tailwind-merge": "^2.6.0",
67
64
  "tailwindcss-animate": "^1.0.7",
@@ -71,5 +68,8 @@
71
68
  "peerDependencies": {
72
69
  "tailwindcss": "^4.1.18"
73
70
  },
74
- "gitHead": "afdb949c9601b4cdeaae966157a25a54aea2ae54"
71
+ "publishConfig": {
72
+ "access": "public"
73
+ },
74
+ "gitHead": "dbcff5982d39cc07d0c1d0b1189795b19f1e8d87"
75
75
  }
@@ -5,6 +5,13 @@
5
5
 
6
6
  @custom-variant dark (&:is(.dark *));
7
7
 
8
+ @layer base {
9
+ button:not(:disabled),
10
+ [role="button"]:not(:disabled) {
11
+ cursor: pointer;
12
+ }
13
+ }
14
+
8
15
  :root {
9
16
  --background: 0 0% 100%;
10
17
  --foreground: 240 10% 3.9%;
@@ -30,6 +37,7 @@
30
37
  --chart-3: 197 37% 24%;
31
38
  --chart-4: 43 74% 66%;
32
39
  --chart-5: 27 87% 67%;
40
+ --chart-overlay: hsl(var(--muted-foreground) / 0.22);
33
41
  --sidebar-background: 0 0% 98%;
34
42
  --sidebar-foreground: 240 5.3% 26.1%;
35
43
  --sidebar-primary: 240 5.9% 10%;
@@ -39,6 +47,24 @@
39
47
  --sidebar-border: 220 13% 91%;
40
48
  --sidebar-ring: 217.2 91.2% 59.8%;
41
49
  --radius: 0.5rem;
50
+ --editor-keyword: 240 100% 50%;
51
+ --editor-string: 0 57% 33%;
52
+ --editor-number: 156 100% 30%;
53
+ --editor-comment: 120 100% 25%;
54
+ --editor-operator: 0 0% 0%;
55
+ --editor-punctuation: 0 0% 0%;
56
+ --editor-property: 214 100% 25%;
57
+ --editor-function: 38 63% 33%;
58
+ --editor-type: 156 100% 30%;
59
+ --editor-constant: 204 100% 38%;
60
+ --editor-invalid: 0 70% 49%;
61
+ --editor-selection-match: 207 100% 84%;
62
+ --editor-bracket-match: 0 0% 0%;
63
+ --editor-fold-placeholder: 220 14% 91%;
64
+ --editor-search-match: 60 100% 50%;
65
+ --editor-search-match-selected: 60 100% 50%;
66
+ --editor-lint-error: 0 63% 49%;
67
+ --editor-lint-warning: 32 94% 48%;
42
68
  }
43
69
 
44
70
  .dark {
@@ -66,6 +92,7 @@
66
92
  --chart-3: 30 80% 55%;
67
93
  --chart-4: 280 65% 60%;
68
94
  --chart-5: 340 75% 55%;
95
+ --chart-overlay: hsl(var(--muted-foreground) / 0.22);
69
96
  --sidebar-background: 240 5.9% 10%;
70
97
  --sidebar-foreground: 240 4.8% 95.9%;
71
98
  --sidebar-primary: 0 0% 98%;
@@ -74,6 +101,24 @@
74
101
  --sidebar-accent-foreground: 240 4.8% 95.9%;
75
102
  --sidebar-border: 240 3.7% 15.9%;
76
103
  --sidebar-ring: 217.2 91.2% 59.8%;
104
+ --editor-keyword: 206 100% 60%;
105
+ --editor-string: 25 58% 59%;
106
+ --editor-number: 120 43% 71%;
107
+ --editor-comment: 122 39% 49%;
108
+ --editor-operator: 0 0% 83%;
109
+ --editor-punctuation: 0 0% 83%;
110
+ --editor-property: 207 100% 74%;
111
+ --editor-function: 49 44% 67%;
112
+ --editor-type: 167 47% 55%;
113
+ --editor-constant: 210 100% 66%;
114
+ --editor-invalid: 0 100% 63%;
115
+ --editor-selection-match: 207 35% 35%;
116
+ --editor-bracket-match: 0 0% 100%;
117
+ --editor-fold-placeholder: 0 0% 24%;
118
+ --editor-search-match: 43 16% 33%;
119
+ --editor-search-match-selected: 43 16% 33%;
120
+ --editor-lint-error: 3 88% 71%;
121
+ --editor-lint-warning: 28 100% 72%;
77
122
  }
78
123
 
79
124
  @theme inline {
@@ -105,6 +150,7 @@
105
150
  --color-chart-3: hsl(var(--chart-3));
106
151
  --color-chart-4: hsl(var(--chart-4));
107
152
  --color-chart-5: hsl(var(--chart-5));
153
+ --color-chart-overlay: var(--chart-overlay);
108
154
  --color-sidebar: hsl(var(--sidebar-background));
109
155
  --color-sidebar-foreground: hsl(var(--sidebar-foreground));
110
156
  --color-sidebar-primary: hsl(var(--sidebar-primary));
@@ -113,6 +159,26 @@
113
159
  --color-sidebar-accent-foreground: hsl(var(--sidebar-accent-foreground));
114
160
  --color-sidebar-border: hsl(var(--sidebar-border));
115
161
  --color-sidebar-ring: hsl(var(--sidebar-ring));
162
+ --color-editor-keyword: hsl(var(--editor-keyword));
163
+ --color-editor-string: hsl(var(--editor-string));
164
+ --color-editor-number: hsl(var(--editor-number));
165
+ --color-editor-comment: hsl(var(--editor-comment));
166
+ --color-editor-operator: hsl(var(--editor-operator));
167
+ --color-editor-punctuation: hsl(var(--editor-punctuation));
168
+ --color-editor-property: hsl(var(--editor-property));
169
+ --color-editor-function: hsl(var(--editor-function));
170
+ --color-editor-type: hsl(var(--editor-type));
171
+ --color-editor-constant: hsl(var(--editor-constant));
172
+ --color-editor-invalid: hsl(var(--editor-invalid));
173
+ --color-editor-selection-match: hsl(var(--editor-selection-match));
174
+ --color-editor-bracket-match: hsl(var(--editor-bracket-match));
175
+ --color-editor-fold-placeholder: hsl(var(--editor-fold-placeholder));
176
+ --color-editor-search-match: hsl(var(--editor-search-match));
177
+ --color-editor-search-match-selected: hsl(
178
+ var(--editor-search-match-selected)
179
+ );
180
+ --color-editor-lint-error: hsl(var(--editor-lint-error));
181
+ --color-editor-lint-warning: hsl(var(--editor-lint-warning));
116
182
  --animate-sqlrooms-progress: sqlrooms-progress 1s infinite linear;
117
183
  }
118
184
 
@@ -138,6 +204,18 @@
138
204
  }
139
205
  }
140
206
 
207
+ @layer utilities {
208
+ .no-spinner {
209
+ appearance: textfield;
210
+ }
211
+
212
+ .no-spinner::-webkit-outer-spin-button,
213
+ .no-spinner::-webkit-inner-spin-button {
214
+ appearance: none;
215
+ margin: 0;
216
+ }
217
+ }
218
+
141
219
  @layer components {
142
220
  .prose :where(ul, ol) {
143
221
  padding-left: 1.5em;
@@ -1,16 +0,0 @@
1
- import * as React from 'react';
2
- import * as ToastPrimitives from '@radix-ui/react-toast';
3
- import { type VariantProps } from 'class-variance-authority';
4
- declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
- declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
- declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
- variant?: "default" | "destructive" | null | undefined;
8
- } & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
- declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
- declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
- declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
- declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
- type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
14
- type ToastActionElement = React.ReactElement<typeof ToastAction>;
15
- export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
16
- //# sourceMappingURL=toast.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAKhE,QAAA,MAAM,aAAa,8CAA2B,CAAC;AAE/C,QAAA,MAAM,aAAa,kKAYjB,CAAC;AAmBH,QAAA,MAAM,KAAK;;qHAYT,CAAC;AAGH,QAAA,MAAM,WAAW,kKAYf,CAAC;AAGH,QAAA,MAAM,UAAU,iKAed,CAAC;AAGH,QAAA,MAAM,UAAU,2JASd,CAAC;AAGH,QAAA,MAAM,gBAAgB,iKASpB,CAAC;AAGH,KAAK,UAAU,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,KAAK,CAAC,CAAC;AAE/D,KAAK,kBAAkB,GAAG,KAAK,CAAC,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjE,OAAO,EACL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,aAAa,EACb,aAAa,EACb,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,GACZ,CAAC"}