opsinjs

Types

Every TypeScript symbol this documentation site's own lib/ exports, with a page of its own for each type and interface.

How this is generated

Source: the export declarations under apps/www/lib/, read from the TypeScript sources themselves. There is no published .d.ts behind this table and there will not be one: opsinjs is distributed by copying source into your own repository rather than as an npm package, which is decision 0002. Script: scripts/build-reference.mts, which scans declaration lines textually rather than through fumadocs-typescript. The reason is the one that makes the props tables textual too: a reference generator has to run before anything compiles and produce identical bytes on every machine. Command: pnpm run generate.

Read this table as the site's own vocabulary, not as an installable API. Every row below is a symbol of this documentation site. The table covers the routing helpers, the colour maths, and the catalogue and status models the pages are rendered from. That is worth publishing, because the status ladder, the category set and the colour derivation are defined here and are the same definitions the doctrine pages describe in prose. It is not, however, anything you can install: an import from @opsinjs/… will not resolve, and what a consumer actually receives is component source copied in from the registry, whose props are documented on each component's own page rather than here.

This page is an index. Types and interfaces also get a page of their own under API, at reference/api/<Symbol>, because a type name in prose should be a link to a page and not an anchor two thousand words down a single document. Functions and constants are listed here only, because a page per STATUS_META would be a page of nothing. The index carries the summary; the symbol page carries the declaration line and the file it was read from.

Four columns. Symbol is the exported identifier, exactly as it is written in the source. Kind is what the declaration is, so const, function, type or interface. Declared in is the file it lives in, relative to apps/www. Summary is the first sentence of its doc comment, which means the way to improve this page is to improve the comment; a row whose summary reads - is a symbol nobody has written one for yet.

Two symbols are load-bearing and are worth knowing before you read anything else. ClinicalStatus is the union of the four clinical status levels, and it is the type that makes the never-mix rule checkable rather than merely written down. HealthCategory is the union of the subject categories. Every component that takes one takes it as a prop of that type, so a mixed pair is a compile error and not a design review finding. Both are specified in Clinical status semantics and Category identity; their declarations are on ClinicalStatus and HealthCategory.

What is deliberately excluded. Everything under lib/generated/, because a generated module is documented by the page that generates it rather than twice over. Anything whose name begins with an underscore. And everything outside lib/: component props are extracted separately from registry/bases/base/*.tsx and render as the props table on each component page. A symbol appears under the file whose export line declares it, so the shared substrate a copied component carries with it is listed under lib/opsinjs.ts and the clinical vocabulary it re-exports is listed under lib/status.ts, once each.

Exported symbols

SymbolKindDeclared inSummary
absoluteUrlfunctionlib/routes.tsTurn a root-relative path into a full URL on the canonical origin.
accessibilityPathfunctionlib/routes.ts-
agentRoutesconstlib/routes.ts-
aliasesForfunctionlib/catalogue.tsThe exact array a page's aliases frontmatter must contain.
aliasIndexfunctionlib/catalogue.tsalias → the id or page it resolves to. Lower-cased, because a reader typing "Blood Pressure" and a reader typing "blood pressure" want the same page.
AliasProbleminterfacelib/catalogue.tsOne search synonym that cannot be used, either because two components claim it or because it collides with a component id.
apcaconstlib/color/apca.tsThe short name, for callers that just want the number: apca("#333", "#fff"). Identical to apcaContrast.
APCA_FLOORconstlib/color/apca.tsThe published opsinjs APCA floor. These are the system's own commitments, chosen a little above the bare minimum because the audience is reading a number that matters to them on a phone, outdoors, often over 60.
apcaContrastfunctionlib/color/apca.tsLc for text on a background. Positive means dark-on-light, negative means light-on-dark, and the two arguments are not interchangeable.
apcaContrastOklchfunctionlib/color/apca.tsThe same, taking OKLCH. Both colours are clamped into sRGB first, because that is what a screen shows.
apcaVerdictfunctionlib/color/apca.ts-
ApcaVerdictinterfacelib/color/apca.tsThe result of one APCA measurement, with the signed Lc, its polarity, the floor for that use, and how far above or below the floor it landed.
apiRoutesconstlib/routes.ts-
apiSymbolPathfunctionlib/routes.tsA generated per-symbol API page. \<ApiLink\> resolves here, never to an anchor.
axisConflictfunctionlib/status.tsTHE NEVER-MIX RULE, as a function.
AxisConflictinterfacelib/status.tsA refusal. It is what the system answers when a measurement category and a clinical status are asked to share one surface.
BANNED_WORDSconstlib/opsinjs.tsWords a component's copy must not use, with the replacement and the reason. Generated from tokens/glossary.json.
baseOptionsfunctionlib/layout.shared.tsxTHERE IS NO TOP NAVIGATION, AND THAT IS THE POINT.
baseStyleQueryfunctionlib/routes.tsThe ?base=&style= query a docs page uses for the same switch. Returns an empty string at the defaults so the canonical URL stays clean.
builtComponentCountfunctionlib/registry.tsHow many distinct components have a real renderable behind them.
byNamespacefunctionlib/tokens.ts-
byTierfunctionlib/tokens.ts-
CatalogueIndexRowinterfacelib/catalogue.tsOne component as the light registry index publishes it, flattened to the fields a decision to install actually turns on.
CATEGORY_GATED_SECTIONSconstlib/status.tsSections whose presence depends on the component's category rather than on its status. Required when category starts with the prefix, and forbidden when it does not.
CHROMA_ENVELOPEconstlib/color/derive.tsChroma as a fraction of the seed's, per step. Mirrors chromaEnvelope in tokens/color.json.
CHROMA_STEPconstlib/preset.tsThe quantisation of chroma: 0.005 per step, so 63 steps reach 0.315.
clampToGamutfunctionlib/color/oklch.tsBring a colour into gamut by reducing chroma only.
CLINICAL_STATUS_METAconstlib/status.ts-
CLINICAL_STATUSESconstlib/status.ts-
ClinicalStatustypelib/status.tsWhat a reading means and what, if anything, to do about it.
ClinicalStatusMetainterfacelib/status.tsEverything a clinical status carries besides its colour. The word, the example sentence, who may assign it, its icon and its place in the order.
ClinicalStatusOrUnknowntypelib/status.tsThe four clinical statuses plus unknown. Unknown is the absence of an assertion rather than a fifth level of urgency.
cnfunctionlib/utils.tsJoin and de-duplicate class names, resolving Tailwind conflicts last-wins.
COLLAPSE_THRESHOLDconstlib/color/cvd.tsThe minimum Lc at which two swatches shown side by side are still telling two different colours apart.
ColorInputtypelib/color/apca.tsAnything the contrast functions accept: an sRGB triple, an OKLCH object, or a CSS colour string (#0b6bcb, oklch(0.62 0.17 15), rgb(11 107 203)).
COMPONENT_OPTIONAL_SECTIONSconstlib/status.tsThe sections a component page may leave out.
COMPONENT_SECTIONS_BY_STATUSconstlib/status.tsTHE COMPONENT PAGE ANATOMY, status-gated.
componentPathfunctionlib/routes.tsA component specification page, by catalogue id.
componentRequiredSectionsfunctionlib/status.tsThe sections a component page at this status and category must actually carry: the outline above with the optional five taken out. This is what an enforcer reports as missing, and it is deliberately a filter over componentSections() rather than a second hand-written table, so the two can never name a heading the other does not.
componentSectionsfunctionlib/status.tsThe full ordered outline for a component page at a given status and category: the canonical order, and the set of headings the page is allowed to carry. Some of what comes back is optional, so do not use this as the missing-heading check. componentRequiredSections() is that.
compositeOverfunctionlib/color/oklch.tsComposite a translucent foreground at alpha over an opaque backdrop, source-over, and return the opaque colour a reader actually sees.
CONTRAST_USE_LABELSconstlib/color/apca.ts-
ContrastCheckinterfacelib/color/derive.tsOne measured pair from a derived theme, carrying both the APCA Lc and the WCAG ratio, the use that fixes the floor, and whether it passed.
contrastRatiofunctionlib/color/wcag.tsThe contrast ratio, from 1 (identical) to 21 (black on white).
contrastRatioOklchfunctionlib/color/wcag.ts-
ContrastUsetypelib/color/apca.tsWhat a pair is being used for. Determines which floor applies.
convertUnitfunctionlib/opsinjs.tsOne value in another unit, or undefined when this system does not own the factor.
CORNER_SHAPE_VALUESconstlib/preset.ts-
CVD_LABELSconstlib/color/cvd.ts-
CVD_TYPESconstlib/color/cvd.ts-
CvdCollisioninterfacelib/color/cvd.tsTwo colours that stop being distinguishable under one kind of colour vision deficiency, and the Lc left between them once simulated.
CvdTypetypelib/color/cvd.tsThe three dichromacies, plus the achromatic check every specimen must also survive.
DataStatetypelib/opsinjs.tsThe state a data surface is in, named once so the surfaces converge on one vocabulary, though no component accepts it yet.
DecodeErrortypelib/preset.tsWhy a preset code could not be read. The five reasons are kept distinct so that the sentence shown to a person can be a specific one.
decodePresetfunctionlib/preset.tsDecode a preset code.
DecodeResultinterfacelib/preset.tsThe outcome of reading a preset code. Either the preset and its version, or an error and a sentence a person can act on.
decodeTransferfunctionlib/color/oklch.tssRGB gamma-encoded channel → light-linear. Also used for Display-P3, which shares sRGB's transfer curve.
DEFAULT_BASEconstlib/registry.ts-
DEFAULT_BASEconstlib/routes.ts-
DEFAULT_PRESETconstlib/preset.ts-
DEFAULT_STYLEconstlib/registry.ts-
DEFAULT_STYLEconstlib/routes.ts-
DENSITY_VALUESconstlib/preset.ts-
deprecatedTokensfunctionlib/tokens.ts-
DerivedThemeinterfacelib/color/derive.tsEverything derivation produces from one brand colour. Both ramps, every role in light and dark, the contrast checks, the warnings, and whether it is sound.
DeriveOptionsinterfacelib/color/derive.tsThe knobs on theme derivation. Every one of them has a default, so a brand colour on its own is already a complete input.
deriveRampfunctionlib/color/derive.tsBuild one ramp from a seed, clamping to sRGB and recording the P3 enhancement.
deriveThemefunctionlib/color/derive.tsDerive a complete, contrast-validated theme from one brand colour.
DeriveWarninginterfacelib/color/derive.tsOne thing the derivation has to say about a theme, as a level, a stable code and a message.
Detenttypelib/opsinjs.tsHow far a sheet is open.
displayP3ToOklchfunctionlib/color/oklch.tsGamma-encoded Display-P3, 0 to 1 per channel → OKLCH.
DOCS_BASEconstlib/routes.tsThe docs base segment. Everything else derives from it.
docsMarkdownPathfunctionlib/routes.tsThe same page as processed markdown: /components/range-bar.md.
docsPathfunctionlib/routes.tsThe URL of a docs page from its slug segments. docsPath() is the docs index. This is the function a locale segment would be inserted into.
doctrinePathfunctionlib/routes.tsA doctrine page reference as written in frontmatter, such as two-colour-axes, or foundations/colour/contrast-and-apca when it is not in Health.
editUrlfunctionlib/routes.ts"Edit this page" on GitHub, from a source file path relative to the content root.
encodePresetfunctionlib/preset.tsEncode a theme as a preset code.
encodeTransferfunctionlib/color/oklch.tsLight-linear channel → gamma-encoded.
EXAMPLE_SOURCEconstlib/opsinjs.tsThe only citation an opsinjs example, demo or preview may carry.
explainUnresolvedfunctionlib/registry.tsExplain an empty lookup.
findAliasProblemsfunctionlib/catalogue.tsThe uniqueness check, as a function rather than as a comment.
findByAliasfunctionlib/catalogue.ts-
findCollisionsfunctionlib/color/cvd.tsCheck that a set of named colours stays mutually distinguishable under every simulation. This is the function that turns "status must survive grayscale" from doctrine into a build step.
findUnitfunctionlib/opsinjs.tsThe unit a symbol names, or undefined when this system has never heard of it.
fitfunctionlib/color/derive.tsFit an arbitrary colour into the shipped gamut without moving its hue or lightness.
FLOOR_VALUESconstlib/preset.tsWhich APCA floor the theme is validated against. standard is the published one.
FORMAT_VERSIONconstlib/preset.tsBump this, and add a decode branch, whenever a field changes shape.
formatDisplayP3functionlib/color/oklch.tscolor(display-p3 0.9 0.2 0.3). Channels are clamped, because this is an output format.
formatHexfunctionlib/color/oklch.ts#rrggbb, clamped into sRGB.
formatOklchfunctionlib/color/oklch.tsoklch(0.622 0.17 15), or with an alpha, oklch(0.622 0.17 15 / 0.5).
formatRatiofunctionlib/color/wcag.tsRatios are conventionally quoted to one decimal place and rounded DOWN, so a published figure is never better than the measurement.
formatTokenfunctionlib/tokens.tsRender a token in one of the copyable formats.
foundationsPathfunctionlib/routes.ts-
Gamuttypelib/color/oklch.tsThe colour spaces this module can express a colour in.
GAMUT_EPSILONconstlib/color/oklch.tsThe tolerance a channel may exceed 0 or 1 by and still count as in gamut. Half a unit at 8-bit precision: a value that rounds to a representable channel is in gamut for every purpose this system has.
GAMUT_VALUESconstlib/preset.ts-
GeneratedBannedWordinterfacelib/opsinjs.tsOne banned word: the word a component's copy must not use, what to write in its place, and why the word is barred.
getAllPagesfunctionlib/source.tsEvery page in the corpus. The input to the sitemap, llms.txt and the shards.
getByCategoryfunctionlib/catalogue.ts-
getByStatusfunctionlib/catalogue.ts-
getCataloguefunctionlib/catalogue.tsEvery row.
getEntryfunctionlib/catalogue.ts-
getPagefunctionlib/source.tsOne page by its slug segments, or undefined.
getPagesInSectionfunctionlib/source.tsPages under one top-level section, in tree order.
getPageTreefunctionlib/source.tsThe page tree the docs layout renders.
getRegistryEntryfunctionlib/registry.tsResolve one entry, or null.
getShippedfunctionlib/catalogue.tsEvery catalogue row. Not a claim about code. Read implemented in /r/index.json, or toIndexRow's isBuilt argument, for that.
getTokenfunctionlib/tokens.ts-
getTokensfunctionlib/tokens.ts-
groupedfunctionlib/tokens.tsTokens grouped for a table: namespace → group → tokens, in emit order.
groupedByCategoryfunctionlib/catalogue.tsEvery category that has at least one row, in the declared order, with its rows.
hasComponentPagefunctionlib/catalogue.tsTrue when /docs/components/\<id\> resolves to a page.
HEALTH_CATEGORIESconstlib/status.ts-
HEALTH_CATEGORY_LABELSconstlib/status.ts-
HealthCategorytypelib/status.tsWhat a reading is ABOUT. Identity, never verdict.
healthPathfunctionlib/routes.tsA health doctrine page, by the page id that governedBy and implements use.
inGamutfunctionlib/color/oklch.ts-
isBuiltfunctionlib/registry.tsTrue only when a base component for this name is on disk, which a catalogue row alone is not. A specified-but-unbuilt id answers false, and so does a built id asked for at a base that does not carry it.
isClinicalStatusfunctionlib/status.ts-
isDevelopmentfunctionlib/opsinjs.tsTrue in development, and false wherever that cannot be established.
isHealthCategoryfunctionlib/catalogue.tsTrue for the four health-* categories, which carry the extra clinical obligations.
isHealthCategoryfunctionlib/status.ts-
isKindfunctionlib/status.ts-
isKnownIdfunctionlib/catalogue.tsDoes this id exist at all, under any status?
isNotImplementedfunctionlib/status.tsTrue when a page at this status must carry a not-implemented marker.
isResolvablefunctionlib/registry.tsTrue when the id exists in the catalogue, whatever its status. Used to decide 404 from "no".
isStatusfunctionlib/status.ts-
issueUrlfunctionlib/routes.tsA prefilled docs issue. Used by \<Feedback\> when the feedback endpoint is unavailable.
joinPathfunctionlib/routes.tsJoin path segments into a root-relative path, dropping empties and stray slashes.
Kindtypelib/status.tsA page's kind. This is a contract, not a label: kind fully determines the page's headings, and assert-ia.mts fails the build on a missing or an unexpected one.
KINDSconstlib/status.ts-
LIGHTNESS_STEPconstlib/preset.tsThe quantisation of lightness: 1% per step.
linearP3ToLinearSrgbfunctionlib/color/oklch.tsLight-linear Display-P3 → light-linear sRGB, through XYZ (D65).
linearSrgbToLinearP3functionlib/color/oklch.tsLight-linear sRGB → light-linear Display-P3, through XYZ (D65).
linearSrgbToOklabfunctionlib/color/oklch.tsLight-linear sRGB → OKLab. Ottosson's forward matrices.
linearToSrgbfunctionlib/color/oklch.ts-
listBasesfunctionlib/registry.ts-
listByKindfunctionlib/registry.tsEvery entry of a kind, for the examples gallery and the screens index.
listStylesfunctionlib/registry.ts-
MaterialRungtypelib/opsinjs.tsA rung of the material ladder, meaning how a surface sits above what is behind it.
maxChromafunctionlib/color/oklch.tsThe largest chroma that is still inside gamut at this lightness and hue.
minimumFontSizefunctionlib/color/apca.tsThe smallest font size, in px, at which this Lc is usable at the given weight, from a coarse reading of the APCA font-size guidance rather than from the full lookup table.
mixOklchfunctionlib/color/oklch.tsMix two OKLCH colours. Hue takes the shorter way round the circle, which is what CSS color-mix does and what anyone reading the result expects.
MODE_VALUESconstlib/preset.tsThe colour mode a theme opens in. system follows the reader's own setting.
NEUTRAL_CHROMA_VALUESconstlib/preset.tsChroma of the neutral ramp. Index 0 is a dead grey; the default is index 2.
ogUrlfunctionlib/routes.tsThe OG image service. One endpoint for the whole site. There is no per-route opengraph-image.
Oklabinterfacelib/color/oklch.tsA colour in OKLab.
oklabToLinearSrgbfunctionlib/color/oklch.tsOKLab → light-linear sRGB. Ottosson's inverse matrices.
oklabToOklchfunctionlib/color/oklch.ts-
Oklchinterfacelib/color/oklch.tsA colour in OKLCH. l 0 to 1, c unbounded, h in degrees.
oklchToDisplayP3functionlib/color/oklch.tsOKLCH → gamma-encoded Display-P3, 0 to 1 per channel. Not clamped.
oklchToOklabfunctionlib/color/oklch.ts-
oklchToRgb255functionlib/color/oklch.tsOKLCH → 0 to 255 sRGB integers, clamped. The input for both contrast models.
oklchToSrgbfunctionlib/color/oklch.tsOKLCH → gamma-encoded sRGB, 0 to 1 per channel. Not clamped.
OPSIN_ERRORSconstlib/opsinjs.tsThe table warnOnce() reads. Generated from tokens/errors.json.
OpsinErrorinterfacelib/opsinjs.tsOne warning code: what it is called, how severe it is, and the page that prevents it.
OpsinErrorCodetypelib/opsinjs.tsEvery warning code opsinjs can emit.
OpsinErrorParamstypelib/opsinjs.tsThe values a message template asks for, keyed by placeholder name.
OpsinErrorSeveritytypelib/opsinjs.tsHow severe a warning is.
ORPHAN_ALLOWLISTconstlib/routes.tsRoutes that exist but are not reachable from the top nav or the sidebar, and are allowed not to be.
OUTLINE_IS_EXACTconstlib/status.tskind: project is free-form and kind: guide has task sections between its fixed first and last headings, so for these two the outline is a REQUIRED SUBSET rather than the complete list. Everything else is exact.
P3_CHROMA_GAINconstlib/color/derive.tsHow much more chroma Display-P3 is allowed to spend than sRGB at the same step.
parseColorfunctionlib/color/oklch.tsParse the colour syntaxes a person is likely to paste into the theme playground: oklch(...) with or without percentages, #rrggbb, and rgb(r g b) or rgb(r, g, b). Anything else returns null rather than guessing. A theme derived from a misparsed brand colour is worse than a refusal to derive one.
parseHexfunctionlib/color/oklch.ts#rgb, #rrggbb or #rrggbbaa → sRGB 0 to 1. Returns null on anything else.
passesApcafunctionlib/color/apca.ts-
Presetinterfacelib/preset.tsA theme as a person describes it. What encodePreset takes and decodePreset returns.
PRESET_PREFIXconstlib/preset.ts-
presetBrandColorfunctionlib/preset.tsThe brand colour a preset describes, as an oklch() string the colour engine can parse.
RADIUS_VALUESconstlib/preset.ts--opsin-radius-base in px. Index 3 (14px) is the product default.
Ramptypelib/color/derive.tsOne complete lightness ramp, as a value per step. The chromatic ramp and the neutral ramp of a derived theme are both this shape.
RAMP_LIGHTNESSconstlib/color/derive.ts-
RAMP_STEPSconstlib/color/derive.tsThe ramp steps, and the lightness of each. Mirrors ladder in tokens/color.json.
RampSteptypelib/color/derive.tsOne rung of the lightness ladder, from 50 at the lightest to 950 at the darkest. The rungs are fixed, so two themes are comparable step by step.
RampStepValueinterfacelib/color/derive.tsOne rung of a ramp, as the sRGB value that ships, the wide-gamut value where P3 has headroom, and whether sRGB had to clamp the chroma away.
referencePathfunctionlib/routes.ts-
ReferenceRangeinterfacelib/opsinjs.tsThe interval a reading is being compared against, and who says so.
REFUSED_CONVERSIONSconstlib/opsinjs.tsConversions this system refuses to publish, and why. Generated from tokens/units.json.
RefusedConversioninterfacelib/opsinjs.tsA pair people expect to be arithmetic and is not, with the reason.
registryInstallUrlfunctionlib/routes.tsWhat a consumer types to install an item. Rendered by \<ComponentInstall\>.
RegistryLookuptypelib/registry.tsBoth call shapes are supported on purpose.
registryMetafunctionlib/registry.tsProvenance for the registry surfaces: when it was generated and from what. generatedAt: null means the placeholder is still in place and pnpm run generate has not run. The registry pages say that out loud rather than rendering an empty table.
RegistryQueryinterfacelib/registry.tsA request for one registry item, by id and optionally by base, style and kind. Anything left out falls back to the default.
registryRoutesconstlib/routes.ts-
relativeLuminancefunctionlib/color/wcag.tsWCAG 2.2 relative luminance, 0 for black and 1 for white.
REVIEW_FLOOR_NOTICEconstlib/status.tsTHE REVIEW FLOOR, AS ONE STRING.
Rgbinterfacelib/color/oklch.tsRed, green and blue, each 0 to 1, in whichever space the function says.
Rgb255typelib/color/apca.tsA colour as 0 to 255 sRGB integers, which is what APCA is defined over.
RoleNametypelib/color/derive.tsThe roles a derived theme guarantees. Components consume these and never a step.
RolePairinterfacelib/color/derive.tsOne semantic role in both colour modes. Roles are derived as a pair, because a role that exists only in light mode is a role that breaks in dark.
RoleValueinterfacelib/color/derive.tsWhat a semantic role resolves to in one colour mode. The ramp step it came from, the OKLCH value, and the CSS it is written as.
routesconstlib/routes.ts-
screenLuminancefunctionlib/color/apca.tsScreen luminance Y for an sRGB triple, using APCA's own simple-exponent transfer rather than the piecewise sRGB curve. This is deliberate and is one of the places APCA and WCAG genuinely differ: APCA models the display, not the encoding.
searchCataloguefunctionlib/catalogue.tsThe filter behind \<StatusMatrix\>: matches an id, a name, the description or any alias. Substring matching, because the reader typing "range" wants both RangeBar and the reference-range guidance and has no reason to know which word the system chose.
searchTokensfunctionlib/tokens.tsSubstring match over name, description and value. The /tokens browser's filter.
SECTION_OUTLINESconstlib/status.tsThe H2s a page must have, by kind. This is the outline content/_templates/*.mdx implements, \<PageTemplate\> asserts and assert-ia.mts checks; all three read it from here so they cannot drift.
SHIPPED_PRESETSconstlib/preset.tsThe shipped presets. Names, not codes, are what the documentation refers to; the code is what a reader copies. build-tokens.mts materialises each into /r/themes/\<code\>.json.
sidebarTreeconstlib/sidebar-tree.tsDELIBERATELY NOT ANNOTATED as PageTreeTransformer. That type is generic over the content storage, and naming it here pins the generic to the default PageData rather than to the docs collection. loader() then infers its own output from the pinned transformer, and every caller of page.data.status elsewhere in the app stops compiling. Leaving the object structural lets the loader infer it at the call site, which is what the generic is for.
simulatefunctionlib/color/cvd.tsSimulate a dichromacy. severity 0 returns the input unchanged and 1 returns full dichromacy; values between interpolate in linear light.
simulateOklchfunctionlib/color/cvd.ts-
simulateRgb255functionlib/color/cvd.ts-
siteconstlib/routes.ts-
sourceconstlib/source.ts-
spokenUnitfunctionlib/opsinjs.tsHow a screen reader should say this unit for this count.
srgbToLinearfunctionlib/color/oklch.ts-
srgbToOklchfunctionlib/color/oklch.tsGamma-encoded sRGB, 0 to 1 per channel → OKLCH.
Statustypelib/status.tsThe release phase of a component page or a catalogue entry.
STATUS_METAconstlib/status.ts-
STATUS_ORDERconstlib/status.tsStatuses in display order.
statusCountsfunctionlib/catalogue.tsCounts per status, in display order. The input to \<SectionProgress\>.
STATUSESconstlib/status.tsA RELEASE PHASE IS NEVER PAINTED, AND THERE IS NOW NOTHING HERE TO PAINT IT WITH.
StatusMetainterfacelib/status.tsWhat a release phase shows on a badge. A label and one sentence a reader can act on, which is also the chip's title and its accessible name.
themeToCssVariablesfunctionlib/color/derive.tsEvery custom property a derived theme emits, ready for a stylesheet or a copy button.
toGrayscalefunctionlib/color/cvd.tsGrayscale by relative luminance rather than by an average of the channels.
toIndexRowfunctionlib/catalogue.tsOne row of /r/index.json and of the generated catalogue reference page.
TOKEN_FORMAT_LABELSconstlib/tokens.ts-
TOKEN_NAMESPACE_LABELSconstlib/tokens.ts-
TOKEN_NAMESPACESconstlib/tokens.ts-
TOKEN_TIER_DESCRIPTIONSconstlib/tokens.ts-
TOKEN_TIER_LABELSconstlib/tokens.ts-
TokenFormattypelib/tokens.tsThe formats the /tokens and /colors browsers can copy a value in.
tokenMetafunctionlib/tokens.ts-
tokensAreGeneratedfunctionlib/tokens.tsWhether the generated layer has actually been produced.
tokensUsedByfunctionlib/tokens.tsEvery token one component consumes. The query behind section 17 of a component page, and the reason usedBy is populated at generation time rather than inferred at render time.
toRgb255functionlib/color/oklch.ts0 to 1 sRGB → 0 to 255 integers, clamped.
toRgb255Inputfunctionlib/color/apca.tsCoerce any accepted colour form to an sRGB triple.
TrendPointinterfacelib/opsinjs.tsOne reading in a series, for the components that draw change over time.
Unitinterfacelib/opsinjs.tsOne unit: what it is called, what a reader sees, and how it is SPOKEN.
UNIT_CONVERSIONSconstlib/opsinjs.tsEvery convertible ordered pair, composed by the generator. Never authored by hand.
unitConversionfunctionlib/opsinjs.tsThe authored conversion between two symbols, or undefined when there is none.
UnitConversioninterfacelib/opsinjs.tsAn exact conversion between two units of the same kind.
UNITSconstlib/opsinjs.tsEvery unit this system can speak, sorted by id. Generated from tokens/units.json.
UNITS_BY_SYMBOLconstlib/opsinjs.tsThe lookup findUnit() reads, derived from UNITS rather than emitted twice.
unknownImplementsIdsfunctionlib/catalogue.tsValidate a doctrine page's implements list. Every entry must be a real catalogue id. This is the check that would have caught implements: [alert-banner, care-card, toast] before toast was on the roster.
UnknownStatustypelib/status.tsThe absence of an assertion, which covers a reading never taken, a stale reading, or a reading whose reference range the product does not own.
UnresolvedReasoninterfacelib/registry.tsWhy a lookup came back empty. The input to \<NotBuiltYet\>.
ViewKindtypelib/routes.tsWhat a /view route can render.
ViewParamsinterfacelib/routes.tsEverything a chrome-less preview URL can carry. Name and kind become path segments, and the rest become query parameters applied before first paint.
viewPathfunctionlib/routes.ts/view/base/base-lyra/component/range-bar?mode=dark&text=200.
WarningLeveltypelib/color/derive.tsHow serious a derivation warning is. An error makes the theme unsound and stops it shipping, while a warning and a note are advisory.
warnOncefunctionlib/opsinjs.tsReport a defect in development, once, and never do anything else.
wcagconstlib/color/wcag.tsThe short name, matching apca(). Identical to contrastRatio.
WCAG_FLOORconstlib/color/wcag.tsThe three WCAG 2.2 thresholds this system checks against.
WcagUsetypelib/color/wcag.tsWhich WCAG 2.2 contrast threshold applies. Body text, large text and non- text content each have a different floor.
wcagVerdictfunctionlib/color/wcag.ts-
WcagVerdictinterfacelib/color/wcag.tsThe result of one WCAG 2.2 contrast measurement, with the ratio, the floor for that use, and the success criterion it is measured against.