export type Axis = 'x' | 'y'; /** * An object that associates each axis direction with a list of assigned diaIDs * depending on the assignment dimension (1D or 2D). * * - For **1D** assignments, only the `x` axis is used. * - For **2D** assignments, both the `x` and `y` axes are used. * * - The key (`Axis`) represents the **axis** (`'x'` or `'y'`). * - The value (`string[]`) contains the **assigned diaIDs** for that axis. */ type Assignment = Record; /** * An object that associates each unique ID to their corresponding axis assignments. * * - The key (`string`) represents a **range ID, signal ID, or zone ID**. * - The value (`Assignment`) contains the assigned values mapped to axes. */ export type Assignments = Record; interface AssignmentItem { id: string; axis: Axis | null; } export interface HighlightAssignmentOptions { id: string; axis?: Axis; } export interface ActivateAssignmentOptions { id: string; axis: Axis; spectrumId?: string; } export declare const assignmentStatus: AssignmentStatus; export interface AssignmentStatus { activated: (AssignmentItem & { spectrumId?: string; }) | null; highlighted: AssignmentItem | null; } export interface AssignmentContext extends AssignmentStatus { data: Assignments; activate: (options: ActivateAssignmentOptions) => void; highlight: (options: HighlightAssignmentOptions) => void; clearHighlight: () => void; } export interface AssignmentsData extends AssignmentStatus { isActive: boolean; isHighlighted: boolean; /** * An object that associates each axis direction ('x' or 'y') with a list of assigned diaIDs for a specific ID, * depending on the assignment dimension (1D or 2D). * * - For **1D** assignments, only the `x` axis is used. * - For **2D** assignments, both the `x` and `y` axes are used. * * - The key (`Axis`) represents the **axis direction** (`'x'` or `'y'`). * - The value (`string[]`) is an array containing the **DiaIDs** assigned to that axis for the specific ID. */ assignedDiaIds: Partial>; activate: (axis: Axis) => void; highlight: (axis?: Axis) => void; clearHighlight: () => void; } export declare const assignmentContext: import("react").Context; export declare const assignmentAxes: Axis[]; export declare function useAssignmentContext(): AssignmentContext; export declare function useAssignment(id: string, spectrumId?: string): AssignmentsData; export {}; //# sourceMappingURL=AssignmentsContext.d.ts.map