import type { BpmnDefinitions, BpmnDiPlane } from "@bpmnkit/core"; import type { RenderedEdge, RenderedShape } from "./types.js"; /** The four stacked SVG layers a scene renders into (bottom → top). */ export interface SceneLayers { containers: SVGGElement; edges: SVGGElement; shapes: SVGGElement; labels: SVGGElement; } /** * Owns a diagram's SVG layers and an id → graphics registry, and renders a DI * plane into them. Beyond the initial full {@link render}, individual elements * can be updated or removed in place ({@link updateElement}/{@link removeElement}) * without tearing down the whole scene — the foundation for incremental editing. * * CSS classes added to an element's `` after rendering (markers, selection, * highlights) are preserved across {@link updateElement}. */ export declare class Scene { private readonly _layers; private readonly _instanceId; private readonly _registry; private _defs; private _plane; private _drillableIds; /** * Model index and docking geometry, built once per {@link render}. The * model is expected to be mutated in place between incremental updates * (the scene already keeps `_defs`/`_plane` by reference), so rebuilding the * whole index for every single-element update was pure waste. */ private _ctx; private readonly _shapeById; private readonly _edgeById; constructor(_layers: SceneLayers, _instanceId: string); /** Renders a plane from scratch, replacing any current content. */ render(defs: BpmnDefinitions, plane: BpmnDiPlane, drillableIds?: ReadonlySet): void; /** Empties the layers and the registry. */ clear(): void; /** Returns the registered shape or edge for an id, or `undefined`. */ getElement(id: string): RenderedShape | RenderedEdge | undefined; /** Returns the `` graphics element for an id, or `undefined`. */ getGraphics(id: string): SVGGElement | undefined; /** Iterates every registered element in insertion order. */ forEach(fn: (el: RenderedShape | RenderedEdge) => void): void; /** All rendered shapes, in registry order. */ getShapes(): RenderedShape[]; /** All rendered edges, in registry order. */ getEdges(): RenderedEdge[]; /** * Re-renders a single element's `` in place from the current model, * preserving CSS classes (markers/selection) applied after the last render. * No-op if the id is unknown or there is no current plane. */ updateElement(id: string): void; /** Removes an element's `` (and its external label) from the scene. */ removeElement(id: string): void; private _context; } //# sourceMappingURL=scene.d.ts.map