@overdoser/react-toolkit 0.18.0 → 0.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 (157) hide show
  1. package/AGENTS.md +51 -7
  2. package/CHANGELOG.md +162 -0
  3. package/components/Accordion/Accordion.d.ts +94 -0
  4. package/components/Accordion/Accordion.js +180 -0
  5. package/components/Accordion/Accordion.module.scss.js +36 -0
  6. package/components/Accordion/index.d.ts +2 -0
  7. package/components/Alert/Alert.d.ts +29 -1
  8. package/components/Alert/Alert.js +44 -30
  9. package/components/Alert/Alert.module.scss.js +24 -16
  10. package/components/Alert/index.d.ts +1 -1
  11. package/components/Card/Card.d.ts +86 -0
  12. package/components/Card/Card.js +132 -0
  13. package/components/Card/Card.module.scss.js +60 -0
  14. package/components/Card/index.d.ts +2 -0
  15. package/components/Chip/Chip.d.ts +86 -0
  16. package/components/Chip/Chip.js +141 -0
  17. package/components/Chip/Chip.module.scss.js +59 -0
  18. package/components/Chip/index.d.ts +2 -0
  19. package/components/CodeBlock/CodeBlock.d.ts +78 -0
  20. package/components/CodeBlock/CodeBlock.js +120 -0
  21. package/components/CodeBlock/CodeBlock.module.scss.js +43 -0
  22. package/components/CodeBlock/index.d.ts +2 -0
  23. package/components/CommandPalette/CommandPalette.d.ts +141 -0
  24. package/components/CommandPalette/CommandPalette.js +397 -0
  25. package/components/CommandPalette/CommandPalette.module.scss.js +49 -0
  26. package/components/CommandPalette/index.d.ts +2 -0
  27. package/components/ConfirmDialog/ConfirmDialog.d.ts +119 -0
  28. package/components/ConfirmDialog/ConfirmDialog.js +201 -0
  29. package/components/ConfirmDialog/ConfirmDialog.module.scss.js +21 -0
  30. package/components/ConfirmDialog/index.d.ts +2 -0
  31. package/components/Drawer/Drawer.d.ts +1 -0
  32. package/components/Drawer/Drawer.js +35 -36
  33. package/components/Drawer/Drawer.module.scss.js +20 -18
  34. package/components/Dropdown/Dropdown.d.ts +47 -7
  35. package/components/Dropdown/Dropdown.js +174 -81
  36. package/components/Dropdown/Dropdown.module.scss.js +40 -22
  37. package/components/Dropdown/DropdownItem.d.ts +31 -2
  38. package/components/Dropdown/DropdownItem.js +54 -27
  39. package/components/Dropdown/DropdownLabel.d.ts +11 -0
  40. package/components/Dropdown/DropdownLabel.js +11 -0
  41. package/components/Dropdown/DropdownSeparator.d.ts +12 -0
  42. package/components/Dropdown/DropdownSeparator.js +11 -0
  43. package/components/Dropdown/dropdownContext.d.ts +6 -0
  44. package/components/Dropdown/dropdownContext.js +5 -0
  45. package/components/Dropdown/index.d.ts +8 -2
  46. package/components/Dropdown/useContextMenu.d.ts +32 -0
  47. package/components/Dropdown/useContextMenu.js +18 -0
  48. package/components/EmptyState/EmptyState.d.ts +53 -0
  49. package/components/EmptyState/EmptyState.js +55 -0
  50. package/components/EmptyState/EmptyState.module.scss.js +25 -0
  51. package/components/EmptyState/index.d.ts +2 -0
  52. package/components/Form/FormField.js +25 -24
  53. package/components/ImageViewer/ImageViewer.d.ts +105 -0
  54. package/components/ImageViewer/ImageViewer.js +201 -0
  55. package/components/ImageViewer/ImageViewer.module.scss.js +47 -0
  56. package/components/ImageViewer/index.d.ts +4 -0
  57. package/components/ImageViewer/useZoomPan.d.ts +94 -0
  58. package/components/ImageViewer/useZoomPan.js +141 -0
  59. package/components/Kbd/Kbd.d.ts +26 -0
  60. package/components/Kbd/Kbd.js +22 -0
  61. package/components/Kbd/Kbd.module.scss.js +17 -0
  62. package/components/Kbd/index.d.ts +2 -0
  63. package/components/KeyValueList/KeyValueList.d.ts +84 -0
  64. package/components/KeyValueList/KeyValueList.js +127 -0
  65. package/components/KeyValueList/KeyValueList.module.scss.js +43 -0
  66. package/components/KeyValueList/index.d.ts +2 -0
  67. package/components/Modal/Modal.d.ts +1 -0
  68. package/components/Modal/Modal.js +40 -41
  69. package/components/Modal/Modal.module.scss.js +18 -16
  70. package/components/PageHeader/PageHeader.d.ts +61 -0
  71. package/components/PageHeader/PageHeader.js +73 -0
  72. package/components/PageHeader/PageHeader.module.scss.js +43 -0
  73. package/components/PageHeader/index.d.ts +2 -0
  74. package/components/ProgressBar/ProgressBar.d.ts +74 -0
  75. package/components/ProgressBar/ProgressBar.js +90 -0
  76. package/components/ProgressBar/ProgressBar.module.scss.js +51 -0
  77. package/components/ProgressBar/index.d.ts +2 -0
  78. package/components/RelativeTime/RelativeTime.d.ts +45 -0
  79. package/components/RelativeTime/RelativeTime.js +43 -0
  80. package/components/RelativeTime/RelativeTime.module.scss.js +7 -0
  81. package/components/RelativeTime/index.d.ts +2 -0
  82. package/components/SegmentedControl/SegmentedControl.d.ts +84 -0
  83. package/components/SegmentedControl/SegmentedControl.js +131 -0
  84. package/components/SegmentedControl/SegmentedControl.module.scss.js +39 -0
  85. package/components/SegmentedControl/index.d.ts +2 -0
  86. package/components/SplitPane/SplitPane.d.ts +61 -0
  87. package/components/SplitPane/SplitPane.js +171 -0
  88. package/components/SplitPane/SplitPane.module.scss.js +25 -0
  89. package/components/SplitPane/index.d.ts +2 -0
  90. package/components/StatCard/StatCard.d.ts +105 -0
  91. package/components/StatCard/StatCard.js +127 -0
  92. package/components/StatCard/StatCard.module.scss.js +72 -0
  93. package/components/StatCard/index.d.ts +2 -0
  94. package/components/StatusDot/StatusDot.d.ts +33 -0
  95. package/components/StatusDot/StatusDot.js +39 -0
  96. package/components/StatusDot/StatusDot.module.scss.js +32 -0
  97. package/components/StatusDot/index.d.ts +2 -0
  98. package/components/Table/Table.d.ts +140 -17
  99. package/components/Table/Table.js +382 -210
  100. package/components/Table/Table.module.scss.js +68 -46
  101. package/components/Table/index.d.ts +1 -1
  102. package/components/Table/useTableSort.d.ts +1 -1
  103. package/components/ThemeToggle/ThemeToggle.d.ts +40 -0
  104. package/components/ThemeToggle/ThemeToggle.js +98 -0
  105. package/components/ThemeToggle/ThemeToggle.module.scss.js +23 -0
  106. package/components/ThemeToggle/index.d.ts +2 -0
  107. package/components/inputs/Checkbox/Checkbox.d.ts +2 -0
  108. package/components/inputs/Checkbox/Checkbox.js +29 -28
  109. package/components/inputs/Checkbox/Checkbox.module.scss.js +8 -6
  110. package/components/inputs/Input/Input.d.ts +33 -1
  111. package/components/inputs/Input/Input.js +94 -35
  112. package/components/inputs/Input/Input.module.scss.js +14 -12
  113. package/components/inputs/Radio/Radio.d.ts +5 -4
  114. package/components/inputs/Radio/Radio.js +55 -50
  115. package/components/inputs/Radio/Radio.module.scss.js +12 -10
  116. package/components/inputs/SearchInput/SearchInput.d.ts +57 -0
  117. package/components/inputs/SearchInput/SearchInput.js +116 -0
  118. package/components/inputs/SearchInput/SearchInput.module.scss.js +13 -0
  119. package/components/inputs/SearchInput/index.d.ts +2 -0
  120. package/components/inputs/Select/Select.d.ts +52 -0
  121. package/components/inputs/Select/Select.js +494 -385
  122. package/components/inputs/Select/Select.module.scss.js +34 -30
  123. package/components/inputs/Switch/Switch.d.ts +15 -0
  124. package/components/inputs/Switch/Switch.js +8 -0
  125. package/components/inputs/Switch/index.d.ts +2 -0
  126. package/hooks/useDebouncedValue.d.ts +15 -0
  127. package/hooks/useDebouncedValue.js +15 -0
  128. package/hooks/useElementSize.d.ts +20 -0
  129. package/hooks/useElementSize.js +23 -0
  130. package/hooks/useKeyboard.d.ts +49 -5
  131. package/hooks/useKeyboard.js +66 -16
  132. package/hooks/useMediaQuery.d.ts +14 -0
  133. package/hooks/useMediaQuery.js +16 -0
  134. package/hooks/useNow.d.ts +14 -0
  135. package/hooks/useNow.js +35 -0
  136. package/hooks/usePersistedState.d.ts +30 -0
  137. package/hooks/usePersistedState.js +99 -0
  138. package/hooks/useResizable.d.ts +66 -0
  139. package/hooks/useResizable.js +105 -0
  140. package/hooks/useTheme.d.ts +33 -0
  141. package/hooks/useTheme.js +25 -0
  142. package/index.css +1 -1
  143. package/index.d.ts +58 -4
  144. package/index.js +208 -132
  145. package/index.layered.css +1 -1
  146. package/llms.txt +620 -26
  147. package/manifest.json +1795 -99
  148. package/package.json +1 -1
  149. package/recipes/confirm-modal.tsx +65 -53
  150. package/recipes/floating-copy-button.tsx +32 -28
  151. package/utils/formatBytes.d.ts +21 -0
  152. package/utils/formatBytes.js +14 -0
  153. package/utils/index.d.ts +6 -0
  154. package/utils/themeScript.d.ts +19 -0
  155. package/utils/themeScript.js +9 -0
  156. package/utils/timeAgo.d.ts +33 -0
  157. package/utils/timeAgo.js +37 -0
package/manifest.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Machine-readable manifest of components, props, allowed values, and hooks. Generated for tooling and AI assistants.",
6
6
  "themeCssImport": "@overdoser/react-toolkit/theme.css",
7
7
  "themeCssLayeredImport": "@overdoser/react-toolkit/theme.layered.css",
8
- "stylingNotes": "className/classes.* overrides are plain CSS classes \u2014 they only beat built-in styles if inserted after them. Import theme.layered.css (cascade layer 'crk') instead of theme.css to make any unlayered consumer rule, including classes.*, win deterministically regardless of order. theme.css and theme.layered.css are identical except the layer wrapper \u2014 import exactly one (never both); --crk-* token theming works the same in either.",
8
+ "stylingNotes": "className/classes.* overrides are plain CSS classes — they only beat built-in styles if inserted after them. Import theme.layered.css (cascade layer 'crk') instead of theme.css to make any unlayered consumer rule, including classes.*, win deterministically regardless of order. theme.css and theme.layered.css are identical except the layer wrapper — import exactly one (never both); --crk-* token theming works the same in either.",
9
9
  "peerDependencies": {
10
10
  "required": [
11
11
  "react",
@@ -63,7 +63,7 @@
63
63
  "iconOnly": {
64
64
  "type": "boolean",
65
65
  "default": false,
66
- "notes": "Squares the button and renders content larger/bolder. For single-glyph buttons (\u2039, \u203a, \u00d7, +). Always pair with aria-label."
66
+ "notes": "Squares the button and renders content larger/bolder. For single-glyph buttons (‹, ›, ×, +). Always pair with aria-label."
67
67
  },
68
68
  "classes": {
69
69
  "type": "Partial<ButtonClasses>",
@@ -82,7 +82,7 @@
82
82
  "element": "button",
83
83
  "extendsNativeProps": "button (except children)",
84
84
  "forwardsRef": true,
85
- "notes": "Stateful action button with morphing icon/label layers: idle \u2192 (armed) \u2192 (pending) \u2192 success \u2192 idle. Async onAction shows a pending spinner; confirmLabel adds a two-step confirm. Phase exposed as data-phase on the root; transitions/colors themeable via --crk-action-* custom properties; respects prefers-reduced-motion.",
85
+ "notes": "Stateful action button with morphing icon/label layers: idle → (armed) → (pending) → success → idle. Async onAction shows a pending spinner; confirmLabel adds a two-step confirm. Phase exposed as data-phase on the root; transitions/colors themeable via --crk-action-* custom properties; respects prefers-reduced-motion.",
86
86
  "props": {
87
87
  "icon": {
88
88
  "type": "ReactNode",
@@ -120,7 +120,7 @@
120
120
  },
121
121
  "onAction": {
122
122
  "type": "(context: { setProgress: (percent: number | null) => void }) => void | Promise<unknown>",
123
- "notes": "Return a promise for a pending phase; rejection returns to idle and calls onError. Call context.setProgress(0\u2013100) during the promise for a determinate pending state (% label + accent fill bar); null falls back to the spinner."
123
+ "notes": "Return a promise for a pending phase; rejection returns to idle and calls onError. Call context.setProgress(0–100) during the promise for a determinate pending state (% label + accent fill bar); null falls back to the spinner."
124
124
  },
125
125
  "progressLabel": {
126
126
  "type": "(percent: number) => ReactNode",
@@ -248,7 +248,7 @@
248
248
  "element": "button",
249
249
  "extendsNativeProps": "button (except children)",
250
250
  "forwardsRef": true,
251
- "notes": "Preconfigured ActionButton for copy-to-clipboard: clipboard icon morphs into a check, label swaps Copy \u2192 Copied, success tint, auto-reset. All ActionButton props apply. Falls back to execCommand('copy') without the Clipboard API. Floating over content (e.g. a code snippet): secondary/ghost are transparent at rest, so give a wrapper a solid --crk-color-bg fill + the button's radius \u2014 see recipes/floating-copy-button.tsx.",
251
+ "notes": "Preconfigured ActionButton for copy-to-clipboard: clipboard icon morphs into a check, label swaps Copy → Copied, success tint, auto-reset. All ActionButton props apply. Falls back to execCommand('copy') without the Clipboard API. Floating over content (e.g. a code snippet): secondary/ghost are transparent at rest, so give a wrapper a solid --crk-color-bg fill + the button's radius — see recipes/floating-copy-button.tsx.",
252
252
  "props": {
253
253
  "value": {
254
254
  "type": "string | (() => string | Promise<string>)",
@@ -290,12 +290,12 @@
290
290
  "external": {
291
291
  "type": "boolean",
292
292
  "default": false,
293
- "notes": "Adds target=_blank, rel=noopener noreferrer, an inline \u2197 icon, and an sr-only 'opens in a new tab' suffix."
293
+ "notes": "Adds target=_blank, rel=noopener noreferrer, an inline ↗ icon, and an sr-only 'opens in a new tab' suffix."
294
294
  },
295
295
  "hideExternalIcon": {
296
296
  "type": "boolean",
297
297
  "default": false,
298
- "notes": "Hide the inline \u2197 icon shown by default when the link opens in a new tab (external or manual target=_blank). The sr-only suffix is kept."
298
+ "notes": "Hide the inline ↗ icon shown by default when the link opens in a new tab (external or manual target=_blank). The sr-only suffix is kept."
299
299
  }
300
300
  }
301
301
  },
@@ -388,9 +388,9 @@
388
388
  "props": {}
389
389
  },
390
390
  "Table": {
391
- "import": "import { Table, type ColumnDef, type SortConfig } from '@overdoser/react-toolkit'",
391
+ "import": "import { Table, type ColumnDef, type DataColumnDef, type DisplayColumnDef, type SortConfig } from '@overdoser/react-toolkit'",
392
392
  "element": "table (inside wrapper div)",
393
- "generic": "T extends Record<string, unknown>",
393
+ "generic": "T extends object",
394
394
  "props": {
395
395
  "data": {
396
396
  "type": "T[]",
@@ -406,7 +406,7 @@
406
406
  },
407
407
  "onSort": {
408
408
  "type": "(config: SortConfig[]) => void",
409
- "notes": "When set, Table is fully controlled \u2014 does not sort or paginate data internally."
409
+ "notes": "When set, Table is fully controlled — does not sort or paginate data internally."
410
410
  },
411
411
  "multiSort": {
412
412
  "type": "boolean",
@@ -463,21 +463,99 @@
463
463
  "cell",
464
464
  "emptyCell",
465
465
  "paginator",
466
- "pageButton"
466
+ "pageButton",
467
+ "rowClickable",
468
+ "rowSelected",
469
+ "selectCell",
470
+ "selectHeaderCell",
471
+ "bulkBar",
472
+ "bulkLabel",
473
+ "bulkClear",
474
+ "bulkActions",
475
+ "loadingRow"
467
476
  ]
477
+ },
478
+ "loading": {
479
+ "type": "boolean",
480
+ "default": false,
481
+ "notes": "Loader overlay (150ms delay), rows keep height, aria-busy. Skeleton rows when data is empty."
482
+ },
483
+ "loadingRows": {
484
+ "type": "number",
485
+ "default": 3
486
+ },
487
+ "onRowClick": {
488
+ "type": "(row: T, index: number, event: MouseEvent<HTMLTableRowElement>) => void",
489
+ "notes": "Rows get tabIndex=0, pointer/hover, Enter/Space. Clicks on interactive descendants are ignored."
490
+ },
491
+ "selectable": {
492
+ "type": "boolean",
493
+ "default": false,
494
+ "notes": "Leading checkbox column; requires rowKey."
495
+ },
496
+ "selectedKeys": {
497
+ "type": "TableRowKey[]",
498
+ "notes": "Controlled selection."
499
+ },
500
+ "defaultSelectedKeys": {
501
+ "type": "TableRowKey[]",
502
+ "default": []
503
+ },
504
+ "onSelectionChange": {
505
+ "type": "(keys: TableRowKey[], rows: T[]) => void"
506
+ },
507
+ "isRowSelectable": {
508
+ "type": "(row: T) => boolean"
509
+ },
510
+ "bulkActions": {
511
+ "type": "ReactNode | ((ctx: { selectedKeys; selectedRows: T[]; clear: () => void }) => ReactNode)",
512
+ "notes": "Bar above the table while something is selected."
513
+ },
514
+ "selectionLabel": {
515
+ "type": "(count: number) => ReactNode",
516
+ "default": "`${n} selected`"
517
+ },
518
+ "columnVisibility": {
519
+ "type": "Record<string, boolean>",
520
+ "notes": "false hides that column; no picker UI."
521
+ },
522
+ "layout": {
523
+ "type": "'auto' | 'fixed'",
524
+ "default": "auto"
468
525
  }
469
526
  },
470
527
  "subTypes": {
471
528
  "ColumnDef<T>": {
529
+ "type": "DataColumnDef<T> | DisplayColumnDef<T>",
530
+ "notes": "A column backed by a row field (key) or a display-only column (id + required render). A misspelled key is a type error; display columns are not sortable."
531
+ },
532
+ "DataColumnDef<T>": {
472
533
  "key": {
473
534
  "type": "keyof T & string",
474
- "required": true
535
+ "required": true,
536
+ "notes": "Row field to read the cell value from."
475
537
  },
476
538
  "header": {
477
539
  "type": "ReactNode",
478
540
  "required": true,
479
541
  "notes": "Interactive elements allowed; inside a sortable column they must call e.stopPropagation() in their click handler."
480
542
  },
543
+ "width": {
544
+ "type": "string | number"
545
+ },
546
+ "align": {
547
+ "type": "enum",
548
+ "values": [
549
+ "left",
550
+ "center",
551
+ "right"
552
+ ]
553
+ },
554
+ "sticky": {
555
+ "type": "boolean",
556
+ "default": false,
557
+ "notes": "Pin to the left edge while the table scrolls horizontally. Needs scrollable/dragScroll; intended for the first column."
558
+ },
481
559
  "sortable": {
482
560
  "type": "boolean"
483
561
  },
@@ -491,7 +569,28 @@
491
569
  "notes": "Direction the sort cycle starts with. Use desc for highest-first columns."
492
570
  },
493
571
  "render": {
494
- "type": "(value, row, index) => ReactNode"
572
+ "type": "(value: T[keyof T], row: T, index: number) => ReactNode",
573
+ "notes": "Optional; defaults to rendering row[key]."
574
+ },
575
+ "cellClassName": {
576
+ "type": "string | ((value, row, index) => string | undefined)",
577
+ "notes": "Per-cell class for this column, e.g. value-bucket shading."
578
+ },
579
+ "cellStyle": {
580
+ "type": "CSSProperties | ((value, row, index) => CSSProperties | undefined)",
581
+ "notes": "Per-cell inline style; merged over the column's align."
582
+ }
583
+ },
584
+ "DisplayColumnDef<T>": {
585
+ "id": {
586
+ "type": "string",
587
+ "required": true,
588
+ "notes": "Column identifier (React key, columnVisibility key)."
589
+ },
590
+ "header": {
591
+ "type": "ReactNode",
592
+ "required": true,
593
+ "notes": "Interactive elements allowed; inside a sortable column they must call e.stopPropagation() in their click handler."
495
594
  },
496
595
  "width": {
497
596
  "type": "string | number"
@@ -509,13 +608,15 @@
509
608
  "default": false,
510
609
  "notes": "Pin to the left edge while the table scrolls horizontally. Needs scrollable/dragScroll; intended for the first column."
511
610
  },
611
+ "render": {
612
+ "type": "(row: T, index: number) => ReactNode",
613
+ "required": true
614
+ },
512
615
  "cellClassName": {
513
- "type": "string | ((value, row, index) => string | undefined)",
514
- "notes": "Per-cell class for this column, e.g. value-bucket shading."
616
+ "type": "string | ((row: T, index: number) => string | undefined)"
515
617
  },
516
618
  "cellStyle": {
517
- "type": "CSSProperties | ((value, row, index) => CSSProperties | undefined)",
518
- "notes": "Per-cell inline style; merged over the column's align."
619
+ "type": "CSSProperties | ((row: T, index: number) => CSSProperties | undefined)"
519
620
  }
520
621
  },
521
622
  "SortConfig": {
@@ -562,16 +663,18 @@
562
663
  }
563
664
  },
564
665
  "behavior": {
565
- "sortCycle": "none \u2192 asc \u2192 desc \u2192 none",
566
- "controlledMode": "Activated when onSort is provided. Table renders data as-is and does not slice for pagination."
666
+ "sortCycle": "none → asc → desc → none",
667
+ "controlledMode": "Activated when onSort is provided. Table renders data as-is and does not slice for pagination.",
668
+ "selection": "Select-all covers the current page only (checked/indeterminate); Shift-click selects a range; selections on other pages are kept."
567
669
  }
568
670
  },
569
671
  "Dropdown": {
570
- "import": "import { Dropdown, DropdownItem } from '@overdoser/react-toolkit'",
672
+ "import": "import { Dropdown, DropdownItem, DropdownSeparator, DropdownLabel, useContextMenu } from '@overdoser/react-toolkit'",
571
673
  "element": "div",
572
674
  "modes": {
573
675
  "menu": "Pass `trigger` plus <DropdownItem> children.",
574
- "select": "Pass `options` + `value` + `onChange`. Trigger label shows the selected option."
676
+ "select": "Pass `options` + `value` + `onChange`. Trigger label shows the selected option.",
677
+ "context": "Pass `anchor={{ x, y }}` (+ open/onOpenChange) and no trigger: menu opens at that viewport point. `useContextMenu()` wires it from a right-click."
575
678
  },
576
679
  "props": {
577
680
  "trigger": {
@@ -631,10 +734,29 @@
631
734
  "triggerLabel",
632
735
  "chevron",
633
736
  "menu",
634
- "item"
737
+ "item",
738
+ "itemIcon",
739
+ "itemLabel",
740
+ "itemDescription",
741
+ "itemShortcut",
742
+ "itemCheck",
743
+ "separator",
744
+ "label"
635
745
  ]
746
+ },
747
+ "open": {
748
+ "type": "boolean",
749
+ "notes": "Controlled open state (any mode)."
750
+ },
751
+ "onOpenChange": {
752
+ "type": "(open: boolean) => void"
753
+ },
754
+ "anchor": {
755
+ "type": "{ x: number; y: number } | null",
756
+ "notes": "Context-menu mode. Clamped to the viewport, flips on overflow."
636
757
  }
637
- }
758
+ },
759
+ "keyboard": "ArrowUp/Down wrap over enabled items (labels, separators, disabled skipped), Home/End, typeahead, Enter/Space."
638
760
  },
639
761
  "DropdownItem": {
640
762
  "import": "import { DropdownItem } from '@overdoser/react-toolkit'",
@@ -645,9 +767,51 @@
645
767
  "disabled": {
646
768
  "type": "boolean",
647
769
  "default": false
770
+ },
771
+ "danger": {
772
+ "type": "boolean",
773
+ "default": false
774
+ },
775
+ "icon": {
776
+ "type": "ReactNode",
777
+ "notes": "Leading slot, aria-hidden."
778
+ },
779
+ "shortcut": {
780
+ "type": "ReactNode",
781
+ "notes": "Trailing hint, aria-hidden; pass <Kbd>."
782
+ },
783
+ "description": {
784
+ "type": "ReactNode",
785
+ "notes": "Muted second line."
786
+ },
787
+ "checked": {
788
+ "type": "boolean",
789
+ "notes": "When defined: role=menuitemcheckbox + aria-checked + check slot."
790
+ },
791
+ "closeOnSelect": {
792
+ "type": "boolean",
793
+ "notes": "Default true for action items, false for checkable ones."
794
+ },
795
+ "classes": {
796
+ "type": "Partial<Pick<DropdownClasses, 'item' | 'itemIcon' | 'itemLabel' | 'itemDescription' | 'itemShortcut' | 'itemCheck'>>"
648
797
  }
649
798
  }
650
799
  },
800
+ "DropdownSeparator": {
801
+ "import": "import { DropdownSeparator } from '@overdoser/react-toolkit'",
802
+ "element": "div[role=separator]",
803
+ "forwardsRef": true,
804
+ "extendsNativeProps": "div",
805
+ "props": {}
806
+ },
807
+ "DropdownLabel": {
808
+ "import": "import { DropdownLabel } from '@overdoser/react-toolkit'",
809
+ "element": "div[role=presentation]",
810
+ "forwardsRef": true,
811
+ "extendsNativeProps": "div",
812
+ "props": {},
813
+ "behavior": "Non-interactive section heading inside a menu."
814
+ },
651
815
  "SplitButton": {
652
816
  "import": "import { SplitButton, type SplitButtonAction } from '@overdoser/react-toolkit'",
653
817
  "element": "div",
@@ -786,7 +950,7 @@
786
950
  "outside click",
787
951
  "Escape"
788
952
  ],
789
- "childrenTyped": "never \u2014 pass via `content` prop"
953
+ "childrenTyped": "never — pass via `content` prop"
790
954
  }
791
955
  },
792
956
  "Draggable": {
@@ -845,10 +1009,180 @@
845
1009
  }
846
1010
  }
847
1011
  },
1012
+ "SplitPane": {
1013
+ "import": "import { SplitPane } from '@overdoser/react-toolkit'",
1014
+ "element": "div with two panes and a div[role=separator] handle",
1015
+ "forwardsRef": true,
1016
+ "extendsNativeProps": "div (without children)",
1017
+ "props": {
1018
+ "children": {
1019
+ "type": "[ReactNode, ReactNode]",
1020
+ "required": true
1021
+ },
1022
+ "direction": {
1023
+ "type": "'horizontal' | 'vertical'",
1024
+ "default": "horizontal"
1025
+ },
1026
+ "primary": {
1027
+ "type": "'first' | 'second'",
1028
+ "default": "first"
1029
+ },
1030
+ "size": {
1031
+ "type": "number | string",
1032
+ "notes": "Controlled px or '30%'."
1033
+ },
1034
+ "defaultSize": {
1035
+ "type": "number | string",
1036
+ "default": "50%"
1037
+ },
1038
+ "onSizeChange": {
1039
+ "type": "(px: number) => void"
1040
+ },
1041
+ "minSize": {
1042
+ "type": "number",
1043
+ "default": 100
1044
+ },
1045
+ "maxSize": {
1046
+ "type": "number",
1047
+ "notes": "Default container − minSecondarySize − handle."
1048
+ },
1049
+ "minSecondarySize": {
1050
+ "type": "number",
1051
+ "default": 100
1052
+ },
1053
+ "collapsible": {
1054
+ "type": "boolean",
1055
+ "default": false
1056
+ },
1057
+ "collapsed": {
1058
+ "type": "boolean"
1059
+ },
1060
+ "defaultCollapsed": {
1061
+ "type": "boolean",
1062
+ "default": false
1063
+ },
1064
+ "onCollapsedChange": {
1065
+ "type": "(collapsed: boolean) => void"
1066
+ },
1067
+ "persistKey": {
1068
+ "type": "string",
1069
+ "notes": "localStorage via usePersistedState."
1070
+ },
1071
+ "handleSize": {
1072
+ "type": "number",
1073
+ "default": 6
1074
+ },
1075
+ "handleLabel": {
1076
+ "type": "string",
1077
+ "default": "Resize"
1078
+ },
1079
+ "disabled": {
1080
+ "type": "boolean",
1081
+ "default": false
1082
+ },
1083
+ "classes": {
1084
+ "type": "Partial<SplitPaneClasses>",
1085
+ "shape": [
1086
+ "root",
1087
+ "pane",
1088
+ "primary",
1089
+ "secondary",
1090
+ "handle",
1091
+ "handleActive",
1092
+ "collapsed"
1093
+ ]
1094
+ }
1095
+ },
1096
+ "keyboard": "Arrows ±16px (Shift ×10), Home/End, double-click resets / toggles collapse."
1097
+ },
1098
+ "ImageViewer": {
1099
+ "import": "import { ImageViewer, useZoomPan } from '@overdoser/react-toolkit'",
1100
+ "element": "portaled div[role=dialog][aria-modal]",
1101
+ "forwardsRef": true,
1102
+ "props": {
1103
+ "open": {
1104
+ "type": "boolean",
1105
+ "required": true
1106
+ },
1107
+ "onClose": {
1108
+ "type": "() => void",
1109
+ "required": true
1110
+ },
1111
+ "items": {
1112
+ "type": "{ src: string; alt?: string; thumbnail?: string; caption?: ReactNode; download?: string | boolean }[]",
1113
+ "required": true
1114
+ },
1115
+ "index": {
1116
+ "type": "number",
1117
+ "notes": "Controlled."
1118
+ },
1119
+ "defaultIndex": {
1120
+ "type": "number",
1121
+ "default": 0
1122
+ },
1123
+ "onIndexChange": {
1124
+ "type": "(index: number) => void"
1125
+ },
1126
+ "loop": {
1127
+ "type": "boolean",
1128
+ "default": true
1129
+ },
1130
+ "showCounter": {
1131
+ "type": "boolean",
1132
+ "default": true
1133
+ },
1134
+ "showThumbnails": {
1135
+ "type": "boolean",
1136
+ "default": false
1137
+ },
1138
+ "showZoomControls": {
1139
+ "type": "boolean",
1140
+ "default": true
1141
+ },
1142
+ "showDownload": {
1143
+ "type": "boolean",
1144
+ "notes": "Default: when the item has download."
1145
+ },
1146
+ "renderSlide": {
1147
+ "type": "(item, { index, active }) => ReactNode"
1148
+ },
1149
+ "closeOnBackdrop": {
1150
+ "type": "boolean",
1151
+ "default": true
1152
+ },
1153
+ "zoom": {
1154
+ "type": "Partial<UseZoomPanOptions>",
1155
+ "notes": "{ minScale 1, maxScale 8, step 0.5, wheel true, doubleClickToggle true }"
1156
+ },
1157
+ "labels": {
1158
+ "type": "Partial<ImageViewerLabels>"
1159
+ },
1160
+ "classes": {
1161
+ "type": "Partial<ImageViewerClasses>",
1162
+ "shape": [
1163
+ "root",
1164
+ "backdrop",
1165
+ "toolbar",
1166
+ "counter",
1167
+ "stage",
1168
+ "image",
1169
+ "caption",
1170
+ "nav",
1171
+ "navPrev",
1172
+ "navNext",
1173
+ "thumbnails",
1174
+ "thumbnail",
1175
+ "thumbnailActive",
1176
+ "zoomControls"
1177
+ ]
1178
+ }
1179
+ },
1180
+ "keyboard": "Escape, ArrowLeft/Right, + / - / 0; swipe at scale 1; wheel/pinch/double-click zoom."
1181
+ },
848
1182
  "Toast": {
849
1183
  "import": "import { ToastProvider, toast, useToast } from '@overdoser/react-toolkit'",
850
1184
  "element": "portal viewport at document.body",
851
- "notes": "Imperative notification system backed by a global store. Mount ToastProvider once (it is the renderer; do NOT render toast elements yourself). Trigger via the standalone toast(options) (no hook/context needed; also toast.dismiss(id) / toast.dismissAll()) OR via useToast() which returns the same { toast, dismiss, dismissAll }. useToast does not require the provider and never throws. toast() with no provider mounted warns (dev) and renders nothing. danger/warning use role=alert (assertive); others role=status (polite). Auto-dismiss pauses on hover. SSR/Next.js safe: mount ToastProvider normally \u2014 it renders no viewport on the server or the first client render, then attaches its document.body portal after hydration, so there is no hydration mismatch and no mounted-flag workaround is needed.",
1185
+ "notes": "Imperative notification system backed by a global store. Mount ToastProvider once (it is the renderer; do NOT render toast elements yourself). Trigger via the standalone toast(options) (no hook/context needed; also toast.dismiss(id) / toast.dismissAll()) OR via useToast() which returns the same { toast, dismiss, dismissAll }. useToast does not require the provider and never throws. toast() with no provider mounted warns (dev) and renders nothing. danger/warning use role=alert (assertive); others role=status (polite). Auto-dismiss pauses on hover. SSR/Next.js safe: mount ToastProvider normally — it renders no viewport on the server or the first client render, then attaches its document.body portal after hydration, so there is no hydration mismatch and no mounted-flag workaround is needed.",
852
1186
  "standaloneTrigger": {
853
1187
  "name": "toast",
854
1188
  "signature": "toast(options: ToastOptions): string",
@@ -1014,42 +1348,955 @@
1014
1348
  "shape": [
1015
1349
  "root",
1016
1350
  "icon",
1017
- "content",
1018
- "title",
1019
- "message",
1020
- "close"
1351
+ "content",
1352
+ "title",
1353
+ "message",
1354
+ "action",
1355
+ "close"
1356
+ ]
1357
+ },
1358
+ "action": {
1359
+ "type": "ReactNode",
1360
+ "notes": "Slot after the message (Retry/Undo). Right edge in banner layout."
1361
+ },
1362
+ "layout": {
1363
+ "type": "'inline' | 'banner'",
1364
+ "default": "inline",
1365
+ "notes": "banner = full-width strip, one row."
1366
+ },
1367
+ "size": {
1368
+ "type": "'sm' | 'md'",
1369
+ "default": "md"
1370
+ }
1371
+ }
1372
+ },
1373
+ "CodeBlock": {
1374
+ "import": "import { CodeBlock, Code } from '@overdoser/react-toolkit'",
1375
+ "element": "div > pre > code",
1376
+ "forwardsRef": true,
1377
+ "extendsNativeProps": "div (without children/title)",
1378
+ "props": {
1379
+ "code": {
1380
+ "type": "string",
1381
+ "notes": "Source; exactly what is copied. children (string) is an alias."
1382
+ },
1383
+ "language": {
1384
+ "type": "string",
1385
+ "notes": "Header label + data-language + language-<x> class."
1386
+ },
1387
+ "title": {
1388
+ "type": "ReactNode"
1389
+ },
1390
+ "showCopy": {
1391
+ "type": "boolean",
1392
+ "default": true
1393
+ },
1394
+ "copyPlacement": {
1395
+ "type": "'floating' | 'header'",
1396
+ "default": "floating"
1397
+ },
1398
+ "onCopied": {
1399
+ "type": "(text: string) => void"
1400
+ },
1401
+ "wrap": {
1402
+ "type": "boolean",
1403
+ "default": false
1404
+ },
1405
+ "showWrapToggle": {
1406
+ "type": "boolean",
1407
+ "default": false
1408
+ },
1409
+ "lineNumbers": {
1410
+ "type": "boolean",
1411
+ "default": false
1412
+ },
1413
+ "startLine": {
1414
+ "type": "number",
1415
+ "default": 1
1416
+ },
1417
+ "highlightLines": {
1418
+ "type": "number[]"
1419
+ },
1420
+ "maxHeight": {
1421
+ "type": "number | string"
1422
+ },
1423
+ "size": {
1424
+ "type": "'sm' | 'md'",
1425
+ "default": "md"
1426
+ },
1427
+ "highlight": {
1428
+ "type": "(code: string) => ReactNode",
1429
+ "notes": "Plug-in highlighter."
1430
+ },
1431
+ "classes": {
1432
+ "type": "Partial<CodeBlockClasses>",
1433
+ "shape": [
1434
+ "root",
1435
+ "header",
1436
+ "title",
1437
+ "language",
1438
+ "actions",
1439
+ "pre",
1440
+ "code",
1441
+ "line",
1442
+ "lineNumber",
1443
+ "lineHighlight",
1444
+ "copy",
1445
+ "wrapToggle"
1446
+ ]
1447
+ }
1448
+ }
1449
+ },
1450
+ "Code": {
1451
+ "import": "import { Code } from '@overdoser/react-toolkit'",
1452
+ "element": "code",
1453
+ "forwardsRef": true,
1454
+ "extendsNativeProps": "code",
1455
+ "props": {
1456
+ "classes": {
1457
+ "type": "Partial<CodeClasses>",
1458
+ "shape": [
1459
+ "root"
1460
+ ]
1461
+ }
1462
+ }
1463
+ },
1464
+ "Badge": {
1465
+ "import": "import { Badge } from '@overdoser/react-toolkit'",
1466
+ "element": "span",
1467
+ "forwardsRef": true,
1468
+ "extendsNativeProps": "span",
1469
+ "props": {
1470
+ "variant": {
1471
+ "type": "'neutral' | 'primary' | 'success' | 'warning' | 'danger'",
1472
+ "default": "neutral"
1473
+ },
1474
+ "appearance": {
1475
+ "type": "'soft' | 'solid' | 'outline'",
1476
+ "default": "soft"
1477
+ },
1478
+ "size": {
1479
+ "type": "'sm' | 'md' | 'lg'",
1480
+ "default": "md"
1481
+ },
1482
+ "dot": {
1483
+ "type": "boolean",
1484
+ "default": false,
1485
+ "notes": "Leading status dot."
1486
+ },
1487
+ "classes": {
1488
+ "type": "Partial<BadgeClasses>",
1489
+ "shape": [
1490
+ "root",
1491
+ "dot"
1492
+ ]
1493
+ }
1494
+ }
1495
+ },
1496
+ "StatusDot": {
1497
+ "import": "import { StatusDot } from '@overdoser/react-toolkit'",
1498
+ "element": "span",
1499
+ "forwardsRef": true,
1500
+ "extendsNativeProps": "span (color retyped)",
1501
+ "props": {
1502
+ "status": {
1503
+ "type": "'success' | 'warning' | 'danger' | 'info' | 'neutral'",
1504
+ "default": "neutral"
1505
+ },
1506
+ "pulse": {
1507
+ "type": "boolean",
1508
+ "default": false,
1509
+ "notes": "Expanding ring animation; off under prefers-reduced-motion."
1510
+ },
1511
+ "label": {
1512
+ "type": "ReactNode",
1513
+ "notes": "Text after the dot. Without it pass aria-label (sets role=img)."
1514
+ },
1515
+ "size": {
1516
+ "type": "'sm' | 'md' | 'lg'",
1517
+ "default": "md"
1518
+ },
1519
+ "color": {
1520
+ "type": "string",
1521
+ "notes": "Any CSS colour; overrides the status colour."
1522
+ },
1523
+ "classes": {
1524
+ "type": "Partial<StatusDotClasses>",
1525
+ "shape": [
1526
+ "root",
1527
+ "dot",
1528
+ "label"
1529
+ ]
1530
+ }
1531
+ }
1532
+ },
1533
+ "ThemeToggle": {
1534
+ "import": "import { ThemeToggle } from '@overdoser/react-toolkit'",
1535
+ "element": "button (icon) or div[role=radiogroup] (segmented)",
1536
+ "forwardsRef": true,
1537
+ "extendsNativeProps": "button",
1538
+ "props": {
1539
+ "variant": {
1540
+ "type": "'icon' | 'segmented'",
1541
+ "default": "icon"
1542
+ },
1543
+ "allowSystem": {
1544
+ "type": "boolean",
1545
+ "default": true
1546
+ },
1547
+ "size": {
1548
+ "type": "'sm' | 'md'",
1549
+ "default": "md"
1550
+ },
1551
+ "showLabel": {
1552
+ "type": "boolean",
1553
+ "default": false
1554
+ },
1555
+ "labels": {
1556
+ "type": "Partial<Record<'light' | 'dark' | 'system', string>>"
1557
+ },
1558
+ "storageKey": {
1559
+ "type": "string",
1560
+ "default": "crk-theme"
1561
+ },
1562
+ "classes": {
1563
+ "type": "Partial<ThemeToggleClasses>",
1564
+ "shape": [
1565
+ "root",
1566
+ "icon",
1567
+ "label",
1568
+ "option",
1569
+ "optionSelected"
1570
+ ]
1571
+ },
1572
+ "defaultTheme": {
1573
+ "type": "'light' | 'dark' | 'system'",
1574
+ "default": "system"
1575
+ }
1576
+ }
1577
+ },
1578
+ "Kbd": {
1579
+ "import": "import { Kbd } from '@overdoser/react-toolkit'",
1580
+ "element": "kbd",
1581
+ "forwardsRef": true,
1582
+ "extendsNativeProps": "kbd",
1583
+ "props": {
1584
+ "size": {
1585
+ "type": "'sm' | 'md'",
1586
+ "default": "md"
1587
+ },
1588
+ "keys": {
1589
+ "type": "string[]",
1590
+ "notes": "Combination: each key in its own inner <kbd>, joined by an aria-hidden '+'. Overrides children."
1591
+ },
1592
+ "classes": {
1593
+ "type": "Partial<KbdClasses>",
1594
+ "shape": [
1595
+ "root",
1596
+ "key",
1597
+ "separator"
1598
+ ]
1599
+ }
1600
+ }
1601
+ },
1602
+ "EmptyState": {
1603
+ "import": "import { EmptyState } from '@overdoser/react-toolkit'",
1604
+ "element": "div (role=alert when variant=error)",
1605
+ "forwardsRef": true,
1606
+ "extendsNativeProps": "div (without title)",
1607
+ "props": {
1608
+ "variant": {
1609
+ "type": "'empty' | 'error'",
1610
+ "default": "empty"
1611
+ },
1612
+ "icon": {
1613
+ "type": "ReactNode | false",
1614
+ "notes": "Default: built-in SVG per variant. false hides it."
1615
+ },
1616
+ "title": {
1617
+ "type": "ReactNode"
1618
+ },
1619
+ "description": {
1620
+ "type": "ReactNode"
1621
+ },
1622
+ "action": {
1623
+ "type": "ReactNode",
1624
+ "notes": "Slot under the description — pass a Button."
1625
+ },
1626
+ "children": {
1627
+ "type": "ReactNode",
1628
+ "notes": "Extra content between description and action."
1629
+ },
1630
+ "size": {
1631
+ "type": "'sm' | 'md' | 'lg'",
1632
+ "default": "md"
1633
+ },
1634
+ "bordered": {
1635
+ "type": "boolean",
1636
+ "default": false,
1637
+ "notes": "Dashed frame with subtle background."
1638
+ },
1639
+ "classes": {
1640
+ "type": "Partial<EmptyStateClasses>",
1641
+ "shape": [
1642
+ "root",
1643
+ "icon",
1644
+ "title",
1645
+ "description",
1646
+ "action"
1647
+ ]
1648
+ }
1649
+ },
1650
+ "behavior": "Use as Table emptyMessage too."
1651
+ },
1652
+ "ProgressBar": {
1653
+ "import": "import { ProgressBar } from '@overdoser/react-toolkit'",
1654
+ "element": "div root; inner track is role=progressbar",
1655
+ "forwardsRef": true,
1656
+ "extendsNativeProps": "div (without children)",
1657
+ "props": {
1658
+ "value": {
1659
+ "type": "number",
1660
+ "notes": "Clamped to [0, max]. Omit for indeterminate."
1661
+ },
1662
+ "max": {
1663
+ "type": "number",
1664
+ "default": 100
1665
+ },
1666
+ "label": {
1667
+ "type": "ReactNode",
1668
+ "notes": "Above the bar, left. A string also becomes the track aria-label."
1669
+ },
1670
+ "showValue": {
1671
+ "type": "boolean",
1672
+ "default": false
1673
+ },
1674
+ "formatValue": {
1675
+ "type": "(value: number, max: number) => ReactNode",
1676
+ "notes": "Default '42%'."
1677
+ },
1678
+ "size": {
1679
+ "type": "'sm' | 'md' | 'lg'",
1680
+ "default": "md"
1681
+ },
1682
+ "variant": {
1683
+ "type": "'primary' | 'success' | 'warning' | 'danger' | 'neutral'",
1684
+ "default": "primary"
1685
+ },
1686
+ "thresholds": {
1687
+ "type": "{ value: number; variant: ProgressBarVariant }[]",
1688
+ "notes": "Highest threshold value <= current wins; below all, `variant` applies."
1689
+ },
1690
+ "segments": {
1691
+ "type": "number",
1692
+ "notes": "> 1 renders N discrete blocks filled from the left."
1693
+ },
1694
+ "classes": {
1695
+ "type": "Partial<ProgressBarClasses>",
1696
+ "shape": [
1697
+ "root",
1698
+ "header",
1699
+ "label",
1700
+ "value",
1701
+ "track",
1702
+ "fill",
1703
+ "segment",
1704
+ "segmentFilled",
1705
+ "segmentCurrent"
1706
+ ]
1707
+ },
1708
+ "showCurrent": {
1709
+ "type": "boolean",
1710
+ "default": false,
1711
+ "notes": "Segmented only: segment after the last filled one gets a mid shade (done / current / remaining)."
1712
+ },
1713
+ "shape": {
1714
+ "type": "'rounded' | 'square'",
1715
+ "default": "rounded"
1716
+ }
1717
+ }
1718
+ },
1719
+ "Card": {
1720
+ "import": "import { Card } from '@overdoser/react-toolkit'",
1721
+ "element": "div, or a when href",
1722
+ "forwardsRef": true,
1723
+ "extendsNativeProps": "div (+ href/target/rel)",
1724
+ "props": {
1725
+ "variant": {
1726
+ "type": "'outlined' | 'elevated' | 'filled'",
1727
+ "default": "outlined"
1728
+ },
1729
+ "padding": {
1730
+ "type": "'none' | 'sm' | 'md' | 'lg'",
1731
+ "default": "md",
1732
+ "notes": "Sets --crk-card-padding used by the slots."
1733
+ },
1734
+ "interactive": {
1735
+ "type": "boolean",
1736
+ "default": false,
1737
+ "notes": "Hover lift + focus ring; with onClick and no href the card is a keyboard-operable role=button. Implied by href."
1738
+ },
1739
+ "selected": {
1740
+ "type": "boolean",
1741
+ "default": false
1742
+ },
1743
+ "accent": {
1744
+ "type": "string",
1745
+ "notes": "3px left stripe in that CSS colour."
1746
+ },
1747
+ "href": {
1748
+ "type": "string",
1749
+ "notes": "Render as an anchor."
1750
+ },
1751
+ "classes": {
1752
+ "type": "Partial<CardClasses>",
1753
+ "shape": [
1754
+ "root",
1755
+ "header",
1756
+ "title",
1757
+ "subtitle",
1758
+ "actions",
1759
+ "body",
1760
+ "footer"
1761
+ ]
1762
+ }
1763
+ },
1764
+ "compound": {
1765
+ "Card.Header": {
1766
+ "title": "ReactNode",
1767
+ "subtitle": "ReactNode",
1768
+ "actions": "ReactNode (right-aligned slot)",
1769
+ "divider": "boolean (default false)"
1770
+ },
1771
+ "Card.Title": {
1772
+ "as": "'h2' | 'h3' | 'h4' | 'div' (default h3)"
1773
+ },
1774
+ "Card.Body": {},
1775
+ "Card.Footer": {
1776
+ "align": "'start' | 'end' | 'between' (default end)",
1777
+ "divider": "boolean (default false)"
1778
+ }
1779
+ },
1780
+ "behavior": "A Body after a Header (or a Footer after a Body/Header) drops its top padding unless the preceding slot has divider."
1781
+ },
1782
+ "RelativeTime": {
1783
+ "import": "import { RelativeTime } from '@overdoser/react-toolkit'",
1784
+ "element": "time (dateTime set; absolute time as title)",
1785
+ "forwardsRef": true,
1786
+ "extendsNativeProps": "time (without children/title)",
1787
+ "props": {
1788
+ "value": {
1789
+ "type": "Date | number | string",
1790
+ "required": true
1791
+ },
1792
+ "format": {
1793
+ "type": "'long' | 'short' | 'narrow'",
1794
+ "default": "long"
1795
+ },
1796
+ "numeric": {
1797
+ "type": "'always' | 'auto'",
1798
+ "default": "auto"
1799
+ },
1800
+ "locale": {
1801
+ "type": "string"
1802
+ },
1803
+ "live": {
1804
+ "type": "boolean",
1805
+ "default": true,
1806
+ "notes": "1s under a minute, 30s under an hour, then 1min; one shared timer per period."
1807
+ },
1808
+ "now": {
1809
+ "type": "number",
1810
+ "notes": "Fixed reference instant; disables ticking."
1811
+ },
1812
+ "maxAge": {
1813
+ "type": "number",
1814
+ "notes": "Past this many ms, show the absolute date."
1815
+ },
1816
+ "absoluteFormat": {
1817
+ "type": "Intl.DateTimeFormatOptions",
1818
+ "default": "{ dateStyle: 'medium', timeStyle: 'short' }"
1819
+ },
1820
+ "title": {
1821
+ "type": "boolean | string",
1822
+ "default": true
1823
+ },
1824
+ "fallback": {
1825
+ "type": "ReactNode",
1826
+ "default": "—"
1827
+ },
1828
+ "classes": {
1829
+ "type": "Partial<RelativeTimeClasses>",
1830
+ "shape": [
1831
+ "root"
1832
+ ]
1833
+ }
1834
+ }
1835
+ },
1836
+ "SegmentedControl": {
1837
+ "import": "import { SegmentedControl } from '@overdoser/react-toolkit'",
1838
+ "element": "div[role=radiogroup] of button[role=radio]; div[role=group] of anchors when options have href",
1839
+ "forwardsRef": true,
1840
+ "props": {
1841
+ "options": {
1842
+ "type": "{ value: T; label?: ReactNode; icon?: ReactNode; disabled?: boolean; tooltip?: ReactNode; count?: number | string; href?: string; 'aria-label'?: string }[]",
1843
+ "required": true
1844
+ },
1845
+ "value": {
1846
+ "type": "T",
1847
+ "notes": "Controlled."
1848
+ },
1849
+ "defaultValue": {
1850
+ "type": "T"
1851
+ },
1852
+ "onChange": {
1853
+ "type": "(value: T) => void"
1854
+ },
1855
+ "size": {
1856
+ "type": "'sm' | 'md' | 'lg'",
1857
+ "default": "md"
1858
+ },
1859
+ "shape": {
1860
+ "type": "'pill' | 'rounded' | 'square'",
1861
+ "default": "rounded"
1862
+ },
1863
+ "variant": {
1864
+ "type": "'filled' | 'outlined'",
1865
+ "default": "filled"
1866
+ },
1867
+ "fullWidth": {
1868
+ "type": "boolean",
1869
+ "default": false
1870
+ },
1871
+ "disabled": {
1872
+ "type": "boolean",
1873
+ "default": false
1874
+ },
1875
+ "classes": {
1876
+ "type": "Partial<SegmentedControlClasses>",
1877
+ "shape": [
1878
+ "root",
1879
+ "item",
1880
+ "itemSelected",
1881
+ "icon",
1882
+ "label",
1883
+ "count"
1884
+ ]
1885
+ }
1886
+ },
1887
+ "keyboard": "Arrows move selection + focus (wrap, skip disabled); Home/End.",
1888
+ "behavior": "Single-select only; multi-select = CheckboxGroup variant=chips."
1889
+ },
1890
+ "Chip": {
1891
+ "import": "import { Chip } from '@overdoser/react-toolkit'",
1892
+ "element": "button, or span[role=button] when clickable + removable, or span",
1893
+ "forwardsRef": true,
1894
+ "extendsNativeProps": "button (without color/type)",
1895
+ "props": {
1896
+ "icon": {
1897
+ "type": "ReactNode"
1898
+ },
1899
+ "avatar": {
1900
+ "type": "ReactNode"
1901
+ },
1902
+ "onRemove": {
1903
+ "type": "() => void",
1904
+ "notes": "Trailing × button; Backspace/Delete on the focused chip."
1905
+ },
1906
+ "removeLabel": {
1907
+ "type": "string",
1908
+ "default": "Remove"
1909
+ },
1910
+ "selected": {
1911
+ "type": "boolean",
1912
+ "notes": "When defined the chip is a toggle (aria-pressed)."
1913
+ },
1914
+ "onSelectedChange": {
1915
+ "type": "(next: boolean) => void"
1916
+ },
1917
+ "disabled": {
1918
+ "type": "boolean",
1919
+ "default": false
1920
+ },
1921
+ "color": {
1922
+ "type": "'neutral' | 'primary' | 'success' | 'warning' | 'danger'",
1923
+ "default": "neutral"
1924
+ },
1925
+ "appearance": {
1926
+ "type": "'soft' | 'outline'",
1927
+ "default": "soft"
1928
+ },
1929
+ "size": {
1930
+ "type": "'sm' | 'md'",
1931
+ "default": "md"
1932
+ },
1933
+ "shape": {
1934
+ "type": "'pill' | 'rounded'",
1935
+ "default": "pill"
1936
+ },
1937
+ "classes": {
1938
+ "type": "Partial<ChipClasses>",
1939
+ "shape": [
1940
+ "root",
1941
+ "icon",
1942
+ "avatar",
1943
+ "label",
1944
+ "remove"
1945
+ ]
1946
+ }
1947
+ },
1948
+ "behavior": "Interactive tag; Badge is the read-only pill."
1949
+ },
1950
+ "ChipGroup": {
1951
+ "import": "import { ChipGroup } from '@overdoser/react-toolkit'",
1952
+ "element": "div[role=group]",
1953
+ "forwardsRef": true,
1954
+ "extendsNativeProps": "div",
1955
+ "props": {
1956
+ "max": {
1957
+ "type": "number",
1958
+ "notes": "Show at most N chips, then a +N overflow chip."
1959
+ },
1960
+ "overflowLabel": {
1961
+ "type": "(hidden: number) => ReactNode",
1962
+ "default": "+N"
1963
+ },
1964
+ "onOverflowClick": {
1965
+ "type": "() => void"
1966
+ },
1967
+ "expandable": {
1968
+ "type": "boolean",
1969
+ "default": false
1970
+ },
1971
+ "collapseLabel": {
1972
+ "type": "ReactNode",
1973
+ "default": "Show less"
1974
+ },
1975
+ "gap": {
1976
+ "type": "'sm' | 'md'",
1977
+ "default": "sm"
1978
+ },
1979
+ "wrap": {
1980
+ "type": "boolean",
1981
+ "default": true
1982
+ },
1983
+ "classes": {
1984
+ "type": "Partial<ChipGroupClasses>",
1985
+ "shape": [
1986
+ "root",
1987
+ "overflow"
1988
+ ]
1989
+ }
1990
+ }
1991
+ },
1992
+ "PageHeader": {
1993
+ "import": "import { PageHeader } from '@overdoser/react-toolkit'",
1994
+ "element": "header",
1995
+ "forwardsRef": true,
1996
+ "extendsNativeProps": "header (without title)",
1997
+ "props": {
1998
+ "title": {
1999
+ "type": "ReactNode",
2000
+ "required": true
2001
+ },
2002
+ "as": {
2003
+ "type": "'h1' | 'h2' | 'h3' | 'div'",
2004
+ "default": "h1"
2005
+ },
2006
+ "subtitle": {
2007
+ "type": "ReactNode"
2008
+ },
2009
+ "description": {
2010
+ "type": "ReactNode"
2011
+ },
2012
+ "meta": {
2013
+ "type": "ReactNode"
2014
+ },
2015
+ "badge": {
2016
+ "type": "ReactNode"
2017
+ },
2018
+ "actions": {
2019
+ "type": "ReactNode",
2020
+ "notes": "Right-aligned slot."
2021
+ },
2022
+ "breadcrumbs": {
2023
+ "type": "ReactNode"
2024
+ },
2025
+ "backHref": {
2026
+ "type": "string"
2027
+ },
2028
+ "onBack": {
2029
+ "type": "() => void"
2030
+ },
2031
+ "backLabel": {
2032
+ "type": "string",
2033
+ "default": "Back"
2034
+ },
2035
+ "tabs": {
2036
+ "type": "ReactNode",
2037
+ "notes": "Bottom slot flush with the border, for Tabs.List."
2038
+ },
2039
+ "divider": {
2040
+ "type": "boolean",
2041
+ "default": true
2042
+ },
2043
+ "size": {
2044
+ "type": "'sm' | 'md' | 'lg'",
2045
+ "default": "md"
2046
+ },
2047
+ "sticky": {
2048
+ "type": "boolean",
2049
+ "default": false
2050
+ },
2051
+ "classes": {
2052
+ "type": "Partial<PageHeaderClasses>",
2053
+ "shape": [
2054
+ "root",
2055
+ "breadcrumbs",
2056
+ "back",
2057
+ "titleRow",
2058
+ "title",
2059
+ "badge",
2060
+ "subtitle",
2061
+ "description",
2062
+ "meta",
2063
+ "actions",
2064
+ "tabs"
2065
+ ]
2066
+ }
2067
+ }
2068
+ },
2069
+ "Accordion": {
2070
+ "import": "import { Accordion } from '@overdoser/react-toolkit'",
2071
+ "element": "div; triggers are button[aria-expanded] in headings; content is div[role=region]",
2072
+ "forwardsRef": true,
2073
+ "extendsNativeProps": "div (without onChange)",
2074
+ "props": {
2075
+ "type": {
2076
+ "type": "'single' | 'multiple'",
2077
+ "default": "single"
2078
+ },
2079
+ "value": {
2080
+ "type": "string | string[]",
2081
+ "notes": "Controlled: string (single) or string[] (multiple)."
2082
+ },
2083
+ "defaultValue": {
2084
+ "type": "string | string[]"
2085
+ },
2086
+ "onValueChange": {
2087
+ "type": "(value: string | string[]) => void"
2088
+ },
2089
+ "collapsible": {
2090
+ "type": "boolean",
2091
+ "default": true
2092
+ },
2093
+ "keepMounted": {
2094
+ "type": "boolean",
2095
+ "default": false
2096
+ },
2097
+ "variant": {
2098
+ "type": "'default' | 'bordered' | 'separated'",
2099
+ "default": "default"
2100
+ },
2101
+ "size": {
2102
+ "type": "'sm' | 'md'",
2103
+ "default": "md"
2104
+ },
2105
+ "disabled": {
2106
+ "type": "boolean",
2107
+ "default": false
2108
+ },
2109
+ "headingLevel": {
2110
+ "type": "2 | 3 | 4",
2111
+ "default": 3
2112
+ },
2113
+ "items": {
2114
+ "type": "{ value: string; title: ReactNode; content: ReactNode; disabled?: boolean }[]",
2115
+ "notes": "Data shorthand instead of children."
2116
+ },
2117
+ "classes": {
2118
+ "type": "Partial<AccordionClasses>",
2119
+ "shape": [
2120
+ "root",
2121
+ "item",
2122
+ "itemOpen",
2123
+ "header",
2124
+ "trigger",
2125
+ "icon",
2126
+ "content",
2127
+ "contentInner"
2128
+ ]
2129
+ }
2130
+ },
2131
+ "compound": {
2132
+ "Accordion.Item": {
2133
+ "value": "string (required)",
2134
+ "disabled": "boolean"
2135
+ },
2136
+ "Accordion.Trigger": {
2137
+ "icon": "ReactNode | false (default chevron)",
2138
+ "iconPosition": "'start' | 'end' (default end)"
2139
+ },
2140
+ "Accordion.Content": {}
2141
+ },
2142
+ "keyboard": "ArrowUp/Down wrap over triggers (skip disabled), Home/End, Enter/Space toggle."
2143
+ },
2144
+ "KeyValueList": {
2145
+ "import": "import { KeyValueList } from '@overdoser/react-toolkit'",
2146
+ "element": "dl > div > dt + dd",
2147
+ "forwardsRef": true,
2148
+ "extendsNativeProps": "dl (without children)",
2149
+ "props": {
2150
+ "items": {
2151
+ "type": "{ key?: string; label: ReactNode; value: ReactNode; copyable?: boolean | string; mono?: boolean; masked?: boolean; href?: string; hint?: ReactNode; empty?: ReactNode }[]",
2152
+ "required": true
2153
+ },
2154
+ "layout": {
2155
+ "type": "'rows' | 'grid' | 'inline'",
2156
+ "default": "rows"
2157
+ },
2158
+ "columns": {
2159
+ "type": "number",
2160
+ "default": 2,
2161
+ "notes": "grid only"
2162
+ },
2163
+ "labelWidth": {
2164
+ "type": "number | string",
2165
+ "default": "10rem",
2166
+ "notes": "rows only"
2167
+ },
2168
+ "size": {
2169
+ "type": "'sm' | 'md'",
2170
+ "default": "md"
2171
+ },
2172
+ "dividers": {
2173
+ "type": "boolean",
2174
+ "default": true
2175
+ },
2176
+ "emptyValue": {
2177
+ "type": "ReactNode",
2178
+ "default": "—"
2179
+ },
2180
+ "copyLabel": {
2181
+ "type": "string",
2182
+ "default": "Copy"
2183
+ },
2184
+ "revealLabels": {
2185
+ "type": "{ show: string; hide: string }",
2186
+ "default": "{ show: 'Show', hide: 'Hide' }"
2187
+ },
2188
+ "classes": {
2189
+ "type": "Partial<KeyValueListClasses>",
2190
+ "shape": [
2191
+ "root",
2192
+ "item",
2193
+ "label",
2194
+ "value",
2195
+ "hint",
2196
+ "actions",
2197
+ "copy",
2198
+ "reveal",
2199
+ "mono",
2200
+ "masked"
2201
+ ]
2202
+ }
2203
+ }
2204
+ },
2205
+ "StatCard": {
2206
+ "import": "import { StatCard } from '@overdoser/react-toolkit'",
2207
+ "element": "div, or a with href; role=button with onClick",
2208
+ "forwardsRef": true,
2209
+ "extendsNativeProps": "div (without title)",
2210
+ "props": {
2211
+ "label": {
2212
+ "type": "ReactNode",
2213
+ "required": true
2214
+ },
2215
+ "value": {
2216
+ "type": "ReactNode",
2217
+ "required": true
2218
+ },
2219
+ "unit": {
2220
+ "type": "ReactNode"
2221
+ },
2222
+ "delta": {
2223
+ "type": "number | { value: ReactNode; trend?: 'up' | 'down' | 'flat' }",
2224
+ "notes": "Number → ▲/▼ + formatted %, trend from sign."
2225
+ },
2226
+ "deltaFormat": {
2227
+ "type": "(n: number) => ReactNode"
2228
+ },
2229
+ "trendColor": {
2230
+ "type": "'auto' | 'positive-up' | 'positive-down' | 'none'",
2231
+ "default": "auto"
2232
+ },
2233
+ "deltaLabel": {
2234
+ "type": "ReactNode"
2235
+ },
2236
+ "icon": {
2237
+ "type": "ReactNode"
2238
+ },
2239
+ "chart": {
2240
+ "type": "ReactNode",
2241
+ "notes": "Pass <Sparkline>."
2242
+ },
2243
+ "footer": {
2244
+ "type": "ReactNode"
2245
+ },
2246
+ "href": {
2247
+ "type": "string"
2248
+ },
2249
+ "loading": {
2250
+ "type": "boolean",
2251
+ "default": false
2252
+ },
2253
+ "variant": {
2254
+ "type": "'outlined' | 'elevated' | 'filled'",
2255
+ "default": "outlined"
2256
+ },
2257
+ "size": {
2258
+ "type": "'sm' | 'md' | 'lg'",
2259
+ "default": "md"
2260
+ },
2261
+ "accent": {
2262
+ "type": "string"
2263
+ },
2264
+ "classes": {
2265
+ "type": "Partial<StatCardClasses>",
2266
+ "shape": [
2267
+ "root",
2268
+ "header",
2269
+ "label",
2270
+ "icon",
2271
+ "value",
2272
+ "unit",
2273
+ "delta",
2274
+ "deltaLabel",
2275
+ "chart",
2276
+ "footer"
1021
2277
  ]
1022
2278
  }
1023
2279
  }
1024
2280
  },
1025
- "Badge": {
1026
- "import": "import { Badge } from '@overdoser/react-toolkit'",
1027
- "element": "span",
2281
+ "StatGrid": {
2282
+ "import": "import { StatGrid } from '@overdoser/react-toolkit'",
2283
+ "element": "div",
1028
2284
  "forwardsRef": true,
1029
- "extendsNativeProps": "span",
2285
+ "extendsNativeProps": "div",
1030
2286
  "props": {
1031
- "variant": {
1032
- "type": "'neutral' | 'primary' | 'success' | 'warning' | 'danger'",
1033
- "default": "neutral"
1034
- },
1035
- "appearance": {
1036
- "type": "'soft' | 'solid' | 'outline'",
1037
- "default": "soft"
2287
+ "columns": {
2288
+ "type": "number | { sm?: number; md?: number; lg?: number }",
2289
+ "default": "{ sm: 1, md: 2, lg: 4 }",
2290
+ "notes": "Breakpoints 640 / 1024px."
1038
2291
  },
1039
- "size": {
2292
+ "gap": {
1040
2293
  "type": "'sm' | 'md' | 'lg'",
1041
2294
  "default": "md"
1042
2295
  },
1043
- "dot": {
1044
- "type": "boolean",
1045
- "default": false,
1046
- "notes": "Leading status dot."
1047
- },
1048
2296
  "classes": {
1049
- "type": "Partial<BadgeClasses>",
2297
+ "type": "Partial<StatGridClasses>",
1050
2298
  "shape": [
1051
- "root",
1052
- "dot"
2299
+ "root"
1053
2300
  ]
1054
2301
  }
1055
2302
  }
@@ -1170,11 +2417,11 @@
1170
2417
  },
1171
2418
  "width": {
1172
2419
  "type": "number | string",
1173
- "notes": "number \u2192 px; defaults to 100%."
2420
+ "notes": "number → px; defaults to 100%."
1174
2421
  },
1175
2422
  "height": {
1176
2423
  "type": "number | string",
1177
- "notes": "number \u2192 px; defaults per variant."
2424
+ "notes": "number → px; defaults per variant."
1178
2425
  },
1179
2426
  "animation": {
1180
2427
  "type": "'pulse' | 'wave' | 'none'",
@@ -1241,6 +2488,7 @@
1241
2488
  "backdrop",
1242
2489
  "drawer",
1243
2490
  "header",
2491
+ "headerTitle",
1244
2492
  "closeButton",
1245
2493
  "body",
1246
2494
  "footer"
@@ -1256,7 +2504,7 @@
1256
2504
  "content": {
1257
2505
  "type": "ReactNode",
1258
2506
  "required": true,
1259
- "notes": "Nullish/empty \u2192 never shows."
2507
+ "notes": "Nullish/empty → never shows."
1260
2508
  },
1261
2509
  "children": {
1262
2510
  "type": "ReactNode",
@@ -1415,7 +2663,7 @@
1415
2663
  "import": "import { Pagination } from '@overdoser/react-toolkit'",
1416
2664
  "element": "nav > ul",
1417
2665
  "forwardsRef": true,
1418
- "notes": "Windowed page list with ellipses, e.g. 1 \u2026 6 7 8 9 10 \u2026 99. Also exports paginationRange(page, count, boundaryCount?, siblingCount?). Table has its own pagination \u2014 use this for non-table lists.",
2666
+ "notes": "Windowed page list with ellipses, e.g. 1 … 6 7 8 9 10 … 99. Also exports paginationRange(page, count, boundaryCount?, siblingCount?). Table has its own pagination — use this for non-table lists.",
1419
2667
  "props": {
1420
2668
  "count": {
1421
2669
  "type": "number",
@@ -1486,7 +2734,7 @@
1486
2734
  "props": {
1487
2735
  "value": {
1488
2736
  "type": "number | [number, number]",
1489
- "notes": "Tuple \u2192 range slider."
2737
+ "notes": "Tuple → range slider."
1490
2738
  },
1491
2739
  "defaultValue": {
1492
2740
  "type": "number | [number, number]"
@@ -1661,7 +2909,7 @@
1661
2909
  "import": "import { DateTimePicker } from '@overdoser/react-toolkit'",
1662
2910
  "element": "div (ref) holding editable segment row (group of spinbuttons) + icon button + popover (calendar beside scrollable time columns)",
1663
2911
  "forwardsRef": true,
1664
- "notes": "Date + time in one field. The field is a row of segments, YYYY-MM-DD HH:mm:ss / 24h / UTC by default (fieldFormat='locale' for locale order, timeZone='system' for local): click one, Up/Down steps it, Left/Right moves, digits type with auto-advance, Backspace clears, Alt+ArrowDown opens the popover; empty field starts from now on first edit. The calendar icon opens the MUI-desktop-style popover: calendar left, hours/minutes(/seconds/AM-PM) listbox columns right; picking a day keeps the time and leaves it open; edits commit immediately; Done/Esc/click-outside closes. Binds in FormField (value: Date | null). The value is an absolute instant; timeZone chooses the wall clock it is shown/edited in (UTC by default, 'system' = local), the zone is labelled inline after the time (showTimeZone={false} hides it). Ref \u2192 root div.",
2912
+ "notes": "Date + time in one field. The field is a row of segments, YYYY-MM-DD HH:mm:ss / 24h / UTC by default (fieldFormat='locale' for locale order, timeZone='system' for local): click one, Up/Down steps it, Left/Right moves, digits type with auto-advance, Backspace clears, Alt+ArrowDown opens the popover; empty field starts from now on first edit. The calendar icon opens the MUI-desktop-style popover: calendar left, hours/minutes(/seconds/AM-PM) listbox columns right; picking a day keeps the time and leaves it open; edits commit immediately; Done/Esc/click-outside closes. Binds in FormField (value: Date | null). The value is an absolute instant; timeZone chooses the wall clock it is shown/edited in (UTC by default, 'system' = local), the zone is labelled inline after the time (showTimeZone={false} hides it). Ref → root div.",
1665
2913
  "props": {
1666
2914
  "value": {
1667
2915
  "type": "Date | null",
@@ -1698,7 +2946,7 @@
1698
2946
  "timeZone": {
1699
2947
  "type": "string",
1700
2948
  "default": "UTC",
1701
- "notes": "IANA zone, 'UTC', or 'system' (local). Unknown \u2192 warning + UTC."
2949
+ "notes": "IANA zone, 'UTC', or 'system' (local). Unknown → warning + UTC."
1702
2950
  },
1703
2951
  "showTimeZone": {
1704
2952
  "type": "boolean",
@@ -1855,7 +3103,7 @@
1855
3103
  },
1856
3104
  "value": {
1857
3105
  "type": "number",
1858
- "notes": "Controlled seconds \u2192 display-only (no internal clock)."
3106
+ "notes": "Controlled seconds → display-only (no internal clock)."
1859
3107
  },
1860
3108
  "autoStart": {
1861
3109
  "type": "boolean",
@@ -1889,7 +3137,7 @@
1889
3137
  "unitFormat": {
1890
3138
  "type": "'long' | 'short'",
1891
3139
  "default": "short",
1892
- "notes": "short \u2192 d/h/m/s; long \u2192 days/hours/minutes/seconds (fixed, no singular/plural)."
3140
+ "notes": "short → d/h/m/s; long → days/hours/minutes/seconds (fixed, no singular/plural)."
1893
3141
  },
1894
3142
  "unitLabels": {
1895
3143
  "type": "Partial<Record<TimerUnit, ReactNode | ((value: number) => ReactNode)>>",
@@ -1985,6 +3233,7 @@
1985
3233
  "backdrop",
1986
3234
  "modal",
1987
3235
  "header",
3236
+ "headerTitle",
1988
3237
  "closeButton",
1989
3238
  "body",
1990
3239
  "footer"
@@ -2000,7 +3249,7 @@
2000
3249
  },
2001
3250
  "onClose": {
2002
3251
  "type": "() => void",
2003
- "notes": "When set, renders an \u00d7 close button."
3252
+ "notes": "When set, renders an × close button."
2004
3253
  }
2005
3254
  }
2006
3255
  },
@@ -2027,6 +3276,199 @@
2027
3276
  "restores prior focus on close"
2028
3277
  ]
2029
3278
  },
3279
+ "ConfirmDialog": {
3280
+ "import": "import { ConfirmDialog, ConfirmProvider, useConfirm } from '@overdoser/react-toolkit'",
3281
+ "element": "Modal size=sm (div[role=dialog])",
3282
+ "forwardsRef": true,
3283
+ "props": {
3284
+ "open": {
3285
+ "type": "boolean",
3286
+ "required": true
3287
+ },
3288
+ "onConfirm": {
3289
+ "type": "() => void | Promise<void>",
3290
+ "required": true,
3291
+ "notes": "Promise → loading + locked; rejection shows the error and keeps it open. Never closes itself."
3292
+ },
3293
+ "onCancel": {
3294
+ "type": "() => void",
3295
+ "required": true
3296
+ },
3297
+ "title": {
3298
+ "type": "ReactNode",
3299
+ "default": "Are you sure?"
3300
+ },
3301
+ "description": {
3302
+ "type": "ReactNode"
3303
+ },
3304
+ "confirmLabel": {
3305
+ "type": "ReactNode",
3306
+ "default": "Confirm"
3307
+ },
3308
+ "cancelLabel": {
3309
+ "type": "ReactNode",
3310
+ "default": "Cancel"
3311
+ },
3312
+ "danger": {
3313
+ "type": "boolean",
3314
+ "default": false,
3315
+ "notes": "Danger confirm button, warning icon, focus on Cancel."
3316
+ },
3317
+ "requireText": {
3318
+ "type": "string",
3319
+ "notes": "Type-to-confirm gate."
3320
+ },
3321
+ "icon": {
3322
+ "type": "ReactNode | false",
3323
+ "notes": "Default: warning triangle when danger."
3324
+ },
3325
+ "autoFocus": {
3326
+ "type": "'confirm' | 'cancel'",
3327
+ "notes": "Default cancel when danger, else confirm."
3328
+ },
3329
+ "closeOnBackdrop": {
3330
+ "type": "boolean",
3331
+ "default": true
3332
+ },
3333
+ "errorMessage": {
3334
+ "type": "(err: unknown) => ReactNode"
3335
+ },
3336
+ "classes": {
3337
+ "type": "Partial<ConfirmDialogClasses>",
3338
+ "shape": [
3339
+ "modal",
3340
+ "header",
3341
+ "body",
3342
+ "description",
3343
+ "icon",
3344
+ "input",
3345
+ "error",
3346
+ "footer",
3347
+ "cancel",
3348
+ "confirm"
3349
+ ]
3350
+ }
3351
+ },
3352
+ "promiseApi": {
3353
+ "ConfirmProvider": "Mount once near the root; props children, defaults?: Partial<ConfirmOptions>.",
3354
+ "useConfirm": "() => (options?: ConfirmOptions) => Promise<boolean>. true after confirm (async onConfirm awaited, then closes), false on cancel/Escape/backdrop. Throws outside a provider.",
3355
+ "ConfirmOptions": "Omit<ConfirmDialogProps, 'open' | 'onConfirm' | 'onCancel' | 'children'> & { body?: ReactNode; onConfirm?: () => void | Promise<void> }"
3356
+ }
3357
+ },
3358
+ "CommandPalette": {
3359
+ "import": "import { CommandPalette, useCommandPalette } from '@overdoser/react-toolkit'",
3360
+ "element": "portaled div[role=dialog] with input[role=combobox] + div[role=listbox]",
3361
+ "forwardsRef": true,
3362
+ "itemShape": "{ id; label; keywords?; description?; icon?; shortcut?: string | string[]; group?; disabled?; onSelect?; href?; children?: CommandItem[] }",
3363
+ "props": {
3364
+ "open": {
3365
+ "type": "boolean",
3366
+ "required": true
3367
+ },
3368
+ "onOpenChange": {
3369
+ "type": "(open: boolean) => void",
3370
+ "required": true
3371
+ },
3372
+ "items": {
3373
+ "type": "CommandItem[]",
3374
+ "required": true
3375
+ },
3376
+ "onSelect": {
3377
+ "type": "(item: CommandItem) => void"
3378
+ },
3379
+ "closeOnSelect": {
3380
+ "type": "boolean",
3381
+ "default": true
3382
+ },
3383
+ "query": {
3384
+ "type": "string"
3385
+ },
3386
+ "defaultQuery": {
3387
+ "type": "string",
3388
+ "default": ""
3389
+ },
3390
+ "onQueryChange": {
3391
+ "type": "(query: string) => void"
3392
+ },
3393
+ "filter": {
3394
+ "type": "((item, query) => boolean | number) | null",
3395
+ "notes": "Default fuzzy; null = remote mode."
3396
+ },
3397
+ "loading": {
3398
+ "type": "boolean",
3399
+ "default": false
3400
+ },
3401
+ "loadingMessage": {
3402
+ "type": "ReactNode",
3403
+ "default": "Searching…"
3404
+ },
3405
+ "emptyMessage": {
3406
+ "type": "ReactNode",
3407
+ "default": "No results"
3408
+ },
3409
+ "placeholder": {
3410
+ "type": "string",
3411
+ "default": "Type a command or search…"
3412
+ },
3413
+ "hotkey": {
3414
+ "type": "string | false",
3415
+ "default": "mod+k"
3416
+ },
3417
+ "recentIds": {
3418
+ "type": "string[]"
3419
+ },
3420
+ "recentLabel": {
3421
+ "type": "ReactNode",
3422
+ "default": "Recent"
3423
+ },
3424
+ "maxResults": {
3425
+ "type": "number",
3426
+ "default": 50
3427
+ },
3428
+ "groupOrder": {
3429
+ "type": "string[]"
3430
+ },
3431
+ "footer": {
3432
+ "type": "ReactNode | null",
3433
+ "notes": "Default Kbd hints; null hides."
3434
+ },
3435
+ "escapeClearsQuery": {
3436
+ "type": "boolean",
3437
+ "default": false
3438
+ },
3439
+ "highlightMatches": {
3440
+ "type": "boolean",
3441
+ "default": true
3442
+ },
3443
+ "renderItem": {
3444
+ "type": "(item, { active, query }) => ReactNode"
3445
+ },
3446
+ "classes": {
3447
+ "type": "Partial<CommandPaletteClasses>",
3448
+ "shape": [
3449
+ "backdrop",
3450
+ "panel",
3451
+ "header",
3452
+ "breadcrumb",
3453
+ "input",
3454
+ "list",
3455
+ "group",
3456
+ "groupLabel",
3457
+ "item",
3458
+ "itemActive",
3459
+ "itemIcon",
3460
+ "itemLabel",
3461
+ "itemDescription",
3462
+ "itemShortcut",
3463
+ "empty",
3464
+ "loading",
3465
+ "footer",
3466
+ "match"
3467
+ ]
3468
+ }
3469
+ },
3470
+ "keyboard": "ArrowUp/Down wrap, Home/End, PageUp/Down ±10, Enter selects, Backspace on empty query pops a nested page, Escape closes."
3471
+ },
2030
3472
  "Form": {
2031
3473
  "import": "import { Form } from '@overdoser/react-toolkit'",
2032
3474
  "requires": "react-hook-form",
@@ -2115,7 +3557,7 @@
2115
3557
  "onValueChange": "Bridged to react-hook-form onChange (Select single, Dropdown).",
2116
3558
  "onValuesChange": "Bridged to react-hook-form onChange (Select multi).",
2117
3559
  "checked": "Auto-set from value when value is boolean (Checkbox).",
2118
- "values": "CheckboxGroup binds value:string[]/onChange(values) directly to the field \u2014 no bridge needed."
3560
+ "values": "CheckboxGroup binds value:string[]/onChange(values) directly to the field — no bridge needed."
2119
3561
  }
2120
3562
  }
2121
3563
  },
@@ -2160,9 +3602,97 @@
2160
3602
  "root",
2161
3603
  "wrapper",
2162
3604
  "prefix",
2163
- "suffix"
3605
+ "suffix",
3606
+ "reveal",
3607
+ "clear"
3608
+ ]
3609
+ },
3610
+ "revealable": {
3611
+ "type": "boolean",
3612
+ "default": false,
3613
+ "notes": "type=password only: eye toggle switches password/text; focus stays in the field."
3614
+ },
3615
+ "revealed": {
3616
+ "type": "boolean",
3617
+ "notes": "Controlled reveal."
3618
+ },
3619
+ "onRevealedChange": {
3620
+ "type": "(revealed: boolean) => void"
3621
+ },
3622
+ "revealLabels": {
3623
+ "type": "{ show: string; hide: string }",
3624
+ "default": "{ show: 'Show password', hide: 'Hide password' }"
3625
+ },
3626
+ "clearable": {
3627
+ "type": "boolean",
3628
+ "default": false,
3629
+ "notes": "× button while there is a value; fires onChange with '' then onClear; hidden when disabled/readOnly."
3630
+ },
3631
+ "clearLabel": {
3632
+ "type": "string",
3633
+ "default": "Clear"
3634
+ },
3635
+ "onClear": {
3636
+ "type": "() => void"
3637
+ }
3638
+ }
3639
+ },
3640
+ "SearchInput": {
3641
+ "import": "import { SearchInput, formatHotkey } from '@overdoser/react-toolkit'",
3642
+ "element": "Input type=search (ref is the input)",
3643
+ "forwardsRef": true,
3644
+ "extendsNativeProps": "InputProps minus prefix/type/clearable",
3645
+ "props": {
3646
+ "onValueChange": {
3647
+ "type": "(value: string) => void",
3648
+ "notes": "Every keystroke; '' on clear."
3649
+ },
3650
+ "onSearch": {
3651
+ "type": "(value: string) => void",
3652
+ "notes": "Debounced; immediate on Enter; '' on clear; never on mount or twice with the same value."
3653
+ },
3654
+ "debounce": {
3655
+ "type": "number",
3656
+ "default": 300
3657
+ },
3658
+ "loading": {
3659
+ "type": "boolean",
3660
+ "default": false
3661
+ },
3662
+ "hotkey": {
3663
+ "type": "string | false",
3664
+ "default": false,
3665
+ "notes": "useKeyboard chord that focuses the field; Kbd hint while empty + unfocused."
3666
+ },
3667
+ "showHotkeyHint": {
3668
+ "type": "boolean",
3669
+ "default": true
3670
+ },
3671
+ "onEscape": {
3672
+ "type": "'clear' | 'blur' | 'none'",
3673
+ "default": "clear"
3674
+ },
3675
+ "searchLabel": {
3676
+ "type": "string",
3677
+ "default": "Search"
3678
+ },
3679
+ "classes": {
3680
+ "type": "Partial<SearchInputClasses>",
3681
+ "shape": [
3682
+ "root",
3683
+ "wrapper",
3684
+ "prefix",
3685
+ "suffix",
3686
+ "reveal",
3687
+ "clear",
3688
+ "icon",
3689
+ "spinner",
3690
+ "hint"
2164
3691
  ]
2165
3692
  }
3693
+ },
3694
+ "utils": {
3695
+ "formatHotkey": "(chord: string) => string — 'mod+k' → '⌘K' on macOS / 'Ctrl K' elsewhere."
2166
3696
  }
2167
3697
  },
2168
3698
  "Select": {
@@ -2171,7 +3701,7 @@
2171
3701
  "extendsNativeProps": "select (without value/onChange)",
2172
3702
  "forwardsRef": true,
2173
3703
  "modes": {
2174
- "native": "Default \u2014 wraps a native <select>.",
3704
+ "native": "Default — wraps a native <select>.",
2175
3705
  "searchable": "When `searchable=true`. Custom dropdown with text filter.",
2176
3706
  "multi": "When `multiple=true`. Chip-based multi with text filter."
2177
3707
  },
@@ -2250,7 +3780,7 @@
2250
3780
  "portal": {
2251
3781
  "type": "boolean",
2252
3782
  "default": true,
2253
- "notes": "Applies to searchable + multiple modes. Renders the open menu in a portal at document.body using --crk-z-floating (1060) \u2014 escapes overflow:hidden ancestors and sits above modals. Set false to keep the menu in the trigger's subtree."
3783
+ "notes": "Applies to searchable + multiple modes. Renders the open menu in a portal at document.body using --crk-z-floating (1060) — escapes overflow:hidden ancestors and sits above modals. Set false to keep the menu in the trigger's subtree."
2254
3784
  },
2255
3785
  "classes": {
2256
3786
  "type": "Partial<SelectClasses>",
@@ -2262,8 +3792,48 @@
2262
3792
  "menu",
2263
3793
  "item",
2264
3794
  "chip",
2265
- "chipRemove"
3795
+ "chipRemove",
3796
+ "spinner",
3797
+ "match",
3798
+ "message"
2266
3799
  ]
3800
+ },
3801
+ "onSearch": {
3802
+ "type": "(query: string) => void",
3803
+ "notes": "Remote mode (searchable/multi): no local filtering; debounced query, '' on open/clear, no duplicates."
3804
+ },
3805
+ "searchDebounce": {
3806
+ "type": "number",
3807
+ "default": 250
3808
+ },
3809
+ "minSearchLength": {
3810
+ "type": "number",
3811
+ "default": 0
3812
+ },
3813
+ "searchPrompt": {
3814
+ "type": "ReactNode",
3815
+ "default": "Type to search"
3816
+ },
3817
+ "loading": {
3818
+ "type": "boolean",
3819
+ "default": false
3820
+ },
3821
+ "loadingMessage": {
3822
+ "type": "ReactNode",
3823
+ "default": "Loading…"
3824
+ },
3825
+ "noResultsMessage": {
3826
+ "type": "ReactNode",
3827
+ "default": "No results"
3828
+ },
3829
+ "highlightMatches": {
3830
+ "type": "boolean",
3831
+ "default": false,
3832
+ "notes": "Local mode: matched substring wrapped in <mark>."
3833
+ },
3834
+ "selectedLabels": {
3835
+ "type": "Record<string, ReactNode>",
3836
+ "notes": "Fallback label per value when its option is absent from options."
2267
3837
  }
2268
3838
  }
2269
3839
  },
@@ -2286,6 +3856,11 @@
2286
3856
  "default": false,
2287
3857
  "notes": "Ignored when variant=switch."
2288
3858
  },
3859
+ "error": {
3860
+ "type": "boolean",
3861
+ "default": false,
3862
+ "notes": "Danger border. Set automatically by FormField when the field is invalid."
3863
+ },
2289
3864
  "classes": {
2290
3865
  "type": "Partial<CheckboxClasses>",
2291
3866
  "shape": [
@@ -2296,6 +3871,30 @@
2296
3871
  }
2297
3872
  }
2298
3873
  },
3874
+ "Switch": {
3875
+ "import": "import { Switch } from '@overdoser/react-toolkit'",
3876
+ "element": "input[type=checkbox] inside label",
3877
+ "extendsNativeProps": "input",
3878
+ "forwardsRef": true,
3879
+ "props": {
3880
+ "label": {
3881
+ "type": "ReactNode"
3882
+ },
3883
+ "error": {
3884
+ "type": "boolean",
3885
+ "default": false
3886
+ },
3887
+ "classes": {
3888
+ "type": "Partial<SwitchClasses>",
3889
+ "shape": [
3890
+ "root",
3891
+ "input",
3892
+ "label"
3893
+ ]
3894
+ }
3895
+ },
3896
+ "behavior": "Alias of <Checkbox variant='switch'>. Same a11y/form behaviour; binds in FormField for a boolean field."
3897
+ },
2299
3898
  "CheckboxGroup": {
2300
3899
  "import": "import { CheckboxGroup } from '@overdoser/react-toolkit'",
2301
3900
  "element": "div[role=group]",
@@ -2389,6 +3988,11 @@
2389
3988
  "label": {
2390
3989
  "type": "ReactNode"
2391
3990
  },
3991
+ "error": {
3992
+ "type": "boolean",
3993
+ "default": false,
3994
+ "notes": "Danger border. Also inherited from RadioGroup error."
3995
+ },
2392
3996
  "classes": {
2393
3997
  "type": "Partial<RadioClasses>",
2394
3998
  "shape": [
@@ -2398,11 +4002,12 @@
2398
4002
  ]
2399
4003
  }
2400
4004
  },
2401
- "behavior": "Inside a <RadioGroup>, name/checked/onChange come from context \u2014 do not pass them on Radio."
4005
+ "behavior": "Inside a <RadioGroup>, name/checked/onChange come from context — do not pass them on Radio."
2402
4006
  },
2403
4007
  "RadioGroup": {
2404
4008
  "import": "import { RadioGroup } from '@overdoser/react-toolkit'",
2405
4009
  "element": "div[role=radiogroup]",
4010
+ "forwardsRef": true,
2406
4011
  "props": {
2407
4012
  "name": {
2408
4013
  "type": "string",
@@ -2426,6 +4031,11 @@
2426
4031
  },
2427
4032
  "required": {
2428
4033
  "type": "boolean"
4034
+ },
4035
+ "error": {
4036
+ "type": "boolean",
4037
+ "default": false,
4038
+ "notes": "Applies error styling to every Radio inside. Set automatically by FormField."
2429
4039
  }
2430
4040
  }
2431
4041
  },
@@ -2492,7 +4102,7 @@
2492
4102
  "dots-colors": "dotColorKey (each row holds its own dot color)",
2493
4103
  "label": "showValues + valuePosition",
2494
4104
  "label-custom": "renderLabel",
2495
- "interactive": "Series-toggle pattern: keep multiple series in `data` but pass only the active series in `config` (`{ [active]: fullConfig[active] }`). Consumer-side selector \u2014 tiles, prev/next navigator, or <Dropdown> (see recipes/interactive-line-chart.tsx)."
4105
+ "interactive": "Series-toggle pattern: keep multiple series in `data` but pass only the active series in `config` (`{ [active]: fullConfig[active] }`). Consumer-side selector — tiles, prev/next navigator, or <Dropdown> (see recipes/interactive-line-chart.tsx)."
2496
4106
  },
2497
4107
  "props": {
2498
4108
  "data": {
@@ -2524,7 +4134,7 @@
2524
4134
  "step"
2525
4135
  ],
2526
4136
  "default": "monotone",
2527
- "notes": "'step' is step-after \u2014 value holds until the next x."
4137
+ "notes": "'step' is step-after — value holds until the next x."
2528
4138
  },
2529
4139
  "showPoints": {
2530
4140
  "type": "boolean",
@@ -2628,7 +4238,7 @@
2628
4238
  "stacked-expand": "stacked + stackOffset='expand' (normalizes each row to 100%)",
2629
4239
  "gradient": "fillGradient",
2630
4240
  "icons": "set `icon` on each entry in `config` (rendered in legend in place of the swatch)",
2631
- "interactive": "Data-range filter: all series stay rendered (typically stacked + fillGradient); the selector swaps the slice of `data` shown (e.g. last 7d/14d/30d). Not a series toggle. Consumer-side selector \u2014 tiles, prev/next navigator, or <Dropdown>. See recipes/interactive-area-chart.tsx."
4241
+ "interactive": "Data-range filter: all series stay rendered (typically stacked + fillGradient); the selector swaps the slice of `data` shown (e.g. last 7d/14d/30d). Not a series toggle. Consumer-side selector — tiles, prev/next navigator, or <Dropdown>. See recipes/interactive-area-chart.tsx."
2632
4242
  },
2633
4243
  "props": {
2634
4244
  "data": {
@@ -2677,7 +4287,7 @@
2677
4287
  "fillGradient": {
2678
4288
  "type": "boolean",
2679
4289
  "default": false,
2680
- "notes": "Per-series vertical linear gradient (opaque top \u2192 transparent bottom)."
4290
+ "notes": "Per-series vertical linear gradient (opaque top → transparent bottom)."
2681
4291
  },
2682
4292
  "showGrid": {
2683
4293
  "type": "boolean",
@@ -2742,7 +4352,7 @@
2742
4352
  "mixed": "colorBy='index' (+ optional colors)",
2743
4353
  "negative": "numeric values spanning zero; pair with negativeColor",
2744
4354
  "active": "activeIndex={n}",
2745
- "interactive": "Series-toggle pattern: keep multiple series in `data` but pass only the active series in `config` (`{ [active]: fullConfig[active] }`). Consumer-side selector \u2014 tiles, prev/next navigator, or <Dropdown> (see recipes/interactive-bar-chart.tsx)."
4355
+ "interactive": "Series-toggle pattern: keep multiple series in `data` but pass only the active series in `config` (`{ [active]: fullConfig[active] }`). Consumer-side selector — tiles, prev/next navigator, or <Dropdown> (see recipes/interactive-bar-chart.tsx)."
2746
4356
  },
2747
4357
  "props": {
2748
4358
  "data": {
@@ -2816,7 +4426,7 @@
2816
4426
  "inside-start"
2817
4427
  ],
2818
4428
  "default": "outside",
2819
- "notes": "'inside-start' anchors at the baseline edge of the bar; on vertical bars the text rotates \u00b190\u00b0 to read along the bar's length."
4429
+ "notes": "'inside-start' anchors at the baseline edge of the bar; on vertical bars the text rotates ±90° to read along the bar's length."
2820
4430
  },
2821
4431
  "renderLabel": {
2822
4432
  "type": "(args: { row, value, seriesKey, index }) => ReactNode",
@@ -2884,7 +4494,7 @@
2884
4494
  "donut": "innerRadius (number or 'NN%')",
2885
4495
  "legend": "showLegend (on by default)",
2886
4496
  "separator-none": "strokeWidth={0}",
2887
- "label": "showLabels (default content: name + percent). Outside labels get a leader line from slice \u2192 label by default; disable with showLabelLines=false.",
4497
+ "label": "showLabels (default content: name + percent). Outside labels get a leader line from slice → label by default; disable with showLabelLines=false.",
2888
4498
  "label-custom": "renderLabel (leader line still drawn unless showLabelLines=false)",
2889
4499
  "label-list": "valuePosition='inside' + renderLabel returning the row name. Each slice carries its category name on its colored surface (background-colored text for contrast).",
2890
4500
  "donut-text": "innerRadius + centerLabel",
@@ -3012,7 +4622,7 @@
3012
4622
  "grid-circle-fill": "gridType='circle' (+ fillOpacity for the 'fill')",
3013
4623
  "grid-circle-no-lines": "gridType='circle' + showRadialLines={false}",
3014
4624
  "grid-fill": "defaults (filled polygon grid)",
3015
- "grid-custom": "override the grid via classes={{ grid: '\u2026' }} or theme tokens",
4625
+ "grid-custom": "override the grid via classes={{ grid: '…' }} or theme tokens",
3016
4626
  "grid-none": "showGrid={false} (+ usually showRadialLines={false})",
3017
4627
  "icons": "set `icon` on each entry in `config`",
3018
4628
  "label-custom": "renderAxisLabel",
@@ -3121,11 +4731,11 @@
3121
4731
  "unsubscribeBars": "(handle) => void"
3122
4732
  },
3123
4733
  "indicators": {
3124
- "sma": "{ type: 'sma', period, color? } \u2014 overlay",
3125
- "ema": "{ type: 'ema', period, color? } \u2014 overlay",
3126
- "bollinger": "{ type: 'bollinger', period, stdDev?, color?, fillOpacity? } \u2014 overlay (filled band)",
3127
- "rsi": "{ type: 'rsi', period?, color?, overbought?, oversold? } \u2014 sub-pane",
3128
- "volume": "{ type: 'volume', upColor?, downColor? } \u2014 sub-pane (histogram)"
4734
+ "sma": "{ type: 'sma', period, color? } — overlay",
4735
+ "ema": "{ type: 'ema', period, color? } — overlay",
4736
+ "bollinger": "{ type: 'bollinger', period, stdDev?, color?, fillOpacity? } — overlay (filled band)",
4737
+ "rsi": "{ type: 'rsi', period?, color?, overbought?, oversold? } — sub-pane",
4738
+ "volume": "{ type: 'volume', upColor?, downColor? } — sub-pane (histogram)"
3129
4739
  },
3130
4740
  "props": {
3131
4741
  "datafeed": {
@@ -3143,7 +4753,7 @@
3143
4753
  },
3144
4754
  "period": {
3145
4755
  "type": "Period",
3146
- "notes": "Visible time-range window (the 'chart interval'): '1D' | '5D' | '1M' | '3M' | '6M' | '1Y' | '5Y' | '10Y' | '20Y' | 'MAX' or a `<n><unit>` string. Overrides initialLookback when set. 'MAX' fetches from epoch and renders whatever the datafeed returns \u2014 pair with a coarse resolution. The chart does not auto-adjust resolution; pair with suggestResolutionForPeriod() / suggestPeriodForResolution() to couple the two."
4756
+ "notes": "Visible time-range window (the 'chart interval'): '1D' | '5D' | '1M' | '3M' | '6M' | '1Y' | '5Y' | '10Y' | '20Y' | 'MAX' or a `<n><unit>` string. Overrides initialLookback when set. 'MAX' fetches from epoch and renders whatever the datafeed returns — pair with a coarse resolution. The chart does not auto-adjust resolution; pair with suggestResolutionForPeriod() / suggestPeriodForResolution() to couple the two."
3147
4757
  },
3148
4758
  "seriesType": {
3149
4759
  "type": "enum",
@@ -3226,7 +4836,7 @@
3226
4836
  "drag": "pan",
3227
4837
  "wheel": "zoom (cursor-anchored)",
3228
4838
  "arrow-keys": "nudge pan",
3229
- "hover": "full crosshair \u2014 dashed horizontal + vertical lines, price badge on the right Y axis at the cursor's price, and a time badge under the X axis showing `YYYY-MM-DD HH:MM:SS <tz>` at the cursor's snapped bar (timezone configurable via the gear panel or props). OHLC readout in the chart header."
4839
+ "hover": "full crosshair — dashed horizontal + vertical lines, price badge on the right Y axis at the cursor's price, and a time badge under the X axis showing `YYYY-MM-DD HH:MM:SS <tz>` at the cursor's snapped bar (timezone configurable via the gear panel or props). OHLC readout in the chart header."
3230
4840
  },
3231
4841
  "exportedHelpers": [
3232
4842
  "periodToSeconds",
@@ -3253,7 +4863,7 @@
3253
4863
  "import": "import { Sparkline } from '@overdoser/react-toolkit'",
3254
4864
  "element": "svg",
3255
4865
  "forwardsRef": true,
3256
- "behavior": "Inline trend line, fixed pixel size, no axes/legend/tooltip \u2014 for table cells and KPI tiles.",
4866
+ "behavior": "Inline trend line, fixed pixel size, no axes/legend/tooltip — for table cells and KPI tiles.",
3257
4867
  "props": {
3258
4868
  "data": {
3259
4869
  "type": "number[]",
@@ -3301,19 +4911,19 @@
3301
4911
  "import": "import { TraceTimeline } from '@overdoser/react-toolkit'",
3302
4912
  "element": "div",
3303
4913
  "forwardsRef": true,
3304
- "behavior": "Trace of one correlated flow on a single proportional UTC time band \u2014 HTTP calls, plain domain events, or both. Overlapping bars pack into sub-rows; description chips are placed collision-free (3-pass nudging). Ctrl/Cmd-wheel zoom (wheelZoom prop: 'ctrl' default | 'free' | 'none'), drag-pan, Fit, keyword highlight, hover tooltip. A right-side icon rail (default on) docks one drawer at a time: Event details (opened by clicking an event, empty state until then; every value rendered under its own label \u2014 Started/Ended/Duration stacked one per row \u2014 and only the sections the event actually has: Message/Payload/Details for plain events, Request/Response for requests, unknown keys under Other fields) or Full log (every event vertically with message, details fields and the payloads it has + copy buttons; kept in sync with timeline clicks both ways \u2014 timeline click scrolls/flashes the log entry, log click selects and centers the timeline). Drawers dock into the card row flush against the timeline (full card height, no gap); the divider strip between card and drawer drags to resize drawer vs timeline. An events-summary bubble (default on) sits bottom-left and expands into a draggable panel, dockable from its header as a full-height column flush beside the card (the timeline shrinks to make room) with the same resizable divider. Fully controlled data: pass the pre-filtered array; the component does no filtering/grouping. Items with an unset end render live (dashed/pulsing) and grow on an internal ticker until an update supplies end.",
4914
+ "behavior": "Trace of one correlated flow on a single proportional UTC time band — HTTP calls, plain domain events, or both. Overlapping bars pack into sub-rows; description chips are placed collision-free (3-pass nudging). Ctrl/Cmd-wheel zoom (wheelZoom prop: 'ctrl' default | 'free' | 'none'), drag-pan, Fit, keyword highlight, hover tooltip. A right-side icon rail (default on) docks one drawer at a time: Event details (opened by clicking an event, empty state until then; every value rendered under its own label — Started/Ended/Duration stacked one per row — and only the sections the event actually has: Message/Payload/Details for plain events, Request/Response for requests, unknown keys under Other fields) or Full log (every event vertically with message, details fields and the payloads it has + copy buttons; kept in sync with timeline clicks both ways — timeline click scrolls/flashes the log entry, log click selects and centers the timeline). Drawers dock into the card row flush against the timeline (full card height, no gap); the divider strip between card and drawer drags to resize drawer vs timeline. An events-summary bubble (default on) sits bottom-left and expands into a draggable panel, dockable from its header as a full-height column flush beside the card (the timeline shrinks to make room) with the same resizable divider. Fully controlled data: pass the pre-filtered array; the component does no filtering/grouping. Items with an unset end render live (dashed/pulsing) and grow on an internal ticker until an update supplies end.",
3305
4915
  "props": {
3306
4916
  "events": {
3307
4917
  "type": "TraceTimelineEvent[]",
3308
4918
  "required": true,
3309
- "notes": "TraceTimelineEvent = { id, service, start, end?: number|null, source?, op?, kind?: 'request'|'event', level?: 'debug'|'info'|'success'|'warning'|'error', message?, payload?, details?: { label, value, mono?, copy? }[], requestId?, method?, url?, label?, query?, reqHeaders?, reqBody?, status?, resHeaders?, resBody? }. end unset = in flight (requests) / ongoing (plain events). kind is inferred when omitted: 'request' as soon as any of method/url/status/query/reqHeaders/reqBody/resHeaders/resBody is set, else 'event' \u2014 which drives which detail sections render. payload is the generic body for non-request events (counterpart of reqBody/resBody; an event may carry nothing but payload). details adds arbitrary labeled values (objects render as copyable JSON blocks). Extra keys are allowed, are searched by highlight and are listed under Other fields."
4919
+ "notes": "TraceTimelineEvent = { id, service, start, end?: number|null, source?, op?, kind?: 'request'|'event', level?: 'debug'|'info'|'success'|'warning'|'error', message?, payload?, details?: { label, value, mono?, copy? }[], requestId?, method?, url?, label?, query?, reqHeaders?, reqBody?, status?, resHeaders?, resBody? }. end unset = in flight (requests) / ongoing (plain events). kind is inferred when omitted: 'request' as soon as any of method/url/status/query/reqHeaders/reqBody/resHeaders/resBody is set, else 'event' — which drives which detail sections render. payload is the generic body for non-request events (counterpart of reqBody/resBody; an event may carry nothing but payload). details adds arbitrary labeled values (objects render as copyable JSON blocks). Extra keys are allowed, are searched by highlight and are listed under Other fields."
3310
4920
  },
3311
4921
  "title": {
3312
4922
  "type": "ReactNode"
3313
4923
  },
3314
4924
  "meta": {
3315
4925
  "type": "ReactNode",
3316
- "notes": "Defaults to 'N events \u00b7 span \u00b7 times in UTC'."
4926
+ "notes": "Defaults to 'N events · span · times in UTC'."
3317
4927
  },
3318
4928
  "highlight": {
3319
4929
  "type": "string",
@@ -3321,7 +4931,7 @@
3321
4931
  },
3322
4932
  "services": {
3323
4933
  "type": "string[]",
3324
- "notes": "Seeds service\u2192color assignment order for stable colors across traces."
4934
+ "notes": "Seeds service→color assignment order for stable colors across traces."
3325
4935
  },
3326
4936
  "serviceColors": {
3327
4937
  "type": "Record<string, string>"
@@ -3373,12 +4983,12 @@
3373
4983
  "floating"
3374
4984
  ],
3375
4985
  "default": "bubble",
3376
- "notes": "bubble = collapsed pill anchored bottom-left of the timeline, expanding in place into a draggable panel (collapse snaps it back to its corner; a header toggle docks it as a full-height column flush beside the timeline card, shrinking the timeline; the divider strip between them drags to resize both; undock floats it again \u2014 dockedness survives collapse). Or dock beside the timeline, render full-width above/below (rows flow into responsive columns), or float as a draggable palette grabbed by its header. summaryDefaultPosition?: { x, y } sets the floating start offset."
4986
+ "notes": "bubble = collapsed pill anchored bottom-left of the timeline, expanding in place into a draggable panel (collapse snaps it back to its corner; a header toggle docks it as a full-height column flush beside the timeline card, shrinking the timeline; the divider strip between them drags to resize both; undock floats it again — dockedness survives collapse). Or dock beside the timeline, render full-width above/below (rows flow into responsive columns), or float as a draggable palette grabbed by its header. summaryDefaultPosition?: { x, y } sets the floating start offset."
3377
4987
  },
3378
4988
  "showDock": {
3379
4989
  "type": "boolean",
3380
4990
  "default": true,
3381
- "notes": "Sticky 44px icon rail on the far right toggling one docked drawer at a time: Event details or Full log. Nothing docked initially; clicking an event opens details. false removes the rail and full log \u2014 the details panel then opens/closes with the selection."
4991
+ "notes": "Sticky 44px icon rail on the far right toggling one docked drawer at a time: Event details or Full log. Nothing docked initially; clicking an event opens details. false removes the rail and full log — the details panel then opens/closes with the selection."
3382
4992
  },
3383
4993
  "defaultDock": {
3384
4994
  "type": "'details' | 'log' | null",
@@ -3449,7 +5059,7 @@
3449
5059
  "import": "import { TraceEventDetails } from '@overdoser/react-toolkit'",
3450
5060
  "element": "div",
3451
5061
  "forwardsRef": true,
3452
- "behavior": "Standalone event inspector \u2014 the panel behind TraceTimeline's Event details drawer, usable in any drawer/modal/split view. Adapts to the event instead of assuming an HTTP call: every value is rendered under its own label (identity, URL, request id and Started / Ended / Duration, each stacked on its own row) and only the sections the event has are shown \u2014 Request/Response (query parameters, headers, bodies, 'Awaiting response\u2026' while in flight) for request-like events, Message/Payload/Details for plain events, Other fields for unrecognized keys. Ships no shell (no surface/border/scrolling) \u2014 wrap it in your own panel. The inference helpers behind it are exported too: isRequestEvent(ev) (the request/event decision), badgeOf(ev, pending) (the status/level badge as { text, tone: TraceBadgeTone } | null), extraFieldsOf(ev, hidden?) (unknown keys as TraceTimelineField[], minus hidden names).",
5062
+ "behavior": "Standalone event inspector — the panel behind TraceTimeline's Event details drawer, usable in any drawer/modal/split view. Adapts to the event instead of assuming an HTTP call: every value is rendered under its own label (identity, URL, request id and Started / Ended / Duration, each stacked on its own row) and only the sections the event has are shown — Request/Response (query parameters, headers, bodies, 'Awaiting response…' while in flight) for request-like events, Message/Payload/Details for plain events, Other fields for unrecognized keys. Ships no shell (no surface/border/scrolling) — wrap it in your own panel. The inference helpers behind it are exported too: isRequestEvent(ev) (the request/event decision), badgeOf(ev, pending) (the status/level badge as { text, tone: TraceBadgeTone } | null), extraFieldsOf(ev, hidden?) (unknown keys as TraceTimelineField[], minus hidden names).",
3453
5063
  "props": {
3454
5064
  "event": {
3455
5065
  "type": "TraceTimelineEvent",
@@ -3520,7 +5130,7 @@
3520
5130
  },
3521
5131
  "tagColors": {
3522
5132
  "type": "Record<string, string>",
3523
- "notes": "Tag\u2192color overrides; unknown tags cycle the palette."
5133
+ "notes": "Tag→color overrides; unknown tags cycle the palette."
3524
5134
  },
3525
5135
  "showControls": {
3526
5136
  "type": "boolean",
@@ -3621,7 +5231,7 @@
3621
5231
  },
3622
5232
  "meta": {
3623
5233
  "type": "ReactNode",
3624
- "notes": "Defaults to 'N tasks \u00b7 span \u00b7 K running'."
5234
+ "notes": "Defaults to 'N tasks · span · K running'."
3625
5235
  },
3626
5236
  "highlight": {
3627
5237
  "type": "string"
@@ -3737,11 +5347,12 @@
3737
5347
  },
3738
5348
  "useKeyboard": {
3739
5349
  "import": "import { useKeyboard } from '@overdoser/react-toolkit'",
3740
- "signature": "useKeyboard(handlers: Record<string, (e: KeyboardEvent) => void>, active?: boolean): void",
5350
+ "signature": "useKeyboard(handlers: Record<string, (e: KeyboardEvent) => void>, options?: boolean | UseKeyboardOptions): void",
3741
5351
  "params": {
3742
- "handlers": "Map keyed by KeyboardEvent.key (e.g., 'Escape', 'Enter').",
3743
- "active": "Default true. Pass false to disable without unmounting."
3744
- }
5352
+ "handlers": "Map keyed by key name or chord: 'Escape', 'k', '?', 'mod+k', 'ctrl+shift+z', 'alt+ArrowUp'. mod = Meta on macOS, Ctrl elsewhere.",
5353
+ "options": "boolean = { active }. { active?, ignoreEditable? (default true: printable keys skipped while typing in inputs), preventDefault? (default: only for modifier chords), target?: RefObject }"
5354
+ },
5355
+ "behavior": "Handlers read through a ref — inline objects don't re-subscribe."
3745
5356
  },
3746
5357
  "useTableSort": {
3747
5358
  "import": "import { useTableSort } from '@overdoser/react-toolkit'",
@@ -3749,11 +5360,61 @@
3749
5360
  "returns": {
3750
5361
  "sortedData": "T[]",
3751
5362
  "sortConfig": "SortConfig[]",
3752
- "requestSort": "(key) => void \u2014 single-column; cycles asc \u2192 desc \u2192 cleared.",
3753
- "requestMultiSort": "(key) => void \u2014 adds/toggles a column in multi-sort.",
5363
+ "requestSort": "(key) => void — single-column; cycles asc → desc → cleared.",
5364
+ "requestMultiSort": "(key) => void — adds/toggles a column in multi-sort.",
3754
5365
  "resetSort": "() => void"
3755
5366
  },
3756
5367
  "notes": "Only needed if you want to manage sort state outside <Table>."
5368
+ },
5369
+ "usePersistedState": {
5370
+ "import": "import { usePersistedState } from '@overdoser/react-toolkit'",
5371
+ "signature": "usePersistedState<T>(key: string, initialValue: T | (() => T), options?: { storage?: 'local' | 'session'; serialize?; deserialize?; sync?: boolean }): [T, (next: T | ((prev: T) => T)) => void, () => void]",
5372
+ "behavior": "localStorage-backed useState. SSR-safe, private-mode safe, in-tab + cross-tab sync, useSyncExternalStore."
5373
+ },
5374
+ "useDebouncedValue": {
5375
+ "import": "import { useDebouncedValue } from '@overdoser/react-toolkit'",
5376
+ "signature": "useDebouncedValue<T>(value: T, delay = 300): T"
5377
+ },
5378
+ "useMediaQuery": {
5379
+ "import": "import { useMediaQuery } from '@overdoser/react-toolkit'",
5380
+ "signature": "useMediaQuery(query: string, serverValue = false): boolean"
5381
+ },
5382
+ "useElementSize": {
5383
+ "import": "import { useElementSize } from '@overdoser/react-toolkit'",
5384
+ "signature": "useElementSize(ref: RefObject<HTMLElement | null>, box?: 'content-box' | 'border-box'): { width: number; height: number }"
5385
+ },
5386
+ "useNow": {
5387
+ "import": "import { useNow } from '@overdoser/react-toolkit'",
5388
+ "signature": "useNow(interval = 1000, active = true): number",
5389
+ "behavior": "Shared timer per interval."
5390
+ },
5391
+ "useContextMenu": {
5392
+ "import": "import { useContextMenu } from '@overdoser/react-toolkit'",
5393
+ "signature": "useContextMenu(): { anchor, open, onOpenChange, onContextMenu, openAt(point), close }",
5394
+ "behavior": "Put onContextMenu on the area; pass anchor/open/onOpenChange to <Dropdown>."
5395
+ },
5396
+ "useConfirm": {
5397
+ "import": "import { useConfirm } from '@overdoser/react-toolkit'",
5398
+ "signature": "useConfirm(): (options?: ConfirmOptions) => Promise<boolean>",
5399
+ "behavior": "Needs <ConfirmProvider>. See components.ConfirmDialog.promiseApi."
5400
+ },
5401
+ "useResizable": {
5402
+ "import": "import { useResizable } from '@overdoser/react-toolkit'",
5403
+ "signature": "useResizable({ size?, defaultSize?, min?, max?: number | (() => number), axis?: 'x' | 'y', invert?, step?, onResize?, onResizeStart?, onResizeEnd?, disabled? }): { size, setSize, isResizing, reset, handleProps }",
5404
+ "behavior": "Spread handleProps on your handle element (pointer capture, keyboard, role=separator + aria values)."
5405
+ },
5406
+ "useZoomPan": {
5407
+ "import": "import { useZoomPan } from '@overdoser/react-toolkit'",
5408
+ "signature": "useZoomPan({ minScale?, maxScale?, step?, wheel?, doubleClickToggle?, onChange? }): { scale, x, y, isPanning, stageProps, contentRef, contentStyle, zoomIn, zoomOut, zoomTo, reset, fit }",
5409
+ "behavior": "Spread stageProps on a relative/overflow-hidden stage, contentStyle on the zoomed element."
5410
+ },
5411
+ "useTheme": {
5412
+ "import": "import { useTheme } from '@overdoser/react-toolkit'",
5413
+ "signature": "useTheme({ storageKey?, attribute?, defaultTheme? }?): { theme: 'light' | 'dark' | 'system'; resolved: 'light' | 'dark'; setTheme; toggle }"
5414
+ },
5415
+ "useCommandPalette": {
5416
+ "import": "import { useCommandPalette } from '@overdoser/react-toolkit'",
5417
+ "signature": "useCommandPalette(initialOpen = false): { open, setOpen, toggle, paletteProps: { open, onOpenChange } }"
3757
5418
  }
3758
5419
  },
3759
5420
  "conventions": [
@@ -3762,10 +5423,10 @@
3762
5423
  "Dropdown has two modes: with `options` + `value` + `onChange` it acts as a select input (the `trigger` prop is unused); without `options`, pass `trigger` and `<DropdownItem>` children.",
3763
5424
  "Popover content goes through the `content` prop.",
3764
5425
  "Modal content lives in Modal.Header / Modal.Body / Modal.Footer compound components.",
3765
- "FormField clones a single child element to inject form props \u2014 pass exactly one input element.",
5426
+ "FormField clones a single child element to inject form props — pass exactly one input element.",
3766
5427
  "Server-side Table mode (when `onSort` is provided): the consumer is responsible for sorting and slicing `data` server-side.",
3767
5428
  "Theme stylesheet is imported separately: '@overdoser/react-toolkit/theme.css'.",
3768
- "Charts use `--crk-chart-1` \u2026 `--crk-chart-5` color tokens (overridable on `:root`). Each chart is responsive via ResizeObserver; ship no external chart library."
5429
+ "Charts use `--crk-chart-1` … `--crk-chart-5` color tokens (overridable on `:root`). Each chart is responsive via ResizeObserver; ship no external chart library."
3769
5430
  ],
3770
5431
  "recipes": [
3771
5432
  "recipes/login-form.tsx",
@@ -3785,5 +5446,40 @@
3785
5446
  "recipes/comparison-table.tsx",
3786
5447
  "recipes/live-timeline-feed.tsx",
3787
5448
  "recipes/floating-copy-button.tsx"
3788
- ]
5449
+ ],
5450
+ "utils": {
5451
+ "formatBytes": {
5452
+ "import": "import { formatBytes } from '@overdoser/react-toolkit'",
5453
+ "signature": "formatBytes(bytes: number, { decimals?, base?: 1000 | 1024, iec?, locale? }?): string",
5454
+ "example": "formatBytes(1536) → '1.5 KB'"
5455
+ },
5456
+ "timeAgo": {
5457
+ "import": "import { timeAgo } from '@overdoser/react-toolkit'",
5458
+ "signature": "timeAgo(value: Date | number | string, { now?, locale?, format?, numeric?, maxAge? }?): string | null",
5459
+ "example": "'3 minutes ago' / 'in 2 hours' / 'yesterday'"
5460
+ },
5461
+ "THEME_INIT_SCRIPT": {
5462
+ "import": "import { THEME_INIT_SCRIPT, getThemeInitScript } from '@overdoser/react-toolkit'",
5463
+ "signature": "THEME_INIT_SCRIPT: string; getThemeInitScript({ storageKey?, attribute?, defaultTheme? }?): string",
5464
+ "notes": "Inline in <head> before first paint."
5465
+ }
5466
+ },
5467
+ "darkMode": {
5468
+ "contract": "No attribute = light. data-theme=\"dark\"|\"light\" on <html> forces a theme; on any element forces it for that subtree. data-theme=\"system\" on <html> follows prefers-color-scheme. useTheme / ThemeToggle / THEME_INIT_SCRIPT write these (opt-in).",
5469
+ "storageKey": "crk-theme",
5470
+ "headScript": "THEME_INIT_SCRIPT (inline in <head> before first paint)",
5471
+ "toggle": "<ThemeToggle />",
5472
+ "hook": "useTheme()",
5473
+ "tokens": [
5474
+ "--crk-color-primary-text",
5475
+ "--crk-color-info-text",
5476
+ "--crk-color-success-text",
5477
+ "--crk-color-warning-text",
5478
+ "--crk-color-danger-text",
5479
+ "--crk-color-primary-selected",
5480
+ "--crk-color-overlay-hover",
5481
+ "--crk-color-backdrop",
5482
+ "--crk-color-backdrop-soft"
5483
+ ]
5484
+ }
3789
5485
  }