Documents

API declarations

Working examples and authoring interfaces for api declarations.

DocumentAPIIndex keeps import paths and export names together with their purpose. It is a server-rendered navigation list: identifiers wrap at path separators and word boundaries without changing copied text, and each destination is a normal keyboard-accessible link. Use the compact variant for a list of symbols inside DocumentDisclosure.

Example exports
export type EngineFactory =  typeof import("@master/css").createEngine;
export type CompileOptions =  import("@master/css-compiler").MasterCSSCompileOptions;

DocumentDeclaration reuses server syntax highlighting and the shared keyboard copy control. Declarations above 40 lines use a native disclosure; their full text stays in the document and portable exports. Long code lines scroll inside the code block. The component does not compile or execute TypeScript. Copy controls become available after client initialization; reading and native disclosures work before it.

<DocumentAPIIndex label="Import paths" entries={[  { name: '@master/css', href: 'https://rc.css.master.co/reference/packages#css',    description: 'Engine sessions and class rendering.' }]} /><DocumentDeclaration label="Engine factory">{declaration}</DocumentDeclaration>

Keep these reading components outside demo geometry. The small examples above reference public exported types without copying their definitions. The package catalog links to current source for complete declarations. See Compiler, Runtime and Tooling for complete examples.