import type OpenFin from '@openfin/core'; import type { ViewTabAppearanceOptions, ViewTabColorRole } from '../../../common/src/api/shapes/view-tab'; export declare const VIEW_TAB_STATES: readonly ["default", "hover", "active", "focus"]; export type ViewTabState = (typeof VIEW_TAB_STATES)[number]; /** A color that was discarded during sanitization, for the caller to log. */ export interface RejectedViewTabColor { role: ViewTabColorRole; /** Absent when the whole role was malformed rather than one of its states. */ state?: ViewTabState; value: unknown; } /** * Drops every state whose value is not a supported CSS color, returning what survived alongside what was * discarded. Tab color is decoration, so a malformed value degrades that state to its theme default instead * of failing the operation that carried it. * * Only the two color roles are validated. Every other `viewTab` option — `controls`, and whatever follows it * — is carried through untouched, so a bad color cannot take an unrelated tab option down with it. Appearance * is omitted only when nothing at all is left, which keeps a wholly-invalid object out of persistence. */ export declare const sanitizeViewTabAppearance: (viewTab: unknown) => { appearance?: ViewTabAppearanceOptions; rejected: RejectedViewTabColor[]; }; /** Formats a rejected color for a log line, e.g. `viewTab.fontColor.default "##EDE8D0"`. */ export declare const describeRejectedViewTabColor: ({ role, state, value }: RejectedViewTabColor) => string; type ViewOptionsWithWorkspacePlatform = { workspacePlatform?: { viewTab?: ViewTabAppearanceOptions; }; }; /** * True when this `view-options-changed` diff touched `workspacePlatform.viewTab`, so that unrelated view * option changes do not repaint tabs. * * `oldVal` is checked as well as `newVal` because clearing `viewTab` drops it from `newVal` entirely — * that case only shows up on the old side, and it still needs a repaint. */ export declare const hasViewTabDiff: (diff: unknown) => boolean; export declare const getViewTabAppearanceFromViewOptions: (options: ViewOptionsWithWorkspacePlatform) => ViewTabAppearanceOptions | undefined; /** * Reads view tab appearance from the view. Core persists `workspacePlatform` on view options across create, * `updateOptions`, snapshot, and `getOptions`, so `getOptions` is the single source of truth. */ export declare const getViewTabAppearanceFromView: (view: OpenFin.View) => Promise; /** * Writes the per-state custom properties for a single tab element. Values are set inline so that sibling tabs * in the same tab strip are unaffected. */ export declare const applyViewTabAppearance: (tab: HTMLElement, appearance?: ViewTabAppearanceOptions) => void; export {};