Components

← Back to module

JSDoc

Functions

mergeTheme

function
mergeTheme(base: Theme, override: PartialTheme): Theme

ThemeProvider

function
ThemeProvider({ theme, themeOverride, children }: Props): ReactNode

useTheme

function
useTheme(): Theme

Banner

function
Banner({ kind, title, children, icon, trailing }: Props): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

Button

function
Button({ label, onPress, variant, size, disabled, leading, trailing, block, accessibilityLabel, }: Props): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

Chip

function
Chip({ label, tone, mono, leading, trailing, }: Props): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

Dot

function
Dot({ tone, size }: Props): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

Icon

function
Icon({ name, size, color, strokeWidth }: Props): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

Skeleton

function
Skeleton({ width, height, radius, style, }: Props): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

Spinner

function
Spinner({ size, thickness, tone, trackOpacity, }: Props): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

ConnectionPanel

function

ConnectionPanel renders the full connection flow: 1. Provider radio (GitHub / Gitea / GitLab) 2. Auth sub-form (OAuth button or PAT input, per provider) 3. Custom host input (Gitea / GitLab) 4. Full Resource<T> shell on the auth attempt

ConnectionPanel({ model }: ConnectionPanelProps): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

ProviderSelector

function
ProviderSelector({ model, }: ProviderSelectorProps): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

RepoPickerSheet

function

RepoPickerSheet is a bottom-sheet style modal. List surface is derived from a single pickListSurface() helper that takes repos + filteredRepos + picked and returns one discriminated ListSurface. The RepoRow sub-component is extracted so consumers can wrap it with observer() to get per-row MobX reactivity.

RepoPickerSheet({ model }: RepoPickerSheetProps): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

RepoRow

function
RepoRow({ repo, isPicking, onSelect, theme, }: { readonly repo: RepoInfo; readonly isPicking: boolean; readonly onSelect: () => void; readonly theme: Theme; }): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.Element

Types

Resource

type
type Resource = Resource<T>

Connectivity

type
type Connectivity = | { kind: "online" }
  | { kind: "offline" }
  | { kind: "uncertain" }

Err

type
type Err = { readonly message: string; readonly cause?: unknown }

ProviderId

type
type ProviderId = "github" | "gitea" | "gitlab"

ResourceT

type
type ResourceT = Resource<T>

StatusTone

type
type StatusTone = | "neutral"
  | "brand"
  | "success"
  | "warn"
  | "danger"
  | "info"
  | "mine"
  | "theirs"
  | "merged"

IconName

type
type IconName = | "check" | "x" | "alert" | "alertTri" | "info"
  | "chevronRight" | "chevronDown" | "chevronLeft" | "chevronUp"
  | "arrowRight" | "arrowLeft"
  | "refresh" | "rotate" | "search" | "plus" | "more" | "menu"
  | "lock" | "unlock" | "key"
  | "cloud" | "cloudOff" | "git" | "branch"
  | "folder" | "file" | "fileText" | "image"
  | "user" | "users" | "eye" | "eyeOff"
  | "download" | "upload" | "bookmark" | "bolt" | "trash"
  | "settings" | "activity" | "shield" | "wrench"
  | "circle" | "dot"

ConnectionErrorKind

type

Categorised connection error so recovery copy can be specific.

type ConnectionErrorKind = | { kind: "auth"; reason: string }   // bad token / OAuth failure
  | { kind: "network" }                // unreachable
  | { kind: "not-found" }

RepoAccess

type

Access state for a single repo — checked against current auth token.

type RepoAccess = | { kind: "found" }
  | { kind: "forbidden"; currentLogin: string }
  | { kind: "missing" }
  | { kind: "checking" }

Interfaces

Theme

interface
interface Theme
Members

name

property
name: string

colors

property
colors: ThemeColors

fonts

property
fonts: ThemeFonts

radii

property
radii: ThemeRadii

spacing

property
spacing: ThemeSpacing

shadows

property
shadows: ThemeShadows

typography

property
typography: ThemeTypography

ThemeColors

interface
interface ThemeColors
Members

bg

property
bg: string

surface

property
surface: string

surface2

property
surface2: string

surface3

property
surface3: string

border

property
border: string

border2

property
border2: string

text

property
text: string

text2

property
text2: string

text3

property
text3: string

text4

property
text4: string

brand

property
brand: string

brand2

property
brand2: string

brandFg

property
brandFg: string

brandBg

property
brandBg: string

success

property
success: string

successBg

property
successBg: string

successBorder

property
successBorder: string

warn

property
warn: string

warnBg

property
warnBg: string

warnBorder

property
warnBorder: string

danger

property
danger: string

dangerBg

property
dangerBg: string

dangerBorder

property
dangerBorder: string

info

property
info: string

infoBg

property
infoBg: string

infoBorder

property
infoBorder: string

mine

property
mine: string

mineBg

property
mineBg: string

mineBorder

property
mineBorder: string

theirs

property
theirs: string

theirsBg

property
theirsBg: string

theirsBorder

property
theirsBorder: string

merged

property
merged: string

mergedBg

property
mergedBg: string

mergedBorder

property
mergedBorder: string

ThemeFonts

interface
interface ThemeFonts
Members

ui

property
ui: string

mono

property
mono: string

ThemeRadii

interface
interface ThemeRadii
Members

sm

property
sm: number

md

property
md: number

lg

property
lg: number

ThemeShadow

interface
interface ThemeShadow
Members

color

property
color: string

opacity

property
opacity: number

offsetX

property
offsetX: number

offsetY

property
offsetY: number

radius

property
radius: number

elevation

property
elevation: number

ThemeShadows

interface
interface ThemeShadows
Members

s1

property
s1: ThemeShadow

s2

property
s2: ThemeShadow

modal

property
modal: ThemeShadow

ThemeSpacing

interface
interface ThemeSpacing
Members

xs

property
xs: number

sm

property
sm: number

md

property
md: number

lg

property
lg: number

xl

property
xl: number

ThemeTypography

interface
interface ThemeTypography
Members

t12

property
t12: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }

t13

property
t13: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }

t14

property
t14: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }

t15

property
t15: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }

t16

property
t16: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }

t18

property
t18: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }

t22

property
t22: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }

ConnectionPanelProps

interface
interface ConnectionPanelProps
Members

model

property
model: IConnectionModel

ConnectionSuccess

interface

Connection success payload.

interface ConnectionSuccess
Members

login

property
login: string

provider

property
provider: ProviderId

IConnectionModel

interface
interface IConnectionModel
Members

provider

property

Current selected provider.

provider: ProviderId

authMethod

property

OAuth or PAT — GitHub supports both; Gitea/GitLab require PAT.

authMethod: { kind: "oauth"; } | { kind: "pat"; token: string; }

host

property

Default = the provider's public cloud; custom = self-hosted URL.

host: { kind: "default"; } | { kind: "custom"; url: string; }

connection

property

Four-state Resource for the current authentication attempt.

connection: Resource<ConnectionSuccess>

errorKind

property

Categorised error when connection.kind === "error".

errorKind: { kind: "none"; } | { kind: "some"; value: ConnectionErrorKind; }

onProviderChange

method
onProviderChange(p: ProviderId): void

onAuthMethodChange

method
onAuthMethodChange(m: { kind: "oauth"; } | { kind: "pat"; token: string; }): void

onHostChange

method
onHostChange(h: { kind: "default"; } | { kind: "custom"; url: string; }): void

onConnect

method
onConnect(): Promise<void>

onDisconnect

method
onDisconnect(): Promise<void>

IProviderSelectorModel

interface
interface IProviderSelectorModel
Members

current

property

Current provider and host (read-only display).

current: { provider: ProviderId; host: string; }

state

property

Selection lifecycle state.

state: Resource<void>

isOpen

property

Whether the selector is open (controls sheet visibility).

isOpen: boolean

onSelectProvider

method
onSelectProvider(provider: ProviderId): void

onCustomHostChange

method
onCustomHostChange(host: string): void

onConfirm

method
onConfirm(): Promise<void>

onDismiss

method
onDismiss(): void

ProviderSelectorProps

interface
interface ProviderSelectorProps
Members

model

property
model: IProviderSelectorModel

IRepoPickerModel

interface
interface IRepoPickerModel
Members

repos

property

Full repo list — all 4 Resource states.

repos: Resource<readonly RepoInfo[]>

filter

property

Current filter text (controlled).

filter: string

picked

property

Selection state — discriminated union, no nullable.

picked: { kind: "none"; } | { kind: "picking"; repo: RepoInfo; } | { kind: "picked"; repo: RepoInfo; }

currentLogin

property

Who we are authed as (shown in forbidden chip copy).

currentLogin: { kind: "anonymous"; } | { kind: "loggedIn"; login: string; }

filteredRepos

property

Filtered + sorted subset — computed by the model, not this component.

filteredRepos: readonly RepoInfo[]

canCreate

property

Whether the current auth token has repo-create scope.

canCreate: boolean

onFilterChange

method
onFilterChange(v: string): void

onSelect

method
onSelect(repo: RepoInfo): Promise<void>

onRefresh

method
onRefresh(): Promise<void>

onOpenCreate

method
onOpenCreate(): void

onDismiss

method
onDismiss(): void

RepoInfo

interface

Repo metadata returned from the provider's list-repos API.

interface RepoInfo
Members

owner

property
owner: string

name

property
name: string

isPrivate

property
isPrivate: boolean

defaultBranch

property
defaultBranch: string

pushedAt

property
pushedAt: string

access

property
access: RepoAccess

RepoPickerSheetProps

interface
interface RepoPickerSheetProps
Members

model

property
model: IRepoPickerModel

Constants

defaultLightTheme

const
const defaultLightTheme: Theme

PLACEHOLDER_HOST_EXAMPLES

const
const PLACEHOLDER_HOST_EXAMPLES: { readonly GITHUB_ENTERPRISE: "git.company.com"; readonly GITEA_INSTANCE: "https://gitea.company.com"; readonly GITLAB_INSTANCE: "https://gitlab.company.com"; readonly GENERIC_INSTANCE: "https://your-instance.example.com"; }