import { Position } from 'vscode-languageserver-protocol'; import type { DocumentUri } from 'vscode-languageserver-textdocument'; export declare function getCurrentDirFromUri(uri: DocumentUri): string; export type CamelCaseValues = false | true | 'dashes'; export declare function genImportRegExp(importName: string): RegExp; /** * Returns absolute file path to a file where css modules is from or an empty string * * @example "/users/foo/path/to/project/styles/foo.css" */ export declare function findImportPath(fileContent: string, importName: string, directoryPath: string): string; export type StringTransformer = (str: string) => string; export declare function getTransformer(camelCaseConfig: CamelCaseValues): StringTransformer; export declare function isImportLineMatch(line: string, matches: RegExpExecArray, current: number): boolean; /** * Finds the position of the className in filePath */ export declare function getPosition(filePath: string, className: string, camelCaseConfig: CamelCaseValues): Promise; export declare function getWords(line: string, position: Position): [string, string] | null; type ClassnamePostion = { line: number; column: number; }; export type Classname = { position: ClassnamePostion; declarations: string[]; comments: string[]; }; type ClassnameDict = Record; export declare const log: (...args: unknown[]) => void; /** * input `'./path/to/styles.css'` * * output * * ```js * { * '.foo': { * declarations: [], * position: { * line: 10, * column: 5, * }, * }, * '.bar': { * declarations: ['width: 52px'], * position: { * line: 22, * column: 1, * } * } * } * ``` */ export declare function filePathToClassnameDict(filepath: string, classnameTransformer: StringTransformer): Promise; /** * Get all classnames from the file contents */ export declare function getAllClassNames(filePath: string, keyword: string, classnameTransformer: StringTransformer): Promise; export declare function stringifyClassname(classname: string, declarations: string[], comments: string[], EOL: string): string; export declare function getEOL(text: string): string; export {};