/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { SortedMap, type EastTypeValue, type ValueTypeOf } from "@elaraai/east"; import type { RecordSlicesBindType } from "@elaraai/east-ui/internal"; /** A Slice over several records, as the payload's chrome carries it. */ type Product = ValueTypeOf; /** * The slice the rail draws: the payload's, its `reference` source left out — * a record only the check reads, which narrows nothing, so the rail offers * none of its fields and counts none of its rows. The same object while the * payload's is, and the payload's itself where it has no such source. * * @param slices - The payload's slice; `undefined` with none * @returns What the rail is drawn from */ export declare function useRailSources(slices: Product | undefined): Product | undefined; /** A reference record's rows read over a window, each decoded once: what the check is given. */ export interface ReferenceRows { /** Each row's bytes, by key: what a read again keeps a row by. */ readonly bytes: SortedMap; /** Each row, decoded, by key in key order: the check's `reference`. */ readonly rows: SortedMap; } /** No rows: a window the record holds none of. */ export declare const NO_REFERENCE_ROWS: ReferenceRows; /** * The decoder of a reference record's rows, made the first time its row type * is seen, then shared — East decides which types are the same. * * @param rowType - The record's row type, as the payload carries it * @returns Its rows' decoder */ export declare function referenceDecoder(rowType: EastTypeValue): (bytes: Uint8Array) => unknown; /** * A window's rows read again, each kept as it was where its bytes are: its * row not decoded again, and the rows held the same object while every row * reads as it did. * * @param read - The window's rows, by key, as their bytes * @param held - What the window held last; `undefined` the first time * @param decode - The rows' decoder ({@link referenceDecoder}) * @returns The window's rows */ export declare function keptReference(read: ReadonlyMap, held: ReferenceRows | undefined, decode: (bytes: Uint8Array) => unknown): ReferenceRows; export {}; //# sourceMappingURL=reference.d.ts.map