react-os-shell 4.15.0 → 4.20.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.
Files changed (95) hide show
  1. package/README.md +46 -0
  2. package/dist/{Browser-XV34CJFP.js → Browser-2TRNQ4MK.js} +9 -6
  3. package/dist/Browser-2TRNQ4MK.js.map +1 -0
  4. package/dist/{Calculator-FFCYNYU3.js → Calculator-QCAJ6ITI.js} +8 -5
  5. package/dist/Calculator-QCAJ6ITI.js.map +1 -0
  6. package/dist/ConfirmDialog-WAM5OKAV.js +3 -0
  7. package/dist/{ConfirmDialog-CXHJCDUL.js.map → ConfirmDialog-WAM5OKAV.js.map} +1 -1
  8. package/dist/{CurrencyConverter-3NCK7WY6.js → CurrencyConverter-PCYC6RL5.js} +8 -5
  9. package/dist/CurrencyConverter-PCYC6RL5.js.map +1 -0
  10. package/dist/{Documents-S6EQOLUF.js → Documents-O5TEGSYH.js} +10 -7
  11. package/dist/Documents-O5TEGSYH.js.map +1 -0
  12. package/dist/{Files-TFZNYXAH.js → Files-CD3FTPLK.js} +16 -12
  13. package/dist/Files-CD3FTPLK.js.map +1 -0
  14. package/dist/{Notepad-EAA6CXZX.js → Notepad-5KZS7PUJ.js} +10 -7
  15. package/dist/Notepad-5KZS7PUJ.js.map +1 -0
  16. package/dist/{PomodoroTimer-BXI752XM.js → PomodoroTimer-YABFEPEV.js} +10 -7
  17. package/dist/PomodoroTimer-YABFEPEV.js.map +1 -0
  18. package/dist/{Preview-ZKYM7A5X.js → Preview-UUNXWQME.js} +11 -8
  19. package/dist/Preview-UUNXWQME.js.map +1 -0
  20. package/dist/{Sidebar-IMACKSHS.js → Sidebar-B3LY5T2U.js} +5 -4
  21. package/dist/Sidebar-B3LY5T2U.js.map +1 -0
  22. package/dist/{Spreadsheet-BXOPROMB.js → Spreadsheet-DB5GMW2X.js} +10 -7
  23. package/dist/Spreadsheet-DB5GMW2X.js.map +1 -0
  24. package/dist/{Stock-BEQCSYNT.js → Stock-IPLLRUOC.js} +8 -5
  25. package/dist/Stock-IPLLRUOC.js.map +1 -0
  26. package/dist/{Weather-QPV6G7UN.js → Weather-SI5QN7X2.js} +8 -5
  27. package/dist/Weather-SI5QN7X2.js.map +1 -0
  28. package/dist/{WorldClock-I3ZE57V4.js → WorldClock-WYDSMUWX.js} +8 -5
  29. package/dist/WorldClock-WYDSMUWX.js.map +1 -0
  30. package/dist/apps/index.js +22 -19
  31. package/dist/apps/index.js.map +1 -1
  32. package/dist/chunk-22BNPLM4.js +46 -0
  33. package/dist/chunk-22BNPLM4.js.map +1 -0
  34. package/dist/{chunk-IVLDAUYM.js → chunk-3CUSBZWG.js} +3 -56
  35. package/dist/chunk-3CUSBZWG.js.map +1 -0
  36. package/dist/{chunk-VENYVK3L.js → chunk-4AKVHY4B.js} +48 -12
  37. package/dist/chunk-4AKVHY4B.js.map +1 -0
  38. package/dist/chunk-C22EFSND.js +188 -0
  39. package/dist/chunk-C22EFSND.js.map +1 -0
  40. package/dist/{chunk-LFTHOYKW.js → chunk-CZH7CN3S.js} +5 -5
  41. package/dist/{chunk-LFTHOYKW.js.map → chunk-CZH7CN3S.js.map} +1 -1
  42. package/dist/chunk-EGM44WML.js +5008 -0
  43. package/dist/chunk-EGM44WML.js.map +1 -0
  44. package/dist/{chunk-H4IEH6FK.js → chunk-EWDYCO65.js} +3 -3
  45. package/dist/{chunk-H4IEH6FK.js.map → chunk-EWDYCO65.js.map} +1 -1
  46. package/dist/{chunk-DINNWYVB.js → chunk-HYAW6KIL.js} +4 -45
  47. package/dist/chunk-HYAW6KIL.js.map +1 -0
  48. package/dist/{chunk-H3HFM4JQ.js → chunk-IGPSRRL7.js} +262 -712
  49. package/dist/chunk-IGPSRRL7.js.map +1 -0
  50. package/dist/chunk-L2O6B5KT.js +394 -0
  51. package/dist/chunk-L2O6B5KT.js.map +1 -0
  52. package/dist/{chunk-YS4ZW2P7.js → chunk-OI253GOA.js} +4 -4
  53. package/dist/{chunk-YS4ZW2P7.js.map → chunk-OI253GOA.js.map} +1 -1
  54. package/dist/{chunk-ZPCGIR62.js → chunk-OQ7GRU7G.js} +3 -3
  55. package/dist/{chunk-ZPCGIR62.js.map → chunk-OQ7GRU7G.js.map} +1 -1
  56. package/dist/{chunk-7J3HTJJ3.js → chunk-Q3AOIJ7B.js} +3 -3
  57. package/dist/{chunk-7J3HTJJ3.js.map → chunk-Q3AOIJ7B.js.map} +1 -1
  58. package/dist/{chunk-N2UW3CAS.js → chunk-QJS6RBH4.js} +3 -3
  59. package/dist/{chunk-N2UW3CAS.js.map → chunk-QJS6RBH4.js.map} +1 -1
  60. package/dist/chunk-WNLPTLT6.js +56 -0
  61. package/dist/chunk-WNLPTLT6.js.map +1 -0
  62. package/dist/{chunk-QU5L5ZYM.js → chunk-X5PZYTAK.js} +3 -3
  63. package/dist/{chunk-QU5L5ZYM.js.map → chunk-X5PZYTAK.js.map} +1 -1
  64. package/dist/chunk-ZKQHO2Z7.js +7 -0
  65. package/dist/{chunk-F562QDVS.js.map → chunk-ZKQHO2Z7.js.map} +1 -1
  66. package/dist/index-C5c6FA0c.d.ts +1931 -0
  67. package/dist/index.d.ts +7 -1375
  68. package/dist/index.js +159 -4082
  69. package/dist/index.js.map +1 -1
  70. package/dist/shell.css +105 -0
  71. package/dist/styles.css +12 -501
  72. package/dist/ui/index.d.ts +3 -0
  73. package/dist/ui/index.js +11 -0
  74. package/dist/ui/index.js.map +1 -0
  75. package/dist/ui.css +425 -0
  76. package/package.json +7 -2
  77. package/dist/Browser-XV34CJFP.js.map +0 -1
  78. package/dist/Calculator-FFCYNYU3.js.map +0 -1
  79. package/dist/ConfirmDialog-CXHJCDUL.js +0 -4
  80. package/dist/CurrencyConverter-3NCK7WY6.js.map +0 -1
  81. package/dist/Documents-S6EQOLUF.js.map +0 -1
  82. package/dist/Files-TFZNYXAH.js.map +0 -1
  83. package/dist/Notepad-EAA6CXZX.js.map +0 -1
  84. package/dist/PomodoroTimer-BXI752XM.js.map +0 -1
  85. package/dist/Preview-ZKYM7A5X.js.map +0 -1
  86. package/dist/Sidebar-IMACKSHS.js.map +0 -1
  87. package/dist/Spreadsheet-BXOPROMB.js.map +0 -1
  88. package/dist/Stock-BEQCSYNT.js.map +0 -1
  89. package/dist/Weather-QPV6G7UN.js.map +0 -1
  90. package/dist/WorldClock-I3ZE57V4.js.map +0 -1
  91. package/dist/chunk-DINNWYVB.js.map +0 -1
  92. package/dist/chunk-F562QDVS.js +0 -7
  93. package/dist/chunk-H3HFM4JQ.js.map +0 -1
  94. package/dist/chunk-IVLDAUYM.js.map +0 -1
  95. package/dist/chunk-VENYVK3L.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
+ import { C as ColumnDef, S as SortState, P as PaginatedResponse } from './index-C5c6FA0c.js';
2
+ export { A as ALT, a as ALT_SHIFT_D, b as ALT_SHIFT_E, c as ALT_SHIFT_N, d as Accordion, e as AccordionItem, f as AccordionProps, g as Align, h as AuthScreen, i as AuthScreenProps, j as Avatar, k as AvatarGroup, l as AvatarGroupProps, m as AvatarProps, n as AvatarSize, o as AvatarStatus, B as Banner, p as BannerEmphasis, q as BannerProps, r as BannerTone, s as BarChart, t as BarChartProps, u as BreadcrumbItem, v as Breadcrumbs, w as BreadcrumbsProps, x as Button, y as ButtonProps, z as ButtonSize, D as ButtonVariant, E as CMD_A, F as CMD_DOT, G as CMD_ENTER, H as CMD_K, I as CMD_S, J as Card, K as CardPadding, L as CardProps, M as CellStyle, N as ChatTemplate, O as Checkbox, Q as CheckboxProps, R as CheckoutTemplate, T as ColoredBadge, U as ColoredBadgeProps, V as ConfirmProvider, W as ContainerFillChart, X as ContainerFillChartProps, Y as ContainerFillItem, Z as CountBadge, _ as CountBadgeProps, $ as CountBadgeTone, a0 as DashboardTemplate, a1 as DataTable, a2 as DataTableColumn, a3 as DataTablePage, a4 as DataTableProps, a5 as DateRangePicker, a6 as DateRangePickerProps, a7 as DescriptionColumns, a8 as DescriptionItem, a9 as DescriptionList, aa as DescriptionListProps, ab as Dialog, ac as DialogProps, ad as DialogSize, ae as Divider, af as DividerProps, ag as DividerSpacing, ah as DonutChart, ai as DonutChartProps, aj as DonutSegment, ak as Drawer, al as DrawerProps, am as DrawerSide, an as DrawerSize, ao as ENTER, ap as EditableGrid, aq as EditableGridProps, ar as EmailTemplate, as as EmptyState, at as EmptyStateProps, au as ErrorPage, av as ErrorPageProps, aw as FilePicker, ax as FilePickerProps, ay as FormField, az as FormFieldProps, aA as FormLayoutPage, aB as GLASS_DIVIDER, aC as GLASS_INPUT_BG, aD as GalleryTemplate, aE as Gap, aF as Grid, aG as GridCols, aH as GridColumn, aI as GridProps, aJ as HelpCenter, aK as HelpCenterDoc, aL as HelpCenterProps, aM as INPUT_BASE, aN as INPUT_SIZES, aO as Inline, aP as InlineProps, aQ as Input, aR as InputNumber, aS as InputNumberProps, aT as InputProps, aU as InputSize, aV as Justify, aW as Kanban, aX as KanbanColumn, aY as KanbanProps, aZ as Label, a_ as LabelProps, a$ as ListFooter, b0 as ListLoadError, b1 as ListLoadErrorProps, b2 as LoadingSpinner, b3 as LoadingSpinnerProps, b4 as MAX_FRACTION_DIGITS, b5 as MOD, b6 as Markdown, b7 as MarkdownProps, b8 as MediaUploadField, b9 as MediaUploadFieldProps, ba as MediaUploadGrid, bb as MediaUploadGridItem, bc as MediaUploadGridProps, bd as MetricBar, be as MetricBarProps, bf as Milestone, bg as MilestoneKind, bh as MilestoneTimeline, bi as MilestoneTimelineProps, bj as NativeSelect, bk as NumericKeypad, bl as NumericKeypadProps, bm as PageHeader, bn as PageHeaderProps, bo as Pagination, bp as PaginationProps, bq as Paragraph, br as ParagraphProps, bs as PopupMenu, bt as PopupMenuDivider, bu as PopupMenuItem, bv as PopupMenuLabel, bw as Radio, bx as RadioProps, by as Result, bz as ResultProps, bA as ResultStatus, bB as SHIFT, bC as SearchableOption, bD as SearchableSelect, bE as SearchableSelectProps, bF as Segmented, bG as SegmentedOption, bH as SegmentedProps, bI as SegmentedSize, bJ as Select, bK as SelectOption, bL as SelectProps, bM as SemanticGroup, bN as SeverityTone, bO as ShellPrefsAdapter, bP as ShellPrefsProvider, bQ as SidebarActionButton, bR as SidebarActionButtonProps, bS as SidebarGroupLabel, bT as SidebarLayout, bU as SidebarLayoutProps, bV as SidebarNavItem, bW as Skeleton, bX as SkeletonProps, bY as SkeletonVariant, bZ as Sparkline, b_ as SparklineProps, b$ as Stack, c0 as StackProps, c1 as StatCard, c2 as StatCardProps, c3 as Statistic, c4 as StatisticProps, c5 as StatisticSize, c6 as StatisticTone, c7 as StatusBadge, c8 as StatusBadgeProvider, c9 as Switch, ca as SwitchProps, cb as SwitchSize, cc as TabItem, cd as Tabs, ce as TabsProps, cf as Text, cg as TextProps, ch as TextSize, ci as TextTone, cj as TextWeight, ck as Textarea, cl as TextareaProps, cm as Theme, cn as TileButton, co as TileButtonProps, cp as TileSize, cq as Title, cr as TitleLevel, cs as TitleProps, ct as ToastOptions, cu as ToastPlacement, cv as Tooltip, cw as TooltipProps, cx as TopNav, cy as TopNavItem, cz as TopNavProps, cA as VERSION, cB as appendKey, cC as applyThemePrefs, cD as backspace, cE as confirm, cF as confirmDestructive, cG as formatDate, cH as glassStyle, cI as inputClasses, cJ as isMac, cK as isSeverityTone, cL as mediaFileName, cM as prompt, cN as resolveTheme, cO as severityOf, cP as toISODate, cQ as toast, cR as useClickOutside, cS as useConfirm, cT as useFocusTrap, cU as useIsMobile, cV as useLocalStoragePrefs, cW as useScrollLock, cX as useShellPrefs, cY as useTheme } from './index-C5c6FA0c.js';
1
3
  import { W as WindowRegistry } from './types-BHVq95fp.js';
2
4
  export { M as ModalRegistryEntry, P as PageRegistryEntry, a as WindowRegistryEntry, i as isEntityEntry, b as isPageEntry, s as setShellWindowRegistry } from './types-BHVq95fp.js';
3
5
  import * as react from 'react';
4
- import react__default, { ReactNode, Component, ErrorInfo, CSSProperties, Dispatch, SetStateAction, RefObject, ButtonHTMLAttributes, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, LabelHTMLAttributes } from 'react';
6
+ import react__default, { ReactNode, Component, ErrorInfo, Dispatch, SetStateAction, RefObject } from 'react';
5
7
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
8
  import * as _tanstack_query_core from '@tanstack/query-core';
7
9
  import { AxiosInstance } from 'axios';
@@ -95,6 +97,9 @@ interface StartMenuCategories {
95
97
 
96
98
  declare function setShellNavIcons(icons: Record<string, ReactNode>): void;
97
99
 
100
+ /** Register an Escape interceptor; returns an unregister function. */
101
+ declare function registerModalEscapeInterceptor(fn: (e: KeyboardEvent) => boolean): () => void;
102
+
98
103
  /** Hook for widget components to register a settings handler for the right-click menu. */
99
104
  declare function useWidgetSettings(handler: () => void): void;
100
105
  /** Hook to add custom items to the window title menu from inside a modal */
@@ -274,8 +279,6 @@ interface ModalProps {
274
279
  * `activateModal`), or when the ask is withdrawn.
275
280
  */
276
281
  declare function requestWindowFront(windowKey: string): void;
277
- /** Register an Escape interceptor; returns an unregister function. */
278
- declare function registerModalEscapeInterceptor(fn: (e: KeyboardEvent) => boolean): () => void;
279
282
  /**
280
283
  * Is the window identified by `windowKey` the frontmost one?
281
284
  *
@@ -410,70 +413,6 @@ declare class WindowErrorBoundary extends Component<WindowErrorBoundaryProps, {
410
413
  render(): string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
411
414
  }
412
415
 
413
- /**
414
- * Unified popup menu component — used for all context menus, dropdowns, and flyouts.
415
- * Reads --menu-density CSS variable: 'tight', 'normal' (default), or 'large'.
416
- */
417
- interface PopupMenuProps {
418
- children: ReactNode;
419
- style?: CSSProperties;
420
- className?: string;
421
- onClose?: () => void;
422
- minWidth?: number;
423
- /** Render into document.body instead of in place. Required when the menu
424
- * is opened from INSIDE a window: the window panel is a transformed /
425
- * backdrop-filtered `overflow-hidden` container, which both re-anchors
426
- * `position: fixed` descendants to itself and clips them — a menu
427
- * positioned at viewport coordinates ends up offset or invisible.
428
- * Portaling restores true viewport positioning. */
429
- portal?: boolean;
430
- }
431
- /** Container for a popup menu — auto-clamps to stay within viewport */
432
- declare function PopupMenu({ children, style, className, onClose, minWidth, portal }: PopupMenuProps): react_jsx_runtime.JSX.Element;
433
- /** A clickable menu item */
434
- declare function PopupMenuItem({ onClick, children, className, danger, disabled }: {
435
- onClick?: () => void;
436
- children: ReactNode;
437
- className?: string;
438
- danger?: boolean;
439
- disabled?: boolean;
440
- }): react_jsx_runtime.JSX.Element;
441
- /** A divider line between menu items */
442
- declare function PopupMenuDivider(): react_jsx_runtime.JSX.Element;
443
- /** A section header label */
444
- declare function PopupMenuLabel({ children }: {
445
- children: ReactNode;
446
- }): react_jsx_runtime.JSX.Element;
447
-
448
- interface ConfirmOptions {
449
- title?: string;
450
- message: string;
451
- confirmLabel?: string;
452
- cancelLabel?: string;
453
- variant?: 'danger' | 'warning' | 'info';
454
- }
455
- declare const confirm: (opts: ConfirmOptions | string) => Promise<boolean>;
456
- interface DestructiveConfirmOptions {
457
- title?: string;
458
- message: string;
459
- confirmWord: string;
460
- variant?: 'danger' | 'warning';
461
- }
462
- declare const confirmDestructive: (opts: DestructiveConfirmOptions) => Promise<boolean>;
463
- interface PromptOptions {
464
- title?: string;
465
- message?: string;
466
- defaultValue?: string;
467
- placeholder?: string;
468
- confirmLabel?: string;
469
- cancelLabel?: string;
470
- allowEmpty?: boolean;
471
- }
472
- declare const prompt: (opts: PromptOptions | string) => Promise<string | null>;
473
- declare function ConfirmProvider({ children }: {
474
- children: React.ReactNode;
475
- }): react_jsx_runtime.JSX.Element;
476
-
477
416
  interface SearchResult {
478
417
  /** Category label, e.g. "Sales Order". */
479
418
  type: string;
@@ -502,332 +441,6 @@ declare function GlobalSearch({ providers, typeIcons, placeholder }?: GlobalSear
502
441
 
503
442
  declare function ShortcutHelp(): react_jsx_runtime.JSX.Element;
504
443
 
505
- /**
506
- * One help article. Generic shape — the consuming portal maps its own
507
- * help-doc records onto this before passing them in.
508
- */
509
- interface HelpCenterDoc {
510
- id: string;
511
- slug: string;
512
- title: string;
513
- body: string;
514
- /** Grouping key (e.g. `'getting_started'`). */
515
- category: string;
516
- /** Group header text (e.g. "Getting Started"). */
517
- category_label: string;
518
- /** When `false`, a "Draft" badge is shown. Omit for always-published docs. */
519
- is_published?: boolean;
520
- }
521
- interface HelpCenterProps {
522
- docs: HelpCenterDoc[];
523
- loading?: boolean;
524
- /**
525
- * Category keys in display order. Categories not listed fall to the end in
526
- * first-seen order. Without it, groups follow first-seen order.
527
- */
528
- categoryOrder?: string[];
529
- /** Show the New/Edit affordances (consumer gates this on write permission). */
530
- canEdit?: boolean;
531
- onNew?: () => void;
532
- onEdit?: (doc: HelpCenterDoc) => void;
533
- /** Custom body renderer; defaults to preformatted text. */
534
- renderBody?: (doc: HelpCenterDoc) => ReactNode;
535
- emptyMessage?: string;
536
- }
537
- /**
538
- * In-app help / documentation viewer. Two panes: a searchable, collapsible
539
- * category tree on the left, the selected article's body on the right.
540
- *
541
- * Presentational only — it holds no API or permission knowledge. The consumer
542
- * fetches its own help docs, maps them to `HelpCenterDoc`, and (for editors)
543
- * wires `canEdit` + `onNew`/`onEdit` to its own create/edit UI.
544
- *
545
- * Search is client-side: a case-insensitive substring match over title, body
546
- * and category label. While searching, matching groups auto-expand.
547
- */
548
- declare function HelpCenter({ docs, loading, categoryOrder, canEdit, onNew, onEdit, renderBody, emptyMessage, }: HelpCenterProps): react_jsx_runtime.JSX.Element;
549
-
550
- interface MarkdownProps {
551
- children: string;
552
- className?: string;
553
- }
554
- declare function Markdown({ children, className }: MarkdownProps): react_jsx_runtime.JSX.Element;
555
-
556
- declare const isMac: boolean;
557
- /** Platform-aware modifier symbols */
558
- declare const MOD: string;
559
- declare const ALT: string;
560
- declare const SHIFT = "\u21E7";
561
- declare const ENTER = "\u23CE";
562
- /** Common shortcut labels */
563
- declare const CMD_ENTER: string;
564
- declare const CMD_S: string;
565
- declare const CMD_K: string;
566
- declare const CMD_DOT: string;
567
- declare const CMD_A: string;
568
- declare const ALT_SHIFT_D: string;
569
- declare const ALT_SHIFT_E: string;
570
- declare const ALT_SHIFT_N: string;
571
-
572
- /**
573
- * Two presentations:
574
- *
575
- * 1. toast.success / error / info — brief operation feedback, top-center,
576
- * auto-dismiss (success/error ~3s, info ~4.5s). The everyday "what just
577
- * happened" feedback — most messages want this.
578
- * 2. toast.notify — system notification, top-right card, stays 10s, dismissible.
579
- * For an alert worth lingering on; reach for it deliberately, not by default.
580
- *
581
- * (Historically `toast.info` rendered the top-right notification card; it now
582
- * renders a brief toast — that persistent card moved to `toast.notify`.)
583
- */
584
- declare const toast: {
585
- success: (message: string) => void;
586
- error: (message: string) => void;
587
- info: (message: string, opts?: {
588
- duration?: number;
589
- }) => void;
590
- notify: (message: string, opts?: {
591
- duration?: number;
592
- }) => void;
593
- };
594
-
595
- interface GridColumn {
596
- key: string;
597
- title: string;
598
- width?: number;
599
- readOnly?: boolean;
600
- align?: 'left' | 'right' | 'center';
601
- }
602
- type CellStyle = {
603
- bold?: boolean;
604
- italic?: boolean;
605
- underline?: boolean;
606
- fontSize?: 'sm' | 'base' | 'lg' | 'xl';
607
- };
608
- interface EditableGridProps {
609
- columns: GridColumn[];
610
- data: string[][];
611
- onChange: (data: string[][]) => void;
612
- onColumnsChange?: (columns: GridColumn[]) => void;
613
- /** Fixed row count — disables add/delete rows */
614
- fixedRows?: boolean;
615
- minRows?: number;
616
- maxHeight?: string;
617
- /** Per-cell text styling, keyed by `${row}:${col}`. */
618
- cellStyles?: Record<string, CellStyle>;
619
- /** Notifies the parent when the focused/edited cell changes. */
620
- onFocusChange?: (pos: {
621
- row: number;
622
- col: number;
623
- } | null) => void;
624
- /** Notifies the parent when the selection rectangle changes. */
625
- onSelectionChange?: (sel: {
626
- anchor: {
627
- row: number;
628
- col: number;
629
- };
630
- end: {
631
- row: number;
632
- col: number;
633
- };
634
- } | null) => void;
635
- }
636
- /**
637
- * Lightweight editable grid with spreadsheet-like features:
638
- * - Click + drag to select a range of cells
639
- * - Ctrl+C / Cmd+C to copy selection as tab-delimited text
640
- * - Multi-cell paste from spreadsheets (Ctrl+V)
641
- * - Tab/Enter/Arrow keyboard navigation
642
- */
643
- declare function EditableGrid({ columns, data, onChange, onColumnsChange, fixedRows, minRows, maxHeight, cellStyles, onFocusChange, onSelectionChange }: EditableGridProps): react_jsx_runtime.JSX.Element;
644
-
645
- /**
646
- * Two-pane layout with a drag-to-resize sidebar (left or right).
647
- *
648
- * Renders flush (`h-full w-full`) — pair it with a `flushBody` window so the
649
- * sidebar runs from just under the title bar to the very bottom with no
650
- * surrounding padding. The user can drag the sidebar's inner edge to resize
651
- * it; pass `storageKey` to persist that width across reopens, or double-click
652
- * the handle to reset to `defaultWidth`. Set `side="right"` to put the sidebar
653
- * on the right (e.g. a detail-panel layout).
654
- *
655
- * @example
656
- * <SidebarLayout sidebar={<MyNav />} storageKey="todo.sidebarWidth">
657
- * <MyContent />
658
- * </SidebarLayout>
659
- */
660
- interface SidebarLayoutProps {
661
- /** Content of the left sidebar pane. When `sidebarTop`/`sidebarBottom` are
662
- * set this is the scrolling middle region (the filter nav); otherwise it is
663
- * the whole pane. */
664
- sidebar: ReactNode;
665
- /** Optional node pinned at the TOP of the sidebar, above `sidebar`, in a
666
- * padded non-scrolling region (e.g. a primary "New X" `SidebarActionButton`).
667
- * The list-window convention: primary create action lives here. */
668
- sidebarTop?: ReactNode;
669
- /** Optional node pinned at the BOTTOM of the sidebar, below `sidebar`, in a
670
- * padded, top-bordered non-scrolling region (e.g. an "Export CSV" button).
671
- * The middle `sidebar` grows to fill, so this stays flush to the bottom. */
672
- sidebarBottom?: ReactNode;
673
- /** Content of the main pane (opposite the sidebar). */
674
- children: ReactNode;
675
- /** Which side the sidebar sits on. Default `'left'`. When `'right'`, the
676
- * sidebar renders on the right with the resize handle on its left edge. */
677
- side?: 'left' | 'right';
678
- /** localStorage key to persist the sidebar width across reopens. When set,
679
- * the last dragged width is restored on mount. Omit for session-only width. */
680
- storageKey?: string;
681
- /** Initial sidebar width in px (used when nothing is persisted). Default 256. */
682
- defaultWidth?: number;
683
- /** Minimum sidebar width in px. Default 180. */
684
- minWidth?: number;
685
- /** Maximum sidebar width in px. Default 480. */
686
- maxWidth?: number;
687
- /** Extra classes for the outer flex row. */
688
- className?: string;
689
- /** Classes for the sidebar pane (background, border, …). The pane is a flex
690
- * column that scrolls its own overflow. Defaults to a light-grey,
691
- * right-bordered sidebar. */
692
- sidebarClassName?: string;
693
- /** Classes for the main content pane. Defaults to a white background. */
694
- contentClassName?: string;
695
- }
696
- declare function SidebarLayout({ sidebar, sidebarTop, sidebarBottom, children, side, storageKey, defaultWidth, minWidth, maxWidth, className, sidebarClassName, contentClassName, }: SidebarLayoutProps): react_jsx_runtime.JSX.Element;
697
-
698
- /**
699
- * Full-width action button for the `SidebarLayout` `sidebarTop` / `sidebarBottom`
700
- * slots — the standard list-window pattern of a primary "New X" button pinned
701
- * at the top and a secondary action (e.g. "Export CSV") pinned at the bottom.
702
- *
703
- * `variant="primary"` is the solid-blue create button; `"secondary"` is the
704
- * white outline button. Pass `hotkey` (e.g. `ALT_SHIFT_N`) to render the small
705
- * keyboard-hint chip the shell's `useNewHotkey` binds.
706
- *
707
- * @example
708
- * <SidebarLayout
709
- * sidebarTop={<SidebarActionButton hotkey={ALT_SHIFT_N} onClick={onNew}>New Invoice</SidebarActionButton>}
710
- * sidebar={<StatusNav />}
711
- * >…</SidebarLayout>
712
- */
713
- interface SidebarActionButtonProps {
714
- children: ReactNode;
715
- onClick?: () => void;
716
- /** Solid-blue create button (`'primary'`, default) or white outline (`'secondary'`). */
717
- variant?: 'primary' | 'secondary';
718
- /** Keyboard-hint label rendered as a trailing chip, e.g. `ALT_SHIFT_N`. */
719
- hotkey?: string;
720
- disabled?: boolean;
721
- type?: 'button' | 'submit';
722
- title?: string;
723
- /** Extra classes appended after the variant styles (escape hatch). */
724
- className?: string;
725
- }
726
- declare function SidebarActionButton({ children, onClick, variant, hotkey, disabled, type, title, className, }: SidebarActionButtonProps): react_jsx_runtime.JSX.Element;
727
-
728
- interface SearchableOption {
729
- value: string;
730
- label: string;
731
- /** Optional secondary text rendered greyed-out on the right of the
732
- * option (e.g. an order date next to a proforma number). */
733
- sublabel?: string;
734
- }
735
- interface SearchableSelectProps {
736
- value: string;
737
- onChange: (value: string) => void;
738
- options: SearchableOption[];
739
- /** Placeholder shown when no value is selected and the field is empty. */
740
- placeholder?: string;
741
- /** Fallback placeholder text when no `placeholder` is provided and
742
- * nothing is selected. Clearing the selection is done via the hover
743
- * "×" on the input itself. */
744
- emptyOptionLabel?: string;
745
- /** Extra Tailwind classes appended to the input (error rings, custom
746
- * widths…). The base form-input styling is built in. */
747
- className?: string;
748
- disabled?: boolean;
749
- /** Optional id for label-for wiring. */
750
- id?: string;
751
- /** When true, the user can submit a value that isn't in `options` —
752
- * pressing Enter or clicking outside with non-empty search text
753
- * fires `onChange` with the typed string. The trigger then displays
754
- * that free-text value as-is. Default false: only listed options
755
- * can be picked, typing only filters. */
756
- allowFreeText?: boolean;
757
- /** Optional notifier fired whenever the user-typed search text changes
758
- * (including resets to ''). Lets a parent debounce the value and feed
759
- * a server-side query, so this component can still front a list that
760
- * is too large to load up-front. */
761
- onSearchChange?: (text: string) => void;
762
- /** Optional content rendered inside the trigger's right edge — to the
763
- * left of the clear button — when the dropdown is closed. Use for
764
- * compact status pills that should read alongside the selected label.
765
- * Hidden while the user is typing so the search text stays legible. */
766
- rightAdornment?: ReactNode;
767
- }
768
- declare function SearchableSelect({ value, onChange, options, placeholder, emptyOptionLabel, className, disabled, id, allowFreeText, onSearchChange, rightAdornment, }: SearchableSelectProps): react_jsx_runtime.JSX.Element;
769
-
770
- /**
771
- * Generic top navigation bar. A horizontal row of tab-style links with an
772
- * optional brand on the left and free-form actions on the right. Self-contained
773
- * and styled with the shell's Tailwind utilities, so it themes for free.
774
- *
775
- * Controlled: pass `activeKey` and handle `onSelect`. The active item gets an
776
- * accent underline. Items can carry an `icon`, a `badge` (e.g. a count) and be
777
- * `disabled`.
778
- */
779
- interface TopNavItem {
780
- /** Stable key — what `onSelect` receives and `activeKey` matches. */
781
- key: string;
782
- label: ReactNode;
783
- /** Optional leading icon (typically a 4×4 svg). */
784
- icon?: ReactNode;
785
- /** Optional trailing badge — a count, dot, "New", etc. */
786
- badge?: ReactNode;
787
- disabled?: boolean;
788
- }
789
- interface TopNavProps {
790
- items: TopNavItem[];
791
- /** Key of the active item — it gets the accent underline. */
792
- activeKey?: string;
793
- onSelect?: (key: string) => void;
794
- /** Left slot — logo / product title. */
795
- brand?: ReactNode;
796
- /** Right slot — actions (buttons, search, avatar…). Pinned to the far right. */
797
- actions?: ReactNode;
798
- className?: string;
799
- }
800
- declare function TopNav({ items, activeKey, onSelect, brand, actions, className }: TopNavProps): react_jsx_runtime.JSX.Element;
801
-
802
- /**
803
- * Generic breadcrumb trail. Self-contained and styled with the same Tailwind
804
- * utilities the shell already ships, so consumers get it for free.
805
- *
806
- * Pass an ordered list of `items` from root → current. Every crumb except the
807
- * last renders as a button when it has an `onClick`; the last crumb is treated
808
- * as the current location — rendered inert with `aria-current="page"`. When the
809
- * trail is long, set `maxItems` to collapse the middle into an ellipsis
810
- * (`first … last-n` ), keeping the first and the tail visible.
811
- */
812
- interface BreadcrumbItem {
813
- /** Visible label. */
814
- label: ReactNode;
815
- /** Optional leading icon (typically a 3.5×3.5 svg). */
816
- icon?: ReactNode;
817
- /** Navigate to this crumb. Omitted on the current (last) crumb. */
818
- onClick?: () => void;
819
- }
820
- interface BreadcrumbsProps {
821
- items: BreadcrumbItem[];
822
- /** Node rendered between crumbs. Defaults to a chevron. */
823
- separator?: ReactNode;
824
- /** Collapse the middle to an ellipsis when there are more than this many
825
- * crumbs. `0` (default) never collapses. */
826
- maxItems?: number;
827
- className?: string;
828
- }
829
- declare function Breadcrumbs({ items, separator, maxItems, className }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
830
-
831
444
  /** Generic notification shape consumed by the shell. Consumer-specific
832
445
  * fields live on `extra` (or just on additional properties — TS structural
833
446
  * typing is permissive). */
@@ -868,16 +481,6 @@ interface NotificationBellProps extends NotificationsConfig {
868
481
  }
869
482
  declare function NotificationBell({ useUnreadCount, list, markRead, markAllRead, onItemClick, onViewAll, popDirection, }: NotificationBellProps): react_jsx_runtime.JSX.Element;
870
483
 
871
- type SemanticGroup = 'success' | 'active' | 'queued' | 'info' | 'pending' | 'warning' | 'danger' | 'draft' | 'neutral';
872
- declare function StatusBadgeProvider({ groups, children, }: {
873
- groups: Record<string, SemanticGroup>;
874
- children: ReactNode;
875
- }): react_jsx_runtime.JSX.Element;
876
- interface StatusBadgeProps {
877
- status: string;
878
- }
879
- declare function StatusBadge({ status }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
880
-
881
484
  /**
882
485
  * System-tray badge shown only when the app is served from a developer's own
883
486
  * machine (localhost / 127.0.0.1). Drop it into the host's `taskbarTrayLeft`
@@ -1782,104 +1385,6 @@ interface EntityListProps<T> {
1782
1385
  */
1783
1386
  declare function EntityList<T>(props: EntityListProps<T>): react_jsx_runtime.JSX.Element;
1784
1387
 
1785
- /**
1786
- * Generic, drag-and-drop Kanban board. Self-contained (native HTML5 DnD, no
1787
- * library) and styled with the same Tailwind utilities + `grid-scroll` class the
1788
- * shell already ships, so consumers get it for free.
1789
- *
1790
- * Group items into columns with `columnOf`, render each card with `renderCard`.
1791
- * Cards can be dragged **between** columns (to change which column they belong
1792
- * to) and **within** a column (to reorder / prioritise). On drop, `onMove(id,
1793
- * toColumn, toIndex)` fires — `toIndex` is the target position within `toColumn`
1794
- * measured against that column's cards *excluding* the dragged one, so the
1795
- * consumer can persist an order (e.g. midpoint between neighbours) that every
1796
- * user then sees. Sort each column by that order via `sortInColumn`.
1797
- *
1798
- * Affordance: a blue **drop-line** shows exactly where the card will land
1799
- * (between two cards, in either the source or a different column), and the
1800
- * target column highlights. The dragged card dims. The insertion point tracks
1801
- * `dragenter` (once per card crossed) so the line stays stable rather than
1802
- * flickering. Pass `onAddItem` to give each column a "+ Add item" button at its
1803
- * foot, revealed on column hover / keyboard focus.
1804
- *
1805
- * With no items the board is replaced by `emptyState` — right when the items
1806
- * are the whole story, wrong when the columns are (a pipeline the user just
1807
- * configured has a shape worth showing, and a board with no drop target can't
1808
- * take its first card). Pass `showColumnsWhenEmpty` for that case and the
1809
- * normal layout draws with every column on its `columnEmptyText` placeholder.
1810
- */
1811
- interface KanbanColumn {
1812
- /** Stable column key — what `columnOf` returns and `onMove` receives. */
1813
- value: string;
1814
- label: string;
1815
- /** Tailwind text + bg classes for the column header. */
1816
- accent?: string;
1817
- /** Tailwind bg class for the header dot. */
1818
- dot?: string;
1819
- }
1820
- interface KanbanProps<T> {
1821
- items: T[];
1822
- columns: KanbanColumn[];
1823
- columnOf: (item: T) => string;
1824
- getId: (item: T) => string;
1825
- /**
1826
- * Fired on drop. `toColumn` is the destination column's `value`; `toIndex` is
1827
- * the target position within that column measured against its cards
1828
- * **excluding** the dragged card (0 = top). A same-column drop that wouldn't
1829
- * change the order is not reported.
1830
- */
1831
- onMove: (id: string, toColumn: string, toIndex: number) => void;
1832
- /** Inner card content — the card chrome (border, padding, hover) is provided. */
1833
- renderCard: (item: T) => ReactNode;
1834
- onCardClick?: (item: T) => void;
1835
- /** Comparator for ordering within a column — sort by the persisted order field. */
1836
- sortInColumn?: (a: T, b: T) => number;
1837
- isLoading?: boolean;
1838
- loadingText?: string;
1839
- /** Shown INSTEAD of the board when there are no items at all. */
1840
- emptyState?: ReactNode;
1841
- /**
1842
- * Draw the board — headers, empty columns, drop targets — even with no items,
1843
- * instead of replacing it with `emptyState`. Opt in when the columns are
1844
- * themselves the information (a configurable pipeline the user just defined)
1845
- * or when an empty board still needs somewhere to drop a card into. Default
1846
- * `false` keeps the `emptyState` behaviour every existing caller relies on.
1847
- */
1848
- showColumnsWhenEmpty?: boolean;
1849
- /** Placeholder text inside an empty column. */
1850
- columnEmptyText?: string;
1851
- /**
1852
- * When provided, each column gets a "+ Add item" button at its foot, revealed
1853
- * on column hover or keyboard focus, that fires with the column's `value`.
1854
- */
1855
- onAddItem?: (toColumn: string) => void;
1856
- /** Label for the per-column add button. */
1857
- addItemText?: string;
1858
- }
1859
- declare function Kanban<T>({ items, columns, columnOf, getId, onMove, renderCard, onCardClick, sortInColumn, isLoading, loadingText, emptyState, showColumnsWhenEmpty, columnEmptyText, onAddItem, addItemText, }: KanbanProps<T>): react_jsx_runtime.JSX.Element;
1860
-
1861
- interface PaginatedResponse<T> {
1862
- count: number;
1863
- next: string | null;
1864
- previous: string | null;
1865
- results: T[];
1866
- }
1867
- interface ColumnDef {
1868
- key: string;
1869
- label: string;
1870
- defaultWidth?: number;
1871
- minWidth?: number;
1872
- defaultHidden?: boolean;
1873
- /** Optional rich header node (e.g. icon-only column). Falls back to label. */
1874
- headerNode?: React.ReactNode;
1875
- /** Optional override for the field used to sort against. */
1876
- sortField?: string;
1877
- }
1878
- interface SortState {
1879
- field: string;
1880
- direction: 'asc' | 'desc';
1881
- }
1882
-
1883
1388
  interface ResizableTableProps {
1884
1389
  tableId: string;
1885
1390
  columns: ColumnDef[];
@@ -1907,42 +1412,6 @@ interface ResizableTableProps {
1907
1412
  */
1908
1413
  declare function ResizableTable({ tableId, columns, sort, onSort, footer, afterBody, saveDefaultPerms, children, }: ResizableTableProps): react_jsx_runtime.JSX.Element;
1909
1414
 
1910
- interface ListFooterProps {
1911
- selectedCount: number;
1912
- loadedCount: number;
1913
- totalCount?: number;
1914
- label: string;
1915
- isFetchingMore?: boolean;
1916
- extra?: ReactNode;
1917
- }
1918
- /**
1919
- * Standardized footer for `EntityList`. Shows:
1920
- * "[X selected — ] Y records"
1921
- * "Y of Z records · Loading more..."
1922
- * "All N records loaded"
1923
- */
1924
- declare function ListFooter({ selectedCount, loadedCount, totalCount, label, isFetchingMore, extra, }: ListFooterProps): react_jsx_runtime.JSX.Element;
1925
-
1926
- interface ListLoadErrorProps {
1927
- /** Bold heading. Defaults to "Couldn't load this list". */
1928
- title?: string;
1929
- /** Muted explanatory line. Defaults to a generic connection/retry message. */
1930
- message?: string;
1931
- /** When provided, renders a "Try again" button that calls it (wire the
1932
- * data source's `refetch`). Omit for a static, non-retryable error. */
1933
- onRetry?: () => void;
1934
- /** Frame around the content, mirroring {@link EmptyState}: `dashed`
1935
- * (default), `card` (bordered surface), or `none`. */
1936
- variant?: 'dashed' | 'card' | 'none';
1937
- }
1938
- /**
1939
- * ListLoadError — the error counterpart to `EmptyState` for data lists. Shown
1940
- * when a list's fetch fails (5xx, auth expiry, network) so an outage reads as
1941
- * an error with a retry affordance instead of a misleading "nothing here"
1942
- * empty state. Visual language mirrors `EmptyState`, tinted for error.
1943
- */
1944
- declare function ListLoadError({ title, message, onRetry, variant, }: ListLoadErrorProps): react_jsx_runtime.JSX.Element;
1945
-
1946
1415
  /**
1947
1416
  * Keyboard + shift-click navigation for table rows.
1948
1417
  *
@@ -2047,490 +1516,6 @@ declare function useSort(defaultField: string, defaultDir?: 'asc' | 'desc', tabl
2047
1516
  ordering: string;
2048
1517
  };
2049
1518
 
2050
- /**
2051
- * Pagination — a numbered page control for classic paginated tables/lists, with
2052
- * prev/next and optional first/last edges and ellipsis gaps. Controlled: the
2053
- * consumer owns `page` and updates it in `onPageChange`. Complements ListFooter
2054
- * (which shows counts/selection for infinite-scroll lists).
2055
- */
2056
- interface PaginationProps {
2057
- /** Current page, 1-based. */
2058
- page: number;
2059
- pageCount: number;
2060
- onPageChange: (page: number) => void;
2061
- /** How many page numbers to show on each side of the current page. */
2062
- siblingCount?: number;
2063
- /** Show first/last («/») buttons. */
2064
- showEdges?: boolean;
2065
- className?: string;
2066
- }
2067
- declare function Pagination({ page, pageCount, onPageChange, siblingCount, showEdges, className, }: PaginationProps): react_jsx_runtime.JSX.Element | null;
2068
-
2069
- type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
2070
- type ButtonSize = 'sm' | 'md';
2071
- interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className'> {
2072
- variant?: ButtonVariant;
2073
- size?: ButtonSize;
2074
- /** Show a spinner and disable the button while an action is in flight. */
2075
- loading?: boolean;
2076
- leftIcon?: ReactNode;
2077
- rightIcon?: ReactNode;
2078
- /** Stretch to the full width of the container. */
2079
- block?: boolean;
2080
- className?: string;
2081
- }
2082
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
2083
-
2084
- interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className'> {
2085
- /** Error state — red border + ring. */
2086
- invalid?: boolean;
2087
- /** Icon rendered inside the field's left edge (e.g. a search glyph). */
2088
- leftIcon?: ReactNode;
2089
- /** Content pinned to the field's right edge (e.g. a unit, a small action). */
2090
- rightAdornment?: ReactNode;
2091
- className?: string;
2092
- }
2093
- declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
2094
-
2095
- interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'className'> {
2096
- /** Error state — red border + ring. */
2097
- invalid?: boolean;
2098
- /** Grow the field to fit its content instead of scrolling. */
2099
- autoGrow?: boolean;
2100
- className?: string;
2101
- }
2102
- declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
2103
-
2104
- interface SelectOption {
2105
- value: string;
2106
- label: string;
2107
- disabled?: boolean;
2108
- }
2109
- interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'onChange' | 'value' | 'className'> {
2110
- value: string;
2111
- onChange: (value: string) => void;
2112
- options: SelectOption[];
2113
- /** Shown as a disabled first option when no value is selected. */
2114
- placeholder?: string;
2115
- invalid?: boolean;
2116
- className?: string;
2117
- }
2118
- /**
2119
- * Raw native `<select>` styled to match the kit's inputs. This is the original
2120
- * Select — kept as the mobile rendering and exported for callers that need a
2121
- * real `HTMLSelectElement` (form posts, native attribute spread, focus).
2122
- */
2123
- declare const NativeSelect: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
2124
- /** Smart Select: native `<select>` on touch, custom listbox on desktop. */
2125
- declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
2126
-
2127
- interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'checked' | 'className'> {
2128
- checked: boolean;
2129
- onChange: (checked: boolean) => void;
2130
- label?: ReactNode;
2131
- description?: ReactNode;
2132
- className?: string;
2133
- }
2134
- declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
2135
-
2136
- interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'checked' | 'className'> {
2137
- checked: boolean;
2138
- onChange: (checked: boolean) => void;
2139
- label?: ReactNode;
2140
- description?: ReactNode;
2141
- className?: string;
2142
- }
2143
- declare const Radio: react.ForwardRefExoticComponent<RadioProps & react.RefAttributes<HTMLInputElement>>;
2144
-
2145
- interface FormFieldProps {
2146
- label?: ReactNode;
2147
- /** id of the control, for label-for wiring. */
2148
- htmlFor?: string;
2149
- /** id for the `<label>` element itself, so a non-labelable control (e.g. a
2150
- * `role="group"` wrapper) can name itself via `aria-labelledby`. */
2151
- labelId?: string;
2152
- /** Greyed helper text below the control. */
2153
- hint?: ReactNode;
2154
- /** Red error text below the control — overrides `hint` when present. */
2155
- error?: ReactNode;
2156
- /** Append a red asterisk to the label. */
2157
- required?: boolean;
2158
- className?: string;
2159
- children: ReactNode;
2160
- }
2161
- declare function FormField({ label, htmlFor, labelId, hint, error, required, className, children, }: FormFieldProps): react_jsx_runtime.JSX.Element;
2162
-
2163
- interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
2164
- /** Append a red asterisk. */
2165
- required?: boolean;
2166
- }
2167
- declare function Label({ required, children, className, ...rest }: LabelProps): react_jsx_runtime.JSX.Element;
2168
-
2169
- /**
2170
- * Internal helpers shared by the media-upload primitives (`MediaUploadField`
2171
- * single slot + `MediaUploadGrid` gallery) so the filename derivation, the
2172
- * image-vs-video test, and the upload glyph / spinner live in one place (DRY /
2173
- * SSoT). Not part of the public API except `mediaFileName`, which the field
2174
- * re-exports.
2175
- */
2176
- /**
2177
- * Derive a human filename from a media URL: drop the query string, strip a
2178
- * 32-hex upload prefix, and URL-decode.
2179
- *
2180
- * "/media/uploads/9f3…a1_My Clip.mp4?v=2" → "My Clip.mp4"
2181
- *
2182
- * `data:` URLs have no path, so they are named from their media type instead
2183
- * — see `dataUrlName`.
2184
- */
2185
- declare function mediaFileName(url: string): string;
2186
-
2187
- interface MediaUploadFieldProps {
2188
- /** The current media URL. Empty string (or null/undefined) = the CTA state. */
2189
- value?: string | null;
2190
- /** Controlled channel — the newly-chosen URL, or `''` when cleared (Remove). */
2191
- onChange: (url: string) => void;
2192
- /**
2193
- * Open the consumer's library/upload picker. Fires on click and on drop; the
2194
- * dropped File (if any) is passed so the consumer can seed an immediate
2195
- * upload. The consumer resolves the selection back through `onChange`.
2196
- * Omit to fall back to a hidden native `<input type=file>` that emits an
2197
- * object-URL (demos, staged-then-submit forms).
2198
- */
2199
- onPick?: (droppedFile?: File) => void;
2200
- /** Label rendered above the control. */
2201
- label?: ReactNode;
2202
- /** Greyed helper line below the control. */
2203
- hint?: ReactNode;
2204
- /** Red error line — overrides `hint`. */
2205
- error?: ReactNode;
2206
- /** Append a red asterisk to the label. */
2207
- required?: boolean;
2208
- className?: string;
2209
- /**
2210
- * Native `accept` string. Drives the preview kind (image vs video), the
2211
- * fallback file dialog, and the default empty-state copy. Default `image/*`.
2212
- */
2213
- accept?: string;
2214
- /** `object-fit` for the preview. Default `cover`; use `contain` for logos/SVG. */
2215
- fit?: 'cover' | 'contain';
2216
- /** Preview / dropzone height in px (applied via inline style). Default 112. */
2217
- height?: number;
2218
- /** Dim prompt line, e.g. "Upload a background video". Default derived from `accept`. */
2219
- placeholder?: ReactNode;
2220
- /** The link-style CTA line. Default "Choose from library or upload". */
2221
- cta?: ReactNode;
2222
- /** Small kind hint under the CTA, e.g. "PNG · JPG · WEBP". */
2223
- acceptHint?: ReactNode;
2224
- /** Overlay the derived filename on the preview. Default true. */
2225
- showFilename?: boolean;
2226
- /** Show the Replace button when filled. Default true. */
2227
- allowReplace?: boolean;
2228
- /** Show the Remove button when filled. Default true. */
2229
- allowRemove?: boolean;
2230
- /** Relabel Replace, e.g. "Change". Default "Replace". */
2231
- replaceLabel?: ReactNode;
2232
- /** Relabel Remove, e.g. "Clear". Default "Remove". */
2233
- removeLabel?: ReactNode;
2234
- /** Busy: disable controls and show a spinner while the caller's upload runs. */
2235
- busy?: boolean;
2236
- /** Busy label. Default "Uploading…". */
2237
- busyLabel?: ReactNode;
2238
- /** Fully disable the control (no click, no drop, no actions). */
2239
- disabled?: boolean;
2240
- }
2241
-
2242
- declare function MediaUploadField({ value, onChange, onPick, label, hint, error, required, className, accept, fit, height, placeholder, cta, acceptHint, showFilename, allowReplace, allowRemove, replaceLabel, removeLabel, busy, busyLabel, disabled, }: MediaUploadFieldProps): react_jsx_runtime.JSX.Element;
2243
-
2244
- interface MediaUploadGridItem {
2245
- /** Stable key — used for React keys, remove, and reorder. */
2246
- id: string;
2247
- /** Preview URL. */
2248
- url: string;
2249
- /** `image` | `video`. Inferred from the URL when omitted. */
2250
- kind?: 'image' | 'video';
2251
- /** Optional label overlaid on the thumbnail (filename, dimensions, …). */
2252
- caption?: ReactNode;
2253
- /** Force the "cover" badge on this item (else `showCover` badges the first). */
2254
- cover?: boolean;
2255
- }
2256
- interface MediaUploadGridProps {
2257
- /** The gallery contents, in display order. */
2258
- items: MediaUploadGridItem[];
2259
- /**
2260
- * Open the consumer's library/upload flow. Fires on click of the Add tile /
2261
- * empty dropzone and on a file drop onto the zone (the dropped File is passed
2262
- * so the consumer can seed an immediate upload). Without it the gallery is
2263
- * read-only for additions (no Add tile, no drop).
2264
- */
2265
- onPick?: (droppedFile?: File) => void;
2266
- /** Remove one item. The per-thumb ✕ shows only when this is provided. */
2267
- onRemove?: (id: string) => void;
2268
- /**
2269
- * Reorder within the grid. Enables drag-to-reorder when provided; called with
2270
- * the source and target indices on drop.
2271
- */
2272
- onReorder?: (fromIndex: number, toIndex: number) => void;
2273
- label?: ReactNode;
2274
- hint?: ReactNode;
2275
- error?: ReactNode;
2276
- required?: boolean;
2277
- className?: string;
2278
- /** Native accept string — drives preview kind, the drop filter, and the copy. Default `image/*`. */
2279
- accept?: string;
2280
- /** `object-fit` for the thumbnails. Default `cover`. */
2281
- fit?: 'cover' | 'contain';
2282
- /** Thumbnail (and Add tile) square size in px. Default 96. */
2283
- thumbSize?: number;
2284
- /** Dim prompt line on the empty dropzone. Default derived from `accept`. */
2285
- placeholder?: ReactNode;
2286
- /** The link CTA on the empty dropzone. Default "Choose from library or upload". */
2287
- cta?: ReactNode;
2288
- /** Small kind hint under the CTA, e.g. "PNG · JPG · WEBP". */
2289
- acceptHint?: ReactNode;
2290
- /** Badge the first item (or the one with `cover`) as the gallery cover. Default false. */
2291
- showCover?: boolean;
2292
- /** Cover badge text. Default "Cover". */
2293
- coverLabel?: ReactNode;
2294
- /** Busy: dim the zone and show a spinner while the caller's upload runs. */
2295
- busy?: boolean;
2296
- /** Busy label. Default "Uploading…". */
2297
- busyLabel?: ReactNode;
2298
- /** Disable all interaction. */
2299
- disabled?: boolean;
2300
- /** View only — thumbnails without Add / remove / reorder affordances. */
2301
- readOnly?: boolean;
2302
- }
2303
- declare function MediaUploadGrid({ items, onPick, onRemove, onReorder, label, hint, error, required, className, accept, fit, thumbSize, placeholder, cta, acceptHint, showCover, coverLabel, busy, busyLabel, disabled, readOnly, }: MediaUploadGridProps): react_jsx_runtime.JSX.Element;
2304
-
2305
- interface DateRangePickerProps {
2306
- /** Start of the range as `YYYY-MM-DD`, or '' when unset. */
2307
- from: string;
2308
- /** End of the range as `YYYY-MM-DD`, or '' when unset. */
2309
- to: string;
2310
- /** Called with the applied range. Both values are '' when cleared. */
2311
- onChange: (from: string, to: string) => void;
2312
- /**
2313
- * Render a `YYYY-MM-DD` for display. Defaults to `DD/MM/YYYY`; portals pass
2314
- * their own so the picker agrees with every other date on screen.
2315
- */
2316
- formatDisplay?: (iso: string) => string;
2317
- /**
2318
- * Offer the Clear affordances. Pass `false` where a range is REQUIRED — an
2319
- * accounting report seeded with a period has nothing sensible to show for an
2320
- * empty one, so it should not offer to empty it.
2321
- */
2322
- clearable?: boolean;
2323
- /** Trigger text when no range is set. */
2324
- placeholder?: string;
2325
- }
2326
- /**
2327
- * Serialise a Date to `YYYY-MM-DD`, reading its LOCAL calendar fields.
2328
- *
2329
- * This must not go through `toISOString()`. Every Date this component builds is
2330
- * constructed at local midnight — calendar cells, the preset boundaries, and
2331
- * `new Date()` — and local midnight always falls in the *previous* UTC day for
2332
- * any positive UTC offset. Serialising through UTC would shift the whole picker
2333
- * back one day for every user east of Greenwich.
2334
- */
2335
- declare function toISODate(d: Date): string;
2336
- declare function DateRangePicker({ from, to, onChange, formatDisplay, clearable, placeholder, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
2337
-
2338
- /**
2339
- * Shared form-control styling — the single source of truth for the kit's
2340
- * text-input look. Promoted out of SearchableSelect so every form control
2341
- * (Input, Textarea, Select, SearchableSelect) renders identically and picks
2342
- * up the same `[data-theme="dark"]` input remaps from styles.css.
2343
- *
2344
- * Keep this in the documented Tailwind vocabulary (see .design-sync/conventions.md)
2345
- * so the classes survive both the dark-mode allow-list and the design-sync
2346
- * compiled stylesheet.
2347
- */
2348
- /** Base look for a text-bearing form control. Native <input>/<select>/<textarea>
2349
- * also receive dark styling for free via the global rule in styles.css. */
2350
- declare const INPUT_BASE: string;
2351
- /** Compose the input classes for a control. */
2352
- declare function inputClasses(opts?: {
2353
- invalid?: boolean;
2354
- className?: string;
2355
- }): string;
2356
-
2357
- interface CardProps {
2358
- children: ReactNode;
2359
- /** Title row above the body, divided by a hairline. */
2360
- header?: ReactNode;
2361
- /** Row below the body, divided by a hairline. */
2362
- footer?: ReactNode;
2363
- /** Apply default padding to the body. Default true; set false to fill edge-to-edge. */
2364
- padded?: boolean;
2365
- className?: string;
2366
- }
2367
- declare function Card({ children, header, footer, padded, className }: CardProps): react_jsx_runtime.JSX.Element;
2368
- interface StatCardProps {
2369
- label: ReactNode;
2370
- value: ReactNode;
2371
- icon?: ReactNode;
2372
- /** Trend pill, e.g. `{ value: '12%', direction: 'up' }`. */
2373
- delta?: {
2374
- value: ReactNode;
2375
- direction: 'up' | 'down' | 'flat';
2376
- };
2377
- className?: string;
2378
- }
2379
- declare function StatCard({ label, value, icon, delta, className }: StatCardProps): react_jsx_runtime.JSX.Element;
2380
-
2381
- type AvatarSize = 'xs' | 'sm' | 'md' | 'lg';
2382
- type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
2383
- interface AvatarProps {
2384
- src?: string;
2385
- /** Used for the initials fallback and the image alt text. */
2386
- name?: string;
2387
- size?: AvatarSize;
2388
- status?: AvatarStatus;
2389
- className?: string;
2390
- }
2391
- declare function Avatar({ src, name, size, status, className }: AvatarProps): react_jsx_runtime.JSX.Element;
2392
- interface AvatarGroupProps {
2393
- children: ReactNode;
2394
- /** Show at most this many avatars; the rest collapse into a +N chip. */
2395
- max?: number;
2396
- /** Size of the children — used for the overlap + overflow-chip geometry.
2397
- * Give the child Avatars this same size. */
2398
- size?: AvatarSize;
2399
- className?: string;
2400
- }
2401
- declare function AvatarGroup({ children, max, size, className }: AvatarGroupProps): react_jsx_runtime.JSX.Element;
2402
-
2403
- type BannerTone = 'info' | 'success' | 'warning' | 'danger';
2404
- interface BannerProps {
2405
- tone?: BannerTone;
2406
- title?: ReactNode;
2407
- children?: ReactNode;
2408
- /** Override the default tone icon. */
2409
- icon?: ReactNode;
2410
- /** When provided, renders a dismiss × that calls this. */
2411
- onDismiss?: () => void;
2412
- className?: string;
2413
- }
2414
- declare function Banner({ tone, title, children, icon, onDismiss, className }: BannerProps): react_jsx_runtime.JSX.Element;
2415
-
2416
- interface TabItem {
2417
- id: string;
2418
- label: ReactNode;
2419
- icon?: ReactNode;
2420
- disabled?: boolean;
2421
- }
2422
- interface TabsProps {
2423
- items: TabItem[];
2424
- value: string;
2425
- onChange: (id: string) => void;
2426
- variant?: 'underline' | 'pill';
2427
- className?: string;
2428
- }
2429
- declare function Tabs({ items, value, onChange, variant, className }: TabsProps): react_jsx_runtime.JSX.Element;
2430
-
2431
- interface AccordionItem {
2432
- id: string;
2433
- title: ReactNode;
2434
- content: ReactNode;
2435
- disabled?: boolean;
2436
- }
2437
- interface AccordionProps {
2438
- items: AccordionItem[];
2439
- defaultOpenIds?: string[];
2440
- /** Controlled open set — when provided, the component stops tracking its own. */
2441
- openIds?: string[];
2442
- onOpenChange?: (ids: string[]) => void;
2443
- allowMultiple?: boolean;
2444
- className?: string;
2445
- }
2446
- declare function Accordion({ items, defaultOpenIds, openIds, onOpenChange, allowMultiple, className, }: AccordionProps): react_jsx_runtime.JSX.Element;
2447
-
2448
- interface TooltipProps {
2449
- content: ReactNode;
2450
- side?: 'top' | 'bottom' | 'left' | 'right';
2451
- /** Hover delay before showing, in ms. */
2452
- delay?: number;
2453
- children: ReactNode;
2454
- }
2455
- declare function Tooltip({ content, side, delay, children }: TooltipProps): react_jsx_runtime.JSX.Element;
2456
-
2457
- interface ColoredBadgeProps {
2458
- /** Tailwind classes for the badge color, e.g. `bg-green-100 text-green-800`.
2459
- * Keep a per-app palette map rather than hardcoding colors at call sites. */
2460
- colorClass: string;
2461
- children: ReactNode;
2462
- /** `xs` = 10px (dense list cells), `sm` = 12px / px-2 (default), `md` =
2463
- * 12px / px-2.5 (matches StatusBadge). */
2464
- size?: 'xs' | 'sm' | 'md';
2465
- /** Capitalize each word — useful for raw status strings like `in_progress`
2466
- * (rendered as `In Progress`). Default false. */
2467
- capitalize?: boolean;
2468
- }
2469
- /**
2470
- * ColoredBadge — a small rounded-full pill whose colors are supplied as a
2471
- * Tailwind class string. Generic counterpart to StatusBadge (which maps status
2472
- * strings to semantic groups); use this when the caller already knows the color.
2473
- */
2474
- declare function ColoredBadge({ colorClass, children, size, capitalize }: ColoredBadgeProps): react_jsx_runtime.JSX.Element;
2475
-
2476
- interface EmptyStateProps {
2477
- /** Bold heading, e.g. "No invoices yet". */
2478
- title?: string;
2479
- /** Muted primary line. Defaults to "Nothing here yet." when neither
2480
- * `title` nor `message` is given. */
2481
- message?: string;
2482
- /** Secondary muted line. (`hint` is an accepted alias.) */
2483
- description?: string;
2484
- /** @deprecated alias for `description`. */
2485
- hint?: string;
2486
- /** Frame around the content: `dashed` (default), `card` (bordered surface),
2487
- * or `none`. */
2488
- variant?: 'dashed' | 'card' | 'none';
2489
- /** @deprecated set `variant="none"` instead. */
2490
- frameless?: boolean;
2491
- /** Show the placeholder icon. Defaults to true (false for `variant="card"`). */
2492
- icon?: boolean;
2493
- /** Action(s) rendered under the text. */
2494
- children?: ReactNode;
2495
- }
2496
- /**
2497
- * EmptyState — placeholder for empty lists/panes. Supersedes the per-portal
2498
- * copies: accepts both the `title`/`description` and `message`/`hint`/`frameless`
2499
- * prop shapes, with a single unified look.
2500
- */
2501
- declare function EmptyState({ title, message, description, hint, variant, frameless, icon, children, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
2502
-
2503
- interface PageHeaderProps {
2504
- title: string;
2505
- /** Muted line under the title. (`subtitle` is an accepted alias.) */
2506
- description?: string;
2507
- /** @deprecated alias for `description`. */
2508
- subtitle?: string;
2509
- /** Right-aligned actions. (`children` is also accepted.) */
2510
- actions?: ReactNode;
2511
- children?: ReactNode;
2512
- }
2513
- /**
2514
- * PageHeader — a page/section title with an optional muted description and a
2515
- * right-aligned actions slot. Accepts both the `description`/`actions` and the
2516
- * `subtitle`/`children` prop shapes the portals previously used locally.
2517
- */
2518
- declare function PageHeader({ title, description, subtitle, actions, children }: PageHeaderProps): react_jsx_runtime.JSX.Element;
2519
-
2520
- interface LoadingSpinnerProps {
2521
- /** Ring diameter: `sm` = 20px, `md` = 32px (default), `lg` = 48px. */
2522
- size?: 'sm' | 'md' | 'lg';
2523
- /** Wrapper padding utility (default `py-12`). Pass `''` to remove. */
2524
- padding?: string;
2525
- /** Extra classes on the centering wrapper. */
2526
- className?: string;
2527
- }
2528
- /**
2529
- * LoadingSpinner — a centered animated ring for pending/loading regions.
2530
- * (Distinct from the shell's internal "Loading…" text used inside data grids.)
2531
- */
2532
- declare function LoadingSpinner({ size, padding, className }: LoadingSpinnerProps): react_jsx_runtime.JSX.Element;
2533
-
2534
1519
  interface FilterOption {
2535
1520
  label: string;
2536
1521
  field: string;
@@ -2567,124 +1552,6 @@ declare function useFilters(): {
2567
1552
  filterParams: Record<string, string>;
2568
1553
  };
2569
1554
 
2570
- /**
2571
- * Severity — the health subset of the shell's status vocabulary.
2572
- *
2573
- * The shell already speaks `success | warning | danger` everywhere status has a
2574
- * colour (`StatusBadge`'s `SemanticGroup`, `Banner`'s `BannerTone`,
2575
- * `ConfirmDialog`'s `variant`). Health surfaces reuse those three words rather
2576
- * than introducing an ok/warn/crit dialect that would mean the same thing in a
2577
- * different language — a consumer mapping one to the other is a bug waiting to
2578
- * happen. The type is deliberately narrower than `SemanticGroup`: an alarm
2579
- * marker has exactly three things to say.
2580
- *
2581
- * "No severity" is expressed as the ABSENCE of a tone (`undefined`/`null`), not
2582
- * as a fourth member. Two different facts collapse into it — no reading at all,
2583
- * and a reading with nothing to judge it against — and both must render as
2584
- * "unknown" rather than borrowing the calm green of a measured healthy value.
2585
- * See `MetricBar`, which keeps them apart.
2586
- *
2587
- * A severity usually arrives from a backend rollup, so it crosses a JSON
2588
- * boundary where the compiler cannot follow it. `resolveSeverity` is what the
2589
- * components call: a token the shell does not recognise renders a LOUD unknown
2590
- * marker and logs, it never renders nothing. An alarm surface that silently
2591
- * stops alarming is the one failure these components exist to prevent, so it is
2592
- * also the one failure they must not have themselves.
2593
- */
2594
- /** Health tone. Same three words the rest of the shell uses for status colour. */
2595
- type SeverityTone = 'success' | 'warning' | 'danger';
2596
- /** True when `value` is one of the three tones. Exported so a consumer can
2597
- * validate a rollup at the fetch boundary — where a bad token can still be
2598
- * reported against its payload — rather than discovering it as a wrong pixel. */
2599
- declare function isSeverityTone(value: unknown): value is SeverityTone;
2600
- /**
2601
- * Severity of `value` against its bounds, or `null` when nothing can be said.
2602
- *
2603
- * Both bounds are INCLUSIVE (`>=`): a disk at exactly its `crit` number is
2604
- * `danger`. Either bound may be omitted — a metric with only a `crit` still
2605
- * judges — but with neither the answer is `null`, never `success`: no threshold
2606
- * is hardcoded here, not even as a fallback, so with nothing to measure against
2607
- * there is no verdict to report.
2608
- *
2609
- * A non-finite bound counts as omitted, not as a bound that nothing exceeds.
2610
- * `NaN >= NaN` is false, so an unguarded `warn={NaN}` would have quietly
2611
- * returned `success` — a verdict invented out of a missing threshold.
2612
- */
2613
- declare function severityOf(value: number | null | undefined, warn?: number | null, crit?: number | null): SeverityTone | null;
2614
-
2615
- /**
2616
- * Presentational building blocks for SidebarLayout filter sidebars (status
2617
- * buckets, categories, …) — the same item + group-label markup every list
2618
- * window renders. Data wiring (count fetching) stays in the consuming app.
2619
- */
2620
- declare function SidebarGroupLabel({ children }: {
2621
- children: ReactNode;
2622
- }): react_jsx_runtime.JSX.Element;
2623
- declare function SidebarNavItem({ label, count, active, onClick, severity }: {
2624
- label: string;
2625
- count?: number;
2626
- active: boolean;
2627
- onClick: () => void;
2628
- /**
2629
- * Optional health marker — a small dot before the label, in the shell's
2630
- * status vocabulary (`success | warning | danger`). For sidebars that double
2631
- * as an alarm surface: a problem several levels down inside a section stays
2632
- * visible on the always-on nav item that leads to it, without the operator
2633
- * having to open anything.
2634
- *
2635
- * Roll the tone up in the consuming app (worst-of its children) — the item
2636
- * renders a severity, it never computes one. Omitting it is not a claim of
2637
- * health, it is no claim at all, and renders exactly as an item did before
2638
- * this prop existed.
2639
- *
2640
- * A tone that arrives from a backend rollup has not been near the compiler,
2641
- * so an unrecognised token (`'crit'`, `'critical'`, a stale enum) renders a
2642
- * visible "unknown severity" marker and logs — never nothing. This item is
2643
- * often the ONLY place a deep alarm surfaces; a marker that quietly vanishes
2644
- * on a bad token would turn the safety feature into the outage.
2645
- */
2646
- severity?: SeverityTone;
2647
- }): react_jsx_runtime.JSX.Element;
2648
-
2649
- interface MetricBarProps {
2650
- /** Row label — `CPU`, `Memory`, `Disk`. Rendered in a fixed-width column so
2651
- * a stack of rows aligns. */
2652
- label?: ReactNode;
2653
- /** The measured value. `null` / `undefined` means NO READING — rendered as
2654
- * unknown, never as 0. */
2655
- value: number | null | undefined;
2656
- /** Value mapped to a full bar. Default 100. Must be a positive finite number:
2657
- * it is the divisor, so `0`, a negative or `NaN` is not a scale. Given one,
2658
- * the row prints the value but draws no proportional bar and no ticks —
2659
- * there is nothing truthful to draw them against. */
2660
- max?: number;
2661
- /** Warning bound, in the same unit as `value`. Inclusive (`>=`). */
2662
- warn?: number | null;
2663
- /** Critical bound, in the same unit as `value`. Inclusive (`>=`). */
2664
- crit?: number | null;
2665
- /** Forces the tone when the caller judges severity itself (e.g. a rollup
2666
- * served by the backend). Overrides `warn`/`crit` for colour; the ticks
2667
- * still render wherever `warn`/`crit` say. */
2668
- severity?: SeverityTone;
2669
- /** Trailing secondary text — `10.9 / 16 GiB`, `4 vCPU`. Hidden when there is
2670
- * no reading, where the row has something more important to say. */
2671
- detail?: ReactNode;
2672
- /** Formats the printed value. Default: one decimal plus `%` on the default
2673
- * 0–100 scale, the bare number on any other `max` (a custom scale is not a
2674
- * percentage, and printing one would be a lie). */
2675
- formatValue?: (value: number) => string;
2676
- /** Wording for "no reading". Default `no data`. */
2677
- emptyLabel?: string;
2678
- /** `sm` (default) — the compact row that stacks three to a card.
2679
- * `md` — bigger value type for a standalone stat. Neither draws a frame;
2680
- * wrap in a `Card` (or your own) if you want one. */
2681
- size?: 'sm' | 'md';
2682
- /** Accessible name for the meter. Defaults to `label` when it's a string. */
2683
- ariaLabel?: string;
2684
- className?: string;
2685
- }
2686
- declare function MetricBar({ label, value, max, warn, crit, severity, detail, formatValue, emptyLabel, size, ariaLabel, className, }: MetricBarProps): react_jsx_runtime.JSX.Element;
2687
-
2688
1555
  /**
2689
1556
  * Shell interaction marks, folded into every perf-log record.
2690
1557
  *
@@ -2861,54 +1728,6 @@ interface UndoControlsProps {
2861
1728
  */
2862
1729
  declare function UndoControls({ className }: UndoControlsProps): react_jsx_runtime.JSX.Element | null;
2863
1730
 
2864
- /** Default item shape — overridable via the accessor props for any other shape. */
2865
- interface ContainerFillItem {
2866
- quantity?: number | null;
2867
- actual_qty?: number | null;
2868
- _isNew?: boolean;
2869
- }
2870
- interface ContainerFillChartProps<T = ContainerFillItem> {
2871
- /** Line items to chart. Each contributes `qty * getVolume(item)` to the total. */
2872
- items: T[];
2873
- /**
2874
- * Per-unit volume (m³) for an item. The lifted app concern — return 0 when
2875
- * unknown. Total volume per item is `quantity * getVolume(item)`.
2876
- */
2877
- getVolume: (item: T) => number;
2878
- /**
2879
- * Single-bar quantity source when no actuals are present:
2880
- * - 'instruction' (default): use the instruction quantity.
2881
- * - 'actual': use the actual quantity (falling back to instruction).
2882
- *
2883
- * When actuals exist on at least one item the chart auto-switches to dual-bar
2884
- * mode regardless of `qtyField` — instruction (blue) and loaded (green) are
2885
- * layered into the same bar so both are visible at once.
2886
- */
2887
- qtyField?: 'instruction' | 'actual';
2888
- /** Show the "new items" indicator next to the row count. */
2889
- showNewIndicator?: boolean;
2890
- /** Instruction quantity accessor. Defaults to `item.quantity`. */
2891
- getInstructionQty?: (item: T) => number | null | undefined;
2892
- /** Actual/loaded quantity accessor. Defaults to `item.actual_qty`. */
2893
- getActualQty?: (item: T) => number | null | undefined;
2894
- /**
2895
- * Whether an item should count as charted at all. Defaults to "has a non-empty
2896
- * key" — i.e. items whose volume source identifies a real part. By default
2897
- * every item is charted; supply this to drop placeholder/empty rows.
2898
- */
2899
- isFilled?: (item: T) => boolean;
2900
- /** Whether an item is newly added (drives `showNewIndicator`). Defaults to `item._isNew`. */
2901
- isNew?: (item: T) => boolean;
2902
- className?: string;
2903
- style?: CSSProperties;
2904
- }
2905
- /**
2906
- * Container-fill chart for shipping loading lists. Presentational only — pass
2907
- * `getVolume` to inject per-unit volumes; the chart owns the container math and
2908
- * the instruction-vs-loaded dual-bar rendering.
2909
- */
2910
- declare function ContainerFillChart<T = ContainerFillItem>({ items, getVolume, qtyField, showNewIndicator, getInstructionQty, getActualQty, isFilled, isNew, className, style, }: ContainerFillChartProps<T>): react_jsx_runtime.JSX.Element | null;
2911
-
2912
1731
  /** Result of a single health poll. `latencyMs` is optional; when omitted on
2913
1732
  * an ok result the indicator simply shows no latency for that poll. */
2914
1733
  interface HealthCheckResult {
@@ -3027,151 +1846,6 @@ interface PdfActionButtonProps {
3027
1846
  */
3028
1847
  declare function PdfActionButton({ fetchPdf, filename, label, className, disabled, onEmail, onPreviewOpened, icon, }: PdfActionButtonProps): react_jsx_runtime.JSX.Element;
3029
1848
 
3030
- /** Visual category for a milestone. Drives shape + colour so the user can
3031
- * tell different milestone types apart at a glance. */
3032
- type MilestoneKind = 'default' | 'dfm' | 'shipment' | 'testing' | 'completion';
3033
- /** A single point on the timeline. Generic, product-agnostic: the consuming
3034
- * app maps its domain records to this shape in a thin wrapper. */
3035
- interface Milestone {
3036
- /** Stable key — used for React keys and the active-dot lookup. */
3037
- key: string;
3038
- /** Short label rendered above the dot when active / hovered. */
3039
- label: string;
3040
- /** ISO date string (`YYYY-MM-DD`) for the milestone. Null / undefined =
3041
- * "not reached yet"; renders as a faded outline dot at the *expected*
3042
- * position (between its neighbours) instead of a real coordinate. */
3043
- date: string | null | undefined;
3044
- /** Optional second line for the hover tooltip. */
3045
- detail?: string;
3046
- /** Optional click handler so the caller can open a related entity. */
3047
- onClick?: () => void;
3048
- /** Optional visual category — defaults to `'default'` (blue circle). */
3049
- kind?: MilestoneKind;
3050
- /** Optional phase grouping — milestones sharing the same `phase` value
3051
- * render with a bracket below the bar showing they happened in parallel
3052
- * (e.g. two concurrent QA steps). Lookup the human-readable name from
3053
- * `MilestoneTimelineProps.phaseLabels`. */
3054
- phase?: string;
3055
- }
3056
- interface MilestoneTimelineProps {
3057
- /** Title rendered above the bar — e.g. "Mould Development Timeline". */
3058
- title: string;
3059
- /** Ordered milestones from earliest expected to latest expected. The order
3060
- * controls the fallback position for milestones with no date yet. */
3061
- milestones: Milestone[];
3062
- /** Optional sub-title to the right of the title (e.g. lead-time summary).
3063
- * When omitted, an auto lead-time summary is computed from the dates. */
3064
- summary?: string;
3065
- /** Optional explicit right edge — when provided, the bar always ends here
3066
- * rather than padding to today. Used when the axis should stop at a known
3067
- * final milestone and not run on past it. */
3068
- endDate?: string | null;
3069
- /** Maps `Milestone.phase` keys to the human-readable phase label that
3070
- * appears under the bracket — e.g. `{ qa: 'QA & Sample' }`. Phases
3071
- * without an entry fall back to the phase key itself. */
3072
- phaseLabels?: Record<string, string>;
3073
- }
3074
- /**
3075
- * Static date-axis bar showing a sequence of milestones along a single line.
3076
- *
3077
- * - No scrubber / playback / interpolation — milestones don't move.
3078
- * - "Not reached yet" milestones (no date) render as outline dots wedged at
3079
- * their expected position so the user can see what's still pending.
3080
- * - First / last milestones render as inline edge labels; middle ones stagger
3081
- * above/below the bar so adjacent labels never collide.
3082
- * - Milestones sharing a `phase` (2+ members) get a bracket marking parallel
3083
- * work. The filled portion of the bar never runs past today.
3084
- *
3085
- * Product-agnostic: it takes generic `Milestone` data as props. Map your
3086
- * domain records to the `Milestone` shape in a thin wrapper at the call site.
3087
- */
3088
- declare function MilestoneTimeline({ title, milestones, summary, endDate, phaseLabels }: MilestoneTimelineProps): react_jsx_runtime.JSX.Element;
3089
-
3090
- /**
3091
- * Shared chart types. The charts are dependency-free inline SVG/CSS — color
3092
- * defaults to `currentColor` so a parent `text-*` class themes them, and
3093
- * geometry comes from numeric props (not Tailwind classes), so they sidestep
3094
- * the design-sync compiled-CSS / arbitrary-value constraints entirely.
3095
- */
3096
-
3097
- interface SparklineProps {
3098
- data: number[];
3099
- width?: number;
3100
- height?: number;
3101
- /** Line color. Defaults to `currentColor`. */
3102
- stroke?: string;
3103
- /** Area fill under the line. Omit for a bare line. */
3104
- fill?: string;
3105
- strokeWidth?: number;
3106
- showDots?: boolean;
3107
- className?: string;
3108
- style?: CSSProperties;
3109
- }
3110
- interface BarChartProps {
3111
- data: number[];
3112
- /** Optional labels under each bar. */
3113
- labels?: string[];
3114
- height?: number;
3115
- /** Bar color. Defaults to `currentColor`. */
3116
- color?: string;
3117
- /** Per-bar color overrides. */
3118
- colors?: string[];
3119
- /** Value mapped to a full-height bar. Defaults to the max of `data`. */
3120
- max?: number;
3121
- /** Gap between bars, in px. */
3122
- gap?: number;
3123
- className?: string;
3124
- style?: CSSProperties;
3125
- }
3126
- interface DonutSegment {
3127
- label: string;
3128
- value: number;
3129
- color?: string;
3130
- }
3131
- interface DonutChartProps {
3132
- segments: DonutSegment[];
3133
- size?: number;
3134
- thickness?: number;
3135
- /** Rendered in the hole, e.g. a total. */
3136
- centerLabel?: ReactNode;
3137
- className?: string;
3138
- style?: CSSProperties;
3139
- }
3140
-
3141
- declare function Sparkline({ data, width, height, stroke, fill, strokeWidth, showDots, className, style, }: SparklineProps): react_jsx_runtime.JSX.Element | null;
3142
-
3143
- declare function BarChart({ data, labels, height, color, colors, max, gap, className, style, }: BarChartProps): react_jsx_runtime.JSX.Element | null;
3144
-
3145
- declare function DonutChart({ segments, size, thickness, centerLabel, className, style }: DonutChartProps): react_jsx_runtime.JSX.Element;
3146
-
3147
- declare function DashboardTemplate(): react_jsx_runtime.JSX.Element;
3148
-
3149
- declare function DataTablePage(): react_jsx_runtime.JSX.Element;
3150
-
3151
- declare function FormLayoutPage(): react_jsx_runtime.JSX.Element;
3152
-
3153
- declare function CheckoutTemplate(): react_jsx_runtime.JSX.Element;
3154
-
3155
- declare function EmailTemplate(): react_jsx_runtime.JSX.Element;
3156
-
3157
- declare function ChatTemplate(): react_jsx_runtime.JSX.Element;
3158
-
3159
- declare function GalleryTemplate(): react_jsx_runtime.JSX.Element;
3160
-
3161
- interface AuthScreenProps {
3162
- mode?: 'login' | 'register' | 'forgot';
3163
- }
3164
- declare function AuthScreen({ mode }: AuthScreenProps): react_jsx_runtime.JSX.Element;
3165
-
3166
- interface ErrorPageProps {
3167
- code?: 403 | 404 | 500;
3168
- }
3169
- declare function ErrorPage({ code }: ErrorPageProps): react_jsx_runtime.JSX.Element;
3170
-
3171
- /** Package version, injected by tsup at build time. Stays as an empty
3172
- * string when the source is consumed without a build (e.g. tests). */
3173
- declare const VERSION: string;
3174
-
3175
1849
  interface ShellAuth {
3176
1850
  /** Returns true if the current user has any of the listed permission codes. */
3177
1851
  hasAnyPerm: (perms: string[]) => boolean;
@@ -3182,29 +1856,6 @@ declare function ShellAuthProvider({ value, children }: {
3182
1856
  }): react_jsx_runtime.JSX.Element;
3183
1857
  declare function useShellAuth(): ShellAuth;
3184
1858
 
3185
- interface ShellPrefsAdapter {
3186
- /** The current prefs object. The shell reads its known keys directly off
3187
- * this; consumer-private keys are ignored. */
3188
- prefs: Record<string, any>;
3189
- /** Patch a subset of prefs. The shell calls this with shallow diffs. */
3190
- save: (patch: Record<string, any>) => Promise<void> | void;
3191
- }
3192
- declare function ShellPrefsProvider({ value, children, }: {
3193
- value: ShellPrefsAdapter;
3194
- children: ReactNode;
3195
- }): react_jsx_runtime.JSX.Element;
3196
- /** Default localStorage-backed adapter — useful when the consumer doesn't
3197
- * ship a backend. Pass the result into <ShellPrefsProvider value={…}>.
3198
- *
3199
- * `defaults` are merged behind whatever's already stored, so they only
3200
- * apply for keys the user hasn't set yet. Useful for opting out of bundled
3201
- * features (e.g. `{ show_desktop_version: false }`). */
3202
- declare function useLocalStoragePrefs(storageKey?: string, defaults?: Record<string, any>): ShellPrefsAdapter;
3203
- /** Returns the active prefs adapter. When no provider is mounted, returns a
3204
- * no-op adapter that reads as empty and silently drops saves — components
3205
- * still render, but persistence is a no-op. */
3206
- declare function useShellPrefs(): ShellPrefsAdapter;
3207
-
3208
1859
  type EntityFetcher = (endpoint: string, id: string) => Promise<any>;
3209
1860
  declare function ShellEntityFetcherProvider({ value, children, }: {
3210
1861
  value: EntityFetcher;
@@ -3293,25 +1944,6 @@ declare function setShellAuthBridge(bridge: {
3293
1944
  logout?: () => void;
3294
1945
  }): void;
3295
1946
 
3296
- /** Frosted glass style — shared across all menus, popups, and glass UI elements.
3297
- * Reads --menu-opacity CSS variable set by the theme system, and adapts the
3298
- * base tint to dark mode so menus don't stay light-cream when text is light. */
3299
- declare function glassStyle(opacity?: number): CSSProperties;
3300
- /** Glass divider border color */
3301
- declare const GLASS_DIVIDER = "border-white/20";
3302
- /** Glass input/search bar background — declared in styles.css so it can adapt
3303
- * to dark mode (a flat `bg-white/15` reads as a too-bright tile on the dark
3304
- * glass gradient). */
3305
- declare const GLASS_INPUT_BG = "glass-input-bg";
3306
-
3307
- /**
3308
- * Format a date string (YYYY-MM-DD or ISO timestamp) for display.
3309
- * Returns '—' for null/empty values.
3310
- */
3311
- declare function formatDate(value: string | null | undefined): string;
3312
-
3313
- declare function useClickOutside(ref: RefObject<HTMLElement | null>, onClose: () => void): void;
3314
-
3315
1947
  /**
3316
1948
  * Registers Alt+Shift+N (Windows) / Opt+Shift+N (Mac) hotkey to trigger a "New" action.
3317
1949
  * Uses e.code (physical key) to avoid locale/modifier character issues.
@@ -3508,4 +2140,4 @@ interface UndoState {
3508
2140
  future: UndoStep[];
3509
2141
  }
3510
2142
 
3511
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, Accordion, type AccordionItem, type AccordionProps, type ActivityKind, type AsyncEnvironment, AuthScreen, type AuthScreenProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarSize, type AvatarStatus, BLOCKED_PCT_CPU, Banner, type BannerProps, type BannerTone, BarChart, type BarChartProps, type BatteryInfo, BehaviorPanel, type BottleneckKind, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, type BulkColumn, type BulkColumnKind, BulkImportGrid, type BulkImportGridProps, type BulkRow, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, Card, type CardProps, type CellStyle, ChangePasswordForm, type ChangePasswordFormProps, type ChangelogEntry, ChatTemplate, Checkbox, type CheckboxProps, CheckoutTemplate, type ClockCalendarConfig, ColoredBadge, type ColoredBadgeProps, type ColumnDef, ConfirmProvider, ContainerFillChart, type ContainerFillChartProps, type ContainerFillItem, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, type CustomizationSection, DEV_BANNER_TEXT, DashboardTemplate, DataTablePage, DateRangePicker, type DateRangePickerProps, Desktop, type DesktopContextMenuItem, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, DonutChart, type DonutChartProps, type DonutSegment, type DuplicateGroup, ENTER, EditableGrid, type EditableGridProps, EmailTemplate, EmptyState, type EmptyStateProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListContextAction, type EntityListProps, ErrorPage, type ErrorPageProps, FilterBar, type FilterOption, FormField, type FormFieldProps, FormLayoutPage, type FpsGroup, GLASS_DIVIDER, GLASS_INPUT_BG, GalleryTemplate, GlobalSearch, type GridColumn, type HealthCheckResult, HelpCenter, type HelpCenterDoc, type HelpCenterProps, INPUT_BASE, ImageAnnotator, type ImageAnnotatorHandle, type ImageAnnotatorProps, Input, type InputProps, Kanban, type KanbanColumn, type KanbanProps, LOG_CAP, Label, type LabelProps, Layout, type LayoutProps, ListFooter, ListLoadError, type ListLoadErrorProps, LoadingSpinner, type LoadingSpinnerProps, type LogSummary, MIN_EVENT_SAMPLES, MIN_GROUP_SAMPLES, MOD, Markdown, type MarkdownProps, MediaUploadField, type MediaUploadFieldProps, MediaUploadGrid, type MediaUploadGridItem, type MediaUploadGridProps, type MenuLayer, type MergeBulkOptions, type MergeBulkResult, MetricBar, type MetricBarProps, type Milestone, type MilestoneKind, MilestoneTimeline, type MilestoneTimelineProps, type MobileAppConfig, Modal, ModalActions, NativeSelect, NotificationBell, type NotificationsConfig, PageHeader, type PageHeaderProps, type PaginatedResponse, Pagination, type PaginationProps, PdfActionButton, type PdfActionButtonProps, type PerfEnvironment, type PerfLogRecord, type PerfReading, type PerfReport, PerfStats, type PerfStatsProps, type PlatformHints, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, Radio, type RadioProps, ResizableTable, SHIFT, SMOOTH_FPS, type SearchConfig, type SearchProvider, type SearchResult, type SearchableOption, SearchableSelect, type SearchableSelectProps, Select, type SelectOption, type SelectProps, type SemanticGroup, ServerStatusIndicator, type ServerStatusIndicatorProps, type ServerStatusUser, type SeverityTone, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, SidebarActionButton, type SidebarActionButtonProps, SidebarGroupLabel, SidebarLayout, type SidebarLayoutProps, SidebarNavItem, type SortState, SoundsPanel, Sparkline, type SparklineProps, type StagedTarget, StartMenu, StatCard, type StatCardProps, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TabItem, Tabs, type TabsProps, Textarea, type TextareaProps, type TodoProvider, type TodoTask, Tooltip, type TooltipProps, TopNav, type TopNavItem, type TopNavProps, UndoControls, type UndoControlsApi, type UndoControlsProps, UndoProvider, type UndoProviderProps, type UndoSnapshot, type UndoState, type UndoStep, type UndoableOptions, VERSION, type Verdict, WidgetManager, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowRegistry, type WindowTarget, type WindowTargetOptions, WindowTitle, appendRecord as appendPerfRecord, applyDevTitle, beginWindowGesture, classifyActivity, classify as classifyPerf, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, createWindowTarget, describeMachine, describePerfReport, exitExposeMode, findDuplicateKeys, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, inputClasses, isDevEnv, isInteracting, isMac, isSeverityTone, markMenuOpen, mediaFileName, mergeBulkItems, toCsv as perfLogToCsv, perfReportFile, prompt, readEnvironment as readPerfEnvironment, registerModalEscapeInterceptor, requestAsyncEnvironment, requestWindowFront, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, severityOf, subscribeExposeHighlight, summariseFrames, summariseLog as summarisePerfLog, toISODate, toast, toggleExposeMode, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useFilters, useInfiniteScroll, useIsActiveWindow, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useUndo, useUndoable, useUndoableState, useWidgetSettings, useWindowDirty, useWindowManager, useWindowMenuItem, useWindowTarget, useWindowTitle };
2143
+ export { type ActivityKind, type AsyncEnvironment, BLOCKED_PCT_CPU, type BatteryInfo, BehaviorPanel, type BottleneckKind, type BulkColumn, type BulkColumnKind, BulkImportGrid, type BulkImportGridProps, type BulkRow, CancelButton, ChangePasswordForm, type ChangePasswordFormProps, type ChangelogEntry, type ClockCalendarConfig, ColumnDef, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, type CustomizationSection, DEV_BANNER_TEXT, Desktop, type DesktopContextMenuItem, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, type DuplicateGroup, type EntityFetcher, EntityList, type EntityListColumn, type EntityListContextAction, type EntityListProps, FilterBar, type FilterOption, type FpsGroup, GlobalSearch, type HealthCheckResult, ImageAnnotator, type ImageAnnotatorHandle, type ImageAnnotatorProps, LOG_CAP, Layout, type LayoutProps, type LogSummary, MIN_EVENT_SAMPLES, MIN_GROUP_SAMPLES, type MenuLayer, type MergeBulkOptions, type MergeBulkResult, type MobileAppConfig, Modal, ModalActions, NotificationBell, type NotificationsConfig, PaginatedResponse, PdfActionButton, type PdfActionButtonProps, type PerfEnvironment, type PerfLogRecord, type PerfReading, type PerfReport, PerfStats, type PerfStatsProps, type PlatformHints, ResizableTable, SMOOTH_FPS, type SearchConfig, type SearchProvider, type SearchResult, ServerStatusIndicator, type ServerStatusIndicatorProps, type ServerStatusUser, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, ShortcutHelp, SortState, SoundsPanel, type StagedTarget, StartMenu, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TodoProvider, type TodoTask, UndoControls, type UndoControlsApi, type UndoControlsProps, UndoProvider, type UndoProviderProps, type UndoSnapshot, type UndoState, type UndoStep, type UndoableOptions, type Verdict, WidgetManager, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowRegistry, type WindowTarget, type WindowTargetOptions, WindowTitle, appendRecord as appendPerfRecord, applyDevTitle, beginWindowGesture, classifyActivity, classify as classifyPerf, commitExposeHighlight, createWindowRegistry, createWindowTarget, describeMachine, describePerfReport, exitExposeMode, findDuplicateKeys, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isDevEnv, isInteracting, markMenuOpen, mergeBulkItems, toCsv as perfLogToCsv, perfReportFile, readEnvironment as readPerfEnvironment, registerModalEscapeInterceptor, requestAsyncEnvironment, requestWindowFront, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, summariseFrames, summariseLog as summarisePerfLog, toggleExposeMode, useColumnConfig, useDesktopHost, useEditHotkey, useFilters, useInfiniteScroll, useIsActiveWindow, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useSort, useTableNav, useUndo, useUndoable, useUndoableState, useWidgetSettings, useWindowDirty, useWindowManager, useWindowMenuItem, useWindowTarget, useWindowTitle };