@redocly/api-docs 0.1.0-next.2 → 0.1.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.
@@ -1,4 +1,4 @@
1
- import{jsx as r,jsxs as o}from"react/jsx-runtime";import{memo as c}from"react";import{styled as i}from"styled-components";import{useAtomValue as p}from"jotai";import{Link as g}from"react-router-dom";import{Tag as d}from"@redocly/theme/components/Tag/Tag";import{ArrowUpRightIcon as f}from"@redocly/theme/icons/ArrowUpRightIcon/ArrowUpRightIcon";import{routingBasePathAtom as h}from"../jotai/store.js";import{buildAsyncApiSuffix as u,buildDeepLinkUrl as x}from"../utils/deep-link.js";import{stripLeadingSlash as k}from"../utils/url.js";import{useNavigationUrlNormalizer as v}from"../hooks/useNormalizeUrl.js";import{useTelemetry as L}from"../hooks/useTelemetry.js";function b({node:n}){const s=p(h),t=v(),a=L(),l=e=>{a.sendMessageClickedMessage([{id:"messageLink",object:"link",uri:"urn:redocly:redoc:ui:link:messageLink",message:e}])},m=e=>t(x(s,k(n.channelLink),u({section:"messages",messageKey:e})));return n.messages.length?o(y,{"data-component-name":"Operation/MessageLinks",children:[r(M,{children:"Messages"}),r(w,{children:n.messages.map(e=>r(T,{to:m(e.name),onClick:()=>l(e.name),children:o(j,{borderless:!0,textTransform:"none",children:[e.label,r(f,{size:"12px"})]})},e.name))})]}):null}const O=c(b),y=i.div`
1
+ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{memo as c}from"react";import{styled as i}from"styled-components";import{useAtomValue as p}from"jotai";import{Link as g}from"react-router";import{Tag as d}from"@redocly/theme/components/Tag/Tag";import{ArrowUpRightIcon as f}from"@redocly/theme/icons/ArrowUpRightIcon/ArrowUpRightIcon";import{routingBasePathAtom as h}from"../jotai/store.js";import{buildAsyncApiSuffix as u,buildDeepLinkUrl as x}from"../utils/deep-link.js";import{stripLeadingSlash as k}from"../utils/url.js";import{useNavigationUrlNormalizer as v}from"../hooks/useNormalizeUrl.js";import{useTelemetry as L}from"../hooks/useTelemetry.js";function b({node:n}){const s=p(h),t=v(),a=L(),l=e=>{a.sendMessageClickedMessage([{id:"messageLink",object:"link",uri:"urn:redocly:redoc:ui:link:messageLink",message:e}])},m=e=>t(x(s,k(n.channelLink),u({section:"messages",messageKey:e})));return n.messages.length?o(y,{"data-component-name":"Operation/MessageLinks",children:[r(M,{children:"Messages"}),r(w,{children:n.messages.map(e=>r(T,{to:m(e.name),onClick:()=>l(e.name),children:o(j,{borderless:!0,textTransform:"none",children:[e.label,r(f,{size:"12px"})]})},e.name))})]}):null}const O=c(b),y=i.div`
2
2
  margin-top: var(--spacing-sm);
3
3
  `,M=i.div`
4
4
  font-size: var(--font-size-base);
@@ -13,7 +13,7 @@ export declare const PropertyName: import("styled-components/dist/types.js").ISt
13
13
  $deprecated?: boolean;
14
14
  }, never>>> & string;
15
15
  export declare const SchemaTypeLabel: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>>> & string;
16
- export declare const SchemaTitle: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react-router-dom").LinkProps & import("react").RefAttributes<HTMLAnchorElement>, never> & Partial<Pick<import("react-router-dom").LinkProps & import("react").RefAttributes<HTMLAnchorElement>, never>>> & string & Omit<import("react").ForwardRefExoticComponent<import("react-router-dom").LinkProps & import("react").RefAttributes<HTMLAnchorElement>>, keyof import("react").Component<any, {}, any>>;
16
+ export declare const SchemaTitle: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react-router").LinkProps & import("react").RefAttributes<HTMLAnchorElement>, never> & Partial<Pick<import("react-router").LinkProps & import("react").RefAttributes<HTMLAnchorElement>, never>>> & string & Omit<import("react").ForwardRefExoticComponent<import("react-router").LinkProps & import("react").RefAttributes<HTMLAnchorElement>>, keyof import("react").Component<any, {}, any>>;
17
17
  export declare const RequiredLabel: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
18
18
  export declare const DeprecatedBadge: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>, "as" | "forwardedAs"> & {
19
19
  as?: import("styled-components").WebTarget | undefined;
@@ -1,4 +1,4 @@
1
- import{styled as r}from"styled-components";import{Link as i}from"react-router-dom";import{JsonViewer as n}from"@redocly/theme/components/JsonViewer/JsonViewer";import{linkCss as s}from"@redocly/theme/components/Markdown/styles/links";import{LEVEL_COLORS as a}from"./utils.js";const b=r.div`
1
+ import{styled as r}from"styled-components";import{Link as i}from"react-router";import{JsonViewer as n}from"@redocly/theme/components/JsonViewer/JsonViewer";import{linkCss as s}from"@redocly/theme/components/Markdown/styles/links";import{LEVEL_COLORS as a}from"./utils.js";const b=r.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
 
@@ -13,12 +13,11 @@ import{styled as r}from"styled-components";import{Link as i}from"react-router-do
13
13
  }
14
14
  `,h=r.div`
15
15
  width: 100%;
16
- padding: ${({$isFirst:e})=>`var(--schema-${e?"fist-":""}property-details-spacing)`}
17
- 0
16
+ padding: ${({$isFirst:e})=>`var(--schema-${e?"fist-":""}property-details-spacing)`} 0
18
17
  var(--schema-property-details-spacing);
19
18
  border-bottom: 1px solid var(--border-color-primary);
20
19
 
21
- &:has([data-schema-nested-open="true"]) {
20
+ &:has([data-schema-nested-open='true']) {
22
21
  border-bottom: none;
23
22
  padding-bottom: 0;
24
23
  }
@@ -1 +1 @@
1
- import{useMemo as m,useRef as a}from"react";import{useAtomValue as s}from"jotai";import{useLocation as u}from"react-router-dom";import{activeScrollSectionAtom as i}from"../../jotai/app.js";import{useSpecTranslate as p}from"../../hooks/useTranslate.js";import{buildMenuItems as f}from"./buildMenuItems.js";function I({items:e}){const{pathname:o}=u(),t=s(i),r=p(),n=a(new WeakMap);return m(()=>{const c=decodeURIComponent(t??o);return f(e,c,r,n.current)},[e,o,t,r])}export{I as useMenuItems};
1
+ import{useMemo as m,useRef as a}from"react";import{useAtomValue as s}from"jotai";import{useLocation as u}from"react-router";import{activeScrollSectionAtom as i}from"../../jotai/app.js";import{useSpecTranslate as p}from"../../hooks/useTranslate.js";import{buildMenuItems as f}from"./buildMenuItems.js";function I({items:e}){const{pathname:o}=u(),t=s(i),r=p(),n=a(new WeakMap);return m(()=>{const c=decodeURIComponent(t??o);return f(e,c,r,n.current)},[e,o,t,r])}export{I as useMenuItems};
@@ -1,4 +1,4 @@
1
- import{jsx as o}from"react/jsx-runtime";import{memo as f,useCallback as v}from"react";import{styled as t,css as a}from"styled-components";import{Link as g}from"react-router-dom";import{useUrlHash as k}from"../../hooks/useUrlHash.js";import{useAtomValue as u}from"jotai";import{LinkIcon as b}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{ClipboardService as x}from"@redocly/theme/core/openapi";import{globalOptionsAtom as y}from"../../jotai/store.js";import{hashToElementId as l}from"../../utils/deep-link.js";function A({to:i,label:s,variant:c="heading"}){const{onDeepLinkClick:e}=u(y),p=k({trackSilentReplaces:!0}),r=i.split("#")[1],m=!!r&&l(p)===l(r),d=v(h=>{x.copyCustom(`${window.location.origin}${i}`),e&&(h.preventDefault(),e(i))},[e,i]);return o(C,{className:"deep-link-anchor","data-deep-link-anchor":!0,children:o(L,{$variant:c,to:i,"aria-label":s??`link to ${i}`,"aria-current":m?"location":void 0,onClick:d,children:o(b,{color:"--heading-anchor-color"})})})}const j=f(A),n="data-deep-link-anchor",w=`
1
+ import{jsx as o}from"react/jsx-runtime";import{memo as f,useCallback as v}from"react";import{styled as t,css as a}from"styled-components";import{Link as g}from"react-router";import{useUrlHash as k}from"../../hooks/useUrlHash.js";import{useAtomValue as u}from"jotai";import{LinkIcon as b}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{ClipboardService as x}from"@redocly/theme/core/openapi";import{globalOptionsAtom as y}from"../../jotai/store.js";import{hashToElementId as l}from"../../utils/deep-link.js";function A({to:i,label:s,variant:c="heading"}){const{onDeepLinkClick:e}=u(y),p=k({trackSilentReplaces:!0}),r=i.split("#")[1],m=!!r&&l(p)===l(r),d=v(h=>{x.copyCustom(`${window.location.origin}${i}`),e&&(h.preventDefault(),e(i))},[e,i]);return o(C,{className:"deep-link-anchor","data-deep-link-anchor":!0,children:o(L,{$variant:c,to:i,"aria-label":s??`link to ${i}`,"aria-current":m?"location":void 0,onClick:d,children:o(b,{color:"--heading-anchor-color"})})})}const j=f(A),n="data-deep-link-anchor",w=`
2
2
  & [${n}] svg {
3
3
  visibility: hidden;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{Fragment as a,jsx as r,jsxs as c}from"react/jsx-runtime";import{memo as l}from"react";import{styled as u}from"styled-components";import{useAtomValue as n}from"jotai";import{Link as d}from"react-router-dom";import{graphqlTypeLookupAtom as f,graphqlTypeSlugMapAtom as h}from"../../jotai/graphql.js";import{SchemaItemWrapper as g,PanelAnnotation as y}from"./styled.js";import{renderDescription as x}from"./renderDescription.js";import{useNavigationUrlNormalizer as L}from"../../hooks/useNormalizeUrl.js";function v({typeNames:i}){const p=n(f),m=n(h),s=L();return r(a,{children:i.map(o=>{const t=p(o),e=m[o];return c(g,{children:[r(k,{to:e?s(e):"#",children:o}),t?.description&&r(y,{children:x(t.description)})]},o)})})}const D=l(v),k=u(d)`
1
+ import{Fragment as a,jsx as r,jsxs as c}from"react/jsx-runtime";import{memo as l}from"react";import{styled as u}from"styled-components";import{useAtomValue as n}from"jotai";import{Link as d}from"react-router";import{graphqlTypeLookupAtom as f,graphqlTypeSlugMapAtom as h}from"../../jotai/graphql.js";import{SchemaItemWrapper as g,PanelAnnotation as y}from"./styled.js";import{renderDescription as x}from"./renderDescription.js";import{useNavigationUrlNormalizer as L}from"../../hooks/useNormalizeUrl.js";function v({typeNames:i}){const p=n(f),m=n(h),s=L();return r(a,{children:i.map(o=>{const t=p(o),e=m[o];return c(g,{children:[r(k,{to:e?s(e):"#",children:o}),t?.description&&r(y,{children:x(t.description)})]},o)})})}const D=l(v),k=u(d)`
2
2
  color: var(--link-color-primary, var(--text-color-secondary));
3
3
  text-decoration: none;
4
4
  cursor: pointer;
@@ -1,4 +1,4 @@
1
- import{Fragment as i,jsx as e,jsxs as n}from"react/jsx-runtime";import{memo as f}from"react";import{useAtomValue as x}from"jotai";import{styled as t}from"styled-components";import{Link as v}from"react-router-dom";import{graphqlTypeSlugMapAtom as y}from"../../jotai/graphql.js";import{NonNullLabel as L,MessageBadge as l}from"./styled.js";import{useNavigationUrlNormalizer as b}from"../../hooks/useNormalizeUrl.js";import{useSpecTranslate as w}from"../../hooks/useTranslate.js";function s({typeRef:r}){return r.isList?n(i,{children:["[",r.name,r.isNonNull?"!":"","]",r.isListNonNull?"!":""]}):n(i,{children:[r.name,r.isNonNull?"!":""]})}function $({typeRef:r,inline:m=!1,size:c="base",deprecated:d=!1,required:p=!1,className:u}){const h=x(y),N=b(),o=w(),g=r.isListNonNull||r.isNonNull,a=h[r.name];return n(T,{className:u,"data-testid":"return-type",$inline:m,$size:c,children:[a?e(k,{to:N(a),children:e(s,{typeRef:r})}):e(s,{typeRef:r}),g&&n(i,{children:[e(z,{children:","}),e(L,{children:o("nonNull","non-null")})]}),d&&e(l,{"data-testid":"deprecated",type:"warning",children:o("badges.deprecated","deprecated")}),p&&e(l,{"data-testid":"required-arg",type:"error",children:o("required","required")})]})}const G=f($),T=t.div`
1
+ import{Fragment as i,jsx as e,jsxs as n}from"react/jsx-runtime";import{memo as f}from"react";import{useAtomValue as x}from"jotai";import{styled as t}from"styled-components";import{Link as v}from"react-router";import{graphqlTypeSlugMapAtom as y}from"../../jotai/graphql.js";import{NonNullLabel as L,MessageBadge as l}from"./styled.js";import{useNavigationUrlNormalizer as b}from"../../hooks/useNormalizeUrl.js";import{useSpecTranslate as w}from"../../hooks/useTranslate.js";function s({typeRef:r}){return r.isList?n(i,{children:["[",r.name,r.isNonNull?"!":"","]",r.isListNonNull?"!":""]}):n(i,{children:[r.name,r.isNonNull?"!":""]})}function $({typeRef:r,inline:m=!1,size:c="base",deprecated:d=!1,required:p=!1,className:u}){const h=x(y),N=b(),o=w(),g=r.isListNonNull||r.isNonNull,a=h[r.name];return n(T,{className:u,"data-testid":"return-type",$inline:m,$size:c,children:[a?e(k,{to:N(a),children:e(s,{typeRef:r})}):e(s,{typeRef:r}),g&&n(i,{children:[e(z,{children:","}),e(L,{children:o("nonNull","non-null")})]}),d&&e(l,{"data-testid":"deprecated",type:"warning",children:o("badges.deprecated","deprecated")}),p&&e(l,{"data-testid":"required-arg",type:"error",children:o("required","required")})]})}const G=f($),T=t.div`
2
2
  display: ${({$inline:r})=>r?"inline-block":"block"};
3
3
  min-width: 0;
4
4
  font-size: ${({$size:r})=>`var(--font-size-${r})`};
@@ -1,4 +1,4 @@
1
- import{jsx as n,jsxs as c}from"react/jsx-runtime";import{memo as I,useCallback as u,useMemo as h}from"react";import{useAtomValue as y}from"jotai";import{styled as m}from"styled-components";import{Link as v}from"react-router-dom";import{useSpecTranslate as M}from"../../hooks/useTranslate.js";import{useTelemetry as q}from"../../hooks/useTelemetry.js";import{resolveText as L}from"../../utils/resolveText.js";import{graphqlReferenceMapAtom as j,graphqlTypeSlugMapAtom as w}from"../../jotai/graphql.js";import{PanelWrapper as N,PanelHeading as P,PanelBody as $,PanelListItem as C,ListIcon as S}from"./shared-panel-styles.js";import{useNavigationUrlNormalizer as b}from"../../hooks/useNormalizeUrl.js";function Q({node:i}){const e=i.children[0],p=M(),t=y(j),o=y(w),l=b(),s=q(),x=u(r=>{s.sendReferencedInClickedMessage([{id:"graphqlDocsReferencedInLink",object:"link",uri:"urn:redocly:redoc:ui:link:graphqlDocsReferencedInLink",referencedIn:r}])},[s]),d=h(()=>e?.graphqlTypeName?t[e.graphqlTypeName]??[]:e?.references??[],[e,t]),R=h(()=>d.flatMap(r=>{const a=o[r.name];if(!a)return[];const f=l(a),k=r.field?l(`${a}#${r.name}-${r.field}`):void 0;return[{reference:r,typeTo:f,fieldTo:k}]}),[d,o,l]);if(d.length===0)return null;const T=L(p,i.titleTranslationKey,i.title);return c(N,{className:"panel-api-docs",children:[n(P,{children:T}),n($,{children:R.map(({reference:r,typeTo:a,fieldTo:f})=>n(z,{reference:r,typeTo:a,fieldTo:f,onReferencedInClick:x},`${r.name}.${r.field??""}`))})]})}const z=I(function({reference:e,typeTo:p,fieldTo:t,onReferencedInClick:o}){const l=u(()=>o(e.name),[o,e.name]),s=u(()=>o(e.field??""),[o,e.field]);return c(A,{children:[n(S,{clipId:"clip_ref"}),c(_,{children:[n(g,{to:p,onClick:l,children:e.name}),e.field&&t&&c(D,{children:[".",n("wbr",{}),n(g,{to:t,onClick:s,children:e.field})]})]})]})}),A=m(C)`
1
+ import{jsx as n,jsxs as c}from"react/jsx-runtime";import{memo as I,useCallback as u,useMemo as h}from"react";import{useAtomValue as y}from"jotai";import{styled as m}from"styled-components";import{Link as v}from"react-router";import{useSpecTranslate as M}from"../../hooks/useTranslate.js";import{useTelemetry as q}from"../../hooks/useTelemetry.js";import{resolveText as L}from"../../utils/resolveText.js";import{graphqlReferenceMapAtom as j,graphqlTypeSlugMapAtom as w}from"../../jotai/graphql.js";import{PanelWrapper as N,PanelHeading as P,PanelBody as $,PanelListItem as C,ListIcon as S}from"./shared-panel-styles.js";import{useNavigationUrlNormalizer as b}from"../../hooks/useNormalizeUrl.js";function Q({node:i}){const e=i.children[0],p=M(),t=y(j),o=y(w),l=b(),s=q(),x=u(r=>{s.sendReferencedInClickedMessage([{id:"graphqlDocsReferencedInLink",object:"link",uri:"urn:redocly:redoc:ui:link:graphqlDocsReferencedInLink",referencedIn:r}])},[s]),d=h(()=>e?.graphqlTypeName?t[e.graphqlTypeName]??[]:e?.references??[],[e,t]),R=h(()=>d.flatMap(r=>{const a=o[r.name];if(!a)return[];const f=l(a),k=r.field?l(`${a}#${r.name}-${r.field}`):void 0;return[{reference:r,typeTo:f,fieldTo:k}]}),[d,o,l]);if(d.length===0)return null;const T=L(p,i.titleTranslationKey,i.title);return c(N,{className:"panel-api-docs",children:[n(P,{children:T}),n($,{children:R.map(({reference:r,typeTo:a,fieldTo:f})=>n(z,{reference:r,typeTo:a,fieldTo:f,onReferencedInClick:x},`${r.name}.${r.field??""}`))})]})}const z=I(function({reference:e,typeTo:p,fieldTo:t,onReferencedInClick:o}){const l=u(()=>o(e.name),[o,e.name]),s=u(()=>o(e.field??""),[o,e.field]);return c(A,{children:[n(S,{clipId:"clip_ref"}),c(_,{children:[n(g,{to:p,onClick:l,children:e.name}),e.field&&t&&c(D,{children:[".",n("wbr",{}),n(g,{to:t,onClick:s,children:e.field})]})]})]})}),A=m(C)`
2
2
  align-items: flex-start;
3
3
  `,_=m.span`
4
4
  overflow-wrap: anywhere;
@@ -1,4 +1,4 @@
1
- import{Fragment as b,jsx as t,jsxs as m}from"react/jsx-runtime";import{styled as s}from"styled-components";import{useAtomValue as C}from"jotai";import{memo as M,useCallback as f,useContext as j,useMemo as A}from"react";import{Link as q}from"react-router-dom";import{Panel as K}from"@redocly/theme/components/Panel/Panel";import{Typography as P}from"@redocly/theme/components/Typography/Typography";import{ListIcon as S}from"../../../../icons/ListIcon/ListIcon.js";import{visitedChannelsAtom as T}from"../../../../jotai/app.js";import{itemStoreFieldAtom as $}from"../../../../jotai/itemStore.js";import{ItemIdContext as E}from"../../../../hooks/useDeepLinkSection.js";import{useNavigationUrlNormalizer as F}from"../../../../hooks/useNormalizeUrl.js";import{useTelemetry as N}from"../../../../hooks/useTelemetry.js";function U(o){const n=[];return o.exchanges.length>0&&n.push(`${o.exchanges.length} exchange${o.exchanges.length>1?"s":""}`),o.queues.length>0&&n.push(`${o.queues.length} queue${o.queues.length>1?"s":""}`),n.length===0?"":`Used in ${n.join(" and ")}`}const I=M(function({reference:n,to:l,isActive:c,onReferencedInClick:r}){const d=f(()=>r(n.label),[r,n.label]);return m(B,{children:[t(D,{size:"22px",color:c?"var(--color-info-border)":"var(--border-color-primary)"}),t(Q,{to:l,onClick:d,children:n.label})]})});function ie({node:o}){const n=o.children[0],l=j(E)??"",c=C(T),r=f(e=>(c??[]).some(a=>a.endsWith(e.toLowerCase())),[c]),d=F(),u=N(),h=C(A(()=>$({itemId:l,key:"activeMessageKey"}),[l])),v=f(e=>{u.sendReferencedInClickedMessage([{id:"asyncapiDocsChannelLink",object:"link",uri:"urn:redocly:redoc:ui:link:asyncapiDocsChannelLink",referencedIn:e}])},[u]);if(!n)return t(b,{});const{referencesByMessageKey:g}=n,w=Object.keys(g),x=h&&g[h]?h:w[0],i=x?g[x]:void 0;if(!i||i.exchanges.length===0&&i.queues.length===0)return t(b,{});const L=U(i),y=i.exchanges.map(e=>({reference:e,to:d(e.link)})),k=i.queues.map(e=>({reference:e,to:d(e.link)}));return m(_,{header:L,className:"panel-api-docs",isExpandable:!1,children:[y.length>0&&m(z,{children:[t(R,{children:"Exchanges"}),y.map(({reference:e,to:a})=>{const p=r(e.key);return t(I,{reference:e,to:a,isActive:p,onReferencedInClick:v},e.key)})]}),k.length>0&&m(z,{children:[t(R,{children:"Queues"}),k.map(({reference:e,to:a})=>{const p=r(e.key);return t(I,{reference:e,to:a,isActive:p,onReferencedInClick:v},e.key)})]})]})}const _=s(K)`
1
+ import{Fragment as b,jsx as t,jsxs as m}from"react/jsx-runtime";import{styled as s}from"styled-components";import{useAtomValue as C}from"jotai";import{memo as M,useCallback as f,useContext as j,useMemo as A}from"react";import{Link as q}from"react-router";import{Panel as K}from"@redocly/theme/components/Panel/Panel";import{Typography as P}from"@redocly/theme/components/Typography/Typography";import{ListIcon as S}from"../../../../icons/ListIcon/ListIcon.js";import{visitedChannelsAtom as T}from"../../../../jotai/app.js";import{itemStoreFieldAtom as $}from"../../../../jotai/itemStore.js";import{ItemIdContext as E}from"../../../../hooks/useDeepLinkSection.js";import{useNavigationUrlNormalizer as F}from"../../../../hooks/useNormalizeUrl.js";import{useTelemetry as N}from"../../../../hooks/useTelemetry.js";function U(o){const n=[];return o.exchanges.length>0&&n.push(`${o.exchanges.length} exchange${o.exchanges.length>1?"s":""}`),o.queues.length>0&&n.push(`${o.queues.length} queue${o.queues.length>1?"s":""}`),n.length===0?"":`Used in ${n.join(" and ")}`}const I=M(function({reference:n,to:l,isActive:c,onReferencedInClick:r}){const d=f(()=>r(n.label),[r,n.label]);return m(B,{children:[t(D,{size:"22px",color:c?"var(--color-info-border)":"var(--border-color-primary)"}),t(Q,{to:l,onClick:d,children:n.label})]})});function ie({node:o}){const n=o.children[0],l=j(E)??"",c=C(T),r=f(e=>(c??[]).some(a=>a.endsWith(e.toLowerCase())),[c]),d=F(),u=N(),h=C(A(()=>$({itemId:l,key:"activeMessageKey"}),[l])),v=f(e=>{u.sendReferencedInClickedMessage([{id:"asyncapiDocsChannelLink",object:"link",uri:"urn:redocly:redoc:ui:link:asyncapiDocsChannelLink",referencedIn:e}])},[u]);if(!n)return t(b,{});const{referencesByMessageKey:g}=n,w=Object.keys(g),x=h&&g[h]?h:w[0],i=x?g[x]:void 0;if(!i||i.exchanges.length===0&&i.queues.length===0)return t(b,{});const L=U(i),y=i.exchanges.map(e=>({reference:e,to:d(e.link)})),k=i.queues.map(e=>({reference:e,to:d(e.link)}));return m(_,{header:L,className:"panel-api-docs",isExpandable:!1,children:[y.length>0&&m(z,{children:[t(R,{children:"Exchanges"}),y.map(({reference:e,to:a})=>{const p=r(e.key);return t(I,{reference:e,to:a,isActive:p,onReferencedInClick:v},e.key)})]}),k.length>0&&m(z,{children:[t(R,{children:"Queues"}),k.map(({reference:e,to:a})=>{const p=r(e.key);return t(I,{reference:e,to:a,isActive:p,onReferencedInClick:v},e.key)})]})]})}const _=s(K)`
2
2
  [data-component-name='Panel/PanelBody'] {
3
3
  background-color: var(--layer-color-ontonal);
4
4
  padding: 0;
@@ -1 +1 @@
1
- import{jsx as r}from"react/jsx-runtime";import{memo as i}from"react";import{BrowserRouter as u,useInRouterContext as s}from"react-router-dom";function a(t){const e=i(o=>s()?r(t,{...o}):r(u,{children:r(t,{...o})}));return e.displayName=`WithRouter(${n(t)})`,e}function n(t){return t.displayName||t.name||"RedoclyApiDocs"}export{a as withRouter};
1
+ import{jsx as r}from"react/jsx-runtime";import{memo as i}from"react";import{BrowserRouter as u,useInRouterContext as s}from"react-router";function a(t){const e=i(o=>s()?r(t,{...o}):r(u,{children:r(t,{...o})}));return e.displayName=`WithRouter(${n(t)})`,e}function n(t){return t.displayName||t.name||"RedoclyApiDocs"}export{a as withRouter};
@@ -1 +1 @@
1
- import{useEffect as R,useLayoutEffect as h}from"react";import{useLocation as T,useNavigate as w}from"react-router-dom";import{IS_BROWSER as p}from"@redocly/theme/core/openapi";import{SECTION_ATTR as y}from"../constants/openapi.js";import{hashToElementId as v,resolveLegacyHashToRoute as S,stripArrayMarkers as L}from"../utils/deep-link.js";import{USER_SCROLL_INTENT_EVENTS as H,WHEEL_INTENT_THRESHOLD_PX as _,createScrollIntentTracker as b}from"./useUserScrollIntent.js";function $({activeRoute:t,routeIndex:e,basePath:o,isHydrated:i}){const c=T(),u=w(),s=t?.path;R(()=>{if(!p||!("scrollRestoration"in window.history))return;const r=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=r}},[]),h(()=>{if(!p)return;const{hash:r}=c,l=r?v(r):"";if(l&&!g(l)){const f=S(r,o,e);if(f&&f!==c.pathname){u(f,{replace:!0});return}}if(!(!l&&!s))return A(I(l,s))},[c,s,i,u,o,e])}function I(t,e){if(!t)return()=>m(e);let o=!1;return()=>{const i=g(t);return i?(o=!0,i):o?null:m(e)}}const N=_;function A(t){let e=t();if(e?.scrollIntoView({block:"start"}),typeof ResizeObserver>"u")return()=>{};const o=document.documentElement,i=new AbortController;let c=e?e.getBoundingClientRect().top:0,u=o.scrollHeight;function s(n){e=n,n.scrollIntoView({block:"start"}),c=n.getBoundingClientRect().top,u=o.scrollHeight}const r=new ResizeObserver(()=>{const n=t();n&&s(n)});r.observe(document.body);function l(){e&&(Math.abs(e.getBoundingClientRect().top-c)<=N||(o.scrollHeight===u?a():s(e)))}const f=b();function E(n){f(n)&&a()}function a(){r.disconnect(),i.abort()}const d={capture:!0,passive:!0,signal:i.signal};window.addEventListener("scroll",l,d);for(const n of H)window.addEventListener(n,E,d);return a}function g(t){return t?document.getElementById(t)||C(t)||document.getElementById(t.split("&")[0]):null}function C(t){if(t.includes("[]"))return null;for(const e of document.querySelectorAll('[id*="[]"]'))if(L(e.id)===t)return e;return null}function m(t){if(!t)return null;const e=t.replace(/["\\]/g,"\\$&");return document.querySelector(`[${y}="${e}"]`)}export{$ as useApiDocsScroll};
1
+ import{useEffect as R,useLayoutEffect as h}from"react";import{useLocation as T,useNavigate as w}from"react-router";import{IS_BROWSER as p}from"@redocly/theme/core/openapi";import{SECTION_ATTR as y}from"../constants/openapi.js";import{hashToElementId as v,resolveLegacyHashToRoute as S,stripArrayMarkers as L}from"../utils/deep-link.js";import{USER_SCROLL_INTENT_EVENTS as H,WHEEL_INTENT_THRESHOLD_PX as _,createScrollIntentTracker as b}from"./useUserScrollIntent.js";function $({activeRoute:t,routeIndex:e,basePath:o,isHydrated:i}){const c=T(),u=w(),s=t?.path;R(()=>{if(!p||!("scrollRestoration"in window.history))return;const r=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=r}},[]),h(()=>{if(!p)return;const{hash:r}=c,l=r?v(r):"";if(l&&!g(l)){const f=S(r,o,e);if(f&&f!==c.pathname){u(f,{replace:!0});return}}if(!(!l&&!s))return A(I(l,s))},[c,s,i,u,o,e])}function I(t,e){if(!t)return()=>m(e);let o=!1;return()=>{const i=g(t);return i?(o=!0,i):o?null:m(e)}}const N=_;function A(t){let e=t();if(e?.scrollIntoView({block:"start"}),typeof ResizeObserver>"u")return()=>{};const o=document.documentElement,i=new AbortController;let c=e?e.getBoundingClientRect().top:0,u=o.scrollHeight;function s(n){e=n,n.scrollIntoView({block:"start"}),c=n.getBoundingClientRect().top,u=o.scrollHeight}const r=new ResizeObserver(()=>{const n=t();n&&s(n)});r.observe(document.body);function l(){e&&(Math.abs(e.getBoundingClientRect().top-c)<=N||(o.scrollHeight===u?a():s(e)))}const f=b();function E(n){f(n)&&a()}function a(){r.disconnect(),i.abort()}const d={capture:!0,passive:!0,signal:i.signal};window.addEventListener("scroll",l,d);for(const n of H)window.addEventListener(n,E,d);return a}function g(t){return t?document.getElementById(t)||C(t)||document.getElementById(t.split("&")[0]):null}function C(t){if(t.includes("[]"))return null;for(const e of document.querySelectorAll('[id*="[]"]'))if(L(e.id)===t)return e;return null}function m(t){if(!t)return null;const e=t.replace(/["\\]/g,"\\$&");return document.querySelector(`[${y}="${e}"]`)}export{$ as useApiDocsScroll};
@@ -1 +1 @@
1
- import{useCallback as n}from"react";import{useNavigate as c}from"react-router-dom";import{resolveLegacyHashToRoute as s}from"../utils/deep-link.js";function m(i,a){const e=c();return n(o=>{if(o.button!==0||o.metaKey||o.ctrlKey||o.shiftKey||o.altKey)return;const t=o.target.closest("a");if(!t||t.origin!==window.location.origin)return;const r=s(t.hash,i,a);!r||r===window.location.pathname||(o.preventDefault(),e(r))},[i,a,e])}export{m as useHashLinkRedirect};
1
+ import{useCallback as n}from"react";import{useNavigate as c}from"react-router";import{resolveLegacyHashToRoute as s}from"../utils/deep-link.js";function m(i,a){const e=c();return n(o=>{if(o.button!==0||o.metaKey||o.ctrlKey||o.shiftKey||o.altKey)return;const t=o.target.closest("a");if(!t||t.origin!==window.location.origin)return;const r=s(t.hash,i,a);!r||r===window.location.pathname||(o.preventDefault(),e(r))},[i,a,e])}export{m as useHashLinkRedirect};
@@ -1 +1 @@
1
- import{useMemo as s}from"react";import{useLocation as c}from"react-router-dom";import{tryDecodeURIComponent as r}from"../utils/string.js";import{normalizePath as a}from"../utils/url.js";function d(o,e){const n=r(a(e)),m=a(o);return[m,r(m)].some(t=>n===t||n.endsWith(t)||n.includes(t+"/"))}function l(o){const e=c();return s(()=>d(o,e.pathname),[o,e.pathname])}export{l as useIsExpanded};
1
+ import{useMemo as s}from"react";import{useLocation as c}from"react-router";import{tryDecodeURIComponent as r}from"../utils/string.js";import{normalizePath as a}from"../utils/url.js";function d(o,e){const n=r(a(e)),m=a(o);return[m,r(m)].some(t=>n===t||n.endsWith(t)||n.includes(t+"/"))}function l(o){const e=c();return s(()=>d(o,e.pathname),[o,e.pathname])}export{l as useIsExpanded};
@@ -1 +1 @@
1
- import{useEffect as o,useRef as i}from"react";import{useLocation as s}from"react-router-dom";const r="redocly:urlreplace";function h(){const n=s(),t=i(n.hash);o(()=>{if(typeof window>"u")return;const e=()=>{t.current=window.location.hash};return window.addEventListener("hashchange",e),window.addEventListener("popstate",e),window.addEventListener(r,e),()=>{window.removeEventListener("hashchange",e),window.removeEventListener("popstate",e),window.removeEventListener(r,e)}},[]),o(()=>{typeof window>"u"||n.hash!==t.current&&(t.current=n.hash,window.dispatchEvent(new HashChangeEvent("hashchange")))},[n])}export{r as URL_REPLACE_EVENT,h as useRouterHashBridge};
1
+ import{useEffect as o,useRef as i}from"react";import{useLocation as s}from"react-router";const r="redocly:urlreplace";function h(){const n=s(),t=i(n.hash);o(()=>{if(typeof window>"u")return;const e=()=>{t.current=window.location.hash};return window.addEventListener("hashchange",e),window.addEventListener("popstate",e),window.addEventListener(r,e),()=>{window.removeEventListener("hashchange",e),window.removeEventListener("popstate",e),window.removeEventListener(r,e)}},[]),o(()=>{typeof window>"u"||n.hash!==t.current&&(t.current=n.hash,window.dispatchEvent(new HashChangeEvent("hashchange")))},[n])}export{r as URL_REPLACE_EVENT,h as useRouterHashBridge};
@@ -1 +1 @@
1
- import{useEffect as i}from"react";import{useAtomValue as l,useSetAtom as m}from"jotai";import{useLocation as a}from"react-router-dom";import{IS_BROWSER as s,useActiveSectionId as f}from"@redocly/theme/core/openapi";import{activeScrollSectionAtom as u}from"../jotai/app.js";import{routingBasePathAtom as p}from"../jotai/store.js";import{encodeBackSlashes as S}from"../utils/string.js";import{normalizePath as d}from"../utils/url.js";import{useUserScrollIntent as h}from"./useUserScrollIntent.js";import{URL_REPLACE_EVENT as w}from"./useRouterHashBridge.js";function c(t){window.history.replaceState({},"",t),window.dispatchEvent(new Event(w))}function _(){const t=a(),e=m(u),r=l(p),o=f(t,!1,!1),n=h(t.key);i(()=>{e(null)},[t.pathname,e]),i(()=>{if(!(!s||!o)&&(e(o),!!n.current)){if(o===r){c(r);return}!window.location.pathname.includes(o)&&!window.location.hash.includes(o)&&c(d(S(o)))}},[o,r,e,n])}export{_ as useScrollSpyUrlSync};
1
+ import{useEffect as i}from"react";import{useAtomValue as l,useSetAtom as m}from"jotai";import{useLocation as a}from"react-router";import{IS_BROWSER as s,useActiveSectionId as f}from"@redocly/theme/core/openapi";import{activeScrollSectionAtom as u}from"../jotai/app.js";import{routingBasePathAtom as p}from"../jotai/store.js";import{encodeBackSlashes as S}from"../utils/string.js";import{normalizePath as d}from"../utils/url.js";import{useUserScrollIntent as h}from"./useUserScrollIntent.js";import{URL_REPLACE_EVENT as w}from"./useRouterHashBridge.js";function c(t){window.history.replaceState({},"",t),window.dispatchEvent(new Event(w))}function _(){const t=a(),e=m(u),r=l(p),o=f(t,!1,!1),n=h(t.key);i(()=>{e(null)},[t.pathname,e]),i(()=>{if(!(!s||!o)&&(e(o),!!n.current)){if(o===r){c(r);return}!window.location.pathname.includes(o)&&!window.location.hash.includes(o)&&c(d(S(o)))}},[o,r,e,n])}export{_ as useScrollSpyUrlSync};
@@ -1 +1 @@
1
- import{useEffect as s}from"react";import{useSetAtom as i}from"jotai";import{useLocation as a}from"react-router-dom";import{visitedChannelsAtom as m}from"../jotai/app.js";function p(){const o=a(),e=i(m);s(()=>{const n=o.pathname.toLowerCase();e(t=>t.includes(n)?t:[...t,n])},[o.pathname,e])}export{p as useVisitedChannelsTracker};
1
+ import{useEffect as s}from"react";import{useSetAtom as i}from"jotai";import{useLocation as a}from"react-router";import{visitedChannelsAtom as m}from"../jotai/app.js";function p(){const o=a(),e=i(m);s(()=>{const n=o.pathname.toLowerCase();e(t=>t.includes(n)?t:[...t,n])},[o.pathname,e])}export{p as useVisitedChannelsTracker};
@@ -1,4 +1,4 @@
1
- import{jsx as a,jsxs as L}from"react/jsx-runtime";import{memo as R,useEffect as b,useMemo as p}from"react";import{styled as A}from"styled-components";import{useAtomValue as u}from"jotai";import{useLocation as M}from"react-router-dom";import{LayoutVariant as S}from"@redocly/config";import{ThreePanelLayout as T}from"@redocly/theme/layouts/ThreePanelLayout";import{layoutAtom as C,collapsedSidebarAtom as O}from"../jotai/app.js";import{globalOptionsAtom as j}from"../jotai/store.js";import{contentType as x}from"../types/common.js";import{markSectionRendered as D}from"../components/common/LazySection.js";import{MiddlePanel as F}from"../components/common/ContentWrapper.js";import{NotFoundPage as I}from"./NotFoundPage.js";import{TopLevelEntryView as V}from"./TopLevelEntryView.js";import{buildTopLevelEntries as _,buildEagerSlugs as B,resolveRouteByPathname as K}from"../utils/routing.js";import{useApiDocsScroll as N}from"../hooks/useApiDocsScroll.js";import{useHashLinkRedirect as $}from"../hooks/useHashLinkRedirect.js";import{useIsHydrated as w}from"../hooks/useIsHydrated.js";import{RenderHook as v}from"../components/RenderHook.js";function G({routeIndex:o,basePath:m}){const f=u(C),P=u(O),g=M(),i=w(),{unstable_hooks:l}=u(j),n=p(()=>K(o,g.pathname),[o,g.pathname]),s=p(()=>_(o),[o]),c=p(()=>B(n,o),[n,o]);b(()=>{c.forEach(e=>D(e))},[c]),N({activeRoute:n,routeIndex:o,basePath:m,isHydrated:i});const k=$(m,o),t=n?.path,H=p(()=>{if(i||!t)return s;const e=s.findIndex(r=>r.sectionId===t||r.children.some(h=>h.path===t));return e>0?s.slice(e):s},[s,t,i]);return!n&&o.allRoutes.length>0?a(I,{routingBasePath:m}):L(T,{className:"api-content",id:"api-content",layout:f,collapsedSidebar:P,onClickCapture:k,children:[l?.MiddlePanelHeader&&a(E,{$isStacked:f===S.STACKED,"data-testid":"middle-panel-header",children:a(v,{Hook:l.MiddlePanelHeader,props:void 0})}),H.map(e=>{const r=e.children.findIndex(d=>d.path===t),h=!i&&r>0?r:0,y=i||r===-1;return a(V,{entry:e,activePath:t,entryEager:c.has(e.sectionId),eagerOpSlug:e.children.find(d=>c.has(d.path))?.path??null,opsStartIndex:h,renderEntrySection:y,shouldRenderOps:e.sectionId===t||e.children.some(d=>d.path===t)||e.children.length>0&&e.content.contentType!==x.GROUP},e.sectionId)}),l?.MiddlePanelFooter&&a(E,{$isStacked:f===S.STACKED,"data-testid":"middle-panel-footer",children:a(v,{Hook:l.MiddlePanelFooter,props:void 0})})]})}const ce=R(G),E=A(F)`
1
+ import{jsx as a,jsxs as L}from"react/jsx-runtime";import{memo as R,useEffect as b,useMemo as p}from"react";import{styled as A}from"styled-components";import{useAtomValue as u}from"jotai";import{useLocation as M}from"react-router";import{LayoutVariant as S}from"@redocly/config";import{ThreePanelLayout as T}from"@redocly/theme/layouts/ThreePanelLayout";import{layoutAtom as C,collapsedSidebarAtom as O}from"../jotai/app.js";import{globalOptionsAtom as j}from"../jotai/store.js";import{contentType as x}from"../types/common.js";import{markSectionRendered as D}from"../components/common/LazySection.js";import{MiddlePanel as F}from"../components/common/ContentWrapper.js";import{NotFoundPage as I}from"./NotFoundPage.js";import{TopLevelEntryView as V}from"./TopLevelEntryView.js";import{buildTopLevelEntries as _,buildEagerSlugs as B,resolveRouteByPathname as K}from"../utils/routing.js";import{useApiDocsScroll as N}from"../hooks/useApiDocsScroll.js";import{useHashLinkRedirect as $}from"../hooks/useHashLinkRedirect.js";import{useIsHydrated as w}from"../hooks/useIsHydrated.js";import{RenderHook as v}from"../components/RenderHook.js";function G({routeIndex:o,basePath:m}){const f=u(C),P=u(O),g=M(),i=w(),{unstable_hooks:l}=u(j),n=p(()=>K(o,g.pathname),[o,g.pathname]),s=p(()=>_(o),[o]),c=p(()=>B(n,o),[n,o]);b(()=>{c.forEach(e=>D(e))},[c]),N({activeRoute:n,routeIndex:o,basePath:m,isHydrated:i});const k=$(m,o),t=n?.path,H=p(()=>{if(i||!t)return s;const e=s.findIndex(r=>r.sectionId===t||r.children.some(h=>h.path===t));return e>0?s.slice(e):s},[s,t,i]);return!n&&o.allRoutes.length>0?a(I,{routingBasePath:m}):L(T,{className:"api-content",id:"api-content",layout:f,collapsedSidebar:P,onClickCapture:k,children:[l?.MiddlePanelHeader&&a(E,{$isStacked:f===S.STACKED,"data-testid":"middle-panel-header",children:a(v,{Hook:l.MiddlePanelHeader,props:void 0})}),H.map(e=>{const r=e.children.findIndex(d=>d.path===t),h=!i&&r>0?r:0,y=i||r===-1;return a(V,{entry:e,activePath:t,entryEager:c.has(e.sectionId),eagerOpSlug:e.children.find(d=>c.has(d.path))?.path??null,opsStartIndex:h,renderEntrySection:y,shouldRenderOps:e.sectionId===t||e.children.some(d=>d.path===t)||e.children.length>0&&e.content.contentType!==x.GROUP},e.sectionId)}),l?.MiddlePanelFooter&&a(E,{$isStacked:f===S.STACKED,"data-testid":"middle-panel-footer",children:a(v,{Hook:l.MiddlePanelFooter,props:void 0})})]})}const ce=R(G),E=A(F)`
2
2
  align-self: flex-start;
3
3
  padding-top: var(--panel-gap-vertical);
4
4
  padding-bottom: var(--panel-gap-vertical);
@@ -1,4 +1,4 @@
1
- import{jsx as l,jsxs as u}from"react/jsx-runtime";import{memo as S,useMemo as b}from"react";import{styled as c}from"styled-components";import{useNavigate as A}from"react-router-dom";import{useAtomValue as f}from"jotai";import{LayoutVariant as B}from"@redocly/config";import{Button as C}from"@redocly/theme/components/Button/Button";import{breakpoints as h}from"@redocly/theme/core/openapi";import{layoutAtom as T}from"../jotai/app.js";import{routingBasePathAtom as z}from"../jotai/store.js";import{toElementId as I}from"../utils/url.js";import{SECTION_ATTR as N}from"../constants/openapi.js";import{panelKind as j}from"../types/common.js";import{Breadcrumbs as G}from"../components/common/Breadcrumbs.js";import{ComponentMapper as M}from"../components/Mapper.js";import{useSpecTranslate as U}from"../hooks/useTranslate.js";import{useIsExpanded as _}from"../hooks/useIsExpanded.js";import{useNormalizeUrl as L,useNavigationUrlNormalizer as K}from"../hooks/useNormalizeUrl.js";import{compose as O}from"../utils/compose.js";import{withItemId as R}from"../hoc/withItemId.js";function V(r,o){const a=o.split("/").filter(Boolean),n=r.length,e=a.slice(0,a.length-n);return r.map((s,i)=>({label:s.label,link:"/"+[...e,...a.slice(e.length,e.length+i)].join("/")}))}function q(r){for(const o of r?.children??[]){const a=o?.panels;if(Array.isArray(a)&&a.some(n=>n?.children?.some(e=>e?.kind===j.GROUP_ITEMS)))return!0}return!1}function D({content:r,itemPath:o,sectionId:a}){const{meta:n,children:e}=r||{},s=U(),i=A(),d=_(o),v=L(o),p=K(),x=f(T)===B.STACKED,g=b(()=>q(r),[r]),m=b(()=>n?.breadcrumbs?V(n.breadcrumbs,o).map(t=>({name:t.label,href:p(t.link)})):void 0,[n?.breadcrumbs,o,p]),w=s("actions.show","Show"),y=f(z),k=a?{[N]:a}:{},$=o?I(o,y):void 0;return u(P,{id:$,...k,$isExpanded:d,$isExpandable:g,children:[m&&m.length>0&&l(F,{$isStacked:x,children:l(G,{breadcrumbs:m,onClick:i})}),e.map((t,E)=>l(M,{type:t.nodeType,node:t,itemPath:o},`${o}-${t.nodeType}-${E}`)),!d&&g&&u(W,{type:"button",variant:"text",size:"medium",onClick:()=>i(v),children:["+ ",w]})]})}const bo=O(R,S)(D),P=c.div`
1
+ import{jsx as l,jsxs as u}from"react/jsx-runtime";import{memo as S,useMemo as b}from"react";import{styled as c}from"styled-components";import{useNavigate as A}from"react-router";import{useAtomValue as f}from"jotai";import{LayoutVariant as B}from"@redocly/config";import{Button as C}from"@redocly/theme/components/Button/Button";import{breakpoints as h}from"@redocly/theme/core/openapi";import{layoutAtom as T}from"../jotai/app.js";import{routingBasePathAtom as z}from"../jotai/store.js";import{toElementId as I}from"../utils/url.js";import{SECTION_ATTR as N}from"../constants/openapi.js";import{panelKind as j}from"../types/common.js";import{Breadcrumbs as G}from"../components/common/Breadcrumbs.js";import{ComponentMapper as M}from"../components/Mapper.js";import{useSpecTranslate as U}from"../hooks/useTranslate.js";import{useIsExpanded as _}from"../hooks/useIsExpanded.js";import{useNormalizeUrl as L,useNavigationUrlNormalizer as K}from"../hooks/useNormalizeUrl.js";import{compose as O}from"../utils/compose.js";import{withItemId as R}from"../hoc/withItemId.js";function V(r,o){const a=o.split("/").filter(Boolean),n=r.length,e=a.slice(0,a.length-n);return r.map((s,i)=>({label:s.label,link:"/"+[...e,...a.slice(e.length,e.length+i)].join("/")}))}function q(r){for(const o of r?.children??[]){const a=o?.panels;if(Array.isArray(a)&&a.some(n=>n?.children?.some(e=>e?.kind===j.GROUP_ITEMS)))return!0}return!1}function D({content:r,itemPath:o,sectionId:a}){const{meta:n,children:e}=r||{},s=U(),i=A(),d=_(o),v=L(o),p=K(),x=f(T)===B.STACKED,g=b(()=>q(r),[r]),m=b(()=>n?.breadcrumbs?V(n.breadcrumbs,o).map(t=>({name:t.label,href:p(t.link)})):void 0,[n?.breadcrumbs,o,p]),w=s("actions.show","Show"),y=f(z),k=a?{[N]:a}:{},$=o?I(o,y):void 0;return u(P,{id:$,...k,$isExpanded:d,$isExpandable:g,children:[m&&m.length>0&&l(F,{$isStacked:x,children:l(G,{breadcrumbs:m,onClick:i})}),e.map((t,E)=>l(M,{type:t.nodeType,node:t,itemPath:o},`${o}-${t.nodeType}-${E}`)),!d&&g&&u(W,{type:"button",variant:"text",size:"medium",onClick:()=>i(v),children:["+ ",w]})]})}const bo=O(R,S)(D),P=c.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o}from"react/jsx-runtime";import{Link as c,useLocation as i}from"react-router-dom";import{useNormalizeUrl as d}from"../hooks/useNormalizeUrl.js";function m({routingBasePath:n}){const t=i(),a=d(n||"/");return e("div",{className:"not-found-page",children:o("div",{className:"not-found-content",children:[e("h1",{children:"404"}),e("h2",{children:"Page Not Found"}),o("p",{children:["The page ",e("code",{children:t.pathname})," could not be found."]}),e("p",{children:"This documentation page doesn't exist. It may have been moved or deleted."}),e(c,{to:a,className:"back-link",children:"\u2190 Back to API Documentation"})]})})}export{m as NotFoundPage};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{Link as c,useLocation as i}from"react-router";import{useNormalizeUrl as d}from"../hooks/useNormalizeUrl.js";function m({routingBasePath:n}){const t=i(),a=d(n||"/");return e("div",{className:"not-found-page",children:o("div",{className:"not-found-content",children:[e("h1",{children:"404"}),e("h2",{children:"Page Not Found"}),o("p",{children:["The page ",e("code",{children:t.pathname})," could not be found."]}),e("p",{children:"This documentation page doesn't exist. It may have been moved or deleted."}),e(c,{to:a,className:"back-link",children:"\u2190 Back to API Documentation"})]})})}export{m as NotFoundPage};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/api-docs",
3
- "version": "0.1.0-next.2",
3
+ "version": "0.1.0-next.3",
4
4
  "description": "Redocly API Documentation Library",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -24,13 +24,13 @@
24
24
  "package.json"
25
25
  ],
26
26
  "peerDependencies": {
27
- "react": "^19.2.4",
28
- "react-dom": "^19.2.4",
27
+ "react": "^19.2.7",
28
+ "react-dom": "^19.2.7",
29
29
  "styled-components": "^6.4.2"
30
30
  },
31
31
  "dependencies": {
32
32
  "@markdoc/markdoc": "0.5.2",
33
- "@redocly/openapi-core": "2.44.2",
33
+ "@redocly/openapi-core": "2.45.0",
34
34
  "dompurify": "3.4.12",
35
35
  "fast-xml-parser": "5.7.3",
36
36
  "graphql": "16.12.0",
@@ -41,15 +41,15 @@
41
41
  "linkedom": "^0.18.12",
42
42
  "openapi-sampler": "^1.7.2",
43
43
  "prismjs": "1.30.0",
44
- "react-router-dom": "^7.18.1",
44
+ "react-router": "^8.3.0",
45
45
  "slugify": "^1.4.7",
46
46
  "swagger2openapi": "^7.0.8",
47
47
  "url-template": "^2.0.8",
48
48
  "web-vitals": "3.3.1",
49
49
  "@redocly/config": "0.53.1",
50
50
  "@redocly/redoc-opentelemetry": "0.2.2",
51
- "@redocly/replay": "0.27.0-next.8",
52
- "@redocly/theme": "^0.68.0-next.6",
51
+ "@redocly/replay": "0.27.0-next.9",
52
+ "@redocly/theme": "^0.68.0-next.7",
53
53
  "@redocly/allof-merge": "0.6.9"
54
54
  },
55
55
  "devDependencies": {
@@ -68,8 +68,8 @@
68
68
  "esbuild": "0.28.1",
69
69
  "globals": "^16.5.0",
70
70
  "jest-styled-components": "7.2.0",
71
- "react": "^19.2.4",
72
- "react-dom": "^19.2.4",
71
+ "react": "^19.2.7",
72
+ "react-dom": "^19.2.7",
73
73
  "rimraf": "5.0.7",
74
74
  "rollup-plugin-bundle-stats": "^4.22.1",
75
75
  "tsx": "^4.20.6",