@redocly/openapi-docs 3.12.0-next.6 → 3.12.0-next.8
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 +7554 -7554
- package/lib/components/ApiInfo/ApiInfo.d.ts +1 -1
- package/lib/components/ApiInfo/ApiInfo.js +1 -1
- package/lib/components/ApiInfo/Metadata.d.ts +1 -1
- package/lib/components/ApiInfo/Metadata.js +1 -1
- package/lib/components/ApiInfo/styled.js +6 -6
- package/lib/components/CallbackSamples/CallbackSamples.d.ts +1 -1
- package/lib/components/CallbackSamples/CallbackSamples.js +1 -1
- package/lib/components/Callbacks/CallbackDetails.d.ts +1 -1
- package/lib/components/Callbacks/CallbackDetails.js +1 -1
- package/lib/components/Callbacks/CallbackSummary.d.ts +2 -1
- package/lib/components/Callbacks/CallbackSummary.js +2 -2
- package/lib/components/Callbacks/styled.js +1 -1
- package/lib/components/Content/useAutoScroll.js +1 -1
- package/lib/components/ContentItem/useIsExpanded.js +1 -1
- package/lib/components/ContentItems/VirtualList.js +1 -1
- package/lib/components/ContentItems/useScrollOnRender.js +1 -1
- package/lib/components/Discriminator/Discriminator.d.ts +1 -1
- package/lib/components/Download/DownloadSpecification.js +2 -2
- package/lib/components/ExpandAllButton/ExpandAllButton.js +2 -2
- package/lib/components/ExternalDocumentation/ExternalDocumentation.js +1 -1
- package/lib/components/Language/LanguageDropdown.js +1 -1
- package/lib/components/Language/LanguageItem.js +1 -1
- package/lib/components/Language/LanguageList.js +1 -1
- package/lib/components/Language/styled.js +9 -9
- package/lib/components/Markdown/Markdown.js +1 -1
- package/lib/components/OperationItem/OperationItem.js +3 -3
- package/lib/components/Overview/Overview.d.ts +1 -1
- package/lib/components/Overview/Overview.js +1 -1
- package/lib/components/PageFooter/PageFooter.js +1 -1
- package/lib/components/Panel/ResponsePanel.js +1 -1
- package/lib/components/PanelItem/styled.js +1 -1
- package/lib/components/PayloadSamples/ExampleValue.js +1 -1
- package/lib/components/PayloadSamples/styled.js +1 -1
- package/lib/components/PropertyDetails/Extensions.js +1 -1
- package/lib/components/PropertyDetails/FieldDetails.js +1 -1
- package/lib/components/PropertyDetails/styled.js +1 -1
- package/lib/components/PropertyDetails/types.d.ts +1 -1
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/types.d.ts +2 -2
- package/lib/components/Replay/EmbeddedReplay.js +2 -2
- package/lib/components/Replay/Replay.js +1 -1
- package/lib/components/Replay/utils.d.ts +1 -1
- package/lib/components/Replay/utils.js +1 -1
- package/lib/components/Request/types.d.ts +1 -1
- package/lib/components/RequestParameters/ParametersGroup.js +1 -1
- package/lib/components/RequestSamples/CodeSample.js +1 -1
- package/lib/components/RequestSamples/RequestSamples.js +1 -1
- package/lib/components/ResponseSamples/Summary.js +1 -1
- package/lib/components/RightPanel/RightPanel.js +1 -1
- package/lib/components/Schema/helpers.js +1 -1
- package/lib/components/SchemaDefinition/SchemaDefinition.js +1 -1
- package/lib/components/SectionContent/SectionContent.js +5 -5
- package/lib/components/SectionItem/SectionItem.d.ts +1 -1
- package/lib/components/SectionItem/SectionItem.js +1 -1
- package/lib/components/Security/OAuthScopes.js +1 -1
- package/lib/components/Security/Security.js +1 -1
- package/lib/components/Security/SecurityButton.js +2 -2
- package/lib/components/Security/SecurityModal.js +5 -5
- package/lib/components/ServerList/ServerList.js +1 -1
- package/lib/components/ServerList/types.d.ts +1 -1
- package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib/components/ServerListDropdown/styled.js +6 -6
- package/lib/components/SideMenu/SideMenu.js +1 -1
- package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
- package/lib/components/StickySidebar/SidebarActions.js +2 -2
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +3 -3
- package/lib/components/Tabs/Tabs.js +1 -1
- package/lib/components/Tabs/useTabsState.js +1 -1
- package/lib/components/TagItem/OperationNavigationItems.d.ts +1 -1
- package/lib/components/TagItem/OperationsNavigation.js +1 -1
- package/lib/components/TagItem/TagItem.js +7 -7
- package/lib/components/TagItem/styled.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 +1 -1
- package/lib/components/common/CodeBlockPanel.js +3 -3
- package/lib/components/common/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/common/Dropdown/Dropdown.js +4 -4
- package/lib/components/common/ExpandableExample/ExpandableExample.js +1 -1
- package/lib/components/common/Extensions.js +1 -1
- package/lib/components/common/Fields/fields-layout.js +1 -1
- package/lib/components/common/Fields/fields.js +1 -1
- package/lib/components/common/LinkToField.js +1 -1
- package/lib/components/common/OperationItemTitle.js +3 -3
- package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +1 -1
- package/lib/components/common/SchemaSelection/SchemaSelection.js +1 -1
- package/lib/components/common/Select/styled.js +1 -1
- package/lib/components/common/Skeleton/Skeleton.js +1 -1
- package/lib/components/common/linkify.js +1 -1
- package/lib/components/common/panels.js +5 -5
- package/lib/components/common/styled.js +1 -1
- package/lib/hoc/types.d.ts +1 -1
- package/lib/hoc/withRouter.js +1 -1
- package/lib/hooks/usePerformanceMetrics.js +1 -1
- package/lib/hooks/useTelemetry.d.ts +1 -1
- package/lib/hooks/useTelemetry.js +1 -1
- package/lib/hooks/useTranslate.d.ts +1 -1
- package/lib/hooks/useTranslate.js +1 -1
- package/lib/jotai/app.d.ts +2 -2
- package/lib/jotai/app.js +1 -1
- package/lib/models/callback.d.ts +1 -1
- package/lib/models/operation.d.ts +1 -1
- package/lib/models/operation.js +1 -1
- package/lib/models/schema.js +1 -1
- package/lib/services/OpenAPIParser.js +1 -1
- package/lib/services/code-samples/generator.d.ts +1 -1
- package/lib/services/code-samples/generator.js +1 -1
- package/lib/services/code-samples/httpsnippet/index.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +1 -1
- package/lib/services/config-options/normalizeOptions.js +1 -1
- package/lib/services/config-options/types.d.ts +1 -1
- package/lib/services/menu/markdown.js +1 -1
- package/lib/services/utils.js +1 -1
- package/lib/types/open-api.d.ts +3 -1
- package/lib/utils/configure-helpers.d.ts +1 -1
- package/lib/utils/configure-helpers.js +1 -1
- package/lib/utils/helpers.js +2 -2
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -1
- package/lib/utils/loadAndBundleSpec.js +1 -1
- package/lib/utils/local-storage.js +1 -1
- package/lib/utils/openapi.js +1 -1
- package/lib/utils/saveTextBeforeHeading.js +1 -1
- package/lib/utils/security-details.js +1 -1
- package/lib/utils/session-storage.js +1 -1
- package/lib/utils/telemetry.d.ts +1 -0
- package/lib/utils/telemetry.js +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isPrimitive as x}from"@redocly/theme";import{getOperation as h}from"../../models/index.js";import{normalizeOptions as v,OpenAPIParser as b}from"../../services/index.js";import{JsonPointer as E}from"../../utils/index.js";function O(t,a,n,r,e,c){if(!n)return;const i=new b(n),s=i.definition.paths?.[t],d=s?.[a],m=h(i,{...d,pathName:t,httpVerb:a,pathParameters:s.parameters||[],pathServers:s.servers||[]},void 0,v({}),"",{isCallback:!1},r);if(!m)return;const f=c?.activeMimeName||"application/json";return{id:m.id,name:m.name,method:m.httpVerb,operationId:m.operationId,parameters:N(m.parameters,e?.requestValues),body:w(m.requestBody,n,e?.requestValues?.body?{activeExampleName:e?.activeExampleName,[f]:e?.requestValues?.body}:e?.activeExampleName?{activeExampleName:e?.activeExampleName}:void 0),path:m.path,href:m.href,servers:m.servers,security:y(m.security),responses:Object.fromEntries(m.responses.map(u=>[u.code,{code:u.code,description:u.description,mediaTypes:u.content?.mediaTypes.reduce((l,o)=>(l[o.name]={name:o.name,schema:p(o.schema?.rawSchema,n)},l),{})}]))}}function P(t){return function(a,n,r){const e=O(a,n,r,t);if(e)return{...e,operationId:e.operationId||E.compile(["paths",e.path,e.method])}}}function N(t,a){const n=new Set,r=t.map(e=>(n.add(e.in+":"+e.name),{name:e.name,in:e.in,required:e.required,description:e.description,example:a?.[String(e.in)]?.[e.name]||e.example,schema:e.schema}));for(const[e,c]of Object.entries(a||{}))for(const[i,s]of Object.entries(c||{}))n.has(e+":"+i)||r.push({name:i,in:e,required:!1,description:"",example:String(s),schema:void 0});return r}function V({type:t,format:a,enum:n}){return t==="string"&&(a==="binary"||a==="base64")?"file":t==="object"?"multiline":n.length>0?"select":"text"}function g(t,a){const n=t[0]?.example||t[0]?.examples;if(n)return n;if(t.schema?.example)return t.schema.example;const r=a?.default?.value||a?.default?.rawValue;return r?.[t.name]?x(r?.[t.name])?String(r?.[t.name]):JSON.stringify(r?.[t.name]):""}function w(t,a,n){if(!t||!t.content?.mediaTypes){if(!n)return;const{activeExampleName:r,...e}=n;return{activeExampleName:r,mediaTypes:Object.fromEntries(Object.entries(e).map(([c,i])=>[c,{name:c,examples:{default:{value:i}},schema:{},parameters:[]}]))}}return{required:t.required,activeExampleName:n?.activeExampleName,mediaTypes:t.content.mediaTypes.reduce((r,e)=>{const c=e.schema,i=n?.[e.name]?{default:{value:n?.[e.name],rawValue:n?.[e.name],mime:e.name}}:e.examples||e.formExamples;return r[e.name]={name:e.name,examples:i,schema:p(e.schema?.rawSchema,a),parameters:c?.fields?.map(s=>({inputType:V(s.schema),name:s.name,example:g(s,i)}))},r},{})}}function p(t,a){if(!(!t||!a))return{...t,components:a?.components||{}}}function y(t){if(t)return t.map(({schemes:a})=>a.map(n=>{const r={id:n.id,type:n.type,in:n.in,openIdConnectUrl:n.openIdConnectUrl,scopes:n.scopes,scheme:n.scheme,name:n.name,flows:n.flows,"x-defaultAccessToken":n["x-defaultAccessToken"],"x-defaultTokenType":n["x-defaultTokenType"],"x-defaultClientId":n["x-defaultClientId"],"x-defaultClientSecret":n["x-defaultClientSecret"],"x-defaultUsername":n["x-defaultUsername"],"x-defaultPassword":n["x-defaultPassword"]};return Object.keys(r).forEach(e=>r[e]===void 0&&delete r[e]),r}))}export{O as convertOperationToReplayValue,P as convertOperationToReplayValueForRedoc,y as convertRequestSecurity};
|
|
1
|
+
import{isPrimitive as x}from"@redocly/theme/core/openapi";import{getOperation as h}from"../../models/index.js";import{normalizeOptions as v,OpenAPIParser as b}from"../../services/index.js";import{JsonPointer as E}from"../../utils/index.js";function O(t,a,n,r,e,c){if(!n)return;const i=new b(n),s=i.definition.paths?.[t],d=s?.[a],m=h(i,{...d,pathName:t,httpVerb:a,pathParameters:s.parameters||[],pathServers:s.servers||[]},void 0,v({}),"",{isCallback:!1},r);if(!m)return;const f=c?.activeMimeName||"application/json";return{id:m.id,name:m.name,method:m.httpVerb,operationId:m.operationId,parameters:N(m.parameters,e?.requestValues),body:w(m.requestBody,n,e?.requestValues?.body?{activeExampleName:e?.activeExampleName,[f]:e?.requestValues?.body}:e?.activeExampleName?{activeExampleName:e?.activeExampleName}:void 0),path:m.path,href:m.href,servers:m.servers,security:y(m.security),responses:Object.fromEntries(m.responses.map(u=>[u.code,{code:u.code,description:u.description,mediaTypes:u.content?.mediaTypes.reduce((l,o)=>(l[o.name]={name:o.name,schema:p(o.schema?.rawSchema,n)},l),{})}]))}}function P(t){return function(a,n,r){const e=O(a,n,r,t);if(e)return{...e,operationId:e.operationId||E.compile(["paths",e.path,e.method])}}}function N(t,a){const n=new Set,r=t.map(e=>(n.add(e.in+":"+e.name),{name:e.name,in:e.in,required:e.required,description:e.description,example:a?.[String(e.in)]?.[e.name]||e.example,schema:e.schema}));for(const[e,c]of Object.entries(a||{}))for(const[i,s]of Object.entries(c||{}))n.has(e+":"+i)||r.push({name:i,in:e,required:!1,description:"",example:String(s),schema:void 0});return r}function V({type:t,format:a,enum:n}){return t==="string"&&(a==="binary"||a==="base64")?"file":t==="object"?"multiline":n.length>0?"select":"text"}function g(t,a){const n=t[0]?.example||t[0]?.examples;if(n)return n;if(t.schema?.example)return t.schema.example;const r=a?.default?.value||a?.default?.rawValue;return r?.[t.name]?x(r?.[t.name])?String(r?.[t.name]):JSON.stringify(r?.[t.name]):""}function w(t,a,n){if(!t||!t.content?.mediaTypes){if(!n)return;const{activeExampleName:r,...e}=n;return{activeExampleName:r,mediaTypes:Object.fromEntries(Object.entries(e).map(([c,i])=>[c,{name:c,examples:{default:{value:i}},schema:{},parameters:[]}]))}}return{required:t.required,activeExampleName:n?.activeExampleName,mediaTypes:t.content.mediaTypes.reduce((r,e)=>{const c=e.schema,i=n?.[e.name]?{default:{value:n?.[e.name],rawValue:n?.[e.name],mime:e.name}}:e.examples||e.formExamples;return r[e.name]={name:e.name,examples:i,schema:p(e.schema?.rawSchema,a),parameters:c?.fields?.map(s=>({inputType:V(s.schema),name:s.name,example:g(s,i)}))},r},{})}}function p(t,a){if(!(!t||!a))return{...t,components:a?.components||{}}}function y(t){if(t)return t.map(({schemes:a})=>a.map(n=>{const r={id:n.id,type:n.type,in:n.in,openIdConnectUrl:n.openIdConnectUrl,scopes:n.scopes,scheme:n.scheme,name:n.name,flows:n.flows,"x-defaultAccessToken":n["x-defaultAccessToken"],"x-defaultTokenType":n["x-defaultTokenType"],"x-defaultClientId":n["x-defaultClientId"],"x-defaultClientSecret":n["x-defaultClientSecret"],"x-defaultUsername":n["x-defaultUsername"],"x-defaultPassword":n["x-defaultPassword"]};return Object.keys(r).forEach(e=>r[e]===void 0&&delete r[e]),r}))}export{O as convertOperationToReplayValue,P as convertOperationToReplayValueForRedoc,y as convertRequestSecurity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as t}from"react/jsx-runtime";import{memo as p}from"react";import{LinkIcon as m}from"@redocly/theme";import{PropertyDetails as l}from"../PropertyDetails/index.js";import{LinkToField as c}from"../common/LinkToField.js";import{styled as e}from"../../styled-components.js";function g({title:n,parameters:i,deepLink:s}){return!i||!i.length?null:t(v,{children:[t(f,{children:[o(c,{to:s}),n]}),i.map((r,a)=>o(l,{isFirst:a===0,field:r},r.name))]})}const b=p(g),f=e.span`
|
|
1
|
+
import{jsx as o,jsxs as t}from"react/jsx-runtime";import{memo as p}from"react";import{LinkIcon as m}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{PropertyDetails as l}from"../PropertyDetails/index.js";import{LinkToField as c}from"../common/LinkToField.js";import{styled as e}from"../../styled-components.js";function g({title:n,parameters:i,deepLink:s}){return!i||!i.length?null:t(v,{children:[t(f,{children:[o(c,{to:s}),n]}),i.map((r,a)=>o(l,{isFirst:a===0,field:r},r.name))]})}const b=p(g),f=e.span`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{memo as d,useCallback as l}from"react";import{CodeBlock as i}from"@redocly/theme";import{SelectOrLabel as s}from"../SelectOrLabel/index.js";import{MediaTypesSwitch as u}from"../MediaTypeSwitch/index.js";import{SelectWrapper as S}from"../PayloadSamples/index.js";import{Example as h}from"./Example.js";import{MimeLabel as f,Select as b}from"../common/index.js";import{styled as g}from"../../styled-components.js";function p({onCopyClick:o,...e}){const t=e.operation.requestBody?.content,c=l(a=>(t?.mediaTypes?.length??0)>1?r(S,{children:r(s,{Label:f,Select:b,variant:"dark",fullWidth:!0,...a})}):null,[t]),n=l(a=>e.source?r(m,{lang:e.lang,source:e.source,header:{className:"code-block-header",controls:{copy:{onClick:o}}}}):r(m,{lang:e.lang,externalSource:{sample:e.externalSample,exampleName:a,operation:e.operation,pathParams:e.pathParams,properties:e.properties},header:{className:"code-block-header",controls:{copy:{onClick:o}}}}),[o,e.externalSample,e.lang,e.operation,e.pathParams,e.properties,e.source]);return t===void 0||e.source!=null?n():r(u,{content:t,renderSelect:c,children:a=>r(h,{mediaType:a,mediaContent:t,renderSample:n})})}const M=d(p),m=g(i)`
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{memo as d,useCallback as l}from"react";import{CodeBlock as i}from"@redocly/theme/components/CodeBlock/CodeBlock";import{SelectOrLabel as s}from"../SelectOrLabel/index.js";import{MediaTypesSwitch as u}from"../MediaTypeSwitch/index.js";import{SelectWrapper as S}from"../PayloadSamples/index.js";import{Example as h}from"./Example.js";import{MimeLabel as f,Select as b}from"../common/index.js";import{styled as g}from"../../styled-components.js";function p({onCopyClick:o,...e}){const t=e.operation.requestBody?.content,c=l(a=>(t?.mediaTypes?.length??0)>1?r(S,{children:r(s,{Label:f,Select:b,variant:"dark",fullWidth:!0,...a})}):null,[t]),n=l(a=>e.source?r(m,{lang:e.lang,source:e.source,header:{className:"code-block-header",controls:{copy:{onClick:o}}}}):r(m,{lang:e.lang,externalSource:{sample:e.externalSample,exampleName:a,operation:e.operation,pathParams:e.pathParams,properties:e.properties},header:{className:"code-block-header",controls:{copy:{onClick:o}}}}),[o,e.externalSample,e.lang,e.operation,e.pathParams,e.properties,e.source]);return t===void 0||e.source!=null?n():r(u,{content:t,renderSelect:c,children:a=>r(h,{mediaType:a,mediaContent:t,renderSample:n})})}const M=d(p),m=g(i)`
|
|
2
2
|
border: none;
|
|
3
3
|
margin: 0;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as D}from"react/jsx-runtime";import{memo as M,useCallback as k,useMemo as A}from"react";import{useAtomValue as y,useAtom as T}from"jotai";import{PanelHeader as U}from"@redocly/theme";import{PayloadSamples as W}from"../PayloadSamples/index.js";import{CodeSample as B}from"./CodeSample.js";import{useCodeSamples as F}from"./useCodeSamples.js";import{isPayloadSample as H}from"../../models/index.js";import{createCodeSampleCopyEvent as O,createLanguageSwitchEvent as V}from"../../events/index.js";import{globalStoreAtom as $}from"../../jotai/store.js";import{ServerListDropdown as z}from"../ServerListDropdown/index.js";import{LanguageDropdown as G}from"../Language/index.js";import{activeMimeNameAtom as J,languageAtom as K}from"../../jotai/app.js";import{Replay as L}from"../Replay/index.js";import{CodeBlockPanel as w}from"../common/index.js";import{useActiveWithFallback as Q,useTelemetry as X}from"../../hooks/index.js";import{operationStore as Y}from"../../jotai/operation.js";import{styled as v}from"../../styled-components.js";function Z({operation:a,disableFooter:P,onPanelToggle:S,...p}){const c=X(),[{activeLanguage:q,languages:m},R]=T(K),{samples:n}=F(a),{parser:d,options:{events:s,corsProxyUrl:g,hideReplay:_}}=y($),i=!P&&!a.isWebhook&&!_&&!a.hideReplay,t=!!m?.length,u=Q(n,q),E=e=>{R(e),c.send({type:"openapi_docs.select_language.clicked",payload:{language:e}});const r=m?.find(l=>l.key===e);if(s?.codeSamplesLanguageSwitch&&r){const l=V({operation:a,sample:{lang:r.lang,label:r.title}});s.codeSamplesLanguageSwitch(l)}},h=y(J),{activeExampleName:x}=y(Y(a.pointer)),f=k(({lang:e,title:r})=>()=>{const l=O({operation:a,label:r,lang:e,type:"request",activeMimeName:h,activeExampleName:x});c.send({type:"openapi_docs.copy_code_snippet.clicked",payload:{snippet_type:"request",language:e}}),s?.codeSamplesCopy?.(l)},[a,c,s,h,x]),b=k(e=>{S?.(e,"request-samples")},[S]),C=()=>D(I,{isExpandable:!1,withReplay:!t&&i,children:[o(ee,{operation:a}),t&&o(G,{activeTab:u,samples:n,onChange:E}),!t&&i&&o(L,{operation:a,corsProxyUrl:g,fullOpenApi:d.definition})]}),j=A(()=>{if(i&&t)return o(ae,{children:o(L,{operation:a,corsProxyUrl:g,fullOpenApi:d.definition})})},[i,t,a,g,d.definition]),N=A(()=>n.map(e=>e.key===u?o("div",{children:H(e)?o(W,{content:e.requestBodyContent,onCopyClick:f(e),onPanelToggle:b,...p}):o(B,{lang:e.lang,source:e.source,externalSample:e,operation:a,onCopyClick:f(e),...p})},e.key+a.id):null),[u,f,b,a,p,n]);return m&&!n.length?o(w,{className:"panel-request-samples",header:C,isExpandable:!1,expanded:!1}):n.length?o(w,{className:"panel-request-samples",header:C,footer:j,isExpandable:!1,children:N}):null}const xe=M(Z),I=v(U)`
|
|
1
|
+
import{jsx as o,jsxs as D}from"react/jsx-runtime";import{memo as M,useCallback as k,useMemo as A}from"react";import{useAtomValue as y,useAtom as T}from"jotai";import{PanelHeader as U}from"@redocly/theme/components/Panel/PanelHeader";import{PayloadSamples as W}from"../PayloadSamples/index.js";import{CodeSample as B}from"./CodeSample.js";import{useCodeSamples as F}from"./useCodeSamples.js";import{isPayloadSample as H}from"../../models/index.js";import{createCodeSampleCopyEvent as O,createLanguageSwitchEvent as V}from"../../events/index.js";import{globalStoreAtom as $}from"../../jotai/store.js";import{ServerListDropdown as z}from"../ServerListDropdown/index.js";import{LanguageDropdown as G}from"../Language/index.js";import{activeMimeNameAtom as J,languageAtom as K}from"../../jotai/app.js";import{Replay as L}from"../Replay/index.js";import{CodeBlockPanel as w}from"../common/index.js";import{useActiveWithFallback as Q,useTelemetry as X}from"../../hooks/index.js";import{operationStore as Y}from"../../jotai/operation.js";import{styled as v}from"../../styled-components.js";function Z({operation:a,disableFooter:P,onPanelToggle:S,...p}){const c=X(),[{activeLanguage:q,languages:m},R]=T(K),{samples:n}=F(a),{parser:d,options:{events:s,corsProxyUrl:g,hideReplay:_}}=y($),i=!P&&!a.isWebhook&&!_&&!a.hideReplay,t=!!m?.length,u=Q(n,q),E=e=>{R(e),c.send({type:"openapi_docs.select_language.clicked",payload:{language:e}});const r=m?.find(l=>l.key===e);if(s?.codeSamplesLanguageSwitch&&r){const l=V({operation:a,sample:{lang:r.lang,label:r.title}});s.codeSamplesLanguageSwitch(l)}},h=y(J),{activeExampleName:x}=y(Y(a.pointer)),f=k(({lang:e,title:r})=>()=>{const l=O({operation:a,label:r,lang:e,type:"request",activeMimeName:h,activeExampleName:x});c.send({type:"openapi_docs.copy_code_snippet.clicked",payload:{snippet_type:"request",language:e}}),s?.codeSamplesCopy?.(l)},[a,c,s,h,x]),b=k(e=>{S?.(e,"request-samples")},[S]),C=()=>D(I,{isExpandable:!1,withReplay:!t&&i,children:[o(ee,{operation:a}),t&&o(G,{activeTab:u,samples:n,onChange:E}),!t&&i&&o(L,{operation:a,corsProxyUrl:g,fullOpenApi:d.definition})]}),j=A(()=>{if(i&&t)return o(ae,{children:o(L,{operation:a,corsProxyUrl:g,fullOpenApi:d.definition})})},[i,t,a,g,d.definition]),N=A(()=>n.map(e=>e.key===u?o("div",{children:H(e)?o(W,{content:e.requestBodyContent,onCopyClick:f(e),onPanelToggle:b,...p}):o(B,{lang:e.lang,source:e.source,externalSample:e,operation:a,onCopyClick:f(e),...p})},e.key+a.id):null),[u,f,b,a,p,n]);return m&&!n.length?o(w,{className:"panel-request-samples",header:C,isExpandable:!1,expanded:!1}):n.length?o(w,{className:"panel-request-samples",header:C,footer:j,isExpandable:!1,children:N}):null}const xe=M(Z),I=v(U)`
|
|
2
2
|
flex-wrap: nowrap;
|
|
3
3
|
${({withReplay:a})=>a&&"padding: var(--spacing-xs) var(--spacing-sm);"}
|
|
4
4
|
`,ee=v(z)`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r,jsxs as a}from"react/jsx-runtime";import{PanelHeader as t}from"@redocly/theme/components/Panel/PanelHeader";import{PanelHeaderTitle as o}from"@redocly/theme/components/Panel/PanelHeaderTitle";import{useTranslate as n}from"../../hooks/index.js";const d=({tabs:e})=>{const s=n();return a(t,{isExpandable:!1,children:[r(o,{"data-testid":"title",children:s("openapi.response","Response")}),e]})};export{d as Summary};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as c,jsxs as g}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as e,Fragment as c,jsxs as g}from"react/jsx-runtime";import{useAtomValue as t}from"jotai";import{Panel as o}from"@redocly/theme/components/Panel/Panel";import{Markdown as f}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as v}from"../Download/index.js";import{Overview as h}from"../Overview/index.js";import{LanguageList as u}from"../Language/index.js";import{ServerList as w}from"../ServerList/index.js";import{globalStoreAtom as x}from"../../jotai/store.js";import{normalizeServers as S}from"../../utils/index.js";import{mergeInMockServer as L}from"../../models/operation.js";import{languageAtom as b}from"../../jotai/app.js";import{useTranslate as j}from"../../hooks/index.js";const R=({item:{infoDefinition:r}})=>{const a=j(),{options:{hideDownloadButtons:i,mockServer:l},parser:{definition:m,definitionUrl:p}}=t(x),{languages:n,activeLanguage:d}=t(b),s=S(p,L(m.servers||[],l));return g(c,{children:[!i&&e(o,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:e(v,{})}),(r?.license||r?.contact||r?.termsOfService)&&e(o,{className:"panel-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:e(f,{children:e(h,{info:r,translate:a})})}),!!n?.length&&e(o,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:e(u,{languages:n,activeLanguage:d})}),!!s.length&&e(o,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:e(w,{servers:s,path:"/",translate:a})})]})};export{R as RightPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isUndefined as o}from"@redocly/theme";const i=e=>{if(!e)return"";const t=e.match(/t=(request|response)/);return t?t[1]:""},u=4;function f({schemasExpansionLevel:e,level:t,required:n}){const r=Number(t)-1;return o(e)?!!n&&u>=r:e>=r}export{i as extractTypeFromDeepLink,f as getExpandByDefault};
|
|
1
|
+
import{isUndefined as o}from"@redocly/theme/core/openapi";const i=e=>{if(!e)return"";const t=e.match(/t=(request|response)/);return t?t[1]:""},u=4;function f({schemasExpansionLevel:e,level:t,required:n}){const r=Number(t)-1;return o(e)?!!n&&u>=r:e>=r}export{i as extractTypeFromDeepLink,f as getExpandByDefault};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as o,jsxs as S}from"react/jsx-runtime";import{memo as g,useCallback as A,useMemo as C}from"react";import{LayoutVariant as j}from"@redocly/
|
|
1
|
+
import{jsx as o,jsxs as S}from"react/jsx-runtime";import{memo as g,useCallback as A,useMemo as C}from"react";import{LayoutVariant as j}from"@redocly/config";import{useAtom as k,useAtomValue as x}from"jotai";import{useWriteAtom as T}from"../../jotai/use-write-atom.js";import{SamplesMiddlePanel as D,SamplesPanel as E,Row as N,Section as b,CodeBlockPanel as P}from"../common/index.js";import{getMediaType as w}from"../../models/index.js";import{MediaTypeSamples as I}from"../PayloadSamples/index.js";import{Schema as V}from"../Schema/index.js";import{Markdown as W}from"../Markdown/index.js";import{layoutAtom as _}from"../../jotai/app.js";import{globalStoreAtom as $}from"../../jotai/store.js";import{operationStore as O}from"../../jotai/operation.js";import{styled as B}from"../../styled-components.js";const K=(t,i)=>{if(!t)return{};const n={schema:{$ref:t}};return i&&(n.examples={example:{$ref:i}}),n};function L({schemaRef:t,exampleRef:i,showReadOnly:n=!0,showWriteOnly:v=!1}){const s=x(_),{parser:c,options:p}=x($),l=T(),e=C(()=>w(c,"json",!1,K(t,i),p,{operation:{pointer:"SchemaDefinitionComponent"}}),[i,p,c,t]),[f,d]=k(O(e.operation?.pointer)),y=A(r=>{if(!e.schema)return;const a=e.schema,u=a.oneOf;if(u&&e?.examples&&Object.keys(e?.examples).includes(r)){const m=u.findIndex(M=>M.title===r);m!==-1&&a&&l(O(a.operationPointer),{activeExampleName:a.oneOf?.[m]?.title,activeOneOf:{[a.pointer]:m}})}f.activeExampleName!==r&&d({activeExampleName:r})},[e?.examples,e.schema,f.activeExampleName,d,l]),h=s===j.STACKED;return o(b,{children:S(N,{layout:s,children:[S(D,{isStacked:h,children:[e.schema?.description&&o(q,{children:o(W,{source:e.schema?.description})}),o(V,{skipWriteOnly:!v,skipReadOnly:!n,schema:e.schema,level:1})]}),o(E,{isStacked:h,children:o(P,{className:"panel-response-samples",children:o(I,{mediaType:e,onChange:y})})})]})})}const ie=g(L),q=B.div`
|
|
2
2
|
margin-bottom: var(--spacing-vertical);
|
|
3
3
|
`;export{ie as SchemaDefinition};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as s,Fragment as x}from"react/jsx-runtime";import{useMemo as p}from"react";import{useAtomValue as d}from"jotai";import{LayoutVariant as c}from"@redocly/config";import{breakpoints as k}from"@redocly/theme/core/openapi";import{OpenApiHeader as u}from"@redocly/theme/components/OpenApiDocs/hooks/OpenApiHeader";import{PageFooter as v}from"../PageFooter/index.js";import{globalOptionsAtom as b}from"../../jotai/store.js";import{RenderHook as y}from"../RenderHook/index.js";import{RightPanel as C}from"../RightPanel/index.js";import{layoutAtom as w}from"../../jotai/app.js";import{Row as B,SamplesMiddlePanel as j,SamplesPanel as M}from"../common/index.js";import{Items as f}from"../ContentItems/Items.js";import{ContentItem as g}from"../ContentItem/index.js";import{styled as m}from"../../styled-components.js";function G({items:e,hideFooterAndHeader:n}){const{unstable_hooks:{MiddlePanelHeader:a},routingBasePath:i}=d(b),l=d(w),o=l===c.STACKED,P=p(()=>n?null:t(h,{isStacked:o,children:t(v,{})}),[n,o]),S=p(()=>n||!u&&!a?null:t(h,{isStacked:o,children:a?t(y,{Hook:a,props:void 0}):t(u,{})}),[a,n,o]);return e.length===0?null:s(x,{children:[S,s(B,{layout:l,children:[t(R,{layout:l,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(C,{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=m(j)`
|
|
2
2
|
align-self: flex-start;
|
|
3
3
|
padding-top: var(--panel-gap-vertical);
|
|
4
4
|
padding-bottom: var(--panel-gap-vertical);
|
|
5
|
-
`,R=
|
|
5
|
+
`,R=m.div`
|
|
6
6
|
width: 100%;
|
|
7
7
|
|
|
8
8
|
@media screen and (min-width: ${k.large}) {
|
|
9
|
-
width: ${({layout:
|
|
9
|
+
width: ${({layout:e})=>e===c.STACKED?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
10
10
|
}
|
|
11
|
-
`,_=
|
|
11
|
+
`,_=m(M)`
|
|
12
12
|
margin: var(--spacing-base) 0;
|
|
13
|
-
`;export{_ as RightPanelContainer,R as SectionContainer,
|
|
13
|
+
`;export{_ as RightPanelContainer,R as SectionContainer,G as SectionContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,Fragment as l,jsxs as p}from"react/jsx-runtime";import{memo as d}from"react";import{LayoutVariant as u}from"@redocly/
|
|
1
|
+
import{jsx as t,Fragment as l,jsxs as p}from"react/jsx-runtime";import{memo as d}from"react";import{LayoutVariant as u}from"@redocly/config";import{SamplesMiddlePanel as a,Row as f}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:c,description:i}=o,e=s===u.STACKED,n=!o.parent||o.parent.type!=="tag";return p(l,{children:[t(h,{ast:c,source:i,htmlWrap:m=>t(a,{compact:!0,fullWidth:n,isStacked:e,children:m})}),r&&t(f,{children:t(a,{compact:!0,fullWidth:n,isStacked:e,children:t(x,{externalDocs:r})})})]})}const _=d(S);export{_ as SectionItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as r,Fragment as p,jsxs as c}from"react/jsx-runtime";import{memo as S,useState as v}from"react";import{ChevronRightIcon as b}from"@redocly/theme";import{Markdown as d}from"../Markdown/index.js";import{SecuritySchemeItem as a}from"./SecuritySchemeItem.js";import{Tag as m}from"./styled.js";import{useTranslate as l}from"../../hooks/index.js";import{getOptionalScopes as O,getRequiredScopes as x}from"./helper.js";import{styled as i}from"../../styled-components.js";function y({id:e,securities:t,flows:n}){const o=x(e,t);return c(p,{children:[r(w,{flows:n,requiredScopes:o}),r(q,{flows:n,requiredScopes:o})]})}function q({flows:e,requiredScopes:t}){return e&&Object.keys(e).map(n=>r(j,{flow:e[n],requiredScopes:t},n))}function j({flow:e,requiredScopes:t}){const n=l(),[o,h]=v(!1),f=Object.keys(e?.scopes||{}),u=O(t,f);return u.length===0?null:c(p,{children:[r(a,{label:c(A,{onClick:()=>{h(s=>!s)},children:[n(o?"openapi.hideOptionalScopes":"openapi.showOptionalScopes",o?"Hide optional scopes":"Show optional scopes"),r(C,{isOpen:o,children:r(b,{size:"var(--font-size-base)",color:"var(--tree-content-color-default)"})})]}),value:" "}),r(z,{isOpen:o,children:u.map(s=>r(a,{label:r(g,{className:"tag-grey",children:s}),value:r(d,{source:e?.scopes[s]||""})},s))})]})}function w({requiredScopes:e,flows:t}){const n=l();return e.length===0?null:t&&Object.keys(t).length>0?Object.keys(t).map(o=>r(k,{flow:t[o],requiredScopes:e},o)):r(a,{label:n("openapi.requiredScopes","Required scopes"),value:r(R,{children:e.map(o=>r(m,{className:"tag-grey",children:o},o))})})}function k({flow:e,requiredScopes:t}){const n=l();return c(p,{children:[r(a,{label:n("openapi.requiredScopes","Required scopes"),value:" "}),t.map(o=>r(a,{label:r(g,{className:"tag-grey",children:o}),value:r(d,{source:e?.scopes[o]||""})},o))]})}const g=i(m)`
|
|
1
|
+
import{jsx as r,Fragment as p,jsxs as c}from"react/jsx-runtime";import{memo as S,useState as v}from"react";import{ChevronRightIcon as b}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{Markdown as d}from"../Markdown/index.js";import{SecuritySchemeItem as a}from"./SecuritySchemeItem.js";import{Tag as m}from"./styled.js";import{useTranslate as l}from"../../hooks/index.js";import{getOptionalScopes as O,getRequiredScopes as x}from"./helper.js";import{styled as i}from"../../styled-components.js";function y({id:e,securities:t,flows:n}){const o=x(e,t);return c(p,{children:[r(w,{flows:n,requiredScopes:o}),r(q,{flows:n,requiredScopes:o})]})}function q({flows:e,requiredScopes:t}){return e&&Object.keys(e).map(n=>r(j,{flow:e[n],requiredScopes:t},n))}function j({flow:e,requiredScopes:t}){const n=l(),[o,h]=v(!1),f=Object.keys(e?.scopes||{}),u=O(t,f);return u.length===0?null:c(p,{children:[r(a,{label:c(A,{onClick:()=>{h(s=>!s)},children:[n(o?"openapi.hideOptionalScopes":"openapi.showOptionalScopes",o?"Hide optional scopes":"Show optional scopes"),r(C,{isOpen:o,children:r(b,{size:"var(--font-size-base)",color:"var(--tree-content-color-default)"})})]}),value:" "}),r(z,{isOpen:o,children:u.map(s=>r(a,{label:r(g,{className:"tag-grey",children:s}),value:r(d,{source:e?.scopes[s]||""})},s))})]})}function w({requiredScopes:e,flows:t}){const n=l();return e.length===0?null:t&&Object.keys(t).length>0?Object.keys(t).map(o=>r(k,{flow:t[o],requiredScopes:e},o)):r(a,{label:n("openapi.requiredScopes","Required scopes"),value:r(R,{children:e.map(o=>r(m,{className:"tag-grey",children:o},o))})})}function k({flow:e,requiredScopes:t}){const n=l();return c(p,{children:[r(a,{label:n("openapi.requiredScopes","Required scopes"),value:" "}),t.map(o=>r(a,{label:r(g,{className:"tag-grey",children:o}),value:r(d,{source:e?.scopes[o]||""})},o))]})}const g=i(m)`
|
|
2
2
|
font-family: var(--font-family-base);
|
|
3
3
|
font-size: var(--font-size-base);
|
|
4
4
|
line-height: var(--line-height-base);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r,Fragment as i,jsxs as s}from"react/jsx-runtime";import{useState as l}from"react";import{Portal as n}from"@redocly/theme/components/Portal/Portal";import{useModalScrollLock as m}from"@redocly/theme/core/openapi";import{SecurityButton as a}from"./SecurityButton.js";import{SecurityModal as u}from"./SecurityModal.js";function j({securities:o}){const[t,e]=l(!1);return m(t),o.length?s(i,{children:[r(a,{securities:o,onClick:()=>e(!0)}),t&&r(n,{mountId:"api-content",children:r(u,{securities:o,onClose:()=>e(!1)})})]}):null}export{j as Security};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as r,jsxs as
|
|
1
|
+
import{jsx as r,jsxs as t}from"react/jsx-runtime";import{Fragment as c}from"react";import{SecurityIcon as v}from"@redocly/theme/icons/SecurityIcon/SecurityIcon";import{Panel as f}from"@redocly/theme/components/Panel/Panel";import{Button as h}from"@redocly/theme/components/Button/Button";import{useTranslate as g}from"../../hooks/index.js";import{styled as e}from"../../styled-components.js";function T({securities:o,onClick:p}){const n=g();return r(y,{header:()=>t(b,{children:[r(v,{}),r(w,{children:n("openapi.security","Security")}),r(x,{onClick:p,variant:"link",children:n("openapi.viewSecurityDetails","View details")})]}),isExpandable:!1,children:r(S,{children:o.map((a,i)=>{const s=o.length>1&&a.schemes.length>1,m=a.schemes.map(({id:l},u)=>t(c,{children:[l,u<a.schemes.length-1&&r(d,{children:" and "})]},l));return t(c,{children:[s?"(":"",m,s?")":"",i<o.length-1&&r(d,{children:" or "})]},i)})})})}const y=e(f)`
|
|
2
2
|
margin-top: var(--spacing-base);
|
|
3
3
|
border: var(--panel-border);
|
|
4
4
|
border-radius: var(--panel-border-radius);
|
|
@@ -27,4 +27,4 @@ import{jsx as r,jsxs as n}from"react/jsx-runtime";import{SecurityIcon as v,Panel
|
|
|
27
27
|
color: var(--text-color-primary);
|
|
28
28
|
`,d=e.span`
|
|
29
29
|
color: var(--text-color-description);
|
|
30
|
-
`;export{
|
|
30
|
+
`;export{T as SecurityButton};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as n}from"react/jsx-runtime";import{Fragment as h,useState as f,useRef as u}from"react";import{useOutsideClick as v,useFocusTrap as x}from"@redocly/theme/core/openapi";import{Button as b}from"@redocly/theme/components/Button/Button";import{SecurityIcon as y}from"@redocly/theme/icons/SecurityIcon/SecurityIcon";import{Segmented as S}from"@redocly/theme/components/Segmented/Segmented";import{CloseIcon as w}from"@redocly/theme/icons/CloseIcon/CloseIcon";import{Typography as z}from"@redocly/theme/components/Typography/Typography";import{SecurityFlow as j}from"./SecurityFlow.js";import{Divider as k}from"./Divider.js";import{useTranslate as C}from"../../hooks/index.js";import{styled as e}from"../../styled-components.js";function J({securities:r,onClose:s}){const c=C(),[l,d]=f(0),i=u(null),{schemes:p}=r[l]||{};v(i,s),x(i);const m=r.map(({schemes:o},a)=>({label:o.map(({id:g})=>g).join(" and "),value:a}));return t(F,{children:n(T,{ref:i,tabIndex:0,children:[t(I,{onClick:s,"data-testid":"close",variant:"ghost",icon:t(w,{})}),n(B,{children:[t(y,{size:"24px"}),c("openapi.security","Security")]}),t(S,{value:l,onChange:({value:o})=>d(o),options:m}),p.map((o,a)=>n(h,{children:[t(j,{...o,securities:r}),a!==p.length-1&&t(k,{label:"and"})]},o.id))]})})}const T=e.div`
|
|
2
2
|
background: var(--bg-color);
|
|
3
3
|
box-shadow: var(--bg-raised-shadow);
|
|
4
4
|
border-radius: var(--border-radius-lg);
|
|
@@ -19,7 +19,7 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Fragment as h,useState
|
|
|
19
19
|
font-size: var(--font-size-base);
|
|
20
20
|
line-height: var(--line-height-base);
|
|
21
21
|
}
|
|
22
|
-
`,F=
|
|
22
|
+
`,F=e.div`
|
|
23
23
|
background: var(--bg-color-modal-overlay);
|
|
24
24
|
position: fixed;
|
|
25
25
|
width: 100vw;
|
|
@@ -28,11 +28,11 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Fragment as h,useState
|
|
|
28
28
|
left: 0;
|
|
29
29
|
top: 0;
|
|
30
30
|
pointer-events: auto;
|
|
31
|
-
`,I=
|
|
31
|
+
`,I=e(b)`
|
|
32
32
|
position: absolute;
|
|
33
33
|
right: var(--spacing-md);
|
|
34
34
|
top: var(--spacing-md);
|
|
35
|
-
`,B=
|
|
35
|
+
`,B=e(z)`
|
|
36
36
|
display: flex;
|
|
37
37
|
align-items: center;
|
|
38
38
|
font-size: var(--h4-font-size);
|
|
@@ -41,4 +41,4 @@ import{jsx as e,jsxs as n}from"react/jsx-runtime";import{Fragment as h,useState
|
|
|
41
41
|
svg {
|
|
42
42
|
margin-right: var(--spacing-xs);
|
|
43
43
|
}
|
|
44
|
-
`;export{
|
|
44
|
+
`;export{J as SecurityModal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as i,jsxs as t}from"react/jsx-runtime";import{CopyButton as v}from"@redocly/theme";import{PanelItemDescription as x,Title as f}from"../PanelItem/index.js";import{ViewNested as u}from"../ViewNested/index.js";import{Tag as y}from"../common/index.js";import{Markdown as w}from"../Markdown/index.js";import{styled as e}from"../../styled-components.js";const V=({servers:h,path:b,translate:r})=>i(j,{children:h.map(o=>{const a=o.url+b,d=Object.keys(o.variables||{}).length,p=d===1?"variable":"variables",l=`${d||""} ${r(`openapi.${p}`,p)}`;return t("div",{children:[i(x,{children:o.description}),t(k,{children:[i(f,{suppressHydrationWarning:!0,children:a}),i(v,{data:a},a)]}),o.variables&&i(u,{expandText:`${r("openapi.actions.show","Show")} ${l}`,hideText:`${r("openapi.actions.hide","Hide")} ${l}`,expandByDefault:!1,expandable:!0,hideDivider:!0,children:i(S,{children:Object.entries(o.variables||{}).map(([c,n])=>t(T,{children:[i(z,{children:c}),t(s,{children:[r("openapi.default","Default")," ",i(g,{children:n.default})]}),i($,{source:n.description}),n.enum&&t(s,{children:[r("openapi.enum","Enum")," ",i(D,{children:n.enum.map(m=>i(g,{children:m},m))})]})]},c))})})]},o.url)})}),j=e.div`
|
|
1
|
+
import{jsx as i,jsxs as t}from"react/jsx-runtime";import{CopyButton as v}from"@redocly/theme/components/Buttons/CopyButton";import{PanelItemDescription as x,Title as f}from"../PanelItem/index.js";import{ViewNested as u}from"../ViewNested/index.js";import{Tag as y}from"../common/index.js";import{Markdown as w}from"../Markdown/index.js";import{styled as e}from"../../styled-components.js";const V=({servers:h,path:b,translate:r})=>i(j,{children:h.map(o=>{const a=o.url+b,d=Object.keys(o.variables||{}).length,p=d===1?"variable":"variables",l=`${d||""} ${r(`openapi.${p}`,p)}`;return t("div",{children:[i(x,{children:o.description}),t(k,{children:[i(f,{suppressHydrationWarning:!0,children:a}),i(v,{data:a},a)]}),o.variables&&i(u,{expandText:`${r("openapi.actions.show","Show")} ${l}`,hideText:`${r("openapi.actions.hide","Hide")} ${l}`,expandByDefault:!1,expandable:!0,hideDivider:!0,children:i(S,{children:Object.entries(o.variables||{}).map(([c,n])=>t(T,{children:[i(z,{children:c}),t(s,{children:[r("openapi.default","Default")," ",i(g,{children:n.default})]}),i($,{source:n.description}),n.enum&&t(s,{children:[r("openapi.enum","Enum")," ",i(D,{children:n.enum.map(m=>i(g,{children:m},m))})]})]},c))})})]},o.url)})}),j=e.div`
|
|
2
2
|
& > div {
|
|
3
3
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
4
4
|
margin-bottom: var(--spacing-xs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TFunction } from '@redocly/theme';
|
|
1
|
+
import type { TFunction } from '@redocly/theme/core/openapi';
|
|
2
2
|
import type { OperationModel } from '../../models/index.js';
|
|
3
3
|
export type ServerListProps = Pick<OperationModel, 'servers' | 'path'> & {
|
|
4
4
|
translate: TFunction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as v}from"react/jsx-runtime";import{useMemo as f,useCallback as l}from"react";import{
|
|
1
|
+
import{jsx as e,jsxs as v}from"react/jsx-runtime";import{useMemo as f,useCallback as l}from"react";import{useAtom as S,useAtomValue as w}from"jotai";import{DropdownMenu as y}from"@redocly/theme/components/Dropdown/DropdownMenu";import{Dropdown as g}from"@redocly/theme/components/Dropdown/Dropdown";import{HttpVerb as k}from"../common/index.js";import{PathWrapper as A,Path as b,StyledCopyButton as C,StyledDropdownMenuItem as P}from"./styled.js";import{PanelItem as j}from"../PanelItem/index.js";import{joinWithSeparator as x}from"../../services/index.js";import{replaceVariables as V}from"../../utils/index.js";import{environmentAtom as D}from"../../jotai/app.js";import{useActiveWithFallback as _,useTelemetry as E}from"../../hooks/index.js";import{getServerEnvName as p}from"../../utils/environments.js";import{createTargetServerSwitchEvent as M}from"../../events/index.js";import{globalStoreAtom as W}from"../../jotai/store.js";const R=({operation:r,className:h})=>{const m=E(),[[d],i]=S(D),{options:{events:n}}=w(W),s=_(r.servers.map(t=>({...t,key:t.url})),d.server),c=l(t=>{t.stopPropagation()},[]),a=l(t=>()=>{if(r.servers.length!==1&&(i({environment:p(t)}),m.send({type:"openapi_docs.switch_servers.clicked",payload:{server:p(t)}}),n?.targetServerSwitch&&t)){const o=M({operation:r,serverUrl:t.url});n.targetServerSwitch(o)}},[r,i,m,n]),u=f(()=>r.servers.map(t=>{const o=x(V(t),r.path);return e(P,{onAction:a(t),children:e(j,{header:t.description,title:o,actions:[e(C,{data:o,toasterPlacement:"left",onCopyClick:c},o)],active:t.url===s,withCheckmark:!0})},o)}),[r.servers,r.path,a,c,s]);return e(g,{className:h,trigger:v(A,{variant:"ghost",children:[e(k,{color:r.httpVerb,children:r.httpVerb}),e(b,{children:r.path})]}),withArrow:!0,children:e(y,{children:u})})};export{R as ServerListDropdown};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{breakpoints as
|
|
1
|
+
import{breakpoints as e}from"@redocly/theme/core/openapi";import{Button as t}from"@redocly/theme/components/Button/Button";import{CopyButton as r}from"@redocly/theme/components/Buttons/CopyButton";import{DropdownMenuItem as n}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{styled as o}from"../../styled-components.js";const d=o(t)`
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
overflow-x: hidden;
|
|
4
4
|
font-weight: var(--font-weight-regular);
|
|
5
|
-
`,
|
|
5
|
+
`,c=o.span`
|
|
6
6
|
overflow-x: hidden;
|
|
7
7
|
text-overflow: ellipsis;
|
|
8
8
|
white-space: nowrap;
|
|
9
9
|
display: inline-block;
|
|
10
10
|
line-height: var(--line-height-base);
|
|
11
11
|
font-size: var(--font-size-base);
|
|
12
|
-
`,
|
|
12
|
+
`,m=o(n)`
|
|
13
13
|
padding: calc(var(--spacing-unit) * 1.5) var(--spacing-xs) calc(var(--spacing-unit) * 1.5)
|
|
14
14
|
var(--spacing-lg);
|
|
15
|
-
@media screen and (max-width: ${
|
|
15
|
+
@media screen and (max-width: ${e.large}) {
|
|
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
|
-
`;export{
|
|
22
|
+
`;export{c as Path,d as PathWrapper,h as StyledCopyButton,m as StyledDropdownMenuItem};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{memo as t}from"react";import{Menu as n}from"@redocly/theme";import{useMenuItems as s}from"./hooks/useMenuItems.js";import{styled as i}from"../../styled-components.js";const p=({items:o,className:m})=>{const r=s({items:o});return e(u,{className:m,children:e(n,{items:r})})},l=t(p),u=i.div`
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{memo as t}from"react";import{Menu as n}from"@redocly/theme/components/Menu/Menu";import{useMenuItems as s}from"./hooks/useMenuItems.js";import{styled as i}from"../../styled-components.js";const p=({items:o,className:m})=>{const r=s({items:o});return e(u,{className:m,children:e(n,{items:r})})},l=t(p),u=i.div`
|
|
2
2
|
overflow: auto;
|
|
3
3
|
`;export{u as MenuWrapper,l as SideMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useMemo as d}from"react";import{useLocation as b}from"react-router-dom";import{useActiveSectionId as l}from"@redocly/theme/core/openapi";import{pathMatchedLink as I}from"../../../utils/index.js";import{DEFAULT_WEBHOOKS_TAG_NAME as k}from"../../../constants.js";function W({items:s}){const n=b(),t=l(n,!1,!1);return d(()=>A(s,t,n),[t,s,n])}function A(s,n="",t){const o=[];return m({contentItems:s,sidebarItems:o,activeItemId:n,location:t}),o}function f(s,n="",t){return s.href?n?s.id===n:I(t,s.href):!1}function h(s,n="",t){return(s.items||[]).some(r=>f(r,n,t)||h(r,n,t))}function m(s){const{contentItems:n,sidebarItems:t,activeItemId:o,location:r}=s;let c=!0;for(const e of n){const i=f(e,o,r),a=h(e,o,r);switch(e.type){case"group":t.push({type:"separator",label:e.name,active:i,hasActiveSubItem:a}),m({...s,contentItems:e.items,sidebarItems:t});break;case"tag":const p={type:"group",label:e.name,items:[],link:e.href,active:i,hasActiveSubItem:a,modified:!0};t.push(p),m({contentItems:e.items,sidebarItems:p.items||[],activeItemId:o,location:r});break;case"operation":case"schema":e.isWebhook&&c&&e.parent.name!==k&&(t.push({type:"separator",label:"Webhooks",variant:"secondary"}),c=!1),t.push({type:"link",label:e.name,httpVerb:e.type==="schema"?"schema":e.httpVerb,link:e.href,badges:e.badges,active:i,hasActiveSubItem:a,modified:!0,deprecated:e.deprecated});break;case"section":if(e.depth===-1)continue;const u={type:e.items.length?"group":"link",label:e.name,link:e.href,items:[],active:i,hasActiveSubItem:a,modified:!0};t.push(u),e.items.length&&m({contentItems:e.items,sidebarItems:u.items,activeItemId:o,location:r});break}}}export{W as useMenuItems};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsx as o,Fragment as n}from"react/jsx-runtime";import{useAtom as
|
|
1
|
+
import{jsx as o,Fragment as n}from"react/jsx-runtime";import{useAtom as i}from"jotai";import{LayoutVariant as a}from"@redocly/config";import{SidebarActions as c}from"@redocly/theme/components/SidebarActions/SidebarActions";import{collapsedSidebarAtom as m,layoutAtom as p}from"../../jotai/app.js";import{styled as d}from"../../styled-components.js";const y=()=>{const[r,e]=i(p),[t,s]=i(m);return o(n,{children:o(l,{children:o(c,{layout:r,onChangeViewClick:()=>e(r===a.STACKED?a.THREE_PANEL:a.STACKED),collapsedSidebar:t,onChangeCollapseSidebarClick:()=>s(!t),isApiDocs:!0})})})},l=d.div`
|
|
2
2
|
position: sticky;
|
|
3
3
|
top: calc(100vh);
|
|
4
4
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
5
|
-
`;export{
|
|
5
|
+
`;export{y as SidebarActions};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as n,jsxs as l,Fragment as f}from"react/jsx-runtime";import{memo as b,useEffect as h,useRef as u,useState as x}from"react";import{
|
|
1
|
+
import{jsx as n,jsxs as l,Fragment as f}from"react/jsx-runtime";import{memo as b,useEffect as h,useRef as u,useState as x}from"react";import{useAtom as y}from"jotai";import{useLocation as S}from"react-router-dom";import{useMount as v,breakpoints as k}from"@redocly/theme/core/openapi";import{isSidebarOpenedAtom as $}from"../../jotai/app.js";import{SidebarActions as g}from"./SidebarActions.js";import{styled as w}from"../../styled-components.js";const j=w.div`
|
|
2
2
|
overflow: hidden;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
backface-visibility: hidden;
|
|
@@ -12,7 +12,7 @@ import{jsx as n,jsxs as l,Fragment as f}from"react/jsx-runtime";import{memo as b
|
|
|
12
12
|
background: var(--sidebar-bg-color);
|
|
13
13
|
border-right: ${({collapsedSidebar:e})=>e?"1px solid var(--sidebar-border-color)":"auto"};
|
|
14
14
|
|
|
15
|
-
@media screen and (min-width: ${
|
|
15
|
+
@media screen and (min-width: ${k.small}) {
|
|
16
16
|
position: sticky;
|
|
17
17
|
z-index: auto;
|
|
18
18
|
width: ${({collapsedSidebar:e})=>e?"var(--sidebar-width)":"auto"};
|
|
@@ -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=
|
|
24
|
+
`;function O({scrollYOffset:e,className:a,children:d,collapsedSidebar:i}){const[t,p]=x("0px"),m=u(null),o=S(),[s,r]=y($);return h(()=>{o.hash&&r(!1)},[o.pathname,o.hash,r]),v(()=>{const c=e();p(`${c}px`)}),n(f,{children:l(j,{open:s,className:a,offsetTop:t,style:{top:t},ref:m,collapsedSidebar:i,children:[i||s?d:null,n(g,{})]})})}const I=b(O);export{I as StickyResponsiveSidebar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{css as t}from"styled-components";import{StatusCode as n}from"@redocly/theme";import{styled as i}from"../../styled-components.js";function g({tabs:o,onChange:a,activeTab:l}){return e(s,{children:o.map(r=>e(c,{$active:r.key===l?.key,onClick:()=>a(r),children:e(n,{status:r.key,children:r.title})},r.key))})}const s=i.ol`
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{css as t}from"styled-components";import{StatusCode as n}from"@redocly/theme/components/StatusCode/StatusCode";import{styled as i}from"../../styled-components.js";function g({tabs:o,onChange:a,activeTab:l}){return e(s,{children:o.map(r=>e(c,{$active:r.key===l?.key,onClick:()=>a(r),children:e(n,{status:r.key,children:r.title})},r.key))})}const s=i.ol`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
list-style: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as k,useState as m}from"react";import{useMount as n}from"@redocly/theme";function p({tabs:r,defaultTab:e,onChange:t}){const[s,o]=m(e||r[0].key);n(()=>{e&&(o(e),t?.(e))});const c=k(i=>{s!==i.key&&o(i.key),t?.(i.key)},[s,t]);return{activeTab:s,handleTabChange:c}}export{p as useTabsState};
|
|
1
|
+
import{useCallback as k,useState as m}from"react";import{useMount as n}from"@redocly/theme/core/openapi";function p({tabs:r,defaultTab:e,onChange:t}){const[s,o]=m(e||r[0].key);n(()=>{e&&(o(e),t?.(e))});const c=k(i=>{s!==i.key&&o(i.key),t?.(i.key)},[s,t]);return{activeTab:s,handleTabChange:c}}export{p as useTabsState};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as h,jsxs as d}from"react/jsx-runtime";import{useMemo as w,memo as y,useState as S,useCallback as C}from"react";import{useNavigate as O}from"react-router-dom";import{LayoutVariant as A}from"@redocly/
|
|
1
|
+
import{jsx as h,jsxs as d}from"react/jsx-runtime";import{useMemo as w,memo as y,useState as S,useCallback as C}from"react";import{useNavigate as O}from"react-router-dom";import{LayoutVariant as A}from"@redocly/config";import{useAtomValue as N}from"jotai/index";import{SamplesPanel as j}from"../common/index.js";import{layoutAtom as E}from"../../jotai/app.js";import{OperationNavigationItems as f}from"./OperationNavigationItems.js";import{StyledButton as W}from"./styled.js";import{useTranslate as B}from"../../hooks/index.js";import{styled as I}from"../../styled-components.js";const r=8;function P({items:l,routingBasePath:p}){const o=B(),[n,g]=S(!1),m=O(),k=N(E)===A.STACKED,{operations:a,webhooks:s,count:c}=w(()=>{const t=l.filter(e=>e.type==="operation"),x=n?t:t.slice(0,r),{operations:v,webhooks:b}=x.reduce((e,i)=>(i.isWebhook?e.webhooks.push(i):e.operations.push(i),e),{operations:[],webhooks:[]});return{operations:v,webhooks:b,count:!n&&t.length>r?t.length-r:0}},[n,l]),u=C(t=>m(t),[m]);return!a.length&&!s.length?null:d(T,{isStacked:k,"data-testid":"operation-navigation-list",children:[a.length>0&&h(f,{items:a,onClick:u,routingBasePath:p,translate:o,title:o("openapi.operations","Operations")}),s.length>0&&h(f,{items:s,onClick:u,routingBasePath:p,translate:o,title:o("openapi.webhooks","Webhooks")}),!n&&!!c&&d(W,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>g(!0),children:[o("openapi.actions.show","Show")," ",c," ",o("openapi.actions.more","more"),"..."]})]})}const H=y(P),T=I(j)`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--spacing-xxs);
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r,jsxs as t}from"react/jsx-runtime";import{memo as u,useCallback as h}from"react";import{useNavigate as v}from"react-router-dom";import{useAtomValue as x}from"jotai";import{LayoutVariant as b}from"@redocly/config";import{breakpoints as k}from"@redocly/theme/core/openapi";import{Button as w}from"@redocly/theme/components/Button/Button";import{H2 as y}from"@redocly/theme/components/Typography/H2";import{LinkIcon as S}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{Row as C,SamplesMiddlePanel as j,ShareLink as T}from"../common/index.js";import{Markdown as $}from"../Markdown/index.js";import{OperationsNavigation as A}from"./OperationsNavigation.js";import{layoutAtom as I}from"../../jotai/app.js";import{useTranslate as L}from"../../hooks/index.js";import{styled as n}from"../../styled-components.js";function B({item:o,routingBasePath:a="",isExpanded:m}){const l=L(),{description:p,name:e,href:d}=o,s=v(),c=x(I),g=h(()=>{s(a+o.href)},[o.href,s,a]),i=!!o.items.length,f=c===b.STACKED;return t(H,{expanded:m,children:[t(C,{layout:c,children:[t(j,{fullWidth:!i,isStacked:f,children:[t(N,{children:[r(T,{to:d,"aria-label":`link to ${e}`}),e]}),r($,{source:p})]}),i&&r(A,{items:o.items,routingBasePath:a})]}),i&&!m&&t(M,{type:"button",variant:"text",size:"medium",onClick:g,children:["+ ",l("openapi.actions.show","Show")]})]})}const U=u(B),H=n.div`
|
|
2
2
|
padding-top: var(--spacing-lg);
|
|
3
|
-
padding-bottom: ${({expanded:
|
|
4
|
-
`,M=
|
|
3
|
+
padding-bottom: ${({expanded:o})=>o?"var(--spacing-xxl)":""};
|
|
4
|
+
`,M=n(w)`
|
|
5
5
|
margin: var(--spacing-md) var(--spacing-xl) var(--spacing-xxs);
|
|
6
6
|
width: calc(100% - var(--spacing-xl) * 2);
|
|
7
7
|
|
|
8
|
-
@media screen and (min-width: ${
|
|
8
|
+
@media screen and (min-width: ${k.medium}) {
|
|
9
9
|
--button-margin-md: calc(var(--spacing-xl) * 2);
|
|
10
10
|
|
|
11
11
|
margin-left: var(--button-margin-md);
|
|
12
12
|
margin-right: var(--button-margin-md);
|
|
13
13
|
width: calc(100% - var(--button-margin-md) * 2);
|
|
14
14
|
}
|
|
15
|
-
`,N=
|
|
15
|
+
`,N=n(y)`
|
|
16
16
|
:hover {
|
|
17
|
-
${
|
|
17
|
+
${S} {
|
|
18
18
|
opacity: 1;
|
|
19
19
|
visibility: visible;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
`;export{
|
|
22
|
+
`;export{U as TagItem,B as TagItemComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,Fragment as l,jsxs as t}from"react/jsx-runtime";import{css as c}from"styled-components";import{memo as w,useEffect as $,useState as j}from"react";import{isUndefined as C}from"@redocly/theme";import{cycleColorsByLevel as N}from"../PropertyDetails/cycleColorsByLevel.js";import{CircleIcon as S}from"../PropertyDetails/PlusCircleIcon.js";import{LabelValue as V}from"../common/styled.js";import{styled as d}from"../../styled-components.js";function _({expandByDefault:e,level:g,expandable:h=!1,expandText:v,hideText:x,hideDivider:y=!1,children:i,expandedAll:a,isNestedArray:n}){const[r,p]=j((e||n)??!1);$(()=>{C(a)||p(a)},[a]);const s=r?N(g):void 0;if(!h)return i;const b=()=>{p(u=>!u)};return n?t(l,{children:[o(V,{children:"Array ["}),o(f,{$isArrayInsideArray:n,className:"view-nested-wrapper",children:o(m,{color:s,children:i})})]}):o(l,{children:t(f,{$divider:!y&&!r,className:"view-nested-wrapper",children:[t(k,{onClick:b,children:[o(S,{sign:r?"-":"+",color:s}),!r&&v,r&&(x||"")]}),r&&o(m,{color:s,children:i})]})})}const U=w(_),k=d.button`
|
|
1
|
+
import{jsx as o,Fragment as l,jsxs as t}from"react/jsx-runtime";import{css as c}from"styled-components";import{memo as w,useEffect as $,useState as j}from"react";import{isUndefined as C}from"@redocly/theme/core/openapi";import{cycleColorsByLevel as N}from"../PropertyDetails/cycleColorsByLevel.js";import{CircleIcon as S}from"../PropertyDetails/PlusCircleIcon.js";import{LabelValue as V}from"../common/styled.js";import{styled as d}from"../../styled-components.js";function _({expandByDefault:e,level:g,expandable:h=!1,expandText:v,hideText:x,hideDivider:y=!1,children:i,expandedAll:a,isNestedArray:n}){const[r,p]=j((e||n)??!1);$(()=>{C(a)||p(a)},[a]);const s=r?N(g):void 0;if(!h)return i;const b=()=>{p(u=>!u)};return n?t(l,{children:[o(V,{children:"Array ["}),o(f,{$isArrayInsideArray:n,className:"view-nested-wrapper",children:o(m,{color:s,children:i})})]}):o(l,{children:t(f,{$divider:!y&&!r,className:"view-nested-wrapper",children:[t(k,{onClick:b,children:[o(S,{sign:r?"-":"+",color:s}),!r&&v,r&&(x||"")]}),r&&o(m,{color:s,children:i})]})})}const U=w(_),k=d.button`
|
|
2
2
|
background: none;
|
|
3
3
|
border: none;
|
|
4
4
|
cursor: pointer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Fragment as i,jsx as t,jsxs as l}from"react/jsx-runtime";import{memo as m}from"react";import{css as f}from"styled-components";import{Badge as g}from"@redocly/theme";import{styled as d}from"../../styled-components.js";function p({badges:e,children:s}){if(!e)return t(i,{children:s});const n=e.filter(({position:r})=>r==="before"),c=e.filter(({position:r})=>r==="after");return l(i,{children:[n.map(({name:r,color:o})=>t(a,{color:o,children:r},r)),s,c.map(({name:r,color:o})=>t(a,{color:o,children:r},r))]})}const B=m(p),a=d(g)`
|
|
1
|
+
import{Fragment as i,jsx as t,jsxs as l}from"react/jsx-runtime";import{memo as m}from"react";import{css as f}from"styled-components";import{Badge as g}from"@redocly/theme/components/Badge/Badge";import{styled as d}from"../../styled-components.js";function p({badges:e,children:s}){if(!e)return t(i,{children:s});const n=e.filter(({position:r})=>r==="before"),c=e.filter(({position:r})=>r==="after");return l(i,{children:[n.map(({name:r,color:o})=>t(a,{color:o,children:r},r)),s,c.map(({name:r,color:o})=>t(a,{color:o,children:r},r))]})}const B=m(p),a=d(g)`
|
|
2
2
|
margin-left: 0;
|
|
3
3
|
background-color: ${({color:e})=>e||"var(--color-info-base)"};
|
|
4
4
|
${({deprecated:e})=>e&&f`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n,Fragment as x}from"react/jsx-runtime";import{memo as u}from"react";import{useAtom as b}from"jotai";import{LinkIcon as w}from"@redocly/theme";import{Dropdown as M}from"../Dropdown/index.js";import{RequiredLabel as T}from"../Fields/index.js";import{ConstraintsView as j}from"../ConstraintsView.js";import{Schema as k}from"../../Schema/index.js";import{getActiveMediaType as C}from"../../../models/index.js";import{Markdown as z}from"../../Markdown/index.js";import{activeMimeNameAtom as A}from"../../../jotai/app.js";import{LinkToField as q}from"../LinkToField.js";import{useTranslate as B}from"../../../hooks/index.js";import{styled as s}from"../../../styled-components.js";function F({required:m,skipReadOnly:p,skipWriteOnly:l,description:c,content:t,deepLink:r}){const a=B(),[g,f]=b(A);if(!t)return null;const{schema:i,examples:d,operation:h,name:v}=C(t,g),y=t.mediaTypes.map(({name:o})=>({label:o,value:o}));return n(x,{children:[n(O,{children:[r&&e(q,{to:r}),a("openapi.body","Body"),e(M,{options:y,value:v,triggerVariant:"ghost",triggerSize:"large",onChange:({value:o})=>f(o)})]}),m&&e(T,{children:a("openapi.badges.required","required")}),e(N,{source:c}),i?.type==="object"&&i?.constraints&&e(j,{constraints:i?.constraints||[]}),e(k,{skipReadOnly:p,skipWriteOnly:l,schema:i,examples:d,operation:h,level:1,disableDeepLinks:!r},"schema")]})}const P=u(F),N=s(z)`
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as x}from"react/jsx-runtime";import{memo as u}from"react";import{useAtom as b}from"jotai";import{LinkIcon as w}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{Dropdown as M}from"../Dropdown/index.js";import{RequiredLabel as T}from"../Fields/index.js";import{ConstraintsView as j}from"../ConstraintsView.js";import{Schema as k}from"../../Schema/index.js";import{getActiveMediaType as C}from"../../../models/index.js";import{Markdown as z}from"../../Markdown/index.js";import{activeMimeNameAtom as A}from"../../../jotai/app.js";import{LinkToField as q}from"../LinkToField.js";import{useTranslate as B}from"../../../hooks/index.js";import{styled as s}from"../../../styled-components.js";function F({required:m,skipReadOnly:p,skipWriteOnly:l,description:c,content:t,deepLink:r}){const a=B(),[g,f]=b(A);if(!t)return null;const{schema:i,examples:d,operation:h,name:v}=C(t,g),y=t.mediaTypes.map(({name:o})=>({label:o,value:o}));return n(x,{children:[n(O,{children:[r&&e(q,{to:r}),a("openapi.body","Body"),e(M,{options:y,value:v,triggerVariant:"ghost",triggerSize:"large",onChange:({value:o})=>f(o)})]}),m&&e(T,{children:a("openapi.badges.required","required")}),e(N,{source:c}),i?.type==="object"&&i?.constraints&&e(j,{constraints:i?.constraints||[]}),e(k,{skipReadOnly:p,skipWriteOnly:l,schema:i,examples:d,operation:h,level:1,disableDeepLinks:!r},"schema")]})}const P=u(F),N=s(z)`
|
|
2
2
|
margin: var(--spacing-xxs) 0 0;
|
|
3
3
|
`,O=s.span`
|
|
4
4
|
position: relative;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{Panel as o
|
|
2
|
-
${
|
|
1
|
+
import{Panel as o}from"@redocly/theme/components/Panel/Panel";import{PanelBody as r}from"@redocly/theme/components/Panel/PanelBody";import{styled as m}from"../../styled-components.js";const p=m(o)`
|
|
2
|
+
${r} {
|
|
3
3
|
padding: var(--spacing-sm) 0 0;
|
|
4
4
|
}
|
|
5
|
-
`;export{
|
|
5
|
+
`;export{p as CodeBlockPanel};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import{Dropdown as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{Dropdown as d}from"@redocly/theme/components/Dropdown/Dropdown";import{CheckmarkIcon as c}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{DropdownMenu as p}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as f}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Button as g}from"@redocly/theme/components/Button/Button";import{typedMemo as h}from"@redocly/theme/core/openapi";import{styled as o}from"../../../styled-components.js";function u({options:r,value:t,onChange:a,className:l,triggerVariant:m="outlined",triggerSize:s="small"}){const i=r.find(e=>e.value===t)?.label;return r.length===1?n(b,{children:i}):n(d,{className:l,trigger:n(g,{variant:m,size:s,type:"button",children:i}),withArrow:!0,children:n(p,{children:r.map(e=>n(w,{active:e.value===t,onAction:()=>a(e),suffix:e.value===t&&n(v,{}),children:e.label},e.label))})})}const C=h(u),v=o(c)`
|
|
2
2
|
width: 16px;
|
|
3
3
|
height: 16px;
|
|
4
4
|
margin-left: auto;
|
|
5
|
-
`,w=
|
|
5
|
+
`,w=o(f)`
|
|
6
6
|
--dropdown-menu-item-justify-content: space-between;
|
|
7
7
|
|
|
8
8
|
width: 100%;
|
|
@@ -12,7 +12,7 @@ import{jsx as n}from"react/jsx-runtime";import{Dropdown as c,typedMemo as m,Chec
|
|
|
12
12
|
padding: var(--spacing-xxs) var(--spacing-sm);
|
|
13
13
|
font-size: var(--font-size-base);
|
|
14
14
|
line-height: var(--line-height-base);
|
|
15
|
-
`,b=
|
|
15
|
+
`,b=o.span`
|
|
16
16
|
margin-right: var(--spacing-unit);
|
|
17
17
|
cursor: default;
|
|
18
18
|
background: none;
|
|
@@ -23,4 +23,4 @@ import{jsx as n}from"react/jsx-runtime";import{Dropdown as c,typedMemo as m,Chec
|
|
|
23
23
|
line-height: var(--line-height-lg);
|
|
24
24
|
font-family: var(--font-family-base);
|
|
25
25
|
font-weight: var(--font-weight-regular);
|
|
26
|
-
`;export{
|
|
26
|
+
`;export{C as Dropdown};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as p}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as o,jsxs as p}from"react/jsx-runtime";import{useMemo as l,useState as m}from"react";import{Button as c}from"@redocly/theme/components/Button/Button";import{Markdown as d}from"../../Markdown/index.js";import{ExampleValue as x}from"../Fields/index.js";import{useTranslate as E}from"../../../hooks/index.js";import{styled as a}from"../../../styled-components.js";const f=150;function A({value:e}){const s=E(),[n,i]=m(!1),t=l(()=>e.slice(0,f),[e]),r=()=>{i(!n)};return p(u,{children:[o(d,{source:n?e:t}),(e!==t||n)&&o(h,{children:o(c,{variant:"link",size:"small",onClick:r,children:n?s("openapi.hideExample","Hide example"):s("openapi.showExample","Show example")})})]})}const u=a(x)`
|
|
2
2
|
display: inline;
|
|
3
3
|
|
|
4
4
|
& * {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsxs as t,jsx as n}from"react/jsx-runtime";import{memo as i}from"react";import{useAtomValue as m}from"jotai";import{Markdown as p}from"@redocly/theme";import{ExtensionValue as e,FieldLabel as l}from"./index.js";import{globalOptionsAtom as a}from"../../jotai/store.js";import{styled as f}from"../../styled-components.js";const c=f(p)`
|
|
1
|
+
import{jsxs as t,jsx as n}from"react/jsx-runtime";import{memo as i}from"react";import{useAtomValue as m}from"jotai";import{Markdown as p}from"@redocly/theme/components/Markdown/Markdown";import{ExtensionValue as e,FieldLabel as l}from"./index.js";import{globalOptionsAtom as a}from"../../jotai/store.js";import{styled as f}from"../../styled-components.js";const c=f(p)`
|
|
2
2
|
margin: 2px 0;
|
|
3
3
|
`;function d({extensions:r}){const{showExtensions:s}=m(a);return s?n("div",{children:Object.keys(r).map(o=>t(c,{children:[t(l,{children:[o.substring(2),": "]})," ",n(e,{children:typeof r[o]=="string"?r[o]:JSON.stringify(r[o])})]},o))}):null}const w=i(d);export{w as Extensions};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{css as i}from"styled-components";import{breakpoints as r}from"@redocly/theme";import{typography as n}from"../../../utils/index.js";import{deprecatedCss as l}from"../mixins.js";import{styled as a}from"../../../styled-components.js";const p=o=>typeof document<"u"?getComputedStyle(document.documentElement).getPropertyValue(o).trim():"",h=a.caption`
|
|
1
|
+
import{css as i}from"styled-components";import{breakpoints as r}from"@redocly/theme/core/openapi";import{typography as n}from"../../../utils/index.js";import{deprecatedCss as l}from"../mixins.js";import{styled as a}from"../../../styled-components.js";const p=o=>typeof document<"u"?getComputedStyle(document.documentElement).getPropertyValue(o).trim():"",h=a.caption`
|
|
2
2
|
text-align: right;
|
|
3
3
|
font-size: 0.9em;
|
|
4
4
|
font-weight: normal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Button as t}from"@redocly/theme";import{styled as r}from"../../../styled-components.js";const o=r.span`
|
|
1
|
+
import{Button as t}from"@redocly/theme/components/Button/Button";import{styled as r}from"../../../styled-components.js";const o=r.span`
|
|
2
2
|
vertical-align: middle;
|
|
3
3
|
line-height: var(--schema-labels-line-height);
|
|
4
4
|
font-size: var(--schema-property-labels-font-size);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as c}from"react/jsx-runtime";import{css as p}from"styled-components";import{useLocation as l}from"react-router-dom";import{LinkIcon as r}from"@redocly/theme";import{encodeBackSlashes as m}from"../../utils/string.js";import{constructFieldDeepFragment as d,joinWithSeparator as n}from"../../services/history/helpers.js";import{ShareLink as f}from"./linkify.js";import{styled as h}from"../../styled-components.js";function F(i,s){const o=i.deps.operation,e=d(i,s);if(!o?.id&&!o.isCallback)return"#"+e.toLowerCase();const t=n(o.href,n(o.id,e),"#");return m(t.toLowerCase())}const S=({to:i,className:s})=>{const o=i,e=l(),t=o?.split("#")[1],a=e?e.hash===`#${t}`:!1;return c(k,{ariaLabel:`link to ${o}`,className:s,isActive:a,to:o,id:t})},k=h(f)`
|
|
1
|
+
import{jsx as c}from"react/jsx-runtime";import{css as p}from"styled-components";import{useLocation as l}from"react-router-dom";import{LinkIcon as r}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{encodeBackSlashes as m}from"../../utils/string.js";import{constructFieldDeepFragment as d,joinWithSeparator as n}from"../../services/history/helpers.js";import{ShareLink as f}from"./linkify.js";import{styled as h}from"../../styled-components.js";function F(i,s){const o=i.deps.operation,e=d(i,s);if(!o?.id&&!o.isCallback)return"#"+e.toLowerCase();const t=n(o.href,n(o.id,e),"#");return m(t.toLowerCase())}const S=({to:i,className:s})=>{const o=i,e=l(),t=o?.split("#")[1],a=e?e.hash===`#${t}`:!1;return c(k,{ariaLabel:`link to ${o}`,className:s,isActive:a,to:o,id:t})},k=h(f)`
|
|
2
2
|
display: flex;
|
|
3
3
|
${r} {
|
|
4
4
|
visibility: hidden;
|