/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. * * What a viewer hides in the library's Series tab (#1195, `Plan Builder * Spec.md` PB29), as the canvas reads it. The ids are the tab's * (`planHideId`): the event kinds leave the rows they land on through the * seam that joins them in (#1541), and the Plan's own `rows` * leave the canvas here — a hand-built row and the rows under it by its key, * the one step of its id's path, and a `Plan.over` series' rows, its nested * series' with them, by the keys they carry. `data`'s series hide through * their pick, in the Reactive that lays them out, the frame keeping what the * tab switches of them under the pick's key. An event kind hidden there * is no part of what the canvas shows, so it is in none of its figures — the * footer's counts, the inspector's — and nothing says so (#1039): hiding it is * the viewer's own choice. * * @packageDocumentation */ import { type ValueTypeOf } from "@elaraai/east"; import type { PlanLibrarySeriesType } from "@elaraai/e3-ui/internal"; import type { PlanRowId } from "../model.js"; /** The Series tab on the wire, decoded. */ export type PlanSeriesTabValue = ValueTypeOf; /** What hiding the Plan's own rows hides on its canvas. */ export interface PlanRowsHidden { /** The hand-built rows hidden, by key: each with the rows under it. */ readonly rows: ReadonlySet; /** The series whose rows are hidden, by key. */ readonly series: ReadonlySet; } /** No id hidden. */ export declare const NONE_HIDDEN: readonly string[]; /** * Whether a viewer hides an id of the Series tab: an event kind's, a resource * kind's or a measure's (`planHideId`), or one of the Plan's own rows. * * @param hidden - The ids the viewer hides * @param id - The id * @returns Whether it is hidden */ export declare function hides(hidden: readonly string[], id: string): boolean; /** * The ids a viewer hides, as storage holds them: a list of ids, or anything * else a store held by mistake, which hides none. * * @param stored - What storage holds * @returns The ids hidden */ export declare function hiddenOf(stored: unknown): readonly string[]; /** * What a viewer's hidden ids hide of the Plan's own rows. * * @param tab - The Series tab, which says what hiding each of the rows hides * @param hidden - The ids the viewer hides * @returns The rows hidden; `undefined` when the ids hide none of them */ export declare function rowsHiddenOf(tab: PlanSeriesTabValue, hidden: readonly string[]): PlanRowsHidden | undefined; /** * Whether a viewer hides a row of the canvas: a hand-built row's — its id's * series empty — by its key, else by its series' key. * * @param hidden - What the viewer hides of the Plan's own rows * @param id - The row's id * @returns Whether it is hidden */ export declare function hidesRow(hidden: PlanRowsHidden, id: PlanRowId): boolean; //# sourceMappingURL=hidden.d.ts.map