trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
28 lines • 1.11 kB
TypeScript
/**
* Trellis Forms Vue — `useFormVue` composable.
*
* Import from `trellis/forms/vue`:
*
* const { state, actions, field } = useFormVue(taskDescriptor);
*
* Accepts a `defineType` handle or a headless `FormDescriptor`. State is a
* Vue `reactive` object kept in sync with the form core.
*
* @module trellis/forms/vue
*/
import type { AnyType } from '../../schema/define.js';
import type { FormDescriptor } from '../types.js';
import { type FieldBinding, type UseFormReturn } from '../core/index.js';
import type { FormValues } from '../core/types.js';
export type FormSchemaInput = AnyType | FormDescriptor;
export interface UseFormReturnVue extends UseFormReturn {
state: UseFormReturn['state'];
}
/**
* Create a reactive Vue form from a schema. The core's state is mirrored
* into a `reactive()` object via the shared `syncFromCore` bridge;
* `field(name)` exposes reactive getters for template bindings.
*/
export declare function useFormVue(schema: FormSchemaInput, initialValues?: FormValues): UseFormReturnVue;
export type { FieldBinding };
//# sourceMappingURL=index.d.ts.map