Motivation
The webcomponent package needs to render ClickToSign so forms with click-to-sign attestation work in the browser.
Scope
- Add
useClickToSign behavior hook in packages/formspec-webcomponent/src/behaviors/
- Reads the bound group's children (accepted, signedBy, signedAt, statement)
- On sign click: sets accepted=true, signedBy to provided/typed name, signedAt to current ISO datetime, statement to the configured text
- On revoke (if revocable): clears all children back to defaults
- Exposes reactive state for signed/unsigned rendering
- Add ClickToSign to the default adapter component registry
- Add ClickToSign rendering in the default adapter (display statement text, sign button, signed state display)
- Add fallback logic: Core processors replace ClickToSign with Stack + Text + Toggle + readonly fields
- Add story to
packages/formspec-webcomponent/stories/
- Add E2E test covering sign, revoke, validation, and readonly states
Acceptance Criteria
Dependencies
Depends on #3 (schema must validate the component nodes).
Motivation
The webcomponent package needs to render ClickToSign so forms with click-to-sign attestation work in the browser.
Scope
useClickToSignbehavior hook inpackages/formspec-webcomponent/src/behaviors/packages/formspec-webcomponent/stories/Acceptance Criteria
Dependencies
Depends on #3 (schema must validate the component nodes).