# API

> @dev-bench/gitapp-ui public exports.

Source: https://components.n.yatsyk.com/docs/gitapp-ui/api

# API

All exports come from the package root:

```ts
import { /* … */ } from "@dev-bench/gitapp-ui";
```

## Selector components

| Export             | Kind      | Summary                                                                                                      |
| ------------------ | --------- | ------------------------------------------------------------------------------------------------------------ |
| `ProviderSelector` | component | Pick GitHub / Gitea / GitLab + optional custom host. Driven by `IProviderSelectorModel`.                     |
| `RepoPickerSheet`  | component | List user repos with search and access filtering. Driven by `IRepoPickerModel`.                              |
| `RepoRow`          | component | Single repo row used inside `RepoPickerSheet` (also exported for custom layouts).                            |
| `ConnectionPanel`  | component | Combined provider + token + host configuration for first-run / settings flows. Driven by `IConnectionModel`. |

Types: `ProviderSelectorProps`, `IProviderSelectorModel`,
`RepoPickerSheetProps`, `IRepoPickerModel`, `RepoInfo`, `RepoAccess`,
`ConnectionPanelProps`, `IConnectionModel`, `ConnectionErrorKind`,
`ConnectionSuccess`.

## Theme

| Export              | Kind      | Summary                                       |
| ------------------- | --------- | --------------------------------------------- |
| `ThemeProvider`     | component | Injects a `Theme` into all descendants.       |
| `useTheme`          | hook      | Reads the current theme.                      |
| `defaultLightTheme` | const     | Built-in light palette + tokens.              |
| `mergeTheme`        | function  | Deep-merge a partial theme over a base theme. |

Types: `Theme`, `ThemeColors`, `ThemeFonts`, `ThemeRadii`, `ThemeShadow`,
`ThemeShadows`, `ThemeSpacing`, `ThemeTypography`.

## Primitives

| Export     | Kind      | Summary                                                       |
| ---------- | --------- | ------------------------------------------------------------- |
| `Banner`   | component | Inline banner for warnings / errors / info.                   |
| `Button`   | component | Primary / secondary / danger / ghost variants in three sizes. |
| `Chip`     | component | Small status tag tinted by `StatusTone`.                      |
| `Dot`      | component | Single dot indicator (online / offline / error pulse).        |
| `Icon`     | component | RN-svg glyph keyed by `IconName`.                             |
| `Skeleton` | component | Animated placeholder block.                                   |
| `Spinner`  | component | Indeterminate progress spinner.                               |

Types: `IconName`.

## Cross-component types

| Export         | Kind  | Summary                                                                                                |
| -------------- | ----- | ------------------------------------------------------------------------------------------------------ |
| `Resource`     | const | Constructors for the `Resource<T>` discriminated union (`idle` / `loading` / `ready` / `error`).       |
| `ResourceT`    | type  | Alias for `Resource<T>` (the generic union itself, separate from the constructors object).             |
| `Err`          | type  | `{ message: string; cause?: unknown }`.                                                                |
| `StatusTone`   | type  | `"neutral" \| "brand" \| "success" \| "warn" \| "danger" \| "info" \| "mine" \| "theirs" \| "merged"`. |
| `ProviderId`   | type  | `"github" \| "gitea" \| "gitlab"`.                                                                     |
| `Connectivity` | type  | `{ kind: "online" } \| { kind: "offline" } \| { kind: "uncertain" }`.                                  |

## Strings

| Export                      | Kind  | Summary                                                                                   |
| --------------------------- | ----- | ----------------------------------------------------------------------------------------- |
| `PLACEHOLDER_HOST_EXAMPLES` | const | Example host strings shown in form inputs. Move to your i18n catalogue when you localize. |

## Source-only distribution

This package publishes `.tsx` source — there is no `dist/`. Your bundler runs
JSX/TS at build time, which means:

* You must not import this package from a Node ESM environment that lacks a
  TS loader.
* Type-checking happens in your app's `tsc` pass against the package's
  ambient `react-native` peer dep — no separate `.d.ts` files are emitted.

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