import { type Diagnostic } from "./diagnostics/types.js"; import type { DomainSchema } from "./generator/ir.js"; import type { ProgramNode } from "./parser/ast.js"; import type { LocalTargetKey } from "./annotations.js"; export interface SourcePoint { readonly line: number; readonly column: number; readonly offset?: number; } export interface SourceSpan { readonly start: SourcePoint; readonly end: SourcePoint; } export type SourceMapPath = { readonly kind: "domain"; readonly domain: { readonly name: string; }; } | { readonly kind: "type"; readonly type: { readonly name: string; }; } | { readonly kind: "type_field"; readonly type: { readonly name: string; }; readonly field: { readonly name: string; }; } | { readonly kind: "state_field"; readonly field: { readonly name: string; }; } | { readonly kind: "computed"; readonly computed: { readonly name: string; }; } | { readonly kind: "action"; readonly action: { readonly name: string; }; }; export interface SourceMapEntry { readonly target: SourceMapPath; readonly span: SourceSpan; } export interface SourceMapIndex { readonly schemaHash: string; readonly sourceHash: string; readonly format: "manifesto/source-map-v1"; readonly coordinateUnit: "utf16" | "bytes"; readonly emissionFingerprint: string; readonly entries: Record; } export interface SourceMapEmissionContext { readonly coordinateUnit: "utf16" | "bytes"; readonly compilerVersion: string; readonly emissionOptionsFingerprint: string; } export interface SourceMapExtractionResult { readonly sourceMap: SourceMapIndex; readonly diagnostics: Diagnostic[]; } export declare function createDefaultSourceMapEmissionContext(compilerVersion: string): SourceMapEmissionContext; export declare function extractSourceMap(program: ProgramNode, sourceText: string, schema: DomainSchema, ctx: SourceMapEmissionContext): SourceMapExtractionResult; export declare function stableHashString(input: string): string;