@redocly/openapi-docs 3.23.0-next.0 → 3.23.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.
- package/dist/redocly-openapi-docs.min.js +2479 -2290
- package/lib/components/Language/LanguageItem.js +1 -1
- package/lib/components/Language/LanguageList.js +1 -1
- package/lib/components/Language/styled.js +3 -3
- package/lib/components/PanelItem/PanelItem.js +1 -1
- package/lib/components/PanelItem/styled.js +1 -1
- package/lib/components/PropertyDetails/PropertyDetails.js +4 -4
- package/lib/components/RequestSamples/RequestSamples.js +2 -2
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as e,jsx as o,jsxs as a}from"react/jsx-runtime";import{CheckmarkIcon as p}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{CurlIcon as f}from"../../icons/CurlIcon/index.js";import{CSharpIcon as n}from"../../icons/CSharpIcon/index.js";import{NodeJSIcon as l}from"../../icons/NodeJSIcon/index.js";import{JavaScriptIcon as I}from"../../icons/JavaScriptIcon/index.js";import{PythonIcon as s}from"../../icons/PythonIcon/index.js";import{RIcon as g}from"../../icons/RIcon/index.js";import{RubyIcon as h}from"../../icons/RubyIcon/index.js";import{PHPIcon as u}from"../../icons/PHPIcon/index.js";import{GOIcon as d}from"../../icons/GOIcon/index.js";import{JavaIcon as m}from"../../icons/JavaIcon/index.js";import{PayloadIcon as P}from"../../icons/PayloadIcon/index.js";import{LanguageIcon as y,LanguageTitle as C,LanguageTitleContainer as J}from"./styled.js";const j={Payload:o(P,{}),curl:o(f,{}),"C#":o(n,{}),"C#+Newtonsoft":o(n,{}),"Node.js":o(l,{}),JavaScript:o(I,{}),Python:o(s,{}),R:o(g,{}),Ruby:o(h,{}),PHP:o(u,{}),Go:o(d,{}),Java:o(m,{}),"Java8+Apache":o(m,{})},A=({item:r,active:t,withCheckmark:c,withIcon:i})=>a(e,{children:[a(J,{children:[i&&o(y,{children:j[r.lang]}),o(C,{active:t,title:r.title,children:r.title})]}),c&&t&&o(p,{})]});export{A as LanguageItem};
|
|
1
|
+
import{Fragment as e,jsx as o,jsxs as a}from"react/jsx-runtime";import{CheckmarkIcon as p}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{CurlIcon as f}from"../../icons/CurlIcon/index.js";import{CSharpIcon as n}from"../../icons/CSharpIcon/index.js";import{NodeJSIcon as l}from"../../icons/NodeJSIcon/index.js";import{JavaScriptIcon as I}from"../../icons/JavaScriptIcon/index.js";import{PythonIcon as s}from"../../icons/PythonIcon/index.js";import{RIcon as g}from"../../icons/RIcon/index.js";import{RubyIcon as h}from"../../icons/RubyIcon/index.js";import{PHPIcon as u}from"../../icons/PHPIcon/index.js";import{GOIcon as d}from"../../icons/GOIcon/index.js";import{JavaIcon as m}from"../../icons/JavaIcon/index.js";import{PayloadIcon as P}from"../../icons/PayloadIcon/index.js";import{LanguageIcon as y,LanguageTitle as C,LanguageTitleContainer as J}from"./styled.js";const j={Payload:o(P,{}),curl:o(f,{}),"C#":o(n,{}),"C#+Newtonsoft":o(n,{}),"Node.js":o(l,{}),JavaScript:o(I,{}),Python:o(s,{}),R:o(g,{}),Ruby:o(h,{}),PHP:o(u,{}),Go:o(d,{}),Java:o(m,{}),"Java8+Apache":o(m,{})},A=({item:r,active:t,withCheckmark:c,withIcon:i})=>a(e,{children:[a(J,{children:[i&&o(y,{children:j[r.lang]}),o(C,{$active:t,title:r.title,children:r.title})]}),c&&t&&o(p,{})]});export{A as LanguageItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as I}from"react/jsx-runtime";import{useLayoutEffect as j,useRef as A,useState as L,useCallback as S,memo as V,useMemo as E}from"react";import{useAtomValue as H,useSetAtom as W}from"jotai";import{Button as v}from"@redocly/theme/components/Button/Button";import{OverflowMenuVerticalIcon as D}from"@redocly/theme/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon";import{Tooltip as M}from"@redocly/theme/components/Tooltip/Tooltip";import{LanguageDropdown as R}from"./LanguageDropdown.js";import{languageAtom as _,layoutAtom as B}from"../../jotai/app.js";import{LanguageListContainer as O,LanguageListItem as z,Container as G}from"./styled.js";import{LanguageItem as P}from"./LanguageItem.js";import{DROPDOWN_TRIGGER_WIDTH as
|
|
1
|
+
import{jsx as a,jsxs as I}from"react/jsx-runtime";import{useLayoutEffect as j,useRef as A,useState as L,useCallback as S,memo as V,useMemo as E}from"react";import{useAtomValue as H,useSetAtom as W}from"jotai";import{Button as v}from"@redocly/theme/components/Button/Button";import{OverflowMenuVerticalIcon as D}from"@redocly/theme/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon";import{Tooltip as M}from"@redocly/theme/components/Tooltip/Tooltip";import{LanguageDropdown as R}from"./LanguageDropdown.js";import{languageAtom as _,layoutAtom as B}from"../../jotai/app.js";import{LanguageListContainer as O,LanguageListItem as z,Container as G}from"./styled.js";import{LanguageItem as P}from"./LanguageItem.js";import{DROPDOWN_TRIGGER_WIDTH as $,ITEM_WIDTH as w}from"./constants.js";import{LanguageListSkeleton as N}from"../common/Skeleton/LanguageListSkeleton.js";import{useTelemetry as q}from"../../hooks/index.js";function F({languages:o,activeLanguage:t,translate:r}){const[n,l]=L([]),[s,c]=L([]),f=q(),g=A(null),b=H(B),h=W(_),p=e=>{f.sendSelectLanguageClickedMessage([{object:"button",id:"selectLanguageButton",uri:"urn:redocly:redoc:ui:button:selectLanguageButton",language:e}])},k=e=>{h(e),p(e)},x=e=>{const u=s.findIndex(i=>i.key===e);if(u!==-1){const i=[...s],m=[...n];y(m,i,u),l(m),c(i),p(e),h(e)}},d=S(()=>{const e=g?.current?.offsetWidth;if(!e)return;const{newVisibleItems:u,newHiddenItems:i}=J(e,[...o]),m=i.findIndex(T=>T.key===t);m!==-1&&y(u,i,m),l(u),c(i)},[t,o]);j(()=>(d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}),[b,t]);const C=E(()=>n.length>=5||s.length?"space-between":"start",[s.length,n.length]);return I(G,{ref:g,children:[I(O,{$justifyContent:C,children:[!n.length&&a(N,{}),n.map(e=>a(z,{onClick:()=>k(e.key),$active:t===e.key,children:a(P,{item:e,withIcon:!0})},e.key))]}),s.length?a(R,{activeTab:t,samples:s,onChange:x,trigger:a(M,{tip:r("openapi.languages.moreButton.tooltipText","View more languages"),arrowPosition:"right",placement:"top",children:a(v,{icon:a(D,{}),"aria-label":"More languages",variant:"text",style:{height:"100%"}})}),withArrow:!1,withCheckmark:!1,width:156}):null]})}const ae=V(F);function J(o,t){let r=0;const n=[],l=[];return t.forEach((s,c)=>{const g=c===t.length-1&&l.length===0?0:$;o&&r+w+g<=o?(n.push(s),r+=w):l.push(s)}),{newVisibleItems:n,newHiddenItems:l}}function y(o,t,r){const n=o[o.length-1];n&&(o[o.length-1]=t[r],t[r]=n)}export{ae as LanguageList};
|
|
@@ -10,7 +10,7 @@ import{css as i}from"styled-components";import{Button as r}from"@redocly/theme/c
|
|
|
10
10
|
padding: 0 var(--spacing-xxs);
|
|
11
11
|
font-size: var(--font-size-base);
|
|
12
12
|
line-height: var(--line-height-base);
|
|
13
|
-
font-weight: ${({active:e})=>e?"var(--font-weight-medium)":"var(--font-weight-regular)"};
|
|
13
|
+
font-weight: ${({$active:e})=>e?"var(--font-weight-medium)":"var(--font-weight-regular)"};
|
|
14
14
|
`,x=t.span`
|
|
15
15
|
width: 100%;
|
|
16
16
|
display: inherit;
|
|
@@ -42,7 +42,7 @@ import{css as i}from"styled-components";import{Button as r}from"@redocly/theme/c
|
|
|
42
42
|
flex-direction: column;
|
|
43
43
|
gap: calc(var(--spacing-unit) * 0.5);
|
|
44
44
|
padding: var(--spacing-xs) 0;
|
|
45
|
-
color: ${({active:e})=>e?"var(--text-color-primary)":"var(--text-color-description)"};
|
|
45
|
+
color: ${({$active:e})=>e?"var(--text-color-primary)":"var(--text-color-description)"};
|
|
46
46
|
border-radius: var(--border-radius);
|
|
47
47
|
text-align: center;
|
|
48
48
|
position: relative;
|
|
@@ -51,7 +51,7 @@ import{css as i}from"styled-components";import{Button as r}from"@redocly/theme/c
|
|
|
51
51
|
color: var(--text-color-primary);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
${({active:e})=>e&&i`
|
|
54
|
+
${({$active:e})=>e&&i`
|
|
55
55
|
&::before {
|
|
56
56
|
position: absolute;
|
|
57
57
|
top: -21px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,jsxs as t}from"react/jsx-runtime";import{PanelItemWrap as l,Item as m,Header as p,Title as a,ActionsWrap as d,StyledCheckmarkIcon as x}from"./styled.js";const f=({header:r,title:s,actions:i,active:e,withCheckmark:o})=>t(l,{children:[t(m,{children:[r&&(typeof r=="string"?n(p,{children:r}):r),t(a,{active:e,suppressHydrationWarning:!0,children:[o&&e&&n(x,{})," ",s]})]}),n(d,{children:i?.map(c=>c)})]});export{f as PanelItem};
|
|
1
|
+
import{jsx as n,jsxs as t}from"react/jsx-runtime";import{PanelItemWrap as l,Item as m,Header as p,Title as a,ActionsWrap as d,StyledCheckmarkIcon as x}from"./styled.js";const f=({header:r,title:s,actions:i,active:e,withCheckmark:o})=>t(l,{children:[t(m,{children:[r&&(typeof r=="string"?n(p,{children:r}):r),t(a,{$active:e,suppressHydrationWarning:!0,children:[o&&e&&n(x,{})," ",s]})]}),n(d,{children:i?.map(c=>c)})]});export{f as PanelItem};
|
|
@@ -23,7 +23,7 @@ import{CheckmarkIcon as o}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon"
|
|
|
23
23
|
line-height: var(--line-height-base);
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
text-overflow: ellipsis;
|
|
26
|
-
font-weight: ${({active:e})=>e&&"var(--font-weight-medium)"};
|
|
26
|
+
font-weight: ${({$active:e})=>e&&"var(--font-weight-medium)"};
|
|
27
27
|
`,p=t.div`
|
|
28
28
|
display: flex;
|
|
29
29
|
gap: var(--spacing-xs);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsx as n,jsxs as g}from"react/jsx-runtime";import{memo as f}from"react";import{useAtomValue as u}from"jotai";import{Schema as x}from"../Schema/index.js";import{FieldDetails as
|
|
1
|
+
import{jsx as n,jsxs as g}from"react/jsx-runtime";import{memo as f}from"react";import{useAtomValue as u}from"jotai";import{Schema as x}from"../Schema/index.js";import{FieldDetails as $}from"./FieldDetails.js";import{generateDeepLink as k}from"../common/LinkToField.js";import{activeMimeNameAtom as w}from"../../jotai/app.js";import{styled as D}from"../../styled-components.js";function L({field:e,skipWriteOnly:m,skipReadOnly:p,level:d=1,showTitle:c,renderDiscriminatorSwitch:l,isFirst:h,fieldParentsName:o,disableDeepLinks:i,oneOfLevel:b,slug:r,onOneOfChange:v}){const y=u(w),t=i?void 0:k(e,y),a=r&&t?`${r}&${t.replace("#","")}`:t,s=!e.schema.isPrimitive&&!e.schema.isCircular;return g(O,{$isFirst:h,$expanded:s,className:"property",children:[n($,{field:e,renderDiscriminatorSwitch:l,deepLink:a,fieldParentsName:o}),s&&n(x,{schema:e.schema,skipReadOnly:p,skipWriteOnly:m,showTitle:c,expandable:!0,level:d+1,fieldParentsName:[...o||[],e.name],deepLink:a,required:e.required,disableDeepLinks:i,oneOfLevel:b,slug:r,onOneOfChange:v})]})}const M=f(L),O=D.div`
|
|
2
2
|
width: 100%;
|
|
3
|
-
padding: ${({
|
|
4
|
-
${({expanded:e})=>e?0:"var(--schema-property-details-spacing)"};
|
|
5
|
-
${({expanded:e})=>!e&&"border-bottom: 1px solid var(--border-color-primary)"};
|
|
3
|
+
padding: ${({$isFirst:e})=>`var(--schema-${e?"first-":""}property-details-spacing)`} 0
|
|
4
|
+
${({$expanded:e})=>e?0:"var(--schema-property-details-spacing)"};
|
|
5
|
+
${({$expanded:e})=>!e&&"border-bottom: 1px solid var(--border-color-primary)"};
|
|
6
6
|
|
|
7
7
|
// This styles needs to override the dividers when array closing label is present
|
|
8
8
|
&:has(+ span.array-closing-label) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as o,jsxs as N}from"react/jsx-runtime";import{memo as D,useCallback as L,useMemo as k}from"react";import{useAtomValue as y,useAtom as T}from"jotai";import{PanelHeader as U}from"@redocly/theme/components/Panel/PanelHeader";import{PayloadSamples as W}from"../PayloadSamples/index.js";import{CodeSample as F}from"./CodeSample.js";import{useCodeSamples as H}from"./useCodeSamples.js";import{isPayloadSample as O}from"../../models/index.js";import{createCodeSampleCopyEvent as _,createLanguageSwitchEvent as
|
|
1
|
+
import{jsx as o,jsxs as N}from"react/jsx-runtime";import{memo as D,useCallback as L,useMemo as k}from"react";import{useAtomValue as y,useAtom as T}from"jotai";import{PanelHeader as U}from"@redocly/theme/components/Panel/PanelHeader";import{PayloadSamples as W}from"../PayloadSamples/index.js";import{CodeSample as F}from"./CodeSample.js";import{useCodeSamples as H}from"./useCodeSamples.js";import{isPayloadSample as O}from"../../models/index.js";import{createCodeSampleCopyEvent as _,createLanguageSwitchEvent as $}from"../../events/index.js";import{globalStoreAtom as V}from"../../jotai/store.js";import{ServerListDropdown as z}from"../ServerListDropdown/index.js";import{LanguageDropdown as G}from"../Language/index.js";import{activeMimeNameAtom as J,languageAtom as K}from"../../jotai/app.js";import{Replay as A}from"../Replay/index.js";import{CodeBlockPanel as w}from"../common/index.js";import{useActiveWithFallback as Q,useTelemetry as X}from"../../hooks/index.js";import{operationStore as Y}from"../../jotai/operation.js";import{styled as S}from"../../styled-components.js";function Z({operation:a,disableFooter:P,onPanelToggle:v,...p}){const c=X(),[{activeLanguage:q,languages:m},R]=T(K),{samples:t}=H(a),{parser:d,options:{events:s,corsProxyUrl:u,hideReplay:j}}=y(V),i=!P&&!a.isWebhook&&!j&&!a.hideReplay,n=!!m?.length,g=Q(t,q),B=e=>{R(e),c.sendSelectLanguageClickedMessage([{id:"selectLanguageButton",object:"button",uri:"urn:redocly:redoc:ui:button:selectLanguageButton",language:e}]);const r=m?.find(l=>l.key===e);if(s?.codeSamplesLanguageSwitch&&r){const l=$({operation:a,sample:{lang:r.lang,label:r.title}});s.codeSamplesLanguageSwitch(l)}},b=y(J),{activeExampleName:h}=y(Y(a.pointer)),f=L(({lang:e,title:r})=>()=>{const l=_({operation:a,label:r,lang:e,type:"request",activeMimeName:b,activeExampleName:h});c.sendCopyCodeSnippetClickedMessage([{id:"copyCodeSnippetButton",object:"button",uri:"urn:redocly:redoc:ui:button:copyCodeSnippetButton",snippetType:"request",language:e}]),s?.codeSamplesCopy?.(l)},[a,c,s,b,h]),C=L(e=>{v?.(e,"request-samples")},[v]),x=()=>N(I,{isExpandable:!1,$withReplay:!n&&i,children:[o(ee,{operation:a}),n&&o(G,{activeTab:g,samples:t,onChange:B}),!n&&i&&o(A,{operation:a,corsProxyUrl:u,fullOpenApi:d.definition})]}),E=k(()=>{if(i&&n)return o(ae,{children:o(A,{operation:a,corsProxyUrl:u,fullOpenApi:d.definition})})},[i,n,a,u,d.definition]),M=k(()=>t.map(e=>e.key===g?o("div",{children:O(e)?o(W,{content:e.requestBodyContent,onCopyClick:f(e),onPanelToggle:C,...p}):o(F,{lang:e.lang,source:e.source,externalSample:e,operation:a,onCopyClick:f(e),...p})},e.key+a.id):null),[g,f,C,a,p,t]);return m&&!t.length?o(w,{className:"panel-request-samples",header:x,isExpandable:!1,expanded:!1}):t.length?o(w,{className:"panel-request-samples",header:x,footer:E,isExpandable:!1,children:M}):null}const he=D(Z),I=S(U)`
|
|
2
2
|
flex-wrap: nowrap;
|
|
3
|
-
${({withReplay:a})=>a&&"padding: var(--spacing-xs) var(--spacing-sm);"}
|
|
3
|
+
${({$withReplay:a})=>a&&"padding: var(--spacing-xs) var(--spacing-sm);"}
|
|
4
4
|
`,ee=S(z)`
|
|
5
5
|
padding-right: var(--spacing-base);
|
|
6
6
|
min-width: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.23.0-next.
|
|
3
|
+
"version": "3.23.0-next.1",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"util": "~0.12.5",
|
|
41
41
|
"web-vitals": "3.3.1",
|
|
42
42
|
"@redocly/config": "0.49.0",
|
|
43
|
-
"@redocly/redoc-opentelemetry": "0.2.
|
|
44
|
-
"@redocly/replay": "0.26.0-next.
|
|
43
|
+
"@redocly/redoc-opentelemetry": "0.2.1",
|
|
44
|
+
"@redocly/replay": "0.26.0-next.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@shikijs/transformers": "3.21.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"url": "~0.11.0",
|
|
72
72
|
"vite": "7.3.3",
|
|
73
73
|
"vitest": "4.1.8",
|
|
74
|
-
"@redocly/theme": "0.67.0-next.
|
|
74
|
+
"@redocly/theme": "0.67.0-next.1"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"start": "pnpm run copy-highlight-hook && vite",
|