Releases: ignsm/formhaus
Releases · ignsm/formhaus
v0.3.1
Breaking
FormSchematype renamed toFormDefinition.validateSchema()renamed tovalidateDefinition().FormRendererpropschemarenamed todefinition(React and Vue).
@formhaus/core
- New
onStepValidateoption runs an async validator between steps.nextStepAsync()awaits it. ExposesstepValidatingand theStepValidateFntype.
@formhaus/react
FormRendereracceptsonStepValidate. Continue button shows a loading state while the validator runs.
@formhaus/vue
FormRendereracceptsonStepValidate.useFormEnginenow returnsstepValidating.
Packaging
- Breaking: ESM-only. Dropped legacy
mainandmodulefields. Minimum Node is 18. - Fixed
@formhaus/vuetype resolution undermoduleResolution: "node16"and"nodenext". @formhaus/coreand@formhaus/reactdown to 2.87 KB and 3.15 KB gzipped.sideEffects: falseon core, react, and vue.
v0.3.0
Highlights
All packages unified at 0.3.0.
Core
FieldTypeaccepts any string (built-ins get autocomplete viaDefaultFieldType)- Multiselect validation:
minLength/maxLengthcheck selection count, messages say "items" not "characters" setErrors()replaces previous errors instead of mergingvalidateSchema()detects duplicate field keys and invalid regex patterns- Cascade clearing respects step-level visibility
- Getter caching for
visibleSteps,visibleFields,currentStep,canGoNext
React
- Breaking: CSS class
fh-form-actions__btnrenamed tofh-form-actions__button - Breaking: CheckboxField, RadioField, SwitchField structure aligned with Vue
- New
MultiselectField(checkbox group) optionsProvidersprop for dynamic options viaoptionsFromonAnalyticsEventprop (focus, blur, error, step change, submit)useFormEnginerecreates engine onschema.idchangeuseFieldOptionshandles rejected async providers, avoids redundant calls
Vue
- Breaking: All scoped styles removed (unstyled by default, matching React)
- New
MultiselectField(checkbox group) optionsProviders,analyticsEventemit,focusemit on fieldsuseFormEngineaccepts getter, recreates engine onschema.idchangeuseFieldOptionshandles rejected async providers, avoids redundant calls
Other
- GitHub Actions CI pipeline
- React and Vue adapter tests (vitest + testing-library)
- Removed unused
@vue/test-utilsdependency
Full changelog: https://github.com/ignsm/formhaus/blob/main/CHANGELOG.md