Skip to content

Status

Caps is on version 0.0.0. Until 1.0, a minor release can change the public API, so pin the version you test against.

  • Caps has no root export. Importing @fungi.computer/caps itself fails. Use the subpaths.
  • Caps is not a widget SDK and has no data layer. It does not implement product behaviour, publish a registry or deploy anything.
  • PixelNumber throws on a non-finite number or a character it cannot draw.
  • ItemGrid throws when item or ghost geometry does not fit the grid.
  • CigaretteCard prints “not measured” for a null stat and never makes up a value.
  • Popups render into the document body by default and take its theme. Pass a portal container inside a nested theme to keep that theme.
  • Load Stipe’s CSS once, through one of the two Caps stylesheet routes. Do not import Tailwind a second time or copy Stipe’s token sheet into your app.
  • The editable-source registry in registry/ is generated inside this repository and has no hosted endpoint.

When you change Caps:

  • Inspect the existing source, tests and host before editing.
  • Preserve native semantics, refs, keyboard behaviour, visible focus and ARIA.
  • Primitives and blocks receive props, slots and callbacks. They do not fetch.
  • Keep product vocabulary, models, routes, defaults and side effects in hosts.
  • Use explicit imports. Do not add a root barrel, alias, shim or deprecated export.
  • Add or update tests and an example for every new public seam.

The tests cover native props and refs, caller-last classes, labelled fields, controlled values, focus and keyboard behaviour, disabled options, Escape, tooltip teardown, SSR, state blocks, upload-row presentation and gooey-filter identity. From the monorepo root, run:

Terminal window
pnpm --dir packages/caps run lint
pnpm --dir packages/caps run typecheck
pnpm --dir packages/caps run test
pnpm --dir packages/caps run build
pnpm --dir packages/caps run docs
pnpm check:package -- @fungi.computer/caps

pack, smoke, the package-level stranger and pnpm verify:package -- @fungi.computer/caps are release checks. Skip them during ordinary development.

The component workbench is a Ladle site. Run pnpm workbench:serve from the monorepo root to browse every component in each maintained theme, including interactive Status, window, overlay, game-piece and status-tray stories.

The editable-source registry copies Caps source into a consumer instead of importing the runtime package. To add a registry item, author the source under src/ with tests and an example, then add its metadata to registry-source/ (files, dependencies, registry dependencies and the Stipe CSS import). Generate the payloads and run the checks:

Terminal window
pnpm --filter @fungi.computer/caps registry:generate
pnpm --filter @fungi.computer/caps registry:check
pnpm --filter @fungi.computer/caps registry:stranger

registry/ and registry.json are generated. Do not edit them by hand. The registry stranger check installs every generated item into an isolated fixture, checks local imports and dependencies, type-checks it and builds it. It proves that a consumer can own the copied source without a Caps runtime import. Caps depends on the real @fungi.computer/stipe package. Copied styles or an alias are not a substitute.

Caps is MIT licensed, as declared in its package.json.