@redocly/openapi-docs 0.83.0-rc.3 → 0.83.0-rc.5
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 +1515 -1545
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.d.ts +0 -2
- package/lib/components/RedoclyOpenAPIDocs/styled.js +4 -38
- package/lib/components/SectionContent/SectionContent.js +2 -11
- package/lib/components/common/panels.js +3 -3
- package/lib/components/index.d.ts +0 -1
- package/lib/components/index.js +1 -1
- package/lib/utils/security-details.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.d.ts +0 -2
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +2 -36
- package/lib-esm/components/SectionContent/SectionContent.js +2 -11
- package/lib-esm/components/common/panels.js +3 -3
- package/lib-esm/components/index.d.ts +0 -1
- package/lib-esm/components/index.js +1 -1
- package/lib-esm/utils/security-details.js +1 -1
- package/package.json +5 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RedoclyOpenAPIDocsStandalone=exports.RedoclyOpenAPIDocs=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),theme_1=require("@redocly/theme"),UnsupportedFeatureScreen_1=require("../UnsupportedFeatureScreen"),Providers_1=require("./Providers"),Overlay_1=require("../Overlay"),styled_1=require("./styled"),StickySidebar_1=require("../StickySidebar"),SideMenu_1=require("../SideMenu"),Content_1=require("../Content"),hooks_1=require("../../hooks"),withRouter_1=require("../../hoc/withRouter"),withStore_1=require("../../hoc/withStore"),utils_1=require("../../utils"),useLicense_1=require("../../hooks/useLicense"),RedoclyOpenAPIDocsComponent=(0,utils_1.compose)(withRouter_1.withRouter,withStore_1.withStore,react_1.memo)((({licenseKey:e,onLoaded:o,children:t,options:i,layout:n,collapsedSidebar:r,parser:s,withCommonStyles:l})=>{var d,u,a,c,_;const m=(0,react_1.useRef)(null),{isValid:p,licenseInfo:h}=(0,useLicense_1.useLicense)(e);(0,hooks_1.useUppercase2LowercaseRedirect)(),(0,theme_1.useMount)((()=>{null==o||o()}));const{hideSidebar:v,scrollYOffset:x}=i||{},{contentItems:y}=(0,hooks_1.useContentItems)({parser:s,options:i}),S=null===(u=null===(d=s.definition)||void 0===d?void 0:d.info)||void 0===u?void 0:u["x-logo"];return(0,jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment,{children:[l&&(0,jsx_runtime_1.jsx)(theme_1.GlobalStyle,{}),(0,jsx_runtime_1.jsxs)(styled_1.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RedoclyOpenAPIDocsStandalone=exports.RedoclyOpenAPIDocs=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),theme_1=require("@redocly/theme"),UnsupportedFeatureScreen_1=require("../UnsupportedFeatureScreen"),Providers_1=require("./Providers"),Overlay_1=require("../Overlay"),styled_1=require("./styled"),StickySidebar_1=require("../StickySidebar"),SideMenu_1=require("../SideMenu"),Content_1=require("../Content"),hooks_1=require("../../hooks"),withRouter_1=require("../../hoc/withRouter"),withStore_1=require("../../hoc/withStore"),utils_1=require("../../utils"),useLicense_1=require("../../hooks/useLicense"),RedoclyOpenAPIDocsComponent=(0,utils_1.compose)(withRouter_1.withRouter,withStore_1.withStore,react_1.memo)((({licenseKey:e,onLoaded:o,children:t,options:i,layout:n,collapsedSidebar:r,parser:s,withCommonStyles:l})=>{var d,u,a,c,_;const m=(0,react_1.useRef)(null),{isValid:p,licenseInfo:h}=(0,useLicense_1.useLicense)(e);(0,hooks_1.useUppercase2LowercaseRedirect)(),(0,theme_1.useMount)((()=>{null==o||o()}));const{hideSidebar:v,scrollYOffset:x}=i||{},{contentItems:y}=(0,hooks_1.useContentItems)({parser:s,options:i}),S=null===(u=null===(d=s.definition)||void 0===d?void 0:d.info)||void 0===u?void 0:u["x-logo"];return(0,jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment,{children:[l&&(0,jsx_runtime_1.jsx)(theme_1.GlobalStyle,{}),(0,jsx_runtime_1.jsxs)(styled_1.RedocWrap,{className:"redoc-wrap",ref:m,children:[(0,jsx_runtime_1.jsx)(UnsupportedFeatureScreen_1.UnsupportedFeatureScreen,{}),!p&&(0,jsx_runtime_1.jsx)(Overlay_1.Overlay,{licenseInfo:h}),(0,jsx_runtime_1.jsx)(styled_1.CssFixes,{layout:n}),!v&&(0,jsx_runtime_1.jsxs)(StickySidebar_1.StickyResponsiveSidebar,{scrollYOffset:x,className:"menu-content",collapsedSidebar:!r,children:[(0,jsx_runtime_1.jsx)(theme_1.SidebarLogo,{imageUrl:null==S?void 0:S.url,href:(null==S?void 0:S.href)||(null===(_=null===(c=null===(a=s.definition)||void 0===a?void 0:a.info)||void 0===c?void 0:c.contact)||void 0===_?void 0:_.url),altText:null==S?void 0:S.altText,backgroundColor:null==S?void 0:S.backgroundColor}),(0,jsx_runtime_1.jsx)(SideMenu_1.SideMenu,{items:p?y:[]})]}),(0,jsx_runtime_1.jsxs)(theme_1.ThreePanelLayout,{className:"api-content",id:"api-content",layout:n===theme_1.LayoutVariant.THREE_PANEL?theme_1.LayoutVariant.THREE_PANEL:theme_1.LayoutVariant.STACKED,collapsedSidebar:r,children:[(0,jsx_runtime_1.jsx)(Content_1.Content,{items:p?y:[],routingBasePath:i.routingBasePath}),t]})]})]})}));function RedoclyOpenAPIDocs({onLoaded:e,children:o,store:t,withCommonStyles:i}){var n,r,s;return(null==t?void 0:t.definition)?(0,jsx_runtime_1.jsx)(Providers_1.StoreProvider,Object.assign({},t,{children:(0,jsx_runtime_1.jsx)(RedoclyOpenAPIDocsComponent,{onLoaded:e,basePath:null===(n=t.options)||void 0===n?void 0:n.routingBasePath,licenseKey:null===(r=t.options)||void 0===r?void 0:r.licenseKey,disableRouter:null===(s=t.options)||void 0===s?void 0:s.disableRouter,withCommonStyles:i,children:o})})):null}function RedoclyOpenAPIDocsStandalone({definition:e,definitionUrl:o,options:t={},activeItemId:i,activeSampleLanguage:n,activeDeepLink:r}){return(0,jsx_runtime_1.jsx)(Providers_1.AppProvider,{definition:e,definitionUrl:o,options:t,activeItemId:i,activeSampleLanguage:n,activeDeepLink:r,children:(0,jsx_runtime_1.jsx)(RedoclyOpenAPIDocs,{withCommonStyles:!0})})}exports.RedoclyOpenAPIDocs=RedoclyOpenAPIDocs,exports.RedoclyOpenAPIDocsStandalone=RedoclyOpenAPIDocsStandalone;
|
|
2
2
|
//# sourceMappingURL=RedoclyOpenAPIDocs.js.map
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { FlattenSimpleInterpolation } from 'styled-components';
|
|
2
2
|
import type { CssFixesProps } from './types';
|
|
3
3
|
export declare const RedocWrap: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const BackgroundStub: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const RedocWrapStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
4
|
export declare const getMarginFixesByName: (variableName: string) => FlattenSimpleInterpolation;
|
|
7
5
|
export declare const CssFixes: import("styled-components").GlobalStyleComponent<CssFixesProps, import("styled-components").DefaultTheme>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,a,i){void 0===i&&(i=a);var
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,a,i){void 0===i&&(i=a);var r=Object.getOwnPropertyDescriptor(t,a);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[a]}}),Object.defineProperty(e,i,r)}:function(e,t,a,i){void 0===i&&(i=a),e[i]=t[a]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&__createBinding(t,e,a);return __setModuleDefault(t,e),t};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CssFixes=exports.getMarginFixesByName=exports.RedocWrap=void 0;const theme_1=require("@redocly/theme"),styled_components_1=__importStar(require("styled-components")),common_1=require("../common");exports.RedocWrap=styled_components_1.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
text-align: left;
|
|
5
|
+
background-color: var(--bg-color);
|
|
5
6
|
tap-highlight-color: rgba(0, 0, 0, 0);
|
|
6
7
|
text-size-adjust: 100%;
|
|
7
8
|
text-rendering: var(--text-rendering, auto) !important;
|
|
@@ -17,52 +18,17 @@
|
|
|
17
18
|
box-sizing: border-box;
|
|
18
19
|
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
|
19
20
|
}
|
|
20
|
-
`,exports.BackgroundStub=styled_components_1.default.div`
|
|
21
|
-
position: absolute;
|
|
22
|
-
display: none;
|
|
23
|
-
top: 0;
|
|
24
|
-
bottom: 0;
|
|
25
|
-
right: 0;
|
|
26
|
-
left: 0;
|
|
27
|
-
background: var(--panel-samples-block-bg-color);
|
|
28
|
-
|
|
29
|
-
@media screen and (min-width: ${theme_1.breakpoints.medium}) {
|
|
30
|
-
display: initial;
|
|
31
|
-
left: calc(100% - var(--panel-samples-width));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@media print {
|
|
35
|
-
display: none;
|
|
36
|
-
}
|
|
37
|
-
`,exports.RedocWrapStyled=(0,styled_components_1.default)(exports.RedocWrap)`
|
|
38
|
-
background-color: var(--bg-color);
|
|
39
21
|
`;const getMarginFixesByName=e=>styled_components_1.css`
|
|
40
22
|
margin: 0 max(calc((100% - var(--panel-samples-width) - var(${e})) / 2), 0);
|
|
41
23
|
`;exports.getMarginFixesByName=getMarginFixesByName,exports.CssFixes=styled_components_1.createGlobalStyle`
|
|
42
|
-
|
|
43
|
-
content: " ";
|
|
44
|
-
display: block;
|
|
45
|
-
height: 0;
|
|
46
|
-
clear: both;
|
|
47
|
-
visibility: hidden;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
${panels_1.SamplesPanel} {
|
|
24
|
+
${common_1.SamplesPanel} {
|
|
51
25
|
${({layout:e})=>{if(e===theme_1.LayoutVariant.STACKED)return styled_components_1.css`
|
|
52
26
|
width: 100%;
|
|
53
27
|
padding-left: var(--panel-gap-horizontal);
|
|
54
28
|
`}}
|
|
55
29
|
}
|
|
56
30
|
|
|
57
|
-
${
|
|
58
|
-
${({layout:e})=>{if(e===theme_1.LayoutVariant.STACKED)return styled_components_1.css`
|
|
59
|
-
@media screen and (min-width: ${theme_1.breakpoints.medium}) {
|
|
60
|
-
display: none;
|
|
61
|
-
}
|
|
62
|
-
`}}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
${panels_1.SamplesMiddlePanel} {
|
|
31
|
+
${common_1.SamplesMiddlePanel} {
|
|
66
32
|
${({layout:e})=>e===theme_1.LayoutVariant.THREE_PANEL?styled_components_1.css`
|
|
67
33
|
margin: 0;
|
|
68
34
|
@media screen and (min-width: ${theme_1.breakpoints.small}) {
|
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SectionContent=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),theme_1=require("@redocly/theme"),jotai_1=require("jotai"),styled_components_1=__importDefault(require("styled-components")),ContentItem_1=require("../ContentItem"),PageFooter_1=require("../PageFooter"),store_1=require("../../jotai/store"),RenderHook_1=require("../RenderHook"),RightPanel_1=require("../RightPanel"),app_1=require("../../jotai/app"),common_1=require("../common");function SectionContent({items:e,hideFooterAndHeader:t}){const{unstable_hooks:{MiddlePanelHeader:n},routingBasePath:
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
margin-bottom: var(--spacing-xxl);
|
|
5
|
-
`,MiddlePanelWrapper=(0,styled_components_1.default)(common_1.SamplesMiddlePanel)`
|
|
1
|
+
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SectionContent=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),theme_1=require("@redocly/theme"),jotai_1=require("jotai"),styled_components_1=__importDefault(require("styled-components")),ContentItem_1=require("../ContentItem"),PageFooter_1=require("../PageFooter"),store_1=require("../../jotai/store"),RenderHook_1=require("../RenderHook"),RightPanel_1=require("../RightPanel"),app_1=require("../../jotai/app"),common_1=require("../common");function SectionContent({items:e,hideFooterAndHeader:t}){const{unstable_hooks:{MiddlePanelHeader:n},routingBasePath:r}=(0,jotai_1.useAtomValue)(store_1.globalOptionsAtom),o=(0,jotai_1.useAtomValue)(app_1.layoutAtom),a=o===theme_1.LayoutVariant.STACKED,i=(0,react_1.useMemo)((()=>t?null:(0,jsx_runtime_1.jsx)(MiddlePanelWrapper,{isStacked:a,children:(0,jsx_runtime_1.jsx)(PageFooter_1.PageFooter,{})})),[t,a]),s=(0,react_1.useMemo)((()=>t||!theme_1.OpenApiHeader&&!n?null:(0,jsx_runtime_1.jsx)(MiddlePanelWrapper,{isStacked:a,children:n?(0,jsx_runtime_1.jsx)(RenderHook_1.RenderHook,{Hook:n,props:void 0}):(0,jsx_runtime_1.jsx)(theme_1.OpenApiHeader,{})})),[n,t,a]);return 0===e.length?null:(0,jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment,{children:[s,(0,jsx_runtime_1.jsxs)(common_1.Row,{layout:o,children:[(0,jsx_runtime_1.jsx)(SectionContainer,{layout:o,children:e.filter((({type:e})=>"section"===e)).map((e=>(0,jsx_runtime_1.jsx)(ContentItem_1.ContentItem,{item:e,routingBasePath:r},e.id)))}),(0,jsx_runtime_1.jsx)(RightPanelContainer,{isStacked:a,tabIndex:0,children:(0,jsx_runtime_1.jsx)(RightPanel_1.RightPanel,{item:e[0]})})]}),e.filter((({type:e})=>"section"!==e)).map((e=>(0,jsx_runtime_1.jsx)(ContentItem_1.ContentItem,{item:e,routingBasePath:r},e.id))),i]})}exports.SectionContent=SectionContent;const MiddlePanelWrapper=(0,styled_components_1.default)(common_1.SamplesMiddlePanel)`
|
|
6
2
|
align-self: flex-start;
|
|
7
3
|
padding-top: var(--panel-gap-vertical);
|
|
8
4
|
padding-bottom: var(--panel-gap-vertical);
|
|
9
5
|
`,SectionContainer=styled_components_1.default.div`
|
|
10
6
|
width: 100%;
|
|
11
7
|
|
|
12
|
-
@media screen and (min-width: ${theme_1.breakpoints.
|
|
8
|
+
@media screen and (min-width: ${theme_1.breakpoints.large}) {
|
|
13
9
|
width: ${({layout:e})=>e===theme_1.LayoutVariant.STACKED?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
14
10
|
}
|
|
15
11
|
`,RightPanelContainer=(0,styled_components_1.default)(common_1.SamplesPanel)`
|
|
16
12
|
margin: var(--spacing-base) 0 var(--spacing-xs);
|
|
17
|
-
display: none;
|
|
18
13
|
overflow-y: auto;
|
|
19
14
|
max-height: calc(100vh - var(--navbar-height) - var(--panel-gap-vertical) * 2);
|
|
20
|
-
|
|
21
|
-
@media screen and (min-width: ${theme_1.breakpoints.medium}) {
|
|
22
|
-
display: ${({isStacked:e})=>e?"none":"block"};
|
|
23
|
-
}
|
|
24
15
|
`;
|
|
25
16
|
//# sourceMappingURL=SectionContent.js.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
display: none;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
@media screen and (min-width: ${theme_1.breakpoints.
|
|
12
|
+
@media screen and (min-width: ${theme_1.breakpoints.large}) {
|
|
13
13
|
width: ${a?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
14
14
|
padding-left: ${t?"var(--panel-gap-horizontal)":"calc(var(--panel-gap-horizontal) * 2)"};
|
|
15
15
|
padding-right: ${t?"var(--panel-gap-vertical)":"var(--panel-gap-horizontal)"};
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
display: none;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
@media screen and (min-width: ${theme_1.breakpoints.
|
|
95
|
+
@media screen and (min-width: ${theme_1.breakpoints.large}) {
|
|
96
96
|
width: var(--panel-samples-width);
|
|
97
97
|
padding-top: 0;
|
|
98
98
|
padding-bottom: 0;
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
width: 100%;
|
|
113
113
|
padding: 0;
|
|
114
114
|
|
|
115
|
-
@media screen and (min-width: ${theme_1.breakpoints.
|
|
115
|
+
@media screen and (min-width: ${theme_1.breakpoints.large}) {
|
|
116
116
|
flex-direction: ${({layout:e})=>e!==theme_1.LayoutVariant.STACKED?"row":"column"};
|
|
117
117
|
}
|
|
118
118
|
|
package/lib/components/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),__exportStar=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||__createBinding(t,e,r)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SelectWrapper=exports.Example=exports.ExampleValue=exports.PayloadSamples=exports.OperationItem=exports.Discriminator=exports.ContentItems=exports.ContentItem=exports.SectionItem=
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),__exportStar=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||__createBinding(t,e,r)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SelectWrapper=exports.Example=exports.ExampleValue=exports.PayloadSamples=exports.OperationItem=exports.Discriminator=exports.ContentItems=exports.ContentItem=exports.SectionItem=void 0,__exportStar(require("./RedoclyOpenAPIDocs"),exports),__exportStar(require("./pluggable"),exports),__exportStar(require("./common"),exports),__exportStar(require("./ApiInfo"),exports);var SectionItem_1=require("./SectionItem");Object.defineProperty(exports,"SectionItem",{enumerable:!0,get:function(){return SectionItem_1.SectionItem}});var ContentItem_1=require("./ContentItem");Object.defineProperty(exports,"ContentItem",{enumerable:!0,get:function(){return ContentItem_1.ContentItem}});var ContentItems_1=require("./ContentItems");Object.defineProperty(exports,"ContentItems",{enumerable:!0,get:function(){return ContentItems_1.ContentItems}});var Discriminator_1=require("./Discriminator");Object.defineProperty(exports,"Discriminator",{enumerable:!0,get:function(){return Discriminator_1.Discriminator}}),__exportStar(require("./Schema/"),exports);var OperationItem_1=require("./OperationItem");Object.defineProperty(exports,"OperationItem",{enumerable:!0,get:function(){return OperationItem_1.OperationItem}}),__exportStar(require("./Markdown"),exports),__exportStar(require("./Responses"),exports),__exportStar(require("./ResponseSamples/ResponseSamples"),exports);var PayloadSamples_1=require("./PayloadSamples");Object.defineProperty(exports,"PayloadSamples",{enumerable:!0,get:function(){return PayloadSamples_1.PayloadSamples}}),Object.defineProperty(exports,"ExampleValue",{enumerable:!0,get:function(){return PayloadSamples_1.ExampleValue}}),Object.defineProperty(exports,"Example",{enumerable:!0,get:function(){return PayloadSamples_1.Example}}),Object.defineProperty(exports,"SelectWrapper",{enumerable:!0,get:function(){return PayloadSamples_1.SelectWrapper}}),__exportStar(require("./MediaTypeSwitch"),exports),__exportStar(require("./RequestParameters"),exports),__exportStar(require("./SelectOrLabel"),exports),__exportStar(require("./ErrorBoundary"),exports),__exportStar(require("./SideMenu/"),exports),__exportStar(require("./StickySidebar/StickyResponsiveSidebar"),exports),__exportStar(require("./SchemaDefinition/SchemaDefinition"),exports),__exportStar(require("./RequestSamples/RequestSamples"),exports);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setSecurityDetails=exports.getSecurityDetails=exports.setSecurityDetailsVariants=void 0;const theme_1=require("@redocly/theme"),string_1=require("./string"),session_storage_1=require("./session-storage");function setSecurityDetailsVariants(e,s){e=(0,string_1.escapeFormId)(e),(0,session_storage_1.toSessionStorage)(`auth.${e}.variants`,JSON.stringify(s))}function getSecurityDetails(e,s={}){return{raw:s[e+theme_1.SecurityVariablesEnvSuffix.APIKey],password:s[e+theme_1.SecurityVariablesEnvSuffix.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setSecurityDetails=exports.getSecurityDetails=exports.setSecurityDetailsVariants=void 0;const theme_1=require("@redocly/theme"),string_1=require("./string"),session_storage_1=require("./session-storage");function setSecurityDetailsVariants(e,s){e=(0,string_1.escapeFormId)(e),(0,session_storage_1.toSessionStorage)(`auth.${e}.variants`,JSON.stringify(s))}function getSecurityDetails(e,s={}){return{raw:s[e+theme_1.SecurityVariablesEnvSuffix.APIKey],password:s[e+theme_1.SecurityVariablesEnvSuffix.Username],username:s[e+theme_1.SecurityVariablesEnvSuffix.Password],token:s[e+theme_1.SecurityVariablesEnvSuffix.Token]?{access_token:s[e+theme_1.SecurityVariablesEnvSuffix.Token]}:void 0,client_id:s[e+theme_1.SecurityVariablesEnvSuffix.ClientId],client_secret:s[e+theme_1.SecurityVariablesEnvSuffix.ClientSecret],scopes:(0,session_storage_1.fromSessionStorage)(`auth.${e}.scopes`)}}function setSecurityDetails(e,s){e=(0,string_1.escapeFormId)(e),"string"==typeof s?(0,session_storage_1.toSessionStorage)("auth."+e,s):s&&((0,session_storage_1.toSessionStorage)(`auth.${e}.password`,s.password||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.username`,s.username||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.token`,s.token&&JSON.stringify(s.token)||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.client_id`,s.client_id||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.client_secret`,s.client_secret||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.scopes`,s.scopes&&JSON.stringify(s.scopes)||""))}exports.setSecurityDetailsVariants=setSecurityDetailsVariants,exports.getSecurityDetails=getSecurityDetails,exports.setSecurityDetails=setSecurityDetails;
|
|
2
2
|
//# sourceMappingURL=security-details.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useRef,memo}from"react";import{SidebarLogo,GlobalStyle as ThemeCommonStyle,useMount,LayoutVariant,ThreePanelLayout}from"@redocly/theme";import{UnsupportedFeatureScreen}from"../UnsupportedFeatureScreen";import{AppProvider,StoreProvider}from"./Providers";import{Overlay}from"../Overlay";import{
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useRef,memo}from"react";import{SidebarLogo,GlobalStyle as ThemeCommonStyle,useMount,LayoutVariant,ThreePanelLayout}from"@redocly/theme";import{UnsupportedFeatureScreen}from"../UnsupportedFeatureScreen";import{AppProvider,StoreProvider}from"./Providers";import{Overlay}from"../Overlay";import{RedocWrap,CssFixes}from"./styled";import{StickyResponsiveSidebar}from"../StickySidebar";import{SideMenu}from"../SideMenu";import{Content}from"../Content";import{useContentItems,useUppercase2LowercaseRedirect}from"../../hooks";import{withRouter}from"../../hoc/withRouter";import{withStore}from"../../hoc/withStore";import{compose}from"../../utils";import{useLicense}from"../../hooks/useLicense";const RedoclyOpenAPIDocsComponent=compose(withRouter,withStore,memo)((({licenseKey:e,onLoaded:o,children:t,options:i,layout:n,collapsedSidebar:r,parser:s,withCommonStyles:a})=>{var l,d,c,m,u;const p=useRef(null),{isValid:v,licenseInfo:f}=useLicense(e);useUppercase2LowercaseRedirect(),useMount((()=>{null==o||o()}));const{hideSidebar:h,scrollYOffset:S}=i||{},{contentItems:y}=useContentItems({parser:s,options:i}),x=null===(d=null===(l=s.definition)||void 0===l?void 0:l.info)||void 0===d?void 0:d["x-logo"];return _jsxs(_Fragment,{children:[a&&_jsx(ThemeCommonStyle,{}),_jsxs(RedocWrap,{className:"redoc-wrap",ref:p,children:[_jsx(UnsupportedFeatureScreen,{}),!v&&_jsx(Overlay,{licenseInfo:f}),_jsx(CssFixes,{layout:n}),!h&&_jsxs(StickyResponsiveSidebar,{scrollYOffset:S,className:"menu-content",collapsedSidebar:!r,children:[_jsx(SidebarLogo,{imageUrl:null==x?void 0:x.url,href:(null==x?void 0:x.href)||(null===(u=null===(m=null===(c=s.definition)||void 0===c?void 0:c.info)||void 0===m?void 0:m.contact)||void 0===u?void 0:u.url),altText:null==x?void 0:x.altText,backgroundColor:null==x?void 0:x.backgroundColor}),_jsx(SideMenu,{items:v?y:[]})]}),_jsxs(ThreePanelLayout,{className:"api-content",id:"api-content",layout:n===LayoutVariant.THREE_PANEL?LayoutVariant.THREE_PANEL:LayoutVariant.STACKED,collapsedSidebar:r,children:[_jsx(Content,{items:v?y:[],routingBasePath:i.routingBasePath}),t]})]})]})}));export function RedoclyOpenAPIDocs({onLoaded:e,children:o,store:t,withCommonStyles:i}){var n,r,s;return(null==t?void 0:t.definition)?_jsx(StoreProvider,Object.assign({},t,{children:_jsx(RedoclyOpenAPIDocsComponent,{onLoaded:e,basePath:null===(n=t.options)||void 0===n?void 0:n.routingBasePath,licenseKey:null===(r=t.options)||void 0===r?void 0:r.licenseKey,disableRouter:null===(s=t.options)||void 0===s?void 0:s.disableRouter,withCommonStyles:i,children:o})})):null}export function RedoclyOpenAPIDocsStandalone({definition:e,definitionUrl:o,options:t={},activeItemId:i,activeSampleLanguage:n,activeDeepLink:r}){return _jsx(AppProvider,{definition:e,definitionUrl:o,options:t,activeItemId:i,activeSampleLanguage:n,activeDeepLink:r,children:_jsx(RedoclyOpenAPIDocs,{withCommonStyles:!0})})}
|
|
2
2
|
//# sourceMappingURL=RedoclyOpenAPIDocs.js.map
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { FlattenSimpleInterpolation } from 'styled-components';
|
|
2
2
|
import type { CssFixesProps } from './types';
|
|
3
3
|
export declare const RedocWrap: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
-
export declare const BackgroundStub: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const RedocWrapStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
4
|
export declare const getMarginFixesByName: (variableName: string) => FlattenSimpleInterpolation;
|
|
7
5
|
export declare const CssFixes: import("styled-components").GlobalStyleComponent<CssFixesProps, import("styled-components").DefaultTheme>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import{breakpoints,LayoutVariant}from"@redocly/theme";import styled,{createGlobalStyle,css}from"styled-components";import{SamplesMiddlePanel,SamplesPanel}from"../common
|
|
1
|
+
import{breakpoints,LayoutVariant}from"@redocly/theme";import styled,{createGlobalStyle,css}from"styled-components";import{SamplesMiddlePanel,SamplesPanel}from"../common";export const RedocWrap=styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
text-align: left;
|
|
5
|
+
background-color: var(--bg-color);
|
|
5
6
|
tap-highlight-color: rgba(0, 0, 0, 0);
|
|
6
7
|
text-size-adjust: 100%;
|
|
7
8
|
text-rendering: var(--text-rendering, auto) !important;
|
|
@@ -17,36 +18,9 @@ import{breakpoints,LayoutVariant}from"@redocly/theme";import styled,{createGloba
|
|
|
17
18
|
box-sizing: border-box;
|
|
18
19
|
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
|
19
20
|
}
|
|
20
|
-
`;export const BackgroundStub=styled.div`
|
|
21
|
-
position: absolute;
|
|
22
|
-
display: none;
|
|
23
|
-
top: 0;
|
|
24
|
-
bottom: 0;
|
|
25
|
-
right: 0;
|
|
26
|
-
left: 0;
|
|
27
|
-
background: var(--panel-samples-block-bg-color);
|
|
28
|
-
|
|
29
|
-
@media screen and (min-width: ${breakpoints.medium}) {
|
|
30
|
-
display: initial;
|
|
31
|
-
left: calc(100% - var(--panel-samples-width));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@media print {
|
|
35
|
-
display: none;
|
|
36
|
-
}
|
|
37
|
-
`;export const RedocWrapStyled=styled(RedocWrap)`
|
|
38
|
-
background-color: var(--bg-color);
|
|
39
21
|
`;export const getMarginFixesByName=a=>css`
|
|
40
22
|
margin: 0 max(calc((100% - var(--panel-samples-width) - var(${a})) / 2), 0);
|
|
41
23
|
`;export const CssFixes=createGlobalStyle`
|
|
42
|
-
div[data-section-id]::after {
|
|
43
|
-
content: " ";
|
|
44
|
-
display: block;
|
|
45
|
-
height: 0;
|
|
46
|
-
clear: both;
|
|
47
|
-
visibility: hidden;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
24
|
${SamplesPanel} {
|
|
51
25
|
${({layout:a})=>{if(a===LayoutVariant.STACKED)return css`
|
|
52
26
|
width: 100%;
|
|
@@ -54,14 +28,6 @@ import{breakpoints,LayoutVariant}from"@redocly/theme";import styled,{createGloba
|
|
|
54
28
|
`}}
|
|
55
29
|
}
|
|
56
30
|
|
|
57
|
-
${BackgroundStub} {
|
|
58
|
-
${({layout:a})=>{if(a===LayoutVariant.STACKED)return css`
|
|
59
|
-
@media screen and (min-width: ${breakpoints.medium}) {
|
|
60
|
-
display: none;
|
|
61
|
-
}
|
|
62
|
-
`}}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
31
|
${SamplesMiddlePanel} {
|
|
66
32
|
${({layout:a})=>a===LayoutVariant.THREE_PANEL?css`
|
|
67
33
|
margin: 0;
|
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useMemo}from"react";import{breakpoints,LayoutVariant,OpenApiHeader}from"@redocly/theme";import{useAtomValue}from"jotai";import styled from"styled-components";import{ContentItem}from"../ContentItem";import{PageFooter}from"../PageFooter";import{globalOptionsAtom}from"../../jotai/store";import{RenderHook}from"../RenderHook";import{RightPanel}from"../RightPanel";import{layoutAtom}from"../../jotai/app";import{SamplesMiddlePanel,SamplesPanel}from"../common";export function SectionContent({items:e,hideFooterAndHeader:t}){const{unstable_hooks:{MiddlePanelHeader:a},routingBasePath:o}=useAtomValue(globalOptionsAtom),n=useAtomValue(layoutAtom),
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
margin-bottom: var(--spacing-xxl);
|
|
5
|
-
`,MiddlePanelWrapper=styled(SamplesMiddlePanel)`
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useMemo}from"react";import{breakpoints,LayoutVariant,OpenApiHeader}from"@redocly/theme";import{useAtomValue}from"jotai";import styled from"styled-components";import{ContentItem}from"../ContentItem";import{PageFooter}from"../PageFooter";import{globalOptionsAtom}from"../../jotai/store";import{RenderHook}from"../RenderHook";import{RightPanel}from"../RightPanel";import{layoutAtom}from"../../jotai/app";import{Row,SamplesMiddlePanel,SamplesPanel}from"../common";export function SectionContent({items:e,hideFooterAndHeader:t}){const{unstable_hooks:{MiddlePanelHeader:a},routingBasePath:o}=useAtomValue(globalOptionsAtom),n=useAtomValue(layoutAtom),r=n===LayoutVariant.STACKED,i=useMemo((()=>t?null:_jsx(MiddlePanelWrapper,{isStacked:r,children:_jsx(PageFooter,{})})),[t,r]),l=useMemo((()=>t||!OpenApiHeader&&!a?null:_jsx(MiddlePanelWrapper,{isStacked:r,children:a?_jsx(RenderHook,{Hook:a,props:void 0}):_jsx(OpenApiHeader,{})})),[a,t,r]);return 0===e.length?null:_jsxs(_Fragment,{children:[l,_jsxs(Row,{layout:n,children:[_jsx(SectionContainer,{layout:n,children:e.filter((({type:e})=>"section"===e)).map((e=>_jsx(ContentItem,{item:e,routingBasePath:o},e.id)))}),_jsx(RightPanelContainer,{isStacked:r,tabIndex:0,children:_jsx(RightPanel,{item:e[0]})})]}),e.filter((({type:e})=>"section"!==e)).map((e=>_jsx(ContentItem,{item:e,routingBasePath:o},e.id))),i]})}const MiddlePanelWrapper=styled(SamplesMiddlePanel)`
|
|
6
2
|
align-self: flex-start;
|
|
7
3
|
padding-top: var(--panel-gap-vertical);
|
|
8
4
|
padding-bottom: var(--panel-gap-vertical);
|
|
9
5
|
`,SectionContainer=styled.div`
|
|
10
6
|
width: 100%;
|
|
11
7
|
|
|
12
|
-
@media screen and (min-width: ${breakpoints.
|
|
8
|
+
@media screen and (min-width: ${breakpoints.large}) {
|
|
13
9
|
width: ${({layout:e})=>e===LayoutVariant.STACKED?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
14
10
|
}
|
|
15
11
|
`,RightPanelContainer=styled(SamplesPanel)`
|
|
16
12
|
margin: var(--spacing-base) 0 var(--spacing-xs);
|
|
17
|
-
display: none;
|
|
18
13
|
overflow-y: auto;
|
|
19
14
|
max-height: calc(100vh - var(--navbar-height) - var(--panel-gap-vertical) * 2);
|
|
20
|
-
|
|
21
|
-
@media screen and (min-width: ${breakpoints.medium}) {
|
|
22
|
-
display: ${({isStacked:e})=>e?"none":"block"};
|
|
23
|
-
}
|
|
24
15
|
`;
|
|
25
16
|
//# sourceMappingURL=SectionContent.js.map
|
|
@@ -9,7 +9,7 @@ import{H2,LayoutVariant,breakpoints,Markdown}from"@redocly/theme";import styled,
|
|
|
9
9
|
display: none;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
@media screen and (min-width: ${breakpoints.
|
|
12
|
+
@media screen and (min-width: ${breakpoints.large}) {
|
|
13
13
|
width: ${t?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
14
14
|
padding-left: ${i?"var(--panel-gap-horizontal)":"calc(var(--panel-gap-horizontal) * 2)"};
|
|
15
15
|
padding-right: ${i?"var(--panel-gap-vertical)":"var(--panel-gap-horizontal)"};
|
|
@@ -92,7 +92,7 @@ import{H2,LayoutVariant,breakpoints,Markdown}from"@redocly/theme";import styled,
|
|
|
92
92
|
display: none;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
@media screen and (min-width: ${breakpoints.
|
|
95
|
+
@media screen and (min-width: ${breakpoints.large}) {
|
|
96
96
|
width: var(--panel-samples-width);
|
|
97
97
|
padding-top: 0;
|
|
98
98
|
padding-bottom: 0;
|
|
@@ -112,7 +112,7 @@ import{H2,LayoutVariant,breakpoints,Markdown}from"@redocly/theme";import styled,
|
|
|
112
112
|
width: 100%;
|
|
113
113
|
padding: 0;
|
|
114
114
|
|
|
115
|
-
@media screen and (min-width: ${breakpoints.
|
|
115
|
+
@media screen and (min-width: ${breakpoints.large}) {
|
|
116
116
|
flex-direction: ${({layout:a})=>a!==LayoutVariant.STACKED?"row":"column"};
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export*from"./RedoclyOpenAPIDocs";export*from"./pluggable";export
|
|
1
|
+
export*from"./RedoclyOpenAPIDocs";export*from"./pluggable";export*from"./common";export*from"./ApiInfo";export{SectionItem}from"./SectionItem";export{ContentItem}from"./ContentItem";export{ContentItems}from"./ContentItems";export{Discriminator}from"./Discriminator";export*from"./Schema/";export{OperationItem}from"./OperationItem";export*from"./Markdown";export*from"./Responses";export*from"./ResponseSamples/ResponseSamples";export{PayloadSamples,ExampleValue,Example,SelectWrapper}from"./PayloadSamples";export*from"./MediaTypeSwitch";export*from"./RequestParameters";export*from"./SelectOrLabel";export*from"./ErrorBoundary";export*from"./SideMenu/";export*from"./StickySidebar/StickyResponsiveSidebar";export*from"./SchemaDefinition/SchemaDefinition";export*from"./RequestSamples/RequestSamples";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SecurityVariablesEnvSuffix}from"@redocly/theme";import{escapeFormId}from"./string";import{fromSessionStorage,toSessionStorage}from"./session-storage";export function setSecurityDetailsVariants(e,t){e=escapeFormId(e),toSessionStorage(`auth.${e}.variants`,JSON.stringify(t))}export function getSecurityDetails(e,t={}){return{raw:t[e+SecurityVariablesEnvSuffix.APIKey],password:t[e+SecurityVariablesEnvSuffix.
|
|
1
|
+
import{SecurityVariablesEnvSuffix}from"@redocly/theme";import{escapeFormId}from"./string";import{fromSessionStorage,toSessionStorage}from"./session-storage";export function setSecurityDetailsVariants(e,t){e=escapeFormId(e),toSessionStorage(`auth.${e}.variants`,JSON.stringify(t))}export function getSecurityDetails(e,t={}){return{raw:t[e+SecurityVariablesEnvSuffix.APIKey],password:t[e+SecurityVariablesEnvSuffix.Username],username:t[e+SecurityVariablesEnvSuffix.Password],token:t[e+SecurityVariablesEnvSuffix.Token]?{access_token:t[e+SecurityVariablesEnvSuffix.Token]}:void 0,client_id:t[e+SecurityVariablesEnvSuffix.ClientId],client_secret:t[e+SecurityVariablesEnvSuffix.ClientSecret],scopes:fromSessionStorage(`auth.${e}.scopes`)}}export function setSecurityDetails(e,t){e=escapeFormId(e),"string"==typeof t?toSessionStorage("auth."+e,t):t&&(toSessionStorage(`auth.${e}.password`,t.password||""),toSessionStorage(`auth.${e}.username`,t.username||""),toSessionStorage(`auth.${e}.token`,t.token&&JSON.stringify(t.token)||""),toSessionStorage(`auth.${e}.client_id`,t.client_id||""),toSessionStorage(`auth.${e}.client_secret`,t.client_secret||""),toSessionStorage(`auth.${e}.scopes`,t.scopes&&JSON.stringify(t.scopes)||""))}
|
|
2
2
|
//# sourceMappingURL=security-details.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "0.83.0-rc.
|
|
3
|
+
"version": "0.83.0-rc.5",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"openapi-docs": "bin.js"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@redocly/theme": "0.83.0-rc.
|
|
19
|
+
"@redocly/theme": "0.83.0-rc.5",
|
|
20
20
|
"core-js": "^3.1.4",
|
|
21
21
|
"react": "^18.0.0",
|
|
22
22
|
"react-dom": "^18.0.0",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"url": "~0.11.0",
|
|
45
45
|
"url-template": "^2.0.8",
|
|
46
46
|
"util": "~0.12.5",
|
|
47
|
-
"@redocly/replay": "0.83.0-rc.
|
|
48
|
-
"@redocly/config": "0.83.0-rc.
|
|
47
|
+
"@redocly/replay": "0.83.0-rc.5",
|
|
48
|
+
"@redocly/config": "0.83.0-rc.5"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@cfaester/enzyme-adapter-react-18": "0.7.1",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"webpack": "5.91.0",
|
|
96
96
|
"webpack-cli": "5.1.4",
|
|
97
97
|
"webpack-dev-server": "4.15.2",
|
|
98
|
-
"@redocly/theme": "0.83.0-rc.
|
|
98
|
+
"@redocly/theme": "0.83.0-rc.5"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
|
101
101
|
"start": "webpack serve --mode=development --hot",
|