import * as DG from 'datagrok-api/dg'; /** Custom event id for toggling monomer highlights in macromolecule grid cells (HELM renderer * and generic sequence renderer). Payload: {@link MacromoleculeHighlightEventArgs}. Fire via * {@link grok.events.fireCustomEvent} or the convenience helpers in this module. */ export declare const MACROMOLECULE_HIGHLIGHT_EVENT_ID = "bio-macromolecule-monomer-highlight"; /** Slot name on `column.temp` where per-row monomer highlights are stored by the macromolecule * cell renderers. Shape: `Map`. */ export declare const MACROMOLECULE_HIGHLIGHT_TEMP = "bio.macromolecule.highlightMonomers"; /** Forced alpha (0..1) applied to every highlight color — solid colors are not allowed. */ export declare const MACROMOLECULE_HIGHLIGHT_ALPHA = 0.4; /** Default fill color (translucent yellow) as a DG.Color ARGB int. The alpha component of the * input is ignored by the renderer and replaced with {@link MACROMOLECULE_HIGHLIGHT_ALPHA}. */ export declare const DEFAULT_MACROMOLECULE_HIGHLIGHT_FILL: number; /** Default stroke color (amber) as a DG.Color ARGB int. */ export declare const DEFAULT_MACROMOLECULE_HIGHLIGHT_STROKE: number; /** A single highlight record stored in `column.temp[MACROMOLECULE_HIGHLIGHT_TEMP]`, keyed by * row index. */ export type MacromoleculeHighlightEntry = { /** 0-based monomer indices to highlight for this row. * - HELM renderer: indices into `editor.m.atoms` of the rendered molecule. * - Generic sequence renderer: 0-based position in the split sequence. */ monomers: number[]; /** DG.Color ARGB integer for the marker fill. Alpha is always replaced with * {@link MACROMOLECULE_HIGHLIGHT_ALPHA}. Falls back to {@link DEFAULT_MACROMOLECULE_HIGHLIGHT_FILL}. */ fillColor?: number; /** DG.Color ARGB integer for the marker outline (HELM renderer ring stroke). Alpha is always * replaced with {@link MACROMOLECULE_HIGHLIGHT_ALPHA}. Falls back to * {@link DEFAULT_MACROMOLECULE_HIGHLIGHT_STROKE}. Ignored by background-painting renderers. */ strokeColor?: number; }; export type MacromoleculeHighlightEventArgs = { /** Match by dataframe name. Optional — if omitted, `tableId` or no filter is used. */ tableName?: string; /** Match by dataframe id. Optional. */ tableId?: string; /** Name of the macromolecule column. */ columnName: string; /** Row index in the dataframe (as stored, i.e. `gridCell.tableRowIndex`). */ rowIdx: number; /** 0-based monomer indices to highlight. Pass `null` or `[]` to clear the row. */ monomers: number[] | null; /** Optional DG.Color ARGB int for the marker fill. Alpha is forced to * {@link MACROMOLECULE_HIGHLIGHT_ALPHA} to prevent solid colors. Ignored when clearing. */ fillColor?: number; /** Optional DG.Color ARGB int for the marker outline (HELM ring). Alpha is forced to * {@link MACROMOLECULE_HIGHLIGHT_ALPHA}. Ignored when clearing. */ strokeColor?: number; }; /** Optional color overrides accepted by the utility helpers (DG.Color ARGB ints). */ export type MacromoleculeHighlightColors = { fillColor?: number; strokeColor?: number; }; /** Converts a DG.Color ARGB int to an `rgba(r,g,b,alpha)` CSS string. The input's alpha is * discarded — the fixed {@link MACROMOLECULE_HIGHLIGHT_ALPHA} is used unless an explicit * override is passed (renderers may use a smaller alpha for backgrounds). */ export declare function macromoleculeHighlightColorToCss(color: number, alpha?: number): string; /** Common input for the highlight helpers: accepts either a dataframe instance or its * identifying name/id, plus either a column instance or its name. */ export type MacromoleculeHighlightTarget = { table?: DG.DataFrame; tableName?: string; tableId?: string; column?: DG.Column; columnName?: string; }; /** Fires the macromolecule highlight event. Updates on the renderer side are applied * asynchronously via the platform's custom-event bus; visible cells in the target column will * be repainted. */ export declare function fireMacromoleculeHighlight(args: MacromoleculeHighlightEventArgs): void; /** Highlight the given monomers in a single row. Replaces any previous highlight for that row. * Optional `colors` override the defaults. */ export declare function setMacromoleculeMonomerHighlight(target: MacromoleculeHighlightTarget, rowIdx: number, monomers: number[], colors?: MacromoleculeHighlightColors): void; /** Clear the highlight for a single row. */ export declare function clearMacromoleculeMonomerHighlight(target: MacromoleculeHighlightTarget, rowIdx: number): void; /** Per-row entry for {@link setMacromoleculeMonomerHighlights}: either `null` (clear), a plain * monomer array (use defaults), or an object bundling monomers with optional color overrides. */ export type MacromoleculeHighlightRowSpec = null | number[] | ({ monomers: number[]; } & MacromoleculeHighlightColors); /** Set highlights for many rows at once. Each value is either `null` (clear that row), an * array of monomer indices (use default colors), or `{monomers, fillColor?, strokeColor?}`. */ export declare function setMacromoleculeMonomerHighlights(target: MacromoleculeHighlightTarget, rowHighlights: Map | Record): void; /** Clears all highlights stored on the column by re-firing a clear event for every currently- * highlighted row. */ export declare function clearAllMacromoleculeMonomerHighlights(target: MacromoleculeHighlightTarget): void; //# sourceMappingURL=macromolecule-highlight.d.ts.map