@overdoser/react-toolkit 0.18.0 → 0.19.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 (156) hide show
  1. package/AGENTS.md +51 -7
  2. package/CHANGELOG.md +129 -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 +100 -2
  99. package/components/Table/Table.js +371 -210
  100. package/components/Table/Table.module.scss.js +68 -46
  101. package/components/Table/index.d.ts +1 -1
  102. package/components/ThemeToggle/ThemeToggle.d.ts +38 -0
  103. package/components/ThemeToggle/ThemeToggle.js +97 -0
  104. package/components/ThemeToggle/ThemeToggle.module.scss.js +23 -0
  105. package/components/ThemeToggle/index.d.ts +2 -0
  106. package/components/inputs/Checkbox/Checkbox.d.ts +2 -0
  107. package/components/inputs/Checkbox/Checkbox.js +29 -28
  108. package/components/inputs/Checkbox/Checkbox.module.scss.js +8 -6
  109. package/components/inputs/Input/Input.d.ts +33 -1
  110. package/components/inputs/Input/Input.js +94 -35
  111. package/components/inputs/Input/Input.module.scss.js +14 -12
  112. package/components/inputs/Radio/Radio.d.ts +5 -4
  113. package/components/inputs/Radio/Radio.js +55 -50
  114. package/components/inputs/Radio/Radio.module.scss.js +12 -10
  115. package/components/inputs/SearchInput/SearchInput.d.ts +57 -0
  116. package/components/inputs/SearchInput/SearchInput.js +116 -0
  117. package/components/inputs/SearchInput/SearchInput.module.scss.js +13 -0
  118. package/components/inputs/SearchInput/index.d.ts +2 -0
  119. package/components/inputs/Select/Select.d.ts +52 -0
  120. package/components/inputs/Select/Select.js +494 -385
  121. package/components/inputs/Select/Select.module.scss.js +34 -30
  122. package/components/inputs/Switch/Switch.d.ts +15 -0
  123. package/components/inputs/Switch/Switch.js +8 -0
  124. package/components/inputs/Switch/index.d.ts +2 -0
  125. package/hooks/useDebouncedValue.d.ts +15 -0
  126. package/hooks/useDebouncedValue.js +15 -0
  127. package/hooks/useElementSize.d.ts +20 -0
  128. package/hooks/useElementSize.js +23 -0
  129. package/hooks/useKeyboard.d.ts +49 -5
  130. package/hooks/useKeyboard.js +66 -16
  131. package/hooks/useMediaQuery.d.ts +14 -0
  132. package/hooks/useMediaQuery.js +16 -0
  133. package/hooks/useNow.d.ts +14 -0
  134. package/hooks/useNow.js +35 -0
  135. package/hooks/usePersistedState.d.ts +30 -0
  136. package/hooks/usePersistedState.js +96 -0
  137. package/hooks/useResizable.d.ts +66 -0
  138. package/hooks/useResizable.js +105 -0
  139. package/hooks/useTheme.d.ts +33 -0
  140. package/hooks/useTheme.js +27 -0
  141. package/index.css +1 -1
  142. package/index.d.ts +58 -4
  143. package/index.js +208 -132
  144. package/index.layered.css +1 -1
  145. package/llms.txt +619 -25
  146. package/manifest.json +1739 -91
  147. package/package.json +1 -1
  148. package/recipes/confirm-modal.tsx +65 -53
  149. package/recipes/floating-copy-button.tsx +32 -28
  150. package/utils/formatBytes.d.ts +21 -0
  151. package/utils/formatBytes.js +14 -0
  152. package/utils/index.d.ts +6 -0
  153. package/utils/themeScript.d.ts +17 -0
  154. package/utils/themeScript.js +9 -0
  155. package/utils/timeAgo.d.ts +33 -0
  156. 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
  },
@@ -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,8 +463,65 @@
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": {
@@ -562,16 +619,18 @@
562
619
  }
563
620
  },
564
621
  "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."
622
+ "sortCycle": "none → asc → desc → none",
623
+ "controlledMode": "Activated when onSort is provided. Table renders data as-is and does not slice for pagination.",
624
+ "selection": "Select-all covers the current page only (checked/indeterminate); Shift-click selects a range; selections on other pages are kept."
567
625
  }
568
626
  },
569
627
  "Dropdown": {
570
- "import": "import { Dropdown, DropdownItem } from '@overdoser/react-toolkit'",
628
+ "import": "import { Dropdown, DropdownItem, DropdownSeparator, DropdownLabel, useContextMenu } from '@overdoser/react-toolkit'",
571
629
  "element": "div",
572
630
  "modes": {
573
631
  "menu": "Pass `trigger` plus <DropdownItem> children.",
574
- "select": "Pass `options` + `value` + `onChange`. Trigger label shows the selected option."
632
+ "select": "Pass `options` + `value` + `onChange`. Trigger label shows the selected option.",
633
+ "context": "Pass `anchor={{ x, y }}` (+ open/onOpenChange) and no trigger: menu opens at that viewport point. `useContextMenu()` wires it from a right-click."
575
634
  },
576
635
  "props": {
577
636
  "trigger": {
@@ -631,10 +690,29 @@
631
690
  "triggerLabel",
632
691
  "chevron",
633
692
  "menu",
634
- "item"
693
+ "item",
694
+ "itemIcon",
695
+ "itemLabel",
696
+ "itemDescription",
697
+ "itemShortcut",
698
+ "itemCheck",
699
+ "separator",
700
+ "label"
635
701
  ]
702
+ },
703
+ "open": {
704
+ "type": "boolean",
705
+ "notes": "Controlled open state (any mode)."
706
+ },
707
+ "onOpenChange": {
708
+ "type": "(open: boolean) => void"
709
+ },
710
+ "anchor": {
711
+ "type": "{ x: number; y: number } | null",
712
+ "notes": "Context-menu mode. Clamped to the viewport, flips on overflow."
636
713
  }
637
- }
714
+ },
715
+ "keyboard": "ArrowUp/Down wrap over enabled items (labels, separators, disabled skipped), Home/End, typeahead, Enter/Space."
638
716
  },
639
717
  "DropdownItem": {
640
718
  "import": "import { DropdownItem } from '@overdoser/react-toolkit'",
@@ -645,9 +723,51 @@
645
723
  "disabled": {
646
724
  "type": "boolean",
647
725
  "default": false
726
+ },
727
+ "danger": {
728
+ "type": "boolean",
729
+ "default": false
730
+ },
731
+ "icon": {
732
+ "type": "ReactNode",
733
+ "notes": "Leading slot, aria-hidden."
734
+ },
735
+ "shortcut": {
736
+ "type": "ReactNode",
737
+ "notes": "Trailing hint, aria-hidden; pass <Kbd>."
738
+ },
739
+ "description": {
740
+ "type": "ReactNode",
741
+ "notes": "Muted second line."
742
+ },
743
+ "checked": {
744
+ "type": "boolean",
745
+ "notes": "When defined: role=menuitemcheckbox + aria-checked + check slot."
746
+ },
747
+ "closeOnSelect": {
748
+ "type": "boolean",
749
+ "notes": "Default true for action items, false for checkable ones."
750
+ },
751
+ "classes": {
752
+ "type": "Partial<Pick<DropdownClasses, 'item' | 'itemIcon' | 'itemLabel' | 'itemDescription' | 'itemShortcut' | 'itemCheck'>>"
648
753
  }
649
754
  }
650
755
  },
756
+ "DropdownSeparator": {
757
+ "import": "import { DropdownSeparator } from '@overdoser/react-toolkit'",
758
+ "element": "div[role=separator]",
759
+ "forwardsRef": true,
760
+ "extendsNativeProps": "div",
761
+ "props": {}
762
+ },
763
+ "DropdownLabel": {
764
+ "import": "import { DropdownLabel } from '@overdoser/react-toolkit'",
765
+ "element": "div[role=presentation]",
766
+ "forwardsRef": true,
767
+ "extendsNativeProps": "div",
768
+ "props": {},
769
+ "behavior": "Non-interactive section heading inside a menu."
770
+ },
651
771
  "SplitButton": {
652
772
  "import": "import { SplitButton, type SplitButtonAction } from '@overdoser/react-toolkit'",
653
773
  "element": "div",
@@ -786,7 +906,7 @@
786
906
  "outside click",
787
907
  "Escape"
788
908
  ],
789
- "childrenTyped": "never \u2014 pass via `content` prop"
909
+ "childrenTyped": "never — pass via `content` prop"
790
910
  }
791
911
  },
792
912
  "Draggable": {
@@ -845,10 +965,180 @@
845
965
  }
846
966
  }
847
967
  },
968
+ "SplitPane": {
969
+ "import": "import { SplitPane } from '@overdoser/react-toolkit'",
970
+ "element": "div with two panes and a div[role=separator] handle",
971
+ "forwardsRef": true,
972
+ "extendsNativeProps": "div (without children)",
973
+ "props": {
974
+ "children": {
975
+ "type": "[ReactNode, ReactNode]",
976
+ "required": true
977
+ },
978
+ "direction": {
979
+ "type": "'horizontal' | 'vertical'",
980
+ "default": "horizontal"
981
+ },
982
+ "primary": {
983
+ "type": "'first' | 'second'",
984
+ "default": "first"
985
+ },
986
+ "size": {
987
+ "type": "number | string",
988
+ "notes": "Controlled px or '30%'."
989
+ },
990
+ "defaultSize": {
991
+ "type": "number | string",
992
+ "default": "50%"
993
+ },
994
+ "onSizeChange": {
995
+ "type": "(px: number) => void"
996
+ },
997
+ "minSize": {
998
+ "type": "number",
999
+ "default": 100
1000
+ },
1001
+ "maxSize": {
1002
+ "type": "number",
1003
+ "notes": "Default container − minSecondarySize − handle."
1004
+ },
1005
+ "minSecondarySize": {
1006
+ "type": "number",
1007
+ "default": 100
1008
+ },
1009
+ "collapsible": {
1010
+ "type": "boolean",
1011
+ "default": false
1012
+ },
1013
+ "collapsed": {
1014
+ "type": "boolean"
1015
+ },
1016
+ "defaultCollapsed": {
1017
+ "type": "boolean",
1018
+ "default": false
1019
+ },
1020
+ "onCollapsedChange": {
1021
+ "type": "(collapsed: boolean) => void"
1022
+ },
1023
+ "persistKey": {
1024
+ "type": "string",
1025
+ "notes": "localStorage via usePersistedState."
1026
+ },
1027
+ "handleSize": {
1028
+ "type": "number",
1029
+ "default": 6
1030
+ },
1031
+ "handleLabel": {
1032
+ "type": "string",
1033
+ "default": "Resize"
1034
+ },
1035
+ "disabled": {
1036
+ "type": "boolean",
1037
+ "default": false
1038
+ },
1039
+ "classes": {
1040
+ "type": "Partial<SplitPaneClasses>",
1041
+ "shape": [
1042
+ "root",
1043
+ "pane",
1044
+ "primary",
1045
+ "secondary",
1046
+ "handle",
1047
+ "handleActive",
1048
+ "collapsed"
1049
+ ]
1050
+ }
1051
+ },
1052
+ "keyboard": "Arrows ±16px (Shift ×10), Home/End, double-click resets / toggles collapse."
1053
+ },
1054
+ "ImageViewer": {
1055
+ "import": "import { ImageViewer, useZoomPan } from '@overdoser/react-toolkit'",
1056
+ "element": "portaled div[role=dialog][aria-modal]",
1057
+ "forwardsRef": true,
1058
+ "props": {
1059
+ "open": {
1060
+ "type": "boolean",
1061
+ "required": true
1062
+ },
1063
+ "onClose": {
1064
+ "type": "() => void",
1065
+ "required": true
1066
+ },
1067
+ "items": {
1068
+ "type": "{ src: string; alt?: string; thumbnail?: string; caption?: ReactNode; download?: string | boolean }[]",
1069
+ "required": true
1070
+ },
1071
+ "index": {
1072
+ "type": "number",
1073
+ "notes": "Controlled."
1074
+ },
1075
+ "defaultIndex": {
1076
+ "type": "number",
1077
+ "default": 0
1078
+ },
1079
+ "onIndexChange": {
1080
+ "type": "(index: number) => void"
1081
+ },
1082
+ "loop": {
1083
+ "type": "boolean",
1084
+ "default": true
1085
+ },
1086
+ "showCounter": {
1087
+ "type": "boolean",
1088
+ "default": true
1089
+ },
1090
+ "showThumbnails": {
1091
+ "type": "boolean",
1092
+ "default": false
1093
+ },
1094
+ "showZoomControls": {
1095
+ "type": "boolean",
1096
+ "default": true
1097
+ },
1098
+ "showDownload": {
1099
+ "type": "boolean",
1100
+ "notes": "Default: when the item has download."
1101
+ },
1102
+ "renderSlide": {
1103
+ "type": "(item, { index, active }) => ReactNode"
1104
+ },
1105
+ "closeOnBackdrop": {
1106
+ "type": "boolean",
1107
+ "default": true
1108
+ },
1109
+ "zoom": {
1110
+ "type": "Partial<UseZoomPanOptions>",
1111
+ "notes": "{ minScale 1, maxScale 8, step 0.5, wheel true, doubleClickToggle true }"
1112
+ },
1113
+ "labels": {
1114
+ "type": "Partial<ImageViewerLabels>"
1115
+ },
1116
+ "classes": {
1117
+ "type": "Partial<ImageViewerClasses>",
1118
+ "shape": [
1119
+ "root",
1120
+ "backdrop",
1121
+ "toolbar",
1122
+ "counter",
1123
+ "stage",
1124
+ "image",
1125
+ "caption",
1126
+ "nav",
1127
+ "navPrev",
1128
+ "navNext",
1129
+ "thumbnails",
1130
+ "thumbnail",
1131
+ "thumbnailActive",
1132
+ "zoomControls"
1133
+ ]
1134
+ }
1135
+ },
1136
+ "keyboard": "Escape, ArrowLeft/Right, + / - / 0; swipe at scale 1; wheel/pinch/double-click zoom."
1137
+ },
848
1138
  "Toast": {
849
1139
  "import": "import { ToastProvider, toast, useToast } from '@overdoser/react-toolkit'",
850
1140
  "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.",
1141
+ "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
1142
  "standaloneTrigger": {
853
1143
  "name": "toast",
854
1144
  "signature": "toast(options: ToastOptions): string",
@@ -1014,42 +1304,951 @@
1014
1304
  "shape": [
1015
1305
  "root",
1016
1306
  "icon",
1017
- "content",
1018
- "title",
1019
- "message",
1020
- "close"
1307
+ "content",
1308
+ "title",
1309
+ "message",
1310
+ "action",
1311
+ "close"
1312
+ ]
1313
+ },
1314
+ "action": {
1315
+ "type": "ReactNode",
1316
+ "notes": "Slot after the message (Retry/Undo). Right edge in banner layout."
1317
+ },
1318
+ "layout": {
1319
+ "type": "'inline' | 'banner'",
1320
+ "default": "inline",
1321
+ "notes": "banner = full-width strip, one row."
1322
+ },
1323
+ "size": {
1324
+ "type": "'sm' | 'md'",
1325
+ "default": "md"
1326
+ }
1327
+ }
1328
+ },
1329
+ "CodeBlock": {
1330
+ "import": "import { CodeBlock, Code } from '@overdoser/react-toolkit'",
1331
+ "element": "div > pre > code",
1332
+ "forwardsRef": true,
1333
+ "extendsNativeProps": "div (without children/title)",
1334
+ "props": {
1335
+ "code": {
1336
+ "type": "string",
1337
+ "notes": "Source; exactly what is copied. children (string) is an alias."
1338
+ },
1339
+ "language": {
1340
+ "type": "string",
1341
+ "notes": "Header label + data-language + language-<x> class."
1342
+ },
1343
+ "title": {
1344
+ "type": "ReactNode"
1345
+ },
1346
+ "showCopy": {
1347
+ "type": "boolean",
1348
+ "default": true
1349
+ },
1350
+ "copyPlacement": {
1351
+ "type": "'floating' | 'header'",
1352
+ "default": "floating"
1353
+ },
1354
+ "onCopied": {
1355
+ "type": "(text: string) => void"
1356
+ },
1357
+ "wrap": {
1358
+ "type": "boolean",
1359
+ "default": false
1360
+ },
1361
+ "showWrapToggle": {
1362
+ "type": "boolean",
1363
+ "default": false
1364
+ },
1365
+ "lineNumbers": {
1366
+ "type": "boolean",
1367
+ "default": false
1368
+ },
1369
+ "startLine": {
1370
+ "type": "number",
1371
+ "default": 1
1372
+ },
1373
+ "highlightLines": {
1374
+ "type": "number[]"
1375
+ },
1376
+ "maxHeight": {
1377
+ "type": "number | string"
1378
+ },
1379
+ "size": {
1380
+ "type": "'sm' | 'md'",
1381
+ "default": "md"
1382
+ },
1383
+ "highlight": {
1384
+ "type": "(code: string) => ReactNode",
1385
+ "notes": "Plug-in highlighter."
1386
+ },
1387
+ "classes": {
1388
+ "type": "Partial<CodeBlockClasses>",
1389
+ "shape": [
1390
+ "root",
1391
+ "header",
1392
+ "title",
1393
+ "language",
1394
+ "actions",
1395
+ "pre",
1396
+ "code",
1397
+ "line",
1398
+ "lineNumber",
1399
+ "lineHighlight",
1400
+ "copy",
1401
+ "wrapToggle"
1402
+ ]
1403
+ }
1404
+ }
1405
+ },
1406
+ "Code": {
1407
+ "import": "import { Code } from '@overdoser/react-toolkit'",
1408
+ "element": "code",
1409
+ "forwardsRef": true,
1410
+ "extendsNativeProps": "code",
1411
+ "props": {
1412
+ "classes": {
1413
+ "type": "Partial<CodeClasses>",
1414
+ "shape": [
1415
+ "root"
1416
+ ]
1417
+ }
1418
+ }
1419
+ },
1420
+ "Badge": {
1421
+ "import": "import { Badge } from '@overdoser/react-toolkit'",
1422
+ "element": "span",
1423
+ "forwardsRef": true,
1424
+ "extendsNativeProps": "span",
1425
+ "props": {
1426
+ "variant": {
1427
+ "type": "'neutral' | 'primary' | 'success' | 'warning' | 'danger'",
1428
+ "default": "neutral"
1429
+ },
1430
+ "appearance": {
1431
+ "type": "'soft' | 'solid' | 'outline'",
1432
+ "default": "soft"
1433
+ },
1434
+ "size": {
1435
+ "type": "'sm' | 'md' | 'lg'",
1436
+ "default": "md"
1437
+ },
1438
+ "dot": {
1439
+ "type": "boolean",
1440
+ "default": false,
1441
+ "notes": "Leading status dot."
1442
+ },
1443
+ "classes": {
1444
+ "type": "Partial<BadgeClasses>",
1445
+ "shape": [
1446
+ "root",
1447
+ "dot"
1448
+ ]
1449
+ }
1450
+ }
1451
+ },
1452
+ "StatusDot": {
1453
+ "import": "import { StatusDot } from '@overdoser/react-toolkit'",
1454
+ "element": "span",
1455
+ "forwardsRef": true,
1456
+ "extendsNativeProps": "span (color retyped)",
1457
+ "props": {
1458
+ "status": {
1459
+ "type": "'success' | 'warning' | 'danger' | 'info' | 'neutral'",
1460
+ "default": "neutral"
1461
+ },
1462
+ "pulse": {
1463
+ "type": "boolean",
1464
+ "default": false,
1465
+ "notes": "Expanding ring animation; off under prefers-reduced-motion."
1466
+ },
1467
+ "label": {
1468
+ "type": "ReactNode",
1469
+ "notes": "Text after the dot. Without it pass aria-label (sets role=img)."
1470
+ },
1471
+ "size": {
1472
+ "type": "'sm' | 'md' | 'lg'",
1473
+ "default": "md"
1474
+ },
1475
+ "color": {
1476
+ "type": "string",
1477
+ "notes": "Any CSS colour; overrides the status colour."
1478
+ },
1479
+ "classes": {
1480
+ "type": "Partial<StatusDotClasses>",
1481
+ "shape": [
1482
+ "root",
1483
+ "dot",
1484
+ "label"
1485
+ ]
1486
+ }
1487
+ }
1488
+ },
1489
+ "ThemeToggle": {
1490
+ "import": "import { ThemeToggle } from '@overdoser/react-toolkit'",
1491
+ "element": "button (icon) or div[role=radiogroup] (segmented)",
1492
+ "forwardsRef": true,
1493
+ "extendsNativeProps": "button",
1494
+ "props": {
1495
+ "variant": {
1496
+ "type": "'icon' | 'segmented'",
1497
+ "default": "icon"
1498
+ },
1499
+ "allowSystem": {
1500
+ "type": "boolean",
1501
+ "default": true
1502
+ },
1503
+ "size": {
1504
+ "type": "'sm' | 'md'",
1505
+ "default": "md"
1506
+ },
1507
+ "showLabel": {
1508
+ "type": "boolean",
1509
+ "default": false
1510
+ },
1511
+ "labels": {
1512
+ "type": "Partial<Record<'light' | 'dark' | 'system', string>>"
1513
+ },
1514
+ "storageKey": {
1515
+ "type": "string",
1516
+ "default": "crk-theme"
1517
+ },
1518
+ "classes": {
1519
+ "type": "Partial<ThemeToggleClasses>",
1520
+ "shape": [
1521
+ "root",
1522
+ "icon",
1523
+ "label",
1524
+ "option",
1525
+ "optionSelected"
1526
+ ]
1527
+ }
1528
+ }
1529
+ },
1530
+ "Kbd": {
1531
+ "import": "import { Kbd } from '@overdoser/react-toolkit'",
1532
+ "element": "kbd",
1533
+ "forwardsRef": true,
1534
+ "extendsNativeProps": "kbd",
1535
+ "props": {
1536
+ "size": {
1537
+ "type": "'sm' | 'md'",
1538
+ "default": "md"
1539
+ },
1540
+ "keys": {
1541
+ "type": "string[]",
1542
+ "notes": "Combination: each key in its own inner <kbd>, joined by an aria-hidden '+'. Overrides children."
1543
+ },
1544
+ "classes": {
1545
+ "type": "Partial<KbdClasses>",
1546
+ "shape": [
1547
+ "root",
1548
+ "key",
1549
+ "separator"
1550
+ ]
1551
+ }
1552
+ }
1553
+ },
1554
+ "EmptyState": {
1555
+ "import": "import { EmptyState } from '@overdoser/react-toolkit'",
1556
+ "element": "div (role=alert when variant=error)",
1557
+ "forwardsRef": true,
1558
+ "extendsNativeProps": "div (without title)",
1559
+ "props": {
1560
+ "variant": {
1561
+ "type": "'empty' | 'error'",
1562
+ "default": "empty"
1563
+ },
1564
+ "icon": {
1565
+ "type": "ReactNode | false",
1566
+ "notes": "Default: built-in SVG per variant. false hides it."
1567
+ },
1568
+ "title": {
1569
+ "type": "ReactNode"
1570
+ },
1571
+ "description": {
1572
+ "type": "ReactNode"
1573
+ },
1574
+ "action": {
1575
+ "type": "ReactNode",
1576
+ "notes": "Slot under the description — pass a Button."
1577
+ },
1578
+ "children": {
1579
+ "type": "ReactNode",
1580
+ "notes": "Extra content between description and action."
1581
+ },
1582
+ "size": {
1583
+ "type": "'sm' | 'md' | 'lg'",
1584
+ "default": "md"
1585
+ },
1586
+ "bordered": {
1587
+ "type": "boolean",
1588
+ "default": false,
1589
+ "notes": "Dashed frame with subtle background."
1590
+ },
1591
+ "classes": {
1592
+ "type": "Partial<EmptyStateClasses>",
1593
+ "shape": [
1594
+ "root",
1595
+ "icon",
1596
+ "title",
1597
+ "description",
1598
+ "action"
1599
+ ]
1600
+ }
1601
+ },
1602
+ "behavior": "Use as Table emptyMessage too."
1603
+ },
1604
+ "ProgressBar": {
1605
+ "import": "import { ProgressBar } from '@overdoser/react-toolkit'",
1606
+ "element": "div root; inner track is role=progressbar",
1607
+ "forwardsRef": true,
1608
+ "extendsNativeProps": "div (without children)",
1609
+ "props": {
1610
+ "value": {
1611
+ "type": "number",
1612
+ "notes": "Clamped to [0, max]. Omit for indeterminate."
1613
+ },
1614
+ "max": {
1615
+ "type": "number",
1616
+ "default": 100
1617
+ },
1618
+ "label": {
1619
+ "type": "ReactNode",
1620
+ "notes": "Above the bar, left. A string also becomes the track aria-label."
1621
+ },
1622
+ "showValue": {
1623
+ "type": "boolean",
1624
+ "default": false
1625
+ },
1626
+ "formatValue": {
1627
+ "type": "(value: number, max: number) => ReactNode",
1628
+ "notes": "Default '42%'."
1629
+ },
1630
+ "size": {
1631
+ "type": "'sm' | 'md' | 'lg'",
1632
+ "default": "md"
1633
+ },
1634
+ "variant": {
1635
+ "type": "'primary' | 'success' | 'warning' | 'danger' | 'neutral'",
1636
+ "default": "primary"
1637
+ },
1638
+ "thresholds": {
1639
+ "type": "{ value: number; variant: ProgressBarVariant }[]",
1640
+ "notes": "Highest threshold value <= current wins; below all, `variant` applies."
1641
+ },
1642
+ "segments": {
1643
+ "type": "number",
1644
+ "notes": "> 1 renders N discrete blocks filled from the left."
1645
+ },
1646
+ "classes": {
1647
+ "type": "Partial<ProgressBarClasses>",
1648
+ "shape": [
1649
+ "root",
1650
+ "header",
1651
+ "label",
1652
+ "value",
1653
+ "track",
1654
+ "fill",
1655
+ "segment",
1656
+ "segmentFilled",
1657
+ "segmentCurrent"
1658
+ ]
1659
+ },
1660
+ "showCurrent": {
1661
+ "type": "boolean",
1662
+ "default": false,
1663
+ "notes": "Segmented only: segment after the last filled one gets a mid shade (done / current / remaining)."
1664
+ },
1665
+ "shape": {
1666
+ "type": "'rounded' | 'square'",
1667
+ "default": "rounded"
1668
+ }
1669
+ }
1670
+ },
1671
+ "Card": {
1672
+ "import": "import { Card } from '@overdoser/react-toolkit'",
1673
+ "element": "div, or a when href",
1674
+ "forwardsRef": true,
1675
+ "extendsNativeProps": "div (+ href/target/rel)",
1676
+ "props": {
1677
+ "variant": {
1678
+ "type": "'outlined' | 'elevated' | 'filled'",
1679
+ "default": "outlined"
1680
+ },
1681
+ "padding": {
1682
+ "type": "'none' | 'sm' | 'md' | 'lg'",
1683
+ "default": "md",
1684
+ "notes": "Sets --crk-card-padding used by the slots."
1685
+ },
1686
+ "interactive": {
1687
+ "type": "boolean",
1688
+ "default": false,
1689
+ "notes": "Hover lift + focus ring; with onClick and no href the card is a keyboard-operable role=button. Implied by href."
1690
+ },
1691
+ "selected": {
1692
+ "type": "boolean",
1693
+ "default": false
1694
+ },
1695
+ "accent": {
1696
+ "type": "string",
1697
+ "notes": "3px left stripe in that CSS colour."
1698
+ },
1699
+ "href": {
1700
+ "type": "string",
1701
+ "notes": "Render as an anchor."
1702
+ },
1703
+ "classes": {
1704
+ "type": "Partial<CardClasses>",
1705
+ "shape": [
1706
+ "root",
1707
+ "header",
1708
+ "title",
1709
+ "subtitle",
1710
+ "actions",
1711
+ "body",
1712
+ "footer"
1713
+ ]
1714
+ }
1715
+ },
1716
+ "compound": {
1717
+ "Card.Header": {
1718
+ "title": "ReactNode",
1719
+ "subtitle": "ReactNode",
1720
+ "actions": "ReactNode (right-aligned slot)",
1721
+ "divider": "boolean (default false)"
1722
+ },
1723
+ "Card.Title": {
1724
+ "as": "'h2' | 'h3' | 'h4' | 'div' (default h3)"
1725
+ },
1726
+ "Card.Body": {},
1727
+ "Card.Footer": {
1728
+ "align": "'start' | 'end' | 'between' (default end)",
1729
+ "divider": "boolean (default false)"
1730
+ }
1731
+ },
1732
+ "behavior": "A Body after a Header (or a Footer after a Body/Header) drops its top padding unless the preceding slot has divider."
1733
+ },
1734
+ "RelativeTime": {
1735
+ "import": "import { RelativeTime } from '@overdoser/react-toolkit'",
1736
+ "element": "time (dateTime set; absolute time as title)",
1737
+ "forwardsRef": true,
1738
+ "extendsNativeProps": "time (without children/title)",
1739
+ "props": {
1740
+ "value": {
1741
+ "type": "Date | number | string",
1742
+ "required": true
1743
+ },
1744
+ "format": {
1745
+ "type": "'long' | 'short' | 'narrow'",
1746
+ "default": "long"
1747
+ },
1748
+ "numeric": {
1749
+ "type": "'always' | 'auto'",
1750
+ "default": "auto"
1751
+ },
1752
+ "locale": {
1753
+ "type": "string"
1754
+ },
1755
+ "live": {
1756
+ "type": "boolean",
1757
+ "default": true,
1758
+ "notes": "1s under a minute, 30s under an hour, then 1min; one shared timer per period."
1759
+ },
1760
+ "now": {
1761
+ "type": "number",
1762
+ "notes": "Fixed reference instant; disables ticking."
1763
+ },
1764
+ "maxAge": {
1765
+ "type": "number",
1766
+ "notes": "Past this many ms, show the absolute date."
1767
+ },
1768
+ "absoluteFormat": {
1769
+ "type": "Intl.DateTimeFormatOptions",
1770
+ "default": "{ dateStyle: 'medium', timeStyle: 'short' }"
1771
+ },
1772
+ "title": {
1773
+ "type": "boolean | string",
1774
+ "default": true
1775
+ },
1776
+ "fallback": {
1777
+ "type": "ReactNode",
1778
+ "default": "—"
1779
+ },
1780
+ "classes": {
1781
+ "type": "Partial<RelativeTimeClasses>",
1782
+ "shape": [
1783
+ "root"
1784
+ ]
1785
+ }
1786
+ }
1787
+ },
1788
+ "SegmentedControl": {
1789
+ "import": "import { SegmentedControl } from '@overdoser/react-toolkit'",
1790
+ "element": "div[role=radiogroup] of button[role=radio]; div[role=group] of anchors when options have href",
1791
+ "forwardsRef": true,
1792
+ "props": {
1793
+ "options": {
1794
+ "type": "{ value: T; label?: ReactNode; icon?: ReactNode; disabled?: boolean; tooltip?: ReactNode; count?: number | string; href?: string; 'aria-label'?: string }[]",
1795
+ "required": true
1796
+ },
1797
+ "value": {
1798
+ "type": "T",
1799
+ "notes": "Controlled."
1800
+ },
1801
+ "defaultValue": {
1802
+ "type": "T"
1803
+ },
1804
+ "onChange": {
1805
+ "type": "(value: T) => void"
1806
+ },
1807
+ "size": {
1808
+ "type": "'sm' | 'md' | 'lg'",
1809
+ "default": "md"
1810
+ },
1811
+ "shape": {
1812
+ "type": "'pill' | 'rounded' | 'square'",
1813
+ "default": "rounded"
1814
+ },
1815
+ "variant": {
1816
+ "type": "'filled' | 'outlined'",
1817
+ "default": "filled"
1818
+ },
1819
+ "fullWidth": {
1820
+ "type": "boolean",
1821
+ "default": false
1822
+ },
1823
+ "disabled": {
1824
+ "type": "boolean",
1825
+ "default": false
1826
+ },
1827
+ "classes": {
1828
+ "type": "Partial<SegmentedControlClasses>",
1829
+ "shape": [
1830
+ "root",
1831
+ "item",
1832
+ "itemSelected",
1833
+ "icon",
1834
+ "label",
1835
+ "count"
1836
+ ]
1837
+ }
1838
+ },
1839
+ "keyboard": "Arrows move selection + focus (wrap, skip disabled); Home/End.",
1840
+ "behavior": "Single-select only; multi-select = CheckboxGroup variant=chips."
1841
+ },
1842
+ "Chip": {
1843
+ "import": "import { Chip } from '@overdoser/react-toolkit'",
1844
+ "element": "button, or span[role=button] when clickable + removable, or span",
1845
+ "forwardsRef": true,
1846
+ "extendsNativeProps": "button (without color/type)",
1847
+ "props": {
1848
+ "icon": {
1849
+ "type": "ReactNode"
1850
+ },
1851
+ "avatar": {
1852
+ "type": "ReactNode"
1853
+ },
1854
+ "onRemove": {
1855
+ "type": "() => void",
1856
+ "notes": "Trailing × button; Backspace/Delete on the focused chip."
1857
+ },
1858
+ "removeLabel": {
1859
+ "type": "string",
1860
+ "default": "Remove"
1861
+ },
1862
+ "selected": {
1863
+ "type": "boolean",
1864
+ "notes": "When defined the chip is a toggle (aria-pressed)."
1865
+ },
1866
+ "onSelectedChange": {
1867
+ "type": "(next: boolean) => void"
1868
+ },
1869
+ "disabled": {
1870
+ "type": "boolean",
1871
+ "default": false
1872
+ },
1873
+ "color": {
1874
+ "type": "'neutral' | 'primary' | 'success' | 'warning' | 'danger'",
1875
+ "default": "neutral"
1876
+ },
1877
+ "appearance": {
1878
+ "type": "'soft' | 'outline'",
1879
+ "default": "soft"
1880
+ },
1881
+ "size": {
1882
+ "type": "'sm' | 'md'",
1883
+ "default": "md"
1884
+ },
1885
+ "shape": {
1886
+ "type": "'pill' | 'rounded'",
1887
+ "default": "pill"
1888
+ },
1889
+ "classes": {
1890
+ "type": "Partial<ChipClasses>",
1891
+ "shape": [
1892
+ "root",
1893
+ "icon",
1894
+ "avatar",
1895
+ "label",
1896
+ "remove"
1897
+ ]
1898
+ }
1899
+ },
1900
+ "behavior": "Interactive tag; Badge is the read-only pill."
1901
+ },
1902
+ "ChipGroup": {
1903
+ "import": "import { ChipGroup } from '@overdoser/react-toolkit'",
1904
+ "element": "div[role=group]",
1905
+ "forwardsRef": true,
1906
+ "extendsNativeProps": "div",
1907
+ "props": {
1908
+ "max": {
1909
+ "type": "number",
1910
+ "notes": "Show at most N chips, then a +N overflow chip."
1911
+ },
1912
+ "overflowLabel": {
1913
+ "type": "(hidden: number) => ReactNode",
1914
+ "default": "+N"
1915
+ },
1916
+ "onOverflowClick": {
1917
+ "type": "() => void"
1918
+ },
1919
+ "expandable": {
1920
+ "type": "boolean",
1921
+ "default": false
1922
+ },
1923
+ "collapseLabel": {
1924
+ "type": "ReactNode",
1925
+ "default": "Show less"
1926
+ },
1927
+ "gap": {
1928
+ "type": "'sm' | 'md'",
1929
+ "default": "sm"
1930
+ },
1931
+ "wrap": {
1932
+ "type": "boolean",
1933
+ "default": true
1934
+ },
1935
+ "classes": {
1936
+ "type": "Partial<ChipGroupClasses>",
1937
+ "shape": [
1938
+ "root",
1939
+ "overflow"
1940
+ ]
1941
+ }
1942
+ }
1943
+ },
1944
+ "PageHeader": {
1945
+ "import": "import { PageHeader } from '@overdoser/react-toolkit'",
1946
+ "element": "header",
1947
+ "forwardsRef": true,
1948
+ "extendsNativeProps": "header (without title)",
1949
+ "props": {
1950
+ "title": {
1951
+ "type": "ReactNode",
1952
+ "required": true
1953
+ },
1954
+ "as": {
1955
+ "type": "'h1' | 'h2' | 'h3' | 'div'",
1956
+ "default": "h1"
1957
+ },
1958
+ "subtitle": {
1959
+ "type": "ReactNode"
1960
+ },
1961
+ "description": {
1962
+ "type": "ReactNode"
1963
+ },
1964
+ "meta": {
1965
+ "type": "ReactNode"
1966
+ },
1967
+ "badge": {
1968
+ "type": "ReactNode"
1969
+ },
1970
+ "actions": {
1971
+ "type": "ReactNode",
1972
+ "notes": "Right-aligned slot."
1973
+ },
1974
+ "breadcrumbs": {
1975
+ "type": "ReactNode"
1976
+ },
1977
+ "backHref": {
1978
+ "type": "string"
1979
+ },
1980
+ "onBack": {
1981
+ "type": "() => void"
1982
+ },
1983
+ "backLabel": {
1984
+ "type": "string",
1985
+ "default": "Back"
1986
+ },
1987
+ "tabs": {
1988
+ "type": "ReactNode",
1989
+ "notes": "Bottom slot flush with the border, for Tabs.List."
1990
+ },
1991
+ "divider": {
1992
+ "type": "boolean",
1993
+ "default": true
1994
+ },
1995
+ "size": {
1996
+ "type": "'sm' | 'md' | 'lg'",
1997
+ "default": "md"
1998
+ },
1999
+ "sticky": {
2000
+ "type": "boolean",
2001
+ "default": false
2002
+ },
2003
+ "classes": {
2004
+ "type": "Partial<PageHeaderClasses>",
2005
+ "shape": [
2006
+ "root",
2007
+ "breadcrumbs",
2008
+ "back",
2009
+ "titleRow",
2010
+ "title",
2011
+ "badge",
2012
+ "subtitle",
2013
+ "description",
2014
+ "meta",
2015
+ "actions",
2016
+ "tabs"
2017
+ ]
2018
+ }
2019
+ }
2020
+ },
2021
+ "Accordion": {
2022
+ "import": "import { Accordion } from '@overdoser/react-toolkit'",
2023
+ "element": "div; triggers are button[aria-expanded] in headings; content is div[role=region]",
2024
+ "forwardsRef": true,
2025
+ "extendsNativeProps": "div (without onChange)",
2026
+ "props": {
2027
+ "type": {
2028
+ "type": "'single' | 'multiple'",
2029
+ "default": "single"
2030
+ },
2031
+ "value": {
2032
+ "type": "string | string[]",
2033
+ "notes": "Controlled: string (single) or string[] (multiple)."
2034
+ },
2035
+ "defaultValue": {
2036
+ "type": "string | string[]"
2037
+ },
2038
+ "onValueChange": {
2039
+ "type": "(value: string | string[]) => void"
2040
+ },
2041
+ "collapsible": {
2042
+ "type": "boolean",
2043
+ "default": true
2044
+ },
2045
+ "keepMounted": {
2046
+ "type": "boolean",
2047
+ "default": false
2048
+ },
2049
+ "variant": {
2050
+ "type": "'default' | 'bordered' | 'separated'",
2051
+ "default": "default"
2052
+ },
2053
+ "size": {
2054
+ "type": "'sm' | 'md'",
2055
+ "default": "md"
2056
+ },
2057
+ "disabled": {
2058
+ "type": "boolean",
2059
+ "default": false
2060
+ },
2061
+ "headingLevel": {
2062
+ "type": "2 | 3 | 4",
2063
+ "default": 3
2064
+ },
2065
+ "items": {
2066
+ "type": "{ value: string; title: ReactNode; content: ReactNode; disabled?: boolean }[]",
2067
+ "notes": "Data shorthand instead of children."
2068
+ },
2069
+ "classes": {
2070
+ "type": "Partial<AccordionClasses>",
2071
+ "shape": [
2072
+ "root",
2073
+ "item",
2074
+ "itemOpen",
2075
+ "header",
2076
+ "trigger",
2077
+ "icon",
2078
+ "content",
2079
+ "contentInner"
2080
+ ]
2081
+ }
2082
+ },
2083
+ "compound": {
2084
+ "Accordion.Item": {
2085
+ "value": "string (required)",
2086
+ "disabled": "boolean"
2087
+ },
2088
+ "Accordion.Trigger": {
2089
+ "icon": "ReactNode | false (default chevron)",
2090
+ "iconPosition": "'start' | 'end' (default end)"
2091
+ },
2092
+ "Accordion.Content": {}
2093
+ },
2094
+ "keyboard": "ArrowUp/Down wrap over triggers (skip disabled), Home/End, Enter/Space toggle."
2095
+ },
2096
+ "KeyValueList": {
2097
+ "import": "import { KeyValueList } from '@overdoser/react-toolkit'",
2098
+ "element": "dl > div > dt + dd",
2099
+ "forwardsRef": true,
2100
+ "extendsNativeProps": "dl (without children)",
2101
+ "props": {
2102
+ "items": {
2103
+ "type": "{ key?: string; label: ReactNode; value: ReactNode; copyable?: boolean | string; mono?: boolean; masked?: boolean; href?: string; hint?: ReactNode; empty?: ReactNode }[]",
2104
+ "required": true
2105
+ },
2106
+ "layout": {
2107
+ "type": "'rows' | 'grid' | 'inline'",
2108
+ "default": "rows"
2109
+ },
2110
+ "columns": {
2111
+ "type": "number",
2112
+ "default": 2,
2113
+ "notes": "grid only"
2114
+ },
2115
+ "labelWidth": {
2116
+ "type": "number | string",
2117
+ "default": "10rem",
2118
+ "notes": "rows only"
2119
+ },
2120
+ "size": {
2121
+ "type": "'sm' | 'md'",
2122
+ "default": "md"
2123
+ },
2124
+ "dividers": {
2125
+ "type": "boolean",
2126
+ "default": true
2127
+ },
2128
+ "emptyValue": {
2129
+ "type": "ReactNode",
2130
+ "default": "—"
2131
+ },
2132
+ "copyLabel": {
2133
+ "type": "string",
2134
+ "default": "Copy"
2135
+ },
2136
+ "revealLabels": {
2137
+ "type": "{ show: string; hide: string }",
2138
+ "default": "{ show: 'Show', hide: 'Hide' }"
2139
+ },
2140
+ "classes": {
2141
+ "type": "Partial<KeyValueListClasses>",
2142
+ "shape": [
2143
+ "root",
2144
+ "item",
2145
+ "label",
2146
+ "value",
2147
+ "hint",
2148
+ "actions",
2149
+ "copy",
2150
+ "reveal",
2151
+ "mono",
2152
+ "masked"
2153
+ ]
2154
+ }
2155
+ }
2156
+ },
2157
+ "StatCard": {
2158
+ "import": "import { StatCard } from '@overdoser/react-toolkit'",
2159
+ "element": "div, or a with href; role=button with onClick",
2160
+ "forwardsRef": true,
2161
+ "extendsNativeProps": "div (without title)",
2162
+ "props": {
2163
+ "label": {
2164
+ "type": "ReactNode",
2165
+ "required": true
2166
+ },
2167
+ "value": {
2168
+ "type": "ReactNode",
2169
+ "required": true
2170
+ },
2171
+ "unit": {
2172
+ "type": "ReactNode"
2173
+ },
2174
+ "delta": {
2175
+ "type": "number | { value: ReactNode; trend?: 'up' | 'down' | 'flat' }",
2176
+ "notes": "Number → ▲/▼ + formatted %, trend from sign."
2177
+ },
2178
+ "deltaFormat": {
2179
+ "type": "(n: number) => ReactNode"
2180
+ },
2181
+ "trendColor": {
2182
+ "type": "'auto' | 'positive-up' | 'positive-down' | 'none'",
2183
+ "default": "auto"
2184
+ },
2185
+ "deltaLabel": {
2186
+ "type": "ReactNode"
2187
+ },
2188
+ "icon": {
2189
+ "type": "ReactNode"
2190
+ },
2191
+ "chart": {
2192
+ "type": "ReactNode",
2193
+ "notes": "Pass <Sparkline>."
2194
+ },
2195
+ "footer": {
2196
+ "type": "ReactNode"
2197
+ },
2198
+ "href": {
2199
+ "type": "string"
2200
+ },
2201
+ "loading": {
2202
+ "type": "boolean",
2203
+ "default": false
2204
+ },
2205
+ "variant": {
2206
+ "type": "'outlined' | 'elevated' | 'filled'",
2207
+ "default": "outlined"
2208
+ },
2209
+ "size": {
2210
+ "type": "'sm' | 'md' | 'lg'",
2211
+ "default": "md"
2212
+ },
2213
+ "accent": {
2214
+ "type": "string"
2215
+ },
2216
+ "classes": {
2217
+ "type": "Partial<StatCardClasses>",
2218
+ "shape": [
2219
+ "root",
2220
+ "header",
2221
+ "label",
2222
+ "icon",
2223
+ "value",
2224
+ "unit",
2225
+ "delta",
2226
+ "deltaLabel",
2227
+ "chart",
2228
+ "footer"
1021
2229
  ]
1022
2230
  }
1023
2231
  }
1024
2232
  },
1025
- "Badge": {
1026
- "import": "import { Badge } from '@overdoser/react-toolkit'",
1027
- "element": "span",
2233
+ "StatGrid": {
2234
+ "import": "import { StatGrid } from '@overdoser/react-toolkit'",
2235
+ "element": "div",
1028
2236
  "forwardsRef": true,
1029
- "extendsNativeProps": "span",
2237
+ "extendsNativeProps": "div",
1030
2238
  "props": {
1031
- "variant": {
1032
- "type": "'neutral' | 'primary' | 'success' | 'warning' | 'danger'",
1033
- "default": "neutral"
1034
- },
1035
- "appearance": {
1036
- "type": "'soft' | 'solid' | 'outline'",
1037
- "default": "soft"
2239
+ "columns": {
2240
+ "type": "number | { sm?: number; md?: number; lg?: number }",
2241
+ "default": "{ sm: 1, md: 2, lg: 4 }",
2242
+ "notes": "Breakpoints 640 / 1024px."
1038
2243
  },
1039
- "size": {
2244
+ "gap": {
1040
2245
  "type": "'sm' | 'md' | 'lg'",
1041
2246
  "default": "md"
1042
2247
  },
1043
- "dot": {
1044
- "type": "boolean",
1045
- "default": false,
1046
- "notes": "Leading status dot."
1047
- },
1048
2248
  "classes": {
1049
- "type": "Partial<BadgeClasses>",
2249
+ "type": "Partial<StatGridClasses>",
1050
2250
  "shape": [
1051
- "root",
1052
- "dot"
2251
+ "root"
1053
2252
  ]
1054
2253
  }
1055
2254
  }
@@ -1170,11 +2369,11 @@
1170
2369
  },
1171
2370
  "width": {
1172
2371
  "type": "number | string",
1173
- "notes": "number \u2192 px; defaults to 100%."
2372
+ "notes": "number → px; defaults to 100%."
1174
2373
  },
1175
2374
  "height": {
1176
2375
  "type": "number | string",
1177
- "notes": "number \u2192 px; defaults per variant."
2376
+ "notes": "number → px; defaults per variant."
1178
2377
  },
1179
2378
  "animation": {
1180
2379
  "type": "'pulse' | 'wave' | 'none'",
@@ -1241,6 +2440,7 @@
1241
2440
  "backdrop",
1242
2441
  "drawer",
1243
2442
  "header",
2443
+ "headerTitle",
1244
2444
  "closeButton",
1245
2445
  "body",
1246
2446
  "footer"
@@ -1256,7 +2456,7 @@
1256
2456
  "content": {
1257
2457
  "type": "ReactNode",
1258
2458
  "required": true,
1259
- "notes": "Nullish/empty \u2192 never shows."
2459
+ "notes": "Nullish/empty → never shows."
1260
2460
  },
1261
2461
  "children": {
1262
2462
  "type": "ReactNode",
@@ -1415,7 +2615,7 @@
1415
2615
  "import": "import { Pagination } from '@overdoser/react-toolkit'",
1416
2616
  "element": "nav > ul",
1417
2617
  "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.",
2618
+ "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
2619
  "props": {
1420
2620
  "count": {
1421
2621
  "type": "number",
@@ -1486,7 +2686,7 @@
1486
2686
  "props": {
1487
2687
  "value": {
1488
2688
  "type": "number | [number, number]",
1489
- "notes": "Tuple \u2192 range slider."
2689
+ "notes": "Tuple → range slider."
1490
2690
  },
1491
2691
  "defaultValue": {
1492
2692
  "type": "number | [number, number]"
@@ -1661,7 +2861,7 @@
1661
2861
  "import": "import { DateTimePicker } from '@overdoser/react-toolkit'",
1662
2862
  "element": "div (ref) holding editable segment row (group of spinbuttons) + icon button + popover (calendar beside scrollable time columns)",
1663
2863
  "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.",
2864
+ "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
2865
  "props": {
1666
2866
  "value": {
1667
2867
  "type": "Date | null",
@@ -1698,7 +2898,7 @@
1698
2898
  "timeZone": {
1699
2899
  "type": "string",
1700
2900
  "default": "UTC",
1701
- "notes": "IANA zone, 'UTC', or 'system' (local). Unknown \u2192 warning + UTC."
2901
+ "notes": "IANA zone, 'UTC', or 'system' (local). Unknown → warning + UTC."
1702
2902
  },
1703
2903
  "showTimeZone": {
1704
2904
  "type": "boolean",
@@ -1855,7 +3055,7 @@
1855
3055
  },
1856
3056
  "value": {
1857
3057
  "type": "number",
1858
- "notes": "Controlled seconds \u2192 display-only (no internal clock)."
3058
+ "notes": "Controlled seconds → display-only (no internal clock)."
1859
3059
  },
1860
3060
  "autoStart": {
1861
3061
  "type": "boolean",
@@ -1889,7 +3089,7 @@
1889
3089
  "unitFormat": {
1890
3090
  "type": "'long' | 'short'",
1891
3091
  "default": "short",
1892
- "notes": "short \u2192 d/h/m/s; long \u2192 days/hours/minutes/seconds (fixed, no singular/plural)."
3092
+ "notes": "short → d/h/m/s; long → days/hours/minutes/seconds (fixed, no singular/plural)."
1893
3093
  },
1894
3094
  "unitLabels": {
1895
3095
  "type": "Partial<Record<TimerUnit, ReactNode | ((value: number) => ReactNode)>>",
@@ -1985,6 +3185,7 @@
1985
3185
  "backdrop",
1986
3186
  "modal",
1987
3187
  "header",
3188
+ "headerTitle",
1988
3189
  "closeButton",
1989
3190
  "body",
1990
3191
  "footer"
@@ -2000,7 +3201,7 @@
2000
3201
  },
2001
3202
  "onClose": {
2002
3203
  "type": "() => void",
2003
- "notes": "When set, renders an \u00d7 close button."
3204
+ "notes": "When set, renders an × close button."
2004
3205
  }
2005
3206
  }
2006
3207
  },
@@ -2027,6 +3228,199 @@
2027
3228
  "restores prior focus on close"
2028
3229
  ]
2029
3230
  },
3231
+ "ConfirmDialog": {
3232
+ "import": "import { ConfirmDialog, ConfirmProvider, useConfirm } from '@overdoser/react-toolkit'",
3233
+ "element": "Modal size=sm (div[role=dialog])",
3234
+ "forwardsRef": true,
3235
+ "props": {
3236
+ "open": {
3237
+ "type": "boolean",
3238
+ "required": true
3239
+ },
3240
+ "onConfirm": {
3241
+ "type": "() => void | Promise<void>",
3242
+ "required": true,
3243
+ "notes": "Promise → loading + locked; rejection shows the error and keeps it open. Never closes itself."
3244
+ },
3245
+ "onCancel": {
3246
+ "type": "() => void",
3247
+ "required": true
3248
+ },
3249
+ "title": {
3250
+ "type": "ReactNode",
3251
+ "default": "Are you sure?"
3252
+ },
3253
+ "description": {
3254
+ "type": "ReactNode"
3255
+ },
3256
+ "confirmLabel": {
3257
+ "type": "ReactNode",
3258
+ "default": "Confirm"
3259
+ },
3260
+ "cancelLabel": {
3261
+ "type": "ReactNode",
3262
+ "default": "Cancel"
3263
+ },
3264
+ "danger": {
3265
+ "type": "boolean",
3266
+ "default": false,
3267
+ "notes": "Danger confirm button, warning icon, focus on Cancel."
3268
+ },
3269
+ "requireText": {
3270
+ "type": "string",
3271
+ "notes": "Type-to-confirm gate."
3272
+ },
3273
+ "icon": {
3274
+ "type": "ReactNode | false",
3275
+ "notes": "Default: warning triangle when danger."
3276
+ },
3277
+ "autoFocus": {
3278
+ "type": "'confirm' | 'cancel'",
3279
+ "notes": "Default cancel when danger, else confirm."
3280
+ },
3281
+ "closeOnBackdrop": {
3282
+ "type": "boolean",
3283
+ "default": true
3284
+ },
3285
+ "errorMessage": {
3286
+ "type": "(err: unknown) => ReactNode"
3287
+ },
3288
+ "classes": {
3289
+ "type": "Partial<ConfirmDialogClasses>",
3290
+ "shape": [
3291
+ "modal",
3292
+ "header",
3293
+ "body",
3294
+ "description",
3295
+ "icon",
3296
+ "input",
3297
+ "error",
3298
+ "footer",
3299
+ "cancel",
3300
+ "confirm"
3301
+ ]
3302
+ }
3303
+ },
3304
+ "promiseApi": {
3305
+ "ConfirmProvider": "Mount once near the root; props children, defaults?: Partial<ConfirmOptions>.",
3306
+ "useConfirm": "() => (options?: ConfirmOptions) => Promise<boolean>. true after confirm (async onConfirm awaited, then closes), false on cancel/Escape/backdrop. Throws outside a provider.",
3307
+ "ConfirmOptions": "Omit<ConfirmDialogProps, 'open' | 'onConfirm' | 'onCancel' | 'children'> & { body?: ReactNode; onConfirm?: () => void | Promise<void> }"
3308
+ }
3309
+ },
3310
+ "CommandPalette": {
3311
+ "import": "import { CommandPalette, useCommandPalette } from '@overdoser/react-toolkit'",
3312
+ "element": "portaled div[role=dialog] with input[role=combobox] + div[role=listbox]",
3313
+ "forwardsRef": true,
3314
+ "itemShape": "{ id; label; keywords?; description?; icon?; shortcut?: string | string[]; group?; disabled?; onSelect?; href?; children?: CommandItem[] }",
3315
+ "props": {
3316
+ "open": {
3317
+ "type": "boolean",
3318
+ "required": true
3319
+ },
3320
+ "onOpenChange": {
3321
+ "type": "(open: boolean) => void",
3322
+ "required": true
3323
+ },
3324
+ "items": {
3325
+ "type": "CommandItem[]",
3326
+ "required": true
3327
+ },
3328
+ "onSelect": {
3329
+ "type": "(item: CommandItem) => void"
3330
+ },
3331
+ "closeOnSelect": {
3332
+ "type": "boolean",
3333
+ "default": true
3334
+ },
3335
+ "query": {
3336
+ "type": "string"
3337
+ },
3338
+ "defaultQuery": {
3339
+ "type": "string",
3340
+ "default": ""
3341
+ },
3342
+ "onQueryChange": {
3343
+ "type": "(query: string) => void"
3344
+ },
3345
+ "filter": {
3346
+ "type": "((item, query) => boolean | number) | null",
3347
+ "notes": "Default fuzzy; null = remote mode."
3348
+ },
3349
+ "loading": {
3350
+ "type": "boolean",
3351
+ "default": false
3352
+ },
3353
+ "loadingMessage": {
3354
+ "type": "ReactNode",
3355
+ "default": "Searching…"
3356
+ },
3357
+ "emptyMessage": {
3358
+ "type": "ReactNode",
3359
+ "default": "No results"
3360
+ },
3361
+ "placeholder": {
3362
+ "type": "string",
3363
+ "default": "Type a command or search…"
3364
+ },
3365
+ "hotkey": {
3366
+ "type": "string | false",
3367
+ "default": "mod+k"
3368
+ },
3369
+ "recentIds": {
3370
+ "type": "string[]"
3371
+ },
3372
+ "recentLabel": {
3373
+ "type": "ReactNode",
3374
+ "default": "Recent"
3375
+ },
3376
+ "maxResults": {
3377
+ "type": "number",
3378
+ "default": 50
3379
+ },
3380
+ "groupOrder": {
3381
+ "type": "string[]"
3382
+ },
3383
+ "footer": {
3384
+ "type": "ReactNode | null",
3385
+ "notes": "Default Kbd hints; null hides."
3386
+ },
3387
+ "escapeClearsQuery": {
3388
+ "type": "boolean",
3389
+ "default": false
3390
+ },
3391
+ "highlightMatches": {
3392
+ "type": "boolean",
3393
+ "default": true
3394
+ },
3395
+ "renderItem": {
3396
+ "type": "(item, { active, query }) => ReactNode"
3397
+ },
3398
+ "classes": {
3399
+ "type": "Partial<CommandPaletteClasses>",
3400
+ "shape": [
3401
+ "backdrop",
3402
+ "panel",
3403
+ "header",
3404
+ "breadcrumb",
3405
+ "input",
3406
+ "list",
3407
+ "group",
3408
+ "groupLabel",
3409
+ "item",
3410
+ "itemActive",
3411
+ "itemIcon",
3412
+ "itemLabel",
3413
+ "itemDescription",
3414
+ "itemShortcut",
3415
+ "empty",
3416
+ "loading",
3417
+ "footer",
3418
+ "match"
3419
+ ]
3420
+ }
3421
+ },
3422
+ "keyboard": "ArrowUp/Down wrap, Home/End, PageUp/Down ±10, Enter selects, Backspace on empty query pops a nested page, Escape closes."
3423
+ },
2030
3424
  "Form": {
2031
3425
  "import": "import { Form } from '@overdoser/react-toolkit'",
2032
3426
  "requires": "react-hook-form",
@@ -2115,7 +3509,7 @@
2115
3509
  "onValueChange": "Bridged to react-hook-form onChange (Select single, Dropdown).",
2116
3510
  "onValuesChange": "Bridged to react-hook-form onChange (Select multi).",
2117
3511
  "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."
3512
+ "values": "CheckboxGroup binds value:string[]/onChange(values) directly to the field — no bridge needed."
2119
3513
  }
2120
3514
  }
2121
3515
  },
@@ -2160,9 +3554,97 @@
2160
3554
  "root",
2161
3555
  "wrapper",
2162
3556
  "prefix",
2163
- "suffix"
3557
+ "suffix",
3558
+ "reveal",
3559
+ "clear"
3560
+ ]
3561
+ },
3562
+ "revealable": {
3563
+ "type": "boolean",
3564
+ "default": false,
3565
+ "notes": "type=password only: eye toggle switches password/text; focus stays in the field."
3566
+ },
3567
+ "revealed": {
3568
+ "type": "boolean",
3569
+ "notes": "Controlled reveal."
3570
+ },
3571
+ "onRevealedChange": {
3572
+ "type": "(revealed: boolean) => void"
3573
+ },
3574
+ "revealLabels": {
3575
+ "type": "{ show: string; hide: string }",
3576
+ "default": "{ show: 'Show password', hide: 'Hide password' }"
3577
+ },
3578
+ "clearable": {
3579
+ "type": "boolean",
3580
+ "default": false,
3581
+ "notes": "× button while there is a value; fires onChange with '' then onClear; hidden when disabled/readOnly."
3582
+ },
3583
+ "clearLabel": {
3584
+ "type": "string",
3585
+ "default": "Clear"
3586
+ },
3587
+ "onClear": {
3588
+ "type": "() => void"
3589
+ }
3590
+ }
3591
+ },
3592
+ "SearchInput": {
3593
+ "import": "import { SearchInput, formatHotkey } from '@overdoser/react-toolkit'",
3594
+ "element": "Input type=search (ref is the input)",
3595
+ "forwardsRef": true,
3596
+ "extendsNativeProps": "InputProps minus prefix/type/clearable",
3597
+ "props": {
3598
+ "onValueChange": {
3599
+ "type": "(value: string) => void",
3600
+ "notes": "Every keystroke; '' on clear."
3601
+ },
3602
+ "onSearch": {
3603
+ "type": "(value: string) => void",
3604
+ "notes": "Debounced; immediate on Enter; '' on clear; never on mount or twice with the same value."
3605
+ },
3606
+ "debounce": {
3607
+ "type": "number",
3608
+ "default": 300
3609
+ },
3610
+ "loading": {
3611
+ "type": "boolean",
3612
+ "default": false
3613
+ },
3614
+ "hotkey": {
3615
+ "type": "string | false",
3616
+ "default": false,
3617
+ "notes": "useKeyboard chord that focuses the field; Kbd hint while empty + unfocused."
3618
+ },
3619
+ "showHotkeyHint": {
3620
+ "type": "boolean",
3621
+ "default": true
3622
+ },
3623
+ "onEscape": {
3624
+ "type": "'clear' | 'blur' | 'none'",
3625
+ "default": "clear"
3626
+ },
3627
+ "searchLabel": {
3628
+ "type": "string",
3629
+ "default": "Search"
3630
+ },
3631
+ "classes": {
3632
+ "type": "Partial<SearchInputClasses>",
3633
+ "shape": [
3634
+ "root",
3635
+ "wrapper",
3636
+ "prefix",
3637
+ "suffix",
3638
+ "reveal",
3639
+ "clear",
3640
+ "icon",
3641
+ "spinner",
3642
+ "hint"
2164
3643
  ]
2165
3644
  }
3645
+ },
3646
+ "utils": {
3647
+ "formatHotkey": "(chord: string) => string — 'mod+k' → '⌘K' on macOS / 'Ctrl K' elsewhere."
2166
3648
  }
2167
3649
  },
2168
3650
  "Select": {
@@ -2171,7 +3653,7 @@
2171
3653
  "extendsNativeProps": "select (without value/onChange)",
2172
3654
  "forwardsRef": true,
2173
3655
  "modes": {
2174
- "native": "Default \u2014 wraps a native <select>.",
3656
+ "native": "Default — wraps a native <select>.",
2175
3657
  "searchable": "When `searchable=true`. Custom dropdown with text filter.",
2176
3658
  "multi": "When `multiple=true`. Chip-based multi with text filter."
2177
3659
  },
@@ -2250,7 +3732,7 @@
2250
3732
  "portal": {
2251
3733
  "type": "boolean",
2252
3734
  "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."
3735
+ "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
3736
  },
2255
3737
  "classes": {
2256
3738
  "type": "Partial<SelectClasses>",
@@ -2262,8 +3744,48 @@
2262
3744
  "menu",
2263
3745
  "item",
2264
3746
  "chip",
2265
- "chipRemove"
3747
+ "chipRemove",
3748
+ "spinner",
3749
+ "match",
3750
+ "message"
2266
3751
  ]
3752
+ },
3753
+ "onSearch": {
3754
+ "type": "(query: string) => void",
3755
+ "notes": "Remote mode (searchable/multi): no local filtering; debounced query, '' on open/clear, no duplicates."
3756
+ },
3757
+ "searchDebounce": {
3758
+ "type": "number",
3759
+ "default": 250
3760
+ },
3761
+ "minSearchLength": {
3762
+ "type": "number",
3763
+ "default": 0
3764
+ },
3765
+ "searchPrompt": {
3766
+ "type": "ReactNode",
3767
+ "default": "Type to search"
3768
+ },
3769
+ "loading": {
3770
+ "type": "boolean",
3771
+ "default": false
3772
+ },
3773
+ "loadingMessage": {
3774
+ "type": "ReactNode",
3775
+ "default": "Loading…"
3776
+ },
3777
+ "noResultsMessage": {
3778
+ "type": "ReactNode",
3779
+ "default": "No results"
3780
+ },
3781
+ "highlightMatches": {
3782
+ "type": "boolean",
3783
+ "default": false,
3784
+ "notes": "Local mode: matched substring wrapped in <mark>."
3785
+ },
3786
+ "selectedLabels": {
3787
+ "type": "Record<string, ReactNode>",
3788
+ "notes": "Fallback label per value when its option is absent from options."
2267
3789
  }
2268
3790
  }
2269
3791
  },
@@ -2286,6 +3808,11 @@
2286
3808
  "default": false,
2287
3809
  "notes": "Ignored when variant=switch."
2288
3810
  },
3811
+ "error": {
3812
+ "type": "boolean",
3813
+ "default": false,
3814
+ "notes": "Danger border. Set automatically by FormField when the field is invalid."
3815
+ },
2289
3816
  "classes": {
2290
3817
  "type": "Partial<CheckboxClasses>",
2291
3818
  "shape": [
@@ -2296,6 +3823,30 @@
2296
3823
  }
2297
3824
  }
2298
3825
  },
3826
+ "Switch": {
3827
+ "import": "import { Switch } from '@overdoser/react-toolkit'",
3828
+ "element": "input[type=checkbox] inside label",
3829
+ "extendsNativeProps": "input",
3830
+ "forwardsRef": true,
3831
+ "props": {
3832
+ "label": {
3833
+ "type": "ReactNode"
3834
+ },
3835
+ "error": {
3836
+ "type": "boolean",
3837
+ "default": false
3838
+ },
3839
+ "classes": {
3840
+ "type": "Partial<SwitchClasses>",
3841
+ "shape": [
3842
+ "root",
3843
+ "input",
3844
+ "label"
3845
+ ]
3846
+ }
3847
+ },
3848
+ "behavior": "Alias of <Checkbox variant='switch'>. Same a11y/form behaviour; binds in FormField for a boolean field."
3849
+ },
2299
3850
  "CheckboxGroup": {
2300
3851
  "import": "import { CheckboxGroup } from '@overdoser/react-toolkit'",
2301
3852
  "element": "div[role=group]",
@@ -2389,6 +3940,11 @@
2389
3940
  "label": {
2390
3941
  "type": "ReactNode"
2391
3942
  },
3943
+ "error": {
3944
+ "type": "boolean",
3945
+ "default": false,
3946
+ "notes": "Danger border. Also inherited from RadioGroup error."
3947
+ },
2392
3948
  "classes": {
2393
3949
  "type": "Partial<RadioClasses>",
2394
3950
  "shape": [
@@ -2398,11 +3954,12 @@
2398
3954
  ]
2399
3955
  }
2400
3956
  },
2401
- "behavior": "Inside a <RadioGroup>, name/checked/onChange come from context \u2014 do not pass them on Radio."
3957
+ "behavior": "Inside a <RadioGroup>, name/checked/onChange come from context — do not pass them on Radio."
2402
3958
  },
2403
3959
  "RadioGroup": {
2404
3960
  "import": "import { RadioGroup } from '@overdoser/react-toolkit'",
2405
3961
  "element": "div[role=radiogroup]",
3962
+ "forwardsRef": true,
2406
3963
  "props": {
2407
3964
  "name": {
2408
3965
  "type": "string",
@@ -2426,6 +3983,11 @@
2426
3983
  },
2427
3984
  "required": {
2428
3985
  "type": "boolean"
3986
+ },
3987
+ "error": {
3988
+ "type": "boolean",
3989
+ "default": false,
3990
+ "notes": "Applies error styling to every Radio inside. Set automatically by FormField."
2429
3991
  }
2430
3992
  }
2431
3993
  },
@@ -2492,7 +4054,7 @@
2492
4054
  "dots-colors": "dotColorKey (each row holds its own dot color)",
2493
4055
  "label": "showValues + valuePosition",
2494
4056
  "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)."
4057
+ "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
4058
  },
2497
4059
  "props": {
2498
4060
  "data": {
@@ -2524,7 +4086,7 @@
2524
4086
  "step"
2525
4087
  ],
2526
4088
  "default": "monotone",
2527
- "notes": "'step' is step-after \u2014 value holds until the next x."
4089
+ "notes": "'step' is step-after — value holds until the next x."
2528
4090
  },
2529
4091
  "showPoints": {
2530
4092
  "type": "boolean",
@@ -2628,7 +4190,7 @@
2628
4190
  "stacked-expand": "stacked + stackOffset='expand' (normalizes each row to 100%)",
2629
4191
  "gradient": "fillGradient",
2630
4192
  "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."
4193
+ "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
4194
  },
2633
4195
  "props": {
2634
4196
  "data": {
@@ -2677,7 +4239,7 @@
2677
4239
  "fillGradient": {
2678
4240
  "type": "boolean",
2679
4241
  "default": false,
2680
- "notes": "Per-series vertical linear gradient (opaque top \u2192 transparent bottom)."
4242
+ "notes": "Per-series vertical linear gradient (opaque top → transparent bottom)."
2681
4243
  },
2682
4244
  "showGrid": {
2683
4245
  "type": "boolean",
@@ -2742,7 +4304,7 @@
2742
4304
  "mixed": "colorBy='index' (+ optional colors)",
2743
4305
  "negative": "numeric values spanning zero; pair with negativeColor",
2744
4306
  "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)."
4307
+ "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
4308
  },
2747
4309
  "props": {
2748
4310
  "data": {
@@ -2816,7 +4378,7 @@
2816
4378
  "inside-start"
2817
4379
  ],
2818
4380
  "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."
4381
+ "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
4382
  },
2821
4383
  "renderLabel": {
2822
4384
  "type": "(args: { row, value, seriesKey, index }) => ReactNode",
@@ -2884,7 +4446,7 @@
2884
4446
  "donut": "innerRadius (number or 'NN%')",
2885
4447
  "legend": "showLegend (on by default)",
2886
4448
  "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.",
4449
+ "label": "showLabels (default content: name + percent). Outside labels get a leader line from slice → label by default; disable with showLabelLines=false.",
2888
4450
  "label-custom": "renderLabel (leader line still drawn unless showLabelLines=false)",
2889
4451
  "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
4452
  "donut-text": "innerRadius + centerLabel",
@@ -3012,7 +4574,7 @@
3012
4574
  "grid-circle-fill": "gridType='circle' (+ fillOpacity for the 'fill')",
3013
4575
  "grid-circle-no-lines": "gridType='circle' + showRadialLines={false}",
3014
4576
  "grid-fill": "defaults (filled polygon grid)",
3015
- "grid-custom": "override the grid via classes={{ grid: '\u2026' }} or theme tokens",
4577
+ "grid-custom": "override the grid via classes={{ grid: '…' }} or theme tokens",
3016
4578
  "grid-none": "showGrid={false} (+ usually showRadialLines={false})",
3017
4579
  "icons": "set `icon` on each entry in `config`",
3018
4580
  "label-custom": "renderAxisLabel",
@@ -3121,11 +4683,11 @@
3121
4683
  "unsubscribeBars": "(handle) => void"
3122
4684
  },
3123
4685
  "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)"
4686
+ "sma": "{ type: 'sma', period, color? } — overlay",
4687
+ "ema": "{ type: 'ema', period, color? } — overlay",
4688
+ "bollinger": "{ type: 'bollinger', period, stdDev?, color?, fillOpacity? } — overlay (filled band)",
4689
+ "rsi": "{ type: 'rsi', period?, color?, overbought?, oversold? } — sub-pane",
4690
+ "volume": "{ type: 'volume', upColor?, downColor? } — sub-pane (histogram)"
3129
4691
  },
3130
4692
  "props": {
3131
4693
  "datafeed": {
@@ -3143,7 +4705,7 @@
3143
4705
  },
3144
4706
  "period": {
3145
4707
  "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."
4708
+ "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
4709
  },
3148
4710
  "seriesType": {
3149
4711
  "type": "enum",
@@ -3226,7 +4788,7 @@
3226
4788
  "drag": "pan",
3227
4789
  "wheel": "zoom (cursor-anchored)",
3228
4790
  "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."
4791
+ "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
4792
  },
3231
4793
  "exportedHelpers": [
3232
4794
  "periodToSeconds",
@@ -3253,7 +4815,7 @@
3253
4815
  "import": "import { Sparkline } from '@overdoser/react-toolkit'",
3254
4816
  "element": "svg",
3255
4817
  "forwardsRef": true,
3256
- "behavior": "Inline trend line, fixed pixel size, no axes/legend/tooltip \u2014 for table cells and KPI tiles.",
4818
+ "behavior": "Inline trend line, fixed pixel size, no axes/legend/tooltip — for table cells and KPI tiles.",
3257
4819
  "props": {
3258
4820
  "data": {
3259
4821
  "type": "number[]",
@@ -3301,19 +4863,19 @@
3301
4863
  "import": "import { TraceTimeline } from '@overdoser/react-toolkit'",
3302
4864
  "element": "div",
3303
4865
  "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.",
4866
+ "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
4867
  "props": {
3306
4868
  "events": {
3307
4869
  "type": "TraceTimelineEvent[]",
3308
4870
  "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."
4871
+ "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
4872
  },
3311
4873
  "title": {
3312
4874
  "type": "ReactNode"
3313
4875
  },
3314
4876
  "meta": {
3315
4877
  "type": "ReactNode",
3316
- "notes": "Defaults to 'N events \u00b7 span \u00b7 times in UTC'."
4878
+ "notes": "Defaults to 'N events · span · times in UTC'."
3317
4879
  },
3318
4880
  "highlight": {
3319
4881
  "type": "string",
@@ -3321,7 +4883,7 @@
3321
4883
  },
3322
4884
  "services": {
3323
4885
  "type": "string[]",
3324
- "notes": "Seeds service\u2192color assignment order for stable colors across traces."
4886
+ "notes": "Seeds service→color assignment order for stable colors across traces."
3325
4887
  },
3326
4888
  "serviceColors": {
3327
4889
  "type": "Record<string, string>"
@@ -3373,12 +4935,12 @@
3373
4935
  "floating"
3374
4936
  ],
3375
4937
  "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."
4938
+ "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
4939
  },
3378
4940
  "showDock": {
3379
4941
  "type": "boolean",
3380
4942
  "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."
4943
+ "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
4944
  },
3383
4945
  "defaultDock": {
3384
4946
  "type": "'details' | 'log' | null",
@@ -3449,7 +5011,7 @@
3449
5011
  "import": "import { TraceEventDetails } from '@overdoser/react-toolkit'",
3450
5012
  "element": "div",
3451
5013
  "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).",
5014
+ "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
5015
  "props": {
3454
5016
  "event": {
3455
5017
  "type": "TraceTimelineEvent",
@@ -3520,7 +5082,7 @@
3520
5082
  },
3521
5083
  "tagColors": {
3522
5084
  "type": "Record<string, string>",
3523
- "notes": "Tag\u2192color overrides; unknown tags cycle the palette."
5085
+ "notes": "Tag→color overrides; unknown tags cycle the palette."
3524
5086
  },
3525
5087
  "showControls": {
3526
5088
  "type": "boolean",
@@ -3621,7 +5183,7 @@
3621
5183
  },
3622
5184
  "meta": {
3623
5185
  "type": "ReactNode",
3624
- "notes": "Defaults to 'N tasks \u00b7 span \u00b7 K running'."
5186
+ "notes": "Defaults to 'N tasks · span · K running'."
3625
5187
  },
3626
5188
  "highlight": {
3627
5189
  "type": "string"
@@ -3737,11 +5299,12 @@
3737
5299
  },
3738
5300
  "useKeyboard": {
3739
5301
  "import": "import { useKeyboard } from '@overdoser/react-toolkit'",
3740
- "signature": "useKeyboard(handlers: Record<string, (e: KeyboardEvent) => void>, active?: boolean): void",
5302
+ "signature": "useKeyboard(handlers: Record<string, (e: KeyboardEvent) => void>, options?: boolean | UseKeyboardOptions): void",
3741
5303
  "params": {
3742
- "handlers": "Map keyed by KeyboardEvent.key (e.g., 'Escape', 'Enter').",
3743
- "active": "Default true. Pass false to disable without unmounting."
3744
- }
5304
+ "handlers": "Map keyed by key name or chord: 'Escape', 'k', '?', 'mod+k', 'ctrl+shift+z', 'alt+ArrowUp'. mod = Meta on macOS, Ctrl elsewhere.",
5305
+ "options": "boolean = { active }. { active?, ignoreEditable? (default true: printable keys skipped while typing in inputs), preventDefault? (default: only for modifier chords), target?: RefObject }"
5306
+ },
5307
+ "behavior": "Handlers read through a ref — inline objects don't re-subscribe."
3745
5308
  },
3746
5309
  "useTableSort": {
3747
5310
  "import": "import { useTableSort } from '@overdoser/react-toolkit'",
@@ -3749,11 +5312,61 @@
3749
5312
  "returns": {
3750
5313
  "sortedData": "T[]",
3751
5314
  "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.",
5315
+ "requestSort": "(key) => void — single-column; cycles asc → desc → cleared.",
5316
+ "requestMultiSort": "(key) => void — adds/toggles a column in multi-sort.",
3754
5317
  "resetSort": "() => void"
3755
5318
  },
3756
5319
  "notes": "Only needed if you want to manage sort state outside <Table>."
5320
+ },
5321
+ "usePersistedState": {
5322
+ "import": "import { usePersistedState } from '@overdoser/react-toolkit'",
5323
+ "signature": "usePersistedState<T>(key: string, initialValue: T | (() => T), options?: { storage?: 'local' | 'session'; serialize?; deserialize?; sync?: boolean }): [T, (next: T | ((prev: T) => T)) => void, () => void]",
5324
+ "behavior": "localStorage-backed useState. SSR-safe, private-mode safe, in-tab + cross-tab sync, useSyncExternalStore."
5325
+ },
5326
+ "useDebouncedValue": {
5327
+ "import": "import { useDebouncedValue } from '@overdoser/react-toolkit'",
5328
+ "signature": "useDebouncedValue<T>(value: T, delay = 300): T"
5329
+ },
5330
+ "useMediaQuery": {
5331
+ "import": "import { useMediaQuery } from '@overdoser/react-toolkit'",
5332
+ "signature": "useMediaQuery(query: string, serverValue = false): boolean"
5333
+ },
5334
+ "useElementSize": {
5335
+ "import": "import { useElementSize } from '@overdoser/react-toolkit'",
5336
+ "signature": "useElementSize(ref: RefObject<HTMLElement | null>, box?: 'content-box' | 'border-box'): { width: number; height: number }"
5337
+ },
5338
+ "useNow": {
5339
+ "import": "import { useNow } from '@overdoser/react-toolkit'",
5340
+ "signature": "useNow(interval = 1000, active = true): number",
5341
+ "behavior": "Shared timer per interval."
5342
+ },
5343
+ "useContextMenu": {
5344
+ "import": "import { useContextMenu } from '@overdoser/react-toolkit'",
5345
+ "signature": "useContextMenu(): { anchor, open, onOpenChange, onContextMenu, openAt(point), close }",
5346
+ "behavior": "Put onContextMenu on the area; pass anchor/open/onOpenChange to <Dropdown>."
5347
+ },
5348
+ "useConfirm": {
5349
+ "import": "import { useConfirm } from '@overdoser/react-toolkit'",
5350
+ "signature": "useConfirm(): (options?: ConfirmOptions) => Promise<boolean>",
5351
+ "behavior": "Needs <ConfirmProvider>. See components.ConfirmDialog.promiseApi."
5352
+ },
5353
+ "useResizable": {
5354
+ "import": "import { useResizable } from '@overdoser/react-toolkit'",
5355
+ "signature": "useResizable({ size?, defaultSize?, min?, max?: number | (() => number), axis?: 'x' | 'y', invert?, step?, onResize?, onResizeStart?, onResizeEnd?, disabled? }): { size, setSize, isResizing, reset, handleProps }",
5356
+ "behavior": "Spread handleProps on your handle element (pointer capture, keyboard, role=separator + aria values)."
5357
+ },
5358
+ "useZoomPan": {
5359
+ "import": "import { useZoomPan } from '@overdoser/react-toolkit'",
5360
+ "signature": "useZoomPan({ minScale?, maxScale?, step?, wheel?, doubleClickToggle?, onChange? }): { scale, x, y, isPanning, stageProps, contentRef, contentStyle, zoomIn, zoomOut, zoomTo, reset, fit }",
5361
+ "behavior": "Spread stageProps on a relative/overflow-hidden stage, contentStyle on the zoomed element."
5362
+ },
5363
+ "useTheme": {
5364
+ "import": "import { useTheme } from '@overdoser/react-toolkit'",
5365
+ "signature": "useTheme({ storageKey?, attribute?, defaultTheme? }?): { theme: 'light' | 'dark' | 'system'; resolved: 'light' | 'dark'; setTheme; toggle }"
5366
+ },
5367
+ "useCommandPalette": {
5368
+ "import": "import { useCommandPalette } from '@overdoser/react-toolkit'",
5369
+ "signature": "useCommandPalette(initialOpen = false): { open, setOpen, toggle, paletteProps: { open, onOpenChange } }"
3757
5370
  }
3758
5371
  },
3759
5372
  "conventions": [
@@ -3762,10 +5375,10 @@
3762
5375
  "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
5376
  "Popover content goes through the `content` prop.",
3764
5377
  "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.",
5378
+ "FormField clones a single child element to inject form props — pass exactly one input element.",
3766
5379
  "Server-side Table mode (when `onSort` is provided): the consumer is responsible for sorting and slicing `data` server-side.",
3767
5380
  "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."
5381
+ "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
5382
  ],
3770
5383
  "recipes": [
3771
5384
  "recipes/login-form.tsx",
@@ -3785,5 +5398,40 @@
3785
5398
  "recipes/comparison-table.tsx",
3786
5399
  "recipes/live-timeline-feed.tsx",
3787
5400
  "recipes/floating-copy-button.tsx"
3788
- ]
5401
+ ],
5402
+ "utils": {
5403
+ "formatBytes": {
5404
+ "import": "import { formatBytes } from '@overdoser/react-toolkit'",
5405
+ "signature": "formatBytes(bytes: number, { decimals?, base?: 1000 | 1024, iec?, locale? }?): string",
5406
+ "example": "formatBytes(1536) → '1.5 KB'"
5407
+ },
5408
+ "timeAgo": {
5409
+ "import": "import { timeAgo } from '@overdoser/react-toolkit'",
5410
+ "signature": "timeAgo(value: Date | number | string, { now?, locale?, format?, numeric?, maxAge? }?): string | null",
5411
+ "example": "'3 minutes ago' / 'in 2 hours' / 'yesterday'"
5412
+ },
5413
+ "THEME_INIT_SCRIPT": {
5414
+ "import": "import { THEME_INIT_SCRIPT, getThemeInitScript } from '@overdoser/react-toolkit'",
5415
+ "signature": "THEME_INIT_SCRIPT: string; getThemeInitScript({ storageKey?, attribute? }?): string",
5416
+ "notes": "Inline in <head> before first paint."
5417
+ }
5418
+ },
5419
+ "darkMode": {
5420
+ "contract": "No attribute = follows prefers-color-scheme. data-theme=\"light\"|\"dark\" on <html> forces a theme; on any element forces it for that subtree.",
5421
+ "storageKey": "crk-theme",
5422
+ "headScript": "THEME_INIT_SCRIPT (inline in <head> before first paint)",
5423
+ "toggle": "<ThemeToggle />",
5424
+ "hook": "useTheme()",
5425
+ "tokens": [
5426
+ "--crk-color-primary-text",
5427
+ "--crk-color-info-text",
5428
+ "--crk-color-success-text",
5429
+ "--crk-color-warning-text",
5430
+ "--crk-color-danger-text",
5431
+ "--crk-color-primary-selected",
5432
+ "--crk-color-overlay-hover",
5433
+ "--crk-color-backdrop",
5434
+ "--crk-color-backdrop-soft"
5435
+ ]
5436
+ }
3789
5437
  }