@redocly/openapi-docs 3.15.0-next.1 → 3.15.0-next.2
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 +1841 -1836
- package/lib/components/PanelItem/styled.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/Error.js +3 -3
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.d.ts +2 -2
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.js +6 -2
- package/lib/components/RedoclyOpenAPIDocs/types.d.ts +3 -0
- package/lib/jotai/operation.d.ts +1 -1
- package/lib/standalone.d.ts +2 -1
- package/lib/standalone.js +1 -1
- package/package.json +7 -7
|
@@ -16,7 +16,7 @@ import{CheckmarkIcon as o}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon"
|
|
|
16
16
|
color: var(--menu-content-title-color);
|
|
17
17
|
font-size: var(--h6-font-size);
|
|
18
18
|
line-height: var(--line-height-xsm);
|
|
19
|
-
`,l=t.
|
|
19
|
+
`,l=t.div`
|
|
20
20
|
margin: 0;
|
|
21
21
|
color: var(--text-color-secondary);
|
|
22
22
|
font-size: var(--font-size-base);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as i}from"react/jsx-runtime";import t from"styled-components";import{GlobalStyle as a}from"@redocly/theme/core/openapi";function f({description:o}){return console.error(o),r(i,{children:[e(a,{}),r(n,{children:[e(
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as i}from"react/jsx-runtime";import t from"styled-components";import{GlobalStyle as a}from"@redocly/theme/core/openapi";function f({description:o}){return console.error(o),r(i,{children:[e(a,{}),r(n,{children:[e(s,{children:";("}),e(l,{children:"Something went wrong..."}),r(g,{children:["Please check the console to get more error details. You can troubleshoot your setup by visiting our"," ",e("a",{target:"_blank",rel:"noopener noreferrer",href:"https://redocly.com/docs/redoc",children:"documentation"}),"."]})]})]})}const n=t.div`
|
|
2
2
|
height: 100vh;
|
|
3
3
|
max-width: var(--page-404-max-width);
|
|
4
4
|
display: flex;
|
|
@@ -7,12 +7,12 @@ import{jsx as e,jsxs as r,Fragment as i}from"react/jsx-runtime";import t from"st
|
|
|
7
7
|
margin: var(--page-404-margin-vertical) var(--page-404-margin-horizontal);
|
|
8
8
|
font-family: var(--page-404-font-family);
|
|
9
9
|
gap: var(--page-404-gap);
|
|
10
|
-
`,
|
|
10
|
+
`,s=t.div`
|
|
11
11
|
color: var(--page-404-status-text-color);
|
|
12
12
|
font-size: var(--page-404-status-font-size);
|
|
13
13
|
line-height: var(--page-404-status-line-height);
|
|
14
14
|
font-weight: var(--page-404-status-font-weight);
|
|
15
|
-
`,
|
|
15
|
+
`,l=t.div`
|
|
16
16
|
color: var(--page-404-title-text-color);
|
|
17
17
|
font-size: var(--page-404-title-font-size);
|
|
18
18
|
line-height: var(--page-404-title-line-height);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { RedoclyOpenAPIDocsProps } from './types.js';
|
|
3
|
-
export declare function RedoclyOpenAPIDocs({ onLoaded, children, store, withCommonStyles, router, }: PropsWithChildren<Partial<RedoclyOpenAPIDocsProps>>): import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
export declare function RedoclyOpenAPIDocs({ onLoaded, children, store, withCommonStyles, router, disableTelemetry, }: PropsWithChildren<Partial<RedoclyOpenAPIDocsProps>>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as m,Fragment as x}from"react/jsx-runtime";import{memo as C,useRef as E}from"react";import{LayoutVariant as d}from"@redocly/config";import{useSetAtom as w}from"jotai";import{ThreePanelLayout as A}from"@redocly/theme/layouts/ThreePanelLayout";import{SidebarLogo as I}from"@redocly/theme/components/SidebarLogo/SidebarLogo";import{GlobalStyle as j,useMount as D}from"@redocly/theme/core/openapi";import{StoreProvider as M}from"./Providers.js";import{Overlay as N}from"../Overlay.js";import{RedocWrap as _}from"./styled.js";import{StickyResponsiveSidebar as V}from"../StickySidebar/index.js";import{SideMenu as k}from"../SideMenu/index.js";import{Content as v}from"../Content/index.js";import{useContentItems as B,useUppercase2LowercaseRedirect as K,useTelemetry as F,usePerformanceMetrics as H}from"../../hooks/index.js";import{withRouter as U}from"../../hoc/withRouter.js";import{withStore as Y}from"../../hoc/withStore.js";import{compose as G}from"../../utils/index.js";import{useLicense as W}from"../../hooks/useLicense.js";import{allOperationsAtom as q}from"../../jotai/replay.js";const z=G(U,Y,C)(({licenseKey:a,onLoaded:c,children:e,options:t,layout:i,collapsedSidebar:n,parser:l,withCommonStyles:y})=>{const b=E(null),{isValid:f,licenseInfo:g}=W(a),R=w(q),u=F();K();const{contentItems:h,flatItems:S}=B({parser:l,options:t});H({sendTelemetry:p=>{const r=Object.fromEntries(Object.entries(p).map(([O,T])=>[O.toLowerCase(),T]));u.sendOpenapiDocsPerformanceMetricsMessage({cls:r.cls,lcp:r.lcp,fcp:r.fcp,ttfb:r.ttfb})}}),D(()=>{if(c?.(),u.sendOpenapiDocsViewedMessage({layout:i}),!t.hideReplay){const p=S.filter(r=>r.type==="operation");R(p)}});const{hideSidebar:P,scrollYOffset:L}=t||{},s=l.definition?.info?.["x-logo"];return m(x,{children:[y&&o(j,{}),m(_,{className:"redoc-wrap",ref:b,children:[!f&&o(N,{licenseInfo:g}),!P&&m(V,{scrollYOffset:L,className:"menu-content",collapsedSidebar:!n,children:[o(I,{imageUrl:s?.url,href:s?.href||l.definition?.info?.contact?.url,altText:s?.altText,backgroundColor:s?.backgroundColor}),o(k,{items:f?h:[]})]}),m(A,{className:"api-content",id:"api-content",layout:i===d.THREE_PANEL?d.THREE_PANEL:d.STACKED,collapsedSidebar:n,children:[o(v,{items:f?h:[],routingBasePath:t.routingBasePath}),e]})]})]})});function ue({onLoaded:a,children:c,store:e,withCommonStyles:t,router:i,disableTelemetry:n}){return e?.definition?o(M,{...e,children:o(z,{onLoaded:a,basePath:e.options?.routingBasePath,licenseKey:e.options?.licenseKey,disableRouter:e.options?.disableRouter,withCommonStyles:t,router:i,disableTelemetry:n,children:c})}):null}export{ue as RedoclyOpenAPIDocs};
|
|
@@ -4,5 +4,5 @@ import type { OpenAPIDefinition } from '../../types/index.js';
|
|
|
4
4
|
import type { RedocConfig } from '@redocly/config';
|
|
5
5
|
export declare function loadSingle(spec: any, specUrl: any, options?: RedocConfig): Promise<OpenAPIDefinition>;
|
|
6
6
|
export declare function loadAndBundleSpecOrMd(url: string, title?: string): Promise<OpenAPIDefinition>;
|
|
7
|
-
export declare const AppProvider: ({ options, definitionUrl, definition, activeSampleLanguage, children, }: PropsWithChildren<AppProviderProps>) => ReactElement | null;
|
|
8
|
-
export declare function RedoclyOpenAPIDocsStandalone({ definition, definitionUrl, options, activeItemId, activeSampleLanguage, activeDeepLink, router, }: RedoclyOpenAPIDocsStandaloneProps): ReactElement;
|
|
7
|
+
export declare const AppProvider: ({ options, definitionUrl, disableTelemetry: _, definition, activeSampleLanguage, children, }: PropsWithChildren<AppProviderProps>) => ReactElement | null;
|
|
8
|
+
export declare function RedoclyOpenAPIDocsStandalone({ definition, definitionUrl, disableTelemetry, options, activeItemId, activeSampleLanguage, activeDeepLink, router, }: RedoclyOpenAPIDocsStandaloneProps): ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as s}from"react/jsx-runtime";import{cloneElement as
|
|
1
|
+
import{jsx as s}from"react/jsx-runtime";import{cloneElement as x,isValidElement as A,useEffect as h,useMemo as O,useState as l}from"react";import{Loading as D}from"@redocly/theme/components/Loaders/Loading";import{useDeepCompareMemoize as E,fixSpec as L}from"./utils.js";import{argValueToBoolean as P}from"../../utils/index.js";import{RedoclyOpenAPIDocs as B}from"./RedoclyOpenAPIDocs.js";import{loadAndBundleDefinition as f,loadOpenapiConfig as I}from"../../utils/loadAndBundleSpec.js";import{ErrorPage as k}from"./Error.js";async function C(e,o,n){let t;if(n?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');t=e}else t=await f(e||o);try{L(t)}catch{}return t}function $(e,o){return e.endsWith(".md")?f({openapi:"3.0.0",info:{title:o||"",version:"1.0",description:{$ref:e}},paths:{}}):f(e)}const b=({options:e,definitionUrl:o,disableTelemetry:n,definition:t,activeSampleLanguage:d,children:r})=>{const[i,c]=l(),[y,m]=l(!0),[p,S]=l(null),[g,v]=l(e||{});h(()=>{async function w(){m(!0);try{const u=await I();v({...e,...u}),S(await C(t,o,e))}catch(u){c(u.message)}}w()},[t,o,e]);const a=O(()=>{if(p)return{definition:p,options:g,definitionUrl:o,activeSampleLanguage:d}},E([p,o,g]));return h(()=>{a&&m(!1)},[a]),i?s(k,{description:i||"Please check path to your OpenAPI description"}):a?y?P(e?.hideLoading,!1)?null:s(D,{color:"--loading-spinner-color"}):A(r)?x(r,{store:a}):null:null};function q({definition:e,definitionUrl:o,disableTelemetry:n=!1,options:t={},activeItemId:d,activeSampleLanguage:r,activeDeepLink:i,router:c}){return s(b,{definition:e,definitionUrl:o,disableTelemetry:n,options:t,activeItemId:d,activeSampleLanguage:r,activeDeepLink:i,children:s(B,{withCommonStyles:!0,router:c||"hash"})})}export{b as AppProvider,q as RedoclyOpenAPIDocsStandalone,$ as loadAndBundleSpecOrMd,C as loadSingle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{styled as
|
|
1
|
+
import{styled as o}from"../../styled-components.js";const i=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
text-align: left;
|
|
@@ -13,9 +13,13 @@ import{styled as t}from"../../styled-components.js";const e=t.div`
|
|
|
13
13
|
font-weight: var(--font-weight-regular);
|
|
14
14
|
color: var(--text-color-primary);
|
|
15
15
|
-webkit-font-text-smoothing: var(--text-smoothing);
|
|
16
|
+
margin-top: ${({$offset:t})=>t||0}px;
|
|
16
17
|
|
|
17
18
|
* {
|
|
18
19
|
box-sizing: border-box;
|
|
19
20
|
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
+
[id] {
|
|
23
|
+
scroll-margin-top: ${({$offset:t})=>t||0}px;
|
|
24
|
+
}
|
|
25
|
+
`;export{i as RedocWrap};
|
|
@@ -9,6 +9,7 @@ export interface RedoclyOpenAPIDocsProps extends RoutingProps, StoreProps {
|
|
|
9
9
|
store?: StoreProviderProps;
|
|
10
10
|
licenseKey?: string;
|
|
11
11
|
withCommonStyles?: boolean;
|
|
12
|
+
disableTelemetry?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export interface StoreProviderProps {
|
|
14
15
|
options?: RedocConfig;
|
|
@@ -29,6 +30,7 @@ export interface StoreProviderProps {
|
|
|
29
30
|
}
|
|
30
31
|
export interface AppProviderProps {
|
|
31
32
|
definitionUrl?: string;
|
|
33
|
+
disableTelemetry?: boolean;
|
|
32
34
|
definition?: GenericObject;
|
|
33
35
|
options?: RedocConfig;
|
|
34
36
|
activeItemId?: string;
|
|
@@ -41,6 +43,7 @@ export interface AppProviderProps {
|
|
|
41
43
|
export interface RedoclyOpenAPIDocsStandaloneProps {
|
|
42
44
|
definition?: GenericObject;
|
|
43
45
|
definitionUrl?: string;
|
|
46
|
+
disableTelemetry?: boolean;
|
|
44
47
|
options?: RedocConfig;
|
|
45
48
|
activeItemId?: string;
|
|
46
49
|
activeSampleLanguage?: CodeSampleConfig['lang'];
|
package/lib/jotai/operation.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare function getDefaultOperationStore(pointer: string, requestValues?
|
|
|
19
19
|
}, activeExampleName?: string): {
|
|
20
20
|
activeExampleName: string | undefined;
|
|
21
21
|
activeOneOf: {
|
|
22
|
-
[
|
|
22
|
+
[pointer]: number;
|
|
23
23
|
};
|
|
24
24
|
requestValues: {
|
|
25
25
|
[field: string]: any;
|
package/lib/standalone.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import type { OpenAPIDefinition } from './types/open-api.js';
|
|
|
3
3
|
import type { StoreProviderProps } from './components/RedoclyOpenAPIDocs/types.js';
|
|
4
4
|
export { setSecurityDetails, setSecurityDetailsVariants } from './utils/security-details.js';
|
|
5
5
|
export { setParameterValue } from './utils/parameters.js';
|
|
6
|
-
export declare function hydrate(store: StoreProviderProps, element?: Element | null): void;
|
|
6
|
+
export declare function hydrate(store: StoreProviderProps, element?: Element | null, disableTelemetry?: boolean): void;
|
|
7
7
|
export declare function init(definitionOrDefinitionUrl: string | OpenAPIDefinition, options?: RedocConfig & {
|
|
8
8
|
router?: 'hash' | 'history';
|
|
9
|
+
disableTelemetry?: boolean;
|
|
9
10
|
}, element?: Element | null): void;
|
|
10
11
|
export declare const version: string;
|
|
11
12
|
export declare const revision: string;
|
package/lib/standalone.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{createElement as p}from"react";import{createRoot as m,hydrateRoot as u}from"react-dom/client";import{querySelector as i}from"./utils/dom.js";import{RedoclyOpenAPIDocs as d}from"./components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js";import{RedoclyOpenAPIDocsStandalone as f}from"./components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js";import{setSecurityDetails as V,setSecurityDetailsVariants as j}from"./utils/security-details.js";import{setParameterValue as F}from"./utils/parameters.js";function E(e){const r={},t=e.attributes;for(let o=0;o<t.length;o++){const s=t[o];r[s.name]=s.value}return r}function _(e){const r=E(e),t={};for(const o in r){const s=o.replace(/-(.)/g,(a,n)=>n.toUpperCase());t[s]=r[o]}return t}function N(e,r=document.querySelector("redoc"),t){u(r,l(d,{store:e,disableTelemetry:t}),{onRecoverableError:(o,s)=>{o.message.includes("Minified React error #418")||console.error(o.message,s)}})}function y(e,r={},t=i("redoc")){if(t===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:o,disableTelemetry:s,...a}={...r,..._(t)};let n,c;typeof e=="string"?n=e:typeof e=="object"&&(c=e),m(t).render(p(f,{definition:c,definitionUrl:n,disableTelemetry:s,options:a,router:o??"hash"},["Loading..."]))}const v=__REDOCLY_API_REFERENCE_VERSION__,C=__REDOCLY_API_REFERENCE_REVISION__;function R(){const e=i("redoc");if(!e)return;const r=e.getAttribute("spec-url");if(r){const t=e.getAttribute("disable-telemetry")==="true";y(r,{disableTelemetry:t},e)}}R();export{N as hydrate,y as init,C as revision,F as setParameterValue,V as setSecurityDetails,j as setSecurityDetailsVariants,v as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.15.0-next.
|
|
3
|
+
"version": "3.15.0-next.2",
|
|
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.5.1",
|
|
25
25
|
"deepmerge": "^4.2.2",
|
|
26
26
|
"dompurify": "3.2.7",
|
|
27
27
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"url-template": "^2.0.8",
|
|
37
37
|
"util": "~0.12.5",
|
|
38
38
|
"web-vitals": "3.3.1",
|
|
39
|
-
"@redocly/config": "0.
|
|
40
|
-
"@redocly/replay": "0.18.0-next.
|
|
39
|
+
"@redocly/config": "0.36.0",
|
|
40
|
+
"@redocly/replay": "0.18.0-next.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@jest/globals": "29.5.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/react": "^19.1.4",
|
|
54
54
|
"@types/react-dom": "^19.1.4",
|
|
55
55
|
"@types/styled-components": "5.1.34",
|
|
56
|
-
"@vitejs/plugin-react": "
|
|
56
|
+
"@vitejs/plugin-react": "5.0.4",
|
|
57
57
|
"esbuild": "0.25.10",
|
|
58
58
|
"jest": "29.5.0",
|
|
59
59
|
"jest-environment-jsdom": "29.5.0",
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
"styled-components": "5.3.11",
|
|
73
73
|
"ts-jest": "29.1.2",
|
|
74
74
|
"tsx": "4.20.3",
|
|
75
|
-
"typescript": "5.
|
|
75
|
+
"typescript": "5.9.3",
|
|
76
76
|
"url": "~0.11.0",
|
|
77
|
-
"vite": "
|
|
77
|
+
"vite": "7.1.9",
|
|
78
78
|
"@redocly/theme": "0.59.0-next.1"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|