{"owner":"rjsf-team","repo":"react-jsonschema-form","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["CLAUDE.md"],"skills":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Commands\n\n```bash\n# Install dependencies\npnpm install\n\n# Build all packages (parallel)\npnpm run build\n\n# Build all packages (sequential, use if parallel causes issues)\npnpm run build-serial\n\n# Run all tests\npnpm test\n\n# Lint\npnpm run lint\n\n# Prettier check / format\npnpm run cs-check\npnpm run cs-format\n\n# Run a single package's tests\ncd packages/core && pnpm test\n\n# Watch mode for a single package\ncd packages/core && pnpm run test:watch\n\n# Update snapshots\ncd packages/snapshot-tests && pnpm run test:update\n\n# Start the playground (interactive demo)\ncd packages/playground && pnpm start\n\n# Full sanity check (lint + build + test)\npnpm run sanity-check\n```\n\nIndividual package builds output three module formats: `build:cjs`, `build:esm`, `build:umd`.\n\n## Architecture\n\nThis is an **pnpm workspaces + Nx** monorepo. All packages live under `packages/` and are scoped as `@rjsf/*`.\n\n### Package roles\n\n| Package | Role |\n|---|---|\n| `@rjsf/utils` | Shared types, 80+ utility functions, schema helpers. No UI dependencies. |\n| `@rjsf/core` | Core `Form` component, Bootstrap 3 as default theme, `withTheme()` HOC. |\n| `@rjsf/validator-ajv8` | AJV 8-based validator. Exported via `customizeValidator()`. |\n| `@rjsf/snapshot-tests` | Shared snapshot test suite consumed by all theme packages. |\n| Theme packages (`@rjsf/mui`, `@rjsf/antd`, `@rjsf/chakra-ui`, etc.) | UI-library-specific implementations of fields, widgets, and templates. |\n| `@rjsf/playground` | Vite app importing all themes, used for manual testing and demos. |\n| `@rjsf/docs` | Docusaurus documentation site. |\n\n### Registry pattern (the plugin system)\n\nThe `Registry` object is the core extension point passed to every field/widget/template:\n\n```typescript\nRegistry = {\n  fields,        // Map of field type → Field component\n  widgets,       // Map of widget name → Widget component\n  templates,     // Layout/structural templates\n  rootSchema,    // Root JSON Schema\n  formContext,   // Arbitrary context object threaded to all components\n  schemaUtils,   // Schema parsing & validation helpers\n  translateString,\n  globalFormOptions,\n}\n```\n\nOverride fields/widgets/templates per-form via props, or globally via `withTheme()`.\n\n### Theme pattern\n\nEvery theme package follows the same structure:\n1. Imports `withTheme` from `@rjsf/core`\n2. Defines custom `Templates`, `Widgets`, and optionally `Fields`\n3. Calls `withTheme({ templates, widgets, fields })` to produce a themed `Form`\n4. Exports: `Form` (default), `Theme`, `Templates`, `Widgets`\n\n### Field → Widget → Template hierarchy\n\n- **Fields** handle schema-level logic (ObjectField, ArrayField, MultiSchemaField for oneOf/anyOf, etc.)\n- **Widgets** handle individual input rendering (TextWidget, SelectWidget, CheckboxWidget, etc.)\n- **Templates** control structural/layout rendering (FieldTemplate, ArrayFieldTemplate, ButtonTemplates, etc.)\n\nFields select which widget to render based on schema `type` and `ui:widget`. Templates wrap the output for consistent styling.\n\n### Form rendering flow\n\n1. Caller provides `schema`, `validator` (required), `formData`, and `uiSchema`\n2. `Form` creates `schemaUtils` from validator + schema\n3. Schema is recursively decomposed into fields → widgets → templates\n4. On change/blur: callbacks fire with updated `formData` and `errorSchema`\n5. On submit: full validation runs, then `onSubmit` fires (or `onError` if invalid)\n\n### Key `@rjsf/utils` exports to know\n\n- Schema helpers: `findSchemaDefinition`, `mergeSchemas`, `getSchemaType`, `createSchemaUtils`\n- Form data: `mergeDefaultsWithFormData`, `removeOptionalEmptyObjects`\n- Error handling: `toErrorSchema`, `toErrorList`\n- Enum helpers: `enumOptionsSelectValue`, `enumOptionsDeselectValue`\n- React hooks: `useDeepCompareMemo`, `useFileWidgetProps`, `useAltDateWidgetProps`\n\n## Code style\n\n- **TypeScript strict mode**, ES2020 target\n- **Prettier**: single quotes, JSX single quotes, 120-char print width\n- **ESLint**: enforces semicolons, curly braces, no-console, React Hooks rules\n- Pre-commit hook (Husky + lint-staged) auto-formats and lints staged files\n\n## Testing\n\n- Vitest, jsdom, Testing Library\n- Snapshot tests in `@rjsf/snapshot-tests` are shared across theme packages — run `test:update` there when changing core rendering\n- Node >=20 required\n"},"files":{"CLAUDE.md":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Commands\n\n```bash\n# Install dependencies\npnpm install\n\n# Build all packages (parallel)\npnpm run build\n\n# Build all packages (sequential, use if parallel causes issues)\npnpm run build-serial\n\n# Run all tests\npnpm test\n\n# Lint\npnpm run lint\n\n# Prettier check / format\npnpm run cs-check\npnpm run cs-format\n\n# Run a single package's tests\ncd packages/core && pnpm test\n\n# Watch mode for a single package\ncd packages/core && pnpm run test:watch\n\n# Update snapshots\ncd packages/snapshot-tests && pnpm run test:update\n\n# Start the playground (interactive demo)\ncd packages/playground && pnpm start\n\n# Full sanity check (lint + build + test)\npnpm run sanity-check\n```\n\nIndividual package builds output three module formats: `build:cjs`, `build:esm`, `build:umd`.\n\n## Architecture\n\nThis is an **pnpm workspaces + Nx** monorepo. All packages live under `packages/` and are scoped as `@rjsf/*`.\n\n### Package roles\n\n| Package | Role |\n|---|---|\n| `@rjsf/utils` | Shared types, 80+ utility functions, schema helpers. No UI dependencies. |\n| `@rjsf/core` | Core `Form` component, Bootstrap 3 as default theme, `withTheme()` HOC. |\n| `@rjsf/validator-ajv8` | AJV 8-based validator. Exported via `customizeValidator()`. |\n| `@rjsf/snapshot-tests` | Shared snapshot test suite consumed by all theme packages. |\n| Theme packages (`@rjsf/mui`, `@rjsf/antd`, `@rjsf/chakra-ui`, etc.) | UI-library-specific implementations of fields, widgets, and templates. |\n| `@rjsf/playground` | Vite app importing all themes, used for manual testing and demos. |\n| `@rjsf/docs` | Docusaurus documentation site. |\n\n### Registry pattern (the plugin system)\n\nThe `Registry` object is the core extension point passed to every field/widget/template:\n\n```typescript\nRegistry = {\n  fields,        // Map of field type → Field component\n  widgets,       // Map of widget name → Widget component\n  templates,     // Layout/structural templates\n  rootSchema,    // Root JSON Schema\n  formContext,   // Arbitrary context object threaded to all components\n  schemaUtils,   // Schema parsing & validation helpers\n  translateString,\n  globalFormOptions,\n}\n```\n\nOverride fields/widgets/templates per-form via props, or globally via `withTheme()`.\n\n### Theme pattern\n\nEvery theme package follows the same structure:\n1. Imports `withTheme` from `@rjsf/core`\n2. Defines custom `Templates`, `Widgets`, and optionally `Fields`\n3. Calls `withTheme({ templates, widgets, fields })` to produce a themed `Form`\n4. Exports: `Form` (default), `Theme`, `Templates`, `Widgets`\n\n### Field → Widget → Template hierarchy\n\n- **Fields** handle schema-level logic (ObjectField, ArrayField, MultiSchemaField for oneOf/anyOf, etc.)\n- **Widgets** handle individual input rendering (TextWidget, SelectWidget, CheckboxWidget, etc.)\n- **Templates** control structural/layout rendering (FieldTemplate, ArrayFieldTemplate, ButtonTemplates, etc.)\n\nFields select which widget to render based on schema `type` and `ui:widget`. Templates wrap the output for consistent styling.\n\n### Form rendering flow\n\n1. Caller provides `schema`, `validator` (required), `formData`, and `uiSchema`\n2. `Form` creates `schemaUtils` from validator + schema\n3. Schema is recursively decomposed into fields → widgets → templates\n4. On change/blur: callbacks fire with updated `formData` and `errorSchema`\n5. On submit: full validation runs, then `onSubmit` fires (or `onError` if invalid)\n\n### Key `@rjsf/utils` exports to know\n\n- Schema helpers: `findSchemaDefinition`, `mergeSchemas`, `getSchemaType`, `createSchemaUtils`\n- Form data: `mergeDefaultsWithFormData`, `removeOptionalEmptyObjects`\n- Error handling: `toErrorSchema`, `toErrorList`\n- Enum helpers: `enumOptionsSelectValue`, `enumOptionsDeselectValue`\n- React hooks: `useDeepCompareMemo`, `useFileWidgetProps`, `useAltDateWidgetProps`\n\n## Code style\n\n- **TypeScript strict mode**, ES2020 target\n- **Prettier**: single quotes, JSX single quotes, 120-char print width\n- **ESLint**: enforces semicolons, curly braces, no-console, React Hooks rules\n- Pre-commit hook (Husky + lint-staged) auto-formats and lints staged files\n\n## Testing\n\n- Vitest, jsdom, Testing Library\n- Snapshot tests in `@rjsf/snapshot-tests` are shared across theme packages — run `test:update` there when changing core rendering\n- Node >=20 required\n"},"items":[{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md\n\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\n\n## Commands\n\n```bash\n# Install dependencies\npnpm install\n\n# Build all packages (parallel)\npnpm run build\n\n# Build all packages (sequential, use if parallel causes issues)\npnpm run build-serial\n\n# Run all tests\npnpm test\n\n# Lint\npnpm run lint\n\n# Prettier check / format\npnpm run cs-check\npnpm run cs-format\n\n# Run a single package's tests\ncd packages/core && pnpm test\n\n# Watch mode for a single package\ncd packages/core && pnpm run test:watch\n\n# Update snapshots\ncd packages/snapshot-tests && pnpm run test:update\n\n# Start the playground (interactive demo)\ncd packages/playground && pnpm start\n\n# Full sanity check (lint + build + test)\npnpm run sanity-check\n```\n\nIndividual package builds output three module formats: `build:cjs`, `build:esm`, `build:umd`.\n\n## Architecture\n\nThis is an **pnpm workspaces + Nx** monorepo. All packages live under `packages/` and are scoped as `@rjsf/*`.\n\n### Package roles\n\n| Package | Role |\n|---|---|\n| `@rjsf/utils` | Shared types, 80+ utility functions, schema helpers. No UI dependencies. |\n| `@rjsf/core` | Core `Form` component, Bootstrap 3 as default theme, `withTheme()` HOC. |\n| `@rjsf/validator-ajv8` | AJV 8-based validator. Exported via `customizeValidator()`. |\n| `@rjsf/snapshot-tests` | Shared snapshot test suite consumed by all theme packages. |\n| Theme packages (`@rjsf/mui`, `@rjsf/antd`, `@rjsf/chakra-ui`, etc.) | UI-library-specific implementations of fields, widgets, and templates. |\n| `@rjsf/playground` | Vite app importing all themes, used for manual testing and demos. |\n| `@rjsf/docs` | Docusaurus documentation site. |\n\n### Registry pattern (the plugin system)\n\nThe `Registry` object is the core extension point passed to every field/widget/template:\n\n```typescript\nRegistry = {\n  fields,        // Map of field type → Field component\n  widgets,       // Map of widget name → Widget component\n  templates,     // Layout/structural templates\n  rootSchema,    // Root JSON Schema\n  formContext,   // Arbitrary context object threaded to all components\n  schemaUtils,   // Schema parsing & validation helpers\n  translateString,\n  globalFormOptions,\n}\n```\n\nOverride fields/widgets/templates per-form via props, or globally via `withTheme()`.\n\n### Theme pattern\n\nEvery theme package follows the same structure:\n1. Imports `withTheme` from `@rjsf/core`\n2. Defines custom `Templates`, `Widgets`, and optionally `Fields`\n3. Calls `withTheme({ templates, widgets, fields })` to produce a themed `Form`\n4. Exports: `Form` (default), `Theme`, `Templates`, `Widgets`\n\n### Field → Widget → Template hierarchy\n\n- **Fields** handle schema-level logic (ObjectField, ArrayField, MultiSchemaField for oneOf/anyOf, etc.)\n- **Widgets** handle individual input rendering (TextWidget, SelectWidget, CheckboxWidget, etc.)\n- **Templates** control structural/layout rendering (FieldTemplate, ArrayFieldTemplate, ButtonTemplates, etc.)\n\nFields select which widget to render based on schema `type` and `ui:widget`. Templates wrap the output for consistent styling.\n\n### Form rendering flow\n\n1. Caller provides `schema`, `validator` (required), `formData`, and `uiSchema`\n2. `Form` creates `schemaUtils` from validator + schema\n3. Schema is recursively decomposed into fields → widgets → templates\n4. On change/blur: callbacks fire with updated `formData` and `errorSchema`\n5. On submit: full validation runs, then `onSubmit` fires (or `onError` if invalid)\n\n### Key `@rjsf/utils` exports to know\n\n- Schema helpers: `findSchemaDefinition`, `mergeSchemas`, `getSchemaType`, `createSchemaUtils`\n- Form data: `mergeDefaultsWithFormData`, `removeOptionalEmptyObjects`\n- Error handling: `toErrorSchema`, `toErrorList`\n- Enum helpers: `enumOptionsSelectValue`, `enumOptionsDeselectValue`\n- React hooks: `useDeepCompareMemo`, `useFileWidgetProps`, `useAltDateWidgetProps`\n\n## Code style\n\n- **TypeScript strict mode**, ES2020 target\n- **Prettier**: single quotes, JSX single quotes, 120-char print width\n- **ESLint**: enforces semicolons, curly braces, no-console, React Hooks rules\n- Pre-commit hook (Husky + lint-staged) auto-formats and lints staged files\n\n## Testing\n\n- Vitest, jsdom, Testing Library\n- Snapshot tests in `@rjsf/snapshot-tests` are shared across theme packages — run `test:update` there when changing core rendering\n- Node >=20 required\n","category":"root","tokens":1101}]}