/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * The rows a Record's select column ticks (`Record - DX Proposal.md` SL1, * P5), by row id: held apart from the ring, which a tick never moves, and read * through `useSyncExternalStore` — a row by its own tick, so a tick draws that * row and the header again, and no other. * * A tick outlives its row's place among the rows read (#1579): a paged record * drops a row as the grid scrolls far from it, and its tick stays, holding * what the Sheet held of the row as it was ticked — so Delete takes it still. * * @packageDocumentation */ import type { SheetEntryHold } from "../sheet/index.js"; /** What a tick holds of its row: what the Sheet held of it as it was ticked, or `undefined` for a row not read. */ type Held = SheetEntryHold | undefined; /** The rows ticked, and the calls that change them. */ export interface RecordTicks { /** Hears every change; returns the call that stops it. */ subscribe: (listener: () => void) => () => void; /** Whether a row is ticked. */ has: (id: string) => boolean; /** Moves with every change: what the header reads. */ version: () => number; /** Ticks a row, or unticks it. */ toggle: (id: string) => void; /** Ticks these rows, and only them. */ set: (ids: readonly string[]) => void; /** Unticks every row. */ clear: () => void; /** How many of these rows are ticked. */ count: (ids: readonly string[]) => number; /** How many rows are ticked: those the rows read no longer hold among them. */ size: () => number; /** Each row ticked, in the order ticked, and what the Sheet held of it as it was ticked. */ held: () => ReadonlyMap; /** Where a tick takes what the Sheet holds of its row: the frame's, as the Sheet's rows stand. */ holdWith: (hold: (id: string) => Held) => void; } /** * Makes a Record's ticks, none ticked. * * @returns The ticks */ export declare function createRecordTicks(): RecordTicks; export {}; //# sourceMappingURL=ticks.d.ts.map