@redocly/asyncapi-docs 1.9.0-next.2 → 1.9.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/RedoclyAsyncAPIDocs.d.ts +6 -1
- package/lib/RedoclyAsyncAPIDocs.js +1 -1
- package/lib/components/ChannelLinkItem.js +2 -2
- package/lib/components/DownloadSpecification.js +2 -2
- package/lib/components/MessageSection.js +4 -4
- package/lib/components/Operation.js +11 -11
- package/lib/components/SamplesPanel.js +4 -4
- package/lib/components/Server.js +6 -6
- package/lib/contexts/telemetry.d.ts +3 -0
- package/lib/contexts/telemetry.js +1 -0
- package/lib/hooks/use-telemetry.d.ts +2 -2
- package/lib/hooks/use-telemetry.js +1 -1
- package/package.json +3 -2
|
@@ -12,6 +12,11 @@ type RedoclyAsyncAPIDocsProps = {
|
|
|
12
12
|
protocol: ProtocolVariant;
|
|
13
13
|
downloadUrls: DownloadUrls[];
|
|
14
14
|
markdocOptions: any;
|
|
15
|
+
telemetryConfig?: {
|
|
16
|
+
collectorUrl?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
serviceVersion?: string;
|
|
19
|
+
};
|
|
15
20
|
};
|
|
16
|
-
export declare const RedoclyAsyncAPIDocs: import("react").MemoExoticComponent<({ pageProps, document, apiItems, routingBasePath, protocol, downloadUrls, markdocOptions, }: RedoclyAsyncAPIDocsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
21
|
+
export declare const RedoclyAsyncAPIDocs: import("react").MemoExoticComponent<({ pageProps, document, apiItems, routingBasePath, protocol, downloadUrls, markdocOptions, telemetryConfig, }: RedoclyAsyncAPIDocsProps) => import("react/jsx-runtime").JSX.Element>;
|
|
17
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as l}from"react/jsx-runtime";import{useMemo as d,memo as A}from"react";import{RedocTelemetry as M}from"@redocly/openapi-docs";import{IS_BROWSER as O}from"@redocly/theme/core/utils";import{useMount as R}from"@redocly/theme/core/hooks";import{AppProvider as u}from"./jotai-store/Provider.js";import{AsyncApiDocs as y}from"./components/AsyncApiDocs.js";import{Breadcrumbs as w}from"./components/Breadcrumbs.js";import{AppRouter as v}from"./components/AppRouter.js";import{usePerformanceMetrics as T}from"./hooks/index.js";import{TelemetryContext as D}from"./contexts/telemetry.js";const g=A(({pageProps:t,document:s,apiItems:c,routingBasePath:m,protocol:r,downloadUrls:n,markdocOptions:p,telemetryConfig:a})=>{const i=d(()=>new M(Object.assign({specType:"asyncapi",serviceName:"realm-ui"},a)),[a]),f=d(()=>({layout:t.apiOptions.layout,protocol:r,routingBasePath:m,downloadUrls:n,definition:s,markdocOptions:p}),[t.apiOptions.layout,r,m,n,s,p]);T({sendTelemetry:b=>{const o=Object.fromEntries(Object.entries(b).map(([h,x])=>[h.toLowerCase(),x]));i.sendPerformanceMetricsMessage([{id:"metrics",object:"metrics",uri:typeof window<"u"?window.location.href:"",cls:o.cls,lcp:o.lcp,fcp:o.fcp,ttfb:o.ttfb}])}}),R(()=>{i.sendViewedMessage([{id:window.location.href,object:"page",uri:window.location.href,layout:t.apiOptions.layout,protocol:r||"default"}])});const j=O?e(u,{store:f,children:l(v,{children:[e(w,{}),e(y,{apiItems:c})]})}):l(u,{store:f,children:[e(w,{}),e(y,{apiItems:c})]});return e(D.Provider,{value:i,children:j})});export{g as RedoclyAsyncAPIDocs};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{jsx as o,jsxs as a}from"react/jsx-runtime";import{useMemo as
|
|
1
|
+
import{jsx as o,jsxs as a}from"react/jsx-runtime";import{useMemo as l}from"react";import{Link as c}from"react-router-dom";import i from"styled-components";import{generateChannelLink as d}from"../utils/index.js";import{ListIcon as m}from"./common/ListIcon.js";import{useTelemetry as k}from"../hooks/index.js";const j=({channel:r,isActive:e})=>{const n=l(()=>d(r),[r]),t=k(),s=()=>{t.sendReferencedInClickedMessage([{id:"asyncapi-docs-channel-link",object:"link",uri:`${window.location.href}#asyncapi-docs-channel-link`,referencedIn:r.title||r.address||r.key}])};return a(p,{children:[o(m,{size:"22px",color:e?"var(--color-info-border)":"var(--border-color-primary)",style:{marginRight:"var(--spacing-xs)",flexShrink:0}}),o(v,{to:n,onClick:s,children:r.title||r.address||r.key})]})},p=i.div`
|
|
2
2
|
padding: var(--spacing-xxs) var(--spacing-md);
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
font-size: var(--font-size-md);
|
|
6
6
|
cursor: pointer;
|
|
7
|
-
`,v=i(
|
|
7
|
+
`,v=i(c)`
|
|
8
8
|
text-decoration: var(--link-decoration);
|
|
9
9
|
color: var(--link-color-primary);
|
|
10
10
|
font-weight: var(--link-font-weight);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,Fragment as
|
|
1
|
+
import{jsx as o,Fragment as c,jsxs as i}from"react/jsx-runtime";import{memo as m,useCallback as p}from"react";import r from"styled-components";import{useDownloadInfo as f}from"@redocly/openapi-docs";import{useAtomValue as w}from"jotai";import{transformStringToTelemetryId as g}from"@redocly/openapi-docs/lib/utils/helpers.js";import{DocumentIcon as x}from"@redocly/theme/icons/DocumentIcon/DocumentIcon";import{JsonIcon as b}from"@redocly/theme/icons/JsonIcon/JsonIcon";import{FileIcon as u}from"@redocly/theme/icons/FileIcon/FileIcon";import{DownloadButton as h}from"@redocly/theme/components/Buttons/DownloadButton";import{downloadUrlsAtom as y}from"../jotai-store/app.js";import{useTelemetry as v}from"../hooks/index.js";function j(){const a=v(),s=w(y),t=f({downloadUrls:s}),l=p(e=>{switch(e){case"yaml":return o(x,{});case"json":return o(b,{});default:return o(u,{})}},[]);return t?o(I,{children:(t||[]).map(({title:e,url:n,iconType:d})=>i(k,{onClick:()=>{a.sendDownloadDefinitionClickedMessage([{id:g("definition",window.location.hostname,e),object:"definition",uri:new URL(n,window.location.origin).href}])},children:[i(D,{children:[l(d),o("a",{href:n,target:"_blank",download:!0,rel:"noreferrer",children:e})]}),o(h,{data:n})]},e))}):o(c,{})}const N=m(j),k=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: baseline;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -28,7 +28,7 @@ import{jsx as o,Fragment as d,jsxs as a}from"react/jsx-runtime";import{memo as m
|
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
white-space: nowrap;
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,I=r.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: center;
|
|
34
34
|
align-self: flex-start;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{jsx as a,jsxs as
|
|
1
|
+
import{jsx as a,jsxs as s}from"react/jsx-runtime";import f from"styled-components";import{useAtomValue as b}from"jotai";import{useLocation as V}from"react-router-dom";import{Row as I,SamplesMiddlePanel as O,OperationSamplesPanel as q,Dropdown as G,makeDeepLink as j,pathIncludesLink as C}from"@redocly/openapi-docs";import{LayoutVariant as U}from"@redocly/config";import{useEffect as $,useMemo as c,useRef as J,useState as w,useCallback as P,memo as Q}from"react";import*as X from"openapi-sampler";import{H4 as Y}from"@redocly/theme/components/Typography/H4";import{Typography as Z}from"@redocly/theme/components/Typography/Typography";import{Segmented as ee}from"@redocly/theme/components/Segmented/Segmented";import{LinkIcon as D}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{combineUrls as R}from"@redocly/theme/core/openapi";import{SamplesPanel as oe}from"./SamplesPanel.js";import{MessageBinding as ne}from"./MessageBinding.js";import{MessageReferences as te}from"./MessageReferences.js";import{layoutAtom as ae,routingBasePathAtom as ie,definitionAtom as se}from"../jotai-store/app.js";import{Message as le}from"./Message.js";import{getSchema as re,modifyPayload as ce}from"../utils/index.js";import{LinkToField as B}from"./common/index.js";import{useTelemetry as de}from"../hooks/index.js";const me=3,$e=Q(({messages:i,id:r})=>{var v;const d=V(),z=c(()=>i.find(e=>C(d,`m=${e.key}`))||i[0],[i,d]),[n,x]=w(z),[g,y]=w(n.value.payload),H=P(e=>{const o=ce(g,e);o&&y(o)},[]),l=b(se),F=P(()=>{var e;return n.value.examples||[{payload:X.sample(Object.assign({},re(g)),{},!((e=l?.components)===null||e===void 0)&&e.schemas?{components:{schemas:l.components.schemas}}:void 0)}]},[g,n.value.examples,(v=l?.components)===null||v===void 0?void 0:v.schemas]),h=b(ae),m=b(ie),k=h===U.STACKED,p=c(()=>i.map(e=>({label:e.value.title||e.value.name||e.key,value:e.key})),[i]),[S,K]=w(!1),M=J(null),A=de();$(()=>{var e;const o=i.find(t=>C(d,`m=${t.key}`));o&&(x(o),!((e=o?.value)===null||e===void 0)&&e.payload&&y(o.value.payload))},[d,i]);const L=P(({value:e})=>{var o;const t=i.find(u=>u.key===e);t&&(A.sendSwitchMessageClickedMessage([{id:`button_message_${t.key}`,object:"button",uri:window.location.href,message:t.key}]),x(t),!((o=t?.value)===null||o===void 0)&&o.payload&&y(t.value.payload))},[i,A]),_=c(()=>Object.entries(n.value.bindings||{}).map(([e,o])=>({key:e,value:o})),[n.value.bindings]),T=c(()=>R(m,j(r,`messages&m=${n.key}`)),[r,m,n.key]);$(()=>{if(!M.current)return;const e=()=>{var o;const t=(o=M.current)===null||o===void 0?void 0:o.querySelectorAll('button[role="tab"]'),u=Array.from(t||[]).some(E=>E.offsetWidth<E.scrollWidth);u!==S&&K(u)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[S,p]);const N=c(()=>R(m,j(r,"messages")),[r,m]);return s(pe,{"data-component-name":"MessageSection/MessageSection",children:[a(I,{layout:h,children:s(O,{isStacked:k,children:[s(ue,{children:[a(B,{to:N}),"Messages"]}),i.length>1?s(W,{children:["Accepts ",a("span",{children:"one of"})," the following messages:"]}):a(W,{children:"Accepts the following message:"})]})}),s(I,{layout:h,children:[s(O,{isStacked:k,children:[s(fe,{children:[a(B,{to:T}),p.length>me||S?a(G,{options:p,value:n.key,onChange:L}):a(ee,{ref:M,size:"small",value:n.key,options:p,onChange:L})]}),a(le,{message:n.value,sectionId:r,id:n.key,onOneOfChange:H})]}),s(q,{isStacked:k,className:"panel-container-response-samples",children:[a(oe,{examples:F()}),!!_.length&&a(ne,{binding:_[0],slug:T}),a(te,{messageKey:n.key})]})]})]})}),pe=f.div`
|
|
2
2
|
padding: var(--spacing-xl) 0 0 0;
|
|
3
3
|
`,ue=f(Y)`
|
|
4
4
|
margin: 0 0 var(--spacing-xs) 0;
|
|
5
5
|
position: relative;
|
|
6
6
|
:hover {
|
|
7
|
-
${
|
|
7
|
+
${D} {
|
|
8
8
|
opacity: 1;
|
|
9
9
|
visibility: visible;
|
|
10
10
|
}
|
|
@@ -17,9 +17,9 @@ import{jsx as a,jsxs as i}from"react/jsx-runtime";import f from"styled-component
|
|
|
17
17
|
`,fe=f.div`
|
|
18
18
|
position: relative;
|
|
19
19
|
:hover {
|
|
20
|
-
${
|
|
20
|
+
${D} {
|
|
21
21
|
opacity: 1;
|
|
22
22
|
visibility: visible;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`;export{
|
|
25
|
+
`;export{$e as MessageSection};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsx as i,jsxs as r,Fragment as
|
|
1
|
+
import{jsx as i,jsxs as r,Fragment as u}from"react/jsx-runtime";import t from"styled-components";import{useAtomValue as b}from"jotai";import{Row as W,SamplesMiddlePanel as $,OperationSamplesPanel as I,Section as R,makeDeepLink as E,CustomBadges as F}from"@redocly/openapi-docs";import{LayoutVariant as K}from"@redocly/config";import{useMemo as O,useCallback as P,memo as N}from"react";import{useNavigate as U}from"react-router-dom";import{H4 as y}from"@redocly/theme/components/Typography/H4";import{ArrowUpRightIcon as V}from"@redocly/theme/icons/ArrowUpRightIcon/ArrowUpRightIcon";import{LinkIcon as q}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{combineUrls as C}from"@redocly/theme/core/openapi";import{PageActions as G}from"@redocly/theme/components/PageActions/PageActions";import{TagWithIcon as J,Information as Q,ActionTag as X,ShareLink as Y}from"./common/index.js";import{OperationBinding as Z}from"./OperationBinding.js";import{layoutAtom as ee,routingBasePathAtom as ie,definitionAtom as ne}from"../jotai-store/app.js";import{useProtocolLabels as se,useTelemetry as re}from"../hooks/index.js";import{isEqual as te}from"../utils/index.js";const He=N(({operation:e,dataSectionId:a,headerRow:w,id:k,showDivider:L})=>{var d,c,m,p;const _=b(ee),g=b(ie),l=b(ne),j=_===K.STACKED,{getProtocolLabel:T}=se(),S=re(),M=O(()=>Object.entries(e?.bindings||{}).map(([n,s])=>({key:n,value:s})),[e?.bindings]),z=O(()=>{var n;return(n=e?.["x-badges"])===null||n===void 0?void 0:n.map(s=>Object.assign(Object.assign({},s),{position:s.position||"after"}))},[e]),A=U(),v=P(n=>{var s,o;return(o=Object.entries(((s=l?.components)===null||s===void 0?void 0:s.messages)||{}).find(([f,D])=>te(D,n)))===null||o===void 0?void 0:o[0]},[(d=l?.components)===null||d===void 0?void 0:d.messages]),B=P(n=>{const s=v(n);if(!s||!a)return;const o=a.substring(1).split("/operations")[0],f=C(g,E(o,`messages&m=${s}`));S.sendMessageClickedMessage([{id:`button_message_${s}`,object:"button",uri:typeof window<"u"?window.location.href:f,message:s}]),A(f)},[a,v,A,g,S]);if(!e)return null;const h=C(g,a);return i(u,{children:r(le,{sectionId:h,"data-component-name":"Operation/Operation",hasHeader:!!w,children:[w,r(W,{layout:_,children:[r(me,{isStacked:j,children:[r("div",{children:[r(ge,{children:[r("div",{children:[i(X,{color:e.action,children:T(e.action)}),r(H,{children:[i(F,{badges:z,children:e.title||k}),i(Y,{to:h,"aria-label":`link to ${e.title||k}`})]})]}),i(G,{pageSlug:h})]}),i(Q,{summary:e.summary,description:e.description,externalDocs:e.externalDocs}),((c=e.messages)===null||c===void 0?void 0:c.length)&&r(u,{children:[i(ae,{children:"Messages"}),i(oe,{children:(m=e.messages)===null||m===void 0?void 0:m.map((n,s)=>r(pe,{icon:null,onClick:()=>B(n),children:[n.title||n.name||v(n),i(V,{size:"12px"})]},s))})]}),e.reply&&r(u,{children:[i(H,{children:"Reply"}),r(de,{children:[e.reply.address&&r(x,{children:[i("span",{children:"Address: "}),i("span",{children:e.reply.address.location})]}),e.reply.channel&&r(x,{children:[i("span",{children:"Topic: "}),i("span",{children:e.reply.channel.address})]}),!!(!((p=e.reply.messages)===null||p===void 0)&&p.length)&&r(x,{children:[i("span",{children:"Messages: "}),i("span",{children:e.reply.messages.map(n=>n.title||n.name).join(", ")})]})]})]})]}),L&&i(ce,{})]}),i(I,{isStacked:j,className:"panel-container-response-samples",children:!!M.length&&i(Z,{binding:M[0],id:a})})]})]})})}),le=t(R)`
|
|
2
2
|
padding: var(--spacing-lg) 0;
|
|
3
3
|
scroll-margin-top: ${e=>e.hasHeader?"calc(var(--navbar-height) + var(--banner-height) - var(--spacing-xl)*2)":"calc(var(--navbar-height) + var(--banner-height))"} !important;
|
|
4
|
-
`,
|
|
4
|
+
`,H=t(y)`
|
|
5
5
|
font-size: var(--font-size-lg);
|
|
6
6
|
font-weight: var(--font-weight-semibold);
|
|
7
7
|
margin: 0 0 var(--spacing-xxs) 0;
|
|
@@ -17,32 +17,32 @@ import{jsx as i,jsxs as r,Fragment as f}from"react/jsx-runtime";import a from"st
|
|
|
17
17
|
visibility: visible;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
20
|
+
`,ae=t(y)`
|
|
21
21
|
font-size: var(--font-size-base);
|
|
22
22
|
font-weight: var(--font-weight-medium);
|
|
23
23
|
margin: var(--spacing-sm) 0 0 0;
|
|
24
|
-
`,oe=
|
|
24
|
+
`,oe=t.div`
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: row;
|
|
27
27
|
flex-wrap: wrap;
|
|
28
28
|
gap: var(--spacing-xs);
|
|
29
29
|
padding: var(--spacing-xs) 0;
|
|
30
|
-
`,
|
|
30
|
+
`,de=t.div`
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: column;
|
|
33
33
|
padding: var(--spacing-xs) 0;
|
|
34
|
-
`,
|
|
34
|
+
`,x=t(y)`
|
|
35
35
|
& > span:first-child {
|
|
36
36
|
font-weight: var(--font-weight-medium);
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
38
|
+
`,ce=t.div`
|
|
39
39
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
40
|
-
`,me=
|
|
40
|
+
`,me=t($)`
|
|
41
41
|
display: flex;
|
|
42
42
|
justify-content: space-between;
|
|
43
|
-
`,pe=
|
|
43
|
+
`,pe=t(J)`
|
|
44
44
|
cursor: pointer;
|
|
45
|
-
`,ge=
|
|
45
|
+
`,ge=t.div`
|
|
46
46
|
display: flex;
|
|
47
47
|
align-items: center;
|
|
48
|
-
`;export{
|
|
48
|
+
`;export{He as Operation};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
${
|
|
1
|
+
import{jsx as l,jsxs as p}from"react/jsx-runtime";import r from"styled-components";import{ExampleSwitch as f}from"@redocly/openapi-docs";import{useEffect as u,useMemo as h,useState as g}from"react";import{JsonViewer as v}from"@redocly/theme/components/JsonViewer/JsonViewer";import{Panel as w}from"@redocly/theme/components/Panel/Panel";import{PanelBody as b}from"@redocly/theme/components/Panel/PanelBody";import{PanelHeader as E}from"@redocly/theme/components/Panel/PanelHeader";import{useProtocolLabels as P,useTelemetry as j}from"../hooks/index.js";const O=({examples:e})=>{const[o,a]=g(e[0]),{getProtocolLabel:d}=P(),s=j();u(()=>{a(e[0])},[e,a]);const m=t=>{const n=e?.find(i=>i.name===t);n&&(a(n),s.sendSwitchExampleClickedMessage([{id:`button_example_${t}`,object:"button",uri:typeof window<"u"?window.location.href:"",example:t,numberOfExamples:e.length}]))},c=h(()=>e?.reduce((t,n,i)=>(t[n.name||`Example ${i+1}`]=Object.assign({},n),t),{}),[e]);return p(x,{className:"panel-messages-samples",header:()=>l(y,{isExpandable:!1,children:d("payload")}),children:[l(f,{examples:c,exampleKey:o?.name,onChange:m}),l(v,{data:o?.payload,expandLevel:3})]})},x=r(w)`
|
|
2
|
+
${b} {
|
|
3
3
|
padding: var(--spacing-sm) 0 0;
|
|
4
4
|
line-height: var(--line-height-md);
|
|
5
5
|
}
|
|
6
|
-
`,
|
|
6
|
+
`,y=r(E)`
|
|
7
7
|
font-weight: var(--font-weight-regular);
|
|
8
|
-
`;export{
|
|
8
|
+
`;export{O as SamplesPanel};
|
package/lib/components/Server.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import o from"styled-components";import{useState as f}from"react";import{DatabaseIcon as u}from"@redocly/theme/icons/DatabaseIcon/DatabaseIcon";import{KafkaIcon as h}from"@redocly/theme/icons/KafkaIcon/KafkaIcon";import{RabbitMQIcon as x}from"@redocly/theme/icons/RabbitMQIcon/RabbitMQIcon";import{CopyButton as g}from"@redocly/theme/components/Buttons/CopyButton";import{Portal as v}from"@redocly/theme/components/Portal/Portal";import{useModalScrollLock as y}from"@redocly/theme/core/hooks";import{Tooltip as b}from"@redocly/theme/components/Tooltip/Tooltip";import{ServerModal as w}from"./ServerModal.js";import{MoreDetailsButton as S,HostList as M}from"./common/index.js";import{useTelemetry as j}from"../hooks/index.js";import{useTranslate as k}from"../hooks/index.js";const F=({server:t,showDetails:s})=>{const[r,a]=f(!1),l=j(),p=k();y(r);const c=i=>{switch(i){case"kafka":return e(h,{size:"20px"});case"amqp":return e(x,{size:"20px"});default:return e(u,{size:"20px"})}},d=()=>{a(!0),l.sendServerModalOpenedMessage([{id:`button_server_modal_${t.key}`,object:"button",uri:typeof window<"u"?window.location.href:""}])};return n(I,{"data-component-name":"Server/Server",children:[n(_,{children:[e(T,{children:c(t.value.protocol)}),e(C,{children:t.key})]}),n(z,{children:[e(M,{children:t.value.host.split(" ").map((i,m)=>e("span",{children:i},m))}),e(b,{tip:p("button.copy.tooltipText","Copy to clipboard"),placement:"top",arrowPosition:"right",children:e(g,{data:t.value.host},t.value.host)})]}),s&&e(B,{onClick:d,children:e(S,{expanded:!1})}),r&&e(v,{mountId:"api-content",children:e(w,{server:t,onClose:()=>a(!1)})})]})},I=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--spacing-xxs);
|
|
@@ -9,20 +9,20 @@ import{jsx as e,jsxs as i}from"react/jsx-runtime";import o from"styled-component
|
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
justify-content: center;
|
|
12
|
-
`,
|
|
12
|
+
`,_=o.div`
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: row;
|
|
15
15
|
align-items: center;
|
|
16
16
|
gap: var(--spacing-xxs);
|
|
17
|
-
`,
|
|
17
|
+
`,z=o.span`
|
|
18
18
|
padding-left: var(--spacing-lg);
|
|
19
19
|
min-height: 24px;
|
|
20
20
|
display: flex;
|
|
21
21
|
align-items: center;
|
|
22
22
|
justify-content: space-between;
|
|
23
|
-
`,
|
|
23
|
+
`,C=o.span`
|
|
24
24
|
font-weight: var(--font-weight-semibold);
|
|
25
25
|
text-transform: capitalize;
|
|
26
|
-
`,
|
|
26
|
+
`,B=o.div`
|
|
27
27
|
padding-left: var(--spacing-lg);
|
|
28
|
-
`;export{
|
|
28
|
+
`;export{F as Server};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as e,useContext as t}from"react";import{RedocTelemetry as o}from"@redocly/openapi-docs";const r=new o({specType:"asyncapi",disabled:!0}),n=e(r);function p(){return t(n)}export{n as TelemetryContext,p as useRedocTelemetry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function useTelemetry():
|
|
1
|
+
import type { RedocTelemetry } from '@redocly/openapi-docs';
|
|
2
|
+
export declare function useTelemetry(): RedocTelemetry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useRedocTelemetry as e}from"../contexts/telemetry.js";function t(){return e()}export{t as useTelemetry};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/asyncapi-docs",
|
|
3
|
-
"version": "1.9.0-next.
|
|
3
|
+
"version": "1.9.0-next.3",
|
|
4
4
|
"description": "Async API docs for Redocly Realm",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"styled-components": "5.3.11",
|
|
41
41
|
"web-vitals": "3.3.1",
|
|
42
42
|
"@redocly/config": "0.44.2",
|
|
43
|
-
"@redocly/openapi-docs": "3.20.0-next.
|
|
43
|
+
"@redocly/openapi-docs": "3.20.0-next.3",
|
|
44
|
+
"@redocly/redoc-opentelemetry": "0.0.7",
|
|
44
45
|
"@redocly/theme": "0.64.0-next.2"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|