schema-components 1.28.1 → 1.28.2
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.
|
@@ -2,15 +2,15 @@ import { isObject, toRecordOrUndefined } from "../core/guards.mjs";
|
|
|
2
2
|
import { emitDiagnostic } from "../core/diagnostics.mjs";
|
|
3
3
|
import { extractRootMetaFromJson } from "../core/adapter.mjs";
|
|
4
4
|
import { walk } from "../core/walker.mjs";
|
|
5
|
+
import { joinPath, renderField, sanitisePrefix } from "../react/SchemaComponent.mjs";
|
|
5
6
|
import { ApiCallbacks } from "./ApiCallbacks.mjs";
|
|
6
7
|
import { ApiLinks } from "./ApiLinks.mjs";
|
|
7
8
|
import { ApiResponseHeaders } from "./ApiResponseHeaders.mjs";
|
|
8
9
|
import { ApiSecurity } from "./ApiSecurity.mjs";
|
|
9
10
|
import { getExternalDocs, getLinks, getSecurityRequirements, getSecuritySchemes, getXmlInfo, listCallbacks, listWebhooks } from "./parser.mjs";
|
|
10
|
-
import { joinPath, renderField, sanitisePrefix } from "../react/SchemaComponent.mjs";
|
|
11
11
|
import { getParsed, resolveOperationFromParsed, resolveParametersFromParsed, resolveRequestBodyFromParsed, resolveResponseFromParsed, toDoc } from "./resolve.mjs";
|
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
12
|
import { useId } from "react";
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
//#region src/openapi/components.tsx
|
|
15
15
|
/**
|
|
16
16
|
* OpenAPI React components with type-safe generics.
|
|
@@ -5,8 +5,8 @@ import { t as SchemaError } from "../errors-DQSIK4n1.mjs";
|
|
|
5
5
|
import { l as RenderProps, r as ComponentResolver } from "../renderer-Ul9taFYp.mjs";
|
|
6
6
|
import { FromJSONSchema, FromJSONSchemaMode, IsSwagger2Doc, PathOfType, RejectUnrepresentableZod, ResolveOpenAPIRef, TypeAtPath, __SchemaInferenceFellBack } from "../core/typeInference.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
9
8
|
import { ReactNode } from "react";
|
|
9
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
10
10
|
|
|
11
11
|
//#region src/react/SchemaComponent.d.ts
|
|
12
12
|
/**
|
|
@@ -8,8 +8,8 @@ import { walk } from "../core/walker.mjs";
|
|
|
8
8
|
import { headlessResolver } from "./headless.mjs";
|
|
9
9
|
import { resolvePath, resolveValue, setNestedValue } from "./fieldPath.mjs";
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { createContext, isValidElement, useCallback, useContext, useId, useMemo } from "react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/react/SchemaComponent.tsx
|
|
14
14
|
/**
|
|
15
15
|
* <SchemaComponent> — renders UI from Zod, JSON Schema, or OpenAPI schemas.
|
|
@@ -5,8 +5,8 @@ import { buildRenderProps, getRenderFunction, mergeResolvers } from "../core/ren
|
|
|
5
5
|
import { walk } from "../core/walker.mjs";
|
|
6
6
|
import { headlessResolver } from "./headless.mjs";
|
|
7
7
|
import { joinPath, sanitisePrefix } from "./SchemaComponent.mjs";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
8
|
import { createElement, isValidElement, useId } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
10
|
//#region src/react/SchemaView.tsx
|
|
11
11
|
/**
|
|
12
12
|
* 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 { buildAriaAttrs } from "./a11y.mjs";
|
|
10
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { isValidElement, useCallback, useEffect, useRef } from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/react/headlessRenderers.tsx
|
|
13
13
|
/**
|
|
14
14
|
* Headless renderer functions — one per schema type.
|
package/dist/themes/mui.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { isObject } from "../core/guards.mjs";
|
|
|
2
2
|
import { sortFieldsByOrder } from "../core/fieldOrder.mjs";
|
|
3
3
|
import { inputId, toReactNode } from "../react/headlessRenderers.mjs";
|
|
4
4
|
import { headlessResolver } from "../react/headless.mjs";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { isValidElement } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/themes/mui.tsx
|
|
8
8
|
function ariaRequired(tree) {
|
|
9
9
|
return { required: tree.isOptional === false };
|