UNPKG

trellis

Version:

Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications

26 lines 1.2 kB
/** * Form Overrides — apply graph `trellis:Form` entities to a derived * descriptor. * * Derivation is the default; overrides are the exception. A `Form` entity * (with its `FormField` children) can rename, recontrol, hide, reorder, and * regoup fields of an otherwise schema-derived form. * * @module trellis/forms */ import type { FormDescriptor, FormEntityLike, FormOverride } from './types.js'; /** Match the override to a mode: exact mode wins; mode-less applies to all. */ export declare function formMatchesMode(form: { mode?: string; }, mode: string): boolean; /** Adapter from a graph-read `Form` entity to the override shape. */ export declare function formEntityToOverride(entity: FormEntityLike): FormOverride; /** * Apply one override to a derived descriptor (mutates and returns it). * * - `hidden` fields are removed from sections and the flattened list. * - `section` moves the field into a section (created on demand, appended). * - `order` re-sorts within each section; sections renumber sequentially. */ export declare function applyFormOverride(descriptor: FormDescriptor, override: FormOverride): FormDescriptor; //# sourceMappingURL=overrides.d.ts.map