@redocly/asyncapi-docs 1.1.0-next.0 → 1.1.0-next.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 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.JsonSchema=
|
|
1
|
+
"use strict";var _=exports&&exports.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.JsonSchema=a;const r=require("react/jsx-runtime"),s=require("@redocly/openapi-docs"),p=_(require("styled-components"));function a({options:i,schemaResolved:n,schema:u,slug:d,onOneOfChange:c}){var t,o,e;if(!u&&!n)return null;const l={openapi:"3.0.0",info:{version:"1",description:"test",title:"test"},paths:{},"x-root":((o=(t=n?.components)===null||t===void 0?void 0:t.schemas)===null||o===void 0?void 0:o.__root)||u,components:{schemas:Object.assign({},(e=n?.components)===null||e===void 0?void 0:e.schemas)}};return(0,r.jsx)(f,{children:(0,r.jsx)(s.StoreProvider,{options:i,definition:l,children:(0,r.jsx)(s.RedocSchema,{pointer:"#/x-root",slug:d,onOneOfChange:c})})})}const f=p.default.div`
|
|
2
|
+
& > div > div {
|
|
3
|
+
padding-left: 0;
|
|
4
|
+
padding-right: 0;
|
|
5
|
+
}
|
|
6
|
+
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var T=exports&&exports.__createBinding||(Object.create?function(e,n,r,a){a===void 0&&(a=r);var o=Object.getOwnPropertyDescriptor(n,r);(!o||("get"in o?!n.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(e,a,o)}:function(e,n,r,a){a===void 0&&(a=r),e[a]=n[r]}),z=exports&&exports.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,"default",{enumerable:!0,value:n})}:function(e,n){e.default=n}),R=exports&&exports.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&T(n,e,r);return z(n,e),n},U=exports&&exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Operation=void 0;const s=require("react/jsx-runtime"),l=U(require("styled-components")),x=require("jotai"),u=require("@redocly/openapi-docs"),c=require("@redocly/theme"),f=R(require("react")),V=require("react-router-dom"),v=require("./common"),W=require("./OperationBinding"),y=require("../jotai-store/app"),S=require("../hooks"),$=require("../utils");exports.Operation=f.default.memo(({operation:e,dataSectionId:n,headerRow:r,id:a,showDivider:o})=>{var h,m,_,j;const w=(0,x.useAtomValue)(y.layoutAtom),p=(0,x.useAtomValue)(y.routingBasePathAtom),d=(0,x.useAtomValue)(y.definitionAtom),M=w===c.LayoutVariant.STACKED,{getProtocolLabel:B}=(0,S.useProtocolLabels)(),q=(0,S.useTelemetry)(),P=(0,f.useMemo)(()=>Object.entries(e?.bindings||{}).map(([i,t])=>({key:i,value:t})),[e?.bindings]),H=(0,f.useMemo)(()=>{var i;return(i=e?.["x-badges"])===null||i===void 0?void 0:i.map(t=>Object.assign(Object.assign({},t),{position:t.position||"after"}))},[e]),A=(0,V.useNavigate)(),b=(0,f.useCallback)(i=>{var t,g;return(g=Object.entries(((t=d?.components)===null||t===void 0?void 0:t.messages)||{}).find(([D,L])=>(0,$.isEqual)(L,i)))===null||g===void 0?void 0:g[0]},[(h=d?.components)===null||h===void 0?void 0:h.messages]),C=(0,f.useCallback)(i=>{const t=b(i);if(!t||!n)return;const g=n.substring(1).split("/operations")[0],D=(0,c.combineUrls)(p,(0,u.makeDeepLink)(g,`messages&m=${t}`));q.send({type:"asyncapi_docs.message.clicked",payload:{message:t}}),A(D)},[n,b,A,p,q]);return e?(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(F,{sectionId:(0,c.combineUrls)(p,n),"data-component-name":"Operation/Operation",hasHeader:!!r,children:[r,(0,s.jsxs)(u.Row,{layout:w,children:[(0,s.jsxs)(G,{isStacked:M,children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(v.ActionTag,{color:e.action,children:B(e.action)}),(0,s.jsxs)(k,{children:[(0,s.jsx)(u.CustomBadges,{badges:H,children:e.title||a}),(0,s.jsx)(v.ShareLink,{to:(0,c.combineUrls)(p,n),"aria-label":`link to ${e.title||a}`})]}),(0,s.jsx)(v.Information,{summary:e.summary,description:e.description,externalDocs:e.externalDocs}),((m=e.messages)===null||m===void 0?void 0:m.length)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(I,{children:"Messages"}),(0,s.jsx)(E,{children:(_=e.messages)===null||_===void 0?void 0:_.map((i,t)=>(0,s.jsxs)(J,{icon:null,onClick:()=>C(i),children:[i.title||i.name||b(i),(0,s.jsx)(c.ArrowUpRightIcon,{size:"12px"})]},t))})]}),e.reply&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{children:"Reply"}),(0,s.jsxs)(K,{children:[e.reply.address&&(0,s.jsxs)(O,{children:[(0,s.jsx)("span",{children:"Address: "}),(0,s.jsx)("span",{children:e.reply.address.location})]}),e.reply.channel&&(0,s.jsxs)(O,{children:[(0,s.jsx)("span",{children:"Topic: "}),(0,s.jsx)("span",{children:e.reply.channel.address})]}),!!(!((j=e.reply.messages)===null||j===void 0)&&j.length)&&(0,s.jsxs)(O,{children:[(0,s.jsx)("span",{children:"Messages: "}),(0,s.jsx)("span",{children:e.reply.messages.map(i=>i.title||i.name).join(", ")})]})]})]})]}),o&&(0,s.jsx)(N,{})]}),(0,s.jsx)(u.OperationSamplesPanel,{isStacked:M,className:"panel-container-response-samples",children:!!P.length&&(0,s.jsx)(W.OperationBinding,{binding:P[0],id:n})})]})]})}):null});const F=(0,l.default)(u.Section)`
|
|
2
2
|
padding: var(--spacing-lg) 0;
|
|
3
3
|
scroll-margin-top: ${e=>e.hasHeader?"calc(var(--navbar-height) - var(--spacing-xl)*2)":"var(--navbar-height)"} !important;
|
|
4
|
-
`,
|
|
4
|
+
`,k=(0,l.default)(c.H4)`
|
|
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,11 +17,11 @@
|
|
|
17
17
|
visibility: visible;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
20
|
+
`,I=(0,l.default)(c.H4)`
|
|
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
|
-
`,
|
|
24
|
+
`,E=l.default.div`
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: row;
|
|
27
27
|
flex-wrap: wrap;
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
& > span:first-child {
|
|
36
36
|
font-weight: var(--font-weight-medium);
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
38
|
+
`,N=l.default.div`
|
|
39
39
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
40
|
-
`,
|
|
40
|
+
`,G=(0,l.default)(u.SamplesMiddlePanel)`
|
|
41
41
|
display: flex;
|
|
42
42
|
justify-content: space-between;
|
|
43
|
-
`,
|
|
43
|
+
`,J=(0,l.default)(v.TagWithIcon)`
|
|
44
44
|
cursor: pointer;
|
|
45
45
|
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/asyncapi-docs",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.1",
|
|
4
4
|
"description": "Async API docs for Redocly Realm",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"react-router-dom": "^6.21.1",
|
|
40
40
|
"styled-components": "5.3.11",
|
|
41
41
|
"web-vitals": "3.3.1",
|
|
42
|
-
"@redocly/config": "0.
|
|
43
|
-
"@redocly/openapi-docs": "3.12.0-next.
|
|
44
|
-
"@redocly/theme": "0.56.0-next.
|
|
42
|
+
"@redocly/config": "0.27.0",
|
|
43
|
+
"@redocly/openapi-docs": "3.12.0-next.18",
|
|
44
|
+
"@redocly/theme": "0.56.0-next.9"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": "^19.1.0"
|