schema-components 1.28.0 → 1.28.1

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.
@@ -90,7 +90,7 @@ declare function detectSchemaKind(input: unknown): SchemaKind;
90
90
  * field so consumers can still inspect the Zod stack trace.
91
91
  */
92
92
  /**
93
- * IO side passed to {@link callToJsonSchema}. The Zod runtime accepts
93
+ * IO side passed to the internal `callToJsonSchema` helper. The Zod runtime accepts
94
94
  * `"input" | "output"` for the corresponding `io` option on
95
95
  * `z.toJSONSchema`. Defaults to `"output"` everywhere in the adapter
96
96
  * pipeline; the parameter exists so a future renderer or component
@@ -1,3 +1,3 @@
1
1
  import { m as JsonObject, w as SchemaMeta } from "../types-BTB73MB8.mjs";
2
- import { a as SchemaKind, c as extractRootMetaFromJson, i as SchemaIoSide, l as isCodecSchema, n as NormalisedSchema, o as __CLASSIFIER_RULES_FOR_TEST, r as SchemaInput, s as detectSchemaKind, t as NormaliseOptions, u as normaliseSchema } from "../adapter-MiEFkRVV.mjs";
2
+ import { a as SchemaKind, c as extractRootMetaFromJson, i as SchemaIoSide, l as isCodecSchema, n as NormalisedSchema, o as __CLASSIFIER_RULES_FOR_TEST, r as SchemaInput, s as detectSchemaKind, t as NormaliseOptions, u as normaliseSchema } from "../adapter-DqlAnZ_w.mjs";
3
3
  export { JsonObject, NormaliseOptions, NormalisedSchema, SchemaInput, SchemaIoSide, SchemaKind, SchemaMeta, __CLASSIFIER_RULES_FOR_TEST, detectSchemaKind, extractRootMetaFromJson, isCodecSchema, normaliseSchema };
@@ -4,7 +4,7 @@ import { SchemaNormalisationError } from "./errors.mjs";
4
4
  import { appendPointer, emitDiagnostic } from "./diagnostics.mjs";
5
5
  import { dereference } from "./ref.mjs";
6
6
  import { detectOpenApiVersion, inferJsonSchemaDraftWithReason, isSwagger2, matchJsonSchemaDraftUri } from "./version.mjs";
7
- import { a as normaliseJsonSchema$1, o as normaliseOpenApiSchemas } from "../normalise-DCYp06Sr.mjs";
7
+ import { a as normaliseJsonSchema$1, o as normaliseOpenApiSchemas } from "../normalise-Db1xaxgx.mjs";
8
8
  import { z } from "zod";
9
9
  //#region src/core/adapter.ts
10
10
  /**
@@ -72,8 +72,8 @@ declare function deepNormaliseWithContext(schema: Record<string, unknown>, trans
72
72
  *
73
73
  * This function preserves the no-context signature for the OpenAPI 3.0
74
74
  * and Swagger 2.0 normalisers that compose it directly. The JSON Schema
75
- * normalisation path uses {@link normaliseDraft04NodeWithContext} via
76
- * {@link deepNormaliseWithContext} to thread diagnostics.
75
+ * normalisation path uses the internal `normaliseDraft04NodeWithContext`
76
+ * helper via `deepNormaliseWithContext` to thread diagnostics.
77
77
  */
78
78
  declare function normaliseDraft04Node(node: Record<string, unknown>): Record<string, unknown>;
79
79
  /**
@@ -1,2 +1,2 @@
1
- import { a as normaliseJsonSchema, i as normaliseDraft04Node, n as deepNormaliseWithContext, o as normaliseOpenApiSchemas, r as documentContainsKeyword, s as selectDraftTransform, t as deepNormalise } from "../normalise-DCYp06Sr.mjs";
1
+ import { a as normaliseJsonSchema, i as normaliseDraft04Node, n as deepNormaliseWithContext, o as normaliseOpenApiSchemas, r as documentContainsKeyword, s as selectDraftTransform, t as deepNormalise } from "../normalise-Db1xaxgx.mjs";
2
2
  export { deepNormalise, deepNormaliseWithContext, documentContainsKeyword, normaliseDraft04Node, normaliseJsonSchema, normaliseOpenApiSchemas, selectDraftTransform };
@@ -1,2 +1,2 @@
1
- import { d as deepNormaliseOpenApiDoc, f as liftExampleToExamples, h as normaliseOpenApi30Node, l as applyDiscriminatorAllOfPrepass, m as normaliseOpenApi30Discriminator, p as normaliseOpenApi30Combined, u as deepNormaliseOpenApi30Doc } from "../normalise-DCYp06Sr.mjs";
1
+ import { d as deepNormaliseOpenApiDoc, f as liftExampleToExamples, h as normaliseOpenApi30Node, l as applyDiscriminatorAllOfPrepass, m as normaliseOpenApi30Discriminator, p as normaliseOpenApi30Combined, u as deepNormaliseOpenApi30Doc } from "../normalise-Db1xaxgx.mjs";
2
2
  export { applyDiscriminatorAllOfPrepass, deepNormaliseOpenApi30Doc, deepNormaliseOpenApiDoc, liftExampleToExamples, normaliseOpenApi30Combined, normaliseOpenApi30Discriminator, normaliseOpenApi30Node };
@@ -1,2 +1,2 @@
1
- import { c as normaliseSwagger2Document } from "../normalise-DCYp06Sr.mjs";
1
+ import { c as normaliseSwagger2Document } from "../normalise-Db1xaxgx.mjs";
2
2
  export { normaliseSwagger2Document };
@@ -199,7 +199,7 @@ type GetDiscriminatorMapping<S> = S extends {
199
199
  * its sibling defs because the ref branch fires before `ExtractDefs` runs
200
200
  * inside `ObjectSchemaToTs`.
201
201
  *
202
- * Merge semantics (per-key resolution via {@link CollisionSafeMerge}):
202
+ * Merge semantics (per-key resolution via `CollisionSafeMerge`):
203
203
  * - Parent-only keys: parent value wins
204
204
  * - Local-only keys: local value wins
205
205
  * - Shared keys: parent value wins (caller / inherited context takes
@@ -240,7 +240,7 @@ type IsEmptyDefs<T> = [keyof T] extends [never] ? true : string extends keyof T
240
240
  /**
241
241
  * True when the schema declares `$defs`, `definitions`, or
242
242
  * `components.schemas` as an object, false otherwise. Used by
243
- * {@link MergeRootDefs} and {@link ExtractDefs} to avoid intersecting
243
+ * `MergeRootDefs` and `ExtractDefs` to avoid intersecting
244
244
  * the parent context with an empty index-signature sentinel.
245
245
  *
246
246
  * `components.schemas` is recognised so OpenAPI documents whose root
@@ -599,7 +599,7 @@ type RequiredKeysOf<S> = S extends {
599
599
  * Also indexes schemas with `$anchor` or `$dynamicAnchor` by their anchor
600
600
  * name, enabling `#SomeName` ref resolution.
601
601
  *
602
- * Shares merge semantics with {@link MergeRootDefs}: caller-supplied
602
+ * Shares merge semantics with `MergeRootDefs`: caller-supplied
603
603
  * (`ParentDefs`) entries win on key collision, the empty-default
604
604
  * sentinel is detected so it does not poison the parent context, and the
605
605
  * `HasLocalDefs` guard short-circuits when the current node declares no
@@ -1735,8 +1735,8 @@ function applyDraft04Translations(node, ctx) {
1735
1735
  *
1736
1736
  * This function preserves the no-context signature for the OpenAPI 3.0
1737
1737
  * and Swagger 2.0 normalisers that compose it directly. The JSON Schema
1738
- * normalisation path uses {@link normaliseDraft04NodeWithContext} via
1739
- * {@link deepNormaliseWithContext} to thread diagnostics.
1738
+ * normalisation path uses the internal `normaliseDraft04NodeWithContext`
1739
+ * helper via `deepNormaliseWithContext` to thread diagnostics.
1740
1740
  */
1741
1741
  function normaliseDraft04Node(node) {
1742
1742
  applyDraft04Translations(node, void 0);
@@ -33,8 +33,8 @@ import { OpenApiDocument, OperationInfo, ParameterInfo, ResponseInfo, getRequest
33
33
  * per real cause regardless of how many child renders share the
34
34
  * sink.
35
35
  *
36
- * Strict mode is treated as a per-call invariant — see
37
- * {@link replayCapturedDiagnostics} for the rationale.
36
+ * Strict mode is treated as a per-call invariant — see the internal
37
+ * `replayCapturedDiagnostics` helper below for the rationale.
38
38
  */
39
39
  declare function getParsed(doc: Record<string, unknown>, diagnostics?: DiagnosticsOptions): OpenApiDocument;
40
40
  /**
@@ -3,7 +3,7 @@ import "../core/limits.mjs";
3
3
  import { emitDiagnostic } from "../core/diagnostics.mjs";
4
4
  import { isPrototypePollutingKey } from "../core/uri.mjs";
5
5
  import { detectOpenApiVersion } from "../core/version.mjs";
6
- import { o as normaliseOpenApiSchemas, r as documentContainsKeyword } from "../normalise-DCYp06Sr.mjs";
6
+ import { o as normaliseOpenApiSchemas, r as documentContainsKeyword } from "../normalise-Db1xaxgx.mjs";
7
7
  import { resolveRefChain } from "../core/refChain.mjs";
8
8
  import { getParameters, getRequestBody, getResponses, listAllOperations, parseOpenApiDocument } from "./parser.mjs";
9
9
  //#region src/openapi/resolve.ts
@@ -46,8 +46,8 @@ const docCache = /* @__PURE__ */ new WeakMap();
46
46
  * per real cause regardless of how many child renders share the
47
47
  * sink.
48
48
  *
49
- * Strict mode is treated as a per-call invariant — see
50
- * {@link replayCapturedDiagnostics} for the rationale.
49
+ * Strict mode is treated as a per-call invariant — see the internal
50
+ * `replayCapturedDiagnostics` helper below for the rationale.
51
51
  */
52
52
  function getParsed(doc, diagnostics) {
53
53
  let cached = docCache.get(doc);
@@ -70,7 +70,7 @@ function getParsed(doc, diagnostics) {
70
70
  * subsequent caller to re-run the pipeline from scratch — and the
71
71
  * defect this caching strategy fixes was precisely that kind of
72
72
  * re-running. Strict is enforced instead during replay
73
- * (see {@link replayCapturedDiagnostics}).
73
+ * (see `replayCapturedDiagnostics`).
74
74
  */
75
75
  function buildCachedParse(doc) {
76
76
  const captured = [];
@@ -1,6 +1,6 @@
1
1
  import { d as FieldOverrides, j as WalkedField, u as FieldOverride, w as SchemaMeta } from "../types-BTB73MB8.mjs";
2
2
  import { t as Diagnostic } from "../diagnostics-Cbwak-ZX.mjs";
3
- import { i as SchemaIoSide } from "../adapter-MiEFkRVV.mjs";
3
+ import { i as SchemaIoSide } from "../adapter-DqlAnZ_w.mjs";
4
4
  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";
@@ -1,6 +1,6 @@
1
1
  import { w as SchemaMeta } from "../types-BTB73MB8.mjs";
2
2
  import { t as Diagnostic } from "../diagnostics-Cbwak-ZX.mjs";
3
- import { i as SchemaIoSide } from "../adapter-MiEFkRVV.mjs";
3
+ import { i as SchemaIoSide } from "../adapter-DqlAnZ_w.mjs";
4
4
  import { r as ComponentResolver } from "../renderer-Ul9taFYp.mjs";
5
5
  import { RejectUnrepresentableZod } from "../core/typeInference.mjs";
6
6
  import { InferredValue, WidgetMap } from "./SchemaComponent.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schema-components",
3
- "version": "1.28.0",
3
+ "version": "1.28.1",
4
4
  "description": "React components that render UI from Zod schemas, JSON Schema, and OpenAPI documents",
5
5
  "type": "module",
6
6
  "exports": {