@invana/ui 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -2058,9 +2058,49 @@ interface PanelStackSection {
2058
2058
  */
2059
2059
  minSize?: number | string;
2060
2060
  }
2061
+ /**
2062
+ * Drive a stack from outside — open the section a route just navigated to,
2063
+ * close one a filter emptied.
2064
+ *
2065
+ * **Why this is a handle and not a `collapsed` prop.** The stack's geometry is
2066
+ * owned by the resizable group: a drag past `minSize` collapses a section, and
2067
+ * releasing it opens one again. A controlled `collapsed` map would be a second
2068
+ * owner of that state and would fight every drag — the parent would re-assert
2069
+ * a stale value the moment the user let go. So the stack stays the owner,
2070
+ * reports every change through `onCollapsedChange`, and takes instructions
2071
+ * through this handle.
2072
+ */
2073
+ interface PanelStackHandle {
2074
+ /** Open a section, taking the room from the tallest expanded sibling. */
2075
+ expand: (id: string) => void;
2076
+ /** Collapse a section to its header. */
2077
+ collapse: (id: string) => void;
2078
+ /** Collapse it if open, open it if collapsed — what the header click does. */
2079
+ toggle: (id: string) => void;
2080
+ /** Whether that section is currently collapsed. */
2081
+ isCollapsed: (id: string) => boolean;
2082
+ }
2061
2083
  interface PanelStackProps {
2062
2084
  /** Ordered list of sections that make up the stack. */
2063
2085
  sections: PanelStackSection[];
2086
+ /**
2087
+ * Imperative access to the stack — see {@link PanelStackHandle}. Use it when
2088
+ * something outside the stack decides a section should be open: a route, a
2089
+ * drill-in, a search that landed in a collapsed list.
2090
+ *
2091
+ * ```tsx
2092
+ * const stack = React.useRef<PanelStackHandle>(null)
2093
+ * React.useEffect(() => stack.current?.expand(openDrawer), [openDrawer])
2094
+ * <PanelStack stackRef={stack} sections={…} />
2095
+ * ```
2096
+ */
2097
+ stackRef?: React$1.Ref<PanelStackHandle>;
2098
+ /**
2099
+ * Called whenever a section opens or closes — by a header click, by a drag
2100
+ * past `minSize`, or through {@link PanelStackHandle}. Receives the whole
2101
+ * map, so a consumer can persist the shape of the column.
2102
+ */
2103
+ onCollapsedChange?: (collapsed: Record<string, boolean>) => void;
2064
2104
  /**
2065
2105
  * Height of each section's title bar, in pixels. Doubles as the collapsed
2066
2106
  * size so a collapsed section shows only its header. Defaults to `35`.
@@ -2097,7 +2137,7 @@ interface PanelStackProps {
2097
2137
  * </div>
2098
2138
  * ```
2099
2139
  */
2100
- declare function PanelStack({ sections, headerHeight, withHandle, className, headerClassName, bodyClassName, }: PanelStackProps): React$1.JSX.Element;
2140
+ declare function PanelStack({ sections, stackRef, onCollapsedChange, headerHeight, withHandle, className, headerClassName, bodyClassName, }: PanelStackProps): React$1.JSX.Element;
2101
2141
 
2102
2142
  interface PropertyListProps extends React$1.HTMLAttributes<HTMLDListElement> {
2103
2143
  /**
@@ -3064,4 +3104,4 @@ interface UseOverflowItemsResult {
3064
3104
  */
3065
3105
  declare function useOverflowItems({ count, enabled, pinnedIndex, reserve, }: UseOverflowItemsOptions): UseOverflowItemsResult;
3066
3106
 
3067
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgentChip, type AgentChipProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppStatusBar, type AppStatusBarProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, BarChartH, type BarChartHProps, BarChartV, type BarChartVProps, type BarDatum, type BaseNavProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, ButtonWithTooltip, type ButtonWithTooltipProps, CannotAnswerCard, type CannotAnswerCardProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChatSession, ChatSessionActivityRow, type ChatSessionActivityRowProps, type ChatSessionActivityStatus, ChatSessionActivitySubLine, type ChatSessionActivitySubLineProps, ChatSessionComposer, type ChatSessionComposerProps, ChatSessionContextChip, type ChatSessionContextChipProps, ChatSessionDisclosure, type ChatSessionDisclosureProps, ChatSessionMessage, type ChatSessionMessageAction, ChatSessionMessageOptions, type ChatSessionMessageOptionsProps, type ChatSessionMessageProps, type ChatSessionMessageRole, type ChatSessionMessageStatus, ChatSessionProgressLine, type ChatSessionProgressLineProps, ChatSessionPromptRow, type ChatSessionPromptRowProps, type ChatSessionProps, ChatSessionStatusBar, type ChatSessionStatusBarProps, ChatSessionTaskGroup, type ChatSessionTaskGroupProps, ChatSessionTaskRow, type ChatSessionTaskRowProps, type ChatSessionTaskStatus, CitationList, type CitationListProps, CitationMarker, CitationRow, type CitationRowProps, ClampedText, type ClampedTextProps, ClarifyCard, type ClarifyCardProps, type ClarifyOption, type ColumnDatum, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextBar, type ContextBarProps, DiagnosisCard, type DiagnosisCardProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffList, type DiffListProps, type DiffOp, DiffRow, type DiffRowProps, DivergingBar, type DivergingBarProps, type DivergingDatum, DotRating, type DotRatingProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmissionCard, type EmissionCardProps, EmissionHeader, type EmissionHeaderProps, type EmissionKind, EmptyState, EmptyStateLock, type EmptyStateLockProps, type EmptyStateProps, ErrorBoundary, Eyebrow, type EyebrowProps, FilterBar, type FilterBarProps, FilterChip, type FilterChipProps, type HeatCell, type HeatState, HeatStrip, type HeatStripProps, HoverCard, HoverCardContent, HoverCardTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Legend, LegendItem, type LegendItemProps, type LegendProps, type LegendSwatchKind, MenuItem, type MenuItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetricGrid, type MetricGridProps, MetricTile, type MetricTileProps, NavBase, NavHorizontal, type NavHorizontalItem, NavHorizontalItems, type NavHorizontalItemsProps, type NavHorizontalProps, type NavItemConfig, NavItems, type NavItemsProps, type NavItemsVariant, type NavMenuItem, type NavSection, NavVertical, type NavVerticalItem, NavVerticalItems, type NavVerticalItemsProps, type NavVerticalProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, type NestedMenuProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, type PanelContentProps, PanelStack, type PanelStackProps, type PanelStackSection, Popover, PopoverContent, PopoverTrigger, Progress, PropertyList, type PropertyListProps, PropertyRow, type PropertyRowProps, ProposalCard, type ProposalCardProps, RatingControl, type RatingControlProps, RepairNote, type RepairNoteProps, ResizableHandle, ResizablePanel, ResizablePanelGroup, RetryNote, type RetryNoteProps, RichSelect, type RichSelectOption, type RichSelectProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, type SearchInputSize, SectionHeader, type SectionHeaderProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Sparkline, type SparklineProps, Spinner, StatusDot, type StatusDotProps, type TabConfig, TabbedPanel, type TabbedPanelProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskGantt, TaskGanttDetailCard, type TaskGanttDetailCardProps, type TaskGanttDetailProps, type TaskGanttInstant, type TaskGanttProps, type TaskGanttSegment, type TaskGanttStatus, type TaskGanttTask, type TemplateOption, TemplatePicker, type TemplatePickerProps, Terminal, TerminalLine, type TerminalLineKind, type TerminalLineProps, type TerminalProps, TimelineEntry, type TimelineEntryProps, TimelineFooter, type TimelineFooterProps, TimelineList, type TimelineListProps, type TimelineVariant, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourController, type TourProps, type TourReference, type TourStep, TreeItem, TreeView, type TreeViewProps, Typography, TypographyBlockquote, type TypographyBlockquoteProps, TypographyH1, type TypographyH1Props, TypographyH2, type TypographyH2Props, TypographyH3, type TypographyH3Props, TypographyH4, type TypographyH4Props, TypographyH5, type TypographyH5Props, TypographyH6, type TypographyH6Props, TypographyInlineCode, type TypographyInlineCodeProps, TypographyLarge, type TypographyLargeProps, TypographyLead, type TypographyLeadProps, TypographyList, type TypographyListProps, TypographyMuted, type TypographyMutedProps, TypographyP, type TypographyPProps, TypographyPre, type TypographyPreProps, TypographySmall, type TypographySmallProps, UnderDevelopment, type UnderDevelopmentProps, type UseOverflowItemsOptions, type UseOverflowItemsResult, type UseTourOptions, type Verdict, agentChipVariants, badgeVariants, buttonGroupVariants, buttonVariants, chatSessionGutterClass, cn, navigationMenuTriggerStyle, statusDotVariants, toggleVariants, useOverflowItems, useSidebar, useTour };
3107
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgentChip, type AgentChipProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppStatusBar, type AppStatusBarProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, BarChartH, type BarChartHProps, BarChartV, type BarChartVProps, type BarDatum, type BaseNavProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, ButtonWithTooltip, type ButtonWithTooltipProps, CannotAnswerCard, type CannotAnswerCardProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChatSession, ChatSessionActivityRow, type ChatSessionActivityRowProps, type ChatSessionActivityStatus, ChatSessionActivitySubLine, type ChatSessionActivitySubLineProps, ChatSessionComposer, type ChatSessionComposerProps, ChatSessionContextChip, type ChatSessionContextChipProps, ChatSessionDisclosure, type ChatSessionDisclosureProps, ChatSessionMessage, type ChatSessionMessageAction, ChatSessionMessageOptions, type ChatSessionMessageOptionsProps, type ChatSessionMessageProps, type ChatSessionMessageRole, type ChatSessionMessageStatus, ChatSessionProgressLine, type ChatSessionProgressLineProps, ChatSessionPromptRow, type ChatSessionPromptRowProps, type ChatSessionProps, ChatSessionStatusBar, type ChatSessionStatusBarProps, ChatSessionTaskGroup, type ChatSessionTaskGroupProps, ChatSessionTaskRow, type ChatSessionTaskRowProps, type ChatSessionTaskStatus, CitationList, type CitationListProps, CitationMarker, CitationRow, type CitationRowProps, ClampedText, type ClampedTextProps, ClarifyCard, type ClarifyCardProps, type ClarifyOption, type ColumnDatum, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextBar, type ContextBarProps, DiagnosisCard, type DiagnosisCardProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffList, type DiffListProps, type DiffOp, DiffRow, type DiffRowProps, DivergingBar, type DivergingBarProps, type DivergingDatum, DotRating, type DotRatingProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmissionCard, type EmissionCardProps, EmissionHeader, type EmissionHeaderProps, type EmissionKind, EmptyState, EmptyStateLock, type EmptyStateLockProps, type EmptyStateProps, ErrorBoundary, Eyebrow, type EyebrowProps, FilterBar, type FilterBarProps, FilterChip, type FilterChipProps, type HeatCell, type HeatState, HeatStrip, type HeatStripProps, HoverCard, HoverCardContent, HoverCardTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Legend, LegendItem, type LegendItemProps, type LegendProps, type LegendSwatchKind, MenuItem, type MenuItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetricGrid, type MetricGridProps, MetricTile, type MetricTileProps, NavBase, NavHorizontal, type NavHorizontalItem, NavHorizontalItems, type NavHorizontalItemsProps, type NavHorizontalProps, type NavItemConfig, NavItems, type NavItemsProps, type NavItemsVariant, type NavMenuItem, type NavSection, NavVertical, type NavVerticalItem, NavVerticalItems, type NavVerticalItemsProps, type NavVerticalProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, type NestedMenuProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, type PanelContentProps, PanelStack, type PanelStackHandle, type PanelStackProps, type PanelStackSection, Popover, PopoverContent, PopoverTrigger, Progress, PropertyList, type PropertyListProps, PropertyRow, type PropertyRowProps, ProposalCard, type ProposalCardProps, RatingControl, type RatingControlProps, RepairNote, type RepairNoteProps, ResizableHandle, ResizablePanel, ResizablePanelGroup, RetryNote, type RetryNoteProps, RichSelect, type RichSelectOption, type RichSelectProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, type SearchInputSize, SectionHeader, type SectionHeaderProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Sparkline, type SparklineProps, Spinner, StatusDot, type StatusDotProps, type TabConfig, TabbedPanel, type TabbedPanelProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskGantt, TaskGanttDetailCard, type TaskGanttDetailCardProps, type TaskGanttDetailProps, type TaskGanttInstant, type TaskGanttProps, type TaskGanttSegment, type TaskGanttStatus, type TaskGanttTask, type TemplateOption, TemplatePicker, type TemplatePickerProps, Terminal, TerminalLine, type TerminalLineKind, type TerminalLineProps, type TerminalProps, TimelineEntry, type TimelineEntryProps, TimelineFooter, type TimelineFooterProps, TimelineList, type TimelineListProps, type TimelineVariant, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourController, type TourProps, type TourReference, type TourStep, TreeItem, TreeView, type TreeViewProps, Typography, TypographyBlockquote, type TypographyBlockquoteProps, TypographyH1, type TypographyH1Props, TypographyH2, type TypographyH2Props, TypographyH3, type TypographyH3Props, TypographyH4, type TypographyH4Props, TypographyH5, type TypographyH5Props, TypographyH6, type TypographyH6Props, TypographyInlineCode, type TypographyInlineCodeProps, TypographyLarge, type TypographyLargeProps, TypographyLead, type TypographyLeadProps, TypographyList, type TypographyListProps, TypographyMuted, type TypographyMutedProps, TypographyP, type TypographyPProps, TypographyPre, type TypographyPreProps, TypographySmall, type TypographySmallProps, UnderDevelopment, type UnderDevelopmentProps, type UseOverflowItemsOptions, type UseOverflowItemsResult, type UseTourOptions, type Verdict, agentChipVariants, badgeVariants, buttonGroupVariants, buttonVariants, chatSessionGutterClass, cn, navigationMenuTriggerStyle, statusDotVariants, toggleVariants, useOverflowItems, useSidebar, useTour };
package/dist/index.d.ts CHANGED
@@ -2058,9 +2058,49 @@ interface PanelStackSection {
2058
2058
  */
2059
2059
  minSize?: number | string;
2060
2060
  }
2061
+ /**
2062
+ * Drive a stack from outside — open the section a route just navigated to,
2063
+ * close one a filter emptied.
2064
+ *
2065
+ * **Why this is a handle and not a `collapsed` prop.** The stack's geometry is
2066
+ * owned by the resizable group: a drag past `minSize` collapses a section, and
2067
+ * releasing it opens one again. A controlled `collapsed` map would be a second
2068
+ * owner of that state and would fight every drag — the parent would re-assert
2069
+ * a stale value the moment the user let go. So the stack stays the owner,
2070
+ * reports every change through `onCollapsedChange`, and takes instructions
2071
+ * through this handle.
2072
+ */
2073
+ interface PanelStackHandle {
2074
+ /** Open a section, taking the room from the tallest expanded sibling. */
2075
+ expand: (id: string) => void;
2076
+ /** Collapse a section to its header. */
2077
+ collapse: (id: string) => void;
2078
+ /** Collapse it if open, open it if collapsed — what the header click does. */
2079
+ toggle: (id: string) => void;
2080
+ /** Whether that section is currently collapsed. */
2081
+ isCollapsed: (id: string) => boolean;
2082
+ }
2061
2083
  interface PanelStackProps {
2062
2084
  /** Ordered list of sections that make up the stack. */
2063
2085
  sections: PanelStackSection[];
2086
+ /**
2087
+ * Imperative access to the stack — see {@link PanelStackHandle}. Use it when
2088
+ * something outside the stack decides a section should be open: a route, a
2089
+ * drill-in, a search that landed in a collapsed list.
2090
+ *
2091
+ * ```tsx
2092
+ * const stack = React.useRef<PanelStackHandle>(null)
2093
+ * React.useEffect(() => stack.current?.expand(openDrawer), [openDrawer])
2094
+ * <PanelStack stackRef={stack} sections={…} />
2095
+ * ```
2096
+ */
2097
+ stackRef?: React$1.Ref<PanelStackHandle>;
2098
+ /**
2099
+ * Called whenever a section opens or closes — by a header click, by a drag
2100
+ * past `minSize`, or through {@link PanelStackHandle}. Receives the whole
2101
+ * map, so a consumer can persist the shape of the column.
2102
+ */
2103
+ onCollapsedChange?: (collapsed: Record<string, boolean>) => void;
2064
2104
  /**
2065
2105
  * Height of each section's title bar, in pixels. Doubles as the collapsed
2066
2106
  * size so a collapsed section shows only its header. Defaults to `35`.
@@ -2097,7 +2137,7 @@ interface PanelStackProps {
2097
2137
  * </div>
2098
2138
  * ```
2099
2139
  */
2100
- declare function PanelStack({ sections, headerHeight, withHandle, className, headerClassName, bodyClassName, }: PanelStackProps): React$1.JSX.Element;
2140
+ declare function PanelStack({ sections, stackRef, onCollapsedChange, headerHeight, withHandle, className, headerClassName, bodyClassName, }: PanelStackProps): React$1.JSX.Element;
2101
2141
 
2102
2142
  interface PropertyListProps extends React$1.HTMLAttributes<HTMLDListElement> {
2103
2143
  /**
@@ -3064,4 +3104,4 @@ interface UseOverflowItemsResult {
3064
3104
  */
3065
3105
  declare function useOverflowItems({ count, enabled, pinnedIndex, reserve, }: UseOverflowItemsOptions): UseOverflowItemsResult;
3066
3106
 
3067
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgentChip, type AgentChipProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppStatusBar, type AppStatusBarProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, BarChartH, type BarChartHProps, BarChartV, type BarChartVProps, type BarDatum, type BaseNavProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, ButtonWithTooltip, type ButtonWithTooltipProps, CannotAnswerCard, type CannotAnswerCardProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChatSession, ChatSessionActivityRow, type ChatSessionActivityRowProps, type ChatSessionActivityStatus, ChatSessionActivitySubLine, type ChatSessionActivitySubLineProps, ChatSessionComposer, type ChatSessionComposerProps, ChatSessionContextChip, type ChatSessionContextChipProps, ChatSessionDisclosure, type ChatSessionDisclosureProps, ChatSessionMessage, type ChatSessionMessageAction, ChatSessionMessageOptions, type ChatSessionMessageOptionsProps, type ChatSessionMessageProps, type ChatSessionMessageRole, type ChatSessionMessageStatus, ChatSessionProgressLine, type ChatSessionProgressLineProps, ChatSessionPromptRow, type ChatSessionPromptRowProps, type ChatSessionProps, ChatSessionStatusBar, type ChatSessionStatusBarProps, ChatSessionTaskGroup, type ChatSessionTaskGroupProps, ChatSessionTaskRow, type ChatSessionTaskRowProps, type ChatSessionTaskStatus, CitationList, type CitationListProps, CitationMarker, CitationRow, type CitationRowProps, ClampedText, type ClampedTextProps, ClarifyCard, type ClarifyCardProps, type ClarifyOption, type ColumnDatum, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextBar, type ContextBarProps, DiagnosisCard, type DiagnosisCardProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffList, type DiffListProps, type DiffOp, DiffRow, type DiffRowProps, DivergingBar, type DivergingBarProps, type DivergingDatum, DotRating, type DotRatingProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmissionCard, type EmissionCardProps, EmissionHeader, type EmissionHeaderProps, type EmissionKind, EmptyState, EmptyStateLock, type EmptyStateLockProps, type EmptyStateProps, ErrorBoundary, Eyebrow, type EyebrowProps, FilterBar, type FilterBarProps, FilterChip, type FilterChipProps, type HeatCell, type HeatState, HeatStrip, type HeatStripProps, HoverCard, HoverCardContent, HoverCardTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Legend, LegendItem, type LegendItemProps, type LegendProps, type LegendSwatchKind, MenuItem, type MenuItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetricGrid, type MetricGridProps, MetricTile, type MetricTileProps, NavBase, NavHorizontal, type NavHorizontalItem, NavHorizontalItems, type NavHorizontalItemsProps, type NavHorizontalProps, type NavItemConfig, NavItems, type NavItemsProps, type NavItemsVariant, type NavMenuItem, type NavSection, NavVertical, type NavVerticalItem, NavVerticalItems, type NavVerticalItemsProps, type NavVerticalProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, type NestedMenuProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, type PanelContentProps, PanelStack, type PanelStackProps, type PanelStackSection, Popover, PopoverContent, PopoverTrigger, Progress, PropertyList, type PropertyListProps, PropertyRow, type PropertyRowProps, ProposalCard, type ProposalCardProps, RatingControl, type RatingControlProps, RepairNote, type RepairNoteProps, ResizableHandle, ResizablePanel, ResizablePanelGroup, RetryNote, type RetryNoteProps, RichSelect, type RichSelectOption, type RichSelectProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, type SearchInputSize, SectionHeader, type SectionHeaderProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Sparkline, type SparklineProps, Spinner, StatusDot, type StatusDotProps, type TabConfig, TabbedPanel, type TabbedPanelProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskGantt, TaskGanttDetailCard, type TaskGanttDetailCardProps, type TaskGanttDetailProps, type TaskGanttInstant, type TaskGanttProps, type TaskGanttSegment, type TaskGanttStatus, type TaskGanttTask, type TemplateOption, TemplatePicker, type TemplatePickerProps, Terminal, TerminalLine, type TerminalLineKind, type TerminalLineProps, type TerminalProps, TimelineEntry, type TimelineEntryProps, TimelineFooter, type TimelineFooterProps, TimelineList, type TimelineListProps, type TimelineVariant, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourController, type TourProps, type TourReference, type TourStep, TreeItem, TreeView, type TreeViewProps, Typography, TypographyBlockquote, type TypographyBlockquoteProps, TypographyH1, type TypographyH1Props, TypographyH2, type TypographyH2Props, TypographyH3, type TypographyH3Props, TypographyH4, type TypographyH4Props, TypographyH5, type TypographyH5Props, TypographyH6, type TypographyH6Props, TypographyInlineCode, type TypographyInlineCodeProps, TypographyLarge, type TypographyLargeProps, TypographyLead, type TypographyLeadProps, TypographyList, type TypographyListProps, TypographyMuted, type TypographyMutedProps, TypographyP, type TypographyPProps, TypographyPre, type TypographyPreProps, TypographySmall, type TypographySmallProps, UnderDevelopment, type UnderDevelopmentProps, type UseOverflowItemsOptions, type UseOverflowItemsResult, type UseTourOptions, type Verdict, agentChipVariants, badgeVariants, buttonGroupVariants, buttonVariants, chatSessionGutterClass, cn, navigationMenuTriggerStyle, statusDotVariants, toggleVariants, useOverflowItems, useSidebar, useTour };
3107
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AgentChip, type AgentChipProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppStatusBar, type AppStatusBarProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, BarChartH, type BarChartHProps, BarChartV, type BarChartVProps, type BarDatum, type BaseNavProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, type ButtonProps, ButtonWithTooltip, type ButtonWithTooltipProps, CannotAnswerCard, type CannotAnswerCardProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CardWithHeader, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChatSession, ChatSessionActivityRow, type ChatSessionActivityRowProps, type ChatSessionActivityStatus, ChatSessionActivitySubLine, type ChatSessionActivitySubLineProps, ChatSessionComposer, type ChatSessionComposerProps, ChatSessionContextChip, type ChatSessionContextChipProps, ChatSessionDisclosure, type ChatSessionDisclosureProps, ChatSessionMessage, type ChatSessionMessageAction, ChatSessionMessageOptions, type ChatSessionMessageOptionsProps, type ChatSessionMessageProps, type ChatSessionMessageRole, type ChatSessionMessageStatus, ChatSessionProgressLine, type ChatSessionProgressLineProps, ChatSessionPromptRow, type ChatSessionPromptRowProps, type ChatSessionProps, ChatSessionStatusBar, type ChatSessionStatusBarProps, ChatSessionTaskGroup, type ChatSessionTaskGroupProps, ChatSessionTaskRow, type ChatSessionTaskRowProps, type ChatSessionTaskStatus, CitationList, type CitationListProps, CitationMarker, CitationRow, type CitationRowProps, ClampedText, type ClampedTextProps, ClarifyCard, type ClarifyCardProps, type ClarifyOption, type ColumnDatum, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextBar, type ContextBarProps, DiagnosisCard, type DiagnosisCardProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffList, type DiffListProps, type DiffOp, DiffRow, type DiffRowProps, DivergingBar, type DivergingBarProps, type DivergingDatum, DotRating, type DotRatingProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmissionCard, type EmissionCardProps, EmissionHeader, type EmissionHeaderProps, type EmissionKind, EmptyState, EmptyStateLock, type EmptyStateLockProps, type EmptyStateProps, ErrorBoundary, Eyebrow, type EyebrowProps, FilterBar, type FilterBarProps, FilterChip, type FilterChipProps, type HeatCell, type HeatState, HeatStrip, type HeatStripProps, HoverCard, HoverCardContent, HoverCardTrigger, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Legend, LegendItem, type LegendItemProps, type LegendProps, type LegendSwatchKind, MenuItem, type MenuItemProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, MetricGrid, type MetricGridProps, MetricTile, type MetricTileProps, NavBase, NavHorizontal, type NavHorizontalItem, NavHorizontalItems, type NavHorizontalItemsProps, type NavHorizontalProps, type NavItemConfig, NavItems, type NavItemsProps, type NavItemsVariant, type NavMenuItem, type NavSection, NavVertical, type NavVerticalItem, NavVerticalItems, type NavVerticalItemsProps, type NavVerticalProps, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NestedMenu, type NestedMenuProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PanelContent, type PanelContentProps, PanelStack, type PanelStackHandle, type PanelStackProps, type PanelStackSection, Popover, PopoverContent, PopoverTrigger, Progress, PropertyList, type PropertyListProps, PropertyRow, type PropertyRowProps, ProposalCard, type ProposalCardProps, RatingControl, type RatingControlProps, RepairNote, type RepairNoteProps, ResizableHandle, ResizablePanel, ResizablePanelGroup, RetryNote, type RetryNoteProps, RichSelect, type RichSelectOption, type RichSelectProps, ScrollArea, ScrollBar, SearchInput, type SearchInputProps, type SearchInputSize, SectionHeader, type SectionHeaderProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Sparkline, type SparklineProps, Spinner, StatusDot, type StatusDotProps, type TabConfig, TabbedPanel, type TabbedPanelProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TaskGantt, TaskGanttDetailCard, type TaskGanttDetailCardProps, type TaskGanttDetailProps, type TaskGanttInstant, type TaskGanttProps, type TaskGanttSegment, type TaskGanttStatus, type TaskGanttTask, type TemplateOption, TemplatePicker, type TemplatePickerProps, Terminal, TerminalLine, type TerminalLineKind, type TerminalLineProps, type TerminalProps, TimelineEntry, type TimelineEntryProps, TimelineFooter, type TimelineFooterProps, TimelineList, type TimelineListProps, type TimelineVariant, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tour, type TourController, type TourProps, type TourReference, type TourStep, TreeItem, TreeView, type TreeViewProps, Typography, TypographyBlockquote, type TypographyBlockquoteProps, TypographyH1, type TypographyH1Props, TypographyH2, type TypographyH2Props, TypographyH3, type TypographyH3Props, TypographyH4, type TypographyH4Props, TypographyH5, type TypographyH5Props, TypographyH6, type TypographyH6Props, TypographyInlineCode, type TypographyInlineCodeProps, TypographyLarge, type TypographyLargeProps, TypographyLead, type TypographyLeadProps, TypographyList, type TypographyListProps, TypographyMuted, type TypographyMutedProps, TypographyP, type TypographyPProps, TypographyPre, type TypographyPreProps, TypographySmall, type TypographySmallProps, UnderDevelopment, type UnderDevelopmentProps, type UseOverflowItemsOptions, type UseOverflowItemsResult, type UseTourOptions, type Verdict, agentChipVariants, badgeVariants, buttonGroupVariants, buttonVariants, chatSessionGutterClass, cn, navigationMenuTriggerStyle, statusDotVariants, toggleVariants, useOverflowItems, useSidebar, useTour };
package/dist/index.js CHANGED
@@ -4679,6 +4679,8 @@ function PanelContent({
4679
4679
  }
4680
4680
  function PanelStack({
4681
4681
  sections,
4682
+ stackRef,
4683
+ onCollapsedChange,
4682
4684
  headerHeight = 35,
4683
4685
  withHandle = false,
4684
4686
  className,
@@ -4723,19 +4725,26 @@ function PanelStack({
4723
4725
  for (const s of targets) refs.current[s.id]?.collapse();
4724
4726
  group.setLayout(next);
4725
4727
  }, []);
4726
- const toggle = (id) => {
4728
+ const notify = React23.useRef(onCollapsedChange);
4729
+ React23.useEffect(() => {
4730
+ notify.current = onCollapsedChange;
4731
+ }, [onCollapsedChange]);
4732
+ const collapsedRef = React23.useRef(collapsed);
4733
+ collapsedRef.current = collapsed;
4734
+ const collapsePanel = React23.useCallback((id) => {
4727
4735
  const ref = refs.current[id];
4728
- if (!ref) return;
4729
- if (!ref.isCollapsed()) {
4730
- ref.collapse();
4731
- return;
4732
- }
4736
+ if (!ref || ref.isCollapsed()) return;
4737
+ ref.collapse();
4738
+ }, []);
4739
+ const expandPanel = React23.useCallback((id) => {
4740
+ const ref = refs.current[id];
4741
+ if (!ref || !ref.isCollapsed()) return;
4733
4742
  ref.expand();
4734
4743
  if (!ref.isCollapsed()) return;
4735
4744
  const group = groupRef.current;
4736
4745
  if (!group) return;
4737
4746
  const layout = group.getLayout();
4738
- const donor = Object.entries(layout).filter(([panelId]) => panelId !== id && !collapsed[panelId]).sort((a, b) => b[1] - a[1])[0];
4747
+ const donor = Object.entries(layout).filter(([panelId]) => panelId !== id && !collapsedRef.current[panelId]).sort((a, b) => b[1] - a[1])[0];
4739
4748
  if (!donor) return;
4740
4749
  const [donorId, donorPct] = donor;
4741
4750
  const share = donorPct / 2;
@@ -4744,7 +4753,26 @@ function PanelStack({
4744
4753
  [id]: (layout[id] ?? 0) + share,
4745
4754
  [donorId]: donorPct - share
4746
4755
  });
4747
- };
4756
+ }, []);
4757
+ const toggle = React23.useCallback(
4758
+ (id) => {
4759
+ const ref = refs.current[id];
4760
+ if (!ref) return;
4761
+ if (ref.isCollapsed()) expandPanel(id);
4762
+ else collapsePanel(id);
4763
+ },
4764
+ [expandPanel, collapsePanel]
4765
+ );
4766
+ React23.useImperativeHandle(
4767
+ stackRef,
4768
+ () => ({
4769
+ expand: expandPanel,
4770
+ collapse: collapsePanel,
4771
+ toggle,
4772
+ isCollapsed: (id) => !!collapsedRef.current[id]
4773
+ }),
4774
+ [expandPanel, collapsePanel, toggle]
4775
+ );
4748
4776
  return (
4749
4777
  // Header actions are nav items, and those carry tooltips — provide the
4750
4778
  // context here so a `PanelStack` works outside an app shell too. Nesting
@@ -4782,9 +4810,12 @@ function PanelStack({
4782
4810
  },
4783
4811
  onResize: (size) => {
4784
4812
  const next = size.inPixels <= headerHeight + 1;
4785
- setCollapsed(
4786
- (prev) => prev[section.id] === next ? prev : { ...prev, [section.id]: next }
4787
- );
4813
+ setCollapsed((prev) => {
4814
+ if (prev[section.id] === next) return prev;
4815
+ const map = { ...prev, [section.id]: next };
4816
+ notify.current?.(map);
4817
+ return map;
4818
+ });
4788
4819
  },
4789
4820
  className: "flex flex-col overflow-hidden",
4790
4821
  children: [