@redocly/asyncapi-docs 0.5.0-next.4 → 0.5.0-next.6
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/lib/RedoclyAsyncAPIDocs.d.ts +18 -0
- package/lib/RedoclyAsyncAPIDocs.js +1 -0
- package/lib/components/ApiInfo.d.ts +1 -0
- package/lib/components/ApiInfo.js +1 -0
- package/lib/components/AppRouter.d.ts +5 -0
- package/lib/components/AppRouter.js +1 -0
- package/lib/components/AsyncApiDocs.d.ts +6 -0
- package/lib/components/AsyncApiDocs.js +1 -0
- package/lib/components/Breadcrumbs.d.ts +2 -0
- package/lib/components/Breadcrumbs.js +7 -0
- package/lib/components/ChannelBinding.d.ts +9 -0
- package/lib/components/ChannelBinding.js +1 -0
- package/lib/components/ChannelLinkItem.d.ts +7 -0
- package/lib/components/ChannelLinkItem.js +22 -0
- package/lib/components/ChannelParameters.d.ts +7 -0
- package/lib/components/ChannelParameters.js +10 -0
- package/lib/components/ChannelSection.d.ts +7 -0
- package/lib/components/ChannelSection.js +24 -0
- package/lib/components/DownloadSpecification.d.ts +4 -0
- package/lib/components/DownloadSpecification.js +39 -0
- package/lib/components/ItemsNavigation.d.ts +7 -0
- package/lib/components/ItemsNavigation.js +45 -0
- package/lib/components/JsonSchema.d.ts +11 -0
- package/lib/components/JsonSchema.js +1 -0
- package/lib/components/MarkdownSection.d.ts +6 -0
- package/lib/components/MarkdownSection.js +3 -0
- package/lib/components/Message.d.ts +10 -0
- package/lib/components/Message.js +18 -0
- package/lib/components/MessageAMQPReferences.d.ts +6 -0
- package/lib/components/MessageAMQPReferences.js +25 -0
- package/lib/components/MessageBinding.d.ts +10 -0
- package/lib/components/MessageBinding.js +1 -0
- package/lib/components/MessageReferences.d.ts +5 -0
- package/lib/components/MessageReferences.js +1 -0
- package/lib/components/MessageSection.d.ts +11 -0
- package/lib/components/MessageSection.js +25 -0
- package/lib/components/Operation.d.ts +11 -0
- package/lib/components/Operation.js +45 -0
- package/lib/components/OperationBinding.d.ts +10 -0
- package/lib/components/OperationBinding.js +1 -0
- package/lib/components/OperationSection.d.ts +9 -0
- package/lib/components/OperationSection.js +17 -0
- package/lib/components/RightPanel.d.ts +8 -0
- package/lib/components/RightPanel.js +1 -0
- package/lib/components/SamplesPanel.d.ts +6 -0
- package/lib/components/SamplesPanel.js +10 -0
- package/lib/components/Server.d.ts +10 -0
- package/lib/components/Server.js +28 -0
- package/lib/components/ServerBindingsSection.d.ts +6 -0
- package/lib/components/ServerBindingsSection.js +1 -0
- package/lib/components/ServerModal.d.ts +10 -0
- package/lib/components/ServerModal.js +49 -0
- package/lib/components/ServerOverviewSection.d.ts +6 -0
- package/lib/components/ServerOverviewSection.js +25 -0
- package/lib/components/ServersListPanel.d.ts +12 -0
- package/lib/components/ServersListPanel.js +8 -0
- package/lib/components/TagBlock.d.ts +7 -0
- package/lib/components/TagBlock.js +24 -0
- package/lib/components/common/BindingPanel.d.ts +9 -0
- package/lib/components/common/BindingPanel.js +30 -0
- package/lib/components/common/Information.d.ts +12 -0
- package/lib/components/common/Information.js +6 -0
- package/lib/components/common/Link.d.ts +18 -0
- package/lib/components/common/Link.js +38 -0
- package/lib/components/common/ListIcon.d.ts +8 -0
- package/lib/components/common/ListIcon.js +10 -0
- package/lib/components/common/MoreDetailsButton.d.ts +5 -0
- package/lib/components/common/MoreDetailsButton.js +12 -0
- package/lib/components/common/SectionWrapper.d.ts +6 -0
- package/lib/components/common/SectionWrapper.js +1 -0
- package/lib/components/common/TagWithIcon.d.ts +11 -0
- package/lib/components/common/TagWithIcon.js +30 -0
- package/lib/components/common/index.d.ts +7 -0
- package/lib/components/common/index.js +1 -0
- package/lib/components/common/styles.d.ts +16 -0
- package/lib/components/common/styles.js +83 -0
- package/lib/hooks/index.d.ts +5 -0
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/use-auto-scroll.d.ts +1 -0
- package/lib/hooks/use-auto-scroll.js +1 -0
- package/lib/hooks/use-performance-metrics.d.ts +5 -0
- package/lib/hooks/use-performance-metrics.js +1 -0
- package/lib/hooks/use-protocol-labels.d.ts +16 -0
- package/lib/hooks/use-protocol-labels.js +1 -0
- package/lib/hooks/use-telemetry.d.ts +2 -0
- package/lib/hooks/use-telemetry.js +1 -0
- package/lib/hooks/use-translate.d.ts +2 -0
- package/lib/hooks/use-translate.js +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/jotai-store/Provider.d.ts +16 -0
- package/lib/jotai-store/Provider.js +1 -0
- package/lib/jotai-store/app.d.ts +20 -0
- package/lib/jotai-store/app.js +1 -0
- package/lib/types/apiItem.d.ts +25 -0
- package/lib/types/apiItem.js +1 -0
- package/lib/types/async-api.d.ts +252 -0
- package/lib/types/async-api.js +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.js +1 -0
- package/lib/types/protocol.d.ts +5 -0
- package/lib/types/protocol.js +1 -0
- package/lib/utils/avro-to-json-schema.d.ts +2 -0
- package/lib/utils/avro-to-json-schema.js +1 -0
- package/lib/utils/build-menu-items.d.ts +9 -0
- package/lib/utils/build-menu-items.js +1 -0
- package/lib/utils/find-first-binding.d.ts +2 -0
- package/lib/utils/find-first-binding.js +1 -0
- package/lib/utils/generate-ast.d.ts +2 -0
- package/lib/utils/generate-ast.js +1 -0
- package/lib/utils/generate-channel-link.d.ts +2 -0
- package/lib/utils/generate-channel-link.js +1 -0
- package/lib/utils/generate-message-references-header.d.ts +7 -0
- package/lib/utils/generate-message-references-header.js +1 -0
- package/lib/utils/get-schema.d.ts +1 -0
- package/lib/utils/get-schema.js +1 -0
- package/lib/utils/index.d.ts +12 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/is-equal.d.ts +1 -0
- package/lib/utils/is-equal.js +1 -0
- package/lib/utils/map-channel-to-operations.d.ts +2 -0
- package/lib/utils/map-channel-to-operations.js +1 -0
- package/lib/utils/modify-payload.d.ts +9 -0
- package/lib/utils/modify-payload.js +1 -0
- package/lib/utils/nav-to-api-items.d.ts +3 -0
- package/lib/utils/nav-to-api-items.js +1 -0
- package/lib/utils/try-decode-url-component.d.ts +1 -0
- package/lib/utils/try-decode-url-component.js +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";var m=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SamplesPanel=void 0;const l=require("react/jsx-runtime"),o=require("@redocly/theme"),d=m(require("styled-components")),f=require("@redocly/openapi-docs"),r=require("react"),c=require("../hooks"),v=({examples:e})=>{const[t,s]=(0,r.useState)(e[0]),{getProtocolLabel:u}=(0,c.useProtocolLabels)(),h=(0,c.useTelemetry)();(0,r.useEffect)(()=>{s(e[0])},[e,s]);const _=n=>{const a=e?.find(i=>i.name===n);a&&(s(a),h.send({type:"asyncapi_docs.switch_example.clicked",payload:{example:n,number_of_examples:e.length}}))},p=(0,r.useMemo)(()=>e?.reduce((n,a,i)=>(n[a.name||`Example ${i+1}`]=Object.assign({},a),n),{}),[e]);return(0,l.jsxs)(g,{className:"panel-messages-samples",header:()=>(0,l.jsx)(y,{isExpandable:!1,children:u("payload")}),children:[(0,l.jsx)(P,{examples:p,exampleKey:t?.name,onChange:_}),(0,l.jsx)(o.JsonViewer,{data:t?.payload,expandLevel:3})]})};exports.SamplesPanel=v;const g=(0,d.default)(o.Panel)`
|
|
2
|
+
${o.PanelBody} {
|
|
3
|
+
padding: var(--spacing-sm) 0 0;
|
|
4
|
+
line-height: var(--line-height-md);
|
|
5
|
+
}
|
|
6
|
+
`,y=(0,d.default)(o.PanelHeader)`
|
|
7
|
+
font-weight: var(--font-weight-regular);
|
|
8
|
+
`,P=(0,d.default)(f.ExampleSwitch)`
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AsyncApiServer } from '../types';
|
|
2
|
+
type ServerProps = {
|
|
3
|
+
server: {
|
|
4
|
+
key?: string;
|
|
5
|
+
value: AsyncApiServer;
|
|
6
|
+
};
|
|
7
|
+
showDetails?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const Server: ({ server, showDetails }: ServerProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";var u=exports&&exports.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Server=void 0;const e=require("react/jsx-runtime"),s=u(require("styled-components")),n=require("@redocly/theme"),p=require("react"),x=require("./ServerModal"),l=require("./common"),f=({server:t,showDetails:o})=>{const[i,r]=(0,p.useState)(!1);(0,n.useModalScrollLock)(i);const c=a=>{switch(a){case"kafka":return(0,e.jsx)(n.KafkaIcon,{size:"20px"});case"amqp":return(0,e.jsx)(n.RabbitMQIcon,{size:"20px"});default:return(0,e.jsx)(n.DatabaseIcon,{size:"20px"})}};return(0,e.jsxs)(v,{"data-component-name":"Server/Server",children:[(0,e.jsxs)(g,{children:[(0,e.jsx)(h,{children:c(t.value.protocol)}),(0,e.jsx)(m,{children:t.key})]}),(0,e.jsxs)(j,{children:[(0,e.jsx)(l.HostList,{children:t.value.host.split(" ").map((a,d)=>(0,e.jsx)("span",{children:a},d))}),(0,e.jsx)(n.CopyButton,{data:t.value.host},t.value.host)]}),o&&(0,e.jsx)(_,{onClick:()=>r(!0),children:(0,e.jsx)(l.MoreDetailsButton,{expanded:!1})}),i&&(0,e.jsx)(n.Portal,{mountId:"api-content",children:(0,e.jsx)(x.ServerModal,{server:t,onClose:()=>r(!1)})})]})};exports.Server=f;const v=s.default.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--spacing-xxs);
|
|
5
|
+
padding: var(--spacing-sm) var(--spacing-md);
|
|
6
|
+
`,h=s.default.div`
|
|
7
|
+
width: 20px;
|
|
8
|
+
height: 20px;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
`,g=s.default.div`
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: var(--spacing-xxs);
|
|
17
|
+
`,j=s.default.span`
|
|
18
|
+
padding-left: var(--spacing-lg);
|
|
19
|
+
min-height: 24px;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
`,m=s.default.span`
|
|
24
|
+
font-weight: var(--font-weight-semibold);
|
|
25
|
+
text-transform: capitalize;
|
|
26
|
+
`,_=s.default.div`
|
|
27
|
+
padding-left: var(--spacing-lg);
|
|
28
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var c=exports&&exports.__rest||function(t,r){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&r.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)r.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(o[n[s]]=t[n[s]]);return o};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServerBindingsSection=void 0;const e=require("react/jsx-runtime"),a=require("@redocly/openapi-docs"),d=require("@redocly/theme"),l=require("react"),i=require("./common"),g=require("../hooks"),h=({key:t,value:r})=>{const{bindingVersion:o}=r,n=c(r,["bindingVersion"]);switch(t){case"kafka":return(0,e.jsxs)(e.Fragment,{children:[r.schemaRegistryUrl&&(0,e.jsxs)(i.Section,{children:[(0,e.jsx)(i.Label,{"data-testid":"schema-registry-url-label",children:"Schema Registry URL:"}),(0,e.jsx)(i.ExternalDocumentationWrapper,{children:(0,e.jsx)(a.ExternalDocumentation,{externalDocs:{url:r.schemaRegistryUrl},compact:!0})})]}),r.schemaRegistryUrl&&(0,e.jsxs)(i.Section,{children:[(0,e.jsx)(i.Label,{"data-testid":"schema-registry-vendor-label",children:"Schema Registry Vendor:"}),(0,e.jsx)(i.Value,{"data-testid":"schema-registry-vendor-value",children:r.schemaRegistryVendor})]}),r.bindingVersion&&(0,e.jsxs)(i.Section,{children:[(0,e.jsx)(i.Label,{"data-testid":"binding-version-label",children:"Binding Version:"}),(0,e.jsx)(i.Value,{"data-testid":"binding-version-value",children:r.bindingVersion})]})]});default:return(0,e.jsx)(d.JsonViewer,{data:n,expandLevel:3,hideHeader:!0})}},u=({server:t})=>{const{getProtocolLabel:r}=(0,g.useProtocolLabels)(),o=(0,l.useMemo)(()=>Object.entries(t.bindings||{}).map(([n,s])=>({key:n,value:s}))[0],[t.bindings]);return(0,e.jsxs)(i.Block,{"data-component-name":"ServerBindingsSection/ServerBindingsSection",children:[(0,e.jsxs)(i.Header,{children:[r("server")," Configuration"]}),h(o)]})};exports.ServerBindingsSection=u;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AsyncApiServer } from '../types';
|
|
2
|
+
type ServerModalProps = {
|
|
3
|
+
server: {
|
|
4
|
+
key?: string;
|
|
5
|
+
value: AsyncApiServer;
|
|
6
|
+
};
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const ServerModal: ({ server, onClose }: ServerModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";var u=exports&&exports.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServerModal=void 0;const e=require("react/jsx-runtime"),a=require("@redocly/theme"),o=u(require("styled-components")),l=require("react"),v=require("./ServerOverviewSection"),p=require("./ServerBindingsSection"),g=[{label:"Overview",value:0}],h=({protocol:t})=>{switch(t){case"kafka":return(0,e.jsx)(a.KafkaIcon,{size:"24px"});case"amqp":return(0,e.jsx)(a.RabbitMQIcon,{size:"24px"});default:return(0,e.jsx)(a.DatabaseIcon,{size:"24px"})}},f=({server:t,onClose:n})=>{const[r,c]=(0,l.useState)(0),i=(0,l.useRef)(null);(0,a.useOutsideClick)(i,n),(0,a.useFocusTrap)(i);const s=[...g];return t.value.bindings&&s.push({label:"Configuration",value:2}),(0,e.jsx)(x,{"data-component-name":"ServerModal/ServerModal",children:(0,e.jsxs)(b,{ref:i,tabIndex:0,children:[(0,e.jsx)(m,{onClick:n,"data-testid":"close",variant:"ghost",icon:(0,e.jsx)(a.CloseIcon,{})}),(0,e.jsxs)(S,{children:[(0,e.jsx)(h,{protocol:t.value.protocol}),(0,e.jsx)(_,{children:t.value.protocol}),": ",t.key]}),(0,e.jsx)(a.Segmented,{value:r,onChange:({value:d})=>c(d),options:s}),(0,e.jsxs)(j,{children:[r===0&&(0,e.jsx)(v.ServerOverviewSection,{server:t.value}),r===2&&(0,e.jsx)(p.ServerBindingsSection,{server:t.value})]})]})})};exports.ServerModal=f;const x=o.default.div`
|
|
2
|
+
background: var(--bg-color-modal-overlay);
|
|
3
|
+
position: fixed;
|
|
4
|
+
width: 100vw;
|
|
5
|
+
height: 100vh;
|
|
6
|
+
z-index: var(--z-index-popover);
|
|
7
|
+
left: 0;
|
|
8
|
+
top: 0;
|
|
9
|
+
pointer-events: auto;
|
|
10
|
+
`,b=o.default.div`
|
|
11
|
+
background: var(--bg-color);
|
|
12
|
+
box-shadow: var(--bg-raised-shadow);
|
|
13
|
+
border-radius: var(--border-radius-lg);
|
|
14
|
+
padding: var(--spacing-lg);
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
position: absolute;
|
|
19
|
+
width: 720px;
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
height: auto;
|
|
22
|
+
max-height: 600px;
|
|
23
|
+
overflow-y: scroll;
|
|
24
|
+
left: 50%;
|
|
25
|
+
top: 100px;
|
|
26
|
+
transform: translateX(-50%);
|
|
27
|
+
.tag-grey span {
|
|
28
|
+
font-size: var(--font-size-base);
|
|
29
|
+
line-height: var(--line-height-base);
|
|
30
|
+
}
|
|
31
|
+
`,m=(0,o.default)(a.Button)`
|
|
32
|
+
position: absolute;
|
|
33
|
+
right: var(--spacing-md);
|
|
34
|
+
top: var(--spacing-md);
|
|
35
|
+
`,S=(0,o.default)(a.Typography)`
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
font-size: var(--h4-font-size);
|
|
39
|
+
font-weight: var(--h4-font-weight);
|
|
40
|
+
margin-bottom: var(--spacing-lg);
|
|
41
|
+
svg {
|
|
42
|
+
margin-right: var(--spacing-xs);
|
|
43
|
+
}
|
|
44
|
+
`,_=o.default.span`
|
|
45
|
+
text-transform: capitalize;
|
|
46
|
+
`,j=o.default.div`
|
|
47
|
+
padding-top: var(--spacing-base);
|
|
48
|
+
width: 100%;
|
|
49
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";var j=exports&&exports.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServerOverviewSection=void 0;const e=require("react/jsx-runtime"),x=require("@redocly/theme"),p=require("@redocly/openapi-docs"),c=j(require("styled-components")),h=require("react/jsx-runtime"),i=require("./common"),m=n=>{const s=n.title||n.summary||n.description;return(0,e.jsxs)(i.Block,{children:[(0,e.jsx)(i.Header,{children:"Info"}),(0,e.jsxs)(i.Section,{children:[(0,e.jsx)(i.Label,{children:"Host:"}),(0,e.jsx)(i.Value,{children:(0,e.jsx)(i.HostList,{children:n.host.split(" ").map((r,t)=>(0,e.jsx)("span",{children:r},t))})})]}),(0,e.jsxs)(i.Section,{children:[(0,e.jsxs)(i.Label,{children:["Protocol",n.protocolVersion?" and version":"",":"]}),(0,e.jsxs)(i.Value,{children:[n.protocol,n.protocolVersion&&`, ${n.protocolVersion}`]})]}),s&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o,{}),n.title&&(0,e.jsxs)(i.Section,{children:[(0,e.jsx)(i.Label,{children:"Title:"}),(0,e.jsx)(i.Value,{children:n.title})]}),n.summary&&(0,e.jsxs)(i.Section,{children:[(0,e.jsx)(i.Label,{children:"Summary:"}),(0,e.jsx)(i.Value,{children:n.summary})]}),n.description&&(0,e.jsxs)(i.Section,{children:[(0,e.jsx)(i.Label,{children:"Description:"}),(0,e.jsx)(i.Value,{children:n.description})]})]})]})},u=n=>(0,e.jsxs)(i.Block,{children:[(0,e.jsx)(i.Header,{children:"Variables"}),n.map(({key:s,value:r},t,a)=>(0,e.jsxs)(h.Fragment,{children:[(0,e.jsxs)(i.Section,{children:[(0,e.jsx)(S,{children:s}),r.default&&(0,e.jsxs)(d,{children:["Default",(0,e.jsx)(x.Tag,{size:"small",borderless:!0,children:r.default})]}),r.description&&(0,e.jsx)(_,{children:r.description}),r.enum&&(0,e.jsxs)(d,{children:["Enum",(0,e.jsx)(v,{children:r.enum.map(l=>(0,e.jsx)(x.Tag,{size:"small",borderless:!0,children:l},l))})]})]}),t<a.length-1&&(0,e.jsx)(o,{})]},s))]}),g=n=>(0,e.jsxs)(i.Block,{children:[(0,e.jsx)(i.Header,{children:"Tags"}),n.map((s,r,t)=>(0,e.jsxs)(h.Fragment,{children:[(0,e.jsxs)(i.Section,{children:[(0,e.jsx)(i.Value,{children:s.name}),s.description&&(0,e.jsx)(i.Label,{children:s.description}),s.externalDocs&&(0,e.jsx)(i.ExternalDocumentationWrapper,{children:(0,e.jsx)(p.ExternalDocumentation,{externalDocs:s.externalDocs,compact:!0})})]}),r<t.length-1&&(0,e.jsx)(o,{})]},s.name))]}),f=({server:n})=>{const s=Object.entries(n.variables||{}).map(([a,l])=>({key:a,value:l})),r=n.tags&&n.tags.length>0,t=s.length>0;return(0,e.jsxs)(b,{"data-component-name":"ServerOverviewSection/ServerOverviewSection",children:[m(n),t&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o,{}),u(s)]}),r&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(o,{}),n.tags&&g(n.tags)]})]})};exports.ServerOverviewSection=f;const b=c.default.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--spacing-base);
|
|
5
|
+
`,o=c.default.div`
|
|
6
|
+
border-bottom: 1px solid var(--border-color-secondary);
|
|
7
|
+
`,d=c.default.span`
|
|
8
|
+
display: flex;
|
|
9
|
+
gap: var(--spacing-xxs);
|
|
10
|
+
font-size: var(--font-size-sm);
|
|
11
|
+
line-height: var(--line-height-sm);
|
|
12
|
+
color: var(--text-color-primary);
|
|
13
|
+
`,S=(0,c.default)(d)`
|
|
14
|
+
padding-bottom: var(--spacing-xxs);
|
|
15
|
+
font-weight: var(--font-weight-semibold);
|
|
16
|
+
`,_=c.default.p`
|
|
17
|
+
font-size: var(--font-size-sm);
|
|
18
|
+
line-height: var(--line-height-sm);
|
|
19
|
+
color: var(--text-color-primary);
|
|
20
|
+
margin: 0;
|
|
21
|
+
`,v=c.default.span`
|
|
22
|
+
display: flex;
|
|
23
|
+
gap: var(--spacing-xxs);
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AsyncApiServer } from '../types';
|
|
3
|
+
type ServersListPanelProps = {
|
|
4
|
+
servers: {
|
|
5
|
+
key?: string;
|
|
6
|
+
value: AsyncApiServer;
|
|
7
|
+
}[];
|
|
8
|
+
showDetails?: boolean;
|
|
9
|
+
hideHeader?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const ServersListPanel: React.MemoExoticComponent<({ servers, showDetails, hideHeader }: ServersListPanelProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";var t=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServersListPanel=void 0;const r=require("react/jsx-runtime"),s=require("@redocly/theme"),u=t(require("styled-components")),c=t(require("react")),d=require("./Server"),_=require("../hooks");exports.ServersListPanel=c.default.memo(({servers:e,showDetails:l,hideHeader:a})=>{const{getProtocolLabel:o}=(0,_.useProtocolLabels)();return(0,r.jsx)(v,{className:"panel-messages-samples",header:()=>a?null:(0,r.jsx)(s.PanelHeader,{isExpandable:!1,children:o("servers")}),children:e.map((n,i)=>(0,r.jsx)(d.Server,{server:n,showDetails:l},i))})});const v=(0,u.default)(s.Panel)`
|
|
2
|
+
${s.PanelBody} {
|
|
3
|
+
padding: 0;
|
|
4
|
+
> *:not(:last-child) {
|
|
5
|
+
border-bottom: var(--panel-border-local);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ApiItemsGroup } from '../types';
|
|
3
|
+
type TagBlockProps = {
|
|
4
|
+
tag: ApiItemsGroup;
|
|
5
|
+
};
|
|
6
|
+
export declare const TagBlock: React.MemoExoticComponent<({ tag }: TagBlockProps) => import("react/jsx-runtime").JSX.Element>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";var O=exports&&exports.__createBinding||(Object.create?function(e,n,t,r){r===void 0&&(r=t);var a=Object.getOwnPropertyDescriptor(n,t);(!a||("get"in a?!n.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return n[t]}}),Object.defineProperty(e,r,a)}:function(e,n,t,r){r===void 0&&(r=t),e[r]=n[t]}),C=exports&&exports.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),D=exports&&exports.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&O(n,e,t);return C(n,e),n},P=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TagBlock=void 0;const i=require("react/jsx-runtime"),p=P(require("styled-components")),_=require("jotai"),u=require("@redocly/openapi-docs"),d=require("@redocly/theme"),S=require("react-router-dom"),f=D(require("react")),h=require("../jotai-store/app"),b=require("./common"),A=require("./ItemsNavigation"),L=require("./ChannelSection"),V=require("./MarkdownSection");exports.TagBlock=f.default.memo(({tag:e})=>{var n,t,r,a;const x=(0,_.useAtomValue)(h.layoutAtom),g=(0,_.useAtomValue)(h.routingBasePathAtom),l=(0,_.useAtomValue)(h.definitionAtom),y=(0,_.useAtomValue)(h.markdocOptionsAtom),j=(0,S.useLocation)(),k=(0,S.useNavigate)(),s=!!(!((n=e.items)===null||n===void 0)&&n.length),w=x===d.LayoutVariant.STACKED,c=(r=(t=l?.components)===null||t===void 0?void 0:t.tags)===null||r===void 0?void 0:r[e.label],M=(0,f.useMemo)(()=>{var o,m;return s?(m=(o=l?.channels)===null||o===void 0?void 0:o[e.items[0].id])===null||m===void 0?void 0:m.bindings:void 0},[s,l?.channels,e.items]),v=(0,f.useMemo)(()=>{if(!s)return!1;const o=j.pathname;return o.endsWith(e.link||"")||e.items.some(m=>m.link&&o.toLowerCase().includes(m.link.toLowerCase()))},[s,j.pathname,e.link,e.items]),q=(0,f.useCallback)(()=>{e.link&&k(e.link)},[k,e.link]),B=(0,u.saveTextBeforeHeading)((0,u.getValueFromMdParsedExtension)(c,"description")||"");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(E,{expanded:s&&!v,sectionId:(0,d.combineUrls)(g,e.dataSectionId),children:(0,i.jsxs)(I,{expanded:v,children:[(0,i.jsxs)(u.Row,{layout:x,children:[(0,i.jsxs)(u.SamplesMiddlePanel,{fullWidth:!s,isStacked:w,children:[(0,i.jsxs)($,{children:[e.label,(0,i.jsx)(b.ShareLink,{to:(0,d.combineUrls)(g,e.link),"aria-label":`link to ${e.label}`})]}),c?.description&&(0,i.jsx)(u.Markdown,{source:B,markdocOptions:y}),c?.externalDocs&&(0,i.jsx)(b.ExternalDocumentationWrapper,{children:(0,i.jsx)(u.ExternalDocumentation,{externalDocs:c.externalDocs})})]}),s&&e.items&&(0,i.jsx)(A.ItemsNavigation,{items:e.items,firstChannelBinding:M})]}),s&&!v&&(0,i.jsx)(W,{type:"button",variant:"text",size:"medium",onClick:q,children:"+ Show"})]})}),v&&((a=e.items)===null||a===void 0?void 0:a.map(o=>o.type==="channel"?(0,i.jsx)(L.ChannelSection,{item:o},o.link):o.type==="markdown"?(0,i.jsx)(b.SectionWrapper,{children:(0,i.jsx)(V.MarkdownSection,{item:o})},o.link):null))]})});const E=(0,p.default)(u.Section)`
|
|
2
|
+
scroll-margin-top: calc(var(--navbar-height)) !important;
|
|
3
|
+
`,I=p.default.div`
|
|
4
|
+
padding-bottom: ${({expanded:e})=>e?"var(--spacing-xxl)":""};
|
|
5
|
+
padding-bottom: ${({expanded:e})=>e?"var(--spacing-xxl)":""};
|
|
6
|
+
`,W=(0,p.default)(d.Button)`
|
|
7
|
+
margin: var(--spacing-md) var(--spacing-xl) var(--spacing-xxs);
|
|
8
|
+
width: calc(100% - var(--spacing-xl) * 2);
|
|
9
|
+
|
|
10
|
+
@media screen and (min-width: ${d.breakpoints.medium}) {
|
|
11
|
+
--button-margin-md: calc(var(--spacing-xl) * 2);
|
|
12
|
+
|
|
13
|
+
margin-left: var(--button-margin-md);
|
|
14
|
+
margin-right: var(--button-margin-md);
|
|
15
|
+
width: calc(100% - var(--button-margin-md) * 2);
|
|
16
|
+
}
|
|
17
|
+
`,$=(0,p.default)(d.H2)`
|
|
18
|
+
:hover {
|
|
19
|
+
${d.LinkIcon} {
|
|
20
|
+
opacity: 1;
|
|
21
|
+
visibility: visible;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Panel } from '@redocly/theme';
|
|
2
|
+
type BindingPanelProps = {
|
|
3
|
+
header: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare const BindingPanel: ({ header, children }: BindingPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const CodeBlockPanel: import("styled-components").StyledComponent<typeof Panel, any, {}, never>;
|
|
8
|
+
export declare const Header: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";var i=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Header=exports.CodeBlockPanel=exports.BindingPanel=void 0;const n=require("react/jsx-runtime"),t=require("@redocly/openapi-docs"),a=require("@redocly/theme"),l=i(require("styled-components")),d=({header:e,children:r})=>(0,n.jsx)(exports.CodeBlockPanel,{className:"panel-messages-samples",header:()=>(0,n.jsx)(a.PanelHeader,{isExpandable:!1,children:e}),children:r});exports.BindingPanel=d,exports.CodeBlockPanel=(0,l.default)(a.Panel)`
|
|
2
|
+
${a.PanelBody} {
|
|
3
|
+
background-color: var(--layer-color-ontonal);
|
|
4
|
+
padding: 0;
|
|
5
|
+
|
|
6
|
+
> *:not(:last-child) {
|
|
7
|
+
border-bottom: var(--panel-border-local);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
& div {
|
|
11
|
+
border-bottom: none;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
${a.PanelHeader} {
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: start;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: var(--spacing-xs);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
${t.SamplesMiddlePanel} {
|
|
23
|
+
padding: 0 var(--spacing-md);
|
|
24
|
+
}
|
|
25
|
+
`,exports.Header=l.default.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--spacing-xs);
|
|
30
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type InformationProps = {
|
|
2
|
+
summary?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
externalDocs?: {
|
|
5
|
+
description?: string;
|
|
6
|
+
url: string;
|
|
7
|
+
};
|
|
8
|
+
compact?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const Information: ({ summary, description, externalDocs, className, }: InformationProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";var i=exports&&exports.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Information=void 0;const e=require("react/jsx-runtime"),c=i(require("styled-components")),u=require("jotai"),n=require("@redocly/openapi-docs"),l=require("./styles"),m=require("../../jotai-store/app"),p=({summary:t,description:o,externalDocs:r,className:s})=>{const a=(0,u.useAtomValue)(m.markdocOptionsAtom);return(0,e.jsxs)(_,{className:s,children:[t&&(0,e.jsx)(n.Markdown,{source:t,markdocOptions:a}),o&&(0,e.jsx)(n.Markdown,{source:o,markdocOptions:a}),r&&(0,e.jsx)(l.ExternalDocumentationWrapper,{children:(0,e.jsx)(n.ExternalDocumentation,{externalDocs:r,compact:!0})})]})};exports.Information=p;const _=c.default.div.attrs(()=>({"data-component-name":"Information/Information"}))`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: var(--spacing-xxs);
|
|
5
|
+
margin: var(--spacing-sm) 0 0;
|
|
6
|
+
`;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { PropsWithChildren, ReactElement } from 'react';
|
|
2
|
+
interface LinkProps {
|
|
3
|
+
to: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
id?: string;
|
|
6
|
+
'aria-label'?: string;
|
|
7
|
+
}
|
|
8
|
+
interface LinkToFieldProps {
|
|
9
|
+
to?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ShareLinkProps extends LinkProps {
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
isActive?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function ShareLink(props: ShareLinkProps): ReactElement;
|
|
17
|
+
export declare const LinkToField: ({ to, className, }: PropsWithChildren<LinkToFieldProps>) => ReactElement | null;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";var d=exports&&exports.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),f=exports&&exports.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),h=exports&&exports.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&d(e,i,t);return f(e,i),e};Object.defineProperty(exports,"__esModule",{value:!0}),exports.LinkToField=void 0,exports.ShareLink=s;const c=require("react/jsx-runtime"),a=h(require("styled-components")),l=require("react-router-dom"),o=require("@redocly/theme"),_=require("../../utils");function b(i){const e=i.to;return(0,c.jsx)(l.Link,{"aria-label":i["aria-label"]||`link to ${e}`,id:(0,_.tryDecodeURIComponent)(i.id||""),className:i.className||"",to:e,children:i.children})}function s(i){return(0,c.jsx)(L,Object.assign({},i,{children:(0,c.jsx)(o.LinkIcon,{size:"13px",color:"--heading-anchor-color"})}))}const v=({to:i,className:e})=>{const t=i,n=(0,l.useLocation)(),r=t?.split("#")[1],u=n?n.hash===`#${r}`:!1;return(0,c.jsx)(y,{ariaLabel:`link to ${t}`,className:e,isActive:u,to:t||"",id:r})};exports.LinkToField=v;const y=(0,a.default)(s)`
|
|
2
|
+
display: flex;
|
|
3
|
+
${o.LinkIcon} {
|
|
4
|
+
visibility: hidden;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
background-color: var(--bg-color);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
${({isActive:i})=>i&&(0,a.css)`
|
|
10
|
+
${o.LinkIcon} {
|
|
11
|
+
visibility: visible;
|
|
12
|
+
opacity: 1;
|
|
13
|
+
}
|
|
14
|
+
`}
|
|
15
|
+
:hover ${o.LinkIcon}, :focus ${o.LinkIcon} {
|
|
16
|
+
visibility: visible;
|
|
17
|
+
opacity: 1;
|
|
18
|
+
}
|
|
19
|
+
`,L=(0,a.default)(b)`
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 50%;
|
|
22
|
+
left: 0;
|
|
23
|
+
transform: translate(-100%, -50%);
|
|
24
|
+
padding-right: var(--heading-anchor-offset-right);
|
|
25
|
+
z-index: 1;
|
|
26
|
+
|
|
27
|
+
${o.LinkIcon} {
|
|
28
|
+
opacity: 0;
|
|
29
|
+
transition:
|
|
30
|
+
visibility 0.3s linear,
|
|
31
|
+
opacity 0.3s linear;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:hover ${o.LinkIcon}, :focus ${o.LinkIcon} {
|
|
35
|
+
visibility: visible;
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IconProps } from '@redocly/theme/src/icons/types';
|
|
2
|
+
export declare const ListIcon: import("styled-components").StyledComponent<(props: IconProps) => import("react/jsx-runtime").JSX.Element, any, {
|
|
3
|
+
'data-component-name': string;
|
|
4
|
+
} & {
|
|
5
|
+
color?: string;
|
|
6
|
+
size?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
} & import("react").SVGProps<SVGSVGElement>, "data-component-name">;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";var s=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ListIcon=void 0;const t=require("react/jsx-runtime"),c=s(require("styled-components")),i=require("@redocly/theme"),r=e=>(0,t.jsxs)("svg",Object.assign({viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e,{children:[(0,t.jsxs)("g",{clipPath:"url(#clip0_10754_58823)",children:[(0,t.jsx)("path",{d:"M0 11H22",strokeLinecap:"round"}),(0,t.jsx)("circle",{cx:"4",cy:"11",r:"4"})]}),(0,t.jsx)("defs",{children:(0,t.jsx)("clipPath",{id:"clip0_10754_58823",children:(0,t.jsx)("rect",{width:"22",height:"22",fill:"white"})})})]}));exports.ListIcon=(0,c.default)(r).attrs(()=>({"data-component-name":"icons/ListIcon/ListIcon"}))`
|
|
2
|
+
path,
|
|
3
|
+
circle {
|
|
4
|
+
fill: ${({color:e})=>(0,i.getCssColorVariable)(e)};
|
|
5
|
+
stroke: ${({color:e})=>(0,i.getCssColorVariable)(e)};
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
height: ${({size:e})=>e||"16px"};
|
|
9
|
+
width: ${({size:e})=>e||"16px"};
|
|
10
|
+
`;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";var n=exports&&exports.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.MoreDetailsButton=void 0;const e=require("react/jsx-runtime"),r=require("@redocly/theme"),o=n(require("styled-components")),s=({expanded:t})=>(0,e.jsxs)(i,{children:[(0,e.jsx)("span",{children:"More details"}),(0,e.jsx)(r.Button,{icon:t?(0,e.jsx)(r.ChevronDownIcon,{}):(0,e.jsx)(r.ChevronRightIcon,{}),size:"small",variant:"ghost"})]});exports.MoreDetailsButton=s;const i=o.default.span.attrs(()=>({"data-component-name":"MoreDetailsButton/MoreDetailsButton"}))`
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
align-items: center;
|
|
4
|
+
display: flex;
|
|
5
|
+
& > span {
|
|
6
|
+
color: var(--link-color-primary);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
& path {
|
|
10
|
+
fill: var(--link-color-primary);
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SectionWrapper=void 0;const t=require("react/jsx-runtime"),c=require("jotai"),r=require("@redocly/openapi-docs"),n=require("../../jotai-store/app"),s=({children:o,rightPanel:i})=>{const e=(0,c.useAtomValue)(n.layoutAtom);return(0,t.jsxs)(r.Row,{layout:e,children:[(0,t.jsx)(r.SectionContainer,{layout:e,children:(0,t.jsx)(r.SamplesMiddlePanel,{compact:!0,fullWidth:!0,isStacked:e==="stacked",children:o})}),i]})};exports.SectionWrapper=s;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type TagWithIconProps = {
|
|
3
|
+
icon: ReactNode;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
info?: ReactNode;
|
|
6
|
+
capitalize?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const TagWithIcon: ({ icon, info, children, capitalize, className, onClick, }: TagWithIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";var l=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TagWithIcon=void 0;const r=require("react/jsx-runtime"),t=l(require("styled-components")),s=require("@redocly/theme"),d=({icon:e,info:i,children:a,capitalize:o,className:n,onClick:c})=>(0,r.jsxs)(u,{className:n,onClick:c,children:[e&&(0,r.jsx)(h,{children:e}),(0,r.jsx)(p,{borderless:!0,capitalize:o,children:a}),i&&(0,r.jsx)(g,{children:i})]});exports.TagWithIcon=d;const u=t.default.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: var(--spacing-xxs);
|
|
4
|
+
`,h=t.default.div`
|
|
5
|
+
width: 24px;
|
|
6
|
+
height: 24px;
|
|
7
|
+
border-radius: 50%;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-shrink: 0;
|
|
12
|
+
background-color: var(--layer-color-hover);
|
|
13
|
+
`,p=(0,t.default)(s.Tag)`
|
|
14
|
+
text-transform: ${({capitalize:e})=>e?"capitalize":"initial"};
|
|
15
|
+
margin: 0;
|
|
16
|
+
background-color: var(--layer-color-hover);
|
|
17
|
+
color: inherit;
|
|
18
|
+
& span {
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
}
|
|
21
|
+
`,g=t.default.div`
|
|
22
|
+
width: 24px;
|
|
23
|
+
height: 24px;
|
|
24
|
+
border-radius: var(--border-radius);
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
background-color: var(--layer-color-hover);
|
|
28
|
+
display: flex;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Block, Header, Section, Label, Value, ExternalDocumentationWrapper, HeaderWrapper, TagStyled, TopicConfiguration, TopicConfigurationWrapper, ActionTag, HostList, ApiHeader, } from './styles';
|
|
2
|
+
export { Information } from './Information';
|
|
3
|
+
export { TagWithIcon } from './TagWithIcon';
|
|
4
|
+
export { BindingPanel } from './BindingPanel';
|
|
5
|
+
export { MoreDetailsButton } from './MoreDetailsButton';
|
|
6
|
+
export { SectionWrapper } from './SectionWrapper';
|
|
7
|
+
export { ShareLink, LinkToField } from './Link';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LinkToField=exports.ShareLink=exports.SectionWrapper=exports.MoreDetailsButton=exports.BindingPanel=exports.TagWithIcon=exports.Information=exports.ApiHeader=exports.HostList=exports.ActionTag=exports.TopicConfigurationWrapper=exports.TopicConfiguration=exports.TagStyled=exports.HeaderWrapper=exports.ExternalDocumentationWrapper=exports.Value=exports.Label=exports.Section=exports.Header=exports.Block=void 0;var e=require("./styles");Object.defineProperty(exports,"Block",{enumerable:!0,get:function(){return e.Block}}),Object.defineProperty(exports,"Header",{enumerable:!0,get:function(){return e.Header}}),Object.defineProperty(exports,"Section",{enumerable:!0,get:function(){return e.Section}}),Object.defineProperty(exports,"Label",{enumerable:!0,get:function(){return e.Label}}),Object.defineProperty(exports,"Value",{enumerable:!0,get:function(){return e.Value}}),Object.defineProperty(exports,"ExternalDocumentationWrapper",{enumerable:!0,get:function(){return e.ExternalDocumentationWrapper}}),Object.defineProperty(exports,"HeaderWrapper",{enumerable:!0,get:function(){return e.HeaderWrapper}}),Object.defineProperty(exports,"TagStyled",{enumerable:!0,get:function(){return e.TagStyled}}),Object.defineProperty(exports,"TopicConfiguration",{enumerable:!0,get:function(){return e.TopicConfiguration}}),Object.defineProperty(exports,"TopicConfigurationWrapper",{enumerable:!0,get:function(){return e.TopicConfigurationWrapper}}),Object.defineProperty(exports,"ActionTag",{enumerable:!0,get:function(){return e.ActionTag}}),Object.defineProperty(exports,"HostList",{enumerable:!0,get:function(){return e.HostList}}),Object.defineProperty(exports,"ApiHeader",{enumerable:!0,get:function(){return e.ApiHeader}});var t=require("./Information");Object.defineProperty(exports,"Information",{enumerable:!0,get:function(){return t.Information}});var n=require("./TagWithIcon");Object.defineProperty(exports,"TagWithIcon",{enumerable:!0,get:function(){return n.TagWithIcon}});var i=require("./BindingPanel");Object.defineProperty(exports,"BindingPanel",{enumerable:!0,get:function(){return i.BindingPanel}});var u=require("./MoreDetailsButton");Object.defineProperty(exports,"MoreDetailsButton",{enumerable:!0,get:function(){return u.MoreDetailsButton}});var o=require("./SectionWrapper");Object.defineProperty(exports,"SectionWrapper",{enumerable:!0,get:function(){return o.SectionWrapper}});var r=require("./Link");Object.defineProperty(exports,"ShareLink",{enumerable:!0,get:function(){return r.ShareLink}}),Object.defineProperty(exports,"LinkToField",{enumerable:!0,get:function(){return r.LinkToField}});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Tag } from '@redocly/theme';
|
|
2
|
+
export declare const ApiHeader: import("styled-components").StyledComponent<"h1", any, {}, never>;
|
|
3
|
+
export declare const Block: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const Header: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
5
|
+
export declare const Section: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const Label: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
|
+
export declare const Value: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
8
|
+
export declare const ExternalDocumentationWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
|
+
export declare const HeaderWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
10
|
+
expandable?: boolean;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const TagStyled: import("styled-components").StyledComponent<typeof Tag, any, {}, never>;
|
|
13
|
+
export declare const TopicConfiguration: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
|
+
export declare const TopicConfigurationWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
|
+
export declare const ActionTag: import("styled-components").StyledComponent<typeof Tag, any, {}, never>;
|
|
16
|
+
export declare const HostList: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";var t=exports&&exports.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HostList=exports.ActionTag=exports.TopicConfigurationWrapper=exports.TopicConfiguration=exports.TagStyled=exports.HeaderWrapper=exports.ExternalDocumentationWrapper=exports.Value=exports.Label=exports.Section=exports.Header=exports.Block=exports.ApiHeader=void 0;const e=t(require("styled-components")),i=require("@redocly/theme");exports.ApiHeader=(0,e.default)(i.H1)`
|
|
2
|
+
margin-top: 0;
|
|
3
|
+
margin-bottom: 0;
|
|
4
|
+
& + ${i.Markdown} {
|
|
5
|
+
margin-top: var(--h1-margin-bottom);
|
|
6
|
+
}
|
|
7
|
+
`,exports.Block=e.default.div`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: var(--spacing-xs);
|
|
11
|
+
`,exports.Header=e.default.span`
|
|
12
|
+
font-weight: var(--font-weight-semibold);
|
|
13
|
+
line-height: var(--line-height-lg);
|
|
14
|
+
`,exports.Section=e.default.div`
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: calc(var(--spacing-xxs) / 2);
|
|
18
|
+
`,exports.Label=e.default.span`
|
|
19
|
+
color: var(--text-color-description);
|
|
20
|
+
font-size: var(--font-size-base);
|
|
21
|
+
line-height: var(--line-height-base);
|
|
22
|
+
`,exports.Value=e.default.span`
|
|
23
|
+
font-size: var(--font-size-base);
|
|
24
|
+
line-height: var(--line-height-base);
|
|
25
|
+
`,exports.ExternalDocumentationWrapper=e.default.div`
|
|
26
|
+
font-size: var(--font-size-base);
|
|
27
|
+
line-height: var(--line-height-base);
|
|
28
|
+
`,exports.HeaderWrapper=e.default.div`
|
|
29
|
+
min-height: 40px;
|
|
30
|
+
padding: var(--spacing-xs) var(--spacing-md);
|
|
31
|
+
align-items: center;
|
|
32
|
+
display: flex;
|
|
33
|
+
width: 100%;
|
|
34
|
+
background-color: ${({expandable:a})=>a&&"var(--layer-color)"};
|
|
35
|
+
cursor: ${({expandable:a})=>a&&"pointer"};
|
|
36
|
+
gap: var(--spacing-md);
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
background-color: ${({expandable:a})=>a&&"var(--layer-color-ontonal-hover)"};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& > *:first-child {
|
|
43
|
+
flex: 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& > *:nth-child(2) {
|
|
47
|
+
flex: 2;
|
|
48
|
+
}
|
|
49
|
+
`,exports.TagStyled=(0,e.default)(i.Tag)`
|
|
50
|
+
text-transform: none;
|
|
51
|
+
`,exports.TopicConfiguration=e.default.div`
|
|
52
|
+
min-height: 30px;
|
|
53
|
+
padding: var(--spacing-xs) var(--spacing-md);
|
|
54
|
+
align-items: start;
|
|
55
|
+
display: flex;
|
|
56
|
+
width: 100%;
|
|
57
|
+
gap: var(--spacing-md);
|
|
58
|
+
|
|
59
|
+
& > * {
|
|
60
|
+
flex: 1;
|
|
61
|
+
}
|
|
62
|
+
`,exports.TopicConfigurationWrapper=e.default.div`
|
|
63
|
+
padding-left: var(--spacing-xs);
|
|
64
|
+
background-color: var(--layer-color);
|
|
65
|
+
|
|
66
|
+
& div {
|
|
67
|
+
border-bottom: none;
|
|
68
|
+
}
|
|
69
|
+
`,exports.ActionTag=(0,e.default)(i.Tag)`
|
|
70
|
+
text-transform: uppercase;
|
|
71
|
+
background-color: unset;
|
|
72
|
+
border: none;
|
|
73
|
+
padding: 0;
|
|
74
|
+
margin: 0;
|
|
75
|
+
font-family: var(--font-family-monospaced);
|
|
76
|
+
font-weight: var(--font-weight-semibold);
|
|
77
|
+
font-size: var(--font-size-sm);
|
|
78
|
+
line-height: var(--line-height-sm);
|
|
79
|
+
display: block;
|
|
80
|
+
`,exports.HostList=e.default.span`
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
`;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useAutoScroll } from './use-auto-scroll';
|
|
2
|
+
export { useProtocolLabels } from './use-protocol-labels';
|
|
3
|
+
export { useTranslate } from './use-translate';
|
|
4
|
+
export { usePerformanceMetrics } from './use-performance-metrics';
|
|
5
|
+
export { useTelemetry } from './use-telemetry';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useTelemetry=exports.usePerformanceMetrics=exports.useTranslate=exports.useProtocolLabels=exports.useAutoScroll=void 0;var e=require("./use-auto-scroll");Object.defineProperty(exports,"useAutoScroll",{enumerable:!0,get:function(){return e.useAutoScroll}});var r=require("./use-protocol-labels");Object.defineProperty(exports,"useProtocolLabels",{enumerable:!0,get:function(){return r.useProtocolLabels}});var t=require("./use-translate");Object.defineProperty(exports,"useTranslate",{enumerable:!0,get:function(){return t.useTranslate}});var u=require("./use-performance-metrics");Object.defineProperty(exports,"usePerformanceMetrics",{enumerable:!0,get:function(){return u.usePerformanceMetrics}});var o=require("./use-telemetry");Object.defineProperty(exports,"useTelemetry",{enumerable:!0,get:function(){return o.useTelemetry}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useAutoScroll(routingBasePath: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useAutoScroll=u;const c=require("react"),a=require("react-router-dom"),r=require("@redocly/theme"),l=require("../utils");let i=!0;function u(e){const t=(0,a.useLocation)(),n=(0,r.useActiveSectionId)(t,!1,!1);(0,c.useEffect)(()=>{d({location:t,routingBasePath:e})},[t,e]),(0,c.useEffect)(()=>{if(n&&i){i=!1;return}r.IS_BROWSER&&window.location.pathname!==n&&window.history.replaceState({},"",n)},[n])}function d({location:e,routingBasePath:t}){if(e.pathname===t&&e.hash===""){window.scrollTo(0,0);return}const n=e.pathname,o=m(e.hash),s=f(o)||document.querySelector(`[data-section-id="${n}"]`);s?setTimeout(()=>{s.scrollIntoView()},0):window.scrollTo(0,0)}function m(e){const t=e.replace("#","");if(!t.includes("&m="))return t;const[n,o]=t.split("&m=");return o.includes("&")||o.includes("/")?t:n}function f(e){return document.getElementById((0,l.tryDecodeURIComponent)(e))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.usePerformanceMetrics=l;const i=require("@redocly/theme"),r=require("web-vitals");function l({sendTelemetry:s}){(0,i.useMount)(()=>{const a={},o=[new Promise(n=>(0,r.onCLS)(e=>n({name:"CLS",value:e.value}))),new Promise(n=>(0,r.onLCP)(e=>n({name:"LCP",value:e.value}))),new Promise(n=>(0,r.onFCP)(e=>n({name:"FCP",value:e.value}))),new Promise(n=>(0,r.onTTFB)(e=>n({name:"TTFB",value:e.value})))];Promise.allSettled(o).then(n=>{n.forEach(e=>{if(e.status==="fulfilled"){const{name:t,value:u}=e.value;a[t]=Math.round(u)}}),s(a)})})}
|