@brendanbank/atrium-host-types
v0.23.0
Published
TypeScript declarations for the atrium host-extension contract: AtriumRegistry, UserContext, AdminUserRow, AtriumNotification, AtriumEvent. Source-of-truth shapes a host bundle types against, kept in sync with atrium's published image major.minor.
Downloads
2,226
Readme
@brendanbank/atrium-host-types
TypeScript declarations for the atrium host-extension contract.
import type {
AtriumRegistry,
AtriumNotification,
AtriumEvent,
UserContext,
AdminUserRow,
} from '@brendanbank/atrium-host-types';
const reg = window.__ATRIUM_REGISTRY__ as AtriumRegistry;
reg.registerHomeWidget({ key: 'my-card', render: () => /* ... */ });The package is types-only — no runtime, no JS payload at runtime. Bundlers strip it from the production output.
Installation
pnpm add -D @brendanbank/atrium-host-typesThe package is published on the public npm registry. No .npmrc,
no auth token, no PAT. If you adopted atrium before v0.15.1 and
have an @brendanbank:registry=https://npm.pkg.github.com line in
your .npmrc, delete it — npmjs.org is the default registry.
Versioning
The package version tracks atrium's image version. Pin ^0.23 for
"compatible with atrium 0.23.x"; bump together with the atrium image
to pick up new registry slots. New slots land as optional members
on AtriumRegistry first so a host that hasn't bumped yet still
type-checks.
What ships
AtriumRegistry— everyregister*slot atrium exposes plussubscribeEvent.UserContext—/users/me/contextshape.AdminUserRow—/admin/usersrow shape.AtriumNotification— notification row body.AtriumEvent/AtriumEventHandler— SSE typed event shape.- Per-slot option-bag types:
HomeWidget,RouteEntry,NavItem,AdminTab,ProfileItem,NotificationKindRenderer,LocaleOverlay. ProfileSlot,HomeWidgetWidth— string unions.- A
declare globalblock that typeswindow.React,window.__ATRIUM_VERSION__, andwindow.__ATRIUM_REGISTRY__.
See also
@brendanbank/atrium-host-bundle-utils— runtime helpers, Vite preset, and React hooks. Re-exports the types from this package, so a host adding only one dep still gets the declarations.docs/published-images.md— the full host-extension contract (image catalogue, loader behaviour, registry semantics).docs/compat-matrix.md— which atrium release added which slot.
