@redocly/openapi-docs 3.1.0 → 3.1.1
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.
|
@@ -1,4 +1,4 @@
|
|
|
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:
|
|
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:o}=(0,jotai_1.useAtomValue)(store_1.globalOptionsAtom),r=(0,jotai_1.useAtomValue)(app_1.layoutAtom),i=r===theme_1.LayoutVariant.STACKED,a=(0,react_1.useMemo)((()=>t?null:(0,jsx_runtime_1.jsx)(MiddlePanelWrapper,{isStacked:i,children:(0,jsx_runtime_1.jsx)(PageFooter_1.PageFooter,{})})),[t,i]),s=(0,react_1.useMemo)((()=>t||!theme_1.OpenApiHeader&&!n?null:(0,jsx_runtime_1.jsx)(MiddlePanelWrapper,{isStacked:i,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,i]);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:r,children:[(0,jsx_runtime_1.jsx)(SectionContainer,{layout:r,children:e.filter((({type:e})=>"section"===e)).map((e=>(0,jsx_runtime_1.jsx)(ContentItem_1.ContentItem,{item:e,routingBasePath:o},e.id)))}),(0,jsx_runtime_1.jsx)(RightPanelContainer,{isStacked:i,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:o},e.id))),a]})}exports.SectionContent=SectionContent;const MiddlePanelWrapper=(0,styled_components_1.default)(common_1.SamplesMiddlePanel)`
|
|
2
2
|
align-self: flex-start;
|
|
3
3
|
padding-top: var(--panel-gap-vertical);
|
|
4
4
|
padding-bottom: var(--panel-gap-vertical);
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
width: ${({layout:e})=>e===theme_1.LayoutVariant.STACKED?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
10
10
|
}
|
|
11
11
|
`,RightPanelContainer=(0,styled_components_1.default)(common_1.SamplesPanel)`
|
|
12
|
-
margin: var(--spacing-base) 0
|
|
13
|
-
overflow-y: auto;
|
|
14
|
-
max-height: calc(100vh - var(--navbar-height) - var(--panel-gap-vertical) * 2);
|
|
12
|
+
margin: var(--spacing-base) 0;
|
|
15
13
|
`;
|
|
16
14
|
//# sourceMappingURL=SectionContent.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
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:
|
|
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:o},routingBasePath:a}=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&&!o?null:_jsx(MiddlePanelWrapper,{isStacked:r,children:o?_jsx(RenderHook,{Hook:o,props:void 0}):_jsx(OpenApiHeader,{})})),[o,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:a},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:a},e.id))),i]})}const MiddlePanelWrapper=styled(SamplesMiddlePanel)`
|
|
2
2
|
align-self: flex-start;
|
|
3
3
|
padding-top: var(--panel-gap-vertical);
|
|
4
4
|
padding-bottom: var(--panel-gap-vertical);
|
|
@@ -9,8 +9,6 @@ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";i
|
|
|
9
9
|
width: ${({layout:e})=>e===LayoutVariant.STACKED?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
10
10
|
}
|
|
11
11
|
`,RightPanelContainer=styled(SamplesPanel)`
|
|
12
|
-
margin: var(--spacing-base) 0
|
|
13
|
-
overflow-y: auto;
|
|
14
|
-
max-height: calc(100vh - var(--navbar-height) - var(--panel-gap-vertical) * 2);
|
|
12
|
+
margin: var(--spacing-base) 0;
|
|
15
13
|
`;
|
|
16
14
|
//# sourceMappingURL=SectionContent.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"url": "~0.11.0",
|
|
45
45
|
"url-template": "^2.0.8",
|
|
46
46
|
"util": "~0.12.5",
|
|
47
|
-
"@redocly/replay": "0.3.
|
|
47
|
+
"@redocly/replay": "0.3.1",
|
|
48
48
|
"@redocly/config": "0.6.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|