# API

> @dev-bench/components public exports.

Source: https://components.n.yatsyk.com/docs/components/api

# API

Everything below is exported from the package root unless noted otherwise.

## Object inspector

| Export                       | Kind      | Summary                                                                                                |
| ---------------------------- | --------- | ------------------------------------------------------------------------------------------------------ |
| `ObjectInspector`            | component | Schema-driven inspector for hierarchical data with view + edit modes.                                  |
| `inferredAdapter`            | adapter   | Schema-less adapter — derives node kinds from the runtime value.                                       |
| `inferKind`                  | function  | Returns a `ValueKind` for any JS value.                                                                |
| `zodAdapter`                 | adapter   | Drives the inspector from a Zod schema (also at `@dev-bench/components/object-inspector/zod-adapter`). |
| `DEFAULT_INSPECTOR_FEATURES` | const     | Feature flags applied when none are passed.                                                            |
| `resolveInspectorFeatures`   | function  | Merges partial feature flags with the defaults.                                                        |

Types: `CopyOption`, `CustomRenderer`, `EditResult`, `ObjectInspectorFeatures`,
`ObjectInspectorMode`, `ObjectInspectorProps`, `Path`,
`PartialInspectorFeatures`, `RendererEditContext`, `RendererMatchContext`,
`RendererViewContext`, `SchemaAdapter`, `SchemaNode`, `ValidationError`,
`ValueKind`.

## Console family

| Export                     | Kind      | Summary                                                           |
| -------------------------- | --------- | ----------------------------------------------------------------- |
| `ConsolePanel`             | component | Filterable, grouped log viewer.                                   |
| `BottomDrawer`             | component | Resizable drawer commonly used to host `ConsolePanel`.            |
| `TraceTree`                | component | Hierarchical span/trace viewer.                                   |
| `HttpInspector`            | component | Request/response browser backed by an `HttpCache`.                |
| `entryKind`                | function  | Discriminator helper for `ConsoleEntry`.                          |
| `resolveFeatures`          | function  | Merges partial `ConsoleFeatures` with `DEFAULT_CONSOLE_FEATURES`. |
| `resolveTraceFeatures`     | function  | Merges partial `TraceFeatures` with `DEFAULT_TRACE_FEATURES`.     |
| `DEFAULT_CONSOLE_FEATURES` | const     | Default feature flags for `ConsolePanel`.                         |
| `DEFAULT_TRACE_FEATURES`   | const     | Default feature flags for `TraceTree`.                            |

Types: `BottomDrawerProps`, `ColumnsConfig`, `ConsoleEntry`,
`ConsoleEntryCount`, `ConsoleEntryError`, `ConsoleEntryGroup`,
`ConsoleEntryLog`, `ConsoleEntryTable`, `ConsoleEntryTime`, `ConsoleFeatures`,
`ConsoleGroupStatus`, `ConsoleLevel`, `ConsoleLevelOrAll`, `ConsolePanelProps`,
`ConsoleSource`, `GroupCollapseDefault`, `HttpCache`, `HttpInspectorProps`,
`HttpMethod`, `HttpRequestRow`, `PartialConsoleFeatures`,
`PartialTraceFeatures`, `Span`, `SpanStatus`, `TimestampFormat`,
`ToolbarConfig`, `TraceFeatures`, `TraceTreeProps`.

## Command palette

| Export           | Kind      | Summary                                                     |
| ---------------- | --------- | ----------------------------------------------------------- |
| `CommandPalette` | component | Cmd-K palette with grouped actions and keyboard navigation. |

Types: `CommandAction`, `CommandPaletteProps`.

## Tweaks

| Export         | Kind      | Summary                                            |
| -------------- | --------- | -------------------------------------------------- |
| `TweaksPanel`  | component | Collapsible panel that hosts `TweakSection`s.      |
| `TweakSection` | component | Group of related tweak controls.                   |
| `TweakRadio`   | component | Radio control for enum-style options.              |
| `TweakSlider`  | component | Numeric slider with min/max/step.                  |
| `TweakToggle`  | component | Boolean toggle.                                    |
| `useTweaks`    | hook      | Persisted, typed tweak state with reset semantics. |

Types: `TweakRadioOption`, `TweakSliderProps`, `TweaksPanelProps`,
`UseTweaksReturn`.

## Primitives

| Export       | Kind      | Summary                                                       |
| ------------ | --------- | ------------------------------------------------------------- |
| `Avatar`     | component | Image + initials avatar with `AvatarProps`.                   |
| `Chip`       | component | Status/label chip.                                            |
| `Icon`       | component | Icon glyph keyed by `IconName`.                               |
| `JsonTree`   | component | Compact JSON tree (lighter alternative to `ObjectInspector`). |
| `Pip`        | component | Small dot indicator (`PipKind`-tinted).                       |
| `Sparkline`  | component | Inline numeric sparkline.                                     |
| `Spinner`    | component | Indeterminate progress spinner.                               |
| `StatusIcon` | component | Status glyph keyed by `StatusKind`.                           |
| `StatusPill` | component | Compact pill that renders a `StatusKind`.                     |

Types: `AvatarProps`, `ChipProps`, `IconName`, `IconProps`, `JsonTreeProps`,
`JsonValue`, `PipKind`, `PipProps`, `SparklineProps`, `SpinnerProps`,
`StatusIconProps`, `StatusKind`, `StatusPillProps`.

## Hooks & a11y

| Export          | Kind     | Summary                                                                     |
| --------------- | -------- | --------------------------------------------------------------------------- |
| `useKey`        | hook     | Bind a keyboard chord/shortcut to a callback.                               |
| `onActivateKey` | function | Press-handler that fires on Enter/Space (a11y for non-button activatables). |

Types: `UseKeySpec`.

## Subpath exports

| Path                                                 | Contents                                                                                                      |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `@dev-bench/components`                              | All exports above (ESM bundle, types).                                                                        |
| `@dev-bench/components/object-inspector/zod-adapter` | `zodAdapter` only — import this if you want to keep `zod` out of your main bundle and code-split the adapter. |
| `@dev-bench/components/styles/tokens.css`            | CSS custom properties (load first).                                                                           |
| `@dev-bench/components/styles/components.css`        | Shared primitive styles.                                                                                      |
| `@dev-bench/components/console/styles.css`           | `ConsolePanel` + `TraceTree` + `HttpInspector` styles.                                                        |
| `@dev-bench/components/object-inspector/styles.css`  | `ObjectInspector` styles.                                                                                     |

See the generated [JSDoc reference](/docs/components/jsdoc) for full type signatures.
