@clay-design-system/registry
v0.22.0
Published
The Clay Registry: monday.com's marketing design system as one queryable database (components, sections, tokens, assets, rules) with a zero-dependency query layer.
Readme
@clay-design-system/registry
The Clay Registry: monday.com's marketing design system (components, sections, tokens, assets, rules) as one queryable SQLite database, with a query layer that has no runtime dependencies. Read-only; internal units are not included.
Requires Node >= 22.13 (uses the built-in node:sqlite, no flag needed).
Install
pnpm add @clay-design-system/registryUse
import { search, get, assetUrl } from '@clay-design-system/registry'
search('hero section') // ranked hits: [{ id, kind, name, summary, links, score }, …]
get('section.FeaturesSection') // one compact record (import path, story, Figma and CDN links)
get('section.FeaturesSection', { detail: true }) // every column, plus links, relations and renders
assetUrl('asset.icon.calendar') // https://… CDN URLSemantic search (optional)
The database carries one int8 sentence vector per record (embeddings, meta.embedding_model). searchHits(query, { vector }) fuses their cosine ranking with BM25 when you pass the query's embedding;
await registry.embed(query) computes it when the optional @clay-design-system/embeddings package is installed (in the working directory or CLAY_EMBED_DIR; it carries the 23 MB MiniLM weights, so nothing is downloaded; CLAY_SEMANTIC=0 disables it).
Without a vector, or without that package, search is BM25 exactly as before. The package has no dependencies either way.
const reg = openRegistry()
const vector = await reg.embed('airy breathing room between big blocks on phones') // undefined when semantic search is off
reg.search('airy breathing room between big blocks on phones', { vector })Also exported: list, related, assetVariants, componentsUsingToken, allowedChildren, pageRecipe, openRegistry,
the Registry class, the response types, and DB_PATH (absolute path to the shipped data/clay.sqlite, built when the
package is built; gitignored in the repo). The database is the only data file: every record, link and relation is in it.
