@constructive-io/ui 0.2.0 → 0.3.1

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
@@ -32,6 +32,7 @@ import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
32
32
  import * as ResizablePrimitive from 'react-resizable-panels';
33
33
  import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
34
34
  import { Autocomplete as Autocomplete$1 } from '@base-ui/react/autocomplete';
35
+ import { PanelPosition, FitViewOptions } from '@xyflow/react';
35
36
  import { Command as Command$1 } from 'cmdk';
36
37
  import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
37
38
  import { Calendar as Calendar$1, RangeCalendar as RangeCalendar$1 } from 'react-aria-components';
@@ -819,6 +820,14 @@ declare function AutocompleteItem({ className, children, ...props }: Autocomplet
819
820
  declare function AutocompleteSeparator({ className, ...props }: Autocomplete$1.Separator.Props): react_jsx_runtime.JSX.Element;
820
821
  declare function AutocompleteEmpty({ className, ...props }: Autocomplete$1.Empty.Props): react_jsx_runtime.JSX.Element;
821
822
 
823
+ interface FlowZoomPanelProps {
824
+ className?: string;
825
+ position?: PanelPosition;
826
+ fitViewIcon?: React.ReactNode;
827
+ fitViewOptions?: FitViewOptions;
828
+ }
829
+ declare function FlowZoomPanel({ className, position, fitViewIcon, fitViewOptions, }: FlowZoomPanelProps): react_jsx_runtime.JSX.Element;
830
+
822
831
  declare function Command({ className, ...props }: React$1.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
823
832
  declare function CommandInput({ className, placeholder, ...props }: React$1.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
824
833
  declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
@@ -2152,4 +2161,55 @@ declare const toast: {
2152
2161
  warning: typeof showWarningToast;
2153
2162
  };
2154
2163
 
2155
- export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AnimationConfig, Autocomplete, AutocompleteEmpty, AutocompleteInput, AutocompleteItem, AutocompletePopup, AutocompleteSeparator, Avatar, AvatarFallback, AvatarImage, type BackdropConfig, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, Card, CardAction, type CardComponent, CardContent, CardDescription, CardFooter, CardHeader, type CardId, type CardInjectedProps, type CardProps, type CardPushOptions, type CardRouteDefinition, type CardRouteMap, type CardSpec, type CardStackApi, CardStackProvider, type CardStackProviderProps, CardStackViewport, type CardStackViewportProps, CardTitle, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Collapsible, CollapsiblePanel as CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, type ComboboxEmptyProps, ComboboxGroup, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxList, type ComboboxListProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, ComboboxTrigger, type ComboboxTriggerProps, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, DEFAULT_ANIMATION_CONFIG, DeferredCardContent, type DeferredCardContentProps, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, type DismissOptions, Dock, DockIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, type FieldProps, FieldRow, type FieldRowProps, FlickeringGrid, type FloatingPortalStrategy, type FloatingZIndex, Form, FormControl$1 as FormControl, FormControl as FormControlComponent, type FormControlLayout, FormDescription, FormField, FormItem, FormLabel, FormMessage, type Frame, type FrameDot, type Frames, type GestureConfig, Input, InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea, type InputProps, JsonEditor, JsonInput, Label, type LabelProps, type LayoutMode, type MobileConfig, ModalPortalScope, MotionGrid, type MotionGridProps, MultiSelect, type MultiSelectGroup, type MultiSelectOption, type MultiSelectProps, type MultiSelectRef, type OverlayLayer, PORTAL_ROOT_ID, PageHeader, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type PeekGestureConfig, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalRoot, Progress, type ProgressProps, ProgressiveBlur, ProgressiveBlurScrollContainer, type PushOptions, Radio, RadioGroup, Radio as RadioGroupItem, type RadioGroupProps, type RadioProps, RangeCalendar, RecordPicker, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResponsiveDiagram, type ResponsiveOffsetConfig, type ResponsiveOffsetResult, ScrollArea, ScrollBar, Select, SelectPopup as SelectContent, SelectFieldItem, SelectGroup, SelectGroupLabel, SelectItem, SelectGroupLabel as SelectLabel, SelectPopup, SelectRichItem, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarSeparator, SidebarTrigger, Skeleton, type SkeletonProps, Slot, Slottable, type StackAction, StackBackdrop, type StackBackdropProps, StackCard, type StackCardProps, type StackContextValue, StackHeader, type StackHeaderProps, StackHeaderSlot, type StackHeaderSlotProps, type StackState, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tags, TagsContent, type TagsContentProps, TagsEmpty, type TagsEmptyProps, TagsGroup, type TagsGroupProps, TagsInput, type TagsInputProps, TagsItem, type TagsItemProps, TagsList, type TagsListProps, type TagsProps, TagsTrigger, type TagsTriggerProps, TagsValue, type TagsValueProps, Textarea, type TextareaProps, type ToastErrorProps, type ToastInfoProps, type ToastSuccessProps, type ToastWarningProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UnlinkButton, type UsePeekGesturesOptions, type UsePeekGesturesResult, type UseStackGesturesResult, type UseStackResponsiveResult, alertVariants, backdropVariants, badgeVariants, buttonVariants, calculateResponsiveOffset, cardVariants, cn, composeRefs, createCardVariants, createOffsetTransition, createReducedMotionVariants, dockVariants, durations, easings, getCardOffset, getCardZIndex, getCascadeOffset, getResponsiveCardOffset, getSideBySideOffset, getVisibleCardIndices, isCardVisible, mergeProps, normalizeWidth, parseWidthToPixels, peekDragSpring, peekHoverSpring, peekSlideSpring, reducedMotionBackdropVariants, showErrorToast, showInfoToast, showSuccessToast, showWarningToast, snapBackSpring, springs, swipeDismissTransition, toast, transitions, useCardIndex, useCardInjectedProps, useCardReady, useCardStack, useControllableState, useFloatingOverlayPortalProps, useFormField, useInModalOverlay, useIsMobile, useIsTopCard, usePeekGestures, usePortalContainer, usePortalContext, useRootPortalContainer, useSidebar, useStackCards, useStackContext, useStackGestures, useStackLayoutMode, useStackResponsive, validateJson, variants };
2164
+ /** A single edge in the org chart — represents a person and their reporting relationship */
2165
+ interface OrgChartEdge {
2166
+ /** Person ID (used as the React Flow node id) */
2167
+ id: string;
2168
+ /** ID of the person this edge reports to (null = root) */
2169
+ parentId: string | null;
2170
+ displayName: string | null;
2171
+ avatarUrl: string | null;
2172
+ positionTitle: string | null;
2173
+ }
2174
+ /** Data carried by each React Flow node */
2175
+ interface OrgChartNodeData extends OrgChartEdge {
2176
+ childCount: number;
2177
+ isRoot: boolean;
2178
+ [key: string]: unknown;
2179
+ }
2180
+
2181
+ interface OrgChartPropsBase {
2182
+ /** Additional classes for the chart container (e.g. `"h-full"` to fill parent). Default height: 600px. */
2183
+ className?: string;
2184
+ /** Whether data is still loading */
2185
+ isLoading?: boolean;
2186
+ /** Whether the current user can manage the chart (drag, edit, remove) */
2187
+ editable?: boolean;
2188
+ /** Called when a node is dragged onto a new parent. In uncontrolled mode, the component updates visually first — if this throws, it reverts. */
2189
+ onReparent?: (childId: string, newParentId: string, preserve: {
2190
+ positionTitle?: string | null;
2191
+ }) => void | Promise<void>;
2192
+ /** Called when the "Add to Chart" button is clicked (empty state) */
2193
+ onAddToChart?: () => void;
2194
+ /** Called when "Edit Position" is selected from the node menu */
2195
+ onEditNode?: (nodeData: OrgChartNodeData) => void;
2196
+ /** Called when "Remove from Chart" is selected from the node menu */
2197
+ onRemoveNode?: (nodeData: OrgChartNodeData) => void;
2198
+ /** Toast handler for reparent success/error messages. If not provided, no toasts are shown. */
2199
+ onReparentSuccess?: (childName: string, parentName: string) => void;
2200
+ onReparentError?: (message: string) => void;
2201
+ }
2202
+ /** Controlled mode — consumer owns edge state */
2203
+ interface OrgChartControlledProps extends OrgChartPropsBase {
2204
+ edges: OrgChartEdge[];
2205
+ defaultEdges?: never;
2206
+ }
2207
+ /** Uncontrolled mode — component manages edge state internally with optimistic reparent */
2208
+ interface OrgChartUncontrolledProps extends OrgChartPropsBase {
2209
+ edges?: never;
2210
+ defaultEdges: OrgChartEdge[];
2211
+ }
2212
+ type OrgChartProps = OrgChartControlledProps | OrgChartUncontrolledProps;
2213
+ declare function OrgChart(props: OrgChartProps): react_jsx_runtime.JSX.Element;
2214
+
2215
+ export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AnimationConfig, Autocomplete, AutocompleteEmpty, AutocompleteInput, AutocompleteItem, AutocompletePopup, AutocompleteSeparator, Avatar, AvatarFallback, AvatarImage, type BackdropConfig, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, Card, CardAction, type CardComponent, CardContent, CardDescription, CardFooter, CardHeader, type CardId, type CardInjectedProps, type CardProps, type CardPushOptions, type CardRouteDefinition, type CardRouteMap, type CardSpec, type CardStackApi, CardStackProvider, type CardStackProviderProps, CardStackViewport, type CardStackViewportProps, CardTitle, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Collapsible, CollapsiblePanel as CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, type ComboboxEmptyProps, ComboboxGroup, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxList, type ComboboxListProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, ComboboxTrigger, type ComboboxTriggerProps, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, DEFAULT_ANIMATION_CONFIG, DeferredCardContent, type DeferredCardContentProps, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, type DismissOptions, Dock, DockIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, type FieldProps, FieldRow, type FieldRowProps, FlickeringGrid, type FloatingPortalStrategy, type FloatingZIndex, FlowZoomPanel, Form, FormControl$1 as FormControl, FormControl as FormControlComponent, type FormControlLayout, FormDescription, FormField, FormItem, FormLabel, FormMessage, type Frame, type FrameDot, type Frames, type GestureConfig, Input, InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea, type InputProps, JsonEditor, JsonInput, Label, type LabelProps, type LayoutMode, type MobileConfig, ModalPortalScope, MotionGrid, type MotionGridProps, MultiSelect, type MultiSelectGroup, type MultiSelectOption, type MultiSelectProps, type MultiSelectRef, OrgChart, type OrgChartEdge, type OrgChartNodeData, type OrgChartProps, type OverlayLayer, PORTAL_ROOT_ID, PageHeader, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type PeekGestureConfig, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalRoot, Progress, type ProgressProps, ProgressiveBlur, ProgressiveBlurScrollContainer, type PushOptions, Radio, RadioGroup, Radio as RadioGroupItem, type RadioGroupProps, type RadioProps, RangeCalendar, RecordPicker, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResponsiveDiagram, type ResponsiveOffsetConfig, type ResponsiveOffsetResult, ScrollArea, ScrollBar, Select, SelectPopup as SelectContent, SelectFieldItem, SelectGroup, SelectGroupLabel, SelectItem, SelectGroupLabel as SelectLabel, SelectPopup, SelectRichItem, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarSeparator, SidebarTrigger, Skeleton, type SkeletonProps, Slot, Slottable, type StackAction, StackBackdrop, type StackBackdropProps, StackCard, type StackCardProps, type StackContextValue, StackHeader, type StackHeaderProps, StackHeaderSlot, type StackHeaderSlotProps, type StackState, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tags, TagsContent, type TagsContentProps, TagsEmpty, type TagsEmptyProps, TagsGroup, type TagsGroupProps, TagsInput, type TagsInputProps, TagsItem, type TagsItemProps, TagsList, type TagsListProps, type TagsProps, TagsTrigger, type TagsTriggerProps, TagsValue, type TagsValueProps, Textarea, type TextareaProps, type ToastErrorProps, type ToastInfoProps, type ToastSuccessProps, type ToastWarningProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UnlinkButton, type UsePeekGesturesOptions, type UsePeekGesturesResult, type UseStackGesturesResult, type UseStackResponsiveResult, alertVariants, backdropVariants, badgeVariants, buttonVariants, calculateResponsiveOffset, cardVariants, cn, composeRefs, createCardVariants, createOffsetTransition, createReducedMotionVariants, dockVariants, durations, easings, getCardOffset, getCardZIndex, getCascadeOffset, getResponsiveCardOffset, getSideBySideOffset, getVisibleCardIndices, isCardVisible, mergeProps, normalizeWidth, parseWidthToPixels, peekDragSpring, peekHoverSpring, peekSlideSpring, reducedMotionBackdropVariants, showErrorToast, showInfoToast, showSuccessToast, showWarningToast, snapBackSpring, springs, swipeDismissTransition, toast, transitions, useCardIndex, useCardInjectedProps, useCardReady, useCardStack, useControllableState, useFloatingOverlayPortalProps, useFormField, useInModalOverlay, useIsMobile, useIsTopCard, usePeekGestures, usePortalContainer, usePortalContext, useRootPortalContainer, useSidebar, useStackCards, useStackContext, useStackGestures, useStackLayoutMode, useStackResponsive, validateJson, variants };
package/dist/index.d.ts CHANGED
@@ -32,6 +32,7 @@ import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
32
32
  import * as ResizablePrimitive from 'react-resizable-panels';
33
33
  import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
34
34
  import { Autocomplete as Autocomplete$1 } from '@base-ui/react/autocomplete';
35
+ import { PanelPosition, FitViewOptions } from '@xyflow/react';
35
36
  import { Command as Command$1 } from 'cmdk';
36
37
  import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
37
38
  import { Calendar as Calendar$1, RangeCalendar as RangeCalendar$1 } from 'react-aria-components';
@@ -819,6 +820,14 @@ declare function AutocompleteItem({ className, children, ...props }: Autocomplet
819
820
  declare function AutocompleteSeparator({ className, ...props }: Autocomplete$1.Separator.Props): react_jsx_runtime.JSX.Element;
820
821
  declare function AutocompleteEmpty({ className, ...props }: Autocomplete$1.Empty.Props): react_jsx_runtime.JSX.Element;
821
822
 
823
+ interface FlowZoomPanelProps {
824
+ className?: string;
825
+ position?: PanelPosition;
826
+ fitViewIcon?: React.ReactNode;
827
+ fitViewOptions?: FitViewOptions;
828
+ }
829
+ declare function FlowZoomPanel({ className, position, fitViewIcon, fitViewOptions, }: FlowZoomPanelProps): react_jsx_runtime.JSX.Element;
830
+
822
831
  declare function Command({ className, ...props }: React$1.ComponentProps<typeof Command$1>): react_jsx_runtime.JSX.Element;
823
832
  declare function CommandInput({ className, placeholder, ...props }: React$1.ComponentProps<typeof Command$1.Input>): react_jsx_runtime.JSX.Element;
824
833
  declare function CommandList({ className, ...props }: React$1.ComponentProps<typeof Command$1.List>): react_jsx_runtime.JSX.Element;
@@ -2152,4 +2161,55 @@ declare const toast: {
2152
2161
  warning: typeof showWarningToast;
2153
2162
  };
2154
2163
 
2155
- export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AnimationConfig, Autocomplete, AutocompleteEmpty, AutocompleteInput, AutocompleteItem, AutocompletePopup, AutocompleteSeparator, Avatar, AvatarFallback, AvatarImage, type BackdropConfig, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, Card, CardAction, type CardComponent, CardContent, CardDescription, CardFooter, CardHeader, type CardId, type CardInjectedProps, type CardProps, type CardPushOptions, type CardRouteDefinition, type CardRouteMap, type CardSpec, type CardStackApi, CardStackProvider, type CardStackProviderProps, CardStackViewport, type CardStackViewportProps, CardTitle, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Collapsible, CollapsiblePanel as CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, type ComboboxEmptyProps, ComboboxGroup, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxList, type ComboboxListProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, ComboboxTrigger, type ComboboxTriggerProps, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, DEFAULT_ANIMATION_CONFIG, DeferredCardContent, type DeferredCardContentProps, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, type DismissOptions, Dock, DockIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, type FieldProps, FieldRow, type FieldRowProps, FlickeringGrid, type FloatingPortalStrategy, type FloatingZIndex, Form, FormControl$1 as FormControl, FormControl as FormControlComponent, type FormControlLayout, FormDescription, FormField, FormItem, FormLabel, FormMessage, type Frame, type FrameDot, type Frames, type GestureConfig, Input, InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea, type InputProps, JsonEditor, JsonInput, Label, type LabelProps, type LayoutMode, type MobileConfig, ModalPortalScope, MotionGrid, type MotionGridProps, MultiSelect, type MultiSelectGroup, type MultiSelectOption, type MultiSelectProps, type MultiSelectRef, type OverlayLayer, PORTAL_ROOT_ID, PageHeader, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type PeekGestureConfig, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalRoot, Progress, type ProgressProps, ProgressiveBlur, ProgressiveBlurScrollContainer, type PushOptions, Radio, RadioGroup, Radio as RadioGroupItem, type RadioGroupProps, type RadioProps, RangeCalendar, RecordPicker, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResponsiveDiagram, type ResponsiveOffsetConfig, type ResponsiveOffsetResult, ScrollArea, ScrollBar, Select, SelectPopup as SelectContent, SelectFieldItem, SelectGroup, SelectGroupLabel, SelectItem, SelectGroupLabel as SelectLabel, SelectPopup, SelectRichItem, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarSeparator, SidebarTrigger, Skeleton, type SkeletonProps, Slot, Slottable, type StackAction, StackBackdrop, type StackBackdropProps, StackCard, type StackCardProps, type StackContextValue, StackHeader, type StackHeaderProps, StackHeaderSlot, type StackHeaderSlotProps, type StackState, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tags, TagsContent, type TagsContentProps, TagsEmpty, type TagsEmptyProps, TagsGroup, type TagsGroupProps, TagsInput, type TagsInputProps, TagsItem, type TagsItemProps, TagsList, type TagsListProps, type TagsProps, TagsTrigger, type TagsTriggerProps, TagsValue, type TagsValueProps, Textarea, type TextareaProps, type ToastErrorProps, type ToastInfoProps, type ToastSuccessProps, type ToastWarningProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UnlinkButton, type UsePeekGesturesOptions, type UsePeekGesturesResult, type UseStackGesturesResult, type UseStackResponsiveResult, alertVariants, backdropVariants, badgeVariants, buttonVariants, calculateResponsiveOffset, cardVariants, cn, composeRefs, createCardVariants, createOffsetTransition, createReducedMotionVariants, dockVariants, durations, easings, getCardOffset, getCardZIndex, getCascadeOffset, getResponsiveCardOffset, getSideBySideOffset, getVisibleCardIndices, isCardVisible, mergeProps, normalizeWidth, parseWidthToPixels, peekDragSpring, peekHoverSpring, peekSlideSpring, reducedMotionBackdropVariants, showErrorToast, showInfoToast, showSuccessToast, showWarningToast, snapBackSpring, springs, swipeDismissTransition, toast, transitions, useCardIndex, useCardInjectedProps, useCardReady, useCardStack, useControllableState, useFloatingOverlayPortalProps, useFormField, useInModalOverlay, useIsMobile, useIsTopCard, usePeekGestures, usePortalContainer, usePortalContext, useRootPortalContainer, useSidebar, useStackCards, useStackContext, useStackGestures, useStackLayoutMode, useStackResponsive, validateJson, variants };
2164
+ /** A single edge in the org chart — represents a person and their reporting relationship */
2165
+ interface OrgChartEdge {
2166
+ /** Person ID (used as the React Flow node id) */
2167
+ id: string;
2168
+ /** ID of the person this edge reports to (null = root) */
2169
+ parentId: string | null;
2170
+ displayName: string | null;
2171
+ avatarUrl: string | null;
2172
+ positionTitle: string | null;
2173
+ }
2174
+ /** Data carried by each React Flow node */
2175
+ interface OrgChartNodeData extends OrgChartEdge {
2176
+ childCount: number;
2177
+ isRoot: boolean;
2178
+ [key: string]: unknown;
2179
+ }
2180
+
2181
+ interface OrgChartPropsBase {
2182
+ /** Additional classes for the chart container (e.g. `"h-full"` to fill parent). Default height: 600px. */
2183
+ className?: string;
2184
+ /** Whether data is still loading */
2185
+ isLoading?: boolean;
2186
+ /** Whether the current user can manage the chart (drag, edit, remove) */
2187
+ editable?: boolean;
2188
+ /** Called when a node is dragged onto a new parent. In uncontrolled mode, the component updates visually first — if this throws, it reverts. */
2189
+ onReparent?: (childId: string, newParentId: string, preserve: {
2190
+ positionTitle?: string | null;
2191
+ }) => void | Promise<void>;
2192
+ /** Called when the "Add to Chart" button is clicked (empty state) */
2193
+ onAddToChart?: () => void;
2194
+ /** Called when "Edit Position" is selected from the node menu */
2195
+ onEditNode?: (nodeData: OrgChartNodeData) => void;
2196
+ /** Called when "Remove from Chart" is selected from the node menu */
2197
+ onRemoveNode?: (nodeData: OrgChartNodeData) => void;
2198
+ /** Toast handler for reparent success/error messages. If not provided, no toasts are shown. */
2199
+ onReparentSuccess?: (childName: string, parentName: string) => void;
2200
+ onReparentError?: (message: string) => void;
2201
+ }
2202
+ /** Controlled mode — consumer owns edge state */
2203
+ interface OrgChartControlledProps extends OrgChartPropsBase {
2204
+ edges: OrgChartEdge[];
2205
+ defaultEdges?: never;
2206
+ }
2207
+ /** Uncontrolled mode — component manages edge state internally with optimistic reparent */
2208
+ interface OrgChartUncontrolledProps extends OrgChartPropsBase {
2209
+ edges?: never;
2210
+ defaultEdges: OrgChartEdge[];
2211
+ }
2212
+ type OrgChartProps = OrgChartControlledProps | OrgChartUncontrolledProps;
2213
+ declare function OrgChart(props: OrgChartProps): react_jsx_runtime.JSX.Element;
2214
+
2215
+ export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, type AnimationConfig, Autocomplete, AutocompleteEmpty, AutocompleteInput, AutocompleteItem, AutocompletePopup, AutocompleteSeparator, Avatar, AvatarFallback, AvatarImage, type BackdropConfig, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Calendar, Card, CardAction, type CardComponent, CardContent, CardDescription, CardFooter, CardHeader, type CardId, type CardInjectedProps, type CardProps, type CardPushOptions, type CardRouteDefinition, type CardRouteMap, type CardSpec, type CardStackApi, CardStackProvider, type CardStackProviderProps, CardStackViewport, type CardStackViewportProps, CardTitle, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Collapsible, CollapsiblePanel as CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, type ComboboxContentProps, ComboboxEmpty, type ComboboxEmptyProps, ComboboxGroup, type ComboboxGroupProps, ComboboxInput, type ComboboxInputProps, ComboboxItem, type ComboboxItemProps, ComboboxList, type ComboboxListProps, type ComboboxProps, ComboboxSeparator, type ComboboxSeparatorProps, ComboboxTrigger, type ComboboxTriggerProps, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, DEFAULT_ANIMATION_CONFIG, DeferredCardContent, type DeferredCardContentProps, Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTitle, DialogTrigger, type DismissOptions, Dock, DockIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, type FieldProps, FieldRow, type FieldRowProps, FlickeringGrid, type FloatingPortalStrategy, type FloatingZIndex, FlowZoomPanel, Form, FormControl$1 as FormControl, FormControl as FormControlComponent, type FormControlLayout, FormDescription, FormField, FormItem, FormLabel, FormMessage, type Frame, type FrameDot, type Frames, type GestureConfig, Input, InputGroup, InputGroupAddon, InputGroupInput, InputGroupText, InputGroupTextarea, type InputProps, JsonEditor, JsonInput, Label, type LabelProps, type LayoutMode, type MobileConfig, ModalPortalScope, MotionGrid, type MotionGridProps, MultiSelect, type MultiSelectGroup, type MultiSelectOption, type MultiSelectProps, type MultiSelectRef, OrgChart, type OrgChartEdge, type OrgChartNodeData, type OrgChartProps, type OverlayLayer, PORTAL_ROOT_ID, PageHeader, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, type PeekGestureConfig, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalRoot, Progress, type ProgressProps, ProgressiveBlur, ProgressiveBlurScrollContainer, type PushOptions, Radio, RadioGroup, Radio as RadioGroupItem, type RadioGroupProps, type RadioProps, RangeCalendar, RecordPicker, ResizableHandle, ResizablePanel, ResizablePanelGroup, ResponsiveDiagram, type ResponsiveOffsetConfig, type ResponsiveOffsetResult, ScrollArea, ScrollBar, Select, SelectPopup as SelectContent, SelectFieldItem, SelectGroup, SelectGroupLabel, SelectItem, SelectGroupLabel as SelectLabel, SelectPopup, SelectRichItem, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeparatorProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarSeparator, SidebarTrigger, Skeleton, type SkeletonProps, Slot, Slottable, type StackAction, StackBackdrop, type StackBackdropProps, StackCard, type StackCardProps, type StackContextValue, StackHeader, type StackHeaderProps, StackHeaderSlot, type StackHeaderSlotProps, type StackState, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperSeparator, StepperTitle, StepperTrigger, Switch, type SwitchProps, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tags, TagsContent, type TagsContentProps, TagsEmpty, type TagsEmptyProps, TagsGroup, type TagsGroupProps, TagsInput, type TagsInputProps, TagsItem, type TagsItemProps, TagsList, type TagsListProps, type TagsProps, TagsTrigger, type TagsTriggerProps, TagsValue, type TagsValueProps, Textarea, type TextareaProps, type ToastErrorProps, type ToastInfoProps, type ToastSuccessProps, type ToastWarningProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UnlinkButton, type UsePeekGesturesOptions, type UsePeekGesturesResult, type UseStackGesturesResult, type UseStackResponsiveResult, alertVariants, backdropVariants, badgeVariants, buttonVariants, calculateResponsiveOffset, cardVariants, cn, composeRefs, createCardVariants, createOffsetTransition, createReducedMotionVariants, dockVariants, durations, easings, getCardOffset, getCardZIndex, getCascadeOffset, getResponsiveCardOffset, getSideBySideOffset, getVisibleCardIndices, isCardVisible, mergeProps, normalizeWidth, parseWidthToPixels, peekDragSpring, peekHoverSpring, peekSlideSpring, reducedMotionBackdropVariants, showErrorToast, showInfoToast, showSuccessToast, showWarningToast, snapBackSpring, springs, swipeDismissTransition, toast, transitions, useCardIndex, useCardInjectedProps, useCardReady, useCardStack, useControllableState, useFloatingOverlayPortalProps, useFormField, useInModalOverlay, useIsMobile, useIsTopCard, usePeekGestures, usePortalContainer, usePortalContext, useRootPortalContainer, useSidebar, useStackCards, useStackContext, useStackGestures, useStackLayoutMode, useStackResponsive, validateJson, variants };