@redocly/openapi-docs 3.14.0-next.13 → 3.14.0-next.15
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.
- package/dist/redocly-openapi-docs.min.js +2163 -2093
- package/lib/components/ContentItem/ContentItem.js +1 -1
- package/lib/components/ContentItems/Items.js +1 -1
- package/lib/components/ContentItems/helpers.js +1 -1
- package/lib/components/McpOverview/McpOverview.d.ts +5 -0
- package/lib/components/McpOverview/McpOverview.js +16 -0
- package/lib/components/McpOverview/index.d.ts +1 -0
- package/lib/components/McpOverview/index.js +1 -0
- package/lib/components/McpTool/McpTool.d.ts +6 -0
- package/lib/components/McpTool/McpTool.js +9 -0
- package/lib/components/McpTool/index.d.ts +1 -0
- package/lib/components/McpTool/index.js +1 -0
- package/lib/components/PanelItem/styled.js +1 -0
- package/lib/components/RedoclyOpenAPIDocs/Error.d.ts +3 -0
- package/lib/components/RedoclyOpenAPIDocs/Error.js +25 -0
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +1 -1
- package/lib/components/RightPanel/RightPanel.js +1 -1
- package/lib/components/SectionItem/SectionItem.d.ts +1 -1
- package/lib/components/ServerList/ServerDescriptionTooltip.d.ts +4 -0
- package/lib/components/ServerList/ServerDescriptionTooltip.js +1 -0
- package/lib/components/ServerList/ServerList.js +14 -9
- package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
- package/lib/components/TagItem/OperationNavigationItems.js +3 -3
- package/lib/components/TagItem/OperationsNavigation.js +2 -2
- package/lib/components/TagItem/TagItem.js +17 -7
- package/lib/components/TagItem/types.d.ts +2 -2
- package/lib/models/group.js +1 -1
- package/lib/models/types.d.ts +2 -0
- package/lib/services/menu/builder.js +1 -1
- package/lib/services/menu/tags.d.ts +1 -0
- package/lib/services/menu/tags.js +2 -1
- package/lib/services/types.d.ts +1 -1
- package/lib/standalone.js +1 -1
- package/lib/types/open-api.d.ts +47 -0
- package/lib/utils/helpers.d.ts +2 -0
- package/lib/utils/helpers.js +4 -4
- package/lib/utils/loadAndBundleSpec.js +1 -1
- package/lib/utils/mcp.d.ts +3 -0
- package/lib/utils/mcp.js +1 -0
- package/lib/utils/menu.d.ts +2 -0
- package/lib/utils/menu.js +1 -0
- package/package.json +4 -4
package/lib/utils/helpers.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{isObject as i,isString as a}from"@redocly/theme/core/openapi";import{isNamedDefinition as f}from"./openapi.js";import{JsonPointer as l}from"./JsonPointer.js";import{urlParse as u}from"./url.js";import{IS_BROWSER as c}from"./dom.js";function O(r,
|
|
1
|
+
import{isObject as i,isString as a}from"@redocly/theme/core/openapi";import{isNamedDefinition as f}from"./openapi.js";import{JsonPointer as l}from"./JsonPointer.js";import{urlParse as u}from"./url.js";import{IS_BROWSER as c}from"./dom.js";function O(r,e){const t=[];for(let n=0;n<r.length-1;n++)t.push(e(r[n],!1));return r.length!==0&&t.push(e(r[r.length-1],!0)),t}function y(r,e){const t={};for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=e(r[n],n,r));return t}function A(r,e){const t=[],n=o=>{for(const s of o)t.push(s),s[e]&&n(s[e])};return n(r),t}function p(r){return r.endsWith("/")?r.substring(0,r.length-1):r}function b(r){return!isNaN(parseFloat(r))&&isFinite(r)}function E(r,e,t){const n=new RegExp(`(^|\\n)#\\s?${e}\\s*\\n`,"i"),o=new RegExp(`((\\n|^)#\\s*${e}\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)`,"i");if(n.test(r))return r.replace(o,`$1
|
|
2
2
|
|
|
3
|
-
${
|
|
3
|
+
${t}
|
|
4
4
|
$4`);{const s=r===""||r.endsWith(`
|
|
5
5
|
|
|
6
6
|
`)?"":r.endsWith(`
|
|
7
7
|
`)?`
|
|
8
8
|
`:`
|
|
9
9
|
|
|
10
|
-
`;return`${r}${s}# ${
|
|
10
|
+
`;return`${r}${s}# ${e}
|
|
11
11
|
|
|
12
|
-
${
|
|
12
|
+
${t}`}}const R=r=>Array.isArray(r)&&r.some(e=>i(e)),W=r=>r.filter(e=>!!e),C=r=>i(r)&&!Array.isArray(r);function d(r){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(r)}function I(r,e){let t;if(e.startsWith("//"))t=`${u(r,!0)?.protocol||"https:"}${e}`;else if(d(e))t=e;else if(!e.startsWith("/"))t=p(r)+"/"+e;else{const n=u(r);n?(n.pathname=e,t=n.toString()):t=e}return p(t)}function N(r){return r.charAt(0).toUpperCase()+r.slice(1)}function L(r){try{if(!r)return"";const e=new URL(r);return e.search="",e.hash="",e.toString()}catch{return r}}function M(r){return r.replace(/["\\]/g,"\\$&")}function P(r){return r.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&/g,"&").replace(/"/g,'"')}function T(r){return r&&r.replace(/#/g,"_").toLowerCase()}function j(r,e){return e||f(r)&&l.baseName(r)||""}function z(r={},e,t){return typeof e=="string"&&(e=e.split(".")),e.reduce((n,o)=>n&&n[o]?n[o]:t,r)}function x(r){return(...e)=>e.filter(Boolean).join(r)}const D=x(".");function F(r){return c?window?.REFERENCE_DOCS_OPTIONS?.[r]:null}function _(){if(!c)return"";const r=+new Date+Math.random();try{return(!document.currentScript||!(document.currentScript.async||document.currentScript.defer))&&document.write(`<script id="dummy${r}"></script>`),(document.getElementById("dummy"+r)?.previousSibling).src}catch{return""}}const B=r=>a(r)?r:r?.raw,H=(r,e)=>{const t=r?.[`x-parsed-md-${e}`]||r?.[e];if(!t)return;if(!r?.[`x-parsed-md-${e}`]&&e!=="x-enumDescriptions")return r?.[e];if(e!=="x-enumDescriptions")return m(r,e);let n={};for(const o in t)o.startsWith("x-parsed-md")||(n[o]=t?.[`x-parsed-md-${o}`]||t?.[o]);return Object.keys(n).length?n:t};function U(r){return r.name||r.description}function m(r,e){const t=r?.[`x-parsed-md-${e}`]||r?.[e];return t?.raw?t:{result:t?.result||r?.[e]?.result||r?.[e],raw:r?.[e]}}function V(r,e){return e===r.length-1}function v(r,e){const t=Object.keys(r);return t.indexOf(e)===t.length-1}export{E as appendToMdHeading,W as deleteEmptyArrayItem,D as dottedString,M as escapeHTMLAttrChars,A as flattenByProp,z as get,_ as getJsUrl,U as getServerDisplayName,H as getValueFromMdParsedExtension,F as getWindowReferenceOptions,d as isAbsoluteUrl,R as isArrayOfObjects,V as isLastInArray,v as isLastProperty,C as isMergeableObject,b as isNumeric,x as joinStringFactory,y as mapValues,O as mapWithLast,B as normalizeText,L as removeQueryStringAndHash,I as resolveUrl,T as sanitizeItemId,p as stripTrailingSlash,N as titleize,P as unescapeHTMLChars,j as useSchemaTitle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bundle as a,loadConfig as r}from"@redocly/openapi-core";import{combineUrls as s}from"@redocly/theme/core/openapi";import{convertSwagger2OpenAPI as c}from"./convertSwagger2OpenAPI.js";import{IS_BROWSER as t}from"./dom.js";import{REDOCLY_CONFIG_FILE as f}from"../constants.js";async function w(){const o=t?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():"";try{return(await r({configPath:s(o,f)}))?.resolvedConfig.openapi||{}}catch
|
|
1
|
+
import{bundle as a,loadConfig as r}from"@redocly/openapi-core";import{combineUrls as s}from"@redocly/theme/core/openapi";import{convertSwagger2OpenAPI as c}from"./convertSwagger2OpenAPI.js";import{IS_BROWSER as t}from"./dom.js";import{REDOCLY_CONFIG_FILE as f}from"../constants.js";async function w(){const o=t?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():"";try{return(await r({configPath:s(o,f)}))?.resolvedConfig.openapi||{}}catch{return{}}}async function b(o){const n=await r(),e={config:n,base:t?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};t&&(n.resolve.http.customFetch=globalThis.fetch),typeof o=="object"&&o!==null?e.doc=d(o):e.ref=o;const{bundle:{parsed:i}}=await a(e);return i.swagger!==void 0?c(i):i}function d(o){return{source:{absoluteRef:""},parsed:o}}export{b as loadAndBundleDefinition,w as loadOpenapiConfig};
|
package/lib/utils/mcp.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=["tools","resources","prompts","logging","subscribe","completions"],s="experimental",e=["mcp-cursor"];export{o as MCP_SERVER_CAPABILITIES,s as MCP_SERVER_EXPERIMENTAL_CAPABILITIES,e as PAGE_ACTIONS_MCP};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(e){return e.type==="operation"||e.type==="schema"||e.type==="mcp"}export{n as isRenderableMenuItem};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.14.0-next.
|
|
3
|
+
"version": "3.14.0-next.15",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@markdoc/markdoc": "0.5.2",
|
|
24
|
-
"@redocly/openapi-core": "2.
|
|
24
|
+
"@redocly/openapi-core": "2.3.1",
|
|
25
25
|
"deepmerge": "^4.2.2",
|
|
26
26
|
"dompurify": "3.2.7",
|
|
27
27
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"util": "~0.12.5",
|
|
38
38
|
"web-vitals": "3.3.1",
|
|
39
39
|
"@redocly/config": "0.35.0",
|
|
40
|
-
"@redocly/replay": "0.17.0-next.
|
|
40
|
+
"@redocly/replay": "0.17.0-next.14"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@jest/globals": "29.5.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"typescript": "5.6.2",
|
|
76
76
|
"url": "~0.11.0",
|
|
77
77
|
"vite": "6.3.6",
|
|
78
|
-
"@redocly/theme": "0.58.0-next.
|
|
78
|
+
"@redocly/theme": "0.58.0-next.11"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"start": "npm run copy-highlight-hook && vite",
|