import { KanbanGroup, KanbanGrouping } from "./grouping.js"; //#region src/kanban/matrix.d.ts /** Which axis of a board a grouping controls. */ export declare const KANBAN_BOARD_AXES: { readonly group: "group"; readonly subgroup: "subgroup"; }; export type KanbanBoardAxis = (typeof KANBAN_BOARD_AXES)[keyof typeof KANBAN_BOARD_AXES]; /** The optional horizontal swimlane dimension is intentionally explicit. */ export type KanbanBoardLane = { type: "none"; } | { group: KanbanGroup; type: "group"; }; export type KanbanBoardCoordinate = { column: KanbanBoardColumn; lane: KanbanBoardLane; }; export type KanbanBoardCell = { coordinate: KanbanBoardCoordinate; rows: TRow[]; }; /** A non-grouping destination rendered as a terminal board column. */ export type KanbanBoardDestination = { id: string; label: string; }; export type KanbanBoardColumn = { group: KanbanGroup; type: "group"; } | { destination: KanbanBoardDestination; type: "destination"; }; /** * The full, ordered cartesian board. Presentation may hide or collapse parts * of it, but it must not derive cards independently: every board row is in * exactly one cell here before that presentation step. */ export type KanbanBoardMatrix = { cells: KanbanBoardCell[]; columns: KanbanBoardColumn[]; lanes: KanbanBoardLane[]; rows: TRow[]; }; export type ResolveKanbanGroupValueParams = { grouping: KanbanGrouping; row: TRow; }; export type BuildKanbanBoardMatrixParams = { /** The vertical board columns. This must be a renderable grouping. */ group: KanbanGrouping; /** Optional horizontal swimlanes. `none` makes this a one-lane board. */ subgroup: KanbanGrouping; /** Terminal columns, rendered after grouping columns and empty by default. */ destinations?: readonly KanbanBoardDestination[]; rows: readonly TRow[]; uncategorizedLabel: string; resolveGroupValue: (params: ResolveKanbanGroupValueParams) => string | null; }; export type OrderKanbanCellsByColumnsParams = { cells: readonly KanbanBoardCell[]; columns: readonly KanbanBoardColumn[]; }; /** Stable identity for a visible board column; group and destination domains stay distinct. */ export declare const getKanbanBoardColumnIdentity: (column: KanbanBoardColumn) => string; /** Stable identity for a swimlane; it can never alias a visible column. */ export declare const getKanbanBoardLaneIdentity: (lane: KanbanBoardLane) => string; /** Apply the visible header order to any lane's cells. */ export declare const orderKanbanCellsByColumns: ({ cells, columns }: OrderKanbanCellsByColumnsParams) => KanbanBoardCell[]; /** * Resolve the board's one source of placement truth. * * A subgroup never filters the primary board scope. A row outside a subgroup's * declared values goes to its explicit No value lane, rather than disappearing. */ export declare const buildKanbanBoardMatrix: ({ group, subgroup, destinations, rows, uncategorizedLabel, resolveGroupValue }: BuildKanbanBoardMatrixParams) => KanbanBoardMatrix; export type KanbanDropAxisChange = { groupBy: TGroupId; value: string | null; }; /** A complete, atomic move request for a domain mutation adapter. */ export type KanbanDropIntent = { cardId: TCardId; changes: readonly [KanbanDropAxisChange, ...KanbanDropAxisChange[]]; type: "move"; } | { cardId: TCardId; destination: KanbanBoardDestination; type: "destination"; }; export type CreateKanbanDropIntentParams = { cardId: TCardId; group: KanbanGrouping; source: KanbanBoardCoordinate; subgroup: KanbanGrouping; target: KanbanBoardCoordinate; }; /** * Builds a single mutation payload for a pointer, touch, or keyboard drop. * Diagonal drops carry both changes together; an adapter must commit this * intent atomically or reject it as a whole. */ export declare const createKanbanDropIntent: ({ cardId, group, source, subgroup, target }: CreateKanbanDropIntentParams) => KanbanDropIntent | null; //#endregion