@redocly/openapi-docs 3.24.0-next.8 → 3.24.0

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.
Files changed (56) hide show
  1. package/dist/{redocly-openapi-docs.min.AiChatProvider-D8o94qvX.js → redocly-openapi-docs.min.AiChatProvider-CIrPFbvX.js} +3 -3
  2. package/dist/{redocly-openapi-docs.min.AiChatSqliteDBStorage-BLTom3F-.js → redocly-openapi-docs.min.AiChatSqliteDBStorage-eAy3scC4.js} +1 -1
  3. package/dist/{redocly-openapi-docs.min.AiPanel-DloIzPy9.js → redocly-openapi-docs.min.AiPanel-C6CGDyzy.js} +116 -116
  4. package/dist/redocly-openapi-docs.min.FileWatcher-dIKl80Ec.js +1 -0
  5. package/dist/redocly-openapi-docs.min.Observable-D6wKbFwB.js +1 -0
  6. package/dist/redocly-openapi-docs.min.SemanticSearchService-D4V6-td8.js +1 -0
  7. package/dist/{redocly-openapi-docs.min.SqliteDBStorage-CksbFVf-.js → redocly-openapi-docs.min.SqliteDBStorage-D9-Rb-N7.js} +1 -1
  8. package/dist/redocly-openapi-docs.min.TauriFileSystemAdapter-CHW6hO3z.js +1 -0
  9. package/dist/redocly-openapi-docs.min.TauriRootStorage-CHiKNUn2.js +1 -0
  10. package/dist/redocly-openapi-docs.min.ai-chat-mappers-C19k85fj.js +1 -0
  11. package/dist/redocly-openapi-docs.min.core-BYyFOtMX.js +1 -0
  12. package/dist/redocly-openapi-docs.min.external-resolver-BH7DBWU-.js +2 -0
  13. package/dist/redocly-openapi-docs.min.index-BQp5pipW.js +1 -0
  14. package/dist/redocly-openapi-docs.min.index-BuFUmOUm.js +7730 -0
  15. package/dist/redocly-openapi-docs.min.index-DLlCa16R.js +1 -0
  16. package/dist/redocly-openapi-docs.min.index-YnvLQkG_.js +1 -0
  17. package/dist/redocly-openapi-docs.min.index-dirYvuKs.js +1 -0
  18. package/dist/redocly-openapi-docs.min.index-xl_tBaHD.js +1 -0
  19. package/dist/redocly-openapi-docs.min.js +1 -1
  20. package/dist/redocly-openapi-docs.min.lint-Xu623Q1T.js +181 -0
  21. package/dist/{redocly-openapi-docs.min.lint-graphql-y6yM0_Y_.js → redocly-openapi-docs.min.lint-graphql-D-Nm5P1M.js} +1 -1
  22. package/dist/redocly-openapi-docs.min.periodic-revalidation-Dsp-n7ui.js +1 -0
  23. package/dist/redocly-openapi-docs.min.promise-map-limit-Db_42GvV.js +1 -0
  24. package/dist/{redocly-openapi-docs.min.respect-run-C77Wul9G.js → redocly-openapi-docs.min.respect-run-CWNqYysq.js} +23 -23
  25. package/dist/redocly-openapi-docs.min.standalone-CRo0Sa5b.js +11995 -0
  26. package/dist/redocly-openapi-docs.min.tauri-path-BUSVirPk.js +1 -0
  27. package/dist/{redocly-openapi-docs.min.useAiChatQueries-B9Y_hT0w.js → redocly-openapi-docs.min.useAiChatQueries-CXyQzME7.js} +80 -80
  28. package/lib/components/Callbacks/CallbackOperation.js +1 -1
  29. package/lib/components/Content/useAutoScroll.js +1 -1
  30. package/lib/components/ContentItem/useIsExpanded.js +1 -1
  31. package/lib/components/ContentItems/ContentItems.js +1 -1
  32. package/lib/components/ContentItems/VirtualList.js +1 -1
  33. package/lib/components/ContentItems/useScrollOnRender.js +1 -1
  34. package/lib/components/Responses/OperationResponseList.js +1 -1
  35. package/lib/components/Schema/Schema.js +1 -1
  36. package/lib/components/Schema/SubSchema.js +1 -1
  37. package/lib/components/Schema/useOneOfLocationIdx.js +1 -1
  38. package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
  39. package/lib/components/StickySidebar/StickyResponsiveSidebar.js +1 -1
  40. package/lib/components/TagItem/OperationsNavigation.js +1 -1
  41. package/lib/components/TagItem/TagItem.js +1 -1
  42. package/lib/components/common/LinkToField.js +1 -1
  43. package/lib/components/common/linkify.js +1 -1
  44. package/lib/hooks/useRouter.js +1 -1
  45. package/lib/hooks/useUppercase2LowercaseRedirect.js +1 -1
  46. package/lib/utils/path.d.ts +1 -1
  47. package/package.json +12 -12
  48. package/dist/redocly-openapi-docs.min.ai-chat-mappers-Dza6UMVG.js +0 -1
  49. package/dist/redocly-openapi-docs.min.external-resolver-Cm8qMSH6.js +0 -2
  50. package/dist/redocly-openapi-docs.min.index-CVScN5cj.js +0 -7586
  51. package/dist/redocly-openapi-docs.min.index-DQKkHTdL.js +0 -1
  52. package/dist/redocly-openapi-docs.min.index-DWPYSZX6.js +0 -1
  53. package/dist/redocly-openapi-docs.min.index-qqKTpI_q.js +0 -1
  54. package/dist/redocly-openapi-docs.min.lint-B0W-5WwE.js +0 -181
  55. package/dist/redocly-openapi-docs.min.standalone-BFWv5fnd.js +0 -12112
  56. package/dist/redocly-openapi-docs.min.tauri-path-Dc9-nUUG.js +0 -1
@@ -1,4 +1,4 @@
1
- import{jsx as r,jsxs as c}from"react/jsx-runtime";import{useLocation as d}from"react-router-dom";import{useTranslate as b}from"../../hooks/index.js";import{CallbackPanel as f}from"../Panel/index.js";import{CallbackDetails as x}from"./CallbackDetails.js";import{CallbackSummary as u}from"./CallbackSummary.js";import{pathIncludesLink as k}from"../../utils/index.js";import{styled as l}from"../../styled-components.js";const B=({operation:o,operation:{callbackId:a},onExpand:s,selectedCallback:n})=>{const t=b(),i=d();return r(f,{header:({expanded:e,toggle:m})=>r(u,{callback:o,toggle:p=>{m?.(p),s?.(e?null:o)},expanded:e,translate:t}),expanded:n?.callbackId===a||k(i,a),className:"panel-response-callback",children:c(h,{children:[r(x,{operation:o,translate:t}),r(y,{})]})})},h=l.div`
1
+ import{jsx as r,jsxs as c}from"react/jsx-runtime";import{useLocation as d}from"react-router";import{useTranslate as b}from"../../hooks/index.js";import{CallbackPanel as f}from"../Panel/index.js";import{CallbackDetails as x}from"./CallbackDetails.js";import{CallbackSummary as u}from"./CallbackSummary.js";import{pathIncludesLink as k}from"../../utils/index.js";import{styled as l}from"../../styled-components.js";const B=({operation:o,operation:{callbackId:a},onExpand:s,selectedCallback:n})=>{const t=b(),i=d();return r(f,{header:({expanded:e,toggle:m})=>r(u,{callback:o,toggle:p=>{m?.(p),s?.(e?null:o)},expanded:e,translate:t}),expanded:n?.callbackId===a||k(i,a),className:"panel-response-callback",children:c(h,{children:[r(x,{operation:o,translate:t}),r(y,{})]})})},h=l.div`
2
2
  position: relative;
3
3
  .property:last-child {
4
4
  border-bottom: none;
@@ -1 +1 @@
1
- import{useLocation as p}from"react-router-dom";import{useEffect as s}from"react";import{addLeadingSlash as d,removeLeadingSlash as l,useActiveSectionId as u}from"@redocly/theme/core/openapi";import{compose as f,encodeBackSlashes as h,tryDecodeURIComponent as w}from"../../utils/index.js";import{IS_BROWSER as S}from"../../utils/dom.js";let m=!0;function v(t){const e=p(),o=t||"/";s(()=>{if(e.pathname===o&&e.hash===""){window.scrollTo(0,0);return}const a=l(e.pathname.replace(o,"")),r=g(e.hash),i=r?c(a+r)||document.querySelector(`[id$="${l(r)}"]`):c(e.hash.replace("#",""))||c(a);i&&i.scrollIntoView()},[e,o]);const n=u(e,!1,!1);s(()=>{if(n&&m){m=!1;return}if(S&&!window.location.pathname.includes(n)&&!window.location.hash.includes(n)){const a=f(d,h)(n);window.history.replaceState({},"",a)}},[n])}function c(t){return document.getElementById(w(t))}function g(t){const e=["#tag","#operation","#paths"];for(const o of e)if(t.includes(o))return t.replace(o,"").toLowerCase();return""}export{c as getElementById,g as getLegacyHash,v as useAutoScroll};
1
+ import{useLocation as p}from"react-router";import{useEffect as s}from"react";import{addLeadingSlash as d,removeLeadingSlash as l,useActiveSectionId as u}from"@redocly/theme/core/openapi";import{compose as f,encodeBackSlashes as h,tryDecodeURIComponent as w}from"../../utils/index.js";import{IS_BROWSER as S}from"../../utils/dom.js";let m=!0;function v(t){const e=p(),o=t||"/";s(()=>{if(e.pathname===o&&e.hash===""){window.scrollTo(0,0);return}const a=l(e.pathname.replace(o,"")),r=g(e.hash),i=r?c(a+r)||document.querySelector(`[id$="${l(r)}"]`):c(e.hash.replace("#",""))||c(a);i&&i.scrollIntoView()},[e,o]);const n=u(e,!1,!1);s(()=>{if(n&&m){m=!1;return}if(S&&!window.location.pathname.includes(n)&&!window.location.hash.includes(n)){const a=f(d,h)(n);window.history.replaceState({},"",a)}},[n])}function c(t){return document.getElementById(w(t))}function g(t){const e=["#tag","#operation","#paths"];for(const o of e)if(t.includes(o))return t.replace(o,"").toLowerCase();return""}export{c as getElementById,g as getLegacyHash,v as useAutoScroll};
@@ -1 +1 @@
1
- import{useMemo as a}from"react";import{useLocation as f}from"react-router-dom";import{removeLeadingSlash as h}from"@redocly/theme/core/openapi";import{tryDecodeURIComponent as m,normalizePath as l}from"../../utils/index.js";import{getLegacyHash as d}from"../Content/useAutoScroll.js";function v({item:o,routingBasePath:s}){const n=f(),c=a(()=>m(l(n.pathname.replace(s,""))),[n.pathname,s]),p=a(()=>{const e=[],t=i=>{i.forEach(r=>{e.push(r),r.items?.length&&t(r.items)})};return t([o]),e},[o]);return o.type!=="tag"?!1:p.map(e=>e.href).some(e=>{const t=d(n.hash);return[e,m(e)].includes(c)||t&&(e.endsWith(t)||e===h(t))})}export{v as useIsExpanded};
1
+ import{useMemo as a}from"react";import{useLocation as f}from"react-router";import{removeLeadingSlash as h}from"@redocly/theme/core/openapi";import{tryDecodeURIComponent as m,normalizePath as l}from"../../utils/index.js";import{getLegacyHash as d}from"../Content/useAutoScroll.js";function v({item:o,routingBasePath:s}){const n=f(),c=a(()=>m(l(n.pathname.replace(s,""))),[n.pathname,s]),p=a(()=>{const e=[],t=i=>{i.forEach(r=>{e.push(r),r.items?.length&&t(r.items)})};return t([o]),e},[o]);return o.type!=="tag"?!1:p.map(e=>e.href).some(e=>{const t=d(n.hash);return[e,m(e)].includes(c)||t&&(e.endsWith(t)||e===h(t))})}export{v as useIsExpanded};
@@ -1 +1 @@
1
- import{Fragment as l,jsx as t,jsxs as f}from"react/jsx-runtime";import{memo as u,useMemo as p}from"react";import{Navigate as c,Route as n,Routes as m}from"react-router-dom";import{getFirstPageLink as d,getItemsByType as g}from"./helpers.js";import{SectionContent as s}from"../SectionContent/index.js";function h({items:e,root:r=!1}){const{rootItem:o}=g(e),a=!r||o?"/":d(e,"/"),i=p(()=>f(m,{children:[o&&t(n,{path:`${o.href||"/"}*`,element:t(s,{items:e})}),t(n,{path:"*",element:t(c,{to:a,replace:!0})})]}),[o,"/",e,a]);return r&&!e.length?t(m,{children:t(n,{path:"*",element:t(s,{items:e})})}):e.length?t(l,{children:i}):null}const I=u(h);export{I as ContentItems};
1
+ import{Fragment as l,jsx as t,jsxs as f}from"react/jsx-runtime";import{memo as u,useMemo as p}from"react";import{Navigate as c,Route as n,Routes as m}from"react-router";import{getFirstPageLink as d,getItemsByType as g}from"./helpers.js";import{SectionContent as s}from"../SectionContent/index.js";function h({items:e,root:r=!1}){const{rootItem:o}=g(e),a=!r||o?"/":d(e,"/"),i=p(()=>f(m,{children:[o&&t(n,{path:`${o.href||"/"}*`,element:t(s,{items:e})}),t(n,{path:"*",element:t(c,{to:a,replace:!0})})]}),[o,"/",e,a]);return r&&!e.length?t(m,{children:t(n,{path:"*",element:t(s,{items:e})})}):e.length?t(l,{children:i}):null}const I=u(h);export{I as ContentItems};
@@ -1 +1 @@
1
- import{Fragment as f,jsx as h}from"react/jsx-runtime";import{useCallback as g,memo as M,useEffect as _,useState as x,useMemo as E}from"react";import{useLocation as S}from"react-router-dom";import{removeLeadingSlash as r}from"@redocly/theme/core/openapi";const T=3,a=1,b=1e3,F=({items:e=[],renderItem:c,routingBasePath:i})=>{const m=i||"/",u=S(),l=r(u.pathname.replace(m,"")),s=E(()=>{const n=new Map(e.map((t,o)=>[r(t.href),o]));return t=>t?n.get(t):void 0},[e]),I=g(n=>{const t=s(n),o=Math.max(0,t?t-a:0),L=Math.min(e.length,t?t+a+1:T);return{start:o,end:L}},[s,e.length]),[p,d]=x(()=>{const{start:n,end:t}=I(l);return e.slice(n,t)});return _(()=>{const n=setTimeout(()=>{d(e)},b);return()=>clearTimeout(n)},[e]),h(f,{children:p.map(c)})},B=M(F);export{B as VirtualList};
1
+ import{Fragment as f,jsx as h}from"react/jsx-runtime";import{useCallback as g,memo as M,useEffect as _,useState as x,useMemo as E}from"react";import{useLocation as S}from"react-router";import{removeLeadingSlash as r}from"@redocly/theme/core/openapi";const T=3,a=1,b=1e3,F=({items:e=[],renderItem:c,routingBasePath:i})=>{const m=i||"/",u=S(),l=r(u.pathname.replace(m,"")),s=E(()=>{const n=new Map(e.map((t,o)=>[r(t.href),o]));return t=>t?n.get(t):void 0},[e]),I=g(n=>{const t=s(n),o=Math.max(0,t?t-a:0),L=Math.min(e.length,t?t+a+1:T);return{start:o,end:L}},[s,e.length]),[p,d]=x(()=>{const{start:n,end:t}=I(l);return e.slice(n,t)});return _(()=>{const n=setTimeout(()=>{d(e)},b);return()=>clearTimeout(n)},[e]),h(f,{children:p.map(c)})},B=M(F);export{B as VirtualList};
@@ -1 +1 @@
1
- import{useEffect as l,useRef as i}from"react";import{useLocation as s}from"react-router-dom";import{removeLeadingSlash as n}from"@redocly/theme/core/openapi";import{getElementById as a}from"../Content/useAutoScroll.js";function m(r,c){const e=i(null),o=s(),f=n(o.pathname.replace(c,""));return l(()=>{if(e.current&&r.href&&n(r.href)===f&&(typeof e?.current?.scrollIntoView=="function"&&e.current.scrollIntoView(),o.hash)){const t=a(o.hash.replace("#","").toLowerCase());t&&t.scrollIntoView()}},[]),e}var w=m;export{w as default};
1
+ import{useEffect as l,useRef as i}from"react";import{useLocation as s}from"react-router";import{removeLeadingSlash as n}from"@redocly/theme/core/openapi";import{getElementById as a}from"../Content/useAutoScroll.js";function m(r,c){const e=i(null),o=s(),f=n(o.pathname.replace(c,""));return l(()=>{if(e.current&&r.href&&n(r.href)===f&&(typeof e?.current?.scrollIntoView=="function"&&e.current.scrollIntoView(),o.hash)){const t=a(o.hash.replace("#","").toLowerCase());t&&t.scrollIntoView()}},[]),e}var w=m;export{w as default};
@@ -1,4 +1,4 @@
1
- import{Fragment as w,jsx as o,jsxs as i}from"react/jsx-runtime";import{memo as C,useMemo as f}from"react";import{useLocation as E}from"react-router-dom";import{useAtomValue as u}from"jotai";import{Tabs as F,useTabsState as M}from"../Tabs/index.js";import{ResponseDetails as P}from"./ResponseDetails.js";import{makeDeepLink as N}from"../../services/index.js";import{Row as R,StyledTitle as S}from"./styled.js";import{LinkToField as _}from"../common/LinkToField.js";import{pathIncludesLink as h,hasNestedFields as B}from"../../utils/index.js";import{ExpandAllButton as $}from"../ExpandAllButton/index.js";import{computeExpandAllDepth as I}from"../ExpandAllButton/helpers.js";import{ExpandAllDepthContext as O}from"../../contexts/expand-all-depth.js";import{useTranslate as V}from"../../hooks/index.js";import{getActiveMediaType as W}from"../../models/index.js";import{activeMimeNameAtom as q}from"../../jotai/app.js";import{globalParserAtom as z}from"../../jotai/store.js";import{styled as G}from"../../styled-components.js";const ce=C(({responses:m,renderTitle:g,operationId:a,operationPointer:x,activeResponseTab:p,onTabChange:T,callbackId:b,onPanelToggle:v})=>{const l=E(),k=V(),c=u(q),d=u(z),r=m.map(({code:e})=>({key:e,title:e})),A=r.find(({key:e})=>e===p||h(l,a)&&h(l,`c=${e}`)),{activeTab:y,handleTabChange:D}=M({tabs:r,defaultTab:A?.key,onChange:T}),n=r.find(e=>e.key===(p||y)),t=m.find(e=>e.code===n?.key),s=f(()=>{if(!t?.content)return;const{schema:e}=W(t?.content,c)||{};return e},[c,t?.content]),L=B(s),j=f(()=>I(d,[s]),[d,s]);return n?i(w,{children:[i(H,{children:[g?.(n)||i(S,{children:[o(_,{to:N(a,`response&c=${n.key}`)}),k("openapi.responses","Responses")]}),o(F,{tabs:r,activeTab:n,onChange:D}),L&&o($,{type:"response",operationPointer:x,onPanelToggle:v})]}),t?o(O.Provider,{value:j,children:o("div",{children:o(P,{response:t,operationId:a,callbackId:b})},t.code)}):null]}):null}),H=G(R)`
1
+ import{Fragment as w,jsx as o,jsxs as i}from"react/jsx-runtime";import{memo as C,useMemo as f}from"react";import{useLocation as E}from"react-router";import{useAtomValue as u}from"jotai";import{Tabs as F,useTabsState as M}from"../Tabs/index.js";import{ResponseDetails as P}from"./ResponseDetails.js";import{makeDeepLink as N}from"../../services/index.js";import{Row as R,StyledTitle as S}from"./styled.js";import{LinkToField as _}from"../common/LinkToField.js";import{pathIncludesLink as h,hasNestedFields as B}from"../../utils/index.js";import{ExpandAllButton as $}from"../ExpandAllButton/index.js";import{computeExpandAllDepth as I}from"../ExpandAllButton/helpers.js";import{ExpandAllDepthContext as O}from"../../contexts/expand-all-depth.js";import{useTranslate as V}from"../../hooks/index.js";import{getActiveMediaType as W}from"../../models/index.js";import{activeMimeNameAtom as q}from"../../jotai/app.js";import{globalParserAtom as z}from"../../jotai/store.js";import{styled as G}from"../../styled-components.js";const ce=C(({responses:m,renderTitle:g,operationId:a,operationPointer:x,activeResponseTab:p,onTabChange:T,callbackId:b,onPanelToggle:v})=>{const l=E(),k=V(),c=u(q),d=u(z),r=m.map(({code:e})=>({key:e,title:e})),A=r.find(({key:e})=>e===p||h(l,a)&&h(l,`c=${e}`)),{activeTab:y,handleTabChange:D}=M({tabs:r,defaultTab:A?.key,onChange:T}),n=r.find(e=>e.key===(p||y)),t=m.find(e=>e.code===n?.key),s=f(()=>{if(!t?.content)return;const{schema:e}=W(t?.content,c)||{};return e},[c,t?.content]),L=B(s),j=f(()=>I(d,[s]),[d,s]);return n?i(w,{children:[i(H,{children:[g?.(n)||i(S,{children:[o(_,{to:N(a,`response&c=${n.key}`)}),k("openapi.responses","Responses")]}),o(F,{tabs:r,activeTab:n,onChange:D}),L&&o($,{type:"response",operationPointer:x,onPanelToggle:v})]}),t?o(O.Provider,{value:j,children:o("div",{children:o(P,{response:t,operationId:a,callbackId:b})},t.code)}):null]}):null}),H=G(R)`
2
2
  flex-wrap: wrap;
3
3
  gap: var(--spacing-unit);
4
4
  margin-top: var(--spacing-xl);
@@ -1,4 +1,4 @@
1
- import{jsx as i}from"react/jsx-runtime";import{memo as y}from"react";import{useAtomValue as S}from"jotai";import{useLocation as g}from"react-router-dom";import{ArraySchema as I}from"./ArraySchema.js";import{ObjectSchema as p}from"./ObjectSchema.js";import{OneOfSchema as L}from"./OneOfSchema.js";import{RecursiveSchema as u}from"./RecursiveSchema.js";import{operationStore as b}from"../../jotai/operation.js";import{FieldDetails as j}from"../PropertyDetails/index.js";import{pathIncludesLink as A}from"../../utils/index.js";import{styled as C}from"../../styled-components.js";function N({schema:e,onOneOfChange:n,...o}){const{activeOneOf:a}=S(b(e?.operationPointer||"")),s=g();if(!e)return null;const{type:t,oneOf:r,discriminatorProp:f,isCircular:O}=e;if(O)return i(u,{schema:e});if(f!==void 0){if(!r||!r.length)return console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${e.title}`),null;const c=r.findIndex(($,h)=>A(s,`d=${h}`)),l=c===-1?0:c,x=a[e.pointer]!==void 0?a[e.pointer]:l,d=r[x];return d?.isCircular?i(u,{schema:d}):i(p,{...o,schema:d,discriminator:{fieldName:f,parentSchema:e,activeOneOfIdx:l},onOneOfChange:n})}if(r!==void 0&&r.length>=1)return i(L,{...o,schema:e,onChange:n});const m=Array.isArray(t)?t:[t];if(m.includes("object")){if(e.fields?.length)return i(p,{...o,schema:e,onOneOfChange:n})}else if(m.includes("array"))return i(I,{...o,schema:e,onOneOfChange:n});const v={schema:e,name:o.fieldName||"",description:o.oneOfLevel?"":e.description,example:o.oneOfLevel?void 0:e.example,required:!1,deprecated:o.oneOfLevel?!1:e.deprecated,const:e.const};return i(P,{$hideBorder:o.hideBottomBorder,children:i(j,{field:v,fieldParentsName:o.fieldParentsName})})}const G=y(N),P=C.div`
1
+ import{jsx as i}from"react/jsx-runtime";import{memo as y}from"react";import{useAtomValue as S}from"jotai";import{useLocation as g}from"react-router";import{ArraySchema as I}from"./ArraySchema.js";import{ObjectSchema as p}from"./ObjectSchema.js";import{OneOfSchema as L}from"./OneOfSchema.js";import{RecursiveSchema as u}from"./RecursiveSchema.js";import{operationStore as b}from"../../jotai/operation.js";import{FieldDetails as j}from"../PropertyDetails/index.js";import{pathIncludesLink as A}from"../../utils/index.js";import{styled as C}from"../../styled-components.js";function N({schema:e,onOneOfChange:n,...o}){const{activeOneOf:a}=S(b(e?.operationPointer||"")),s=g();if(!e)return null;const{type:t,oneOf:r,discriminatorProp:f,isCircular:O}=e;if(O)return i(u,{schema:e});if(f!==void 0){if(!r||!r.length)return console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${e.title}`),null;const c=r.findIndex(($,h)=>A(s,`d=${h}`)),l=c===-1?0:c,x=a[e.pointer]!==void 0?a[e.pointer]:l,d=r[x];return d?.isCircular?i(u,{schema:d}):i(p,{...o,schema:d,discriminator:{fieldName:f,parentSchema:e,activeOneOfIdx:l},onOneOfChange:n})}if(r!==void 0&&r.length>=1)return i(L,{...o,schema:e,onChange:n});const m=Array.isArray(t)?t:[t];if(m.includes("object")){if(e.fields?.length)return i(p,{...o,schema:e,onOneOfChange:n})}else if(m.includes("array"))return i(I,{...o,schema:e,onOneOfChange:n});const v={schema:e,name:o.fieldName||"",description:o.oneOfLevel?"":e.description,example:o.oneOfLevel?void 0:e.example,required:!1,deprecated:o.oneOfLevel?!1:e.deprecated,const:e.const};return i(P,{$hideBorder:o.hideBottomBorder,children:i(j,{field:v,fieldParentsName:o.fieldParentsName})})}const G=y(N),P=C.div`
2
2
  width: 100%;
3
3
  padding: var(--spacing-xxs) 0;
4
4
  ${({$hideBorder:e})=>!e&&"border-bottom: 1px solid var(--border-color-primary)"};
@@ -1 +1 @@
1
- import{jsx as h}from"react/jsx-runtime";import{memo as S}from"react";import{useLocation as A}from"react-router-dom";import{useAtomValue as w}from"jotai/index";import{pathIncludesLink as D}from"../../utils/index.js";import{operationStore as $}from"../../jotai/operation.js";import{extractTypeFromDeepLink as b}from"./helpers.js";import{ViewNested as y}from"../ViewNested/index.js";import{useTranslate as T}from"../../hooks/index.js";import{useExpandAllDepth as N}from"../../contexts/expand-all-depth.js";function j({expandByDefault:n,deepLink:e,level:r,expandable:p=!1,isNestedArray:m=!1,isArray:t="",propertyLength:o="",children:s,operationPointer:i}){const a=T(),l=A(),c=D(l,e),x=b(e),d=w($(i||"")),f=N(),u=t&&!o?`${a("openapi.actions.show","Show")} array items`:`${a("openapi.actions.show","Show")} ${Number(o)===1?"":o} ${t&&"array "}${o!==1?"properties":"property"}`;return h(y,{expandByDefault:n||c,level:r,isNestedArray:m,expandable:p,expandText:u,children:s,expandedAll:d[x]?.expandedAll,expandAllDepth:f})}const z=S(j);export{z as SubSchema};
1
+ import{jsx as h}from"react/jsx-runtime";import{memo as S}from"react";import{useLocation as A}from"react-router";import{useAtomValue as w}from"jotai/index";import{pathIncludesLink as D}from"../../utils/index.js";import{operationStore as $}from"../../jotai/operation.js";import{extractTypeFromDeepLink as b}from"./helpers.js";import{ViewNested as y}from"../ViewNested/index.js";import{useTranslate as T}from"../../hooks/index.js";import{useExpandAllDepth as N}from"../../contexts/expand-all-depth.js";function j({expandByDefault:n,deepLink:e,level:r,expandable:p=!1,isNestedArray:m=!1,isArray:t="",propertyLength:o="",children:s,operationPointer:i}){const a=T(),l=A(),c=D(l,e),x=b(e),d=w($(i||"")),f=N(),u=t&&!o?`${a("openapi.actions.show","Show")} array items`:`${a("openapi.actions.show","Show")} ${Number(o)===1?"":o} ${t&&"array "}${o!==1?"properties":"property"}`;return h(y,{expandByDefault:n||c,level:r,isNestedArray:m,expandable:p,expandText:u,children:s,expandedAll:d[x]?.expandedAll,expandAllDepth:f})}const z=S(j);export{z as SubSchema};
@@ -1 +1 @@
1
- import{useLocation as s}from"react-router-dom";import{useMemo as r}from"react";const i=/(?=oneof=)/g;function m(o,n){const t=s();return r(()=>o.findIndex((c,e)=>t.hash.split(i)[n]?.includes(`oneof=${e}`)),[n,t.hash,o])}export{m as useOneOfLocationIdx};
1
+ import{useLocation as s}from"react-router";import{useMemo as r}from"react";const i=/(?=oneof=)/g;function m(o,n){const t=s();return r(()=>o.findIndex((c,e)=>t.hash.split(i)[n]?.includes(`oneof=${e}`)),[n,t.hash,o])}export{m as useOneOfLocationIdx};
@@ -1 +1 @@
1
- import{useMemo as b}from"react";import{useLocation as h}from"react-router-dom";import{useActiveSectionId as I}from"@redocly/theme/core/openapi";import{pathMatchedLink as k}from"../../../utils/index.js";import{DEFAULT_WEBHOOKS_TAG_NAME as A}from"../../../constants.js";import{joinWithSeparator as y}from"../../../services/history/helpers.js";function L({items:s,routingBasePath:r}){const t=h(),o=I(t,!1,!1);return b(()=>S(s,o,t,r),[o,s,t,r])}function S(s,r="",t,o){const n=[];return c({contentItems:s,sidebarItems:n,activeItemId:r,location:t,routingBasePath:o}),n}function d(s,r="",t,o){return s.href?r&&o?y(o,s.id)===r:r&&!o?s.id===r:k(t,s.href):!1}function l(s,r="",t,o){return(s.items||[]).some(i=>d(i,r,t,o)||l(i,r,t,o))}function c(s){const{contentItems:r,sidebarItems:t,activeItemId:o,location:n,routingBasePath:i}=s;let p=!0;for(const e of r){const a=d(e,o,n,i),m=l(e,o,n,i);switch(e.type){case"group":t.push({type:"separator",label:e.name,active:a,hasActiveSubItem:m}),c({...s,contentItems:e.items,sidebarItems:t});break;case"tag":const f={type:"group",label:e.name,items:[],link:e.href,active:a,hasActiveSubItem:m,modified:!0};t.push(f),c({contentItems:e.items,sidebarItems:f.items||[],activeItemId:o,location:n,routingBasePath:i});break;case"operation":case"schema":case"tool":case"rsrc":case"prompt":e.isWebhook&&p&&e.parent.name!==A&&(t.push({type:"separator",label:"Webhooks",variant:"secondary"}),p=!1),t.push({type:"link",label:e.name,httpVerb:e.type=="operation"?e.httpVerb:e.type,link:e.href,badges:e.badges,active:a,hasActiveSubItem:m,modified:!0,deprecated:e.deprecated,isAdditionalOperation:e.isAdditionalOperation});break;case"section":if(e.depth===-1)continue;const u={type:e.items.length?"group":"link",label:e.name,link:e.href,items:[],active:a,hasActiveSubItem:m,modified:!0};t.push(u),e.items.length&&c({contentItems:e.items,sidebarItems:u.items,activeItemId:o,location:n,routingBasePath:i});break}}}export{L as useMenuItems};
1
+ import{useMemo as b}from"react";import{useLocation as h}from"react-router";import{useActiveSectionId as I}from"@redocly/theme/core/openapi";import{pathMatchedLink as k}from"../../../utils/index.js";import{DEFAULT_WEBHOOKS_TAG_NAME as A}from"../../../constants.js";import{joinWithSeparator as y}from"../../../services/history/helpers.js";function L({items:s,routingBasePath:r}){const t=h(),o=I(t,!1,!1);return b(()=>S(s,o,t,r),[o,s,t,r])}function S(s,r="",t,o){const n=[];return c({contentItems:s,sidebarItems:n,activeItemId:r,location:t,routingBasePath:o}),n}function d(s,r="",t,o){return s.href?r&&o?y(o,s.id)===r:r&&!o?s.id===r:k(t,s.href):!1}function l(s,r="",t,o){return(s.items||[]).some(i=>d(i,r,t,o)||l(i,r,t,o))}function c(s){const{contentItems:r,sidebarItems:t,activeItemId:o,location:n,routingBasePath:i}=s;let p=!0;for(const e of r){const a=d(e,o,n,i),m=l(e,o,n,i);switch(e.type){case"group":t.push({type:"separator",label:e.name,active:a,hasActiveSubItem:m}),c({...s,contentItems:e.items,sidebarItems:t});break;case"tag":const f={type:"group",label:e.name,items:[],link:e.href,active:a,hasActiveSubItem:m,modified:!0};t.push(f),c({contentItems:e.items,sidebarItems:f.items||[],activeItemId:o,location:n,routingBasePath:i});break;case"operation":case"schema":case"tool":case"rsrc":case"prompt":e.isWebhook&&p&&e.parent.name!==A&&(t.push({type:"separator",label:"Webhooks",variant:"secondary"}),p=!1),t.push({type:"link",label:e.name,httpVerb:e.type=="operation"?e.httpVerb:e.type,link:e.href,badges:e.badges,active:a,hasActiveSubItem:m,modified:!0,deprecated:e.deprecated,isAdditionalOperation:e.isAdditionalOperation});break;case"section":if(e.depth===-1)continue;const u={type:e.items.length?"group":"link",label:e.name,link:e.href,items:[],active:a,hasActiveSubItem:m,modified:!0};t.push(u),e.items.length&&c({contentItems:e.items,sidebarItems:u.items,activeItemId:o,location:n,routingBasePath:i});break}}}export{L as useMenuItems};
@@ -1,4 +1,4 @@
1
- import{Fragment as l,jsx as n,jsxs as f}from"react/jsx-runtime";import{memo as b,useEffect as h,useRef as u,useState as x}from"react";import{useAtom as y}from"jotai";import{useLocation as S}from"react-router-dom";import{useMount as v,breakpoints as k}from"@redocly/theme/core/openapi";import{isSidebarOpenedAtom as $}from"../../jotai/app.js";import{SidebarActions as g}from"./SidebarActions.js";import{styled as w}from"../../styled-components.js";const j=w.div`
1
+ import{Fragment as l,jsx as n,jsxs as f}from"react/jsx-runtime";import{memo as b,useEffect as h,useRef as u,useState as x}from"react";import{useAtom as y}from"jotai";import{useLocation as S}from"react-router";import{useMount as v,breakpoints as k}from"@redocly/theme/core/openapi";import{isSidebarOpenedAtom as $}from"../../jotai/app.js";import{SidebarActions as g}from"./SidebarActions.js";import{styled as w}from"../../styled-components.js";const j=w.div`
2
2
  overflow: hidden;
3
3
  flex-direction: column;
4
4
  backface-visibility: hidden;
@@ -1,4 +1,4 @@
1
- import{jsx as s,jsxs as y}from"react/jsx-runtime";import{useMemo as E,memo as W,useState as _,useCallback as D}from"react";import{useNavigate as V}from"react-router-dom";import{LayoutVariant as z}from"@redocly/config";import{useAtomValue as K}from"jotai/index";import{SamplesPanel as L}from"../common/index.js";import{layoutAtom as X}from"../../jotai/app.js";import{OperationNavigationItems as i}from"./OperationNavigationItems.js";import{StyledButton as q}from"./styled.js";import{useTranslate as F}from"../../hooks/index.js";import{styled as x}from"../../styled-components.js";import{isRenderableMenuItem as G}from"../../utils/menu.js";const b=8;function H({items:c,routingBasePath:n}){const o=F(),[p,w]=_(!1),C=V(),O=K(X)===z.STACKED,{operations:m,webhooks:h,schemas:u,mcpTools:d,showMoreCount:v,totalCount:P,mcpResources:g,mcpPrompts:f,tags:l}=E(()=>{const a=c.filter(e=>G(e)),T=p?a:a.slice(0,b),{operations:M,additionalOperations:R,webhooks:A,schemas:B,mcpTools:I,mcpResources:N,mcpPrompts:j}=T.reduce((e,t)=>{if(t.type==="operation"&&t.isWebhook)e.webhooks.push(t);else if(t.type==="operation"){const k=t;k.isAdditionalOperation?e.additionalOperations.push(k):e.operations.push(k)}else t.type==="schema"?e.schemas.push(t):t.type==="tool"?e.mcpTools.push(t):t.type==="rsrc"?e.mcpResources.push(t):t.type==="prompt"&&e.mcpPrompts.push(t);return e},{operations:[],additionalOperations:[],webhooks:[],schemas:[],mcpTools:[],mcpResources:[],mcpPrompts:[]});return{operations:[...M,...R],schemas:B,mcpTools:I,webhooks:A,mcpResources:N,mcpPrompts:j,showMoreCount:!p&&a.length>b?a.length-b:0,totalCount:a.length,tags:c.filter(e=>e.type==="tag")}},[p,c]),r=D(a=>C(a),[C]),S=u.length>0||d.length>0||g.length>0||f.length>0||m.length>0||h.length>0;return!P&&l.length===0?null:y(J,{isStacked:O,"data-testid":"operation-navigation-list",children:[u.length>0&&s(i,{items:u,onClick:r,routingBasePath:n,translate:o,title:o("openapi.schemas","Schemas")}),d.length>0&&s(i,{items:d,onClick:r,routingBasePath:n,translate:o,title:o("openapi.mcp.tools","MCP Tools")}),g.length>0&&s(i,{items:g,onClick:r,routingBasePath:n,translate:o,title:o("openapi.mcp.resources","MCP Resources")}),f.length>0&&s(i,{items:f,onClick:r,routingBasePath:n,translate:o,title:o("openapi.mcp.prompts","MCP Prompts")}),m.length>0&&s(i,{items:m,onClick:r,routingBasePath:n,translate:o,title:o("openapi.operations","Operations")}),h.length>0&&s(i,{items:h,onClick:r,routingBasePath:n,translate:o,title:o("openapi.webhooks","Webhooks")}),!p&&!!v&&y(U,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>w(!0),children:[o("openapi.actions.show","Show")," ",v," ",o("openapi.actions.more","more"),"..."]}),l.length>0&&S&&s(Q,{}),l.length>0&&s(i,{items:l,onClick:r,routingBasePath:n,translate:o,disableTooltip:!0})]})}const co=W(H),J=x(L)`
1
+ import{jsx as s,jsxs as y}from"react/jsx-runtime";import{useMemo as E,memo as W,useState as _,useCallback as D}from"react";import{useNavigate as V}from"react-router";import{LayoutVariant as z}from"@redocly/config";import{useAtomValue as K}from"jotai/index";import{SamplesPanel as L}from"../common/index.js";import{layoutAtom as X}from"../../jotai/app.js";import{OperationNavigationItems as i}from"./OperationNavigationItems.js";import{StyledButton as q}from"./styled.js";import{useTranslate as F}from"../../hooks/index.js";import{styled as x}from"../../styled-components.js";import{isRenderableMenuItem as G}from"../../utils/menu.js";const b=8;function H({items:c,routingBasePath:n}){const o=F(),[p,w]=_(!1),C=V(),O=K(X)===z.STACKED,{operations:m,webhooks:h,schemas:u,mcpTools:d,showMoreCount:v,totalCount:P,mcpResources:g,mcpPrompts:f,tags:l}=E(()=>{const a=c.filter(e=>G(e)),T=p?a:a.slice(0,b),{operations:M,additionalOperations:R,webhooks:A,schemas:B,mcpTools:I,mcpResources:N,mcpPrompts:j}=T.reduce((e,t)=>{if(t.type==="operation"&&t.isWebhook)e.webhooks.push(t);else if(t.type==="operation"){const k=t;k.isAdditionalOperation?e.additionalOperations.push(k):e.operations.push(k)}else t.type==="schema"?e.schemas.push(t):t.type==="tool"?e.mcpTools.push(t):t.type==="rsrc"?e.mcpResources.push(t):t.type==="prompt"&&e.mcpPrompts.push(t);return e},{operations:[],additionalOperations:[],webhooks:[],schemas:[],mcpTools:[],mcpResources:[],mcpPrompts:[]});return{operations:[...M,...R],schemas:B,mcpTools:I,webhooks:A,mcpResources:N,mcpPrompts:j,showMoreCount:!p&&a.length>b?a.length-b:0,totalCount:a.length,tags:c.filter(e=>e.type==="tag")}},[p,c]),r=D(a=>C(a),[C]),S=u.length>0||d.length>0||g.length>0||f.length>0||m.length>0||h.length>0;return!P&&l.length===0?null:y(J,{isStacked:O,"data-testid":"operation-navigation-list",children:[u.length>0&&s(i,{items:u,onClick:r,routingBasePath:n,translate:o,title:o("openapi.schemas","Schemas")}),d.length>0&&s(i,{items:d,onClick:r,routingBasePath:n,translate:o,title:o("openapi.mcp.tools","MCP Tools")}),g.length>0&&s(i,{items:g,onClick:r,routingBasePath:n,translate:o,title:o("openapi.mcp.resources","MCP Resources")}),f.length>0&&s(i,{items:f,onClick:r,routingBasePath:n,translate:o,title:o("openapi.mcp.prompts","MCP Prompts")}),m.length>0&&s(i,{items:m,onClick:r,routingBasePath:n,translate:o,title:o("openapi.operations","Operations")}),h.length>0&&s(i,{items:h,onClick:r,routingBasePath:n,translate:o,title:o("openapi.webhooks","Webhooks")}),!p&&!!v&&y(U,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>w(!0),children:[o("openapi.actions.show","Show")," ",v," ",o("openapi.actions.more","more"),"..."]}),l.length>0&&S&&s(Q,{}),l.length>0&&s(i,{items:l,onClick:r,routingBasePath:n,translate:o,disableTooltip:!0})]})}const co=W(H),J=x(L)`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: var(--spacing-xxs);
@@ -1,4 +1,4 @@
1
- import{jsx as i,jsxs as e}from"react/jsx-runtime";import{memo as T,useCallback as v}from"react";import{useNavigate as W}from"react-router-dom";import{useAtomValue as M}from"jotai";import{LayoutVariant as C}from"@redocly/config";import{Markdown as o}from"@redocly/theme/components/Markdown/Markdown";import{breakpoints as d}from"@redocly/theme/core/openapi";import{Button as I}from"@redocly/theme/components/Button/Button";import{PageActions as j}from"@redocly/theme/components/PageActions/PageActions";import{H2 as B}from"@redocly/theme/components/Typography/H2";import{LinkIcon as A}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{encodeBackSlashes as L,getBreadcrumbs as H}from"../../utils/index.js";import{joinWithSeparator as $}from"../../services/history/helpers.js";import{Row as P,SamplesMiddlePanel as w,SamplesPanel as c,ShareLink as D}from"../common/index.js";import{Markdown as N}from"../Markdown/index.js";import{OperationsNavigation as V}from"./OperationsNavigation.js";import{Breadcrumbs as _}from"./Breadcrumbs.js";import{layoutAtom as E}from"../../jotai/app.js";import{useTranslate as F}from"../../hooks/index.js";import{styled as r}from"../../styled-components.js";import{StyledShareLink as K}from"../common/linkify.js";function O({item:a,routingBasePath:n="",isExpanded:g}){const b=F(),{description:k,name:f,href:x}=a,t=W(),h=M(E),l=$(n,a.href),S=v(()=>{t(l)},[t,l]),p=!!a.items.length,m=h===C.STACKED,s=!p,u=H(a),y=v(z=>{t($(n,L(z)))},[t,n]);return e(R,{expanded:g,children:[e(P,{layout:h,children:[e(q,{fullWidth:s,isStacked:m,children:[e(G,{fullWidth:s,isStacked:m,children:[u.length>0&&i(_,{breadcrumbs:u,onClick:y}),e(Q,{children:[i(D,{to:x,"aria-label":`link to ${f}`}),f]}),i(j,{pageSlug:l})]}),i(J,{fullWidth:s,isStacked:m,children:i(N,{source:k})})]}),p&&i(V,{items:a.items,routingBasePath:n})]}),p&&!g&&e(U,{type:"button",variant:"text",size:"medium",onClick:S,children:["+ ",b("openapi.actions.show","Show")]})]})}const $a=T(O),R=r.div`
1
+ import{jsx as i,jsxs as e}from"react/jsx-runtime";import{memo as T,useCallback as v}from"react";import{useNavigate as W}from"react-router";import{useAtomValue as M}from"jotai";import{LayoutVariant as C}from"@redocly/config";import{Markdown as o}from"@redocly/theme/components/Markdown/Markdown";import{breakpoints as d}from"@redocly/theme/core/openapi";import{Button as I}from"@redocly/theme/components/Button/Button";import{PageActions as j}from"@redocly/theme/components/PageActions/PageActions";import{H2 as B}from"@redocly/theme/components/Typography/H2";import{LinkIcon as A}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{encodeBackSlashes as L,getBreadcrumbs as H}from"../../utils/index.js";import{joinWithSeparator as $}from"../../services/history/helpers.js";import{Row as P,SamplesMiddlePanel as w,SamplesPanel as c,ShareLink as D}from"../common/index.js";import{Markdown as N}from"../Markdown/index.js";import{OperationsNavigation as V}from"./OperationsNavigation.js";import{Breadcrumbs as _}from"./Breadcrumbs.js";import{layoutAtom as E}from"../../jotai/app.js";import{useTranslate as F}from"../../hooks/index.js";import{styled as r}from"../../styled-components.js";import{StyledShareLink as K}from"../common/linkify.js";function O({item:a,routingBasePath:n="",isExpanded:g}){const b=F(),{description:k,name:f,href:x}=a,t=W(),h=M(E),l=$(n,a.href),S=v(()=>{t(l)},[t,l]),p=!!a.items.length,m=h===C.STACKED,s=!p,u=H(a),y=v(z=>{t($(n,L(z)))},[t,n]);return e(R,{expanded:g,children:[e(P,{layout:h,children:[e(q,{fullWidth:s,isStacked:m,children:[e(G,{fullWidth:s,isStacked:m,children:[u.length>0&&i(_,{breadcrumbs:u,onClick:y}),e(Q,{children:[i(D,{to:x,"aria-label":`link to ${f}`}),f]}),i(j,{pageSlug:l})]}),i(J,{fullWidth:s,isStacked:m,children:i(N,{source:k})})]}),p&&i(V,{items:a.items,routingBasePath:n})]}),p&&!g&&e(U,{type:"button",variant:"text",size:"medium",onClick:S,children:["+ ",b("openapi.actions.show","Show")]})]})}const $a=T(O),R=r.div`
2
2
  padding-top: var(--spacing-lg);
3
3
  padding-bottom: ${({expanded:a})=>a?"var(--spacing-xxl)":""};
4
4
  `,q=r(w)`
@@ -1,4 +1,4 @@
1
- import{jsx as c}from"react/jsx-runtime";import{css as p}from"styled-components";import{useLocation as l}from"react-router-dom";import{LinkIcon as r}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{encodeBackSlashes as m}from"../../utils/string.js";import{constructFieldDeepFragment as d,joinWithSeparator as n}from"../../services/history/helpers.js";import{ShareLink as f}from"./linkify.js";import{styled as h}from"../../styled-components.js";function F(i,s){const o=i.deps.operation,e=d(i,s);if(!o?.id&&!o.isCallback)return"#"+e.toLowerCase();const t=n(o.href,n(o.id,e),"#");return m(t.toLowerCase())}const S=({to:i,className:s})=>{const o=i,e=l(),t=o?.split("#")[1],a=e?e.hash===`#${t}`:!1;return c(k,{ariaLabel:`link to ${o}`,className:s,isActive:a,to:o,id:t})},k=h(f)`
1
+ import{jsx as c}from"react/jsx-runtime";import{css as p}from"styled-components";import{useLocation as l}from"react-router";import{LinkIcon as r}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{encodeBackSlashes as m}from"../../utils/string.js";import{constructFieldDeepFragment as d,joinWithSeparator as n}from"../../services/history/helpers.js";import{ShareLink as f}from"./linkify.js";import{styled as h}from"../../styled-components.js";function F(i,s){const o=i.deps.operation,e=d(i,s);if(!o?.id&&!o.isCallback)return"#"+e.toLowerCase();const t=n(o.href,n(o.id,e),"#");return m(t.toLowerCase())}const S=({to:i,className:s})=>{const o=i,e=l(),t=o?.split("#")[1],a=e?e.hash===`#${t}`:!1;return c(k,{ariaLabel:`link to ${o}`,className:s,isActive:a,to:o,id:t})},k=h(f)`
2
2
  display: flex;
3
3
  ${r} {
4
4
  visibility: hidden;
@@ -1,4 +1,4 @@
1
- import{jsx as a,jsxs as c}from"react/jsx-runtime";import{useAtomValue as m}from"jotai";import{Link as h}from"react-router-dom";import{LinkIcon as o}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{globalOptionsAtom as d}from"../../jotai/store.js";import{tryDecodeURIComponent as f}from"../../utils/index.js";import{styled as k}from"../../styled-components.js";import{joinWithSeparator as e}from"../../services/history/helpers.js";function u(i){const{routingBasePath:n,onDeepLinkClick:r}=m(d),t=i.to,l=r&&{onClick:s=>{s.preventDefault(),r(e(n||"",t))}};return t?a(h,{"aria-label":i["aria-label"]||`link to ${t}`,id:f(i.id||""),className:i.className||"",to:t?.startsWith("#")?t:e(n||"",t),...l,children:i.children}):i.children?c("span",{"aria-label":i["aria-label"]||`link to ${t}`,className:i.className,children:[" ",i.children," "]}):null}const b=k(u)`
1
+ import{jsx as a,jsxs as c}from"react/jsx-runtime";import{useAtomValue as m}from"jotai";import{Link as h}from"react-router";import{LinkIcon as o}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{globalOptionsAtom as d}from"../../jotai/store.js";import{tryDecodeURIComponent as f}from"../../utils/index.js";import{styled as k}from"../../styled-components.js";import{joinWithSeparator as e}from"../../services/history/helpers.js";function u(i){const{routingBasePath:n,onDeepLinkClick:r}=m(d),t=i.to,l=r&&{onClick:s=>{s.preventDefault(),r(e(n||"",t))}};return t?a(h,{"aria-label":i["aria-label"]||`link to ${t}`,id:f(i.id||""),className:i.className||"",to:t?.startsWith("#")?t:e(n||"",t),...l,children:i.children}):i.children?c("span",{"aria-label":i["aria-label"]||`link to ${t}`,className:i.className,children:[" ",i.children," "]}):null}const b=k(u)`
2
2
  position: absolute;
3
3
  top: 50%;
4
4
  left: 0;
@@ -1 +1 @@
1
- import{BrowserRouter as s,HashRouter as a,MemoryRouter as n}from"react-router-dom";const m={history:s,memory:n,hash:a},R=(e,o)=>{const r=m[e],t={...e!=="memory"&&{basename:o,feature:{v7_startTransition:!1,v7_relativeSplatPath:!1}}};return{Router:r,routerProps:t}};export{R as useRouter};
1
+ import{BrowserRouter as s,HashRouter as a,MemoryRouter as n}from"react-router";const m={history:s,memory:n,hash:a},R=(e,o)=>{const r=m[e],t={...e!=="memory"&&{basename:o,feature:{v7_startTransition:!1,v7_relativeSplatPath:!1}}};return{Router:r,routerProps:t}};export{R as useRouter};
@@ -1 +1 @@
1
- import{useEffect as t}from"react";import{useLocation as o,useNavigate as r}from"react-router-dom";function p(){const a=r(),e=o();t(()=>{e.pathname.toLowerCase()!==e.pathname&&a(e.pathname.toLowerCase(),{replace:!0})},[e.pathname,a])}export{p as useUppercase2LowercaseRedirect};
1
+ import{useEffect as t}from"react";import{useLocation as o,useNavigate as r}from"react-router";function p(){const a=r(),e=o();t(()=>{e.pathname.toLowerCase()!==e.pathname&&a(e.pathname.toLowerCase(),{replace:!0})},[e.pathname,a])}export{p as useUppercase2LowercaseRedirect};
@@ -1,4 +1,4 @@
1
- import type { Location } from 'react-router-dom';
1
+ import type { Location } from 'react-router';
2
2
  export declare function pathIncludesLink(location: Location, link?: string): boolean;
3
3
  export declare function pathMatchedLink(location: Location, link?: string): boolean;
4
4
  export declare function normalizePath(path: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-docs",
3
- "version": "3.24.0-next.8",
3
+ "version": "3.24.0",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -15,23 +15,23 @@
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@redocly/theme": ">=0.68.0-next.0",
18
- "react": "^19.2.4",
19
- "react-dom": "^19.2.4",
18
+ "react": "^19.2.7",
19
+ "react-dom": "^19.2.7",
20
20
  "styled-components": "^4.1.1 || ^5.3.11 || ^6.0.0"
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/core": "7.29.7",
24
24
  "@markdoc/markdoc": "0.5.2",
25
- "@redocly/openapi-core": "2.43.1",
25
+ "@redocly/openapi-core": "2.45.0",
26
26
  "deepmerge": "^4.2.2",
27
- "dompurify": "3.4.12",
27
+ "dompurify": "3.4.13",
28
28
  "fast-deep-equal": "^3.1.3",
29
29
  "fast-xml-parser": "5.7.3",
30
30
  "jotai": "^2.12.5",
31
31
  "jotai-family": "1.0.1",
32
32
  "json-pointer": "^0.6.2",
33
33
  "openapi-sampler": "^1.7.2",
34
- "react-router-dom": "^7.18.1",
34
+ "react-router": "^8.3.0",
35
35
  "slugify": "^1.4.7",
36
36
  "stringify-object": "^3.3.0",
37
37
  "styled-components": "^6.4.2",
@@ -39,9 +39,9 @@
39
39
  "url-template": "^2.0.8",
40
40
  "util": "~0.12.5",
41
41
  "web-vitals": "3.3.1",
42
- "@redocly/config": "0.53.1",
43
42
  "@redocly/redoc-opentelemetry": "0.2.2",
44
- "@redocly/replay": "0.27.0-next.7"
43
+ "@redocly/replay": "0.27.0",
44
+ "@redocly/config": "0.53.1"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@shikijs/transformers": "3.21.0",
@@ -57,12 +57,12 @@
57
57
  "@vitest/coverage-v8": "4.1.10",
58
58
  "esbuild": "0.28.1",
59
59
  "jest-styled-components": "7.2.0",
60
- "js-yaml": "4.3.0",
60
+ "js-yaml": "4.3.1",
61
61
  "json-schema": "0.4.0",
62
62
  "outdent": "0.8.0",
63
63
  "path-browserify": "1.0.1",
64
- "react": "^19.2.4",
65
- "react-dom": "^19.2.4",
64
+ "react": "^19.2.7",
65
+ "react-dom": "^19.2.7",
66
66
  "rimraf": "5.0.7",
67
67
  "rollup-plugin-bundle-stats": "^4.22.1",
68
68
  "shiki": "3.21.0",
@@ -71,7 +71,7 @@
71
71
  "url": "~0.11.0",
72
72
  "vite": "7.3.6",
73
73
  "vitest": "4.1.10",
74
- "@redocly/theme": "0.68.0-next.5"
74
+ "@redocly/theme": "0.68.0"
75
75
  },
76
76
  "scripts": {
77
77
  "start": "pnpm run copy-highlight-hook && vite",
@@ -1 +0,0 @@
1
- import{V as i}from"./redocly-openapi-docs.min.standalone-BFWv5fnd.js";import{R as u,U as n}from"./redocly-openapi-docs.min.index-CVScN5cj.js";function m(){return`aichat_${i()}`}function l(){return`aimsg_${i()}`}function c(){return`aimpt_${i()}`}function f(t){return{id:t.id,title:t.title??void 0,modelConfig:t.modelConfig,messages:t.messages.map(p),createdAt:new Date(t.createdAt),updatedAt:new Date(t.updatedAt)}}function p(t){return{id:t.uiId,role:t.role,metadata:t.metadata,parts:t.parts.map(g)}}function g(t){return t.self}function I(t){const a=t.id;return{id:a,title:t.title,modelConfig:t.modelConfig,messages:t.messages.map((e,r)=>d(a,r,e))}}function d(t,a,e,r=l()){return{id:r,uiId:e.id,role:e.role,metadata:e.metadata,aiChatId:t,indexWithinInsertBatch:a,parts:e.parts.map((o,s)=>C(r,s,o))}}function C(t,a,e){return{id:c(),text:e.type==="text"?e.text:null,index:a,self:e,aiMessageId:t}}function h(t){return{id:t.id,title:t.title,modelConfig:v(t.model),messages:t.messages.map(x)}}function v(t){switch(t.provider){case n.OPENAI:case n.ANTHROPIC:case n.GEMINI:return{provider:t.provider,modelId:t.modelId};case u:return{provider:t.provider,baseUrl:t.baseUrl};default:throw new Error("Cannot create model config")}}function x(t){return{...t,parts:t.parts.filter(a=>a.type!=="file")}}export{I as a,h as b,f as c,d,m as g};
@@ -1,2 +0,0 @@
1
- import{aL as s,a7 as n,aM as i,aN as c,aO as l}from"./redocly-openapi-docs.min.index-CVScN5cj.js";import{aL as f,as as o,bo as d,b6 as r}from"./redocly-openapi-docs.min.standalone-BFWv5fnd.js";class w extends f{constructor(){super()}resolveExternalRef(e,a){return s(a)?a:e&&s(e)?new URL(a,e).href:e?o.resolve(o.dirname(e),a):a}async loadExternalRef(e){if(s(e)){const{body:a,mimeType:t}=await d(e,{...this.config.http,customFetch:n});return new r(e,a,t)}else{if(!await i(e))throw new Error(`File not found at ${e}.`);try{throw await c(e),new Error(`Expected a file but received a folder at ${e}.`)}catch(t){if(t instanceof Error&&t.message.includes("Expected a file but received a folder"))throw t}const a=await l(e);return new r(e,a.replace(/\r\n/g,`
2
- `))}}}export{w as ExternalResolver};