@redocly/asyncapi-docs 1.7.0-next.1 → 1.7.0-next.2
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,10 +1,8 @@
|
|
|
1
|
-
import{jsx as r,jsxs as p}from"react/jsx-runtime";import s from"styled-components";import{ExampleSwitch as f}from"@redocly/openapi-docs";import{useEffect as h,useMemo as g,useState as u}from"react";import{JsonViewer as v}from"@redocly/theme/components/JsonViewer/JsonViewer";import{Panel as E}from"@redocly/theme/components/Panel/Panel";import{PanelBody as y}from"@redocly/theme/components/Panel/PanelBody";import{PanelHeader as
|
|
1
|
+
import{jsx as r,jsxs as p}from"react/jsx-runtime";import s from"styled-components";import{ExampleSwitch as f}from"@redocly/openapi-docs";import{useEffect as h,useMemo as g,useState as u}from"react";import{JsonViewer as v}from"@redocly/theme/components/JsonViewer/JsonViewer";import{Panel as E}from"@redocly/theme/components/Panel/Panel";import{PanelBody as y}from"@redocly/theme/components/Panel/PanelBody";import{PanelHeader as P}from"@redocly/theme/components/Panel/PanelHeader";import{useProtocolLabels as x,useTelemetry as S}from"../hooks/index.js";const $=({examples:e})=>{const[o,a]=u(e[0]),{getProtocolLabel:i}=x(),d=S();h(()=>{a(e[0])},[e,a]);const m=n=>{const t=e?.find(l=>l.name===n);t&&(a(t),d.sendAsyncapiDocsSwitchExampleClickedMessage({example:n,numberOfExamples:e.length}))},c=g(()=>e?.reduce((n,t,l)=>(n[t.name||`Example ${l+1}`]=Object.assign({},t),n),{}),[e]);return p(b,{className:"panel-messages-samples",header:()=>r(j,{isExpandable:!1,children:i("payload")}),children:[r(f,{examples:c,exampleKey:o?.name,onChange:m}),r(v,{data:o?.payload,expandLevel:3})]})},b=s(E)`
|
|
2
2
|
${y} {
|
|
3
3
|
padding: var(--spacing-sm) 0 0;
|
|
4
4
|
line-height: var(--line-height-md);
|
|
5
5
|
}
|
|
6
|
-
`,
|
|
6
|
+
`,j=s(P)`
|
|
7
7
|
font-weight: var(--font-weight-regular);
|
|
8
|
-
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
`;export{A as SamplesPanel};
|
|
8
|
+
`;export{$ as SamplesPanel};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/asyncapi-docs",
|
|
3
|
-
"version": "1.7.0-next.
|
|
3
|
+
"version": "1.7.0-next.2",
|
|
4
4
|
"description": "Async API docs for Redocly Realm",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"styled-components": "5.3.11",
|
|
41
41
|
"web-vitals": "3.3.1",
|
|
42
42
|
"@redocly/config": "0.41.2",
|
|
43
|
-
"@redocly/openapi-docs": "3.18.0-next.
|
|
44
|
-
"@redocly/theme": "0.62.0-next.
|
|
43
|
+
"@redocly/openapi-docs": "3.18.0-next.2",
|
|
44
|
+
"@redocly/theme": "0.62.0-next.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": "19.2.3"
|