schema-components 1.21.0 → 1.22.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.
- package/README.md +1 -1
- package/dist/core/adapter.d.mts +20 -3
- package/dist/core/adapter.mjs +209 -28
- package/dist/core/constraints.d.mts +2 -2
- package/dist/core/diagnostics.d.mts +1 -1
- package/dist/core/errors.d.mts +1 -1
- package/dist/core/fieldOrder.d.mts +1 -1
- package/dist/core/formats.d.mts +22 -1
- package/dist/core/formats.mjs +21 -0
- package/dist/core/limits.d.mts +2 -0
- package/dist/core/limits.mjs +23 -0
- package/dist/core/merge.d.mts +1 -1
- package/dist/core/normalise.d.mts +29 -3
- package/dist/core/normalise.mjs +2 -2
- package/dist/core/openapi30.mjs +1 -1
- package/dist/core/ref.d.mts +1 -1
- package/dist/core/ref.mjs +1 -0
- package/dist/core/renderer.d.mts +1 -1
- package/dist/core/renderer.mjs +0 -2
- package/dist/core/swagger2.d.mts +1 -1
- package/dist/core/swagger2.mjs +1 -1
- package/dist/core/typeInference.d.mts +2 -2
- package/dist/core/types.d.mts +2 -2
- package/dist/core/types.mjs +1 -4
- package/dist/core/version.d.mts +1 -1
- package/dist/core/walkBuilders.d.mts +3 -3
- package/dist/core/walker.d.mts +1 -1
- package/dist/core/walker.mjs +79 -2
- package/dist/{diagnostics-CbBPsxSt.d.mts → diagnostics-D0QCYGv0.d.mts} +1 -1
- package/dist/{errors-QEwOtQAA.d.mts → errors-DpFwqs5C.d.mts} +1 -1
- package/dist/html/a11y.d.mts +2 -2
- package/dist/html/a11y.mjs +10 -3
- package/dist/html/renderToHtml.d.mts +10 -3
- package/dist/html/renderToHtml.mjs +13 -3
- package/dist/html/renderToHtmlStream.d.mts +2 -2
- package/dist/html/renderers.d.mts +2 -2
- package/dist/html/renderers.mjs +0 -5
- package/dist/html/streamRenderers.d.mts +5 -4
- package/dist/html/streamRenderers.mjs +91 -30
- package/dist/limits-Cw5QZND8.d.mts +29 -0
- package/dist/{normalise-DaSrnr8g.mjs → normalise-DVEJQmF7.mjs} +468 -115
- package/dist/openapi/ApiCallbacks.d.mts +1 -1
- package/dist/openapi/ApiLinks.d.mts +1 -1
- package/dist/openapi/ApiResponseHeaders.d.mts +1 -1
- package/dist/openapi/ApiSecurity.d.mts +1 -1
- package/dist/openapi/ApiSecurity.mjs +16 -2
- package/dist/openapi/components.d.mts +150 -18
- package/dist/openapi/components.mjs +129 -15
- package/dist/openapi/parser.d.mts +1 -1
- package/dist/openapi/parser.mjs +35 -3
- package/dist/openapi/resolve.d.mts +12 -5
- package/dist/openapi/resolve.mjs +183 -23
- package/dist/react/SchemaComponent.d.mts +100 -35
- package/dist/react/SchemaComponent.mjs +59 -45
- package/dist/react/SchemaView.d.mts +3 -3
- package/dist/react/SchemaView.mjs +2 -2
- package/dist/react/fieldPath.d.mts +1 -1
- package/dist/react/headless.d.mts +1 -1
- package/dist/react/headless.mjs +1 -2
- package/dist/react/headlessRenderers.d.mts +3 -4
- package/dist/react/headlessRenderers.mjs +10 -30
- package/dist/{ref-si8ViYun.d.mts → ref-D-_JBZkF.d.mts} +1 -1
- package/dist/{renderer-DI6ZYf7a.d.mts → renderer-BaRlQIuN.d.mts} +2 -2
- package/dist/themes/mantine.d.mts +1 -1
- package/dist/themes/mui.d.mts +1 -1
- package/dist/themes/radix.d.mts +1 -1
- package/dist/themes/shadcn.d.mts +1 -1
- package/dist/typeInference-DkcUHfaM.d.mts +982 -0
- package/dist/{types-BnxPEElk.d.mts → types-BrRMV0en.d.mts} +3 -10
- package/package.json +1 -3
- package/dist/typeInference-Bxw3NOG1.d.mts +0 -647
- /package/dist/{version-D-u7aMfy.d.mts → version-D2jfdX6E.d.mts} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/core/limits.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shared depth caps and hop counts used to bound recursion across
|
|
4
|
+
* schema-components. All numeric limits live here so the renderer, the
|
|
5
|
+
* ref resolver, the OpenAPI parser, and the type-level inference engine
|
|
6
|
+
* agree on the same constants.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Maximum recursion depth for the schema walker, the React renderers,
|
|
10
|
+
* the streaming HTML renderer, and the server-side renderer. Beyond
|
|
11
|
+
* this depth a recursion sentinel is emitted instead of further descent
|
|
12
|
+
* — the only safe response to a cyclic walked-field graph.
|
|
13
|
+
*/
|
|
14
|
+
declare const MAX_RENDER_DEPTH = 10;
|
|
15
|
+
/**
|
|
16
|
+
* Maximum depth for `$ref` resolution and Zod-tree walks. Mirrors the
|
|
17
|
+
* type-level `DEFAULT_MAX_DEPTH` ({@link MaxRefDepth}) so the runtime
|
|
18
|
+
* and compile-time bounds agree.
|
|
19
|
+
*/
|
|
20
|
+
type MaxRefDepth = 64;
|
|
21
|
+
declare const MAX_REF_DEPTH: MaxRefDepth;
|
|
22
|
+
/**
|
|
23
|
+
* Maximum number of `$ref` hops permitted when walking a chain of
|
|
24
|
+
* OpenAPI Path Item Object references. Beyond this a
|
|
25
|
+
* `path-item-ref-too-deep` diagnostic is emitted and resolution stops.
|
|
26
|
+
*/
|
|
27
|
+
declare const MAX_PATH_ITEM_REF_HOPS = 8;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { MaxRefDepth as i, MAX_REF_DEPTH as n, MAX_RENDER_DEPTH as r, MAX_PATH_ITEM_REF_HOPS as t };
|