@redocly/openapi-docs 3.13.0-next.7 → 3.13.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/dist/redocly-openapi-docs.min.js +1414 -1395
- package/lib/components/Discriminator/Discriminator.js +1 -1
- package/lib/services/config-options/helpers.d.ts +2 -0
- package/lib/services/config-options/helpers.js +1 -1
- package/lib/services/config-options/normalizeOptions.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as r,jsxs as l}from"react/jsx-runtime";import{memo as p,useMemo as c}from"react";import{strikethroughText as d}from"../../utils/index.js";import{SchemaSelection as a}from"../common/SchemaSelection/SchemaSelection.js";import{SelectionTitle as f}from"../common/index.js";import{styled as u}from"../../styled-components.js";function x({activeOneOfIdx:t,parent:e,onChange:n,translate:o}){const m=c(()=>(e.oneOf||[]).map((i,s)=>({label:i.schema.deprecated?`${d(i.title)} (${o("openapi.badges.deprecated","deprecated").toLowerCase()}`:i.title,value:s})),[e.oneOf,o]);return e.oneOf===void 0?null:l(h,{children:[r(f,{children:o("openapi.discriminator","Discriminator")}),r(a,{options:m,pointer:e.operationPointer,onChange:n,schema:e,defaultOneOfIdx:t})]})}const y=p(x),h=u.div`
|
|
1
|
+
import{jsx as r,jsxs as l}from"react/jsx-runtime";import{memo as p,useMemo as c}from"react";import{strikethroughText as d}from"../../utils/index.js";import{SchemaSelection as a}from"../common/SchemaSelection/SchemaSelection.js";import{SelectionTitle as f}from"../common/index.js";import{styled as u}from"../../styled-components.js";function x({activeOneOfIdx:t,parent:e,onChange:n,translate:o}){const m=c(()=>(e.oneOf||[]).map((i,s)=>({label:i.schema.deprecated?`${d(i.title)} (${o("openapi.badges.deprecated","deprecated").toLowerCase()})`:i.title,value:s})),[e.oneOf,o]);return e.oneOf===void 0?null:l(h,{children:[r(f,{children:o("openapi.discriminator","Discriminator")}),r(a,{options:m,pointer:e.operationPointer,onChange:n,schema:e,defaultOneOfIdx:t})]})}const y=p(x),h=u.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: flex-start;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { RedocConfig } from '@redocly/config';
|
|
2
|
+
import type { CodeSamplesConfig } from '../code-samples/index.js';
|
|
2
3
|
export declare function normalizeShowExtensions(value: RedocConfig['showExtensions']): string[] | boolean;
|
|
3
4
|
export declare function normalizeScrollYOffset(value: RedocConfig['scrollYOffset']): () => number;
|
|
5
|
+
export declare function normalizeCodeSamples(value?: RedocConfig['codeSamples']): CodeSamplesConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{querySelector as o}from"../../utils/dom.js";import{isNumeric as
|
|
1
|
+
import{querySelector as o}from"../../utils/dom.js";import{isNumeric as n}from"../../utils/helpers.js";import{Languages as f}from"../code-samples/constants.js";function c(e){if(typeof e>"u")return!1;if(e==="")return!0;if(typeof e!="string")return e;switch(e){case"true":return!0;case"false":return!1;default:return e.split(",").map(t=>t.trim()).filter(Boolean)}}function l(e){if(typeof e=="string"&&!n(e)){const t=o(e);t||console.warn("scrollYOffset value is a selector to non-existing element. Using offset 0 by default");const r=t&&t.getBoundingClientRect().bottom||0;return()=>r}else{if(typeof e=="number"||n(e))return()=>typeof e=="number"?e:parseFloat(e);if(typeof e=="function")return()=>{const t=e();return typeof t!="number"&&console.warn(`scrollYOffset should return number but returned value "${t}" of type ${typeof t}`),t};e!==void 0&&console.warn("Wrong value for scrollYOffset ReDoc option: should be string, number or function")}return()=>0}function m(e){const t=Object.values(f).map(r=>({lang:r}));return typeof e=="object"&&e!==null?{languages:t,...e}:{languages:t}}export{m as normalizeCodeSamples,l as normalizeScrollYOffset,c as normalizeShowExtensions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{LayoutVariant as d}from"@redocly/config";import{isUndefined as m,addTrailingSlash as r}from"@redocly/theme/core/openapi";import{WindowReferenceOptions as
|
|
1
|
+
import{LayoutVariant as d}from"@redocly/config";import{isUndefined as m,addTrailingSlash as r}from"@redocly/theme/core/openapi";import{WindowReferenceOptions as n}from"../../constants.js";import{argValueToBoolean as o,argValueToExpandLevel as i,argValueToInt as p,argValueToNumber as c,getWindowReferenceOptions as a,normalizePath as h}from"../../utils/index.js";import{normalizeShowExtensions as u,normalizeScrollYOffset as f,normalizeCodeSamples as S}from"./helpers.js";function y(e,s){e={...s,...e,markdocOptions:{...e?.markdocOptions,components:{...s?.markdocOptions?.components,...e?.markdocOptions?.components},tags:{...s?.markdocOptions?.tags,...e?.markdocOptions?.tags},nodes:{...s?.markdocOptions?.nodes,...e?.markdocOptions?.nodes,heading:s?.markdocOptions?.nodes?.heading||e?.markdocOptions?.nodes.heading}}};const t=Array.isArray(e.ignoreNamedSchemas)?e.ignoreNamedSchemas:e.ignoreNamedSchemas?.split(",").map(l=>l.trim());return{downloadUrls:e.downloadUrls,schemaDefinitionsTagName:e.schemaDefinitionsTagName,corsProxyUrl:e.corsProxyUrl&&r(e.corsProxyUrl),hideSidebar:o(e.hideSidebar,!1),jsonSamplesExpandLevel:i(e.jsonSamplesExpandLevel,2),generatedSamplesMaxDepth:p(e.generatedSamplesMaxDepth,8),hideDownloadButtons:o(e.hideDownloadButtons,!1),hideInfoMetadata:o(e.hideInfoMetadata,!1),hideLoading:o(e.hideLoading,!1),hideSchemaTitles:o(e.hideSchemaTitles,!1),maxDisplayedEnumValues:c(e.maxDisplayedEnumValues),mockServer:e.mockServer?.url?{url:e.mockServer.url,position:e.mockServer.position||"first",description:e.mockServer.description||"Mock server"}:void 0,hideReplay:o(e.hideReplay,!1),oAuth2RedirectURI:e.oAuth2RedirectURI||null,onlyRequiredInSamples:o(e.onlyRequiredInSamples,!1),onDeepLinkClick:e.onDeepLinkClick||a(n.ON_DEEP_LINK_CLICK),routingBasePath:m(e.disableRouter)?"":e.routingBasePath&&h(e.routingBasePath)||"",schemasExpansionLevel:i(e.schemasExpansionLevel),feedback:e.feedback||{hide:!1},sortRequiredPropsFirst:o(e.sortRequiredPropsFirst,!1),scrollYOffset:f(e.scrollYOffset),showExtensions:u(e.showExtensions),sanitize:o(e.sanitize,!1),skipBundle:o(e.skipBundle,!1),ignoreNamedSchemas:new Set(t),markdocOptions:e?.markdocOptions,codeSamples:S(e.codeSamples),layout:e.layout||d.THREE_PANEL,events:e.events||{},unstable_hooks:e.unstable_hooks||a(n.HOOKS)||{},unstable_skipSamples:o(e.unstable_skipSamples,!1),unstable_externalCodeSamples:e.unstable_externalCodeSamples||[],hidePropertiesPrefix:o(e?.hidePropertiesPrefix,!1)}}export{y as normalizeOptions};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.13.0
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"util": "~0.12.5",
|
|
38
38
|
"web-vitals": "3.3.1",
|
|
39
39
|
"@redocly/config": "0.29.0",
|
|
40
|
-
"@redocly/replay": "0.16.0
|
|
40
|
+
"@redocly/replay": "0.16.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@jest/globals": "29.5.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"typescript": "5.6.2",
|
|
76
76
|
"url": "~0.11.0",
|
|
77
77
|
"vite": "^6.3.5",
|
|
78
|
-
"@redocly/theme": "0.57.0
|
|
78
|
+
"@redocly/theme": "0.57.0"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"start": "npm run copy-highlight-hook && vite",
|