@semio/ui 0.0.0 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -1,11 +1,23 @@
1
- import * as react from 'react';
2
- import react__default, { ReactNode, MutableRefObject, CSSProperties, MouseEventHandler, MouseEvent as MouseEvent$1, RefObject, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, FocusEventHandler, ButtonHTMLAttributes } from 'react';
3
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { CollapsibleContentProps, CollapsibleTriggerProps, CollapsibleProps } from '@radix-ui/react-collapsible';
2
+ import * as react from 'react';
3
+ import react__default, { ReactNode, MouseEvent as MouseEvent$1, MouseEventHandler, AriaRole, AriaAttributes, KeyboardEventHandler, Ref, CSSProperties, RefObject, ForwardRefExoticComponent, RefAttributes, ChangeEvent, TouchEvent as TouchEvent$1, DragEvent, KeyboardEvent as KeyboardEvent$1, FocusEvent, InputHTMLAttributes, TextareaHTMLAttributes, ReactElement } from 'react';
4
+ import { MotionValue } from 'motion/react';
5
+ import * as zustand from 'zustand';
6
+ import { StoreApi } from 'zustand';
7
+ import * as THREE from 'three';
8
+ import { ThreeEvent } from '@react-three/fiber';
9
+ import * as jotai from 'jotai';
5
10
  import { RawColor } from '@semio/utils';
6
- import { ReferenceType, useFloating, VirtualElement } from '@floating-ui/react';
11
+ export { ContextConfig, ContextSolutionConfig, OptionalContextProps, composeContexts, createContextChecker, createContextHook, createContextProvider, createContextSolution, useOptionalContext, withOptionalContext } from '@semio/utils';
12
+ import { IconProps } from '@solar-icons/react-perf';
13
+ import { IconProps as IconProps$1 } from '@tabler/icons-react';
14
+ import { Collapsible } from 'radix-ui';
15
+ import { RectReadOnly } from 'react-use-measure';
7
16
  import { Accept } from 'react-dropzone';
8
- import { TablerIconsProps } from '@tabler/icons-react';
17
+
18
+ declare function CopyLinkButton({ link }: {
19
+ link: string;
20
+ }): react_jsx_runtime.JSX.Element;
9
21
 
10
22
  /**
11
23
  * Theme options for the application's appearance.
@@ -74,19 +86,23 @@ declare enum Size {
74
86
  /**
75
87
  * Extra small size.
76
88
  */
77
- Xs = "xs",
89
+ Xs = "size-xs",
78
90
  /**
79
91
  * Small size.
80
92
  */
81
- Sm = "sm",
93
+ Sm = "size-sm",
82
94
  /**
83
95
  * Medium size (default).
84
96
  */
85
- Md = "md",
97
+ Md = "size-md",
86
98
  /**
87
99
  * Large size.
88
100
  */
89
- Lg = "lg"
101
+ Lg = "size-lg",
102
+ /**
103
+ * Extra large size.
104
+ */
105
+ Xl = "size-xl"
90
106
  }
91
107
  /**
92
108
  * Time display format options.
@@ -99,91 +115,153 @@ declare enum TimeDisplay {
99
115
  */
100
116
  Frames = "frames",
101
117
  /**
102
- * Display time in seconds and milliseconds format.
118
+ * Display time in milliseconds only.
103
119
  */
104
- SecondsPlusMilliseconds = "seconds+milliseconds",
120
+ Milliseconds = "milliseconds",
105
121
  /**
106
- * Display time in minutes, seconds, and milliseconds format.
122
+ * Display time in seconds (milliseconds are decimals).
107
123
  */
108
- MinutesPlusSecondsPlusMilliseconds = "minutes+seconds+milliseconds",
124
+ Seconds = "seconds",
109
125
  /**
110
126
  * Display time in seconds and frames format.
111
127
  */
112
- SecondsPlusFrames = "seconds+frames",
113
- /**
114
- * Display time in seconds only.
115
- */
116
- Seconds = "seconds"
128
+ SecondsPlusFrames = "seconds+frames"
117
129
  }
118
- /**
119
- * Types of nested parent components.
120
- *
121
- * Includes Context and Dropdown parents
122
- */
123
- declare enum NestedParent {
124
- /**
125
- * Parent is a context component.
126
- */
127
- Context = "context",
128
- /**
129
- * Parent is a dropdown component.
130
- */
131
- Dropdown = "dropdown"
130
+ interface ToolbarWidget {
131
+ id: string;
132
+ type: "toolbar-widget";
133
+ component: ReactNode;
134
+ mobileConfig?: {
135
+ location: "header" | "menu";
136
+ component?: ReactNode;
137
+ };
138
+ }
139
+ interface ToolbarSpacer {
140
+ id: string;
141
+ type: "toolbar-spacer";
142
+ }
143
+ type ToolbarItem = ToolbarWidget | ToolbarSpacer;
144
+ type MenuItemClickFn = (id: string, event?: MouseEvent$1<HTMLButtonElement>) => Promise<void> | void;
145
+ declare enum PaneRegion {
146
+ Footer = "footer",
147
+ Left = "left",
148
+ Right = "Right"
149
+ }
150
+ interface PaneSpec {
151
+ id: string;
152
+ name: string;
153
+ icon: ReactNode;
154
+ size: string | number;
155
+ clickFn?: MenuItemClickFn;
156
+ preventClose?: boolean;
157
+ content?: ReactNode;
158
+ inLeftMenu: boolean;
159
+ inRightMenu: boolean;
160
+ disabled?: boolean;
161
+ region?: PaneRegion;
162
+ shouldClose?: boolean;
132
163
  }
133
164
 
134
- declare function stampToVisualTime(stamp: number, duration: number, framerate: number, timeDisplay: TimeDisplay, showDetail?: boolean): string;
165
+ interface AnchorProps {
166
+ onClick: () => void;
167
+ variant?: Variant;
168
+ children: string;
169
+ }
170
+ declare function Anchor({ onClick, variant, children }: AnchorProps): react_jsx_runtime.JSX.Element;
135
171
 
136
- interface LayoutProps {
137
- menu: ReactNode;
138
- leftSidebar?: ReactNode;
139
- rightSidebar?: ReactNode;
140
- bottomPanel?: ReactNode;
141
- children: ReactNode;
142
- menuRef?: MutableRefObject<HTMLDivElement | null>;
143
- leftSidebarRef?: MutableRefObject<HTMLDivElement | null>;
144
- rightSidebarRef?: MutableRefObject<HTMLDivElement | null>;
145
- bottomPanelRef?: MutableRefObject<HTMLDivElement | null>;
146
- style?: CSSProperties;
147
- gradient?: boolean;
148
- className?: string;
172
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
173
+ children?: ReactNode;
174
+ altText?: string;
175
+ disabled?: boolean;
176
+ onClick?: MouseEventHandler<HTMLButtonElement>;
177
+ variant?: Variant;
178
+ color?: string;
179
+ leftIcon?: ReactNode;
180
+ rightIcon?: ReactNode;
181
+ size?: Size | "fit";
182
+ deemphasize?: boolean;
183
+ submit?: boolean;
184
+ visuals?: "default" | "inverted" | "inverted-border" | "call-to-action" | "list-item";
149
185
  }
150
186
  /**
151
- * Renders the inner layout of the application.
152
- *
153
- * TODO: Update with resizeable panes and pop out windows.
154
- *
155
- * @param menu - The menu component.
156
- * @param leftSidebar - The left sidebar component.
157
- * @param rightSidebar - The right sidebar component.
158
- * @param bottomPanel - The bottom panel component.
159
- * @param children - The content to be rendered in the main body.
187
+ * A button that displays text and/or icons. If no text and one icon is provided, the button will be a square with padding.
188
+ * @param children - The text to display on the button
189
+ * @param altText - The alt text to accompany the button
190
+ * @param disabled - Whether the button is disabled
191
+ * @param onClick - Optional click handler
192
+ * @param variant - Optional variant to apply to the button (default is "default")
193
+ * @param color - Optional custom color to apply to the button
194
+ * @param leftIcon - Optional left icon to add to the button
195
+ * @param rightIcon - Optional right icon to add to the button
196
+ * @param size - Optional size to apply to the button
197
+ * @param deemphasize - Whether to deemphasize the button (subtler background and colored text)
198
+ * @param invert - Whether to invert the button colors (no background and colored text)
199
+ * @param border - Whether to add a border to the button
160
200
  */
161
- declare function InnerLayout({ menu, leftSidebar, rightSidebar, bottomPanel, children, menuRef, leftSidebarRef, rightSidebarRef, bottomPanelRef, style, gradient, className, }: LayoutProps): react_jsx_runtime.JSX.Element;
162
- declare const Layout: react.MemoExoticComponent<typeof InnerLayout>;
201
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
163
202
 
164
- interface Step {
203
+ interface HeaderButtonProps extends Omit<ButtonProps, "submit" | "color" | "deemphasize" | "invert" | "border" | "callToAction" | "leftIcon" | "rightIcon" | "alt" | "children"> {
165
204
  label: string;
166
- completed: boolean;
167
- disabled: boolean;
168
- content?: ReactNode;
205
+ icon: ReactNode;
169
206
  }
170
- interface VerticalStepperProps {
171
- steps: Step[];
172
- activeStep?: number;
173
- onStepChange: (step: number) => void;
207
+ declare const HeaderButton: react.ForwardRefExoticComponent<HeaderButtonProps & react.RefAttributes<HTMLButtonElement>>;
208
+
209
+ interface MenuButtonProps {
210
+ children: string;
211
+ altText?: string;
212
+ icon: ReactNode;
213
+ onClick?: MouseEventHandler;
214
+ active?: boolean;
215
+ hoverable?: boolean;
216
+ /**
217
+ * Show a subtle accent-tinted background on hover, and a darker tint when
218
+ * the button has `active` (i.e. `data-active`). Off by default — opt in
219
+ * for menu-style lists where rows should react visually to the cursor.
220
+ */
221
+ bg?: boolean;
222
+ /**
223
+ * When true, all visual active-state styling (background tint *and* the
224
+ * accent text/icon color from `variant-responsive-selectable-text`) only
225
+ * applies at the `desktop:` breakpoint. `aria-current` and `data-active`
226
+ * are unaffected so semantics stay correct.
227
+ *
228
+ * Useful for sidebars that drill-in on mobile — once the user navigates
229
+ * away from the list, a "selected" highlight on the sidebar is misleading.
230
+ */
231
+ activeOnDesktopOnly?: boolean;
232
+ variant?: Variant;
233
+ status?: {
234
+ variant?: Variant;
235
+ placement?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
236
+ text?: string;
237
+ };
238
+ className?: string;
239
+ textClassName?: string;
240
+ /** Pass-through for native button focus/role/aria-* used by the tablist pattern. */
241
+ tabIndex?: number;
242
+ role?: AriaRole;
243
+ "aria-selected"?: AriaAttributes["aria-selected"];
244
+ "aria-controls"?: AriaAttributes["aria-controls"];
245
+ id?: string;
246
+ onKeyDown?: KeyboardEventHandler<HTMLButtonElement>;
247
+ /** Ref to the underlying `<button>` element. */
248
+ ref?: Ref<HTMLButtonElement>;
174
249
  }
175
- declare function VerticalStepper({ steps, onStepChange, activeStep }: VerticalStepperProps): react_jsx_runtime.JSX.Element;
250
+ declare function MenuButton({ children, altText, icon, onClick, active, hoverable, bg, activeOnDesktopOnly, status, variant, className, textClassName, tabIndex, role, "aria-selected": ariaSelected, "aria-controls": ariaControls, id, onKeyDown, ref, }: MenuButtonProps): react_jsx_runtime.JSX.Element;
176
251
 
177
- interface MenuProps {
178
- header?: ReactNode;
179
- footer?: ReactNode;
180
- children: ReactNode;
252
+ interface ProgressProps {
253
+ progress: number;
254
+ variant?: Variant;
255
+ size?: Size;
181
256
  }
182
- declare function Menu({ header, footer, children }: MenuProps): react_jsx_runtime.JSX.Element;
183
- declare function useMenu(): {
184
- open: boolean;
185
- setOpen: (open: boolean) => void;
186
- };
257
+ declare function Progress({ progress, variant, size }: ProgressProps): react_jsx_runtime.JSX.Element;
258
+ interface ProgressCircleProps {
259
+ progress: number | MotionValue<number>;
260
+ variant?: Variant;
261
+ size?: Size;
262
+ icon?: ReactNode;
263
+ }
264
+ declare function ProgressCircle({ size, progress, variant, icon }: ProgressCircleProps): react_jsx_runtime.JSX.Element;
187
265
 
188
266
  /**
189
267
  * Renders a spinner component. If children are provided, the spinner will bounce and spin the child,
@@ -202,62 +280,109 @@ declare function Spinner({ children }: {
202
280
 
203
281
  interface StatusProps {
204
282
  variant?: Variant;
283
+ size?: Size;
205
284
  placement?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
206
285
  children: ReactNode;
207
286
  text?: string;
208
287
  hidden?: boolean;
288
+ className?: string;
209
289
  }
210
290
  declare const Status: react.ForwardRefExoticComponent<StatusProps & react.RefAttributes<HTMLDivElement>>;
211
291
 
212
- interface ProgressProps {
213
- progress: number;
292
+ interface ContextMenuProps {
293
+ content: ReactNode;
294
+ children: ReactNode;
295
+ variant?: Variant;
214
296
  color?: string;
297
+ disabled?: boolean;
298
+ onOpenChange?: (open: boolean) => void;
215
299
  }
216
- declare function Progress({ progress, color }: ProgressProps): react_jsx_runtime.JSX.Element;
300
+ declare function ContextMenu({ content, children, variant, color, disabled, onOpenChange }: ContextMenuProps): react_jsx_runtime.JSX.Element;
217
301
 
218
- interface SidebarChild {
219
- title: string;
220
- key: string;
221
- content: ReactNode;
222
- }
223
- interface SidebarProps {
224
- children: SidebarChild[];
225
- sidebar: string | null;
226
- side?: "left" | "right";
302
+ interface DialogProps {
303
+ children: ReactNode;
304
+ open: boolean;
305
+ title?: ReactNode;
306
+ description?: string;
307
+ submitDisabled?: boolean;
308
+ submitText?: string;
309
+ cancelText?: string;
310
+ onStateChange: (open: boolean) => void;
311
+ onSubmit?: (event: MouseEvent$1 | KeyboardEvent) => void | Promise<void>;
312
+ onCancel?: (event: MouseEvent$1 | KeyboardEvent) => void;
313
+ variant?: Variant;
314
+ /**
315
+ * Whether clicking the submit button should close the dialog
316
+ * immediately. Default `true` — wraps the submit button in
317
+ * `AlertDialog.Action`, matching historic behavior. Set `false` for
318
+ * async submit handlers (e.g. delete that hits the network) so the
319
+ * dialog stays open while the work is in flight; the consumer is
320
+ * then responsible for calling `onStateChange(false)` after the
321
+ * promise resolves successfully and leaving the dialog open with an
322
+ * inline error / toast on failure. See `Modal.closeOnSubmitClick`
323
+ * for the same semantics.
324
+ */
325
+ closeOnSubmitClick?: boolean;
227
326
  }
228
- declare function Sidebar({ children, sidebar, side }: SidebarProps): react_jsx_runtime.JSX.Element;
327
+ /**
328
+ * A confirmation/alert dialog built on Radix `AlertDialog`. Mirrors the
329
+ * structure of `Modal` — header (title + optional description + X close),
330
+ * optional body, optional footer (cancel/submit) — and shares its visual
331
+ * language (frosted card, `bg-black/40` overlay, hairline section dividers).
332
+ *
333
+ * Layout sections and dividers:
334
+ * - **Header** is always rendered. It carries title, description (subtitle),
335
+ * and the X close button. Has `border-b` only when a body or footer
336
+ * follows — a header by itself doesn't need a dangling underline.
337
+ * - **Body** is rendered only when `children` is truthy. When absent (the
338
+ * common confirmation-only case), the empty padded area is skipped and
339
+ * no body-adjacent dividers are drawn.
340
+ * - **Footer** is rendered when `onCancel` or `onSubmit` is set. It gets a
341
+ * `border-t` only when a body sits above it; otherwise the header's
342
+ * `border-b` already separates them and a second hairline would read as
343
+ * a double line.
344
+ *
345
+ * @example Confirmation-only (no body)
346
+ * ```tsx
347
+ * <Dialog
348
+ * open={open}
349
+ * onStateChange={setOpen}
350
+ * title="Delete project?"
351
+ * description="This cannot be undone."
352
+ * submitText="Delete"
353
+ * variant={Variant.Error}
354
+ * onSubmit={handleDelete}
355
+ * onCancel={() => setOpen(false)}
356
+ * />
357
+ * ```
358
+ *
359
+ * @example With body content
360
+ * ```tsx
361
+ * <Dialog title="Remove items" submitText="Remove" {...handlers}>
362
+ * <ul className="list-disc pl-5 text-sm">
363
+ * {items.map((i) => <li key={i.id}>{i.name}</li>)}
364
+ * </ul>
365
+ * </Dialog>
366
+ * ```
367
+ */
368
+ declare function Dialog({ children, open, title, description, submitDisabled, submitText, cancelText, onStateChange, onSubmit, onCancel, variant, closeOnSubmitClick, }: DialogProps): react_jsx_runtime.JSX.Element;
229
369
 
230
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
231
- children?: ReactNode;
232
- altText?: string;
233
- disabled?: boolean;
234
- onClick?: MouseEventHandler<HTMLButtonElement>;
370
+ interface DropdownProps {
371
+ trigger: ReactNode;
372
+ children: ReactNode;
235
373
  variant?: Variant;
236
374
  color?: string;
237
- leftIcon?: ReactNode;
238
- rightIcon?: ReactNode;
239
- size?: Size | "fit";
240
- deemphasize?: boolean;
241
- invert?: boolean;
242
- border?: boolean;
243
- submit?: boolean;
375
+ header?: ReactNode;
376
+ side?: "left" | "right" | "top" | "bottom";
377
+ disabled?: boolean;
378
+ open?: boolean;
379
+ onOpenChange?: (open: boolean) => void;
380
+ onTriggerDoubleClick?: MouseEventHandler<HTMLElement>;
381
+ contentClassName?: string;
382
+ scrollOrientation?: "vertical" | "horizontal" | "both";
383
+ matchTriggerWidth?: boolean;
244
384
  }
245
- /**
246
- * A button that displays text and/or icons. If no text and one icon is provided, the button will be a square with padding.
247
- * @param children - The text to display on the button
248
- * @param altText - The alt text to accompany the button
249
- * @param disabled - Whether the button is disabled
250
- * @param onClick - Optional click handler
251
- * @param variant - Optional variant to apply to the button (default is "default")
252
- * @param color - Optional custom color to apply to the button
253
- * @param leftIcon - Optional left icon to add to the button
254
- * @param rightIcon - Optional right icon to add to the button
255
- * @param size - Optional size to apply to the button
256
- * @param deemphasize - Whether to deemphasize the button (subtler background and colored text)
257
- * @param invert - Whether to invert the button colors (no background and colored text)
258
- * @param border - Whether to add a border to the button
259
- */
260
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
385
+ declare const Dropdown: react.ForwardRefExoticComponent<DropdownProps & react.RefAttributes<HTMLButtonElement>>;
261
386
 
262
387
  interface ModalProps {
263
388
  children: ReactNode;
@@ -272,199 +397,386 @@ interface ModalProps {
272
397
  onSubmit?: (event: MouseEvent$1) => void;
273
398
  onCancel?: (event: MouseEvent$1) => void;
274
399
  variant?: Variant;
275
- scrollDisabled?: boolean;
400
+ /**
401
+ * Whether clicking the submit button should close the modal immediately.
402
+ *
403
+ * - `true` (default) — the modal closes synchronously on click, regardless
404
+ * of whether `onSubmit` is sync or async. Suitable for handlers that
405
+ * don't need to keep the modal open (sync state writes, fire-and-forget
406
+ * uploads).
407
+ * - `false` — the modal stays open after the click; the consumer is
408
+ * responsible for eventually calling `onStateChange(false)` (typically
409
+ * after a successful `await` of the submit work). On error, leave the
410
+ * modal open and surface the error inline so the user can retry.
411
+ *
412
+ * Cancel and the X close button always close immediately regardless of
413
+ * this prop — async cancel is rare and "discard my work" should be
414
+ * instant. Use `dismissDisabled` to lock those out during an
415
+ * in-flight submit.
416
+ */
417
+ closeOnSubmitClick?: boolean;
276
418
  }
277
- declare function Modal({ children, open, title, description, headerBottom, dismissDisabled, submitDisabled, submitText, onStateChange, onSubmit, onCancel, variant, scrollDisabled, }: ModalProps): react_jsx_runtime.JSX.Element;
419
+ /**
420
+ * A flexible modal dialog built on base-ui's `Dialog` primitive.
421
+ *
422
+ * Provides a full-screen overlay modal with customisable header, content
423
+ * area, and footer. Includes automatic scroll handling, responsive
424
+ * design, and smooth fade-and-slide animations. Submit/cancel actions
425
+ * are configurable; custom content can be slotted into the header area
426
+ * below the description.
427
+ *
428
+ * Why base-ui (not Radix): Radix's `DismissableLayer` treats clicks
429
+ * inside other portals (e.g. base-ui's `Autocomplete` popup) as
430
+ * "outside", which closed the modal *and* swallowed the popup's option
431
+ * `onClick`. base-ui's `Dialog` and `Autocomplete` coordinate via the
432
+ * `FloatingPortal` machinery and don't have that conflict.
433
+ *
434
+ * Features:
435
+ * - Full-screen dim overlay on every breakpoint; centred card on desktop
436
+ * - Responsive (full-bleed on mobile, fit-to-content on desktop)
437
+ * - Automatic scroll area with header/footer hairline dividers
438
+ * - Header with title, description, X close, and optional `headerBottom`
439
+ * - Optional submit/cancel footer with configurable close semantics
440
+ * - Keyboard (Esc) and click-away dismissal (configurable)
441
+ * - Variant-based styling
442
+ *
443
+ * @example
444
+ * ```tsx
445
+ * <Modal
446
+ * open={isOpen}
447
+ * onStateChange={setIsOpen}
448
+ * title="Edit Settings"
449
+ * description="Modify your application settings below"
450
+ * submitText="Save Changes"
451
+ * onSubmit={() => handleSave()}
452
+ * onCancel={() => setIsOpen(false)}
453
+ * variant={Variant.Primary}
454
+ * >
455
+ * <SettingsForm />
456
+ * </Modal>
457
+ * ```
458
+ */
459
+ declare function Modal({ children, open, title, description, headerBottom, dismissDisabled, submitDisabled, submitText, onStateChange, onSubmit, onCancel, variant, closeOnSubmitClick, }: ModalProps): react_jsx_runtime.JSX.Element;
278
460
 
279
- interface DialogProps {
461
+ interface PopoverProps {
462
+ trigger: ReactNode;
280
463
  children: ReactNode;
281
- open: boolean;
282
- title?: ReactNode;
283
- description?: string;
284
- submitDisabled?: boolean;
285
- submitText?: string;
286
- onStateChange: (open: boolean) => void;
287
- onSubmit?: (event: MouseEvent$1) => void;
288
- onCancel?: (event: MouseEvent$1) => void;
464
+ open?: boolean;
465
+ onStateChange?: (open: boolean) => void;
289
466
  variant?: Variant;
290
467
  }
291
- declare function Dialog({ children, open, title, description, submitDisabled, submitText, onStateChange, onSubmit, onCancel, variant, }: DialogProps): react_jsx_runtime.JSX.Element;
468
+ declare function Popover({ trigger, children, open, onStateChange, variant }: PopoverProps): react_jsx_runtime.JSX.Element;
292
469
 
293
- interface CheckboxProps {
294
- id?: string;
295
- checked: boolean;
296
- onCheckedChange: (checked: boolean) => void;
297
- variant?: Variant;
298
- size?: Size;
470
+ /**
471
+ * @param {string} label - The text to display in the option
472
+ * @param {string} value - The unique key to register and identify the option
473
+ * @param {boolean} disabled - Whether the option is disabled
474
+ * @param {string} color - The color of the option
475
+ * @param {ReactNode} icon - The icon to display in the option
476
+ */
477
+ interface SelectOption {
478
+ label: string;
479
+ value: string;
299
480
  disabled?: boolean;
300
- invert?: boolean;
481
+ color?: string;
482
+ variant?: Variant;
483
+ icon?: ReactNode;
301
484
  }
302
- declare function Checkbox({ id, checked, onCheckedChange, variant, size, disabled, invert, }: CheckboxProps): react_jsx_runtime.JSX.Element;
303
-
304
- interface AnchorProps {
305
- onClick: () => void;
485
+ type SelectVisuals = "icons" | "labels" | "both";
486
+ type SelectSizing = "default" | "inner" | "list-item";
487
+ /**
488
+ * @param {Variant} variant - The variant of the select (defines colors)
489
+ * @param {T} value - The value of the select
490
+ * @param {function} onChange - The function to call when the value changes
491
+ * @param {SelectOption[]} options - The options to display in the select
492
+ * @param {Size} size - The size of the select
493
+ * @param {string} label - The label of the select
494
+ * @param {SelectVisuals} visuals - How the trigger presents selected option data
495
+ */
496
+ interface SelectProps<T extends string | string[]> {
497
+ value?: T;
498
+ onChange: (value: T) => void;
499
+ options: SelectOption[];
500
+ size?: Size;
501
+ sizing?: SelectSizing;
502
+ label?: string;
306
503
  variant?: Variant;
307
- children: string;
504
+ className?: string;
505
+ showChips?: boolean;
506
+ visuals?: SelectVisuals;
507
+ side?: "left" | "right" | "top" | "bottom";
308
508
  }
309
- declare function Anchor({ onClick, variant, children }: AnchorProps): react_jsx_runtime.JSX.Element;
509
+ /**
510
+ * A select component that allows users to choose from a list of options
511
+ * @param {Variant} variant - The variant of the select (defines colors)
512
+ * @param {T} value - The value of the select
513
+ * @param {function} onChange - The function to call when the value changes
514
+ * @param {SelectOption[]} options - The options to display in the select
515
+ * @param {Size} size - The size of the select
516
+ * @param {string} label - The label of the select
517
+ */
518
+ declare function Select<T extends string | string[]>({ value, onChange, options, size, sizing, label, variant, className, showChips, visuals, side, }: SelectProps<T>): react_jsx_runtime.JSX.Element;
310
519
 
311
- interface ImageButtonProps {
312
- imageUrl: string;
313
- altText: string;
314
- hoverText?: string;
315
- dimensions?: {
316
- width: string;
317
- height: string;
318
- };
319
- onClick: () => void;
520
+ /**
521
+ * An Option case for tree-like data
522
+ * @property value - The unique value of the option
523
+ * @property label - The display label of the option
524
+ * @property children - Optional nested children options
525
+ * @property disabled - Whether the option is disabled (disregarded if the option has children);
526
+ * @property variant - The variant style of the option (disregarded if the option has children);
527
+ * @property color - The color style of the option (disregarded if the option has children);
528
+ * @property icon - Optional custom icon to display instead of the default checkbox/indicator
529
+ */
530
+ interface TreeOption {
531
+ value: string;
532
+ label: string;
533
+ children?: TreeOption[];
534
+ disabled?: boolean;
535
+ variant?: Variant;
536
+ color?: string;
537
+ icon?: React.ReactNode;
320
538
  }
321
- declare function ImageButton({ imageUrl, altText, hoverText, dimensions, onClick, }: ImageButtonProps): JSX.Element;
322
-
323
- interface MenuButtonProps {
324
- id: string;
325
- children: ReactNode;
326
- title: ReactNode;
327
- altLabel?: string;
328
- variant?: Variant.Primary | Variant.Secondary | Variant.Tertiary | Variant.Default;
329
- onClick?: MouseEventHandler;
330
- active?: boolean;
331
- status?: {
332
- variant?: Variant;
333
- placement?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
334
- text?: string;
335
- };
336
- hoverable?: boolean;
539
+ interface NestedCheckboxTreeProps {
540
+ variant?: Variant;
541
+ disabled?: boolean;
542
+ onChange?: (values: string[], changes: {
543
+ id: string;
544
+ operation: "add" | "remove";
545
+ }[]) => void;
546
+ values: string[];
547
+ options: TreeOption[];
337
548
  }
338
- declare function MenuButton({ id, children, title, altLabel, variant, onClick, active, status, hoverable, }: MenuButtonProps): react_jsx_runtime.JSX.Element;
549
+ /**
550
+ * A component that renders a nested checkbox tree with hierarchical selection.
551
+ * Groups automatically infer their state from their children.
552
+ */
553
+ declare function NestedCheckboxTree({ variant, disabled, onChange, values, options, }: NestedCheckboxTreeProps): react_jsx_runtime.JSX.Element;
339
554
 
340
- interface AvatarProps {
341
- src?: string;
342
- icon?: React.ReactNode;
343
- alt: string;
555
+ /**
556
+ * Props for the SelectTree component
557
+ * @param {TreeOption[]} options - The tree options to display in the select
558
+ * @param {string[]} value - The selected values
559
+ * @param {function} onChange - The function to call when the value changes
560
+ * @param {Size} size - The size of the select
561
+ * @param {string} label - The label of the select
562
+ * @param {Variant} variant - The variant of the select (defines colors)
563
+ * @param {string} className - Additional CSS classes
564
+ * @param {boolean} showChips - Whether to show chips for selected items
565
+ */
566
+ interface SelectTreeProps {
567
+ options: TreeOption[];
568
+ value: string[];
569
+ onChange: (value: string[], changes: {
570
+ id: string;
571
+ operation: "add" | "remove";
572
+ }[]) => void;
344
573
  size?: Size;
345
- rounded?: boolean;
346
- onClick?: MouseEventHandler<HTMLSpanElement>;
574
+ label?: string;
347
575
  variant?: Variant;
348
- border?: Variant;
349
- noHover?: boolean;
350
- status?: {
351
- variant?: Variant;
352
- placement?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
353
- text?: string;
354
- };
355
576
  className?: string;
577
+ showChips?: boolean;
356
578
  }
357
- declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<HTMLSpanElement>>;
358
-
359
- interface CollapseProps {
360
- title: string | ReactNode;
361
- children: ReactNode;
362
- onStateChange?: (open: boolean) => void;
363
- open?: boolean;
364
- direction?: "vertical" | "horizontal";
365
- disabled?: boolean;
366
- side?: "left" | "right";
367
- }
368
- declare function Collapse({ open, title, onStateChange, children, direction, disabled, side, }: CollapseProps): ReactNode;
369
- declare function CollapsibleContent(props: CollapsibleContentProps): react_jsx_runtime.JSX.Element;
370
- declare function CollapsibleTrigger(props: CollapsibleTriggerProps): react_jsx_runtime.JSX.Element;
371
- declare function CollapsibleRoot(props: CollapsibleProps): react_jsx_runtime.JSX.Element;
372
-
373
- interface AccordionProps {
374
- sticky?: boolean;
375
- stickyOffset?: number;
376
- items: {
377
- header: string;
378
- content: react__default.ReactNode;
379
- key: string;
380
- }[];
381
- defaultOpen?: boolean;
382
- }
383
- declare function Accordion({ items, defaultOpen, sticky, stickyOffset }: AccordionProps): react_jsx_runtime.JSX.Element;
579
+ /**
580
+ * A tree select component that allows hierarchical multi-selection
581
+ */
582
+ declare function SelectTree({ value, onChange, options, size, label, variant, className, showChips, }: SelectTreeProps): react_jsx_runtime.JSX.Element;
384
583
 
385
- interface PopoverProps {
386
- title?: string;
387
- trigger: ReactNode;
584
+ interface SidebarTab {
585
+ key: string;
586
+ title: string;
587
+ icon?: ReactNode;
588
+ variant?: Variant;
388
589
  content: ReactNode;
389
- open?: boolean;
390
- onStateChange?: (open: boolean) => void;
590
+ /** Per-tab footer rendered at the bottom of the content pane. */
591
+ contentFooter?: ReactNode;
592
+ }
593
+ interface SidebarModalProps {
594
+ open: boolean;
595
+ onStateChange: (open: boolean) => void;
596
+ /** Modal title — rendered as the sidebar header. */
597
+ title: string | ReactNode;
598
+ tabs: SidebarTab[];
599
+ /** Controlled selected tab key. */
600
+ selected?: string;
601
+ onTabChange?: (key: string) => void;
602
+ /** Optional bottom-of-sidebar slot (modal-level footer). */
603
+ sidebarFooter?: ReactNode;
604
+ /**
605
+ * Icon shown in the sidebar header when the sidebar is collapsed on
606
+ * desktop. Swaps in for the title text in that one state. Use a small
607
+ * icon (e.g. `<IconSettings className={ICON_CLASS_NAME} />`) — the
608
+ * collapsed rail is narrow.
609
+ */
610
+ collapsedIcon?: ReactNode;
611
+ /**
612
+ * Optional content prepended to the desktop right-click context menu on
613
+ * the sidebar. The expand/collapse toggle is appended after these. Use
614
+ * the project's `Nested*` primitives (e.g. `NestedRadio`, `NestedSelect`,
615
+ * `NestedItem`) so styling matches.
616
+ *
617
+ * The context menu is disabled on mobile.
618
+ */
619
+ contextMenuExtras?: ReactNode;
391
620
  variant?: Variant;
621
+ dismissDisabled?: boolean;
392
622
  }
393
- declare function Popover({ title, trigger, content, open, onStateChange, variant }: PopoverProps): react_jsx_runtime.JSX.Element;
623
+ /**
624
+ * A two-pane modal with a fixed-width sidebar of tabs on the left and the
625
+ * active tab's content on the right. Each tab supplies its own title (used
626
+ * both as the sidebar list label and the content-pane header), content, and
627
+ * optional content footer. The modal-level `sidebarFooter` slot renders below
628
+ * the sidebar tab list — analogous to the action items at the bottom of the
629
+ * main app menu.
630
+ *
631
+ * Built on base-ui's `Dialog` (not Radix). See `Modal` for the rationale —
632
+ * Radix's `DismissableLayer` interferes with base-ui's `Autocomplete`/
633
+ * `Combobox` clicks, which a settings-style modal commonly contains.
634
+ *
635
+ * Layout:
636
+ * - Desktop: both panes side-by-side at equal height. The modal is sized to a
637
+ * viewport-relative `clamp(...)` width so it doesn't reflow when the active
638
+ * tab's content changes; internals can react to the modal's width via
639
+ * container queries (`@container` is set on the content pane body).
640
+ * - Mobile: sidebar fills the modal initially. Tapping a tab drills into the
641
+ * content pane (with a back chevron in its header). X close stays available
642
+ * on both views.
643
+ *
644
+ * Layout responsiveness uses the project's `desktop:` Tailwind variant
645
+ * (= `(width >= 48rem) and (height >= 48rem)`) — no app-level layout atoms
646
+ * are read, so the modal works in any context (Storybook, isolated renders).
647
+ *
648
+ * The sidebar tab buttons render via `MenuButton` inside a local
649
+ * `MenuButtonProvider` so the modal's expand/collapse is independent of the
650
+ * main app menu.
651
+ */
652
+ declare function SidebarModal({ open, onStateChange, title, tabs, selected, onTabChange, sidebarFooter, collapsedIcon, contextMenuExtras, variant, dismissDisabled, }: SidebarModalProps): react_jsx_runtime.JSX.Element;
394
653
 
395
654
  interface TabChild {
396
655
  title: string;
397
656
  key: string;
657
+ variant?: Variant;
658
+ icon?: ReactNode;
398
659
  content: ReactNode;
399
660
  }
400
- interface TabsProps {
661
+ /**
662
+ * Normalises a list of tab children, substituting a placeholder when the list
663
+ * is empty so consumers can always render at least one tab without a special
664
+ * case.
665
+ *
666
+ * @param children - The consumer-provided tabs.
667
+ * @param defaultContent - Body shown for the placeholder when `children` is
668
+ * empty (defaults to a "No Contents" filler).
669
+ * @param emptyTabText - Title shown for the placeholder (defaults to "No tabs").
670
+ *
671
+ * @returns `{ childrenTabs }` — `children` if non-empty, otherwise an array
672
+ * containing a single placeholder tab.
673
+ *
674
+ * @example
675
+ * ```tsx
676
+ * const { childrenTabs } = useTabsState(tabs, <div>Default</div>, "No tabs");
677
+ * ```
678
+ */
679
+ declare function useTabsState(children: TabChild[], _selected: string | undefined, defaultContent?: ReactNode, emptyTabText?: string): {
680
+ childrenTabs: TabChild[];
681
+ };
682
+
683
+ interface TabbedModalProps {
401
684
  children: TabChild[];
685
+ open: boolean;
686
+ title?: string | ReactNode;
687
+ description?: string | ReactNode;
688
+ headerBottom?: ReactNode;
689
+ dismissDisabled?: boolean;
690
+ submitDisabled?: boolean;
691
+ submitText?: string;
692
+ onStateChange: (open: boolean) => void;
693
+ onTabChange?: (selected: string) => void;
402
694
  selected?: string;
403
- onTabChange: (key: string) => void;
404
- leftWidget?: ReactNode;
405
- rightWidget?: ReactNode;
406
- defaultContent?: ReactNode;
407
- emptyTabText?: string;
408
- }
409
- declare function Tabs({ children, selected, onTabChange, leftWidget, rightWidget, defaultContent, emptyTabText, }: TabsProps): ReactNode;
410
-
411
- interface BasicRowData {
412
- id: string;
413
- }
414
- interface ColumnDefinition<T extends BasicRowData> {
415
- key: string;
416
- header: ReactNode;
417
- align?: "left" | "center" | "right";
418
- flex?: boolean;
419
- requiredSize?: Size;
420
- render: (value: T) => ReactNode;
421
- }
422
- interface TableListProps<T extends BasicRowData> {
423
- data: T[];
424
- columns: ColumnDefinition<T>[];
425
- headerOffset?: number;
426
- noHeader?: boolean;
427
- rowClassName?: string;
428
- fullWidth?: boolean;
429
- headerClassName?: string;
430
- backgroundClassName?: string;
431
- notFound?: ReactNode;
432
- onFocusChange?: (focusedRow?: string) => void;
433
- onRowEnter?: (row: string) => void;
434
- onRowClick?: (row: string) => void;
435
- selection?: string[];
436
- transparentHeader?: boolean;
437
- }
438
- declare function TableList<T extends BasicRowData>({ data, columns, headerOffset, noHeader, rowClassName, headerClassName, backgroundClassName, notFound, onFocusChange, onRowEnter, onRowClick, selection, transparentHeader, }: TableListProps<T>): react_jsx_runtime.JSX.Element;
439
-
440
- interface DropdownProps {
441
- trigger: ReactNode;
442
- children: ReactNode;
695
+ onSubmit?: (event: MouseEvent$1) => void;
696
+ onCancel?: (event: MouseEvent$1) => void;
443
697
  variant?: Variant;
444
- header?: ReactNode;
698
+ /** See `Modal.closeOnSubmitClick`. Forwarded as-is. */
699
+ closeOnSubmitClick?: boolean;
445
700
  }
446
- declare const Dropdown: react.ForwardRefExoticComponent<DropdownProps & react.RefAttributes<HTMLButtonElement>>;
701
+ /**
702
+ * A modal dialog with an integrated tabbed interface for organizing content.
703
+ *
704
+ * Composes our `Modal` (base-ui Dialog) with base-ui's `Tabs` primitive: the
705
+ * tab row renders in the modal header below the description, and the modal
706
+ * footer (cancel/submit) applies globally across tabs. Tab content swaps
707
+ * instantly when the selection changes — no slide animation.
708
+ *
709
+ * Features:
710
+ * - Automatic tab state management via `useTabsState`
711
+ * - Tab row rendered in the modal header (below `description`, above any
712
+ * consumer-supplied `headerBottom`)
713
+ * - Icons, labels, or both on tabs
714
+ * - All standard modal functionality (submit/cancel, dismissal, scroll)
715
+ * - Automatic placeholder content when no tabs are provided
716
+ *
717
+ * @example
718
+ * ```tsx
719
+ * const [isOpen, setIsOpen] = useState(false);
720
+ * const tabs = [
721
+ * {
722
+ * key: "general",
723
+ * title: "General Settings",
724
+ * icon: <IconSettings />,
725
+ * content: <GeneralSettingsForm />
726
+ * },
727
+ * {
728
+ * key: "advanced",
729
+ * title: "Advanced",
730
+ * icon: <IconCode />,
731
+ * variant: Variant.Warning,
732
+ * content: <AdvancedSettingsForm />
733
+ * }
734
+ * ];
735
+ *
736
+ * <TabbedModal
737
+ * open={isOpen}
738
+ * onStateChange={setIsOpen}
739
+ * title="Application Settings"
740
+ * description="Configure your application settings"
741
+ * children={tabs}
742
+ * submitText="Save Settings"
743
+ * onSubmit={(event) => handleSave()}
744
+ * onCancel={(event) => setIsOpen(false)}
745
+ * variant={Variant.Primary}
746
+ * />
747
+ * ```
748
+ *
749
+ * @param children - Array of tab objects, each containing key, title, content, and optional icon/variant
750
+ * @param open - Controls whether the modal is visible
751
+ * @param title - Optional title displayed in the modal header
752
+ * @param description - Optional description text below the title
753
+ * @param headerBottom - Optional additional content rendered below tabs but within header area
754
+ * @param dismissDisabled - When true, prevents closing modal via ESC key or click-away
755
+ * @param submitDisabled - When true, disables the submit button
756
+ * @param submitText - Text for the submit button (defaults to "Submit")
757
+ * @param onStateChange - Callback fired when modal should open/close
758
+ * @param onSubmit - Optional callback for submit button click (shows submit button when provided)
759
+ * @param onCancel - Optional callback for cancel button click (shows cancel button when provided)
760
+ * @param variant - Visual variant for styling the modal and buttons
761
+ */
762
+ declare function TabbedModal({ children, open, title, description, headerBottom, dismissDisabled, submitDisabled, submitText, onStateChange, onTabChange, selected, onSubmit, onCancel, variant, closeOnSubmitClick, }: TabbedModalProps): react_jsx_runtime.JSX.Element;
447
763
 
448
764
  interface ToastState {
449
765
  toasts: ToastData[];
450
766
  addToast: (toast: ToastData) => void;
767
+ updateToast: (id: string, data: Partial<ToastData>) => void;
451
768
  removeToast: (id: string) => void;
452
769
  clear: () => void;
453
770
  }
454
771
  declare const ToastContext: react.Context<ToastState>;
455
772
  interface ToastManagerProps {
456
- config?: {
457
- tension: number;
458
- friction: number;
459
- precision: number;
460
- };
461
773
  timeout?: number;
462
774
  children?: ReactNode;
463
775
  }
464
776
  interface ToastData {
465
777
  id: string;
466
778
  title: string;
467
- content: string;
779
+ content?: string;
468
780
  variant?: Variant;
469
781
  dismiss?: {
470
782
  label: string;
@@ -477,175 +789,1228 @@ interface ToastContainerProps {
477
789
  declare function InnerToastManager({ children }: ToastContainerProps): react_jsx_runtime.JSX.Element;
478
790
  declare const ToastManager: react.MemoExoticComponent<typeof InnerToastManager>;
479
791
 
480
- interface ToggleGroupProps {
481
- variant?: Variant;
482
- value: string;
483
- onChange: (value: string) => void;
484
- label?: string;
485
- options: {
486
- label: string;
487
- value: string;
488
- disabled?: boolean;
489
- color?: string;
490
- icon?: ReactNode;
491
- }[];
492
- size?: Size;
493
- }
494
- declare function ToggleGroup({ variant, value, onChange, options, size, label }: ToggleGroupProps): react_jsx_runtime.JSX.Element;
495
-
496
- interface ToggleSquareProps {
792
+ interface TooltipProps {
793
+ content: ReactNode;
794
+ children: ReactNode;
795
+ side?: "top" | "right" | "bottom" | "left";
796
+ controlledState?: [boolean, (value: boolean) => void];
497
797
  variant?: Variant;
498
- value: boolean;
499
798
  disabled?: boolean;
500
- onChange: (value: boolean) => void;
501
- label?: string;
502
- children?: ReactNode;
503
- size?: Size;
799
+ invert?: boolean;
504
800
  }
505
- declare function ToggleSquare({ variant, value, disabled, onChange, size, label, children, }: ToggleSquareProps): react_jsx_runtime.JSX.Element;
801
+ declare function Tooltip({ content, children, side, controlledState, variant, disabled, invert, }: TooltipProps): react_jsx_runtime.JSX.Element;
506
802
 
507
- interface ContextMenuProps {
508
- trigger: ReactNode;
803
+ interface TrackedTooltipHookResult<T extends HTMLElement> {
804
+ /** Styles to apply to the tooltip container (position, transform) */
805
+ floatingStyles: CSSProperties;
806
+ /** Refs to attach to the trigger and floating elements */
807
+ elementRefs: {
808
+ triggerRef: RefObject<T | null>;
809
+ floatingRef: RefObject<HTMLDivElement | null>;
810
+ };
811
+ /** Context containing open state */
812
+ context: {
813
+ open: boolean;
814
+ };
815
+ /** Call on pointer move/leave to update tooltip position and visibility */
816
+ updateHoverState: (x: number | undefined, y: number | undefined, hovering: boolean) => void;
817
+ }
818
+ /**
819
+ * Lightweight cursor-following tooltip hook.
820
+ *
821
+ * Replaces the previous floating-ui based implementation which caused infinite
822
+ * re-render loops under React 19 due to setPositionReference triggering
823
+ * cascading state updates. This version uses direct DOM manipulation for
824
+ * position updates (no React state in the hot path) and only triggers
825
+ * re-renders when hover state transitions (enter/leave).
826
+ */
827
+ declare function useTrackedTooltip<T extends HTMLElement = HTMLElement>(triggerRef: RefObject<T | null>, floatingRef: RefObject<HTMLDivElement | null>, side: "top" | "right" | "bottom" | "left", _axis: "x" | "y" | "both", sideOffset?: number): TrackedTooltipHookResult<T>;
828
+ interface TrackedTooltipProps {
509
829
  children: ReactNode;
830
+ containerStyles: CSSProperties;
510
831
  variant?: Variant;
832
+ open?: boolean;
511
833
  }
512
- declare function ContextMenu({ trigger, children, variant }: ContextMenuProps): react_jsx_runtime.JSX.Element;
834
+ declare const TrackedTooltip: react.ForwardRefExoticComponent<TrackedTooltipProps & react.RefAttributes<HTMLDivElement>>;
513
835
 
514
- interface SeparatorProps {
515
- children?: ReactNode;
516
- variant?: Variant | "custom" | "layout";
517
- color?: string;
518
- orientation?: "horizontal" | "vertical";
519
- className?: string;
836
+ interface ScreenPosition {
837
+ x: number;
838
+ y: number;
839
+ width?: number;
840
+ height?: number;
841
+ }
842
+ interface CoordinateDebugInfo {
843
+ anchorId: string;
844
+ timestamp: number;
845
+ containerRect?: DOMRect;
846
+ canvasRect?: DOMRect;
847
+ worldPosition?: {
848
+ x: number;
849
+ y: number;
850
+ z: number;
851
+ };
852
+ ndcPosition?: {
853
+ x: number;
854
+ y: number;
855
+ z: number;
856
+ };
857
+ canvasPosition?: {
858
+ x: number;
859
+ y: number;
860
+ };
861
+ containerPosition?: {
862
+ x: number;
863
+ y: number;
864
+ };
865
+ frameOffset?: {
866
+ x: number;
867
+ y: number;
868
+ };
869
+ finalPosition?: ScreenPosition;
520
870
  }
521
- declare function Separator({ children, variant, color, orientation, className, }: SeparatorProps): react_jsx_runtime.JSX.Element;
871
+ type AxisMode = "none" | "x" | "y" | "both";
872
+ type TooltipSide = "top" | "right" | "bottom" | "left";
873
+ type OverlayMode = "hover" | "click" | "context-menu";
874
+ interface AnchorConfig {
875
+ id: string;
876
+ ref?: RefObject<THREE.Object3D | null>;
877
+ content: ReactNode | (() => ReactNode);
878
+ positioning: {
879
+ side?: TooltipSide;
880
+ offset?: number;
881
+ axis?: AxisMode;
882
+ clampToViewport?: boolean;
883
+ };
884
+ mode?: OverlayMode;
885
+ interactive?: boolean;
886
+ priority?: number;
887
+ group?: string;
888
+ isAvailable?: () => boolean;
889
+ screenPosition?: ScreenPosition;
890
+ cursorPosition?: ScreenPosition;
891
+ }
892
+ interface VisibilityState {
893
+ visible: boolean;
894
+ triggers: Set<string>;
895
+ lastTrigger?: string;
896
+ priority?: number;
897
+ }
898
+ interface TooltipStore {
899
+ anchors: Map<string, AnchorConfig>;
900
+ triggers: Map<string, Set<string>>;
901
+ positions: Map<string, ScreenPosition>;
902
+ cursorPositions: Map<string, ScreenPosition>;
903
+ visibility: Map<string, VisibilityState>;
904
+ hoveredAnchors: Set<string>;
905
+ _positionUpdateQueue: Map<string, ScreenPosition>;
906
+ _rafId: number | null;
907
+ debugMode: boolean;
908
+ debugHistory: CoordinateDebugInfo[];
909
+ _maxDebugHistory: number;
910
+ registerAnchor: (config: AnchorConfig) => void;
911
+ unregisterAnchor: (id: string) => void;
912
+ updateAnchorPosition: (id: string, position: ScreenPosition) => void;
913
+ updateCursorPosition: (id: string, position: ScreenPosition | null) => void;
914
+ updateAnchorContent: (id: string, content: ReactNode | (() => ReactNode)) => void;
915
+ setAnchorAvailability: (id: string, isAvailable: () => boolean) => void;
916
+ showTooltip: (anchorId: string, triggerId: string) => void;
917
+ hideTooltip: (anchorId: string, triggerId: string) => void;
918
+ toggleTooltip: (anchorId: string, triggerId: string) => void;
919
+ hideAll: () => void;
920
+ dismissOverlay: (anchorId: string) => void;
921
+ updatePositions: (updates: Map<string, ScreenPosition>) => void;
922
+ getVisibleTooltips: () => AnchorConfig[];
923
+ hasInteractiveOverlay: () => boolean;
924
+ isTooltipVisible: (anchorId: string) => boolean;
925
+ getTooltipPosition: (anchorId: string) => ScreenPosition | null;
926
+ getEffectivePosition: (anchorId: string) => ScreenPosition | null;
927
+ enableDebugMode: (enabled: boolean) => void;
928
+ logCoordinateDebug: (info: Partial<CoordinateDebugInfo>) => void;
929
+ getDebugHistory: (anchorId?: string) => CoordinateDebugInfo[];
930
+ clearDebugHistory: () => void;
931
+ }
932
+ declare const useTooltipStore: zustand.UseBoundStore<Omit<Omit<zustand.StoreApi<TooltipStore>, "setState" | "devtools"> & {
933
+ setState(partial: TooltipStore | Partial<TooltipStore> | ((state: TooltipStore) => TooltipStore | Partial<TooltipStore>), replace?: false | undefined, action?: (string | {
934
+ [x: string]: unknown;
935
+ [x: number]: unknown;
936
+ [x: symbol]: unknown;
937
+ type: string;
938
+ }) | undefined): void;
939
+ setState(state: TooltipStore | ((state: TooltipStore) => TooltipStore), replace: true, action?: (string | {
940
+ [x: string]: unknown;
941
+ [x: number]: unknown;
942
+ [x: symbol]: unknown;
943
+ type: string;
944
+ }) | undefined): void;
945
+ devtools: {
946
+ cleanup: () => void;
947
+ };
948
+ }, "subscribe"> & {
949
+ subscribe: {
950
+ (listener: (selectedState: TooltipStore, previousSelectedState: TooltipStore) => void): () => void;
951
+ <U>(selector: (state: TooltipStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
952
+ equalityFn?: ((a: U, b: U) => boolean) | undefined;
953
+ fireImmediately?: boolean;
954
+ } | undefined): () => void;
955
+ };
956
+ }>;
522
957
 
523
- interface NestedItemProps {
524
- left?: ReactNode;
525
- children: ReactNode;
526
- right?: ReactNode;
527
- variant?: Variant;
528
- disabled?: boolean;
529
- onClick?: (event: React.MouseEvent) => void;
958
+ interface UseTooltipAnchorOptions {
959
+ id?: string;
960
+ content: ReactNode | (() => ReactNode);
961
+ axis?: AxisMode;
962
+ offset?: number;
963
+ side?: TooltipSide;
964
+ isAvailable?: () => boolean;
965
+ /** Interaction mode: 'hover' (default), 'click', or 'context-menu'. */
966
+ mode?: OverlayMode;
967
+ /** When true, overlay content receives pointer events. Defaults to true for click/context-menu. */
968
+ interactive?: boolean;
969
+ /** Priority for group-based exclusion (higher wins). */
970
+ priority?: number;
971
+ /** Exclusion group: only highest-priority visible per group. */
972
+ group?: string;
973
+ }
974
+ interface UseTooltipAnchorResult {
975
+ ref: React.RefObject<THREE.Object3D | null>;
976
+ anchorId: string;
977
+ onPointerMove?: (event: ThreeEvent<PointerEvent>) => void;
978
+ onPointerLeave?: () => void;
979
+ /** Returned when mode === 'click'. Toggles overlay visibility. */
980
+ onClick?: (event: ThreeEvent<MouseEvent>) => void;
530
981
  }
531
- declare function NestedItem({ left, children, right, variant, disabled, onClick }: NestedItemProps): react_jsx_runtime.JSX.Element;
982
+ /**
983
+ * Hook to create a tooltip anchor that can be positioned in 3D space.
984
+ *
985
+ * The anchor handles position tracking and coordinate conversion from 3D to screen space.
986
+ * To control tooltip visibility with custom delays, use `useTooltipTrigger` with the returned `anchorId`.
987
+ *
988
+ * @param options Configuration options for the tooltip anchor
989
+ * @returns Anchor reference, ID, and optional event handlers
990
+ *
991
+ * @example
992
+ * ```tsx
993
+ * const { ref, anchorId, onPointerMove, onPointerLeave } = useTooltipAnchor({
994
+ * content: <div>Tooltip content</div>,
995
+ * side: "top"
996
+ * });
997
+ *
998
+ * const { show, hide } = useTooltipTrigger(anchorId, { showDelay: 100 });
999
+ *
1000
+ * <mesh
1001
+ * ref={ref}
1002
+ * onPointerOver={() => show()}
1003
+ * onPointerOut={() => hide()}
1004
+ * onPointerMove={onPointerMove}
1005
+ * onPointerLeave={onPointerLeave}
1006
+ * >
1007
+ * <boxGeometry />
1008
+ * </mesh>
1009
+ * ```
1010
+ */
1011
+ declare function useTooltipAnchor(options: UseTooltipAnchorOptions): UseTooltipAnchorResult;
532
1012
 
533
- interface NestedSeparatorProps {
534
- variant?: Variant;
1013
+ interface UseTooltipTriggerOptions {
1014
+ /** Delay in milliseconds before showing the tooltip. Defaults to 16ms (one frame). */
1015
+ showDelay?: number;
535
1016
  }
536
- declare function NestedSeparator({ variant }: NestedSeparatorProps): react_jsx_runtime.JSX.Element;
537
-
538
- interface NestedRadioProps {
539
- variant?: Variant;
540
- disabled?: boolean;
541
- onChange?: (value: string) => void;
542
- value?: string;
543
- options: {
544
- label: string;
545
- value: string;
546
- disabled?: boolean;
547
- color?: string;
548
- icon?: ReactNode;
549
- }[];
1017
+ interface UseTooltipTriggerResult {
1018
+ show: () => void;
1019
+ hide: () => void;
1020
+ toggle: () => void;
550
1021
  }
551
- declare function NestedRadio({ variant, disabled, onChange, value, options }: NestedRadioProps): react_jsx_runtime.JSX.Element;
1022
+ /**
1023
+ * Hook to control tooltip visibility from any component.
1024
+ * Multiple triggers can control the same tooltip anchor.
1025
+ *
1026
+ * The `showDelay` option is particularly useful for preventing tooltip spam during
1027
+ * rapid mouse movements across multiple interactive elements.
1028
+ *
1029
+ * @param anchorId - The ID of the tooltip anchor to control
1030
+ * @param options - Configuration options for the trigger
1031
+ * @returns Object with show, hide, and toggle functions
1032
+ *
1033
+ * @example
1034
+ * ```tsx
1035
+ * // Basic usage with delay for hover interactions
1036
+ * const { ref, anchorId } = useTooltipAnchor({
1037
+ * content: <ViolationPanel data={violationData} />
1038
+ * });
1039
+ * const { show, hide } = useTooltipTrigger(anchorId, { showDelay: 100 });
1040
+ *
1041
+ * <mesh
1042
+ * ref={ref}
1043
+ * onPointerOver={() => show()}
1044
+ * onPointerOut={() => hide()}
1045
+ * >
1046
+ * <boxGeometry />
1047
+ * </mesh>
1048
+ * ```
1049
+ *
1050
+ * @example
1051
+ * ```tsx
1052
+ * // Different delays for different interaction types
1053
+ * const quickTooltip = useTooltipTrigger(anchorId, { showDelay: 50 }); // Fast for buttons
1054
+ * const slowTooltip = useTooltipTrigger(anchorId, { showDelay: 300 }); // Slow for complex content
1055
+ * const immediateTooltip = useTooltipTrigger(anchorId, { showDelay: 0 }); // Immediate for focus
1056
+ * ```
1057
+ *
1058
+ * @example
1059
+ * ```tsx
1060
+ * // Programmatic control with delay
1061
+ * const { show, hide, toggle } = useTooltipTrigger(anchorId, { showDelay: 150 });
1062
+ *
1063
+ * useEffect(() => {
1064
+ * if (shouldShowTooltip) {
1065
+ * show(); // Will respect the 150ms delay
1066
+ * } else {
1067
+ * hide(); // Always immediate
1068
+ * }
1069
+ * }, [shouldShowTooltip, show, hide]);
1070
+ * ```
1071
+ */
1072
+ declare function useTooltipTrigger(anchorId: string, options?: UseTooltipTriggerOptions): UseTooltipTriggerResult;
552
1073
 
553
- interface NestedSelectProps {
1074
+ interface ShowTooltipOptions {
1075
+ screenPosition?: ScreenPosition;
1076
+ triggerId?: string;
1077
+ }
1078
+ interface UseTooltipControlsResult {
1079
+ showTooltip: (anchorId: string, options?: ShowTooltipOptions) => void;
1080
+ hideTooltip: (anchorId: string) => void;
1081
+ dismissOverlay: (anchorId: string) => void;
1082
+ hideAll: () => void;
1083
+ isVisible: (anchorId: string) => boolean;
1084
+ clearManualPosition: (anchorId: string) => void;
1085
+ }
1086
+ /**
1087
+ * Hook that provides imperative control over tooltips.
1088
+ * Useful for programmatically showing/hiding tooltips without direct user interaction.
1089
+ *
1090
+ * @returns Object with tooltip control functions
1091
+ */
1092
+ declare function useTooltipControls(): UseTooltipControlsResult;
1093
+
1094
+ interface TooltipProviderProps {
1095
+ children: ReactNode;
1096
+ store?: StoreApi<TooltipStore>;
1097
+ }
1098
+ declare const TooltipContext: react.Context<StoreApi<TooltipStore> | null>;
1099
+ /**
1100
+ * Provider component that wraps the application or scene to enable the tooltip system.
1101
+ * This component provides the tooltip store context to all child components.
1102
+ *
1103
+ * @param children - Child components that will have access to the tooltip system
1104
+ * @param store - Optional custom store instance (for testing or multiple contexts)
1105
+ */
1106
+ declare function TooltipProvider({ children, store }: TooltipProviderProps): react_jsx_runtime.JSX.Element;
1107
+ /**
1108
+ * Hook to access the tooltip store from context.
1109
+ * Must be used within a TooltipProvider.
1110
+ *
1111
+ * @returns The tooltip store
1112
+ * @throws Error if used outside of TooltipProvider
1113
+ */
1114
+ declare function useTooltipContext(): StoreApi<TooltipStore>;
1115
+ /**
1116
+ * Hook to use the tooltip store with a selector.
1117
+ * Must be used within a TooltipProvider.
1118
+ *
1119
+ * @param selector - Function to select a slice of the store state
1120
+ * @returns The selected state
1121
+ */
1122
+ declare function useTooltip<T>(selector: (state: TooltipStore) => T): T;
1123
+
1124
+ /**
1125
+ * Portal component that renders all visible overlays (tooltips, popovers, context menus).
1126
+ * Placed at the root level via TooltipHost.
1127
+ */
1128
+ declare function TooltipPortal(): react_jsx_runtime.JSX.Element | null;
1129
+
1130
+ interface TooltipHostProps {
1131
+ children: ReactNode;
1132
+ className?: string;
1133
+ style?: React.CSSProperties;
1134
+ }
1135
+ /**
1136
+ * Component that wraps the Canvas to enable the tooltip system.
1137
+ * This component manages the tooltip portal and handles global events.
1138
+ *
1139
+ * @param children - Should be a Canvas component from @react-three/fiber
1140
+ * @param className - Optional CSS class for the wrapper
1141
+ * @param style - Optional inline styles for the wrapper
1142
+ */
1143
+ declare function TooltipHost({ children, className, style }: TooltipHostProps): react_jsx_runtime.JSX.Element;
1144
+ /**
1145
+ * Higher-order component that wraps a Canvas component with TooltipHost.
1146
+ * Useful for adding tooltip support to existing Canvas components.
1147
+ *
1148
+ * @param CanvasComponent - The Canvas component to wrap
1149
+ * @returns Wrapped Canvas component with tooltip support
1150
+ */
1151
+ declare function withTooltipHost<P extends object>(CanvasComponent: React.ComponentType<P>): React.ComponentType<P & {
1152
+ tooltipHostClassName?: string;
1153
+ tooltipHostStyle?: React.CSSProperties;
1154
+ }>;
1155
+
1156
+ interface TooltipHostContextValue {
1157
+ containerRef: RefObject<HTMLDivElement | null>;
1158
+ frameOffset: {
1159
+ x: number;
1160
+ y: number;
1161
+ };
1162
+ parentContext?: TooltipHostContextValue | null;
1163
+ level: number;
1164
+ }
1165
+ /**
1166
+ * Hook to access the tooltip host context (for iframe positioning support).
1167
+ * Returns null if not within a TooltipHost.
1168
+ */
1169
+ declare function useTooltipHost(): TooltipHostContextValue | null;
1170
+ /**
1171
+ * Hook to get the root (outermost) tooltip host context.
1172
+ * This is useful for finding the best portal root for rendering tooltips.
1173
+ */
1174
+ declare function useRootTooltipHost(): TooltipHostContextValue | null;
1175
+
1176
+ interface TooltipDebugProps {
1177
+ className?: string;
1178
+ maxHistoryEntries?: number;
1179
+ showVisualIndicators?: boolean;
1180
+ }
1181
+ /**
1182
+ * Debug overlay component for the tooltip system.
1183
+ * Shows coordinate transformation data and visual indicators for tooltip positions.
1184
+ * Only renders when debug mode is enabled.
1185
+ */
1186
+ declare function TooltipDebug({ className, maxHistoryEntries, showVisualIndicators, }: TooltipDebugProps): react_jsx_runtime.JSX.Element;
1187
+
1188
+ interface CanvasContextMenuContext {
1189
+ /** World-space intersection point from R3F raycaster. */
1190
+ worldPosition: [number, number, number];
1191
+ /** Screen position relative to the overlay host container. */
1192
+ screenPosition: ScreenPosition;
1193
+ }
1194
+ interface UseCanvasContextMenuOptions {
1195
+ /** Stable ID for the anchor. Auto-generated if omitted. */
1196
+ id?: string;
1197
+ /** Menu content builder. Receives the right-click context (world position, screen position). */
1198
+ items: (ctx: CanvasContextMenuContext) => ReactNode;
1199
+ /** Exclusion group for priority-based filtering. */
1200
+ group?: string;
1201
+ /** Priority within the group (higher wins). */
1202
+ priority?: number;
1203
+ }
1204
+ interface UseCanvasContextMenuResult {
1205
+ /** Attach to an R3F mesh's onContextMenu prop. */
1206
+ onContextMenu: (event: ThreeEvent<PointerEvent>) => void;
1207
+ /** The anchor ID, for imperative control if needed. */
1208
+ anchorId: string;
1209
+ }
1210
+ /**
1211
+ * Hook for right-click context menus on R3F meshes.
1212
+ *
1213
+ * Registers a context-menu anchor in the overlay store and returns an
1214
+ * `onContextMenu` handler to attach to any R3F mesh. When triggered,
1215
+ * the handler captures the world-space intersection point and screen
1216
+ * position, then shows an interactive menu at the cursor location.
1217
+ *
1218
+ * @example
1219
+ * ```tsx
1220
+ * const { onContextMenu } = useCanvasContextMenu({
1221
+ * items: (ctx) => (
1222
+ * <>
1223
+ * <NestedItem onClick={() => paste(ctx.worldPosition)}>Paste</NestedItem>
1224
+ * </>
1225
+ * ),
1226
+ * });
1227
+ *
1228
+ * <mesh onContextMenu={onContextMenu}>
1229
+ * <planeGeometry />
1230
+ * </mesh>
1231
+ * ```
1232
+ */
1233
+ declare function useCanvasContextMenu(options: UseCanvasContextMenuOptions): UseCanvasContextMenuResult;
1234
+
1235
+ declare function stampToVisualTime(stamp: number, _duration: number, framerate: number, timeDisplay: TimeDisplay, showDetail?: boolean): string;
1236
+
1237
+ /**
1238
+ * Default icon size class for controls/indicators across the UI package.
1239
+ * This scales relative to the parent container, so it works across button/input sizes.
1240
+ */
1241
+ declare const ICON_CLASS_NAME = "icon-standard";
1242
+ declare const ICON_LG_CLASS_NAME = "icon-larger";
1243
+
1244
+ /**
1245
+ * Layout state read by `MenuButton` to drive its expand/collapse behavior and
1246
+ * tooltip suppression. The context is required — `MenuButton` always reads
1247
+ * from it, and consumers pick the source of truth at the Provider site:
1248
+ *
1249
+ * - The main app menu wraps its `MenuButton`s in a Provider that pipes the
1250
+ * global jotai atoms (`useMenuState()` / `useDesktopState()`) through.
1251
+ * - Modal sidebars (e.g. `SidebarModal`) wrap their `MenuButton`s in a
1252
+ * Provider whose values are local component state, so the modal's sidebar
1253
+ * expand/collapse is independent of the app menu.
1254
+ */
1255
+ interface MenuButtonContextValue {
1256
+ /** Whether the surrounding menu is in its labels-visible state. */
1257
+ expanded: boolean;
1258
+ /** Whether the layout is desktop-sized (controls tooltip side, etc.). */
1259
+ desktop: boolean;
1260
+ /**
1261
+ * Tailwind class applied to the `MenuButton` element when expanded.
1262
+ * The main menu uses `desktop:group-data-expanded/menu:w-47` (rigid).
1263
+ * Sidebars that should size to content use `desktop:group-data-expanded/menu:w-auto`.
1264
+ */
1265
+ expandedWidthClassName: string;
1266
+ /**
1267
+ * Tailwind class applied to the inner label `<span>` when expanded.
1268
+ * The main menu uses `w-37.5` (rigid). Content-sized sidebars pass `""`.
1269
+ */
1270
+ expandedLabelClassName: string;
1271
+ }
1272
+ declare function MenuButtonProvider({ value, children, }: {
1273
+ value: MenuButtonContextValue;
1274
+ children: ReactNode;
1275
+ }): react_jsx_runtime.JSX.Element;
1276
+ declare function useMenuButtonContext(): MenuButtonContextValue;
1277
+
1278
+ /**
1279
+ * Standard interface for components that might need tooltip context
1280
+ */
1281
+ interface WithTooltipContextProps {
1282
+ /** Skip providing tooltip context (assume parent provides) */
1283
+ skipTooltipContext?: boolean;
1284
+ }
1285
+
1286
+ /**
1287
+ * Types of nested parent components.
1288
+ *
1289
+ * Includes Context and Dropdown parents
1290
+ */
1291
+ declare enum NestedParent {
1292
+ /**
1293
+ * Parent is a context component.
1294
+ */
1295
+ Context = "context",
1296
+ /**
1297
+ * Parent is a dropdown component.
1298
+ */
1299
+ Dropdown = "dropdown"
1300
+ }
1301
+ /**
1302
+ * @prop value: The value of the checkbox.
1303
+ * @prop label: The label for the checkbox.
1304
+ * @prop variant: The variant of the checkbox. Defaults to {@link Variant.Default}
1305
+ * @prop onChange: The function to call when the checkbox changes.
1306
+ * @prop closeOnSelect: Whether toggling the item closes the menu (defaults to true).
1307
+ * @prop color: The color of the checkbox. Overridees styling from variants.
1308
+ * @prop disabled: Whether the checkbox is disabled.
1309
+ * @prop icon: The icon to display next to the checkbox.
1310
+ */
1311
+ interface NestedCheckboxProps {
1312
+ value: boolean;
1313
+ label: string;
554
1314
  variant?: Variant;
1315
+ onChange?: (value: boolean) => void;
1316
+ closeOnSelect?: boolean;
1317
+ color?: string;
555
1318
  disabled?: boolean;
556
- onChange?: (value: string[]) => void;
557
- values: string[];
558
- options: {
559
- label: string;
560
- value: string;
561
- disabled?: boolean;
562
- color?: string;
563
- icon?: ReactNode;
564
- }[];
1319
+ icon?: ReactNode;
565
1320
  }
566
- declare function NestedSelect({ variant, disabled, onChange, values, options }: NestedSelectProps): react_jsx_runtime.JSX.Element;
567
-
1321
+ /**
1322
+ * @prop value: The color in either {@link RawColor or string format}.
1323
+ * @prop onChange: The function to call when the color changes.
1324
+ * @prop disabled: Whether the color picker is disabled.
1325
+ * @prop label: The label for the color picker.
1326
+ * @prop variant: The variant of the color picker. Defaults to {@link Variant.Default}
1327
+ */
1328
+ interface NestedColorPickerProps<T extends string | RawColor> {
1329
+ value: T;
1330
+ onChange: (value: T) => void;
1331
+ disabled?: boolean;
1332
+ label?: string;
1333
+ variant?: Variant;
1334
+ left?: ReactNode;
1335
+ }
1336
+ /**
1337
+ * @prop left: The left-side icon or element.
1338
+ * @prop children: The content of the item (usually text).
1339
+ * @prop right: The right-side icon or element.
1340
+ * @prop variant: The variant of the menu item. Defaults to {@link Variant.Default}
1341
+ * @prop disabled: Whether the menu is disabled.
1342
+ * @prop onClick: The function to call when the item is clicked.
1343
+ * @prop closeOnSelect: Whether selecting the item closes the menu (defaults to true).
1344
+ */
1345
+ interface NestedItemProps {
1346
+ left?: ReactNode;
1347
+ children: ReactNode;
1348
+ right?: ReactNode;
1349
+ variant?: Variant;
1350
+ disabled?: boolean;
1351
+ onClick?: (event: MouseEvent$1) => void;
1352
+ closeOnSelect?: boolean;
1353
+ /** Test ID for E2E targeting of portal-rendered dropdown items. */
1354
+ testId?: string;
1355
+ }
1356
+ /**
1357
+ * @prop children: The content of the element.
1358
+ * @prop className: The class name for the wrapper of the element.
1359
+ */
1360
+ interface NestedStaticProps {
1361
+ children: ReactNode;
1362
+ className?: string;
1363
+ }
1364
+ /**
1365
+ * @prop children: The content of the label.
1366
+ * @prop className: The class name for the label.
1367
+ */
1368
+ interface NestedLabelProps {
1369
+ children: ReactNode;
1370
+ className?: string;
1371
+ }
1372
+ /**
1373
+ * @prop left: The left-side icon or element.
1374
+ * @prop children: The content of the menu item.
1375
+ * @prop label: The label for the menu.
1376
+ * @prop variant: The variant of the menu item. Defaults to {@link Variant.Default}
1377
+ * @prop disabled: Whether the menu is disabled.
1378
+ * @prop hideHeader: Whether to hide the header of the menu.
1379
+ */
568
1380
  interface NestedMenuProps {
569
1381
  left?: ReactNode;
570
1382
  children: ReactNode;
571
1383
  label?: string;
572
1384
  variant?: Variant;
573
- labelVariant?: Variant;
574
1385
  disabled?: boolean;
1386
+ hideHeader?: boolean;
575
1387
  }
576
- declare function NestedMenu({ left, children, label, variant, labelVariant, disabled, }: NestedMenuProps): react_jsx_runtime.JSX.Element;
1388
+ /**
1389
+ * @prop label: [string] The label for the option
1390
+ * @prop value: [string] The value for the option. This should match the value specified.
1391
+ * @prop disabled: [boolean] Whether the option is disabled.
1392
+ * @prop closeOnSelect: [boolean] Have the menu close after selecting this option
1393
+ * @prop variant: [Variant] The variant of the option. Defaults to {@link Variant.Default}
1394
+ * @prop color: [string] The color of the option. Overrides styling from variants.
1395
+ * @prop icon: [ReactNode] The icon to display next to the option.
1396
+ */
1397
+ interface NestedOption {
1398
+ label: string;
1399
+ value: string;
1400
+ disabled?: boolean;
1401
+ closeOnSelect?: boolean;
1402
+ variant?: Variant;
1403
+ color?: string;
1404
+ icon?: ReactNode;
1405
+ }
1406
+ /**
1407
+ * @prop variant: The variant of the radio collection. Defaults to {@link Variant.Default}
1408
+ * @prop disabled: Whether the radio collection is disabled.
1409
+ * @prop onChange: The function to call when the radio collection changes.
1410
+ * @prop value: The value of the radio collection.
1411
+ * @prop options: The options for the radio collection (see {@link NestedOption}).
1412
+ */
1413
+ interface NestedRadioProps {
1414
+ variant?: Variant;
1415
+ disabled?: boolean;
1416
+ onChange?: (value: string) => void;
1417
+ value?: string;
1418
+ options: NestedOption[];
1419
+ }
1420
+ /**
1421
+ * @prop variant: The variant of the select collection. Defaults to {@link Variant.Default}
1422
+ * @prop disabled: Whether the select collection is disabled.
1423
+ * @prop onChange: The function to call when the select collection changes.
1424
+ * @prop values: The values of the select collection.
1425
+ * @prop options: The options for the select collection (see {@link NestedOption}).
1426
+ */
1427
+ interface NestedSelectProps {
1428
+ variant?: Variant;
1429
+ disabled?: boolean;
1430
+ onChange?: (value: string[]) => void;
1431
+ values: string[];
1432
+ options: NestedOption[];
1433
+ }
1434
+ /**
1435
+ * @prop variant: The variant of the separator. Defaults to {@link Variant.Default}
1436
+ */
1437
+ interface NestedSeparatorProps {
1438
+ variant?: Variant;
1439
+ }
1440
+ type ConfiguredNestedMenu = Omit<NestedMenuProps, "children"> & {
1441
+ id: string;
1442
+ children: ConfiguredNestedChild[];
1443
+ };
1444
+ type ConfiguredNestedChild = (NestedCheckboxProps & {
1445
+ type: "checkbox";
1446
+ id: string;
1447
+ }) | (NestedItemProps & {
1448
+ type: "item";
1449
+ id: string;
1450
+ }) | (NestedLabelProps & {
1451
+ type: "label";
1452
+ id: string;
1453
+ }) | (ConfiguredNestedMenu & {
1454
+ type: "menu";
1455
+ children: ConfiguredNestedChild[];
1456
+ }) | (NestedRadioProps & {
1457
+ type: "radio";
1458
+ id: string;
1459
+ }) | (NestedSelectProps & {
1460
+ type: "select";
1461
+ id: string;
1462
+ }) | (NestedSeparatorProps & {
1463
+ type: "separator";
1464
+ id: string;
1465
+ }) | (NestedStaticProps & {
1466
+ type: "static";
1467
+ id: string;
1468
+ });
577
1469
 
578
- interface NestedLabelProps {
1470
+ interface ActionItemPlaceholder {
1471
+ id: string;
1472
+ type: "placeholder";
1473
+ }
1474
+ type ActionItem = ConfiguredNestedMenu | ActionItemPlaceholder;
1475
+ declare const isPlaceholder: (item: Partial<ActionItem> | ActionItem) => item is ActionItemPlaceholder;
1476
+
1477
+ declare const menuStateAtom: jotai.PrimitiveAtom<boolean> & {
1478
+ init: boolean;
1479
+ };
1480
+ declare const panesAtom: jotai.PrimitiveAtom<PaneSpec[]> & {
1481
+ init: PaneSpec[];
1482
+ };
1483
+ declare const toolbarItemsAtom: jotai.PrimitiveAtom<ToolbarItem[]> & {
1484
+ init: ToolbarItem[];
1485
+ };
1486
+ declare const actionItemsAtom: jotai.PrimitiveAtom<ActionItem[]> & {
1487
+ init: ActionItem[];
1488
+ };
1489
+ declare const homeActionItemAtom: jotai.PrimitiveAtom<ActionItem | undefined> & {
1490
+ init: ActionItem | undefined;
1491
+ };
1492
+ declare const desktopAtom: jotai.PrimitiveAtom<boolean> & {
1493
+ init: boolean;
1494
+ };
1495
+ declare const activeLeftPaneAtom: jotai.Atom<string | undefined>;
1496
+ declare const activeRightPaneAtom: jotai.Atom<string | undefined>;
1497
+ declare const leftRegionActiveAtom: jotai.Atom<boolean>;
1498
+ declare const rightRegionActiveAtom: jotai.Atom<boolean>;
1499
+ declare const footerRegionActiveAtom: jotai.Atom<boolean>;
1500
+ declare const leftWidthAtom: jotai.Atom<string>;
1501
+ declare const rightWidthAtom: jotai.Atom<string>;
1502
+ declare const rightPaneIdsAtom: jotai.Atom<string[]>;
1503
+ declare const contentWidthAtom: jotai.Atom<string>;
1504
+ declare const leftMenuItemsAtom: jotai.Atom<PaneSpec[]>;
1505
+ declare const rightMenuItemsAtom: jotai.Atom<PaneSpec[]>;
1506
+ declare function useMenuState(): boolean;
1507
+ declare function usePanes(): PaneSpec[];
1508
+ declare function useToolbarItems(): ToolbarItem[];
1509
+ declare function useActionItems(): ActionItem[];
1510
+ declare function useHomeActionItem(): ActionItem | undefined;
1511
+ declare function useLeftMenuItems(): PaneSpec[];
1512
+ declare function useRightMenuItems(): PaneSpec[];
1513
+ declare function useRightPaneIds(): string[];
1514
+ declare function useLeftWidth(): string;
1515
+ declare function useRightWidth(): string;
1516
+ declare function useContentWidth(): string;
1517
+ declare function useActiveLeftPane(): string | undefined;
1518
+ declare function useActiveRightPane(): string | undefined;
1519
+ declare function useLeftRegionActive(): boolean;
1520
+ declare function useRightRegionActive(): boolean;
1521
+ declare function useFooterRegionActive(): boolean;
1522
+ declare function useDesktopState(): boolean;
1523
+
1524
+ /**
1525
+ * A hook used to add a toast to the toast context. Must be used within a ToastManager context.
1526
+ * @returns A function that adds a toast to the toast context.
1527
+ */
1528
+ declare function useAddToast(): (data: ToastData) => void;
1529
+
1530
+ /**
1531
+ * Custom hook to detect clicks outside a specified element.
1532
+ * @param onClickAway - A callback function triggered when a click outside the element occurs.
1533
+ * @param ref - An optional ref to be attached to the element you want to monitor.
1534
+ */
1535
+ declare function useClickAway<T extends HTMLElement | null>(ref: React.RefObject<T>, onClickAway: (event: MouseEvent | TouchEvent) => void): void;
1536
+
1537
+ declare function useDelayedBoolean(value: boolean, timeoutDuration: number): boolean;
1538
+
1539
+ type ActionItemInput = ActionItem | ActionItemPlaceholder | (Partial<ActionItem> & {
1540
+ id: string;
1541
+ });
1542
+ /**
1543
+ * LayoutActions interface defines the actions that can be performed on the layout.
1544
+ * @param setPane - Function to set a single pane's data.
1545
+ * @param setPanes - Function to set multiple panes' data.
1546
+ * @param removePane - Function to remove a single pane.
1547
+ * @param setToolbarItem - Function to set a single toolbar item.
1548
+ * @param setToolbarItems - Function to set multiple toolbar items.
1549
+ * @param removeToolbarItem - Function to remove a single toolbar item.
1550
+ * @param setActionItem - Function to set a single action item.
1551
+ * @param setActionItems - Function to set multiple action items.
1552
+ * @param removeActionItem - Function to remove a single action item.
1553
+ * @param setHomeActionItem - Function to set the home action item.
1554
+ * @param toggleMenu - Function to toggle the menu's width.
1555
+ * @param togglePaneRegion - Function to toggle a pane region.
1556
+ * @param completePanesClose - [INTERNAL ONLY] Function to complete the panes close.
1557
+ */
1558
+ interface LayoutActions {
1559
+ setPane: (pane: PaneSpec | Partial<PaneSpec>) => void;
1560
+ setPanes: (panes: (PaneSpec | Partial<PaneSpec>)[], replace?: boolean) => void;
1561
+ removePane: (id: string) => void;
1562
+ removePanes: (ids: string[]) => void;
1563
+ setToolbarItem: (item: Partial<ToolbarItem> & {
1564
+ id: string;
1565
+ type: "toolbar-widget" | "toolbar-spacer";
1566
+ }) => void;
1567
+ setToolbarItems: (items: (Partial<ToolbarItem> & {
1568
+ id: string;
1569
+ type: "toolbar-widget" | "toolbar-spacer";
1570
+ })[], replace?: boolean) => void;
1571
+ removeToolbarItem: (id: string) => void;
1572
+ setActionItem: (item: ActionItemInput, index?: number) => void;
1573
+ setActionItems: (panes: ActionItemInput[], replace?: boolean) => void;
1574
+ removeActionItem: (id: string) => void;
1575
+ setHomeActionItem: (item: ActionItem | undefined) => void;
1576
+ toggleMenu: () => void;
1577
+ togglePaneRegion: (pane: PaneRegion, id: string, preventSameClose?: boolean) => void;
1578
+ completePanesClose: () => void;
1579
+ }
1580
+ /**
1581
+ * Returns {@link LayoutActions}
1582
+ */
1583
+ declare function useLayoutActions(): LayoutActions;
1584
+
1585
+ interface LayoutState {
1586
+ desktop: boolean;
1587
+ menuExpanded: boolean;
1588
+ leftWidth: string;
1589
+ rightWidth: string;
1590
+ contentWidth: string;
1591
+ leftRegionActive: boolean;
1592
+ rightRegionActive: boolean;
1593
+ footerRegionActive: boolean;
1594
+ }
1595
+ declare function useLayoutState(): LayoutState;
1596
+
1597
+ /**
1598
+ * Custom hook that returns the preferred system theme.
1599
+ *
1600
+ * @returns The preferred system theme, either `Theme.Dark` or `Theme.Light`.
1601
+ */
1602
+ declare function useSystemThemePreference(): Theme.Dark | Theme.Light;
1603
+
1604
+ interface ThemeProviderProps {
579
1605
  children: ReactNode;
580
1606
  }
581
- declare function NestedLabel({ children }: NestedLabelProps): react_jsx_runtime.JSX.Element;
1607
+ interface ThemeContextValue {
1608
+ explicitTheme: Theme;
1609
+ systemPreference: Theme;
1610
+ setExplicitTheme: (theme: Theme) => void;
1611
+ resolvedTheme: Theme.Dark | Theme.Light;
1612
+ }
1613
+ /**
1614
+ * The context for managing the theme in the application.
1615
+ */
1616
+ declare const ThemeContext: react.Context<ThemeContextValue>;
582
1617
 
583
- interface NestedColorPickerProps<T extends string | RawColor> {
584
- value: T;
585
- onChange: (value: T) => void;
1618
+ declare function useTheme(): ThemeContextValue;
1619
+
1620
+ declare const Angle: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1621
+
1622
+ declare const Bounce: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1623
+
1624
+ declare const IconBox: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1625
+
1626
+ declare const IconBoxPlus: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1627
+
1628
+ declare const Eye: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1629
+
1630
+ declare const EyeOff: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1631
+
1632
+ declare const Fast: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1633
+
1634
+ declare const IconFileTypeAni: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1635
+
1636
+ declare const IconFileTypeMod: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1637
+
1638
+ declare const IconFileTypeFace: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1639
+
1640
+ declare const IconFilterBox: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1641
+
1642
+ declare const IconFilterX: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1643
+
1644
+ interface IconGraphViewProps extends IconProps$1 {
1645
+ className?: string;
1646
+ }
1647
+ declare const IconGraphView: react.ForwardRefExoticComponent<IconGraphViewProps & react.RefAttributes<SVGSVGElement>>;
1648
+
1649
+ interface IconHandleIndicatorProps extends IconProps$1 {
1650
+ className?: string;
1651
+ fillOpacity?: number;
1652
+ handle: "diamond" | "circle" | "indeterminate";
1653
+ }
1654
+ declare const IconHandleIndicator: react.ForwardRefExoticComponent<IconHandleIndicatorProps & react.RefAttributes<SVGSVGElement>>;
1655
+
1656
+ declare const IconHome: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1657
+
1658
+ interface IconKeyProps extends IconProps$1 {
1659
+ fillOpacity?: number;
1660
+ dashed?: boolean;
1661
+ center?: "plus" | "minus";
1662
+ }
1663
+ declare const IconKey: react.ForwardRefExoticComponent<IconKeyProps & react.RefAttributes<SVGSVGElement>>;
1664
+
1665
+ declare const IconKeyOutline: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1666
+
1667
+ declare const IconKeyOutlineDash: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1668
+
1669
+ declare const Lock: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1670
+
1671
+ declare const LockOff: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1672
+
1673
+ declare const MovePlayerEndBounds: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1674
+
1675
+ declare const MovePlayhead: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1676
+
1677
+ interface IconNormalizedProps extends IconProps$1 {
1678
+ fillOpacity?: number;
1679
+ dashed?: boolean;
1680
+ center?: "play" | "pause";
1681
+ }
1682
+ declare const IconNormalized: react.ForwardRefExoticComponent<IconNormalizedProps & react.RefAttributes<SVGSVGElement>>;
1683
+
1684
+ interface IconPlayPauseProps extends IconProps$1 {
1685
+ fillOpacity?: number;
1686
+ dashed?: boolean;
1687
+ center?: "play" | "pause";
1688
+ }
1689
+ declare const IconPlayPause: react.ForwardRefExoticComponent<IconPlayPauseProps & react.RefAttributes<SVGSVGElement>>;
1690
+
1691
+ declare const PlayerEndBounds: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1692
+
1693
+ declare const IconPlayerNextKey: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1694
+
1695
+ declare const IconPlayerPlay: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1696
+
1697
+ declare const IconPlayerPlay2: react.ForwardRefExoticComponent<IconProps$1 & react.RefAttributes<SVGSVGElement>>;
1698
+
1699
+ interface IconProjectProps extends IconProps$1 {
1700
+ className?: string;
1701
+ }
1702
+ declare const IconProject: react.ForwardRefExoticComponent<IconProjectProps & react.RefAttributes<SVGSVGElement>>;
1703
+
1704
+ interface IconPreviewViewProps extends IconProps$1 {
1705
+ className?: string;
1706
+ }
1707
+ declare const IconPreviewView: react.ForwardRefExoticComponent<IconPreviewViewProps & react.RefAttributes<SVGSVGElement>>;
1708
+
1709
+ interface IconRobotProps extends IconProps$1 {
1710
+ className?: string;
1711
+ }
1712
+ declare const IconRobot: react.ForwardRefExoticComponent<IconRobotProps & react.RefAttributes<SVGSVGElement>>;
1713
+
1714
+ interface IconRobotPlusProps extends IconProps$1 {
1715
+ className?: string;
1716
+ }
1717
+ declare const IconRobotPlus: react.ForwardRefExoticComponent<IconRobotPlusProps & react.RefAttributes<SVGSVGElement>>;
1718
+
1719
+ declare const SelectClose: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1720
+
1721
+ declare const SelectCursor: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1722
+
1723
+ declare const Slow: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1724
+
1725
+ declare const Speaker: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1726
+
1727
+ declare const SpeakerOff: ForwardRefExoticComponent<IconProps & RefAttributes<SVGSVGElement>>;
1728
+
1729
+ interface StaticIconProps {
1730
+ children: ReactNode;
1731
+ variant?: Variant;
1732
+ color?: string;
1733
+ size?: Size | "fit";
1734
+ deemphasize?: boolean;
1735
+ className?: string;
1736
+ }
1737
+ declare function StaticIcon({ children, variant, size, color, deemphasize, className, }: StaticIconProps): react_jsx_runtime.JSX.Element;
1738
+
1739
+ interface IconVectorAngledProps extends IconProps$1 {
1740
+ className?: string;
1741
+ }
1742
+ declare const IconVectorAngled: react.ForwardRefExoticComponent<IconVectorAngledProps & react.RefAttributes<SVGSVGElement>>;
1743
+
1744
+ interface IconVectorBezierProps extends IconProps$1 {
1745
+ className?: string;
1746
+ }
1747
+ declare const IconVectorBezier: react.ForwardRefExoticComponent<IconVectorBezierProps & react.RefAttributes<SVGSVGElement>>;
1748
+
1749
+ interface IconVectorBezierAutoClampProps extends IconProps$1 {
1750
+ className?: string;
1751
+ }
1752
+ declare const IconVectorBezierAutoClamp: react.ForwardRefExoticComponent<IconVectorBezierAutoClampProps & react.RefAttributes<SVGSVGElement>>;
1753
+
1754
+ interface IconVectorBezierHandlesProps extends IconProps$1 {
1755
+ className?: string;
1756
+ }
1757
+ declare const IconVectorBezierHandles: react.ForwardRefExoticComponent<IconVectorBezierHandlesProps & react.RefAttributes<SVGSVGElement>>;
1758
+
1759
+ interface IconVectorBezierInsertFlatProps extends IconProps$1 {
1760
+ className?: string;
1761
+ }
1762
+ declare const IconVectorBezierInsertFlat: react.ForwardRefExoticComponent<IconVectorBezierInsertFlatProps & react.RefAttributes<SVGSVGElement>>;
1763
+
1764
+ interface IconVectorBezierInsertSlopedProps extends IconProps$1 {
1765
+ className?: string;
1766
+ }
1767
+ declare const IconVectorBezierInsertSloped: react.ForwardRefExoticComponent<IconVectorBezierInsertSlopedProps & react.RefAttributes<SVGSVGElement>>;
1768
+
1769
+ interface IconVectorTransitionCurveProps extends IconProps$1 {
1770
+ className?: string;
1771
+ }
1772
+ declare const IconVectorLinear: react.ForwardRefExoticComponent<IconVectorTransitionCurveProps & react.RefAttributes<SVGSVGElement>>;
1773
+ declare const IconVectorSine: react.ForwardRefExoticComponent<IconVectorTransitionCurveProps & react.RefAttributes<SVGSVGElement>>;
1774
+ declare const IconVectorQuad: react.ForwardRefExoticComponent<IconVectorTransitionCurveProps & react.RefAttributes<SVGSVGElement>>;
1775
+ declare const IconVectorCubic: react.ForwardRefExoticComponent<IconVectorTransitionCurveProps & react.RefAttributes<SVGSVGElement>>;
1776
+ declare const IconVectorQuart: react.ForwardRefExoticComponent<IconVectorTransitionCurveProps & react.RefAttributes<SVGSVGElement>>;
1777
+ declare const IconVectorQuint: react.ForwardRefExoticComponent<IconVectorTransitionCurveProps & react.RefAttributes<SVGSVGElement>>;
1778
+ declare const IconVectorCirc: react.ForwardRefExoticComponent<IconVectorTransitionCurveProps & react.RefAttributes<SVGSVGElement>>;
1779
+ declare const IconVectorExpo: react.ForwardRefExoticComponent<IconVectorTransitionCurveProps & react.RefAttributes<SVGSVGElement>>;
1780
+ declare const IconVectorBack: react.ForwardRefExoticComponent<IconVectorTransitionCurveProps & react.RefAttributes<SVGSVGElement>>;
1781
+
1782
+ interface IconVectorFlatProps extends IconProps$1 {
1783
+ className?: string;
1784
+ }
1785
+ declare const IconVectorFlat: react.ForwardRefExoticComponent<IconVectorFlatProps & react.RefAttributes<SVGSVGElement>>;
1786
+
1787
+ interface IconVertexFreeProps extends IconProps$1 {
1788
+ className?: string;
1789
+ }
1790
+ declare const IconVertexFree: react.ForwardRefExoticComponent<IconVertexFreeProps & react.RefAttributes<SVGSVGElement>>;
1791
+
1792
+ interface IconVertexIndeterminateProps extends IconProps$1 {
1793
+ className?: string;
1794
+ }
1795
+ declare const IconVertexIndeterminate: react.ForwardRefExoticComponent<IconVertexIndeterminateProps & react.RefAttributes<SVGSVGElement>>;
1796
+
1797
+ interface IconVertexPairedProps extends IconProps$1 {
1798
+ className?: string;
1799
+ }
1800
+ declare const IconVertexPaired: react.ForwardRefExoticComponent<IconVertexPairedProps & react.RefAttributes<SVGSVGElement>>;
1801
+
1802
+ interface IconVerticalNormalizeProps extends IconProps$1 {
1803
+ className?: string;
1804
+ }
1805
+ declare const IconVerticalNormalize: react.ForwardRefExoticComponent<IconVerticalNormalizeProps & react.RefAttributes<SVGSVGElement>>;
1806
+
1807
+ interface IconVerticalUniformProps extends IconProps$1 {
1808
+ className?: string;
1809
+ }
1810
+ declare const IconVerticalUniform: react.ForwardRefExoticComponent<IconVerticalUniformProps & react.RefAttributes<SVGSVGElement>>;
1811
+
1812
+ declare function WorldElementIcon({ type }: {
1813
+ type: string;
1814
+ }): react_jsx_runtime.JSX.Element;
1815
+
1816
+ interface AutocompleteItemState {
1817
+ highlighted: boolean;
1818
+ disabled: boolean;
1819
+ }
1820
+ interface AutocompleteProps<TItem> {
1821
+ items: TItem[];
1822
+ value: string;
1823
+ onChange: (value: string) => void;
1824
+ /**
1825
+ * Fires after `value` has been stable for `debounceMs`. Useful for triggering
1826
+ * a backend search without firing on every keystroke. When `debounceMs` is 0
1827
+ * (the default), this fires synchronously alongside `onChange`. Pass a stable
1828
+ * callback (e.g. from `useState`/`useCallback`) to avoid re-scheduling.
1829
+ */
1830
+ onDebouncedChange?: (value: string) => void;
1831
+ /** Delay in milliseconds before `onDebouncedChange` fires. Defaults to 0. */
1832
+ debounceMs?: number;
1833
+ onSelect: (item: TItem) => void;
1834
+ renderItem: (item: TItem, state: AutocompleteItemState) => ReactNode;
1835
+ getItemKey: (item: TItem) => string;
1836
+ getItemDisabled?: (item: TItem) => boolean;
1837
+ /**
1838
+ * Icon shown in the left indicator slot of each row. Mirrors the icon-slot
1839
+ * styling used by `Select`/`NestedRadio` so popups feel consistent. If
1840
+ * omitted, a small bullet renders in the indicator.
1841
+ */
1842
+ getItemIcon?: (item: TItem) => ReactNode;
1843
+ /** Ref to the underlying input element (for programmatic focus, etc.). */
1844
+ ref?: Ref<HTMLInputElement>;
1845
+ placeholder?: string;
1846
+ size?: Size;
1847
+ variant?: Variant;
586
1848
  disabled?: boolean;
587
- label?: string;
1849
+ readOnly?: boolean;
1850
+ required?: boolean;
1851
+ /** Left-side icon. Defaults to a search icon. Pass `null` to omit. */
1852
+ leftIcon?: ReactNode | null;
1853
+ /** Background fill on the input. Defaults to true. */
1854
+ bg?: boolean;
1855
+ outline?: "hidden" | "interact" | "always";
1856
+ /** Show a loading row while results are pending. */
1857
+ loading?: boolean;
1858
+ loadingContent?: ReactNode;
1859
+ /** Shown when `items` is empty (and not loading). */
1860
+ emptyContent?: ReactNode;
1861
+ /** Externally controlled open state. If omitted, base-ui manages it. */
1862
+ open?: boolean;
1863
+ defaultOpen?: boolean;
1864
+ onOpenChange?: (open: boolean) => void;
1865
+ id?: string;
1866
+ name?: string;
1867
+ className?: string;
1868
+ inputClassName?: string;
1869
+ popupClassName?: string;
1870
+ /** Custom container for the popup portal (e.g. inside a modal). */
1871
+ portalContainer?: HTMLElement | null;
1872
+ }
1873
+ declare function Autocomplete<TItem>({ items, value, onChange, onDebouncedChange, debounceMs, onSelect, renderItem, getItemKey, getItemDisabled, getItemIcon, ref, placeholder, size, variant, disabled, readOnly, required, leftIcon, bg, outline, loading, loadingContent, emptyContent, open, defaultOpen, onOpenChange, id, name, className, inputClassName: inputClassNameProp, popupClassName: popupClassNameProp, portalContainer, }: AutocompleteProps<TItem>): react_jsx_runtime.JSX.Element;
1874
+
1875
+ interface CheckboxProps {
1876
+ id?: string;
1877
+ checked: boolean;
1878
+ onCheckedChange: (checked: boolean) => void;
588
1879
  variant?: Variant;
1880
+ size?: Size;
1881
+ disabled?: boolean;
1882
+ sizing?: "default" | "inner" | "list-item";
1883
+ asIndicator?: boolean;
589
1884
  }
590
- declare function NestedColorPicker<T extends string | RawColor>({ value, onChange, disabled, label, variant, }: NestedColorPickerProps<T>): react_jsx_runtime.JSX.Element;
1885
+ declare function Checkbox({ id, checked, onCheckedChange, variant, size, disabled, sizing, asIndicator, }: CheckboxProps): react_jsx_runtime.JSX.Element;
591
1886
 
592
- interface NestedCheckboxProps {
1887
+ interface ChipInputProps {
1888
+ selectedValues: string[];
1889
+ options: NestedOption[];
1890
+ onChange?: (values: string[]) => void;
593
1891
  variant?: Variant;
594
- onChange?: (value: boolean) => void;
595
- value: boolean;
1892
+ size?: Size;
1893
+ bg?: boolean;
1894
+ outline?: "hidden" | "interact" | "always";
1895
+ subtle?: boolean;
1896
+ placeholder?: string;
1897
+ disabled?: boolean;
1898
+ className?: string;
1899
+ allowCustomValues?: boolean;
1900
+ }
1901
+ declare const ChipInput: react.NamedExoticComponent<ChipInputProps & react.RefAttributes<HTMLDivElement>>;
1902
+
1903
+ interface ColorPickerInputProps<T extends string | RawColor> {
1904
+ value: T;
1905
+ onChange: (color: T) => void;
1906
+ }
1907
+ declare function ColorPickerInput<T extends string | RawColor>({ value, onChange, }: ColorPickerInputProps<T>): react_jsx_runtime.JSX.Element;
1908
+
1909
+ interface ComboboxOption<TValue extends string = string> {
596
1910
  label: string;
597
- color?: string;
1911
+ value: TValue;
598
1912
  disabled?: boolean;
1913
+ color?: string;
1914
+ variant?: Variant;
599
1915
  icon?: ReactNode;
600
1916
  }
601
- declare function NestedCheckbox({ variant, disabled, onChange, value, color, icon, label, }: NestedCheckboxProps): react_jsx_runtime.JSX.Element;
602
-
603
- interface TooltipProps {
604
- content: ReactNode;
605
- children: ReactNode;
606
- side?: "top" | "right" | "bottom" | "left";
607
- controlledState?: [boolean, (value: boolean) => void];
1917
+ interface ComboboxGroup<TValue extends string = string> {
1918
+ label: string;
1919
+ items: ComboboxOption<TValue>[];
1920
+ }
1921
+ type ComboboxItems<TValue extends string = string> = ComboboxOption<TValue>[] | ComboboxGroup<TValue>[];
1922
+ interface ComboboxItemState {
1923
+ highlighted: boolean;
1924
+ disabled: boolean;
1925
+ selected: boolean;
1926
+ }
1927
+ interface ComboboxProps<TValue extends string = string> {
1928
+ options: ComboboxItems<TValue>;
1929
+ value: TValue | null;
1930
+ onChange: (value: TValue | null) => void;
1931
+ /** Ref to the underlying input element (for programmatic focus, etc.). */
1932
+ ref?: Ref<HTMLInputElement>;
1933
+ placeholder?: string;
1934
+ size?: Size;
608
1935
  variant?: Variant;
609
1936
  disabled?: boolean;
610
- invert?: boolean;
1937
+ readOnly?: boolean;
1938
+ required?: boolean;
1939
+ /** Show a left-side icon. Defaults to the selected option's icon (if any). */
1940
+ leftIcon?: ReactNode | null;
1941
+ bg?: boolean;
1942
+ outline?: "hidden" | "interact" | "always";
1943
+ emptyContent?: ReactNode;
1944
+ /** Custom item renderer. Defaults to icon + label. */
1945
+ renderItem?: (option: ComboboxOption<TValue>, state: ComboboxItemState) => ReactNode;
1946
+ open?: boolean;
1947
+ defaultOpen?: boolean;
1948
+ onOpenChange?: (open: boolean) => void;
1949
+ id?: string;
1950
+ name?: string;
1951
+ className?: string;
1952
+ inputClassName?: string;
1953
+ popupClassName?: string;
1954
+ portalContainer?: HTMLElement | null;
611
1955
  }
612
- declare function Tooltip({ content, children, side, controlledState, variant, disabled, invert, }: TooltipProps): react_jsx_runtime.JSX.Element;
1956
+ declare function Combobox<TValue extends string>({ options, value, onChange, ref, placeholder, size, variant, disabled, readOnly, required, leftIcon, bg, outline, emptyContent, renderItem, open, defaultOpen, onOpenChange, id, name, className, inputClassName: inputClassNameProp, popupClassName: popupClassNameProp, portalContainer, }: ComboboxProps<TValue>): react_jsx_runtime.JSX.Element;
613
1957
 
614
- type FloatingResults = ReturnType<typeof useFloating>;
615
- interface ElementRefs {
616
- triggerRef: ((instance: Element | VirtualElement | null) => void) | null;
617
- floatingRef: ((instance: Element | VirtualElement | null) => void) | null;
618
- }
619
- interface TrackedTooltipResult extends FloatingResults {
620
- elementRefs: ElementRefs;
621
- updateHoverState: (x: number | undefined, y: number | undefined, hovering: boolean) => void;
1958
+ declare enum NumericStatus {
1959
+ Below = "below",
1960
+ LowerBound = "lower-bound",
1961
+ Within = "within",
1962
+ UpperBound = "upper-bound",
1963
+ Above = "above",
1964
+ Invalid = "invalid"
622
1965
  }
623
- declare function useTrackedTooltip(triggerRef: RefObject<ReferenceType>, floatingRef: RefObject<ReferenceType>, side: "top" | "right" | "bottom" | "left", axis: "x" | "y" | "both", sideOffset?: number): TrackedTooltipResult;
624
- interface TrackedTooltipProps {
625
- children: ReactNode;
626
- containerStyles: CSSProperties;
1966
+
1967
+ type ValidChangeEvent = ChangeEvent<HTMLInputElement> | PointerEvent | MouseEvent | TouchEvent$1 | DragEvent | KeyboardEvent$1 | FocusEvent<HTMLInputElement>;
1968
+
1969
+ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
1970
+ onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
1971
+ onClear?: (event: MouseEvent$1<HTMLButtonElement>) => void;
627
1972
  variant?: Variant;
628
- open?: boolean;
1973
+ color?: string;
1974
+ icon?: ReactNode;
1975
+ size?: Size;
1976
+ bg?: boolean;
1977
+ outline?: "hidden" | "interact" | "always";
1978
+ subtle?: boolean;
1979
+ wrapperClassName?: string;
629
1980
  }
630
- declare const TrackedTooltip: react.ForwardRefExoticComponent<TrackedTooltipProps & react.RefAttributes<HTMLDivElement>>;
1981
+ declare const TextField: react.NamedExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
631
1982
 
632
- interface ColorPickerInputProps<T extends string | RawColor> {
633
- value: T;
634
- onChange: (color: T) => void;
1983
+ interface NumberFieldProps extends Omit<TextFieldProps, "onChange" | "value" | "onClear" | "icon"> {
1984
+ value: number;
1985
+ onChange: (value: number, event: ValidChangeEvent) => void;
1986
+ min?: number;
1987
+ max?: number;
1988
+ units?: string;
1989
+ strict?: boolean;
1990
+ highlight?: boolean;
1991
+ label?: string;
1992
+ onLabelChange?: (label: string) => void;
1993
+ onHighlightChange?: (isHighlighted: boolean) => void;
1994
+ onStatusChange?: (status: NumericStatus) => void;
1995
+ autoOverrideVariantOnWarning?: boolean;
635
1996
  }
636
- declare function ColorPickerInput<T extends string | RawColor>({ value, onChange, }: ColorPickerInputProps<T>): react_jsx_runtime.JSX.Element;
1997
+ declare const NumberField: react.NamedExoticComponent<NumberFieldProps & react.RefAttributes<HTMLInputElement>>;
637
1998
 
638
- interface ColorPickerPopoverProps<T extends string | RawColor> {
639
- value: T;
640
- onChange: (color: T) => void;
1999
+ type SliderNumberFieldDragMode = "absolute" | "relative";
2000
+ interface SliderNumberFieldProps extends Omit<NumberFieldProps, "strict"> {
2001
+ visualMin?: number;
2002
+ visualMax?: number;
2003
+ relativeDragRange?: number;
2004
+ strictSlider?: boolean;
2005
+ strictText?: boolean;
2006
+ dragMode?: SliderNumberFieldDragMode;
2007
+ onStatusChange?: (status: NumericStatus) => void;
2008
+ autoOverrideVariantOnWarning?: boolean;
2009
+ onDragStartNative?: (event: MouseEvent | PointerEvent, value: number) => void;
2010
+ onDragMoveNative?: (event: MouseEvent | PointerEvent, value: number) => void;
2011
+ onDragEndNative?: (event: MouseEvent | PointerEvent, value: number) => void;
641
2012
  }
642
- declare function ColorPickerPopover<T extends string | RawColor>({ value, onChange, }: ColorPickerPopoverProps<T>): react_jsx_runtime.JSX.Element;
643
-
644
- declare function NumberOrListInput({ value, onChange, title, }: {
645
- value: number | number[];
646
- onChange: (value: number | number[]) => void;
647
- title?: string;
648
- }): react_jsx_runtime.JSX.Element;
2013
+ declare const SliderNumberField: react.NamedExoticComponent<SliderNumberFieldProps & react.RefAttributes<HTMLInputElement>>;
649
2014
 
650
2015
  interface EmailInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
651
2016
  invalid?: boolean;
@@ -655,31 +2020,24 @@ interface EmailInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "s
655
2020
  }
656
2021
  declare const EmailInput: react.ForwardRefExoticComponent<EmailInputProps & react.RefAttributes<HTMLInputElement>>;
657
2022
 
658
- interface FileInputProps {
659
- fileObj: File | null;
660
- setFile: (file: File | null) => void;
661
- handleFileChange: (event: ChangeEvent<HTMLInputElement>) => void;
662
- types?: string;
663
- inputTitle?: string;
664
- }
665
- declare function FileInput({ fileObj, setFile, handleFileChange, types, inputTitle, }: FileInputProps): react_jsx_runtime.JSX.Element;
666
-
667
- interface EmailsInputProps {
668
- emails: string[];
669
- fieldName?: string;
670
- onEmailsChange: (emails: string[], field: string) => void;
671
- inputPlaceholder?: string;
672
- inputTitle?: string;
673
- }
674
- declare function EmailsInput({ emails: initialEmails, fieldName, onEmailsChange, inputTitle, inputPlaceholder, }: EmailsInputProps): react_jsx_runtime.JSX.Element;
675
-
676
2023
  interface ImageInputProps {
677
- imageUrl?: string;
2024
+ src?: string;
2025
+ fallback: string | ReactNode;
678
2026
  onImageChange: (file: File | null) => void;
679
- uploading?: boolean;
680
- inputTitle?: string;
2027
+ variant?: Variant;
2028
+ className?: string;
2029
+ size?: string;
681
2030
  }
682
- declare function ImageInput({ imageUrl, onImageChange, uploading, inputTitle, }: ImageInputProps): react_jsx_runtime.JSX.Element;
2031
+ declare function ImageInput({ src, onImageChange, variant, fallback, size, className, }: ImageInputProps): react_jsx_runtime.JSX.Element;
2032
+
2033
+ declare function Label({ children, variant, message, label, htmlFor, }: {
2034
+ children: ReactNode;
2035
+ variant?: Variant;
2036
+ message?: string;
2037
+ label: string;
2038
+ /** Associates the label with an input element by id. */
2039
+ htmlFor?: string;
2040
+ }): react_jsx_runtime.JSX.Element;
683
2041
 
684
2042
  interface PasswordInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
685
2043
  invalid?: boolean;
@@ -690,26 +2048,12 @@ interface PasswordInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
690
2048
  }
691
2049
  declare const PasswordInput: react.ForwardRefExoticComponent<PasswordInputProps & react.RefAttributes<HTMLInputElement>>;
692
2050
 
693
- interface SwitchProps {
694
- value: boolean;
695
- onChange: (value: boolean) => void;
696
- disabled?: boolean;
697
- variant?: Variant;
698
- offVariant?: Variant;
699
- onIcon?: ReactNode;
700
- offIcon?: ReactNode;
701
- size?: "sm" | "md" | "lg";
702
- square?: boolean;
703
- }
704
- declare function Switch({ value, onChange, disabled, variant, size, onIcon, offIcon, offVariant, square, }: SwitchProps): react_jsx_runtime.JSX.Element;
705
-
706
- interface SearchAdditionalProps {
707
- onChange?: (value: string) => void;
708
- onSearch?: (value: string) => void;
2051
+ interface SearchProps extends TextFieldProps {
2052
+ onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
2053
+ onSearch?: (value: string, event: KeyboardEvent$1) => void;
709
2054
  variant?: Variant;
710
2055
  size?: Size;
711
2056
  }
712
- type SearchProps = SearchAdditionalProps & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange">;
713
2057
  /**
714
2058
  * Inherits from standard Input HTML element
715
2059
  * @param value - the value of the field
@@ -720,420 +2064,784 @@ type SearchProps = SearchAdditionalProps & Omit<InputHTMLAttributes<HTMLInputEle
720
2064
  declare function InnerSearch({ size, onChange, onSearch, variant, ...forwardedProps }: SearchProps): ReactNode;
721
2065
  declare const Search: react.MemoExoticComponent<typeof InnerSearch>;
722
2066
 
723
- interface StringsInputProps {
724
- strings: string[];
725
- fieldName: string;
726
- onStringsChange: (strings: string[], field: string) => void;
727
- inputPlaceholder?: string;
728
- inputTitle?: string;
2067
+ interface SwitchProps {
2068
+ id?: string;
2069
+ checked: boolean;
2070
+ onCheckedChange: (checked: boolean) => void;
2071
+ variant?: Variant;
2072
+ size?: Size;
2073
+ disabled?: boolean;
2074
+ label?: string;
2075
+ color?: string;
2076
+ className?: string;
729
2077
  }
730
- declare function StringsInput({ strings, fieldName, onStringsChange, inputTitle, inputPlaceholder, }: StringsInputProps): react_jsx_runtime.JSX.Element;
2078
+ declare function Switch({ id, checked, onCheckedChange, variant, size, disabled, label, color, className, }: SwitchProps): react_jsx_runtime.JSX.Element;
731
2079
 
732
- interface TimeInputProps extends Omit<React.HTMLAttributes<HTMLInputElement>, "onChange"> {
2080
+ interface TimeInputProps extends Omit<NumberFieldProps, "value" | "onChange"> {
733
2081
  value: number | undefined;
734
2082
  onChange: (value: number) => void;
735
2083
  framerate: number;
736
2084
  display?: TimeDisplay;
737
- disabled?: boolean;
738
- min?: number;
739
- max?: number;
740
- variant: Variant;
741
- size?: Size;
742
- bg?: boolean;
743
- label?: string;
744
- hidden?: boolean;
745
2085
  }
746
- declare function TimeInput({ value, onChange, framerate, display, disabled, variant, size, min, max, bg, label, hidden, }: TimeInputProps): react_jsx_runtime.JSX.Element;
2086
+ /**
2087
+ * A wrapper around a number field that displays time in frames, seconds, or milliseconds.
2088
+ */
2089
+ declare function TimeInput({ value, onChange, framerate, display, min, max, ...forwardedProps }: TimeInputProps): react_jsx_runtime.JSX.Element;
747
2090
 
748
- interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
749
- onChange?: (value: string) => void;
2091
+ interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "onChange"> {
2092
+ onChange?: (value: string, event: ChangeEvent<HTMLTextAreaElement>) => void;
750
2093
  variant?: Variant;
751
- size?: Size;
2094
+ color?: string;
752
2095
  bg?: boolean;
753
- outline?: boolean;
2096
+ outline?: "hidden" | "interact" | "always";
754
2097
  subtle?: boolean;
755
2098
  }
756
- declare const TextField: react.MemoExoticComponent<react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>>;
2099
+ declare const TextArea: react.NamedExoticComponent<TextAreaProps & react.RefAttributes<HTMLTextAreaElement>>;
757
2100
 
758
- interface InputProps {
759
- size: Size;
760
- focused?: boolean;
761
- cursor?: string;
762
- bold?: boolean;
2101
+ interface ToggleGroupProps {
2102
+ visuals: "icons" | "labels" | "both";
2103
+ bg?: boolean;
2104
+ value: string;
2105
+ onChange: (value: string) => void;
2106
+ label?: string;
2107
+ options: {
2108
+ label: string;
2109
+ value: string;
2110
+ disabled?: boolean;
2111
+ color?: string;
2112
+ variant?: Variant;
2113
+ icon?: ReactNode;
2114
+ }[];
2115
+ size?: Size;
763
2116
  className?: string;
764
- flex?: boolean;
765
- subtle?: boolean;
766
2117
  }
767
- declare const StyledInput: react.MemoExoticComponent<react.ForwardRefExoticComponent<InputProps & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & react.RefAttributes<HTMLInputElement>>>;
2118
+ declare function ToggleGroup({ value, onChange, options, size, label, bg, visuals, className, }: ToggleGroupProps): react_jsx_runtime.JSX.Element;
768
2119
 
769
- interface TextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "onChange"> {
770
- onChange?: (value: string) => void;
2120
+ interface ToggleSquareProps {
771
2121
  variant?: Variant;
2122
+ /** Custom color applied as CSS custom property for themed coloring. */
2123
+ color?: string;
2124
+ /**
2125
+ * Toggle state:
2126
+ * - `true` — on/checked (full color background)
2127
+ * - `false` — off/unchecked (subtle or default background)
2128
+ * - `"partial"` — indeterminate (off background + inset colored border)
2129
+ */
2130
+ value: boolean | "partial";
2131
+ disabled?: boolean;
2132
+ onChange: (value: boolean) => void;
2133
+ label?: string;
2134
+ children?: ReactNode;
772
2135
  size?: Size;
773
- bg?: boolean;
774
- outline?: boolean;
775
- subtle?: boolean;
2136
+ sizing?: "default" | "inner" | "list-item";
2137
+ asIndicator?: boolean;
776
2138
  }
777
- declare const TextArea: react.MemoExoticComponent<react.ForwardRefExoticComponent<TextAreaProps & react.RefAttributes<HTMLTextAreaElement>>>;
778
- declare const StyledArea: react.MemoExoticComponent<react.ForwardRefExoticComponent<InputProps & Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> & react.RefAttributes<HTMLTextAreaElement>>>;
2139
+ declare function ToggleSquare({ variant, color, value, disabled, onChange, size, label, children, sizing, asIndicator, }: ToggleSquareProps): react_jsx_runtime.JSX.Element;
779
2140
 
780
- interface TextInputProps {
781
- textValue: string;
782
- fieldName: string;
783
- onTextChange: (value: string, field: string) => void;
784
- inputTitle?: string;
785
- inputPlaceholder?: string;
786
- inputSize?: number;
2141
+ interface AccordionProps {
2142
+ sticky?: boolean;
2143
+ stickyOffset?: number;
2144
+ items: {
2145
+ header: string;
2146
+ content: react__default.ReactNode;
2147
+ key: string;
2148
+ disabled?: boolean;
2149
+ }[];
2150
+ defaultOpen?: boolean | string[];
787
2151
  }
788
- declare function TextInput({ textValue, fieldName, onTextChange, inputTitle, inputPlaceholder, inputSize, }: TextInputProps): react_jsx_runtime.JSX.Element;
2152
+ declare function Accordion({ items, defaultOpen, sticky, stickyOffset }: AccordionProps): react_jsx_runtime.JSX.Element;
789
2153
 
790
- interface BasicNumberFieldProps {
791
- id?: string;
792
- value: number;
793
- onChange: (value: number) => void;
794
- min?: number;
795
- max?: number;
796
- units?: string;
797
- color?: string;
798
- strict?: boolean;
799
- emphasis?: boolean;
800
- size?: Size;
801
- inactive?: boolean;
2154
+ interface BreadcrumbOptionElement {
2155
+ id: string;
2156
+ type: "option";
2157
+ options: (SelectOption & {
2158
+ children: BreadcrumbElement[];
2159
+ default?: boolean;
2160
+ })[];
2161
+ }
2162
+ interface BreadcrumbStaticElement {
2163
+ id: string;
2164
+ type: "static";
2165
+ render: (value?: string) => ReactNode;
2166
+ child?: BreadcrumbElement;
2167
+ }
2168
+ type BreadcrumbElement = BreadcrumbOptionElement | BreadcrumbStaticElement;
2169
+ interface BreadcrumbsProps {
2170
+ size?: string;
2171
+ variant?: Variant;
2172
+ values: Record<string, string | undefined>;
2173
+ elements: BreadcrumbElement[];
2174
+ onChange?: (value: Record<string, string | undefined>) => void;
2175
+ showIcons?: boolean;
2176
+ elementClassName?: string;
2177
+ separator?: ReactNode;
2178
+ }
2179
+ declare function InnerBreadcrumbs({ size, variant, values, elements, onChange, showIcons, elementClassName, separator, }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
2180
+ declare const Breadcrumbs: react.MemoExoticComponent<typeof InnerBreadcrumbs>;
2181
+
2182
+ interface CollapseProps {
2183
+ title: string | ReactNode;
2184
+ children: ReactNode;
2185
+ onStateChange?: (open: boolean) => void;
2186
+ open?: boolean;
2187
+ direction?: "vertical" | "horizontal";
802
2188
  disabled?: boolean;
803
- label?: string;
804
- onLabelChange?: (label: string) => void;
805
- onEmphasisChange?: (emphasis: boolean) => void;
806
- onFocus?: FocusEventHandler;
807
- onBlur?: FocusEventHandler;
808
- }
809
- /**
810
- * BasicNumberField
811
- * @param {string} id - the id of the field
812
- * @param {number} value: - the value of the field
813
- * @param onChange: (value: number) => void - the function to call when the value changes
814
- * @param min?: number - the minimum value
815
- * @param max?: number - the maximum value
816
- * @param visualMin?: number - the minimum visual value
817
- * @param visualMax?: number - the maximum visual value
818
- * @param units?: string - the units to display
819
- * @param color?: string - the color of the slider
820
- * @param strictSlider?: boolean - whether to enforce the slider bounds
821
- * @param strictText?: boolean - whether to enforce the text bounds
822
- * @param emphasis?: boolean - whether the field is emphasized
823
- * @param size?: Size - the size of the field
824
- * @param inactive?: boolean - whether the field is inactive
825
- * @param disabled?: boolean - whether the field is disabled
826
- * @param label?: string - the label of the field
827
- * @param onLabelChange?: (label: string) => void - the function to call when the label changes
828
- * @param onEmphasisChange?: (emphasis: boolean) => void - the function to call when the emphasis changes
829
- * @param onFocus?: FocusEventHandler;
830
- * @param onBlur?: FocusEventHandler;
831
- */
832
- declare function InnerBasicNumberField({ value, onChange, min, max, units, color, strict, emphasis, size, inactive, disabled, onEmphasisChange, onBlur: onBlurExternal, onFocus: onFocusExternal, }: BasicNumberFieldProps): ReactNode;
833
- declare const BasicNumberField: react.MemoExoticComponent<typeof InnerBasicNumberField>;
834
-
835
- interface SliderNumberFieldProps {
2189
+ side?: "left" | "right";
2190
+ }
2191
+ declare function Collapse({ open, title, onStateChange, children, direction, disabled, side, }: CollapseProps): ReactNode;
2192
+ declare const CollapsibleContent: react.ForwardRefExoticComponent<Collapsible.CollapsibleContentProps & react.RefAttributes<HTMLDivElement>>;
2193
+ declare const CollapsibleTrigger: react.ForwardRefExoticComponent<Collapsible.CollapsibleTriggerProps & react.RefAttributes<HTMLButtonElement>>;
2194
+ declare const CollapsibleRoot: react.ForwardRefExoticComponent<Collapsible.CollapsibleProps & react.RefAttributes<HTMLDivElement>>;
2195
+
2196
+ interface ResizerProps {
2197
+ orientation: "vertical" | "horizontal";
2198
+ invert?: boolean;
836
2199
  value: number;
837
- onChange: (value: number) => void;
2200
+ onDrag: (newValue: number) => void;
2201
+ onRelease?: (newValue: number) => void;
2202
+ onDoubleClick?: () => void;
2203
+ disabled?: boolean;
838
2204
  min?: number;
839
2205
  max?: number;
840
- visualMin?: number;
841
- visualMax?: number;
842
- units?: string;
843
- color?: string;
844
- strictSlider?: boolean;
845
- strictText?: boolean;
846
- emphasis?: boolean;
847
- size?: Size;
848
- inactive?: boolean;
849
- disabled?: boolean;
850
- label?: string;
851
- onLabelChange?: (label: string) => void;
852
- onEmphasisChange?: (emphasis: boolean) => void;
853
- onFocus?: FocusEventHandler;
854
- onBlur?: FocusEventHandler;
855
- }
856
- /**
857
- * SliderNumberField
858
- * @param {number} value: - the value of the field
859
- * @param onChange: (value: number) => void - the function to call when the value changes
860
- * @param min?: number - the minimum value
861
- * @param max?: number - the maximum value
862
- * @param visualMin?: number - the minimum visual value
863
- * @param visualMax?: number - the maximum visual value
864
- * @param units?: string - the units to display
865
- * @param color?: string - the color of the slider
866
- * @param strictSlider?: boolean - whether to enforce the slider bounds
867
- * @param strictText?: boolean - whether to enforce the text bounds
868
- * @param emphasis?: boolean - whether the field is emphasized
869
- * @param size?: Size - the size of the field
870
- * @param inactive?: boolean - whether the field is inactive
871
- * @param disabled?: boolean - whether the field is disabled
872
- * @param label?: string - the label of the field
873
- * @param onLabelChange?: (label: string) => void - the function to call when the label changes
874
- * @param onEmphasisChange?: (emphasis: boolean) => void - the function to call when the emphasis changes
875
- * @param onFocus?: FocusEventHandler;
876
- * @param onBlur?: FocusEventHandler;
877
- */
878
- declare function InnerSliderNumberField({ value, onChange, min, max, visualMin, visualMax, units, color, strictText, strictSlider, emphasis, size, inactive, disabled, label, onLabelChange, onEmphasisChange, onBlur: onBlurExternal, onFocus: onFocusExternal, }: SliderNumberFieldProps): ReactNode;
879
- declare const SliderNumberField: react.MemoExoticComponent<typeof InnerSliderNumberField>;
880
-
881
- interface DropzoneProps<T extends BasicRowData> {
882
- onDrop: (files: File[]) => void;
883
- data: T[];
884
- columns: ColumnDefinition<T>[];
885
- rowClassName?: string;
886
- headerClassName?: string;
887
- multiple?: boolean;
888
- accept?: Accept;
889
- dropText?: string;
890
- children?: ReactNode;
891
- className?: string;
2206
+ showEllipses?: boolean;
2207
+ variant?: Variant;
892
2208
  }
893
- declare function Dropzone<T extends BasicRowData>({ onDrop, data, columns, rowClassName, headerClassName, multiple, accept, children, className, dropText, }: DropzoneProps<T>): react_jsx_runtime.JSX.Element;
2209
+ declare function InnerResizer({ orientation, invert, onDrag, onRelease, value, min, max, onDoubleClick, disabled, showEllipses, variant, }: ResizerProps): react_jsx_runtime.JSX.Element;
2210
+ /**
2211
+ * Resizer Component. Provides a singular way to attach drag handlers to a region for resizing
2212
+ * @param orientation - "vertical" or "horizontal". The direction of the drag allowed.
2213
+ * @param invert - Whether to invert the drag direction. Default is false.
2214
+ * @param value - The current recorded value. Not used visually, but grounds the values sent in handlers.
2215
+ * @param onDrag - The function to call when the drag is in progress. Receives the new value.
2216
+ * @param onRelease - The function to call when the drag is released. Receives the new value.
2217
+ * @param min - The minimum value allowed. Default is Number.NEGATIVE_INFINITY.
2218
+ * @param max - The maximum value allowed. Default is Number.POSITIVE_INFINITY.
2219
+ */
2220
+ declare const Resizer: react.MemoExoticComponent<typeof InnerResizer>;
894
2221
 
2222
+ interface LayoutRootProps {
2223
+ className?: string;
2224
+ children?: ReactNode | ((contentBounds: RectReadOnly) => ReactNode);
2225
+ homeIcon?: ReactNode;
2226
+ homeText?: string;
2227
+ homeClassName?: string;
2228
+ }
895
2229
  /**
896
- * Renders a scrollable area with optional header and footer.
2230
+ * Renders the inner layout of the application.
897
2231
  *
898
- * @example
899
- * ```tsx
900
- * <InnerScrollArea>
901
- * <div>Content goes here</div>
902
- * </InnerScrollArea>
903
- * ```
2232
+ * TODO: Update with resizeable panes and pop out windows.
904
2233
  *
905
- * @param children - The content to be rendered inside the scroll area.
906
- * @param header - The optional header component to be displayed at the top of the scroll area.
907
- * @param footer - The optional footer component to be displayed at the bottom of the scroll area.
908
- * @param className - The optional CSS class name for the scroll area container.
909
- * @param shrink - Determines whether the scroll area should shrink to fit its content.
910
- * @returns The rendered scroll area component.
2234
+ * @param className - The class name applied to the root element.
911
2235
  */
912
- declare function InnerScrollArea({ children, header, footer, className, style, shrink, orientation, }: {
2236
+ declare function InnerLayoutRoot({ className, homeIcon, homeText, children, homeClassName, }: LayoutRootProps): react_jsx_runtime.JSX.Element;
2237
+ declare const LayoutRoot: react.MemoExoticComponent<typeof InnerLayoutRoot>;
2238
+
2239
+ interface ScrollInfo {
2240
+ scrollTop: number;
2241
+ scrollLeft: number;
2242
+ scrollHeight: number;
2243
+ scrollWidth: number;
2244
+ clientHeight: number;
2245
+ clientWidth: number;
2246
+ isOverscrolling: boolean;
2247
+ }
2248
+ interface ViewportInfo {
2249
+ visibleTop: number;
2250
+ visibleBottom: number;
2251
+ visibleLeft: number;
2252
+ visibleRight: number;
2253
+ totalHeight: number;
2254
+ totalWidth: number;
2255
+ }
2256
+ interface ScrollAreaRef {
2257
+ scrollTo: (options: {
2258
+ top?: number;
2259
+ left?: number;
2260
+ behavior?: ScrollBehavior;
2261
+ }) => void;
2262
+ scrollIntoView: (element: Element, options?: ScrollIntoViewOptions) => void;
2263
+ getScrollInfo: () => ScrollInfo | null;
2264
+ getViewportInfo: () => ViewportInfo | null;
2265
+ }
2266
+ interface ScrollAreaProps {
913
2267
  children: ReactNode;
914
2268
  header?: ReactNode;
915
2269
  footer?: ReactNode;
2270
+ wrapperClassName?: string;
916
2271
  className?: string;
917
- style?: CSSProperties;
918
- shrink?: boolean;
919
- orientation?: "vertical" | "horizontal" | "both";
920
- }): react_jsx_runtime.JSX.Element;
921
- declare const ScrollArea: react.MemoExoticComponent<typeof InnerScrollArea>;
922
-
923
- interface ChipProps {
924
- value: string;
925
- variant?: Variant;
926
- size?: Size;
927
- color?: string;
928
- icon?: ReactNode;
929
- onDelete?: MouseEventHandler<HTMLButtonElement>;
930
- }
931
- declare function Chip({ value, variant, size, color, icon, onDelete }: ChipProps): react_jsx_runtime.JSX.Element;
932
-
933
- /**
934
- * @param {string} label - The text to display in the option
935
- * @param {string} value - The unique key to register and identify the option
936
- * @param {boolean} disabled - Whether the option is disabled
937
- * @param {string} color - The color of the option
938
- * @param {ReactNode} icon - The icon to display in the option
939
- */
940
- interface SelectOption {
941
- label: string;
942
- value: string;
943
- disabled?: boolean;
944
- color?: string;
945
- icon?: ReactNode;
946
- }
947
- /**
948
- * @param {Variant} variant - The variant of the select (defines colors)
949
- * @param {T} value - The value of the select
950
- * @param {function} onChange - The function to call when the value changes
951
- * @param {SelectOption[]} options - The options to display in the select
952
- * @param {Size} size - The size of the select
953
- * @param {string} label - The label of the select
954
- */
955
- interface SelectProps<T extends string | string[]> {
956
- variant?: Variant;
957
- value?: T;
958
- onChange: (value: T) => void;
959
- options: {
960
- label: string;
961
- value: string;
962
- disabled?: boolean;
963
- color?: string;
964
- icon?: ReactNode;
965
- }[];
966
- size?: Size;
967
- label?: string;
968
- }
969
- /**
970
- * A select component that allows users to choose from a list of options
971
- * @param {Variant} variant - The variant of the select (defines colors)
972
- * @param {T} value - The value of the select
973
- * @param {function} onChange - The function to call when the value changes
974
- * @param {SelectOption[]} options - The options to display in the select
975
- * @param {Size} size - The size of the select
976
- * @param {string} label - The label of the select
977
- */
978
- declare function Select<T extends string | string[]>({ value, onChange, options, variant, size, label, }: SelectProps<T>): react_jsx_runtime.JSX.Element;
979
-
980
- declare function SelectList<T extends string | string[]>({ value, onChange, options, variant, size, notFound, }: SelectProps<T> & {
981
- notFound?: ReactNode;
982
- }): react_jsx_runtime.JSX.Element;
983
-
984
- declare function FormBase({ children, title }: {
985
- children: React.ReactNode;
986
- title?: string;
987
- }): react_jsx_runtime.JSX.Element;
988
-
989
- interface IconRobotProps extends TablerIconsProps {
990
- className?: string;
2272
+ headerClassName?: string;
2273
+ footerClassName?: string;
2274
+ style?: CSSProperties;
2275
+ shrinkHeight?: boolean;
2276
+ shrinkWidth?: boolean;
2277
+ orientation?: "vertical" | "horizontal" | "both";
2278
+ showGutter?: boolean;
2279
+ onScrollChange?: (scrollInfo: ScrollInfo) => void;
2280
+ onViewportChange?: (viewportInfo: ViewportInfo) => void;
2281
+ motionScrollY?: MotionValue<number>;
2282
+ motionScrollX?: MotionValue<number>;
2283
+ externalScrollTop?: number;
2284
+ externalScrollLeft?: number;
2285
+ onScrollSync?: (scrollTop: number, scrollLeft: number) => void;
991
2286
  }
992
- declare const IconRobot: react.ForwardRefExoticComponent<Omit<IconRobotProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2287
+ /**
2288
+ * Renders a scrollable area with natural overscroll behavior.
2289
+ * Uses padding to create "real" overscroll space that can be synchronized between multiple areas.
2290
+ *
2291
+ * @example Basic usage
2292
+ * ```tsx
2293
+ * <ScrollArea onScrollChange={(info) => console.log(info)}>
2294
+ * <div>Content goes here</div>
2295
+ * </ScrollArea>
2296
+ * ```
2297
+ *
2298
+ * @example Synchronized scrolling
2299
+ * ```tsx
2300
+ * const [sharedScrollTop, setSharedScrollTop] = useState(0);
2301
+ * <ScrollArea
2302
+ * externalScrollTop={sharedScrollTop}
2303
+ * onScrollSync={(scrollTop) => setSharedScrollTop(scrollTop)}
2304
+ * >
2305
+ * <div>Content goes here</div>
2306
+ * </ScrollArea>
2307
+ * ```
2308
+ */
2309
+ declare const InnerScrollArea: react.ForwardRefExoticComponent<ScrollAreaProps & react.RefAttributes<ScrollAreaRef>>;
2310
+ declare const ScrollArea: react.NamedExoticComponent<ScrollAreaProps & react.RefAttributes<ScrollAreaRef>>;
993
2311
 
994
- interface IconRobotPlusProps extends TablerIconsProps {
2312
+ interface SeparatorProps {
2313
+ children?: ReactNode;
2314
+ variant?: Variant;
2315
+ color?: string;
2316
+ orientation?: "horizontal" | "vertical";
995
2317
  className?: string;
996
2318
  }
997
- declare const IconRobotPlus: react.ForwardRefExoticComponent<Omit<IconRobotPlusProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2319
+ declare function Separator({ children, variant, color, orientation, className, }: SeparatorProps): react_jsx_runtime.JSX.Element;
998
2320
 
999
- interface IconFileTypeAniProps extends TablerIconsProps {
1000
- className?: string;
1001
- }
1002
- declare const IconFileTypeAni: react.ForwardRefExoticComponent<Omit<IconFileTypeAniProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2321
+ /**
2322
+ * A component that renders a nested checkbox with optional child checkboxes.
2323
+ *
2324
+ * @param props - The props for the NestedCheckbox component ({@link NestedCheckboxProps}).
2325
+ * @returns The rendered NestedCheckbox component.
2326
+ */
2327
+ declare function NestedCheckbox({ variant, disabled, onChange, closeOnSelect, value, color, icon, label, }: NestedCheckboxProps): react_jsx_runtime.JSX.Element;
1003
2328
 
1004
- interface IconFileTypeModProps extends TablerIconsProps {
1005
- className?: string;
1006
- }
1007
- declare const IconFileTypeMod: react.ForwardRefExoticComponent<Omit<IconFileTypeModProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2329
+ declare const NestedParentContext: react.Context<NestedParent>;
2330
+ declare const NestedParentProvider: react.Provider<NestedParent>;
2331
+ declare const useNestedParent: () => NestedParent;
1008
2332
 
1009
- interface IconFileTypeVizijProps extends TablerIconsProps {
1010
- className?: string;
1011
- }
1012
- declare const IconFileTypeVizij: react.ForwardRefExoticComponent<Omit<IconFileTypeVizijProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2333
+ declare function NestedColorPicker<T extends string | RawColor>({ value, onChange, disabled, label, variant, left, }: NestedColorPickerProps<T>): react_jsx_runtime.JSX.Element;
1013
2334
 
1014
- interface IconHomeProps extends TablerIconsProps {
1015
- className?: string;
1016
- }
1017
- declare const IconHome: react.ForwardRefExoticComponent<Omit<IconHomeProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2335
+ /**
2336
+ * A component that renders any of the major nested elements in an abstracted way.
2337
+ *
2338
+ * @param props - The props for the NestedChild component ({@link ConfiguredNestedChild}).
2339
+ * @returns The rendered NestedChild component.
2340
+ */
2341
+ declare function NestedChild(props: ConfiguredNestedChild): ReactNode;
1018
2342
 
1019
- interface IconBoxProps extends TablerIconsProps {
1020
- className?: string;
1021
- }
1022
- declare const IconBox: react.ForwardRefExoticComponent<Omit<IconBoxProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2343
+ declare function NestedItem({ left, children, right, variant, disabled, onClick, closeOnSelect, testId, }: NestedItemProps): react_jsx_runtime.JSX.Element;
1023
2344
 
1024
- interface IconBoxPlusProps extends TablerIconsProps {
1025
- className?: string;
1026
- }
1027
- declare const IconBoxPlus: react.ForwardRefExoticComponent<Omit<IconBoxPlusProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2345
+ /**
2346
+ * A component that renders a nested label with optional child labels.
2347
+ *
2348
+ * @param props - The props for the NestedLabel component ({@link NestedLabelProps}).
2349
+ * @returns The rendered NestedLabel component.
2350
+ */
2351
+ declare function NestedLabel({ children, className }: NestedLabelProps): react_jsx_runtime.JSX.Element;
1028
2352
 
1029
- declare const IconPlayerNextKey: react.ForwardRefExoticComponent<Omit<TablerIconsProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2353
+ /**
2354
+ * A component that renders a nested menu with optional sub-menus.
2355
+ *
2356
+ * @param props - The props for the NestedMenu component ({@link NestedMenuProps}).
2357
+ * @returns The rendered NestedMenu component.
2358
+ */
2359
+ declare function NestedMenu({ left, children, label, variant, disabled, hideHeader, }: NestedMenuProps): react_jsx_runtime.JSX.Element;
1030
2360
 
1031
- declare const IconPlayerEndBounds: react.ForwardRefExoticComponent<Omit<TablerIconsProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2361
+ /**
2362
+ * A component that renders a nested radio button with optional child radio buttons.
2363
+ *
2364
+ * @param props - The props for the NestedRadio component ({@link NestedRadioProps}).
2365
+ * @returns The rendered NestedRadio component.
2366
+ */
2367
+ declare function NestedRadio({ variant, disabled, onChange, value, options }: NestedRadioProps): react_jsx_runtime.JSX.Element;
1032
2368
 
1033
- declare const IconPlayerPlay: react.ForwardRefExoticComponent<Omit<TablerIconsProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2369
+ /**
2370
+ * A component that renders a select section in a nested menu.
2371
+ *
2372
+ * @param props - The props for the Select component ({@link NestedSelectProps}).
2373
+ * @returns The rendered NestedSelect section component.
2374
+ */
2375
+ declare function NestedSelect({ variant, disabled, onChange, values, options }: NestedSelectProps): react_jsx_runtime.JSX.Element;
1034
2376
 
1035
- declare const IconPlayerPlay2: react.ForwardRefExoticComponent<Omit<TablerIconsProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2377
+ /**
2378
+ * A component that renders a separator in a nested menu.
2379
+ *
2380
+ * @param props - The props for the NestedSeparator component ({@link NestedSeparatorProps}).
2381
+ * @returns The rendered NestedSeparator component.
2382
+ */
2383
+ declare function NestedSeparator({ variant }: NestedSeparatorProps): react_jsx_runtime.JSX.Element;
1036
2384
 
1037
- interface IconPlayPauseProps extends TablerIconsProps {
1038
- fillOpacity?: number;
1039
- dashed?: boolean;
1040
- center?: "play" | "pause";
2385
+ interface Step {
2386
+ label: string;
2387
+ completed: boolean;
2388
+ disabled: boolean;
2389
+ content?: ReactNode;
2390
+ }
2391
+ interface VerticalStepperProps {
2392
+ steps: Step[];
2393
+ activeStep?: number;
2394
+ onStepChange: (step: number) => void;
1041
2395
  }
1042
- declare const IconPlayPause: react.ForwardRefExoticComponent<Omit<IconPlayPauseProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2396
+ declare function VerticalStepper({ steps, onStepChange, activeStep }: VerticalStepperProps): react_jsx_runtime.JSX.Element;
1043
2397
 
1044
- declare const IconKeyOutline: react.ForwardRefExoticComponent<Omit<TablerIconsProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2398
+ type SelectionMode = "none" | "single" | "multiple";
2399
+ interface ListItem {
2400
+ key: string;
2401
+ disabled?: boolean;
2402
+ }
2403
+ interface UseListStateOptions<T extends ListItem> {
2404
+ items: T[];
2405
+ getSearchText?: (item: T) => string;
2406
+ selectionMode?: SelectionMode;
2407
+ selectedKeys?: Set<string>;
2408
+ onSelectionChange?: (keys: Set<string>) => void;
2409
+ defaultSelectedKeys?: Set<string>;
2410
+ focusedKey?: string | null;
2411
+ onFocusChange?: (key: string | null) => void;
2412
+ defaultFocusedKey?: string | null;
2413
+ disallowEmptySelection?: boolean;
2414
+ allowTypeAhead?: boolean;
2415
+ allowWrapNavigation?: boolean;
2416
+ onAction?: (key: string, event: KeyboardEvent | MouseEvent) => void;
2417
+ onKeyDown?: (key: string, event: KeyboardEvent) => void;
2418
+ }
2419
+ interface ListState<T extends ListItem> {
2420
+ items: T[];
2421
+ getItem: (key: string) => T | undefined;
2422
+ getItemIndex: (key: string) => number;
2423
+ selectedKeys: Set<string>;
2424
+ selectionMode: SelectionMode;
2425
+ focusedKey: string | null;
2426
+ isSelected: (key: string) => boolean;
2427
+ isFocused: (key: string) => boolean;
2428
+ isDisabled: (key: string) => boolean;
2429
+ select: (key: string) => void;
2430
+ deselect: (key: string) => void;
2431
+ toggle: (key: string) => void;
2432
+ selectRange: (fromKey: string, toKey: string) => void;
2433
+ selectAll: () => void;
2434
+ clearSelection: () => void;
2435
+ setFocusedKey: (key: string | null) => void;
2436
+ focusNext: () => void;
2437
+ focusPrevious: () => void;
2438
+ focusFirst: () => void;
2439
+ focusLast: () => void;
2440
+ handleItemClick: (key: string, event: MouseEvent) => void;
2441
+ handleItemKeyDown: (key: string, event: KeyboardEvent) => void;
2442
+ handleItemFocus: (key: string) => void;
2443
+ handleItemBlur: () => void;
2444
+ getNavigationProps: () => Record<string, any>;
2445
+ getItemProps: (key: string) => Record<string, any>;
2446
+ }
2447
+ declare function useListState<T extends ListItem>({ items, getSearchText, selectionMode, selectedKeys: controlledSelectedKeys, onSelectionChange, defaultSelectedKeys, focusedKey: controlledFocusedKey, onFocusChange, defaultFocusedKey, disallowEmptySelection, allowTypeAhead, allowWrapNavigation, onAction, onKeyDown, }: UseListStateOptions<T>): ListState<T>;
2448
+ /** @deprecated Use `ListItem` instead */
2449
+ type TableListItem = ListItem;
2450
+ /** @deprecated Use `useListState` instead */
2451
+ declare const useTableListState: typeof useListState;
1045
2452
 
1046
- declare const IconKeyOutlineDash: react.ForwardRefExoticComponent<Omit<TablerIconsProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2453
+ /**
2454
+ * Defines the structure and behavior of a table column.
2455
+ *
2456
+ * @template T - The type of table list items
2457
+ * @property key - Unique identifier for the column, used for grid areas
2458
+ * @property header - Content to display in the column header
2459
+ * @property align - Text alignment within the column. Defaults to "left"
2460
+ * @property flex - Whether the column should grow to fill available space
2461
+ * @property requiredSize - Minimum screen size required to show this column
2462
+ * @property render - Function to render the cell content for each row
2463
+ */
2464
+ interface ColumnDefinition<T extends ListItem> {
2465
+ key: string;
2466
+ header: ReactNode;
2467
+ align?: "left" | "center" | "right";
2468
+ flex?: boolean;
2469
+ requiredSize?: Size;
2470
+ render: (value: T, elementFocused: boolean, elementSelected: boolean) => ReactNode;
2471
+ }
2472
+ /**
2473
+ * Props for the TableList component.
2474
+ *
2475
+ * @template T - The type of table list items extending ListItem
2476
+ * @property data - Array of data items to display in the table
2477
+ * @property columns - Column definitions that specify how to render each column
2478
+ * @property headerOffset - Offset from top for sticky header positioning. Defaults to 0
2479
+ * @property noHeader - Whether to hide the header row. Defaults to false
2480
+ * @property rowClassName - Additional CSS class for table rows
2481
+ * @property fullWidth - Whether the table should take full width. Defaults to false
2482
+ * @property headerClassName - Additional CSS class for the header
2483
+ * @property backgroundClassName - Additional CSS class for the table background
2484
+ * @property notFound - Content to show when no data is available
2485
+ * @property size - Size variant for the table rows and header. Defaults to Size.Md
2486
+ * @property variant - Visual variant for styling. Defaults to Variant.Default
2487
+ * @property selectionMode - Selection mode: "none", "single", or "multiple". Defaults to "none"
2488
+ * @property selectedKeys - Currently selected item keys (controlled mode)
2489
+ * @property onSelectionChange - Callback when selection changes (controlled mode)
2490
+ * @property defaultSelectedKeys - Default selected keys for uncontrolled mode
2491
+ * @property focusedKey - Currently focused item key (controlled mode)
2492
+ * @property onFocusChange - Callback when focus changes (controlled mode)
2493
+ * @property defaultFocusedKey - Default focused key for uncontrolled mode
2494
+ * @property disallowEmptySelection - Whether to prevent clearing all selections. Defaults to false
2495
+ * @property allowTypeAhead - Enable type-ahead search functionality. Defaults to true
2496
+ * @property allowWrapNavigation - Allow wrapping navigation at list boundaries. Defaults to true
2497
+ * @property getSearchText - Custom function to extract search text from items
2498
+ * @property onAction - Callback for item activation (Enter key or double-click equivalent)
2499
+ * @property onKeyDown - Custom keydown handler for items
2500
+ * @property transparentHeader - Whether the header should have a transparent background. Defaults to true
2501
+ * @property showIndicators - Whether to show selection indicators (radio/checkbox) in first column. Defaults to false
2502
+ */
2503
+ /**
2504
+ * Appearance presets for common styling patterns.
2505
+ *
2506
+ * - `card`: Default — header, card-panel background, full padding. Used in dashboard.
2507
+ * - `panel`: Transparent background, subtle hover, no header, compact. Used in sidebars and modals.
2508
+ * - `inline`: Minimal styling, transparent, no padding. Used for embedded lists.
2509
+ */
2510
+ type TableListAppearance = "card" | "panel" | "inline";
2511
+ interface TableListProps<T extends ListItem> {
2512
+ data: T[];
2513
+ columns: ColumnDefinition<T>[];
2514
+ headerOffset?: number;
2515
+ noHeader?: boolean;
2516
+ rowClassName?: string;
2517
+ fullWidth?: boolean;
2518
+ headerClassName?: string;
2519
+ backgroundClassName?: string;
2520
+ notFound?: ReactNode;
2521
+ size?: Size;
2522
+ variant?: Variant;
2523
+ appearance?: TableListAppearance;
2524
+ selectionMode?: SelectionMode;
2525
+ selectedKeys?: Set<string>;
2526
+ onSelectionChange?: (keys: Set<string>) => void;
2527
+ defaultSelectedKeys?: Set<string>;
2528
+ focusedKey?: string | null;
2529
+ onFocusChange?: (key: string | null) => void;
2530
+ defaultFocusedKey?: string | null;
2531
+ disallowEmptySelection?: boolean;
2532
+ deselectOnClickAway?: boolean;
2533
+ allowTypeAhead?: boolean;
2534
+ allowWrapNavigation?: boolean;
2535
+ getSearchText?: (item: T) => string;
2536
+ onAction?: (key: string, event: KeyboardEvent | MouseEvent) => void;
2537
+ onKeyDown?: (key: string, event: KeyboardEvent) => void;
2538
+ showIndicators?: boolean;
2539
+ }
2540
+ /**
2541
+ * A flexible, accessible table list component with built-in selection and keyboard navigation.
2542
+ *
2543
+ * Features:
2544
+ * - Desktop-style selection behavior with CMD/CTRL+Click and Shift+Click support
2545
+ * - Keyboard navigation with arrow keys, space, and enter
2546
+ * - Type-ahead search functionality
2547
+ * - Responsive column hiding based on screen size
2548
+ * - Consecutive visual merging of selected/focused items
2549
+ * - Controlled and uncontrolled selection modes
2550
+ * - Customizable sizing and styling
2551
+ *
2552
+ * Selection Behavior:
2553
+ * - Regular click: Select only clicked item
2554
+ * - Cmd+Click: Toggle selection of clicked item
2555
+ * - Shift+Click: Extend selection from anchor to clicked item (multiple mode only)
2556
+ * - Arrow keys: Move focus and select item (single selection)
2557
+ * - Cmd+Arrow: Move focus without changing selection
2558
+ * - Shift+Arrow: Extend selection in direction (multiple mode only)
2559
+ * - Space: Toggle selection of focused item
2560
+ * - Enter: Activate item (calls onAction) or behaves like click if no onAction
2561
+ * - Cmd+A: Select all items (multiple mode only)
2562
+ * - Escape: Clear all selection
2563
+ *
2564
+ * @template T - The type of data items, must extend ListItem
2565
+ * @param props - Configuration props for the table list
2566
+ * @returns Rendered table list component
2567
+ *
2568
+ * @example
2569
+ * ```tsx
2570
+ * interface User extends ListItem {
2571
+ * key: string;
2572
+ * name: string;
2573
+ * email: string;
2574
+ * }
2575
+ *
2576
+ * const columns: ColumnDefinition<User>[] = [
2577
+ * {
2578
+ * key: 'name',
2579
+ * header: 'Name',
2580
+ * render: (user) => user.name,
2581
+ * flex: true,
2582
+ * },
2583
+ * {
2584
+ * key: 'email',
2585
+ * header: 'Email',
2586
+ * render: (user) => user.email,
2587
+ * },
2588
+ * ];
2589
+ *
2590
+ * <TableList
2591
+ * data={users}
2592
+ * columns={columns}
2593
+ * selectionMode="multiple"
2594
+ * onSelectionChange={setSelectedKeys}
2595
+ * onAction={(key) => openUser(key)}
2596
+ * />
2597
+ * ```
2598
+ */
2599
+ declare function TableList<T extends ListItem>({ data, columns, headerOffset, noHeader, rowClassName, headerClassName, backgroundClassName, notFound, size, variant, selectionMode, selectedKeys, onSelectionChange, defaultSelectedKeys, focusedKey, onFocusChange, defaultFocusedKey, disallowEmptySelection, deselectOnClickAway, allowTypeAhead, allowWrapNavigation, getSearchText, onAction, onKeyDown, showIndicators, appearance, }: TableListProps<T>): react_jsx_runtime.JSX.Element;
1047
2600
 
1048
- interface IconKeyProps extends TablerIconsProps {
1049
- fillOpacity?: number;
1050
- dashed?: boolean;
1051
- center?: "plus" | "minus";
2601
+ interface TabsProps {
2602
+ visuals?: "icons" | "labels" | "both";
2603
+ size?: Size;
2604
+ children: TabChild[];
2605
+ selected?: string;
2606
+ onTabChange: (key: string) => void;
2607
+ leftWidget?: ReactNode;
2608
+ rightWidget?: ReactNode;
2609
+ defaultContent?: ReactNode;
2610
+ emptyTabText?: string;
2611
+ tabsContainerClassName?: string;
1052
2612
  }
1053
- declare const IconKey: react.ForwardRefExoticComponent<Omit<IconKeyProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2613
+ /**
2614
+ * Internal tabs row component that renders the visual tab buttons with animated selection indicator.
2615
+ * @requires Must be used within a `Tabs.Root` from `@base-ui/react/tabs` for proper functionality.
2616
+ *
2617
+ * Features:
2618
+ * - Animated selection indicator driven by base-ui's `Tabs.Indicator` and the
2619
+ * CSS variables it publishes (`--active-tab-left`, `--active-tab-width`, ...).
2620
+ * Resize/layout changes are tracked internally by base-ui — no consumer wiring.
2621
+ * - Support for icons, labels, or both visual modes
2622
+ * - Configurable size and variant styling per tab
2623
+ * - Tooltips displaying tab titles on hover
2624
+ * - Left and right widget slots for additional controls
2625
+ * - Responsive design with container queries
2626
+ * - Automatic fallback icon for tabs without specified icons
2627
+ */
2628
+ declare function InnerTabsRow({ visuals, size, children, selected, leftWidget, rightWidget, tabsContainerClassName, }: Omit<TabsProps, "onTabChange" | "defaultContent" | "emptyTabText">): ReactNode;
2629
+ declare const TabsRow: react.MemoExoticComponent<typeof InnerTabsRow>;
2630
+ /**
2631
+ * Internal tabs content component. Renders one `Tabs.Panel` per tab; base-ui
2632
+ * shows the active panel and unmounts the others.
2633
+ */
2634
+ declare function InnerTabsContent({ childrenTabs, }: {
2635
+ childrenTabs: TabChild[];
2636
+ }): ReactNode;
2637
+ declare const TabsContent: react.MemoExoticComponent<typeof InnerTabsContent>;
2638
+ /**
2639
+ * Complete tabs component that combines tab navigation and content with smooth animations.
2640
+ * Built on top of Base UI's `Tabs` primitive — `Tabs.Indicator` drives the moving
2641
+ * background, eliminating the manual ref/spring/resize tracking the Radix-based
2642
+ * version required.
2643
+ *
2644
+ * @example
2645
+ * ```tsx
2646
+ * const [selectedTab, setSelectedTab] = useState("tab1");
2647
+ * const tabs = [
2648
+ * { key: "tab1", title: "First Tab", icon: <IconUser />, content: <div>...</div> },
2649
+ * { key: "tab2", title: "Second Tab", variant: Variant.Primary, content: <div>...</div> },
2650
+ * ];
2651
+ *
2652
+ * <Tabs
2653
+ * visuals="both"
2654
+ * size="md"
2655
+ * children={tabs}
2656
+ * selected={selectedTab}
2657
+ * onTabChange={setSelectedTab}
2658
+ * />
2659
+ * ```
2660
+ */
2661
+ declare function InnerTabs(props: TabsProps): ReactNode;
2662
+ declare const Tabs: react.MemoExoticComponent<typeof InnerTabs>;
1054
2663
 
1055
- interface IconProjectProps extends TablerIconsProps {
2664
+ interface AvatarProps {
2665
+ src?: string;
2666
+ icon?: React.ReactNode;
2667
+ alt: string;
2668
+ /** Accessible label for the avatar when used as an interactive element. */
2669
+ "aria-label"?: string;
2670
+ size?: Size;
2671
+ onClick?: MouseEventHandler<HTMLSpanElement>;
2672
+ variant?: Variant;
2673
+ visuals?: "default" | "border" | "inverted" | "inverted-border";
2674
+ status?: {
2675
+ variant?: Variant;
2676
+ placement?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
2677
+ text?: string;
2678
+ };
1056
2679
  className?: string;
1057
2680
  }
1058
- declare const IconProject: react.ForwardRefExoticComponent<Omit<IconProjectProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2681
+ /**
2682
+ * An avatar component that displays user images, icons, or initials with various visual styles.
2683
+ * @param src - Optional source URL for the avatar image
2684
+ * @param icon - Optional icon to display in the avatar
2685
+ * @param alt - Alt text for the avatar (required for accessibility)
2686
+ * @param size - Optional size to apply to the avatar
2687
+ * @param onClick - Optional click handler
2688
+ * @param variant - Optional variant to apply to the avatar (default is "default")
2689
+ * @param visuals - Visual style of the avatar: "default", "border", "inverted", or "inverted-border"
2690
+ * @param status - Optional status indicator with variant, placement, and text
2691
+ * @param className - Optional additional CSS classes
2692
+ */
2693
+ declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<HTMLSpanElement>>;
1059
2694
 
1060
- interface IconPreviewViewProps extends TablerIconsProps {
1061
- className?: string;
2695
+ interface ColorPickerPopoverProps<T extends string | RawColor> {
2696
+ value: T;
2697
+ onChange: (color: T) => void;
1062
2698
  }
1063
- declare const IconPreviewView: react.ForwardRefExoticComponent<Omit<IconPreviewViewProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2699
+ declare function ColorPickerPopover<T extends string | RawColor>({ value, onChange, }: ColorPickerPopoverProps<T>): react_jsx_runtime.JSX.Element;
1064
2700
 
1065
- declare function WorldElementIcon({ type }: {
1066
- type: string;
2701
+ declare function NumberOrListInput({ value, onChange, title, }: {
2702
+ value: number | number[];
2703
+ onChange: (value: number | number[]) => void;
2704
+ title?: string;
1067
2705
  }): react_jsx_runtime.JSX.Element;
1068
2706
 
1069
- interface IconFilterBoxProps extends TablerIconsProps {
1070
- className?: string;
1071
- }
1072
- declare const IconFilterBox: react.ForwardRefExoticComponent<Omit<IconFilterBoxProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
1073
-
1074
- interface IconFilterXProps extends TablerIconsProps {
2707
+ interface DropzoneProps<T extends ListItem> {
2708
+ onDrop: (files: File[]) => void;
2709
+ data: T[];
2710
+ columns: ColumnDefinition<T>[];
2711
+ rowClassName?: string;
2712
+ headerClassName?: string;
2713
+ multiple?: boolean;
2714
+ accept?: Accept;
2715
+ dropText?: string;
2716
+ children?: ReactNode;
1075
2717
  className?: string;
1076
2718
  }
1077
- declare const IconFilterX: react.ForwardRefExoticComponent<Omit<IconFilterXProps, "ref"> & react.RefAttributes<SVGSVGElement>>;
2719
+ declare function Dropzone<T extends ListItem>({ onDrop, data, columns, rowClassName, headerClassName, multiple, accept, children, className, dropText, }: DropzoneProps<T>): react_jsx_runtime.JSX.Element;
1078
2720
 
1079
- interface StaticIconProps {
1080
- children: ReactNode;
2721
+ interface ChipProps {
2722
+ children: string;
1081
2723
  variant?: Variant;
2724
+ size?: Size;
1082
2725
  color?: string;
1083
- size?: Size | "fit";
1084
- deemphasize?: boolean;
1085
- className?: string;
1086
- }
1087
- declare function StaticIcon({ children, variant, size, color, deemphasize, className, }: StaticIconProps): react_jsx_runtime.JSX.Element;
1088
-
1089
- interface ButtonModalProps {
1090
- titleText: string;
1091
- onClick: () => void;
2726
+ renderIcon?: (className: string) => ReactNode;
2727
+ onDelete?: MouseEventHandler<HTMLButtonElement>;
1092
2728
  }
1093
- declare function ButtonModal({ titleText, onClick }: ButtonModalProps): JSX.Element;
2729
+ declare function Chip({ children, variant, size, color, renderIcon, onDelete, }: ChipProps): react_jsx_runtime.JSX.Element;
1094
2730
 
1095
- declare function CopyLinkButton({ link }: {
1096
- link: string;
2731
+ declare function SelectList<T extends string | string[]>({ value, onChange, options, variant, size, notFound, }: SelectProps<T> & {
2732
+ notFound?: ReactNode;
1097
2733
  }): react_jsx_runtime.JSX.Element;
1098
2734
 
1099
- declare function ThemeToggleButton(): react_jsx_runtime.JSX.Element;
2735
+ declare function FormBase({ children, title }: {
2736
+ children: React.ReactNode;
2737
+ title?: string;
2738
+ }): react_jsx_runtime.JSX.Element;
1100
2739
 
1101
- interface CallToActionButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
1102
- variant: Variant.Primary | Variant.Secondary | Variant.Tertiary;
1103
- size: Size.Lg | Size.Md | Size.Sm;
2740
+ interface ImageButtonProps {
2741
+ imageUrl: string;
2742
+ altText: string;
2743
+ hoverText?: string;
2744
+ dimensions?: {
2745
+ width: string;
2746
+ height: string;
2747
+ };
2748
+ onClick: () => void;
2749
+ }
2750
+ declare function ImageButton({ imageUrl, altText, hoverText, dimensions, onClick, }: ImageButtonProps): ReactElement;
2751
+
2752
+ declare enum KeyCode {
2753
+ Mod = "mod",
2754
+ Shift = "shift",
2755
+ Alt = "alt",
2756
+ Ctrl = "ctrl",
2757
+ Space = "space",
2758
+ Delete = "delete",
2759
+ Backspace = "backspace",
2760
+ Enter = "enter",
2761
+ Escape = "escape",
2762
+ Tab = "tab",
2763
+ ArrowUp = "arrowup",
2764
+ ArrowDown = "arrowdown",
2765
+ ArrowLeft = "arrowleft",
2766
+ ArrowRight = "arrowright"
1104
2767
  }
1105
- declare const CallToActionButton: react.ForwardRefExoticComponent<CallToActionButtonProps & react.RefAttributes<HTMLButtonElement>>;
1106
-
1107
2768
  /**
1108
- * Custom hook that returns the preferred system theme.
2769
+ * Parse a Mantine hotkey combo string ("mod+x", "shift+ArrowLeft") into
2770
+ * individual key parts suitable for rendering.
2771
+ */
2772
+ declare function parseHotkeyCombo(combo: string): string[];
2773
+ /**
2774
+ * Renders a keyboard shortcut as a compact inline sequence.
2775
+ * Automatically adapts symbols for macOS (⌘⇧⌥) vs Windows/Linux (Ctrl+Shift+Alt).
1109
2776
  *
1110
- * @returns The preferred system theme, either `Theme.Dark` or `Theme.Light`.
2777
+ * Use `keys` for explicit key lists, or `combo` for Mantine hotkey syntax strings.
1111
2778
  */
1112
- declare function useSystemThemePreference(): Theme.Dark | Theme.Light;
1113
-
1114
- declare function useDelayedBoolean(value: boolean, timeoutDuration: number): boolean;
2779
+ declare function Keybinding({ keys, combo, }: {
2780
+ /** Explicit key list (e.g. [KeyCode.Mod, "x"]) */
2781
+ keys?: (string | KeyCode)[];
2782
+ /** Mantine hotkey syntax string (e.g. "mod+x") — parsed into keys automatically */
2783
+ combo?: string;
2784
+ }): ReactNode;
2785
+ /**
2786
+ * Displays the keybinding hint for a registered action, reading from KeybindingContext.
2787
+ * Shows the first key combo of the action's binding. Returns null if the action isn't registered.
2788
+ *
2789
+ * @example
2790
+ * ```tsx
2791
+ * <NestedItem right={<KeybindingHint action="animation:delete" />}>Delete</NestedItem>
2792
+ * ```
2793
+ */
2794
+ declare function KeybindingHint({ action }: {
2795
+ action: string;
2796
+ }): ReactNode;
1115
2797
 
1116
- interface ThemeProviderProps {
1117
- children: ReactNode;
2798
+ /**
2799
+ * A single keybinding definition: the key combo(s) and optional display label.
2800
+ * Key combos use Mantine hotkey syntax: "mod+x", "space", "ArrowLeft", etc.
2801
+ */
2802
+ interface KeybindingDefinition {
2803
+ /** Key combo strings in Mantine hotkey syntax (e.g. ["mod+x"]). */
2804
+ keys: string[];
2805
+ /** Human-readable label for the action (e.g. "Cut"). */
2806
+ label?: string;
1118
2807
  }
1119
- interface ThemeContextValue {
1120
- explicitTheme: Theme;
1121
- systemPreference: Theme;
1122
- setExplicitTheme: (theme: Theme) => void;
1123
- resolvedTheme: Theme.Dark | Theme.Light;
2808
+ /**
2809
+ * A map of namespaced action IDs to their keybinding definitions.
2810
+ * Packages should namespace their actions (e.g. "animation:delete", "scene:focus").
2811
+ */
2812
+ type KeybindingMap = Record<string, KeybindingDefinition>;
2813
+ interface KeybindingProviderProps {
2814
+ /** Keybinding definitions to provide. Merged with any parent provider's bindings. */
2815
+ value: KeybindingMap;
2816
+ children: ReactNode;
1124
2817
  }
1125
2818
  /**
1126
- * The context for managing the theme in the application.
2819
+ * Provides keybinding definitions to descendant components.
2820
+ * Inherits and merges with any parent KeybindingProvider — inner values override outer
2821
+ * for the same action ID, and new action IDs are added.
2822
+ *
2823
+ * @example
2824
+ * ```tsx
2825
+ * // Studio root: provides all defaults + user overrides
2826
+ * <KeybindingProvider value={{ ...animationKeybindings, ...userOverrides }}>
2827
+ * <App />
2828
+ * </KeybindingProvider>
2829
+ *
2830
+ * // Nested override for a specific context
2831
+ * <KeybindingProvider value={{ "animation:delete": { keys: ["backspace"] } }}>
2832
+ * <SpecialPanel />
2833
+ * </KeybindingProvider>
2834
+ * ```
1127
2835
  */
1128
- declare const ThemeContext: react.Context<ThemeContextValue>;
1129
-
1130
- declare function useTheme(): ThemeContextValue;
1131
-
2836
+ declare function KeybindingProvider({ value, children }: KeybindingProviderProps): react_jsx_runtime.JSX.Element;
1132
2837
  /**
1133
- * A hook used to add a toast to the toast context. Must be used within a ToastManager context.
1134
- * @returns A function that adds a toast to the toast context.
2838
+ * Returns the full keybinding map from the nearest provider (including inherited bindings).
1135
2839
  */
1136
- declare function useAddToast(): (data: ToastData) => void;
2840
+ declare function useKeybindingMap(): KeybindingMap;
2841
+ /**
2842
+ * Returns the keybinding definition for a specific action ID, or undefined if not registered.
2843
+ */
2844
+ declare function useKeybinding(actionId: string): KeybindingDefinition | undefined;
1137
2845
 
1138
2846
  /**
1139
2847
  * Renders a tree of nodes.
@@ -1147,13 +2855,6 @@ declare function NodeTree({ nodeList, renderNode, }: {
1147
2855
  renderNode: (node: any) => ReactNode;
1148
2856
  }): react_jsx_runtime.JSX.Element;
1149
2857
 
1150
- /**
1151
- * Custom hook to detect clicks outside a specified element.
1152
- * @param onClickAway - A callback function triggered when a click outside the element occurs.
1153
- * @param ref - An optional ref to be attached to the element you want to monitor.
1154
- */
1155
- declare function useClickAway<T extends HTMLElement | null>(ref: React.RefObject<T>, onClickAway: (event: MouseEvent | TouchEvent) => void): void;
1156
-
1157
2858
  interface MenuItemProps {
1158
2859
  children: ReactNode;
1159
2860
  variant: Variant;
@@ -1168,27 +2869,4 @@ interface SnippetProps {
1168
2869
  }
1169
2870
  declare function Snippet({ text, language, className }: SnippetProps): react_jsx_runtime.JSX.Element;
1170
2871
 
1171
- declare function getHeight(size?: Size): string;
1172
- declare function getWidth(size?: Size): string;
1173
- declare function getChipInsertSize(size?: Size): string;
1174
- declare function getFontSize(size?: Size): string;
1175
- declare function getBorder(variant?: Variant): string;
1176
- declare function getHoverBorder(variant?: Variant): string;
1177
- declare function getReversibleBgText(variant?: Variant, active?: boolean): string;
1178
- declare function getItemSideStyle(variant?: Variant | "custom"): string;
1179
- declare function getItemStyle(variant?: Variant | "custom"): string;
1180
- declare function getSeparatorStyle(variant?: Variant | "custom"): string;
1181
- declare function getChipColor(variant?: Variant | "custom"): string;
1182
- declare function getOutline(variant?: Variant): string;
1183
- declare function getBasicTextColor(variant?: Variant | "custom"): string;
1184
- declare function getTooltipTextColor(variant?: Variant | "custom", invert?: boolean): string;
1185
- declare function getBasicBgColor(variant?: Variant | "custom"): string;
1186
- declare function getTextCaretColor(variant?: Variant | "custom"): string;
1187
- declare function getHoverTextStyles(variant?: Variant): string;
1188
- declare function getHoverButtonStyles(variant?: Variant): string;
1189
- declare function getCheckedBgStyles(variant?: Variant): string;
1190
- declare function getToggleButtonStyles(variant: Variant): string;
1191
- declare function getGradient(variant?: Variant): string;
1192
- declare function getInputStyles(flex?: boolean, subtle?: boolean, bold?: boolean, size?: Size, disabled?: boolean, className?: string, cursor?: string, constrainHeight?: boolean): string;
1193
-
1194
- export { Accordion, type AccordionProps, Anchor, type AnchorProps, Avatar, type AvatarProps, BasicNumberField, type BasicNumberFieldProps, type BasicRowData, Button, ButtonModal, type ButtonModalProps, type ButtonProps, CallToActionButton, type CallToActionButtonProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Collapse, type CollapseProps, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, ColorPickerInput, type ColorPickerInputProps, ColorPickerPopover, type ColorPickerPopoverProps, type ColumnDefinition, ContextMenu, type ContextMenuProps, CopyLinkButton, Dialog, type DialogProps, Dropdown, type DropdownProps, Dropzone, type DropzoneProps, EmailInput, type EmailInputProps, EmailsInput, type EmailsInputProps, FileInput, type FileInputProps, FormBase, IconBox, IconBoxPlus, type IconBoxPlusProps, type IconBoxProps, IconFileTypeAni, type IconFileTypeAniProps, IconFileTypeMod, type IconFileTypeModProps, IconFileTypeVizij, type IconFileTypeVizijProps, IconFilterBox, type IconFilterBoxProps, IconFilterX, type IconFilterXProps, IconHome, type IconHomeProps, IconKey, IconKeyOutline, IconKeyOutlineDash, type IconKeyProps, IconPlayPause, type IconPlayPauseProps, IconPlayerEndBounds, IconPlayerNextKey, IconPlayerPlay, IconPlayerPlay2, IconPreviewView, type IconPreviewViewProps, IconProject, type IconProjectProps, IconRobot, IconRobotPlus, type IconRobotPlusProps, type IconRobotProps, ImageButton, type ImageButtonProps, ImageInput, type ImageInputProps, InnerLayout, InnerScrollArea, type InputProps, Layout, type LayoutProps, Menu, MenuButton, type MenuButtonProps, MenuItem, type MenuItemProps, type MenuProps, Modal, type ModalProps, NestedCheckbox, type NestedCheckboxProps, NestedColorPicker, type NestedColorPickerProps, NestedItem, type NestedItemProps, NestedLabel, type NestedLabelProps, NestedMenu, type NestedMenuProps, NestedParent, NestedRadio, type NestedRadioProps, NestedSelect, type NestedSelectProps, NestedSeparator, type NestedSeparatorProps, NodeTree, NumberOrListInput, PasswordInput, type PasswordInputProps, Popover, type PopoverProps, Progress, type ProgressProps, ScrollArea, Search, type SearchProps, Select, SelectList, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sidebar, type SidebarChild, type SidebarProps, Size, SliderNumberField, type SliderNumberFieldProps, Snippet, Spinner, StaticIcon, type StaticIconProps, Status, type StatusProps, type Step, StringsInput, type StringsInputProps, StyledArea, StyledInput, Switch, type SwitchProps, type TabChild, TableList, type TableListProps, Tabs, type TabsProps, TextArea, type TextAreaProps, TextField, type TextFieldProps, TextInput, type TextInputProps, Theme, ThemeContext, type ThemeContextValue, type ThemeProviderProps, ThemeToggleButton, TimeDisplay, TimeInput, type TimeInputProps, type ToastContainerProps, ToastContext, type ToastData, ToastManager, type ToastManagerProps, type ToastState, ToggleGroup, type ToggleGroupProps, ToggleSquare, type ToggleSquareProps, Tooltip, type TooltipProps, TrackedTooltip, type TrackedTooltipProps, Variant, VerticalStepper, type VerticalStepperProps, WorldElementIcon, getBasicBgColor, getBasicTextColor, getBorder, getCheckedBgStyles, getChipColor, getChipInsertSize, getFontSize, getGradient, getHeight, getHoverBorder, getHoverButtonStyles, getHoverTextStyles, getInputStyles, getItemSideStyle, getItemStyle, getOutline, getReversibleBgText, getSeparatorStyle, getTextCaretColor, getToggleButtonStyles, getTooltipTextColor, getWidth, stampToVisualTime, useAddToast, useClickAway, useDelayedBoolean, useMenu, useSystemThemePreference, useTheme, useTrackedTooltip };
2872
+ export { Accordion, type AccordionProps, type ActionItem, type ActionItemInput, type ActionItemPlaceholder, Anchor, type AnchorConfig, type AnchorProps, Angle, Autocomplete, type AutocompleteItemState, type AutocompleteProps, Avatar, type AvatarProps, type AxisMode, Bounce, type BreadcrumbElement, type BreadcrumbOptionElement, type BreadcrumbStaticElement, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type CanvasContextMenuContext, Checkbox, type CheckboxProps, Chip, ChipInput, type ChipInputProps, type ChipProps, Collapse, type CollapseProps, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, ColorPickerInput, type ColorPickerInputProps, ColorPickerPopover, type ColorPickerPopoverProps, type ColumnDefinition, Combobox, type ComboboxGroup, type ComboboxItemState, type ComboboxItems, type ComboboxOption, type ComboboxProps, type ConfiguredNestedChild, type ConfiguredNestedMenu, ContextMenu, type ContextMenuProps, type CoordinateDebugInfo, CopyLinkButton, Dialog, type DialogProps, Dropdown, type DropdownProps, Dropzone, type DropzoneProps, EmailInput, type EmailInputProps, Eye, EyeOff, Fast, FormBase, HeaderButton, type HeaderButtonProps, ICON_CLASS_NAME, ICON_LG_CLASS_NAME, IconBox, IconBoxPlus, IconFileTypeAni, IconFileTypeFace, IconFileTypeMod, IconFilterBox, IconFilterX, IconGraphView, type IconGraphViewProps, IconHandleIndicator, type IconHandleIndicatorProps, IconHome, IconKey, IconKeyOutline, IconKeyOutlineDash, type IconKeyProps, IconNormalized, type IconNormalizedProps, IconPlayPause, type IconPlayPauseProps, IconPlayerNextKey, IconPlayerPlay, IconPlayerPlay2, IconPreviewView, type IconPreviewViewProps, IconProject, type IconProjectProps, IconRobot, IconRobotPlus, type IconRobotPlusProps, type IconRobotProps, IconVectorAngled, type IconVectorAngledProps, IconVectorBack, IconVectorBezier, IconVectorBezierAutoClamp, type IconVectorBezierAutoClampProps, IconVectorBezierHandles, type IconVectorBezierHandlesProps, IconVectorBezierInsertFlat, type IconVectorBezierInsertFlatProps, IconVectorBezierInsertSloped, type IconVectorBezierInsertSlopedProps, type IconVectorBezierProps, IconVectorCirc, IconVectorCubic, IconVectorExpo, IconVectorFlat, type IconVectorFlatProps, IconVectorLinear, IconVectorQuad, IconVectorQuart, IconVectorQuint, IconVectorSine, type IconVectorTransitionCurveProps, IconVertexFree, type IconVertexFreeProps, IconVertexIndeterminate, type IconVertexIndeterminateProps, IconVertexPaired, type IconVertexPairedProps, IconVerticalNormalize, type IconVerticalNormalizeProps, IconVerticalUniform, type IconVerticalUniformProps, ImageButton, type ImageButtonProps, ImageInput, type ImageInputProps, InnerBreadcrumbs, InnerScrollArea, InnerTabs, InnerTabsRow, KeyCode, Keybinding, type KeybindingDefinition, KeybindingHint, type KeybindingMap, KeybindingProvider, type KeybindingProviderProps, Label, type LayoutActions, LayoutRoot, type LayoutRootProps, type LayoutState, type ListItem, type ListState, Lock, LockOff, MenuButton, type MenuButtonContextValue, type MenuButtonProps, MenuButtonProvider, MenuItem, type MenuItemClickFn, type MenuItemProps, Modal, type ModalProps, MovePlayerEndBounds, MovePlayhead, NestedCheckbox, type NestedCheckboxProps, NestedCheckboxTree, type NestedCheckboxTreeProps, NestedChild, NestedColorPicker, type NestedColorPickerProps, NestedItem, type NestedItemProps, NestedLabel, type NestedLabelProps, NestedMenu, type NestedMenuProps, type NestedOption, NestedParent, NestedParentContext, NestedParentProvider, NestedRadio, type NestedRadioProps, NestedSelect, type NestedSelectProps, NestedSeparator, type NestedSeparatorProps, type NestedStaticProps, NodeTree, NumberField, type NumberFieldProps, NumberOrListInput, type OverlayMode, PaneRegion, type PaneSpec, PasswordInput, type PasswordInputProps, PlayerEndBounds, Popover, type PopoverProps, Progress, ProgressCircle, type ProgressCircleProps, type ProgressProps, Resizer, type ResizerProps, type ScreenPosition, ScrollArea, type ScrollAreaRef, type ScrollInfo, Search, type SearchProps, Select, SelectClose, SelectCursor, SelectList, type SelectOption, type SelectProps, type SelectSizing, SelectTree, type SelectTreeProps, type SelectVisuals, type SelectionMode, Separator, type SeparatorProps, type ShowTooltipOptions, SidebarModal, type SidebarModalProps, type SidebarTab, Size, SliderNumberField, type SliderNumberFieldDragMode, type SliderNumberFieldProps, Slow, Snippet, type SnippetProps, Speaker, SpeakerOff, Spinner, StaticIcon, type StaticIconProps, Status, type StatusProps, type Step, Switch, type SwitchProps, type TabChild, TabbedModal, type TabbedModalProps, TableList, type TableListAppearance, type TableListItem, type TableListProps, Tabs, TabsContent, type TabsProps, TabsRow, TextArea, type TextAreaProps, TextField, type TextFieldProps, Theme, ThemeContext, type ThemeContextValue, type ThemeProviderProps, TimeDisplay, TimeInput, type TimeInputProps, type ToastContainerProps, ToastContext, type ToastData, ToastManager, type ToastManagerProps, type ToastState, ToggleGroup, type ToggleGroupProps, ToggleSquare, type ToggleSquareProps, type ToolbarItem, type ToolbarSpacer, type ToolbarWidget, Tooltip, TooltipContext, TooltipDebug, TooltipHost, type TooltipHostContextValue, type TooltipHostProps, TooltipPortal, type TooltipProps, TooltipProvider, type TooltipSide, type TooltipStore, TrackedTooltip, type TrackedTooltipProps, type TreeOption, type UseCanvasContextMenuOptions, type UseCanvasContextMenuResult, type UseListStateOptions, type UseTooltipAnchorOptions, type UseTooltipAnchorResult, type UseTooltipControlsResult, type UseTooltipTriggerOptions, type UseTooltipTriggerResult, Variant, VerticalStepper, type VerticalStepperProps, type ViewportInfo, type VisibilityState, type WithTooltipContextProps, WorldElementIcon, actionItemsAtom, activeLeftPaneAtom, activeRightPaneAtom, contentWidthAtom, desktopAtom, footerRegionActiveAtom, homeActionItemAtom, isPlaceholder, leftMenuItemsAtom, leftRegionActiveAtom, leftWidthAtom, menuStateAtom, panesAtom, parseHotkeyCombo, rightMenuItemsAtom, rightPaneIdsAtom, rightRegionActiveAtom, rightWidthAtom, stampToVisualTime, toolbarItemsAtom, useActionItems, useActiveLeftPane, useActiveRightPane, useAddToast, useCanvasContextMenu, useClickAway, useContentWidth, useDelayedBoolean, useDesktopState, useFooterRegionActive, useHomeActionItem, useKeybinding, useKeybindingMap, useLayoutActions, useLayoutState, useLeftMenuItems, useLeftRegionActive, useLeftWidth, useListState, useMenuButtonContext, useMenuState, useNestedParent, usePanes, useRightMenuItems, useRightPaneIds, useRightRegionActive, useRightWidth, useRootTooltipHost, useSystemThemePreference, useTableListState, useTabsState, useTheme, useToolbarItems, useTooltip, useTooltipAnchor, useTooltipContext, useTooltipControls, useTooltipHost, useTooltipStore, useTooltipTrigger, useTrackedTooltip, withTooltipHost };