@redocly/openapi-docs 3.17.0-next.4 → 3.17.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.
@@ -1 +1 @@
1
- import{jsx as e,Fragment as u,jsxs as x}from"react/jsx-runtime";import{useAtomValue as c}from"jotai";import{Panel as r}from"@redocly/theme/components/Panel/Panel";import{Markdown as S}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as b}from"../Download/index.js";import{Overview as O}from"../Overview/index.js";import{ServerList as j}from"../ServerList/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";import{normalizeServers as d}from"../../utils/index.js";import{LanguageList as L}from"../Language/index.js";import{mergeInMockServer as M}from"../../models/operation.js";import{languageAtom as P}from"../../jotai/app.js";import{useTranslate as k}from"../../hooks/index.js";import{useDownloadInfo as D}from"../Download/useDownloadInfo.js";import{McpOverview as E}from"../McpOverview/McpOverview.js";const J=({item:{infoDefinition:o}})=>{const a=k(),{options:{hideDownloadButtons:f,downloadUrls:g,mockServer:v},parser:{definition:s,definitionUrl:t}}=c(I),{languages:i,activeLanguage:h}=c(P),l=D({downloadUrls:g}),p=d(t,M(s.servers||[],v)),n=s?.["x-mcp"],w=d(t,n?.servers||s.servers||[]),m=!(Object.keys(s.paths||{}).length>0)&&n;return x(u,{children:[!f&&l&&e(r,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:e(b,{downloadObjects:l})}),!!n&&e(r,{className:"panel-download",header:a("openapi.mcp.title","MCP server"),isExpandable:!1,children:e(E,{mcpInfo:n,mcpServers:w})}),(o?.license||o?.contact||o?.termsOfService)&&e(r,{className:"panel-mcp-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:e(S,{children:e(O,{info:o,translate:a})})}),!!i?.length&&!m&&e(r,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:e(L,{languages:i,activeLanguage:h})}),!!p.length&&!m&&e(r,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:e(j,{servers:p,path:"/",translate:a})})]})};export{J as RightPanel};
1
+ import{jsx as e,Fragment as u,jsxs as x}from"react/jsx-runtime";import{useAtomValue as c}from"jotai";import{Panel as r}from"@redocly/theme/components/Panel/Panel";import{Markdown as S}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as b}from"../Download/index.js";import{Overview as O}from"../Overview/index.js";import{ServerList as j}from"../ServerList/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";import{normalizeServers as d}from"../../utils/index.js";import{LanguageList as L}from"../Language/index.js";import{mergeInMockServer as M}from"../../models/operation.js";import{languageAtom as P}from"../../jotai/app.js";import{useTranslate as k}from"../../hooks/index.js";import{useDownloadInfo as D}from"../Download/useDownloadInfo.js";import{McpOverview as E}from"../McpOverview/McpOverview.js";const J=({item:{infoDefinition:o}})=>{const a=k(),{options:{hideDownloadButtons:f,downloadUrls:g,mockServer:v},parser:{definition:s,definitionUrl:t}}=c(I),{languages:i,activeLanguage:h}=c(P),l=D({downloadUrls:g}),m=d(t,M(s.servers||[],v)),n=s?.["x-mcp"],w=d(t,n?.servers||s.servers||[]),p=!(Object.keys(s.paths||{}).length>0)&&n;return x(u,{children:[!f&&l&&e(r,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:e(b,{downloadObjects:l})}),!!n&&e(r,{className:"panel-download",header:a("openapi.mcp.title","MCP server"),isExpandable:!1,children:e(E,{mcpInfo:n,mcpServers:w})}),(o?.license||o?.contact||o?.termsOfService)&&e(r,{className:"panel-mcp-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:e(S,{children:e(O,{info:o,translate:a})})}),!!i?.length&&!p&&e(r,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:e(L,{languages:i,activeLanguage:h})}),!!m.length&&!p&&e(r,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:e(j,{servers:m,translate:a})})]})};export{J as RightPanel};
@@ -1,4 +1,4 @@
1
- import{jsx as i,jsxs as o}from"react/jsx-runtime";import{CopyButton as x}from"@redocly/theme/components/Buttons/CopyButton";import{getServerDisplayName as b}from"../../utils/helpers.js";import{PanelItemDescription as u,Title as y}from"../PanelItem/index.js";import{ViewNested as w}from"../ViewNested/index.js";import{Tag as S}from"../common/index.js";import{Markdown as T}from"../Markdown/index.js";import{styled as e}from"../../styled-components.js";import{ServerDescriptionTooltip as j}from"./ServerDescriptionTooltip.js";const q=({servers:h,path:f,translate:r})=>i(D,{children:h.map(t=>{const a=t.url+f,p=Object.keys(t.variables||{}).length,d=p===1?"variable":"variables",l=`${p||""} ${r(`openapi.${d}`,d)}`,v=!!t.name&&!!t.description;return o("div",{children:[o(L,{children:[i(u,{"data-testid":"server-panel-item-name",children:b(t)}),v&&i(j,{description:t.description})]}),o(O,{children:[i(y,{suppressHydrationWarning:!0,children:a}),i(x,{data:a},a)]}),t.variables&&i(w,{expandText:`${r("openapi.actions.show","Show")} ${l}`,hideText:`${r("openapi.actions.hide","Hide")} ${l}`,expandByDefault:!1,expandable:!0,hideDivider:!0,children:i($,{children:Object.entries(t.variables||{}).map(([c,n])=>o(z,{children:[i(k,{children:c}),o(s,{children:[r("openapi.default","Default")," ",i(g,{children:n.default})]}),i(W,{source:n.description}),n.enum&&o(s,{children:[r("openapi.enum","Enum")," ",i(C,{children:n.enum.map(m=>i(g,{children:m},m))})]})]},c))})})]},t.url)})}),D=e.div`
1
+ import{jsx as i,jsxs as o}from"react/jsx-runtime";import{CopyButton as x}from"@redocly/theme/components/Buttons/CopyButton";import{getServerDisplayName as b}from"../../utils/helpers.js";import{PanelItemDescription as u,Title as y}from"../PanelItem/index.js";import{ViewNested as w}from"../ViewNested/index.js";import{Tag as S}from"../common/index.js";import{Markdown as T}from"../Markdown/index.js";import{styled as e}from"../../styled-components.js";import{ServerDescriptionTooltip as j}from"./ServerDescriptionTooltip.js";const q=({servers:h,path:f="",translate:r})=>i(D,{children:h.map(t=>{const a=t.url+f,p=Object.keys(t.variables||{}).length,d=p===1?"variable":"variables",l=`${p||""} ${r(`openapi.${d}`,d)}`,v=!!t.name&&!!t.description;return o("div",{children:[o(L,{children:[i(u,{"data-testid":"server-panel-item-name",children:b(t)}),v&&i(j,{description:t.description})]}),o(O,{children:[i(y,{suppressHydrationWarning:!0,children:a}),i(x,{data:a},a)]}),t.variables&&i(w,{expandText:`${r("openapi.actions.show","Show")} ${l}`,hideText:`${r("openapi.actions.hide","Hide")} ${l}`,expandByDefault:!1,expandable:!0,hideDivider:!0,children:i($,{children:Object.entries(t.variables||{}).map(([c,n])=>o(z,{children:[i(k,{children:c}),o(s,{children:[r("openapi.default","Default")," ",i(g,{children:n.default})]}),i(W,{source:n.description}),n.enum&&o(s,{children:[r("openapi.enum","Enum")," ",i(C,{children:n.enum.map(m=>i(g,{children:m},m))})]})]},c))})})]},t.url)})}),D=e.div`
2
2
  & > div {
3
3
  border-bottom: 1px solid var(--border-color-secondary);
4
4
  margin-bottom: var(--spacing-xs);
@@ -1,5 +1,6 @@
1
1
  import type { TFunction } from '@redocly/theme/core/openapi';
2
2
  import type { OperationModel } from '../../models/index.js';
3
- export type ServerListProps = Pick<OperationModel, 'servers' | 'path'> & {
3
+ export type ServerListProps = Pick<OperationModel, 'servers'> & {
4
4
  translate: TFunction;
5
+ path?: string;
5
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-docs",
3
- "version": "3.17.0-next.4",
3
+ "version": "3.17.0",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -38,8 +38,8 @@
38
38
  "url-template": "^2.0.8",
39
39
  "util": "~0.12.5",
40
40
  "web-vitals": "3.3.1",
41
- "@redocly/config": "0.41.1",
42
- "@redocly/replay": "0.20.0-next.4"
41
+ "@redocly/config": "0.41.2",
42
+ "@redocly/replay": "0.20.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@shikijs/transformers": "1.24.0",
@@ -72,7 +72,7 @@
72
72
  "url": "~0.11.0",
73
73
  "vite": "7.2.6",
74
74
  "vitest": "4.0.10",
75
- "@redocly/theme": "0.61.0-next.3"
75
+ "@redocly/theme": "0.61.0"
76
76
  },
77
77
  "scripts": {
78
78
  "start": "npm run copy-highlight-hook && vite",