tcmts.hub.pages

Types

SearchAsked type
What a search's address holds besides what's searched for: how (`by`), and what to show only.

Server

ChangesPage ({ who: asked, pkg, range }: { who: string; pkg: string; range: string; }) => Promise<Element>
What changed between two versions of a library, as `tcm lib upgrade` would say it: what broke and what was added, each with its signature before and after, then what changed with the same API; how many of what the hub has use each version; and what upgrading does.
HomePage ({ show }: { show: string; }) => Promise<Element>
Home: what's happened lately, newest first: releases, reviews and advisories (and yanks), or one of them (`show`); for a visitor signed in, what people they follow did (`following`), or what's happened to libraries they use (`mine`: in releases they've announced, or in the codebase they gave). Beside it, what to show, and, signed in, the libraries they use.
HubCodePage ({ name }: { name: string; }) => Promise<Element>
A definition or namespace of a mirrored library: the forge's page for it, in the hub's frame.
HubSearchPage ({ q, asked }: { q: string; asked: SearchAsked; }) => Promise<Element>
Search: by name, words in docs, or a type (`:(s: Shape) => number`), across every library's newest version, grouped by library; only what reaches nothing outside itself, what's in a reviewed library, or what runs in the browser, if asked; and, by type, the close matches after.
HubTabs ({ tab }: { tab: string; }) => Promise<Element>
The hub's tabs, Libraries with how many there are.
LibrariesPage ({ sort }: { sort: string; }) => Promise<Element>
Every library, by how many use it, newest first, or most reviewed; how many, and from how many servers (their sources' hosts).
LibraryPage ({ who: asked, pkg, version, tab }: { who: string; pkg: string; version?: string | undefined; tab: …
A library: its newest version, or the one asked for, with its README, code, versions, dependents and what tcm checked; beside them, how to add it, where it runs, what it reaches, where it's fetched from and the libraries it holds.
NotHere ({ what }: { what: string; }) => Element
A page the hub doesn't have.
ProfilePage ({ who: asked, tab }: { who: string; tab: string; }) => Promise<Element>
Someone: their Bluesky name, picture and bio; what they've done (releases, reviews, advisories), their libraries and their reviews; beside them, how many libraries and releases, where they serve code from, and where it runs.

Browser

CodebaseForm ({ url }: { url: string; }) => Element
The codebase whose libraries are "Libraries I use", as the visitor gave it: a `tcm serve` URL.
HubAccount () => Element
Who's signed in, in the hub's header: "Sign in with your handle", which asks for it and sends the browser to sign in, or the visitor's handle and "Sign out". Coming back from signing in, it finishes it.
HubSearch () => Element
The header's search: names, docs or :types across the libraries. `/` goes to it.
SearchFilters ({ q, asked }: { q: string; asked: SearchAsked; }) => Element
The search's filters, for what tcm works out from the code (what it reaches, where it runs) and what people say (reviews), and the legend for where code runs. Changing one searches again.
StarButton ({ author, pkg, count, starred, }: { author: string; pkg: string; count: number; starred: boolean; …
A library's stars, and the visitor's: starring writes a `codes.tcm.star` record to their own repository (one per library, across its versions), and taking it back deletes it; the hub checks it there at once.
VersionPicker ({ label, current, versions, }: { label: string; current: string; versions: { version: string; labe…
A library's versions, to go to another: the one shown chosen.

Shared

AttestationItem ({ a, who, r, author, }: { a: HubAttestation; who: Trusted; r?: HubRelease | undefined; author?: Tr…
A review, advisory or yank in the feed: who said what about which release.
FeedItem ({ r, who }: { r: HubRelease; who: Trusted; }) => Element
A release in the feed: who released what, and a card with how it changed, where it runs and what it reaches.
HUB_STYLE "\n.logo { font-size: 17px; font-weight: 600; color: var(--fg); display: inline-flex; gap: 8px; ali…
The hub's own styles, beside the forge's (whose colours, boxes, badges, rows and place bars it uses): as the hub's mockup draws them, light and dark.
HubFrame ({ tab, title, children, }: { tab: string; title: string; children: ReactNode; }) => Element
The hub's frame: its mark and name, a narrow search, who's signed in, and its two tabs (Libraries is the tab of every page about libraries: one, its code, its changes, a search).
Initial ({ who, size }: { who: Someone; size?: "big" | "sm" | undefined; }) => Element
Someone's picture (their Bluesky profile's), or their initial in a circle of a colour of their own (the same wherever they're shown).
Legend ({ places }: { places?: PlaceMix | undefined; }) => Element
What the place bar's and dots' colours say: anywhere, server, browser (with `places`, how many of each, those there are).
Level ({ level }: { level?: string | undefined; }) => Element | null
A semver level, as a badge: major red, minor green, patch yellow.
LibraryRow ({ l, who, notes, stars, }: { l: Library; who: Trusted; notes?: string | undefined; stars?: number …
A library in a list: its name and version, how many use it, what it is, where it runs and what it reaches, its licence, what people say of it and its stars.
PlaceBar ({ places, thin }: { places: PlaceMix; thin?: boolean | undefined; }) => Element
Where a release's code runs, as a bar: anywhere, on the server and in the browser, by how many definitions run there (`thin`, in a line of text).
Reaches ({ facts, }: { facts: Pick<ReleaseFacts, "effects" | "reaches" | "unknown">; }) => Element
What a release reaches outside itself, in a line (reachesShort), its names as code.
placesText (r: HubRelease) => string
Where a release's code runs, in words: "47 anywhere, 1 on the server".
searchHref (q: string, o: SearchAsked) => string
A search's address.