/** * Property presentation helpers. * * These read a property's admin block — `readOnly`, `disabled.hidden`, the * declarative `conditions` — and lived in `@rebasepro/common`, which is on the * backend's dependency path. Nothing in core ever called them: `isReadOnly` and * `isHidden` are used only by the panel, and `applyPropertyConditions` has no * production caller at all. * * That last one is worth knowing about rather than assuming: the collection editor * has a whole Conditions UI, `serializable_utils` persists what it writes, and * `BaseProperty.conditions` documents itself as "evaluated at runtime like property * builders" — but the evaluator below is reached only from its own tests. It lives * here because here is where it would be called from once it is wired up. * * The one part of `conditions` that *is* applied is the literal case: * `hidden`/`readOnly`/`disabled` stated as a plain boolean rather than as a rule. * A literal needs no context, so `isHidden`/`isReadOnly`/`isDisabled` can answer * it directly, and those three gates are consulted everywhere a field is laid * out. A *rule* still is not evaluated anywhere in production — the split is * deliberate, not an oversight: it is the difference between a condition that * needs an entity to be evaluated against and one that does not. */ import type { ConditionContext, Property } from "@rebasepro/types"; export declare function isReadOnly(property: Property): boolean; export declare function isHidden(property: Property): boolean; /** * Whether the field is disabled by its own declaration, ignoring form state. * * The `admin.disabled` block and `conditions.disabled: true` say the same thing * two ways, so every caller that gated on the first now asks here instead of * growing a second check of its own. */ export declare function isDisabled(property: Property): boolean; export declare function applyPropertyConditions(property: Property, context: ConditionContext): Property;