Node.js-specific utilities and runtime functionality for Tailwind CSS v4, providing compilation tools, module dependency analysis, source map handling, path normalization, and optimization utilities.
Utility for serializing source map inputs into raw JSON and inline comment forms, then appending inline comments to CSS output.
{"version":3,"sources":["input.css"],"names":[],"mappings":"AAAA"} as a JSON string input, returns raw equal to the input and inlineComment equal to /*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlucHV0LmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9 */. @testcomponents/button.css with content .btn { padding: 0.5rem; }), the serialized raw map JSON contains version: 3, sources: ["components/button.css"], sourcesContent: [".btn { padding: 0.5rem; }"], and a non-empty mappings string, and inlineComment encodes that raw map. @testoriginalPosition and another maps to a null source, the serialized raw map JSON includes placeholder source names starting with <unknown and empty sourcesContent entries, while still producing an inlineComment prefixed with /*# sourceMappingURL=data:application/json;base64,. @test.btn { display: flex; } using the string map input produces output ending with exactly one newline plus the inline comment, leaving the original CSS unchanged otherwise. @test@generates
export type MapInput = string | DecodedMap;
export interface DecodedMap {
mappings: Array<{
generatedPosition: { line: number; column: number };
originalPosition?: {
line: number;
column: number;
source: SourceFile | null;
};
name?: string;
}>;
}
export interface SourceFile {
url: string;
content: string;
}
export interface SerializedMap {
raw: string;
inlineComment: string;
}
/**
* Serializes provided map input into raw JSON and inline comment form.
*/
export function serializeMap(input: MapInput): SerializedMap;
/**
* Returns the provided CSS with an inline source map comment appended.
*/
export function attachInlineMap(css: string, map: MapInput): string;Provides source map serialization utilities.
@satisfied-by
tessl i tessl/npm-tailwindcss--node@4.1.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10