/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { Constraint } from "../aspects/Constraint.js"; import { FieldValue } from "../common/FieldValue.js"; import type { ValueModel } from "../models/ValueModel.js"; /** * Restate the bounds of a constraint in the terms the value is encoded in. * * The specification writes a bound of a temperature or percentage with its unit, such as the "Min to 100.00%" of a * percent100ths field. Values are encoded in the units of their type, so a bound that keeps its unit never constrains * anything. * * The entry constraint of a list bounds the entries, so it converts with the type of the entry rather than of the * list. * * A bound whose unit does not apply to the type that carries it is left as stated, and a comparison against it then * has no numeric meaning. * * A bound naming a value of an enumerated type states that value, so "add, modify" becomes "0, 2". * * @see {@link MatterSpecification.v161.Core} § 7.19.2 */ export declare function EncodedConstraint(constraint: Constraint, model: ValueModel): Constraint; export declare namespace EncodedConstraint { /** * One bound of a constraint, with the model whose units it is in. * * The bounds of a constraint do not all belong to the same type: the entry constraint of a list bounds the * entries, so its units and the values it can hold are those of the entry rather than of the list. */ interface Bound { value: T; model: ValueModel; } /** What the bounds of a constraint amount to once restated in the units the value is encoded in */ interface Bounds { /** * Every bound stating a number outright, in encoding units. * * A bound the specification computes from numbers alone is present as the number it computes. One computed * from another value is absent, as only the value it is compared with gives it a number. */ encoded: Bound[]; /** * Bounds stating a unit no scale is known for, which therefore have none. * * Such a bound survives conversion unconverted, and comparing an encoded value against it has no numeric * meaning: as a range it admits every value, and as an exact value it admits none. */ unscaled: Bound[]; } /** * Report which of a constraint's bounds state a number in encoding units, and which state a unit no scale is * known for and so state no number at all. * * @see {@link MatterSpecification.v161.Core} § 7.19.2 */ function bounds(constraint: Constraint, model: ValueModel): Bounds; } //# sourceMappingURL=EncodedConstraint.d.ts.map