schema-components 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,8 +6,8 @@ import { t as SchemaError } from "./errors-DbaI04x2.mjs";
6
6
  import { d as PathOfType, f as RejectUnrepresentableZod, r as FromJSONSchema } from "./typeInference-Y8tNEQJk.mjs";
7
7
  import { n as InferSchemaValue, t as InferFields } from "./inferValue-eAnh50EM.mjs";
8
8
  import { z } from "zod";
9
- import { ReactNode } from "react";
10
9
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
10
+ import { ReactNode } from "react";
11
11
 
12
12
  //#region src/react/SchemaComponent.d.ts
13
13
  /**
@@ -4,15 +4,15 @@ import { isSafeHyperlink } from "../core/uri.mjs";
4
4
  import { extractRootMetaFromJson } from "../core/adapter.mjs";
5
5
  import { joinPath, sanitisePrefix } from "../core/idPath.mjs";
6
6
  import { walk } from "../core/walker.mjs";
7
- import { renderField } from "../react/renderField.mjs";
8
7
  import { ApiCallbacks } from "./ApiCallbacks.mjs";
9
8
  import { ApiLinks } from "./ApiLinks.mjs";
10
9
  import { ApiResponseHeaders } from "./ApiResponseHeaders.mjs";
11
10
  import { ApiSecurity } from "./ApiSecurity.mjs";
12
11
  import { extractExternalDocs, extractLinks, extractSecurityRequirements, extractSecuritySchemes, extractXmlInfo, listCallbacks, listWebhooks } from "./parser.mjs";
12
+ import { renderField } from "../react/renderField.mjs";
13
13
  import { getParsed, resolveOperation, resolveParameters, resolveRequestBody, resolveResponse, toDoc } from "./resolve.mjs";
14
- import { useId } from "react";
15
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ import { useId } from "react";
16
16
  //#region src/openapi/components.tsx
17
17
  /**
18
18
  * OpenAPI React components with type-safe generics.
@@ -1,3 +1,3 @@
1
1
  import { a as InferredValue, i as InferredOutputValue, r as InferredInputValue, t as InferFields } from "../inferValue-eAnh50EM.mjs";
2
- import { a as SchemaProvider, c as registerWidget, i as SchemaFieldProps, n as SchemaComponentProps, r as SchemaField, t as SchemaComponent } from "../SchemaComponent-DSbRtF-J.mjs";
2
+ import { a as SchemaProvider, c as registerWidget, i as SchemaFieldProps, n as SchemaComponentProps, r as SchemaField, t as SchemaComponent } from "../SchemaComponent-BWl1psB0.mjs";
3
3
  export { type InferFields, type InferredInputValue, type InferredOutputValue, type InferredValue, SchemaComponent, type SchemaComponentProps, SchemaField, type SchemaFieldProps, SchemaProvider, registerWidget };
@@ -1,3 +1,3 @@
1
1
  import { a as InferredValue, i as InferredOutputValue, r as InferredInputValue, t as InferFields } from "../inferValue-eAnh50EM.mjs";
2
- import { a as SchemaProvider, c as registerWidget, i as SchemaFieldProps, l as sanitisePrefix, n as SchemaComponentProps, o as __clearGlobalWidgets, r as SchemaField, s as joinPath, t as SchemaComponent } from "../SchemaComponent-DSbRtF-J.mjs";
2
+ import { a as SchemaProvider, c as registerWidget, i as SchemaFieldProps, l as sanitisePrefix, n as SchemaComponentProps, o as __clearGlobalWidgets, r as SchemaField, s as joinPath, t as SchemaComponent } from "../SchemaComponent-BWl1psB0.mjs";
3
3
  export { InferFields, InferredInputValue, InferredOutputValue, InferredValue, SchemaComponent, SchemaComponentProps, SchemaField, SchemaFieldProps, SchemaProvider, __clearGlobalWidgets, joinPath, registerWidget, sanitisePrefix };
@@ -6,8 +6,8 @@ import { resolvePath, resolveValue, setNestedValue } from "../core/fieldPath.mjs
6
6
  import { walk } from "../core/walker.mjs";
7
7
  import { globalWidgets, renderField } from "./renderField.mjs";
8
8
  import { z } from "zod";
9
- import { createContext, useCallback, useContext, useId, useMemo } from "react";
10
9
  import { jsx } from "react/jsx-runtime";
10
+ import { createContext, useCallback, useContext, useId, useMemo } from "react";
11
11
  //#region src/react/SchemaComponent.tsx
12
12
  /**
13
13
  * <SchemaComponent> — renders UI from Zod, JSON Schema, or OpenAPI schemas.
@@ -6,8 +6,8 @@ import { buildRenderProps, getRenderFunction, mergeResolvers } from "../core/ren
6
6
  import { walk } from "../core/walker.mjs";
7
7
  import { headlessResolver } from "./headless.mjs";
8
8
  import { joinPath, sanitisePrefix } from "./SchemaComponent.mjs";
9
- import { isValidElement, useId } from "react";
10
9
  import { jsx } from "react/jsx-runtime";
10
+ import { isValidElement, useId } from "react";
11
11
  //#region src/react/SchemaView.tsx
12
12
  /**
13
13
  * React Server Component for read-only schema rendering.
@@ -7,8 +7,8 @@ import { fieldDomId, panelIdFor, tabIdFor } from "../core/idPath.mjs";
7
7
  import { matchUnionOption, resolveDiscriminatedActive } from "../core/unionMatch.mjs";
8
8
  import { displayJsonValue } from "../core/walkBuilders.mjs";
9
9
  import { ariaLabel, buildAriaAttrs, buildHintInfo } from "./a11y.mjs";
10
- import { isValidElement, useCallback, useEffect, useRef } from "react";
11
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
+ import { isValidElement, useCallback, useEffect, useRef } from "react";
12
12
  //#region src/react/headlessRenderers.tsx
13
13
  /**
14
14
  * Headless renderer functions — one per schema type.
@@ -1,8 +1,8 @@
1
1
  import { dispatchRenderField } from "../core/renderField.mjs";
2
2
  import { buildRenderProps, getRenderFunction, mergeResolvers } from "../core/renderer.mjs";
3
3
  import { headlessResolver } from "./headless.mjs";
4
- import { isValidElement } from "react";
5
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { isValidElement } from "react";
6
6
  //#region src/react/renderField.tsx
7
7
  /**
8
8
  * React-side `renderField` dispatcher and global widget registry.
@@ -3,8 +3,8 @@ import { sortFieldsByOrder } from "../core/fieldOrder.mjs";
3
3
  import { isFieldRequired } from "../react/a11y.mjs";
4
4
  import { inputId, toReactNode } from "../react/headlessRenderers.mjs";
5
5
  import { FieldShell } from "../react/fieldShell.mjs";
6
- import { isValidElement } from "react";
7
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { isValidElement } from "react";
8
8
  //#region src/themes/mui.tsx
9
9
  /**
10
10
  * MUI's TextField / Checkbox use the `required` prop to surface the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schema-components",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "React components that render UI from Zod schemas, JSON Schema, and OpenAPI documents",
5
5
  "type": "module",
6
6
  "exports": {