/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { ElementTag } from "#common/ElementTag.js"; import { Model } from "#models/Model.js"; /** * A high level summary of changes between two models. */ export type ModelDiff = ModelDiff.Add | ModelDiff.Delete | ModelDiff.Change | ModelDiff.Summary; /** * Diff two models. * * Two elements match by ID or name, and a feature requirement matches by the feature it names, so a requirement that * names a feature by its title matches one that names it by its code. A matched element is changed if a property other * than documentation differs. Spellings of the same conformance compare alike: a feature without conformance and "O", * adjacent entries of an otherwise list and their disjunction, and a condition reference in any case and the condition * as declared. A change states each property as written. * * @see {@link MatterSpecification.v161.Core} ยง 7.3.11 * * Changes below {@link depth} are counted rather than listed. */ export declare function ModelDiff(from: Model, to: Model, depth?: number): ModelDiff | undefined; export declare namespace ModelDiff { /** * Convert a diff to a diagnostic for serialization. */ function diagnosticOf(diff: ModelDiff | undefined): unknown; interface Identity { name: string; tag: ElementTag; } interface Add extends Identity { kind: "add"; } interface Delete extends Identity { kind: "delete"; } /** * An element in both models whose properties or children differ. */ interface Change extends Identity { kind: "change"; properties?: Record; children?: ModelDiff[]; } /** * An element in both models whose properties or children differ, with changes to its children counted by tag. */ interface Summary extends Identity { kind: "summary"; properties?: Record; added: Partial>; deleted: Partial>; changed: Partial>; } /** * A property's value in each model, undefined where the model does not have it. */ interface PropertyChange { from?: string; to?: string; } } //# sourceMappingURL=ModelDiff.d.ts.map