/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import type { RecordSliceEntry } from "@elaraai/east-ui/internal"; import type { SchematicValue } from "./data.js"; /** An item kind, decoded: what makes its rows' roles. */ type ItemKind = SchematicValue["items"][number]; /** A row as its kind's `rowsOf` makes it: its roles beside its bytes. */ export interface KindRow { /** Its roles. */ readonly roles: R; /** Its bytes: the row as the record holds it, beast2 of the kind's row type. */ readonly row: Uint8Array; } /** * An entry's row: its joined row, or the whole row its index carries (D29). * * @param entry - The entry * @returns Its row; `undefined` for an entry that carries none */ export declare function entryRow(entry: RecordSliceEntry): unknown; /** Some kinds' rows as their `rowsOf` makes them (see the module docs). */ export declare class KindRows { /** Each kind's rows, by key, at the revision they were read at. */ private readonly kept; /** Each kind's encoder, made once. */ private readonly encoders; /** * Some rows of a kind, made: those not yet made at the revision made in one call of its `rowsOf`. * * @param kind - The kind * @param revision - The record's revision the rows were read at * @param rows - The rows, each its key's text (`kind-keys.ts`) and its row * @returns Each row's roles and bytes, by key — every row made at the revision, these among them */ rowsOf(kind: ItemKind, revision: string, rows: readonly { readonly key: string; readonly row: unknown; }[]): ReadonlyMap>; /** * A row of a kind made at the revision it was read at. * * @param slot - The kind's slot * @param key - The row's key * @returns Its bytes and the revision they were read at; `undefined` for a row not made */ rowOf(slot: string, key: string): { readonly revision: string; readonly row: Uint8Array; } | undefined; /** A kind's encoder of the rows it reads, made once per kind. */ private encoderOf; } export {}; //# sourceMappingURL=kind-rows.d.ts.map