import type { PhaseData } from '../../convex-hull/types'; import type { ElementSymbol } from '../../element'; import { type Vec2 } from '../../math'; import type { Decomposition, DiagramPhase, DiagramProgress, IsothermalSection, PhaseFreeEnergy, Reaction, TernaryPhaseDiagram, TernaryPhaseDiagramOptions } from './types'; export declare const DEFAULT_N_SAMPLES = 64; export declare const DEFAULT_EVENT_TOLERANCE = 0.5; export interface DiagramModel { elements: [ElementSymbol, ElementSymbol, ElementSymbol]; phases: DiagramPhase[]; free_energies: PhaseFreeEnergy[]; in_hull: boolean[]; t_range: Vec2; } export declare function prepare_diagram(entries: PhaseData[], options?: TernaryPhaseDiagramOptions): DiagramModel; export interface FacetAssignment { facets: number[][]; facet_of: Int32Array; weights: Float64Array; } export declare function decompose_composition(model: Pick, section: Pick, xy: Vec2): Decomposition | null; export declare function decompose_phase(model: Pick, section: IsothermalSection, phase: number): Decomposition | null; export declare const compute_section: (model: DiagramModel, temperature: number) => IsothermalSection; export declare function create_section_evaluator(model: DiagramModel, { events, sections, temperatures }: TernaryPhaseDiagram): { section_at(temperature: number): IsothermalSection; }; export declare function compute_ternary_phase_diagram(entries: PhaseData[], options?: TernaryPhaseDiagramOptions, on_progress?: (progress: DiagramProgress) => void): TernaryPhaseDiagram; export declare function reaction_phase_label(diagram: Pick, reaction: Reaction, phase: number): string; export declare const format_reaction_coeff: (coeff: number) => string; export declare function format_reaction(diagram: Pick, reaction: Reaction): string;