schema-components 1.16.1 → 1.16.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.
- package/dist/core/walker.mjs +1 -1
- package/dist/html/renderToHtml.mjs +2 -2
- package/dist/html/renderToHtmlStream.mjs +1 -1
- package/dist/html/streamRenderers.mjs +2 -2
- package/dist/openapi/components.mjs +1 -1
- package/dist/react/SchemaComponent.d.mts +1 -1
- package/dist/react/SchemaComponent.mjs +2 -2
- package/dist/react/SchemaView.mjs +2 -2
- package/dist/react/headlessRenderers.mjs +1 -1
- package/dist/themes/mui.mjs +1 -1
- package/package.json +1 -1
package/dist/core/walker.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isObject } from "./guards.mjs";
|
|
2
2
|
import { appendPointer, emitDiagnostic } from "./diagnostics.mjs";
|
|
3
3
|
import { countDistinctRefs, resolveRef } from "./ref.mjs";
|
|
4
|
-
import { ANNOTATION_SIBLINGS, detectDiscriminated, mergeAllOf, mergeRefSiblings, normaliseAnyOf } from "./merge.mjs";
|
|
5
4
|
import { extractArrayConstraints, extractObjectConstraints, stripInapplicableConstraints } from "./constraints.mjs";
|
|
5
|
+
import { ANNOTATION_SIBLINGS, detectDiscriminated, mergeAllOf, mergeRefSiblings, normaliseAnyOf } from "./merge.mjs";
|
|
6
6
|
import { buildBase, buildBooleanField, buildFileField, buildNullField, buildNumberField, buildStringField, buildUnknownField, extractChildOverride, extractSchemaMetaFields, getArray, getObject, getString, isPrimitive, walkDependentRequiredMap, walkSubSchemaMap, withoutKeys } from "./walkBuilders.mjs";
|
|
7
7
|
//#region src/core/walker.ts
|
|
8
8
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h, serialize } from "./html.mjs";
|
|
2
1
|
import { normaliseSchema } from "../core/adapter.mjs";
|
|
3
|
-
import { walk } from "../core/walker.mjs";
|
|
4
2
|
import { getHtmlRenderFn, mergeHtmlResolvers } from "../core/renderer.mjs";
|
|
3
|
+
import { walk } from "../core/walker.mjs";
|
|
4
|
+
import { h, serialize } from "./html.mjs";
|
|
5
5
|
import { defaultHtmlResolver } from "./renderers.mjs";
|
|
6
6
|
//#region src/html/renderToHtml.ts
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normaliseSchema } from "../core/adapter.mjs";
|
|
2
|
-
import { walk } from "../core/walker.mjs";
|
|
3
2
|
import { mergeHtmlResolvers } from "../core/renderer.mjs";
|
|
3
|
+
import { walk } from "../core/walker.mjs";
|
|
4
4
|
import { defaultHtmlResolver } from "./renderers.mjs";
|
|
5
5
|
import { streamField } from "./streamRenderers.mjs";
|
|
6
6
|
//#region src/html/renderToHtmlStream.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { VOID_ELEMENTS, h, raw, serialize, serializeAttributes } from "./html.mjs";
|
|
2
|
-
import { ariaLabelAttrs, buildHintElement, buildInputId, requiredIndicator } from "./a11y.mjs";
|
|
3
1
|
import { isObject } from "../core/guards.mjs";
|
|
4
2
|
import { getHtmlRenderFn } from "../core/renderer.mjs";
|
|
3
|
+
import { VOID_ELEMENTS, h, raw, serialize, serializeAttributes } from "./html.mjs";
|
|
4
|
+
import { ariaLabelAttrs, buildHintElement, buildInputId, requiredIndicator } from "./a11y.mjs";
|
|
5
5
|
//#region src/html/streamRenderers.ts
|
|
6
6
|
function yieldOpen(el) {
|
|
7
7
|
const attrStr = serializeAttributes(el.attributes);
|
|
@@ -2,12 +2,12 @@ import { toRecordOrUndefined } from "../core/guards.mjs";
|
|
|
2
2
|
import { SchemaNormalisationError } from "../core/errors.mjs";
|
|
3
3
|
import { normaliseSchema } from "../core/adapter.mjs";
|
|
4
4
|
import { walk } from "../core/walker.mjs";
|
|
5
|
-
import { renderField } from "../react/SchemaComponent.mjs";
|
|
6
5
|
import { ApiCallbacks } from "./ApiCallbacks.mjs";
|
|
7
6
|
import { ApiLinks } from "./ApiLinks.mjs";
|
|
8
7
|
import { ApiResponseHeaders } from "./ApiResponseHeaders.mjs";
|
|
9
8
|
import { ApiSecurity } from "./ApiSecurity.mjs";
|
|
10
9
|
import { getLinks, getSecurityRequirements, getSecuritySchemes, listCallbacks } from "./parser.mjs";
|
|
10
|
+
import { renderField } from "../react/SchemaComponent.mjs";
|
|
11
11
|
import { getParsed, resolveOperation, resolveParameters, resolveRequestBody, resolveResponse, toDoc } from "./resolve.mjs";
|
|
12
12
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
//#region src/openapi/components.tsx
|
|
@@ -4,8 +4,8 @@ import { t as SchemaError } from "../errors-C5zRC2PU.mjs";
|
|
|
4
4
|
import { l as RenderProps, r as ComponentResolver } from "../renderer-BdSqllx5.mjs";
|
|
5
5
|
import { c as ResolveOpenAPIRef, s as PathOfType, t as FromJSONSchema } from "../typeInference-k7FXfTVO.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
|
-
import { ReactNode } from "react";
|
|
8
7
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
|
+
import { ReactNode } from "react";
|
|
9
9
|
|
|
10
10
|
//#region src/react/SchemaComponent.d.ts
|
|
11
11
|
/**
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { isObject, toRecordOrUndefined } from "../core/guards.mjs";
|
|
3
3
|
import { SchemaFieldError, SchemaNormalisationError, SchemaRenderError } from "../core/errors.mjs";
|
|
4
4
|
import { normaliseSchema } from "../core/adapter.mjs";
|
|
5
|
-
import { walk } from "../core/walker.mjs";
|
|
6
5
|
import { getRenderFunction, mergeResolvers } from "../core/renderer.mjs";
|
|
6
|
+
import { walk } from "../core/walker.mjs";
|
|
7
7
|
import { headlessResolver } from "./headless.mjs";
|
|
8
8
|
import { resolvePath, resolveValue, setNestedValue } from "./fieldPath.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
|
-
import { createContext, isValidElement, useCallback, useContext, useMemo } from "react";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { createContext, isValidElement, useCallback, useContext, useMemo } from "react";
|
|
12
12
|
//#region src/react/SchemaComponent.tsx
|
|
13
13
|
/**
|
|
14
14
|
* <SchemaComponent> — renders UI from Zod, JSON Schema, or OpenAPI schemas.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SchemaNormalisationError, SchemaRenderError } from "../core/errors.mjs";
|
|
2
2
|
import { normaliseSchema } from "../core/adapter.mjs";
|
|
3
|
-
import { walk } from "../core/walker.mjs";
|
|
4
3
|
import { getRenderFunction, mergeResolvers } from "../core/renderer.mjs";
|
|
4
|
+
import { walk } from "../core/walker.mjs";
|
|
5
5
|
import { headlessResolver } from "./headless.mjs";
|
|
6
|
-
import { createElement, isValidElement } from "react";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { createElement, isValidElement } from "react";
|
|
8
8
|
//#region src/react/SchemaView.tsx
|
|
9
9
|
/**
|
|
10
10
|
* React Server Component for read-only schema rendering.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isObject } from "../core/guards.mjs";
|
|
2
|
-
import { isValidElement, useCallback, useRef } from "react";
|
|
3
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { isValidElement, useCallback, useRef } from "react";
|
|
4
4
|
//#region src/react/headlessRenderers.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Headless renderer functions — one per schema type.
|
package/dist/themes/mui.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isObject } from "../core/guards.mjs";
|
|
2
2
|
import { toReactNode } from "../react/headlessRenderers.mjs";
|
|
3
3
|
import { headlessResolver } from "../react/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/themes/mui.tsx
|
|
7
7
|
function ariaRequired(tree) {
|
|
8
8
|
return { required: tree.isOptional === false };
|