fix(widgets): persist and synchronize form inputs

MA
11d ago
+350-11

Closes #758.

Each document widget keeps supported form values in its own Yjs map. Collaborators see field updates in their existing iframe. Reopening the document restores values through the document session. Writes require edit access. Password and file inputs are excluded.

The sandbox uses a per-document message port. Updates to separate fields merge independently. Controls without IDs fall back to their position, so generated widgets should use stable IDs when they reorder controls.

Verified in Chromium using three sandboxed frames backed by separate synchronized Yjs documents. Concurrent edits to different fields, dependent output, read-only access, and restoration from an encoded Yjs snapshot passed. The iframe regression test exercises form reset, same-name radio groups in separate forms, and dynamic controls. All 436 Node tests, TypeScript, formatting and lint passed. The Worker suite also passed locally (31 tests).