@redocly/openapi-docs 3.18.0-next.6 → 3.18.0-next.7
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 +2434 -2166
- package/lib/components/Callbacks/CallbackDetails.js +2 -2
- package/lib/components/OperationItem/OperationItem.js +10 -6
- package/lib/components/Request/RequestDetails.js +8 -2
- package/lib/components/Responses/OperationResponseList.js +2 -1
- package/lib/components/Responses/styled.js +4 -2
- package/lib/components/SchemaDefinition/SchemaDefinition.js +5 -2
- package/lib/components/SectionContent/SectionContent.js +7 -5
- package/lib/components/SectionItem/SectionItem.js +1 -1
- package/lib/components/Security/OAuthScopes.d.ts +3 -3
- package/lib/components/Security/OAuthScopes.js +12 -11
- package/lib/components/Security/RequiredScopes.d.ts +6 -0
- package/lib/components/Security/RequiredScopes.js +17 -0
- package/lib/components/Security/RequiredScopesList.d.ts +14 -0
- package/lib/components/Security/RequiredScopesList.js +13 -0
- package/lib/components/Security/ScopeTagWithTooltip.d.ts +17 -0
- package/lib/components/Security/ScopeTagWithTooltip.js +33 -0
- package/lib/components/Security/SecurityButton.js +14 -14
- package/lib/components/Security/SecurityFlow.js +18 -5
- package/lib/components/TagItem/TagItem.js +50 -37
- package/lib/components/ViewNested/ViewNested.js +7 -7
- package/lib/components/common/Dropdown/Dropdown.js +14 -12
- package/lib/components/common/OperationItemTitle.js +8 -6
- package/lib/components/common/styled.js +4 -4
- package/lib/models/schema.js +2 -2
- package/lib/services/menu/tags.js +2 -2
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -1
- package/lib/types/oauth2-types.d.ts +4 -0
- package/lib/types/oauth2-types.js +0 -0
- package/lib/types/open-api.d.ts +2 -0
- package/lib/utils/openapi.js +1 -1
- package/lib/utils/security-scope.d.ts +5 -0
- package/lib/utils/security-scope.js +1 -0
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as l,jsxs as s,Fragment as t}from"react/jsx-runtime";import{memo as r,useCallback as m}from"react";import{LinkIcon as p}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{OperationResponseList as d}from"../Responses/index.js";import{RequestDetails as k}from"../Request/RequestDetails.js";import{LinkToField as a}from"../common/LinkToField.js";import{makeDeepLink as c}from"../../services/index.js";import{styled as b}from"../../styled-components.js";function
|
|
1
|
+
import{jsx as l,jsxs as s,Fragment as t}from"react/jsx-runtime";import{memo as r,useCallback as m}from"react";import{LinkIcon as p}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{OperationResponseList as d}from"../Responses/index.js";import{RequestDetails as k}from"../Request/RequestDetails.js";import{LinkToField as a}from"../common/LinkToField.js";import{makeDeepLink as c}from"../../services/index.js";import{styled as b}from"../../styled-components.js";function h({operation:e,translate:i}){const n=m(o=>s(f,{children:[l(a,{to:c(e.id,`${e.callbackId}/callback-response&c=${o.key}`)}),i("openapi.callbackResponse","Callback Response")]}),[e.callbackId,e.id,i]);return s(t,{children:[l(k,{operation:e,title:s(t,{children:[l(a,{to:c(e.id,`${e.callbackId}/callback-request`)}),i("openapi.callbackRequest","Callback Request")]})}),e.responses?.length?l(d,{responses:e.responses,operationId:e.id,operationPointer:e.pointer,callbackId:e.callbackId,renderTitle:n}):null]})}const j=r(h),f=b.h4`
|
|
2
2
|
position: relative;
|
|
3
|
-
font-size: var(--font-size
|
|
3
|
+
font-size: var(--h4-font-size);
|
|
4
4
|
font-weight: var(--h4-font-weight);
|
|
5
5
|
line-height: var(--h4-line-height);
|
|
6
6
|
padding: 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as V}from"react/jsx-runtime";import{memo as K,useState as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as V}from"react/jsx-runtime";import{memo as K,useState as L,useCallback as j,useMemo as W}from"react";import{useAtomValue as g}from"jotai";import{LayoutVariant as $}from"@redocly/config";import{AfterOpenApiOperation as z}from"@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiOperation";import{BeforeOpenApiOperation as G}from"@redocly/theme/components/OpenApiDocs/hooks/BeforeOpenApiOperation";import{PageActions as J}from"@redocly/theme/components/PageActions/PageActions";import{Feedback as Q}from"@redocly/theme/components/Feedback/Feedback";import{SamplesMiddlePanel as s,SamplesPanel as U,ShareLink as X,Row as f,CustomBadges as Y}from"../common/index.js";import{CallbacksList as Z}from"../Callbacks/index.js";import{CallbackSamples as ee}from"../CallbackSamples/index.js";import{RequestSamples as ae}from"../RequestSamples/index.js";import{OperationResponseList as te}from"../Responses/index.js";import{ResponseSamples as oe}from"../ResponseSamples/index.js";import{makeDeepLink as ne,joinWithSeparator as se}from"../../services/index.js";import{layoutAtom as re,userClaimsAtom as ie}from"../../jotai/app.js";import{globalOptionsAtom as le,globalStoreAtom as ce}from"../../jotai/store.js";import{getOperation as pe}from"../../models/operation.js";import{RenderHook as B}from"../RenderHook/index.js";import{Heading as de,HeadingWrapper as me,Title as ge}from"../common/OperationItemTitle.js";import{LinkToField as ke}from"../common/LinkToField.js";import{RequestDetails as be}from"../Request/RequestDetails.js";import{StyledBadge as H}from"../common/Badges.js";import{useTranslate as he}from"../../hooks/index.js";import{styled as i}from"../../styled-components.js";import{createPanelToggleEvent as ue}from"../../events/index.js";import{SchemaCatalogLink as fe}from"../SchemaCatalogLink/SchemaCatalogLink.js";function Se({item:{operationDefinition:v,parent:x,href:b}}){const r=he(),{parser:y,options:l}=g(ce),{events:C}=g(le),T=g(ie),n=g(re),[c,I]=L(),{unstable_hooks:O,feedback:p}=l,a=W(()=>pe(y,v,x,l,b,void 0,T),[b,v,l,x,y,T]),{name:R,deprecated:_,isWebhook:q,badges:D}=a||{},o=n===$.STACKED,A=p?.type||"sentiment",P=p?.hide!==!0,h=se(l.routingBasePath,a.href),[u,E]=L(null),w=j(m=>{c!==m&&I(m)},[c]),d=j((m,F)=>{if(!F)return;const N=ue({operation:a,isExpanded:m,panelType:F});C?.panelToggle?.(N)},[C,a]),M=W(()=>P?e(ve,{children:e(Q,{type:A,settings:p.settings,path:h})}):null,[P,A,p.settings,h]);return t(xe,{layout:n,children:[e(k,{layout:n,children:t(s,{isStacked:o,children:[e(B,{Hook:G||O?.BeforeOperation,props:{operation:a}}),t(me,{children:[t(de,{"data-testid":"operation-item-header",children:[e(X,{to:b,"aria-label":`link to ${R}`}),e(Y,{badges:D,children:R}),_&&e(H,{deprecated:!0,children:r("openapi.badges.deprecated","Deprecated")}),q&&e(H,{children:r("openapi.badges.webhook","Webhook")})]}),e(J,{pageSlug:h})]})]})}),e(s,{isStacked:o,children:e(fe,{schemaRef:"#"+a.pointer})}),t(k,{layout:n,children:[e(s,{isStacked:o,children:e(be,{operation:a,translate:r,onPanelToggle:d})}),e(S,{isStacked:o,"data-testid":"samples-block",className:"panel-container-request-samples",children:e(ae,{operation:a,onPanelToggle:d})})]}),t(k,{layout:n,children:[e(s,{isStacked:o,children:a.responses?.length?e(te,{responses:a.responses,operationId:a.id,operationPointer:a.pointer,callbackId:a.callbackId,activeResponseTab:c,onTabChange:w,onPanelToggle:d}):null}),e(S,{isStacked:o,"data-testid":"samples-block",className:"panel-container-response-samples",children:e(oe,{operation:a,activeResponseTab:c,onTabChange:w,onPanelToggle:d})})]}),t(ye,{layout:n,children:[t(s,{isStacked:o,children:[a.callbacks?.length?t(V,{children:[t(ge,{children:[e(ke,{to:ne(a.id,"callbacks")}),r("openapi.callbacks","Callbacks")]}),e(Z,{callbacks:a.callbacks,onExpand:E,selectedCallback:u})]}):null,e(B,{Hook:z||O?.AfterOperation,props:{operation:a}})]}),u?e(S,{isStacked:o,"data-testid":"samples-block",children:e(ee,{callback:u,translate:r})}):null]}),e(k,{layout:n,children:e(s,{isStacked:o,fullWidth:!0,children:M})})]})}const Ue=K(Se),S=i(U)`
|
|
2
2
|
margin-left: auto;
|
|
3
3
|
--code-block-padding: var(--spacing-xs) 0 var(--spacing-xs) 20px;
|
|
4
|
-
`,ve=
|
|
4
|
+
`,ve=i.div`
|
|
5
5
|
& > div {
|
|
6
6
|
flex: 1 1 auto;
|
|
7
7
|
display: flex;
|
|
@@ -12,10 +12,14 @@ import{jsx as e,jsxs as t,Fragment as V}from"react/jsx-runtime";import{memo as K
|
|
|
12
12
|
width: 100%;
|
|
13
13
|
max-width: var(--feedback-width);
|
|
14
14
|
}
|
|
15
|
-
`,
|
|
15
|
+
`,xe=i(f)`
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
align-items: flex-start;
|
|
18
18
|
padding: var(--spacing-base) 0 calc(var(--spacing-xl) + var(--spacing-xs));
|
|
19
|
-
`,i
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
`,k=i(f)`
|
|
20
|
+
&& {
|
|
21
|
+
margin: calc(var(--spacing-unit) * 2) 0;
|
|
22
|
+
}
|
|
23
|
+
`,ye=i(f)`
|
|
24
|
+
margin-top: var(--spacing-xl);
|
|
25
|
+
`;export{Ue as OperationItem,S as OperationSamplesPanel};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as T}from"react/jsx-runtime";import{memo as j,useMemo as k}from"react";import{useAtomValue as A}from"jotai";import{Title as P}from"../common/OperationItemTitle.js";import{LinkToField as y}from"../common/LinkToField.js";import{makeDeepLink as D}from"../../services/index.js";import{Description as E}from"../OperationItem/Description.js";import{Security as F}from"../Security/index.js";import{hasNestedFields as M}from"../../utils/index.js";import{ExpandAllButton as N}from"../ExpandAllButton/index.js";import{RequestParameters as b}from"../RequestParameters/index.js";import{activeMimeNameAtom as C}from"../../jotai/app.js";import{getActiveMediaType as _}from"../../models/mediaContent.js";import{styled as n}from"../../styled-components.js";import{Extensions as w}from"../common/Extensions.js";function I({operation:{id:i,description:s,externalDocs:m,parameters:r,requestBody:t,pointer:u,security:f,extensions:a,callbackId:d},title:x,translate:h,onPanelToggle:g}){const p=A(C),v=k(()=>{const c=r.some(({schema:l})=>!l.isPrimitive&&!l.isCircular);if(!t?.content||c)return c;const{schema:R}=_(t.content,p)||{};return M(R)},[p,r,t?.content]),q=Object.keys(a||{}).length>0;return o(T,{children:[o(L,{children:[o(H,{children:[o(O,{children:[i&&e(y,{to:D(i,"request")}),x||h?.("openapi.request","Request"),v&&e(N,{operationPointer:u,type:"request",onPanelToggle:g})]}),e(E,{description:s||m?s:void 0,externalDocs:m})]}),q&&e(w,{extensions:a}),e(F,{securities:f})]}),e(b,{parameters:r,body:t,operationId:i,callbackId:d})]})}const L=n.div`
|
|
2
2
|
width: 100%;
|
|
3
|
-
`,
|
|
3
|
+
`,H=n.div`
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--spacing-xs);
|
|
7
|
+
`,O=n(P)`
|
|
8
|
+
margin: 0;
|
|
9
|
+
`,te=j(I);export{te as RequestDetails};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import{jsx as n,jsxs as
|
|
1
|
+
import{jsx as n,jsxs as s,Fragment as v}from"react/jsx-runtime";import{memo as A,useMemo as L}from"react";import{useLocation as j}from"react-router-dom";import{useAtomValue as w}from"jotai";import{Tabs as F,useTabsState as M}from"../Tabs/index.js";import{ResponseDetails as C}from"./ResponseDetails.js";import{makeDeepLink as N}from"../../services/index.js";import{Row as R,StyledTitle as _}from"./styled.js";import{LinkToField as B}from"../common/LinkToField.js";import{pathIncludesLink as c,hasNestedFields as D}from"../../utils/index.js";import{ExpandAllButton as E}from"../ExpandAllButton/index.js";import{useTranslate as P}from"../../hooks/index.js";import{getActiveMediaType as S}from"../../models/index.js";import{activeMimeNameAtom as $}from"../../jotai/app.js";import{styled as I}from"../../styled-components.js";const oe=A(({responses:i,renderTitle:f,operationId:a,operationPointer:d,activeResponseTab:m,onTabChange:u,callbackId:g,onPanelToggle:h})=>{const p=j(),T=P(),l=w($),r=i.map(({code:e})=>({key:e,title:e})),b=r.find(({key:e})=>e===m||c(p,a)&&c(p,`c=${e}`)),{activeTab:k,handleTabChange:x}=M({tabs:r,defaultTab:b?.key,onChange:u}),o=r.find(e=>e.key===(m||k)),t=i.find(e=>e.code===o?.key),y=L(()=>{if(!t?.content)return!1;const{schema:e}=S(t?.content,l)||{};return D(e)},[l,t?.content]);return o?s(v,{children:[s(O,{children:[f?.(o)||s(_,{children:[n(B,{to:N(a,`response&c=${o.key}`)}),T("openapi.responses","Responses")]}),n(F,{tabs:r,activeTab:o,onChange:x}),y&&n(E,{type:"response",operationPointer:d,onPanelToggle:h})]}),t?n("div",{children:n(C,{response:t,operationId:a,callbackId:g})},t.code):null]}):null}),O=I(R)`
|
|
2
2
|
flex-wrap: wrap;
|
|
3
3
|
gap: var(--spacing-unit);
|
|
4
|
+
margin-top: var(--spacing-xl);
|
|
4
5
|
`;export{oe as OperationResponseList};
|
|
@@ -15,8 +15,10 @@ import{Title as t}from"../common/OperationItemTitle.js";import{Markdown as e}fro
|
|
|
15
15
|
align-items: center;
|
|
16
16
|
margin-top: var(--spacing-base);
|
|
17
17
|
`,l=i(t)`
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
&& {
|
|
19
|
+
margin: 0 var(--spacing-sm) 0 0;
|
|
20
|
+
position: relative;
|
|
21
|
+
}
|
|
20
22
|
`,g=i(e)`
|
|
21
23
|
margin-top: var(--spacing-xs);
|
|
22
24
|
`;export{n as HeadersCaption,p as Row,g as StyledDescription,s as StyledHeadersProperties,l as StyledTitle};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import{jsx as o,jsxs as S}from"react/jsx-runtime";import{memo as C,useCallback as
|
|
1
|
+
import{jsx as o,jsxs as S}from"react/jsx-runtime";import{memo as C,useCallback as k,useMemo as A}from"react";import{LayoutVariant as j}from"@redocly/config";import{useAtom as D,useAtomValue as x}from"jotai";import{useWriteAtom as N}from"../../jotai/use-write-atom.js";import{SamplesMiddlePanel as T,SamplesPanel as E,Row as P,Section as b,CodeBlockPanel as w}from"../common/index.js";import{getMediaType as I}from"../../models/index.js";import{MediaTypeSamples as L}from"../PayloadSamples/index.js";import{Schema as V}from"../Schema/index.js";import{Markdown as W}from"../Markdown/index.js";import{layoutAtom as _}from"../../jotai/app.js";import{globalStoreAtom as $}from"../../jotai/store.js";import{operationStore as O}from"../../jotai/operation.js";import{styled as g}from"../../styled-components.js";import{SchemaCatalogLink as B}from"../SchemaCatalogLink/SchemaCatalogLink.js";const K=(t,i)=>{if(!t)return{};const n={schema:{$ref:t}};return i&&(n.examples={example:{$ref:i}}),n};function q({schemaRef:t,exampleRef:i,showReadOnly:n=!0,showWriteOnly:v=!1}){const s=x(_),{parser:c,options:p}=x($),l=N(),e=A(()=>I(c,"json",!1,K(t,i),p,{operation:{pointer:"SchemaDefinitionComponent"}}),[i,p,c,t]),[d,f]=D(O(e.operation?.pointer)),y=k(r=>{if(!e.schema)return;const a=e.schema,u=a.oneOf;if(u&&e?.examples&&Object.keys(e?.examples).includes(r)){const m=u.findIndex(M=>M.title===r);m!==-1&&a&&l(O(a.operationPointer),{activeExampleName:a.oneOf?.[m]?.title,activeOneOf:{[a.pointer]:m}})}d.activeExampleName!==r&&f({activeExampleName:r})},[e?.examples,e.schema,d.activeExampleName,f,l]),h=s===j.STACKED;return o(b,{className:"schema-definition",children:S(P,{layout:s,children:[S(F,{isStacked:h,children:[t&&o(B,{schemaRef:t}),e.schema?.description&&o(z,{children:o(W,{source:e.schema?.description})}),o(V,{skipWriteOnly:!v,skipReadOnly:!n,schema:e.schema,level:1})]}),o(E,{isStacked:h,children:o(w,{className:"panel-response-samples",children:o(L,{mediaType:e,onChange:y})})})]})})}const re=C(q),z=g.div`
|
|
2
2
|
margin-bottom: var(--spacing-vertical);
|
|
3
|
-
|
|
3
|
+
`,F=g(T)`
|
|
4
|
+
padding-left: 0;
|
|
5
|
+
padding-right: 0;
|
|
6
|
+
`;export{re as SchemaDefinition};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import{jsx as t,jsxs as
|
|
1
|
+
import{jsx as t,jsxs as m,Fragment as x}from"react/jsx-runtime";import{useMemo as p}from"react";import{useAtomValue as d}from"jotai";import{LayoutVariant as c}from"@redocly/config";import{breakpoints as S}from"@redocly/theme/core/openapi";import{OpenApiHeader as u}from"@redocly/theme/components/OpenApiDocs/hooks/OpenApiHeader";import{PageFooter as k}from"../PageFooter/index.js";import{globalOptionsAtom as b}from"../../jotai/store.js";import{RenderHook as w}from"../RenderHook/index.js";import{RightPanel as y}from"../RightPanel/index.js";import{layoutAtom as C}from"../../jotai/app.js";import{Row as B,SamplesMiddlePanel as R,SamplesPanel as j}from"../common/index.js";import{Items as f}from"../ContentItems/Items.js";import{ContentItem as g}from"../ContentItem/index.js";import{styled as l}from"../../styled-components.js";function J({items:e,hideFooterAndHeader:n}){const{unstable_hooks:{MiddlePanelHeader:a},routingBasePath:i}=d(b),s=d(C),o=s===c.STACKED,P=p(()=>n?null:t(h,{isStacked:o,children:t(k,{})}),[n,o]),v=p(()=>n||!u&&!a?null:t(h,{isStacked:o,children:a?t(w,{Hook:a,props:void 0}):t(u,{})}),[a,n,o]);return e.length===0?null:m(x,{children:[v,m(A,{layout:s,children:[t(M,{layout:s,children:e.filter(({type:r})=>r==="section").map(r=>t(g,{item:r,routingBasePath:i,children:t(f,{items:r.items,routingBasePath:i})},r.id))}),t(_,{isStacked:o,tabIndex:0,children:t(y,{item:e[0]})})]}),e.filter(({type:r})=>r!=="section").map(r=>t(g,{item:r,routingBasePath:i,children:t(f,{items:r.items,routingBasePath:i})},r.id)),P]})}const h=l(R)`
|
|
2
2
|
align-self: flex-start;
|
|
3
3
|
padding-top: var(--panel-gap-vertical);
|
|
4
4
|
padding-bottom: var(--panel-gap-vertical);
|
|
5
|
-
`,
|
|
5
|
+
`,M=l.div`
|
|
6
6
|
width: 100%;
|
|
7
7
|
|
|
8
|
-
@media screen and (min-width: ${
|
|
8
|
+
@media screen and (min-width: ${S.large}) {
|
|
9
9
|
width: ${({layout:e})=>e===c.STACKED?"100%":"calc(100% - var(--panel-samples-width))"};
|
|
10
10
|
}
|
|
11
|
-
`,_=
|
|
11
|
+
`,_=l(j)`
|
|
12
12
|
margin: var(--spacing-base) 0;
|
|
13
|
-
|
|
13
|
+
`,A=l(B)`
|
|
14
|
+
padding-bottom: var(--spacing-xl);
|
|
15
|
+
`;export{_ as RightPanelContainer,M as SectionContainer,J as SectionContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,Fragment as l,jsxs as p}from"react/jsx-runtime";import{memo as d}from"react";import{LayoutVariant as
|
|
1
|
+
import{jsx as t,Fragment as l,jsxs as p}from"react/jsx-runtime";import{memo as d}from"react";import{LayoutVariant as f}from"@redocly/config";import{SamplesMiddlePanel as a,Row as u}from"../common/index.js";import{Markdown as h}from"../Markdown/index.js";import{ExternalDocumentation as x}from"../ExternalDocumentation/index.js";function S({item:o,layout:s}){const{externalDocs:r,ast:i,description:c}=o,e=s===f.STACKED,n=!o.parent||o.parent.type!=="tag";return p(l,{children:[t(h,{ast:i,source:c,htmlWrap:m=>t(a,{fullWidth:n,isStacked:e,children:m})}),r&&t(u,{children:t(a,{compact:!0,fullWidth:n,isStacked:e,children:t(x,{externalDocs:r})})})]})}const _=d(S);export{_ as SectionItem};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
-
import type { OpenAPISecurityScheme } from '../../types/index.js';
|
|
3
2
|
import type { SecurityRequirement } from '../../models/index.js';
|
|
4
|
-
type
|
|
3
|
+
import type { OAuth2Flow, OAuth2Flows } from '../../types/index.js';
|
|
5
4
|
interface OAuthScopesMainProps {
|
|
6
5
|
id: string;
|
|
7
6
|
securities: SecurityRequirement[];
|
|
8
|
-
|
|
7
|
+
flow?: OAuth2Flow;
|
|
8
|
+
flows?: OAuth2Flows;
|
|
9
9
|
}
|
|
10
10
|
export declare const OAuthScopes: import("react").NamedExoticComponent<PropsWithChildren<OAuthScopesMainProps>>;
|
|
11
11
|
export {};
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o,jsxs as c,Fragment as g}from"react/jsx-runtime";import{memo as f,useState as u}from"react";import{ChevronRightIcon as S}from"@redocly/theme/icons/ChevronRightIcon/ChevronRightIcon";import{Markdown as h}from"../Markdown/index.js";import{SecuritySchemeItem as l}from"./SecuritySchemeItem.js";import{Tag as v}from"./styled.js";import{useTranslate as x}from"../../hooks/index.js";import{getOptionalScopes as y,getRequiredScopes as O}from"./helper.js";import{styled as t}from"../../styled-components.js";import{ScopeTagWithTooltip as b}from"./ScopeTagWithTooltip.js";import{RequiredScopesList as w}from"./RequiredScopesList.js";import{normalizeScopes as C}from"../../utils/security-scope.js";const j=24;function q({id:e,securities:n,flow:a,flows:r}){const i=O(e,n);return a?o(z,{flow:a,requiredScopes:i}):o(I,{children:o(w,{schemeId:e,securities:n,flows:r})})}function z({flow:e,requiredScopes:n}){const a=x(),[r,i]=u(!1),m=Object.keys(e.scopes||{}),d=C(n),p=y(d,m);return p.length===0?null:c(g,{children:[o(l,{label:c(R,{onClick:()=>{i(s=>!s)},children:[a(r?"openapi.hideOptionalScopes":"openapi.showOptionalScopes",r?"Hide optional scopes":"Show optional scopes"),o(_,{isOpen:r,children:o(S,{size:"var(--font-size-base)",color:"var(--tree-content-color-default)"})})]}),value:" "}),o(T,{isOpen:r,children:p.map(s=>o(l,{label:o(b,{className:"tag-grey",text:s,maxChars:j,TagComponent:A,compact:!0}),value:o(W,{children:o(h,{source:e.scopes[s]||""})})},s))})]})}const A=t(v)`
|
|
2
2
|
font-family: var(--font-family-base);
|
|
3
3
|
font-size: var(--font-size-base);
|
|
4
|
-
line-height: var(--line-height-base);
|
|
5
4
|
align-self: flex-start;
|
|
6
5
|
padding: 0 var(--spacing-xs);
|
|
7
6
|
border: var(--tag-border-width) var(--tag-border-style) var(--tag-bg-color);
|
|
8
7
|
border-radius: var(--tag-border-radius);
|
|
9
|
-
|
|
8
|
+
color: var(--color-warm-grey-8);
|
|
9
|
+
`,R=t.div`
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
display: flex;
|
|
12
12
|
gap: var(--spacing-xxs);
|
|
13
13
|
align-items: center;
|
|
14
14
|
user-select: none;
|
|
15
|
-
`,
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-wrap: wrap;
|
|
18
|
-
gap: var(--spacing-xxs);
|
|
19
|
-
word-break: normal;
|
|
20
|
-
`,z=i.div`
|
|
15
|
+
`,T=t.div`
|
|
21
16
|
max-height: ${e=>e.isOpen?"1000px":"0"};
|
|
22
17
|
opacity: ${e=>e.isOpen?"1":"0"};
|
|
23
18
|
overflow: hidden;
|
|
24
19
|
transition:
|
|
25
20
|
max-height 0.5s ease-in-out,
|
|
26
21
|
opacity 0.5s ease-in-out;
|
|
27
|
-
`,
|
|
22
|
+
`,_=t.span`
|
|
28
23
|
display: inline-flex;
|
|
29
24
|
align-items: center;
|
|
30
25
|
justify-content: center;
|
|
31
26
|
transform: ${e=>e.isOpen?"rotate(90deg)":"rotate(0deg)"};
|
|
32
27
|
transition: transform 0.5s ease-in-out;
|
|
33
|
-
`,
|
|
28
|
+
`,I=t.div`
|
|
29
|
+
margin-top: var(--spacing-xs);
|
|
30
|
+
`,W=t.div`
|
|
31
|
+
p {
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
}
|
|
34
|
+
`,G=f(q);export{G as OAuthScopes};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{styled as o}from"../../styled-components.js";import{normalizeScopes as m}from"../../utils/security-scope.js";import{useTranslate as g}from"../../hooks/index.js";import{ScopeTagWithTooltip as c}from"./ScopeTagWithTooltip.js";const l=4,S=32;function j({scopes:d}){const t=g(),s=m(d);if(s.length===0)return null;const h=s.slice(0,l),a=s.slice(l),n=a.length;return r(x,{children:[e(p,{children:"("}),r(u,{children:[t("openapi.requiredScopes","Required scopes"),":"," "]}),r(f,{children:[h.map(i=>e(c,{className:"tag-grey",text:i,maxChars:S},i)),n>0&&e(c,{arrowPosition:"left",className:"tag-grey",text:`+${n}`,tip:e(v,{children:a.map(i=>e("div",{children:i},i))}),ariaLabel:t("openapi.showMoreScopes",`Show ${n} more scopes`)})]}),e(p,{children:")"})]})}const x=o.span`
|
|
2
|
+
display: inline;
|
|
3
|
+
margin-left: var(--spacing-xxs);
|
|
4
|
+
`,u=o.span`
|
|
5
|
+
color: var(--color-warm-grey-8);
|
|
6
|
+
line-height: var(--line-height-base);
|
|
7
|
+
`,f=o.span`
|
|
8
|
+
display: inline;
|
|
9
|
+
padding: 0 var(--spacing-xxs);
|
|
10
|
+
`,v=o.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--spacing-xxs);
|
|
14
|
+
`,p=o.span`
|
|
15
|
+
color: var(--text-color-description);
|
|
16
|
+
line-height: var(--line-height-base);
|
|
17
|
+
`;export{j as RequiredScopes};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentType, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { SecurityRequirement } from '../../models/index.js';
|
|
3
|
+
import type { OAuth2Flows } from '../../types/index.js';
|
|
4
|
+
interface RequiredScopesListProps {
|
|
5
|
+
schemeId: string;
|
|
6
|
+
securities: SecurityRequirement[];
|
|
7
|
+
flows?: OAuth2Flows;
|
|
8
|
+
TagComponent?: ComponentType<{
|
|
9
|
+
className?: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export declare function RequiredScopesList({ schemeId, securities, flows, TagComponent, }: RequiredScopesListProps): ReactElement | null;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{jsx as r,Fragment as g,jsxs as u}from"react/jsx-runtime";import{SecuritySchemeItem as s}from"./SecuritySchemeItem.js";import{useTranslate as f}from"../../hooks/index.js";import{getRequiredScopes as S}from"./helper.js";import{normalizeScopes as b,buildScopeDescriptionIndex as v}from"../../utils/security-scope.js";import{ScopeTagWithTooltip as x}from"./ScopeTagWithTooltip.js";import{Tag as h}from"./styled.js";import{Markdown as y}from"../Markdown/index.js";import{styled as i}from"../../styled-components.js";const T=24;function A({schemeId:n,securities:m,flows:o,TagComponent:c=q}){const p=f(),l=S(n,m),t=b(l);if(t.length===0)return null;const a=o?v(o):null,d=!!a;return u(g,{children:[r(s,{label:p("openapi.requiredScopes","Required scopes"),value:" "}),t.map(e=>r(s,{label:r(x,{className:"tag-grey",text:e,maxChars:T,TagComponent:c,compact:!0}),value:d?r(_,{children:r(y,{source:a?.get(e)||""})}):" "},e))]})}const _=i.div`
|
|
2
|
+
p {
|
|
3
|
+
margin-bottom: 0;
|
|
4
|
+
}
|
|
5
|
+
`,q=i(h)`
|
|
6
|
+
font-family: var(--font-family-base);
|
|
7
|
+
font-size: var(--font-size-base);
|
|
8
|
+
align-self: flex-start;
|
|
9
|
+
padding: 0 var(--spacing-xs);
|
|
10
|
+
border: var(--tag-border-width) var(--tag-border-style) var(--tag-bg-color);
|
|
11
|
+
border-radius: var(--tag-border-radius);
|
|
12
|
+
color: var(--color-warm-grey-8);
|
|
13
|
+
`;export{A as RequiredScopesList};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentType, ReactElement, ReactNode } from 'react';
|
|
2
|
+
type TagComponentProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
interface ScopeTagWithTooltipProps {
|
|
7
|
+
className?: string;
|
|
8
|
+
text: string;
|
|
9
|
+
maxChars?: number;
|
|
10
|
+
tip?: string | ReactNode;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
TagComponent?: ComponentType<TagComponentProps>;
|
|
13
|
+
arrowPosition?: 'top' | 'bottom' | 'left' | 'right' | 'center';
|
|
14
|
+
compact?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function ScopeTagWithTooltip({ className, text, maxChars, tip, ariaLabel, TagComponent, arrowPosition, compact, }: ScopeTagWithTooltipProps): ReactElement;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{css as l}from"styled-components";import{Tooltip as h}from"@redocly/theme/components/Tooltip/Tooltip";import{styled as a}from"../../styled-components.js";import{getVisibleScopeLabel as b,isScopeTruncated as v}from"../../utils/security-scope.js";import{Tag as g}from"./styled.js";function k({className:i,text:r,maxChars:n=32,tip:s,ariaLabel:f,TagComponent:t=g,arrowPosition:u="center",compact:o=!1}){const c=b(r,n),d=s===void 0&&v(r,n)?r:s;return d?e(m,{$compact:o,children:e(h,{placement:"bottom",arrowPosition:u,tip:d,children:e(T,{role:"button",tabIndex:0,"aria-label":f??r,children:e(t,{className:i,children:e(p,{$compact:o,children:c})})})})}):e(m,{$compact:o,children:e(t,{className:i,children:e(p,{$compact:o,children:c})})})}const p=a.span`
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
font-family: var(--font-family-base);
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
text-overflow: ellipsis;
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
max-width: 16rem;
|
|
8
|
+
color: var(--color-warm-grey-8);
|
|
9
|
+
${({$compact:i})=>!i&&l`
|
|
10
|
+
&&& {
|
|
11
|
+
font-size: var(--font-size-sm);
|
|
12
|
+
}
|
|
13
|
+
`}
|
|
14
|
+
`,T=a.span`
|
|
15
|
+
cursor: default;
|
|
16
|
+
|
|
17
|
+
&:focus-visible {
|
|
18
|
+
outline: 1px solid var(--link-color-primary);
|
|
19
|
+
border-radius: var(--border-radius-md);
|
|
20
|
+
}
|
|
21
|
+
`,m=a.span`
|
|
22
|
+
display: inline-block;
|
|
23
|
+
vertical-align: baseline;
|
|
24
|
+
line-height: var(--line-height-base);
|
|
25
|
+
${({$compact:i})=>i?l`
|
|
26
|
+
margin: 0;
|
|
27
|
+
`:l`
|
|
28
|
+
margin: calc(var(--spacing-unit) / 2) var(--spacing-xxs) calc(var(--spacing-unit) / 2) 0;
|
|
29
|
+
&:last-child {
|
|
30
|
+
margin-right: 0;
|
|
31
|
+
}
|
|
32
|
+
`}
|
|
33
|
+
`;export{k as ScopeTagWithTooltip};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
${({deprecated:a})=>a&&
|
|
3
|
-
display: flex;
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{Fragment as d}from"react";import{SecurityIcon as v}from"@redocly/theme/icons/SecurityIcon/SecurityIcon";import{Panel as u}from"@redocly/theme/components/Panel/Panel";import{Button as b}from"@redocly/theme/components/Button/Button";import{Tooltip as y}from"@redocly/theme/components/Tooltip/Tooltip";import{WarningFilledIcon as x}from"@redocly/theme/icons/WarningFilledIcon/WarningFilledIcon";import{useTranslate as w}from"../../hooks/index.js";import{styled as r}from"../../styled-components.js";import{deprecatedCss as S}from"../common/index.js";import{RequiredScopes as j}from"./RequiredScopes.js";function W({securities:a,onClick:m}){const o=w();return e(T,{header:()=>i(B,{children:[e(v,{}),e(D,{children:o("openapi.security","Security")}),e(C,{onClick:m,variant:"link",children:o("openapi.viewSecurityDetails","View details")})]}),isExpandable:!1,children:e(H,{children:a.map((t,n)=>{const s=a.length>1&&t.schemes.length>1,h=t.schemes.map(({id:l,scopes:g,deprecated:c=!1},f)=>i(d,{children:[i(k,{deprecated:c,children:[l,c&&e(y,{tip:o("openapi.badges.deprecated","Deprecated"),children:e(x,{color:"var(--badge-deprecated-bg-color)"})})]}),e(j,{scopes:g}),f<t.schemes.length-1&&e(p,{children:" and "})]},l));return i(d,{children:[s?"(":"",h,s?")":"",n<a.length-1&&e(p,{children:" or "})]},n)})})})}const k=r.span`
|
|
2
|
+
${({deprecated:a})=>a&&S}
|
|
3
|
+
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
gap: var(--spacing-xxs);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
`,j=e(u)`
|
|
6
|
+
font-weight: var(--font-weight-medium);
|
|
7
|
+
`,T=r(u)`
|
|
9
8
|
margin-top: var(--spacing-base);
|
|
10
9
|
border: var(--panel-border);
|
|
11
10
|
border-radius: var(--panel-border-radius);
|
|
12
|
-
`,
|
|
11
|
+
`,B=r.div`
|
|
13
12
|
display: flex;
|
|
14
13
|
align-items: center;
|
|
15
14
|
justify-content: space-between;
|
|
@@ -19,19 +18,20 @@ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{Fragment as d}from"reac
|
|
|
19
18
|
background-color: var(--layer-color);
|
|
20
19
|
border-bottom: var(--panel-border);
|
|
21
20
|
border-radius: var(--panel-border-radius) var(--panel-border-radius) 0 0;
|
|
22
|
-
`,
|
|
21
|
+
`,C=r(b)`
|
|
23
22
|
margin-left: auto;
|
|
24
23
|
font-size: var(--font-size-sm);
|
|
25
|
-
`,
|
|
24
|
+
`,D=r.span`
|
|
26
25
|
font-family: var(--font-family-base);
|
|
27
26
|
font-weight: var(--font-weight-medium);
|
|
28
27
|
color: var(--text-color-primary);
|
|
29
|
-
`,
|
|
30
|
-
|
|
31
|
-
text-overflow: ellipsis;
|
|
28
|
+
`,H=r.div`
|
|
29
|
+
display: block;
|
|
32
30
|
overflow: hidden;
|
|
33
31
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
34
32
|
color: var(--text-color-primary);
|
|
35
|
-
|
|
33
|
+
line-height: var(--line-height-base);
|
|
34
|
+
`,p=r.span`
|
|
36
35
|
color: var(--text-color-description);
|
|
37
|
-
|
|
36
|
+
line-height: var(--line-height-base);
|
|
37
|
+
`;export{W as SecurityButton};
|
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
import{jsx as e,
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as p}from"react/jsx-runtime";import{Badge as z}from"@redocly/theme/components/Badge/Badge";import{SecuritySchemeItem as n}from"./SecuritySchemeItem.js";import{titleize as A}from"../../utils/index.js";import{OAuthFlow as L}from"./OAuthFlow.js";import{StyledLink as v,Tag as O}from"./styled.js";import{Markdown as _}from"../Markdown/index.js";import{useTranslate as w}from"../../hooks/index.js";import{OAuthScopes as b}from"./OAuthScopes.js";import{styled as o}from"../../styled-components.js";import{RequiredScopesList as g}from"./RequiredScopesList.js";const j=["authorizationCode","clientCredentials","implicit","password","deviceAuthorization"];function k({flowType:l,flow:m,schemeId:h,securities:a}){const c=w();return r(p,{children:[e(n,{label:r(H,{className:"tag-grey",children:[e(N,{children:c("openapi.flowType","Flow type")})," ",e(P,{children:l})]}),value:e("span",{})}),r(C,{children:[e(L,{flow:m}),e(b,{id:h,securities:a,flow:m})]})]})}function V({type:l,bearerFormat:m,name:h,flows:a,openIdConnectUrl:c,description:y,id:t,securities:s,in:x,deprecated:T=!1,oauth2MetadataUrl:f}){const i=w();if(!l||!t)return null;const F={http:r(p,{children:[e(n,{label:i("openapi.httpAuthorizationScheme","HTTP Authorization Scheme"),value:l}),e(n,{label:i("openapi.bearerFormat","Bearer Format"),value:m}),e(g,{schemeId:t,securities:s,flows:a})]}),apiKey:r(p,{children:[e(n,{label:`${A(x||"")} ${i("openapi.parameterName","parameter name")}:`,value:h}),e(g,{schemeId:t,securities:s,flows:a})]}),oauth2:r(p,{children:[a&&Object.entries(a).filter(d=>{const[u,S]=d;return!!S&&j.includes(u)}).map(([d,u])=>e(k,{flowType:d,flow:u,schemeId:t,securities:s},d)),e(b,{id:t,securities:s,flows:a})]}),openIdConnect:r(p,{children:[e(n,{label:i("openapi.connectUrl","Connect URL"),value:c&&e(v,{target:"_blank",rel:"noopener noreferrer",href:c,children:c})}),e(g,{schemeId:t,securities:s,flows:a})]})};return r(W,{children:[r(I,{children:[e(R,{children:t}),T&&e(z,{deprecated:!0,children:i("openapi.badges.deprecated","Deprecated")})]}),e(_,{source:y}),f&&e(n,{label:i("openapi.oauth2MetadataUrl","OAuth2 Metadata URL"),value:e(v,{target:"_blank",rel:"noopener noreferrer",href:f,children:f})}),e(B,{children:F[l]||null})]})}const I=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: var(--spacing-xxs);
|
|
5
5
|
margin: 0 0 var(--spacing-xs);
|
|
6
|
-
`,
|
|
6
|
+
`,W=o.div`
|
|
7
7
|
background: var(--layer-color);
|
|
8
8
|
padding: var(--spacing-base);
|
|
9
9
|
border-radius: var(--border-radius);
|
|
10
10
|
border: 1px solid var(--border-color-secondary);
|
|
11
11
|
width: 100%;
|
|
12
12
|
margin-top: var(--spacing-base);
|
|
13
|
-
`,
|
|
13
|
+
`,B=o.div`
|
|
14
14
|
width: 100%;
|
|
15
15
|
margin-top: var(--spacing-md);
|
|
16
|
-
`,
|
|
16
|
+
`,R=o.p`
|
|
17
17
|
font-size: var(--font-size-base);
|
|
18
18
|
margin: 0;
|
|
19
19
|
text-transform: capitalize;
|
|
20
20
|
font-weight: var(--font-weight-semibold);
|
|
21
|
-
|
|
21
|
+
`,C=o.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
padding-left: var(--spacing-xs);
|
|
25
|
+
margin-bottom: var(--spacing-xxs);
|
|
26
|
+
`,H=o(O)`
|
|
27
|
+
color: var(--color-warm-grey-8);
|
|
28
|
+
font-family: var(--font-family-base);
|
|
29
|
+
`,N=o.span`
|
|
30
|
+
font-weight: var(--font-weight-regular);
|
|
31
|
+
`,P=o.span`
|
|
32
|
+
color: var(--color-warm-grey-11);
|
|
33
|
+
font-weight: var(--font-weight-medium);
|
|
34
|
+
`;export{V as SecurityFlow};
|
|
@@ -1,59 +1,72 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as n}from"react/jsx-runtime";import{memo as x,useCallback as S}from"react";import{useNavigate as b}from"react-router-dom";import{useAtomValue as y}from"jotai";import{LayoutVariant as T}from"@redocly/config";import{Markdown as m}from"@redocly/theme/components/Markdown/Markdown";import{breakpoints as r}from"@redocly/theme/core/openapi";import{Button as W}from"@redocly/theme/components/Button/Button";import{PageActions as M}from"@redocly/theme/components/PageActions/PageActions";import{H2 as z}from"@redocly/theme/components/Typography/H2";import{LinkIcon as j}from"@redocly/theme/icons/LinkIcon/LinkIcon";import{joinWithSeparator as C}from"../../services/history/helpers.js";import{Row as I,SamplesMiddlePanel as f,SamplesPanel as u,ShareLink as P}from"../common/index.js";import{Markdown as A}from"../Markdown/index.js";import{OperationsNavigation as L}from"./OperationsNavigation.js";import{layoutAtom as B}from"../../jotai/app.js";import{useTranslate as H}from"../../hooks/index.js";import{styled as e}from"../../styled-components.js";import{StyledShareLink as D}from"../common/linkify.js";function N({item:a,routingBasePath:i="",isExpanded:s}){const v=H(),{description:w,name:g,href:$}=a,c=b(),h=y(B),o=C(i,a.href),k=S(()=>{c(o)},[c,o]),d=!!a.items.length,l=h===T.STACKED,p=!d;return n(V,{expanded:s,children:[n(I,{layout:h,children:[n(_,{fullWidth:p,isStacked:l,children:[n(E,{fullWidth:p,isStacked:l,children:[n(K,{children:[t(P,{to:$,"aria-label":`link to ${g}`}),g]}),t(M,{pageSlug:o})]}),t(F,{fullWidth:p,isStacked:l,children:t(A,{source:w})})]}),d&&t(L,{items:a.items,routingBasePath:i})]}),d&&!s&&n(O,{type:"button",variant:"text",size:"medium",onClick:k,children:["+ ",v("openapi.actions.show","Show")]})]})}const ma=x(N),V=e.div`
|
|
2
2
|
padding-top: var(--spacing-lg);
|
|
3
3
|
padding-bottom: ${({expanded:a})=>a?"var(--spacing-xxl)":""};
|
|
4
|
+
`,_=e(f)`
|
|
5
|
+
@media screen and (min-width: ${r.large}) {
|
|
6
|
+
padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"0":void 0};
|
|
7
|
+
padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"0":void 0};
|
|
8
|
+
}
|
|
9
|
+
`,E=e.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: flex-start;
|
|
12
|
+
margin: var(--h2-margin-top) 0 var(--h2-margin-bottom);
|
|
13
|
+
|
|
14
|
+
@media screen and (min-width: ${r.large}) {
|
|
15
|
+
padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(var(--panel-gap-horizontal) * 2)":void 0};
|
|
16
|
+
padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"var(--panel-gap-horizontal)":void 0};
|
|
17
|
+
width: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(100% - var(--panel-samples-width))":void 0};
|
|
4
18
|
|
|
19
|
+
${D} {
|
|
20
|
+
left: ${({fullWidth:a,isStacked:i})=>a&&!i?"unset":void 0};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
`,F=e.div`
|
|
5
24
|
/*
|
|
6
25
|
Markdoc components inside markdown that use SamplesPanel should not have padding.
|
|
7
26
|
E.g. SchemaDefinition, McpTool
|
|
8
27
|
padding is added by the TagItem itself
|
|
9
28
|
*/
|
|
10
|
-
${
|
|
11
|
-
padding-right: 0;
|
|
29
|
+
${m} ${u} {
|
|
12
30
|
padding-left: 0;
|
|
31
|
+
padding-right: 0;
|
|
13
32
|
}
|
|
14
33
|
|
|
15
|
-
${
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
${p} ${m} {
|
|
22
|
-
padding-left: calc(var(--panel-gap-horizontal) * 2);
|
|
23
|
-
padding-right: var(--panel-gap-horizontal);
|
|
24
|
-
}
|
|
34
|
+
@media screen and (min-width: ${r.large}) {
|
|
35
|
+
${m} ${f} {
|
|
36
|
+
padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(var(--panel-gap-horizontal) * 2)":void 0};
|
|
37
|
+
padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"var(--panel-gap-horizontal)":void 0};
|
|
38
|
+
}
|
|
25
39
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
40
|
+
${m} .schema-definition ${u} {
|
|
41
|
+
padding-left: ${({fullWidth:a,isStacked:i})=>a&&!i?"var(--panel-gap-horizontal)":void 0};
|
|
42
|
+
padding-right: ${({fullWidth:a,isStacked:i})=>a&&!i?"calc(var(--panel-gap-horizontal) * 2)":void 0};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`,K=e(z)`
|
|
46
|
+
position: relative;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: var(--spacing-xs);
|
|
50
|
+
flex-wrap: wrap;
|
|
51
|
+
overflow-wrap: anywhere;
|
|
52
|
+
word-break: break-word;
|
|
53
|
+
margin: 0;
|
|
30
54
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
`}
|
|
40
|
-
`,O=l(C)`
|
|
55
|
+
:hover {
|
|
56
|
+
${j} {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
visibility: visible;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
`,O=e(W)`
|
|
41
62
|
margin: var(--spacing-md) var(--spacing-xl) var(--spacing-xxs);
|
|
42
63
|
width: calc(100% - var(--spacing-xl) * 2);
|
|
43
64
|
|
|
44
|
-
@media screen and (min-width: ${
|
|
65
|
+
@media screen and (min-width: ${r.medium}) {
|
|
45
66
|
--button-margin-md: calc(var(--spacing-xl) * 2);
|
|
46
67
|
|
|
47
68
|
margin-left: var(--button-margin-md);
|
|
48
69
|
margin-right: var(--button-margin-md);
|
|
49
70
|
width: calc(100% - var(--button-margin-md) * 2);
|
|
50
71
|
}
|
|
51
|
-
|
|
52
|
-
display: flex;
|
|
53
|
-
:hover {
|
|
54
|
-
${L} {
|
|
55
|
-
opacity: 1;
|
|
56
|
-
visibility: visible;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`;export{da as TagItem,E as TagItemComponent};
|
|
72
|
+
`;export{ma as TagItem,N as TagItemComponent};
|