@redocly/openapi-docs 3.22.0-next.2 → 3.22.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/redocly-openapi-docs.min.js +2727 -2757
- package/lib/components/ApiInfo/ApiInfo.d.ts +1 -1
- package/lib/components/Callbacks/CallbackDetails.js +2 -2
- package/lib/components/Callbacks/CallbackSummary.d.ts +1 -1
- package/lib/components/ContentItem/ContentItem.js +1 -1
- package/lib/components/ContentItem/useIsExpanded.d.ts +1 -1
- package/lib/components/ContentItems/ContentItems.js +1 -1
- package/lib/components/ContentItems/Items.js +1 -1
- package/lib/components/Download/DownloadSpecification.d.ts +1 -1
- package/lib/components/Download/DownloadSpecification.js +2 -2
- package/lib/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/components/Language/LanguageItem.js +1 -1
- package/lib/components/Language/styled.js +1 -1
- package/lib/components/Markdown/Markdown.js +1 -1
- package/lib/components/McpOverview/McpOverview.d.ts +1 -1
- package/lib/components/McpOverview/McpOverview.js +1 -1
- package/lib/components/McpTool/McpPrompt.js +1 -1
- package/lib/components/McpTool/McpResource.js +1 -1
- package/lib/components/McpTool/McpTool.js +1 -1
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
- package/lib/components/OperationItem/Description.js +1 -1
- package/lib/components/OperationItem/OperationItem.js +1 -1
- package/lib/components/Overview/Overview.js +1 -1
- package/lib/components/PayloadSamples/Example.d.ts +1 -1
- package/lib/components/PayloadSamples/ExampleValue.d.ts +1 -1
- package/lib/components/PayloadSamples/MediaTypeSamples.js +1 -1
- package/lib/components/PropertyDetails/DescriptionEnums.d.ts +1 -1
- package/lib/components/PropertyDetails/DescriptionEnums.js +1 -1
- package/lib/components/PropertyDetails/EnumValues.js +1 -1
- package/lib/components/PropertyDetails/Examples.js +1 -1
- package/lib/components/PropertyDetails/Extensions.js +2 -2
- package/lib/components/PropertyDetails/FieldDetail.js +1 -1
- package/lib/components/PropertyDetails/FieldDetails.js +2 -2
- package/lib/components/PropertyDetails/Pattern.js +1 -1
- package/lib/components/PropertyDetails/SchemaTypeInfo.js +1 -1
- package/lib/components/PropertyDetails/SimpleEnums.d.ts +1 -1
- package/lib/components/PropertyDetails/SimpleEnums.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.d.ts +1 -1
- package/lib/components/Replay/EmbeddedReplay.d.ts +1 -1
- package/lib/components/Replay/Replay.js +1 -1
- package/lib/components/Replay/utils.d.ts +1 -1
- package/lib/components/Request/RequestDetails.js +1 -1
- package/lib/components/RequestParameters/ParametersGroup.js +1 -1
- package/lib/components/RequestParameters/RequestParameters.d.ts +1 -1
- package/lib/components/RequestParameters/RequestParameters.js +1 -1
- package/lib/components/RequestSamples/Example.js +1 -1
- package/lib/components/RequestSamples/useCodeSamples.d.ts +1 -1
- package/lib/components/ResponseSamples/ResponseSamples.d.ts +1 -1
- package/lib/components/Responses/OperationResponseList.js +1 -1
- package/lib/components/Responses/ResponseDetails.js +1 -1
- package/lib/components/RightPanel/RightPanel.js +1 -1
- package/lib/components/Schema/ArraySchema.js +1 -1
- package/lib/components/Schema/ObjectSchema.js +1 -1
- package/lib/components/Schema/OneOfSchema.js +1 -1
- package/lib/components/Schema/helpers.d.ts +1 -1
- package/lib/components/SectionContent/SectionContent.d.ts +1 -1
- package/lib/components/SectionContent/SectionContent.js +1 -1
- package/lib/components/SectionItem/SectionItem.js +1 -1
- package/lib/components/Security/OAuthFlow.js +1 -1
- package/lib/components/Security/OAuthScopes.js +1 -1
- package/lib/components/Security/RequiredScopesList.d.ts +1 -1
- package/lib/components/Security/RequiredScopesList.js +1 -1
- package/lib/components/Security/ScopeTagWithTooltip.d.ts +1 -1
- package/lib/components/Security/Security.js +1 -1
- package/lib/components/Security/SecurityFlow.d.ts +1 -1
- package/lib/components/Security/SecurityFlow.js +1 -1
- package/lib/components/ServerListDropdown/styled.js +1 -1
- package/lib/components/StickySidebar/SidebarActions.js +1 -1
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +2 -2
- package/lib/components/TagItem/Breadcrumbs.js +1 -1
- package/lib/components/TagItem/OperationNavigationItems.d.ts +1 -1
- package/lib/components/TagItem/OperationNavigationItems.js +1 -1
- package/lib/components/TagItem/OperationsNavigation.d.ts +1 -1
- package/lib/components/TagItem/TagItem.d.ts +1 -1
- package/lib/components/TagItem/TagItem.js +1 -1
- package/lib/components/ViewNested/ViewNested.js +1 -1
- package/lib/components/common/Badges.js +1 -1
- package/lib/components/common/BodyContent/BodyContent.js +2 -2
- package/lib/components/common/ConstraintsView.js +1 -1
- package/lib/components/common/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/common/Dropdown/Dropdown.js +1 -1
- package/lib/components/common/Extensions.js +2 -2
- package/lib/components/common/LinkToField.js +1 -1
- package/lib/components/common/OperationItemTitle.js +2 -2
- package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +1 -1
- package/lib/components/common/linkify.js +1 -1
- package/lib/components/common/mixins.d.ts +1 -1
- package/lib/empty.d.ts +4 -4
- package/lib/jotai/app.d.ts +2 -2
- package/lib/jotai/operation.d.ts +1 -1
- package/lib/models/mediaContent.d.ts +1 -1
- package/lib/models/mediaType.d.ts +1 -1
- package/lib/models/request.d.ts +1 -1
- package/lib/models/response.d.ts +1 -1
- package/lib/models/schema.d.ts +1 -1
- package/lib/models/security.d.ts +1 -1
- package/lib/services/code-samples/generator.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +3 -3
- package/lib/services/code-samples/httpsnippet/targets/__mocks__/mock.d.ts +39 -39
- package/lib/services/code-samples/httpsnippet/targets/index.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/index.d.ts +1 -1
- package/lib/utils/helpers.d.ts +1 -1
- package/lib/utils/openapi.d.ts +1 -1
- package/lib/utils/theme-helpers.d.ts +2 -2
- package/package.json +7 -8
|
@@ -7,6 +7,6 @@ export interface ResponseSamplesProps {
|
|
|
7
7
|
onTabChange: (tab: string) => void;
|
|
8
8
|
onPanelToggle?: (isExpanded: boolean, panelType?: PanelType) => void;
|
|
9
9
|
}
|
|
10
|
-
declare function ResponseSamplesComponent({ operation, activeResponseTab, onTabChange, onPanelToggle
|
|
10
|
+
declare function ResponseSamplesComponent({ operation, activeResponseTab, onTabChange, onPanelToggle }: ResponseSamplesProps): ReactElement | null;
|
|
11
11
|
export declare const ResponseSamples: import("react").MemoExoticComponent<typeof ResponseSamplesComponent>;
|
|
12
12
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as n,jsxs as s
|
|
1
|
+
import{Fragment as v,jsx as n,jsxs as s}from"react/jsx-runtime";import{memo as A,useMemo as L}from"react";import{useLocation as j}from"react-router-dom";import{useAtomValue as w}from"jotai";import{Tabs as F,useTabsState as M}from"../Tabs/index.js";import{ResponseDetails as C}from"./ResponseDetails.js";import{makeDeepLink as N}from"../../services/index.js";import{Row as R,StyledTitle as _}from"./styled.js";import{LinkToField as B}from"../common/LinkToField.js";import{pathIncludesLink as c,hasNestedFields as D}from"../../utils/index.js";import{ExpandAllButton as E}from"../ExpandAllButton/index.js";import{useTranslate as P}from"../../hooks/index.js";import{getActiveMediaType as S}from"../../models/index.js";import{activeMimeNameAtom as $}from"../../jotai/app.js";import{styled as I}from"../../styled-components.js";const oe=A(({responses:i,renderTitle:f,operationId:a,operationPointer:d,activeResponseTab:m,onTabChange:u,callbackId:g,onPanelToggle:h})=>{const p=j(),T=P(),l=w($),r=i.map(({code:e})=>({key:e,title:e})),b=r.find(({key:e})=>e===m||c(p,a)&&c(p,`c=${e}`)),{activeTab:k,handleTabChange:x}=M({tabs:r,defaultTab:b?.key,onChange:u}),o=r.find(e=>e.key===(m||k)),t=i.find(e=>e.code===o?.key),y=L(()=>{if(!t?.content)return!1;const{schema:e}=S(t?.content,l)||{};return D(e)},[l,t?.content]);return o?s(v,{children:[s(O,{children:[f?.(o)||s(_,{children:[n(B,{to:N(a,`response&c=${o.key}`)}),T("openapi.responses","Responses")]}),n(F,{tabs:r,activeTab:o,onChange:x}),y&&n(E,{type:"response",operationPointer:d,onPanelToggle:h})]}),t?n("div",{children:n(C,{response:t,operationId:a,callbackId:g})},t.code):null]}):null}),O=I(R)`
|
|
2
2
|
flex-wrap: wrap;
|
|
3
3
|
gap: var(--spacing-unit);
|
|
4
4
|
margin-top: var(--spacing-xl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as f,jsx as r,jsxs as u}from"react/jsx-runtime";import{memo as x}from"react";import{ResponseHeaders as k}from"./ResponseHeaders.js";import{StyledDescription as i}from"./styled.js";import{BodyContent as y}from"../common/BodyContent/index.js";import{makeDeepLink as $}from"../../services/index.js";function h({response:s,operationId:e,callbackId:n,disableDeepLinks:o}){const{description:t,headers:d,content:a,summary:c,code:m}=s;return u(f,{children:[r(i,{className:"redoc-markdown",source:c}),r(i,{className:"redoc-markdown",source:t}),r(k,{headers:d,deepLink:o?void 0:p(e,n,m,"headers")}),r(y,{content:a,skipWriteOnly:!0,deepLink:o?void 0:p(e,n,m,"body")})]})}const w=x(h);function p(s,e="",n,o){const t=e?`${e}/response&c=${n}/${o}`:`response&c=${n}/${o}`;return $(s,t)}export{w as ResponseDetails};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as u,jsx as e,jsxs as x}from"react/jsx-runtime";import{useAtomValue as c}from"jotai";import{Panel as r}from"@redocly/theme/components/Panel/Panel";import{Markdown as S}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as b}from"../Download/index.js";import{Overview as O}from"../Overview/index.js";import{ServerList as j}from"../ServerList/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";import{normalizeServers as d}from"../../utils/index.js";import{LanguageList as L}from"../Language/index.js";import{mergeInMockServer as M}from"../../models/operation.js";import{languageAtom as P}from"../../jotai/app.js";import{useTranslate as k}from"../../hooks/index.js";import{useDownloadInfo as D}from"../Download/useDownloadInfo.js";import{McpOverview as E}from"../McpOverview/McpOverview.js";const J=({item:{infoDefinition:o}})=>{const a=k(),{options:{hideDownloadButtons:f,downloadUrls:g,mockServer:v},parser:{definition:s,definitionUrl:t}}=c(I),{languages:i,activeLanguage:h}=c(P),l=D({downloadUrls:g}),m=d(t,M(s.servers||[],v)),n=s?.["x-mcp"],w=d(t,n?.servers||s.servers||[]),p=!(Object.keys(s.paths||{}).length>0)&&n;return x(u,{children:[!f&&l&&e(r,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:e(b,{downloadObjects:l})}),!!n&&e(r,{className:"panel-download",header:a("openapi.mcp.title","MCP server"),isExpandable:!1,children:e(E,{mcpInfo:n,mcpServers:w})}),(o?.license||o?.contact||o?.termsOfService)&&e(r,{className:"panel-mcp-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:e(S,{children:e(O,{info:o,translate:a})})}),!!i?.length&&!p&&e(r,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:e(L,{languages:i,activeLanguage:h,translate:a})}),!!m.length&&!p&&e(r,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:e(j,{servers:m,translate:a})})]})};export{J as RightPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,jsxs as p
|
|
1
|
+
import{Fragment as L,jsx as n,jsxs as p}from"react/jsx-runtime";import{memo as T,useCallback as k}from"react";import{useAtomValue as F}from"jotai";import{TypeName as j}from"../common/index.js";import{Schema as B}from"./Schema.js";import{ObjectSchema as S}from"./ObjectSchema.js";import{humanizeConstraints as D}from"../../utils/index.js";import{SubSchema as R}from"./SubSchema.js";import{globalOptionsAtom as W}from"../../jotai/store.js";import{getExpandByDefault as _}from"./helpers.js";import{ArrayLabel as q,LabelValue as c,ArrayClosingLabel as E,Line as h}from"../common/styled.js";function N({schema:r,schema:{minItems:u,maxItems:O,items:o},fieldParentsName:l,...e}){const{schemasExpansionLevel:g}=F(W),d=Array.isArray(e.parentType)?e.parentType:[e.parentType],i=d.includes("array")&&d.length===1,t=i?(e.level||0)+1:e.level,A=u===void 0&&O===void 0?"":`(${D(r)})`;let s=l&&[...l.slice(0,-1),l[l.length-1]+"[]"];const y=k(m=>e.skipReadOnly||e.skipWriteOnly?m?.filter(f=>!(e.skipReadOnly&&f.schema.readOnly||e.skipWriteOnly&&f.schema.writeOnly)):m,[e.skipReadOnly,e.skipWriteOnly]);if(r?.fields)return n(S,{...e,shouldCloseArray:i,level:t,schema:r,fieldParentsName:s,onOneOfChange:e.onOneOfChange});if(r.displayType&&!o&&!A.length)return n("div",{children:n(j,{children:r.displayType})});const v=y(o?.fields),x=y(o?.oneOf?.[0]?.fields),b=v?.length||x?.length,a=e.level===1,C=_({level:e.level,required:e.required,schemasExpansionLevel:g});return n(R,{...e,propertyLength:b,isNestedArray:i,level:t,isArray:!0,expandable:!a,expandByDefault:C,operationPointer:r.operationPointer,children:p(L,{children:[a&&p(q,{children:[n(c,{children:"Array ["}),n(h,{})]}),n(B,{...e,parentType:a?void 0:r.type,level:t,schema:o,shouldCloseArray:i,hideBottomBorder:a,fieldParentsName:s,expandable:!1,onOneOfChange:e.onOneOfChange}),a&&p(E,{className:"array-closing-label",children:[n(h,{}),n(c,{children:"]"})]})]})})}const Q=T(N);export{Q as ArraySchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as P,jsx as r,jsxs as m}from"react/jsx-runtime";import{memo as C}from"react";import{useAtomValue as F}from"jotai";import{PropertiesTableCaption as N}from"../common/index.js";import{Discriminator as v}from"../Discriminator/index.js";import{globalOptionsAtom as A}from"../../jotai/store.js";import{PropertyDetails as B}from"../PropertyDetails/index.js";import{SubSchema as _}from"./SubSchema.js";import{getExpandByDefault as w}from"./helpers.js";import{useTranslate as E}from"../../hooks/index.js";import{ArrayClosingLabel as I,LabelValue as T,Line as V}from"../common/styled.js";function k({schema:i,showTitle:s,discriminator:t,level:a,skipWriteOnly:n,skipReadOnly:o,fieldParentsName:c,expandable:f,deepLink:d,required:h,disableDeepLinks:u,shouldCloseArray:x,oneOfLevel:b,slug:g,onOneOfChange:O}){const{fields:l=[],title:L}=i,y=E(),{schemasExpansionLevel:D}=F(A),p=o||n?l.filter(e=>!(o&&e.schema.readOnly||n&&e.schema.writeOnly)):l,S=w({required:h,level:a,schemasExpansionLevel:D});return m(_,{expandable:f,expandByDefault:S,level:a,propertyLength:p.length,deepLink:d,operationPointer:i.operationPointer,children:[m(P,{children:[s&&r(N,{children:L}),p.map((e,j)=>r(B,{isFirst:j===0,field:e,fieldParentsName:Number(a)>1?c:[],renderDiscriminatorSwitch:t?.fieldName===e.name&&t?.parentSchema?()=>r(v,{parent:t.parentSchema,activeOneOfIdx:t.activeOneOfIdx,translate:y}):void 0,skipReadOnly:o,skipWriteOnly:n,showTitle:s,level:a,disableDeepLinks:u,oneOfLevel:b,slug:g,onOneOfChange:O},e.name))]}),x&&m(I,{className:"array-closing-label",children:[r(V,{}),r(T,{children:"]"})]})]})}const Z=C(k);export{Z as ObjectSchema};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as n,jsxs as m}from"react/jsx-runtime";import{memo as g}from"react";import{useAtom as y}from"jotai";import{StyledBadge as I,SelectionTitle as b}from"../common/index.js";import{Markdown as j}from"../Markdown/index.js";import{ConstraintsView as C}from"../common/ConstraintsView.js";import{Schema as T}from"./Schema.js";import{operationStore as w}from"../../jotai/operation.js";import{SchemaSelection as E}from"../common/SchemaSelection/index.js";import{useOneOfLocationIdx as N}from"./useOneOfLocationIdx.js";import{useTranslate as P}from"../../hooks/index.js";import{styled as l}from"../../styled-components.js";function z({schema:{oneOf:i},schema:e,onChange:f,oneOfLevel:a=1,...x}){const O=P(),[r,u]=y(w(e.operationPointer)),p=N(i,a),s=i.map((t,S)=>({label:t.title||t.typePrefix+t.displayType,value:S})),c=s.findIndex(t=>t.label===r.activeExampleName),d=p===-1?c!==-1?c:0:p,v=r.activeOneOf?.[e.pointer]!==void 0?r.activeOneOf[e.pointer]:d,o=i[v];if(!o)return null;const h=t=>{f?.({pointer:e.pointer,index:t}),u({activeExampleName:e.oneOf?.[t]?.title,activeOneOf:{[e.pointer]:t},requestValues:{body:null}})};return m(L,{children:[m(b,{children:[e.oneOfType,":"]}),n(E,{options:s,onChange:h,pointer:e.operationPointer,schema:e,defaultOneOfIdx:d}),o.deprecated&&n(I,{deprecated:!0,children:O("openapi.badges.deprecated","Deprecated")}),o.description&&n(D,{source:o.description}),n(C,{constraints:o.constraints}),n(T,{...x,schema:o,oneOfLevel:a+1})]})}const K=g(z),D=l(j)`
|
|
2
2
|
margin-top: var(--spacing-xs);
|
|
3
3
|
font-size: var(--font-size-base);
|
|
4
4
|
line-height: var(--line-height-base);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SchemaProps } from './types.js';
|
|
2
2
|
export declare const extractTypeFromDeepLink: (str?: string) => string;
|
|
3
|
-
export declare function getExpandByDefault({ schemasExpansionLevel, level, required
|
|
3
|
+
export declare function getExpandByDefault({ schemasExpansionLevel, level, required }: Pick<SchemaProps, 'level' | 'required'> & {
|
|
4
4
|
schemasExpansionLevel?: number;
|
|
5
5
|
}): boolean;
|
|
@@ -4,7 +4,7 @@ interface SectionContentProps {
|
|
|
4
4
|
items: ContentItemModel[];
|
|
5
5
|
hideFooterAndHeader?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function SectionContent({ items, hideFooterAndHeader
|
|
7
|
+
export declare function SectionContent({ items, hideFooterAndHeader }: SectionContentProps): ReactElement | null;
|
|
8
8
|
export declare const SectionContainer: any;
|
|
9
9
|
export declare const RightPanelContainer: any;
|
|
10
10
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as t,jsxs as m
|
|
1
|
+
import{Fragment as x,jsx as t,jsxs as m}from"react/jsx-runtime";import{useMemo as p}from"react";import{useAtomValue as d}from"jotai";import{LayoutVariant as c}from"@redocly/config";import{breakpoints as S}from"@redocly/theme/core/openapi";import{OpenApiHeader as u}from"@redocly/theme/components/OpenApiDocs/hooks/OpenApiHeader";import{PageFooter as k}from"../PageFooter/index.js";import{globalOptionsAtom as b}from"../../jotai/store.js";import{RenderHook as w}from"../RenderHook/index.js";import{RightPanel as y}from"../RightPanel/index.js";import{layoutAtom as C}from"../../jotai/app.js";import{Row as B,SamplesMiddlePanel as R,SamplesPanel as j}from"../common/index.js";import{Items as f}from"../ContentItems/Items.js";import{ContentItem as g}from"../ContentItem/index.js";import{styled as l}from"../../styled-components.js";function J({items:e,hideFooterAndHeader:n}){const{unstable_hooks:{MiddlePanelHeader:a},routingBasePath:i}=d(b),s=d(C),o=s===c.STACKED,P=p(()=>n?null:t(h,{isStacked:o,children:t(k,{})}),[n,o]),v=p(()=>n||!u&&!a?null:t(h,{isStacked:o,children:a?t(w,{Hook:a,props:void 0}):t(u,{})}),[a,n,o]);return e.length===0?null:m(x,{children:[v,m(A,{layout:s,children:[t(M,{layout:s,children:e.filter(({type:r})=>r==="section").map(r=>t(g,{item:r,routingBasePath:i,children:t(f,{items:r.items,routingBasePath:i})},r.id))}),t(_,{isStacked:o,tabIndex:0,children:t(y,{item:e[0]})})]}),e.filter(({type:r})=>r!=="section").map(r=>t(g,{item:r,routingBasePath:i,children:t(f,{items:r.items,routingBasePath:i})},r.id)),P]})}const h=l(R)`
|
|
2
2
|
align-self: flex-start;
|
|
3
3
|
padding-top: var(--panel-gap-vertical);
|
|
4
4
|
padding-bottom: var(--panel-gap-vertical);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as l,jsx as t,jsxs as p}from"react/jsx-runtime";import{memo as d}from"react";import{LayoutVariant as f}from"@redocly/config";import{SamplesMiddlePanel as a,Row as u}from"../common/index.js";import{Markdown as h}from"../Markdown/index.js";import{ExternalDocumentation as x}from"../ExternalDocumentation/index.js";function S({item:o,layout:s}){const{externalDocs:r,ast:i,description:c}=o,e=s===f.STACKED,n=!o.parent||o.parent.type!=="tag";return p(l,{children:[t(h,{ast:i,source:c,htmlWrap:m=>t(a,{fullWidth:n,isStacked:e,children:m})}),r&&t(u,{children:t(a,{compact:!0,fullWidth:n,isStacked:e,children:t(x,{externalDocs:r})})})]})}const _=d(S);export{_ as SectionItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as a,jsx as e,jsxs as i}from"react/jsx-runtime";import{memo as l}from"react";import{SecuritySchemeItem as n}from"./SecuritySchemeItem.js";import{StyledLink as o}from"./styled.js";import{useTranslate as h}from"../../hooks/index.js";function u({flow:r}){const t=h();return i(a,{children:[e(n,{label:`${t("openapi.authorizationUrl","Authorization URL")}:`,value:r?.authorizationUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.authorizationUrl,children:r?.authorizationUrl})}),e(n,{label:`${t("openapi.tokenUrl","Token URL")}:`,value:r?.tokenUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.tokenUrl,children:r?.tokenUrl})}),e(n,{label:`${t("openapi.refreshUrl","Refresh URL")}:`,value:r?.refreshUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.refreshUrl,children:r?.refreshUrl})}),e(n,{label:`${t("openapi.deviceAuthorizationUrl","Device Authorization URL")}:`,value:r?.deviceAuthorizationUrl&&e(o,{target:"_blank",rel:"noopener noreferrer",href:r?.deviceAuthorizationUrl,children:r?.deviceAuthorizationUrl})})]})}const d=l(u);export{d as OAuthFlow};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as c
|
|
1
|
+
import{Fragment as g,jsx as o,jsxs as c}from"react/jsx-runtime";import{memo as f,useState as u}from"react";import{ChevronRightIcon as S}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{Markdown as h}from"../Markdown/index.js";import{SecuritySchemeItem as l}from"./SecuritySchemeItem.js";import{Tag as v}from"./styled.js";import{useTranslate as x}from"../../hooks/index.js";import{getOptionalScopes as y,getRequiredScopes as O}from"./helper.js";import{styled as t}from"../../styled-components.js";import{ScopeTagWithTooltip as b}from"./ScopeTagWithTooltip.js";import{RequiredScopesList as w}from"./RequiredScopesList.js";import{normalizeScopes as C}from"../../utils/security-scope.js";const j=24;function q({id:e,securities:n,flow:a,flows:r}){const i=O(e,n);return a?o(z,{flow:a,requiredScopes:i}):o(I,{children:o(w,{schemeId:e,securities:n,flows:r})})}function z({flow:e,requiredScopes:n}){const a=x(),[r,i]=u(!1),m=Object.keys(e.scopes||{}),d=C(n),p=y(d,m);return p.length===0?null:c(g,{children:[o(l,{label:c(R,{onClick:()=>{i(s=>!s)},children:[a(r?"openapi.hideOptionalScopes":"openapi.showOptionalScopes",r?"Hide optional scopes":"Show optional scopes"),o(_,{isOpen:r,children:o(S,{size:"var(--font-size-base)",color:"var(--tree-content-color-default)"})})]}),value:" "}),o(T,{isOpen:r,children:p.map(s=>o(l,{label:o(b,{className:"tag-grey",text:s,maxChars:j,TagComponent:A,compact:!0}),value:o(W,{children:o(h,{source:e.scopes[s]||""})})},s))})]})}const A=t(v)`
|
|
2
2
|
font-family: var(--font-family-base);
|
|
3
3
|
font-size: var(--font-size-base);
|
|
4
4
|
align-self: flex-start;
|
|
@@ -10,5 +10,5 @@ interface RequiredScopesListProps {
|
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
}>;
|
|
12
12
|
}
|
|
13
|
-
export declare function RequiredScopesList({ schemeId, securities, flows, TagComponent
|
|
13
|
+
export declare function RequiredScopesList({ schemeId, securities, flows, TagComponent }: RequiredScopesListProps): ReactElement | null;
|
|
14
14
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as g,jsx as r,jsxs as u}from"react/jsx-runtime";import{SecuritySchemeItem as s}from"./SecuritySchemeItem.js";import{useTranslate as f}from"../../hooks/index.js";import{getRequiredScopes as S}from"./helper.js";import{normalizeScopes as b,buildScopeDescriptionIndex as v}from"../../utils/security-scope.js";import{ScopeTagWithTooltip as x}from"./ScopeTagWithTooltip.js";import{Tag as h}from"./styled.js";import{Markdown as y}from"../Markdown/index.js";import{styled as i}from"../../styled-components.js";const T=24;function A({schemeId:n,securities:m,flows:o,TagComponent:c=q}){const p=f(),l=S(n,m),t=b(l);if(t.length===0)return null;const a=o?v(o):null,d=!!a;return u(g,{children:[r(s,{label:p("openapi.requiredScopes","Required scopes"),value:" "}),t.map(e=>r(s,{label:r(x,{className:"tag-grey",text:e,maxChars:T,TagComponent:c,compact:!0}),value:d?r(_,{children:r(y,{source:a?.get(e)||""})}):" "},e))]})}const _=i.div`
|
|
2
2
|
p {
|
|
3
3
|
margin-bottom: 0;
|
|
4
4
|
}
|
|
@@ -13,5 +13,5 @@ interface ScopeTagWithTooltipProps {
|
|
|
13
13
|
arrowPosition?: 'left' | 'right' | 'center';
|
|
14
14
|
compact?: boolean;
|
|
15
15
|
}
|
|
16
|
-
export declare function ScopeTagWithTooltip({ className, text, maxChars, tip, ariaLabel, TagComponent, arrowPosition, compact
|
|
16
|
+
export declare function ScopeTagWithTooltip({ className, text, maxChars, tip, ariaLabel, TagComponent, arrowPosition, compact }: ScopeTagWithTooltipProps): ReactElement;
|
|
17
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as p,jsx as s,jsxs as f}from"react/jsx-runtime";import{useState as C,useRef as S}from"react";import{Portal as h}from"@redocly/theme/components/Portal/Portal";import{useModalScrollLock as b}from"@redocly/theme/core/openapi";import{SecurityButton as M}from"./SecurityButton.js";import{SecurityModal as g}from"./SecurityModal.js";import{useTelemetry as j}from"../../hooks/index.js";function I({securities:t}){const[c,i]=C(!1),u=j(),e=S(null);if(b(c),!t.length)return null;const a=()=>{const o=t.flatMap(n=>n.schemes),r=[...new Set(o.map(n=>n.type))],l=o.length,m=r.length>1,y=Date.now();e.current={securityTypes:r,schemesCount:l,isCombined:m,modalOpenTime:y},u.sendViewSecurityDetailsClickedMessage([{id:"redocSecurityButton",object:"button",uri:"urn:redocly:redoc:ui:button:redocSecurityButton",securityTypes:r,schemesCount:l,isCombined:m}]),i(!0)},d=()=>{if(e.current){const o=Date.now()-e.current.modalOpenTime;u.sendViewSecurityDetailsClosedMessage([{id:"redocSecurityButtonClose",object:"button",uri:"urn:redocly:redoc:ui:button:redocSecurityButtonClose",securityTypes:e.current.securityTypes,schemesCount:e.current.schemesCount,isCombined:e.current.isCombined,timeInModalMs:o}]),e.current=null}i(!1)};return f(p,{children:[s(M,{securities:t,onClick:a}),c&&s(h,{mountId:"api-content",children:s(g,{securities:t,onClose:d})})]})}export{I as Security};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { SecurityRequirement, ExtendedOpenAPISecurityScheme } from '../../models/index.js';
|
|
3
|
-
export declare function SecurityFlow({ type, bearerFormat, name, flows, openIdConnectUrl, description, id, securities, in: apiKeyIn, deprecated, oauth2MetadataUrl
|
|
3
|
+
export declare function SecurityFlow({ type, bearerFormat, name, flows, openIdConnectUrl, description, id, securities, in: apiKeyIn, deprecated, oauth2MetadataUrl }: Partial<ExtendedOpenAPISecurityScheme> & {
|
|
4
4
|
securities: SecurityRequirement[];
|
|
5
5
|
}): ReactElement | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r
|
|
1
|
+
import{Fragment as p,jsx as e,jsxs as r}from"react/jsx-runtime";import{Badge as z}from"@redocly/theme/components/Badge/Badge";import{SecuritySchemeItem as n}from"./SecuritySchemeItem.js";import{titleize as A}from"../../utils/index.js";import{OAuthFlow as L}from"./OAuthFlow.js";import{StyledLink as v,Tag as O}from"./styled.js";import{Markdown as _}from"../Markdown/index.js";import{useTranslate as w}from"../../hooks/index.js";import{OAuthScopes as b}from"./OAuthScopes.js";import{styled as o}from"../../styled-components.js";import{RequiredScopesList as g}from"./RequiredScopesList.js";const j=["authorizationCode","clientCredentials","implicit","password","deviceAuthorization"];function k({flowType:l,flow:m,schemeId:h,securities:a}){const c=w();return r(p,{children:[e(n,{label:r(H,{className:"tag-grey",children:[e(N,{children:c("openapi.flowType","Flow type")})," ",e(P,{children:l})]}),value:e("span",{})}),r(C,{children:[e(L,{flow:m}),e(b,{id:h,securities:a,flow:m})]})]})}function V({type:l,bearerFormat:m,name:h,flows:a,openIdConnectUrl:c,description:y,id:t,securities:s,in:x,deprecated:T=!1,oauth2MetadataUrl:f}){const i=w();if(!l||!t)return null;const F={http:r(p,{children:[e(n,{label:i("openapi.httpAuthorizationScheme","HTTP Authorization Scheme"),value:l}),e(n,{label:i("openapi.bearerFormat","Bearer Format"),value:m}),e(g,{schemeId:t,securities:s,flows:a})]}),apiKey:r(p,{children:[e(n,{label:`${A(x||"")} ${i("openapi.parameterName","parameter name")}:`,value:h}),e(g,{schemeId:t,securities:s,flows:a})]}),oauth2:r(p,{children:[a&&Object.entries(a).filter(d=>{const[u,S]=d;return!!S&&j.includes(u)}).map(([d,u])=>e(k,{flowType:d,flow:u,schemeId:t,securities:s},d)),e(b,{id:t,securities:s,flows:a})]}),openIdConnect:r(p,{children:[e(n,{label:i("openapi.connectUrl","Connect URL"),value:c&&e(v,{target:"_blank",rel:"noopener noreferrer",href:c,children:c})}),e(g,{schemeId:t,securities:s,flows:a})]})};return r(W,{children:[r(I,{children:[e(R,{children:t}),T&&e(z,{deprecated:!0,children:i("openapi.badges.deprecated","Deprecated")})]}),e(_,{source:y}),f&&e(n,{label:i("openapi.oauth2MetadataUrl","OAuth2 Metadata URL"),value:e(v,{target:"_blank",rel:"noopener noreferrer",href:f,children:f})}),e(B,{children:F[l]||null})]})}const I=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: var(--spacing-xxs);
|
|
@@ -16,7 +16,7 @@ import{breakpoints as e}from"@redocly/theme/core/openapi";import{Button as t}fro
|
|
|
16
16
|
max-width: 280px;
|
|
17
17
|
}
|
|
18
18
|
`,h=o(r)`
|
|
19
|
-
|
|
19
|
+
&:hover {
|
|
20
20
|
background-color: var(--dropdown-menu-item-bg-color-hover);
|
|
21
21
|
}
|
|
22
22
|
`;export{c as Path,d as PathWrapper,h as StyledCopyButton,m as StyledDropdownMenuItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as n,jsx as o}from"react/jsx-runtime";import{useAtom as i}from"jotai";import{LayoutVariant as a}from"@redocly/config";import{SidebarActions as c}from"@redocly/theme/components/SidebarActions/SidebarActions";import{collapsedSidebarAtom as m,layoutAtom as p}from"../../jotai/app.js";import{styled as d}from"../../styled-components.js";const y=()=>{const[r,e]=i(p),[t,s]=i(m);return o(n,{children:o(l,{children:o(c,{layout:r,onChangeViewClick:()=>e(r===a.STACKED?a.THREE_PANEL:a.STACKED),collapsedSidebar:t,onChangeCollapseSidebarClick:()=>s(!t),isApiDocs:!0})})})},l=d.div`
|
|
2
2
|
position: sticky;
|
|
3
3
|
top: calc(100vh);
|
|
4
4
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as l,jsx as n,jsxs as f}from"react/jsx-runtime";import{memo as b,useEffect as h,useRef as u,useState as x}from"react";import{useAtom as y}from"jotai";import{useLocation as S}from"react-router-dom";import{useMount as v,breakpoints as k}from"@redocly/theme/core/openapi";import{isSidebarOpenedAtom as $}from"../../jotai/app.js";import{SidebarActions as g}from"./SidebarActions.js";import{styled as w}from"../../styled-components.js";const j=w.div`
|
|
2
2
|
overflow: hidden;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
backface-visibility: hidden;
|
|
@@ -21,4 +21,4 @@ import{jsx as n,jsxs as l,Fragment as f}from"react/jsx-runtime";import{memo as b
|
|
|
21
21
|
@media print {
|
|
22
22
|
display: none;
|
|
23
23
|
}
|
|
24
|
-
`;function O({scrollYOffset:e,className:a,children:d,collapsedSidebar:i}){const[t,p]=x("0px"),m=u(null),o=S(),[s,r]=y($);return h(()=>{o.hash&&r(!1)},[o.pathname,o.hash,r]),v(()=>{const c=e();p(`${c}px`)}),n(
|
|
24
|
+
`;function O({scrollYOffset:e,className:a,children:d,collapsedSidebar:i}){const[t,p]=x("0px"),m=u(null),o=S(),[s,r]=y($);return h(()=>{o.hash&&r(!1)},[o.pathname,o.hash,r]),v(()=>{const c=e();p(`${c}px`)}),n(l,{children:f(j,{open:!!s,className:a,offsetTop:t,style:{top:t},ref:m,collapsedSidebar:i,children:[i||s?d:null,n(g,{})]})})}const C=b(O);export{C as StickyResponsiveSidebar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as p,jsx as n,jsxs as h}from"react/jsx-runtime";import w,{useRef as x,useState as L,useMemo as b,useCallback as B,useLayoutEffect as k}from"react";import{Dropdown as E}from"@redocly/theme/components/Dropdown/Dropdown";import{DropdownMenu as M}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as C}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Tooltip as T}from"@redocly/theme/components/Tooltip/Tooltip";import{trimText as y}from"@redocly/theme/core/openapi";import{styled as s}from"../../styled-components.js";import{calculateMaxLength as D}from"../../utils/calculateMaxLength.js";const R=25,_=3,u=({breadcrumb:e,onClick:t,maxLength:r})=>{const o=e.name.length>r,i=y(e.name,r);return n(T,{tip:e.name,placement:"bottom",disabled:!o,children:n(v,{onClick:()=>t(e.href),children:i})})},z=({breadcrumbs:e,onClick:t,maxLength:r})=>{const o=e[0],i=e[e.length-1],d=e.slice(1,-1);return h(p,{children:[n(u,{breadcrumb:o,onClick:t,maxLength:r}),n(g,{children:"/"}),n(E,{trigger:n(O,{children:"..."}),closeOnClick:!0,alignment:"end",children:n(M,{children:d.map(a=>n(C,{onAction:()=>t(a.href),children:a.name},a.href))})}),n(g,{children:"/"}),n(u,{breadcrumb:i,onClick:t,maxLength:r})]})},F=({breadcrumbs:e,onClick:t,maxLength:r})=>n(p,{children:e.map((o,i)=>h(w.Fragment,{children:[n(u,{breadcrumb:o,onClick:t,maxLength:r}),i!==e.length-1&&n(g,{children:"/"})]},o.href))});function q({breadcrumbs:e,onClick:t}){const r=x(null),o=x(null),[i,d]=L(R),a=e.length>_,f=b(()=>a?[e[0],e[e.length-1]]:e,[e,a]),m=B(()=>{if(!r.current?.parentElement||!o.current)return;const c=r.current.parentElement.clientWidth,l=D(f,c,a,o.current);d(l)},[f,a]);return k(()=>{m();const c=new ResizeObserver(m),l=r.current?.parentElement;return l&&c.observe(l),()=>{c.disconnect()}},[m]),e.length?h(p,{children:[n(j,{ref:o,"aria-hidden":"true"}),n(A,{ref:r,"data-component-name":"TagItem/Breadcrumbs",children:a?n(z,{breadcrumbs:e,onClick:t,maxLength:i}):n(F,{breadcrumbs:e,onClick:t,maxLength:i})})]}):null}const j=s.span`
|
|
2
2
|
position: absolute;
|
|
3
3
|
visibility: hidden;
|
|
4
4
|
white-space: nowrap;
|
|
@@ -6,6 +6,6 @@ type OperationNavigationItemsProps = OperationsNavigationProps & {
|
|
|
6
6
|
translate: TFunction;
|
|
7
7
|
disableTooltip?: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare function OperationNavigationItemsComponent({ title, items, onClick, routingBasePath, translate, disableTooltip
|
|
9
|
+
declare function OperationNavigationItemsComponent({ title, items, onClick, routingBasePath, translate, disableTooltip }: OperationNavigationItemsProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare const OperationNavigationItems: import("react").MemoExoticComponent<typeof OperationNavigationItemsComponent>;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as r,jsxs as s
|
|
1
|
+
import{Fragment as x,jsx as r,jsxs as s}from"react/jsx-runtime";import{memo as y}from"react";import{GenericIcon as w}from"@redocly/theme/icons/GenericIcon/GenericIcon";import{DirectionRightIcon as I}from"@redocly/theme/icons/DirectionRightIcon/DirectionRightIcon";import{getOperationColor as j}from"@redocly/theme/core/openapi";import{Tooltip as k}from"@redocly/theme/components/Tooltip/Tooltip";import{joinWithSeparator as z}from"../../services/index.js";import{encodeBackSlashes as O}from"../../utils/index.js";import{HttpVerb as V,NavigationBadge as d}from"../common/index.js";import{styled as o}from"../../styled-components.js";import{StyledButton as B}from"./styled.js";function C({verb:e,deprecated:t,isAdditionalOperation:n}){const i=j({httpVerb:e,deprecated:t,isAdditionalOperation:n});return r(V,{color:i,children:e})}function H(e){if(e.type==="tag")return r(F,{children:r(I,{size:"12px"})});const t=e.type==="operation"?e.httpVerb:e.type;return C({verb:t,deprecated:e.deprecated,isAdditionalOperation:e.isAdditionalOperation})}function N(e){return e.type==="operation"?e.path:e.name}function S({title:e,items:t,onClick:n,routingBasePath:i,translate:l,disableTooltip:h}){return s(x,{children:[e&&r(_,{children:e}),t.map(a=>{const{id:g,href:f,name:m,deprecated:v,badges:b}=a;return r(k,{tip:m,placement:"left",disabled:h,children:r(A,{variant:"outlined",size:"large",onClick:()=>n(z(i,O(f))),children:s("span",{children:[H(a),r(D,{children:N(a)}),v&&r(d,{deprecated:!0,children:l("openapi.badges.deprecated","Deprecated")}),b?.map(({name:p,color:u,icon:c})=>r(d,{color:u,icon:c&&r(w,{icon:c}),children:p},p))]})})},g)})]})}const Q=y(S),_=o.span`
|
|
2
2
|
font-size: var(--font-size-base);
|
|
3
3
|
line-height: var(--line-height-base);
|
|
4
4
|
font-weight: var(--font-weight-bold);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { OperationsNavigationProps } from './types.js';
|
|
2
|
-
export declare function OperationsNavigationComponent({ items, routingBasePath
|
|
2
|
+
export declare function OperationsNavigationComponent({ items, routingBasePath }: OperationsNavigationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
3
3
|
export declare const OperationsNavigation: import("react").NamedExoticComponent<OperationsNavigationProps>;
|
|
@@ -4,6 +4,6 @@ interface TagItemProps extends SectionItemProps {
|
|
|
4
4
|
routingBasePath?: string;
|
|
5
5
|
isExpanded: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function TagItemComponent({ item, routingBasePath, isExpanded
|
|
7
|
+
export declare function TagItemComponent({ item, routingBasePath, isExpanded }: TagItemProps): ReactElement;
|
|
8
8
|
export declare const TagItem: import("react").NamedExoticComponent<TagItemProps>;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as l,jsx as o,jsxs as s}from"react/jsx-runtime";import{css as d}from"styled-components";import{memo as w,useEffect as $,useState as j}from"react";import{isUndefined as C}from"@redocly/theme/core/openapi";import{cycleColorsByLevel as N}from"../PropertyDetails/cycleColorsByLevel.js";import{CircleIcon as S}from"../PropertyDetails/PlusCircleIcon.js";import{LabelValue as V}from"../common/styled.js";import{styled as c}from"../../styled-components.js";function _({expandByDefault:e,level:g,expandable:h=!1,expandText:v,hideText:x,hideDivider:y=!1,children:i,expandedAll:t,isNestedArray:n}){const[r,p]=j((e||n)??!1);$(()=>{C(t)||p(t)},[t]);const a=r?N(g):void 0;if(!h)return i;const b=()=>{p(u=>!u)};return n?s(l,{children:[o(V,{children:"Array ["}),o(f,{$isArrayInsideArray:n,className:"view-nested-wrapper",children:o(m,{color:a,children:i})})]}):o(l,{children:s(f,{$divider:!y&&!r,className:"view-nested-wrapper",children:[s(k,{onClick:b,children:[o(S,{sign:r?"-":"+",color:a}),!r&&v,r&&(x||"")]}),r&&o(m,{color:a,children:i})]})})}const U=w(_),k=c.button`
|
|
2
2
|
background: none;
|
|
3
3
|
border: none;
|
|
4
4
|
cursor: pointer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Fragment as i,jsx as a,jsxs as m}from"react/jsx-runtime";import{memo as p}from"react";import{css as c}from"styled-components";import{Tag as g}from"@redocly/theme/components/Tag/Tag";import{GenericIcon as l}from"@redocly/theme/icons/GenericIcon/GenericIcon";import{Tooltip as f}from"@redocly/theme/components/Tooltip/Tooltip";import{styled as s}from"../../styled-components.js";import{splitBadgesByPosition as x}from"../../utils/index.js";function n({name:r,color:e,description:o,icon:t}){return a(f,{tip:o,placement:"top",disabled:!o,children:a(d,{color:e,icon:t&&a(l,{icon:t}),children:r})},r)}function b({badges:r,children:e}){if(!r)return a(i,{children:e});const{before:o,after:t}=x(r);return m(i,{children:[o.map(n),e,t.map(n)]})}const _=p(b),d=s(g)`
|
|
2
2
|
margin: 0;
|
|
3
3
|
${({deprecated:r})=>r&&c`
|
|
4
4
|
color: var(--badge-deprecated-text-color);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n
|
|
1
|
+
import{Fragment as x,jsx as e,jsxs as n}from"react/jsx-runtime";import{memo as u}from"react";import{useAtom as b}from"jotai";import{LinkIcon as w}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{Dropdown as M}from"../Dropdown/index.js";import{RequiredLabel as T}from"../Fields/index.js";import{ConstraintsView as j}from"../ConstraintsView.js";import{Schema as k}from"../../Schema/index.js";import{getActiveMediaType as C}from"../../../models/index.js";import{Markdown as z}from"../../Markdown/index.js";import{activeMimeNameAtom as A}from"../../../jotai/app.js";import{LinkToField as q}from"../LinkToField.js";import{useTranslate as B}from"../../../hooks/index.js";import{styled as s}from"../../../styled-components.js";function F({required:m,skipReadOnly:p,skipWriteOnly:l,description:c,content:t,deepLink:r}){const a=B(),[g,f]=b(A);if(!t)return null;const{schema:i,examples:d,operation:h,name:v}=C(t,g),y=t.mediaTypes.map(({name:o})=>({label:o,value:o}));return n(x,{children:[n(O,{children:[r&&e(q,{to:r}),a("openapi.body","Body"),e(M,{options:y,value:v,triggerVariant:"ghost",triggerSize:"large",onChange:({value:o})=>f(o)})]}),m&&e(T,{children:a("openapi.badges.required","required")}),e(N,{source:c}),i?.type==="object"&&i?.constraints&&e(j,{constraints:i?.constraints||[]}),e(k,{skipReadOnly:p,skipWriteOnly:l,schema:i,examples:d,operation:h,level:1,disableDeepLinks:!r},"schema")]})}const P=u(F),N=s(z)`
|
|
2
2
|
margin: var(--spacing-xxs) 0 0;
|
|
3
3
|
`,O=s.span`
|
|
4
4
|
position: relative;
|
|
@@ -12,7 +12,7 @@ import{jsx as e,jsxs as n,Fragment as x}from"react/jsx-runtime";import{memo as u
|
|
|
12
12
|
line-height: var(--line-height-lg);
|
|
13
13
|
padding: var(--spacing-xxs) 0;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
&:hover {
|
|
16
16
|
${w} {
|
|
17
17
|
opacity: 1;
|
|
18
18
|
visibility: visible;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as n,jsxs as s}from"react/jsx-runtime";import{memo as t}from"react";import{Tag as i}from"./Fields/index.js";import{styled as m}from"../../styled-components.js";function e({constraints:r}){return r.length===0?null:n(p,{children:r.map(o=>s(i,{children:[" ",o," "]},o))})}const c=t(e),p=m.div`
|
|
2
2
|
margin-top: var(--spacing-xxs);
|
|
3
3
|
`;export{c as ConstraintsView};
|
|
@@ -8,6 +8,6 @@ export interface DropdownProps<T> {
|
|
|
8
8
|
triggerSize?: string;
|
|
9
9
|
fullWidth?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare function DropdownComponent<T>({ options, value, onChange, className, triggerVariant, triggerSize, fullWidth
|
|
11
|
+
declare function DropdownComponent<T>({ options, value, onChange, className, triggerVariant, triggerSize, fullWidth }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare const Dropdown: typeof DropdownComponent;
|
|
13
13
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as r,jsxs as d
|
|
1
|
+
import{Fragment as u,jsx as r,jsxs as d}from"react/jsx-runtime";import v,{useMemo as C,useState as I}from"react";import{Dropdown as j}from"@redocly/theme/components/Dropdown/Dropdown";import{CheckmarkIcon as M}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{DropdownMenu as z}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as T}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Button as $}from"@redocly/theme/components/Button/Button";import{SearchIcon as A}from"@redocly/theme/icons/SearchIcon/SearchIcon";import{typedMemo as F}from"@redocly/theme/core/openapi";import{styled as o}from"../../../styled-components.js";import{useTranslate as L}from"../../../hooks/index.js";const R=7;function _({options:n,value:t,onChange:p,className:x,triggerVariant:b="outlined",triggerSize:y="small",fullWidth:l=!1}){const[c,m]=I(""),g=L(),a=n.find(e=>e.value===t),S=n.length>=R,f=C(()=>n.filter(e=>e.label?.toLowerCase().includes(c.toLowerCase())??!1),[n,c]);if(n.length===1)return r(U,{children:a?.element||a?.label});const k=e=>{m(e.target.value)},D=()=>S?d(u,{children:[r(O,{prefix:r(V,{children:r(A,{color:"var(--icon-color-additional)",onClick:e=>e.stopPropagation()})}),content:r(W,{placeholder:g("openapi.discriminator.searchPlaceholder","Search items"),onClick:e=>e.stopPropagation(),onChange:k,value:c})}),r(B,{children:f.length?f.map((e,s)=>d(v.Fragment,{children:[e.divider,r(i,{active:e.value===t,onAction:()=>p(e),suffix:e.value===t&&r(w,{}),children:r(h,{children:e.element||e.label})},e.label)]},s)):r(P,{content:g("openapi.discriminator.searchNoResults","No items found")})})]}):r(u,{children:n.map((e,s)=>d(v.Fragment,{children:[e.divider,r(i,{active:e.value===t,onAction:()=>p(e),suffix:e.value===t&&r(w,{}),children:r(h,{children:e.element||e.label})},e.label)]},s))});return r(N,{className:x,$fullWidth:l,trigger:r(E,{variant:b,size:y,type:"button",$fullWidth:l,children:r(h,{children:a?.element||a?.label})}),withArrow:!0,onClose:()=>m(""),children:r(H,{$fullWidth:l,children:D()})})}const oe=F(_),N=o(j)`
|
|
2
2
|
${({$fullWidth:n})=>n&&`
|
|
3
3
|
> div {
|
|
4
4
|
min-width: 100%;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as t,jsxs as n}from"react/jsx-runtime";import{memo as i}from"react";import{useAtomValue as m}from"jotai";import{Markdown as p}from"@redocly/theme/components/Markdown/Markdown";import{ExtensionValue as e,FieldLabel as l}from"./index.js";import{globalOptionsAtom as a}from"../../jotai/store.js";import{styled as f}from"../../styled-components.js";const c=f(p)`
|
|
2
2
|
margin: 2px 0;
|
|
3
|
-
`;function d({extensions:r}){const{showExtensions:s}=m(a);return s?
|
|
3
|
+
`;function d({extensions:r}){const{showExtensions:s}=m(a);return s?t("div",{children:Object.keys(r).map(o=>n(c,{children:[n(l,{children:[o.substring(2),": "]})," ",t(e,{children:typeof r[o]=="string"?r[o]:JSON.stringify(r[o])})]},o))}):null}const w=i(d);export{w as Extensions};
|
|
@@ -10,7 +10,7 @@ import{LinkIcon as e}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{H2 as t
|
|
|
10
10
|
justify-content: space-between;
|
|
11
11
|
position: relative;
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
&:hover {
|
|
14
14
|
${e} {
|
|
15
15
|
opacity: 1;
|
|
16
16
|
visibility: visible;
|
|
@@ -26,7 +26,7 @@ import{LinkIcon as e}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{H2 as t
|
|
|
26
26
|
word-break: break-word;
|
|
27
27
|
margin: 0;
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
&:hover {
|
|
30
30
|
${e} {
|
|
31
31
|
opacity: 1;
|
|
32
32
|
visibility: visible;
|
|
@@ -7,6 +7,6 @@ interface SchemaSelectionProps {
|
|
|
7
7
|
schema: SchemaModel;
|
|
8
8
|
defaultOneOfIdx: number;
|
|
9
9
|
}
|
|
10
|
-
declare function SchemaSelectionComponent({ options, onChange, pointer, schema, defaultOneOfIdx
|
|
10
|
+
declare function SchemaSelectionComponent({ options, onChange, pointer, schema, defaultOneOfIdx }: SchemaSelectionProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
11
|
export declare const SchemaSelection: typeof SchemaSelectionComponent;
|
|
12
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const deprecatedCss: import("styled-components").
|
|
1
|
+
export declare const deprecatedCss: import("styled-components").RuleSet<object>;
|
package/lib/empty.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
declare const _default: {
|
|
2
|
+
isatty: () => void;
|
|
3
|
+
createRequire: () => void;
|
|
4
|
+
};
|
|
5
5
|
export default _default;
|
package/lib/jotai/app.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ type LanguageAtom = {
|
|
|
26
26
|
})[];
|
|
27
27
|
activeLanguage: string;
|
|
28
28
|
};
|
|
29
|
-
export declare const appStore: import("jotai").WritableAtom<AppStore, [
|
|
29
|
+
export declare const appStore: import("jotai").WritableAtom<AppStore, [typeof import("jotai/utils").RESET | AppStore | ((prev: AppStore) => typeof import("jotai/utils").RESET | AppStore)], void>;
|
|
30
30
|
export declare const appStoreOverrideAtom: import("jotai").PrimitiveAtom<Partial<AppStore> | undefined> & {
|
|
31
31
|
init: Partial<AppStore> | undefined;
|
|
32
32
|
};
|
|
@@ -43,7 +43,7 @@ export declare const allowedEnvironmentsAtom: import("jotai").WritableAtom<strin
|
|
|
43
43
|
/**
|
|
44
44
|
* appSessionStore saved to session storage
|
|
45
45
|
*/
|
|
46
|
-
export declare const appSessionStore: import("jotai").WritableAtom<AppSessionStore, [
|
|
46
|
+
export declare const appSessionStore: import("jotai").WritableAtom<AppSessionStore, [typeof import("jotai/utils").RESET | AppSessionStore | ((prev: AppSessionStore) => typeof import("jotai/utils").RESET | AppSessionStore)], void>;
|
|
47
47
|
export declare const collapsedSidebarAtom: import("jotai").WritableAtom<boolean, boolean[], void>;
|
|
48
48
|
export declare function getLangKey({ lang, label }: {
|
|
49
49
|
lang: string;
|
package/lib/jotai/operation.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare function getDefaultOperationStore(pointer: string, requestValues?
|
|
|
19
19
|
}, activeExampleName?: string): {
|
|
20
20
|
activeExampleName: string | undefined;
|
|
21
21
|
activeOneOf: {
|
|
22
|
-
[
|
|
22
|
+
[x: string]: number;
|
|
23
23
|
};
|
|
24
24
|
requestValues: {
|
|
25
25
|
[field: string]: any;
|
|
@@ -3,5 +3,5 @@ import type { MediaContentModel, MediaContentModelInput } from './types.js';
|
|
|
3
3
|
* MediaContent model ready to be sued by React components
|
|
4
4
|
* Contains multiple MediaTypes and keeps track of the currently active one
|
|
5
5
|
*/
|
|
6
|
-
export declare function getMediaContent({ parser, info, isRequestType, options, data: { operation, type, response, absolutePointer }
|
|
6
|
+
export declare function getMediaContent({ parser, info, isRequestType, options, data: { operation, type, response, absolutePointer } }: MediaContentModelInput): MediaContentModel;
|
|
7
7
|
export declare function getActiveMediaType(content: MediaContentModel, activeMimeName?: string): import("./types.js").MediaTypeModel;
|
|
@@ -11,7 +11,7 @@ import type { MediaTypeModel, ResponseModel, OperationModel } from './types.js';
|
|
|
11
11
|
* @param type
|
|
12
12
|
* @param response
|
|
13
13
|
*/
|
|
14
|
-
export declare function getMediaType(parser: OpenAPIParser, name: string, isRequestType: boolean, info: OpenAPIMediaType, options: Options, { operation, type, response, absolutePointer
|
|
14
|
+
export declare function getMediaType(parser: OpenAPIParser, name: string, isRequestType: boolean, info: OpenAPIMediaType, options: Options, { operation, type, response, absolutePointer }: {
|
|
15
15
|
operation: OperationModel;
|
|
16
16
|
type?: 'request' | 'response';
|
|
17
17
|
response?: ResponseModel;
|
package/lib/models/request.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ type GetRequestBodyInput = {
|
|
|
8
8
|
isEvent?: boolean;
|
|
9
9
|
operation: OperationModel;
|
|
10
10
|
};
|
|
11
|
-
export declare function getRequestBody({ parser, infoOrRef, options, isEvent, operation
|
|
11
|
+
export declare function getRequestBody({ parser, infoOrRef, options, isEvent, operation }: GetRequestBodyInput): RequestBodyModel;
|
|
12
12
|
export {};
|
package/lib/models/response.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ type ResponseProps = {
|
|
|
10
10
|
operation: OperationModel;
|
|
11
11
|
isEvent?: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare function getResponse({ parser, code, defaultAsError, infoOrRef, options, isEvent, operation
|
|
13
|
+
export declare function getResponse({ parser, code, defaultAsError, infoOrRef, options, isEvent, operation }: ResponseProps): ResponseModel;
|
|
14
14
|
export {};
|
package/lib/models/schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OpenAPISchema, Referenced } from '../types/index.js';
|
|
2
2
|
import type { OpenAPIParser, Options } from '../services/index.js';
|
|
3
3
|
import type { Deps, SchemaModel } from './types.js';
|
|
4
|
-
export declare function getSchema({ parser, schemaOrRef, pointer, options, isChild, isDefaultMapping, baseRefsStack, deps, absolutePointer
|
|
4
|
+
export declare function getSchema({ parser, schemaOrRef, pointer, options, isChild, isDefaultMapping, baseRefsStack, deps, absolutePointer }: {
|
|
5
5
|
parser: OpenAPIParser;
|
|
6
6
|
schemaOrRef: Referenced<OpenAPISchema>;
|
|
7
7
|
pointer: string;
|
package/lib/models/security.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import type { OpenAPIParser } from '../services/index.js';
|
|
|
3
3
|
import type { SecurityRequirement, SecurityScheme } from './types.js';
|
|
4
4
|
export declare function getSecurity(requirements: OpenAPISecurityRequirement[] | undefined, parser: OpenAPIParser): SecurityRequirement[];
|
|
5
5
|
export declare function getSecurityScheme(parser: Partial<OpenAPIParser>, id: string, scheme: Referenced<OpenAPISecurityScheme>): SecurityScheme;
|
|
6
|
-
export declare function getSecuritySchemes({ parser
|
|
6
|
+
export declare function getSecuritySchemes({ parser }: {
|
|
7
7
|
parser: Partial<OpenAPIParser>;
|
|
8
8
|
}): Array<SecurityScheme>;
|
|
@@ -18,7 +18,7 @@ export type CustomHAR = HAR.Request & {
|
|
|
18
18
|
};
|
|
19
19
|
export declare function safeSample(schema: JSONSchema7, options: Sampler.Options, document: object): any;
|
|
20
20
|
export declare function objectToHarParams(obj: GenericObject, parentKey?: string): HAR.Param[];
|
|
21
|
-
export declare function getCodeSample({ lang, operation, exampleName, pathParams, properties, options, environment, translate
|
|
21
|
+
export declare function getCodeSample({ lang, operation, exampleName, pathParams, properties, options, environment, translate }: {
|
|
22
22
|
lang: Languages;
|
|
23
23
|
operation: OperationModel;
|
|
24
24
|
exampleName?: string;
|
|
@@ -25,7 +25,7 @@ export declare class CodeBuilder {
|
|
|
25
25
|
urlFieldName: string;
|
|
26
26
|
rawName: boolean;
|
|
27
27
|
};
|
|
28
|
-
constructor({ indentation, lineJoin, variablesPrefix, capitalize, lang
|
|
28
|
+
constructor({ indentation, lineJoin, variablesPrefix, capitalize, lang }: {
|
|
29
29
|
indentation: string;
|
|
30
30
|
lineJoin?: string;
|
|
31
31
|
variablesPrefix?: string;
|