/** Decode a CSS-escaped name slice (e.g. `\\26 B` → `&B`). */ /** * Decode a CSS string literal slice to its actual character value. * `start` / `end` exclude the surrounding quote characters. * * Handles: * - hex escapes (`\26 ` → `&`) * - `\"` / `\'` / `\\` * - escaped newlines (CSS: backslash followed by newline is removed) * - any other `\` → `` */ export declare function decodeString(source: string, start: number, end: number): string; export declare function decodeName(source: string, start: number, end: number): string; export declare interface Token { type: TokenType start: number end: number } export declare class Tokenizer { source: string; offset: number; types: Uint8Array; starts: Uint32Array; ends: Uint32Array; count: number; constructor(source: string); get lineStarts(): number[]; get tokens(): Token[]; locate(offset: number): { line: number, column: number }; } /** * CSS Syntax Module Level 3 tokenizer. * * https://www.w3.org/TR/css-syntax-3/#tokenization * * Produces a flat sequence of token offsets that the parser walks. Tokens * are recorded as parallel arrays (type + offset) rather than allocations * — every other CSS lib does the same for performance. */ export declare const enum TokenType { EOF = 0, Ident = 1, Function = 2, AtKeyword = 3, Hash = 4, String = 5, BadString = 6, Url = 7, BadUrl = 8, Delim = 9, Number = 10, Percentage = 11, Dimension = 12, WhiteSpace = 13, CDO = 14, CDC = 15, Colon = 16, Semicolon = 17, Comma = 18, LeftSquareBracket = 19, RightSquareBracket = 20, LeftParenthesis = 21, RightParenthesis = 22, LeftCurlyBracket = 23, RightCurlyBracket = 24, Comment = 25, }