Repository navigation
Releases: formhaus-dev/formhaus-swift
Releases · formhaus-dev/formhaus-swift
Release list
0.1.4
FormhausCore
- Passes the conformance suite of
@formhaus/core1.1.1. - Format 1.6:
"randomize": trueon aradio,multiselectorselectfield shows its options in a random order per respondent. Options with"pinned": trueand exclusive options keep their written position. - New
FormEngineOptions.seedandFormEngineOptions.research. The same seed shows the same order.engine.seedreturns it. - New
engine.orderOptions(_:options:)returns the options of a field in shown order. - New
FormResearchprotocol for the option order. - Without
research, options show in written order, and debug builds reportmissing-researchonce per process throughonWarning. checkDefinition()reportsrandomize-not-applicable, andoutdated-format-versionforrandomizeorpinnedbelow format 1.6.
FormhausResearch
- New product with
Research, the option order of@formhaus/core/research. PassResearch()asresearchto apply it.
FormhausUI
- Fields with
randomizeshow their options in the order ofengine.orderOptions(_:options:), including options from a provider.
0.1.3
FormhausCore
- Passes the conformance suite of
@formhaus/core1.0.0.
FormhausUI
- The formhaus set colors the step title red and announces the error count when the current step has errors, as in the web renderers.
ProgressContexthaserrorCountanderrorLabelfor the current step, independent ofstepErrorMarks.- The focused field keeps focus and the keyboard while a submit or async step validation runs. Text typed meanwhile applies once the form unlocks.
- Fixed the step counter and description clipping at the left edge in the system set on iOS.
0.1.2
FormhausUI
- Switching from the system set to another set inside a
NavigationStackshows Back only in the navigation bar. - Focusing the error summary scrolls only as far as needed to show it, in every component set. A summary that is already on screen no longer moves the page.
- The formhaus set shows the error summary below the fields, before the actions, as in the web renderers.
0.1.1
0.1.0
First release of formhaus for Swift. It runs formhaus JSON form definitions natively on iOS and macOS with the same engine rules as @formhaus/core 0.22.0.
Install
.package(url: "https://github.com/formhaus-dev/formhaus-swift.git", from: "0.1.0")Requires Swift 6.2, iOS 17 or macOS 14.
What is included
FormhausCore: the form engine, definition checks, server validation withvalidateSubmission, answer recall, translations, and a native ECMAScript regular expression engine. No dependencies.FormhausUI: a SwiftUI renderer with three ways to draw a form:- the formhaus component set, matching the web look,
FormComponents.system, a native iOS grouped form,- your own components through the registry.
- Theme generated from the formhaus design tokens, with light, dark and Increase Contrast palettes.
- VoiceOver labels, Dynamic Type and 44 pt touch targets in the built-in sets, checked by tests.
Compatibility
Passes the full conformance suite of @formhaus/core 0.22.0: every corpus fixture and engine scenario.
Before 1.0
The API can change between minor versions until 1.0. Differences from the TypeScript packages are listed in the README.