import { AIGuiPlugin } from "@ai-gui/core"; //#region src/index.d.ts type MoleculeFormat = "smiles" | "molfile"; type MoleculeView = "2d" | "3d"; type MoleculeStyle = "ball-and-stick" | "space-filling"; type MoleculeAtomLabels = "standard" | "all"; interface MoleculeHighlight { atoms?: number[]; bonds?: number[]; } interface Molecule2DDefinition { version: 1; format: MoleculeFormat; source: string; view: "2d"; atomLabels?: MoleculeAtomLabels; highlight?: MoleculeHighlight; } /** * A structure drawn in 3D. * * From a Molfile the coordinates are the file's own and must be genuinely spatial. From SMILES * there are none, so a conformer is generated — which is what makes 3D reachable for a model at * all: it writes SMILES fluently and a Molfile with real z coordinates almost never. */ interface Molecule3DDefinition { version: 1; format: MoleculeFormat; source: string; view: "3d"; style?: MoleculeStyle; atomLabels?: MoleculeAtomLabels; highlight?: MoleculeHighlight; } type MoleculeDefinition = Molecule2DDefinition | Molecule3DDefinition; interface MoleculeOptions { width?: number; height?: number; enable3D?: boolean; maxAtoms?: number; maxBonds?: number; maxSourceBytes?: number; /** * Largest SMILES structure (heavy atoms) that will be given generated 3D coordinates. * * Conformer search runs on the page's main thread and grows quickly with rotatable bonds — a * steroid takes seconds. Structures over the limit are refused in 3D; the model can still draw * them in 2D. Default 64. */ maxConformerAtoms?: number; } type MoleculeErrorCode = "invalid-definition" | "invalid-options"; interface MoleculeError { code: MoleculeErrorCode; message: string; } type MoleculeResult = { ok: true; value: T; } | { ok: false; error: MoleculeError; }; declare function validateMoleculeDefinition(value: unknown, options?: MoleculeOptions): Promise; declare function parseMoleculeDefinition(source: string, options?: MoleculeOptions): Promise; /** * You rarely want this directly: `buildSystemPrompt({ registry, plugins, locale })` from * `@ai-gui/core` collects the card specs and every enabled plugin's spec in one call, in the * product's language. Reach for this only to inspect or override one plugin's rules. */ declare function moleculePromptSpec(options?: MoleculeOptions): string; declare const moleculeCss: string; declare function molecule(options?: MoleculeOptions): AIGuiPlugin; //#endregion export { Molecule2DDefinition, Molecule3DDefinition, MoleculeAtomLabels, MoleculeDefinition, MoleculeError, MoleculeErrorCode, MoleculeFormat, MoleculeHighlight, MoleculeOptions, MoleculeResult, MoleculeStyle, MoleculeView, molecule, moleculeCss, moleculePromptSpec, parseMoleculeDefinition, validateMoleculeDefinition };