@redocly/openapi-docs 3.21.0 → 3.22.0-next.1
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
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{useAtomValue as A}from"jotai";import{LayoutVariant as h}from"@redocly/config";import{AfterOpenApiTitle as g}from"@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiTitle";import{PageActions as D}from"@redocly/theme/components/PageActions/PageActions";import{SamplesMiddlePanel as k,Row as S}from"../common/index.js";import{ExternalDocumentation as T}from"../ExternalDocumentation/index.js";import{Markdown as s}from"../Markdown/index.js";import{ApiHeader as H,HeaderText as M}from"./styled.js";import{globalStoreAtom as j}from"../../jotai/store.js";import{saveTextBeforeHeading as y}from"../../utils/saveTextBeforeHeading.js";import{getValueFromMdParsedExtension as m}from"../../utils/helpers.js";import{RenderHook as P}from"../RenderHook/index.js";import{Metadata as v}from"./Metadata.js";import{useTranslate as E}from"../../hooks/index.js";function q({item:d,layout:r}){const l=E(),{options:{unstable_hooks:p,hideInfoMetadata:f,routingBasePath:c},parser:{definition:u}}=A(j),o=d.infoDefinition;if(!o)return null;const t=y(m(o,"description")||""),i=m(o,"summary")||void 0,a=u?.externalDocs||o?.externalDocs,x=r===h.STACKED;return e(S,{layout:r,children:n(k,{fullWidth:!0,className:"api-info",isStacked:x,children:[n(H,{children:[e(M,{children:(o.title||"")+(o.version?` (${o.version})`:"")}),e(D,{pageSlug:c})]}),e(P,{Hook:g||p?.AfterApiTitle,props:{info:o}}),i&&e(s,{source:i,"data-role":"redoc-summary"}),t&&e(s,{source:t,"data-role":"redoc-description"}),a&&e(T,{externalDocs:a}),!f&&e(v,{metadata:o["x-metadata"],translate:l})]})})}export{q as ApiInfo};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import{H1 as e}from"@redocly/theme/components/Typography/H1";import{Markdown as
|
|
1
|
+
import{H1 as e}from"@redocly/theme/components/Typography/H1";import{Markdown as r}from"@redocly/theme/components/Markdown/Markdown";import{styled as o}from"../../styled-components.js";const t=15,p=o.div`
|
|
2
2
|
display: flex;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
& + ${
|
|
3
|
+
gap: var(--spacing-xs);
|
|
4
|
+
|
|
5
|
+
& + ${r} {
|
|
6
6
|
margin-top: var(--h1-margin-bottom);
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,d=o(e)`
|
|
9
|
+
margin-top: 0;
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
`,s=o.span`
|
|
9
12
|
&::before {
|
|
10
13
|
content: '|';
|
|
11
14
|
display: inline-block;
|
|
@@ -17,11 +20,11 @@ import{H1 as e}from"@redocly/theme/components/Typography/H1";import{Markdown as
|
|
|
17
20
|
&:last-child::after {
|
|
18
21
|
display: none;
|
|
19
22
|
}
|
|
20
|
-
`,
|
|
23
|
+
`,l=o.div`
|
|
21
24
|
overflow: hidden;
|
|
22
25
|
`,m=o.div`
|
|
23
26
|
display: flex;
|
|
24
27
|
flex-wrap: wrap;
|
|
25
28
|
// hide separator on new lines: idea from https://stackoverflow.com/a/31732902/1749888
|
|
26
29
|
margin-left: -${t}px;
|
|
27
|
-
`;export{p as ApiHeader,
|
|
30
|
+
`;export{p as ApiHeader,d as HeaderText,s as InfoSpan,m as InfoSpanBox,l as InfoSpanBoxWrap};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{Suspense as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Suspense as h,lazy as O,memo as S,useEffect as x,useState as R}from"react";import{useAtomValue as o}from"jotai";import{operationStore as T}from"../../jotai/operation.js";import{appStore as A,allowedEnvironmentsAtom as C,environmentsAtom as L}from"../../jotai/app.js";import{globalOptionsAtom as V}from"../../jotai/store.js";import{useTranslate as j}from"../../hooks/index.js";import{convertOperationToReplayValue as w}from"./utils.js";import{getDefaultCollectorUrl as P}from"../../utils/telemetry.js";import{styled as i}from"../../styled-components.js";import{HTTPSnippet as U}from"../../services/code-samples/httpsnippet/index.js";const W=O(async()=>import("@redocly/replay").then(t=>({default:t.EmbeddedReplay})));function k({activeOperationId:t,corsProxyUrl:d,fullOpenApi:l,pointer:r,hideOtherSecuritySchemes:m}){const n=j(),s=o(T(r)),c=o(A),f=o(L),a=o(C),u=o(V),[y,g]=R(!1);return x(()=>{g(!0)},[]),e(z,{children:y?e(h,{fallback:e(p,{children:n("openapi.loading","Loading...")}),children:e(W,{activeOperationId:t,activeOperationPointer:r,api:l,settings:{predefinedEnvValues:f,corsProxyUrl:d,disableCollectionsTab:!0,hideOtherSecuritySchemes:m,...a&&{allowedEnvironments:a},telemetry:{tracerName:"replay-openapi",collectorUrl:P()},HTTPSnippet:U,convertOperationToReplayValue:(v,b,E)=>w(v,b,E,void 0,s,c,void 0,u)}})}):e(p,{children:n("openapi.loading","Loading...")})})}const M=S(k),p=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
5
5
|
min-height: 100px;
|
|
6
|
-
`,
|
|
6
|
+
`,z=i.div`
|
|
7
7
|
border: 1px solid var(--border-color-primary);
|
|
8
8
|
border-radius: var(--border-radius-lg);
|
|
9
9
|
padding: 0;
|
|
10
|
-
`;export{
|
|
10
|
+
`;export{M as EmbeddedReplay};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0-next.1",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"npm": ">=10.0.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@redocly/theme": ">=0.
|
|
17
|
+
"@redocly/theme": ">=0.66.0-next.0",
|
|
18
18
|
"react": "^19.2.4",
|
|
19
19
|
"react-dom": "^19.2.4",
|
|
20
20
|
"styled-components": "^4.1.1 || ^5.3.11 || ^6.0.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@markdoc/markdoc": "0.5.2",
|
|
24
|
-
"@redocly/openapi-core": "2.
|
|
24
|
+
"@redocly/openapi-core": "2.31.2",
|
|
25
25
|
"deepmerge": "^4.2.2",
|
|
26
26
|
"dompurify": "3.4.0",
|
|
27
27
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -38,9 +38,9 @@
|
|
|
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
|
+
"@redocly/config": "0.49.0",
|
|
42
42
|
"@redocly/redoc-opentelemetry": "0.1.0",
|
|
43
|
-
"@redocly/replay": "0.
|
|
43
|
+
"@redocly/replay": "0.25.0-next.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@shikijs/transformers": "3.21.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.
|
|
75
|
+
"@redocly/theme": "0.66.0-next.1"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"start": "pnpm run copy-highlight-hook && vite",
|
|
@@ -83,15 +83,10 @@
|
|
|
83
83
|
"prepare:community-source-only": "pnpm run prepare:community-source --ignore /src/* private-readme.md",
|
|
84
84
|
"prepare:community-dependencies": "pnpm exec tsx scripts/prepare-community-dependencies.ts",
|
|
85
85
|
"apply:community-source": "pnpm exec tsx scripts/apply-changes-from-community-source.ts",
|
|
86
|
-
"test": "vitest run",
|
|
87
|
-
"unit": "vitest run",
|
|
88
|
-
"unit:update": "vitest run -u",
|
|
89
|
-
"unit:watch": "vitest",
|
|
90
|
-
"unit:coverage": "vitest run --coverage",
|
|
91
|
-
"unit:coverage:html": "vitest run --coverage --coverage.reporter=html",
|
|
92
86
|
"ts:check": "tsc --noEmit --skipLibCheck",
|
|
93
87
|
"clean": "rimraf bin dist lib redocly-static",
|
|
94
88
|
"clear:cache": "scripts/clear-cache.sh",
|
|
89
|
+
"test": "nx run vitest:test",
|
|
95
90
|
"pack:sourcemaps": "rimraf openapi-docs.sourcemaps.tag.gz && find lib -name \"*.js.map\" | xargs tar -czvf openapi-docs.sourcemaps.tar.gz",
|
|
96
91
|
"list:licenses": "node ./scripts/list-licenses.js",
|
|
97
92
|
"license:check": "npx license-checker --production --onlyAllow 'MIT;ISC;Apache-2.0;Apache;CC0-1.0;BSD;BSD-2-Clause;BSD-3-Clause;UNKNOWN' --summary",
|