@refraction-ui/react 0.18.3 → 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 (108) hide show
  1. package/dist/dist-IBD7CHHX.js +649 -0
  2. package/dist/dist-IBD7CHHX.js.map +1 -0
  3. package/dist/index.cjs +6830 -3824
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +5 -0
  6. package/dist/index.d.ts +5 -0
  7. package/dist/index.js +4866 -2612
  8. package/dist/index.js.map +1 -1
  9. package/dist/internal/ai/index.d.cts +111 -0
  10. package/dist/internal/ai/index.d.ts +111 -0
  11. package/dist/internal/analytics/index.d.cts +6 -0
  12. package/dist/internal/analytics/index.d.ts +6 -0
  13. package/dist/internal/calendar/index.d.cts +5 -3
  14. package/dist/internal/calendar/index.d.ts +5 -3
  15. package/dist/internal/call-controls/index.d.ts +1 -3
  16. package/dist/internal/charts/index.d.cts +95 -0
  17. package/dist/internal/charts/index.d.ts +95 -0
  18. package/dist/internal/command-input/index.d.cts +41 -0
  19. package/dist/internal/command-input/index.d.ts +41 -0
  20. package/dist/internal/conversation/index.d.cts +2 -0
  21. package/dist/internal/conversation/index.d.ts +2 -0
  22. package/dist/internal/date-picker/index.d.cts +2 -0
  23. package/dist/internal/date-picker/index.d.ts +2 -0
  24. package/dist/internal/device-frame/index.d.cts +1 -3
  25. package/dist/internal/device-frame/index.d.ts +1 -3
  26. package/dist/internal/diff-viewer/index.d.cts +118 -0
  27. package/dist/internal/diff-viewer/index.d.ts +118 -0
  28. package/dist/internal/emoji-picker/index.d.cts +1 -3
  29. package/dist/internal/emoji-picker/index.d.ts +1 -3
  30. package/dist/internal/file-tree/index.d.cts +125 -0
  31. package/dist/internal/file-tree/index.d.ts +125 -0
  32. package/dist/internal/footer/index.d.cts +2 -0
  33. package/dist/internal/footer/index.d.ts +2 -0
  34. package/dist/internal/logger/index.d.cts +4 -0
  35. package/dist/internal/logger/index.d.ts +4 -0
  36. package/dist/internal/presence-indicator/index.d.cts +1 -3
  37. package/dist/internal/presence-indicator/index.d.ts +1 -3
  38. package/dist/internal/react-ai/index.d.cts +59 -0
  39. package/dist/internal/react-ai/index.d.ts +59 -0
  40. package/dist/internal/react-app-shell/index.d.cts +7 -51
  41. package/dist/internal/react-app-shell/index.d.ts +7 -51
  42. package/dist/internal/react-avatar-group/index.d.cts +1 -21
  43. package/dist/internal/react-avatar-group/index.d.ts +1 -21
  44. package/dist/internal/react-calendar/index.d.cts +2 -27
  45. package/dist/internal/react-calendar/index.d.ts +2 -27
  46. package/dist/internal/react-charts/index.d.cts +118 -0
  47. package/dist/internal/react-charts/index.d.ts +118 -0
  48. package/dist/internal/react-command/index.d.cts +1 -1
  49. package/dist/internal/react-command/index.d.ts +1 -1
  50. package/dist/internal/react-command-input/index.d.cts +21 -0
  51. package/dist/internal/react-command-input/index.d.ts +21 -0
  52. package/dist/internal/react-conversation/index.d.cts +2 -6
  53. package/dist/internal/react-conversation/index.d.ts +2 -6
  54. package/dist/internal/react-cookie-consent/index.d.cts +1 -6
  55. package/dist/internal/react-cookie-consent/index.d.ts +1 -6
  56. package/dist/internal/react-device-frame/index.d.cts +1 -25
  57. package/dist/internal/react-device-frame/index.d.ts +1 -25
  58. package/dist/internal/react-diff-viewer/index.d.cts +45 -0
  59. package/dist/internal/react-diff-viewer/index.d.ts +45 -0
  60. package/dist/internal/react-dropdown-menu/index.d.cts +1 -1
  61. package/dist/internal/react-dropdown-menu/index.d.ts +1 -1
  62. package/dist/internal/react-emoji-picker/index.d.cts +1 -5
  63. package/dist/internal/react-emoji-picker/index.d.ts +1 -5
  64. package/dist/internal/react-file-tree/index.d.cts +30 -3
  65. package/dist/internal/react-file-tree/index.d.ts +30 -3
  66. package/dist/internal/react-file-upload/index.d.cts +1 -6
  67. package/dist/internal/react-file-upload/index.d.ts +1 -6
  68. package/dist/internal/react-inline-editor/index.d.cts +1 -6
  69. package/dist/internal/react-inline-editor/index.d.ts +1 -6
  70. package/dist/internal/react-keyboard-shortcut/index.d.cts +1 -1
  71. package/dist/internal/react-keyboard-shortcut/index.d.ts +1 -1
  72. package/dist/internal/react-language-selector/index.d.cts +2 -13
  73. package/dist/internal/react-language-selector/index.d.ts +2 -13
  74. package/dist/internal/react-location-selector/index.d.cts +12 -0
  75. package/dist/internal/react-location-selector/index.d.ts +12 -0
  76. package/dist/internal/react-pagination/index.d.ts +22 -1
  77. package/dist/internal/react-presence-indicator/index.d.cts +1 -21
  78. package/dist/internal/react-presence-indicator/index.d.ts +1 -21
  79. package/dist/internal/react-radio/index.d.ts +2 -17
  80. package/dist/internal/react-reaction-bar/index.d.cts +1 -21
  81. package/dist/internal/react-reaction-bar/index.d.ts +1 -21
  82. package/dist/internal/react-search-bar/index.d.cts +1 -12
  83. package/dist/internal/react-search-bar/index.d.ts +1 -12
  84. package/dist/internal/react-slider/index.d.cts +22 -1
  85. package/dist/internal/react-slider/index.d.ts +22 -1
  86. package/dist/internal/react-status-indicator/index.d.cts +1 -5
  87. package/dist/internal/react-status-indicator/index.d.ts +1 -5
  88. package/dist/internal/react-tabs/index.d.cts +2 -8
  89. package/dist/internal/react-tabs/index.d.ts +2 -8
  90. package/dist/internal/react-thread-view/index.d.cts +1 -21
  91. package/dist/internal/react-thread-view/index.d.ts +1 -21
  92. package/dist/internal/react-version-selector/index.d.cts +2 -12
  93. package/dist/internal/react-version-selector/index.d.ts +2 -12
  94. package/dist/internal/reaction-bar/index.d.cts +1 -3
  95. package/dist/internal/reaction-bar/index.d.ts +1 -3
  96. package/dist/internal/status-indicator/index.d.cts +1 -3
  97. package/dist/internal/status-indicator/index.d.ts +1 -3
  98. package/dist/internal/thread-view/index.d.cts +3 -5
  99. package/dist/internal/thread-view/index.d.ts +3 -5
  100. package/dist/internal/toast/index.d.cts +7 -1
  101. package/dist/internal/toast/index.d.ts +7 -1
  102. package/dist/internal/voice-pill/index.d.cts +2 -2
  103. package/dist/internal/voice-pill/index.d.ts +2 -2
  104. package/dist/theme.cjs +10 -10
  105. package/dist/theme.cjs.map +1 -1
  106. package/dist/theme.js +10 -10
  107. package/dist/theme.js.map +1 -1
  108. package/package.json +2 -1
@@ -2,32 +2,17 @@ import * as React from 'react';
2
2
  import { RadioGroupProps as RadioGroupProps$1 } from '../radio/index.js';
3
3
  export { RadioOption, radioCircleVariants, radioGroupVariants, radioItemVariants } from '../radio/index.js';
4
4
 
5
- interface RadioContextValue {
6
- value: string | undefined;
7
- onValueChange: (value: string) => void;
8
- name?: string;
9
- disabled: boolean;
10
- }
11
5
  interface RadioGroupProps extends RadioGroupProps$1 {
12
6
  children: React.ReactNode;
13
7
  className?: string;
14
8
  }
15
- declare function RadioGroup({ children, className, value: controlledValue, defaultValue, onValueChange, name, disabled, orientation, }: RadioGroupProps): React.FunctionComponentElement<React.ProviderProps<RadioContextValue | null>>;
16
- declare namespace RadioGroup {
17
- var displayName: string;
18
- }
9
+ declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
19
10
  interface RadioItemProps {
20
11
  value: string;
21
12
  children?: React.ReactNode;
22
13
  disabled?: boolean;
23
14
  className?: string;
24
15
  }
25
- declare function RadioItem({ value, children, disabled, className }: RadioItemProps): React.DetailedReactHTMLElement<{
26
- className: string;
27
- 'data-state': string;
28
- }, HTMLElement>;
29
- declare namespace RadioItem {
30
- var displayName: string;
31
- }
16
+ declare const RadioItem: React.ForwardRefExoticComponent<RadioItemProps & React.RefAttributes<HTMLLabelElement>>;
32
17
 
33
18
  export { RadioGroup, type RadioGroupProps, RadioItem, type RadioItemProps };
@@ -9,26 +9,6 @@ interface ReactionBarProps {
9
9
  showAddButton?: boolean;
10
10
  className?: string;
11
11
  }
12
- declare function ReactionBar({ reactions, onToggle, onAdd, showAddButton, className, }: ReactionBarProps): React.DetailedReactHTMLElement<{
13
- className: string;
14
- role?: string | undefined;
15
- tabIndex?: number | undefined;
16
- 'aria-label'?: string | undefined;
17
- 'aria-labelledby'?: string | undefined;
18
- 'aria-describedby'?: string | undefined;
19
- 'aria-controls'?: string | undefined;
20
- 'aria-expanded'?: boolean | undefined;
21
- 'aria-selected'?: boolean | undefined;
22
- 'aria-hidden'?: boolean | undefined;
23
- 'aria-disabled'?: boolean | undefined;
24
- 'aria-pressed'?: boolean | "mixed" | undefined;
25
- 'aria-checked'?: boolean | "mixed" | undefined;
26
- 'aria-current'?: boolean | "page" | "step" | "location" | "date" | "time" | undefined;
27
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
28
- 'aria-atomic'?: boolean | undefined;
29
- }, HTMLElement>;
30
- declare namespace ReactionBar {
31
- var displayName: string;
32
- }
12
+ declare const ReactionBar: React.ForwardRefExoticComponent<ReactionBarProps & React.RefAttributes<HTMLDivElement>>;
33
13
 
34
14
  export { ReactionBar, type ReactionBarProps };
@@ -9,26 +9,6 @@ interface ReactionBarProps {
9
9
  showAddButton?: boolean;
10
10
  className?: string;
11
11
  }
12
- declare function ReactionBar({ reactions, onToggle, onAdd, showAddButton, className, }: ReactionBarProps): React.DetailedReactHTMLElement<{
13
- className: string;
14
- role?: string | undefined;
15
- tabIndex?: number | undefined;
16
- 'aria-label'?: string | undefined;
17
- 'aria-labelledby'?: string | undefined;
18
- 'aria-describedby'?: string | undefined;
19
- 'aria-controls'?: string | undefined;
20
- 'aria-expanded'?: boolean | undefined;
21
- 'aria-selected'?: boolean | undefined;
22
- 'aria-hidden'?: boolean | undefined;
23
- 'aria-disabled'?: boolean | undefined;
24
- 'aria-pressed'?: boolean | "mixed" | undefined;
25
- 'aria-checked'?: boolean | "mixed" | undefined;
26
- 'aria-current'?: boolean | "page" | "step" | "location" | "date" | "time" | undefined;
27
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
28
- 'aria-atomic'?: boolean | undefined;
29
- }, HTMLElement>;
30
- declare namespace ReactionBar {
31
- var displayName: string;
32
- }
12
+ declare const ReactionBar: React.ForwardRefExoticComponent<ReactionBarProps & React.RefAttributes<HTMLDivElement>>;
33
13
 
34
14
  export { ReactionBar, type ReactionBarProps };
@@ -1,14 +1,6 @@
1
1
  import * as React from 'react';
2
- import { SearchBarAPI } from '../search-bar/index.cjs';
3
2
  export { searchBarVariants, searchResultVariants } from '../search-bar/index.cjs';
4
3
 
5
- interface SearchBarContextValue {
6
- api: SearchBarAPI;
7
- value: string;
8
- isSearching: boolean;
9
- setValue: (value: string) => void;
10
- clear: () => void;
11
- }
12
4
  interface SearchBarProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
13
5
  value?: string;
14
6
  defaultValue?: string;
@@ -18,10 +10,7 @@ interface SearchBarProps extends Omit<React.InputHTMLAttributes<HTMLInputElement
18
10
  loading?: boolean;
19
11
  children?: React.ReactNode;
20
12
  }
21
- declare function SearchBar({ value: controlledValue, defaultValue, onValueChange, onSearch, debounceMs, loading, placeholder, className, children, ...inputProps }: SearchBarProps): React.FunctionComponentElement<React.ProviderProps<SearchBarContextValue | null>>;
22
- declare namespace SearchBar {
23
- var displayName: string;
24
- }
13
+ declare const SearchBar: React.ForwardRefExoticComponent<SearchBarProps & React.RefAttributes<HTMLInputElement>>;
25
14
  interface SearchResultsProps extends React.HTMLAttributes<HTMLUListElement> {
26
15
  }
27
16
  declare const SearchResults: React.ForwardRefExoticComponent<SearchResultsProps & React.RefAttributes<HTMLUListElement>>;
@@ -1,14 +1,6 @@
1
1
  import * as React from 'react';
2
- import { SearchBarAPI } from '../search-bar/index.js';
3
2
  export { searchBarVariants, searchResultVariants } from '../search-bar/index.js';
4
3
 
5
- interface SearchBarContextValue {
6
- api: SearchBarAPI;
7
- value: string;
8
- isSearching: boolean;
9
- setValue: (value: string) => void;
10
- clear: () => void;
11
- }
12
4
  interface SearchBarProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> {
13
5
  value?: string;
14
6
  defaultValue?: string;
@@ -18,10 +10,7 @@ interface SearchBarProps extends Omit<React.InputHTMLAttributes<HTMLInputElement
18
10
  loading?: boolean;
19
11
  children?: React.ReactNode;
20
12
  }
21
- declare function SearchBar({ value: controlledValue, defaultValue, onValueChange, onSearch, debounceMs, loading, placeholder, className, children, ...inputProps }: SearchBarProps): React.FunctionComponentElement<React.ProviderProps<SearchBarContextValue | null>>;
22
- declare namespace SearchBar {
23
- var displayName: string;
24
- }
13
+ declare const SearchBar: React.ForwardRefExoticComponent<SearchBarProps & React.RefAttributes<HTMLInputElement>>;
25
14
  interface SearchResultsProps extends React.HTMLAttributes<HTMLUListElement> {
26
15
  }
27
16
  declare const SearchResults: React.ForwardRefExoticComponent<SearchResultsProps & React.RefAttributes<HTMLUListElement>>;
@@ -1,8 +1,29 @@
1
1
  import * as React from 'react';
2
2
 
3
- interface SliderProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'> {
4
+ /** Current value (controlled). Pair with `onChange`/`onValueChange`. */
5
+ value?: number;
6
+ /** Initial value for uncontrolled usage (defaults to `min`). */
7
+ defaultValue?: number;
8
+ /** Minimum selectable value (default 0). */
9
+ min?: number;
10
+ /** Maximum selectable value (default 100). */
11
+ max?: number;
12
+ /** Granularity between selectable values (default 1). */
13
+ step?: number;
14
+ /** Called with the new numeric value as the user moves the thumb. */
15
+ onChange?: (value: number) => void;
16
+ /** Alias of `onChange`, matching the library-wide naming convention. */
17
+ onValueChange?: (value: number) => void;
4
18
  variant?: 'default';
5
19
  }
20
+ /**
21
+ * Slider — a single-value range control over a native
22
+ * `<input type="range">`. Value clamping, step rounding, and ARIA come from
23
+ * the headless `@refraction-ui/slider` core; keyboard interaction is native
24
+ * to the input (the core's `getSliderValueFromKey` pins the same rules for
25
+ * non-native adapters).
26
+ */
6
27
  declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
7
28
 
8
29
  export { Slider, type SliderProps };
@@ -1,8 +1,29 @@
1
1
  import * as React from 'react';
2
2
 
3
- interface SliderProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'min' | 'max' | 'step'> {
4
+ /** Current value (controlled). Pair with `onChange`/`onValueChange`. */
5
+ value?: number;
6
+ /** Initial value for uncontrolled usage (defaults to `min`). */
7
+ defaultValue?: number;
8
+ /** Minimum selectable value (default 0). */
9
+ min?: number;
10
+ /** Maximum selectable value (default 100). */
11
+ max?: number;
12
+ /** Granularity between selectable values (default 1). */
13
+ step?: number;
14
+ /** Called with the new numeric value as the user moves the thumb. */
15
+ onChange?: (value: number) => void;
16
+ /** Alias of `onChange`, matching the library-wide naming convention. */
17
+ onValueChange?: (value: number) => void;
4
18
  variant?: 'default';
5
19
  }
20
+ /**
21
+ * Slider — a single-value range control over a native
22
+ * `<input type="range">`. Value clamping, step rounding, and ARIA come from
23
+ * the headless `@refraction-ui/slider` core; keyboard interaction is native
24
+ * to the input (the core's `getSliderValueFromKey` pins the same rules for
25
+ * non-native adapters).
26
+ */
6
27
  declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLInputElement>>;
7
28
 
8
29
  export { Slider, type SliderProps };
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as React from 'react';
3
2
  import { StatusType } from '../status-indicator/index.cjs';
4
3
  export { StatusProps as CoreStatusProps, STATUS_COLORS, STATUS_LABELS, StatusAPI, StatusType, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants } from '../status-indicator/index.cjs';
@@ -13,9 +12,6 @@ interface StatusIndicatorProps {
13
12
  showLabel?: boolean;
14
13
  className?: string;
15
14
  }
16
- declare function StatusIndicator({ type, label, children, pulse, showLabel, className, }: StatusIndicatorProps): react_jsx_runtime.JSX.Element;
17
- declare namespace StatusIndicator {
18
- var displayName: string;
19
- }
15
+ declare const StatusIndicator: React.ForwardRefExoticComponent<StatusIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
20
16
 
21
17
  export { StatusIndicator, type StatusIndicatorProps };
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as React from 'react';
3
2
  import { StatusType } from '../status-indicator/index.js';
4
3
  export { StatusProps as CoreStatusProps, STATUS_COLORS, STATUS_LABELS, StatusAPI, StatusType, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants } from '../status-indicator/index.js';
@@ -13,9 +12,6 @@ interface StatusIndicatorProps {
13
12
  showLabel?: boolean;
14
13
  className?: string;
15
14
  }
16
- declare function StatusIndicator({ type, label, children, pulse, showLabel, className, }: StatusIndicatorProps): react_jsx_runtime.JSX.Element;
17
- declare namespace StatusIndicator {
18
- var displayName: string;
19
- }
15
+ declare const StatusIndicator: React.ForwardRefExoticComponent<StatusIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
20
16
 
21
17
  export { StatusIndicator, type StatusIndicatorProps };
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export { TabsProps as CoreTabsProps, TabsAPI, TabsState, tabsListVariants, tabsTriggerVariants } from '../tabs/index.cjs';
3
3
 
4
- interface TabsProps {
4
+ interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  value?: string;
6
6
  defaultValue?: string;
7
7
  onValueChange?: (value: string) => void;
@@ -9,13 +9,7 @@ interface TabsProps {
9
9
  className?: string;
10
10
  children?: React.ReactNode;
11
11
  }
12
- declare function Tabs({ value: controlledValue, defaultValue, onValueChange, orientation, className, children, }: TabsProps): React.DetailedReactHTMLElement<{
13
- className: string | undefined;
14
- 'data-orientation': "horizontal" | "vertical";
15
- }, HTMLElement>;
16
- declare namespace Tabs {
17
- var displayName: string;
18
- }
12
+ declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
19
13
  interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
20
14
  }
21
15
  declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export { TabsProps as CoreTabsProps, TabsAPI, TabsState, tabsListVariants, tabsTriggerVariants } from '../tabs/index.js';
3
3
 
4
- interface TabsProps {
4
+ interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  value?: string;
6
6
  defaultValue?: string;
7
7
  onValueChange?: (value: string) => void;
@@ -9,13 +9,7 @@ interface TabsProps {
9
9
  className?: string;
10
10
  children?: React.ReactNode;
11
11
  }
12
- declare function Tabs({ value: controlledValue, defaultValue, onValueChange, orientation, className, children, }: TabsProps): React.DetailedReactHTMLElement<{
13
- className: string | undefined;
14
- 'data-orientation': "horizontal" | "vertical";
15
- }, HTMLElement>;
16
- declare namespace Tabs {
17
- var displayName: string;
18
- }
12
+ declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
19
13
  interface TabsListProps extends React.HTMLAttributes<HTMLDivElement> {
20
14
  }
21
15
  declare const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
@@ -9,26 +9,6 @@ interface ThreadViewProps {
9
9
  currentUserId?: string;
10
10
  className?: string;
11
11
  }
12
- declare function ThreadView({ messages, onReply, onReact, currentUserId, className, }: ThreadViewProps): React.DetailedReactHTMLElement<{
13
- className: string;
14
- role?: string | undefined;
15
- tabIndex?: number | undefined;
16
- 'aria-label'?: string | undefined;
17
- 'aria-labelledby'?: string | undefined;
18
- 'aria-describedby'?: string | undefined;
19
- 'aria-controls'?: string | undefined;
20
- 'aria-expanded'?: boolean | undefined;
21
- 'aria-selected'?: boolean | undefined;
22
- 'aria-hidden'?: boolean | undefined;
23
- 'aria-disabled'?: boolean | undefined;
24
- 'aria-pressed'?: boolean | "mixed" | undefined;
25
- 'aria-checked'?: boolean | "mixed" | undefined;
26
- 'aria-current'?: boolean | "page" | "step" | "location" | "date" | "time" | undefined;
27
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
28
- 'aria-atomic'?: boolean | undefined;
29
- }, HTMLElement>;
30
- declare namespace ThreadView {
31
- var displayName: string;
32
- }
12
+ declare const ThreadView: React.ForwardRefExoticComponent<ThreadViewProps & React.RefAttributes<HTMLDivElement>>;
33
13
 
34
14
  export { ThreadView, type ThreadViewProps };
@@ -9,26 +9,6 @@ interface ThreadViewProps {
9
9
  currentUserId?: string;
10
10
  className?: string;
11
11
  }
12
- declare function ThreadView({ messages, onReply, onReact, currentUserId, className, }: ThreadViewProps): React.DetailedReactHTMLElement<{
13
- className: string;
14
- role?: string | undefined;
15
- tabIndex?: number | undefined;
16
- 'aria-label'?: string | undefined;
17
- 'aria-labelledby'?: string | undefined;
18
- 'aria-describedby'?: string | undefined;
19
- 'aria-controls'?: string | undefined;
20
- 'aria-expanded'?: boolean | undefined;
21
- 'aria-selected'?: boolean | undefined;
22
- 'aria-hidden'?: boolean | undefined;
23
- 'aria-disabled'?: boolean | undefined;
24
- 'aria-pressed'?: boolean | "mixed" | undefined;
25
- 'aria-checked'?: boolean | "mixed" | undefined;
26
- 'aria-current'?: boolean | "page" | "step" | "location" | "date" | "time" | undefined;
27
- 'aria-live'?: "off" | "assertive" | "polite" | undefined;
28
- 'aria-atomic'?: boolean | undefined;
29
- }, HTMLElement>;
30
- declare namespace ThreadView {
31
- var displayName: string;
32
- }
12
+ declare const ThreadView: React.ForwardRefExoticComponent<ThreadViewProps & React.RefAttributes<HTMLDivElement>>;
33
13
 
34
14
  export { ThreadView, type ThreadViewProps };
@@ -1,14 +1,7 @@
1
1
  import * as React from 'react';
2
- import { VersionOption, VersionSelectorAPI } from '../version-selector/index.cjs';
2
+ import { VersionOption } from '../version-selector/index.cjs';
3
3
  export { VersionOption, latestBadgeVariants, optionVariants, versionSelectorVariants } from '../version-selector/index.cjs';
4
4
 
5
- interface VersionSelectorContextValue {
6
- api: VersionSelectorAPI;
7
- isOpen: boolean;
8
- setOpen: (value: boolean) => void;
9
- select: (value: string) => void;
10
- versions: VersionOption[];
11
- }
12
5
  interface VersionSelectorProps {
13
6
  value?: string;
14
7
  onValueChange?: (value: string) => void;
@@ -16,9 +9,6 @@ interface VersionSelectorProps {
16
9
  placeholder?: string;
17
10
  className?: string;
18
11
  }
19
- declare function VersionSelector({ value: controlledValue, onValueChange, versions, placeholder, className, }: VersionSelectorProps): React.FunctionComponentElement<React.ProviderProps<VersionSelectorContextValue | null>>;
20
- declare namespace VersionSelector {
21
- var displayName: string;
22
- }
12
+ declare const VersionSelector: React.ForwardRefExoticComponent<VersionSelectorProps & React.RefAttributes<HTMLDivElement>>;
23
13
 
24
14
  export { VersionSelector, type VersionSelectorProps };
@@ -1,14 +1,7 @@
1
1
  import * as React from 'react';
2
- import { VersionOption, VersionSelectorAPI } from '../version-selector/index.js';
2
+ import { VersionOption } from '../version-selector/index.js';
3
3
  export { VersionOption, latestBadgeVariants, optionVariants, versionSelectorVariants } from '../version-selector/index.js';
4
4
 
5
- interface VersionSelectorContextValue {
6
- api: VersionSelectorAPI;
7
- isOpen: boolean;
8
- setOpen: (value: boolean) => void;
9
- select: (value: string) => void;
10
- versions: VersionOption[];
11
- }
12
5
  interface VersionSelectorProps {
13
6
  value?: string;
14
7
  onValueChange?: (value: string) => void;
@@ -16,9 +9,6 @@ interface VersionSelectorProps {
16
9
  placeholder?: string;
17
10
  className?: string;
18
11
  }
19
- declare function VersionSelector({ value: controlledValue, onValueChange, versions, placeholder, className, }: VersionSelectorProps): React.FunctionComponentElement<React.ProviderProps<VersionSelectorContextValue | null>>;
20
- declare namespace VersionSelector {
21
- var displayName: string;
22
- }
12
+ declare const VersionSelector: React.ForwardRefExoticComponent<VersionSelectorProps & React.RefAttributes<HTMLDivElement>>;
23
13
 
24
14
  export { VersionSelector, type VersionSelectorProps };
@@ -1,5 +1,3 @@
1
- import { AccessibilityProps } from '../shared/index.cjs';
2
-
3
1
  interface Reaction {
4
2
  /** The emoji character */
5
3
  emoji: string;
@@ -24,7 +22,7 @@ interface ReactionBarAPI {
24
22
  /** Add a new reaction */
25
23
  add(emoji: string): void;
26
24
  /** ARIA props for the reaction bar container */
27
- ariaProps: Partial<AccessibilityProps> & Record<string, unknown>;
25
+ ariaProps: Record<string, string | number | boolean>;
28
26
  /** Get ARIA props for an individual reaction pill */
29
27
  getReactionAriaProps(reaction: Reaction): Record<string, unknown>;
30
28
  /** ARIA props for the "add reaction" button */
@@ -1,5 +1,3 @@
1
- import { AccessibilityProps } from '../shared/index.js';
2
-
3
1
  interface Reaction {
4
2
  /** The emoji character */
5
3
  emoji: string;
@@ -24,7 +22,7 @@ interface ReactionBarAPI {
24
22
  /** Add a new reaction */
25
23
  add(emoji: string): void;
26
24
  /** ARIA props for the reaction bar container */
27
- ariaProps: Partial<AccessibilityProps> & Record<string, unknown>;
25
+ ariaProps: Record<string, string | number | boolean>;
28
26
  /** Get ARIA props for an individual reaction pill */
29
27
  getReactionAriaProps(reaction: Reaction): Record<string, unknown>;
30
28
  /** ARIA props for the "add reaction" button */
@@ -1,5 +1,3 @@
1
- import { AccessibilityProps } from '../shared/index.cjs';
2
-
3
1
  type StatusType = 'success' | 'error' | 'warning' | 'info' | 'pending' | 'neutral';
4
2
  interface StatusProps {
5
3
  /** The status type */
@@ -11,7 +9,7 @@ interface StatusProps {
11
9
  }
12
10
  interface StatusAPI {
13
11
  /** ARIA attributes for the status indicator */
14
- ariaProps: Partial<AccessibilityProps> & Record<string, unknown>;
12
+ ariaProps: Record<string, string | number | boolean>;
15
13
  /** The status type */
16
14
  type: StatusType;
17
15
  /** The display label */
@@ -1,5 +1,3 @@
1
- import { AccessibilityProps } from '../shared/index.js';
2
-
3
1
  type StatusType = 'success' | 'error' | 'warning' | 'info' | 'pending' | 'neutral';
4
2
  interface StatusProps {
5
3
  /** The status type */
@@ -11,7 +9,7 @@ interface StatusProps {
11
9
  }
12
10
  interface StatusAPI {
13
11
  /** ARIA attributes for the status indicator */
14
- ariaProps: Partial<AccessibilityProps> & Record<string, unknown>;
12
+ ariaProps: Record<string, string | number | boolean>;
15
13
  /** The status type */
16
14
  type: StatusType;
17
15
  /** The display label */
@@ -1,5 +1,3 @@
1
- import { AccessibilityProps } from '../shared/index.cjs';
2
-
3
1
  interface MessageReaction {
4
2
  emoji: string;
5
3
  count: number;
@@ -64,11 +62,11 @@ interface ThreadViewAPI {
64
62
  /** Format relative time (e.g., "2 minutes ago") */
65
63
  formatRelativeTime(date: Date): string;
66
64
  /** ARIA props for the thread container */
67
- ariaProps: Partial<AccessibilityProps> & Record<string, unknown>;
65
+ ariaProps: Record<string, string | number | boolean>;
68
66
  /** Get ARIA props for a message */
69
- getMessageAriaProps(message: MessageData): Record<string, unknown>;
67
+ getMessageAriaProps(message: MessageData): Record<string, string | number | boolean>;
70
68
  /** Get ARIA props for a reply button */
71
- getReplyButtonAriaProps(messageId: string): Record<string, unknown>;
69
+ getReplyButtonAriaProps(messageId: string): Record<string, string | number | boolean>;
72
70
  /** Generated IDs */
73
71
  ids: {
74
72
  thread: string;
@@ -1,5 +1,3 @@
1
- import { AccessibilityProps } from '../shared/index.js';
2
-
3
1
  interface MessageReaction {
4
2
  emoji: string;
5
3
  count: number;
@@ -64,11 +62,11 @@ interface ThreadViewAPI {
64
62
  /** Format relative time (e.g., "2 minutes ago") */
65
63
  formatRelativeTime(date: Date): string;
66
64
  /** ARIA props for the thread container */
67
- ariaProps: Partial<AccessibilityProps> & Record<string, unknown>;
65
+ ariaProps: Record<string, string | number | boolean>;
68
66
  /** Get ARIA props for a message */
69
- getMessageAriaProps(message: MessageData): Record<string, unknown>;
67
+ getMessageAriaProps(message: MessageData): Record<string, string | number | boolean>;
70
68
  /** Get ARIA props for a reply button */
71
- getReplyButtonAriaProps(messageId: string): Record<string, unknown>;
69
+ getReplyButtonAriaProps(messageId: string): Record<string, string | number | boolean>;
72
70
  /** Generated IDs */
73
71
  ids: {
74
72
  thread: string;
@@ -12,6 +12,8 @@ interface ToastProps {
12
12
  open?: boolean;
13
13
  /** Callback when open state changes */
14
14
  onOpenChange?: (open: boolean) => void;
15
+ /** Elapsed-time clock for timer pause/resume math (ms). Default: ambient `Date.now()` — inject for deterministic tests. */
16
+ now?: () => number;
15
17
  }
16
18
  interface ToastState {
17
19
  open: boolean;
@@ -53,7 +55,11 @@ interface ToastManagerAPI {
53
55
  /** Subscribe to toast list changes. Returns unsubscribe function. */
54
56
  subscribe(fn: (toasts: ReadonlyArray<ToastEntry>) => void): () => void;
55
57
  }
56
- declare function createToastManager(): ToastManagerAPI;
58
+ interface ToastManagerConfig {
59
+ /** Clock for entry `createdAt` stamps (ms). Default: ambient `Date.now()` — inject for deterministic tests. */
60
+ now?: () => number;
61
+ }
62
+ declare function createToastManager(config?: ToastManagerConfig): ToastManagerAPI;
57
63
 
58
64
  declare const toastVariants: (props?: ({
59
65
  variant?: "default" | "success" | "error" | "warning" | undefined;
@@ -12,6 +12,8 @@ interface ToastProps {
12
12
  open?: boolean;
13
13
  /** Callback when open state changes */
14
14
  onOpenChange?: (open: boolean) => void;
15
+ /** Elapsed-time clock for timer pause/resume math (ms). Default: ambient `Date.now()` — inject for deterministic tests. */
16
+ now?: () => number;
15
17
  }
16
18
  interface ToastState {
17
19
  open: boolean;
@@ -53,7 +55,11 @@ interface ToastManagerAPI {
53
55
  /** Subscribe to toast list changes. Returns unsubscribe function. */
54
56
  subscribe(fn: (toasts: ReadonlyArray<ToastEntry>) => void): () => void;
55
57
  }
56
- declare function createToastManager(): ToastManagerAPI;
58
+ interface ToastManagerConfig {
59
+ /** Clock for entry `createdAt` stamps (ms). Default: ambient `Date.now()` — inject for deterministic tests. */
60
+ now?: () => number;
61
+ }
62
+ declare function createToastManager(config?: ToastManagerConfig): ToastManagerAPI;
57
63
 
58
64
  declare const toastVariants: (props?: ({
59
65
  variant?: "default" | "success" | "error" | "warning" | undefined;
@@ -1,4 +1,4 @@
1
- import { AccessibilityProps, TokenContract } from '../shared/index.cjs';
1
+ import { TokenContract } from '../shared/index.cjs';
2
2
 
3
3
  type VoicePillSpeaker = 'ai' | 'user' | (string & {});
4
4
  type VoicePillPosition = 'inline' | 'top-start' | 'top-center' | 'top-end' | 'bottom-start' | 'bottom-center' | 'bottom-end' | 'left-start' | 'left-center' | 'left-end' | 'right-start' | 'right-center' | 'right-end';
@@ -43,7 +43,7 @@ interface VoicePillAPI {
43
43
  /** Invoke the mute callback when provided */
44
44
  toggleMute(): void;
45
45
  /** ARIA props for the live status pill */
46
- ariaProps: Partial<AccessibilityProps> & Record<string, unknown>;
46
+ ariaProps: Record<string, string | number | boolean>;
47
47
  /** ARIA props for the mute toggle */
48
48
  toggleMuteAriaProps: Record<string, unknown>;
49
49
  /** Data attributes reflecting speaker/state */
@@ -1,4 +1,4 @@
1
- import { AccessibilityProps, TokenContract } from '../shared/index.js';
1
+ import { TokenContract } from '../shared/index.js';
2
2
 
3
3
  type VoicePillSpeaker = 'ai' | 'user' | (string & {});
4
4
  type VoicePillPosition = 'inline' | 'top-start' | 'top-center' | 'top-end' | 'bottom-start' | 'bottom-center' | 'bottom-end' | 'left-start' | 'left-center' | 'left-end' | 'right-start' | 'right-center' | 'right-end';
@@ -43,7 +43,7 @@ interface VoicePillAPI {
43
43
  /** Invoke the mute callback when provided */
44
44
  toggleMute(): void;
45
45
  /** ARIA props for the live status pill */
46
- ariaProps: Partial<AccessibilityProps> & Record<string, unknown>;
46
+ ariaProps: Record<string, string | number | boolean>;
47
47
  /** ARIA props for the mute toggle */
48
48
  toggleMuteAriaProps: Record<string, unknown>;
49
49
  /** Data attributes reflecting speaker/state */
package/dist/theme.cjs CHANGED
@@ -286,6 +286,16 @@ var icons = {
286
286
  };
287
287
  function ThemeToggle({ className, variant = "segmented" }) {
288
288
  const { mode, setMode } = useTheme();
289
+ const [open, setOpen] = React2__namespace.useState(false);
290
+ const ref = React2__namespace.useRef(null);
291
+ React2__namespace.useEffect(() => {
292
+ if (!open) return;
293
+ const handler = (e) => {
294
+ if (ref.current && !ref.current.contains(e.target)) setOpen(false);
295
+ };
296
+ document.addEventListener("mousedown", handler);
297
+ return () => document.removeEventListener("mousedown", handler);
298
+ }, [open]);
289
299
  if (variant === "segmented") {
290
300
  return React2__namespace.createElement(
291
301
  "div",
@@ -307,16 +317,6 @@ function ThemeToggle({ className, variant = "segmented" }) {
307
317
  )
308
318
  );
309
319
  }
310
- const [open, setOpen] = React2__namespace.useState(false);
311
- const ref = React2__namespace.useRef(null);
312
- React2__namespace.useEffect(() => {
313
- if (!open) return;
314
- const handler = (e) => {
315
- if (ref.current && !ref.current.contains(e.target)) setOpen(false);
316
- };
317
- document.addEventListener("mousedown", handler);
318
- return () => document.removeEventListener("mousedown", handler);
319
- }, [open]);
320
320
  const currentIcon = modes.find((m) => m.value === mode)?.icon ?? "monitor";
321
321
  return React2__namespace.createElement(
322
322
  "div",