@redocly/asyncapi-docs 1.8.0-next.6 → 1.8.0-next.8

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
- import{jsx as o,Fragment as d,jsxs as a}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{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{Button as g}from"@redocly/theme/components/Button/Button";import{DownloadIcon as h}from"@redocly/theme/icons/DownloadIcon/DownloadIcon";import{downloadUrlsAtom as y}from"../jotai-store/app.js";import{useTelemetry as v}from"../hooks/index.js";function D(){const i=v(),s=w(y),n=f({downloadUrls:s}),l=p(e=>{switch(e){case"yaml":return o(x,{});case"json":return o(b,{});default:return o(u,{})}},[]);return n?o(I,{children:(n||[]).map(({title:e,url:t,iconType:c})=>a(j,{onClick:()=>i.sendAsyncapiDocsDownloadDefinitionClickedMessage(),children:[a(k,{children:[l(c),o("a",{href:t,target:"_blank",download:!0,rel:"noreferrer",children:e})]}),o("a",{href:t,target:"_blank",download:!0,rel:"noreferrer",children:o(g,{variant:"text",size:"small","aria-label":"Download",icon:o(h,{})})})]},e))}):o(d,{})}const T=m(D),j=r.div`
1
+ import{jsx as o,Fragment as d,jsxs as a}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{DocumentIcon as x}from"@redocly/theme/icons/DocumentIcon/DocumentIcon";import{JsonIcon as u}from"@redocly/theme/icons/JsonIcon/JsonIcon";import{FileIcon as b}from"@redocly/theme/icons/FileIcon/FileIcon";import{DownloadButton as g}from"@redocly/theme/components/Buttons/DownloadButton";import{downloadUrlsAtom as y}from"../jotai-store/app.js";import{useTelemetry as h}from"../hooks/index.js";function v(){const i=h(),s=w(y),t=f({downloadUrls:s}),l=p(e=>{switch(e){case"yaml":return o(x,{});case"json":return o(u,{});default:return o(b,{})}},[]);return t?o(k,{children:(t||[]).map(({title:e,url:n,iconType:c})=>a(j,{onClick:()=>i.sendAsyncapiDocsDownloadDefinitionClickedMessage(),children:[a(D,{children:[l(c),o("a",{href:n,target:"_blank",download:!0,rel:"noreferrer",children:e})]}),o(g,{data:n})]},e))}):o(d,{})}const N=m(v),j=r.div`
2
2
  display: flex;
3
3
  align-items: baseline;
4
4
  justify-content: space-between;
@@ -10,7 +10,7 @@ import{jsx as o,Fragment as d,jsxs as a}from"react/jsx-runtime";import{memo as m
10
10
  padding-bottom: 0px;
11
11
  border-bottom: none;
12
12
  }
13
- `,k=r.span`
13
+ `,D=r.span`
14
14
  display: flex;
15
15
  width: calc(100% - 25px);
16
16
  gap: var(--spacing-xs);
@@ -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
- `,I=r.div`
31
+ `,k=r.div`
32
32
  display: flex;
33
33
  align-items: center;
34
34
  align-self: flex-start;
@@ -36,4 +36,4 @@ import{jsx as o,Fragment as d,jsxs as a}from"react/jsx-runtime";import{memo as m
36
36
  flex-direction: column;
37
37
  gap: var(--spacing-sm);
38
38
  font-size: var(--font-size-base);
39
- `;export{T as DownloadSpecification};
39
+ `;export{N as DownloadSpecification};
@@ -1,28 +1,28 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"styled-components";import{useState as m}from"react";import{DatabaseIcon as f}from"@redocly/theme/icons/DatabaseIcon/DatabaseIcon";import{KafkaIcon as x}from"@redocly/theme/icons/KafkaIcon/KafkaIcon";import{RabbitMQIcon as g}from"@redocly/theme/icons/RabbitMQIcon/RabbitMQIcon";import{CopyButton as h}from"@redocly/theme/components/Buttons/CopyButton";import{Portal as u}from"@redocly/theme/components/Portal/Portal";import{useModalScrollLock as v}from"@redocly/theme/core/hooks";import{ServerModal as y}from"./ServerModal.js";import{MoreDetailsButton as S,HostList as M}from"./common/index.js";import{useTelemetry as b}from"../hooks/index.js";const P=({server:t,showDetails:s})=>{const[a,i]=m(!1),l=b();v(a);const p=n=>{switch(n){case"kafka":return e(x,{size:"20px"});case"amqp":return e(g,{size:"20px"});default:return e(f,{size:"20px"})}},c=()=>{i(!0),l.sendAsyncapiDocsServerModalOpenedMessage()};return r(I,{"data-component-name":"Server/Server",children:[r(k,{children:[e(j,{children:p(t.value.protocol)}),e(z,{children:t.key})]}),r(w,{children:[e(M,{children:t.value.host.split(" ").map((n,d)=>e("span",{children:n},d))}),e(h,{data:t.value.host},t.value.host)]}),s&&e(B,{onClick:c,children:e(S,{expanded:!1})}),a&&e(u,{mountId:"api-content",children:e(y,{server:t,onClose:()=>i(!1)})})]})},I=o.div`
1
+ import{jsx as e,jsxs as i}from"react/jsx-runtime";import o from"styled-components";import{useState as f}from"react";import{DatabaseIcon as x}from"@redocly/theme/icons/DatabaseIcon/DatabaseIcon";import{KafkaIcon as g}from"@redocly/theme/icons/KafkaIcon/KafkaIcon";import{RabbitMQIcon as h}from"@redocly/theme/icons/RabbitMQIcon/RabbitMQIcon";import{CopyButton as u}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 S}from"./ServerModal.js";import{MoreDetailsButton as M,HostList as w}from"./common/index.js";import{useTelemetry as I}from"../hooks/index.js";import{useTranslate as j}from"../hooks/index.js";const G=({server:t,showDetails:s})=>{const[n,a]=f(!1),l=I(),p=j();y(n);const c=r=>{switch(r){case"kafka":return e(g,{size:"20px"});case"amqp":return e(h,{size:"20px"});default:return e(x,{size:"20px"})}},d=()=>{a(!0),l.sendAsyncapiDocsServerModalOpenedMessage()};return i(k,{"data-component-name":"Server/Server",children:[i(z,{children:[e(T,{children:c(t.value.protocol)}),e(B,{children:t.key})]}),i(C,{children:[e(w,{children:t.value.host.split(" ").map((r,m)=>e("span",{children:r},m))}),e(b,{tip:p("button.copy.tooltipText","Copy to clipboard"),placement:"top",arrowPosition:"right",children:e(u,{data:t.value.host},t.value.host)})]}),s&&e(D,{onClick:d,children:e(M,{expanded:!1})}),n&&e(v,{mountId:"api-content",children:e(S,{server:t,onClose:()=>a(!1)})})]})},k=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: var(--spacing-xxs);
5
5
  padding: var(--spacing-sm) var(--spacing-md);
6
- `,j=o.div`
6
+ `,T=o.div`
7
7
  width: 20px;
8
8
  height: 20px;
9
9
  display: flex;
10
10
  align-items: center;
11
11
  justify-content: center;
12
- `,k=o.div`
12
+ `,z=o.div`
13
13
  display: flex;
14
14
  flex-direction: row;
15
15
  align-items: center;
16
16
  gap: var(--spacing-xxs);
17
- `,w=o.span`
17
+ `,C=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
- `,z=o.span`
23
+ `,B=o.span`
24
24
  font-weight: var(--font-weight-semibold);
25
25
  text-transform: capitalize;
26
- `,B=o.div`
26
+ `,D=o.div`
27
27
  padding-left: var(--spacing-lg);
28
- `;export{P as Server};
28
+ `;export{G as Server};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/asyncapi-docs",
3
- "version": "1.8.0-next.6",
3
+ "version": "1.8.0-next.8",
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.44.0",
43
- "@redocly/openapi-docs": "3.19.0-next.6",
44
- "@redocly/theme": "0.63.0-next.4"
43
+ "@redocly/openapi-docs": "3.19.0-next.8",
44
+ "@redocly/theme": "0.63.0-next.5"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": "^19.2.4"