import type { CompositionType } from '../composition'; import type { ElementSymbol } from '../element'; import type { Point2D, Point3D, Vec2, Vec3 } from '../math'; import type { Rect, Sides } from '../plot/core/layout'; import type { AnyStructure } from '../structure'; export interface StructurePopupStats { id?: string; formula?: string; e_above_hull?: number; e_form?: number; } export interface StructurePopupContext { structure: AnyStructure; stats?: StructurePopupStats; formula_html: string; } export interface PhaseData { composition: CompositionType; energy: number; entry_id?: string; e_above_hull?: number; is_stable?: boolean; exclude_from_hull?: boolean; energy_per_atom?: number; e_form_per_atom?: number; reduced_formula?: string; name?: string; temperatures?: number[]; free_energies?: number[]; '@module'?: string; '@class'?: string; correction?: number; energy_adjustments?: Record[]; parameters?: Record; data?: Record; structure?: Record; attributes?: Record; magnetic_ordering?: MagneticOrdering | (string & {}); } export interface EntryCategoryConfig { label: string; property: string | string[]; markers: Record; labels?: Record; aliases?: Record; } export type MagneticOrdering = `FM` | `FiM` | `AFM` | `NM`; export declare const MAGNETIC_ORDERING_CATEGORY: EntryCategoryConfig; export interface ProcessedPhaseData { entries: PhaseData[]; stable_entries: PhaseData[]; unstable_entries: PhaseData[]; elements: ElementSymbol[]; el_refs: Record; } export type MarkerSymbol = // Marker symbol types for convex hull entries `circle` | `star` | `triangle` | `cross` | `diamond` | `square` | `wye`; export type HullFaceColorMode = `uniform` | `formation_energy` | `dominant_element` | `facet_index`; export declare const HULL_FACE_COLOR_MODES: readonly HullFaceColorMode[]; export interface ConvexHullEntry extends PhaseData, Point3D { is_element: boolean; size?: number; marker?: MarkerSymbol; } export interface ConvexHullConfig { width?: number; height?: number; margin?: Sides; unstable_threshold?: number; show_labels?: boolean; show_hull?: boolean; point_size?: number; line_width?: number; font_size?: number; colors?: { stable?: string; unstable?: string; hull_line?: string; background?: string; text?: string; edge?: string; tooltip_bg?: string; tooltip_text?: string; annotation?: string; }; } export interface ConvexHullControlsType { title?: string; position?: `top-left` | `top-right` | `bottom-left` | `bottom-right`; width?: number; show_counts?: boolean; show_color_toggle?: boolean; show_label_controls?: boolean; } export interface Plane { normal: Point3D; offset: number; } export interface ConvexHullFace { vertices: Vec3; plane: Plane; centroid: Point3D; outside_points: Set; } export interface ConvexHullTriangle { vertices: [Point3D, Point3D, Point3D]; normal: Point3D; centroid: Point3D; } export interface LabelPlacement { x: number; y: number; rect: Rect; } export interface HoverData3D { entry: T; position: Point2D; } export interface PhaseStats { total: number; unary: number; binary: number; ternary: number; quaternary: number; quinary_plus: number; stable: number; unstable: number; energy_range: { min: number; max: number; avg: number; }; hull_distance: { max: number; avg: number; }; elements: number; chemical_system: string; max_arity: number; } export type PhaseArityField = Extract; export interface HighlightStyle { effect?: `pulse` | `glow` | `size` | `color` | `both`; color?: string; size_multiplier?: number; opacity?: number; pulse_speed?: number; } export declare const DEFAULT_GAS_TEMP = 300; export type GasSpecies = `O2` | `N2` | `H2` | `CO` | `CO2` | `H2O` | `F2`; export declare const GAS_SPECIES: readonly GasSpecies[]; export declare const DEFAULT_GAS_PRESSURES: Readonly>; export interface GasThermodynamicsProvider { get_standard_chemical_potential(gas: GasSpecies, T: number): number; get_supported_gases(): GasSpecies[]; get_temperature_range(): Vec2; } export interface GasThermodynamicsConfig { enabled_gases?: GasSpecies[]; pressures?: Partial>; provider?: GasThermodynamicsProvider; element_to_gas?: Partial>; } export interface GasAnalysis { has_gas_dependent_elements: boolean; gas_elements: ElementSymbol[]; relevant_gases: GasSpecies[]; } export declare const GAS_CONTROL_POSITIONS: readonly ["top-left", "top-right", "bottom-left", "bottom-right"]; export type GasControlPosition = (typeof GAS_CONTROL_POSITIONS)[number];