Package APIs

@master/css

The CSS language and framework for rapidly building modern and high-performance websites

Public entrypoints

Execute a compiled manifest, generate rules for class names and inspect engine state. CSS entrypoints provide the preset stylesheet layers.

Declarations show the public surface of each import path. Referenced type names may be local to the package; import only names listed as exports here. Private implementation is omitted, while constructor restrictions remain visible.

@master/css

Asynchronous engine creation and one-shot class rendering.

Exports · 20

createEngine

TypeScript
export declare function createEngine(  options: MasterCSSEngineOptions): Promise<MasterCSSEngine>;

MasterCSSEngine

TypeScript
export interface MasterCSSEngine extends Disposable {    readonly binding: MasterCSSResolvedBinding;    ensureClassRules(classNames: readonly string[]): MasterCSSEngineTransition;    deleteClassRules(classNames: readonly string[]): MasterCSSEngineTransition;    /**     * Adds host-owned variable and animation counts to the active engine session.     * Counts are cumulative for the lifetime of the session and cannot be unregistered.     */    registerEmittedGlobals(      emittedGlobals: MasterCSSEmittedGlobals    ): MasterCSSEngineTransition;    refresh(manifest: MasterCSSManifest): MasterCSSEngineTransition;    executionState(classNames: readonly string[]): MasterCSSEngineExecutionState;    inspect(className: string): MasterCSSEngineInspection;    snapshot(): MasterCSSEngineSnapshot;    dispose(): void;}

MasterCSSEngineAnimationResource

TypeScript
export interface MasterCSSEngineAnimationResource {    readonly name: string;    readonly index: number;    readonly refCount: number;    readonly text: string;}

MasterCSSEngineBinding

TypeScript
export interface MasterCSSEngineBinding {    readonly kind: MasterCSSResolvedBinding;    createEngine(options: MasterCSSEngineBindingOptions): Promise<MasterCSSEngine>;    createEngineSync?(options: MasterCSSEngineBindingOptions): MasterCSSEngine;}

MasterCSSEngineBindingOptions

TypeScript
export interface MasterCSSEngineBindingOptions {    readonly manifest: MasterCSSManifest;    readonly emittedGlobals?: MasterCSSEmittedGlobals;}

MasterCSSEngineDeleteMutation

TypeScript
export interface MasterCSSEngineDeleteMutation {    readonly op: 'delete';    readonly target: MasterCSSRuleTarget;    readonly index: number;    readonly key: string;}

MasterCSSEngineExecutionState

TypeScript
export interface MasterCSSEngineExecutionState {    readonly classes: readonly {        readonly className: string;        readonly references: readonly {            readonly layer: MasterCSSManifestUtilityLayerName;            readonly key: string;        }[];    }[];    readonly resources: MasterCSSEngineResources;}

MasterCSSEngineInsertMutation

TypeScript
export interface MasterCSSEngineInsertMutation {    readonly op: 'insert';    readonly target: MasterCSSRuleTarget;    readonly index: number;    readonly key: string;    readonly text: string;    readonly rule?: MasterCSSHydrationRule;}

MasterCSSEngineInspection

TypeScript
export interface MasterCSSEngineInspection {    readonly version: 1;    readonly className: string;    readonly matchStatus: 'matched' | 'unmatched' | 'ambiguous' | 'syntax-error';    readonly cssSyntaxStatus: BindingEngineInspection['cssSyntaxStatus'];    readonly cssValueStatus: 'valid' | 'invalid' | 'unknown' | 'not-checked';    readonly browserSupport: 'supported' | 'unsupported' | 'unknown' | 'not-checked';    readonly rules: readonly MasterCSSHydrationRule[];    readonly diagnostics?: Readonly<BindingEngineInspection['diagnostics']>;}

MasterCSSEngineMutation

TypeScript
export type MasterCSSEngineMutation = MasterCSSEngineInsertMutation | MasterCSSEngineDeleteMutation;

MasterCSSEngineOptions

TypeScript
export interface MasterCSSEngineOptions extends MasterCSSEngineBindingOptions {    readonly binding?: MasterCSSBinding | MasterCSSEngineBinding;}

MasterCSSEngineResources

TypeScript
export interface MasterCSSEngineResources {    readonly themeText?: string;    readonly variables: readonly MasterCSSEngineVariableResource[];    readonly animations: readonly MasterCSSEngineAnimationResource[];}

MasterCSSEngineSnapshot

TypeScript
export interface MasterCSSEngineSnapshot {    readonly version: 1;    readonly rules: readonly MasterCSSHydrationRule[];    readonly resources: MasterCSSEngineResources;    readonly text: string;}

MasterCSSEngineTransition

TypeScript
export interface MasterCSSEngineTransition {    readonly version: 1;    readonly mutations: readonly MasterCSSEngineMutation[];}

MasterCSSEngineVariableResource

TypeScript
export interface MasterCSSEngineVariableResource {    readonly name: string;    readonly refCount: number;    readonly dependencies: readonly string[];    readonly static: boolean;}

MasterCSSNativeDeclaration

TypeScript
export interface MasterCSSNativeDeclaration {    readonly className: string;    readonly property: string;    readonly value: string;}

MasterCSSRenderSessionOptions

TypeScript
export interface MasterCSSRenderSessionOptions {    readonly manifest: MasterCSSManifest;    readonly emittedGlobals?: MasterCSSEmittedGlobals;}

MasterCSSRenderSnapshot

TypeScript
export interface MasterCSSRenderSnapshot {    readonly classNames: readonly string[];    readonly invalidClassNames: readonly string[];    readonly cssText: string;    readonly rules: readonly MasterCSSHydrationRule[];    readonly classRules: Readonly<Record<string, readonly MasterCSSHydrationRule[]>>;    readonly engine: MasterCSSEngineSnapshot;    readonly emittedGlobals: MasterCSSEmittedGlobals;    readonly hydrationManifest: Readonly<Omit<MasterCSSHydrationManifest, 'rules' | 'resourceOrder'>> & {        readonly rules: readonly MasterCSSHydrationRule[];        readonly resourceOrder: readonly string[];    };}

MasterCSSRuleTarget

TypeScript
export type MasterCSSRuleTarget = 'theme' | 'base' | 'defaults' | 'components' | 'utilities' | 'keyframes';

renderClassNames

TypeScript
export declare function renderClassNames(  classNames: readonly string[],  options: MasterCSSRenderSessionOptions): Promise<import("./render-session").MasterCSSRenderSnapshot>;

@master/css/node

Synchronous native engine and reusable render sessions in Node.js.

Exports · 12

createEngineSync

TypeScript
export declare function createEngineSync(  options: MasterCSSEngineOptions): MasterCSSEngine;

createNativeEngineBinding

TypeScript
export declare function createNativeEngineBinding(): MasterCSSEngineBinding;

createRenderSessionSync

TypeScript
export declare function createRenderSessionSync(  options: MasterCSSRenderSessionOptions): MasterCSSRenderSession;

MasterCSSEngine

TypeScript
export interface MasterCSSEngine extends Disposable {    readonly binding: MasterCSSResolvedBinding;    ensureClassRules(classNames: readonly string[]): MasterCSSEngineTransition;    deleteClassRules(classNames: readonly string[]): MasterCSSEngineTransition;    /**     * Adds host-owned variable and animation counts to the active engine session.     * Counts are cumulative for the lifetime of the session and cannot be unregistered.     */    registerEmittedGlobals(      emittedGlobals: MasterCSSEmittedGlobals    ): MasterCSSEngineTransition;    refresh(manifest: MasterCSSManifest): MasterCSSEngineTransition;    executionState(classNames: readonly string[]): MasterCSSEngineExecutionState;    inspect(className: string): MasterCSSEngineInspection;    snapshot(): MasterCSSEngineSnapshot;    dispose(): void;}

MasterCSSEngineBinding

TypeScript
export interface MasterCSSEngineBinding {    readonly kind: MasterCSSResolvedBinding;    createEngine(options: MasterCSSEngineBindingOptions): Promise<MasterCSSEngine>;    createEngineSync?(options: MasterCSSEngineBindingOptions): MasterCSSEngine;}

MasterCSSEngineBindingOptions

TypeScript
export interface MasterCSSEngineBindingOptions {    readonly manifest: MasterCSSManifest;    readonly emittedGlobals?: MasterCSSEmittedGlobals;}

MasterCSSEngineOptions

TypeScript
export interface MasterCSSEngineOptions extends MasterCSSEngineBindingOptions {    readonly binding?: MasterCSSBinding | MasterCSSEngineBinding;}

MasterCSSNativeDeclaration

TypeScript
export interface MasterCSSNativeDeclaration {    readonly className: string;    readonly property: string;    readonly value: string;}

MasterCSSRenderSession

TypeScript
export declare class MasterCSSRenderSession implements Disposable {    private constructor();    ensureClassRules(classNames: readonly string[]): MasterCSSRenderSnapshot;    ensureStylesheetResources(nativeCSS: string): this;    snapshot(): MasterCSSRenderSnapshot;    snapshotForClassNames(classNames: readonly string[]): MasterCSSRenderSnapshot;    dispose(): void;    [Symbol.dispose](): void;}

MasterCSSRenderSessionOptions

TypeScript
export interface MasterCSSRenderSessionOptions {    readonly manifest: MasterCSSManifest;    readonly emittedGlobals?: MasterCSSEmittedGlobals;}

MasterCSSRenderSnapshot

TypeScript
export interface MasterCSSRenderSnapshot {    readonly classNames: readonly string[];    readonly invalidClassNames: readonly string[];    readonly cssText: string;    readonly rules: readonly MasterCSSHydrationRule[];    readonly classRules: Readonly<Record<string, readonly MasterCSSHydrationRule[]>>;    readonly engine: MasterCSSEngineSnapshot;    readonly emittedGlobals: MasterCSSEmittedGlobals;    readonly hydrationManifest: Readonly<Omit<MasterCSSHydrationManifest, 'rules' | 'resourceOrder'>> & {        readonly rules: readonly MasterCSSHydrationRule[];        readonly resourceOrder: readonly string[];    };}

renderClassNamesSync

TypeScript
export declare function renderClassNamesSync(  classNames: readonly string[],  options: MasterCSSRenderSessionOptions): import("./render-session").MasterCSSRenderSnapshot;

@master/css/client

Ambient TypeScript declarations for generated virtual modules.

Ambient module declarations for TypeScript. Include this entry in the host’s type configuration.

TYPESCRIPT
declare module '*?master-css-manifest' {  import type { MasterCSSManifest } from '@master/css-schema/manifest'  const manifest: MasterCSSManifest  export default manifest}declare module 'virtual:master-utilities.css' {}declare module 'virtual:master-css-runtime' {}declare module 'virtual:master-css-manifest' {  import type { MasterCSSManifest } from '@master/css-schema/manifest'  const manifest: MasterCSSManifest  export default manifest}declare module 'virtual:master-css-emitted-globals' {  import type { MasterCSSEmittedGlobals } from '@master/css-schema/emitted-globals'  const emittedGlobals: MasterCSSEmittedGlobals  export default emittedGlobals}

@master/css/index.css

Complete preset stylesheet entry.

CSS
@import "@master/css/index.css";

@master/css/base.css

Base styles and the stable cascade-layer order.

CSS
@import "@master/css/base.css";

@master/css/theme.css

Preset theme definitions.

CSS
@import "@master/css/theme.css";

@master/css/variants.css

Preset reusable conditions.

CSS
@import "@master/css/variants.css";

@master/css/utilities.css

Preset utility definitions.

CSS
@import "@master/css/utilities.css";

Using this contract

Pass an explicit manifest to engine and render APIs. Reuse a session for repeated work and dispose it when finished. For stylesheet authoring and project loading, use the compiler; for DOM observation, use the runtime.


© 2026 Aoyue Design LLC.MIT License
Trademark Policy