Repository navigation
v1.1.0
Forms in the Island and a badge that passes text contrast. Nothing is removed or changed in
behaviour; the new texts and type parameters are additive (see API).
Features
- Forms in the Island. A third primary action,
{ kind: 'form', label, fields, run, validate?, errorMessage? },
puts one to three text fields ('text'or'textarea') in the open Island beside a round send button.
On send Cloudlet checksrequired, thenmaxLength, then yourvalidate, shows messages under the
fields, and runsrun({ values })with command semantics: pending, close on success, a message and
another try on failure. TypeScript takesvalues' keys from the field names. Guide:
Forms. - Drafts. Typed text stays with its notification across collapsing, swiping and remounting. While a form
holds unsent text its time stands still (pause reason'draft'), a press outside does not collapse
the Island, an auto-opening notification waits in the stack, and the pill's name addslabels.draft.
NotificationSnapshot.draftreports it.
API
- New types
FormAction,FormField,FormFieldKind,FormInputMode,FormValues,FormContextand
FormValidation;PrimaryActionincludesFormAction.showandupdatetake the field names as a
type parameter, inferred from the call. - New texts:
labels.draft,messages.fieldRequiredandmessages.fieldTooLong. An object typed as the
fullCloudletLabelsorFallbackMessagesnow needs them; TypeScript points them out. - New CSS tokens
--cloudlet-field-background,--cloudlet-field-border,--cloudlet-placeholderand
classNamespartsform,field,field-error.
Fixes
- The badge's disc is a deeper red (
--cloudlet-badge#ff3b30→#d70015): its white number now
measures 5.38:1 instead of 3.55:1 and passes the 4.5:1 text contrast.