Package APIs

@master/css-tooling

Rust-backed extraction, scanning, linting, language, validation, and diagnostics sessions for Master CSS

Public entrypoints

Analyze class syntax, extract candidates, validate rules and provide lint or language results. Choose a focused entrypoint or reuse a tooling session across operations.

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

Reusable asynchronous tooling session spanning analysis capabilities.

Exports · 9

createToolingSession

TypeScript
export declare function createToolingSession(  options: MasterCSSToolingSessionOptions): Promise<MasterCSSToolingSession>;

MasterCSSDocumentAnalysis

TypeScript
export interface MasterCSSDocumentAnalysis {    readonly version: 4;    readonly classPositions: readonly MasterCSSLanguageClassPosition[];    readonly diagnostics: readonly import('@master/css-binding/tooling').MasterCSSDiagnostic[];    readonly semanticTokens: readonly SemanticTokenItem[];    readonly semanticTokenData: readonly number[];}

MasterCSSDocumentAnalysisRequest

TypeScript
export interface MasterCSSDocumentAnalysisRequest {    readonly source: string;    readonly languageId: string;    readonly hostRanges?: readonly MasterCSSLanguageClassListContext[];    readonly settings?: Readonly<{        classAttributes?: readonly string[];        classFunctions?: readonly string[];        classDeclarations?: readonly string[];    }>;}

MasterCSSFormatDirectivesRequest

TypeScript
export interface MasterCSSFormatDirectivesRequest {    readonly source: string;    readonly range?: Readonly<{        start: number;        end: number;    }>;    readonly styleRanges?: readonly Readonly<{        start: number;        end: number;    }>[];}

MasterCSSFormatDirectivesResult

TypeScript
export interface MasterCSSFormatDirectivesResult {    readonly version: 4;    readonly edits: readonly Readonly<{        range: Readonly<{            start: number;            end: number;        }>;        text: string;    }>[];}

MasterCSSLanguageClassListContext

TypeScript
export interface MasterCSSLanguageClassListContext {    readonly start: number;    readonly end: number;    readonly unescape?: readonly string[];}

MasterCSSLanguageClassPosition

TypeScript
export interface MasterCSSLanguageClassPosition {    readonly range: Readonly<{        start: number;        end: number;    }>;    readonly contextRange: Readonly<{        start: number;        end: number;    }>;    readonly raw: string;    readonly token: string;}

MasterCSSToolingSession

Complete declaration · 52 lines
TypeScript
export declare class MasterCSSToolingSession implements Disposable {    private constructor();    get binding(): 'native' | 'wasm';    analyzeClassList(      request: MasterCSSClassListAnalysisRequest    ): MasterCSSClassListAnalysis;    extractSource(request: MasterCSSSourceExtractionRequest): MasterCSSSourceExtraction;    /** Decode HTML attribute contents without delimiters, preserving UTF-16 spans. */    decodeHTMLAttribute(source: string): MasterCSSDecodedHTMLAttribute;    extractClassCandidates(content: string): readonly string[];    validateClassNames(classNames: readonly string[]): MasterCSSClassValidationResult;    lintClassNames(classNames: readonly string[]): MasterCSSLintAnalysis;    tokenizeClassList(      classList: string,      unescape?: string | false    ): readonly MasterCSSLintToken[];    analyzeLintDocument(      source: string,      languageId: string    ): MasterCSSLintDocumentAnalysis;    analyzeLintClassList(      classList: string,      classNames: readonly string[],      options?: MasterCSSLintClassListOptions    ): MasterCSSLintClassListAnalysis;    canonicalClassNames(      classNames: readonly string[],      options?: CanonicalClassNameOptions    ): readonly MasterCSSLintCanonicalClassSuggestion[];    canonicalClassGroups(      classNames: readonly string[],      options?: CanonicalClassNameOptions    ): readonly MasterCSSLintCanonicalClassGroupSuggestion[];    rawValueCandidates(      classNames: readonly string[]    ): readonly MasterCSSLintRawValueCandidate[];    analyzeDocument(      request: MasterCSSDocumentAnalysisRequest    ): MasterCSSDocumentAnalysis;    formatDirectives(      request: MasterCSSFormatDirectivesRequest    ): MasterCSSFormatDirectivesResult;    classifyClassNames(classNames: readonly string[]): MasterCSSLanguageClassifications;    inspectClassName(className: string, mode?: string): MasterCSSLanguageInspection;    completionIndex(): MasterCSSLanguageCompletionIndex;    colorPresentation(colorToken: string): MasterCSSLanguageColorPresentation;    colorTokens(      candidates: readonly MasterCSSLanguageColorCandidate[]    ): MasterCSSLanguageColorTokens;    dispose(): void;    [Symbol.dispose](): void;}

MasterCSSToolingSessionOptions

TypeScript
export interface MasterCSSToolingSessionOptions {    readonly manifest: MasterCSSManifest;    /** Explicit native class registrations; suppresses retired-utility advice only. */    readonly nativeClassNames?: readonly string[];    readonly binding?: MasterCSSBinding;}

@master/css-tooling/node

Synchronous native session and native declaration support.

createToolingSessionSync

TypeScript
export declare function createToolingSessionSync(  options: {    readonly manifest: MasterCSSManifest;    /** Explicit native class registrations; suppresses retired-utility advice only. */    readonly nativeClassNames?: readonly string[];}): MasterCSSToolingSession;

CSS_SYNTAX_CHECK

TypeScript
declare const CSS_SYNTAX_CHECK: Readonly<{    name: "@eslint/css-tree";    version: string;    phase: "css-syntax";    scope: "selectors-queries-declarations";}>;

CSS_VALUE_CHECK

TypeScript
declare const CSS_VALUE_CHECK: Readonly<{    name: "@eslint/css-tree";    version: string;    phase: "css-value";    scope: "expanded-declarations-and-known-math-grammar-and-static-types-v1";}>;

cssSyntaxStatus

Token structure is independent of property grammars and browser support.

TypeScript
export declare function cssSyntaxStatus(text: string): MasterCSSSyntaxStatus;

cssValueStatus

Grammar knowledge is a report, never permission to generate a declaration.

TypeScript
export declare function cssValueStatus(  property: string,  value: string): MasterCSSValueStatus;

getToolingBindingInfo

Versions from the artifact that actually executes project semantics.

TypeScript
export declare function getToolingBindingInfo(): import("~/packages/binding/dist").MasterCSSBindingInfo;

MasterCSSToolingSession

Complete declaration · 52 lines
TypeScript
export declare class MasterCSSToolingSession implements Disposable {    private constructor();    get binding(): 'native' | 'wasm';    analyzeClassList(      request: MasterCSSClassListAnalysisRequest    ): MasterCSSClassListAnalysis;    extractSource(request: MasterCSSSourceExtractionRequest): MasterCSSSourceExtraction;    /** Decode HTML attribute contents without delimiters, preserving UTF-16 spans. */    decodeHTMLAttribute(source: string): MasterCSSDecodedHTMLAttribute;    extractClassCandidates(content: string): readonly string[];    validateClassNames(classNames: readonly string[]): MasterCSSClassValidationResult;    lintClassNames(classNames: readonly string[]): MasterCSSLintAnalysis;    tokenizeClassList(      classList: string,      unescape?: string | false    ): readonly MasterCSSLintToken[];    analyzeLintDocument(      source: string,      languageId: string    ): MasterCSSLintDocumentAnalysis;    analyzeLintClassList(      classList: string,      classNames: readonly string[],      options?: MasterCSSLintClassListOptions    ): MasterCSSLintClassListAnalysis;    canonicalClassNames(      classNames: readonly string[],      options?: CanonicalClassNameOptions    ): readonly MasterCSSLintCanonicalClassSuggestion[];    canonicalClassGroups(      classNames: readonly string[],      options?: CanonicalClassNameOptions    ): readonly MasterCSSLintCanonicalClassGroupSuggestion[];    rawValueCandidates(      classNames: readonly string[]    ): readonly MasterCSSLintRawValueCandidate[];    analyzeDocument(      request: MasterCSSDocumentAnalysisRequest    ): MasterCSSDocumentAnalysis;    formatDirectives(      request: MasterCSSFormatDirectivesRequest    ): MasterCSSFormatDirectivesResult;    classifyClassNames(classNames: readonly string[]): MasterCSSLanguageClassifications;    inspectClassName(className: string, mode?: string): MasterCSSLanguageInspection;    completionIndex(): MasterCSSLanguageCompletionIndex;    colorPresentation(colorToken: string): MasterCSSLanguageColorPresentation;    colorTokens(      candidates: readonly MasterCSSLanguageColorCandidate[]    ): MasterCSSLanguageColorTokens;    dispose(): void;    [Symbol.dispose](): void;}

validateRuleDeclarations

TypeScript
export declare function validateRuleDeclarations(  text: string): DeclarationValidation[];

@master/css-tooling/builtins

Built-in property aliases and value namespaces.

builtinKeyAliases

TypeScript
declare const builtinKeyAliases: MasterCSSBuiltinKeyAliases;

builtinTokenNamespaces

TypeScript
declare const builtinTokenNamespaces: MasterCSSBuiltinTokenNamespaces;

MasterCSSBuiltinKeyAliases

TypeScript
export type MasterCSSBuiltinKeyAliases = Readonly<Record<string, string>>;

MasterCSSBuiltinTokenNamespace

TypeScript
export interface MasterCSSBuiltinTokenNamespace {    readonly properties: readonly string[];    readonly variableAliasRefs: readonly string[];}

MasterCSSBuiltinTokenNamespaces

TypeScript
export type MasterCSSBuiltinTokenNamespaces = readonly MasterCSSBuiltinTokenNamespace[];

@master/css-tooling/lexer

Class-list and CSS source analysis.

Exports · 9

analyzeClassList

TypeScript
export declare function analyzeClassList(  request: MasterCSSClassListAnalysisRequest,  options: {    readonly manifest: MasterCSSManifest;    readonly binding?: MasterCSSBinding;}): Promise<MasterCSSClassListAnalysis>;

MasterCSSClassListAnalysis

TypeScript
export interface MasterCSSClassListAnalysis {    readonly version: 1;    readonly classLists: readonly (readonly MasterCSSClassListItem[])[];    readonly cssSources: readonly MasterCSSCSSAnalysis[];    readonly escapedIdentifiers: readonly string[];}

MasterCSSClassListAnalysisRequest

TypeScript
export interface MasterCSSClassListAnalysisRequest {    readonly classLists?: readonly MasterCSSClassListInput[];    readonly cssSources?: readonly string[];    readonly escapeIdentifiers?: readonly string[];}

MasterCSSClassListInput

TypeScript
export interface MasterCSSClassListInput {    readonly source: string;    readonly unescape?: readonly string[];}

MasterCSSClassListItem

TypeScript
export interface MasterCSSClassListItem {    readonly range: MasterCSSSourceRange;    readonly raw: string;    readonly token: string;}

MasterCSSCSSAnalysis

TypeScript
export interface MasterCSSCSSAnalysis {    readonly directives: readonly MasterCSSCSSDirectiveAnalysis[];    readonly imports: readonly MasterCSSCSSImportAnalysis[];}

MasterCSSCSSDirectiveAnalysis

TypeScript
export interface MasterCSSCSSDirectiveAnalysis {    readonly name: string;    readonly range: MasterCSSSourceRange;    readonly preludeRange: MasterCSSSourceRange;    readonly hasBlock: boolean;    readonly quotedStrings: number;}

MasterCSSCSSImportAnalysis

TypeScript
export interface MasterCSSCSSImportAnalysis {    readonly range: MasterCSSSourceRange;    readonly statement: string;    readonly source?: string;}

MasterCSSSourceRange

TypeScript
export interface MasterCSSSourceRange {    readonly start: number;    readonly end: number;}

@master/css-tooling/lexer/node

Synchronous native class-list analysis.

analyzeClassListSync

TypeScript
export declare function analyzeClassListSync(  request: MasterCSSClassListAnalysisRequest,  options: {    readonly manifest: MasterCSSManifest;}): MasterCSSClassListAnalysis;

@master/css-tooling/source

Source candidate extraction and source-range types.

extractSource

TypeScript
export declare function extractSource(  request: MasterCSSSourceExtractionRequest,  options: {    readonly manifest: MasterCSSManifest;    readonly binding?: MasterCSSBinding;}): Promise<MasterCSSSourceExtraction>;

MasterCSSDecodedHTMLAttribute

Decoded HTML attribute text and indivisible UTF-16 source spans.

TypeScript
export interface MasterCSSDecodedHTMLAttribute {    readonly value: string;    readonly spans: readonly {        readonly range: {            readonly start: number;            readonly end: number;        };        readonly sourceRange: {            readonly start: number;            readonly end: number;        };    }[];}

MasterCSSExtractedSource

TypeScript
export interface MasterCSSExtractedSource {    readonly source: string;    readonly candidates: readonly string[];    readonly occurrences: readonly import('@master/css-binding/tooling').MasterCSSSourceOccurrence[];    readonly diagnostics: readonly import('@master/css-binding/tooling').MasterCSSDiagnostic[];}

MasterCSSSourceExtraction

TypeScript
export interface MasterCSSSourceExtraction {    readonly version: 2;    readonly files: readonly MasterCSSExtractedSource[];}

MasterCSSSourceExtractionInput

TypeScript
export interface MasterCSSSourceExtractionInput {    readonly source: string;    readonly content: string;    readonly owner?: string;    readonly kind?: MasterCSSSourceKind;}

MasterCSSSourceExtractionRequest

TypeScript
export interface MasterCSSSourceExtractionRequest {    readonly files: readonly MasterCSSSourceExtractionInput[];}

MasterCSSSourceKind

TypeScript
export type MasterCSSSourceKind = 'auto' | 'raw' | 'oxc' | 'html' | 'astro' | 'markdown' | 'mdx';

@master/css-tooling/source/node

Synchronous native source extraction.

extractSourceSync

TypeScript
export declare function extractSourceSync(  request: MasterCSSSourceExtractionRequest,  options: {    readonly manifest: MasterCSSManifest;}): MasterCSSSourceExtraction;

@master/css-tooling/scanner/node

Filesystem scanner, retained candidates and scanner lifecycle.

Exports · 10

createScanner

TypeScript
export declare function createScanner(  options: MasterCSSScannerOptions,  cwd?: string): Promise<MasterCSSScanner>;

defaultScannerOptions

TypeScript
declare const defaultScannerOptions: Readonly<MasterCSSScannerConfiguration>;

MasterCSSScanner

Complete declaration · 72 lines
TypeScript
export declare class MasterCSSScanner extends EventEmitter implements AsyncDisposable {    customOptions: MasterCSSScannerOptions;    cwd: string;    readonly latentClasses: ScannerStateSetView;    readonly validClasses: ScannerStateSetView;    readonly invalidClasses: ScannerStateSetView;    readonly nativeClassNames: ScannerStateSetView;    readonly usedNativeClasses: ScannerStateSetView;    /** Current successful source snapshot, including empty and virtual inputs. */    get sources(): {        source: string;        owner: string;        parentSource: string | null;        kind: import("~/packages/binding/dist/protocol").MasterCSSSourceExtractorKind;        extractor: string;        candidates: string[];    }[];    initialized: boolean;    initializing?: Promise<this>;    resetDependencies: string[];    readonly css: ScannerCSSView;    constructor(customOptions: MasterCSSScannerOptions, cwd?: string);    init(customOptions?: MasterCSSScannerOptions): Promise<this>;    reset(      customOptions?: MasterCSSScannerOptions,      resetOptions?: ScannerResetOptions    ): Promise<this>;    dispose(): Promise<this>;    [Symbol.asyncDispose](): Promise<void>;    /**     * @description Extract source content candidates.     * @param source     * @param content     * @returns Promise<string[]> Latent classes     */    collectCandidates(      source: string,      content: string,      options?: ScannerSourceOptions    ): Promise<string[]>;    scan(source: string, content: string): Promise<boolean>;    scanSource(      source: string,      content: string,      options?: ScannerSourceOptions    ): Promise<MasterCSSScannerSourceResult>;    removeSource(      source: string,      options?: ScannerSourceOptions    ): MasterCSSScannerSourceResult;    reconcileSources(      owner: string,      inputs: readonly ScannerSourceInput[]    ): Promise<MasterCSSScannerSourceResult>;    removeOwner(owner: string): MasterCSSScannerSourceResult;    scanModule(source: string, content: string): Promise<boolean>;    isModuleAllowed(source: string): boolean;    isSourceAllowed(source: string, options?: {        explicit?: boolean;    }): boolean;    get sourcePolicyDependencies(): string[];    registerNativeClasses(owner: string, classNames: string[]): boolean;    get state(): import("~/packages/binding/dist/protocol").MasterCSSScannerState;    /**     * computed from `options.manifest`     */    get manifest(): MasterCSSManifest;    readonly slotCSSRule = "#master-css-slot{--slot:0}";}export interface MasterCSSScanner {    options: MasterCSSScannerOptions;}

MasterCSSScannerConfiguration

TypeScript
export interface MasterCSSScannerConfiguration {    verbose?: number;    path?: string;    /** Actual bundler output directories, always excluded from source input. */    outputDirectories?: readonly string[];    exclude?: readonly string[];    safelist?: readonly string[];    blocklist?: readonly (string | RegExp)[];}

MasterCSSScannerOptions

TypeScript
export interface MasterCSSScannerOptions extends MasterCSSScannerConfiguration, MasterCSSBindingLoadOptions {    manifest: MasterCSSManifest;}

MasterCSSScannerSourceResult

TypeScript
export interface MasterCSSScannerSourceResult {    readonly changed: boolean;    readonly sourceChanged: boolean;    /** All candidates extracted from this input, including previously scanned classes. */    readonly candidates: readonly string[];}

ScannerSourceInput

TypeScript
export type ScannerSourceInput = MasterCSSScannerSourceInput;

ScannerSourceOptions

TypeScript
export type ScannerSourceOptions = MasterCSSScannerSourceOptions;

SourcePolicy

Shared Node input boundary. No global Git configuration or ignore file is read.

TypeScript
export declare class SourcePolicy {    readonly projectDir: string;    readonly options: SourcePolicyOptions;    readonly dependencies: Set<string>;    readonly root: string;    constructor(projectDir: string, options?: SourcePolicyOptions);    accepts(source: string, explicit?: boolean): boolean;}

SourcePolicyOptions

TypeScript
export interface SourcePolicyOptions {    readonly exclude?: readonly string[];    readonly outputDirectories?: readonly string[];}

@master/css-tooling/validator

Class validation against a supplied manifest.

Exports · 9

CSS_SYNTAX_CHECK

TypeScript
declare const CSS_SYNTAX_CHECK: Readonly<{    name: "@eslint/css-tree";    version: string;    phase: "css-syntax";    scope: "selectors-queries-declarations";}>;

CSS_VALUE_CHECK

TypeScript
declare const CSS_VALUE_CHECK: Readonly<{    name: "@eslint/css-tree";    version: string;    phase: "css-value";    scope: "expanded-declarations-and-known-math-grammar-and-static-types-v1";}>;

cssSyntaxStatus

Token structure is independent of property grammars and browser support.

TypeScript
export declare function cssSyntaxStatus(text: string): MasterCSSSyntaxStatus;

cssValueStatus

Grammar knowledge is a report, never permission to generate a declaration.

TypeScript
export declare function cssValueStatus(  property: string,  value: string): MasterCSSValueStatus;

DeclarationValidation

TypeScript
export interface DeclarationValidation {    readonly property: string;    readonly value: string;    readonly atRule?: string;    readonly status: MasterCSSValueStatus;    readonly range?: {        readonly start: number;        readonly end: number;    };}

MasterCSSClassValidation

TypeScript
export interface MasterCSSClassValidation {    readonly className: string;    readonly matchStatus: BindingBatch['classes'][number]['matchStatus'];    readonly declarations: readonly import('../value-validation').DeclarationValidation[];    readonly checks: readonly {        readonly name: string;        readonly version: string;        readonly scope: string;        readonly phase: import('@master/css-binding/tooling').MasterCSSDiagnostic['phase'];    }[];    readonly cssSyntaxStatus: BindingBatch['classes'][number]['cssSyntaxStatus'];    readonly cssValueStatus: BindingBatch['classes'][number]['cssValueStatus'];    readonly browserSupport: BindingBatch['classes'][number]['browserSupport'];    readonly rules: readonly MasterCSSHydrationRule[];    readonly diagnostics?: readonly import('@master/css-binding/tooling').MasterCSSDiagnostic[];}

MasterCSSClassValidationResult

TypeScript
export interface MasterCSSClassValidationResult {    readonly version: 3;    readonly classes: readonly MasterCSSClassValidation[];}

validateClassNames

TypeScript
export declare function validateClassNames(classNames: readonly string[], options: {    readonly manifest: MasterCSSManifest;    readonly binding?: MasterCSSBinding;}): Promise<MasterCSSClassValidationResult>;

validateRuleDeclarations

TypeScript
export declare function validateRuleDeclarations(  text: string): DeclarationValidation[];

@master/css-tooling/validator/node

Synchronous native class validation.

validateClassNamesSync

TypeScript
export declare function validateClassNamesSync(  classNames: readonly string[],  options: {    readonly manifest: MasterCSSManifest;}): import("./contracts").MasterCSSClassValidationResult;

@master/css-tooling/lint

Lint diagnostics, edits, canonical suggestions and content helpers.

Exports · 50

CanonicalClassNameOptions

TypeScript
export interface CanonicalClassNameOptions {    preferStaticUtilities?: boolean;    preferPropertyAliases?: boolean;    preferCompositionUtilities?: boolean;    preferConditionOrder?: boolean;}

createMasterCSSLintDiagnostics

TypeScript
export declare function createMasterCSSLintDiagnostics(  diagnostics: readonly MasterCSSLintDiagnosticInput[],  severity?: MasterCSSLintDiagnosticSeverity): readonly MasterCSSLintDiagnostic[];

defaultCanonicalClassNameOptions

TypeScript
declare const defaultCanonicalClassNameOptions: Readonly<Required<CanonicalClassNameOptions>>;

defaultClassLintSettings

TypeScript
declare const defaultClassLintSettings: Readonly<{    classAttributes: readonly string[];    classFunctions: readonly string[];    classDeclarations: readonly string[];    ignoredKeys: readonly string[];}>;

defaultMasterCSSLintRules

TypeScript
declare const defaultMasterCSSLintRules: Readonly<Record<MasterCSSLintRuleId, boolean>>;

fixMasterCSSContent

TypeScript
export declare function fixMasterCSSContent(  options: MasterCSSFixContentOptions): string;

lintClassNames

TypeScript
export declare function lintClassNames(classNames: readonly string[], options: {    readonly manifest: MasterCSSManifest;    readonly binding?: MasterCSSBinding;}): Promise<MasterCSSLintAnalysis>;

lintMasterCSSContent

TypeScript
export declare function lintMasterCSSContent(  options: MasterCSSLintContentOptions): MasterCSSLintFileResult;

MasterCSSCanonicalClassesReportOptions

TypeScript
export interface MasterCSSCanonicalClassesReportOptions extends MasterCSSLintReportOptions, CanonicalClassNameOptions {}

MasterCSSClassListEditOptions

TypeScript
export interface MasterCSSClassListEditOptions {    unescape?: string | false;}

MasterCSSClassListLintReportOptions

TypeScript
export interface MasterCSSClassListLintReportOptions extends MasterCSSInvalidClassesReportOptions, RawValuePolicyOptions, CanonicalClassNameOptions {    rules?: Partial<Record<MasterCSSLintRuleId, boolean>>;    severities?: Partial<Record<MasterCSSLintRuleId, MasterCSSLintDiagnosticSeverity>>;}

MasterCSSFixContentOptions

TypeScript
export type MasterCSSFixContentOptions = MasterCSSLintContentOptions;

MasterCSSInvalidClassesReportOptions

TypeScript
export interface MasterCSSInvalidClassesReportOptions extends MasterCSSLintReportOptions {    disallowUnknownClass?: boolean;}

MasterCSSLintAnalysis

TypeScript
export interface MasterCSSLintAnalysis {    readonly version: 2;    readonly sortedClassNames: readonly string[];    readonly conflicts: readonly MasterCSSLintClassConflict[];    readonly partialConflicts: readonly MasterCSSLintPartialClassConflict[];}

MasterCSSLintCanonicalClassGroupSuggestion

TypeScript
export interface MasterCSSLintCanonicalClassGroupSuggestion {    readonly classNames: readonly string[];    readonly recommended: string;}

MasterCSSLintCanonicalClassSuggestion

TypeScript
export interface MasterCSSLintCanonicalClassSuggestion {    readonly className: string;    readonly recommended: string;}

MasterCSSLintClassConflict

TypeScript
export interface MasterCSSLintClassConflict {    readonly className: string;    readonly conflicts: readonly string[];}

MasterCSSLintClassListAnalysis

TypeScript
export interface MasterCSSLintClassListAnalysis {    readonly version: 2;    readonly analysis: MasterCSSLintAnalysis;    readonly diagnostics: readonly MasterCSSLintDiagnosticInput[];    readonly sortEdit?: MasterCSSLintEdit;    readonly conflictEdit?: MasterCSSLintEdit;    readonly conflictRange?: Readonly<{        start: number;        end: number;    }>;}

MasterCSSLintClassListOptions

TypeScript
export interface MasterCSSLintClassListOptions {    readonly disallowUnknownClass?: boolean;    readonly rawValuePolicy?: RawValuePolicyOptions;    readonly canonicalOptions?: CanonicalClassNameOptions;}

MasterCSSLintContentOptions

TypeScript
export interface MasterCSSLintContentOptions {    content: string;    filePath: string;    rules?: Partial<Record<MasterCSSLintRuleId, boolean>>;    ruleOptions?: MasterCSSLintContentRuleOptions;    severities?: Partial<Record<MasterCSSLintRuleId, MasterCSSLintDiagnosticSeverity>>;    lintSession: Pick<MasterCSSToolingSession, 'analyzeLintClassList' | 'analyzeLintDocument' | 'tokenizeClassList'>;}

MasterCSSLintContentRuleOptions

TypeScript
export interface MasterCSSLintContentRuleOptions {    'no-invalid-classes'?: MasterCSSInvalidClassesReportOptions;    'prefer-canonical-classes'?: MasterCSSCanonicalClassesReportOptions;    'no-unapproved-raw-values'?: MasterCSSUnapprovedRawValueClassesReportOptions;}

MasterCSSLintDiagnostic

TypeScript
export interface MasterCSSLintDiagnostic {    ruleId: MasterCSSLintRuleId;    code: string;    message: string;    severity: MasterCSSLintDiagnosticSeverity;    range: MasterCSSLintRange;    data?: MasterCSSLintDiagnosticData;    fix?: MasterCSSLintFix;}

MasterCSSLintDiagnosticData

TypeScript
export type MasterCSSLintDiagnosticData = Record<string, string | number | boolean | string[] | null | undefined>;

MasterCSSLintDiagnosticInput

TypeScript
export interface MasterCSSLintDiagnosticInput {    readonly ruleId: MasterCSSLintRuleId;    readonly code: string;    readonly message: string;    readonly range: Readonly<{        start: number;        end: number;    }>;    readonly data?: MasterCSSLintDiagnosticData;    readonly fix?: MasterCSSLintEdit;}

MasterCSSLintDiagnosticSeverity

TypeScript
export type MasterCSSLintDiagnosticSeverity = 'error' | 'warning';

MasterCSSLintDiagnosticSourceKind

TypeScript
export type MasterCSSLintDiagnosticSourceKind = 'class-attribute' | 'class-expression' | 'manifest';

MasterCSSLintDocumentAnalysis

TypeScript
export interface MasterCSSLintDocumentAnalysis {    readonly diagnostics: readonly import('@master/css-binding/tooling').MasterCSSDiagnostic[];    readonly classPositions: readonly Readonly<{        range: Readonly<{            start: number;            end: number;        }>;        contextRange: Readonly<{            start: number;            end: number;        }>;        raw: string;        token: string;    }>[];}

MasterCSSLintEdit

TypeScript
export interface MasterCSSLintEdit {    readonly range: Readonly<{        start: number;        end: number;    }>;    readonly text: string;    readonly scope: 'class-list';}

MasterCSSLintFileResult

TypeScript
export interface MasterCSSLintFileResult {    filePath: string;    languageId: string;    sourceKind: MasterCSSLintFileSourceKind;    diagnostics: MasterCSSLintSourceDiagnostic[];}

MasterCSSLintFileSourceKind

TypeScript
export type MasterCSSLintFileSourceKind = 'source' | 'stylesheet' | 'manifest';

MasterCSSLintFix

TypeScript
export interface MasterCSSLintFix {    range: MasterCSSLintRange;    text: string;    scope?: 'class-list' | 'directive';}

MasterCSSLintPartialClassConflict

TypeScript
export interface MasterCSSLintPartialClassConflict {    readonly className: string;    readonly replacement: string;    readonly conflict: string;}

MasterCSSLintRange

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

MasterCSSLintRawValueCandidate

TypeScript
export interface MasterCSSLintRawValueCandidate {    readonly className: string;    readonly key: string;    readonly segments: readonly string[];    readonly properties: readonly string[];}

MasterCSSLintReport

TypeScript
export interface MasterCSSLintReport {    diagnostics: MasterCSSLintDiagnostic[];}

MasterCSSLintReportOptions

TypeScript
export interface MasterCSSLintReportOptions extends MasterCSSClassListEditOptions {    severity?: MasterCSSLintDiagnosticSeverity;}

MasterCSSLintRuleId

TypeScript
export type MasterCSSLintRuleId = 'sort-classes' | 'no-invalid-classes' | 'no-conflicting-classes' | 'prefer-canonical-classes' | 'no-unapproved-raw-values';

masterCSSLintRuleIds

TypeScript
declare const masterCSSLintRuleIds: readonly MasterCSSLintRuleId[];

MasterCSSLintSourceDiagnostic

TypeScript
export interface MasterCSSLintSourceDiagnostic {    ruleId?: MasterCSSLintRuleId | 'manifest';    code: string;    severity: MasterCSSLintDiagnosticSeverity;    message: string;    range: MasterCSSLintRange;    loc: MasterCSSLintSourceLocationRange;    source: 'Master CSS';    sourceKind: MasterCSSLintDiagnosticSourceKind;    data?: MasterCSSLintDiagnosticData;    fixes?: MasterCSSLintSourceFix[];}

MasterCSSLintSourceFix

TypeScript
export interface MasterCSSLintSourceFix {    kind: MasterCSSLintSourceFixKind;    safety: MasterCSSLintSourceFixSafety;    range: MasterCSSLintRange;    text: string;    description: string;    requiresFormatting: boolean;}

MasterCSSLintSourceFixKind

TypeScript
export type MasterCSSLintSourceFixKind = 'class-list';

MasterCSSLintSourceFixSafety

TypeScript
export type MasterCSSLintSourceFixSafety = 'safe';

MasterCSSLintSourceLocation

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

MasterCSSLintSourceLocationRange

TypeScript
export interface MasterCSSLintSourceLocationRange {    start: MasterCSSLintSourceLocation;    end: MasterCSSLintSourceLocation;}

MasterCSSLintSummary

TypeScript
export interface MasterCSSLintSummary {    files: number;    diagnostics: number;    errors: number;    warnings: number;    fixable: number;    safeFixes: number;}

MasterCSSLintToken

TypeScript
export interface MasterCSSLintToken {    readonly range: Readonly<{        start: number;        end: number;    }>;    readonly raw: string;    readonly token: string;}

MasterCSSUnapprovedRawValueClassesReportOptions

TypeScript
export interface MasterCSSUnapprovedRawValueClassesReportOptions extends MasterCSSLintReportOptions, RawValuePolicyOptions {}

RawValuePolicyOptions

TypeScript
export interface RawValuePolicyOptions {    allowRawValues?: boolean;    allowProperties?: readonly string[];    allowedPatterns?: readonly string[];}

resolveMasterCSSLintRules

TypeScript
export declare function resolveMasterCSSLintRules(  option: string | undefined): Record<MasterCSSLintRuleId, boolean>;

summarizeMasterCSSLintFiles

TypeScript
export declare function summarizeMasterCSSLintFiles(  files: MasterCSSLintFileResult[]): MasterCSSLintSummary;

@master/css-tooling/lint/node

Synchronous native class linting.

lintClassNamesSync

TypeScript
export declare function lintClassNamesSync(classNames: readonly string[], options: {    readonly manifest: MasterCSSManifest;}): import("./analysis").MasterCSSLintAnalysis;

@master/css-tooling/language

Editor-neutral analysis, completions, colors and semantic tokens.

Exports · 52

analyzeDocument

TypeScript
export declare function analyzeDocument(  request: MasterCSSDocumentAnalysisRequest,  options: {    readonly manifest: MasterCSSManifest;    readonly binding?: MasterCSSBinding;}): Promise<MasterCSSDocumentAnalysis>;

AT_SIGN

TypeScript
declare const AT_SIGN: "@";

AT_TRIGGER_CHARACTER

TypeScript
declare const AT_TRIGGER_CHARACTER: "@";

CLASS_ATTRIBUTES

TypeScript
declare const CLASS_ATTRIBUTES: string[];

CLASS_DECLARATIONS

TypeScript
declare const CLASS_DECLARATIONS: string[];

CLASS_FUNCTIONS

TypeScript
declare const CLASS_FUNCTIONS: string[];

createLanguageSession

Create a reusable language-only session using a native or Wasm binding. Results are immutable snapshots. Dispose the session when its owner is finished.

TypeScript
export declare function createLanguageSession(options: {    readonly manifest: MasterCSSManifest;    readonly binding?: MasterCSSBinding;}): Promise<LanguageSession>;

DECLARATION_SEPARATOR_TRIGGER_CHARACTER

TypeScript
declare const DECLARATION_SEPARATOR_TRIGGER_CHARACTER: ";";

DELIMITER_SIGN

TypeScript
declare const DELIMITER_SIGN: "|";

formatDirectives

TypeScript
export declare function formatDirectives(  request: MasterCSSFormatDirectivesRequest,  options: {    readonly manifest: MasterCSSManifest;    readonly binding?: MasterCSSBinding;}): Promise<MasterCSSFormatDirectivesResult>;

getMasterCSSSemanticTokenScopeKeys

TypeScript
export declare function getMasterCSSSemanticTokenScopeKeys(  type: SemanticTokenType,  modifiers?: SemanticTokenModifier[]): ("string" | "number" | "function" | "type" | "property" | "class" | "enumMember" | "variable" | "keyword" | "modifier" | "operator" | "class.component" | "class.declaration" | "class.selector" | "enumMember.directive" | "enumMember.query" | "enumMember.unit" | "property.directive" | "property.query" | "variable.directive" | "variable.selector" | "number.query" | "string.quoted" | "keyword.directive" | "keyword.query" | "modifier.directive" | "modifier.pseudoClass" | "modifier.pseudoElement" | "operator.directive" | "operator.blockBrace" | "operator.declarationSeparator" | "operator.declarationTerminator" | "operator.directiveTerminator" | "operator.functionPunctuation" | "operator.important" | "operator.pseudoClass" | "operator.pseudoClassDelimiter" | "operator.pseudoElement" | "operator.pseudoElementDelimiter" | "operator.query" | "operator.queryOperator" | "operator.queryPunctuation" | "operator.selector" | "operator.selectorCombinator" | "operator.selectorPunctuation" | "operator.unit" | "operator.valueOperator" | "operator.valueSeparator" | "type.selector")[];

GROUP_TRIGGER_CHARACTER

TypeScript
declare const GROUP_TRIGGER_CHARACTER: "{";

HighlightTokenRole

TypeScript
export type HighlightTokenRole = 'block.brace' | 'declaration.property' | 'declaration.separator' | 'declaration.terminator' | 'query.keyword' | 'selector.combinator' | 'selector.pseudoClass.delimiter' | 'selector.pseudoClass.name' | 'selector.pseudoElement.delimiter' | 'selector.pseudoElement.name' | 'selector.punctuation' | 'selector.type' | 'utility.component' | 'utility.semantic' | 'value.important' | 'value.function' | 'value.function.punctuation' | 'value.keyword' | 'value.number' | 'value.operator' | 'value.separator' | 'value.string' | 'value.unit' | 'value.variable';

inspectClassName

TypeScript
export declare function inspectClassName(className: string, options: {    readonly manifest: MasterCSSManifest;    readonly binding?: MasterCSSBinding;    readonly mode?: string;}): Promise<import("./contracts").MasterCSSLanguageInspection>;

INVOKED_TRIGGER_CHARACTERS

TypeScript
declare const INVOKED_TRIGGER_CHARACTERS: string[];

MASTER_CSS_SEMANTIC_TOKEN_SCOPE_MAP

Complete declaration · 166 lines
TypeScript
declare const MASTER_CSS_SEMANTIC_TOKEN_SCOPE_MAP: {    readonly class: [        "entity.other.attribute-name.class.css"    ];    readonly 'class.component': [        "entity.other.attribute-name.class.css"    ];    readonly 'class.declaration': [        "entity.other.attribute-name.class.css"    ];    readonly 'class.selector': [        "entity.other.attribute-name.class.css"    ];    readonly enumMember: [        "support.constant.property-value.css"    ];    readonly 'enumMember.directive': [        "support.constant.property-value.css"    ];    readonly 'enumMember.query': [        "support.constant.property-value.css"    ];    readonly 'enumMember.unit': [        "keyword.other.unit"    ];    readonly property: [        "support.type.property-name.css"    ];    readonly 'property.directive': [        "support.type.property-name.css"    ];    readonly 'property.query': [        "support.type.property-name.css"    ];    readonly variable: [        "variable.other.master-css.css",        "variable.css"    ];    readonly 'variable.directive': [        "variable.parameter.master-css.css"    ];    readonly 'variable.selector': [        "entity.other.attribute-name.id.css"    ];    readonly function: [        "support.function.misc.css"    ];    readonly number: [        "constant.numeric.css"    ];    readonly 'number.query': [        "constant.numeric.css"    ];    readonly string: [        "string.quoted.css",        "string.quoted.html"    ];    readonly 'string.quoted': [        "string.quoted.css",        "string.quoted.html"    ];    readonly keyword: [        "keyword.control.at-rule"    ];    readonly 'keyword.directive': [        "keyword.control.at-rule.master-css.css"    ];    readonly 'keyword.query': [        "keyword.control.at-rule"    ];    readonly modifier: [        "entity.other.attribute-name.pseudo-class.css"    ];    readonly 'modifier.directive': [        "storage.modifier.master-css.css"    ];    readonly 'modifier.pseudoClass': [        "entity.other.attribute-name.pseudo-class.css"    ];    readonly 'modifier.pseudoElement': [        "entity.other.attribute-name.pseudo-element.css"    ];    readonly operator: [        "keyword.operator.css"    ];    readonly 'operator.directive': [        "punctuation.section.property-list.begin.bracket.curly.css"    ];    readonly 'operator.blockBrace': [        "punctuation.section.property-list.begin.bracket.curly.css",        "punctuation.section.property-list.end.bracket.curly.css"    ];    readonly 'operator.declarationSeparator': [        "punctuation.separator.key-value.css"    ];    readonly 'operator.declarationTerminator': [        "punctuation.terminator.rule.css"    ];    readonly 'operator.directiveTerminator': [        "punctuation.terminator.rule.css"    ];    readonly 'operator.functionPunctuation': [        "punctuation.section.function.begin.bracket.round.css",        "punctuation.section.function.end.bracket.round.css"    ];    readonly 'operator.important': [        "keyword.other.important.css",        "keyword.operator.important.css"    ];    readonly 'operator.pseudoClass': [        "entity.other.attribute-name.pseudo-class.css"    ];    readonly 'operator.pseudoClassDelimiter': [        "punctuation.definition.entity.css"    ];    readonly 'operator.pseudoElement': [        "entity.other.attribute-name.pseudo-element.css"    ];    readonly 'operator.pseudoElementDelimiter': [        "punctuation.definition.entity.css"    ];    readonly 'operator.query': [        "keyword.operator.css"    ];    readonly 'operator.queryOperator': [        "keyword.operator.comparison.css",        "keyword.operator.css"    ];    readonly 'operator.queryPunctuation': [        "punctuation.separator.list.comma.css",        "punctuation.separator.key-value.css",        "punctuation.definition.parameters.begin.bracket.round.css",        "punctuation.definition.parameters.end.bracket.round.css",        "punctuation.section.function.begin.bracket.round.css",        "punctuation.section.function.end.bracket.round.css"    ];    readonly 'operator.selector': [        "keyword.operator.combinator.css"    ];    readonly 'operator.selectorCombinator': [        "keyword.operator.combinator.css"    ];    readonly 'operator.selectorPunctuation': [        "punctuation.separator.list.comma.css",        "punctuation.definition.entity.css",        "punctuation.section.function.begin.bracket.round.css",        "punctuation.section.function.end.bracket.round.css",        "punctuation.definition.entity.begin.bracket.square.css",        "punctuation.definition.entity.end.bracket.square.css"    ];    readonly 'operator.unit': [        "keyword.operator.css"    ];    readonly 'operator.valueOperator': [        "keyword.operator.css"    ];    readonly 'operator.valueSeparator': [        "punctuation.separator.list.comma.css"    ];    readonly type: [        "entity.name.tag.css"    ];    readonly 'type.selector': [        "entity.name.tag.css"    ];};

MasterCSSDocumentAnalysis

TypeScript
export interface MasterCSSDocumentAnalysis {    readonly version: 4;    readonly classPositions: readonly MasterCSSLanguageClassPosition[];    readonly diagnostics: readonly import('@master/css-binding/tooling').MasterCSSDiagnostic[];    readonly semanticTokens: readonly SemanticTokenItem[];    readonly semanticTokenData: readonly number[];}

MasterCSSDocumentAnalysisRequest

TypeScript
export interface MasterCSSDocumentAnalysisRequest {    readonly source: string;    readonly languageId: string;    readonly hostRanges?: readonly MasterCSSLanguageClassListContext[];    readonly settings?: Readonly<{        classAttributes?: readonly string[];        classFunctions?: readonly string[];        classDeclarations?: readonly string[];    }>;}

MasterCSSFormatDirectivesRequest

TypeScript
export interface MasterCSSFormatDirectivesRequest {    readonly source: string;    readonly range?: Readonly<{        start: number;        end: number;    }>;    readonly styleRanges?: readonly Readonly<{        start: number;        end: number;    }>[];}

MasterCSSFormatDirectivesResult

TypeScript
export interface MasterCSSFormatDirectivesResult {    readonly version: 4;    readonly edits: readonly Readonly<{        range: Readonly<{            start: number;            end: number;        }>;        text: string;    }>[];}

MasterCSSLanguageClass

TypeScript
export interface MasterCSSLanguageClass {    readonly className: string;    readonly kind: MasterCSSLanguageClassKind;    readonly matcherTypes: readonly ('static' | 'pattern' | 'key' | 'token')[];    readonly keyToken?: string;    readonly valueToken?: string;    readonly stateToken?: string;    readonly important: boolean;}

MasterCSSLanguageClassifications

TypeScript
export interface MasterCSSLanguageClassifications {    readonly version: 4;    readonly variableNames: readonly string[];    readonly classes: readonly MasterCSSLanguageClass[];}

MasterCSSLanguageClassKind

TypeScript
export type MasterCSSLanguageClassKind = 'unknown' | 'component' | 'semantic' | 'pattern' | 'declaration' | 'token';

MasterCSSLanguageClassListContext

TypeScript
export interface MasterCSSLanguageClassListContext {    readonly start: number;    readonly end: number;    readonly unescape?: readonly string[];}

MasterCSSLanguageClassPosition

TypeScript
export interface MasterCSSLanguageClassPosition {    readonly range: Readonly<{        start: number;        end: number;    }>;    readonly contextRange: Readonly<{        start: number;        end: number;    }>;    readonly raw: string;    readonly token: string;}

MasterCSSLanguageClassVariable

TypeScript
export interface MasterCSSLanguageClassVariable {    readonly key: string;    readonly variable: MasterCSSLanguageVariable;}

MasterCSSLanguageColorCandidate

TypeScript
export interface MasterCSSLanguageColorCandidate {    readonly className: string;    readonly start: number;}

MasterCSSLanguageColorExpression

TypeScript
export type MasterCSSLanguageColorExpression = Readonly<{    kind: 'literal';    value: string;    alpha?: number;}> | Readonly<{    kind: 'mix';    space: string;    hue?: string;    left: MasterCSSLanguageColorExpression;    right: MasterCSSLanguageColorExpression;    progress: number;    alphaMultiplier: number;}>;

MasterCSSLanguageColorFormat

TypeScript
export interface MasterCSSLanguageColorFormat {    readonly syntax: string;    readonly space?: string;}

MasterCSSLanguageColorPresentation

TypeScript
export interface MasterCSSLanguageColorPresentation {    readonly version: 4;    readonly editable: boolean;    readonly replacementPrefix?: string;    readonly colorToken: string;    readonly sourceFormat?: MasterCSSLanguageColorFormat;}

MasterCSSLanguageColorToken

TypeScript
export interface MasterCSSLanguageColorToken {    readonly range: Readonly<{        start: number;        end: number;    }>;    readonly expression: MasterCSSLanguageColorExpression;}

MasterCSSLanguageColorTokens

TypeScript
export interface MasterCSSLanguageColorTokens {    readonly version: 4;    readonly tokens: readonly MasterCSSLanguageColorToken[];}

MasterCSSLanguageCompletionEntry

TypeScript
export interface MasterCSSLanguageCompletionEntry {    readonly label: string;    readonly kind: MasterCSSLanguageCompletionKind;    readonly detail?: string;    readonly documentationText?: string;    readonly sortText?: string;    readonly triggerSuggest: boolean;}

MasterCSSLanguageCompletionIndex

TypeScript
export interface MasterCSSLanguageCompletionIndex {    readonly version: 4;    readonly classEntries: readonly MasterCSSLanguageCompletionEntry[];}

MasterCSSLanguageCompletionKind

TypeScript
export type MasterCSSLanguageCompletionKind = 'property' | 'value' | 'function';

MasterCSSLanguageInspection

TypeScript
export interface MasterCSSLanguageInspection {    readonly version: 4;    readonly className: string;    readonly matchStatus: BindingInspection['matchStatus'];    readonly declarations: readonly import('../value-validation').DeclarationValidation[];    readonly checks: readonly (typeof import('../value-validation').CSS_VALUE_CHECK | typeof import('../syntax-validation').CSS_SYNTAX_CHECK)[];    readonly cssSyntaxStatus: BindingInspection['cssSyntaxStatus'];    readonly cssValueStatus: BindingInspection['cssValueStatus'];    readonly browserSupport: BindingInspection['browserSupport'];    readonly kind: MasterCSSLanguageClassKind;    readonly base: string;    readonly suffix: string;    readonly key?: string;    readonly value?: string;    readonly keyToken?: string;    readonly valueToken?: string;    readonly stateToken?: string;    readonly important: boolean;    readonly matcherTypes: readonly ('static' | 'pattern' | 'key' | 'token')[];    readonly variables: readonly MasterCSSLanguageClassVariable[];    readonly rules: readonly MasterCSSHydrationRule[];    readonly diagnostics?: BindingInspection['diagnostics'];    readonly text: string;}

MasterCSSLanguageSession

TypeScript
export interface LanguageSession extends Disposable {    readonly binding: 'native' | 'wasm';    analyzeDocument(      request: MasterCSSDocumentAnalysisRequest    ): MasterCSSDocumentAnalysis;    formatDirectives(      request: MasterCSSFormatDirectivesRequest    ): MasterCSSFormatDirectivesResult;    classifyClassNames(classNames: readonly string[]): MasterCSSLanguageClassifications;    inspectClassName(className: string, mode?: string): MasterCSSLanguageInspection;    completionIndex(): MasterCSSLanguageCompletionIndex;    colorPresentation(colorToken: string): MasterCSSLanguageColorPresentation;    colorTokens(      candidates: readonly MasterCSSLanguageColorCandidate[]    ): MasterCSSLanguageColorTokens;    dispose(): void;}export { LanguageSession as MasterCSSLanguageSession };

MasterCSSLanguageVariable

TypeScript
export interface MasterCSSLanguageVariable {    readonly namespace?: string;    readonly name: string;    readonly key: string;    readonly type: string;    readonly value?: string | number;    readonly numeric?: MasterCSSManifestVariableNumericValue;    readonly modes?: MasterCSSManifestVariable['modes'];    readonly dependencies?: readonly string[];    readonly inline?: boolean;    readonly static?: boolean;}

matchesLanguageServiceNativeDeclaration

TypeScript
export declare function matchesLanguageServiceNativeDeclaration({ property }: {    property: string;}): boolean;

QUERY_COMPARISON_OPERATORS

TypeScript
declare const QUERY_COMPARISON_OPERATORS: string[];

QUERY_LOGICAL_OPERATORS

TypeScript
declare const QUERY_LOGICAL_OPERATORS: string[];

QUERY_TRIGGER_CHARACTERS

TypeScript
declare const QUERY_TRIGGER_CHARACTERS: string[];

SELECTOR_SIGNS

TypeScript
declare const SELECTOR_SIGNS: string[];

SELECTOR_TRIGGER_CHARACTERS

TypeScript
declare const SELECTOR_TRIGGER_CHARACTERS: string[];

SEMANTIC_TOKEN_MODIFIERS

TypeScript
declare const SEMANTIC_TOKEN_MODIFIERS: readonly [    "declaration",    "defaultLibrary",    "component",    "directive",    "important",    "pseudoClass",    "pseudoElement",    "query",    "quoted",    "selector",    "unit",    "blockBrace",    "declarationSeparator",    "declarationTerminator",    "directiveTerminator",    "functionPunctuation",    "valueSeparator",    "valueOperator",    "queryOperator",    "queryPunctuation",    "selectorCombinator",    "selectorPunctuation",    "pseudoClassDelimiter",    "pseudoElementDelimiter"];

SEMANTIC_TOKEN_TYPES

TypeScript
declare const SEMANTIC_TOKEN_TYPES: readonly [    "class",    "enumMember",    "property",    "variable",    "function",    "number",    "string",    "keyword",    "modifier",    "operator",    "type"];

SEMANTIC_TOKENS_LEGEND

TypeScript
declare const SEMANTIC_TOKENS_LEGEND: {    tokenTypes: ("string" | "number" | "function" | "type" | "property" | "class" | "enumMember" | "variable" | "keyword" | "modifier" | "operator")[];    tokenModifiers: ("declaration" | "defaultLibrary" | "component" | "directive" | "important" | "pseudoClass" | "pseudoElement" | "query" | "quoted" | "selector" | "unit" | "blockBrace" | "declarationSeparator" | "declarationTerminator" | "directiveTerminator" | "functionPunctuation" | "valueSeparator" | "valueOperator" | "queryOperator" | "queryPunctuation" | "selectorCombinator" | "selectorPunctuation" | "pseudoClassDelimiter" | "pseudoElementDelimiter")[];};

SemanticTokenItem

TypeScript
export interface SemanticTokenItem {    start: number;    end: number;    type: SemanticTokenType;    modifiers?: SemanticTokenModifier[];}

SemanticTokenModifier

TypeScript
export type SemanticTokenModifier = typeof SEMANTIC_TOKEN_MODIFIERS[number];

SemanticTokenType

TypeScript
export type SemanticTokenType = typeof SEMANTIC_TOKEN_TYPES[number];

SEPARATOR_SIGN

TypeScript
declare const SEPARATOR_SIGN: ",";

VALUE_TRIGGER_CHARACTERS

TypeScript
declare const VALUE_TRIGGER_CHARACTERS: string[];

@master/css-tooling/language/node

Synchronous native language sessions and analysis.

analyzeDocumentSync

TypeScript
export declare function analyzeDocumentSync(  request: MasterCSSDocumentAnalysisRequest,  options: {    readonly manifest: MasterCSSManifest;}): MasterCSSDocumentAnalysis;

createLanguageSessionSync

Create a reusable native language-only session synchronously. Results are immutable snapshots. Dispose the session when its owner is finished.

TypeScript
export declare function createLanguageSessionSync(options: {    readonly manifest: MasterCSSManifest;}): LanguageSession;

formatDirectivesSync

TypeScript
export declare function formatDirectivesSync(  request: MasterCSSFormatDirectivesRequest,  options: {    readonly manifest: MasterCSSManifest;}): MasterCSSFormatDirectivesResult;

inspectClassNameSync

TypeScript
export declare function inspectClassNameSync(className: string, options: {    readonly manifest: MasterCSSManifest;    readonly mode?: string;}): import("./contracts").MasterCSSLanguageInspection;

MasterCSSLanguageSession

TypeScript
export interface LanguageSession extends Disposable {    readonly binding: 'native' | 'wasm';    analyzeDocument(      request: MasterCSSDocumentAnalysisRequest    ): MasterCSSDocumentAnalysis;    formatDirectives(      request: MasterCSSFormatDirectivesRequest    ): MasterCSSFormatDirectivesResult;    classifyClassNames(classNames: readonly string[]): MasterCSSLanguageClassifications;    inspectClassName(className: string, mode?: string): MasterCSSLanguageInspection;    completionIndex(): MasterCSSLanguageCompletionIndex;    colorPresentation(colorToken: string): MasterCSSLanguageColorPresentation;    colorTokens(      candidates: readonly MasterCSSLanguageColorCandidate[]    ): MasterCSSLanguageColorTokens;    dispose(): void;}export { LanguageSession as MasterCSSLanguageSession };

Using this contract

Supply the project manifest when creating sessions or calling semantic helpers. Reuse sessions for repeated analysis, then dispose them. Node subpaths expose synchronous native operations; filesystem scanning has its own asynchronous lifecycle.


© 2026 Aoyue Design LLC.MIT License
Trademark Policy