@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.
- package/dist/redocly-openapi-docs.min.js +3388 -2653
- package/lib/components/ApiInfo/ApiInfo.js +1 -1
- package/lib/components/ApiInfo/Metadata.js +1 -1
- package/lib/components/Callbacks/CallbackDetails.js +2 -2
- package/lib/components/ExpandAllButton/ExpandAllButton.js +2 -2
- package/lib/components/Language/LanguageList.js +1 -1
- package/lib/components/McpOverview/McpOverview.js +7 -3
- package/lib/components/OperationItem/OperationItem.js +10 -6
- package/lib/components/Overview/Overview.js +1 -1
- package/lib/components/PanelItem/styled.js +8 -4
- package/lib/components/PayloadSamples/PayloadSamples.js +1 -1
- package/lib/components/PayloadSamples/types.d.ts +1 -0
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib/components/Request/RequestDetails.js +8 -2
- package/lib/components/Request/types.d.ts +1 -1
- package/lib/components/RequestParameters/Body.d.ts +1 -0
- package/lib/components/RequestParameters/Body.js +1 -1
- package/lib/components/RequestParameters/RequestParameters.d.ts +2 -1
- package/lib/components/RequestParameters/RequestParameters.js +1 -1
- package/lib/components/RequestSamples/Example.js +1 -1
- package/lib/components/RequestSamples/RequestSamples.js +2 -2
- package/lib/components/RequestSamples/useCodeSamples.d.ts +1 -1
- package/lib/components/RequestSamples/useCodeSamples.js +1 -1
- package/lib/components/ResponseSamples/ResponseSamples.js +1 -1
- package/lib/components/ResponseSamples/Summary.d.ts +2 -1
- package/lib/components/ResponseSamples/Summary.js +1 -1
- package/lib/components/Responses/OperationResponseList.d.ts +1 -0
- package/lib/components/Responses/OperationResponseList.js +3 -2
- package/lib/components/Responses/ResponseDetails.js +1 -1
- package/lib/components/Responses/styled.js +4 -2
- package/lib/components/Responses/types.d.ts +1 -0
- package/lib/components/RightPanel/RightPanel.js +5 -1
- package/lib/components/Samples/ExampleSwitch.js +1 -1
- package/lib/components/Schema/Schema.js +1 -1
- package/lib/components/SchemaDefinition/SchemaDefinition.js +5 -2
- package/lib/components/SectionContent/SectionContent.js +7 -5
- package/lib/components/SectionItem/SectionItem.js +1 -1
- package/lib/components/Security/OAuthScopes.d.ts +3 -3
- package/lib/components/Security/OAuthScopes.js +12 -11
- package/lib/components/Security/RequiredScopes.d.ts +6 -0
- package/lib/components/Security/RequiredScopes.js +17 -0
- package/lib/components/Security/RequiredScopesList.d.ts +14 -0
- package/lib/components/Security/RequiredScopesList.js +13 -0
- package/lib/components/Security/ScopeTagWithTooltip.d.ts +17 -0
- package/lib/components/Security/ScopeTagWithTooltip.js +33 -0
- package/lib/components/Security/Security.js +1 -1
- package/lib/components/Security/SecurityButton.js +14 -14
- package/lib/components/Security/SecurityFlow.js +18 -5
- package/lib/components/ServerList/ServerList.js +11 -11
- package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib/components/TagItem/OperationsNavigation.js +2 -2
- package/lib/components/TagItem/TagItem.js +50 -37
- package/lib/components/ViewNested/ViewNested.js +7 -7
- package/lib/components/common/BodyContent/BodyContent.d.ts +2 -0
- package/lib/components/common/BodyContent/BodyContent.js +4 -4
- package/lib/components/common/Dropdown/Dropdown.d.ts +2 -2
- package/lib/components/common/Dropdown/Dropdown.js +44 -10
- package/lib/components/common/Fields/fields.js +5 -3
- package/lib/components/common/OperationItemTitle.js +8 -6
- package/lib/components/common/SchemaSelection/SchemaSelection.js +1 -1
- package/lib/components/common/Select/Select.js +1 -1
- package/lib/components/common/Select/styled.d.ts +0 -1
- package/lib/components/common/Select/styled.js +19 -63
- package/lib/components/common/Select/types.d.ts +0 -3
- package/lib/components/common/styled.js +4 -4
- package/lib/icons/CSharpIcon/CSharpIcon.d.ts +2 -1
- package/lib/icons/CSharpIcon/CSharpIcon.js +1 -1
- package/lib/icons/CurlIcon/CurlIcon.d.ts +3 -2
- package/lib/icons/CurlIcon/CurlIcon.js +2 -2
- package/lib/icons/GOIcon/GOIcon.d.ts +2 -1
- package/lib/icons/GOIcon/GOIcon.js +1 -1
- package/lib/icons/JavaIcon/JavaIcon.d.ts +2 -1
- package/lib/icons/JavaIcon/JavaIcon.js +1 -1
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +2 -1
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +1 -1
- package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +2 -1
- package/lib/icons/NodeJSIcon/NodeJSIcon.js +1 -1
- package/lib/icons/PHPIcon/PHPIcon.d.ts +2 -1
- package/lib/icons/PHPIcon/PHPIcon.js +1 -1
- package/lib/icons/PythonIcon/PythonIcon.d.ts +2 -1
- package/lib/icons/PythonIcon/PythonIcon.js +1 -1
- package/lib/icons/RIcon/RIcon.d.ts +2 -1
- package/lib/icons/RIcon/RIcon.js +1 -1
- package/lib/icons/RubyIcon/RubyIcon.d.ts +2 -1
- package/lib/icons/RubyIcon/RubyIcon.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/models/group.js +1 -1
- package/lib/models/operation.js +1 -1
- package/lib/models/request.js +1 -1
- package/lib/models/response.js +1 -1
- package/lib/models/schema.js +2 -2
- package/lib/models/types.d.ts +2 -0
- package/lib/services/menu/markdown.js +1 -1
- package/lib/services/menu/operation.js +1 -1
- package/lib/services/menu/tags.js +3 -3
- package/lib/services/types.d.ts +7 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -1
- package/lib/types/oauth2-types.d.ts +4 -0
- package/lib/types/oauth2-types.js +0 -0
- package/lib/types/open-api.d.ts +12 -0
- package/lib/utils/mcp.d.ts +1 -1
- package/lib/utils/mcp.js +1 -1
- package/lib/utils/openapi.d.ts +4 -1
- package/lib/utils/openapi.js +1 -1
- package/lib/utils/security-scope.d.ts +5 -0
- package/lib/utils/security-scope.js +1 -0
- package/lib/utils/string.js +1 -1
- 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
|
|
3
|
+
import type { OAuth2Flow, OAuth2Flows } from '../../types/index.js';
|
|
5
4
|
interface OAuthScopesMainProps {
|
|
6
5
|
id: string;
|
|
7
6
|
securities: SecurityRequirement[];
|
|
8
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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,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
|
|
2
|
-
${({deprecated:a})=>a&&
|
|
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
|
-
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
21
|
+
`,C=r(b)`
|
|
23
22
|
margin-left: auto;
|
|
24
23
|
font-size: var(--font-size-sm);
|
|
25
|
-
`,
|
|
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
|
-
`,
|
|
30
|
-
|
|
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
|
-
|
|
33
|
+
line-height: var(--line-height-base);
|
|
34
|
+
`,p=r.span`
|
|
36
35
|
color: var(--text-color-description);
|
|
37
|
-
|
|
36
|
+
line-height: var(--line-height-base);
|
|
37
|
+
`;export{W as SecurityButton};
|
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
import{jsx as e,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
13
|
+
`,B=o.div`
|
|
14
14
|
width: 100%;
|
|
15
15
|
margin-top: var(--spacing-md);
|
|
16
|
-
`,
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
`,
|
|
31
|
+
`,k=t.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
flex-wrap: wrap;
|
|
35
|
-
`,
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
45
|
+
`,C=t(p)`
|
|
46
46
|
padding-bottom: var(--spacing-xxs);
|
|
47
47
|
font-weight: var(--font-weight-semibold);
|
|
48
|
-
`,
|
|
48
|
+
`,N=t.span`
|
|
49
49
|
display: flex;
|
|
50
50
|
gap: var(--spacing-xxs);
|
|
51
51
|
flex-wrap: wrap;
|
|
52
|
-
`,
|
|
52
|
+
`,x=t(l)`
|
|
53
53
|
font-size: var(--font-size-sm);
|
|
54
54
|
line-height: var(--line-height-sm);
|
|
55
|
-
`,
|
|
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
|
-
`,
|
|
60
|
+
`,I=t.div`
|
|
61
61
|
display: flex;
|
|
62
62
|
justify-content: space-between;
|
|
63
63
|
align-items: center;
|
|
64
|
-
`;export{
|
|
64
|
+
`;export{A as ServerList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
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
|
|
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{
|
|
6
|
+
`;export{ro as OperationsNavigation,H as OperationsNavigationComponent};
|
|
@@ -1,59 +1,72 @@
|
|
|
1
|
-
import{jsx as
|
|
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
|
-
${
|
|
11
|
-
padding-right: 0;
|
|
29
|
+
${m} ${u} {
|
|
12
30
|
padding-left: 0;
|
|
31
|
+
padding-right: 0;
|
|
13
32
|
}
|
|
14
33
|
|
|
15
|
-
${
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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: ${
|
|
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
|
-
|
|
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
|
|
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)
|
|
13
|
+
margin-top: var(--spacing-xxs);
|
|
14
14
|
width: 100%;
|
|
15
|
-
`,m=
|
|
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&&
|
|
19
|
+
${({color:e})=>e&&d`
|
|
20
20
|
.schema-name {
|
|
21
21
|
color: ${e};
|
|
22
22
|
}
|
|
23
23
|
`}
|
|
24
|
-
`,f=
|
|
24
|
+
`,f=c.div`
|
|
25
25
|
width: 100%;
|
|
26
|
-
${({$isArrayInsideArray:e})=>e&&
|
|
26
|
+
${({$isArrayInsideArray:e})=>e&&d`
|
|
27
27
|
padding-top: var(--schema-property-details-spacing);
|
|
28
28
|
`}
|
|
29
29
|
|
|
30
|
-
${({$divider:e})=>e&&
|
|
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 {};
|