@redocly/openapi-docs 3.15.0-rc.6 → 3.16.0-custom.3
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 +4285 -3373
- package/lib/components/Discriminator/DefaultMappingOption.d.ts +5 -0
- package/lib/components/Discriminator/DefaultMappingOption.js +15 -0
- package/lib/components/Discriminator/Discriminator.js +16 -2
- package/lib/components/Download/DownloadSpecification.js +2 -2
- package/lib/components/ExpandAllButton/ExpandAllButton.js +1 -1
- package/lib/components/Language/LanguageList.js +1 -1
- package/lib/components/PanelItem/styled.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- 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/components/Replay/EmbeddedReplay.d.ts +2 -1
- package/lib/components/Replay/EmbeddedReplay.js +3 -3
- package/lib/components/Replay/Replay.js +1 -1
- package/lib/components/Replay/utils.js +1 -1
- package/lib/components/RequestSamples/Example.js +1 -1
- package/lib/components/RequestSamples/RequestSamples.js +1 -1
- package/lib/components/Samples/ExampleSwitch.js +1 -1
- package/lib/components/SchemaCatalogLink/tests/SchemaCatalogLink.test.js +1 -1
- package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
- package/lib/components/TagItem/OperationNavigationItems.js +4 -4
- package/lib/components/TagItem/OperationsNavigation.js +2 -2
- package/lib/components/common/Dropdown/Dropdown.d.ts +3 -3
- package/lib/components/common/Dropdown/Dropdown.js +9 -9
- package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +2 -2
- package/lib/components/common/SchemaSelection/SchemaSelection.js +1 -1
- package/lib/hooks/index.d.ts +1 -1
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useRouter.js +1 -1
- package/lib/icons/DefaultMappingIcon/DefaultMappingIcon.d.ts +4 -0
- package/lib/icons/DefaultMappingIcon/DefaultMappingIcon.js +8 -0
- package/lib/icons/DefaultMappingIcon/index.d.ts +1 -0
- package/lib/icons/DefaultMappingIcon/index.js +1 -0
- package/lib/models/group.js +1 -1
- package/lib/models/mediaType.js +1 -1
- package/lib/models/operation.js +1 -1
- package/lib/models/schema.d.ts +2 -1
- package/lib/models/schema.js +2 -2
- package/lib/models/types.d.ts +5 -0
- package/lib/services/OpenAPIParser.js +1 -1
- package/lib/services/menu/builder.js +1 -1
- package/lib/services/menu/operation.js +1 -1
- package/lib/services/menu/tags.d.ts +1 -0
- package/lib/services/menu/tags.js +3 -3
- package/lib/services/types.d.ts +3 -0
- package/lib/standalone.js +1 -1
- package/lib/types/open-api.d.ts +4 -0
- package/lib/utils/configure-helpers.d.ts +2 -2
- package/lib/utils/configure-helpers.js +1 -1
- package/lib/utils/loadAndBundleSpec.js +1 -1
- package/lib/utils/mcp.d.ts +1 -1
- package/lib/utils/mcp.js +1 -1
- package/package.json +17 -12
- package/lib/components/RedoclyOpenAPIDocs/Error.d.ts +0 -3
- package/lib/components/RedoclyOpenAPIDocs/Error.js +0 -25
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{jsx as e,jsxs as p}from"react/jsx-runtime";import{Tooltip as o}from"@redocly/theme/components/Tooltip/Tooltip";import{DefaultMappingIcon as r}from"../../icons/DefaultMappingIcon/DefaultMappingIcon.js";import{useTranslate as a}from"../../hooks/index.js";import{styled as i}from"../../styled-components.js";function g({label:t}){const n=a();return e(o,{tip:n("openapi.discriminator.defaultMappingTooltip","OpenAPI 3.2: defaultMapping used when other mappings don't match."),placement:"bottom",children:p(s,{children:[e(l,{children:e(r,{})}),e(m,{children:t})]})})}const s=i.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 4px;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
`,l=i.div`
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
`,m=i.span`
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
min-width: 0;
|
|
15
|
+
`;export{g as DefaultMappingOption};
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n,jsxs as s}from"react/jsx-runtime";import{memo as c,useMemo as d}from"react";import{strikethroughText as f}from"../../utils/index.js";import{SchemaSelection as g}from"../common/SchemaSelection/SchemaSelection.js";import{SelectionTitle as u}from"../common/index.js";import{styled as t}from"../../styled-components.js";import{DefaultMappingOption as x}from"./DefaultMappingOption.js";function D({activeOneOfIdx:a,parent:e,onChange:p,translate:i}){const m=d(()=>(e.oneOf||[]).map((o,r)=>{const l=o.schema.deprecated?`${f(o.title)} (${i("openapi.badges.deprecated","deprecated").toLowerCase()})`:o.title;return o.isDefaultMapping?{label:i("openapi.discriminator.defaultMapping","Default mapping"),value:r,element:n(x,{label:i("openapi.discriminator.defaultMapping","Default mapping")}),...e.oneOf&&e.oneOf.length>1?{divider:n(v,{})}:{}}:{label:l,value:r}}),[e.oneOf,i]);return e.oneOf===void 0?null:s(h,{children:[n(u,{children:i("openapi.discriminator","Discriminator")}),n(g,{options:m,pointer:e.operationPointer,onChange:p,schema:e,defaultOneOfIdx:a})]})}const C=c(D),h=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: flex-start;
|
|
5
|
-
|
|
5
|
+
`,v=t.span`
|
|
6
|
+
background-color: var(--border-color-primary);
|
|
7
|
+
display: block;
|
|
8
|
+
align-self: stretch;
|
|
9
|
+
|
|
10
|
+
[data-component-name='Dropdown/DropdownMenu'] & {
|
|
11
|
+
height: 1px;
|
|
12
|
+
margin: calc(var(--spacing-xxs) / 2) var(--spacing-xxs);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[data-component-name='Segmented/Segmented'] & {
|
|
16
|
+
width: 1px;
|
|
17
|
+
margin: var(--spacing-xxs) calc(var(--spacing-xxs) / 2);
|
|
18
|
+
}
|
|
19
|
+
`;export{C as Discriminator};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,Fragment as d,jsxs as s}from"react/jsx-runtime";import{memo as p,useCallback as f}from"react";import{DownloadIcon as x}from"@redocly/theme/icons/DownloadIcon/DownloadIcon";import{getPathPrefix as g,combineUrls as w}from"@redocly/theme/core/openapi";import{Button as b}from"@redocly/theme/components/Button/Button";import{DocumentIcon as h}from"@redocly/theme/icons/DocumentIcon/DocumentIcon";import{JsonIcon as u}from"@redocly/theme/icons/JsonIcon/JsonIcon";import{FileIcon as v}from"@redocly/theme/icons/FileIcon/FileIcon";import{useTelemetry as y}from"../../hooks/index.js";import{styled as r}from"../../styled-components.js";function k({downloadObjects:t}){const l=y(),n=g(),c=f(o=>{switch(o){case"yaml":return e(h,{});case"json":return e(u,{});default:return e(v,{})}},[]);return t?e(C,{children:(t||[]).map(({title:o,url:a,iconType:m})=>{const i=n?w(n,a):a;return s(
|
|
1
|
+
import{jsx as e,Fragment as d,jsxs as s}from"react/jsx-runtime";import{memo as p,useCallback as f}from"react";import{DownloadIcon as x}from"@redocly/theme/icons/DownloadIcon/DownloadIcon";import{getPathPrefix as g,combineUrls as w}from"@redocly/theme/core/openapi";import{Button as b}from"@redocly/theme/components/Button/Button";import{DocumentIcon as h}from"@redocly/theme/icons/DocumentIcon/DocumentIcon";import{JsonIcon as u}from"@redocly/theme/icons/JsonIcon/JsonIcon";import{FileIcon as v}from"@redocly/theme/icons/FileIcon/FileIcon";import{useTelemetry as y}from"../../hooks/index.js";import{styled as r}from"../../styled-components.js";function k({downloadObjects:t}){const l=y(),n=g(),c=f(o=>{switch(o){case"yaml":return e(h,{});case"json":return e(u,{});default:return e(v,{})}},[]);return t?e(C,{children:(t||[]).map(({title:o,url:a,iconType:m})=>{const i=n?w(n,a):a;return s(j,{onClick:()=>{l.sendDownloadDefinitionClickedMessage()},children:[s(D,{children:[c(m),e("a",{href:i,target:"_blank",download:!0,rel:"noreferrer",children:o})]}),e("a",{href:i,target:"_blank",download:!0,rel:"noreferrer",children:e(b,{variant:"text",size:"small",icon:e(x,{})})})]},o)})}):e(d,{})}const N=p(k),j=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: baseline;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -10,7 +10,7 @@ import{jsx as e,Fragment as d,jsxs as s}from"react/jsx-runtime";import{memo as p
|
|
|
10
10
|
padding-bottom: 0px;
|
|
11
11
|
border-bottom: none;
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,D=r.span`
|
|
14
14
|
display: flex;
|
|
15
15
|
width: calc(100% - 25px);
|
|
16
16
|
gap: var(--spacing-xs);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import{useAtom as m}from"jotai";import{MaximizeIcon as d}from"@redocly/theme/icons/MaximizeIcon/MaximizeIcon";import{Button as c}from"@redocly/theme/components/Button/Button";import{operationStore as x}from"../../jotai/operation.js";import{useTelemetry as u,useTranslate as f}from"../../hooks/index.js";import{styled as A}from"../../styled-components.js";const k=({operationPointer:a,type:e,onPanelToggle:s})=>{const t=f(),[l,r]=m(x(a)),i=u(),p=()=>{const o=!l[e].expandedAll;i.
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{useAtom as m}from"jotai";import{MaximizeIcon as d}from"@redocly/theme/icons/MaximizeIcon/MaximizeIcon";import{Button as c}from"@redocly/theme/components/Button/Button";import{operationStore as x}from"../../jotai/operation.js";import{useTelemetry as u,useTranslate as f}from"../../hooks/index.js";import{styled as A}from"../../styled-components.js";const k=({operationPointer:a,type:e,onPanelToggle:s})=>{const t=f(),[l,r]=m(x(a)),i=u(),p=()=>{const o=!l[e].expandedAll;i.sendExpandCollapseAllClickedMessage({isExpanded:o}),r({[e]:{expandedAll:o}}),s?.(o,e==="request"?"request":"responses")};return n(g,{icon:n(d,{}),iconPosition:"right",size:"small",variant:"ghost",onClick:p,children:l[e].expandedAll?t("openapi.collapseAll","Collapse all"):t("openapi.expandAll","Expand all")})},g=A(c)`
|
|
2
2
|
margin-left: auto;
|
|
3
3
|
`;export{k as ExpandAllButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as I}from"react/jsx-runtime";import{useLayoutEffect as T,useRef as A,useState as L,useCallback as S,memo as j,useMemo as
|
|
1
|
+
import{jsx as a,jsxs as I}from"react/jsx-runtime";import{useLayoutEffect as T,useRef as A,useState as L,useCallback as S,memo as j,useMemo as E}from"react";import{useAtomValue as H,useSetAtom as V}from"jotai";import{Button as W}from"@redocly/theme/components/Button/Button";import{OverflowMenuVerticalIcon as v}from"@redocly/theme/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon";import{LanguageDropdown as D}from"./LanguageDropdown.js";import{languageAtom as R,layoutAtom as _}from"../../jotai/app.js";import{LanguageListContainer as M,LanguageListItem as O,Container as z}from"./styled.js";import{LanguageItem as G}from"./LanguageItem.js";import{DROPDOWN_TRIGGER_WIDTH as B,ITEM_WIDTH as w}from"./constants.js";import{LanguageListSkeleton as N}from"../common/Skeleton/LanguageListSkeleton.js";import{useTelemetry as P}from"../../hooks/index.js";function $({languages:o,activeLanguage:t}){const[n,i]=L([]),[s,l]=L([]),u=P(),f=A(null),g=H(_),h=V(R),p=e=>{u.sendSelectLanguageClickedMessage({language:e})},k=e=>{h(e),p(e)},C=e=>{const m=s.findIndex(r=>r.key===e);if(m!==-1){const r=[...s],c=[...n];y(c,r,m),i(c),l(r),p(e),h(e)}},d=S(()=>{const e=f?.current?.offsetWidth;if(!e)return;const{newVisibleItems:m,newHiddenItems:r}=q(e,[...o]),c=r.findIndex(b=>b.key===t);c!==-1&&y(m,r,c),i(m),l(r)},[t,o]);T(()=>(d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}),[g,t]);const x=E(()=>n.length>=5||s.length?"space-between":"start",[s.length,n.length]);return I(z,{ref:f,children:[I(M,{$justifyContent:x,children:[!n.length&&a(N,{}),n.map(e=>a(O,{onClick:()=>k(e.key),active:t===e.key,children:a(G,{item:e,withIcon:!0})},e.key))]}),s.length?a(D,{activeTab:t,samples:s,onChange:C,trigger:a(W,{icon:a(v,{}),variant:"text",style:{height:"100%"}}),withArrow:!1,withCheckmark:!1,width:156}):null]})}const se=j($);function q(o,t){let n=0;const i=[],s=[];return t.forEach((l,u)=>{const g=u===t.length-1&&s.length===0?0:B;o&&n+w+g<=o?(i.push(l),n+=w):s.push(l)}),{newVisibleItems:i,newHiddenItems:s}}function y(o,t,n){const i=o[o.length-1];i&&(o[o.length-1]=t[n],t[n]=i)}export{se as LanguageList};
|
|
@@ -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 +1 @@
|
|
|
1
|
-
import{jsx as d}from"react/jsx-runtime";import{memo as v,useCallback as
|
|
1
|
+
import{jsx as d}from"react/jsx-runtime";import{memo as v,useCallback as y,useEffect as g,useMemo as b}from"react";import S from"@markdoc/markdoc";import{LayoutVariant as M}from"@redocly/config";import{createStore as E,Provider as O}from"jotai";import{html as A}from"@redocly/theme/markdoc/tags/html";import{Heading as P}from"@redocly/theme/markdoc/components/Heading/Heading";import{normalizeOptions as N,OpenAPIParser as R}from"../../services/index.js";import{SchemaDefinition as T}from"../SchemaDefinition/index.js";import{McpTool as D,McpResource as j,McpPrompt as k}from"../McpTool/index.js";import{getMarkdownHeaderId as x}from"./utils.js";import{mergeInMockServer as C}from"../../models/operation.js";import{normalizeServers as H}from"../../utils/index.js";import{appStore as I,appStoreOverrideAtom as L,layoutAtom as l,allowedEnvironmentsAtom as V,environmentAtom as z,userClaimsAtom as _}from"../../jotai/app.js";import{mapObject as q}from"../../utils/object.js";import{getServerEnvName as B}from"../../utils/environments.js";import{globalStoreAtom as F}from"../../jotai/store.js";import{getDefaultOperationStore as W,operationStore as h}from"../../jotai/operation.js";const G={ignoreNamedSchemas:["java.io.ObjectStreamField"],maxDisplayedEnumValues:10,markdocOptions:{tags:{html:A.schema,schemaDefinition:{render:"SchemaDefinition",attributes:{schemaRef:{type:String},exampleRef:{type:String},showReadOnly:{type:Boolean},showWriteOnly:{type:Boolean},htmlWrap:{type:String,default:!1}}},mcpTool:{render:"McpTool",attributes:{name:{type:String},id:{type:String}}},mcpResource:{render:"McpResource",attributes:{name:{type:String},id:{type:String}}},mcpPrompt:{render:"McpPrompt",attributes:{name:{type:String},id:{type:String}}}},nodes:{heading:{children:["inline"],attributes:{id:{type:String},level:{type:Number,required:!0,default:1}},transform(n,m){const t=n.transformAttributes(m),i=n.transformChildren(m),e=typeof t.id=="string"?t.id:x(i);return new S.Tag("Heading",{...t,id:e,level:n.attributes.level},i)}}},components:{SchemaDefinition:T,McpTool:D,McpResource:j,McpPrompt:k,Heading:P}}},pe=v(({children:n,options:m,definitionUrl:t,definition:i,withState:e})=>{const p=y(()=>{const r=N(m,G),o=new R(i,t,r);return{options:r,parser:o}},[i,t,m]),a=b(()=>{const r=E(),o=p();r.set(F,o);const c=H(o.parser.definitionUrl,C(o.parser.definition?.servers||[],o.options.mockServer));r.sub(I,()=>{}),r.set(l,e?.layout||o.options?.layout||M.THREE_PANEL);const u=Object.fromEntries(c.map(s=>[B(s),{server:s.url,...q(s.variables||{},f=>f.default||"")}]));if(r.set(z,{environments:u}),r.set(_,e?.userClaims||{}),r.set(V,e?.allowedEnvironments),e&&r.set(L,{activeMimeName:e.activeMimeName,userClaims:e.userClaims,environment:e.environment,environments:e.environments}),e?.operation){const s=W(e.operation.pointer,e.operation.state.requestValues,e.operation.state.activeExampleName);r.set(h(e.operation.pointer),s)}return r},[p,e]);return g(()=>{e?.layout&&a.set(l,e?.layout)},[a,e?.layout]),d(O,{store:a,children:n})});export{pe as StoreProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as s,Fragment as C}from"react/jsx-runtime";import{memo as O,useRef as T,useEffect as w}from"react";import{LayoutVariant as d}from"@redocly/config";import{useSetAtom as A}from"jotai";import{ThreePanelLayout as I}from"@redocly/theme/layouts/ThreePanelLayout";import{SidebarLogo as j}from"@redocly/theme/components/SidebarLogo/SidebarLogo";import{GlobalStyle as M,useMount as N}from"@redocly/theme/core/openapi";import{StoreProvider as _}from"./Providers.js";import{Overlay as D}from"../Overlay.js";import{RedocWrap as V}from"./styled.js";import{StickyResponsiveSidebar as k}from"../StickySidebar/index.js";import{SideMenu as v}from"../SideMenu/index.js";import{Content as B}from"../Content/index.js";import{useContentItems as K,useUppercase2LowercaseRedirect as F,useTelemetry as H,usePerformanceMetrics as U}from"../../hooks/index.js";import{withRouter as Y}from"../../hoc/withRouter.js";import{withStore as G}from"../../hoc/withStore.js";import{compose as W}from"../../utils/index.js";import{useLicense as q}from"../../hooks/useLicense.js";import{allOperationsAtom as z}from"../../jotai/replay.js";const J=W(Y,G,O)(({licenseKey:m,onLoaded:a,children:e,options:o,layout:i,collapsedSidebar:u,parser:c,withCommonStyles:g})=>{const R=T(null),{isValid:l,licenseInfo:S}=q(m),h=A(z),y=H();F();const{contentItems:b,flatItems:f}=K({parser:c,options:o});U({sendTelemetry:p=>{const r=Object.fromEntries(Object.entries(p).map(([E,x])=>[E.toLowerCase(),x]));y.sendPerformanceMetricsMessage({cls:r.cls,lcp:r.lcp,fcp:r.fcp,ttfb:r.ttfb})}}),w(()=>{if(!o.hideReplay&&f.length>0){const p=f.filter(r=>r.type==="operation");h(p)}},[f,o.hideReplay,h]),N(()=>{a?.(),y.sendViewedMessage({layout:i})});const{hideSidebar:P,scrollYOffset:L}=o||{},n=c.definition?.info?.["x-logo"];return s(C,{children:[g&&t(M,{}),s(V,{className:"redoc-wrap",ref:R,children:[!l&&t(D,{licenseInfo:S}),!P&&s(k,{scrollYOffset:L,className:"menu-content",collapsedSidebar:!u,children:[t(j,{imageUrl:n?.url,href:n?.href||c.definition?.info?.contact?.url,altText:n?.altText,backgroundColor:n?.backgroundColor}),t(v,{items:l?b:[]})]}),s(I,{className:"api-content",id:"api-content",layout:i===d.THREE_PANEL?d.THREE_PANEL:d.STACKED,collapsedSidebar:u,children:[t(B,{items:l?b:[],routingBasePath:o.routingBasePath}),e]})]})]})});function he({onLoaded:m,children:a,store:e,withCommonStyles:o,router:i}){return e?.definition?t(_,{...e,children:t(J,{onLoaded:m,basePath:e.options?.routingBasePath,licenseKey:e.options?.licenseKey,disableRouter:e.options?.disableRouter,withCommonStyles:o,router:i,children:a})}):null}export{he as RedoclyOpenAPIDocs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as u}from"react/jsx-runtime";import{cloneElement as w,isValidElement as x,useEffect as g,useMemo as A,useState as a}from"react";import{Loading as D}from"@redocly/theme/components/Loaders/Loading";import{useDeepCompareMemoize as L,fixSpec as O}from"./utils.js";import{argValueToBoolean as B}from"../../utils/index.js";import{RedoclyOpenAPIDocs as E}from"./RedoclyOpenAPIDocs.js";import{loadAndBundleDefinition as p,loadOpenapiConfig as C}from"../../utils/loadAndBundleSpec.js";async function I(e,o,t){let n;if(t?.skipBundle){if(!e)throw new Error('spec must be specified when using "skipBundleAndConvert"');n=e}else n=await p(e||o);try{O(n)}catch{}return n}function T(e,o){return e.endsWith(".md")?p({openapi:"3.0.0",info:{title:o||"",version:"1.0",description:{$ref:e}},paths:{}}):p(e)}const k=({options:e,definitionUrl:o,definition:t,activeSampleLanguage:n,children:r})=>{const[s,l]=a(),[h,f]=a(!0),[d,y]=a(null),[m,S]=a(e||{});g(()=>{async function v(){f(!0);try{const c=await C();S({...e,...c}),y(await I(t,o,e))}catch(c){l(c.message)}}v()},[t,o,e]);const i=A(()=>{if(d)return{definition:d,options:m,definitionUrl:o,activeSampleLanguage:n}},L([d,o,m]));return g(()=>{i&&f(!1)},[i]),s||!i?null:h?B(e?.hideLoading,!1)?null:u(D,{color:"--loading-spinner-color"}):x(r)?w(r,{store:i}):null};function W({definition:e,definitionUrl:o,options:t={},activeItemId:n,activeSampleLanguage:r,activeDeepLink:s,router:l}){return u(k,{definition:e,definitionUrl:o,options:t,activeItemId:n,activeSampleLanguage:r,activeDeepLink:s,children:u(E,{withCommonStyles:!0,router:l||"hash"})})}export{k as AppProvider,W as RedoclyOpenAPIDocsStandalone,T as loadAndBundleSpecOrMd,I 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};
|
|
@@ -29,6 +29,7 @@ export interface StoreProviderProps {
|
|
|
29
29
|
}
|
|
30
30
|
export interface AppProviderProps {
|
|
31
31
|
definitionUrl?: string;
|
|
32
|
+
disableTelemetry?: boolean;
|
|
32
33
|
definition?: GenericObject;
|
|
33
34
|
options?: RedocConfig;
|
|
34
35
|
activeItemId?: string;
|
|
@@ -41,9 +42,11 @@ export interface AppProviderProps {
|
|
|
41
42
|
export interface RedoclyOpenAPIDocsStandaloneProps {
|
|
42
43
|
definition?: GenericObject;
|
|
43
44
|
definitionUrl?: string;
|
|
45
|
+
disableTelemetry?: boolean;
|
|
44
46
|
options?: RedocConfig;
|
|
45
47
|
activeItemId?: string;
|
|
46
48
|
activeSampleLanguage?: CodeSampleConfig['lang'];
|
|
47
49
|
activeDeepLink?: string;
|
|
48
50
|
router?: 'hash' | 'history';
|
|
51
|
+
typeOfUsage?: 'html' | 'cli' | 'react' | 'docker';
|
|
49
52
|
}
|
|
@@ -4,7 +4,8 @@ export type ReplayProps = {
|
|
|
4
4
|
fullOpenApi: OpenAPIDefinition;
|
|
5
5
|
corsProxyUrl?: string;
|
|
6
6
|
pointer: string;
|
|
7
|
+
hideOtherSecuritySchemes?: boolean;
|
|
7
8
|
};
|
|
8
|
-
declare function EmbeddedReplayComponent({ activeOperationId, corsProxyUrl, fullOpenApi, pointer, }: ReplayProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function EmbeddedReplayComponent({ activeOperationId, corsProxyUrl, fullOpenApi, pointer, hideOtherSecuritySchemes, }: ReplayProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export declare const EmbeddedReplay: import("react").MemoExoticComponent<typeof EmbeddedReplayComponent>;
|
|
10
11
|
export {};
|
|
@@ -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 S,memo as x,useEffect as O,useState as R}from"react";import{useAtomValue as o}from"jotai";import{globalOptionsAtom as A}from"../../jotai/store.js";import{operationStore as C}from"../../jotai/operation.js";import{appStore as L,allowedEnvironmentsAtom as T,environmentsAtom as V}from"../../jotai/app.js";import{useTranslate as j}from"../../hooks/index.js";import{convertOperationToReplayValue as k}from"./utils.js";import{getDefaultCollectorUrl as w}from"../../utils/telemetry.js";import{styled as i}from"../../styled-components.js";const U=S(async()=>import("@redocly/replay").then(t=>({default:t.EmbeddedReplay})));function W({activeOperationId:t,corsProxyUrl:p,fullOpenApi:d,pointer:r,hideOtherSecuritySchemes:m}){const a=j(),{mockServer:s}=o(A),c=o(C(r)),f=o(L),u=o(V),n=o(T),[v,y]=R(!1);return O(()=>{y(!0)},[]),e(z,{children:v?e(h,{fallback:e(l,{children:a("openapi.loading","Loading...")}),children:e(U,{activeOperationId:t,activeOperationPointer:r,api:d,settings:{predefinedEnvValues:u,corsProxyUrl:p,mockServer:s,disableCollectionsTab:!0,hideOtherSecuritySchemes:m,...n&&{allowedEnvironments:n},telemetry:{tracerName:"replay-openapi",collectorUrl:w()},convertOperationToReplayValue:(g,b,E)=>k(g,b,E,void 0,c,f)}})}):e(l,{children:a("openapi.loading","Loading...")})})}const J=x(W),l=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{J as EmbeddedReplay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,Fragment as M,jsxs as z}from"react/jsx-runtime";import{lazy as J,memo as K,Suspense as W,useCallback as m,useRef as w,useState as H}from"react";import{useAtom as u,useAtomValue as p}from"jotai";import Q from"deepmerge";const X=J(async()=>import("@redocly/replay").then(e=>({default:e.ReplayOverlay})));import{Button as Y}from"@redocly/theme/components/Button/Button";import{useFocusTrap as Z,useModalScrollLock as $}from"@redocly/theme/core/openapi";import{RocketIcon as ee}from"@redocly/theme/icons/RocketIcon/RocketIcon";import{CircleDashIcon as te}from"@redocly/theme/icons/CircleDashIcon/CircleDashIcon";import{Portal as oe}from"@redocly/theme/components/Portal/Portal";import{useConfigureReplay as re}from"@redocly/theme/ext/
|
|
1
|
+
import{jsx as o,Fragment as M,jsxs as z}from"react/jsx-runtime";import{lazy as J,memo as K,Suspense as W,useCallback as m,useRef as w,useState as H}from"react";import{useAtom as u,useAtomValue as p}from"jotai";import Q from"deepmerge";const X=J(async()=>import("@redocly/replay").then(e=>({default:e.ReplayOverlay})));import{Button as Y}from"@redocly/theme/components/Button/Button";import{useFocusTrap as Z,useModalScrollLock as $}from"@redocly/theme/core/openapi";import{RocketIcon as ee}from"@redocly/theme/icons/RocketIcon/RocketIcon";import{CircleDashIcon as te}from"@redocly/theme/icons/CircleDashIcon/CircleDashIcon";import{Portal as oe}from"@redocly/theme/components/Portal/Portal";import{useConfigureReplay as re}from"@redocly/theme/ext/use-configure-replay";import{globalOptionsAtom as ne,globalStoreAtom as ae}from"../../jotai/store.js";import{allOperationsAtom as se,replayStateAtom as ie}from"../../jotai/replay.js";import{allOperations as le,getDefaultOperationStore as me}from"../../jotai/operation.js";import{LOADING_STATE as n}from"../../constants.js";import{environmentAtom as pe,userClaimsAtom as ce}from"../../jotai/app.js";import{convertOperationToReplayValueForRedoc as fe}from"./utils.js";import{useTranslate as ue,useTelemetry as de}from"../../hooks/index.js";import{JsonPointer as ye}from"../../utils/index.js";import{getDefaultCollectorUrl as he}from"../../utils/telemetry.js";import{createTryItOpenEvent as Oe,createTryItSentEvent as Ie}from"../../events/index.js";import{joinWithSeparator as Re}from"../../services/history/helpers.js";function ge({operation:e,corsProxyUrl:L,fullOpenApi:d}){const y=ue(),P=de(),h=w(null),{mockServer:q,oAuth2RedirectURI:E,routingBasePath:c}=p(ne),O=p(se),{parser:I,options:{events:a}}=p(ae),R=p(ce),[s,N]=H(!1),[l,g]=u(ie),[v,A]=u(le),[[,V],S]=u(pe),{config:j,refresh:T}=re({userClaims:R,info:I?.definition.info,operation:{name:e.name,path:e.path,operationId:e.operationId||"",href:e.href,method:e.httpVerb},servers:e.servers},s);Z(h),$(s);const x=m(()=>T(),[T]),k=m(({operations:t,environment:i,environments:f})=>{const _=t.reduce((C,r)=>{r.requestValues.body=r.requestValues.body instanceof URLSearchParams?Object.fromEntries(r.requestValues.body.entries()):r.requestValues.body;const{path:F,method:B}=r.apiPath,b=ye.compile(["paths",F,B]);return C[b]=Q(me(b),r),C},{});A({...v,..._}),S({environment:i,environments:f})},[v,A,S]),D=()=>{if(l!==n.LOADING){if(!s&&(P.sendTryItOpenedMessage(),a?.tryItOpen&&e)){const t=Oe({operation:e});a.tryItOpen(t)}N(!s)}l===n.NOT_LOADED&&g(n.LOADING)},G=m(t=>{if(a?.tryItSent&&e){const i=Ie({operation:e,isSuccess:t});a.tryItSent(i)}},[a,e]),U=m(t=>{if(!t)return;const i=O.find(f=>f.operationId===t);return Re(c,i?.href)},[O,c]);return d?z(M,{children:[o(Y,{onClick:D,variant:"primary",iconPosition:"left",icon:l===n.LOADING?o(te,{}):o(ee,{}),children:l===n.LOADING?y("openapi.loading","Loading..."):y("openapi.tryIt","Try it")}),s&&o(W,{children:o(oe,{mountId:"api-content",children:o("div",{ref:h,children:o(X,{activeOperationId:e.operationId||e.pointer,api:d,onRequestChange:k,onClose:D,onLoad:()=>g(n.LOADED),settings:{corsProxyUrl:L,mockServer:q,selectedEnvironment:V,apiId:I?.definition.info?.["x-metadata"]?.apiId,oAuth2RedirectURI:E,disableCollectionsTab:!0,storageKey:c,telemetry:{tracerName:"try-it",collectorUrl:he()},convertOperationToReplayValue:fe(R,j),getOperationUrl:U,onRequestReset:x},onRequestSent:G})})})})]}):null}const Me=K(ge);export{Me as Replay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isPrimitive as h}from"@redocly/theme/core/openapi";import{getOperation as v}from"../../models/index.js";import{normalizeOptions as b,OpenAPIParser as E}from"../../services/index.js";import{JsonPointer as
|
|
1
|
+
import{isPrimitive as h}from"@redocly/theme/core/openapi";import{getOperation as v}from"../../models/index.js";import{normalizeOptions as b,OpenAPIParser as E}from"../../services/index.js";import{JsonPointer as O}from"../../utils/index.js";function V(t,r,n,a,e,i,s){if(!n)return;const u=new E(n),o=u.definition.paths?.[t];let l=o?.[r];!l&&o?.additionalOperations&&(l=o.additionalOperations[r]);const m=v(u,{...l,pathName:t,httpVerb:r,pathParameters:o.parameters||[],pathServers:o.servers||[]},void 0,b({}),"",{isCallback:!1},a,s);if(!m)return;const x=i?.activeMimeName||m.requestBody?.content?.mediaTypes[0]?.name||"application/json";return{id:m.id,name:m.name,method:m.httpVerb,operationId:m.operationId,parameters:y(m.parameters,e?.requestValues),body:w(m.requestBody,n,e?.requestValues?.body?{activeExampleName:e?.activeExampleName,[x]:e?.requestValues?.body}:e?.activeExampleName?{activeExampleName:e?.activeExampleName}:void 0),path:m.path,href:m.href,servers:m.servers,security:q(m.security),responses:Object.fromEntries(m.responses.map(c=>[c.code,{code:c.code,description:c.description,mediaTypes:c.content?.mediaTypes.reduce((p,d)=>(p[d.name]={name:d.name,schema:f(d.schema?.rawSchema,n)},p),{})}]))}}function T(t,r){return function(n,a,e){const i=V(n,a,e,t,void 0,void 0,r);if(i)return{...i,operationId:i.operationId||O.compile(["paths",i.path,i.method])}}}function y(t,r){const n=new Set,a=t.map(e=>(n.add(e.in+":"+e.name),{name:e.name,in:e.in,required:e.required,description:e.description,example:r?.[String(e.in)]?.[e.name]||e.example,schema:e.schema}));for(const[e,i]of Object.entries(r||{}))for(const[s,u]of Object.entries(i||{}))n.has(e+":"+s)||a.push({name:s,in:e,required:!1,description:"",example:String(u),schema:void 0});return a}function N({type:t,format:r,enum:n}){return t==="string"&&(r==="binary"||r==="base64")?"file":t==="object"?"multiline":n.length>0?"select":"text"}function g(t,r){const n=t[0]?.example||t[0]?.examples;if(n)return n;if(t.schema?.example)return t.schema.example;const a=r?.default?.value||r?.default?.rawValue;return a?.[t.name]?h(a?.[t.name])?String(a?.[t.name]):JSON.stringify(a?.[t.name]):""}function w(t,r,n){if(!t||!t.content?.mediaTypes){if(!n)return;const{activeExampleName:a,...e}=n;return{activeExampleName:a,mediaTypes:Object.fromEntries(Object.entries(e).map(([i,s])=>[i,{name:i,examples:{default:{value:s}},schema:{},parameters:[]}]))}}return{required:t.required,activeExampleName:n?.activeExampleName,mediaTypes:t.content.mediaTypes.reduce((a,e)=>{const i=e.schema,s=n?.[e.name]?{default:{value:n?.[e.name],rawValue:n?.[e.name],mime:e.name}}:e.examples||e.formExamples;return a[e.name]={name:e.name,examples:s,schema:f(e.schema?.rawSchema,r),parameters:i?.fields?.map(u=>({inputType:N(u.schema),name:u.name,example:g(u,s)}))},a},{})}}function f(t,r){if(!(!t||!r))return{...t,components:r?.components||{}}}function q(t){if(t)return t.map(({schemes:r})=>r.map(n=>{const a={id:n.id,type:n.type,in:n.in,openIdConnectUrl:n.openIdConnectUrl,scopes:n.scopes,scheme:n.scheme,name:n.name,flows:n.flows,serverValues:n.serverValues,"x-defaultAccessToken":n["x-defaultAccessToken"],"x-defaultTokenType":n["x-defaultTokenType"],"x-defaultClientId":n["x-defaultClientId"],"x-defaultClientSecret":n["x-defaultClientSecret"],"x-defaultUsername":n["x-defaultUsername"],"x-defaultPassword":n["x-defaultPassword"]};return Object.keys(a).forEach(e=>a[e]===void 0&&delete a[e]),a}))}export{V as convertOperationToReplayValue,T as convertOperationToReplayValueForRedoc,q as convertRequestSecurity};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as c,Fragment as f,jsxs as h}from"react/jsx-runtime";import{memo as u}from"react";import{useAtom as E}from"jotai";import{ExampleSwitch as g,useExampleKey as O}from"../Samples/index.js";import{useActivateExample as
|
|
1
|
+
import{jsx as c,Fragment as f,jsxs as h}from"react/jsx-runtime";import{memo as u}from"react";import{useAtom as E}from"jotai";import{ExampleSwitch as g,useExampleKey as O}from"../Samples/index.js";import{useActivateExample as d,useTelemetry as j}from"../../hooks/index.js";import{operationStore as C}from"../../jotai/operation.js";function v({mediaType:o,mediaContent:r,renderSample:m}){const l=j(),n=o.operation.pointer,[p,x]=E(C(n)),a=o.examples||{},e=Object.keys(a),i=d(r),{exampleKey:s}=O(o.operation,a);return!e.length||e.length===1?m():h(f,{children:[c(g,{examples:a,exampleKey:s,onChange:t=>{l.sendExamplesSwitcherClickedMessage({exampleNumber:e.indexOf(t),totalExamples:e.length}),x({...p,activeExampleName:t,activeOneOf:{[n]:e.indexOf(t)},requestValues:{body:null}}),i(t)}}),m(s)]})}const F=u(v);export{F as Example};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as D}from"react/jsx-runtime";import{memo as T,useCallback as L,useMemo as k}from"react";import{useAtomValue as y,useAtom as U}from"jotai";import{PanelHeader as W}from"@redocly/theme/components/Panel/PanelHeader";import{PayloadSamples as B}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 V}from"../../events/index.js";import{globalStoreAtom as $}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 m=X(),[{activeLanguage:q,languages:c},R]=U(K),{samples:n}=H(a),{parser:d,options:{events:l,corsProxyUrl:g,hideReplay:E}}=y($),i=!P&&!a.isWebhook&&!E&&!a.hideReplay,t=!!c?.length,u=Q(n,q),j=e=>{R(e),m.sendSelectLanguageClickedMessage({language:e});const r=c?.find(s=>s.key===e);if(l?.codeSamplesLanguageSwitch&&r){const s=V({operation:a,sample:{lang:r.lang,label:r.title}});l.codeSamplesLanguageSwitch(s)}},h=y(J),{activeExampleName:C}=y(Y(a.pointer)),f=L(({lang:e,title:r})=>()=>{const s=_({operation:a,label:r,lang:e,type:"request",activeMimeName:h,activeExampleName:C});m.sendCopyCodeSnippetClickedMessage({snippetType:"request",language:e}),l?.codeSamplesCopy?.(s)},[a,m,l,h,C]),x=L(e=>{v?.(e,"request-samples")},[v]),b=()=>D(I,{isExpandable:!1,withReplay:!t&&i,children:[o(ee,{operation:a}),t&&o(G,{activeTab:u,samples:n,onChange:j}),!t&&i&&o(A,{operation:a,corsProxyUrl:g,fullOpenApi:d.definition})]}),M=k(()=>{if(i&&t)return o(ae,{children:o(A,{operation:a,corsProxyUrl:g,fullOpenApi:d.definition})})},[i,t,a,g,d.definition]),N=k(()=>n.map(e=>e.key===u?o("div",{children:O(e)?o(B,{content:e.requestBodyContent,onCopyClick:f(e),onPanelToggle:x,...p}):o(F,{lang:e.lang,source:e.source,externalSample:e,operation:a,onCopyClick:f(e),...p})},e.key+a.id):null),[u,f,x,a,p,n]);return c&&!n.length?o(w,{className:"panel-request-samples",header:b,isExpandable:!1,expanded:!1}):n.length?o(w,{className:"panel-request-samples",header:b,footer:M,isExpandable:!1,children:N}):null}const Ce=T(Z),I=S(W)`
|
|
2
2
|
flex-wrap: nowrap;
|
|
3
3
|
${({withReplay:a})=>a&&"padding: var(--spacing-xs) var(--spacing-sm);"}
|
|
4
4
|
`,ee=S(z)`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import{useState as d,useEffect as h}from"react";import{MimeLabel as x,Container as v,Select as S}from"../common/index.js";import{SelectOrLabel as b}from"../SelectOrLabel/index.js";import{normalizeText as g}from"../../utils/index.js";import{useTelemetry as
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{useState as d,useEffect as h}from"react";import{MimeLabel as x,Container as v,Select as S}from"../common/index.js";import{SelectOrLabel as b}from"../SelectOrLabel/index.js";import{normalizeText as g}from"../../utils/index.js";import{useTelemetry as C}from"../../hooks/index.js";const L=({exampleKey:a,examples:s,onChange:m,className:i})=>{const c=C(),r=Object.keys(s),t=a?r.indexOf(a):0,[u,l]=d(t>-1?t:0);h(()=>l(t>-1?t:0),[a,t]);const o=r.map((e,f)=>({value:g(s[e].summary)||e,idx:f})),p=({idx:e})=>{c.sendExamplesSwitcherClickedMessage({exampleNumber:e,totalExamples:r.length}),l(e),m(r[e])};return o.length<2?null:n(v,{"data-testid":"example-switch",className:i,children:n(b,{Select:S,Label:x,variant:"dark",fullWidth:!0,options:o,value:o[u]?.value,onChange:p})})};export{L as ExampleSwitch};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{render as s}from"@testing-library/react";import*as o from"jotai";import{SchemaCatalogLink as a}from"../SchemaCatalogLink";jest.mock("jotai",()=>({...jest.requireActual("jotai"),useAtomValue:jest.fn()})),describe("SchemaCatalogLink",()=>{it("should render correctly",()=>{jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{"x-schema-catalog-link":"/_bundle/test.yaml"}}});const e=s(t(a,{schemaRef:"#/components/schemas/test"}));expect(e.baseElement).toMatchSnapshot()}),it("should not render if x-schema-catalog-link is not defined",()=>{jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{}}});const e=s(t(a,{schemaRef:"#/components/schemas/test"}));expect(e.baseElement).toMatchSnapshot()})});
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{render as s,fireEvent as l}from"@testing-library/react";import*as o from"jotai";import{SchemaCatalogLink as a}from"../SchemaCatalogLink";jest.mock("jotai",()=>({...jest.requireActual("jotai"),useAtomValue:jest.fn()})),jest.mock("../../../utils/dom",()=>({...jest.requireActual("../../../utils/dom"),IS_BROWSER:!0})),describe("SchemaCatalogLink",()=>{beforeEach(()=>{jest.clearAllMocks(),jest.useFakeTimers(),Object.defineProperty(global,"navigator",{value:{clipboard:{writeText:jest.fn()}},writable:!0})}),afterEach(()=>{jest.useRealTimers()}),it("should render correctly",()=>{jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{"x-schema-catalog-link":"/_bundle/test.yaml"}}});const e=s(t(a,{schemaRef:"#/components/schemas/test"}));expect(e.baseElement).toMatchSnapshot()}),it("should not render if x-schema-catalog-link is not defined",()=>{jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{}}});const e=s(t(a,{schemaRef:"#/components/schemas/test"}));expect(e.baseElement).toMatchSnapshot()}),it("should render correctly on server",()=>{jest.mock("../../../utils/dom",()=>({...jest.requireActual("../../../utils/dom"),IS_BROWSER:jest.fn().mockReturnValue(!1)})),jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{"x-schema-catalog-link":"/_bundle/test.yaml"}}});const e=s(t(a,{schemaRef:"#/components/schemas/test"}));expect(e.baseElement).toMatchSnapshot()}),it("should copy link to clipboard when copy button is clicked",async()=>{jest.mock("../../../utils/dom",()=>({...jest.requireActual("../../../utils/dom"),IS_BROWSER:jest.fn().mockReturnValue(!0)})),jest.spyOn(o,"useAtomValue").mockReturnValue({parser:{definition:{"x-schema-catalog-link":"/_bundle/test.yaml"}}});const{getByRole:e,findByText:n}=s(t(a,{schemaRef:"#/components/schemas/test"})),c=e("button");l.click(c),expect(await n("Copied!")).toBeDefined()})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as e,jsxs as f}from"react/jsx-runtime";import{useMemo as S,useCallback as c}from"react";import{useAtom as g,useAtomValue as w}from"jotai";import{DropdownMenu as y}from"@redocly/theme/components/Dropdown/DropdownMenu";import{Dropdown as A}from"@redocly/theme/components/Dropdown/Dropdown";import{getOperationColor as C}from"@redocly/theme/core/openapi";import{HttpVerb as b}from"../common/index.js";import{PathWrapper as k,Path as P,StyledCopyButton as V,StyledDropdownMenuItem as j}from"./styled.js";import{PanelItem as x}from"../PanelItem/index.js";import{joinWithSeparator as D}from"../../services/index.js";import{getServerDisplayName as M,replaceVariables as E}from"../../utils/index.js";import{environmentAtom as N}from"../../jotai/app.js";import{useActiveWithFallback as O,useTelemetry as W}from"../../hooks/index.js";import{getServerEnvName as p}from"../../utils/environments.js";import{createTargetServerSwitchEvent as I}from"../../events/index.js";import{globalStoreAtom as T}from"../../jotai/store.js";const $=({operation:r,className:h})=>{const n=W(),[[d],m]=g(N),{options:{events:i}}=w(T),s=O(r.servers.map(t=>({...t,key:t.url})),d.server),a=c(t=>{t.stopPropagation()},[]),l=c(t=>()=>{if(r.servers.length!==1&&(m({environment:p(t)}),n.sendSwitchServersClickedMessage({server:p(t)}),i?.targetServerSwitch&&t)){const o=I({operation:r,serverUrl:t.url});i.targetServerSwitch(o)}},[r,m,n,i]),v=S(()=>r.servers.map(t=>{const o=D(E(t),r.path);return e(j,{onAction:l(t),children:e(x,{header:M(t),title:o,actions:[e(V,{data:o,toasterPlacement:"left",onCopyClick:a},o)],active:t.url===s,withCheckmark:!0})},o)}),[r.servers,r.path,l,a,s]),u=C({isAdditionalOperation:r.isAdditionalOperation,httpVerb:r.httpVerb});return e(A,{className:h,trigger:f(k,{variant:"ghost",children:[e(b,{color:u,children:r.httpVerb}),e(P,{children:r.path})]}),withArrow:!0,children:e(y,{children:v})})};export{$ as ServerListDropdown};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as
|
|
1
|
+
import{useMemo as b}from"react";import{useLocation as h}from"react-router-dom";import{useActiveSectionId as I}from"@redocly/theme/core/openapi";import{pathMatchedLink as k}from"../../../utils/index.js";import{DEFAULT_WEBHOOKS_TAG_NAME as A}from"../../../constants.js";import{joinWithSeparator as y}from"../../../services/history/helpers.js";function L({items:s,routingBasePath:r}){const t=h(),o=I(t,!1,!1);return b(()=>S(s,o,t,r),[o,s,t,r])}function S(s,r="",t,o){const n=[];return c({contentItems:s,sidebarItems:n,activeItemId:r,location:t,routingBasePath:o}),n}function d(s,r="",t,o){return s.href?r&&o?y(o,s.id)===r:r&&!o?s.id===r:k(t,s.href):!1}function l(s,r="",t,o){return(s.items||[]).some(i=>d(i,r,t,o)||l(i,r,t,o))}function c(s){const{contentItems:r,sidebarItems:t,activeItemId:o,location:n,routingBasePath:i}=s;let p=!0;for(const e of r){const a=d(e,o,n,i),m=l(e,o,n,i);switch(e.type){case"group":t.push({type:"separator",label:e.name,active:a,hasActiveSubItem:m}),c({...s,contentItems:e.items,sidebarItems:t});break;case"tag":const f={type:"group",label:e.name,items:[],link:e.href,active:a,hasActiveSubItem:m,modified:!0};t.push(f),c({contentItems:e.items,sidebarItems:f.items||[],activeItemId:o,location:n,routingBasePath:i});break;case"operation":case"schema":case"tool":case"rsrc":case"prompt":e.isWebhook&&p&&e.parent.name!==A&&(t.push({type:"separator",label:"Webhooks",variant:"secondary"}),p=!1),t.push({type:"link",label:e.name,httpVerb:e.type=="operation"?e.httpVerb:e.type,link:e.href,badges:e.badges,active:a,hasActiveSubItem:m,modified:!0,deprecated:e.deprecated,isAdditionalOperation:e.isAdditionalOperation});break;case"section":if(e.depth===-1)continue;const u={type:e.items.length?"group":"link",label:e.name,link:e.href,items:[],active:a,hasActiveSubItem:m,modified:!0};t.push(u),e.items.length&&c({contentItems:e.items,sidebarItems:u.items,activeItemId:o,location:n,routingBasePath:i});break}}}export{L as useMenuItems};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{jsx as r,jsxs as i,Fragment as
|
|
1
|
+
import{jsx as r,jsxs as i,Fragment as y}from"react/jsx-runtime";import{memo as w}from"react";import{getOperationColor as j}from"@redocly/theme/core/openapi";import{joinWithSeparator as z}from"../../services/index.js";import{encodeBackSlashes as k}from"../../utils/index.js";import{HttpVerb as C,NavigationBadge as s}from"../common/index.js";import{styled as o}from"../../styled-components.js";import{StyledButton as O}from"./styled.js";function B({title:p,items:l,onClick:c,routingBasePath:d,translate:h}){return i(y,{children:[r(I,{children:p}),l.map(e=>{const{id:g,href:m,deprecated:t,badges:f,isAdditionalOperation:v}=e,b=e.type==="operation"?e.path:e.name,a=e.type==="operation"?e.httpVerb:e.type,x=j({isAdditionalOperation:v,deprecated:t,httpVerb:a});return r(N,{variant:"outlined",size:"large",onClick:()=>c(z(d,k(m))),children:i("span",{children:[r(C,{color:x,children:a}),r(S,{children:b}),t&&r(s,{deprecated:!0,children:h("openapi.badges.deprecated","Deprecated")}),f?.map(({name:n,color:u})=>r(s,{color:u,children:n},n))]})},g)})]})}const q=w(B),I=o.span`
|
|
2
2
|
font-size: var(--font-size-base);
|
|
3
3
|
line-height: var(--line-height-base);
|
|
4
4
|
font-weight: var(--font-weight-bold);
|
|
5
5
|
color: var(--text-color-primary);
|
|
6
6
|
margin: var(--spacing-sm) 0 var(--spacing-xxs) 0;
|
|
7
|
-
`,
|
|
7
|
+
`,N=o(O)`
|
|
8
8
|
border-radius: var(--border-radius);
|
|
9
9
|
background: var(--bg-color);
|
|
10
10
|
justify-content: space-between;
|
|
@@ -24,7 +24,7 @@ import{jsx as r,jsxs as i,Fragment as x}from"react/jsx-runtime";import{memo as u
|
|
|
24
24
|
content: '→';
|
|
25
25
|
line-height: var(--line-height-base);
|
|
26
26
|
}
|
|
27
|
-
`,
|
|
27
|
+
`,S=o.span`
|
|
28
28
|
font-family: var(--font-family-base);
|
|
29
29
|
font-size: var(--font-size-base);
|
|
30
30
|
line-height: var(--line-height-base);
|
|
@@ -33,4 +33,4 @@ import{jsx as r,jsxs as i,Fragment as x}from"react/jsx-runtime";import{memo as u
|
|
|
33
33
|
white-space: nowrap;
|
|
34
34
|
text-overflow: ellipsis;
|
|
35
35
|
overflow-x: hidden;
|
|
36
|
-
`;export{
|
|
36
|
+
`;export{q as OperationNavigationItems};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as i,jsxs as y}from"react/jsx-runtime";import{useMemo as N,memo as j,useState as E,useCallback as W}from"react";import{useNavigate as B}from"react-router-dom";import{LayoutVariant as _}from"@redocly/config";import{useAtomValue as V}from"jotai/index";import{SamplesPanel as z}from"../common/index.js";import{layoutAtom as D}from"../../jotai/app.js";import{OperationNavigationItems as p}from"./OperationNavigationItems.js";import{StyledButton as K}from"./styled.js";import{useTranslate as L}from"../../hooks/index.js";import{styled as X}from"../../styled-components.js";import{isRenderableMenuItem as q}from"../../utils/menu.js";const m=8;function F({items:c,routingBasePath:n}){const o=L(),[r,O]=E(!1),u=B(),P=V(D)===_.STACKED,{operations:h,webhooks:d,schemas:f,mcpTools:g,showMoreCount:k,totalCount:w,mcpResources:C,mcpPrompts:x}=N(()=>{const s=c.filter(e=>q(e)),b=r?s:s.slice(0,m),{operations:v,additionalOperations:S,webhooks:M,schemas:T,mcpTools:R,mcpResources:A,mcpPrompts:I}=b.reduce((e,t)=>{if(t.type==="operation"&&t.isWebhook)e.webhooks.push(t);else if(t.type==="operation"){const l=t;l.isAdditionalOperation?e.additionalOperations.push(l):e.operations.push(l)}else t.type==="schema"?e.schemas.push(t):t.type==="tool"?e.mcpTools.push(t):t.type==="rsrc"?e.mcpResources.push(t):t.type==="prompt"&&e.mcpPrompts.push(t);return e},{operations:[],additionalOperations:[],webhooks:[],schemas:[],mcpTools:[],mcpResources:[],mcpPrompts:[]});return{operations:[...v,...S],schemas:T,mcpTools:R,webhooks:M,mcpResources:A,mcpPrompts:I,showMoreCount:!r&&s.length>m?s.length-m:0,totalCount:s.length}},[r,c]),a=W(s=>u(s),[u]);return w?y(G,{isStacked:P,"data-testid":"operation-navigation-list",children:[f.length>0&&i(p,{items:f,onClick:a,routingBasePath:n,translate:o,title:o("openapi.schemas","Schemas")}),g.length>0&&i(p,{items:g,onClick:a,routingBasePath:n,translate:o,title:o("openapi.mcp.tools","MCP Tools")}),C.length>0&&i(p,{items:C,onClick:a,routingBasePath:n,translate:o,title:o("openapi.mcp.resources","MCP Resources")}),x.length>0&&i(p,{items:x,onClick:a,routingBasePath:n,translate:o,title:o("openapi.mcp.prompts","MCP Prompts")}),h.length>0&&i(p,{items:h,onClick:a,routingBasePath:n,translate:o,title:o("openapi.operations","Operations")}),d.length>0&&i(p,{items:d,onClick:a,routingBasePath:n,translate:o,title:o("openapi.webhooks","Webhooks")}),!r&&!!k&&y(K,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>O(!0),children:[o("openapi.actions.show","Show")," ",k," ",o("openapi.actions.more","more"),"..."]})]}):null}const io=j(F),G=X(z)`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--spacing-xxs);
|
|
5
5
|
padding-top: var(--spacing-xxl);
|
|
6
|
-
`;export{
|
|
6
|
+
`;export{io as OperationsNavigation,F as OperationsNavigationComponent};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SegmentedOption } from '@redocly/theme/core/openapi';
|
|
2
2
|
export interface DropdownProps<T> {
|
|
3
3
|
value: T;
|
|
4
|
-
onChange: ({ label, value }:
|
|
5
|
-
options:
|
|
4
|
+
onChange: ({ label, value }: SegmentedOption<T>) => void;
|
|
5
|
+
options: SegmentedOption<T>[];
|
|
6
6
|
className?: string;
|
|
7
7
|
triggerVariant?: 'ghost' | 'outlined';
|
|
8
8
|
triggerSize?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsx as r,
|
|
1
|
+
import{jsx as r,jsxs as s,Fragment as f}from"react/jsx-runtime";import g,{useMemo as k,useState as C}from"react";import{Dropdown as D}from"@redocly/theme/components/Dropdown/Dropdown";import{CheckmarkIcon as I}from"@redocly/theme/icons/CheckmarkIcon/CheckmarkIcon";import{DropdownMenu as j}from"@redocly/theme/components/Dropdown/DropdownMenu";import{DropdownMenuItem as z}from"@redocly/theme/components/Dropdown/DropdownMenuItem";import{Button as M}from"@redocly/theme/components/Button/Button";import{SearchIcon as F}from"@redocly/theme/icons/SearchIcon/SearchIcon";import{typedMemo as N}from"@redocly/theme/core/openapi";import{styled as n}from"../../../styled-components.js";import{useTranslate as A}from"../../../hooks/index.js";function P({options:t,value:o,onChange:d,className:v,triggerVariant:x="outlined",triggerSize:b="small",withSearch:w=!1}){const[l,h]=C(""),m=A(),a=t.find(e=>e.value===o),p=k(()=>t.filter(e=>e.label?.toLowerCase().includes(l.toLowerCase())??!1),[t,l]);if(t.length===1)return r(V,{children:a?.element||a?.label});const y=e=>{h(e.target.value)},S=()=>w?s(f,{children:[r(R,{prefix:r(L,{children:r(F,{color:"var(--icon-color-additional)",onClick:e=>e.stopPropagation()})}),content:r(O,{placeholder:m("openapi.discriminator.searchPlaceholder","Search items"),onClick:e=>e.stopPropagation(),onChange:y,value:l})}),r(_,{children:p.length?p.map((e,c)=>s(g.Fragment,{children:[e.divider,r(i,{active:e.value===o,onAction:()=>d(e),suffix:e.value===o&&r(u,{}),children:e.element||e.label},e.label)]},c)):r(T,{content:m("openapi.discriminator.searchNoResults","No items found")})})]}):r(f,{children:t.map((e,c)=>s(g.Fragment,{children:[e.divider,r(i,{active:e.value===o,onAction:()=>d(e),suffix:e.value===o&&r(u,{}),children:e.element||e.label},e.label)]},c))});return r(D,{className:v,trigger:r(M,{variant:x,size:b,type:"button",children:a?.element||a?.label}),withArrow:!0,onClose:()=>h(""),children:r(j,{children:S()})})}const Y=N(P),u=n(I)`
|
|
2
2
|
width: 16px;
|
|
3
3
|
height: 16px;
|
|
4
4
|
margin-left: auto;
|
|
5
|
-
`,
|
|
5
|
+
`,i=n(z)`
|
|
6
6
|
--dropdown-menu-item-justify-content: space-between;
|
|
7
7
|
|
|
8
8
|
width: 100%;
|
|
@@ -12,23 +12,23 @@ import{jsx as r,Fragment as p,jsxs as w}from"react/jsx-runtime";import{useMemo a
|
|
|
12
12
|
padding: var(--spacing-xxs) var(--spacing-sm);
|
|
13
13
|
font-size: var(--font-size-base);
|
|
14
14
|
line-height: var(--line-height-base);
|
|
15
|
-
`,
|
|
15
|
+
`,R=n(i)`
|
|
16
16
|
gap: 0;
|
|
17
17
|
padding: var(--spacing-xxs) var(--spacing-xs);
|
|
18
18
|
&:hover {
|
|
19
19
|
background-color: transparent;
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`,T=n(i)`
|
|
22
22
|
height: 66px;
|
|
23
23
|
justify-content: center;
|
|
24
24
|
&:hover,
|
|
25
25
|
&:focus-visible {
|
|
26
26
|
background-color: transparent;
|
|
27
27
|
}
|
|
28
|
-
`,
|
|
28
|
+
`,_=n.div`
|
|
29
29
|
overflow-y: auto;
|
|
30
30
|
max-height: 300px;
|
|
31
|
-
`,
|
|
31
|
+
`,L=n.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: center;
|
|
34
34
|
justify-content: center;
|
|
@@ -36,7 +36,7 @@ import{jsx as r,Fragment as p,jsxs as w}from"react/jsx-runtime";import{useMemo a
|
|
|
36
36
|
height: 24px;
|
|
37
37
|
cursor: pointer;
|
|
38
38
|
flex-shrink: 0;
|
|
39
|
-
`,
|
|
39
|
+
`,O=n.input`
|
|
40
40
|
width: 100%;
|
|
41
41
|
border: none;
|
|
42
42
|
outline: none;
|
|
@@ -51,7 +51,7 @@ import{jsx as r,Fragment as p,jsxs as w}from"react/jsx-runtime";import{useMemo a
|
|
|
51
51
|
&::placeholder {
|
|
52
52
|
color: var(--search-trigger-color);
|
|
53
53
|
}
|
|
54
|
-
`,
|
|
54
|
+
`,V=n.span`
|
|
55
55
|
margin-right: var(--spacing-unit);
|
|
56
56
|
cursor: default;
|
|
57
57
|
background: none;
|
|
@@ -62,4 +62,4 @@ import{jsx as r,Fragment as p,jsxs as w}from"react/jsx-runtime";import{useMemo a
|
|
|
62
62
|
line-height: var(--line-height-lg);
|
|
63
63
|
font-family: var(--font-family-base);
|
|
64
64
|
font-weight: var(--font-weight-regular);
|
|
65
|
-
`;export{
|
|
65
|
+
`;export{Y as Dropdown};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SegmentedOption } from '@redocly/theme/core/openapi';
|
|
2
2
|
import type { SchemaModel } from '../../../models/index.js';
|
|
3
3
|
interface SchemaSelectionProps {
|
|
4
|
-
options:
|
|
4
|
+
options: SegmentedOption<number>[];
|
|
5
5
|
onChange?: (idx: number) => void;
|
|
6
6
|
pointer: string;
|
|
7
7
|
schema: SchemaModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as m}from"react/jsx-runtime";import{useCallback as h,useEffect as v,useRef as A,useState as T}from"react";import{useAtom as g}from"jotai";import{
|
|
1
|
+
import{jsx as m}from"react/jsx-runtime";import{useCallback as h,useEffect as v,useRef as A,useState as T}from"react";import{useAtom as g}from"jotai";import{isUndefined as w}from"@redocly/theme/core/openapi";import{Segmented as I}from"@redocly/theme/components/Segmented/Segmented";import{Dropdown as x}from"../Dropdown/index.js";import{operationStore as y}from"../../../jotai/operation.js";const L=5,R=7;function _({options:t,onChange:r,pointer:u,schema:n,defaultOneOfIdx:d}){const[S,c]=g(y(u)),p=S.activeOneOf[n.pointer]??d,o=t[p]?.value,[i,E]=T(!1),s=A(null);v(()=>{if(!s.current)return;const e=()=>{const O=s.current?.querySelectorAll('button[role="tab"]'),a=Array.from(O||[]).some(l=>l.offsetWidth<l.scrollWidth);a!==i&&E(a)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[i,t]);const f=h(({value:e})=>{e!==void 0&&(r?r(e):c({activeExampleName:n.oneOf?.[e]?.title,activeOneOf:{[n.pointer]:e},requestValues:{body:null}}))},[r,n.oneOf,n.pointer,c]);return w(o)?null:t.length>L||i?m(x,{options:t,value:o,withSearch:t.length>=R,onChange:f}):m(I,{ref:s,value:o,onChange:f,options:t,size:"small","data-testid":"segmented-schema"})}const k=_;export{k as SchemaSelection};
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ export { useRouter } from './useRouter.js';
|
|
|
3
3
|
export { useContentItems } from './useContentItems.js';
|
|
4
4
|
export { useActiveWithFallback } from './useActiveWithFallback.js';
|
|
5
5
|
export { useTranslate } from './useTranslate.js';
|
|
6
|
-
export { useUppercase2LowercaseRedirect } from './useUppercase2LowercaseRedirect.js';
|
|
7
6
|
export { useTelemetry } from './useTelemetry.js';
|
|
7
|
+
export { useUppercase2LowercaseRedirect } from './useUppercase2LowercaseRedirect.js';
|
|
8
8
|
export { usePerformanceMetrics } from './usePerformanceMetrics.js';
|
package/lib/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useActivateExample as o}from"./useActivateExample.js";import{useRouter as s}from"./useRouter.js";import{useContentItems as p}from"./useContentItems.js";import{useActiveWithFallback as f}from"./useActiveWithFallback.js";import{useTranslate as x}from"./useTranslate.js";import{
|
|
1
|
+
import{useActivateExample as o}from"./useActivateExample.js";import{useRouter as s}from"./useRouter.js";import{useContentItems as p}from"./useContentItems.js";import{useActiveWithFallback as f}from"./useActiveWithFallback.js";import{useTranslate as x}from"./useTranslate.js";import{useTelemetry as i}from"./useTelemetry.js";import{useUppercase2LowercaseRedirect as n}from"./useUppercase2LowercaseRedirect.js";import{usePerformanceMetrics as A}from"./usePerformanceMetrics.js";export{o as useActivateExample,f as useActiveWithFallback,p as useContentItems,A as usePerformanceMetrics,s as useRouter,i as useTelemetry,x as useTranslate,n as useUppercase2LowercaseRedirect};
|
package/lib/hooks/useRouter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BrowserRouter as s,HashRouter as
|
|
1
|
+
import{BrowserRouter as s,HashRouter as a,MemoryRouter as n}from"react-router-dom";const m={history:s,memory:n,hash:a},R=(e,o)=>{const r=m[e],t={...e!=="memory"&&{basename:o,feature:{v7_startTransition:!1,v7_relativeSplatPath:!1}}};return{Router:r,routerProps:t}};export{R as useRouter};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{jsx as t,jsxs as a}from"react/jsx-runtime";import{styled as C}from"../../styled-components.js";const r=o=>a("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:[t("path",{d:"M10.5 9.75H9.375V9H10.5V3H9.375V2.25H10.5C10.6988 2.25023 10.8895 2.32932 11.0301 2.46992C11.1707 2.61052 11.2498 2.80116 11.25 3V9C11.2497 9.19883 11.1706 9.38944 11.03 9.53003C10.8894 9.67063 10.6988 9.74973 10.5 9.75Z"}),t("path",{d:"M8.625 6.75C9.03921 6.75 9.375 6.41421 9.375 6C9.375 5.58579 9.03921 5.25 8.625 5.25C8.21079 5.25 7.875 5.58579 7.875 6C7.875 6.41421 8.21079 6.75 8.625 6.75Z"}),t("path",{d:"M6 6.75C6.41421 6.75 6.75 6.41421 6.75 6C6.75 5.58579 6.41421 5.25 6 5.25C5.58579 5.25 5.25 5.58579 5.25 6C5.25 6.41421 5.58579 6.75 6 6.75Z"}),t("path",{d:"M3.375 6.75C3.78921 6.75 4.125 6.41421 4.125 6C4.125 5.58579 3.78921 5.25 3.375 5.25C2.96079 5.25 2.625 5.58579 2.625 6C2.625 6.41421 2.96079 6.75 3.375 6.75Z"}),t("path",{d:"M2.625 9.75H1.5C1.30116 9.74977 1.11052 9.67068 0.969922 9.53008C0.829319 9.38948 0.750228 9.19884 0.75 9V3C0.750199 2.80115 0.82928 2.6105 0.969889 2.46989C1.1105 2.32928 1.30115 2.2502 1.5 2.25H2.625V3H1.5V9H2.625V9.75Z"})]}),p=C(r).attrs(()=>({"data-component-name":"icons/DefaultMappingIcon"}))`
|
|
2
|
+
path {
|
|
3
|
+
fill: var(--color-warm-grey-11);
|
|
4
|
+
html.dark & {
|
|
5
|
+
fill: var(--text-color-secondary);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
`;export{p as DefaultMappingIcon,r as Icon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DefaultMappingIcon } from './DefaultMappingIcon.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DefaultMappingIcon as a}from"./DefaultMappingIcon.js";export{a as DefaultMappingIcon};
|