Skip to content

Releases: ignsm/formhaus

v0.3.1

10 Apr 10:31
ae306b7

Choose a tag to compare

Breaking

  • FormSchema type renamed to FormDefinition. validateSchema() renamed to validateDefinition().
  • FormRenderer prop schema renamed to definition (React and Vue).

@formhaus/core

  • New onStepValidate option runs an async validator between steps. nextStepAsync() awaits it. Exposes stepValidating and the StepValidateFn type.

@formhaus/react

  • FormRenderer accepts onStepValidate. Continue button shows a loading state while the validator runs.

@formhaus/vue

  • FormRenderer accepts onStepValidate. useFormEngine now returns stepValidating.

Packaging

  • Breaking: ESM-only. Dropped legacy main and module fields. Minimum Node is 18.
  • Fixed @formhaus/vue type resolution under moduleResolution: "node16" and "nodenext".
  • @formhaus/core and @formhaus/react down to 2.87 KB and 3.15 KB gzipped.
  • sideEffects: false on core, react, and vue.

v0.3.0

07 Apr 14:01
6584f25

Choose a tag to compare

Highlights

All packages unified at 0.3.0.

Core

  • FieldType accepts any string (built-ins get autocomplete via DefaultFieldType)
  • Multiselect validation: minLength/maxLength check selection count, messages say "items" not "characters"
  • setErrors() replaces previous errors instead of merging
  • validateSchema() 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__btn renamed to fh-form-actions__button
  • Breaking: CheckboxField, RadioField, SwitchField structure aligned with Vue
  • New MultiselectField (checkbox group)
  • optionsProviders prop for dynamic options via optionsFrom
  • onAnalyticsEvent prop (focus, blur, error, step change, submit)
  • useFormEngine recreates engine on schema.id change
  • useFieldOptions handles rejected async providers, avoids redundant calls

Vue

  • Breaking: All scoped styles removed (unstyled by default, matching React)
  • New MultiselectField (checkbox group)
  • optionsProviders, analyticsEvent emit, focus emit on fields
  • useFormEngine accepts getter, recreates engine on schema.id change
  • useFieldOptions handles rejected async providers, avoids redundant calls

Other

  • GitHub Actions CI pipeline
  • React and Vue adapter tests (vitest + testing-library)
  • Removed unused @vue/test-utils dependency

Full changelog: https://github.com/ignsm/formhaus/blob/main/CHANGELOG.md