@redocly/openapi-docs 3.15.0-rc.2 → 3.15.0-rc.4
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Redocly OpenAPI Docs
|
|
3
3
|
* (c) Copyright 2025 Redocly LLC, all rights reserved.
|
|
4
4
|
* -------------------------------------------------------------
|
|
5
|
-
* Version: 3.15.0-rc.
|
|
5
|
+
* Version: 3.15.0-rc.4
|
|
6
6
|
**/function wW(e,t){for(var a=0;a<t.length;a++){const r=t[a];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(r,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function SW(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var a=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),a}var zW={exports:{}},P0={};/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
@@ -9306,7 +9306,7 @@ ${s.description||""}
|
|
|
9306
9306
|
|
|
9307
9307
|
height: ${({size:e})=>e||"16px"};
|
|
9308
9308
|
width: ${({size:e})=>e||"16px"};
|
|
9309
|
-
`;function krt({languages:e,activeLanguage:t}){const[a,r]=K.useState([]),[n,i]=K.useState([]),o=Hu(),s=K.useRef(null),l=Ft(lc),c=E0(GO),u=b=>{o.sendOpenapiDocsSelectLanguageClickedMessage({language:b})},d=b=>{c(b),u(b)},p=b=>{const g=n.findIndex(m=>m.key===b);if(g!==-1){const m=[...n],k=[...a];lne(k,m,g),r(k),i(m),u(b),c(b)}},h=K.useCallback(()=>{const b=s?.current?.offsetWidth;if(!b)return;const{newVisibleItems:g,newHiddenItems:m}=xrt(b,[...e]),k=m.findIndex(x=>x.key===t);k!==-1&&lne(g,m,k),r(g),i(m)},[t,e]);K.useLayoutEffect(()=>(h(),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}),[l,t]);const f=K.useMemo(()=>a.length>=5||n.length?"space-between":"start",[n.length,a.length]);return v.jsxs(crt,{ref:s,children:[v.jsxs(hrt,{$justifyContent:f,children:[!a.length&&v.jsx(TQe,{}),a.map(b=>v.jsx(mrt,{onClick:()=>d(b.key),active:t===b.key,children:v.jsx(one,{item:b,withIcon:!0})},b.key))]}),n.length?v.jsx(sne,{activeTab:t,samples:n,onChange:p,trigger:v.jsx(rt,{icon:v.jsx(l2,{}),variant:"text",style:{height:"100%"}}),withArrow:!1,withCheckmark:!1,width:156}):null]})}const yrt=K.memo(krt);function xrt(e,t){let a=0;const r=[],n=[];return t.forEach((i,o)=>{const s=o===t.length-1&&n.length===0?0:lrt;e&&a+Z6+s<=e?(r.push(i),a+=Z6):n.push(i)}),{newVisibleItems:r,newHiddenItems:n}}function lne(e,t,a){const r=e[e.length-1];r&&(e[e.length-1]=t[a],t[a]=r)}const wrt=({downloadUrls:e,defaultFileName:t})=>K.useMemo(()=>{if(e)return e.map(({title:a,url:r})=>({url:r,title:a||Srt(r,t||"openapi.yaml"),iconType:zrt(r)}))},[e,t]);function Srt(e,t){const a=e.split("?")[0].split(/[\\\/]/).pop();return!a||!a.includes("yaml")&&!a.includes("json")?t:a}function zrt(e,t){const a=e.split("?")[0].split(/[\\\/]/).pop();return a?a.includes("yaml")?"yaml":a.includes("json")?"json":"file":"file"}const jrt=["tools","resources","prompts","logging","subscribe","completions"],Ort="experimental",Crt=["mcp-
|
|
9309
|
+
`;function krt({languages:e,activeLanguage:t}){const[a,r]=K.useState([]),[n,i]=K.useState([]),o=Hu(),s=K.useRef(null),l=Ft(lc),c=E0(GO),u=b=>{o.sendOpenapiDocsSelectLanguageClickedMessage({language:b})},d=b=>{c(b),u(b)},p=b=>{const g=n.findIndex(m=>m.key===b);if(g!==-1){const m=[...n],k=[...a];lne(k,m,g),r(k),i(m),u(b),c(b)}},h=K.useCallback(()=>{const b=s?.current?.offsetWidth;if(!b)return;const{newVisibleItems:g,newHiddenItems:m}=xrt(b,[...e]),k=m.findIndex(x=>x.key===t);k!==-1&&lne(g,m,k),r(g),i(m)},[t,e]);K.useLayoutEffect(()=>(h(),window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}),[l,t]);const f=K.useMemo(()=>a.length>=5||n.length?"space-between":"start",[n.length,a.length]);return v.jsxs(crt,{ref:s,children:[v.jsxs(hrt,{$justifyContent:f,children:[!a.length&&v.jsx(TQe,{}),a.map(b=>v.jsx(mrt,{onClick:()=>d(b.key),active:t===b.key,children:v.jsx(one,{item:b,withIcon:!0})},b.key))]}),n.length?v.jsx(sne,{activeTab:t,samples:n,onChange:p,trigger:v.jsx(rt,{icon:v.jsx(l2,{}),variant:"text",style:{height:"100%"}}),withArrow:!1,withCheckmark:!1,width:156}):null]})}const yrt=K.memo(krt);function xrt(e,t){let a=0;const r=[],n=[];return t.forEach((i,o)=>{const s=o===t.length-1&&n.length===0?0:lrt;e&&a+Z6+s<=e?(r.push(i),a+=Z6):n.push(i)}),{newVisibleItems:r,newHiddenItems:n}}function lne(e,t,a){const r=e[e.length-1];r&&(e[e.length-1]=t[a],t[a]=r)}const wrt=({downloadUrls:e,defaultFileName:t})=>K.useMemo(()=>{if(e)return e.map(({title:a,url:r})=>({url:r,title:a||Srt(r,t||"openapi.yaml"),iconType:zrt(r)}))},[e,t]);function Srt(e,t){const a=e.split("?")[0].split(/[\\\/]/).pop();return!a||!a.includes("yaml")&&!a.includes("json")?t:a}function zrt(e,t){const a=e.split("?")[0].split(/[\\\/]/).pop();return a?a.includes("yaml")?"yaml":a.includes("json")?"json":"file":"file"}const jrt=["tools","resources","prompts","logging","subscribe","completions"],Ort="experimental",Crt=["mcp-json"];function Art({mcpInfo:e,mcpServers:t}){const a=Ua();function r(i){return typeof e?.capabilities[i]=="object"&&e?.capabilities[i]?.listChanged}function n(i){return typeof e?.capabilities[i]=="object"&&e?.capabilities[i]?.subscribe}return v.jsxs(Prt,{children:[e?.protocolVersion&&v.jsx(Fc,{header:a("openapi.mcp.protocolVersion","Protocol version"),title:e.protocolVersion}),e?.capabilities&&v.jsx(Fc,{header:a("openapi.mcp.capabilities","Capabilities"),title:v.jsx(v.Fragment,{children:jrt.map(i=>e?.capabilities[i]?v.jsxs(oc,{size:"small",icon:v.jsx(cc,{}),children:[i,r(i)?" (list changed)":"",n(i)?" (subscribe)":""]},i):null)})}),e?.capabilities[Ort]&&v.jsx(Fc,{header:a("openapi.mcp.experimentalCapabilities","Experimental capabilities"),title:v.jsx(Trt,{children:Object.entries(e?.capabilities.experimental||{}).map(([i,o])=>v.jsxs(K.Fragment,{children:[v.jsxs("span",{children:[i,":"]}),v.jsx(oc,{children:typeof o=="object"?JSON.stringify(o):String(o)})]},i))})}),v.jsx(Fc,{header:a("openapi.mcp.endpoint","Endpoint"),title:v.jsx(v.Fragment,{children:t[0]?.url}),actions:[v.jsx(S1,{data:t[0]?.url},"NewTabButton")]}),!!t[0]?.url&&v.jsx(Fc,{title:v.jsx(Mrt,{children:v.jsx(Y0,{actions:Crt,mcpUrl:t[0]?.url})})})]})}const Prt=Le(J6)`
|
|
9310
9310
|
${ane}, ${U6} {
|
|
9311
9311
|
overflow: visible;
|
|
9312
9312
|
}
|
|
@@ -10186,7 +10186,7 @@ ${i.message}`,location:r.child("description")})}}}}),$pe=e=>({Info:{leave(t){if(
|
|
|
10186
10186
|
font-size: var(--page-404-description-font-size);
|
|
10187
10187
|
line-height: var(--page-404-description-line-height);
|
|
10188
10188
|
font-weight: var(--page-404-description-font-weight);
|
|
10189
|
-
`;async function vxt(e,t,a){let r;if(a?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await uxt(e||t);try{ott(r)}catch{}return r}const bxt=({options:e,definitionUrl:t,definition:a,activeSampleLanguage:r,children:n})=>{const[i,o]=K.useState(),[s,l]=K.useState(!0),[c,u]=K.useState(null),[d,p]=K.useState(e||{});K.useEffect(()=>{async function f(){l(!0);try{const b=await cxt();p({...e,...b}),u(await vxt(a,t,e))}catch(b){o(b.message)}}f()},[a,t,e]);const h=K.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:t,activeSampleLanguage:r}},stt([c,t,d]));return K.useEffect(()=>{h&&l(!1)},[h]),i?v.jsx(pxt,{description:i||"Please check path to your OpenAPI description"}):h?s?bl(e?.hideLoading,!1)?null:v.jsx(dst,{color:"--loading-spinner-color"}):K.isValidElement(n)?K.cloneElement(n,{store:h}):null:null};function kxt({definition:e,definitionUrl:t,options:a={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return v.jsx(bxt,{definition:e,definitionUrl:t,options:a,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:v.jsx(Wne,{withCommonStyles:!0,router:o||"hash"})})}function yxt(e){const t={},a=e.attributes;for(let r=0;r<a.length;r++){const n=a[r];t[n.name]=n.value}return t}function xxt(e){const t=yxt(e),a={};for(const r in t){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());a[n]=t[r]}return a}function wxt(e,t=document.querySelector("redoc")){$W.hydrateRoot(t,v.jsx(Wne,{store:e}),{onRecoverableError:(a,r)=>{a.message.includes("Minified React error #418")||console.error(a.message,r)}})}function Wme(e,t={},a=lL("redoc")){if(a===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}=t;let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),$W.createRoot(a).render(K.createElement(kxt,{definition:o,definitionUrl:i,options:{...n,...xxt(a)},router:r??"hash"},["Loading..."]))}const Sxt="3.15.0-rc.
|
|
10189
|
+
`;async function vxt(e,t,a){let r;if(a?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');r=e}else r=await uxt(e||t);try{ott(r)}catch{}return r}const bxt=({options:e,definitionUrl:t,definition:a,activeSampleLanguage:r,children:n})=>{const[i,o]=K.useState(),[s,l]=K.useState(!0),[c,u]=K.useState(null),[d,p]=K.useState(e||{});K.useEffect(()=>{async function f(){l(!0);try{const b=await cxt();p({...e,...b}),u(await vxt(a,t,e))}catch(b){o(b.message)}}f()},[a,t,e]);const h=K.useMemo(()=>{if(c)return{definition:c,options:d,definitionUrl:t,activeSampleLanguage:r}},stt([c,t,d]));return K.useEffect(()=>{h&&l(!1)},[h]),i?v.jsx(pxt,{description:i||"Please check path to your OpenAPI description"}):h?s?bl(e?.hideLoading,!1)?null:v.jsx(dst,{color:"--loading-spinner-color"}):K.isValidElement(n)?K.cloneElement(n,{store:h}):null:null};function kxt({definition:e,definitionUrl:t,options:a={},activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,router:o}){return v.jsx(bxt,{definition:e,definitionUrl:t,options:a,activeItemId:r,activeSampleLanguage:n,activeDeepLink:i,children:v.jsx(Wne,{withCommonStyles:!0,router:o||"hash"})})}function yxt(e){const t={},a=e.attributes;for(let r=0;r<a.length;r++){const n=a[r];t[n.name]=n.value}return t}function xxt(e){const t=yxt(e),a={};for(const r in t){const n=r.replace(/-(.)/g,(i,o)=>o.toUpperCase());a[n]=t[r]}return a}function wxt(e,t=document.querySelector("redoc")){$W.hydrateRoot(t,v.jsx(Wne,{store:e}),{onRecoverableError:(a,r)=>{a.message.includes("Minified React error #418")||console.error(a.message,r)}})}function Wme(e,t={},a=lL("redoc")){if(a===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}=t;let i,o;typeof e=="string"?i=e:typeof e=="object"&&(o=e),$W.createRoot(a).render(K.createElement(kxt,{definition:o,definitionUrl:i,options:{...n,...xxt(a)},router:r??"hash"},["Loading..."]))}const Sxt="3.15.0-rc.4",zxt="f597a8dae4";function jxt(){const e=lL("redoc");if(!e)return;const t=e.getAttribute("spec-url");t&&Wme(t,{},e)}jxt();var Zme={exports:{}};/*!
|
|
10190
10190
|
|
|
10191
10191
|
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
10192
10192
|
<http://stuartk.com/jszip>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import*as b from"react";import{NewTabButton as h}from"@redocly/theme/components/Buttons/NewTabButton";import{PageActions as u}from"@redocly/theme/components/PageActions/PageActions";import{Tag as p}from"@redocly/theme/components/Tag/Tag";import{CheckmarkIcon as g}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{MCP_SERVER_CAPABILITIES as f,MCP_SERVER_EXPERIMENTAL_CAPABILITIES as P,PAGE_ACTIONS_MCP as E}from"../../utils/mcp.js";import{PanelItem as r}from"../PanelItem/PanelItem.js";import{Item as C,PanelItemsList as _,Title as j}from"../PanelItem/styled.js";import{useTranslate as x}from"../../hooks/index.js";import{styled as n}from"../../styled-components.js";function F({mcpInfo:e,mcpServers:a}){const o=x();function m(i){return typeof e?.capabilities[i]=="object"&&e?.capabilities[i]?.listChanged}function d(i){return typeof e?.capabilities[i]=="object"&&e?.capabilities[i]?.subscribe}return s(A,{children:[e?.protocolVersion&&t(r,{header:o("openapi.mcp.protocolVersion","Protocol version"),title:e.protocolVersion}),e?.capabilities&&t(r,{header:o("openapi.mcp.capabilities","Capabilities"),title:t(c,{children:f.map(i=>e?.capabilities[i]?s(p,{size:"small",icon:t(g,{}),children:[i,m(i)?" (list changed)":"",d(i)?" (subscribe)":""]},i):null)})}),e?.capabilities[P]&&t(r,{header:o("openapi.mcp.experimentalCapabilities","Experimental capabilities"),title:t(L,{children:Object.entries(e?.capabilities.experimental||{}).map(([i,l])=>s(b.Fragment,{children:[s("span",{children:[i,":"]}),t(p,{children:typeof l=="object"?JSON.stringify(l):String(l)})]},i))})}),t(r,{header:o("openapi.mcp.endpoint","Endpoint"),title:t(c,{children:a[0]?.url}),actions:[t(h,{data:a[0]?.url},"NewTabButton")]}),!!a[0]?.url&&t(r,{title:t(T,{children:t(u,{actions:E,mcpUrl:a[0]?.url})})})]})}const A=n(_)`
|
|
2
2
|
${C}, ${j} {
|
|
3
3
|
overflow: visible;
|
|
4
4
|
}
|
|
5
|
-
`,T=
|
|
5
|
+
`,T=n.div`
|
|
6
6
|
& button {
|
|
7
7
|
width: 100%;
|
|
8
8
|
}
|
|
9
9
|
> div {
|
|
10
10
|
padding: 0;
|
|
11
11
|
}
|
|
12
|
-
`,L=
|
|
12
|
+
`,L=n.div`
|
|
13
13
|
display: grid;
|
|
14
14
|
grid-template-columns: 1fr 2fr;
|
|
15
15
|
gap: 10px;
|
package/lib/utils/mcp.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const MCP_SERVER_CAPABILITIES: string[];
|
|
2
2
|
export declare const MCP_SERVER_EXPERIMENTAL_CAPABILITIES = "experimental";
|
|
3
|
-
export declare const PAGE_ACTIONS_MCP:
|
|
3
|
+
export declare const PAGE_ACTIONS_MCP: "mcp-json"[];
|
package/lib/utils/mcp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const o=["tools","resources","prompts","logging","subscribe","completions"],s="experimental",
|
|
1
|
+
const o=["tools","resources","prompts","logging","subscribe","completions"],s="experimental",e=["mcp-json"];export{o as MCP_SERVER_CAPABILITIES,s as MCP_SERVER_EXPERIMENTAL_CAPABILITIES,e as PAGE_ACTIONS_MCP};
|