#36

feat: add JSON schema widget support with checkbox and radio inputs

Opencreativomawants to merge intofrom

Summary

  • Add widget.ts to @visual-json/core with logic to resolve widget types from JSON Schema (enum → select/radio, boolean → checkbox)
  • Add CheckboxInput and RadioInput components to @visual-json/react with full test coverage
  • Update form-view.tsx to render the appropriate widget based on schema
  • Refactor editor.tsx in the React example: extract static samples data to samples.ts for readability

Test plan

  • pnpm test — 203 tests pass
  • pnpm type-check — 0 errors
  • pnpm lint — 0 warnings
  • pnpm build — all 11 packages build successfully
  • Manual: open React example, select "Schema widgets" sample — verify checkbox and radio/select widgets render correctly

Closes #25

Activity

8
vercel[bot]6mo ago

@creativoma is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

socket-security[bot]6mo ago

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

DiffPackageSupply Chain
Security
VulnerabilityQualityMaintenanceLicense
npm/​jsdom@​29.0.2
npm/​@​testing-library/​react@​16.3.2

View full report

vercel[bot]reviewed6mo ago
vercel[bot]reviewed6mo ago
creativoma6mo ago

@ctate Quick ping on this one, checkbox/radio widget support, all tests passing. Any thoughts or blockers?