@redocly/openapi-docs 3.17.0 → 3.18.0-custom.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/redocly-openapi-docs.min.js +3388 -2653
  2. package/lib/components/ApiInfo/ApiInfo.js +1 -1
  3. package/lib/components/ApiInfo/Metadata.js +1 -1
  4. package/lib/components/Callbacks/CallbackDetails.js +2 -2
  5. package/lib/components/ExpandAllButton/ExpandAllButton.js +2 -2
  6. package/lib/components/Language/LanguageList.js +1 -1
  7. package/lib/components/McpOverview/McpOverview.js +7 -3
  8. package/lib/components/OperationItem/OperationItem.js +10 -6
  9. package/lib/components/Overview/Overview.js +1 -1
  10. package/lib/components/PanelItem/styled.js +8 -4
  11. package/lib/components/PayloadSamples/PayloadSamples.js +1 -1
  12. package/lib/components/PayloadSamples/types.d.ts +1 -0
  13. package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
  14. package/lib/components/Request/RequestDetails.js +8 -2
  15. package/lib/components/Request/types.d.ts +1 -1
  16. package/lib/components/RequestParameters/Body.d.ts +1 -0
  17. package/lib/components/RequestParameters/Body.js +1 -1
  18. package/lib/components/RequestParameters/RequestParameters.d.ts +2 -1
  19. package/lib/components/RequestParameters/RequestParameters.js +1 -1
  20. package/lib/components/RequestSamples/Example.js +1 -1
  21. package/lib/components/RequestSamples/RequestSamples.js +2 -2
  22. package/lib/components/RequestSamples/useCodeSamples.d.ts +1 -1
  23. package/lib/components/RequestSamples/useCodeSamples.js +1 -1
  24. package/lib/components/ResponseSamples/ResponseSamples.js +1 -1
  25. package/lib/components/ResponseSamples/Summary.d.ts +2 -1
  26. package/lib/components/ResponseSamples/Summary.js +1 -1
  27. package/lib/components/Responses/OperationResponseList.d.ts +1 -0
  28. package/lib/components/Responses/OperationResponseList.js +3 -2
  29. package/lib/components/Responses/ResponseDetails.js +1 -1
  30. package/lib/components/Responses/styled.js +4 -2
  31. package/lib/components/Responses/types.d.ts +1 -0
  32. package/lib/components/RightPanel/RightPanel.js +5 -1
  33. package/lib/components/Samples/ExampleSwitch.js +1 -1
  34. package/lib/components/Schema/Schema.js +1 -1
  35. package/lib/components/SchemaDefinition/SchemaDefinition.js +5 -2
  36. package/lib/components/SectionContent/SectionContent.js +7 -5
  37. package/lib/components/SectionItem/SectionItem.js +1 -1
  38. package/lib/components/Security/OAuthScopes.d.ts +3 -3
  39. package/lib/components/Security/OAuthScopes.js +12 -11
  40. package/lib/components/Security/RequiredScopes.d.ts +6 -0
  41. package/lib/components/Security/RequiredScopes.js +17 -0
  42. package/lib/components/Security/RequiredScopesList.d.ts +14 -0
  43. package/lib/components/Security/RequiredScopesList.js +13 -0
  44. package/lib/components/Security/ScopeTagWithTooltip.d.ts +17 -0
  45. package/lib/components/Security/ScopeTagWithTooltip.js +33 -0
  46. package/lib/components/Security/Security.js +1 -1
  47. package/lib/components/Security/SecurityButton.js +14 -14
  48. package/lib/components/Security/SecurityFlow.js +18 -5
  49. package/lib/components/ServerList/ServerList.js +11 -11
  50. package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
  51. package/lib/components/TagItem/OperationsNavigation.js +2 -2
  52. package/lib/components/TagItem/TagItem.js +50 -37
  53. package/lib/components/ViewNested/ViewNested.js +7 -7
  54. package/lib/components/common/BodyContent/BodyContent.d.ts +2 -0
  55. package/lib/components/common/BodyContent/BodyContent.js +4 -4
  56. package/lib/components/common/Dropdown/Dropdown.d.ts +2 -2
  57. package/lib/components/common/Dropdown/Dropdown.js +44 -10
  58. package/lib/components/common/Fields/fields.js +5 -3
  59. package/lib/components/common/OperationItemTitle.js +8 -6
  60. package/lib/components/common/SchemaSelection/SchemaSelection.js +1 -1
  61. package/lib/components/common/Select/Select.js +1 -1
  62. package/lib/components/common/Select/styled.d.ts +0 -1
  63. package/lib/components/common/Select/styled.js +19 -63
  64. package/lib/components/common/Select/types.d.ts +0 -3
  65. package/lib/components/common/styled.js +4 -4
  66. package/lib/icons/CSharpIcon/CSharpIcon.d.ts +2 -1
  67. package/lib/icons/CSharpIcon/CSharpIcon.js +1 -1
  68. package/lib/icons/CurlIcon/CurlIcon.d.ts +3 -2
  69. package/lib/icons/CurlIcon/CurlIcon.js +2 -2
  70. package/lib/icons/GOIcon/GOIcon.d.ts +2 -1
  71. package/lib/icons/GOIcon/GOIcon.js +1 -1
  72. package/lib/icons/JavaIcon/JavaIcon.d.ts +2 -1
  73. package/lib/icons/JavaIcon/JavaIcon.js +1 -1
  74. package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +2 -1
  75. package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +1 -1
  76. package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +2 -1
  77. package/lib/icons/NodeJSIcon/NodeJSIcon.js +1 -1
  78. package/lib/icons/PHPIcon/PHPIcon.d.ts +2 -1
  79. package/lib/icons/PHPIcon/PHPIcon.js +1 -1
  80. package/lib/icons/PythonIcon/PythonIcon.d.ts +2 -1
  81. package/lib/icons/PythonIcon/PythonIcon.js +1 -1
  82. package/lib/icons/RIcon/RIcon.d.ts +2 -1
  83. package/lib/icons/RIcon/RIcon.js +1 -1
  84. package/lib/icons/RubyIcon/RubyIcon.d.ts +2 -1
  85. package/lib/icons/RubyIcon/RubyIcon.js +1 -1
  86. package/lib/index.d.ts +1 -0
  87. package/lib/index.js +1 -1
  88. package/lib/models/group.js +1 -1
  89. package/lib/models/operation.js +1 -1
  90. package/lib/models/request.js +1 -1
  91. package/lib/models/response.js +1 -1
  92. package/lib/models/schema.js +2 -2
  93. package/lib/models/types.d.ts +2 -0
  94. package/lib/services/menu/markdown.js +1 -1
  95. package/lib/services/menu/operation.js +1 -1
  96. package/lib/services/menu/tags.js +3 -3
  97. package/lib/services/types.d.ts +7 -0
  98. package/lib/types/index.d.ts +1 -0
  99. package/lib/types/index.js +1 -1
  100. package/lib/types/oauth2-types.d.ts +4 -0
  101. package/lib/types/oauth2-types.js +0 -0
  102. package/lib/types/open-api.d.ts +12 -0
  103. package/lib/utils/mcp.d.ts +1 -1
  104. package/lib/utils/mcp.js +1 -1
  105. package/lib/utils/openapi.d.ts +4 -1
  106. package/lib/utils/openapi.js +1 -1
  107. package/lib/utils/security-scope.d.ts +5 -0
  108. package/lib/utils/security-scope.js +1 -0
  109. package/lib/utils/string.js +1 -1
  110. package/package.json +21 -22
@@ -1,11 +1,11 @@
1
1
  import type { PropsWithChildren } from 'react';
2
- import type { OpenAPISecurityScheme } from '../../types/index.js';
3
2
  import type { SecurityRequirement } from '../../models/index.js';
4
- type Flow = OpenAPISecurityScheme['flows'];
3
+ import type { OAuth2Flow, OAuth2Flows } from '../../types/index.js';
5
4
  interface OAuthScopesMainProps {
6
5
  id: string;
7
6
  securities: SecurityRequirement[];
8
- flows?: Flow;
7
+ flow?: OAuth2Flow;
8
+ flows?: OAuth2Flows;
9
9
  }
10
10
  export declare const OAuthScopes: import("react").NamedExoticComponent<PropsWithChildren<OAuthScopesMainProps>>;
11
11
  export {};
@@ -1,33 +1,34 @@
1
- import{jsx as r,Fragment as p,jsxs as c}from"react/jsx-runtime";import{memo as S,useState as v}from"react";import{ChevronRightIcon as b}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{Markdown as d}from"../Markdown/index.js";import{SecuritySchemeItem as a}from"./SecuritySchemeItem.js";import{Tag as m}from"./styled.js";import{useTranslate as l}from"../../hooks/index.js";import{getOptionalScopes as O,getRequiredScopes as x}from"./helper.js";import{styled as i}from"../../styled-components.js";function y({id:e,securities:t,flows:n}){const o=x(e,t);return c(p,{children:[r(w,{flows:n,requiredScopes:o}),r(q,{flows:n,requiredScopes:o})]})}function q({flows:e,requiredScopes:t}){return e&&Object.keys(e).map(n=>r(j,{flow:e[n],requiredScopes:t},n))}function j({flow:e,requiredScopes:t}){const n=l(),[o,h]=v(!1),f=Object.keys(e?.scopes||{}),u=O(t,f);return u.length===0?null:c(p,{children:[r(a,{label:c(A,{onClick:()=>{h(s=>!s)},children:[n(o?"openapi.hideOptionalScopes":"openapi.showOptionalScopes",o?"Hide optional scopes":"Show optional scopes"),r(C,{isOpen:o,children:r(b,{size:"var(--font-size-base)",color:"var(--tree-content-color-default)"})})]}),value:" "}),r(z,{isOpen:o,children:u.map(s=>r(a,{label:r(g,{className:"tag-grey",children:s}),value:r(d,{source:e?.scopes[s]||""})},s))})]})}function w({requiredScopes:e,flows:t}){const n=l();return e.length===0?null:t&&Object.keys(t).length>0?Object.keys(t).map(o=>r(k,{flow:t[o],requiredScopes:e},o)):r(a,{label:n("openapi.requiredScopes","Required scopes"),value:r(R,{children:e.map(o=>r(m,{className:"tag-grey",children:o},o))})})}function k({flow:e,requiredScopes:t}){const n=l();return c(p,{children:[r(a,{label:n("openapi.requiredScopes","Required scopes"),value:" "}),t.map(o=>r(a,{label:r(g,{className:"tag-grey",children:o}),value:r(d,{source:e?.scopes[o]||""})},o))]})}const g=i(m)`
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)`
2
2
  font-family: var(--font-family-base);
3
3
  font-size: var(--font-size-base);
4
- line-height: var(--line-height-base);
5
4
  align-self: flex-start;
6
5
  padding: 0 var(--spacing-xs);
7
6
  border: var(--tag-border-width) var(--tag-border-style) var(--tag-bg-color);
8
7
  border-radius: var(--tag-border-radius);
9
- `,A=i.div`
8
+ color: var(--color-warm-grey-8);
9
+ `,R=t.div`
10
10
  cursor: pointer;
11
11
  display: flex;
12
12
  gap: var(--spacing-xxs);
13
13
  align-items: center;
14
14
  user-select: none;
15
- `,R=i.div`
16
- display: flex;
17
- flex-wrap: wrap;
18
- gap: var(--spacing-xxs);
19
- word-break: normal;
20
- `,z=i.div`
15
+ `,T=t.div`
21
16
  max-height: ${e=>e.isOpen?"1000px":"0"};
22
17
  opacity: ${e=>e.isOpen?"1":"0"};
23
18
  overflow: hidden;
24
19
  transition:
25
20
  max-height 0.5s ease-in-out,
26
21
  opacity 0.5s ease-in-out;
27
- `,C=i.span`
22
+ `,_=t.span`
28
23
  display: inline-flex;
29
24
  align-items: center;
30
25
  justify-content: center;
31
26
  transform: ${e=>e.isOpen?"rotate(90deg)":"rotate(0deg)"};
32
27
  transition: transform 0.5s ease-in-out;
33
- `,B=S(y);export{B as OAuthScopes};
28
+ `,I=t.div`
29
+ margin-top: var(--spacing-xs);
30
+ `,W=t.div`
31
+ p {
32
+ margin-bottom: 0;
33
+ }
34
+ `,G=f(q);export{G as OAuthScopes};
@@ -0,0 +1,6 @@
1
+ import type { ReactElement } from 'react';
2
+ interface RequiredScopesProps {
3
+ scopes?: string[];
4
+ }
5
+ export declare function RequiredScopes({ scopes }: RequiredScopesProps): ReactElement | null;
6
+ export {};
@@ -0,0 +1,17 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{styled as o}from"../../styled-components.js";import{normalizeScopes as m}from"../../utils/security-scope.js";import{useTranslate as g}from"../../hooks/index.js";import{ScopeTagWithTooltip as c}from"./ScopeTagWithTooltip.js";const l=4,S=32;function j({scopes:d}){const t=g(),s=m(d);if(s.length===0)return null;const h=s.slice(0,l),a=s.slice(l),n=a.length;return r(x,{children:[e(p,{children:"("}),r(u,{children:[t("openapi.requiredScopes","Required scopes"),":"," "]}),r(f,{children:[h.map(i=>e(c,{className:"tag-grey",text:i,maxChars:S},i)),n>0&&e(c,{arrowPosition:"left",className:"tag-grey",text:`+${n}`,tip:e(v,{children:a.map(i=>e("div",{children:i},i))}),ariaLabel:t("openapi.showMoreScopes",`Show ${n} more scopes`)})]}),e(p,{children:")"})]})}const x=o.span`
2
+ display: inline;
3
+ margin-left: var(--spacing-xxs);
4
+ `,u=o.span`
5
+ color: var(--color-warm-grey-8);
6
+ line-height: var(--line-height-base);
7
+ `,f=o.span`
8
+ display: inline;
9
+ padding: 0 var(--spacing-xxs);
10
+ `,v=o.div`
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: var(--spacing-xxs);
14
+ `,p=o.span`
15
+ color: var(--text-color-description);
16
+ line-height: var(--line-height-base);
17
+ `;export{j as RequiredScopes};
@@ -0,0 +1,14 @@
1
+ import type { ComponentType, ReactElement, ReactNode } from 'react';
2
+ import type { SecurityRequirement } from '../../models/index.js';
3
+ import type { OAuth2Flows } from '../../types/index.js';
4
+ interface RequiredScopesListProps {
5
+ schemeId: string;
6
+ securities: SecurityRequirement[];
7
+ flows?: OAuth2Flows;
8
+ TagComponent?: ComponentType<{
9
+ className?: string;
10
+ children: ReactNode;
11
+ }>;
12
+ }
13
+ export declare function RequiredScopesList({ schemeId, securities, flows, TagComponent, }: RequiredScopesListProps): ReactElement | null;
14
+ export {};
@@ -0,0 +1,13 @@
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`
2
+ p {
3
+ margin-bottom: 0;
4
+ }
5
+ `,q=i(h)`
6
+ font-family: var(--font-family-base);
7
+ font-size: var(--font-size-base);
8
+ align-self: flex-start;
9
+ padding: 0 var(--spacing-xs);
10
+ border: var(--tag-border-width) var(--tag-border-style) var(--tag-bg-color);
11
+ border-radius: var(--tag-border-radius);
12
+ color: var(--color-warm-grey-8);
13
+ `;export{A as RequiredScopesList};
@@ -0,0 +1,17 @@
1
+ import type { ComponentType, ReactElement, ReactNode } from 'react';
2
+ type TagComponentProps = {
3
+ className?: string;
4
+ children: ReactNode;
5
+ };
6
+ interface ScopeTagWithTooltipProps {
7
+ className?: string;
8
+ text: string;
9
+ maxChars?: number;
10
+ tip?: string | ReactNode;
11
+ ariaLabel?: string;
12
+ TagComponent?: ComponentType<TagComponentProps>;
13
+ arrowPosition?: 'left' | 'right' | 'center';
14
+ compact?: boolean;
15
+ }
16
+ export declare function ScopeTagWithTooltip({ className, text, maxChars, tip, ariaLabel, TagComponent, arrowPosition, compact, }: ScopeTagWithTooltipProps): ReactElement;
17
+ export {};
@@ -0,0 +1,33 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{css as l}from"styled-components";import{Tooltip as h}from"@redocly/theme/components/Tooltip/Tooltip";import{styled as a}from"../../styled-components.js";import{getVisibleScopeLabel as b,isScopeTruncated as v}from"../../utils/security-scope.js";import{Tag as g}from"./styled.js";function k({className:i,text:r,maxChars:n=32,tip:s,ariaLabel:f,TagComponent:t=g,arrowPosition:u="center",compact:o=!1}){const c=b(r,n),d=s===void 0&&v(r,n)?r:s;return d?e(m,{$compact:o,children:e(h,{placement:"bottom",arrowPosition:u,tip:d,children:e(T,{role:"button",tabIndex:0,"aria-label":f??r,children:e(t,{className:i,children:e(p,{$compact:o,children:c})})})})}):e(m,{$compact:o,children:e(t,{className:i,children:e(p,{$compact:o,children:c})})})}const p=a.span`
2
+ display: inline-flex;
3
+ font-family: var(--font-family-base);
4
+ overflow: hidden;
5
+ text-overflow: ellipsis;
6
+ white-space: nowrap;
7
+ max-width: 16rem;
8
+ color: var(--color-warm-grey-8);
9
+ ${({$compact:i})=>!i&&l`
10
+ &&& {
11
+ font-size: var(--font-size-sm);
12
+ }
13
+ `}
14
+ `,T=a.span`
15
+ cursor: default;
16
+
17
+ &:focus-visible {
18
+ outline: 1px solid var(--link-color-primary);
19
+ border-radius: var(--border-radius-md);
20
+ }
21
+ `,m=a.span`
22
+ display: inline-block;
23
+ vertical-align: baseline;
24
+ line-height: var(--line-height-base);
25
+ ${({$compact:i})=>i?l`
26
+ margin: 0;
27
+ `:l`
28
+ margin: calc(var(--spacing-unit) / 2) var(--spacing-xxs) calc(var(--spacing-unit) / 2) 0;
29
+ &:last-child {
30
+ margin-right: 0;
31
+ }
32
+ `}
33
+ `;export{k as ScopeTagWithTooltip};
@@ -1 +1 @@
1
- import{jsx as r,Fragment as f,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,p=Date.now();e.current={securityTypes:n,schemesCount:u,isCombined:a,modalOpenTime:p},l.sendViewSecurityDetailsClickedMessage({id:"openapi-docs-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:"openapi-docs-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(f,{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{jsx as r,Fragment as f,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,p=Date.now();e.current={securityTypes:n,schemesCount:u,isCombined:a,modalOpenTime:p},l.sendViewSecurityDetailsClickedMessage([{id:"openapi-docs-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:"openapi-docs-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(f,{children:[r(M,{securities:t,onClick:m}),i&&r(b,{mountId:"api-content",children:r(S,{securities:t,onClose:d})})]})}export{_ as Security};
@@ -1,15 +1,14 @@
1
- import{jsx as r,jsxs as o}from"react/jsx-runtime";import{Fragment as d}from"react";import{SecurityIcon as v}from"@redocly/theme/icons/SecurityIcon/SecurityIcon";import{Panel as u}from"@redocly/theme/components/Panel/Panel";import{Button as h}from"@redocly/theme/components/Button/Button";import{Tooltip as y}from"@redocly/theme/components/Tooltip/Tooltip";import{WarningFilledIcon as b}from"@redocly/theme/icons/WarningFilledIcon/WarningFilledIcon";import{useTranslate as x}from"../../hooks/index.js";import{styled as e}from"../../styled-components.js";import{deprecatedCss as w}from"../common/index.js";function N({securities:a,onClick:m}){const i=x();return r(j,{header:()=>o(k,{children:[r(v,{}),r(B,{children:i("openapi.security","Security")}),r(T,{onClick:m,variant:"link",children:i("openapi.viewSecurityDetails","View details")})]}),isExpandable:!1,children:r(C,{children:a.map((t,n)=>{const s=a.length>1&&t.schemes.length>1,f=t.schemes.map(({id:l,deprecated:c=!1},g)=>o(d,{children:[o(S,{deprecated:c,children:[l,c&&r(y,{tip:i("openapi.badges.deprecated","Deprecated"),children:r(b,{color:"var(--badge-deprecated-bg-color)"})})]}),g<t.schemes.length-1&&r(p,{children:" and "})]},l));return o(d,{children:[s?"(":"",f,s?")":"",n<a.length-1&&r(p,{children:" or "})]},n)})})})}const S=e.span`
2
- ${({deprecated:a})=>a&&w}
3
- display: flex;
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Fragment as d}from"react";import{SecurityIcon as v}from"@redocly/theme/icons/SecurityIcon/SecurityIcon";import{Panel as u}from"@redocly/theme/components/Panel/Panel";import{Button as b}from"@redocly/theme/components/Button/Button";import{Tooltip as y}from"@redocly/theme/components/Tooltip/Tooltip";import{WarningFilledIcon as x}from"@redocly/theme/icons/WarningFilledIcon/WarningFilledIcon";import{useTranslate as w}from"../../hooks/index.js";import{styled as r}from"../../styled-components.js";import{deprecatedCss as S}from"../common/index.js";import{RequiredScopes as j}from"./RequiredScopes.js";function W({securities:a,onClick:m}){const o=w();return e(T,{header:()=>i(B,{children:[e(v,{}),e(D,{children:o("openapi.security","Security")}),e(C,{onClick:m,variant:"link",children:o("openapi.viewSecurityDetails","View details")})]}),isExpandable:!1,children:e(H,{children:a.map((t,n)=>{const s=a.length>1&&t.schemes.length>1,h=t.schemes.map(({id:l,scopes:g,deprecated:c=!1},f)=>i(d,{children:[i(k,{deprecated:c,children:[l,c&&e(y,{tip:o("openapi.badges.deprecated","Deprecated"),children:e(x,{color:"var(--badge-deprecated-bg-color)"})})]}),e(j,{scopes:g}),f<t.schemes.length-1&&e(p,{children:" and "})]},l));return i(d,{children:[s?"(":"",h,s?")":"",n<a.length-1&&e(p,{children:" or "})]},n)})})})}const k=r.span`
2
+ ${({deprecated:a})=>a&&S}
3
+ display: inline-flex;
4
4
  align-items: center;
5
5
  gap: var(--spacing-xxs);
6
- display: inline-flex;
7
- };
8
- `,j=e(u)`
6
+ font-weight: var(--font-weight-medium);
7
+ `,T=r(u)`
9
8
  margin-top: var(--spacing-base);
10
9
  border: var(--panel-border);
11
10
  border-radius: var(--panel-border-radius);
12
- `,k=e.div`
11
+ `,B=r.div`
13
12
  display: flex;
14
13
  align-items: center;
15
14
  justify-content: space-between;
@@ -19,19 +18,20 @@ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{Fragment as d}from"reac
19
18
  background-color: var(--layer-color);
20
19
  border-bottom: var(--panel-border);
21
20
  border-radius: var(--panel-border-radius) var(--panel-border-radius) 0 0;
22
- `,T=e(h)`
21
+ `,C=r(b)`
23
22
  margin-left: auto;
24
23
  font-size: var(--font-size-sm);
25
- `,B=e.span`
24
+ `,D=r.span`
26
25
  font-family: var(--font-family-base);
27
26
  font-weight: var(--font-weight-medium);
28
27
  color: var(--text-color-primary);
29
- `,C=e.div`
30
- flex: 1;
31
- text-overflow: ellipsis;
28
+ `,H=r.div`
29
+ display: block;
32
30
  overflow: hidden;
33
31
  padding: var(--spacing-xs) var(--spacing-sm);
34
32
  color: var(--text-color-primary);
35
- `,p=e.span`
33
+ line-height: var(--line-height-base);
34
+ `,p=r.span`
36
35
  color: var(--text-color-description);
37
- `;export{N as SecurityButton};
36
+ line-height: var(--line-height-base);
37
+ `;export{W as SecurityButton};
@@ -1,21 +1,34 @@
1
- import{jsx as e,Fragment as m,jsxs as t}from"react/jsx-runtime";import{Badge as S}from"@redocly/theme/components/Badge/Badge";import{SecuritySchemeItem as a}from"./SecuritySchemeItem.js";import{titleize as w}from"../../utils/index.js";import{OAuthFlow as y}from"./OAuthFlow.js";import{StyledLink as d}from"./styled.js";import{Markdown as F}from"../Markdown/index.js";import{useTranslate as T}from"../../hooks/index.js";import{OAuthScopes as k}from"./OAuthScopes.js";import{styled as n}from"../../styled-components.js";function N({type:o,bearerFormat:h,name:u,flows:i,openIdConnectUrl:l,description:f,id:p,securities:g,in:b,deprecated:v=!1,oauth2MetadataUrl:s}){const r=T();if(!o||!p)return null;const x={http:t(m,{children:[e(a,{label:r("openapi.httpAuthorizationScheme","HTTP Authorization Scheme"),value:o}),e(a,{label:r("openapi.bearerFormat","Bearer Format"),value:h})]}),apiKey:e(a,{label:`${w(b||"")} ${r("openapi.parameterName","parameter name")}:`,value:u}),oauth2:t(m,{children:[e(a,{label:r("openapi.flowType","Flow type"),value:o}),i&&Object.keys(i).map(c=>e(y,{flow:i[c]},c))]}),openIdConnect:e(a,{label:r("openapi.connectUrl","Connect URL"),value:l&&e(d,{target:"_blank",rel:"noopener noreferrer",href:l,children:l})})};return t(j,{children:[t(z,{children:[e(_,{children:p}),v&&e(S,{deprecated:!0,children:r("openapi.badges.deprecated","Deprecated")})]}),e(F,{source:f}),s&&e(a,{label:r("openapi.oauth2MetadataUrl","OAuth2 Metadata URL"),value:e(d,{target:"_blank",rel:"noopener noreferrer",href:s,children:s})}),t(A,{children:[x[o]||null,e(k,{id:p,securities:g,flows:i})]})]})}const z=n.div`
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`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: var(--spacing-xxs);
5
5
  margin: 0 0 var(--spacing-xs);
6
- `,j=n.div`
6
+ `,W=o.div`
7
7
  background: var(--layer-color);
8
8
  padding: var(--spacing-base);
9
9
  border-radius: var(--border-radius);
10
10
  border: 1px solid var(--border-color-secondary);
11
11
  width: 100%;
12
12
  margin-top: var(--spacing-base);
13
- `,A=n.div`
13
+ `,B=o.div`
14
14
  width: 100%;
15
15
  margin-top: var(--spacing-md);
16
- `,_=n.p`
16
+ `,R=o.p`
17
17
  font-size: var(--font-size-base);
18
18
  margin: 0;
19
19
  text-transform: capitalize;
20
20
  font-weight: var(--font-weight-semibold);
21
- `;export{N as SecurityFlow};
21
+ `,C=o.div`
22
+ display: flex;
23
+ flex-direction: column;
24
+ padding-left: var(--spacing-xs);
25
+ margin-bottom: var(--spacing-xxs);
26
+ `,H=o(O)`
27
+ color: var(--color-warm-grey-8);
28
+ font-family: var(--font-family-base);
29
+ `,N=o.span`
30
+ font-weight: var(--font-weight-regular);
31
+ `,P=o.span`
32
+ color: var(--color-warm-grey-11);
33
+ font-weight: var(--font-weight-medium);
34
+ `;export{V as SecurityFlow};
@@ -1,4 +1,4 @@
1
- import{jsx as i,jsxs as o}from"react/jsx-runtime";import{CopyButton as x}from"@redocly/theme/components/Buttons/CopyButton";import{getServerDisplayName as b}from"../../utils/helpers.js";import{PanelItemDescription as u,Title as y}from"../PanelItem/index.js";import{ViewNested as w}from"../ViewNested/index.js";import{Tag as S}from"../common/index.js";import{Markdown as T}from"../Markdown/index.js";import{styled as e}from"../../styled-components.js";import{ServerDescriptionTooltip as j}from"./ServerDescriptionTooltip.js";const q=({servers:h,path:f="",translate:r})=>i(D,{children:h.map(t=>{const a=t.url+f,p=Object.keys(t.variables||{}).length,d=p===1?"variable":"variables",l=`${p||""} ${r(`openapi.${d}`,d)}`,v=!!t.name&&!!t.description;return o("div",{children:[o(L,{children:[i(u,{"data-testid":"server-panel-item-name",children:b(t)}),v&&i(j,{description:t.description})]}),o(O,{children:[i(y,{suppressHydrationWarning:!0,children:a}),i(x,{data:a},a)]}),t.variables&&i(w,{expandText:`${r("openapi.actions.show","Show")} ${l}`,hideText:`${r("openapi.actions.hide","Hide")} ${l}`,expandByDefault:!1,expandable:!0,hideDivider:!0,children:i($,{children:Object.entries(t.variables||{}).map(([c,n])=>o(z,{children:[i(k,{children:c}),o(s,{children:[r("openapi.default","Default")," ",i(g,{children:n.default})]}),i(W,{source:n.description}),n.enum&&o(s,{children:[r("openapi.enum","Enum")," ",i(C,{children:n.enum.map(m=>i(g,{children:m},m))})]})]},c))})})]},t.url)})}),D=e.div`
1
+ import{jsx as i,jsxs as o}from"react/jsx-runtime";import{CopyButton as u}from"@redocly/theme/components/Buttons/CopyButton";import{CheckmarkFilledIcon as y}from"@redocly/theme/icons/CheckmarkFilledIcon/CheckmarkFilledIcon";import{getServerDisplayName as w}from"../../utils/helpers.js";import{PanelItemDescription as h,Title as S}from"../PanelItem/index.js";import{ViewNested as T}from"../ViewNested/index.js";import{Tag as l}from"../common/index.js";import{Markdown as j}from"../Markdown/index.js";import{styled as t}from"../../styled-components.js";import{ServerDescriptionTooltip as D}from"./ServerDescriptionTooltip.js";const A=({servers:v,path:f="",translate:n})=>i($,{children:v.map(e=>{const s=e.url+f,d=Object.keys(e.variables||{}).length,c=d===1?"variable":"variables",m=`${d||""} ${n(`openapi.${c}`,c)}`,b=!!e.name&&!!e.description;return o("div",{children:[o(W,{children:[o(h,{"data-testid":"server-panel-item-name",children:[w(e),e["x-isLive"]&&o(l,{className:"tag-green",children:[i(y,{}),"Live"]})]}),b&&i(D,{description:e.description}),e["x-labels"]?.length&&i(h,{style:{margin:"var(--spacing-xs) 0"},children:e["x-labels"]?.map(r=>o(l,{className:`tag-${r.color}`,children:[r.label,": ",r.value]},r.value))})||null]}),o(I,{children:[i(S,{suppressHydrationWarning:!0,children:s}),i(u,{data:s},s)]}),e.variables&&i(T,{expandText:`${n("openapi.actions.show","Show")} ${m}`,hideText:`${n("openapi.actions.hide","Hide")} ${m}`,expandByDefault:!1,expandable:!0,hideDivider:!0,children:i(z,{children:Object.entries(e.variables||{}).map(([r,a])=>o(k,{children:[i(C,{children:r}),o(p,{children:[n("openapi.default","Default")," ",i(x,{children:a.default})]}),i(L,{source:a.description}),a.enum&&o(p,{children:[n("openapi.enum","Enum")," ",i(N,{children:a.enum.map(g=>i(x,{children:g},g))})]})]},r))})})]},e.url)})}),$=t.div`
2
2
  & > div {
3
3
  border-bottom: 1px solid var(--border-color-secondary);
4
4
  margin-bottom: var(--spacing-xs);
@@ -10,7 +10,7 @@ import{jsx as i,jsxs as o}from"react/jsx-runtime";import{CopyButton as x}from"@r
10
10
  margin-bottom: 0;
11
11
  padding-bottom: 0;
12
12
  }
13
- `,$=e.div`
13
+ `,z=t.div`
14
14
  padding-left: var(--spacing-xxs);
15
15
  & > div {
16
16
  border-bottom: 1px solid var(--border-color-secondary);
@@ -28,37 +28,37 @@ import{jsx as i,jsxs as o}from"react/jsx-runtime";import{CopyButton as x}from"@r
28
28
  margin-bottom: 0;
29
29
  padding-bottom: 0;
30
30
  }
31
- `,z=e.div`
31
+ `,k=t.div`
32
32
  display: flex;
33
33
  flex-direction: column;
34
34
  flex-wrap: wrap;
35
- `,W=e(T)`
35
+ `,L=t(j)`
36
36
  font-size: var(--font-size-sm);
37
37
  line-height: var(--line-height-sm);
38
38
  color: var(--text-color-primary);
39
- `,s=e.span`
39
+ `,p=t.span`
40
40
  display: flex;
41
41
  gap: var(--spacing-xxs);
42
42
  font-size: var(--font-size-sm);
43
43
  line-height: var(--line-height-sm);
44
44
  color: var(--text-color-primary);
45
- `,k=e(s)`
45
+ `,C=t(p)`
46
46
  padding-bottom: var(--spacing-xxs);
47
47
  font-weight: var(--font-weight-semibold);
48
- `,C=e.span`
48
+ `,N=t.span`
49
49
  display: flex;
50
50
  gap: var(--spacing-xxs);
51
51
  flex-wrap: wrap;
52
- `,g=e(S)`
52
+ `,x=t(l)`
53
53
  font-size: var(--font-size-sm);
54
54
  line-height: var(--line-height-sm);
55
- `,L=e.div`
55
+ `,W=t.div`
56
56
  display: flex;
57
57
  justify-content: start;
58
58
  align-items: center;
59
59
  gap: var(--spacing-xxs);
60
- `,O=e.div`
60
+ `,I=t.div`
61
61
  display: flex;
62
62
  justify-content: space-between;
63
63
  align-items: center;
64
- `;export{q as ServerList};
64
+ `;export{A as ServerList};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as f}from"react/jsx-runtime";import{useMemo as S,useCallback as c}from"react";import{useAtom as g,useAtomValue as w}from"jotai";import{DropdownMenu as y}from"@redocly/theme/components/Dropdown/DropdownMenu";import{Dropdown as A}from"@redocly/theme/components/Dropdown/Dropdown";import{getOperationColor as C}from"@redocly/theme/core/openapi";import{HttpVerb as b}from"../common/index.js";import{PathWrapper as k,Path as P,StyledCopyButton as V,StyledDropdownMenuItem as j}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 E}from"../../utils/index.js";import{environmentAtom as N}from"../../jotai/app.js";import{useActiveWithFallback as O,useTelemetry as W}from"../../hooks/index.js";import{getServerEnvName as p}from"../../utils/environments.js";import{createTargetServerSwitchEvent as I}from"../../events/index.js";import{globalStoreAtom as T}from"../../jotai/store.js";const $=({operation:r,className:h})=>{const n=W(),[[d],m]=g(N),{options:{events:i}}=w(T),s=O(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({server:p(t)}),i?.targetServerSwitch&&t)){const o=I({operation:r,serverUrl:t.url});i.targetServerSwitch(o)}},[r,m,n,i]),v=S(()=>r.servers.map(t=>{const o=D(E(t),r.path);return e(j,{onAction:l(t),children:e(x,{header:M(t),title:o,actions:[e(V,{data:o,toasterPlacement:"left",onCopyClick:a},o)],active:t.url===s,withCheckmark:!0})},o)}),[r.servers,r.path,l,a,s]),u=C({isAdditionalOperation:r.isAdditionalOperation,httpVerb:r.httpVerb});return e(A,{className:h,trigger:f(k,{variant:"ghost",children:[e(b,{color:u,children:r.httpVerb}),e(P,{children:r.path})]}),withArrow:!0,children:e(y,{children:v})})};export{$ as ServerListDropdown};
1
+ import{jsx as e,jsxs as S}from"react/jsx-runtime";import{useMemo as g,useCallback as a}from"react";import{useAtom as w,useAtomValue as y}from"jotai";import{DropdownMenu as A}from"@redocly/theme/components/Dropdown/DropdownMenu";import{Dropdown as C}from"@redocly/theme/components/Dropdown/Dropdown";import{getOperationColor as b}from"@redocly/theme/core/openapi";import{HttpVerb as k}from"../common/index.js";import{PathWrapper as j,Path as P,StyledCopyButton as V,StyledDropdownMenuItem as x}from"./styled.js";import{PanelItem as D}from"../PanelItem/index.js";import{joinWithSeparator as M}from"../../services/index.js";import{getServerDisplayName as E,replaceVariables as p}from"../../utils/index.js";import{environmentAtom as N}from"../../jotai/app.js";import{useActiveWithFallback as O,useTelemetry as W}from"../../hooks/index.js";import{getServerEnvName as h}from"../../utils/environments.js";import{createTargetServerSwitchEvent as _}from"../../events/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";const $=({operation:r,className:d})=>{const m=W(),[[v],n]=w(N),{options:{events:i}}=y(I),s=O(r.servers.map(t=>({...t,key:t.url})),v.server),c=a(t=>{t.stopPropagation()},[]),l=a(t=>()=>{if(r.servers.length!==1&&(n({environment:h(t)}),m.sendSwitchServersClickedMessage([{object:"switch_servers",server:h(t)}]),i?.targetServerSwitch&&t)){const o=_({operation:r,serverUrl:t.url});i.targetServerSwitch(o)}},[r,n,m,i]),u=g(()=>r.servers.map(t=>{const o=r.isRpc?p(t):M(p(t),r.path);return e(x,{onAction:l(t),children:e(D,{header:E(t),title:o,actions:[e(V,{data:o,toasterPlacement:"left",onCopyClick:c},o)],active:t.url===s,withCheckmark:!0})},o)}),[r.servers,r.isRpc,r.path,l,c,s]),f=b({isAdditionalOperation:r.isAdditionalOperation,httpVerb:r.httpVerb});return e(C,{className:d,trigger:S(j,{variant:"ghost",children:[e(k,{color:f,children:r.httpVerb}),e(P,{children:r.path})]}),withArrow:!0,children:e(A,{children:u})})};export{$ as ServerListDropdown};
@@ -1,6 +1,6 @@
1
- import{jsx as i,jsxs as y}from"react/jsx-runtime";import{useMemo as N,memo as j,useState as E,useCallback as W}from"react";import{useNavigate as B}from"react-router-dom";import{LayoutVariant as _}from"@redocly/config";import{useAtomValue as V}from"jotai/index";import{SamplesPanel as z}from"../common/index.js";import{layoutAtom as D}from"../../jotai/app.js";import{OperationNavigationItems as p}from"./OperationNavigationItems.js";import{StyledButton as K}from"./styled.js";import{useTranslate as L}from"../../hooks/index.js";import{styled as X}from"../../styled-components.js";import{isRenderableMenuItem as q}from"../../utils/menu.js";const m=8;function F({items:c,routingBasePath:n}){const o=L(),[r,O]=E(!1),u=B(),P=V(D)===_.STACKED,{operations:h,webhooks:d,schemas:f,mcpTools:g,showMoreCount:k,totalCount:w,mcpResources:C,mcpPrompts:x}=N(()=>{const s=c.filter(e=>q(e)),b=r?s:s.slice(0,m),{operations:v,additionalOperations:S,webhooks:M,schemas:T,mcpTools:R,mcpResources:A,mcpPrompts:I}=b.reduce((e,t)=>{if(t.type==="operation"&&t.isWebhook)e.webhooks.push(t);else if(t.type==="operation"){const l=t;l.isAdditionalOperation?e.additionalOperations.push(l):e.operations.push(l)}else t.type==="schema"?e.schemas.push(t):t.type==="tool"?e.mcpTools.push(t):t.type==="rsrc"?e.mcpResources.push(t):t.type==="prompt"&&e.mcpPrompts.push(t);return e},{operations:[],additionalOperations:[],webhooks:[],schemas:[],mcpTools:[],mcpResources:[],mcpPrompts:[]});return{operations:[...v,...S],schemas:T,mcpTools:R,webhooks:M,mcpResources:A,mcpPrompts:I,showMoreCount:!r&&s.length>m?s.length-m:0,totalCount:s.length}},[r,c]),a=W(s=>u(s),[u]);return w?y(G,{isStacked:P,"data-testid":"operation-navigation-list",children:[f.length>0&&i(p,{items:f,onClick:a,routingBasePath:n,translate:o,title:o("openapi.schemas","Schemas")}),g.length>0&&i(p,{items:g,onClick:a,routingBasePath:n,translate:o,title:o("openapi.mcp.tools","MCP Tools")}),C.length>0&&i(p,{items:C,onClick:a,routingBasePath:n,translate:o,title:o("openapi.mcp.resources","MCP Resources")}),x.length>0&&i(p,{items:x,onClick:a,routingBasePath:n,translate:o,title:o("openapi.mcp.prompts","MCP Prompts")}),h.length>0&&i(p,{items:h,onClick:a,routingBasePath:n,translate:o,title:o("openapi.operations","Operations")}),d.length>0&&i(p,{items:d,onClick:a,routingBasePath:n,translate:o,title:o("openapi.webhooks","Webhooks")}),!r&&!!k&&y(K,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>O(!0),children:[o("openapi.actions.show","Show")," ",k," ",o("openapi.actions.more","more"),"..."]})]}):null}const io=j(F),G=X(z)`
1
+ import{jsx as i,jsxs as y}from"react/jsx-runtime";import{useMemo as E,memo as W,useState as B,useCallback as _}from"react";import{useNavigate as V}from"react-router-dom";import{LayoutVariant as z}from"@redocly/config";import{useAtomValue as D}from"jotai/index";import{SamplesPanel as K}from"../common/index.js";import{layoutAtom as L}from"../../jotai/app.js";import{OperationNavigationItems as p}from"./OperationNavigationItems.js";import{StyledButton as X}from"./styled.js";import{useTranslate as q}from"../../hooks/index.js";import{styled as F}from"../../styled-components.js";import{isRenderableMenuItem as G}from"../../utils/menu.js";const m=8;function H({items:c,routingBasePath:s}){const o=q(),[l,P]=B(!1),h=V(),w=D(L)===z.STACKED,{operations:u,rpcOperations:d,webhooks:f,schemas:g,mcpTools:k,showMoreCount:C,totalCount:b,mcpResources:O,mcpPrompts:x}=E(()=>{const a=c.filter(e=>G(e)),v=l?a:a.slice(0,m),{operations:M,rpcOperations:R,additionalOperations:S,webhooks:T,schemas:A,mcpTools:I,mcpResources:N,mcpPrompts:j}=v.reduce((e,t)=>{if(t.type==="operation"&&t.isWebhook)e.webhooks.push(t);else if(t.type==="operation"){const r=t;r.isRpc?e.rpcOperations.push(r):r.isAdditionalOperation?e.additionalOperations.push(r):e.operations.push(r)}else t.type==="schema"?e.schemas.push(t):t.type==="tool"?e.mcpTools.push(t):t.type==="rsrc"?e.mcpResources.push(t):t.type==="prompt"&&e.mcpPrompts.push(t);return e},{operations:[],rpcOperations:[],additionalOperations:[],webhooks:[],schemas:[],mcpTools:[],mcpResources:[],mcpPrompts:[]});return{operations:[...M,...S],rpcOperations:R,schemas:A,mcpTools:I,webhooks:T,mcpResources:N,mcpPrompts:j,showMoreCount:!l&&a.length>m?a.length-m:0,totalCount:a.length}},[l,c]),n=_(a=>h(a),[h]);return b?y(J,{isStacked:w,"data-testid":"operation-navigation-list",children:[g.length>0&&i(p,{items:g,onClick:n,routingBasePath:s,translate:o,title:o("openapi.schemas","Schemas")}),k.length>0&&i(p,{items:k,onClick:n,routingBasePath:s,translate:o,title:o("openapi.mcp.tools","MCP Tools")}),O.length>0&&i(p,{items:O,onClick:n,routingBasePath:s,translate:o,title:o("openapi.mcp.resources","MCP Resources")}),x.length>0&&i(p,{items:x,onClick:n,routingBasePath:s,translate:o,title:o("openapi.mcp.prompts","MCP Prompts")}),d.length>0&&i(p,{items:d,onClick:n,routingBasePath:s,translate:o,title:o("openapi.rpcMethods","RPC methods")}),u.length>0&&i(p,{items:u,onClick:n,routingBasePath:s,translate:o,title:o("openapi.operations","Operations")}),f.length>0&&i(p,{items:f,onClick:n,routingBasePath:s,translate:o,title:o("openapi.webhooks","Webhooks")}),!l&&!!C&&y(X,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>P(!0),children:[o("openapi.actions.show","Show")," ",C," ",o("openapi.actions.more","more"),"..."]})]}):null}const ro=W(H),J=F(K)`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: var(--spacing-xxs);
5
5
  padding-top: var(--spacing-xxl);
6
- `;export{io as OperationsNavigation,F as OperationsNavigationComponent};
6
+ `;export{ro as OperationsNavigation,H as OperationsNavigationComponent};
@@ -1,59 +1,72 @@
1
- import{jsx as r,jsxs as t}from"react/jsx-runtime";import{memo as w,useCallback as $}from"react";import{useNavigate as y}from"react-router-dom";import{useAtomValue as z}from"jotai";import{LayoutVariant as j}from"@redocly/config";import{css as M}from"styled-components";import{Markdown as p}from"@redocly/theme/components/Markdown/Markdown";import{breakpoints as T}from"@redocly/theme/core/openapi";import{Button as C}from"@redocly/theme/components/Button/Button";import{PageActions as I}from"@redocly/theme/components/PageActions/PageActions";import{H2 as A}from"@redocly/theme/components/Typography/H2";import{LinkIcon as L}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{joinWithSeparator as P}from"../../services/history/helpers.js";import{Row as W,SamplesMiddlePanel as m,SamplesPanel as f,ShareLink as B}from"../common/index.js";import{Markdown as D}from"../Markdown/index.js";import{OperationsNavigation as H}from"./OperationsNavigation.js";import{layoutAtom as N}from"../../jotai/app.js";import{useTranslate as V}from"../../hooks/index.js";import{styled as l}from"../../styled-components.js";import{StyledShareLink as _}from"../common/linkify.js";function E({item:a,routingBasePath:i="",isExpanded:d}){const v=V(),{description:o,name:s,href:S}=a,c=y(),g=z(N),e=P(i,a.href),x=$(()=>{c(e)},[c,e]),n=!!a.items.length,k=typeof o=="object"?o?.raw:o,h=g===j.STACKED,b=k?.includes?.("{% schemaDefinition");return t(K,{expanded:d,isSchema:b,isStacked:h,children:[t(W,{layout:g,children:[t(m,{fullWidth:!n,isStacked:h,children:[t(u,{expandable:n,children:[r(B,{to:S,"aria-label":`link to ${s}`}),s,r(I,{pageSlug:e})]}),r(D,{source:o})]}),n&&r(H,{items:a.items,routingBasePath:i})]}),n&&!d&&t(O,{type:"button",variant:"text",size:"medium",onClick:x,children:["+ ",v("openapi.actions.show","Show")]})]})}const da=w(E),K=l.div`
1
+ import{jsx as t,jsxs as n}from"react/jsx-runtime";import{memo as x,useCallback as S}from"react";import{useNavigate as b}from"react-router-dom";import{useAtomValue as y}from"jotai";import{LayoutVariant as T}from"@redocly/config";import{Markdown as m}from"@redocly/theme/components/Markdown/Markdown";import{breakpoints as r}from"@redocly/theme/core/openapi";import{Button as W}from"@redocly/theme/components/Button/Button";import{PageActions as M}from"@redocly/theme/components/PageActions/PageActions";import{H2 as z}from"@redocly/theme/components/Typography/H2";import{LinkIcon as j}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{joinWithSeparator as C}from"../../services/history/helpers.js";import{Row as I,SamplesMiddlePanel as f,SamplesPanel as u,ShareLink as P}from"../common/index.js";import{Markdown as A}from"../Markdown/index.js";import{OperationsNavigation as L}from"./OperationsNavigation.js";import{layoutAtom as B}from"../../jotai/app.js";import{useTranslate as H}from"../../hooks/index.js";import{styled as e}from"../../styled-components.js";import{StyledShareLink as D}from"../common/linkify.js";function N({item:a,routingBasePath:i="",isExpanded:s}){const v=H(),{description:w,name:g,href:$}=a,c=b(),h=y(B),o=C(i,a.href),k=S(()=>{c(o)},[c,o]),d=!!a.items.length,l=h===T.STACKED,p=!d;return n(V,{expanded:s,children:[n(I,{layout:h,children:[n(_,{fullWidth:p,isStacked:l,children:[n(E,{fullWidth:p,isStacked:l,children:[n(K,{children:[t(P,{to:$,"aria-label":`link to ${g}`}),g]}),t(M,{pageSlug:o})]}),t(F,{fullWidth:p,isStacked:l,children:t(A,{source:w})})]}),d&&t(L,{items:a.items,routingBasePath:i})]}),d&&!s&&n(O,{type:"button",variant:"text",size:"medium",onClick:k,children:["+ ",v("openapi.actions.show","Show")]})]})}const ma=x(N),V=e.div`
2
2
  padding-top: var(--spacing-lg);
3
3
  padding-bottom: ${({expanded:a})=>a?"var(--spacing-xxl)":""};
4
+ `,_=e(f)`
5
+ @media screen and (min-width: ${r.large}) {
6
+ padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"0":void 0};
7
+ padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"0":void 0};
8
+ }
9
+ `,E=e.div`
10
+ display: flex;
11
+ align-items: flex-start;
12
+ margin: var(--h2-margin-top) 0 var(--h2-margin-bottom);
13
+
14
+ @media screen and (min-width: ${r.large}) {
15
+ padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(var(--panel-gap-horizontal) * 2)":void 0};
16
+ padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"var(--panel-gap-horizontal)":void 0};
17
+ width: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(100% - var(--panel-samples-width))":void 0};
4
18
 
19
+ ${D} {
20
+ left: ${({fullWidth:a,isStacked:i})=>a&&!i?"unset":void 0};
21
+ }
22
+ }
23
+ `,F=e.div`
5
24
  /*
6
25
  Markdoc components inside markdown that use SamplesPanel should not have padding.
7
26
  E.g. SchemaDefinition, McpTool
8
27
  padding is added by the TagItem itself
9
28
  */
10
- ${p} ${f} {
11
- padding-right: 0;
29
+ ${m} ${u} {
12
30
  padding-left: 0;
31
+ padding-right: 0;
13
32
  }
14
33
 
15
- ${({isSchema:a,isStacked:i})=>a&&!i&&M`
16
- ${m} {
17
- padding-left: 0;
18
- padding-right: 0;
19
- }
20
-
21
- ${p} ${m} {
22
- padding-left: calc(var(--panel-gap-horizontal) * 2);
23
- padding-right: var(--panel-gap-horizontal);
24
- }
34
+ @media screen and (min-width: ${r.large}) {
35
+ ${m} ${f} {
36
+ padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(var(--panel-gap-horizontal) * 2)":void 0};
37
+ padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"var(--panel-gap-horizontal)":void 0};
38
+ }
25
39
 
26
- ${p} ${f} {
27
- padding-right: calc(var(--panel-gap-horizontal) * 2);
28
- padding-left: var(--panel-gap-horizontal);
29
- }
40
+ ${m} .schema-definition ${u} {
41
+ padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"var(--panel-gap-horizontal)":void 0};
42
+ padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(var(--panel-gap-horizontal) * 2)":void 0};
43
+ }
44
+ }
45
+ `,K=e(z)`
46
+ position: relative;
47
+ display: flex;
48
+ align-items: center;
49
+ gap: var(--spacing-xs);
50
+ flex-wrap: wrap;
51
+ overflow-wrap: anywhere;
52
+ word-break: break-word;
53
+ margin: 0;
30
54
 
31
- ${u} {
32
- padding-left: calc(var(--panel-gap-horizontal) * 2);
33
- padding-right: var(--panel-gap-horizontal);
34
- width: calc(100% - var(--panel-samples-width));
35
- ${_} {
36
- left: unset;
37
- }
38
- }
39
- `}
40
- `,O=l(C)`
55
+ :hover {
56
+ ${j} {
57
+ opacity: 1;
58
+ visibility: visible;
59
+ }
60
+ }
61
+ `,O=e(W)`
41
62
  margin: var(--spacing-md) var(--spacing-xl) var(--spacing-xxs);
42
63
  width: calc(100% - var(--spacing-xl) * 2);
43
64
 
44
- @media screen and (min-width: ${T.medium}) {
65
+ @media screen and (min-width: ${r.medium}) {
45
66
  --button-margin-md: calc(var(--spacing-xl) * 2);
46
67
 
47
68
  margin-left: var(--button-margin-md);
48
69
  margin-right: var(--button-margin-md);
49
70
  width: calc(100% - var(--button-margin-md) * 2);
50
71
  }
51
- `,u=l(A)`
52
- display: flex;
53
- :hover {
54
- ${L} {
55
- opacity: 1;
56
- visibility: visible;
57
- }
58
- }
59
- `;export{da as TagItem,E as TagItemComponent};
72
+ `;export{ma as TagItem,N as TagItemComponent};
@@ -1,4 +1,4 @@
1
- import{jsx as o,Fragment as l,jsxs as t}from"react/jsx-runtime";import{css as c}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 d}from"../../styled-components.js";function _({expandByDefault:e,level:g,expandable:h=!1,expandText:v,hideText:x,hideDivider:y=!1,children:i,expandedAll:a,isNestedArray:n}){const[r,p]=j((e||n)??!1);$(()=>{C(a)||p(a)},[a]);const s=r?N(g):void 0;if(!h)return i;const b=()=>{p(u=>!u)};return n?t(l,{children:[o(V,{children:"Array ["}),o(f,{$isArrayInsideArray:n,className:"view-nested-wrapper",children:o(m,{color:s,children:i})})]}):o(l,{children:t(f,{$divider:!y&&!r,className:"view-nested-wrapper",children:[t(k,{onClick:b,children:[o(S,{sign:r?"-":"+",color:s}),!r&&v,r&&(x||"")]}),r&&o(m,{color:s,children:i})]})})}const U=w(_),k=d.button`
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`
2
2
  background: none;
3
3
  border: none;
4
4
  cursor: pointer;
@@ -10,24 +10,24 @@ import{jsx as o,Fragment as l,jsxs as t}from"react/jsx-runtime";import{css as c}
10
10
  font-size: var(--font-size-base);
11
11
  font-family: var(--font-family-base);
12
12
  line-height: var(--line-height-base);
13
- margin: var(--spacing-xxs) 0 var(--spacing-xs);
13
+ margin-top: var(--spacing-xxs);
14
14
  width: 100%;
15
- `,m=d.div`
15
+ `,m=c.div`
16
16
  padding-left: var(--schema-nested-offset);
17
17
  border-left: 1px solid ${({color:e})=>e||"var(--border-color-primary)"};
18
18
  margin: -10px 0 0 9px;
19
- ${({color:e})=>e&&c`
19
+ ${({color:e})=>e&&d`
20
20
  .schema-name {
21
21
  color: ${e};
22
22
  }
23
23
  `}
24
- `,f=d.div`
24
+ `,f=c.div`
25
25
  width: 100%;
26
- ${({$isArrayInsideArray:e})=>e&&c`
26
+ ${({$isArrayInsideArray:e})=>e&&d`
27
27
  padding-top: var(--schema-property-details-spacing);
28
28
  `}
29
29
 
30
- ${({$divider:e})=>e&&c`
30
+ ${({$divider:e})=>e&&d`
31
31
  border-bottom: 1px solid var(--border-color-primary);
32
32
  padding-bottom: var(--schema-property-details-spacing);
33
33
  `}
@@ -6,6 +6,8 @@ interface BodyContentProps {
6
6
  description?: string | GenericObject;
7
7
  content?: MediaContentModel;
8
8
  deepLink?: string;
9
+ isRpc?: boolean;
10
+ title?: string;
9
11
  }
10
12
  export declare const BodyContent: import("react").NamedExoticComponent<BodyContentProps>;
11
13
  export {};