/* auto-generated by NAPI-RS */ /* eslint-disable */ /** * Which binding artifact the generated loader actually loaded: `'native'` for * a native addon, otherwise the `platformArchABI` of the WASI flavor. Every * flavor napi-rs can build is listed, because `NAPI_RS_NATIVE_LIBRARY_PATH` * can point the loader at a WASI artifact this package does not build itself. */ export declare const __napiBindingTarget: 'native' | 'wasm32-wasi' | 'wasm32-wasip1' export declare class NativeCacheState { constructor(enabled: boolean, driver: string, context?: string | undefined | null) configure(enabled: boolean, context?: string | undefined | null): void normalizeIndex(payload: string): string prepareWrite(values: Array, parsed: string | undefined | null, now: string): string read(parsed?: string | undefined | null): string rememberReadMeta(meta: string): void getLastReadMeta(): string prepareClear(scope: string, parsed: string | undefined | null, now: string): string snapshot(parsed?: string | undefined | null): string | null } export declare class NativeContext { constructor() reset(replacements: Array, preserved: Array): void update(replacements: Array): void setPreserved(preserved: Array): void transformJs(source: string, preserveFunctions: Array, splitQuote: boolean): TransformResult transformCss(source: string, ignoreVueScoped: boolean): TransformResult transformHtml(source: string): TransformResult transformSelector(source: string, ignoreVueScoped: boolean): SelectorResult transformText(source: string, splitQuote: boolean): TransformResult } export declare class NativeRawCandidateCache { constructor(limit: number) get(key: string, fingerprint: string): RawCandidateCacheEntry | null set(key: string, fingerprint: string, candidates: Array): void } export interface BareSelectorAlias { canonical: string candidate: string } export declare function buildLineOffsetsNative(content: string): Array /** * A compact visitor-order callback plan, never an AST. The normal transform * remains a single native call; this plan is only used for live JS callbacks. */ export interface CallbackEvent { kind: string raw: string values: Array start: number end: number mode: string loneSurrogates: boolean } export interface CallbackPlan { events: Array valid: boolean } export declare function collectWorkspaceConfigFilesNative(root: string, maxDepth: number, names: Array): Promise export interface ConfigSourceMigrationResult { changed: boolean code: string changes: Array } export declare function createJsStringStaticRangesNative(content: string): Array export declare function createRawCandidateFileFingerprintNative(files: Array): Promise /** * Locate actual CSS source-map comments without confusing strings or URLs for * annotations. The host adapter loads and composes the referenced third-party map. */ export declare function cssSourceMapAnnotationsNative(source: string): Array export declare function dedupeCandidatesNative(candidates: Array): Array export declare function defaultClassNameNative(index: number, prefix: string): string export declare function defaultMangleClassFilterNative(value: string): boolean export interface Edit { start: number end: number content: string } export interface EngineSourceSegment { content: string start: number extension: string } export declare function escapeCssClassNameNative(value: string): string export declare function escapeJsStringNative(value: string): string /** * Apply choices captured at each JS callback, in their original order. Repeated * candidates and callbacks which mutate later mappings retain legacy behavior. */ export declare function executeLiteralNative(event: CallbackEvent, replacements: Array): Edit | null export declare function expandSourceEntryBracesNative(sources: Array): Array export declare function explainCacheContextMismatchNative(current: string, cached: string): Array export declare function extractBareArbitraryCandidatesNative(content: string, units: Array): Array export declare function extractCssApplySegmentsNative(source: string): Array export declare function extractInlineSourceCandidatesNative(css: string): InlineSourceCandidates export interface ExtractionCandidate { rawCandidate: string start: number end: number } export interface ExtractionJoinedSegments { content: string segments: Array } export interface ExtractionLineMeta { line: number column: number lineText: string } export interface ExtractionRange { start: number end: number } export interface ExtractionRemappedCandidate { rawCandidate: string start: number end: number localStart: number } export interface ExtractionSegment { content: string start: number joinedStart?: number } export declare function extractSfcSourceSegmentsNative(source: string): SfcSourceSegments export declare function filterMigrationTargetIndexesNative(files: Array, include: Array, exclude: Array): Array export declare function filterSourceCandidateIndexesNative(content: string, extension: string, candidates: Array, skipHtmlContextChecks?: boolean | undefined | null, ranges?: Array | undefined | null): Array export declare function findAttributeValueStartNative(source: string, value: string): number export declare function groupSourceEntriesNative(sources: Array): Array export declare function hashStableCacheValueNative(tree: string): string export interface InlineSourceCandidates { included: Array excluded: Array } export declare function inspectLengthUnitsNative(source: string, variableName: string, units: Array): LengthUnitsInspection export declare function joinSourceSegmentsNative(segments: Array): ExtractionJoinedSegments export interface LengthUnitsInspection { found: boolean missingUnits: Array } export interface LengthUnitsPatchResult { code: string changed: boolean matched: boolean } export declare function mergeSourceEntriesNative(sources: Array): Array export declare function migrateConfigSourceNative(source: string): ConfigSourceMigrationResult export interface NativeSourceGroup { base: string entries: Array } export interface NativeSourcePattern { base: string pattern: string negated: boolean } export interface NativeStaticGlobPrefix { prefix: Array rest: Array } export declare function normalizeGlobPatternNative(pattern: string): string export declare function patchLengthUnitsNative(source: string, units: Array, variableName?: string | undefined | null): LengthUnitsPatchResult export declare function patchPostcssPluginNative(source: string, refProperty: string, version: number): PatchResult export interface PatchResult { code: string hasPatched: boolean matched: boolean } export declare function patchReturnContextNative(source: string): PatchResult export declare function planHtmlNative(source: string): CallbackPlan export declare function planJsNative(source: string, splitQuote: boolean): CallbackPlan export declare function planTextNative(source: string, splitQuote: boolean): CallbackPlan export interface RawCandidateCacheEntry { fingerprint: string candidates: Array } export declare function remapSourceCandidatesNative(segments: Array, candidates: Array): Array export declare function replaceBareArbitrarySelectorsNative(source: string, values: Array): string export interface Replacement { original: string replacement: string } export declare function resolveBareArbitraryCandidatesNative(candidates: Array, units: Array): Array export declare function resolveLineMetaNative(content: string, offsets: Array, index: number): ExtractionLineMeta export declare function resolveLineMetasNative(content: string, positions: Array): Array export declare function restoreConfigEntriesNative(entries: Array, dryRun: boolean): Promise export interface RestoreEntry { file?: string backupFile?: string } export interface RestoreResult { scannedEntries: number restorableEntries: number restoredFiles: number missingBackups: number skippedEntries: number restored: Array } export interface RestoreWrite { file: string source: string } export declare function rollbackMigrationWritesNative(entries: Array): Promise export interface SelectorResult { code: string preserveCount: number valid: boolean } export interface SfcSourceSegments { html: Array bound: Array scripts: Array styles: Array templates: Array } export declare function splitCandidateTokensNative(code: string): Array export declare function splitCodeNative(source: string, splitQuote: boolean): Array export declare function splitStaticGlobPrefixNative(pattern: string): NativeStaticGlobPrefix export declare function stripCompiledSourceEntriesNative(source: string): StrippedSourceEntries export declare function stripEscapeSequenceNative(value: string): string export interface StrippedSourceEntries { css: string changed: boolean } export interface TransformResult { edits: Array used: Array preserved: Array valid: boolean } export declare function uniqueStringsNative(values: Array): Array export declare function writeMigrationFileNative(file: string, source: string, code: string, backup?: string | undefined | null): Promise