/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * What the layers do to the drawing (#1387, §8): each entity's layer — its * `layer`, naming a layer by its key (`Schematic.layers`, D36) — hides it, * locks it or dims it as the layer's author defaults say: `visible` false * hides every entity on it, `locked` makes them unselectable, and `opacity` * under 1 dims them. An entity on no layer, or on a key no layer has, is * always shown. The viewer's own choices are the Layers tab's (#1389), kept * under the Schematic's `id`. Pure: data in, data out, unit-tested in * `layers.test.ts`. * * @packageDocumentation */ import { type ValueTypeOf } from "@elaraai/east"; import type { Schematic } from "@elaraai/e3-ui/internal"; import type { SchematicDrawn } from "./drawn"; /** A layer, decoded. */ export type SchematicLayerValue = ValueTypeOf; /** What the layers do to the drawing, by each entity's id. */ export interface SchematicLayerState { /** The entities a hidden layer holds: they never draw. */ readonly hidden: ReadonlySet; /** The entities a locked layer holds: they never select. */ readonly locked: ReadonlySet; /** Each dimmed entity's opacity. */ readonly alpha: ReadonlyMap; } /** No layer does anything: the drawing of a Schematic with none. */ export declare const NO_LAYER_STATE: SchematicLayerState; /** * What the layers do to a drawing (see the module docs). * * @param layers - The layers, in their order * @param drawn - What the canvas draws * @returns Each entity hidden, locked or dimmed by its layer */ export declare function layerState(layers: readonly SchematicLayerValue[], drawn: SchematicDrawn): SchematicLayerState; //# sourceMappingURL=layers.d.ts.map