@redocly/openapi-docs 3.22.0-next.1 → 3.22.0-next.3

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.
Files changed (113) hide show
  1. package/dist/redocly-openapi-docs.min.js +2734 -2762
  2. package/lib/components/ApiInfo/ApiInfo.d.ts +1 -1
  3. package/lib/components/Callbacks/CallbackDetails.js +2 -2
  4. package/lib/components/Callbacks/CallbackSummary.d.ts +1 -1
  5. package/lib/components/ContentItem/ContentItem.js +1 -1
  6. package/lib/components/ContentItem/useIsExpanded.d.ts +1 -1
  7. package/lib/components/ContentItems/ContentItems.js +1 -1
  8. package/lib/components/ContentItems/Items.js +1 -1
  9. package/lib/components/Download/DownloadSpecification.d.ts +1 -1
  10. package/lib/components/Download/DownloadSpecification.js +2 -2
  11. package/lib/components/ErrorBoundary/ErrorBoundary.js +1 -1
  12. package/lib/components/ExpandAllButton/ExpandAllButton.js +2 -2
  13. package/lib/components/Language/LanguageItem.js +1 -1
  14. package/lib/components/Language/LanguageList.js +1 -1
  15. package/lib/components/Language/styled.js +1 -1
  16. package/lib/components/Markdown/Markdown.js +1 -1
  17. package/lib/components/McpOverview/McpOverview.d.ts +1 -1
  18. package/lib/components/McpOverview/McpOverview.js +1 -1
  19. package/lib/components/McpTool/McpPrompt.js +1 -1
  20. package/lib/components/McpTool/McpResource.js +1 -1
  21. package/lib/components/McpTool/McpTool.js +1 -1
  22. package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
  23. package/lib/components/OperationItem/Description.js +1 -1
  24. package/lib/components/OperationItem/OperationItem.js +1 -1
  25. package/lib/components/Overview/Overview.js +1 -1
  26. package/lib/components/PayloadSamples/Example.d.ts +1 -1
  27. package/lib/components/PayloadSamples/ExampleValue.d.ts +1 -1
  28. package/lib/components/PayloadSamples/MediaTypeSamples.js +1 -1
  29. package/lib/components/PropertyDetails/DescriptionEnums.d.ts +1 -1
  30. package/lib/components/PropertyDetails/DescriptionEnums.js +1 -1
  31. package/lib/components/PropertyDetails/EnumValues.js +1 -1
  32. package/lib/components/PropertyDetails/Examples.js +1 -1
  33. package/lib/components/PropertyDetails/Extensions.js +2 -2
  34. package/lib/components/PropertyDetails/FieldDetail.js +1 -1
  35. package/lib/components/PropertyDetails/FieldDetails.js +2 -2
  36. package/lib/components/PropertyDetails/Pattern.js +1 -1
  37. package/lib/components/PropertyDetails/SchemaTypeInfo.js +1 -1
  38. package/lib/components/PropertyDetails/SimpleEnums.d.ts +1 -1
  39. package/lib/components/PropertyDetails/SimpleEnums.js +1 -1
  40. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +1 -1
  41. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
  42. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.d.ts +1 -1
  43. package/lib/components/Replay/EmbeddedReplay.d.ts +1 -1
  44. package/lib/components/Replay/Replay.js +1 -1
  45. package/lib/components/Replay/utils.d.ts +1 -1
  46. package/lib/components/Request/RequestDetails.js +1 -1
  47. package/lib/components/RequestParameters/ParametersGroup.js +1 -1
  48. package/lib/components/RequestParameters/RequestParameters.d.ts +1 -1
  49. package/lib/components/RequestParameters/RequestParameters.js +1 -1
  50. package/lib/components/RequestSamples/Example.js +1 -1
  51. package/lib/components/RequestSamples/RequestSamples.js +2 -2
  52. package/lib/components/RequestSamples/useCodeSamples.d.ts +1 -1
  53. package/lib/components/ResponseSamples/ResponseSamples.d.ts +1 -1
  54. package/lib/components/ResponseSamples/ResponseSamples.js +1 -1
  55. package/lib/components/Responses/OperationResponseList.js +1 -1
  56. package/lib/components/Responses/ResponseDetails.js +1 -1
  57. package/lib/components/RightPanel/RightPanel.js +1 -1
  58. package/lib/components/Schema/ArraySchema.js +1 -1
  59. package/lib/components/Schema/ObjectSchema.js +1 -1
  60. package/lib/components/Schema/OneOfSchema.js +1 -1
  61. package/lib/components/Schema/helpers.d.ts +1 -1
  62. package/lib/components/SectionContent/SectionContent.d.ts +1 -1
  63. package/lib/components/SectionContent/SectionContent.js +1 -1
  64. package/lib/components/SectionItem/SectionItem.js +1 -1
  65. package/lib/components/Security/OAuthFlow.js +1 -1
  66. package/lib/components/Security/OAuthScopes.js +1 -1
  67. package/lib/components/Security/RequiredScopesList.d.ts +1 -1
  68. package/lib/components/Security/RequiredScopesList.js +1 -1
  69. package/lib/components/Security/ScopeTagWithTooltip.d.ts +1 -1
  70. package/lib/components/Security/Security.js +1 -1
  71. package/lib/components/Security/SecurityFlow.d.ts +1 -1
  72. package/lib/components/Security/SecurityFlow.js +1 -1
  73. package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
  74. package/lib/components/ServerListDropdown/styled.js +1 -1
  75. package/lib/components/StickySidebar/SidebarActions.js +1 -1
  76. package/lib/components/StickySidebar/StickyResponsiveSidebar.js +2 -2
  77. package/lib/components/TagItem/Breadcrumbs.js +1 -1
  78. package/lib/components/TagItem/OperationNavigationItems.d.ts +1 -1
  79. package/lib/components/TagItem/OperationNavigationItems.js +1 -1
  80. package/lib/components/TagItem/OperationsNavigation.d.ts +1 -1
  81. package/lib/components/TagItem/TagItem.d.ts +1 -1
  82. package/lib/components/TagItem/TagItem.js +1 -1
  83. package/lib/components/ViewNested/ViewNested.js +1 -1
  84. package/lib/components/common/Badges.js +1 -1
  85. package/lib/components/common/BodyContent/BodyContent.js +2 -2
  86. package/lib/components/common/ConstraintsView.js +1 -1
  87. package/lib/components/common/Dropdown/Dropdown.d.ts +1 -1
  88. package/lib/components/common/Dropdown/Dropdown.js +1 -1
  89. package/lib/components/common/Extensions.js +2 -2
  90. package/lib/components/common/LinkToField.js +1 -1
  91. package/lib/components/common/OperationItemTitle.js +2 -2
  92. package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +1 -1
  93. package/lib/components/common/linkify.js +1 -1
  94. package/lib/components/common/mixins.d.ts +1 -1
  95. package/lib/empty.d.ts +4 -4
  96. package/lib/jotai/app.d.ts +2 -2
  97. package/lib/jotai/operation.d.ts +1 -1
  98. package/lib/models/mediaContent.d.ts +1 -1
  99. package/lib/models/mediaType.d.ts +1 -1
  100. package/lib/models/request.d.ts +1 -1
  101. package/lib/models/response.d.ts +1 -1
  102. package/lib/models/schema.d.ts +1 -1
  103. package/lib/models/security.d.ts +1 -1
  104. package/lib/services/code-samples/generator.d.ts +1 -1
  105. package/lib/services/code-samples/httpsnippet/helpers/code-builder.d.ts +1 -1
  106. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +3 -3
  107. package/lib/services/code-samples/httpsnippet/targets/__mocks__/mock.d.ts +39 -39
  108. package/lib/services/code-samples/httpsnippet/targets/index.d.ts +1 -1
  109. package/lib/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
  110. package/lib/utils/helpers.d.ts +1 -1
  111. package/lib/utils/openapi.d.ts +1 -1
  112. package/lib/utils/theme-helpers.d.ts +2 -2
  113. package/package.json +12 -13
@@ -1 +1 @@
1
- import{jsx as h,Fragment as D}from"react/jsx-runtime";import{useMemo as C}from"react";import{useAtomValue as _}from"jotai";import{ParametersGroup as S}from"./ParametersGroup.js";import{Body as b}from"./Body.js";import{makeDeepLink as v}from"../../services/index.js";import{useTranslate as Q}from"../../hooks/index.js";import{globalStoreAtom as z}from"../../jotai/store.js";import{getMediaContent as F}from"../../models/mediaContent.js";import{getContentWithLegacyExamples as T}from"../../utils/openapi.js";const p=["path","query","querystring","cookie","header"];function Z({body:i,parameters:t=[],operationId:n,callbackId:u}){const c=Q(),{parser:a,options:q}=_(z),m=(e=>{const o={};return e.forEach(r=>{W(o,r.in,r)}),o})(t),P=m.querystring||[],d=P.filter(e=>e.serializationMime),f=P.filter(e=>!e.serializationMime),l=C(()=>!a||d.length===0?[]:d.map(e=>{const o=e.deps?.operation?.pointer;if(!o)return null;try{const r=a.byRef(o);if(!r?.parameters)return null;const s=r.parameters.find(x=>{const{resolved:M}=a.deref(x);return M.name===e.name&&M.in==="querystring"});if(!s)return null;const{resolved:E}=a.deref(s),L=T(E);return L?{content:F({parser:a,info:L,isRequestType:!0,options:q,data:{operation:e.deps?.operation||{pointer:o},type:"request",absolutePointer:e.absolutePointer||o}}),description:e.description,required:e.required,name:e.name}:null}catch{return null}}).filter(Boolean),[a,q,d]),R={[p[0]]:c("openapi.path","Path"),[p[1]]:c("openapi.query","Query"),[p[2]]:c("openapi.querystring","Query String"),[p[3]]:c("openapi.cookie","Cookies"),[p[4]]:c("openapi.header","Headers")},{content:y,description:k,required:A}=i||{},$=C(()=>{const e=[],o=f.length>0||l.length>0;return p.forEach(r=>{if(!(r==="query"&&o))if(r==="querystring")f.length>0&&e.push({type:"parameters",place:r,params:f});else{const s=m[r];s&&s.length>0&&e.push({type:"parameters",place:r,params:s})}}),l.forEach((r,s)=>{r&&e.push({type:"body",content:r.content,description:r.description,required:r.required,deepLink:g(n,u,`querystring-${r.name}`),key:`querystring-${r.name}-${s}`})}),y&&e.push({type:"body",content:y,description:k,required:A,deepLink:g(n,u),key:"body"}),e},[m,f,l,y,k,A,n,u]);return!i&&!t.length?null:h(D,{children:$.map(e=>e.type==="parameters"?h(S,{title:R[e.place],parameters:e.params,deepLink:g(n,u,e.place)},e.place):h(b,{content:e.content,description:e.description,required:e.required,deepLink:e.deepLink},e.key))})}function W(i,t="",n){i[t]||(i[t]=[]),i[t].push(n)}function g(i,t,n="body"){const u=`${t?`${t}/request/${n}`:`request/${n}`}`;return v(i,u)}export{Z as RequestParameters};
1
+ import{Fragment as D,jsx as h}from"react/jsx-runtime";import{useMemo as C}from"react";import{useAtomValue as _}from"jotai";import{ParametersGroup as S}from"./ParametersGroup.js";import{Body as b}from"./Body.js";import{makeDeepLink as v}from"../../services/index.js";import{useTranslate as Q}from"../../hooks/index.js";import{globalStoreAtom as z}from"../../jotai/store.js";import{getMediaContent as F}from"../../models/mediaContent.js";import{getContentWithLegacyExamples as T}from"../../utils/openapi.js";const p=["path","query","querystring","cookie","header"];function Z({body:i,parameters:t=[],operationId:n,callbackId:u}){const c=Q(),{parser:a,options:q}=_(z),m=(e=>{const o={};return e.forEach(r=>{W(o,r.in,r)}),o})(t),P=m.querystring||[],d=P.filter(e=>e.serializationMime),f=P.filter(e=>!e.serializationMime),l=C(()=>!a||d.length===0?[]:d.map(e=>{const o=e.deps?.operation?.pointer;if(!o)return null;try{const r=a.byRef(o);if(!r?.parameters)return null;const s=r.parameters.find(x=>{const{resolved:M}=a.deref(x);return M.name===e.name&&M.in==="querystring"});if(!s)return null;const{resolved:E}=a.deref(s),L=T(E);return L?{content:F({parser:a,info:L,isRequestType:!0,options:q,data:{operation:e.deps?.operation||{pointer:o},type:"request",absolutePointer:e.absolutePointer||o}}),description:e.description,required:e.required,name:e.name}:null}catch{return null}}).filter(Boolean),[a,q,d]),R={[p[0]]:c("openapi.path","Path"),[p[1]]:c("openapi.query","Query"),[p[2]]:c("openapi.querystring","Query String"),[p[3]]:c("openapi.cookie","Cookies"),[p[4]]:c("openapi.header","Headers")},{content:y,description:k,required:A}=i||{},$=C(()=>{const e=[],o=f.length>0||l.length>0;return p.forEach(r=>{if(!(r==="query"&&o))if(r==="querystring")f.length>0&&e.push({type:"parameters",place:r,params:f});else{const s=m[r];s&&s.length>0&&e.push({type:"parameters",place:r,params:s})}}),l.forEach((r,s)=>{r&&e.push({type:"body",content:r.content,description:r.description,required:r.required,deepLink:g(n,u,`querystring-${r.name}`),key:`querystring-${r.name}-${s}`})}),y&&e.push({type:"body",content:y,description:k,required:A,deepLink:g(n,u),key:"body"}),e},[m,f,l,y,k,A,n,u]);return!i&&!t.length?null:h(D,{children:$.map(e=>e.type==="parameters"?h(S,{title:R[e.place],parameters:e.params,deepLink:g(n,u,e.place)},e.place):h(b,{content:e.content,description:e.description,required:e.required,deepLink:e.deepLink},e.key))})}function W(i,t="",n){i[t]||(i[t]=[]),i[t].push(n)}function g(i,t,n="body"){const u=`${t?`${t}/request/${n}`:`request/${n}`}`;return v(i,u)}export{Z as RequestParameters};
@@ -1 +1 @@
1
- import{jsx as h,Fragment as u,jsxs as E}from"react/jsx-runtime";import{memo as O}from"react";import{useAtom as g}from"jotai";import{ExampleSwitch as v,useExampleKey as b}from"../Samples/index.js";import{useActivateExample as j,useTelemetry as K}from"../../hooks/index.js";import{operationStore as w}from"../../jotai/operation.js";function C({mediaType:e,mediaContent:l,renderSample:r}){const m=K(),p=e.operation.pointer,[n,i]=g(w(p)),s=e.examples||e.formExamples||{},t=Object.keys(s),x=j(l),{exampleKey:c}=b(e.operation,s),a=t[n.activeOneOf[e?.examplesPointer||e.operation.pointer]]||c;return!t.length||t.length===1?r():E(u,{children:[h(v,{examples:s,exampleKey:a,onChange:o=>{const f=e.examplesPointer&&e.examplesPointer.startsWith(e.operation.pointer)?e.examplesPointer:e.operation.pointer;m.sendExamplesSwitcherClickedMessage([{object:"button",id:"examples-switcher-request-body",uri:window.location.href,exampleNumber:t.indexOf(o),totalExamples:t.length}]),i({...n,activeExampleName:o,activeOneOf:{...n.activeOneOf,[f]:t.indexOf(o)},requestValues:{body:null}}),x(o)}}),r(a)]})}const M=O(C);export{M as Example};
1
+ import{Fragment as f,jsx as h,jsxs as E}from"react/jsx-runtime";import{memo as O}from"react";import{useAtom as g}from"jotai";import{ExampleSwitch as v,useExampleKey as b}from"../Samples/index.js";import{useActivateExample as j,useTelemetry as K}from"../../hooks/index.js";import{operationStore as C}from"../../jotai/operation.js";function w({mediaType:e,mediaContent:l,renderSample:s}){const m=K(),p=e.operation.pointer,[n,i]=g(C(p)),r=e.examples||e.formExamples||{},t=Object.keys(r),x=j(l),{exampleKey:c}=b(e.operation,r),a=t[n.activeOneOf[e?.examplesPointer||e.operation.pointer]]||c;return!t.length||t.length===1?s():E(f,{children:[h(v,{examples:r,exampleKey:a,onChange:o=>{const u=e.examplesPointer&&e.examplesPointer.startsWith(e.operation.pointer)?e.examplesPointer:e.operation.pointer;m.sendExamplesSwitcherClickedMessage([{object:"button",id:"examplesSwitcherButton",uri:"urn:redocly:redoc:ui:button:examplesSwitcherButton",exampleNumber:t.indexOf(o),totalExamples:t.length}]),i({...n,activeExampleName:o,activeOneOf:{...n.activeOneOf,[u]:t.indexOf(o)},requestValues:{body:null}}),x(o)}}),s(a)]})}const q=O(w);export{q as Example};
@@ -1,4 +1,4 @@
1
- import{jsx as o,jsxs as N}from"react/jsx-runtime";import{memo as D,useCallback as w,useMemo as L}from"react";import{useAtomValue as y,useAtom as T}from"jotai";import{PanelHeader as U}from"@redocly/theme/components/Panel/PanelHeader";import{PayloadSamples as W}from"../PayloadSamples/index.js";import{CodeSample as B}from"./CodeSample.js";import{useCodeSamples as F}from"./useCodeSamples.js";import{isPayloadSample as H}from"../../models/index.js";import{createCodeSampleCopyEvent as O,createLanguageSwitchEvent as $}from"../../events/index.js";import{globalStoreAtom as V}from"../../jotai/store.js";import{ServerListDropdown as z}from"../ServerListDropdown/index.js";import{LanguageDropdown as G}from"../Language/index.js";import{activeMimeNameAtom as J,languageAtom as K}from"../../jotai/app.js";import{Replay as k}from"../Replay/index.js";import{CodeBlockPanel as A}from"../common/index.js";import{useActiveWithFallback as Q,useTelemetry as X}from"../../hooks/index.js";import{operationStore as Y}from"../../jotai/operation.js";import{styled as S}from"../../styled-components.js";function Z({operation:a,disableFooter:P,onPanelToggle:v,...p}){const c=X(),[{activeLanguage:q,languages:m},R]=T(K),{samples:n}=F(a),{parser:d,options:{events:s,corsProxyUrl:g,hideReplay:j}}=y(V),i=!P&&!a.isWebhook&&!j&&!a.hideReplay,t=!!m?.length,u=Q(n,q),E=e=>{R(e),c.sendSelectLanguageClickedMessage([{id:`button_select_language_${e}`,object:"button",uri:window.location.href,language:e}]);const r=m?.find(l=>l.key===e);if(s?.codeSamplesLanguageSwitch&&r){const l=$({operation:a,sample:{lang:r.lang,label:r.title}});s.codeSamplesLanguageSwitch(l)}},h=y(J),{activeExampleName:b}=y(Y(a.pointer)),f=w(({lang:e,title:r})=>()=>{const l=O({operation:a,label:r,lang:e,type:"request",activeMimeName:h,activeExampleName:b});c.sendCopyCodeSnippetClickedMessage([{id:"copy-code-snippet",object:"code_snippet",uri:window.location.href,snippetType:"request",language:e}]),s?.codeSamplesCopy?.(l)},[a,c,s,h,b]),C=w(e=>{v?.(e,"request-samples")},[v]),x=()=>N(I,{isExpandable:!1,withReplay:!t&&i,children:[o(ee,{operation:a}),t&&o(G,{activeTab:u,samples:n,onChange:E}),!t&&i&&o(k,{operation:a,corsProxyUrl:g,fullOpenApi:d.definition})]}),_=L(()=>{if(i&&t)return o(ae,{children:o(k,{operation:a,corsProxyUrl:g,fullOpenApi:d.definition})})},[i,t,a,g,d.definition]),M=L(()=>n.map(e=>e.key===u?o("div",{children:H(e)?o(W,{content:e.requestBodyContent,onCopyClick:f(e),onPanelToggle:C,...p}):o(B,{lang:e.lang,source:e.source,externalSample:e,operation:a,onCopyClick:f(e),...p})},e.key+a.id):null),[u,f,C,a,p,n]);return m&&!n.length?o(A,{className:"panel-request-samples",header:x,isExpandable:!1,expanded:!1}):n.length?o(A,{className:"panel-request-samples",header:x,footer:_,isExpandable:!1,children:M}):null}const be=D(Z),I=S(U)`
1
+ import{jsx as o,jsxs as N}from"react/jsx-runtime";import{memo as D,useCallback as L,useMemo as k}from"react";import{useAtomValue as y,useAtom as T}from"jotai";import{PanelHeader as U}from"@redocly/theme/components/Panel/PanelHeader";import{PayloadSamples as W}from"../PayloadSamples/index.js";import{CodeSample as F}from"./CodeSample.js";import{useCodeSamples as H}from"./useCodeSamples.js";import{isPayloadSample as O}from"../../models/index.js";import{createCodeSampleCopyEvent as _,createLanguageSwitchEvent as V}from"../../events/index.js";import{globalStoreAtom as $}from"../../jotai/store.js";import{ServerListDropdown as z}from"../ServerListDropdown/index.js";import{LanguageDropdown as G}from"../Language/index.js";import{activeMimeNameAtom as J,languageAtom as K}from"../../jotai/app.js";import{Replay as A}from"../Replay/index.js";import{CodeBlockPanel as w}from"../common/index.js";import{useActiveWithFallback as Q,useTelemetry as X}from"../../hooks/index.js";import{operationStore as Y}from"../../jotai/operation.js";import{styled as S}from"../../styled-components.js";function Z({operation:a,disableFooter:P,onPanelToggle:v,...p}){const c=X(),[{activeLanguage:q,languages:m},R]=T(K),{samples:t}=H(a),{parser:d,options:{events:s,corsProxyUrl:u,hideReplay:j}}=y($),i=!P&&!a.isWebhook&&!j&&!a.hideReplay,n=!!m?.length,g=Q(t,q),B=e=>{R(e),c.sendSelectLanguageClickedMessage([{id:"selectLanguageButton",object:"button",uri:"urn:redocly:redoc:ui:button:selectLanguageButton",language:e}]);const r=m?.find(l=>l.key===e);if(s?.codeSamplesLanguageSwitch&&r){const l=V({operation:a,sample:{lang:r.lang,label:r.title}});s.codeSamplesLanguageSwitch(l)}},b=y(J),{activeExampleName:h}=y(Y(a.pointer)),f=L(({lang:e,title:r})=>()=>{const l=_({operation:a,label:r,lang:e,type:"request",activeMimeName:b,activeExampleName:h});c.sendCopyCodeSnippetClickedMessage([{id:"copyCodeSnippetButton",object:"button",uri:"urn:redocly:redoc:ui:button:copyCodeSnippetButton",snippetType:"request",language:e}]),s?.codeSamplesCopy?.(l)},[a,c,s,b,h]),C=L(e=>{v?.(e,"request-samples")},[v]),x=()=>N(I,{isExpandable:!1,withReplay:!n&&i,children:[o(ee,{operation:a}),n&&o(G,{activeTab:g,samples:t,onChange:B}),!n&&i&&o(A,{operation:a,corsProxyUrl:u,fullOpenApi:d.definition})]}),E=k(()=>{if(i&&n)return o(ae,{children:o(A,{operation:a,corsProxyUrl:u,fullOpenApi:d.definition})})},[i,n,a,u,d.definition]),M=k(()=>t.map(e=>e.key===g?o("div",{children:O(e)?o(W,{content:e.requestBodyContent,onCopyClick:f(e),onPanelToggle:C,...p}):o(F,{lang:e.lang,source:e.source,externalSample:e,operation:a,onCopyClick:f(e),...p})},e.key+a.id):null),[g,f,C,a,p,t]);return m&&!t.length?o(w,{className:"panel-request-samples",header:x,isExpandable:!1,expanded:!1}):t.length?o(w,{className:"panel-request-samples",header:x,footer:E,isExpandable:!1,children:M}):null}const he=D(Z),I=S(U)`
2
2
  flex-wrap: nowrap;
3
3
  ${({withReplay:a})=>a&&"padding: var(--spacing-xs) var(--spacing-sm);"}
4
4
  `,ee=S(z)`
@@ -9,4 +9,4 @@ import{jsx as o,jsxs as N}from"react/jsx-runtime";import{memo as D,useCallback a
9
9
  justify-content: flex-end;
10
10
  border-top: var(--panel-border);
11
11
  padding: var(--spacing-base) var(--spacing-md) var(--spacing-md);
12
- `;export{be as RequestSamples};
12
+ `;export{he as RequestSamples};
@@ -1,7 +1,7 @@
1
1
  import type { Unstable_ExternalCodeSample } from '../../services/index.js';
2
2
  import type { OperationModel } from '../../models/index.js';
3
3
  import type { OpenAPIXCodeSample } from '../../types/index.js';
4
- export declare function useCodeSamples({ payload, isWebhook, definitionSamples, pointer, envVariables, }: OperationModel): {
4
+ export declare function useCodeSamples({ payload, isWebhook, definitionSamples, pointer, envVariables }: OperationModel): {
5
5
  samples: Array<{
6
6
  key: string;
7
7
  title: string;
@@ -7,6 +7,6 @@ export interface ResponseSamplesProps {
7
7
  onTabChange: (tab: string) => void;
8
8
  onPanelToggle?: (isExpanded: boolean, panelType?: PanelType) => void;
9
9
  }
10
- declare function ResponseSamplesComponent({ operation, activeResponseTab, onTabChange, onPanelToggle, }: ResponseSamplesProps): ReactElement | null;
10
+ declare function ResponseSamplesComponent({ operation, activeResponseTab, onTabChange, onPanelToggle }: ResponseSamplesProps): ReactElement | null;
11
11
  export declare const ResponseSamples: import("react").MemoExoticComponent<typeof ResponseSamplesComponent>;
12
12
  export {};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{memo as b,useCallback as i}from"react";import{useAtomValue as n}from"jotai";import{PayloadSamples as h,StyledCodeBlock as v}from"../PayloadSamples/index.js";import{createCodeSampleCopyEvent as k}from"../../events/index.js";import{globalOptionsAtom as T}from"../../jotai/store.js";import{Summary as g}from"./Summary.js";import{Tabs as x}from"../Tabs/index.js";import{CodeBlockPanel as N}from"../common/index.js";import{useTelemetry as j,useTranslate as A}from"../../hooks/index.js";import{activeMimeNameAtom as E}from"../../jotai/app.js";import{operationStore as M}from"../../jotai/operation.js";function P({operation:o,activeResponseTab:d,onTabChange:f,onPanelToggle:a}){const m=j(),{events:p}=n(T),y=A(),u=o.responses.filter(e=>e.content?.hasSample??!1),s=o.responses.map(({code:e})=>({key:e,title:e})),r=s?.find(({key:e})=>e===d)||s?.[0],l=n(E),{activeExampleName:c}=n(M(o.pointer)),C=i(()=>{m.sendCopyCodeSnippetClickedMessage([{id:"copy-code-snippet",object:"code_snippet",uri:window.location.href,snippetType:"response"}]);const e=k({operation:o,type:"response",activeMimeName:l,activeExampleName:c});p?.codeSamplesCopy?.(e)},[m,o,p,l,c]),S=i(e=>{a?.(e,"response-samples")},[a]);return u.length?t(N,{className:"panel-response-samples",header:()=>t(g,{tabs:t(x,{tabs:s,activeTab:r,onChange:e=>f(e.key)})}),isExpandable:!1,children:o.responses.map(e=>e.code===r.key?t("div",{"data-testid":"response-payload-sample",children:e?.content?.hasSample?t(h,{content:e.content,onCopyClick:C,onPanelToggle:S}):t(v,{source:y("openapi.noResponseContent","No content")})},e.code):null)}):null}const J=b(P);export{J as ResponseSamples};
1
+ import{jsx as t}from"react/jsx-runtime";import{memo as b,useCallback as i}from"react";import{useAtomValue as s}from"jotai";import{PayloadSamples as h,StyledCodeBlock as v}from"../PayloadSamples/index.js";import{createCodeSampleCopyEvent as k}from"../../events/index.js";import{globalOptionsAtom as T}from"../../jotai/store.js";import{Summary as g}from"./Summary.js";import{Tabs as x}from"../Tabs/index.js";import{CodeBlockPanel as N}from"../common/index.js";import{useTelemetry as B,useTranslate as j}from"../../hooks/index.js";import{activeMimeNameAtom as A}from"../../jotai/app.js";import{operationStore as E}from"../../jotai/operation.js";function M({operation:o,activeResponseTab:d,onTabChange:u,onPanelToggle:a}){const m=B(),{events:p}=s(T),y=j(),f=o.responses.filter(e=>e.content?.hasSample??!1),n=o.responses.map(({code:e})=>({key:e,title:e})),r=n?.find(({key:e})=>e===d)||n?.[0],l=s(A),{activeExampleName:c}=s(E(o.pointer)),C=i(()=>{m.sendCopyCodeSnippetClickedMessage([{id:"copyCodeSnippetButton",object:"button",uri:"urn:redocly:redoc:ui:button:copyCodeSnippetButton",snippetType:"response"}]);const e=k({operation:o,type:"response",activeMimeName:l,activeExampleName:c});p?.codeSamplesCopy?.(e)},[m,o,p,l,c]),S=i(e=>{a?.(e,"response-samples")},[a]);return f.length?t(N,{className:"panel-response-samples",header:()=>t(g,{tabs:t(x,{tabs:n,activeTab:r,onChange:e=>u(e.key)})}),isExpandable:!1,children:o.responses.map(e=>e.code===r.key?t("div",{"data-testid":"response-payload-sample",children:e?.content?.hasSample?t(h,{content:e.content,onCopyClick:C,onPanelToggle:S}):t(v,{source:y("openapi.noResponseContent","No content")})},e.code):null)}):null}const J=b(M);export{J as ResponseSamples};
@@ -1,4 +1,4 @@
1
- import{jsx as n,jsxs as s,Fragment as v}from"react/jsx-runtime";import{memo as A,useMemo as L}from"react";import{useLocation as j}from"react-router-dom";import{useAtomValue as w}from"jotai";import{Tabs as F,useTabsState as M}from"../Tabs/index.js";import{ResponseDetails as C}from"./ResponseDetails.js";import{makeDeepLink as N}from"../../services/index.js";import{Row as R,StyledTitle as _}from"./styled.js";import{LinkToField as B}from"../common/LinkToField.js";import{pathIncludesLink as c,hasNestedFields as D}from"../../utils/index.js";import{ExpandAllButton as E}from"../ExpandAllButton/index.js";import{useTranslate as P}from"../../hooks/index.js";import{getActiveMediaType as S}from"../../models/index.js";import{activeMimeNameAtom as $}from"../../jotai/app.js";import{styled as I}from"../../styled-components.js";const oe=A(({responses:i,renderTitle:f,operationId:a,operationPointer:d,activeResponseTab:m,onTabChange:u,callbackId:g,onPanelToggle:h})=>{const p=j(),T=P(),l=w($),r=i.map(({code:e})=>({key:e,title:e})),b=r.find(({key:e})=>e===m||c(p,a)&&c(p,`c=${e}`)),{activeTab:k,handleTabChange:x}=M({tabs:r,defaultTab:b?.key,onChange:u}),o=r.find(e=>e.key===(m||k)),t=i.find(e=>e.code===o?.key),y=L(()=>{if(!t?.content)return!1;const{schema:e}=S(t?.content,l)||{};return D(e)},[l,t?.content]);return o?s(v,{children:[s(O,{children:[f?.(o)||s(_,{children:[n(B,{to:N(a,`response&c=${o.key}`)}),T("openapi.responses","Responses")]}),n(F,{tabs:r,activeTab:o,onChange:x}),y&&n(E,{type:"response",operationPointer:d,onPanelToggle:h})]}),t?n("div",{children:n(C,{response:t,operationId:a,callbackId:g})},t.code):null]}):null}),O=I(R)`
1
+ import{Fragment as v,jsx as n,jsxs as s}from"react/jsx-runtime";import{memo as A,useMemo as L}from"react";import{useLocation as j}from"react-router-dom";import{useAtomValue as w}from"jotai";import{Tabs as F,useTabsState as M}from"../Tabs/index.js";import{ResponseDetails as C}from"./ResponseDetails.js";import{makeDeepLink as N}from"../../services/index.js";import{Row as R,StyledTitle as _}from"./styled.js";import{LinkToField as B}from"../common/LinkToField.js";import{pathIncludesLink as c,hasNestedFields as D}from"../../utils/index.js";import{ExpandAllButton as E}from"../ExpandAllButton/index.js";import{useTranslate as P}from"../../hooks/index.js";import{getActiveMediaType as S}from"../../models/index.js";import{activeMimeNameAtom as $}from"../../jotai/app.js";import{styled as I}from"../../styled-components.js";const oe=A(({responses:i,renderTitle:f,operationId:a,operationPointer:d,activeResponseTab:m,onTabChange:u,callbackId:g,onPanelToggle:h})=>{const p=j(),T=P(),l=w($),r=i.map(({code:e})=>({key:e,title:e})),b=r.find(({key:e})=>e===m||c(p,a)&&c(p,`c=${e}`)),{activeTab:k,handleTabChange:x}=M({tabs:r,defaultTab:b?.key,onChange:u}),o=r.find(e=>e.key===(m||k)),t=i.find(e=>e.code===o?.key),y=L(()=>{if(!t?.content)return!1;const{schema:e}=S(t?.content,l)||{};return D(e)},[l,t?.content]);return o?s(v,{children:[s(O,{children:[f?.(o)||s(_,{children:[n(B,{to:N(a,`response&c=${o.key}`)}),T("openapi.responses","Responses")]}),n(F,{tabs:r,activeTab:o,onChange:x}),y&&n(E,{type:"response",operationPointer:d,onPanelToggle:h})]}),t?n("div",{children:n(C,{response:t,operationId:a,callbackId:g})},t.code):null]}):null}),O=I(R)`
2
2
  flex-wrap: wrap;
3
3
  gap: var(--spacing-unit);
4
4
  margin-top: var(--spacing-xl);
@@ -1 +1 @@
1
- import{jsx as r,Fragment as f,jsxs as u}from"react/jsx-runtime";import{memo as x}from"react";import{ResponseHeaders as k}from"./ResponseHeaders.js";import{StyledDescription as i}from"./styled.js";import{BodyContent as y}from"../common/BodyContent/index.js";import{makeDeepLink as $}from"../../services/index.js";function h({response:s,operationId:e,callbackId:n,disableDeepLinks:o}){const{description:t,headers:d,content:a,summary:c,code:m}=s;return u(f,{children:[r(i,{className:"redoc-markdown",source:c}),r(i,{className:"redoc-markdown",source:t}),r(k,{headers:d,deepLink:o?void 0:p(e,n,m,"headers")}),r(y,{content:a,skipWriteOnly:!0,deepLink:o?void 0:p(e,n,m,"body")})]})}const w=x(h);function p(s,e="",n,o){const t=e?`${e}/response&c=${n}/${o}`:`response&c=${n}/${o}`;return $(s,t)}export{w as ResponseDetails};
1
+ import{Fragment as f,jsx as r,jsxs as u}from"react/jsx-runtime";import{memo as x}from"react";import{ResponseHeaders as k}from"./ResponseHeaders.js";import{StyledDescription as i}from"./styled.js";import{BodyContent as y}from"../common/BodyContent/index.js";import{makeDeepLink as $}from"../../services/index.js";function h({response:s,operationId:e,callbackId:n,disableDeepLinks:o}){const{description:t,headers:d,content:a,summary:c,code:m}=s;return u(f,{children:[r(i,{className:"redoc-markdown",source:c}),r(i,{className:"redoc-markdown",source:t}),r(k,{headers:d,deepLink:o?void 0:p(e,n,m,"headers")}),r(y,{content:a,skipWriteOnly:!0,deepLink:o?void 0:p(e,n,m,"body")})]})}const w=x(h);function p(s,e="",n,o){const t=e?`${e}/response&c=${n}/${o}`:`response&c=${n}/${o}`;return $(s,t)}export{w as ResponseDetails};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as u,jsxs as x}from"react/jsx-runtime";import{useAtomValue as c}from"jotai";import{Panel as r}from"@redocly/theme/components/Panel/Panel";import{Markdown as S}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as b}from"../Download/index.js";import{Overview as O}from"../Overview/index.js";import{ServerList as j}from"../ServerList/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";import{normalizeServers as d}from"../../utils/index.js";import{LanguageList as L}from"../Language/index.js";import{mergeInMockServer as M}from"../../models/operation.js";import{languageAtom as P}from"../../jotai/app.js";import{useTranslate as k}from"../../hooks/index.js";import{useDownloadInfo as D}from"../Download/useDownloadInfo.js";import{McpOverview as E}from"../McpOverview/McpOverview.js";const J=({item:{infoDefinition:o}})=>{const a=k(),{options:{hideDownloadButtons:f,downloadUrls:g,mockServer:v},parser:{definition:s,definitionUrl:t}}=c(I),{languages:i,activeLanguage:h}=c(P),l=D({downloadUrls:g}),m=d(t,M(s.servers||[],v)),n=s?.["x-mcp"],w=d(t,n?.servers||s.servers||[]),p=!(Object.keys(s.paths||{}).length>0)&&n;return x(u,{children:[!f&&l&&e(r,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:e(b,{downloadObjects:l})}),!!n&&e(r,{className:"panel-download",header:a("openapi.mcp.title","MCP server"),isExpandable:!1,children:e(E,{mcpInfo:n,mcpServers:w})}),(o?.license||o?.contact||o?.termsOfService)&&e(r,{className:"panel-mcp-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:e(S,{children:e(O,{info:o,translate:a})})}),!!i?.length&&!p&&e(r,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:e(L,{languages:i,activeLanguage:h,translate:a})}),!!m.length&&!p&&e(r,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:e(j,{servers:m,translate:a})})]})};export{J as RightPanel};
1
+ import{Fragment as u,jsx as e,jsxs as x}from"react/jsx-runtime";import{useAtomValue as c}from"jotai";import{Panel as r}from"@redocly/theme/components/Panel/Panel";import{Markdown as S}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as b}from"../Download/index.js";import{Overview as O}from"../Overview/index.js";import{ServerList as j}from"../ServerList/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";import{normalizeServers as d}from"../../utils/index.js";import{LanguageList as L}from"../Language/index.js";import{mergeInMockServer as M}from"../../models/operation.js";import{languageAtom as P}from"../../jotai/app.js";import{useTranslate as k}from"../../hooks/index.js";import{useDownloadInfo as D}from"../Download/useDownloadInfo.js";import{McpOverview as E}from"../McpOverview/McpOverview.js";const J=({item:{infoDefinition:o}})=>{const a=k(),{options:{hideDownloadButtons:f,downloadUrls:g,mockServer:v},parser:{definition:s,definitionUrl:t}}=c(I),{languages:i,activeLanguage:h}=c(P),l=D({downloadUrls:g}),m=d(t,M(s.servers||[],v)),n=s?.["x-mcp"],w=d(t,n?.servers||s.servers||[]),p=!(Object.keys(s.paths||{}).length>0)&&n;return x(u,{children:[!f&&l&&e(r,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:e(b,{downloadObjects:l})}),!!n&&e(r,{className:"panel-download",header:a("openapi.mcp.title","MCP server"),isExpandable:!1,children:e(E,{mcpInfo:n,mcpServers:w})}),(o?.license||o?.contact||o?.termsOfService)&&e(r,{className:"panel-mcp-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:e(S,{children:e(O,{info:o,translate:a})})}),!!i?.length&&!p&&e(r,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:e(L,{languages:i,activeLanguage:h,translate:a})}),!!m.length&&!p&&e(r,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:e(j,{servers:m,translate:a})})]})};export{J as RightPanel};
@@ -1 +1 @@
1
- import{jsx as n,jsxs as p,Fragment as L}from"react/jsx-runtime";import{memo as T,useCallback as k}from"react";import{useAtomValue as F}from"jotai";import{TypeName as j}from"../common/index.js";import{Schema as B}from"./Schema.js";import{ObjectSchema as S}from"./ObjectSchema.js";import{humanizeConstraints as D}from"../../utils/index.js";import{SubSchema as R}from"./SubSchema.js";import{globalOptionsAtom as W}from"../../jotai/store.js";import{getExpandByDefault as _}from"./helpers.js";import{ArrayLabel as q,LabelValue as c,ArrayClosingLabel as E,Line as h}from"../common/styled.js";function N({schema:r,schema:{minItems:u,maxItems:O,items:o},fieldParentsName:l,...e}){const{schemasExpansionLevel:g}=F(W),d=Array.isArray(e.parentType)?e.parentType:[e.parentType],i=d.includes("array")&&d.length===1,t=i?(e.level||0)+1:e.level,A=u===void 0&&O===void 0?"":`(${D(r)})`;let s=l&&[...l.slice(0,-1),l[l.length-1]+"[]"];const y=k(m=>e.skipReadOnly||e.skipWriteOnly?m?.filter(f=>!(e.skipReadOnly&&f.schema.readOnly||e.skipWriteOnly&&f.schema.writeOnly)):m,[e.skipReadOnly,e.skipWriteOnly]);if(r?.fields)return n(S,{...e,shouldCloseArray:i,level:t,schema:r,fieldParentsName:s,onOneOfChange:e.onOneOfChange});if(r.displayType&&!o&&!A.length)return n("div",{children:n(j,{children:r.displayType})});const v=y(o?.fields),x=y(o?.oneOf?.[0]?.fields),b=v?.length||x?.length,a=e.level===1,C=_({level:e.level,required:e.required,schemasExpansionLevel:g});return n(R,{...e,propertyLength:b,isNestedArray:i,level:t,isArray:!0,expandable:!a,expandByDefault:C,operationPointer:r.operationPointer,children:p(L,{children:[a&&p(q,{children:[n(c,{children:"Array ["}),n(h,{})]}),n(B,{...e,parentType:a?void 0:r.type,level:t,schema:o,shouldCloseArray:i,hideBottomBorder:a,fieldParentsName:s,expandable:!1,onOneOfChange:e.onOneOfChange}),a&&p(E,{className:"array-closing-label",children:[n(h,{}),n(c,{children:"]"})]})]})})}const Q=T(N);export{Q as ArraySchema};
1
+ import{Fragment as L,jsx as n,jsxs as p}from"react/jsx-runtime";import{memo as T,useCallback as k}from"react";import{useAtomValue as F}from"jotai";import{TypeName as j}from"../common/index.js";import{Schema as B}from"./Schema.js";import{ObjectSchema as S}from"./ObjectSchema.js";import{humanizeConstraints as D}from"../../utils/index.js";import{SubSchema as R}from"./SubSchema.js";import{globalOptionsAtom as W}from"../../jotai/store.js";import{getExpandByDefault as _}from"./helpers.js";import{ArrayLabel as q,LabelValue as c,ArrayClosingLabel as E,Line as h}from"../common/styled.js";function N({schema:r,schema:{minItems:u,maxItems:O,items:o},fieldParentsName:l,...e}){const{schemasExpansionLevel:g}=F(W),d=Array.isArray(e.parentType)?e.parentType:[e.parentType],i=d.includes("array")&&d.length===1,t=i?(e.level||0)+1:e.level,A=u===void 0&&O===void 0?"":`(${D(r)})`;let s=l&&[...l.slice(0,-1),l[l.length-1]+"[]"];const y=k(m=>e.skipReadOnly||e.skipWriteOnly?m?.filter(f=>!(e.skipReadOnly&&f.schema.readOnly||e.skipWriteOnly&&f.schema.writeOnly)):m,[e.skipReadOnly,e.skipWriteOnly]);if(r?.fields)return n(S,{...e,shouldCloseArray:i,level:t,schema:r,fieldParentsName:s,onOneOfChange:e.onOneOfChange});if(r.displayType&&!o&&!A.length)return n("div",{children:n(j,{children:r.displayType})});const v=y(o?.fields),x=y(o?.oneOf?.[0]?.fields),b=v?.length||x?.length,a=e.level===1,C=_({level:e.level,required:e.required,schemasExpansionLevel:g});return n(R,{...e,propertyLength:b,isNestedArray:i,level:t,isArray:!0,expandable:!a,expandByDefault:C,operationPointer:r.operationPointer,children:p(L,{children:[a&&p(q,{children:[n(c,{children:"Array ["}),n(h,{})]}),n(B,{...e,parentType:a?void 0:r.type,level:t,schema:o,shouldCloseArray:i,hideBottomBorder:a,fieldParentsName:s,expandable:!1,onOneOfChange:e.onOneOfChange}),a&&p(E,{className:"array-closing-label",children:[n(h,{}),n(c,{children:"]"})]})]})})}const Q=T(N);export{Q as ArraySchema};
@@ -1 +1 @@
1
- import{jsx as r,Fragment as P,jsxs as m}from"react/jsx-runtime";import{memo as C}from"react";import{useAtomValue as F}from"jotai";import{PropertiesTableCaption as N}from"../common/index.js";import{Discriminator as v}from"../Discriminator/index.js";import{globalOptionsAtom as A}from"../../jotai/store.js";import{PropertyDetails as B}from"../PropertyDetails/index.js";import{SubSchema as _}from"./SubSchema.js";import{getExpandByDefault as w}from"./helpers.js";import{useTranslate as E}from"../../hooks/index.js";import{ArrayClosingLabel as I,LabelValue as T,Line as V}from"../common/styled.js";function k({schema:i,showTitle:s,discriminator:t,level:a,skipWriteOnly:n,skipReadOnly:o,fieldParentsName:c,expandable:f,deepLink:d,required:h,disableDeepLinks:u,shouldCloseArray:x,oneOfLevel:b,slug:g,onOneOfChange:O}){const{fields:l=[],title:L}=i,y=E(),{schemasExpansionLevel:D}=F(A),p=o||n?l.filter(e=>!(o&&e.schema.readOnly||n&&e.schema.writeOnly)):l,S=w({required:h,level:a,schemasExpansionLevel:D});return m(_,{expandable:f,expandByDefault:S,level:a,propertyLength:p.length,deepLink:d,operationPointer:i.operationPointer,children:[m(P,{children:[s&&r(N,{children:L}),p.map((e,j)=>r(B,{isFirst:j===0,field:e,fieldParentsName:Number(a)>1?c:[],renderDiscriminatorSwitch:t?.fieldName===e.name&&t?.parentSchema?()=>r(v,{parent:t.parentSchema,activeOneOfIdx:t.activeOneOfIdx,translate:y}):void 0,skipReadOnly:o,skipWriteOnly:n,showTitle:s,level:a,disableDeepLinks:u,oneOfLevel:b,slug:g,onOneOfChange:O},e.name))]}),x&&m(I,{className:"array-closing-label",children:[r(V,{}),r(T,{children:"]"})]})]})}const Z=C(k);export{Z as ObjectSchema};
1
+ import{Fragment as P,jsx as r,jsxs as m}from"react/jsx-runtime";import{memo as C}from"react";import{useAtomValue as F}from"jotai";import{PropertiesTableCaption as N}from"../common/index.js";import{Discriminator as v}from"../Discriminator/index.js";import{globalOptionsAtom as A}from"../../jotai/store.js";import{PropertyDetails as B}from"../PropertyDetails/index.js";import{SubSchema as _}from"./SubSchema.js";import{getExpandByDefault as w}from"./helpers.js";import{useTranslate as E}from"../../hooks/index.js";import{ArrayClosingLabel as I,LabelValue as T,Line as V}from"../common/styled.js";function k({schema:i,showTitle:s,discriminator:t,level:a,skipWriteOnly:n,skipReadOnly:o,fieldParentsName:c,expandable:f,deepLink:d,required:h,disableDeepLinks:u,shouldCloseArray:x,oneOfLevel:b,slug:g,onOneOfChange:O}){const{fields:l=[],title:L}=i,y=E(),{schemasExpansionLevel:D}=F(A),p=o||n?l.filter(e=>!(o&&e.schema.readOnly||n&&e.schema.writeOnly)):l,S=w({required:h,level:a,schemasExpansionLevel:D});return m(_,{expandable:f,expandByDefault:S,level:a,propertyLength:p.length,deepLink:d,operationPointer:i.operationPointer,children:[m(P,{children:[s&&r(N,{children:L}),p.map((e,j)=>r(B,{isFirst:j===0,field:e,fieldParentsName:Number(a)>1?c:[],renderDiscriminatorSwitch:t?.fieldName===e.name&&t?.parentSchema?()=>r(v,{parent:t.parentSchema,activeOneOfIdx:t.activeOneOfIdx,translate:y}):void 0,skipReadOnly:o,skipWriteOnly:n,showTitle:s,level:a,disableDeepLinks:u,oneOfLevel:b,slug:g,onOneOfChange:O},e.name))]}),x&&m(I,{className:"array-closing-label",children:[r(V,{}),r(T,{children:"]"})]})]})}const Z=C(k);export{Z as ObjectSchema};
@@ -1,4 +1,4 @@
1
- import{jsxs as m,jsx as n}from"react/jsx-runtime";import{memo as g}from"react";import{useAtom as y}from"jotai";import{StyledBadge as I,SelectionTitle as b}from"../common/index.js";import{Markdown as j}from"../Markdown/index.js";import{ConstraintsView as C}from"../common/ConstraintsView.js";import{Schema as T}from"./Schema.js";import{operationStore as w}from"../../jotai/operation.js";import{SchemaSelection as E}from"../common/SchemaSelection/index.js";import{useOneOfLocationIdx as N}from"./useOneOfLocationIdx.js";import{useTranslate as P}from"../../hooks/index.js";import{styled as l}from"../../styled-components.js";function z({schema:{oneOf:i},schema:e,onChange:f,oneOfLevel:a=1,...x}){const O=P(),[r,u]=y(w(e.operationPointer)),p=N(i,a),s=i.map((t,S)=>({label:t.title||t.typePrefix+t.displayType,value:S})),c=s.findIndex(t=>t.label===r.activeExampleName),d=p===-1?c!==-1?c:0:p,v=r.activeOneOf?.[e.pointer]!==void 0?r.activeOneOf[e.pointer]:d,o=i[v];if(!o)return null;const h=t=>{f?.({pointer:e.pointer,index:t}),u({activeExampleName:e.oneOf?.[t]?.title,activeOneOf:{[e.pointer]:t},requestValues:{body:null}})};return m(L,{children:[m(b,{children:[e.oneOfType,":"]}),n(E,{options:s,onChange:h,pointer:e.operationPointer,schema:e,defaultOneOfIdx:d}),o.deprecated&&n(I,{deprecated:!0,children:O("openapi.badges.deprecated","Deprecated")}),o.description&&n(D,{source:o.description}),n(C,{constraints:o.constraints}),n(T,{...x,schema:o,oneOfLevel:a+1})]})}const K=g(z),D=l(j)`
1
+ import{jsx as n,jsxs as m}from"react/jsx-runtime";import{memo as g}from"react";import{useAtom as y}from"jotai";import{StyledBadge as I,SelectionTitle as b}from"../common/index.js";import{Markdown as j}from"../Markdown/index.js";import{ConstraintsView as C}from"../common/ConstraintsView.js";import{Schema as T}from"./Schema.js";import{operationStore as w}from"../../jotai/operation.js";import{SchemaSelection as E}from"../common/SchemaSelection/index.js";import{useOneOfLocationIdx as N}from"./useOneOfLocationIdx.js";import{useTranslate as P}from"../../hooks/index.js";import{styled as l}from"../../styled-components.js";function z({schema:{oneOf:i},schema:e,onChange:f,oneOfLevel:a=1,...x}){const O=P(),[r,u]=y(w(e.operationPointer)),p=N(i,a),s=i.map((t,S)=>({label:t.title||t.typePrefix+t.displayType,value:S})),c=s.findIndex(t=>t.label===r.activeExampleName),d=p===-1?c!==-1?c:0:p,v=r.activeOneOf?.[e.pointer]!==void 0?r.activeOneOf[e.pointer]:d,o=i[v];if(!o)return null;const h=t=>{f?.({pointer:e.pointer,index:t}),u({activeExampleName:e.oneOf?.[t]?.title,activeOneOf:{[e.pointer]:t},requestValues:{body:null}})};return m(L,{children:[m(b,{children:[e.oneOfType,":"]}),n(E,{options:s,onChange:h,pointer:e.operationPointer,schema:e,defaultOneOfIdx:d}),o.deprecated&&n(I,{deprecated:!0,children:O("openapi.badges.deprecated","Deprecated")}),o.description&&n(D,{source:o.description}),n(C,{constraints:o.constraints}),n(T,{...x,schema:o,oneOfLevel:a+1})]})}const K=g(z),D=l(j)`
2
2
  margin-top: var(--spacing-xs);
3
3
  font-size: var(--font-size-base);
4
4
  line-height: var(--line-height-base);
@@ -1,5 +1,5 @@
1
1
  import type { SchemaProps } from './types.js';
2
2
  export declare const extractTypeFromDeepLink: (str?: string) => string;
3
- export declare function getExpandByDefault({ schemasExpansionLevel, level, required, }: Pick<SchemaProps, 'level' | 'required'> & {
3
+ export declare function getExpandByDefault({ schemasExpansionLevel, level, required }: Pick<SchemaProps, 'level' | 'required'> & {
4
4
  schemasExpansionLevel?: number;
5
5
  }): boolean;
@@ -4,7 +4,7 @@ interface SectionContentProps {
4
4
  items: ContentItemModel[];
5
5
  hideFooterAndHeader?: boolean;
6
6
  }
7
- export declare function SectionContent({ items, hideFooterAndHeader, }: SectionContentProps): ReactElement | null;
7
+ export declare function SectionContent({ items, hideFooterAndHeader }: SectionContentProps): ReactElement | null;
8
8
  export declare const SectionContainer: any;
9
9
  export declare const RightPanelContainer: any;
10
10
  export {};
@@ -1,4 +1,4 @@
1
- import{jsx as t,jsxs as m,Fragment as x}from"react/jsx-runtime";import{useMemo as p}from"react";import{useAtomValue as d}from"jotai";import{LayoutVariant as c}from"@redocly/config";import{breakpoints as S}from"@redocly/theme/core/openapi";import{OpenApiHeader as u}from"@redocly/theme/components/OpenApiDocs/hooks/OpenApiHeader";import{PageFooter as k}from"../PageFooter/index.js";import{globalOptionsAtom as b}from"../../jotai/store.js";import{RenderHook as w}from"../RenderHook/index.js";import{RightPanel as y}from"../RightPanel/index.js";import{layoutAtom as C}from"../../jotai/app.js";import{Row as B,SamplesMiddlePanel as R,SamplesPanel as j}from"../common/index.js";import{Items as f}from"../ContentItems/Items.js";import{ContentItem as g}from"../ContentItem/index.js";import{styled as l}from"../../styled-components.js";function J({items:e,hideFooterAndHeader:n}){const{unstable_hooks:{MiddlePanelHeader:a},routingBasePath:i}=d(b),s=d(C),o=s===c.STACKED,P=p(()=>n?null:t(h,{isStacked:o,children:t(k,{})}),[n,o]),v=p(()=>n||!u&&!a?null:t(h,{isStacked:o,children:a?t(w,{Hook:a,props:void 0}):t(u,{})}),[a,n,o]);return e.length===0?null:m(x,{children:[v,m(A,{layout:s,children:[t(M,{layout:s,children:e.filter(({type:r})=>r==="section").map(r=>t(g,{item:r,routingBasePath:i,children:t(f,{items:r.items,routingBasePath:i})},r.id))}),t(_,{isStacked:o,tabIndex:0,children:t(y,{item:e[0]})})]}),e.filter(({type:r})=>r!=="section").map(r=>t(g,{item:r,routingBasePath:i,children:t(f,{items:r.items,routingBasePath:i})},r.id)),P]})}const h=l(R)`
1
+ import{Fragment as x,jsx as t,jsxs as m}from"react/jsx-runtime";import{useMemo as p}from"react";import{useAtomValue as d}from"jotai";import{LayoutVariant as c}from"@redocly/config";import{breakpoints as S}from"@redocly/theme/core/openapi";import{OpenApiHeader as u}from"@redocly/theme/components/OpenApiDocs/hooks/OpenApiHeader";import{PageFooter as k}from"../PageFooter/index.js";import{globalOptionsAtom as b}from"../../jotai/store.js";import{RenderHook as w}from"../RenderHook/index.js";import{RightPanel as y}from"../RightPanel/index.js";import{layoutAtom as C}from"../../jotai/app.js";import{Row as B,SamplesMiddlePanel as R,SamplesPanel as j}from"../common/index.js";import{Items as f}from"../ContentItems/Items.js";import{ContentItem as g}from"../ContentItem/index.js";import{styled as l}from"../../styled-components.js";function J({items:e,hideFooterAndHeader:n}){const{unstable_hooks:{MiddlePanelHeader:a},routingBasePath:i}=d(b),s=d(C),o=s===c.STACKED,P=p(()=>n?null:t(h,{isStacked:o,children:t(k,{})}),[n,o]),v=p(()=>n||!u&&!a?null:t(h,{isStacked:o,children:a?t(w,{Hook:a,props:void 0}):t(u,{})}),[a,n,o]);return e.length===0?null:m(x,{children:[v,m(A,{layout:s,children:[t(M,{layout:s,children:e.filter(({type:r})=>r==="section").map(r=>t(g,{item:r,routingBasePath:i,children:t(f,{items:r.items,routingBasePath:i})},r.id))}),t(_,{isStacked:o,tabIndex:0,children:t(y,{item:e[0]})})]}),e.filter(({type:r})=>r!=="section").map(r=>t(g,{item:r,routingBasePath:i,children:t(f,{items:r.items,routingBasePath:i})},r.id)),P]})}const h=l(R)`
2
2
  align-self: flex-start;
3
3
  padding-top: var(--panel-gap-vertical);
4
4
  padding-bottom: var(--panel-gap-vertical);
@@ -1 +1 @@
1
- import{jsx as t,Fragment as l,jsxs as p}from"react/jsx-runtime";import{memo as d}from"react";import{LayoutVariant as f}from"@redocly/config";import{SamplesMiddlePanel as a,Row as u}from"../common/index.js";import{Markdown as h}from"../Markdown/index.js";import{ExternalDocumentation as x}from"../ExternalDocumentation/index.js";function S({item:o,layout:s}){const{externalDocs:r,ast:i,description:c}=o,e=s===f.STACKED,n=!o.parent||o.parent.type!=="tag";return p(l,{children:[t(h,{ast:i,source:c,htmlWrap:m=>t(a,{fullWidth:n,isStacked:e,children:m})}),r&&t(u,{children:t(a,{compact:!0,fullWidth:n,isStacked:e,children:t(x,{externalDocs:r})})})]})}const _=d(S);export{_ as SectionItem};
1
+ import{Fragment as l,jsx as t,jsxs as p}from"react/jsx-runtime";import{memo as d}from"react";import{LayoutVariant as f}from"@redocly/config";import{SamplesMiddlePanel as a,Row as u}from"../common/index.js";import{Markdown as h}from"../Markdown/index.js";import{ExternalDocumentation as x}from"../ExternalDocumentation/index.js";function S({item:o,layout:s}){const{externalDocs:r,ast:i,description:c}=o,e=s===f.STACKED,n=!o.parent||o.parent.type!=="tag";return p(l,{children:[t(h,{ast:i,source:c,htmlWrap:m=>t(a,{fullWidth:n,isStacked:e,children:m})}),r&&t(u,{children:t(a,{compact:!0,fullWidth:n,isStacked:e,children:t(x,{externalDocs:r})})})]})}const _=d(S);export{_ as SectionItem};
@@ -1 +1 @@
1
- import{jsx as e,Fragment as a,jsxs as i}from"react/jsx-runtime";import{memo as l}from"react";import{SecuritySchemeItem as n}from"./SecuritySchemeItem.js";import{StyledLink as o}from"./styled.js";import{useTranslate as h}from"../../hooks/index.js";function u({flow:r}){const t=h();return i(a,{children:[e(n,{label:`${t("openapi.authorizationUrl","Authorization URL")}:`,value:r?.authorizationUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.authorizationUrl,children:r?.authorizationUrl})}),e(n,{label:`${t("openapi.tokenUrl","Token URL")}:`,value:r?.tokenUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.tokenUrl,children:r?.tokenUrl})}),e(n,{label:`${t("openapi.refreshUrl","Refresh URL")}:`,value:r?.refreshUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.refreshUrl,children:r?.refreshUrl})}),e(n,{label:`${t("openapi.deviceAuthorizationUrl","Device Authorization URL")}:`,value:r?.deviceAuthorizationUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.deviceAuthorizationUrl,children:r?.deviceAuthorizationUrl})})]})}const d=l(u);export{d as OAuthFlow};
1
+ import{Fragment as a,jsx as e,jsxs as i}from"react/jsx-runtime";import{memo as l}from"react";import{SecuritySchemeItem as n}from"./SecuritySchemeItem.js";import{StyledLink as o}from"./styled.js";import{useTranslate as h}from"../../hooks/index.js";function u({flow:r}){const t=h();return i(a,{children:[e(n,{label:`${t("openapi.authorizationUrl","Authorization URL")}:`,value:r?.authorizationUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.authorizationUrl,children:r?.authorizationUrl})}),e(n,{label:`${t("openapi.tokenUrl","Token URL")}:`,value:r?.tokenUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.tokenUrl,children:r?.tokenUrl})}),e(n,{label:`${t("openapi.refreshUrl","Refresh URL")}:`,value:r?.refreshUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.refreshUrl,children:r?.refreshUrl})}),e(n,{label:`${t("openapi.deviceAuthorizationUrl","Device Authorization URL")}:`,value:r?.deviceAuthorizationUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.deviceAuthorizationUrl,children:r?.deviceAuthorizationUrl})})]})}const d=l(u);export{d as OAuthFlow};
@@ -1,4 +1,4 @@
1
- import{jsx as o,jsxs as c,Fragment as g}from"react/jsx-runtime";import{memo as f,useState as u}from"react";import{ChevronRightIcon as S}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{Markdown as h}from"../Markdown/index.js";import{SecuritySchemeItem as l}from"./SecuritySchemeItem.js";import{Tag as v}from"./styled.js";import{useTranslate as x}from"../../hooks/index.js";import{getOptionalScopes as y,getRequiredScopes as O}from"./helper.js";import{styled as t}from"../../styled-components.js";import{ScopeTagWithTooltip as b}from"./ScopeTagWithTooltip.js";import{RequiredScopesList as w}from"./RequiredScopesList.js";import{normalizeScopes as C}from"../../utils/security-scope.js";const j=24;function q({id:e,securities:n,flow:a,flows:r}){const i=O(e,n);return a?o(z,{flow:a,requiredScopes:i}):o(I,{children:o(w,{schemeId:e,securities:n,flows:r})})}function z({flow:e,requiredScopes:n}){const a=x(),[r,i]=u(!1),m=Object.keys(e.scopes||{}),d=C(n),p=y(d,m);return p.length===0?null:c(g,{children:[o(l,{label:c(R,{onClick:()=>{i(s=>!s)},children:[a(r?"openapi.hideOptionalScopes":"openapi.showOptionalScopes",r?"Hide optional scopes":"Show optional scopes"),o(_,{isOpen:r,children:o(S,{size:"var(--font-size-base)",color:"var(--tree-content-color-default)"})})]}),value:" "}),o(T,{isOpen:r,children:p.map(s=>o(l,{label:o(b,{className:"tag-grey",text:s,maxChars:j,TagComponent:A,compact:!0}),value:o(W,{children:o(h,{source:e.scopes[s]||""})})},s))})]})}const A=t(v)`
1
+ import{Fragment as g,jsx as o,jsxs as c}from"react/jsx-runtime";import{memo as f,useState as u}from"react";import{ChevronRightIcon as S}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{Markdown as h}from"../Markdown/index.js";import{SecuritySchemeItem as l}from"./SecuritySchemeItem.js";import{Tag as v}from"./styled.js";import{useTranslate as x}from"../../hooks/index.js";import{getOptionalScopes as y,getRequiredScopes as O}from"./helper.js";import{styled as t}from"../../styled-components.js";import{ScopeTagWithTooltip as b}from"./ScopeTagWithTooltip.js";import{RequiredScopesList as w}from"./RequiredScopesList.js";import{normalizeScopes as C}from"../../utils/security-scope.js";const j=24;function q({id:e,securities:n,flow:a,flows:r}){const i=O(e,n);return a?o(z,{flow:a,requiredScopes:i}):o(I,{children:o(w,{schemeId:e,securities:n,flows:r})})}function z({flow:e,requiredScopes:n}){const a=x(),[r,i]=u(!1),m=Object.keys(e.scopes||{}),d=C(n),p=y(d,m);return p.length===0?null:c(g,{children:[o(l,{label:c(R,{onClick:()=>{i(s=>!s)},children:[a(r?"openapi.hideOptionalScopes":"openapi.showOptionalScopes",r?"Hide optional scopes":"Show optional scopes"),o(_,{isOpen:r,children:o(S,{size:"var(--font-size-base)",color:"var(--tree-content-color-default)"})})]}),value:" "}),o(T,{isOpen:r,children:p.map(s=>o(l,{label:o(b,{className:"tag-grey",text:s,maxChars:j,TagComponent:A,compact:!0}),value:o(W,{children:o(h,{source:e.scopes[s]||""})})},s))})]})}const A=t(v)`
2
2
  font-family: var(--font-family-base);
3
3
  font-size: var(--font-size-base);
4
4
  align-self: flex-start;
@@ -10,5 +10,5 @@ interface RequiredScopesListProps {
10
10
  children: ReactNode;
11
11
  }>;
12
12
  }
13
- export declare function RequiredScopesList({ schemeId, securities, flows, TagComponent, }: RequiredScopesListProps): ReactElement | null;
13
+ export declare function RequiredScopesList({ schemeId, securities, flows, TagComponent }: RequiredScopesListProps): ReactElement | null;
14
14
  export {};
@@ -1,4 +1,4 @@
1
- import{jsx as r,Fragment as g,jsxs as u}from"react/jsx-runtime";import{SecuritySchemeItem as s}from"./SecuritySchemeItem.js";import{useTranslate as f}from"../../hooks/index.js";import{getRequiredScopes as S}from"./helper.js";import{normalizeScopes as b,buildScopeDescriptionIndex as v}from"../../utils/security-scope.js";import{ScopeTagWithTooltip as x}from"./ScopeTagWithTooltip.js";import{Tag as h}from"./styled.js";import{Markdown as y}from"../Markdown/index.js";import{styled as i}from"../../styled-components.js";const T=24;function A({schemeId:n,securities:m,flows:o,TagComponent:c=q}){const p=f(),l=S(n,m),t=b(l);if(t.length===0)return null;const a=o?v(o):null,d=!!a;return u(g,{children:[r(s,{label:p("openapi.requiredScopes","Required scopes"),value:" "}),t.map(e=>r(s,{label:r(x,{className:"tag-grey",text:e,maxChars:T,TagComponent:c,compact:!0}),value:d?r(_,{children:r(y,{source:a?.get(e)||""})}):" "},e))]})}const _=i.div`
1
+ import{Fragment as g,jsx as r,jsxs as u}from"react/jsx-runtime";import{SecuritySchemeItem as s}from"./SecuritySchemeItem.js";import{useTranslate as f}from"../../hooks/index.js";import{getRequiredScopes as S}from"./helper.js";import{normalizeScopes as b,buildScopeDescriptionIndex as v}from"../../utils/security-scope.js";import{ScopeTagWithTooltip as x}from"./ScopeTagWithTooltip.js";import{Tag as h}from"./styled.js";import{Markdown as y}from"../Markdown/index.js";import{styled as i}from"../../styled-components.js";const T=24;function A({schemeId:n,securities:m,flows:o,TagComponent:c=q}){const p=f(),l=S(n,m),t=b(l);if(t.length===0)return null;const a=o?v(o):null,d=!!a;return u(g,{children:[r(s,{label:p("openapi.requiredScopes","Required scopes"),value:" "}),t.map(e=>r(s,{label:r(x,{className:"tag-grey",text:e,maxChars:T,TagComponent:c,compact:!0}),value:d?r(_,{children:r(y,{source:a?.get(e)||""})}):" "},e))]})}const _=i.div`
2
2
  p {
3
3
  margin-bottom: 0;
4
4
  }
@@ -13,5 +13,5 @@ interface ScopeTagWithTooltipProps {
13
13
  arrowPosition?: 'left' | 'right' | 'center';
14
14
  compact?: boolean;
15
15
  }
16
- export declare function ScopeTagWithTooltip({ className, text, maxChars, tip, ariaLabel, TagComponent, arrowPosition, compact, }: ScopeTagWithTooltipProps): ReactElement;
16
+ export declare function ScopeTagWithTooltip({ className, text, maxChars, tip, ariaLabel, TagComponent, arrowPosition, compact }: ScopeTagWithTooltipProps): ReactElement;
17
17
  export {};
@@ -1 +1 @@
1
- import{jsx as r,Fragment as p,jsxs as y}from"react/jsx-runtime";import{useState as h,useRef as C}from"react";import{Portal as b}from"@redocly/theme/components/Portal/Portal";import{useModalScrollLock as w}from"@redocly/theme/core/openapi";import{SecurityButton as M}from"./SecurityButton.js";import{SecurityModal as S}from"./SecurityModal.js";import{useTelemetry as g}from"../../hooks/index.js";function _({securities:t}){const[i,c]=h(!1),l=g(),e=C(null);if(w(i),!t.length)return null;const m=()=>{const o=t.flatMap(s=>s.schemes),n=[...new Set(o.map(s=>s.type))],u=o.length,a=n.length>1,f=Date.now();e.current={securityTypes:n,schemesCount:u,isCombined:a,modalOpenTime:f},l.sendViewSecurityDetailsClickedMessage([{id:"redoc-security-button",object:"button",uri:window.location.href,securityTypes:n,schemesCount:u,isCombined:a}]),c(!0)},d=()=>{if(e.current){const o=Date.now()-e.current.modalOpenTime;l.sendViewSecurityDetailsClosedMessage([{id:"redoc-security-button",object:"button",uri:window.location.href,securityTypes:e.current.securityTypes,schemesCount:e.current.schemesCount,isCombined:e.current.isCombined,timeInModalMs:o}]),e.current=null}c(!1)};return y(p,{children:[r(M,{securities:t,onClick:m}),i&&r(b,{mountId:"api-content",children:r(S,{securities:t,onClose:d})})]})}export{_ as Security};
1
+ import{Fragment as p,jsx as s,jsxs as f}from"react/jsx-runtime";import{useState as C,useRef as S}from"react";import{Portal as h}from"@redocly/theme/components/Portal/Portal";import{useModalScrollLock as b}from"@redocly/theme/core/openapi";import{SecurityButton as M}from"./SecurityButton.js";import{SecurityModal as g}from"./SecurityModal.js";import{useTelemetry as j}from"../../hooks/index.js";function I({securities:t}){const[c,i]=C(!1),u=j(),e=S(null);if(b(c),!t.length)return null;const a=()=>{const o=t.flatMap(n=>n.schemes),r=[...new Set(o.map(n=>n.type))],l=o.length,m=r.length>1,y=Date.now();e.current={securityTypes:r,schemesCount:l,isCombined:m,modalOpenTime:y},u.sendViewSecurityDetailsClickedMessage([{id:"redocSecurityButton",object:"button",uri:"urn:redocly:redoc:ui:button:redocSecurityButton",securityTypes:r,schemesCount:l,isCombined:m}]),i(!0)},d=()=>{if(e.current){const o=Date.now()-e.current.modalOpenTime;u.sendViewSecurityDetailsClosedMessage([{id:"redocSecurityButtonClose",object:"button",uri:"urn:redocly:redoc:ui:button:redocSecurityButtonClose",securityTypes:e.current.securityTypes,schemesCount:e.current.schemesCount,isCombined:e.current.isCombined,timeInModalMs:o}]),e.current=null}i(!1)};return f(p,{children:[s(M,{securities:t,onClick:a}),c&&s(h,{mountId:"api-content",children:s(g,{securities:t,onClose:d})})]})}export{I as Security};
@@ -1,5 +1,5 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { SecurityRequirement, ExtendedOpenAPISecurityScheme } from '../../models/index.js';
3
- export declare function SecurityFlow({ type, bearerFormat, name, flows, openIdConnectUrl, description, id, securities, in: apiKeyIn, deprecated, oauth2MetadataUrl, }: Partial<ExtendedOpenAPISecurityScheme> & {
3
+ export declare function SecurityFlow({ type, bearerFormat, name, flows, openIdConnectUrl, description, id, securities, in: apiKeyIn, deprecated, oauth2MetadataUrl }: Partial<ExtendedOpenAPISecurityScheme> & {
4
4
  securities: SecurityRequirement[];
5
5
  }): ReactElement | null;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r,Fragment as p}from"react/jsx-runtime";import{Badge as z}from"@redocly/theme/components/Badge/Badge";import{SecuritySchemeItem as n}from"./SecuritySchemeItem.js";import{titleize as A}from"../../utils/index.js";import{OAuthFlow as L}from"./OAuthFlow.js";import{StyledLink as v,Tag as O}from"./styled.js";import{Markdown as _}from"../Markdown/index.js";import{useTranslate as w}from"../../hooks/index.js";import{OAuthScopes as b}from"./OAuthScopes.js";import{styled as o}from"../../styled-components.js";import{RequiredScopesList as g}from"./RequiredScopesList.js";const j=["authorizationCode","clientCredentials","implicit","password","deviceAuthorization"];function k({flowType:l,flow:m,schemeId:h,securities:a}){const c=w();return r(p,{children:[e(n,{label:r(H,{className:"tag-grey",children:[e(N,{children:c("openapi.flowType","Flow type")})," ",e(P,{children:l})]}),value:e("span",{})}),r(C,{children:[e(L,{flow:m}),e(b,{id:h,securities:a,flow:m})]})]})}function V({type:l,bearerFormat:m,name:h,flows:a,openIdConnectUrl:c,description:y,id:t,securities:s,in:x,deprecated:T=!1,oauth2MetadataUrl:f}){const i=w();if(!l||!t)return null;const F={http:r(p,{children:[e(n,{label:i("openapi.httpAuthorizationScheme","HTTP Authorization Scheme"),value:l}),e(n,{label:i("openapi.bearerFormat","Bearer Format"),value:m}),e(g,{schemeId:t,securities:s,flows:a})]}),apiKey:r(p,{children:[e(n,{label:`${A(x||"")} ${i("openapi.parameterName","parameter name")}:`,value:h}),e(g,{schemeId:t,securities:s,flows:a})]}),oauth2:r(p,{children:[a&&Object.entries(a).filter(d=>{const[u,S]=d;return!!S&&j.includes(u)}).map(([d,u])=>e(k,{flowType:d,flow:u,schemeId:t,securities:s},d)),e(b,{id:t,securities:s,flows:a})]}),openIdConnect:r(p,{children:[e(n,{label:i("openapi.connectUrl","Connect URL"),value:c&&e(v,{target:"_blank",rel:"noopener noreferrer",href:c,children:c})}),e(g,{schemeId:t,securities:s,flows:a})]})};return r(W,{children:[r(I,{children:[e(R,{children:t}),T&&e(z,{deprecated:!0,children:i("openapi.badges.deprecated","Deprecated")})]}),e(_,{source:y}),f&&e(n,{label:i("openapi.oauth2MetadataUrl","OAuth2 Metadata URL"),value:e(v,{target:"_blank",rel:"noopener noreferrer",href:f,children:f})}),e(B,{children:F[l]||null})]})}const I=o.div`
1
+ import{Fragment as p,jsx as e,jsxs as r}from"react/jsx-runtime";import{Badge as z}from"@redocly/theme/components/Badge/Badge";import{SecuritySchemeItem as n}from"./SecuritySchemeItem.js";import{titleize as A}from"../../utils/index.js";import{OAuthFlow as L}from"./OAuthFlow.js";import{StyledLink as v,Tag as O}from"./styled.js";import{Markdown as _}from"../Markdown/index.js";import{useTranslate as w}from"../../hooks/index.js";import{OAuthScopes as b}from"./OAuthScopes.js";import{styled as o}from"../../styled-components.js";import{RequiredScopesList as g}from"./RequiredScopesList.js";const j=["authorizationCode","clientCredentials","implicit","password","deviceAuthorization"];function k({flowType:l,flow:m,schemeId:h,securities:a}){const c=w();return r(p,{children:[e(n,{label:r(H,{className:"tag-grey",children:[e(N,{children:c("openapi.flowType","Flow type")})," ",e(P,{children:l})]}),value:e("span",{})}),r(C,{children:[e(L,{flow:m}),e(b,{id:h,securities:a,flow:m})]})]})}function V({type:l,bearerFormat:m,name:h,flows:a,openIdConnectUrl:c,description:y,id:t,securities:s,in:x,deprecated:T=!1,oauth2MetadataUrl:f}){const i=w();if(!l||!t)return null;const F={http:r(p,{children:[e(n,{label:i("openapi.httpAuthorizationScheme","HTTP Authorization Scheme"),value:l}),e(n,{label:i("openapi.bearerFormat","Bearer Format"),value:m}),e(g,{schemeId:t,securities:s,flows:a})]}),apiKey:r(p,{children:[e(n,{label:`${A(x||"")} ${i("openapi.parameterName","parameter name")}:`,value:h}),e(g,{schemeId:t,securities:s,flows:a})]}),oauth2:r(p,{children:[a&&Object.entries(a).filter(d=>{const[u,S]=d;return!!S&&j.includes(u)}).map(([d,u])=>e(k,{flowType:d,flow:u,schemeId:t,securities:s},d)),e(b,{id:t,securities:s,flows:a})]}),openIdConnect:r(p,{children:[e(n,{label:i("openapi.connectUrl","Connect URL"),value:c&&e(v,{target:"_blank",rel:"noopener noreferrer",href:c,children:c})}),e(g,{schemeId:t,securities:s,flows:a})]})};return r(W,{children:[r(I,{children:[e(R,{children:t}),T&&e(z,{deprecated:!0,children:i("openapi.badges.deprecated","Deprecated")})]}),e(_,{source:y}),f&&e(n,{label:i("openapi.oauth2MetadataUrl","OAuth2 Metadata URL"),value:e(v,{target:"_blank",rel:"noopener noreferrer",href:f,children:f})}),e(B,{children:F[l]||null})]})}const I=o.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: var(--spacing-xxs);
@@ -1 +1 @@
1
- import{jsx as e,jsxs as v}from"react/jsx-runtime";import{useMemo as w,useCallback as c}from"react";import{useAtom as S,useAtomValue as g}from"jotai";import{DropdownMenu as b}from"@redocly/theme/components/Dropdown/DropdownMenu";import{Dropdown as y}from"@redocly/theme/components/Dropdown/Dropdown";import{getOperationColor as A}from"@redocly/theme/core/openapi";import{HttpVerb as C}from"../common/index.js";import{PathWrapper as k,Path as j,StyledCopyButton as P,StyledDropdownMenuItem as V}from"./styled.js";import{PanelItem as x}from"../PanelItem/index.js";import{joinWithSeparator as D}from"../../services/index.js";import{getServerDisplayName as M,replaceVariables as _}from"../../utils/index.js";import{environmentAtom as E}from"../../jotai/app.js";import{useActiveWithFallback as N,useTelemetry as O}from"../../hooks/index.js";import{getServerEnvName as p}from"../../utils/environments.js";import{createTargetServerSwitchEvent as W}from"../../events/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";const $=({operation:r,className:h})=>{const n=O(),[[d],m]=S(E),{options:{events:i}}=g(I),s=N(r.servers.map(t=>({...t,key:t.url})),d.server),a=c(t=>{t.stopPropagation()},[]),l=c(t=>()=>{if(r.servers.length!==1&&(m({environment:p(t)}),n.sendSwitchServersClickedMessage([{id:"button_switch_servers",object:"button",uri:typeof window<"u"?window.location.href:"",server:p(t)}]),i?.targetServerSwitch&&t)){const o=W({operation:r,serverUrl:t.url});i.targetServerSwitch(o)}},[r,m,n,i]),u=w(()=>r.servers.map(t=>{const o=D(_(t),r.path);return e(V,{onAction:l(t),children:e(x,{header:M(t),title:o,actions:[e(P,{data:o,toasterPlacement:"left",onCopyClick:a},o)],active:t.url===s,withCheckmark:!0})},o)}),[r.servers,r.path,l,a,s]),f=A({isAdditionalOperation:r.isAdditionalOperation,httpVerb:r.httpVerb});return e(y,{className:h,trigger:v(k,{variant:"ghost",children:[e(C,{color:f,children:r.httpVerb}),e(j,{children:r.path})]}),withArrow:!0,children:e(b,{children:u})})};export{$ as ServerListDropdown};
1
+ import{jsx as e,jsxs as f}from"react/jsx-runtime";import{useMemo as S,useCallback as l}from"react";import{useAtom as g,useAtomValue as w}from"jotai";import{DropdownMenu as b}from"@redocly/theme/components/Dropdown/DropdownMenu";import{Dropdown as y}from"@redocly/theme/components/Dropdown/Dropdown";import{getOperationColor as A}from"@redocly/theme/core/openapi";import{HttpVerb as C}from"../common/index.js";import{PathWrapper as k,Path as j,StyledCopyButton as P,StyledDropdownMenuItem as V}from"./styled.js";import{PanelItem as x}from"../PanelItem/index.js";import{joinWithSeparator as D}from"../../services/index.js";import{getServerDisplayName as M,replaceVariables as B}from"../../utils/index.js";import{environmentAtom as E}from"../../jotai/app.js";import{useActiveWithFallback as N,useTelemetry as O}from"../../hooks/index.js";import{getServerEnvName as p}from"../../utils/environments.js";import{createTargetServerSwitchEvent as W}from"../../events/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";const $=({operation:r,className:h})=>{const n=O(),[[u],m]=g(E),{options:{events:i}}=w(I),s=N(r.servers.map(t=>({...t,key:t.url})),u.server),a=l(t=>{t.stopPropagation()},[]),c=l(t=>()=>{if(r.servers.length!==1&&(m({environment:p(t)}),n.sendSwitchServersClickedMessage([{id:"switchServersButton",object:"button",uri:"urn:redocly:redoc:ui:button:switchServersButton",server:p(t)}]),i?.targetServerSwitch&&t)){const o=W({operation:r,serverUrl:t.url});i.targetServerSwitch(o)}},[r,m,n,i]),d=S(()=>r.servers.map(t=>{const o=D(B(t),r.path);return e(V,{onAction:c(t),children:e(x,{header:M(t),title:o,actions:[e(P,{data:o,toasterPlacement:"left",onCopyClick:a},o)],active:t.url===s,withCheckmark:!0})},o)}),[r.servers,r.path,c,a,s]),v=A({isAdditionalOperation:r.isAdditionalOperation,httpVerb:r.httpVerb});return e(y,{className:h,trigger:f(k,{variant:"ghost",children:[e(C,{color:v,children:r.httpVerb}),e(j,{children:r.path})]}),withArrow:!0,children:e(b,{children:d})})};export{$ as ServerListDropdown};
@@ -16,7 +16,7 @@ import{breakpoints as e}from"@redocly/theme/core/openapi";import{Button as t}fro
16
16
  max-width: 280px;
17
17
  }
18
18
  `,h=o(r)`
19
- :hover {
19
+ &:hover {
20
20
  background-color: var(--dropdown-menu-item-bg-color-hover);
21
21
  }
22
22
  `;export{c as Path,d as PathWrapper,h as StyledCopyButton,m as StyledDropdownMenuItem};
@@ -1,4 +1,4 @@
1
- import{jsx as o,Fragment as n}from"react/jsx-runtime";import{useAtom as i}from"jotai";import{LayoutVariant as a}from"@redocly/config";import{SidebarActions as c}from"@redocly/theme/components/SidebarActions/SidebarActions";import{collapsedSidebarAtom as m,layoutAtom as p}from"../../jotai/app.js";import{styled as d}from"../../styled-components.js";const y=()=>{const[r,e]=i(p),[t,s]=i(m);return o(n,{children:o(l,{children:o(c,{layout:r,onChangeViewClick:()=>e(r===a.STACKED?a.THREE_PANEL:a.STACKED),collapsedSidebar:t,onChangeCollapseSidebarClick:()=>s(!t),isApiDocs:!0})})})},l=d.div`
1
+ import{Fragment as n,jsx as o}from"react/jsx-runtime";import{useAtom as i}from"jotai";import{LayoutVariant as a}from"@redocly/config";import{SidebarActions as c}from"@redocly/theme/components/SidebarActions/SidebarActions";import{collapsedSidebarAtom as m,layoutAtom as p}from"../../jotai/app.js";import{styled as d}from"../../styled-components.js";const y=()=>{const[r,e]=i(p),[t,s]=i(m);return o(n,{children:o(l,{children:o(c,{layout:r,onChangeViewClick:()=>e(r===a.STACKED?a.THREE_PANEL:a.STACKED),collapsedSidebar:t,onChangeCollapseSidebarClick:()=>s(!t),isApiDocs:!0})})})},l=d.div`
2
2
  position: sticky;
3
3
  top: calc(100vh);
4
4
  padding: var(--spacing-sm) var(--spacing-md);
@@ -1,4 +1,4 @@
1
- import{jsx as n,jsxs as l,Fragment as f}from"react/jsx-runtime";import{memo as b,useEffect as h,useRef as u,useState as x}from"react";import{useAtom as y}from"jotai";import{useLocation as S}from"react-router-dom";import{useMount as v,breakpoints as k}from"@redocly/theme/core/openapi";import{isSidebarOpenedAtom as $}from"../../jotai/app.js";import{SidebarActions as g}from"./SidebarActions.js";import{styled as w}from"../../styled-components.js";const j=w.div`
1
+ import{Fragment as l,jsx as n,jsxs as f}from"react/jsx-runtime";import{memo as b,useEffect as h,useRef as u,useState as x}from"react";import{useAtom as y}from"jotai";import{useLocation as S}from"react-router-dom";import{useMount as v,breakpoints as k}from"@redocly/theme/core/openapi";import{isSidebarOpenedAtom as $}from"../../jotai/app.js";import{SidebarActions as g}from"./SidebarActions.js";import{styled as w}from"../../styled-components.js";const j=w.div`
2
2
  overflow: hidden;
3
3
  flex-direction: column;
4
4
  backface-visibility: hidden;
@@ -21,4 +21,4 @@ import{jsx as n,jsxs as l,Fragment as f}from"react/jsx-runtime";import{memo as b
21
21
  @media print {
22
22
  display: none;
23
23
  }
24
- `;function O({scrollYOffset:e,className:a,children:d,collapsedSidebar:i}){const[t,p]=x("0px"),m=u(null),o=S(),[s,r]=y($);return h(()=>{o.hash&&r(!1)},[o.pathname,o.hash,r]),v(()=>{const c=e();p(`${c}px`)}),n(f,{children:l(j,{open:!!s,className:a,offsetTop:t,style:{top:t},ref:m,collapsedSidebar:i,children:[i||s?d:null,n(g,{})]})})}const C=b(O);export{C as StickyResponsiveSidebar};
24
+ `;function O({scrollYOffset:e,className:a,children:d,collapsedSidebar:i}){const[t,p]=x("0px"),m=u(null),o=S(),[s,r]=y($);return h(()=>{o.hash&&r(!1)},[o.pathname,o.hash,r]),v(()=>{const c=e();p(`${c}px`)}),n(l,{children:f(j,{open:!!s,className:a,offsetTop:t,style:{top:t},ref:m,collapsedSidebar:i,children:[i||s?d:null,n(g,{})]})})}const C=b(O);export{C as StickyResponsiveSidebar};
@@ -1,4 +1,4 @@
1
- import{jsx as n,Fragment as p,jsxs as h}from"react/jsx-runtime";import w,{useRef as x,useState as L,useMemo as b,useCallback as B,useLayoutEffect as k}from"react";import{Dropdown as E}from"@redocly/theme/components/Dropdown/Dropdown";import{DropdownMenu as M}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as C}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Tooltip as T}from"@redocly/theme/components/Tooltip/Tooltip";import{trimText as y}from"@redocly/theme/core/openapi";import{styled as s}from"../../styled-components.js";import{calculateMaxLength as D}from"../../utils/calculateMaxLength.js";const R=25,_=3,u=({breadcrumb:e,onClick:t,maxLength:r})=>{const o=e.name.length>r,i=y(e.name,r);return n(T,{tip:e.name,placement:"bottom",disabled:!o,children:n(v,{onClick:()=>t(e.href),children:i})})},z=({breadcrumbs:e,onClick:t,maxLength:r})=>{const o=e[0],i=e[e.length-1],d=e.slice(1,-1);return h(p,{children:[n(u,{breadcrumb:o,onClick:t,maxLength:r}),n(g,{children:"/"}),n(E,{trigger:n(O,{children:"..."}),closeOnClick:!0,alignment:"end",children:n(M,{children:d.map(a=>n(C,{onAction:()=>t(a.href),children:a.name},a.href))})}),n(g,{children:"/"}),n(u,{breadcrumb:i,onClick:t,maxLength:r})]})},F=({breadcrumbs:e,onClick:t,maxLength:r})=>n(p,{children:e.map((o,i)=>h(w.Fragment,{children:[n(u,{breadcrumb:o,onClick:t,maxLength:r}),i!==e.length-1&&n(g,{children:"/"})]},o.href))});function q({breadcrumbs:e,onClick:t}){const r=x(null),o=x(null),[i,d]=L(R),a=e.length>_,f=b(()=>a?[e[0],e[e.length-1]]:e,[e,a]),m=B(()=>{if(!r.current?.parentElement||!o.current)return;const c=r.current.parentElement.clientWidth,l=D(f,c,a,o.current);d(l)},[f,a]);return k(()=>{m();const c=new ResizeObserver(m),l=r.current?.parentElement;return l&&c.observe(l),()=>{c.disconnect()}},[m]),e.length?h(p,{children:[n(j,{ref:o,"aria-hidden":"true"}),n(A,{ref:r,"data-component-name":"TagItem/Breadcrumbs",children:a?n(z,{breadcrumbs:e,onClick:t,maxLength:i}):n(F,{breadcrumbs:e,onClick:t,maxLength:i})})]}):null}const j=s.span`
1
+ import{Fragment as p,jsx as n,jsxs as h}from"react/jsx-runtime";import w,{useRef as x,useState as L,useMemo as b,useCallback as B,useLayoutEffect as k}from"react";import{Dropdown as E}from"@redocly/theme/components/Dropdown/Dropdown";import{DropdownMenu as M}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as C}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Tooltip as T}from"@redocly/theme/components/Tooltip/Tooltip";import{trimText as y}from"@redocly/theme/core/openapi";import{styled as s}from"../../styled-components.js";import{calculateMaxLength as D}from"../../utils/calculateMaxLength.js";const R=25,_=3,u=({breadcrumb:e,onClick:t,maxLength:r})=>{const o=e.name.length>r,i=y(e.name,r);return n(T,{tip:e.name,placement:"bottom",disabled:!o,children:n(v,{onClick:()=>t(e.href),children:i})})},z=({breadcrumbs:e,onClick:t,maxLength:r})=>{const o=e[0],i=e[e.length-1],d=e.slice(1,-1);return h(p,{children:[n(u,{breadcrumb:o,onClick:t,maxLength:r}),n(g,{children:"/"}),n(E,{trigger:n(O,{children:"..."}),closeOnClick:!0,alignment:"end",children:n(M,{children:d.map(a=>n(C,{onAction:()=>t(a.href),children:a.name},a.href))})}),n(g,{children:"/"}),n(u,{breadcrumb:i,onClick:t,maxLength:r})]})},F=({breadcrumbs:e,onClick:t,maxLength:r})=>n(p,{children:e.map((o,i)=>h(w.Fragment,{children:[n(u,{breadcrumb:o,onClick:t,maxLength:r}),i!==e.length-1&&n(g,{children:"/"})]},o.href))});function q({breadcrumbs:e,onClick:t}){const r=x(null),o=x(null),[i,d]=L(R),a=e.length>_,f=b(()=>a?[e[0],e[e.length-1]]:e,[e,a]),m=B(()=>{if(!r.current?.parentElement||!o.current)return;const c=r.current.parentElement.clientWidth,l=D(f,c,a,o.current);d(l)},[f,a]);return k(()=>{m();const c=new ResizeObserver(m),l=r.current?.parentElement;return l&&c.observe(l),()=>{c.disconnect()}},[m]),e.length?h(p,{children:[n(j,{ref:o,"aria-hidden":"true"}),n(A,{ref:r,"data-component-name":"TagItem/Breadcrumbs",children:a?n(z,{breadcrumbs:e,onClick:t,maxLength:i}):n(F,{breadcrumbs:e,onClick:t,maxLength:i})})]}):null}const j=s.span`
2
2
  position: absolute;
3
3
  visibility: hidden;
4
4
  white-space: nowrap;
@@ -6,6 +6,6 @@ type OperationNavigationItemsProps = OperationsNavigationProps & {
6
6
  translate: TFunction;
7
7
  disableTooltip?: boolean;
8
8
  };
9
- declare function OperationNavigationItemsComponent({ title, items, onClick, routingBasePath, translate, disableTooltip, }: OperationNavigationItemsProps): import("react/jsx-runtime").JSX.Element;
9
+ declare function OperationNavigationItemsComponent({ title, items, onClick, routingBasePath, translate, disableTooltip }: OperationNavigationItemsProps): import("react/jsx-runtime").JSX.Element;
10
10
  export declare const OperationNavigationItems: import("react").MemoExoticComponent<typeof OperationNavigationItemsComponent>;
11
11
  export {};
@@ -1,4 +1,4 @@
1
- import{jsx as r,jsxs as s,Fragment as x}from"react/jsx-runtime";import{memo as y}from"react";import{GenericIcon as w}from"@redocly/theme/icons/GenericIcon/GenericIcon";import{DirectionRightIcon as I}from"@redocly/theme/icons/DirectionRightIcon/DirectionRightIcon";import{getOperationColor as j}from"@redocly/theme/core/openapi";import{Tooltip as k}from"@redocly/theme/components/Tooltip/Tooltip";import{joinWithSeparator as z}from"../../services/index.js";import{encodeBackSlashes as O}from"../../utils/index.js";import{HttpVerb as V,NavigationBadge as d}from"../common/index.js";import{styled as o}from"../../styled-components.js";import{StyledButton as B}from"./styled.js";function C({verb:e,deprecated:t,isAdditionalOperation:n}){const i=j({httpVerb:e,deprecated:t,isAdditionalOperation:n});return r(V,{color:i,children:e})}function H(e){if(e.type==="tag")return r(F,{children:r(I,{size:"12px"})});const t=e.type==="operation"?e.httpVerb:e.type;return C({verb:t,deprecated:e.deprecated,isAdditionalOperation:e.isAdditionalOperation})}function N(e){return e.type==="operation"?e.path:e.name}function S({title:e,items:t,onClick:n,routingBasePath:i,translate:l,disableTooltip:h}){return s(x,{children:[e&&r(_,{children:e}),t.map(a=>{const{id:g,href:f,name:m,deprecated:v,badges:b}=a;return r(k,{tip:m,placement:"left",disabled:h,children:r(A,{variant:"outlined",size:"large",onClick:()=>n(z(i,O(f))),children:s("span",{children:[H(a),r(D,{children:N(a)}),v&&r(d,{deprecated:!0,children:l("openapi.badges.deprecated","Deprecated")}),b?.map(({name:p,color:u,icon:c})=>r(d,{color:u,icon:c&&r(w,{icon:c}),children:p},p))]})})},g)})]})}const Q=y(S),_=o.span`
1
+ import{Fragment as x,jsx as r,jsxs as s}from"react/jsx-runtime";import{memo as y}from"react";import{GenericIcon as w}from"@redocly/theme/icons/GenericIcon/GenericIcon";import{DirectionRightIcon as I}from"@redocly/theme/icons/DirectionRightIcon/DirectionRightIcon";import{getOperationColor as j}from"@redocly/theme/core/openapi";import{Tooltip as k}from"@redocly/theme/components/Tooltip/Tooltip";import{joinWithSeparator as z}from"../../services/index.js";import{encodeBackSlashes as O}from"../../utils/index.js";import{HttpVerb as V,NavigationBadge as d}from"../common/index.js";import{styled as o}from"../../styled-components.js";import{StyledButton as B}from"./styled.js";function C({verb:e,deprecated:t,isAdditionalOperation:n}){const i=j({httpVerb:e,deprecated:t,isAdditionalOperation:n});return r(V,{color:i,children:e})}function H(e){if(e.type==="tag")return r(F,{children:r(I,{size:"12px"})});const t=e.type==="operation"?e.httpVerb:e.type;return C({verb:t,deprecated:e.deprecated,isAdditionalOperation:e.isAdditionalOperation})}function N(e){return e.type==="operation"?e.path:e.name}function S({title:e,items:t,onClick:n,routingBasePath:i,translate:l,disableTooltip:h}){return s(x,{children:[e&&r(_,{children:e}),t.map(a=>{const{id:g,href:f,name:m,deprecated:v,badges:b}=a;return r(k,{tip:m,placement:"left",disabled:h,children:r(A,{variant:"outlined",size:"large",onClick:()=>n(z(i,O(f))),children:s("span",{children:[H(a),r(D,{children:N(a)}),v&&r(d,{deprecated:!0,children:l("openapi.badges.deprecated","Deprecated")}),b?.map(({name:p,color:u,icon:c})=>r(d,{color:u,icon:c&&r(w,{icon:c}),children:p},p))]})})},g)})]})}const Q=y(S),_=o.span`
2
2
  font-size: var(--font-size-base);
3
3
  line-height: var(--line-height-base);
4
4
  font-weight: var(--font-weight-bold);
@@ -1,3 +1,3 @@
1
1
  import type { OperationsNavigationProps } from './types.js';
2
- export declare function OperationsNavigationComponent({ items, routingBasePath, }: OperationsNavigationProps): import("react/jsx-runtime").JSX.Element | null;
2
+ export declare function OperationsNavigationComponent({ items, routingBasePath }: OperationsNavigationProps): import("react/jsx-runtime").JSX.Element | null;
3
3
  export declare const OperationsNavigation: import("react").NamedExoticComponent<OperationsNavigationProps>;
@@ -4,6 +4,6 @@ interface TagItemProps extends SectionItemProps {
4
4
  routingBasePath?: string;
5
5
  isExpanded: boolean;
6
6
  }
7
- export declare function TagItemComponent({ item, routingBasePath, isExpanded, }: TagItemProps): ReactElement;
7
+ export declare function TagItemComponent({ item, routingBasePath, isExpanded }: TagItemProps): ReactElement;
8
8
  export declare const TagItem: import("react").NamedExoticComponent<TagItemProps>;
9
9
  export {};
@@ -60,7 +60,7 @@ import{jsx as i,jsxs as e}from"react/jsx-runtime";import{memo as T,useCallback a
60
60
  word-break: break-word;
61
61
  margin: 0;
62
62
 
63
- :hover {
63
+ &:hover {
64
64
  ${A} {
65
65
  opacity: 1;
66
66
  visibility: visible;
@@ -1,4 +1,4 @@
1
- import{jsx as o,Fragment as l,jsxs as s}from"react/jsx-runtime";import{css as d}from"styled-components";import{memo as w,useEffect as $,useState as j}from"react";import{isUndefined as C}from"@redocly/theme/core/openapi";import{cycleColorsByLevel as N}from"../PropertyDetails/cycleColorsByLevel.js";import{CircleIcon as S}from"../PropertyDetails/PlusCircleIcon.js";import{LabelValue as V}from"../common/styled.js";import{styled as c}from"../../styled-components.js";function _({expandByDefault:e,level:g,expandable:h=!1,expandText:v,hideText:x,hideDivider:y=!1,children:i,expandedAll:t,isNestedArray:n}){const[r,p]=j((e||n)??!1);$(()=>{C(t)||p(t)},[t]);const a=r?N(g):void 0;if(!h)return i;const b=()=>{p(u=>!u)};return n?s(l,{children:[o(V,{children:"Array ["}),o(f,{$isArrayInsideArray:n,className:"view-nested-wrapper",children:o(m,{color:a,children:i})})]}):o(l,{children:s(f,{$divider:!y&&!r,className:"view-nested-wrapper",children:[s(k,{onClick:b,children:[o(S,{sign:r?"-":"+",color:a}),!r&&v,r&&(x||"")]}),r&&o(m,{color:a,children:i})]})})}const U=w(_),k=c.button`
1
+ import{Fragment as l,jsx as o,jsxs as s}from"react/jsx-runtime";import{css as d}from"styled-components";import{memo as w,useEffect as $,useState as j}from"react";import{isUndefined as C}from"@redocly/theme/core/openapi";import{cycleColorsByLevel as N}from"../PropertyDetails/cycleColorsByLevel.js";import{CircleIcon as S}from"../PropertyDetails/PlusCircleIcon.js";import{LabelValue as V}from"../common/styled.js";import{styled as c}from"../../styled-components.js";function _({expandByDefault:e,level:g,expandable:h=!1,expandText:v,hideText:x,hideDivider:y=!1,children:i,expandedAll:t,isNestedArray:n}){const[r,p]=j((e||n)??!1);$(()=>{C(t)||p(t)},[t]);const a=r?N(g):void 0;if(!h)return i;const b=()=>{p(u=>!u)};return n?s(l,{children:[o(V,{children:"Array ["}),o(f,{$isArrayInsideArray:n,className:"view-nested-wrapper",children:o(m,{color:a,children:i})})]}):o(l,{children:s(f,{$divider:!y&&!r,className:"view-nested-wrapper",children:[s(k,{onClick:b,children:[o(S,{sign:r?"-":"+",color:a}),!r&&v,r&&(x||"")]}),r&&o(m,{color:a,children:i})]})})}const U=w(_),k=c.button`
2
2
  background: none;
3
3
  border: none;
4
4
  cursor: pointer;
@@ -1,4 +1,4 @@
1
- import{jsx as a,Fragment as i,jsxs as m}from"react/jsx-runtime";import{memo as p}from"react";import{css as c}from"styled-components";import{Tag as g}from"@redocly/theme/components/Tag/Tag";import{GenericIcon as l}from"@redocly/theme/icons/GenericIcon/GenericIcon";import{Tooltip as f}from"@redocly/theme/components/Tooltip/Tooltip";import{styled as s}from"../../styled-components.js";import{splitBadgesByPosition as x}from"../../utils/index.js";function n({name:r,color:e,description:o,icon:t}){return a(f,{tip:o,placement:"top",disabled:!o,children:a(d,{color:e,icon:t&&a(l,{icon:t}),children:r})},r)}function b({badges:r,children:e}){if(!r)return a(i,{children:e});const{before:o,after:t}=x(r);return m(i,{children:[o.map(n),e,t.map(n)]})}const _=p(b),d=s(g)`
1
+ import{Fragment as i,jsx as a,jsxs as m}from"react/jsx-runtime";import{memo as p}from"react";import{css as c}from"styled-components";import{Tag as g}from"@redocly/theme/components/Tag/Tag";import{GenericIcon as l}from"@redocly/theme/icons/GenericIcon/GenericIcon";import{Tooltip as f}from"@redocly/theme/components/Tooltip/Tooltip";import{styled as s}from"../../styled-components.js";import{splitBadgesByPosition as x}from"../../utils/index.js";function n({name:r,color:e,description:o,icon:t}){return a(f,{tip:o,placement:"top",disabled:!o,children:a(d,{color:e,icon:t&&a(l,{icon:t}),children:r})},r)}function b({badges:r,children:e}){if(!r)return a(i,{children:e});const{before:o,after:t}=x(r);return m(i,{children:[o.map(n),e,t.map(n)]})}const _=p(b),d=s(g)`
2
2
  margin: 0;
3
3
  ${({deprecated:r})=>r&&c`
4
4
  color: var(--badge-deprecated-text-color);
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as n,Fragment as x}from"react/jsx-runtime";import{memo as u}from"react";import{useAtom as b}from"jotai";import{LinkIcon as w}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{Dropdown as M}from"../Dropdown/index.js";import{RequiredLabel as T}from"../Fields/index.js";import{ConstraintsView as j}from"../ConstraintsView.js";import{Schema as k}from"../../Schema/index.js";import{getActiveMediaType as C}from"../../../models/index.js";import{Markdown as z}from"../../Markdown/index.js";import{activeMimeNameAtom as A}from"../../../jotai/app.js";import{LinkToField as q}from"../LinkToField.js";import{useTranslate as B}from"../../../hooks/index.js";import{styled as s}from"../../../styled-components.js";function F({required:m,skipReadOnly:p,skipWriteOnly:l,description:c,content:t,deepLink:r}){const a=B(),[g,f]=b(A);if(!t)return null;const{schema:i,examples:d,operation:h,name:v}=C(t,g),y=t.mediaTypes.map(({name:o})=>({label:o,value:o}));return n(x,{children:[n(O,{children:[r&&e(q,{to:r}),a("openapi.body","Body"),e(M,{options:y,value:v,triggerVariant:"ghost",triggerSize:"large",onChange:({value:o})=>f(o)})]}),m&&e(T,{children:a("openapi.badges.required","required")}),e(N,{source:c}),i?.type==="object"&&i?.constraints&&e(j,{constraints:i?.constraints||[]}),e(k,{skipReadOnly:p,skipWriteOnly:l,schema:i,examples:d,operation:h,level:1,disableDeepLinks:!r},"schema")]})}const P=u(F),N=s(z)`
1
+ import{Fragment as x,jsx as e,jsxs as n}from"react/jsx-runtime";import{memo as u}from"react";import{useAtom as b}from"jotai";import{LinkIcon as w}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{Dropdown as M}from"../Dropdown/index.js";import{RequiredLabel as T}from"../Fields/index.js";import{ConstraintsView as j}from"../ConstraintsView.js";import{Schema as k}from"../../Schema/index.js";import{getActiveMediaType as C}from"../../../models/index.js";import{Markdown as z}from"../../Markdown/index.js";import{activeMimeNameAtom as A}from"../../../jotai/app.js";import{LinkToField as q}from"../LinkToField.js";import{useTranslate as B}from"../../../hooks/index.js";import{styled as s}from"../../../styled-components.js";function F({required:m,skipReadOnly:p,skipWriteOnly:l,description:c,content:t,deepLink:r}){const a=B(),[g,f]=b(A);if(!t)return null;const{schema:i,examples:d,operation:h,name:v}=C(t,g),y=t.mediaTypes.map(({name:o})=>({label:o,value:o}));return n(x,{children:[n(O,{children:[r&&e(q,{to:r}),a("openapi.body","Body"),e(M,{options:y,value:v,triggerVariant:"ghost",triggerSize:"large",onChange:({value:o})=>f(o)})]}),m&&e(T,{children:a("openapi.badges.required","required")}),e(N,{source:c}),i?.type==="object"&&i?.constraints&&e(j,{constraints:i?.constraints||[]}),e(k,{skipReadOnly:p,skipWriteOnly:l,schema:i,examples:d,operation:h,level:1,disableDeepLinks:!r},"schema")]})}const P=u(F),N=s(z)`
2
2
  margin: var(--spacing-xxs) 0 0;
3
3
  `,O=s.span`
4
4
  position: relative;
@@ -12,7 +12,7 @@ import{jsx as e,jsxs as n,Fragment as x}from"react/jsx-runtime";import{memo as u
12
12
  line-height: var(--line-height-lg);
13
13
  padding: var(--spacing-xxs) 0;
14
14
 
15
- :hover {
15
+ &:hover {
16
16
  ${w} {
17
17
  opacity: 1;
18
18
  visibility: visible;
@@ -1,3 +1,3 @@
1
- import{jsxs as n,jsx as s}from"react/jsx-runtime";import{memo as t}from"react";import{Tag as i}from"./Fields/index.js";import{styled as m}from"../../styled-components.js";function e({constraints:r}){return r.length===0?null:s(p,{children:r.map(o=>n(i,{children:[" ",o," "]},o))})}const c=t(e),p=m.div`
1
+ import{jsx as n,jsxs as s}from"react/jsx-runtime";import{memo as t}from"react";import{Tag as i}from"./Fields/index.js";import{styled as m}from"../../styled-components.js";function e({constraints:r}){return r.length===0?null:n(p,{children:r.map(o=>s(i,{children:[" ",o," "]},o))})}const c=t(e),p=m.div`
2
2
  margin-top: var(--spacing-xxs);
3
3
  `;export{c as ConstraintsView};
@@ -8,6 +8,6 @@ export interface DropdownProps<T> {
8
8
  triggerSize?: string;
9
9
  fullWidth?: boolean;
10
10
  }
11
- declare function DropdownComponent<T>({ options, value, onChange, className, triggerVariant, triggerSize, fullWidth, }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
11
+ declare function DropdownComponent<T>({ options, value, onChange, className, triggerVariant, triggerSize, fullWidth }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
12
12
  export declare const Dropdown: typeof DropdownComponent;
13
13
  export {};
@@ -1,4 +1,4 @@
1
- import{jsx as r,jsxs as d,Fragment as u}from"react/jsx-runtime";import v,{useMemo as C,useState as I}from"react";import{Dropdown as j}from"@redocly/theme/components/Dropdown/Dropdown";import{CheckmarkIcon as M}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{DropdownMenu as z}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as T}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Button as $}from"@redocly/theme/components/Button/Button";import{SearchIcon as A}from"@redocly/theme/icons/SearchIcon/SearchIcon";import{typedMemo as F}from"@redocly/theme/core/openapi";import{styled as o}from"../../../styled-components.js";import{useTranslate as L}from"../../../hooks/index.js";const R=7;function _({options:n,value:t,onChange:p,className:x,triggerVariant:b="outlined",triggerSize:y="small",fullWidth:l=!1}){const[c,m]=I(""),g=L(),a=n.find(e=>e.value===t),S=n.length>=R,f=C(()=>n.filter(e=>e.label?.toLowerCase().includes(c.toLowerCase())??!1),[n,c]);if(n.length===1)return r(U,{children:a?.element||a?.label});const k=e=>{m(e.target.value)},D=()=>S?d(u,{children:[r(O,{prefix:r(V,{children:r(A,{color:"var(--icon-color-additional)",onClick:e=>e.stopPropagation()})}),content:r(W,{placeholder:g("openapi.discriminator.searchPlaceholder","Search items"),onClick:e=>e.stopPropagation(),onChange:k,value:c})}),r(B,{children:f.length?f.map((e,s)=>d(v.Fragment,{children:[e.divider,r(i,{active:e.value===t,onAction:()=>p(e),suffix:e.value===t&&r(w,{}),children:r(h,{children:e.element||e.label})},e.label)]},s)):r(P,{content:g("openapi.discriminator.searchNoResults","No items found")})})]}):r(u,{children:n.map((e,s)=>d(v.Fragment,{children:[e.divider,r(i,{active:e.value===t,onAction:()=>p(e),suffix:e.value===t&&r(w,{}),children:r(h,{children:e.element||e.label})},e.label)]},s))});return r(N,{className:x,$fullWidth:l,trigger:r(E,{variant:b,size:y,type:"button",$fullWidth:l,children:r(h,{children:a?.element||a?.label})}),withArrow:!0,onClose:()=>m(""),children:r(H,{$fullWidth:l,children:D()})})}const oe=F(_),N=o(j)`
1
+ import{Fragment as u,jsx as r,jsxs as d}from"react/jsx-runtime";import v,{useMemo as C,useState as I}from"react";import{Dropdown as j}from"@redocly/theme/components/Dropdown/Dropdown";import{CheckmarkIcon as M}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{DropdownMenu as z}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as T}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Button as $}from"@redocly/theme/components/Button/Button";import{SearchIcon as A}from"@redocly/theme/icons/SearchIcon/SearchIcon";import{typedMemo as F}from"@redocly/theme/core/openapi";import{styled as o}from"../../../styled-components.js";import{useTranslate as L}from"../../../hooks/index.js";const R=7;function _({options:n,value:t,onChange:p,className:x,triggerVariant:b="outlined",triggerSize:y="small",fullWidth:l=!1}){const[c,m]=I(""),g=L(),a=n.find(e=>e.value===t),S=n.length>=R,f=C(()=>n.filter(e=>e.label?.toLowerCase().includes(c.toLowerCase())??!1),[n,c]);if(n.length===1)return r(U,{children:a?.element||a?.label});const k=e=>{m(e.target.value)},D=()=>S?d(u,{children:[r(O,{prefix:r(V,{children:r(A,{color:"var(--icon-color-additional)",onClick:e=>e.stopPropagation()})}),content:r(W,{placeholder:g("openapi.discriminator.searchPlaceholder","Search items"),onClick:e=>e.stopPropagation(),onChange:k,value:c})}),r(B,{children:f.length?f.map((e,s)=>d(v.Fragment,{children:[e.divider,r(i,{active:e.value===t,onAction:()=>p(e),suffix:e.value===t&&r(w,{}),children:r(h,{children:e.element||e.label})},e.label)]},s)):r(P,{content:g("openapi.discriminator.searchNoResults","No items found")})})]}):r(u,{children:n.map((e,s)=>d(v.Fragment,{children:[e.divider,r(i,{active:e.value===t,onAction:()=>p(e),suffix:e.value===t&&r(w,{}),children:r(h,{children:e.element||e.label})},e.label)]},s))});return r(N,{className:x,$fullWidth:l,trigger:r(E,{variant:b,size:y,type:"button",$fullWidth:l,children:r(h,{children:a?.element||a?.label})}),withArrow:!0,onClose:()=>m(""),children:r(H,{$fullWidth:l,children:D()})})}const oe=F(_),N=o(j)`
2
2
  ${({$fullWidth:n})=>n&&`
3
3
  > div {
4
4
  min-width: 100%;
@@ -1,3 +1,3 @@
1
- import{jsxs as t,jsx as n}from"react/jsx-runtime";import{memo as i}from"react";import{useAtomValue as m}from"jotai";import{Markdown as p}from"@redocly/theme/components/Markdown/Markdown";import{ExtensionValue as e,FieldLabel as l}from"./index.js";import{globalOptionsAtom as a}from"../../jotai/store.js";import{styled as f}from"../../styled-components.js";const c=f(p)`
1
+ import{jsx as t,jsxs as n}from"react/jsx-runtime";import{memo as i}from"react";import{useAtomValue as m}from"jotai";import{Markdown as p}from"@redocly/theme/components/Markdown/Markdown";import{ExtensionValue as e,FieldLabel as l}from"./index.js";import{globalOptionsAtom as a}from"../../jotai/store.js";import{styled as f}from"../../styled-components.js";const c=f(p)`
2
2
  margin: 2px 0;
3
- `;function d({extensions:r}){const{showExtensions:s}=m(a);return s?n("div",{children:Object.keys(r).map(o=>t(c,{children:[t(l,{children:[o.substring(2),": "]})," ",n(e,{children:typeof r[o]=="string"?r[o]:JSON.stringify(r[o])})]},o))}):null}const w=i(d);export{w as Extensions};
3
+ `;function d({extensions:r}){const{showExtensions:s}=m(a);return s?t("div",{children:Object.keys(r).map(o=>n(c,{children:[n(l,{children:[o.substring(2),": "]})," ",t(e,{children:typeof r[o]=="string"?r[o]:JSON.stringify(r[o])})]},o))}):null}const w=i(d);export{w as Extensions};
@@ -12,7 +12,7 @@ import{jsx as c}from"react/jsx-runtime";import{css as p}from"styled-components";
12
12
  opacity: 1;
13
13
  }
14
14
  `}
15
- :hover ${r}, :focus ${r} {
15
+ &:hover ${r}, &:focus ${r} {
16
16
  visibility: visible;
17
17
  opacity: 1;
18
18
  }
@@ -10,7 +10,7 @@ import{LinkIcon as e}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{H2 as t
10
10
  justify-content: space-between;
11
11
  position: relative;
12
12
 
13
- :hover {
13
+ &:hover {
14
14
  ${e} {
15
15
  opacity: 1;
16
16
  visibility: visible;
@@ -26,7 +26,7 @@ import{LinkIcon as e}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{H2 as t
26
26
  word-break: break-word;
27
27
  margin: 0;
28
28
 
29
- :hover {
29
+ &:hover {
30
30
  ${e} {
31
31
  opacity: 1;
32
32
  visibility: visible;
@@ -7,6 +7,6 @@ interface SchemaSelectionProps {
7
7
  schema: SchemaModel;
8
8
  defaultOneOfIdx: number;
9
9
  }
10
- declare function SchemaSelectionComponent({ options, onChange, pointer, schema, defaultOneOfIdx, }: SchemaSelectionProps): import("react/jsx-runtime").JSX.Element | null;
10
+ declare function SchemaSelectionComponent({ options, onChange, pointer, schema, defaultOneOfIdx }: SchemaSelectionProps): import("react/jsx-runtime").JSX.Element | null;
11
11
  export declare const SchemaSelection: typeof SchemaSelectionComponent;
12
12
  export {};
@@ -13,7 +13,7 @@ import{jsx as a,jsxs as c}from"react/jsx-runtime";import{useAtomValue as m}from"
13
13
  opacity 0.3s linear;
14
14
  }
15
15
 
16
- :hover ${o}, :focus ${o} {
16
+ &:hover ${o}, &:focus ${o} {
17
17
  visibility: visible;
18
18
  opacity: 1;
19
19
  }
@@ -1 +1 @@
1
- export declare const deprecatedCss: import("styled-components").FlattenSimpleInterpolation;
1
+ export declare const deprecatedCss: import("styled-components").RuleSet<object>;
package/lib/empty.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- declare namespace _default {
2
- function isatty(): void;
3
- function createRequire(): void;
4
- }
1
+ declare const _default: {
2
+ isatty: () => void;
3
+ createRequire: () => void;
4
+ };
5
5
  export default _default;