JSDoc
Functions
mergeTheme
functionmergeTheme(base: Theme, override: PartialTheme): Theme
ThemeProvider
functionThemeProvider({ theme, themeOverride, children }: Props): ReactNodeuseTheme
functionuseTheme(): Theme
Banner
functionBanner({ 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.ElementButton
functionButton({ 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.ElementChip
functionChip({ 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.ElementDot
functionDot({ tone, size }: Props): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.ElementIcon
functionIcon({ 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.ElementSkeleton
functionSkeleton({ 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.ElementSpinner
functionSpinner({ 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.ElementConnectionPanel
functionConnectionPanel 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.ElementProviderSelector
functionProviderSelector({ model, }: ProviderSelectorProps): import("/home/runner/work/components/components/node_modules/.pnpm/@types+react@18.3.28/node_modules/@types/react/jsx-runtime").JSX.ElementRepoPickerSheet
functionRepoPickerSheet 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.ElementRepoRow
functionRepoRow({ 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.ElementTypes
Resource
typetype Resource = Resource<T>
Connectivity
typetype Connectivity = | { kind: "online" }
| { kind: "offline" }
| { kind: "uncertain" }Err
typetype Err = { readonly message: string; readonly cause?: unknown }ProviderId
typetype ProviderId = "github" | "gitea" | "gitlab"
ResourceT
typetype ResourceT = Resource<T>
StatusTone
typetype StatusTone = | "neutral" | "brand" | "success" | "warn" | "danger" | "info" | "mine" | "theirs" | "merged"
IconName
typetype 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
typeCategorised 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
typeAccess state for a single repo — checked against current auth token.
type RepoAccess = | { kind: "found" }
| { kind: "forbidden"; currentLogin: string }
| { kind: "missing" }
| { kind: "checking" }Interfaces
Theme
interfaceinterface Theme
name
propertyname: string
colors
propertycolors: ThemeColors
fonts
propertyfonts: ThemeFonts
radii
propertyradii: ThemeRadii
spacing
propertyspacing: ThemeSpacing
shadows
propertyshadows: ThemeShadows
typography
propertytypography: ThemeTypography
ThemeColors
interfaceinterface ThemeColors
bg
propertybg: string
surface
propertysurface: string
surface2
propertysurface2: string
surface3
propertysurface3: string
border
propertyborder: string
border2
propertyborder2: string
text
propertytext: string
text2
propertytext2: string
text3
propertytext3: string
text4
propertytext4: string
brand
propertybrand: string
brand2
propertybrand2: string
brandFg
propertybrandFg: string
brandBg
propertybrandBg: string
success
propertysuccess: string
successBg
propertysuccessBg: string
successBorder
propertysuccessBorder: string
warn
propertywarn: string
warnBg
propertywarnBg: string
warnBorder
propertywarnBorder: string
danger
propertydanger: string
dangerBg
propertydangerBg: string
dangerBorder
propertydangerBorder: string
info
propertyinfo: string
infoBg
propertyinfoBg: string
infoBorder
propertyinfoBorder: string
mine
propertymine: string
mineBg
propertymineBg: string
mineBorder
propertymineBorder: string
theirs
propertytheirs: string
theirsBg
propertytheirsBg: string
theirsBorder
propertytheirsBorder: string
merged
propertymerged: string
mergedBg
propertymergedBg: string
mergedBorder
propertymergedBorder: string
ThemeFonts
interfaceinterface ThemeFonts
ui
propertyui: string
mono
propertymono: string
ThemeRadii
interfaceinterface ThemeRadii
sm
propertysm: number
md
propertymd: number
lg
propertylg: number
ThemeShadow
interfaceinterface ThemeShadow
color
propertycolor: string
opacity
propertyopacity: number
offsetX
propertyoffsetX: number
offsetY
propertyoffsetY: number
radius
propertyradius: number
elevation
propertyelevation: number
ThemeShadows
interfaceinterface ThemeShadows
s1
propertys1: ThemeShadow
s2
propertys2: ThemeShadow
modal
propertymodal: ThemeShadow
ThemeSpacing
interfaceinterface ThemeSpacing
xs
propertyxs: number
sm
propertysm: number
md
propertymd: number
lg
propertylg: number
xl
propertyxl: number
ThemeTypography
interfaceinterface ThemeTypography
t12
propertyt12: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }t13
propertyt13: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }t14
propertyt14: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }t15
propertyt15: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }t16
propertyt16: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }t18
propertyt18: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }t22
propertyt22: { size: number; lineHeight: number; weight: "400" | "500" | "600" | "700"; }ConnectionPanelProps
interfaceinterface ConnectionPanelProps
model
propertymodel: IConnectionModel
ConnectionSuccess
interfaceConnection success payload.
interface ConnectionSuccess
login
propertylogin: string
provider
propertyprovider: ProviderId
IConnectionModel
interfaceinterface IConnectionModel
provider
propertyCurrent selected provider.
provider: ProviderId
authMethod
propertyOAuth or PAT — GitHub supports both; Gitea/GitLab require PAT.
authMethod: { kind: "oauth"; } | { kind: "pat"; token: string; }host
propertyDefault = the provider's public cloud; custom = self-hosted URL.
host: { kind: "default"; } | { kind: "custom"; url: string; }connection
propertyFour-state Resource for the current authentication attempt.
connection: Resource<ConnectionSuccess>
errorKind
propertyCategorised error when connection.kind === "error".
errorKind: { kind: "none"; } | { kind: "some"; value: ConnectionErrorKind; }onProviderChange
methodonProviderChange(p: ProviderId): void
onAuthMethodChange
methodonAuthMethodChange(m: { kind: "oauth"; } | { kind: "pat"; token: string; }): voidonHostChange
methodonHostChange(h: { kind: "default"; } | { kind: "custom"; url: string; }): voidonConnect
methodonConnect(): Promise<void>
onDisconnect
methodonDisconnect(): Promise<void>
IProviderSelectorModel
interfaceinterface IProviderSelectorModel
current
propertyCurrent provider and host (read-only display).
current: { provider: ProviderId; host: string; }state
propertySelection lifecycle state.
state: Resource<void>
isOpen
propertyWhether the selector is open (controls sheet visibility).
isOpen: boolean
onSelectProvider
methodonSelectProvider(provider: ProviderId): void
onCustomHostChange
methodonCustomHostChange(host: string): void
onConfirm
methodonConfirm(): Promise<void>
onDismiss
methodonDismiss(): void
ProviderSelectorProps
interfaceinterface ProviderSelectorProps
model
propertymodel: IProviderSelectorModel
IRepoPickerModel
interfaceinterface IRepoPickerModel
repos
propertyFull repo list — all 4 Resource states.
repos: Resource<readonly RepoInfo[]>
filter
propertyCurrent filter text (controlled).
filter: string
picked
propertySelection state — discriminated union, no nullable.
picked: { kind: "none"; } | { kind: "picking"; repo: RepoInfo; } | { kind: "picked"; repo: RepoInfo; }currentLogin
propertyWho we are authed as (shown in forbidden chip copy).
currentLogin: { kind: "anonymous"; } | { kind: "loggedIn"; login: string; }filteredRepos
propertyFiltered + sorted subset — computed by the model, not this component.
filteredRepos: readonly RepoInfo[]
canCreate
propertyWhether the current auth token has repo-create scope.
canCreate: boolean
onFilterChange
methodonFilterChange(v: string): void
onSelect
methodonSelect(repo: RepoInfo): Promise<void>
onRefresh
methodonRefresh(): Promise<void>
onOpenCreate
methodonOpenCreate(): void
onDismiss
methodonDismiss(): void
RepoInfo
interfaceRepo metadata returned from the provider's list-repos API.
interface RepoInfo
owner
propertyowner: string
name
propertyname: string
isPrivate
propertyisPrivate: boolean
defaultBranch
propertydefaultBranch: string
pushedAt
propertypushedAt: string
access
propertyaccess: RepoAccess
RepoPickerSheetProps
interfaceinterface RepoPickerSheetProps
model
propertymodel: IRepoPickerModel
Constants
defaultLightTheme
constconst defaultLightTheme: Theme
PLACEHOLDER_HOST_EXAMPLES
constconst 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"; }