@jayoncode/form-intelligence API
@jayoncode/form-intelligence API
Classes
FormModuleHost
Defined in: core/form-module-host.ts:30
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Constructors
Constructor
new FormModuleHost<TValues>(
form: FormInstance<TValues>,
config: ResolvedFormConfig<TValues>,
events: FormEventBus,
pluginRegistry: PluginRegistry<TValues>): FormModuleHost<TValues>;Defined in: core/form-module-host.ts:35
Parameters
| Parameter | Type |
|---|---|
form | FormInstance<TValues> |
config | ResolvedFormConfig<TValues> |
events | FormEventBus |
pluginRegistry | PluginRegistry<TValues> |
Returns
FormModuleHost<TValues>
Methods
register()
register(module: FormModule<TValues>): void;Defined in: core/form-module-host.ts:42
Parameters
| Parameter | Type |
|---|---|
module | FormModule<TValues> |
Returns
void
registerPlugin()
registerPlugin(plugin: FormPlugin<TValues>, order?: number): void;Defined in: core/form-module-host.ts:52
Parameters
| Parameter | Type |
|---|---|
plugin | FormPlugin<TValues> |
order | number |
Returns
void
has()
has(id: string): boolean;Defined in: core/form-module-host.ts:56
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
boolean
start()
start(): void;Defined in: core/form-module-host.ts:60
Returns
void
destroy()
destroy(): void;Defined in: core/form-module-host.ts:71
Returns
void
FormModuleRegistry
Defined in: core/module-registry.ts:10
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Constructors
Constructor
new FormModuleRegistry<TValues>(): FormModuleRegistry<TValues>;Returns
FormModuleRegistry<TValues>
Methods
register()
register(module: FormModule<TValues>): void;Defined in: core/module-registry.ts:14
Parameters
| Parameter | Type |
|---|---|
module | FormModule<TValues> |
Returns
void
unregister()
unregister(id: string): boolean;Defined in: core/module-registry.ts:26
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
boolean
has()
has(id: string): boolean;Defined in: core/module-registry.ts:30
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
boolean
size()
size(): number;Defined in: core/module-registry.ts:34
Returns
number
list()
list(): readonly FormModule<TValues>[];Defined in: core/module-registry.ts:38
Returns
readonly FormModule<TValues>[]
initializeAll()
initializeAll(context: FormModuleContext<TValues>): void;Defined in: core/module-registry.ts:42
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
startAll()
startAll(context: FormModuleContext<TValues>): void;Defined in: core/module-registry.ts:48
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
stopAll()
stopAll(context: FormModuleContext<TValues>): void;Defined in: core/module-registry.ts:54
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
destroyAll()
destroyAll(context: FormModuleContext<TValues>): void;Defined in: core/module-registry.ts:60
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
DependencyEngine
Defined in: engines/dependency/dependency-engine.ts:49
Structural dependency graph façade (Phase 6 / ADR-007).
Constructors
Constructor
new DependencyEngine(options?: DependencyEngineOptions): DependencyEngine;Defined in: engines/dependency/dependency-engine.ts:53
Parameters
| Parameter | Type |
|---|---|
options | DependencyEngineOptions |
Returns
Methods
registerMap()
registerMap(map: DependencyMap, options?: {
actions?: readonly DependencyAction[];
actionsByChild?: Partial<Record<string, readonly DependencyAction[]>>;
inferred?: boolean;
}): void;Defined in: engines/dependency/dependency-engine.ts:57
Parameters
| Parameter | Type |
|---|---|
map | DependencyMap |
options? | { actions?: readonly DependencyAction[]; actionsByChild?: Partial<Record<string, readonly DependencyAction[]>>; inferred?: boolean; } |
options.actions? | readonly DependencyAction[] |
options.actionsByChild? | Partial<Record<string, readonly DependencyAction[]>> |
options.inferred? | boolean |
Returns
void
addEdge()
addEdge(
child: string,
parents: readonly string[],
actions?: readonly DependencyAction[],
options?: {
clearValue?: unknown;
inferred?: boolean;
}): void;Defined in: engines/dependency/dependency-engine.ts:85
Parameters
| Parameter | Type | Default value |
|---|---|---|
child | string | undefined |
parents | readonly string[] | undefined |
actions | readonly DependencyAction[] | DEFAULT_DEPENDENCY_ACTIONS |
options? | { clearValue?: unknown; inferred?: boolean; } | undefined |
options.clearValue? | unknown | undefined |
options.inferred? | boolean | undefined |
Returns
void
addEdgeConfig()
addEdgeConfig(config: DependencyEdgeConfig & {
to: string;
}): void;Defined in: engines/dependency/dependency-engine.ts:104
Parameters
| Parameter | Type |
|---|---|
config | DependencyEdgeConfig & { to: string; } |
Returns
void
syncInferredFromFields()
syncInferredFromFields<TValues>(fields: ReadonlyMap<string, FieldOptions<TValues>>): void;Defined in: engines/dependency/dependency-engine.ts:114
Sync inferred edges from FieldOptions.dependsOn (revalidate-only).
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
fields | ReadonlyMap<string, FieldOptions<TValues>> |
Returns
void
getDependents()
getDependents(path: string): readonly string[];Defined in: engines/dependency/dependency-engine.ts:145
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
readonly string[]
getParents()
getParents(path: string): readonly string[];Defined in: engines/dependency/dependency-engine.ts:149
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
readonly string[]
detectCycles()
detectCycles(): readonly readonly string[][];Defined in: engines/dependency/dependency-engine.ts:153
Returns
readonly readonly string[][]
topologicalOrder()
topologicalOrder(seeds?: readonly string[]): readonly string[];Defined in: engines/dependency/dependency-engine.ts:157
Parameters
| Parameter | Type |
|---|---|
seeds? | readonly string[] |
Returns
readonly string[]
inspect()
inspect(): DependencyGraph;Defined in: engines/dependency/dependency-engine.ts:161
Returns
onParentChange()
onParentChange(path: string): CascadeResult;Defined in: engines/dependency/dependency-engine.ts:169
Propagate a parent change: clear / revalidate / recompute / reloadOptions for dependents in topological order.
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
FormIntelligentError
Defined in: errors/index.ts:17
Extends
Error
Extended by
ConfigurationErrorDraftStorageErrorOfflineQueueErrorPluginErrorSubmitErrorValidationErrorWorkflowError
Constructors
Constructor
new FormIntelligentError(
message: string,
code: FormErrorCode,
options?: FormErrorOptions): FormIntelligentError;Defined in: errors/index.ts:21
Parameters
| Parameter | Type |
|---|---|
message | string |
code | FormErrorCode |
options | FormErrorOptions |
Returns
Overrides
Error.constructorProperties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
code | readonly | FormErrorCode | errors/index.ts:18 |
details | readonly | Readonly<PlainObject> | undefined | errors/index.ts:19 |
ValidationError
Defined in: errors/index.ts:29
Extends
Constructors
Constructor
new ValidationError(message: string, options?: FormErrorOptions): ValidationError;Defined in: errors/index.ts:30
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:18 |
details | readonly | Readonly<PlainObject> | undefined | FormIntelligentError.details | errors/index.ts:19 |
SubmitError
Defined in: errors/index.ts:36
Extends
Constructors
Constructor
new SubmitError(message: string, options?: FormErrorOptions): SubmitError;Defined in: errors/index.ts:37
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:18 |
details | readonly | Readonly<PlainObject> | undefined | FormIntelligentError.details | errors/index.ts:19 |
WorkflowError
Defined in: errors/index.ts:43
Extends
Constructors
Constructor
new WorkflowError(message: string, options?: FormErrorOptions): WorkflowError;Defined in: errors/index.ts:44
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:18 |
details | readonly | Readonly<PlainObject> | undefined | FormIntelligentError.details | errors/index.ts:19 |
ConfigurationError
Defined in: errors/index.ts:50
Extends
Constructors
Constructor
new ConfigurationError(message: string, options?: FormErrorOptions): ConfigurationError;Defined in: errors/index.ts:51
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:18 |
details | readonly | Readonly<PlainObject> | undefined | FormIntelligentError.details | errors/index.ts:19 |
DraftStorageError
Defined in: errors/index.ts:58
Recoverable draft persistence failures (quota, corrupt payload).
Extends
Constructors
Constructor
new DraftStorageError(message: string, options?: FormErrorOptions): DraftStorageError;Defined in: errors/index.ts:59
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:18 |
details | readonly | Readonly<PlainObject> | undefined | FormIntelligentError.details | errors/index.ts:19 |
OfflineQueueError
Defined in: errors/index.ts:66
Offline queue failures (quota, overflow reject).
Extends
Constructors
Constructor
new OfflineQueueError(message: string, options?: FormErrorOptions): OfflineQueueError;Defined in: errors/index.ts:67
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:18 |
details | readonly | Readonly<PlainObject> | undefined | FormIntelligentError.details | errors/index.ts:19 |
PluginError
Defined in: errors/index.ts:74
Isolated plugin/middleware failures (setup or hook throw).
Extends
Constructors
Constructor
new PluginError(message: string, options?: FormErrorOptions): PluginError;Defined in: errors/index.ts:75
Parameters
| Parameter | Type |
|---|---|
message | string |
options | FormErrorOptions |
Returns
Overrides
FormIntelligentError.constructor
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
code | readonly | FormErrorCode | FormIntelligentError.code | errors/index.ts:18 |
details | readonly | Readonly<PlainObject> | undefined | FormIntelligentError.details | errors/index.ts:19 |
MiddlewarePipeline
Defined in: plugins/middleware.ts:103
Onion middleware registry. Lower order runs earlier (outer). Same order → registration order.
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Constructors
Constructor
new MiddlewarePipeline<TValues>(): MiddlewarePipeline<TValues>;Returns
MiddlewarePipeline<TValues>
Methods
use()
use(middleware: MiddlewareInput<TValues>): () => void;Defined in: plugins/middleware.ts:107
Parameters
| Parameter | Type |
|---|---|
middleware | MiddlewareInput<TValues> |
Returns
() => void
run()
run(input: {
form: FormInstance<TValues>;
phase: MiddlewarePhase;
signal: AbortSignal;
meta?: Readonly<Record<string, unknown>>;
}): Promise<MiddlewareRunResult>;Defined in: plugins/middleware.ts:125
Parameters
| Parameter | Type |
|---|---|
input | { form: FormInstance<TValues>; phase: MiddlewarePhase; signal: AbortSignal; meta?: Readonly<Record<string, unknown>>; } |
input.form | FormInstance<TValues> |
input.phase | MiddlewarePhase |
input.signal | AbortSignal |
input.meta? | Readonly<Record<string, unknown>> |
Returns
Promise<MiddlewareRunResult>
clear()
clear(): void;Defined in: plugins/middleware.ts:204
Returns
void
Interfaces
FormController
Defined in: adapters/controllers.ts:20
Thin façade over FormInstance for adapters and design systems.
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
state | readonly | FormState<TValues> | adapters/controllers.ts:21 |
Methods
subscribe()
subscribe(listener: () => void): () => void;Defined in: adapters/controllers.ts:22
Parameters
| Parameter | Type |
|---|---|
listener | () => void |
Returns
() => void
getSnapshot()
getSnapshot(): FormState<TValues>;Defined in: adapters/controllers.ts:23
Returns
FormState<TValues>
submit()
submit(options?: SubmitOptions): Promise<boolean>;Defined in: adapters/controllers.ts:24
Parameters
| Parameter | Type |
|---|---|
options? | SubmitOptions |
Returns
Promise<boolean>
reset()
reset(options?: ResetOptions<TValues>): void;Defined in: adapters/controllers.ts:25
Parameters
| Parameter | Type |
|---|---|
options? | ResetOptions<TValues> |
Returns
void
field()
field(path: string): FieldController<TValues>;Defined in: adapters/controllers.ts:26
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
FieldController<TValues>
firstInvalidPath()
firstInvalidPath(): string | undefined;Defined in: adapters/controllers.ts:28
First path with a non-empty error message.
Returns
string | undefined
focusFirstInvalid()
focusFirstInvalid(): string | undefined;Defined in: adapters/controllers.ts:33
Focuses the first invalid control when a DOM document is available. Returns the path (or undefined if none). Safe no-op under SSR.
Returns
string | undefined
destroy()
destroy(): void;Defined in: adapters/controllers.ts:34
Returns
void
FrameworkAdapter
Defined in: adapters/framework-adapter.ts:7
Contract for framework UI adapters (React, Vue, Angular, Svelte, …). Implementations ship in separate packages — never required by core.
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name | readonly | string | adapters/framework-adapter.ts:10 |
Methods
connect()
connect(form: FormInstance<TValues>): void | (() => void);Defined in: adapters/framework-adapter.ts:15
Bind framework lifecycle / reactivity to a form instance. Return a cleanup that disconnects subscriptions and effects.
Parameters
| Parameter | Type |
|---|---|
form | FormInstance<TValues> |
Returns
void | (() => void)
PersistenceAdapter
Defined in: adapters/persistence-adapter.ts:5
Persist form values for drafts and autosave. Implementations may be sync (localStorage) or async (IndexedDB, remote).
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name? | readonly | string | adapters/persistence-adapter.ts:8 |
Methods
load()
load(key: string): TValues | Promise<TValues | null> | null;Defined in: adapters/persistence-adapter.ts:9
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
TValues | Promise<TValues | null> | null
save()
save(key: string, values: TValues): void | Promise<void>;Defined in: adapters/persistence-adapter.ts:10
Parameters
| Parameter | Type |
|---|---|
key | string |
values | TValues |
Returns
void | Promise<void>
clear()
clear(key: string): void | Promise<void>;Defined in: adapters/persistence-adapter.ts:11
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
void | Promise<void>
SyncPersistenceAdapter
Defined in: adapters/persistence-adapter.ts:18
Sync persistence surface used by draft workflow today. Compatible with PersistenceAdapter when methods are synchronous.
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name? | readonly | string | adapters/persistence-adapter.ts:21 |
Methods
load()
load(key: string): TValues | null;Defined in: adapters/persistence-adapter.ts:22
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
TValues | null
save()
save(key: string, values: TValues): void;Defined in: adapters/persistence-adapter.ts:23
Parameters
| Parameter | Type |
|---|---|
key | string |
values | TValues |
Returns
void
clear()
clear(key: string): void;Defined in: adapters/persistence-adapter.ts:24
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
void
SchemaAdapter
Defined in: adapters/schema-adapter.ts:6
Bridge any validation library into Form Intelligence. Schema adapters are optional — core never depends on Zod/Yup/etc. Error keys are field paths (dot notation).
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name? | readonly | string | adapters/schema-adapter.ts:7 |
Methods
validate()
validate(values: TValues):
| Readonly<Record<string, string>>
| Promise<Readonly<Record<string, string>>>;Defined in: adapters/schema-adapter.ts:8
Parameters
| Parameter | Type |
|---|---|
values | TValues |
Returns
| Readonly<Record<string, string>> | Promise<Readonly<Record<string, string>>>
SubmitTransportAdapter
Defined in: adapters/submit-transport-adapter.ts:7
Transport layer for form submission (fetch, GraphQL, custom API clients). Keep UI frameworks out of this interface — values + meta only.
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
TResult | unknown |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name? | readonly | string | adapters/submit-transport-adapter.ts:11 |
Methods
submit()
submit(values: TValues, meta?: SubmitMeta): TResult | Promise<TResult>;Defined in: adapters/submit-transport-adapter.ts:12
Parameters
| Parameter | Type |
|---|---|
values | TValues |
meta? | SubmitMeta |
Returns
TResult | Promise<TResult>
FormModuleContext
Defined in: core/module-types.ts:5
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
form | readonly | FormInstance<TValues> | core/module-types.ts:6 |
config | readonly | ResolvedFormConfig<TValues> | core/module-types.ts:7 |
events | readonly | FormEventBus | core/module-types.ts:8 |
Methods
registerCleanup()
registerCleanup(cleanup: () => void): void;Defined in: core/module-types.ts:9
Parameters
| Parameter | Type |
|---|---|
cleanup | () => void |
Returns
void
FormModule
Defined in: core/module-types.ts:12
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
id | readonly | string | core/module-types.ts:13 |
order? | readonly | number | core/module-types.ts:14 |
Methods
initialize()?
optional initialize(context: FormModuleContext<TValues>): void;Defined in: core/module-types.ts:15
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
start()?
optional start(context: FormModuleContext<TValues>): void;Defined in: core/module-types.ts:16
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
stop()?
optional stop(context: FormModuleContext<TValues>): void;Defined in: core/module-types.ts:17
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
destroy()?
optional destroy(context: FormModuleContext<TValues>): void;Defined in: core/module-types.ts:18
Parameters
| Parameter | Type |
|---|---|
context | FormModuleContext<TValues> |
Returns
void
FieldAriaIds
Defined in: engines/accessibility/types.ts:1
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
errorId? | readonly | string | engines/accessibility/types.ts:2 |
descriptionId? | readonly | string | engines/accessibility/types.ts:3 |
FieldAria
Defined in: engines/accessibility/types.ts:9
CamelCase ARIA snapshot for adapters and FieldController.
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
ariaInvalid | readonly | boolean | engines/accessibility/types.ts:10 |
ariaRequired | readonly | boolean | engines/accessibility/types.ts:11 |
ariaDescribedBy | readonly | string | undefined | engines/accessibility/types.ts:12 |
FieldAriaAttributes
Defined in: engines/accessibility/types.ts:18
Spread-friendly DOM attributes ({...field.aria.attributes}).
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
aria-invalid | readonly | boolean | engines/accessibility/types.ts:19 |
aria-required | readonly | boolean | undefined | engines/accessibility/types.ts:20 |
aria-describedby | readonly | string | undefined | engines/accessibility/types.ts:21 |
ComputeFieldAriaInput
Defined in: engines/accessibility/types.ts:24
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
error? | readonly | string | - | engines/accessibility/types.ts:25 |
required? | readonly | boolean | True when presentation/UI marks the field required. | engines/accessibility/types.ts:27 |
ids? | readonly | FieldAriaIds | - | engines/accessibility/types.ts:28 |
FieldAriaResult
Defined in: engines/accessibility/types.ts:31
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
aria | readonly | FieldAria | engines/accessibility/types.ts:32 |
attributes | readonly | FieldAriaAttributes | engines/accessibility/types.ts:33 |
CalculationBuilder
Defined in: engines/calculation/calculation-builder.ts:4
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Methods
from()
from(...deps: string[]): CalculationBuilder<TValues>;Defined in: engines/calculation/calculation-builder.ts:7
Parameters
| Parameter | Type |
|---|---|
...deps | string[] |
Returns
CalculationBuilder<TValues>
lazy()
lazy(enabled?: boolean): CalculationBuilder<TValues>;Defined in: engines/calculation/calculation-builder.ts:8
Parameters
| Parameter | Type |
|---|---|
enabled? | boolean |
Returns
CalculationBuilder<TValues>
memoized()
memoized(enabled?: boolean): CalculationBuilder<TValues>;Defined in: engines/calculation/calculation-builder.ts:9
Parameters
| Parameter | Type |
|---|---|
enabled? | boolean |
Returns
CalculationBuilder<TValues>
markDirty()
markDirty(enabled?: boolean): CalculationBuilder<TValues>;Defined in: engines/calculation/calculation-builder.ts:10
Parameters
| Parameter | Type |
|---|---|
enabled? | boolean |
Returns
CalculationBuilder<TValues>
compute()
compute(fn: (ctx: CalculationComputeContext<TValues>) => unknown): void;Defined in: engines/calculation/calculation-builder.ts:11
Parameters
| Parameter | Type |
|---|---|
fn | (ctx: CalculationComputeContext<TValues>) => unknown |
Returns
void
CalculationDefinition
Defined in: engines/calculation/run-calculations.ts:10
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
path | readonly | string | - | engines/calculation/run-calculations.ts:11 |
compute | readonly | (context: CalculationComputeContext<TValues>) => unknown | - | engines/calculation/run-calculations.ts:12 |
deps? | readonly | readonly string[] | - | engines/calculation/run-calculations.ts:13 |
markDirty? | readonly | boolean | When true, writing the derived value marks the field dirty. Default false. | engines/calculation/run-calculations.ts:15 |
lazy? | readonly | boolean | Skip initial compute on register; still runs when deps change. | engines/calculation/run-calculations.ts:17 |
memoized? | readonly | boolean | Skip compute when dependency fingerprint is unchanged. | engines/calculation/run-calculations.ts:19 |
CalculateOptions
Defined in: engines/calculation/run-calculations.ts:22
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
deps? | readonly | readonly string[] | engines/calculation/run-calculations.ts:23 |
markDirty? | readonly | boolean | engines/calculation/run-calculations.ts:24 |
lazy? | readonly | boolean | engines/calculation/run-calculations.ts:25 |
memoized? | readonly | boolean | engines/calculation/run-calculations.ts:26 |
compute | readonly | (context: { values: TValues; }) => unknown | engines/calculation/run-calculations.ts:27 |
DependencyRegistrar()
Defined in: engines/dependency/registrar.ts:10
Type Parameters
| Type Parameter | Default type |
|---|---|
_TValues extends Record<string, unknown> | Record<string, unknown> |
DependencyRegistrar(map: DependencyMap): DependencyRegistrar<_TValues>;Defined in: engines/dependency/registrar.ts:13
Parameters
| Parameter | Type |
|---|---|
map | DependencyMap |
Returns
DependencyRegistrar<_TValues>
Methods
link()
link(parent: string): {
to: {
effect: DependencyRegistrar<_TValues>;
};
};Defined in: engines/dependency/registrar.ts:14
Parameters
| Parameter | Type |
|---|---|
parent | string |
Returns
{
to: {
effect: DependencyRegistrar<_TValues>;
};
}| Name | Type | Defined in |
|---|---|---|
to() | (child: string) => { effect: DependencyRegistrar<_TValues>; } | engines/dependency/registrar.ts:15 |
edge()
edge(config: DependencyEdgeConfig & {
to: string;
}): DependencyRegistrar<_TValues>;Defined in: engines/dependency/registrar.ts:19
Parameters
| Parameter | Type |
|---|---|
config | DependencyEdgeConfig & { to: string; } |
Returns
DependencyRegistrar<_TValues>
inspect()
inspect(): DependencyGraph;Defined in: engines/dependency/registrar.ts:20
Returns
DependencyEdgeConfig
Defined in: engines/dependency/types.ts:5
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
from | readonly | string | readonly string[] | engines/dependency/types.ts:6 |
actions? | readonly | readonly DependencyAction[] | engines/dependency/types.ts:7 |
clearValue? | readonly | unknown | engines/dependency/types.ts:8 |
DependencyEdge
Defined in: engines/dependency/types.ts:14
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
from | readonly | string | - | engines/dependency/types.ts:15 |
to | readonly | string | - | engines/dependency/types.ts:16 |
actions | readonly | readonly DependencyAction[] | - | engines/dependency/types.ts:17 |
clearValue? | readonly | unknown | - | engines/dependency/types.ts:18 |
inferred? | readonly | boolean | Inferred from FieldOptions.dependsOn — cycles warn; explicit edges throw. | engines/dependency/types.ts:20 |
DependencyNode
Defined in: engines/dependency/types.ts:23
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
path | readonly | string | engines/dependency/types.ts:24 |
parents | readonly | readonly string[] | engines/dependency/types.ts:25 |
children | readonly | readonly string[] | engines/dependency/types.ts:26 |
DependencyGraph
Defined in: engines/dependency/types.ts:29
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
nodes | readonly | ReadonlyMap<string, DependencyNode> | engines/dependency/types.ts:30 |
edges | readonly | readonly DependencyEdge[] | engines/dependency/types.ts:31 |
Methods
dependentsOf()
dependentsOf(path: string): readonly string[];Defined in: engines/dependency/types.ts:32
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
readonly string[]
parentsOf()
parentsOf(path: string): readonly string[];Defined in: engines/dependency/types.ts:33
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
readonly string[]
topoOrder()
topoOrder(seeds?: readonly string[]): readonly string[];Defined in: engines/dependency/types.ts:34
Parameters
| Parameter | Type |
|---|---|
seeds? | readonly string[] |
Returns
readonly string[]
CascadeResult
Defined in: engines/dependency/types.ts:37
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
clears | readonly | readonly { path: string; clearValue: unknown; }[] | engines/dependency/types.ts:38 |
revalidate | readonly | readonly string[] | engines/dependency/types.ts:39 |
recompute | readonly | readonly string[] | engines/dependency/types.ts:40 |
reloadOptions | readonly | readonly string[] | engines/dependency/types.ts:41 |
PresentationState
Defined in: engines/presentation/resolve.ts:20
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
field | readonly | FieldUiState | engines/presentation/resolve.ts:21 |
options | readonly | readonly FieldOption[] | undefined | engines/presentation/resolve.ts:22 |
form | readonly | FormUiState | engines/presentation/resolve.ts:23 |
PresentationSnapshot
Defined in: engines/presentation/resolve.ts:26
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
fieldUi | readonly | FieldUiMap | engines/presentation/resolve.ts:27 |
formUi | readonly | FormUiState | engines/presentation/resolve.ts:28 |
fieldOptions | readonly | Readonly<Record<FieldPath, readonly FieldOption[]>> | engines/presentation/resolve.ts:29 |
TransformContext
Defined in: engines/transform/types.ts:28
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
path | readonly | string | engines/transform/types.ts:31 |
values | readonly | TValues | engines/transform/types.ts:32 |
signal? | readonly | AbortSignal | engines/transform/types.ts:33 |
SanitizeOptions
Defined in: engines/transform/types.ts:41
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
stripHtml? | readonly | boolean | Strip simple HTML tags. Default true when sanitize: true. | engines/transform/types.ts:43 |
stripControlChars? | readonly | boolean | Strip C0 control chars except tab/newline. Default true when sanitize: true. | engines/transform/types.ts:45 |
TransformPipelineOptions
Defined in: engines/transform/types.ts:48
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
trim? | readonly | boolean | "start" | "end" | "both" | engines/transform/types.ts:49 |
normalize? | readonly | boolean | "nfc" | "nfd" | engines/transform/types.ts:50 |
sanitize? | readonly | boolean | SanitizeOptions | engines/transform/types.ts:51 |
parse? | readonly | Parser | engines/transform/types.ts:52 |
stages? | readonly | readonly TransformFn<Record<string, unknown>>[] | engines/transform/types.ts:53 |
TransformPipelineHandle
Defined in: engines/transform/types.ts:56
Methods
pipe()
pipe(...stages: TransformFn<Record<string, unknown>>[]): TransformPipelineHandle;Defined in: engines/transform/types.ts:57
Parameters
| Parameter | Type |
|---|---|
...stages | TransformFn<Record<string, unknown>>[] |
Returns
clear()
clear(): void;Defined in: engines/transform/types.ts:58
Returns
void
FieldUiState
Defined in: engines/workflow/types.ts:3
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
visible | boolean | - | engines/workflow/types.ts:4 |
disabled | boolean | - | engines/workflow/types.ts:5 |
required | boolean | undefined | - | engines/workflow/types.ts:6 |
readOnly? | boolean | Additive — when true, controls should be non-editable but still focusable. | engines/workflow/types.ts:8 |
busy? | boolean | Additive — e.g. async option load / validating. | engines/workflow/types.ts:10 |
hasError? | boolean | Derived UI projection (validation state): raw error present. Distinct from showError (whether to display). | engines/workflow/types.ts:15 |
errorMessage? | string | Derived UI projection: error string when present. | engines/workflow/types.ts:17 |
showError? | boolean | Derived UI projection (UI state): whether the error should be displayed under the active errorDisplay policy. | engines/workflow/types.ts:22 |
status? | "validating" | "error" | "success" | "idle" | Derived UI projection: exactly one of validating | error |
FormUiState
Defined in: engines/workflow/types.ts:29
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
submitDisabled | readonly | boolean | engines/workflow/types.ts:30 |
FieldOption
Defined in: engines/workflow/types.ts:33
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
label | readonly | string | engines/workflow/types.ts:34 |
value | readonly | string | engines/workflow/types.ts:35 |
RuleContext
Defined in: engines/workflow/types.ts:38
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
values | readonly | TValues | engines/workflow/types.ts:39 |
Methods
show()
show(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:40
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
hide()
hide(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:41
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
require()
require(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:42
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
optional()
optional(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:43
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
enable()
enable(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:44
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
disable()
disable(...paths: readonly string[]): void;Defined in: engines/workflow/types.ts:45
Parameters
| Parameter | Type |
|---|---|
...paths | readonly string[] |
Returns
void
disableSubmit()
disableSubmit(): void;Defined in: engines/workflow/types.ts:46
Returns
void
enableSubmit()
enableSubmit(): void;Defined in: engines/workflow/types.ts:47
Returns
void
setValue()
setValue(path: string, value: unknown): void;Defined in: engines/workflow/types.ts:48
Parameters
| Parameter | Type |
|---|---|
path | string |
value | unknown |
Returns
void
FormRuleDefinition
Defined in: engines/workflow/types.ts:51
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
watch | readonly | string | engines/workflow/types.ts:54 |
equals? | readonly | unknown | engines/workflow/types.ts:55 |
notEquals? | readonly | unknown | engines/workflow/types.ts:56 |
greaterThan? | readonly | number | engines/workflow/types.ts:57 |
lessThan? | readonly | number | engines/workflow/types.ts:58 |
show? | readonly | readonly string[] | engines/workflow/types.ts:59 |
hide? | readonly | readonly string[] | engines/workflow/types.ts:60 |
require? | readonly | readonly string[] | engines/workflow/types.ts:61 |
optional? | readonly | readonly string[] | engines/workflow/types.ts:62 |
enable? | readonly | readonly string[] | engines/workflow/types.ts:63 |
disable? | readonly | readonly string[] | engines/workflow/types.ts:64 |
disableSubmit? | readonly | boolean | engines/workflow/types.ts:65 |
changes? | readonly | (value: unknown, values: TValues) => | readonly FieldOption[] | Promise<readonly FieldOption[]> | engines/workflow/types.ts:66 |
populate? | readonly | string | engines/workflow/types.ts:70 |
then? | readonly | (context: RuleContext<TValues>) => void | engines/workflow/types.ts:71 |
WizardStep
Defined in: engines/workflow/types.ts:76
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
id? | readonly | string | - | engines/workflow/types.ts:77 |
fields? | readonly | readonly string[] | - | engines/workflow/types.ts:78 |
validate? | readonly | boolean | - | engines/workflow/types.ts:79 |
when? | readonly | (values: Record<string, unknown>) => boolean | Skip this step when predicate returns false (conditional steps MVP). | engines/workflow/types.ts:81 |
next? | readonly | | string | ((values: Record<string, unknown>) => string | undefined) | Explicit next step id, or resolver from values. | engines/workflow/types.ts:83 |
canLeave? | readonly | (ctx: WizardGuardContext) => boolean | Promise<boolean> | - | engines/workflow/types.ts:84 |
canEnter? | readonly | (ctx: WizardGuardContext) => boolean | Promise<boolean> | - | engines/workflow/types.ts:85 |
WizardGuardContext
Defined in: engines/workflow/types.ts:88
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
values | readonly | TValues | engines/workflow/types.ts:91 |
fromStepId | readonly | string | undefined | engines/workflow/types.ts:92 |
toStepId | readonly | string | engines/workflow/types.ts:93 |
signal | readonly | AbortSignal | engines/workflow/types.ts:94 |
WizardConfig
Defined in: engines/workflow/types.ts:102
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
steps | readonly | readonly WizardStep[] | - | engines/workflow/types.ts:103 |
initialStep? | readonly | number | - | engines/workflow/types.ts:104 |
goToValidation? | readonly | WizardNavigateValidation | Default validation for goTo. - all — validate entire form (SHIPPED default) - step — validate current step fields only - none — skip validation | engines/workflow/types.ts:111 |
persistStepInDraft? | readonly | boolean | When true, draft save/restore includes currentStep. | engines/workflow/types.ts:113 |
WizardStepGraphNode
Defined in: engines/workflow/types.ts:116
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
id | readonly | string | engines/workflow/types.ts:117 |
index | readonly | number | engines/workflow/types.ts:118 |
nextIds | readonly | readonly string[] | engines/workflow/types.ts:119 |
WizardStepGraph
Defined in: engines/workflow/types.ts:122
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
nodes | readonly | readonly WizardStepGraphNode[] | engines/workflow/types.ts:123 |
PluginErrorReport
Defined in: plugins/compat.ts:19
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
plugin? | readonly | string | plugins/compat.ts:20 |
hook? | readonly | string | plugins/compat.ts:21 |
phase? | readonly | string | plugins/compat.ts:22 |
error | readonly | unknown | plugins/compat.ts:23 |
MiddlewareContext
Defined in: plugins/middleware.ts:15
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
form | readonly | FormInstance<TValues> | plugins/middleware.ts:18 |
phase | readonly | MiddlewarePhase | plugins/middleware.ts:19 |
signal | readonly | AbortSignal | plugins/middleware.ts:20 |
meta | readonly | Readonly<Record<string, unknown>> | plugins/middleware.ts:21 |
Methods
halt()
halt(reason?: string): void;Defined in: plugins/middleware.ts:22
Parameters
| Parameter | Type |
|---|---|
reason? | string |
Returns
void
MiddlewareRegistration
Defined in: plugins/middleware.ts:30
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name | readonly | string | plugins/middleware.ts:31 |
order? | readonly | number | plugins/middleware.ts:32 |
phases? | readonly | readonly MiddlewarePhase[] | plugins/middleware.ts:33 |
MiddlewareRunResult
Defined in: plugins/middleware.ts:95
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
halted | readonly | boolean | plugins/middleware.ts:96 |
reason? | readonly | string | plugins/middleware.ts:97 |
AsyncRetryPolicy
Defined in: types/async-validation.ts:9
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
maxAttempts | readonly | number | Total attempts including the first; minimum 1. | types/async-validation.ts:11 |
delayMs? | readonly | number | ((attempt: number) => number) | Attempt is 1-based after a failure. | types/async-validation.ts:13 |
shouldRetry? | readonly | (error: unknown, attempt: number) => boolean | - | types/async-validation.ts:14 |
AsyncCachePolicy
Defined in: types/async-validation.ts:17
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
ttl | readonly | TtlInput | - | types/async-validation.ts:18 |
storage? | readonly | "memory" | "session" | Default "memory". "session" is accepted for API compatibility but is memory-only — async validation outcomes are never written to sessionStorage (cleartext sensitive-data policy). | types/async-validation.ts:24 |
maxEntries? | readonly | number | Default 256. | types/async-validation.ts:26 |
AsyncValidatorOptions
Defined in: types/async-validation.ts:29
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
validate | readonly | (value: unknown, context: ValidationContext<TValues> & { signal: AbortSignal; }) => | ValidatorResult | Promise<ValidatorResult> | types/async-validation.ts:32 |
debounce? | readonly | number | types/async-validation.ts:37 |
retry? | readonly | number | AsyncRetryPolicy | types/async-validation.ts:38 |
timeout? | readonly | number | types/async-validation.ts:39 |
cache? | readonly | false | TtlInput | AsyncCachePolicy | types/async-validation.ts:40 |
abortPrevious? | readonly | boolean | types/async-validation.ts:41 |
preventDuplicates? | readonly | boolean | types/async-validation.ts:42 |
cacheKey? | readonly | (value: unknown, context: ValidationContext<TValues>) => string | types/async-validation.ts:43 |
sharedCache? | readonly | string | boolean | types/async-validation.ts:44 |
offline? | readonly | "skip" | "fail" | "queue" | types/async-validation.ts:45 |
AsyncJob
Defined in: types/async-validation.ts:48
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
id | readonly | string | types/async-validation.ts:49 |
path | readonly | string | types/async-validation.ts:50 |
generation | readonly | number | types/async-validation.ts:51 |
cacheKey | readonly | string | types/async-validation.ts:52 |
signal | readonly | AbortSignal | types/async-validation.ts:53 |
startedAt | readonly | number | types/async-validation.ts:54 |
status | readonly | "scheduled" | "running" | "settled" | "aborted" | "timeout" | "queued" | types/async-validation.ts:55 |
FieldMetaState
Defined in: types/index.ts:3
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
isValidating | readonly | boolean | types/index.ts:4 |
label? | readonly | string | types/index.ts:5 |
description? | readonly | string | types/index.ts:6 |
hidden? | readonly | boolean | types/index.ts:7 |
ValidationFormAccessor
Defined in: types/index.ts:69
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Methods
get()
get(path: string): unknown;Defined in: types/index.ts:70
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
unknown
values()
values(): TValues;Defined in: types/index.ts:71
Returns
TValues
ValidationContext
Defined in: types/index.ts:74
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
values | readonly | TValues | - | types/index.ts:75 |
path | readonly | string | - | types/index.ts:76 |
form | readonly | ValidationFormAccessor<TValues> | - | types/index.ts:77 |
signal? | readonly | AbortSignal | Present when validation is tied to an in-flight async job (Phase 4A). | types/index.ts:79 |
CustomFieldValidatorContext
Defined in: types/index.ts:110
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
value | readonly | unknown | types/index.ts:111 |
path | readonly | string | types/index.ts:112 |
form | readonly | ValidationFormAccessor<TValues> | types/index.ts:113 |
FieldSchemaConfig
Defined in: types/index.ts:120
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
type? | readonly | BuiltInFieldType | types/index.ts:121 |
required? | readonly | boolean | types/index.ts:122 |
email? | readonly | boolean | types/index.ts:123 |
password? | readonly | boolean | types/index.ts:124 |
url? | readonly | boolean | types/index.ts:125 |
minLength? | readonly | number | types/index.ts:126 |
validate? | readonly | FieldValidateRules | types/index.ts:127 |
validators? | readonly | readonly CustomFieldValidator<Record<string, unknown>>[] | types/index.ts:128 |
format? | readonly | | Formatter | "phone" | "currency" | "slug" | "philippine-phone" | "credit-card" | types/index.ts:129 |
FieldOptions
Defined in: types/index.ts:141
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
defaultValue? | readonly | unknown | - | types/index.ts:142 |
validators? | readonly | readonly Validator<TValues>[] | - | types/index.ts:143 |
validateOn? | readonly | ValidationMode | - | types/index.ts:144 |
dependsOn? | readonly | readonly string[] | - | types/index.ts:145 |
format? | readonly | Formatter | - | types/index.ts:146 |
parse? | readonly | Parser | - | types/index.ts:147 |
formatOnDisplay? | readonly | boolean | - | types/index.ts:148 |
parseOnInput? | readonly | boolean | - | types/index.ts:149 |
transform? | readonly | | TransformPipelineOptions | readonly TransformFn<TValues>[] | Canonical inbound transforms (trim/normalize/sanitize/parse/stages). Distinct from display format/parse — see /transform and TRANSFORM_INBOUND_ORDER. | types/index.ts:154 |
label? | readonly | string | - | types/index.ts:157 |
description? | readonly | string | - | types/index.ts:158 |
hidden? | readonly | boolean | - | types/index.ts:159 |
metadata? | readonly | Readonly<Record<string, unknown>> | - | types/index.ts:160 |
FieldHandle
Defined in: types/index.ts:163
Type Parameters
| Type Parameter |
|---|
_TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
path | readonly | string | - | types/index.ts:164 |
value | readonly | unknown | - | types/index.ts:165 |
error | readonly | string | undefined | - | types/index.ts:166 |
touched | readonly | boolean | - | types/index.ts:167 |
dirty | readonly | boolean | - | types/index.ts:168 |
visited | readonly | boolean | - | types/index.ts:169 |
ui | readonly | FieldUiView | Full presentation maps (same sources as state.fieldUi / formUi / fieldOptions). | types/index.ts:171 |
meta | readonly | FieldState & FieldMetaState | Field state + meta (controller surface). | types/index.ts:173 |
aria | readonly | FieldAriaResult | Accessibility snapshot + spread attributes. Register element ids via setAriaIds so aria-describedby can link errors/help. | types/index.ts:178 |
Methods
setValue()
setValue(value: unknown): void;Defined in: types/index.ts:179
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
void
setTouched()
setTouched(touched?: boolean): void;Defined in: types/index.ts:180
Parameters
| Parameter | Type |
|---|---|
touched? | boolean |
Returns
void
setVisited()
setVisited(visited?: boolean): void;Defined in: types/index.ts:181
Parameters
| Parameter | Type |
|---|---|
visited? | boolean |
Returns
void
setAriaIds()
setAriaIds(ids: FieldAriaIds): void;Defined in: types/index.ts:183
Register error/description element ids for aria-describedby.
Parameters
| Parameter | Type |
|---|---|
ids | FieldAriaIds |
Returns
void
onBlur()
onBlur(): void;Defined in: types/index.ts:184
Returns
void
onFocus()
onFocus(): void;Defined in: types/index.ts:185
Returns
void
validate()
validate(): Promise<boolean>;Defined in: types/index.ts:186
Returns
Promise<boolean>
bind()
bind(): FieldBinding;Defined in: types/index.ts:187
Returns
FieldBinding
Defined in: types/index.ts:190
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
name | readonly | string | types/index.ts:191 |
value | readonly | unknown | types/index.ts:192 |
onChange | readonly | (value: unknown) => void | types/index.ts:193 |
onBlur | readonly | () => void | types/index.ts:194 |
onFocus | readonly | () => void | types/index.ts:195 |
AutosaveConfig
Defined in: types/index.ts:202
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
enabled? | readonly | boolean | types/index.ts:203 |
debounceMs? | readonly | number | types/index.ts:204 |
onSave | readonly | (values: Record<string, unknown>) => void | Promise<void> | types/index.ts:205 |
DraftConfig
Defined in: types/index.ts:208
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
enabled? | readonly | boolean | - | types/index.ts:209 |
storageKey? | readonly | string | - | types/index.ts:210 |
storage? | readonly | DraftStorageKind | - | types/index.ts:211 |
adapter? | readonly | DraftStorageAdapter | - | types/index.ts:212 |
onRestore? | readonly | (values: Record<string, unknown>) => void | - | types/index.ts:213 |
promptOnRestore? | readonly | boolean | - | types/index.ts:214 |
onRestorePrompt? | readonly | (values: Record<string, unknown>) => boolean | - | types/index.ts:215 |
versioning? | readonly | boolean | Persist versioned envelopes (DraftEnvelopeV1) instead of raw values. | types/index.ts:217 |
schemaVersion? | readonly | string | App schema id compared / migrated when envelopes are enabled. | types/index.ts:219 |
migrateDraft? | readonly | (envelope: DraftEnvelopeV1) => DraftEnvelopeV1 | Migrate an envelope before restore; throw to reject restore. | types/index.ts:221 |
RestoreDraftOptions
Defined in: types/index.ts:226
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
force? | readonly | boolean | Default false — if the form is dirty, no-op unless force (D-RESTORE-RACE). | types/index.ts:228 |
prompt? | readonly | boolean | Default false — if true, call DraftConfig.onRestorePrompt when set. | types/index.ts:230 |
merge? | readonly | "overlay" | "replace" | Default overlay — { ...defaults, ...draft }. replace uses draft keys only. | types/index.ts:232 |
AnalyticsConfig
Defined in: types/index.ts:235
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
enabled? | readonly | boolean | - | types/index.ts:236 |
includePaths? | readonly | readonly string[] | When set, only these paths appear in path-keyed metrics (deny-by-default for others). Values are never captured — paths only. | types/index.ts:241 |
excludePaths? | readonly | readonly string[] | Paths omitted from path-keyed metrics. | types/index.ts:243 |
onSnapshot? | readonly | (snapshot: FormAnalyticsSnapshot) => void | Invoked whenever a snapshot is produced via getAnalytics(). | types/index.ts:245 |
FormAnalyticsSnapshot
Defined in: types/index.ts:248
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
startedAt | readonly | number | types/index.ts:249 |
completedAt | readonly | number | null | types/index.ts:250 |
errorCount | readonly | number | types/index.ts:251 |
errorsByField | readonly | Readonly<Record<FieldPath, number>> | types/index.ts:252 |
abandonedAt | readonly | number | null | types/index.ts:253 |
currentStep | readonly | number | types/index.ts:254 |
fieldViews | readonly | Readonly<Record<FieldPath, number>> | types/index.ts:255 |
dropOffField | readonly | string | null | types/index.ts:256 |
timeToCompleteMs | readonly | number | null | types/index.ts:257 |
timeToFirstErrorMs | readonly | number | null | types/index.ts:258 |
OfflineQueueConfig
Defined in: types/index.ts:261
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
enabled? | readonly | boolean | - | types/index.ts:262 |
storageKey? | readonly | string | - | types/index.ts:263 |
maxItems? | readonly | number | Soft cap on queued items. | types/index.ts:265 |
overflow? | readonly | OfflineOverflowPolicy | Behavior when maxItems is exceeded. Default: drop-oldest. | types/index.ts:270 |
idempotencyKey? | readonly | (values: Record<string, unknown>) => string | Deduplicate pending items with the same key (skip enqueue). | types/index.ts:272 |
onConflict? | readonly | (local: QueuedSubmission<Record<string, unknown>>, error: unknown) => | void | OfflineConflictAction | Promise<void | OfflineConflictAction> | Called when a queued item fails during flush. - keep (default) — leave at head, stop flush - drop — discard and continue - retry — keep at head and continue attempting | types/index.ts:279 |
onOverflow? | readonly | (dropped: QueuedSubmission<Record<string, unknown>>, policy: OfflineOverflowPolicy) => void | - | types/index.ts:286 |
KeyboardShortcutConfig
Defined in: types/index.ts:292
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
combo | readonly | string | types/index.ts:293 |
action | readonly | "submit" | "saveDraft" | "undo" | "redo" | types/index.ts:294 |
WorkflowConfig
Defined in: types/index.ts:297
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
autosave? | readonly | AutosaveConfig | types/index.ts:298 |
draft? | readonly | DraftConfig | types/index.ts:299 |
wizard? | readonly | WizardConfig | types/index.ts:300 |
analytics? | readonly | AnalyticsConfig | types/index.ts:301 |
offlineQueue? | readonly | OfflineQueueConfig | types/index.ts:302 |
keyboard? | readonly | readonly KeyboardShortcutConfig[] | types/index.ts:303 |
SubmissionQueueState
Defined in: types/index.ts:306
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
pending | readonly | number | types/index.ts:307 |
flushing | readonly | boolean | types/index.ts:308 |
SetValueOptions
Defined in: types/index.ts:311
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
recordHistory? | readonly | boolean | types/index.ts:312 |
markDirty? | readonly | boolean | types/index.ts:313 |
SubmitOptions
Defined in: types/index.ts:316
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
preventDoubleSubmit? | readonly | boolean | types/index.ts:317 |
includeDiff? | readonly | boolean | types/index.ts:318 |
retry? | readonly | number | RetryPolicy | types/index.ts:319 |
FormChangeRecord
Defined in: types/index.ts:327
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
path | readonly | string | - | types/index.ts:328 |
type | readonly | FormChangeType | - | types/index.ts:329 |
previous? | readonly | unknown | - | types/index.ts:330 |
current? | readonly | unknown | - | types/index.ts:331 |
from? | readonly | string | Present when type is moved (source path). | types/index.ts:333 |
FormDiffMetadata
Defined in: types/index.ts:336
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
durationMs | readonly | number | types/index.ts:337 |
changeCount | readonly | number | types/index.ts:338 |
addedCount | readonly | number | types/index.ts:339 |
removedCount | readonly | number | types/index.ts:340 |
changedCount | readonly | number | types/index.ts:341 |
unchangedCount | readonly | number | types/index.ts:342 |
movedCount | readonly | number | types/index.ts:343 |
FormDiffResult
Defined in: types/index.ts:346
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
changes | readonly | readonly FormChangeRecord[] | types/index.ts:347 |
hasChanges | readonly | boolean | types/index.ts:348 |
metadata | readonly | FormDiffMetadata | types/index.ts:349 |
FormDiffOptions
Defined in: types/index.ts:352
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
maxDepth? | readonly | number | types/index.ts:353 |
includeUnchanged? | readonly | boolean | types/index.ts:354 |
treatUndefinedAsMissing? | readonly | boolean | types/index.ts:355 |
SubmitSecurityCaptcha
Defined in: types/index.ts:359
CAPTCHA token under the submission security namespace (ADR-CAP-001).
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
provider | readonly | string | types/index.ts:360 |
token | readonly | string | types/index.ts:361 |
expiresAt? | readonly | number | types/index.ts:362 |
SubmitSecurityMeta
Defined in: types/index.ts:369
Security namespace on submit meta. Stable path: meta.security.captcha (future: CSRF, OTP, …).
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
captcha? | readonly | SubmitSecurityCaptcha | types/index.ts:370 |
SubmitMeta
Defined in: types/index.ts:373
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
changedFields? | readonly | readonly string[] | - | types/index.ts:374 |
diff? | readonly | FormDiffResult | - | types/index.ts:375 |
signal? | readonly | AbortSignal | - | types/index.ts:376 |
security? | readonly | SubmitSecurityMeta | Populated by the Security Stage (e.g. CAPTCHA plugin). | types/index.ts:378 |
ValidateOptions
Defined in: types/index.ts:381
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
paths? | readonly | readonly string[] | types/index.ts:382 |
mode? | readonly | ValidationMode | types/index.ts:383 |
ResetOptions
Defined in: types/index.ts:386
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
values? | readonly | Partial<TValues> | types/index.ts:387 |
keepDirty? | readonly | boolean | types/index.ts:388 |
FormConfig
Defined in: types/index.ts:399
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
initialValues? | readonly | TValues | - | types/index.ts:400 |
target? | readonly | string | HTMLElement | - | types/index.ts:401 |
form? | readonly | string | HTMLElement | - | types/index.ts:402 |
schema? | readonly | | SchemaAdapter<Record<string, unknown>> | Partial<Record<string, FieldSchemaDefinition>> | - | types/index.ts:403 |
onSubmit? | readonly | (values: TValues, meta?: SubmitMeta) => void | Promise<void> | - | types/index.ts:404 |
onSubmitError? | readonly | (error: unknown) => void | - | types/index.ts:405 |
onPluginError? | readonly | PluginErrorHandler | Receives isolated plugin/hook failures (setup, hooks, destroy). Does not rethrow — form continues per Phase 15 isolation policy. | types/index.ts:410 |
validateOn? | readonly | ValidationMode | - | types/index.ts:411 |
validators? | readonly | Partial<Record<string, | Validator<TValues> | readonly Validator<TValues>[]>> | - | types/index.ts:412 |
crossFieldValidators? | readonly | readonly CrossFieldRule<TValues>[] | - | types/index.ts:415 |
formValidators? | readonly | readonly CrossFieldValidator<TValues>[] | - | types/index.ts:416 |
workflow? | readonly | WorkflowConfig | - | types/index.ts:417 |
autoSave? | readonly | AutosaveConfig & { every?: string; } | - | types/index.ts:418 |
wizard? | readonly | boolean | WizardConfig | - | types/index.ts:419 |
rules? | readonly | readonly FormRuleInput<TValues>[] | - | types/index.ts:420 |
plugins? | readonly | readonly FormPlugin<TValues>[] | Plugins registered at create time (same as calling form.use(plugin) for each entry, in order). Prefer this for declarative setup; use form.use() later for conditional or late registration. | types/index.ts:425 |
subscribe? | readonly | | FormSubscribeListener<TValues> | readonly FormSubscribeListener<TValues>[] | State listeners registered at create time (same store as form.subscribe()). Pass one listener or an array. Each receives the form instance, is invoked once after create (so UI can sync immediately), then on every state notify. Lives until form.destroy(). Prefer framework adapters for React/Vue; use this for vanilla / host UI. | types/index.ts:432 |
dependencies? | readonly | Readonly<Record<string, string | readonly string[]>> | Explicit dependency map: child → parent(s). Cycles throw ConfigurationError at registration (ADR-007). | types/index.ts:437 |
dependencyActions? | readonly | Partial<Record<string, readonly DependencyAction[]>> | Per-child action overrides for dependencies (default ["clear","revalidate"]). | types/index.ts:439 |
FieldState
Defined in: types/index.ts:444
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
touched | readonly | boolean | types/index.ts:445 |
dirty | readonly | boolean | types/index.ts:446 |
visited | readonly | boolean | types/index.ts:447 |
changed | readonly | boolean | types/index.ts:448 |
FormState
Defined in: types/index.ts:451
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
values | readonly | TValues | - | types/index.ts:452 |
errors | readonly | Readonly<Record<FieldPath, string>> | - | types/index.ts:453 |
touched | readonly | Readonly<Record<FieldPath, boolean>> | - | types/index.ts:454 |
dirty | readonly | Readonly<Record<FieldPath, boolean>> | - | types/index.ts:455 |
visited | readonly | Readonly<Record<FieldPath, boolean>> | - | types/index.ts:456 |
changed | readonly | Readonly<Record<FieldPath, boolean>> | - | types/index.ts:457 |
isSubmitting | readonly | boolean | - | types/index.ts:458 |
isValidating | readonly | boolean | - | types/index.ts:459 |
isValid | readonly | boolean | - | types/index.ts:460 |
isDirty | readonly | boolean | - | types/index.ts:461 |
isChanged | readonly | boolean | - | types/index.ts:462 |
submitCount | readonly | number | - | types/index.ts:463 |
submitPhase | readonly | SubmitPhase | Last / current submit lifecycle phase. | types/index.ts:465 |
workflow | readonly | WorkflowState | - | types/index.ts:466 |
fieldUi | readonly | FieldUiMap | - | types/index.ts:467 |
formUi | readonly | FormUiState | - | types/index.ts:468 |
fieldMeta | readonly | Readonly<Record<FieldPath, FieldMetaState>> | - | types/index.ts:469 |
fieldOptions | readonly | Readonly<Record<FieldPath, readonly FieldOption[]>> | - | types/index.ts:470 |
submissionQueue | readonly | SubmissionQueueState | - | types/index.ts:471 |
WorkflowState
Defined in: types/index.ts:474
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
currentStep | readonly | number | types/index.ts:475 |
totalSteps | readonly | number | types/index.ts:476 |
canGoNext | readonly | boolean | types/index.ts:477 |
canGoPrev | readonly | boolean | types/index.ts:478 |
progress | readonly | number | types/index.ts:479 |
isAutosaving | readonly | boolean | types/index.ts:480 |
lastAutosaveAt | readonly | number | null | types/index.ts:481 |
FormCheckpoint
Defined in: types/index.ts:489
Durable form checkpoint — distinct from getSnapshot() (external-store identity).
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
version | readonly | 1 | types/index.ts:490 |
kind | readonly | "checkpoint" | types/index.ts:491 |
capturedAt | readonly | number | types/index.ts:492 |
values | readonly | TValues | types/index.ts:493 |
errors? | readonly | Readonly<Record<string, string>> | types/index.ts:494 |
touched? | readonly | Readonly<Record<string, boolean>> | types/index.ts:495 |
dirty? | readonly | Readonly<Record<string, boolean>> | types/index.ts:496 |
visited? | readonly | Readonly<Record<string, boolean>> | types/index.ts:497 |
fieldUi? | readonly | Readonly<Record<string, FieldUiState>> | types/index.ts:498 |
workflow? | readonly | { currentStep: number; } | types/index.ts:499 |
workflow.currentStep | readonly | number | types/index.ts:499 |
CreateCheckpointOptions
Defined in: types/index.ts:502
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
include? | readonly | readonly ( | "values" | "workflow" | "touched" | "errors" | "dirty" | "visited" | "fieldUi")[] | types/index.ts:503 |
RestoreCheckpointOptions
Defined in: types/index.ts:508
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
recordHistory? | readonly | boolean | types/index.ts:509 |
restoreMeta? | readonly | boolean | types/index.ts:510 |
FormInstance
Defined in: types/index.ts:513
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
id | readonly | string | - | types/index.ts:514 |
ref | readonly | FormRef | - | types/index.ts:515 |
ui | readonly | FormUiProjection<TValues> | Derived UI projection (@jayoncode/form-intelligence/ui). Uses registered policies from ui() plugin, or package defaults. | types/index.ts:528 |
state | readonly | FormState<TValues> | Current form snapshot — same as getFormState(). | types/index.ts:555 |
workflow | public | { next: Promise<boolean>; prev: void; goTo: Promise<boolean>; getStepGraph: WizardStepGraph; visibleSteps: readonly string[]; } | - | types/index.ts:626 |
workflow.next | public | Promise<boolean> | - | types/index.ts:627 |
workflow.prev | public | void | - | types/index.ts:628 |
workflow.goTo | public | Promise<boolean> | - | types/index.ts:629 |
workflow.getStepGraph | public | WizardStepGraph | - | types/index.ts:633 |
workflow.visibleSteps | public | readonly string[] | - | types/index.ts:634 |
Methods
field()
field(path: string, options?: FieldOptions<TValues>): FieldHandle<TValues>;Defined in: types/index.ts:516
Parameters
| Parameter | Type |
|---|---|
path | string |
options? | FieldOptions<TValues> |
Returns
FieldHandle<TValues>
firstInvalidPath()
firstInvalidPath(): string | undefined;Defined in: types/index.ts:518
First path with a non-empty error (stable key order).
Returns
string | undefined
focusFirstInvalid()
focusFirstInvalid(): string | undefined;Defined in: types/index.ts:523
Focus first invalid control when document exists; SSR-safe no-op. Returns the focused path or undefined.
Returns
string | undefined
registeredFieldPaths()
registeredFieldPaths(): readonly string[];Defined in: types/index.ts:530
Paths registered via field() in registration order.
Returns
readonly string[]
pushField()
pushField(arrayPath: string, item?: unknown): string;Defined in: types/index.ts:531
Parameters
| Parameter | Type |
|---|---|
arrayPath | string |
item? | unknown |
Returns
string
removeField()
removeField(arrayPath: string, index: number): void;Defined in: types/index.ts:532
Parameters
| Parameter | Type |
|---|---|
arrayPath | string |
index | number |
Returns
void
insertField()
insertField(
arrayPath: string,
index: number,
item?: unknown): string;Defined in: types/index.ts:533
Parameters
| Parameter | Type |
|---|---|
arrayPath | string |
index | number |
item? | unknown |
Returns
string
submit()
submit(options?: SubmitOptions): Promise<boolean>;Defined in: types/index.ts:534
Parameters
| Parameter | Type |
|---|---|
options? | SubmitOptions |
Returns
Promise<boolean>
cancelSubmit()
cancelSubmit(): void;Defined in: types/index.ts:535
Returns
void
useMiddleware()
useMiddleware(middleware: MiddlewareInput<TValues>): () => void;Defined in: types/index.ts:540
Register onion middleware for submit/validate phases. Same stack as plugin hooks — see MIDDLEWARE_HOOK_MAP.
Parameters
| Parameter | Type |
|---|---|
middleware | MiddlewareInput<TValues> |
Returns
() => void
reset()
reset(options?: ResetOptions<TValues>): void;Defined in: types/index.ts:543
Parameters
| Parameter | Type |
|---|---|
options? | ResetOptions<TValues> |
Returns
void
validate()
validate(options?: ValidateOptions): Promise<boolean>;Defined in: types/index.ts:544
Parameters
| Parameter | Type |
|---|---|
options? | ValidateOptions |
Returns
Promise<boolean>
values()
Call Signature
values(): TValues;Defined in: types/index.ts:545
Returns
TValues
Call Signature
values(path: string): unknown;Defined in: types/index.ts:546
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
unknown
get()
get(path: string): unknown;Defined in: types/index.ts:547
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
unknown
errors()
errors(path?: string): string | Readonly<Record<string, string>> | undefined;Defined in: types/index.ts:548
Parameters
| Parameter | Type |
|---|---|
path? | string |
Returns
string | Readonly<Record<string, string>> | undefined
setValue()
setValue(
path: string,
value: unknown,
options?: SetValueOptions): void;Defined in: types/index.ts:549
Parameters
| Parameter | Type |
|---|---|
path | string |
value | unknown |
options? | SetValueOptions |
Returns
void
setError()
setError(path: string, message: string): void;Defined in: types/index.ts:550
Parameters
| Parameter | Type |
|---|---|
path | string |
message | string |
Returns
void
clearErrors()
clearErrors(path?: string): void;Defined in: types/index.ts:551
Parameters
| Parameter | Type |
|---|---|
path? | string |
Returns
void
getFieldState()
getFieldState(path: string): FieldState;Defined in: types/index.ts:552
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
getFieldMeta()
getFieldMeta(path: string): FieldMetaState;Defined in: types/index.ts:553
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
getFormState()
getFormState(): FormState<TValues>;Defined in: types/index.ts:556
Returns
FormState<TValues>
getSnapshot()
getSnapshot(): FormState<TValues>;Defined in: types/index.ts:558
For useSyncExternalStore(form.subscribe, form.getSnapshot). Not a durable checkpoint.
Returns
FormState<TValues>
getPresentation()
Call Signature
getPresentation(path: string): PresentationState;Defined in: types/index.ts:560
Per-path presentation (field UI + options + form UI).
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
Call Signature
getPresentation(): PresentationSnapshot;Defined in: types/index.ts:562
Full presentation maps (same sources as state.fieldUi / formUi / fieldOptions).
Returns
createCheckpoint()
createCheckpoint(options?: CreateCheckpointOptions): FormCheckpoint<TValues>;Defined in: types/index.ts:564
Durable checkpoint for undo/restore flows — see restoreCheckpoint.
Parameters
| Parameter | Type |
|---|---|
options? | CreateCheckpointOptions |
Returns
FormCheckpoint<TValues>
restoreCheckpoint()
restoreCheckpoint(checkpoint: FormCheckpoint<TValues>, options?: RestoreCheckpointOptions): void;Defined in: types/index.ts:565
Parameters
| Parameter | Type |
|---|---|
checkpoint | FormCheckpoint<TValues> |
options? | RestoreCheckpointOptions |
Returns
void
getValues()
getValues(): TValues;Defined in: types/index.ts:566
Returns
TValues
getErrors()
getErrors(): Readonly<Record<FieldPath, string>>;Defined in: types/index.ts:567
Returns
Readonly<Record<FieldPath, string>>
isValid()
isValid(): boolean;Defined in: types/index.ts:568
Returns
boolean
isSubmitting()
isSubmitting(): boolean;Defined in: types/index.ts:569
Returns
boolean
submissionGuard()
submissionGuard(options?: Pick<SubmitOptions, "preventDoubleSubmit">): SubmissionGuardResult;Defined in: types/index.ts:574
Hard submission eligibility (enforced by submit()). Distinct from form.ui.canSubmit (UX projection + disableSubmitWhen).
Parameters
| Parameter | Type |
|---|---|
options? | Pick<SubmitOptions, "preventDoubleSubmit"> |
Returns
SubmissionGuardResult
isDirty()
isDirty(): boolean;Defined in: types/index.ts:577
Returns
boolean
changedFields()
changedFields(): readonly string[];Defined in: types/index.ts:578
Returns
readonly string[]
changedSinceSubmitFields()
changedSinceSubmitFields(): readonly string[];Defined in: types/index.ts:579
Returns
readonly string[]
diffFromDefaults()
diffFromDefaults(options?: FormDiffOptions): Promise<FormDiffResult>;Defined in: types/index.ts:580
Parameters
| Parameter | Type |
|---|---|
options? | FormDiffOptions |
Returns
Promise<FormDiffResult>
diffFrom()
diffFrom(baseline: Record<string, unknown>, options?: FormDiffOptions): Promise<FormDiffResult>;Defined in: types/index.ts:581
Parameters
| Parameter | Type |
|---|---|
baseline | Record<string, unknown> |
options? | FormDiffOptions |
Returns
Promise<FormDiffResult>
when()
when(field: string): WhenRuleBuilder<TValues>;Defined in: types/index.ts:582
Parameters
| Parameter | Type |
|---|---|
field | string |
Returns
WhenRuleBuilder<TValues>
dependencies()
Call Signature
dependencies(map: Readonly<Record<string, string | readonly string[]>>): void;Defined in: types/index.ts:584
Register explicit dependency map (fail-fast on cycles).
Parameters
| Parameter | Type |
|---|---|
map | Readonly<Record<string, string | readonly string[]>> |
Returns
void
Call Signature
dependencies(): DependencyRegistrar<TValues>;Defined in: types/index.ts:586
Fluent dependency registrar + inspect().
Returns
DependencyRegistrar<TValues>
calculate()
Call Signature
calculate(path: string): CalculationBuilder<TValues>;Defined in: types/index.ts:588
Fluent derived field: form.calculate("total").from("price","qty").compute(...).
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
CalculationBuilder<TValues>
Call Signature
calculate(path: string, options:
| CalculateOptions<TValues>
| ((context: {
values: TValues;
}) => unknown)): void;Defined in: types/index.ts:589
Parameters
| Parameter | Type |
|---|---|
path | string |
options | | CalculateOptions<TValues> | ((context: { values: TValues; }) => unknown) |
Returns
void
transform()
Call Signature
transform(path: string): TransformPipelineHandle;Defined in: types/index.ts:594
Register inbound transform stages for a path.
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
Call Signature
transform(path: string, stages: readonly TransformFn<TValues>[]): void;Defined in: types/index.ts:595
Parameters
| Parameter | Type |
|---|---|
path | string |
stages | readonly TransformFn<TValues>[] |
Returns
void
saveDraft()
saveDraft(): void;Defined in: types/index.ts:599
Returns
void
restoreDraft()
restoreDraft(options?: RestoreDraftOptions): Promise<boolean>;Defined in: types/index.ts:605
Restore persisted draft into the live form (after mount). Returns true when values were applied; false when skipped (disabled / empty / declined / dirty without force / corrupt).
Parameters
| Parameter | Type |
|---|---|
options? | RestoreDraftOptions |
Returns
Promise<boolean>
undo()
undo(): boolean;Defined in: types/index.ts:606
Returns
boolean
redo()
redo(): boolean;Defined in: types/index.ts:607
Returns
boolean
getAnalytics()
getAnalytics(): FormAnalyticsSnapshot;Defined in: types/index.ts:608
Returns
flushOfflineQueue()
flushOfflineQueue(): Promise<{
flushed: number;
failed: number;
}>;Defined in: types/index.ts:609
Returns
Promise<{ flushed: number; failed: number; }>
use()
Call Signature
use(plugin: FormPlugin<TValues>): void;Defined in: types/index.ts:610
Parameters
| Parameter | Type |
|---|---|
plugin | FormPlugin<TValues> |
Returns
void
Call Signature
use<TSelected>(selector: FormSelector<TValues, TSelected>): TSelected;Defined in: types/index.ts:611
Type Parameters
| Type Parameter |
|---|
TSelected |
Parameters
| Parameter | Type |
|---|---|
selector | FormSelector<TValues, TSelected> |
Returns
TSelected
listPlugins()
listPlugins(): readonly {
name: string;
order: number;
version?: string;
}[];Defined in: types/index.ts:613
Registered plugins (name / order / version) for DevTools introspection.
Returns
readonly { name: string; order: number; version?: string; }[]
subscribe()
subscribe(listener: () => void): () => void;Defined in: types/index.ts:622
Advanced: reactive UI updates. Framework adapters call this internally. For declarative create-time listeners, prefer createForm({ subscribe }).
Parameters
| Parameter | Type |
|---|---|
listener | () => void |
Returns
() => void
on()
on(event: FormEvent, listener: () => void): () => void;Defined in: types/index.ts:623
Parameters
| Parameter | Type |
|---|---|
event | FormEvent |
listener | () => void |
Returns
() => void
destroy()
destroy(): void;Defined in: types/index.ts:624
Returns
void
registerPlugin()
registerPlugin(plugin: FormPlugin<TValues>): void;Defined in: types/index.ts:625
Parameters
| Parameter | Type |
|---|---|
plugin | FormPlugin<TValues> |
Returns
void
FormPluginSetupResult
Defined in: types/index.ts:638
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
onDestroy? | readonly | () => void | types/index.ts:639 |
FormPlugin
Defined in: types/index.ts:642
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
name | readonly | string | - | types/index.ts:643 |
version? | readonly | string | Plugin package/semver label (metadata only). | types/index.ts:645 |
engines? | readonly | string | Semver range against @jayoncode/form-intelligence (>=3.1.0, ^3.1.0, or exact). Checked at register/use. | types/index.ts:650 |
order? | readonly | number | - | types/index.ts:651 |
Methods
setup()
setup(form: FormInstance<TValues>, api: FormPluginApi<TValues>): void | FormPluginSetupResult | (() => void);Defined in: types/index.ts:652
Parameters
| Parameter | Type |
|---|---|
form | FormInstance<TValues> |
api | FormPluginApi<TValues> |
Returns
void | FormPluginSetupResult | (() => void)
Type Aliases
FieldController
type FieldController<TValues> = FieldHandle<TValues>;Defined in: adapters/controllers.ts:14
Preferred UI binding surface over reaching into form internals (Phase 16). Alias of the enhanced FieldHandle (includes aria / setAriaIds).
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
DependencyAction
type DependencyAction = "clear" | "reloadOptions" | "revalidate" | "recompute" | "preserve";Defined in: engines/dependency/types.ts:3
DependencyMap
type DependencyMap = Readonly<Record<FieldPath, FieldPath | readonly FieldPath[]>>;Defined in: engines/dependency/types.ts:12
Map sugar: child path → parent path(s).
TransformFn
type TransformFn<TValues> = (value: unknown, ctx: TransformContext<TValues>) => unknown;Defined in: engines/transform/types.ts:36
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
value | unknown |
ctx | TransformContext<TValues> |
Returns
unknown
FieldUiMap
type FieldUiMap = Readonly<Record<string, FieldUiState>>;Defined in: engines/workflow/types.ts:74
WizardNavigateValidation
type WizardNavigateValidation = "step" | "all" | "none";Defined in: engines/workflow/types.ts:98
Validation scope for workflow.goTo. Default "all" preserves SHIPPED behavior.
FormatPreset
type FormatPreset = "philippine-phone" | "credit-card" | "phone" | "currency" | "slug";Defined in: format/presets.ts:12
Formatter
type Formatter = (value: unknown) => unknown;Defined in: format/types.ts:1
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
unknown
Parser
type Parser = (value: unknown) => unknown;Defined in: format/types.ts:2
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
unknown
PluginPipelineStage
type PluginPipelineStage = typeof PLUGIN_PIPELINE_STAGES[number];Defined in: plugins/compat.ts:17
PluginErrorHandler
type PluginErrorHandler = (report: PluginErrorReport) => void;Defined in: plugins/compat.ts:26
Parameters
| Parameter | Type |
|---|---|
report | PluginErrorReport |
Returns
void
MiddlewarePhase
type MiddlewarePhase =
| "beforeValidate"
| "afterValidate"
| "beforeSubmit"
| "afterSubmit"
| "submitError"
| "beforeSetValue"
| "afterSetValue";Defined in: plugins/middleware.ts:4
Phases that onion middleware and plugin hooks can observe.
MiddlewareNext
type MiddlewareNext = () => Promise<void>;Defined in: plugins/middleware.ts:13
Returns
Promise<void>
FormMiddleware
type FormMiddleware<TValues> = (ctx: MiddlewareContext<TValues>, next: MiddlewareNext) => void | Promise<void>;Defined in: plugins/middleware.ts:25
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
ctx | MiddlewareContext<TValues> |
next | MiddlewareNext |
Returns
void | Promise<void>
MiddlewareInput
type MiddlewareInput<TValues> =
| FormMiddleware<TValues> & Partial<MiddlewareRegistration>
| MiddlewareRegistration & {
run: FormMiddleware<TValues>;
};Defined in: plugins/middleware.ts:36
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
TtlInput
type TtlInput =
| number
| `${number}ms`
| `${number}s`
| `${number}m`
| `${number}h`;Defined in: types/async-validation.ts:7
FieldPath
type FieldPath = string;Defined in: types/index.ts:1
FormRuleInput
type FormRuleInput<TValues> =
| FormRuleDefinition<TValues>
| WhenRuleBuilder<TValues>
| WhenRuleBuilder;Defined in: types/index.ts:48
Plain rule object or a when() builder (createForm calls .build() for builders).
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
ValidationMode
type ValidationMode = "onChange" | "onBlur" | "onSubmit" | "onTouched" | "all";Defined in: types/index.ts:54
FormEvent
type FormEvent =
| "change"
| "blur"
| "focus"
| "reset"
| "submit"
| "validate"
| "validated"
| "autosave"
| "draft";Defined in: types/index.ts:56
ValidatorResult
type ValidatorResult = true | false | string | undefined;Defined in: types/index.ts:67
BuiltInFieldType
type BuiltInFieldType = "text" | "email" | "password" | "url";Defined in: types/index.ts:99
CustomFieldValidator
type CustomFieldValidator<TValues> = (context: CustomFieldValidatorContext<TValues>) =>
| ValidatorResult
| Promise<ValidatorResult>;Defined in: types/index.ts:116
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
context | CustomFieldValidatorContext<TValues> |
Returns
| ValidatorResult | Promise<ValidatorResult>
FormRef
type FormRef = (element: HTMLFormElement | null) => void;Defined in: types/index.ts:132
Parameters
| Parameter | Type |
|---|---|
element | HTMLFormElement | null |
Returns
void
FieldSchemaDefinition
type FieldSchemaDefinition =
| BuiltInFieldType
| FieldSchemaConfig;Defined in: types/index.ts:134
Validator
type Validator<TValues> = (value: unknown, context: ValidationContext<TValues>) =>
| ValidatorResult
| Promise<ValidatorResult>;Defined in: types/index.ts:136
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
value | unknown |
context | ValidationContext<TValues> |
Returns
| ValidatorResult | Promise<ValidatorResult>
SubmitPhase
type SubmitPhase = "idle" | "validating" | "submitting" | "success" | "error";Defined in: types/index.ts:323
Submit lifecycle phase (Phase 10). isSubmitting remains the boolean loading flag.
FormSubscribeListener
type FormSubscribeListener<TValues> = (form: FormInstance<TValues>) => void;Defined in: types/index.ts:395
State listener for createForm({ subscribe }). Receives the form instance. Lives until form.destroy() — use form.subscribe() when you need unsubscribe.
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
form | FormInstance<TValues> |
Returns
void
FormSelector
type FormSelector<TValues, TSelected> = (state: FormState<TValues>) => TSelected;Defined in: types/index.ts:484
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
TSelected |
Parameters
| Parameter | Type |
|---|---|
state | FormState<TValues> |
Returns
TSelected
AsyncValidator
type AsyncValidator<TValues> = Validator<TValues> & {
__async: true;
};Defined in: validation/validators/custom.ts:18
Type Declaration
| Name | Type | Defined in |
|---|---|---|
__async | true | validation/validators/custom.ts:19 |
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
AsyncValidatorWithOptions
type AsyncValidatorWithOptions<TValues> = AsyncValidator<TValues> & {
__asyncOptions: AsyncValidatorOptions<TValues>;
};Defined in: validation/validators/custom.ts:21
Type Declaration
| Name | Type | Defined in |
|---|---|---|
__asyncOptions | AsyncValidatorOptions<TValues> | validation/validators/custom.ts:24 |
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Variables
DEFAULT_FIELD_UI
const DEFAULT_FIELD_UI: FieldUiState;Defined in: engines/presentation/resolve.ts:10
Defaults when a path is missing from fieldUi (API freeze §5).
PRESENTATION_OWNERSHIP
const PRESENTATION_OWNERSHIP: {
producers: readonly ["workflow.rules", "dependency.populate", "schema.requiredBaseline"];
consumers: readonly ["dom.enhancer", "framework.adapters", "a11y"];
nonWriters: readonly ["validation", "transform", "format"];
};Defined in: engines/presentation/resolve.ts:70
Ownership note (Phase 9 / ADR-018): Workflow rules and schema/static required baseline produce UI intents; Presentation exposes them. Validation must not write visible/hidden/required on validate ticks. DOM enhancer and adapters consume getPresentation / field.ui only.
Type Declaration
| Name | Type | Defined in |
|---|---|---|
producers | readonly ["workflow.rules", "dependency.populate", "schema.requiredBaseline"] | engines/presentation/resolve.ts:71 |
consumers | readonly ["dom.enhancer", "framework.adapters", "a11y"] | engines/presentation/resolve.ts:72 |
nonWriters | readonly ["validation", "transform", "format"] | engines/presentation/resolve.ts:73 |
TRANSFORM_INBOUND_ORDER
const TRANSFORM_INBOUND_ORDER: readonly ["trim", "normalize", "sanitize", "custom", "parse"];Defined in: engines/transform/types.ts:18
Fixed inbound stage order (Alg 8 / 13_TRANSFORM_ENGINE). Format/display is outbound-only and is not part of this list.
PLUGIN_PIPELINE_STAGES
const PLUGIN_PIPELINE_STAGES: readonly ["beforeValidate", "validate", "afterValidate", "beforeSubmit", "submit", "afterSubmit", "submitError"];Defined in: plugins/compat.ts:7
Documented interceptor stages (Phase 15). Onion useMiddleware + plugin hooks share this map (D-MW-VS-PLUGIN).
MIDDLEWARE_HOOK_MAP
const MIDDLEWARE_HOOK_MAP: {
beforeValidate: "beforeValidate";
afterValidate: "afterValidate";
beforeSubmit: "beforeSubmit";
afterSubmit: "afterSubmit";
};Defined in: plugins/middleware.ts:45
Maps plugin hook names → middleware phases (Phase 10 / D-MW-VS-PLUGIN). Plugin api.on(hook) and form.useMiddleware share one interceptor stack per phase. Documented pipeline stages: see PLUGIN_PIPELINE_STAGES.
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
beforeValidate | "beforeValidate" | "beforeValidate" | plugins/middleware.ts:46 |
afterValidate | "afterValidate" | "afterValidate" | plugins/middleware.ts:47 |
beforeSubmit | "beforeSubmit" | "beforeSubmit" | plugins/middleware.ts:48 |
afterSubmit | "afterSubmit" | "afterSubmit" | plugins/middleware.ts:49 |
MIDDLEWARE_ONLY_PHASES
const MIDDLEWARE_ONLY_PHASES: readonly ["submitError", "beforeSetValue", "afterSetValue"];Defined in: plugins/middleware.ts:53
Phases that exist only on the middleware onion (no plugin hook synonym yet).
ASYNC_VALIDATOR_OPTION_DEFAULTS
const ASYNC_VALIDATOR_OPTION_DEFAULTS: {
debounce: 300;
retry: 0;
timeout: undefined;
cache: false;
abortPrevious: true;
preventDuplicates: true;
sharedCache: false;
offline: "skip";
};Defined in: types/async-validation.ts:59
Defaults when the options-object overload is used (API_SIGNATURE_FREEZE §1).
Type Declaration
| Name | Type | Default value | Defined in |
|---|---|---|---|
debounce | 300 | 300 | types/async-validation.ts:60 |
retry | 0 | 0 | types/async-validation.ts:61 |
timeout | undefined | undefined | types/async-validation.ts:62 |
cache | false | false | types/async-validation.ts:63 |
abortPrevious | true | true | types/async-validation.ts:64 |
preventDuplicates | true | true | types/async-validation.ts:65 |
sharedCache | false | false | types/async-validation.ts:66 |
offline | "skip" | "skip" | types/async-validation.ts:67 |
email
const email: Validator;Defined in: validation/validators/email.ts:38
required
const required: Validator;Defined in: validation/validators/required.ts:5
url
const url: Validator;Defined in: validation/validators/url.ts:5
FORM_INTELLIGENT_VERSION
const FORM_INTELLIGENT_VERSION: "3.1.0" = "3.1.0";Defined in: version.ts:2
Package version used for plugin engines compatibility checks.
Functions
createFormController()
function createFormController<TValues>(form: FormInstance<TValues>): FormController<TValues>;Defined in: adapters/controllers.ts:37
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
form | FormInstance<TValues> |
Returns
FormController<TValues>
isFrameworkAdapter()
function isFrameworkAdapter(value: unknown): value is FrameworkAdapter<Record<string, unknown>>;Defined in: adapters/framework-adapter.ts:18
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is FrameworkAdapter<Record<string, unknown>>
isPersistenceAdapter()
function isPersistenceAdapter(value: unknown): value is PersistenceAdapter<Record<string, unknown>>;Defined in: adapters/persistence-adapter.ts:27
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is PersistenceAdapter<Record<string, unknown>>
isSchemaAdapter()
function isSchemaAdapter(value: unknown): value is SchemaAdapter<Record<string, unknown>>;Defined in: adapters/schema-adapter.ts:13
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is SchemaAdapter<Record<string, unknown>>
isSubmitTransportAdapter()
function isSubmitTransportAdapter(value: unknown): value is SubmitTransportAdapter<Record<string, unknown>, unknown>;Defined in: adapters/submit-transport-adapter.ts:15
Parameters
| Parameter | Type |
|---|---|
value | unknown |
Returns
value is SubmitTransportAdapter<Record<string, unknown>, unknown>
createForm()
function createForm<TValues>(config: FormConfig<TValues>): FormInstance<TValues>;Defined in: core/create-form.ts:2103
Create a form workflow instance. Pass target / form.ref for DOM-backed forms (HTML constraints imported on attach), or initialValues for headless usage.
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
config | FormConfig<TValues> |
Returns
FormInstance<TValues>
pluginAsModule()
function pluginAsModule<TValues>(
plugin: FormPlugin<TValues>,
order?: number,
api?: FormPluginApi<TValues>): FormModule<TValues>;Defined in: core/form-module-host.ts:11
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
plugin | FormPlugin<TValues> |
order | number |
api? | FormPluginApi<TValues> |
Returns
FormModule<TValues>
computeFieldAria()
function computeFieldAria(input: ComputeFieldAriaInput): FieldAriaResult;Defined in: engines/accessibility/compute-aria.ts:6
Pure ARIA computation from field state — no DOM queries (Phase 16 / Spec 27).
Parameters
| Parameter | Type |
|---|---|
input | ComputeFieldAriaInput |
Returns
calculate()
function calculate<TValues>(path: string): CalculationBuilder<TValues>;Defined in: engines/calculation/calculation-builder.ts:81
Root helper — returns an unbound builder. Prefer form.calculate(path).
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
CalculationBuilder<TValues>
dependencies()
function dependencies(map: DependencyMap): DependencyMap;Defined in: engines/dependency/dependency-engine.ts:38
Standalone helper — returns a normalized dependency map for config merge.
Parameters
| Parameter | Type |
|---|---|
map | DependencyMap |
Returns
resolveFieldUi()
function resolveFieldUi(
path: string,
fieldUi: FieldUiMap,
extras?: {
busy?: boolean;
}): FieldUiState;Defined in: engines/presentation/resolve.ts:35
Resolve presentation flags for a path with freeze defaults.
Parameters
| Parameter | Type |
|---|---|
path | string |
fieldUi | FieldUiMap |
extras? | { busy?: boolean; } |
extras.busy? | boolean |
Returns
createTransformPipeline()
function createTransformPipeline(options?: TransformPipelineOptions, outbound?: Formatter): TransformPipeline;Defined in: engines/transform/transform-pipeline.ts:19
Compile a reusable inbound transform pipeline. Stage order is fixed: trim → normalize → sanitize → custom → parse.
Parameters
| Parameter | Type |
|---|---|
options | TransformPipelineOptions |
outbound? | Formatter |
Returns
TransformPipeline
runTransformInbound()
function runTransformInbound<TValues>(
raw: unknown,
options:
| TransformPipelineOptions
| readonly TransformFn<TValues>[]
| undefined,
ctx: TransformContext<TValues>): unknown;Defined in: engines/transform/transform-pipeline.ts:40
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
raw | unknown |
options | | TransformPipelineOptions | readonly TransformFn<TValues>[] | undefined |
ctx | TransformContext<TValues> |
Returns
unknown
when()
function when<TValues>(field: string): WhenRuleBuilder<TValues>;Defined in: engines/workflow/when.ts:138
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
field | string |
Returns
WhenRuleBuilder<TValues>
satisfiesEnginesRange()
function satisfiesEnginesRange(range: string, version?: string): boolean;Defined in: plugins/compat.ts:32
Minimal semver range check for plugin engines metadata. Supports: >=x.y.z, ^x.y.z, exact x.y.z.
Parameters
| Parameter | Type | Default value |
|---|---|---|
range | string | undefined |
version | string | FORM_INTELLIGENT_VERSION |
Returns
boolean
composeMiddleware()
function composeMiddleware<TContext>(middlewares: readonly PluginMiddleware<TContext>[]): (context: TContext) => Promise<void>;Defined in: plugins/middleware.ts:60
Type Parameters
| Type Parameter |
|---|
TContext |
Parameters
| Parameter | Type |
|---|---|
middlewares | readonly PluginMiddleware<TContext>[] |
Returns
(context: TContext) => Promise<void>
runMiddlewareChain()
function runMiddlewareChain<TContext>(middlewares: readonly PluginMiddleware<TContext>[], context: TContext): Promise<void>;Defined in: plugins/middleware.ts:80
Type Parameters
| Type Parameter |
|---|
TContext |
Parameters
| Parameter | Type |
|---|---|
middlewares | readonly PluginMiddleware<TContext>[] |
context | TContext |
Returns
Promise<void>
clearSharedValidationCaches()
function clearSharedValidationCaches(): void;Defined in: validation/async/memory-cache.ts:104
Test helper — clears shared namespaces.
Returns
void
parseTtl()
function parseTtl(input: TtlInput): number;Defined in: validation/async/parse-ttl.ts:9
Parse TTL input to milliseconds. Plain numbers are treated as milliseconds.
Parameters
| Parameter | Type |
|---|---|
input | TtlInput |
Returns
number
matchesField()
function matchesField<TValues>(targetPath: string, message?: string): Validator<TValues>;Defined in: validation/cross-field.ts:17
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type | Default value |
|---|---|---|
targetPath | string | undefined |
message | string | "Values must match." |
Returns
Validator<TValues>
requiredWhen()
function requiredWhen<TValues>(
sourcePath: string,
predicate: (value: unknown, context: ValidationContext<TValues>) => boolean,
message?: string): Validator<TValues>;Defined in: validation/cross-field.ts:27
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type | Default value |
|---|---|---|
sourcePath | string | undefined |
predicate | (value: unknown, context: ValidationContext<TValues>) => boolean | undefined |
message | string | "This field is required." |
Returns
Validator<TValues>
runValidationPipeline()
function runValidationPipeline<TValues>(input: ValidationPipelineInput<TValues>): Promise<Record<string, string>>;Defined in: validation/pipeline.ts:22
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
input | ValidationPipelineInput<TValues> |
Returns
Promise<Record<string, string>>
currency()
function currency(options?: CurrencyValidatorOptions): Validator;Defined in: validation/validators/currency.ts:9
Parameters
| Parameter | Type |
|---|---|
options | CurrencyValidatorOptions |
Returns
custom()
function custom<TValues>(fn: CustomFieldValidator<TValues>): Validator<TValues>;Defined in: validation/validators/custom.ts:12
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
fn | CustomFieldValidator<TValues> |
Returns
Validator<TValues>
asyncValidator()
Call Signature
function asyncValidator<TValues>(validate: Validator<TValues>): AsyncValidator<TValues>;Defined in: validation/validators/custom.ts:27
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
validate | Validator<TValues> |
Returns
AsyncValidator<TValues>
Call Signature
function asyncValidator<TValues>(options: AsyncValidatorOptions<TValues>): AsyncValidatorWithOptions<TValues>;Defined in: validation/validators/custom.ts:30
Type Parameters
| Type Parameter | Default type |
|---|---|
TValues extends Record<string, unknown> | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
options | AsyncValidatorOptions<TValues> |
Returns
AsyncValidatorWithOptions<TValues>
isAsyncValidator()
function isAsyncValidator<TValues>(validator: Validator<TValues>): validator is AsyncValidator<TValues>;Defined in: validation/validators/custom.ts:58
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
validator | Validator<TValues> |
Returns
validator is AsyncValidator<TValues>
getAsyncValidatorOptions()
function getAsyncValidatorOptions<TValues>(validator: Validator<TValues>):
| AsyncValidatorOptions<TValues>
| undefined;Defined in: validation/validators/custom.ts:64
Type Parameters
| Type Parameter |
|---|
TValues extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
validator | Validator<TValues> |
Returns
| AsyncValidatorOptions<TValues> | undefined
date()
function date(options?: DateValidatorOptions): Validator;Defined in: validation/validators/date.ts:29
Parameters
| Parameter | Type |
|---|---|
options | DateValidatorOptions |
Returns
maxLength()
function maxLength(max: number): Validator;Defined in: validation/validators/max-length.ts:5
Parameters
| Parameter | Type |
|---|---|
max | number |
Returns
minLength()
function minLength(min: number): Validator;Defined in: validation/validators/min-length.ts:5
Parameters
| Parameter | Type |
|---|---|
min | number |
Returns
number()
function number(options?: NumberValidatorOptions): Validator;Defined in: validation/validators/number.ts:22
Parameters
| Parameter | Type |
|---|---|
options | NumberValidatorOptions |
Returns
min()
function min(minimum: number): Validator;Defined in: validation/validators/number.ts:50
Parameters
| Parameter | Type |
|---|---|
minimum | number |
Returns
max()
function max(maximum: number): Validator;Defined in: validation/validators/number.ts:69
Parameters
| Parameter | Type |
|---|---|
maximum | number |
Returns
password()
function password(options?: PasswordValidatorOptions): Validator;Defined in: validation/validators/password.ts:11
Parameters
| Parameter | Type |
|---|---|
options | PasswordValidatorOptions |
Returns
phone()
function phone(message?: string): Validator;Defined in: validation/validators/phone.ts:5
Parameters
| Parameter | Type | Default value |
|---|---|---|
message | string | "Enter a valid phone number." |
Returns
regex()
function regex(pattern: RegExp, message?: string): Validator;Defined in: validation/validators/regex.ts:5
Parameters
| Parameter | Type | Default value |
|---|---|---|
pattern | RegExp | undefined |
message | string | "Invalid format." |
