@ai-matrx/design-system 0.43.0 → 0.44.0

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
@@ -940,6 +940,33 @@ declare const DialogFooter: {
940
940
  declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
941
941
  declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
942
942
 
943
+ /**
944
+ * THE FRONT-MOST LAYER — one signal every floating layer shares, so the layer
945
+ * the person used last is the one on top.
946
+ *
947
+ * A windowed Dialog sits at z-10000 so it is never behind the menu, popover or
948
+ * host window it was opened from (0.38.1). But a host window opened or focused
949
+ * AFTER it — the window an agent run opens from the Agents menu while Table
950
+ * settings is open — then sat underneath it, and its composer could not be
951
+ * clicked or typed into (found live 2026-09-26, register ARE-010). Recency has
952
+ * to decide, across both systems, without coupling them.
953
+ *
954
+ * So any layer that comes to the front announces it: `announceLayerFront(el)`
955
+ * dispatches `matrx:layer-front` on `document`. A windowed Dialog announces
956
+ * itself when it opens and when the person presses or focuses inside it; it
957
+ * steps BEHIND (z-999, still above the page and below the host's window
958
+ * manager at 1000+) whenever another layer announces, and comes back the
959
+ * moment the person reaches for it. A host window manager announces its
960
+ * window on open and on focus.
961
+ */
962
+ declare const LAYER_FRONT_EVENT = "matrx:layer-front";
963
+ interface LayerFrontDetail {
964
+ /** The element that came to the front. */
965
+ element: Element | null;
966
+ }
967
+ /** Tell every other floating layer that `element` is now the one in front. */
968
+ declare function announceLayerFront(element: Element | null): void;
969
+
943
970
  /**
944
971
  * DropdownMenu — Radix dropdown with two behaviours the stock body lacks.
945
972
  *
@@ -2340,4 +2367,4 @@ declare const ALL_MOTION_CLASSES: readonly ["matrx-motion-overlay", "matrx-motio
2340
2367
  */
2341
2368
  declare const FORBIDDEN_HOST_MOTION_UTILITIES: readonly ["animate-in", "animate-out", "fade-in", "fade-out", "zoom-in", "zoom-out", "slide-in-from", "slide-out-to", "animate-accordion", "animate-slide-down", "animate-slide-up", "animate-pulse", "animate-spin"];
2342
2369
 
2343
- export { ALL_MOTION_CLASSES, ARCHIVE_FILTER_LABELS, ARCHIVE_FILTER_VALUES, ARCHIVE_LABEL, Accordion, AccordionContent, AccordionItem, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogContentPrimitive, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, ArchiveFilter, type ArchiveFilterProps, type ArchiveFilterValue, ArchivedDisclosure, type ArchivedDisclosureProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BasicInput, BasicTextarea, BottomSheet, BottomSheetBody, type BottomSheetBodyProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, type BottomSheetProps, Button, type ButtonProps, CENTERED_DIALOG, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, type CardSize, CardTitle, Checkbox, type CheckboxProps, type CheckboxSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ConfirmDialogHost, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CreatableOption, CreatablePicker, type CreatablePickerProps, DEFAULT_ARCHIVE_FILTER, DEFAULT_SCORE_THRESHOLDS, Dialog, DialogClose, DialogContent, DialogContentPrimitive, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerContentPrimitive, type DrawerContentProps, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerProps, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableLabel, type EditableLabelActivation, type EditableLabelCommitMode, type EditableLabelProps, EnterInput, type EnterInputProps, ErrorActions, type ErrorActionsInput, ErrorActionsProvider, type ErrorActionsRecord, type ErrorActionsRenderer, ErrorBox, type ErrorBoxProps, FORBIDDEN_HOST_MOTION_UTILITIES, HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger, Input, type InputProps, type InputVariant, InputWithPrefix, type InputWithPrefixProps, Label, MOBILE_BREAKPOINT, MOTION_BOTTOM_SHEET, MOTION_DIALOG, MOTION_OVERLAY, MOTION_POPPER, MOTION_PULSE, MOTION_SHEET, MOTION_SPIN, OrganizationAbbreviation, OrganizationPicker, type OrganizationPickerOrganization, type OrganizationPickerProps, OverflowToolbar, type OverflowToolbarProps, POPPER_OFFSET, type PickerIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, PortalContainerProvider, type PortalContainerProviderProps, Progress, type ProgressProps, type ProgressTone, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupSize, RadixDialogModalProvider, type RadixDialogModalProviderProps, ResizableHandle, type ResizableHandleProps, type ResizableHandleSize, ResizablePanel, ResizablePanelGroup, ScoreRing, type ScoreRingProps, type ScoreThresholds, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollFadeState, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Switch, type SwitchProps, type SwitchSize, TabbedBottomSheet, type TabbedBottomSheetProps, type TabbedBottomSheetTab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableSize, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCore, Textarea, type TextareaProps, TextareaWithPrefix, type TextareaWithPrefixProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToolbarAction, type ToolbarActionTone, type ToolbarIcon, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseScrollFadeResult, alertVariants, archiveFilterFromDisclosure, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toArchiveFilter, toggleVariants, useAccordionSize, useCardSize, useDialogContainer, useDrawerDirection, useErrorActions, useIsMobile, usePortalContainer, useRadixDialogModal, useScrollFade, useTableSize };
2370
+ export { ALL_MOTION_CLASSES, ARCHIVE_FILTER_LABELS, ARCHIVE_FILTER_VALUES, ARCHIVE_LABEL, Accordion, AccordionContent, AccordionItem, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogContentPrimitive, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, ArchiveFilter, type ArchiveFilterProps, type ArchiveFilterValue, ArchivedDisclosure, type ArchivedDisclosureProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BasicInput, BasicTextarea, BottomSheet, BottomSheetBody, type BottomSheetBodyProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, type BottomSheetProps, Button, type ButtonProps, CENTERED_DIALOG, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, type CardSize, CardTitle, Checkbox, type CheckboxProps, type CheckboxSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ConfirmDialogHost, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CreatableOption, CreatablePicker, type CreatablePickerProps, DEFAULT_ARCHIVE_FILTER, DEFAULT_SCORE_THRESHOLDS, Dialog, DialogClose, DialogContent, DialogContentPrimitive, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerContentPrimitive, type DrawerContentProps, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerProps, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableLabel, type EditableLabelActivation, type EditableLabelCommitMode, type EditableLabelProps, EnterInput, type EnterInputProps, ErrorActions, type ErrorActionsInput, ErrorActionsProvider, type ErrorActionsRecord, type ErrorActionsRenderer, ErrorBox, type ErrorBoxProps, FORBIDDEN_HOST_MOTION_UTILITIES, HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger, Input, type InputProps, type InputVariant, InputWithPrefix, type InputWithPrefixProps, LAYER_FRONT_EVENT, Label, type LayerFrontDetail, MOBILE_BREAKPOINT, MOTION_BOTTOM_SHEET, MOTION_DIALOG, MOTION_OVERLAY, MOTION_POPPER, MOTION_PULSE, MOTION_SHEET, MOTION_SPIN, OrganizationAbbreviation, OrganizationPicker, type OrganizationPickerOrganization, type OrganizationPickerProps, OverflowToolbar, type OverflowToolbarProps, POPPER_OFFSET, type PickerIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, PortalContainerProvider, type PortalContainerProviderProps, Progress, type ProgressProps, type ProgressTone, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupSize, RadixDialogModalProvider, type RadixDialogModalProviderProps, ResizableHandle, type ResizableHandleProps, type ResizableHandleSize, ResizablePanel, ResizablePanelGroup, ScoreRing, type ScoreRingProps, type ScoreThresholds, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollFadeState, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Switch, type SwitchProps, type SwitchSize, TabbedBottomSheet, type TabbedBottomSheetProps, type TabbedBottomSheetTab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableSize, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCore, Textarea, type TextareaProps, TextareaWithPrefix, type TextareaWithPrefixProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToolbarAction, type ToolbarActionTone, type ToolbarIcon, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseScrollFadeResult, alertVariants, announceLayerFront, archiveFilterFromDisclosure, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toArchiveFilter, toggleVariants, useAccordionSize, useCardSize, useDialogContainer, useDrawerDirection, useErrorActions, useIsMobile, usePortalContainer, useRadixDialogModal, useScrollFade, useTableSize };
package/dist/index.d.ts CHANGED
@@ -940,6 +940,33 @@ declare const DialogFooter: {
940
940
  declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
941
941
  declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
942
942
 
943
+ /**
944
+ * THE FRONT-MOST LAYER — one signal every floating layer shares, so the layer
945
+ * the person used last is the one on top.
946
+ *
947
+ * A windowed Dialog sits at z-10000 so it is never behind the menu, popover or
948
+ * host window it was opened from (0.38.1). But a host window opened or focused
949
+ * AFTER it — the window an agent run opens from the Agents menu while Table
950
+ * settings is open — then sat underneath it, and its composer could not be
951
+ * clicked or typed into (found live 2026-09-26, register ARE-010). Recency has
952
+ * to decide, across both systems, without coupling them.
953
+ *
954
+ * So any layer that comes to the front announces it: `announceLayerFront(el)`
955
+ * dispatches `matrx:layer-front` on `document`. A windowed Dialog announces
956
+ * itself when it opens and when the person presses or focuses inside it; it
957
+ * steps BEHIND (z-999, still above the page and below the host's window
958
+ * manager at 1000+) whenever another layer announces, and comes back the
959
+ * moment the person reaches for it. A host window manager announces its
960
+ * window on open and on focus.
961
+ */
962
+ declare const LAYER_FRONT_EVENT = "matrx:layer-front";
963
+ interface LayerFrontDetail {
964
+ /** The element that came to the front. */
965
+ element: Element | null;
966
+ }
967
+ /** Tell every other floating layer that `element` is now the one in front. */
968
+ declare function announceLayerFront(element: Element | null): void;
969
+
943
970
  /**
944
971
  * DropdownMenu — Radix dropdown with two behaviours the stock body lacks.
945
972
  *
@@ -2340,4 +2367,4 @@ declare const ALL_MOTION_CLASSES: readonly ["matrx-motion-overlay", "matrx-motio
2340
2367
  */
2341
2368
  declare const FORBIDDEN_HOST_MOTION_UTILITIES: readonly ["animate-in", "animate-out", "fade-in", "fade-out", "zoom-in", "zoom-out", "slide-in-from", "slide-out-to", "animate-accordion", "animate-slide-down", "animate-slide-up", "animate-pulse", "animate-spin"];
2342
2369
 
2343
- export { ALL_MOTION_CLASSES, ARCHIVE_FILTER_LABELS, ARCHIVE_FILTER_VALUES, ARCHIVE_LABEL, Accordion, AccordionContent, AccordionItem, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogContentPrimitive, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, ArchiveFilter, type ArchiveFilterProps, type ArchiveFilterValue, ArchivedDisclosure, type ArchivedDisclosureProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BasicInput, BasicTextarea, BottomSheet, BottomSheetBody, type BottomSheetBodyProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, type BottomSheetProps, Button, type ButtonProps, CENTERED_DIALOG, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, type CardSize, CardTitle, Checkbox, type CheckboxProps, type CheckboxSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ConfirmDialogHost, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CreatableOption, CreatablePicker, type CreatablePickerProps, DEFAULT_ARCHIVE_FILTER, DEFAULT_SCORE_THRESHOLDS, Dialog, DialogClose, DialogContent, DialogContentPrimitive, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerContentPrimitive, type DrawerContentProps, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerProps, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableLabel, type EditableLabelActivation, type EditableLabelCommitMode, type EditableLabelProps, EnterInput, type EnterInputProps, ErrorActions, type ErrorActionsInput, ErrorActionsProvider, type ErrorActionsRecord, type ErrorActionsRenderer, ErrorBox, type ErrorBoxProps, FORBIDDEN_HOST_MOTION_UTILITIES, HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger, Input, type InputProps, type InputVariant, InputWithPrefix, type InputWithPrefixProps, Label, MOBILE_BREAKPOINT, MOTION_BOTTOM_SHEET, MOTION_DIALOG, MOTION_OVERLAY, MOTION_POPPER, MOTION_PULSE, MOTION_SHEET, MOTION_SPIN, OrganizationAbbreviation, OrganizationPicker, type OrganizationPickerOrganization, type OrganizationPickerProps, OverflowToolbar, type OverflowToolbarProps, POPPER_OFFSET, type PickerIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, PortalContainerProvider, type PortalContainerProviderProps, Progress, type ProgressProps, type ProgressTone, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupSize, RadixDialogModalProvider, type RadixDialogModalProviderProps, ResizableHandle, type ResizableHandleProps, type ResizableHandleSize, ResizablePanel, ResizablePanelGroup, ScoreRing, type ScoreRingProps, type ScoreThresholds, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollFadeState, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Switch, type SwitchProps, type SwitchSize, TabbedBottomSheet, type TabbedBottomSheetProps, type TabbedBottomSheetTab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableSize, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCore, Textarea, type TextareaProps, TextareaWithPrefix, type TextareaWithPrefixProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToolbarAction, type ToolbarActionTone, type ToolbarIcon, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseScrollFadeResult, alertVariants, archiveFilterFromDisclosure, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toArchiveFilter, toggleVariants, useAccordionSize, useCardSize, useDialogContainer, useDrawerDirection, useErrorActions, useIsMobile, usePortalContainer, useRadixDialogModal, useScrollFade, useTableSize };
2370
+ export { ALL_MOTION_CLASSES, ARCHIVE_FILTER_LABELS, ARCHIVE_FILTER_VALUES, ARCHIVE_LABEL, Accordion, AccordionContent, AccordionItem, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogContentPrimitive, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, ArchiveFilter, type ArchiveFilterProps, type ArchiveFilterValue, ArchivedDisclosure, type ArchivedDisclosureProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BasicInput, BasicTextarea, BottomSheet, BottomSheetBody, type BottomSheetBodyProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, type BottomSheetProps, Button, type ButtonProps, CENTERED_DIALOG, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, type CardSize, CardTitle, Checkbox, type CheckboxProps, type CheckboxSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ConfirmDialogHost, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CreatableOption, CreatablePicker, type CreatablePickerProps, DEFAULT_ARCHIVE_FILTER, DEFAULT_SCORE_THRESHOLDS, Dialog, DialogClose, DialogContent, DialogContentPrimitive, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerContentPrimitive, type DrawerContentProps, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerProps, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableLabel, type EditableLabelActivation, type EditableLabelCommitMode, type EditableLabelProps, EnterInput, type EnterInputProps, ErrorActions, type ErrorActionsInput, ErrorActionsProvider, type ErrorActionsRecord, type ErrorActionsRenderer, ErrorBox, type ErrorBoxProps, FORBIDDEN_HOST_MOTION_UTILITIES, HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger, Input, type InputProps, type InputVariant, InputWithPrefix, type InputWithPrefixProps, LAYER_FRONT_EVENT, Label, type LayerFrontDetail, MOBILE_BREAKPOINT, MOTION_BOTTOM_SHEET, MOTION_DIALOG, MOTION_OVERLAY, MOTION_POPPER, MOTION_PULSE, MOTION_SHEET, MOTION_SPIN, OrganizationAbbreviation, OrganizationPicker, type OrganizationPickerOrganization, type OrganizationPickerProps, OverflowToolbar, type OverflowToolbarProps, POPPER_OFFSET, type PickerIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, PortalContainerProvider, type PortalContainerProviderProps, Progress, type ProgressProps, type ProgressTone, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupSize, RadixDialogModalProvider, type RadixDialogModalProviderProps, ResizableHandle, type ResizableHandleProps, type ResizableHandleSize, ResizablePanel, ResizablePanelGroup, ScoreRing, type ScoreRingProps, type ScoreThresholds, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollFadeState, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Switch, type SwitchProps, type SwitchSize, TabbedBottomSheet, type TabbedBottomSheetProps, type TabbedBottomSheetTab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableSize, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCore, Textarea, type TextareaProps, TextareaWithPrefix, type TextareaWithPrefixProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToolbarAction, type ToolbarActionTone, type ToolbarIcon, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseScrollFadeResult, alertVariants, announceLayerFront, archiveFilterFromDisclosure, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toArchiveFilter, toggleVariants, useAccordionSize, useCardSize, useDialogContainer, useDrawerDirection, useErrorActions, useIsMobile, usePortalContainer, useRadixDialogModal, useScrollFade, useTableSize };
package/dist/index.js CHANGED
@@ -1926,6 +1926,17 @@ import * as DialogPrimitive2 from "@radix-ui/react-dialog";
1926
1926
  import * as VisuallyHidden2 from "@radix-ui/react-visually-hidden";
1927
1927
  import { treeContainsComponent as treeContainsComponent3 } from "@ai-matrx/kit/react-tree";
1928
1928
  import * as React18 from "react";
1929
+
1930
+ // src/layer-front.ts
1931
+ var LAYER_FRONT_EVENT = "matrx:layer-front";
1932
+ function announceLayerFront(element) {
1933
+ if (typeof document === "undefined") return;
1934
+ document.dispatchEvent(
1935
+ new CustomEvent(LAYER_FRONT_EVENT, { detail: { element } })
1936
+ );
1937
+ }
1938
+
1939
+ // src/dialog.tsx
1929
1940
  import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
1930
1941
  var DialogWindowedByDefaultContext = React18.createContext(false);
1931
1942
  var Dialog = ({
@@ -1998,6 +2009,8 @@ var DialogContent = React18.forwardRef(
1998
2009
  dismissOnOutsideClick = false,
1999
2010
  onInteractOutside,
2000
2011
  onEscapeKeyDown,
2012
+ onPointerDownCapture,
2013
+ onFocusCapture,
2001
2014
  style,
2002
2015
  ...props
2003
2016
  }, ref) => {
@@ -2010,6 +2023,24 @@ var DialogContent = React18.forwardRef(
2010
2023
  const [containerEl, setContainerEl] = React18.useState(
2011
2024
  null
2012
2025
  );
2026
+ const stacks = windowed && windowedByDefault;
2027
+ const [behind, setBehind] = React18.useState(false);
2028
+ React18.useEffect(() => {
2029
+ if (!stacks || !containerEl) return;
2030
+ const onFront = (event) => {
2031
+ const element = event.detail?.element ?? null;
2032
+ if (element && (element === containerEl || containerEl.contains(element))) return;
2033
+ setBehind(true);
2034
+ };
2035
+ document.addEventListener(LAYER_FRONT_EVENT, onFront);
2036
+ announceLayerFront(containerEl);
2037
+ return () => document.removeEventListener(LAYER_FRONT_EVENT, onFront);
2038
+ }, [stacks, containerEl]);
2039
+ const bringToFront = () => {
2040
+ if (!stacks || !containerEl) return;
2041
+ setBehind(false);
2042
+ announceLayerFront(containerEl);
2043
+ };
2013
2044
  const [offset, setOffset] = React18.useState({ x: 0, y: 0 });
2014
2045
  const dragRef = React18.useRef(null);
2015
2046
  const handle = React18.useMemo(() => {
@@ -2068,10 +2099,20 @@ var DialogContent = React18.forwardRef(
2068
2099
  // z=1000); staying below that boundary makes a newly focused window
2069
2100
  // usable without coupling the two systems.
2070
2101
  !isModal && !windowedByDefault && "z-[900]",
2102
+ // Another layer came to the front after this window (layer-front.ts).
2103
+ stacks && behind && "z-[999]",
2071
2104
  // Without an overlay the card needs its own separation from the page.
2072
2105
  windowed && "shadow-2xl ring-1 ring-border/60"
2073
2106
  ),
2074
2107
  style: windowed && (offset.x !== 0 || offset.y !== 0) ? { ...style, translate: `${offset.x}px ${offset.y}px` } : style,
2108
+ onPointerDownCapture: (event) => {
2109
+ onPointerDownCapture?.(event);
2110
+ if (behind) bringToFront();
2111
+ },
2112
+ onFocusCapture: (event) => {
2113
+ onFocusCapture?.(event);
2114
+ if (behind) bringToFront();
2115
+ },
2075
2116
  onInteractOutside: (event) => {
2076
2117
  onInteractOutside?.(event);
2077
2118
  if (windowed && !dismissOnOutsideClick) event.preventDefault();
@@ -2327,7 +2368,7 @@ var DropdownMenuShortcut = ({
2327
2368
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
2328
2369
 
2329
2370
  // src/editable-label.tsx
2330
- import { useCallback as useCallback3, useEffect as useEffect2, useRef as useRef3, useState as useState4 } from "react";
2371
+ import { useCallback as useCallback3, useEffect as useEffect3, useRef as useRef3, useState as useState4 } from "react";
2331
2372
  import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
2332
2373
  function EditableLabel({
2333
2374
  value,
@@ -2354,10 +2395,10 @@ function EditableLabel({
2354
2395
  const [error, setError] = useState4(null);
2355
2396
  const [busy, setBusy] = useState4(false);
2356
2397
  const inputRef = useRef3(null);
2357
- useEffect2(() => {
2398
+ useEffect3(() => {
2358
2399
  if (!editing) setDraft(value);
2359
2400
  }, [value, editing]);
2360
- useEffect2(() => {
2401
+ useEffect3(() => {
2361
2402
  if (editing && inputRef.current) {
2362
2403
  inputRef.current.focus();
2363
2404
  if (selectOnEdit) inputRef.current.select();
@@ -4133,7 +4174,7 @@ var TextareaWithPrefix = React33.forwardRef(
4133
4174
  TextareaWithPrefix.displayName = "TextareaWithPrefix";
4134
4175
 
4135
4176
  // src/use-scroll-fade.ts
4136
- import { useCallback as useCallback5, useEffect as useEffect4, useRef as useRef6, useState as useState8 } from "react";
4177
+ import { useCallback as useCallback5, useEffect as useEffect5, useRef as useRef6, useState as useState8 } from "react";
4137
4178
  var EPSILON = 2;
4138
4179
  function useScrollFade() {
4139
4180
  const [state, setState] = useState8({
@@ -4174,7 +4215,7 @@ function useScrollFade() {
4174
4215
  },
4175
4216
  [measure]
4176
4217
  );
4177
- useEffect4(() => () => cleanupRef.current?.(), []);
4218
+ useEffect5(() => () => cleanupRef.current?.(), []);
4178
4219
  return {
4179
4220
  ref,
4180
4221
  state,
@@ -5143,6 +5184,7 @@ export {
5143
5184
  HoverCardTrigger,
5144
5185
  Input,
5145
5186
  InputWithPrefix,
5187
+ LAYER_FRONT_EVENT,
5146
5188
  Label3 as Label,
5147
5189
  MOBILE_BREAKPOINT,
5148
5190
  MOTION_BOTTOM_SHEET,
@@ -5227,6 +5269,7 @@ export {
5227
5269
  TooltipProvider,
5228
5270
  TooltipTrigger,
5229
5271
  alertVariants,
5272
+ announceLayerFront,
5230
5273
  archiveFilterFromDisclosure,
5231
5274
  badgeVariants,
5232
5275
  buttonVariants,