Package APIs

@master/css-schema

Public Master CSS schema and wire-format contracts.

Public entrypoints

Shared types and codecs describe manifests, diagnostics, hydration and integration options. These contracts let hosts exchange structured Master CSS data.

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-schema

Common manifest, diagnostic and rendering-mode exports.

Exports · 20

flattenMasterCSSManifestVariables

TypeScript
export declare function flattenMasterCSSManifestVariables(  variables: MasterCSSManifestVariables | undefined): MasterCSSManifestVariableEntry[];

getMasterCSSManifestVariableName

TypeScript
export declare function getMasterCSSManifestVariableName(  namespace: string,  variable: Pick<MasterCSSManifestVariable, 'key' | 'name'>): string;

groupMasterCSSManifestVariables

TypeScript
export declare function groupMasterCSSManifestVariables(  variables: readonly MasterCSSManifestVariable[] | undefined): MasterCSSManifestVariables | undefined;

isMasterCSSRenderingMode

TypeScript
export declare function isMasterCSSRenderingMode(  value: unknown): value is MasterCSSRenderingMode;

MASTER_CSS_DIAGNOSTIC_VERSION

TypeScript
declare const MASTER_CSS_DIAGNOSTIC_VERSION: 2;

MASTER_CSS_RENDERING_MODES

TypeScript
declare const MASTER_CSS_RENDERING_MODES: readonly [    "runtime",    "static",    "pre-render",    "progressive"];

MasterCSSDiagnostic

TypeScript
export interface MasterCSSDiagnostic {    readonly version: typeof MASTER_CSS_DIAGNOSTIC_VERSION;    readonly code: string;    readonly domain: MasterCSSDiagnosticDomain;    readonly phase?: 'match' | 'css-syntax' | 'css-value' | 'browser-support' | 'compiler';    readonly severity: MasterCSSDiagnosticSeverity;    readonly message: string;    readonly source?: string;    readonly range?: MasterCSSDiagnosticRange;    readonly notes?: readonly string[];    readonly help?: string;}

MasterCSSDiagnosticDomain

TypeScript
export type MasterCSSDiagnosticDomain = 'binding' | 'compiler' | 'engine' | 'integration' | 'language' | 'project' | 'runtime' | 'server' | 'tooling';

MasterCSSDiagnosticPosition

TypeScript
export interface MasterCSSDiagnosticPosition {    line: number;    character: number;}

MasterCSSDiagnosticRange

TypeScript
export interface MasterCSSDiagnosticRange {    start: MasterCSSDiagnosticPosition;    end: MasterCSSDiagnosticPosition;}

MasterCSSDiagnosticSeverity

TypeScript
export type MasterCSSDiagnosticSeverity = 'error' | 'warning' | 'information';

MasterCSSError

TypeScript
export declare class MasterCSSError extends Error {    readonly code: string;    readonly domain: MasterCSSDiagnosticDomain;    readonly diagnostics: readonly MasterCSSDiagnostic[];    readonly payload: MasterCSSErrorPayload;    constructor(payload: MasterCSSErrorPayload, options?: MasterCSSErrorOptions);    toJSON(): MasterCSSErrorPayload;}

MasterCSSErrorOptions

TypeScript
export interface MasterCSSErrorOptions extends ErrorOptions {    diagnostics?: readonly MasterCSSDiagnostic[];}

MasterCSSErrorPayload

TypeScript
export interface MasterCSSErrorPayload {    readonly code: string;    readonly domain: MasterCSSDiagnosticDomain;    readonly message: string;    readonly diagnostics?: readonly MasterCSSDiagnostic[];}

MasterCSSIntegrationOptions

TypeScript
export interface MasterCSSIntegrationOptions {    enabled?: boolean;    mode?: MasterCSSRenderingMode;    pruneNativeCSS?: boolean;    runtime?: boolean | MasterCSSIntegrationRuntimeOptions;}

MasterCSSIntegrationRuntimeOptions

TypeScript
export interface MasterCSSIntegrationRuntimeOptions {    enabled?: boolean;    avoidFOUC?: boolean;}

MasterCSSManifest

TypeScript
export interface MasterCSSManifest {    /**     * MasterCSSManifest IR schema/codec version.     * This is not a legacy Config compatibility marker; engines must reject     * unsupported manifest versions instead of migrating authoring APIs at runtime.     */    version: 1;    languageVersion: 3;    modes?: MasterCSSManifestMode[];    settings?: MasterCSSManifestSettings;    variables?: MasterCSSManifestVariables;    animations?: MasterCSSManifestAnimations;    animationOptions?: MasterCSSManifestAnimationOptions;    variants?: MasterCSSManifestVariants;    conditions?: MasterCSSManifestConditions;    breakpointConditions?: MasterCSSManifestConditions;    containerConditions?: MasterCSSManifestConditions;    selectors?: MasterCSSManifestSelectors;    utilities?: MasterCSSManifestUtilities;    debug?: Record<string, unknown>;}

MasterCSSRenderingMode

TypeScript
export type MasterCSSRenderingMode = typeof MASTER_CSS_RENDERING_MODES[number];

normalizeMasterCSSManifest

TypeScript
export declare function normalizeMasterCSSManifest(  manifest: MasterCSSManifest): MasterCSSManifest;

serializeMasterCSSManifest

TypeScript
export declare function serializeMasterCSSManifest(  manifest: MasterCSSManifest): string;

@master/css-schema/manifest

Manifest v1 types, variable helpers and serialization.

Exports · 48

flattenMasterCSSManifestVariables

TypeScript
export declare function flattenMasterCSSManifestVariables(  variables: MasterCSSManifestVariables | undefined): MasterCSSManifestVariableEntry[];

getMasterCSSManifestVariableName

TypeScript
export declare function getMasterCSSManifestVariableName(  namespace: string,  variable: Pick<MasterCSSManifestVariable, 'key' | 'name'>): string;

groupMasterCSSManifestVariables

TypeScript
export declare function groupMasterCSSManifestVariables(  variables: readonly MasterCSSManifestVariable[] | undefined): MasterCSSManifestVariables | undefined;

MasterCSSManifest

TypeScript
export interface MasterCSSManifest {    /**     * MasterCSSManifest IR schema/codec version.     * This is not a legacy Config compatibility marker; engines must reject     * unsupported manifest versions instead of migrating authoring APIs at runtime.     */    version: 1;    languageVersion: 3;    modes?: MasterCSSManifestMode[];    settings?: MasterCSSManifestSettings;    variables?: MasterCSSManifestVariables;    animations?: MasterCSSManifestAnimations;    animationOptions?: MasterCSSManifestAnimationOptions;    variants?: MasterCSSManifestVariants;    conditions?: MasterCSSManifestConditions;    breakpointConditions?: MasterCSSManifestConditions;    containerConditions?: MasterCSSManifestConditions;    selectors?: MasterCSSManifestSelectors;    utilities?: MasterCSSManifestUtilities;    debug?: Record<string, unknown>;}

MasterCSSManifestAnimationOptions

TypeScript
export type MasterCSSManifestAnimationOptions = Record<string, {    static?: boolean;}>;

MasterCSSManifestAnimations

TypeScript
export type MasterCSSManifestAnimations<TDeclarations = MasterCSSManifestCSSDeclarations> = Record<string, MasterCSSManifestKeyframes<TDeclarations>>;

MasterCSSManifestCondition

TypeScript
export interface MasterCSSManifestCondition {    id: MasterCSSManifestConditionIdentifier;    nodes: MasterCSSManifestConditionNode[];}

MasterCSSManifestConditionBooleanNode

TypeScript
export interface MasterCSSManifestConditionBooleanNode {    raw?: string;    name: string;    type: 'boolean';}

MasterCSSManifestConditionComparisonOperatorNode

TypeScript
export interface MasterCSSManifestConditionComparisonOperatorNode {    type: 'comparison';    raw?: string;    value: string;}

MasterCSSManifestConditionGroupNode

TypeScript
export interface MasterCSSManifestConditionGroupNode {    type?: 'group';    raw?: string;    children: MasterCSSManifestConditionNode[];}

MasterCSSManifestConditionIdentifier

TypeScript
export type MasterCSSManifestConditionIdentifier = 'container' | 'starting-style' | 'supports' | 'media' | 'layer';

MasterCSSManifestConditionLogicalOperatorNode

TypeScript
export interface MasterCSSManifestConditionLogicalOperatorNode {    type: 'logical';    raw?: string;    value: string;}

MasterCSSManifestConditionNode

TypeScript
export type MasterCSSManifestConditionNode = MasterCSSManifestConditionBooleanNode | MasterCSSManifestConditionValueNode | MasterCSSManifestConditionComparisonOperatorNode | MasterCSSManifestConditionLogicalOperatorNode | MasterCSSManifestConditionGroupNode;

MasterCSSManifestConditionNumberNode

TypeScript
export interface MasterCSSManifestConditionNumberNode {    raw?: string;    name?: string;    type: 'number';    value: number;    unit?: string;    operator?: string;}

MasterCSSManifestConditionOperatorNode

TypeScript
export type MasterCSSManifestConditionOperatorNode = MasterCSSManifestConditionComparisonOperatorNode | MasterCSSManifestConditionLogicalOperatorNode;

MasterCSSManifestConditions

TypeScript
export type MasterCSSManifestConditions = Record<string, MasterCSSManifestCondition>;

MasterCSSManifestConditionStringNode

TypeScript
export interface MasterCSSManifestConditionStringNode {    raw?: string;    name?: string;    type: 'string';    value: string;}

MasterCSSManifestConditionValueNode

TypeScript
export type MasterCSSManifestConditionValueNode = MasterCSSManifestConditionNumberNode | MasterCSSManifestConditionStringNode;

MasterCSSManifestCSSDeclarationPrimitive

TypeScript
export type MasterCSSManifestCSSDeclarationPrimitive = string | number | null;

MasterCSSManifestCSSDeclarations

TypeScript
export type MasterCSSManifestCSSDeclarations = PropertiesHyphen | Record<string, MasterCSSManifestCSSDeclarationPrimitive | MasterCSSManifestCSSDeclarationPrimitive[]>;

MasterCSSManifestKeyframes

TypeScript
export type MasterCSSManifestKeyframes<TDeclarations = MasterCSSManifestCSSDeclarations> = Record<'from' | 'to' | string, TDeclarations>;

MasterCSSManifestMode

TypeScript
export interface MasterCSSManifestMode {    name: string;    branches: {        selector: string;        conditions?: string[];    }[];}

MasterCSSManifestSelectorCombinatorNode

TypeScript
export interface MasterCSSManifestSelectorCombinatorNode {    type: 'combinator';    raw?: string;    value: string;}

MasterCSSManifestSelectorLiteralNode

TypeScript
export interface MasterCSSManifestSelectorLiteralNode {    type?: 'attribute' | 'pseudo-class' | 'pseudo-element' | 'class' | 'universal' | 'id';    raw?: string;    value?: string;    children?: MasterCSSManifestSelectorNode[];}

MasterCSSManifestSelectorNode

TypeScript
export type MasterCSSManifestSelectorNode = MasterCSSManifestSelectorLiteralNode | MasterCSSManifestSelectorCombinatorNode | MasterCSSManifestSelectorSeparatorNode;

MasterCSSManifestSelectors

TypeScript
export type MasterCSSManifestSelectors = Record<string, MasterCSSManifestSelectorNode[]>;

MasterCSSManifestSelectorSeparatorNode

TypeScript
export interface MasterCSSManifestSelectorSeparatorNode {    type: 'separator';    raw?: string;    value: string;}

MasterCSSManifestSettings

TypeScript
export interface MasterCSSManifestSettings {    scope?: string;    important?: boolean;}

MasterCSSManifestUtilities

TypeScript
export type MasterCSSManifestUtilities = MasterCSSManifestUtility[];

MasterCSSManifestUtility

TypeScript
export interface MasterCSSManifestUtility {    id: string;    name?: string;    type: UtilityType;    order?: number;    layer?: MasterCSSManifestUtilityLayerName;    key?: string;    subkey?: string;    keys?: string[];    aliasGroups?: string[];    namespaces?: string[];    implicitNamespace?: boolean;    separators?: string[];    conditions?: string[];    variableAliases?: MasterCSSManifestVariableAliasSet;    variableAliasRefs?: string[];    emit: MasterCSSManifestUtilityEmit;    matchers: MasterCSSManifestUtilityMatcher[];    debug?: Record<string, unknown>;}

MasterCSSManifestUtilityEmit

TypeScript
export type MasterCSSManifestUtilityEmit = {    type: 'declarations';    declarations: string[];} | {    type: 'template';    declarations: MasterCSSManifestCSSDeclarations;} | {    type: 'property';    property: string;} | {    type: 'static';    rules: MasterCSSManifestUtilityRule[];};

MasterCSSManifestUtilityLayerName

TypeScript
export type MasterCSSManifestUtilityLayerName = 'base' | 'defaults' | 'components' | 'utilities';

MasterCSSManifestUtilityMatcher

TypeScript
export type MasterCSSManifestUtilityMatcher = {    type: 'static';    name: string;} | {    type: 'pattern';    prefix: string;    values: string[];    valueMap?: Record<string, string>;} | {    type: 'key';    keys: string[];} | {    type: 'token';    prefix: string;};

MasterCSSManifestUtilityRule

TypeScript
export interface MasterCSSManifestUtilityRule<TDeclarations = MasterCSSManifestCSSDeclarations> {    declarations: TDeclarations;    conditions?: string[];    selector?: string;}

MasterCSSManifestVariable

TypeScript
export interface MasterCSSManifestVariable {    name?: string;    key: string;    namespace?: string;    type?: MasterCSSManifestVariableType;    value?: MasterCSSManifestVariableValue;    numeric?: MasterCSSManifestVariableNumericValue;    modes?: Record<string, {        type: MasterCSSManifestVariableType;        value: number | string;        numeric?: MasterCSSManifestVariableNumericValue;    }>;    dependencies?: string[];    mode?: string;    inline?: boolean;    static?: boolean;}

MasterCSSManifestVariableAlias

TypeScript
export type MasterCSSManifestVariableAlias = [    key: string,    name: string];

MasterCSSManifestVariableAliasSet

TypeScript
export type MasterCSSManifestVariableAliasSet = MasterCSSManifestVariableAlias[];

MasterCSSManifestVariableEntry

TypeScript
export type MasterCSSManifestVariableEntry = MasterCSSManifestVariable & {    name: string;    namespace?: string;    type: MasterCSSManifestVariableType;};

MasterCSSManifestVariableNumericValue

TypeScript
export interface MasterCSSManifestVariableNumericValue {    value: number;    unit?: string;}

MasterCSSManifestVariables

TypeScript
export type MasterCSSManifestVariables = Record<string, MasterCSSManifestVariable[]>;

MasterCSSManifestVariableType

TypeScript
export type MasterCSSManifestVariableType = 'number' | 'string';

MasterCSSManifestVariableValue

TypeScript
export type MasterCSSManifestVariableValue = number | string | false | (number | string)[];

MasterCSSManifestVariant

TypeScript
export interface MasterCSSManifestVariant {    token: MasterCSSManifestVariantToken;    branches: MasterCSSManifestVariantBranch[];}

MasterCSSManifestVariantBranch

TypeScript
export interface MasterCSSManifestVariantBranch {    selector?: string;    selectorNodes?: MasterCSSManifestSelectorNode[];    conditions?: string[];    conditionNodes?: MasterCSSManifestCondition[];    layer?: MasterCSSManifestUtilityLayerName;}

MasterCSSManifestVariants

TypeScript
export type MasterCSSManifestVariants = MasterCSSManifestVariant[];

MasterCSSManifestVariantToken

TypeScript
export type MasterCSSManifestVariantToken = `:${string}` | `::${string}` | `@${string}`;

normalizeMasterCSSManifest

TypeScript
export declare function normalizeMasterCSSManifest(  manifest: MasterCSSManifest): MasterCSSManifest;

serializeMasterCSSManifest

TypeScript
export declare function serializeMasterCSSManifest(  manifest: MasterCSSManifest): string;

@master/css-schema/hydration-manifest

Hydration rules, resource order and serialization helpers.

Exports · 11

createMasterCSSHydrationManifestScript

TypeScript
export declare function createMasterCSSHydrationManifestScript(  hydrationManifest: MasterCSSHydrationManifest): string;

MASTER_CSS_HYDRATION_MANIFEST_ASSET_BASE

TypeScript
declare const MASTER_CSS_HYDRATION_MANIFEST_ASSET_BASE: "/_master-css/hydration/";

MASTER_CSS_HYDRATION_MANIFEST_ATTR

TypeScript
declare const MASTER_CSS_HYDRATION_MANIFEST_ATTR: "data-master-css-hydration-manifest";

MASTER_CSS_HYDRATION_MANIFEST_FILE_BASENAME

TypeScript
declare const MASTER_CSS_HYDRATION_MANIFEST_FILE_BASENAME: "master-css-hydration";

MASTER_CSS_HYDRATION_MANIFEST_SCRIPT_ID

TypeScript
declare const MASTER_CSS_HYDRATION_MANIFEST_SCRIPT_ID: "master-css-hydration-manifest";

MasterCSSConditionRange

TypeScript
export interface MasterCSSConditionRange {    readonly domain: string;    readonly feature: string;    readonly unit: string;    readonly lower: {        readonly value: number;        readonly inclusive: boolean;    } | null;    readonly upper: {        readonly value: number;        readonly inclusive: boolean;    } | null;}

MasterCSSHydrationManifest

TypeScript
export interface MasterCSSHydrationManifest {    readonly version: 1;    readonly languageVersion: 3;    readonly rules: readonly MasterCSSHydrationRule[];    readonly resourceOrder: readonly string[];}

MasterCSSHydrationRule

TypeScript
export interface MasterCSSHydrationRule {    readonly className: string;    readonly key: string;    readonly layer: MasterCSSManifestUtilityLayerName;    readonly type: UtilityType;    readonly sortTier: number;    readonly priority: MasterCSSRulePriority;    readonly text: string;    readonly nodes?: readonly MasterCSSHydrationRuleNode[];    readonly selectorText?: string;    readonly variableNames?: readonly string[];    readonly animationNames?: readonly string[];}

MasterCSSHydrationRuleNode

TypeScript
export interface MasterCSSHydrationRuleNode {    readonly text: string;}

MasterCSSRulePriority

TypeScript
export interface MasterCSSRulePriority {    /** Token values sort before raw values within the same cascade tier. */    readonly valuePriority?: -1 | 0;    /** Parsed declaration identity, independent of public aliases. */    readonly sortKey?: string;    readonly features: readonly MasterCSSConditionRange[];    readonly conditions?: readonly string[];    readonly selector: number;}

serializeMasterCSSHydrationManifest

TypeScript
export declare function serializeMasterCSSHydrationManifest(  hydrationManifest: MasterCSSHydrationManifest): string;

@master/css-schema/css-directives

Directive results, source ranges and output mappings.

Exports · 29

createCSSDirectiveSourceReference

TypeScript
export declare function createCSSDirectiveSourceReference(  file: string | undefined,  range: CSSDirectiveSourceRange,  source?: string): CSSDirectiveSourceReference;

CSSDirectiveAnimationDefinitions

TypeScript
export type CSSDirectiveAnimationDefinitions = Record<string, Record<string, CSSDirectiveDeclarations>>;

CSSDirectiveAnimationOptions

TypeScript
export type CSSDirectiveAnimationOptions = Record<string, {    static?: boolean;}>;

CSSDirectiveConditionPathEntry

TypeScript
export type CSSDirectiveConditionPathEntry = {    type: 'condition';    value: string;} | {    type: 'variant';    token: string;};

CSSDirectiveDeclarations

TypeScript
export type CSSDirectiveDeclarations = Record<string, string>;

CSSDirectiveError

TypeScript
export declare class CSSDirectiveError extends Error {    code: string;    source?: CSSDirectiveSourceReference;    related?: CSSDirectiveRelatedInformation[];    constructor(      code: string,      message: string,      source?: CSSDirectiveSourceReference,      related?: CSSDirectiveRelatedInformation[]    );}

CSSDirectiveExtractionPolicy

TypeScript
export interface CSSDirectiveExtractionPolicy {    include: string[];    exclude: string[];    safelist: string[];    blocklist: (string | RegExp)[];    preserveNative: boolean;    pruneNative: boolean;}

CSSDirectiveLayerName

TypeScript
export type CSSDirectiveLayerName = MasterCSSManifestUtilityLayerName;

CSSDirectiveManifestInput

TypeScript
export interface CSSDirectiveManifestInput {    variants?: CSSDirectiveVariantDefinitions;    variables?: CSSDirectiveVariableDefinition[];    utilities?: CSSDirectiveUtilityDefinition[];    scope?: string;    important?: boolean;    animations?: CSSDirectiveAnimationDefinitions;    animationOptions?: CSSDirectiveAnimationOptions;    modes?: MasterCSSManifestMode[];}

CSSDirectiveReference

TypeScript
export interface CSSDirectiveReference {    source: string;    file?: string;}

CSSDirectiveRelatedInformation

TypeScript
export interface CSSDirectiveRelatedInformation {    message: string;    source?: CSSDirectiveSourceReference;}

CSSDirectiveResult

TypeScript
export interface CSSDirectiveResult {    utilitySources?: CSSUtilitySource[];    nativeOutput?: CSSNativeOutput;    outputMappings?: CSSOutputMapping[];    /** Serialized source map v3 for the final CSS, when produced by the stylesheet host. */    sourceMap?: string;    nativeMappings?: CSSOutputMapping[];    generatedMappings?: CSSOutputMapping[];    manifestInput: CSSDirectiveManifestInput;    extractionPolicy: CSSDirectiveExtractionPolicy;    classNames: string[];    nativeClassNames: string[];    nativeCSS: string;    css: string;    generatedCSS: string;    warnings: string[];    dependencies: string[];    references?: CSSDirectiveReference[];    styleDefinitions?: CSSDirectiveStyleDefinition[];}

CSSDirectiveSourceLocation

TypeScript
export interface CSSDirectiveSourceLocation {    line: number;    column: number;}

CSSDirectiveSourceRange

TypeScript
export interface CSSDirectiveSourceRange {    start: number;    end: number;}

CSSDirectiveSourceReference

TypeScript
export interface CSSDirectiveSourceReference {    file?: string;    range: CSSDirectiveSourceRange;    loc?: {        start: CSSDirectiveSourceLocation;        end: CSSDirectiveSourceLocation;    };}

CSSDirectiveStyleDefinition

TypeScript
export type CSSDirectiveStyleDefinition = CSSDirectiveStyleNativeDefinition;

CSSDirectiveStyleNativeDefinition

TypeScript
export interface CSSDirectiveStyleNativeDefinition {    type: 'native';    order: number;    selector: string;    declarations: CSSOrderedDeclaration[];    source?: CSSDirectiveSourceReference;    selectorSource?: CSSDirectiveSourceReference;    conditions?: string[];    conditionPath?: CSSDirectiveConditionPathEntry[];    layer?: CSSDirectiveLayerName;    name?: string;}

CSSDirectiveUtilityDefinition

TypeScript
export interface CSSDirectiveUtilityDefinition {    name: string;    /** Complete ordered authoring body; retained until whole-definition replacement. */    body?: CSSDirectiveStyleDefinition[];    source?: CSSDirectiveSourceReference;    type?: 'static' | 'pattern' | 'dynamic' | 'token';    layer?: CSSDirectiveLayerName;    pattern?: CSSDirectiveUtilityPatternDefinition;    dynamic?: CSSDirectiveUtilityDynamicDefinition;    token?: CSSDirectiveUtilityTokenDefinition;    declarations?: CSSDirectiveDeclarations;    conditions?: string[];    conditionPath?: CSSDirectiveConditionPathEntry[];    rules?: CSSDirectiveUtilityRuleDefinition[];}

CSSDirectiveUtilityDynamicDefinition

TypeScript
export interface CSSDirectiveUtilityDynamicDefinition {    key: string;}

CSSDirectiveUtilityPatternDefinition

TypeScript
export interface CSSDirectiveUtilityPatternDefinition {    prefix: string;    values: string[];    valueMap?: Record<string, string>;}

CSSDirectiveUtilityRuleDefinition

TypeScript
export interface CSSDirectiveUtilityRuleDefinition {    declarations: CSSDirectiveDeclarations;    conditions?: string[];    conditionPath?: CSSDirectiveConditionPathEntry[];    selector?: string;}

CSSDirectiveUtilityTokenDefinition

TypeScript
export interface CSSDirectiveUtilityTokenDefinition {    prefix: string;    variableAliasRefs: string[];}

CSSDirectiveVariableDefinition

TypeScript
export interface CSSDirectiveVariableDefinition {    name?: string;    value: CSSDirectiveVariableValue;    mode?: string;    inline?: boolean;    static?: boolean;    namespace?: string;    key?: string;}

CSSDirectiveVariableValue

TypeScript
export type CSSDirectiveVariableValue = number | string | false | (number | string)[];

CSSDirectiveVariantDefinitions

TypeScript
export type CSSDirectiveVariantDefinitions = Pick<MasterCSSManifestVariant, 'token' | 'branches'>[];

CSSNativeOutput

Rust output plan; pass it unchanged from parsing to directive lowering.

TypeScript
export interface CSSNativeOutput {    css: string;    mappings: CSSOutputMapping[];    slots: {        start: number;        end: number;        marker: string;        definitions: CSSDirectiveStyleDefinition[];    }[];}

CSSOrderedDeclaration

TypeScript
export interface CSSOrderedDeclaration {    property: string;    value: string;    source?: CSSDirectiveSourceReference;}

CSSOutputMapping

Generated UTF-16 offset and its original authoring-source anchor.

TypeScript
export interface CSSOutputMapping {    generatedStart: number;    generatedEnd?: number;    source: CSSDirectiveSourceReference;}

CSSUtilitySource

TypeScript
export interface CSSUtilitySource {    name: string;    identity: string;    replacedBy?: CSSDirectiveSourceReference;    source: CSSDirectiveSourceReference;}

@master/css-schema/css-syntax

Utility, selector and value representation types.

Exports · 14

DefinedUtility

TypeScript
export interface DefinedUtility {    id: string;    key?: string;    keys: string[];    matchers: {        key?: RegExp;        variable?: RegExp;        value?: RegExp;        arbitrary?: RegExp;    };    variables?: Map<string, Variable>;    order: number;    definition: MasterCSSManifestUtility;}

ExplicitUtilityLayerName

TypeScript
export type ExplicitUtilityLayerName = MasterCSSManifestUtilityLayerName;

FunctionValueComponent

TypeScript
export interface FunctionValueComponent {    text?: string;    token: string;    type: 'function';    name: string;    symbol: string;    children: ValueComponent[];    bypassTransform?: boolean;}

MediaFeatureComponent

TypeScript
export interface MediaFeatureComponent {    type: string;    tokenType?: string;    operator?: string;    value: number;    unit: string;}

MediaQuery

TypeScript
export interface MediaQuery {    token: string;    features: Record<string, MediaFeatureComponent>;    type?: string;}

NumberValueComponent

TypeScript
export interface NumberValueComponent {    text?: string;    token: string;    type: 'number';    value: number;    unit?: string;}

NumberVariable

TypeScript
export interface NumberVariable {    type: 'number';    value: number | string;    numeric?: MasterCSSManifestVariableNumericValue;}

ResolvedVariableValue

TypeScript
export type ResolvedVariableValue = StringVariable | NumberVariable;

SeparatorValueComponent

TypeScript
export interface SeparatorValueComponent {    text?: string;    token: string;    type: 'separator';    value: string;}

StringValueComponent

TypeScript
export interface StringValueComponent {    text?: string;    token: string;    type: 'string';    value: string;}

StringVariable

TypeScript
export interface StringVariable {    type: 'string';    value: string | number;}

ValueComponent

TypeScript
export type ValueComponent = StringValueComponent | NumberValueComponent | FunctionValueComponent | VariableValueComponent | SeparatorValueComponent;

Variable

TypeScript
export type Variable = VariableCommon & {    type: ResolvedVariableValue['type'];    value?: ResolvedVariableValue['value'];    numeric?: MasterCSSManifestVariableNumericValue;};

VariableValueComponent

TypeScript
export interface VariableValueComponent {    text?: string;    token: string;    type: 'variable';    name: string;    alpha?: number;    fallback?: string;    negative?: boolean;    variable?: Variable;}

@master/css-schema/utility-type

Utility classification constants and their type.

UtilityType

TypeScript
declare const UtilityType: {    /**     * semantic utility classes     * @example block, inline     */    readonly Semantic: -2;    /**     * shorthand     * @example border, padding, margin     */    readonly Shorthand: -1;    /**     * normal     * @example grid-cols     */    readonly Normal: 0;};export type UtilityType = typeof UtilityType[keyof typeof UtilityType];

@master/css-schema/runtime-style

Runtime style element identifier.

MASTER_CSS_RUNTIME_STYLE_ID

TypeScript
declare const MASTER_CSS_RUNTIME_STYLE_ID: "master-css";

@master/css-schema/emitted-globals

Counts of resources already emitted outside a session.

MasterCSSEmittedGlobals

Resource counts already emitted outside the current Rust engine session.

TypeScript
export interface MasterCSSEmittedGlobals {    variables?: Record<string, number>;    animations?: Record<string, number>;}

@master/css-schema/native-css-shorthand

Native CSS shorthand property lookup.

isNativeCSSShorthandProperty

TypeScript
export declare function isNativeCSSShorthandProperty(property: string): boolean;

@master/css-schema/css-common

Shared CSS vendor identifiers.

Vendors

TypeScript
export type Vendors = 'webkit' | 'moz' | 'ms' | 'o';

@master/css-schema/diagnostics

Diagnostic versions, source ranges and error payloads.

Exports · 9

MASTER_CSS_DIAGNOSTIC_VERSION

TypeScript
declare const MASTER_CSS_DIAGNOSTIC_VERSION: 2;

MasterCSSDiagnostic

TypeScript
export interface MasterCSSDiagnostic {    readonly version: typeof MASTER_CSS_DIAGNOSTIC_VERSION;    readonly code: string;    readonly domain: MasterCSSDiagnosticDomain;    readonly phase?: 'match' | 'css-syntax' | 'css-value' | 'browser-support' | 'compiler';    readonly severity: MasterCSSDiagnosticSeverity;    readonly message: string;    readonly source?: string;    readonly range?: MasterCSSDiagnosticRange;    readonly notes?: readonly string[];    readonly help?: string;}

MasterCSSDiagnosticDomain

TypeScript
export type MasterCSSDiagnosticDomain = 'binding' | 'compiler' | 'engine' | 'integration' | 'language' | 'project' | 'runtime' | 'server' | 'tooling';

MasterCSSDiagnosticPosition

TypeScript
export interface MasterCSSDiagnosticPosition {    line: number;    character: number;}

MasterCSSDiagnosticRange

TypeScript
export interface MasterCSSDiagnosticRange {    start: MasterCSSDiagnosticPosition;    end: MasterCSSDiagnosticPosition;}

MasterCSSDiagnosticSeverity

TypeScript
export type MasterCSSDiagnosticSeverity = 'error' | 'warning' | 'information';

MasterCSSError

TypeScript
export declare class MasterCSSError extends Error {    readonly code: string;    readonly domain: MasterCSSDiagnosticDomain;    readonly diagnostics: readonly MasterCSSDiagnostic[];    readonly payload: MasterCSSErrorPayload;    constructor(payload: MasterCSSErrorPayload, options?: MasterCSSErrorOptions);    toJSON(): MasterCSSErrorPayload;}

MasterCSSErrorOptions

TypeScript
export interface MasterCSSErrorOptions extends ErrorOptions {    diagnostics?: readonly MasterCSSDiagnostic[];}

MasterCSSErrorPayload

TypeScript
export interface MasterCSSErrorPayload {    readonly code: string;    readonly domain: MasterCSSDiagnosticDomain;    readonly message: string;    readonly diagnostics?: readonly MasterCSSDiagnostic[];}

@master/css-schema/integration

Rendering modes and shared integration options.

isMasterCSSRenderingMode

TypeScript
export declare function isMasterCSSRenderingMode(  value: unknown): value is MasterCSSRenderingMode;

MASTER_CSS_RENDERING_MODES

TypeScript
declare const MASTER_CSS_RENDERING_MODES: readonly [    "runtime",    "static",    "pre-render",    "progressive"];

MasterCSSIntegrationOptions

TypeScript
export interface MasterCSSIntegrationOptions {    enabled?: boolean;    mode?: MasterCSSRenderingMode;    pruneNativeCSS?: boolean;    runtime?: boolean | MasterCSSIntegrationRuntimeOptions;}

MasterCSSIntegrationRuntimeOptions

TypeScript
export interface MasterCSSIntegrationRuntimeOptions {    enabled?: boolean;    avoidFOUC?: boolean;}

MasterCSSRenderingMode

TypeScript
export type MasterCSSRenderingMode = typeof MASTER_CSS_RENDERING_MODES[number];

Using this contract

Import types from the narrow subpath that owns them. A type declaration describes a data shape; it does not validate arbitrary input or compile stylesheet directives. Preserve version fields when passing manifests and diagnostics between APIs.


© 2026 Aoyue Design LLC.MIT License
Trademark Policy