Stable API
From 1.0, a breaking change to these parts needs a major version:
- The form definition schema and its JSON Schemas (
schema.json,translation.schema.json), including the meaning of built-in field types. - The submit payload: values, keys and skipped steps.
- The
@formhaus/coreentries.,/server,/i18n,/fixand/cloud: exported functions, classes and types. FormEnginepublic methods and properties.- React and Vue components, including
/cloud: props, events and slots. - The React
useFormEnginehook and the VueuseFormEnginecomposable. - The props a custom field component receives.
- CSS custom properties for theming.
checkDefinition()issue codes and severities.
Not covered:
@formhaus/core/internal.- The editor, builder and Figma plugin.
- Warning and error message texts, fix titles and patches.
- DOM structure and CSS class names.
@formhaus/mcpand theformhausCLI, which have their own versions.
Before 1.0, a minor version can break these parts and lists each break in the changelog.
1.0 removes the APIs deprecated in 0.x, as announced in the changelog:
validateDefinitionfrom@formhaus/core. UsecheckDefinition().- The Vue
submitHandlerprop. Use the@submitevent.
Two rules keep forms stable across minor versions:
- Custom field types named with
-or:, such asx-rating, never become built-in types. See Custom field types. initialValuesis read when the form is created, and a newdefinitionobject creates a new form. See Definition and initial values.keepValuesandengine.replaceDefinition()are the opt-in way to change the definition and keep the answers. See Keep answers when the definition changes.