@superdangerous/app-framework 4.14.0 → 4.15.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.
Files changed (38) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/middleware/validation.d.ts +12 -12
  6. package/dist/services/emailService.d.ts +146 -0
  7. package/dist/services/emailService.d.ts.map +1 -0
  8. package/dist/services/emailService.js +649 -0
  9. package/dist/services/emailService.js.map +1 -0
  10. package/dist/services/index.d.ts +2 -0
  11. package/dist/services/index.d.ts.map +1 -1
  12. package/dist/services/index.js +2 -0
  13. package/dist/services/index.js.map +1 -1
  14. package/package.json +9 -1
  15. package/src/index.ts +14 -0
  16. package/src/services/emailService.ts +812 -0
  17. package/src/services/index.ts +14 -0
  18. package/ui/data-table/components/BatchActionsBar.tsx +53 -0
  19. package/ui/data-table/components/ColumnVisibility.tsx +111 -0
  20. package/ui/data-table/components/DataTable.tsx +492 -0
  21. package/ui/data-table/components/DataTablePage.tsx +238 -0
  22. package/ui/data-table/components/Pagination.tsx +203 -0
  23. package/ui/data-table/components/PaginationControls.tsx +122 -0
  24. package/ui/data-table/components/TableFilters.tsx +139 -0
  25. package/ui/data-table/components/index.ts +41 -0
  26. package/ui/data-table/components/types.ts +181 -0
  27. package/ui/data-table/hooks/index.ts +17 -0
  28. package/ui/data-table/hooks/useColumnOrder.ts +233 -0
  29. package/ui/data-table/hooks/useColumnVisibility.ts +128 -0
  30. package/ui/data-table/hooks/usePagination.ts +160 -0
  31. package/ui/data-table/hooks/useResizableColumns.ts +280 -0
  32. package/ui/data-table/index.ts +84 -0
  33. package/ui/dist/index.d.mts +207 -5
  34. package/ui/dist/index.d.ts +207 -5
  35. package/ui/dist/index.js +36 -43
  36. package/ui/dist/index.js.map +1 -1
  37. package/ui/dist/index.mjs +36 -43
  38. package/ui/dist/index.mjs.map +1 -1
@@ -1,6 +1,6 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import * as React$1 from 'react';
3
- import React__default, { ReactNode } from 'react';
3
+ import React__default, { ReactNode, MouseEvent } from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
@@ -195,10 +195,20 @@ declare function ProtectedRoute({ children, loginPath, authEndpoint, loadingComp
195
195
 
196
196
  interface LogsPageProps {
197
197
  apiUrl?: string;
198
- title?: string;
199
- description?: string;
200
198
  }
201
- declare function LogsPage({ apiUrl, title, description }: LogsPageProps): react_jsx_runtime.JSX.Element;
199
+ /**
200
+ * A complete logs page component with file list and live log viewer
201
+ *
202
+ * @example
203
+ * ```tsx
204
+ * import { LogsPage } from '@superdangerous/app-framework/ui';
205
+ *
206
+ * function App() {
207
+ * return <LogsPage apiUrl="/api/logs" />;
208
+ * }
209
+ * ```
210
+ */
211
+ declare function LogsPage({ apiUrl }: LogsPageProps): react_jsx_runtime.JSX.Element;
202
212
 
203
213
  interface SettingDefinition$1 {
204
214
  key: string;
@@ -403,6 +413,176 @@ declare function MarkdownScrollArea({ content, className, height, ...props }: Ma
403
413
  height?: string;
404
414
  }): react_jsx_runtime.JSX.Element;
405
415
 
416
+ interface TruncatedTextProps {
417
+ children: ReactNode;
418
+ className?: string;
419
+ maxWidth?: string | number;
420
+ tooltipSide?: 'top' | 'right' | 'bottom' | 'left';
421
+ }
422
+ declare function TruncatedText({ children, className, maxWidth, tooltipSide, }: TruncatedTextProps): react_jsx_runtime.JSX.Element;
423
+
424
+ declare const TAG_COLORS: {
425
+ hex: string;
426
+ name: string;
427
+ }[];
428
+ interface ColorPaletteProps {
429
+ value: string;
430
+ onChange: (color: string) => void;
431
+ columns?: number;
432
+ className?: string;
433
+ }
434
+ declare function ColorPalette({ value, onChange, columns, className }: ColorPaletteProps): react_jsx_runtime.JSX.Element;
435
+ declare function getRandomTagColor(): string;
436
+ declare function getNextTagColor(currentColor: string): string;
437
+ declare function getNextAvailableColor(usedColors: string[]): string;
438
+
439
+ type ConfirmDialogVariant = 'default' | 'destructive' | 'warning' | 'success';
440
+ interface ConfirmDialogProps {
441
+ open: boolean;
442
+ onOpenChange: (open: boolean) => void;
443
+ title: string;
444
+ description: string;
445
+ confirmLabel?: string;
446
+ cancelLabel?: string;
447
+ variant?: ConfirmDialogVariant;
448
+ icon?: LucideIcon;
449
+ onConfirm: () => void;
450
+ onCancel?: () => void;
451
+ loading?: boolean;
452
+ }
453
+ declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, variant, icon, onConfirm, onCancel, loading, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
454
+ /**
455
+ * Hook to manage confirm dialog state
456
+ */
457
+ declare function useConfirmDialog(): {
458
+ confirm: (options: {
459
+ title: string;
460
+ description: string;
461
+ confirmLabel?: string;
462
+ cancelLabel?: string;
463
+ variant?: ConfirmDialogVariant;
464
+ }) => Promise<boolean>;
465
+ dialogProps: {
466
+ onOpenChange: (open: boolean) => void;
467
+ onCancel: () => void;
468
+ open: boolean;
469
+ title: string;
470
+ description: string;
471
+ confirmLabel?: string;
472
+ cancelLabel?: string;
473
+ variant?: ConfirmDialogVariant;
474
+ onConfirm: () => void;
475
+ };
476
+ ConfirmDialog: typeof ConfirmDialog;
477
+ };
478
+
479
+ interface ResizableDialogRenderProps {
480
+ isFullscreen: boolean;
481
+ }
482
+ interface ResizableDialogProps {
483
+ open: boolean;
484
+ onOpenChange: (open: boolean) => void;
485
+ title?: React.ReactNode;
486
+ children: React.ReactNode | ((props: ResizableDialogRenderProps) => React.ReactNode);
487
+ footer?: React.ReactNode;
488
+ defaultWidth?: number;
489
+ defaultHeight?: number;
490
+ minWidth?: number;
491
+ minHeight?: number;
492
+ className?: string;
493
+ onFullscreenChange?: (isFullscreen: boolean) => void;
494
+ }
495
+ declare function ResizableDialog({ open, onOpenChange, title, children, footer, defaultWidth, defaultHeight, minWidth, minHeight, className, onFullscreenChange, }: ResizableDialogProps): react_jsx_runtime.JSX.Element;
496
+
497
+ interface ContextMenuPosition {
498
+ x: number;
499
+ y: number;
500
+ }
501
+ interface ContextMenuProps {
502
+ position: ContextMenuPosition;
503
+ onClose: () => void;
504
+ children: ReactNode;
505
+ className?: string;
506
+ }
507
+ /**
508
+ * Base context menu container with positioning, close-on-outside-click,
509
+ * and close-on-scroll behavior. Automatically adjusts position to stay within viewport.
510
+ */
511
+ declare function ContextMenu({ position, onClose, children, className }: ContextMenuProps): react_jsx_runtime.JSX.Element;
512
+
513
+ interface ContextMenuItemProps {
514
+ onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
515
+ onMouseEnter?: () => void;
516
+ icon?: ReactNode;
517
+ children: ReactNode;
518
+ /** Use 'default' for standard items, or specify a color variant */
519
+ variant?: 'default' | 'success' | 'warning' | 'destructive' | 'purple';
520
+ disabled?: boolean;
521
+ className?: string;
522
+ }
523
+ /**
524
+ * A single menu item for the context menu.
525
+ */
526
+ declare function ContextMenuItem({ onClick, onMouseEnter, icon, children, variant, disabled, className, }: ContextMenuItemProps): react_jsx_runtime.JSX.Element;
527
+ /**
528
+ * Horizontal separator for context menu sections.
529
+ */
530
+ declare function ContextMenuSeparator(): react_jsx_runtime.JSX.Element;
531
+
532
+ interface ContextMenuSubmenuProps {
533
+ label: string;
534
+ icon?: ReactNode;
535
+ children: ReactNode;
536
+ /** Callback when this submenu opens (useful for closing other submenus) */
537
+ onOpen?: () => void;
538
+ /** External control for open state */
539
+ isOpen?: boolean;
540
+ /** External control for setting open state */
541
+ onOpenChange?: (open: boolean) => void;
542
+ className?: string;
543
+ }
544
+ /**
545
+ * A hoverable submenu that opens to the right of the trigger.
546
+ * Can be controlled externally or manage its own state.
547
+ */
548
+ declare function ContextMenuSubmenu({ label, icon, children, onOpen, isOpen: externalIsOpen, onOpenChange, className, }: ContextMenuSubmenuProps): react_jsx_runtime.JSX.Element;
549
+
550
+ interface CodeViewerProps {
551
+ code: string;
552
+ language?: string;
553
+ filename?: string;
554
+ lineStart?: number;
555
+ highlightLines?: number[];
556
+ className?: string;
557
+ showLineNumbers?: boolean;
558
+ showFilename?: boolean;
559
+ autoScrollToHighlight?: boolean;
560
+ }
561
+ /**
562
+ * Code viewer with syntax highlighting, line numbers, and highlighted line support.
563
+ *
564
+ * @example
565
+ * ```tsx
566
+ * <CodeViewer
567
+ * code={sourceCode}
568
+ * filename="example.ts"
569
+ * highlightLines={[5, 6, 7]}
570
+ * lineStart={10}
571
+ * />
572
+ * ```
573
+ */
574
+ declare function CodeViewer({ code, language, filename, lineStart, highlightLines, className, showLineNumbers, showFilename, autoScrollToHighlight, }: CodeViewerProps): react_jsx_runtime.JSX.Element;
575
+
576
+ /**
577
+ * Compact version for inline code snippets without line numbers.
578
+ */
579
+ declare function CodeSnippet({ code, language, filename, className, }: {
580
+ code: string;
581
+ language?: string;
582
+ filename?: string;
583
+ className?: string;
584
+ }): react_jsx_runtime.JSX.Element;
585
+
406
586
  /**
407
587
  * Date formatting utilities for displaying relative time
408
588
  */
@@ -432,6 +612,28 @@ declare function formatDuration(seconds: number): string;
432
612
  */
433
613
  declare function formatShortRelativeTime(date: Date | string | number): string;
434
614
 
615
+ /**
616
+ * Number and byte formatting utilities
617
+ */
618
+ /**
619
+ * Formats bytes to human-readable size
620
+ * @param bytes - Number of bytes
621
+ * @returns Formatted string (e.g., "1.50 KB", "2.30 MB")
622
+ */
623
+ declare function formatBytes(bytes: number): string;
624
+ /**
625
+ * Formats large numbers with K/M suffixes
626
+ * @param num - Number to format
627
+ * @returns Formatted string (e.g., "1.5K", "2.3M")
628
+ */
629
+ declare function formatNumber(num: number): string;
630
+ /**
631
+ * Formats duration in milliseconds to human-readable format
632
+ * @param ms - Duration in milliseconds
633
+ * @returns Formatted duration string (e.g., "2h 15m", "45s")
634
+ */
635
+ declare function formatDurationMs(ms: number): string;
636
+
435
637
  declare function getTagColor(tag: string): {
436
638
  bg: string;
437
639
  text: string;
@@ -1218,4 +1420,4 @@ declare const statusStyles: {
1218
1420
  };
1219
1421
  };
1220
1422
 
1221
- export { ActivityLED, type ActivityLEDProps, Alert, AlertDescription, AlertTitle, type ApiReadinessOptions, type ApiReadinessResult, AppLayout, type AppLayoutProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardHeader, type CardProps, CardSkeleton, CardTitle, Checkbox, CompactStat, type CompactStatProps, CompactThemeToggle, ConnectionIndicator, ConnectionLostOverlay, ConnectionOverlay, ConnectionStatus$1 as ConnectionStatus, ConnectionStatusBanner, DashboardStats, type DashboardStatsProps, type DataColumn, DeviceIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DogEarBadge, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStates, type FormState, HelpTooltip, Input, type InputProps, Label, LoadingState, type LogEntry, type LogFile, LogStats, type LogStatsProps, LogViewer, type LogViewerProps, LoginPage, LogsPage, type LogsPageProps, MarkdownCard, MarkdownScrollArea, MarkdownViewer, type NavItem, NetworkInterfaceSelect, NoSearchResults, NoSimulatorsRunning, NoTemplatesFound, Popover, PopoverContent, PopoverTrigger, Progress, ProtectedRoute, RealtimeDataTable, type RealtimeDataTableProps, RestartBanner, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SettingDefinition$1 as SettingDefinition, type SettingsCategory$1 as SettingsCategory, SettingsFramework, SettingsPage, type SettingsPageProps, SidebarLayout, type SidebarLayoutProps, Slider, type SocketIOActions, type SocketIOConfig, type SocketIOState, Sparkline, type SparklineProps, type StatCard, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TestModeIndicator, Textarea, type TextareaProps, type Theme, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpdateNotification, type UseFormStateOptions, activityStyles, apiRequest, authHandler, badgeVariants, buttonStyles, buttonVariants, cardStyles, checkApiReadiness, cn, createSettingsCategory, defaultSettingsCategories, emptyStateStyles, formatDateTime, formatDuration, formatRelativeTime, formatShortRelativeTime, getCSSVariables, getTagClassName, getTagColor, socketManager, statusStyles, theme, timeAgo, useApiReadiness, useConnectionStatus, useDebounce, useFormState, useSocketIO, useTheme, waitForApiReady };
1423
+ export { ActivityLED, type ActivityLEDProps, Alert, AlertDescription, AlertTitle, type ApiReadinessOptions, type ApiReadinessResult, AppLayout, type AppLayoutProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardHeader, type CardProps, CardSkeleton, CardTitle, Checkbox, CodeSnippet, CodeViewer, type CodeViewerProps, ColorPalette, CompactStat, type CompactStatProps, CompactThemeToggle, ConfirmDialog, type ConfirmDialogVariant, ConnectionIndicator, ConnectionLostOverlay, ConnectionOverlay, ConnectionStatus$1 as ConnectionStatus, ConnectionStatusBanner, ContextMenu, ContextMenuItem, type ContextMenuItemProps, type ContextMenuPosition, type ContextMenuProps, ContextMenuSeparator, ContextMenuSubmenu, type ContextMenuSubmenuProps, DashboardStats, type DashboardStatsProps, type DataColumn, DeviceIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DogEarBadge, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStates, type FormState, HelpTooltip, Input, type InputProps, Label, LoadingState, type LogEntry, type LogFile, LogStats, type LogStatsProps, LogViewer, type LogViewerProps, LoginPage, LogsPage, type LogsPageProps, MarkdownCard, MarkdownScrollArea, MarkdownViewer, type NavItem, NetworkInterfaceSelect, NoSearchResults, NoSimulatorsRunning, NoTemplatesFound, Popover, PopoverContent, PopoverTrigger, Progress, ProtectedRoute, RealtimeDataTable, type RealtimeDataTableProps, ResizableDialog, RestartBanner, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SettingDefinition$1 as SettingDefinition, type SettingsCategory$1 as SettingsCategory, SettingsFramework, SettingsPage, type SettingsPageProps, SidebarLayout, type SidebarLayoutProps, Slider, type SocketIOActions, type SocketIOConfig, type SocketIOState, Sparkline, type SparklineProps, type StatCard, Switch, TAG_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TestModeIndicator, Textarea, type TextareaProps, type Theme, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedText, UpdateNotification, type UseFormStateOptions, activityStyles, apiRequest, authHandler, badgeVariants, buttonStyles, buttonVariants, cardStyles, checkApiReadiness, cn, createSettingsCategory, defaultSettingsCategories, emptyStateStyles, formatBytes, formatDateTime, formatDuration, formatDurationMs, formatNumber, formatRelativeTime, formatShortRelativeTime, getCSSVariables, getNextAvailableColor, getNextTagColor, getRandomTagColor, getTagClassName, getTagColor, socketManager, statusStyles, theme, timeAgo, useApiReadiness, useConfirmDialog, useConnectionStatus, useDebounce, useFormState, useSocketIO, useTheme, waitForApiReady };
@@ -1,6 +1,6 @@
1
1
  import * as class_variance_authority_types from 'class-variance-authority/types';
2
2
  import * as React$1 from 'react';
3
- import React__default, { ReactNode } from 'react';
3
+ import React__default, { ReactNode, MouseEvent } from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
6
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
@@ -195,10 +195,20 @@ declare function ProtectedRoute({ children, loginPath, authEndpoint, loadingComp
195
195
 
196
196
  interface LogsPageProps {
197
197
  apiUrl?: string;
198
- title?: string;
199
- description?: string;
200
198
  }
201
- declare function LogsPage({ apiUrl, title, description }: LogsPageProps): react_jsx_runtime.JSX.Element;
199
+ /**
200
+ * A complete logs page component with file list and live log viewer
201
+ *
202
+ * @example
203
+ * ```tsx
204
+ * import { LogsPage } from '@superdangerous/app-framework/ui';
205
+ *
206
+ * function App() {
207
+ * return <LogsPage apiUrl="/api/logs" />;
208
+ * }
209
+ * ```
210
+ */
211
+ declare function LogsPage({ apiUrl }: LogsPageProps): react_jsx_runtime.JSX.Element;
202
212
 
203
213
  interface SettingDefinition$1 {
204
214
  key: string;
@@ -403,6 +413,176 @@ declare function MarkdownScrollArea({ content, className, height, ...props }: Ma
403
413
  height?: string;
404
414
  }): react_jsx_runtime.JSX.Element;
405
415
 
416
+ interface TruncatedTextProps {
417
+ children: ReactNode;
418
+ className?: string;
419
+ maxWidth?: string | number;
420
+ tooltipSide?: 'top' | 'right' | 'bottom' | 'left';
421
+ }
422
+ declare function TruncatedText({ children, className, maxWidth, tooltipSide, }: TruncatedTextProps): react_jsx_runtime.JSX.Element;
423
+
424
+ declare const TAG_COLORS: {
425
+ hex: string;
426
+ name: string;
427
+ }[];
428
+ interface ColorPaletteProps {
429
+ value: string;
430
+ onChange: (color: string) => void;
431
+ columns?: number;
432
+ className?: string;
433
+ }
434
+ declare function ColorPalette({ value, onChange, columns, className }: ColorPaletteProps): react_jsx_runtime.JSX.Element;
435
+ declare function getRandomTagColor(): string;
436
+ declare function getNextTagColor(currentColor: string): string;
437
+ declare function getNextAvailableColor(usedColors: string[]): string;
438
+
439
+ type ConfirmDialogVariant = 'default' | 'destructive' | 'warning' | 'success';
440
+ interface ConfirmDialogProps {
441
+ open: boolean;
442
+ onOpenChange: (open: boolean) => void;
443
+ title: string;
444
+ description: string;
445
+ confirmLabel?: string;
446
+ cancelLabel?: string;
447
+ variant?: ConfirmDialogVariant;
448
+ icon?: LucideIcon;
449
+ onConfirm: () => void;
450
+ onCancel?: () => void;
451
+ loading?: boolean;
452
+ }
453
+ declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, variant, icon, onConfirm, onCancel, loading, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
454
+ /**
455
+ * Hook to manage confirm dialog state
456
+ */
457
+ declare function useConfirmDialog(): {
458
+ confirm: (options: {
459
+ title: string;
460
+ description: string;
461
+ confirmLabel?: string;
462
+ cancelLabel?: string;
463
+ variant?: ConfirmDialogVariant;
464
+ }) => Promise<boolean>;
465
+ dialogProps: {
466
+ onOpenChange: (open: boolean) => void;
467
+ onCancel: () => void;
468
+ open: boolean;
469
+ title: string;
470
+ description: string;
471
+ confirmLabel?: string;
472
+ cancelLabel?: string;
473
+ variant?: ConfirmDialogVariant;
474
+ onConfirm: () => void;
475
+ };
476
+ ConfirmDialog: typeof ConfirmDialog;
477
+ };
478
+
479
+ interface ResizableDialogRenderProps {
480
+ isFullscreen: boolean;
481
+ }
482
+ interface ResizableDialogProps {
483
+ open: boolean;
484
+ onOpenChange: (open: boolean) => void;
485
+ title?: React.ReactNode;
486
+ children: React.ReactNode | ((props: ResizableDialogRenderProps) => React.ReactNode);
487
+ footer?: React.ReactNode;
488
+ defaultWidth?: number;
489
+ defaultHeight?: number;
490
+ minWidth?: number;
491
+ minHeight?: number;
492
+ className?: string;
493
+ onFullscreenChange?: (isFullscreen: boolean) => void;
494
+ }
495
+ declare function ResizableDialog({ open, onOpenChange, title, children, footer, defaultWidth, defaultHeight, minWidth, minHeight, className, onFullscreenChange, }: ResizableDialogProps): react_jsx_runtime.JSX.Element;
496
+
497
+ interface ContextMenuPosition {
498
+ x: number;
499
+ y: number;
500
+ }
501
+ interface ContextMenuProps {
502
+ position: ContextMenuPosition;
503
+ onClose: () => void;
504
+ children: ReactNode;
505
+ className?: string;
506
+ }
507
+ /**
508
+ * Base context menu container with positioning, close-on-outside-click,
509
+ * and close-on-scroll behavior. Automatically adjusts position to stay within viewport.
510
+ */
511
+ declare function ContextMenu({ position, onClose, children, className }: ContextMenuProps): react_jsx_runtime.JSX.Element;
512
+
513
+ interface ContextMenuItemProps {
514
+ onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
515
+ onMouseEnter?: () => void;
516
+ icon?: ReactNode;
517
+ children: ReactNode;
518
+ /** Use 'default' for standard items, or specify a color variant */
519
+ variant?: 'default' | 'success' | 'warning' | 'destructive' | 'purple';
520
+ disabled?: boolean;
521
+ className?: string;
522
+ }
523
+ /**
524
+ * A single menu item for the context menu.
525
+ */
526
+ declare function ContextMenuItem({ onClick, onMouseEnter, icon, children, variant, disabled, className, }: ContextMenuItemProps): react_jsx_runtime.JSX.Element;
527
+ /**
528
+ * Horizontal separator for context menu sections.
529
+ */
530
+ declare function ContextMenuSeparator(): react_jsx_runtime.JSX.Element;
531
+
532
+ interface ContextMenuSubmenuProps {
533
+ label: string;
534
+ icon?: ReactNode;
535
+ children: ReactNode;
536
+ /** Callback when this submenu opens (useful for closing other submenus) */
537
+ onOpen?: () => void;
538
+ /** External control for open state */
539
+ isOpen?: boolean;
540
+ /** External control for setting open state */
541
+ onOpenChange?: (open: boolean) => void;
542
+ className?: string;
543
+ }
544
+ /**
545
+ * A hoverable submenu that opens to the right of the trigger.
546
+ * Can be controlled externally or manage its own state.
547
+ */
548
+ declare function ContextMenuSubmenu({ label, icon, children, onOpen, isOpen: externalIsOpen, onOpenChange, className, }: ContextMenuSubmenuProps): react_jsx_runtime.JSX.Element;
549
+
550
+ interface CodeViewerProps {
551
+ code: string;
552
+ language?: string;
553
+ filename?: string;
554
+ lineStart?: number;
555
+ highlightLines?: number[];
556
+ className?: string;
557
+ showLineNumbers?: boolean;
558
+ showFilename?: boolean;
559
+ autoScrollToHighlight?: boolean;
560
+ }
561
+ /**
562
+ * Code viewer with syntax highlighting, line numbers, and highlighted line support.
563
+ *
564
+ * @example
565
+ * ```tsx
566
+ * <CodeViewer
567
+ * code={sourceCode}
568
+ * filename="example.ts"
569
+ * highlightLines={[5, 6, 7]}
570
+ * lineStart={10}
571
+ * />
572
+ * ```
573
+ */
574
+ declare function CodeViewer({ code, language, filename, lineStart, highlightLines, className, showLineNumbers, showFilename, autoScrollToHighlight, }: CodeViewerProps): react_jsx_runtime.JSX.Element;
575
+
576
+ /**
577
+ * Compact version for inline code snippets without line numbers.
578
+ */
579
+ declare function CodeSnippet({ code, language, filename, className, }: {
580
+ code: string;
581
+ language?: string;
582
+ filename?: string;
583
+ className?: string;
584
+ }): react_jsx_runtime.JSX.Element;
585
+
406
586
  /**
407
587
  * Date formatting utilities for displaying relative time
408
588
  */
@@ -432,6 +612,28 @@ declare function formatDuration(seconds: number): string;
432
612
  */
433
613
  declare function formatShortRelativeTime(date: Date | string | number): string;
434
614
 
615
+ /**
616
+ * Number and byte formatting utilities
617
+ */
618
+ /**
619
+ * Formats bytes to human-readable size
620
+ * @param bytes - Number of bytes
621
+ * @returns Formatted string (e.g., "1.50 KB", "2.30 MB")
622
+ */
623
+ declare function formatBytes(bytes: number): string;
624
+ /**
625
+ * Formats large numbers with K/M suffixes
626
+ * @param num - Number to format
627
+ * @returns Formatted string (e.g., "1.5K", "2.3M")
628
+ */
629
+ declare function formatNumber(num: number): string;
630
+ /**
631
+ * Formats duration in milliseconds to human-readable format
632
+ * @param ms - Duration in milliseconds
633
+ * @returns Formatted duration string (e.g., "2h 15m", "45s")
634
+ */
635
+ declare function formatDurationMs(ms: number): string;
636
+
435
637
  declare function getTagColor(tag: string): {
436
638
  bg: string;
437
639
  text: string;
@@ -1218,4 +1420,4 @@ declare const statusStyles: {
1218
1420
  };
1219
1421
  };
1220
1422
 
1221
- export { ActivityLED, type ActivityLEDProps, Alert, AlertDescription, AlertTitle, type ApiReadinessOptions, type ApiReadinessResult, AppLayout, type AppLayoutProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardHeader, type CardProps, CardSkeleton, CardTitle, Checkbox, CompactStat, type CompactStatProps, CompactThemeToggle, ConnectionIndicator, ConnectionLostOverlay, ConnectionOverlay, ConnectionStatus$1 as ConnectionStatus, ConnectionStatusBanner, DashboardStats, type DashboardStatsProps, type DataColumn, DeviceIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DogEarBadge, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStates, type FormState, HelpTooltip, Input, type InputProps, Label, LoadingState, type LogEntry, type LogFile, LogStats, type LogStatsProps, LogViewer, type LogViewerProps, LoginPage, LogsPage, type LogsPageProps, MarkdownCard, MarkdownScrollArea, MarkdownViewer, type NavItem, NetworkInterfaceSelect, NoSearchResults, NoSimulatorsRunning, NoTemplatesFound, Popover, PopoverContent, PopoverTrigger, Progress, ProtectedRoute, RealtimeDataTable, type RealtimeDataTableProps, RestartBanner, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SettingDefinition$1 as SettingDefinition, type SettingsCategory$1 as SettingsCategory, SettingsFramework, SettingsPage, type SettingsPageProps, SidebarLayout, type SidebarLayoutProps, Slider, type SocketIOActions, type SocketIOConfig, type SocketIOState, Sparkline, type SparklineProps, type StatCard, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TestModeIndicator, Textarea, type TextareaProps, type Theme, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpdateNotification, type UseFormStateOptions, activityStyles, apiRequest, authHandler, badgeVariants, buttonStyles, buttonVariants, cardStyles, checkApiReadiness, cn, createSettingsCategory, defaultSettingsCategories, emptyStateStyles, formatDateTime, formatDuration, formatRelativeTime, formatShortRelativeTime, getCSSVariables, getTagClassName, getTagColor, socketManager, statusStyles, theme, timeAgo, useApiReadiness, useConnectionStatus, useDebounce, useFormState, useSocketIO, useTheme, waitForApiReady };
1423
+ export { ActivityLED, type ActivityLEDProps, Alert, AlertDescription, AlertTitle, type ApiReadinessOptions, type ApiReadinessResult, AppLayout, type AppLayoutProps, Badge, type BadgeProps, Button, type ButtonProps, Card, CardContent, CardHeader, type CardProps, CardSkeleton, CardTitle, Checkbox, CodeSnippet, CodeViewer, type CodeViewerProps, ColorPalette, CompactStat, type CompactStatProps, CompactThemeToggle, ConfirmDialog, type ConfirmDialogVariant, ConnectionIndicator, ConnectionLostOverlay, ConnectionOverlay, ConnectionStatus$1 as ConnectionStatus, ConnectionStatusBanner, ContextMenu, ContextMenuItem, type ContextMenuItemProps, type ContextMenuPosition, type ContextMenuProps, ContextMenuSeparator, ContextMenuSubmenu, type ContextMenuSubmenuProps, DashboardStats, type DashboardStatsProps, type DataColumn, DeviceIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DogEarBadge, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStates, type FormState, HelpTooltip, Input, type InputProps, Label, LoadingState, type LogEntry, type LogFile, LogStats, type LogStatsProps, LogViewer, type LogViewerProps, LoginPage, LogsPage, type LogsPageProps, MarkdownCard, MarkdownScrollArea, MarkdownViewer, type NavItem, NetworkInterfaceSelect, NoSearchResults, NoSimulatorsRunning, NoTemplatesFound, Popover, PopoverContent, PopoverTrigger, Progress, ProtectedRoute, RealtimeDataTable, type RealtimeDataTableProps, ResizableDialog, RestartBanner, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SettingDefinition$1 as SettingDefinition, type SettingsCategory$1 as SettingsCategory, SettingsFramework, SettingsPage, type SettingsPageProps, SidebarLayout, type SidebarLayoutProps, Slider, type SocketIOActions, type SocketIOConfig, type SocketIOState, Sparkline, type SparklineProps, type StatCard, Switch, TAG_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TestModeIndicator, Textarea, type TextareaProps, type Theme, type ThemeConfig, type ThemeMode, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedText, UpdateNotification, type UseFormStateOptions, activityStyles, apiRequest, authHandler, badgeVariants, buttonStyles, buttonVariants, cardStyles, checkApiReadiness, cn, createSettingsCategory, defaultSettingsCategories, emptyStateStyles, formatBytes, formatDateTime, formatDuration, formatDurationMs, formatNumber, formatRelativeTime, formatShortRelativeTime, getCSSVariables, getNextAvailableColor, getNextTagColor, getRandomTagColor, getTagClassName, getTagColor, socketManager, statusStyles, theme, timeAgo, useApiReadiness, useConfirmDialog, useConnectionStatus, useDebounce, useFormState, useSocketIO, useTheme, waitForApiReady };