@techdocs/cli 0.0.0-nightly-20230201023435 → 0.0.0-nightly-20230202023026

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/CHANGELOG.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # @techdocs/cli
2
2
 
3
- ## 0.0.0-nightly-20230201023435
3
+ ## 0.0.0-nightly-20230202023026
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - 6e0b6a0d50: Fixed publish command missing awsBucketRootPath option.
8
8
  Fixed publish command having the gcsBucketRootPath option misconfigured, previously returning a boolean vs a string.
9
9
  - Updated dependencies
10
- - @backstage/plugin-techdocs-node@0.0.0-nightly-20230201023435
11
- - @backstage/backend-common@0.0.0-nightly-20230201023435
12
- - @backstage/catalog-model@0.0.0-nightly-20230201023435
10
+ - @backstage/plugin-techdocs-node@0.0.0-nightly-20230202023026
11
+ - @backstage/backend-common@0.0.0-nightly-20230202023026
12
+ - @backstage/catalog-model@0.0.0-nightly-20230202023026
13
13
  - @backstage/cli-common@0.1.11
14
14
  - @backstage/config@1.0.6
15
15
 
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.dd3e123f.js"></script><script defer="defer" src="/static/module-material-ui.8008c157.js"></script><script defer="defer" src="/static/module-lodash.f07e54c1.js"></script><script defer="defer" src="/static/module-date-fns.7dd2cc1f.js"></script><script defer="defer" src="/static/module-yaml.cb32d5ca.js"></script><script defer="defer" src="/static/module-ajv.07e5c2aa.js"></script><script defer="defer" src="/static/module-material-table.ac270938.js"></script><script defer="defer" src="/static/module-luxon.9cc2c5ac.js"></script><script defer="defer" src="/static/module-octokit.991a0781.js"></script><script defer="defer" src="/static/module-react-dom.5abdac04.js"></script><script defer="defer" src="/static/module-zod.49ffd80f.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.97cccd01.js"></script><script defer="defer" src="/static/module-remix-run.b9acb514.js"></script><script defer="defer" src="/static/vendor.dd3e123f.js"></script><script defer="defer" src="/static/main.dd3e123f.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.164cf371.js"></script><script defer="defer" src="/static/module-material-ui.8008c157.js"></script><script defer="defer" src="/static/module-lodash.f07e54c1.js"></script><script defer="defer" src="/static/module-date-fns.7dd2cc1f.js"></script><script defer="defer" src="/static/module-yaml.cb32d5ca.js"></script><script defer="defer" src="/static/module-ajv.07e5c2aa.js"></script><script defer="defer" src="/static/module-material-table.ac270938.js"></script><script defer="defer" src="/static/module-luxon.9cc2c5ac.js"></script><script defer="defer" src="/static/module-octokit.991a0781.js"></script><script defer="defer" src="/static/module-react-dom.5abdac04.js"></script><script defer="defer" src="/static/module-zod.49ffd80f.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.97cccd01.js"></script><script defer="defer" src="/static/module-remix-run.b9acb514.js"></script><script defer="defer" src="/static/vendor.164cf371.js"></script><script defer="defer" src="/static/main.164cf371.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -500,4 +500,4 @@ ${K.href}
500
500
 
501
501
  Feedback:`),ft=(xe==null?void 0:xe.type)==="github"?(0,En.BT)(se.href,"blob"):se.href,ct=rn()(ft),et=`/${ct.organization}/${ct.name}`,Me=K.cloneNode();switch(xe==null?void 0:xe.type){case"gitlab":Me.href=`${se.origin}${et}/issues/new?issue[title]=${tt}&issue[description]=${it}`;break;case"github":Me.href=`${se.origin}${et}/issues/new?title=${tt}&body=${it}`;break;default:return A}return An.render(n.createElement(Wn.Z),Me),Me.style.paddingLeft="5px",Me.title="Leave feedback for this page",Me.id="git-feedback-link",K==null||K.insertAdjacentElement("beforebegin",Me),A};var Hn=t(44882);const Sn=()=>f=>{const A=f.querySelector('.md-header label[for="__drawer"]'),M=f.querySelector("article");if(!A||!M)return f;const K=A.cloneNode();return An.render(n.createElement(Hn.Z),K),K.id="toggle-sidebar",K.title="Toggle Sidebar",K.classList.add("md-content__button"),K.style.setProperty("padding","0 0 0 5px"),K.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),M==null||M.prepend(K),f},mn=()=>f=>(((M,K)=>{Array.from(M).filter(se=>se.hasAttribute(K)).forEach(se=>{const xe=se.getAttribute(K);if(xe){xe.match(/^https?:\/\//i)&&se.setAttribute("target","_blank");try{const Pe=Tn(window.location.href);se.setAttribute(K,new URL(xe,Pe).toString())}catch{se.replaceWith(se.textContent||xe)}}})})(Array.from(f.getElementsByTagName("a")),"href"),f);function Tn(f){const A=new URL(f);return!A.pathname.endsWith("/")&&!A.pathname.endsWith(".html")&&(A.pathname+="/"),A.toString()}const In=({baseUrl:f,onClick:A})=>M=>(Array.from(M.getElementsByTagName("a")).forEach(K=>{K.addEventListener("click",se=>{const Pe=K.getAttribute("href");!Pe||Pe.startsWith(f)&&!K.hasAttribute("download")&&(se.preventDefault(),A(se,Pe))})}),M);var Kn=t(15459),vn=t(80030),ge=t(72379),re=t(41547);const Ae=(0,Kn.Z)(f=>({tooltip:{fontSize:"inherit",color:f.palette.text.primary,margin:0,padding:f.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(vn.ZP),Ze=()=>(0,h.jsx)(ge.Z,{children:(0,h.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),qe=({text:f})=>{const[A,M]=(0,n.useState)(!1),K=(0,n.useCallback)(()=>{window.navigator.clipboard.writeText(f),M(!0)},[f]),se=(0,n.useCallback)(()=>{M(!1)},[M]);return(0,h.jsx)(Ae,{title:"Copied to clipboard",placement:"left",open:A,onClose:se,leaveDelay:1e3,children:(0,h.jsx)(ie.Z,{className:"md-clipboard md-icon",onClick:K,children:(0,h.jsx)(Ze,{})})})},mt=f=>A=>{const M=A.querySelectorAll("pre > code");for(const se of M){var K;const xe=se.textContent||"",Pe=document.createElement("div");se==null||(K=se.parentElement)===null||K===void 0||K.prepend(Pe),An.render((0,h.jsx)(re.Z,{theme:f,children:(0,h.jsx)(qe,{text:xe})}),Pe)}return A},he=()=>f=>{var A;return(A=f.querySelector(".md-header"))===null||A===void 0||A.remove(),f},$=()=>f=>{var A,M;return(A=f.querySelector(".md-footer .md-copyright"))===null||A===void 0||A.remove(),(M=f.querySelector(".md-footer-copyright"))===null||M===void 0||M.remove(),f},pe=({onLoading:f,onLoaded:A})=>M=>(f(),M.addEventListener(m.Ox,function K(){A(),M.removeEventListener(m.Ox,K)}),M),Ue=()=>f=>(f.addEventListener(m.Ox,function A(){if(window.location.hash){var M;const K=window.location.hash.slice(1);(M=f==null?void 0:f.querySelector(`[id="${K}"]`))===null||M===void 0||M.scrollIntoView()}f.removeEventListener(m.Ox,A)}),f),Be=()=>f=>(setTimeout(()=>{const A=f==null?void 0:f.querySelectorAll("li.md-nav__item--active");A.length!==0&&(A.forEach(K=>{const se=K==null?void 0:K.querySelector("input");se!=null&&se.checked||se==null||se.click()}),A[A.length-1].scrollIntoView())},200),f),nt=async(f,A)=>{let M;if(typeof f=="string")M=new DOMParser().parseFromString(f,"text/html").documentElement;else if(f instanceof Element)M=f;else throw new Error("dom is not a recognized type");for(const K of A)M=await K(M);return M},It="screen and (max-width: 76.1875em)",Ht=f=>{const A=(0,Ke.s0)(),M=(0,Fe.Z)(),K=(0,He.Z)(It),se=Re(),xe=fn(),Pe=(0,W.z$)(),tt=(0,W.h_)(m.Dl),it=(0,W.h_)(We.q3),{state:ft,path:ct,content:et}=(0,C.DK)(),[Me,Et]=(0,n.useState)(null),Lt=(0,m.ux)(Me),Gt=(0,n.useCallback)(()=>{if(!Me)return;Me.querySelectorAll(".md-sidebar").forEach(ot=>{if(K)ot.style.top="0px";else{const un=document==null?void 0:document.querySelector(".techdocs-reader-page");var st;const yn=(st=un==null?void 0:un.getBoundingClientRect().top)!==null&&st!==void 0?st:0;var Kt;let Yn=(Kt=Me.getBoundingClientRect().top)!==null&&Kt!==void 0?Kt:0;const Bn=Me.querySelector(".md-container > .md-tabs");var On;const Cn=(On=Bn==null?void 0:Bn.getBoundingClientRect().height)!==null&&On!==void 0?On:0;Yn<yn&&(Yn=yn),ot.style.top=`${Math.max(Yn,0)+Cn}px`}ot.style.setProperty("opacity","1")})},[Me,K]);(0,n.useEffect)(()=>(window.addEventListener("resize",Gt),window.addEventListener("scroll",Gt,!0),()=>{window.removeEventListener("resize",Gt),window.removeEventListener("scroll",Gt,!0)}),[Me,Gt]);const vt=(0,n.useCallback)(()=>{if(!Me)return;const pt=Me.querySelector(".md-footer");pt&&(pt.style.width=`${Me.getBoundingClientRect().width}px`)},[Me]);(0,n.useEffect)(()=>(window.addEventListener("resize",vt),()=>{window.removeEventListener("resize",vt)}),[Me,vt]),(0,n.useEffect)(()=>{Lt||(vt(),Gt())},[ft,Lt,vt,Gt]);const Nt=(0,n.useCallback)((pt,ot)=>nt(pt,[se,wn({techdocsStorageApi:tt,entityId:f,path:ot}),mn(),Sn(),he(),$(),Vn(it),xe]),[f,it,tt,se,xe]),Bt=(0,n.useCallback)(async pt=>nt(pt,[Ue(),Be(),mt(M),In({baseUrl:window.location.origin,onClick:(ot,st)=>{var Kt;const On=ot.ctrlKey||ot.metaKey,un=new URL(st),yn=`${un.pathname}${un.search}${un.hash}`,Yn=((Kt=ot.target)===null||Kt===void 0?void 0:Kt.innerText)||st,Bn=st.replace(window.location.origin,"");if(Pe.captureEvent("click",Yn,{attributes:{to:Bn}}),un.hash)if(On)window.open(yn,"_blank");else{var Cn;A(yn),(Cn=pt==null?void 0:pt.querySelector(`[id="${un.hash.slice(1)}"]`))===null||Cn===void 0||Cn.scrollIntoView()}else On?window.open(yn,"_blank"):A(yn)}}),pe({onLoading:()=>{},onLoaded:()=>{var ot;(ot=pt.querySelector(".md-nav__title"))===null||ot===void 0||ot.removeAttribute("for")}}),pe({onLoading:()=>{Array.from(pt.querySelectorAll(".md-sidebar")).forEach(st=>{st.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[M,A,Pe]);return(0,n.useEffect)(()=>{if(!et)return()=>{};let pt=!0;return Nt(et,ct).then(async ot=>{if(!(ot!=null&&ot.innerHTML)||!pt)return;window.scroll({top:0});const st=await Bt(ot);Et(st)}),()=>{pt=!1}},[et,ct,Nt,Bt]),Me};var Mt=t(8560);const Qt=()=>{const f=(0,m.$L)(),{shadowRoot:A}=(0,m.x1)(),M=A==null?void 0:A.querySelector('[data-md-component="content"]'),K=A==null?void 0:A.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let se=K==null?void 0:K.querySelector('[data-techdocs-addons-location="primary sidebar"]');se||(se=document.createElement("div"),se.setAttribute("data-techdocs-addons-location","primary sidebar"),K==null||K.prepend(se));const xe=A==null?void 0:A.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let Pe=xe==null?void 0:xe.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return Pe||(Pe=document.createElement("div"),Pe.setAttribute("data-techdocs-addons-location","secondary sidebar"),xe==null||xe.prepend(Pe)),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Mt.Z,{container:se,children:f.renderComponentsByLocation(m.oZ.PrimarySidebar)}),(0,h.jsx)(Mt.Z,{container:M,children:f.renderComponentsByLocation(m.oZ.Content)}),(0,h.jsx)(Mt.Z,{container:Pe,children:f.renderComponentsByLocation(m.oZ.SecondarySidebar)})]})},zt=(0,z.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),Y=(0,C.m1)(f=>{var A;const{withSearch:M=!0,onReady:K}=f,se=zt(),{entityMetadata:{value:xe,loading:Pe},entityRef:tt,setShadowRoot:it}=(0,m.x1)(),ft=Ht(tt),ct=(0,n.useCallback)(et=>{it(et),K instanceof Function&&K()},[it,K]);return Pe===!1&&!xe?(0,h.jsx)(S.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}):ft?(0,h.jsx)(S.VY,{children:(0,h.jsxs)(B.Z,{container:!0,children:[(0,h.jsx)(B.Z,{xs:12,item:!0,children:(0,h.jsx)(Ie,{})}),M&&(0,h.jsx)(B.Z,{className:se.search,xs:"auto",item:!0,children:(0,h.jsx)(l.S,{entityId:tt,entityTitle:xe==null||(A=xe.metadata)===null||A===void 0?void 0:A.title})}),(0,h.jsx)(B.Z,{xs:12,item:!0,children:(0,h.jsx)(m.VA,{element:ft,onAppend:ct,children:(0,h.jsx)(Qt,{})})})]})}):(0,h.jsx)(S.VY,{children:(0,h.jsx)(B.Z,{container:!0,children:(0,h.jsx)(B.Z,{xs:12,item:!0,children:(0,h.jsx)(Ie,{})})})})}),q=null},93225:function(At,Oe,t){"use strict";t.d(Oe,{S:function(){return ee}});var h=t(52322),n=t(2784),z=t(18671),B=t(60905),m=t(98069),S=t(73250),l=t(61886),k=t(56941),ie=t(25271),_=t(23196),ne=t(25248),D=t(76635),O=t(95573);const V=(0,h.jsx)(m.Z,{animation:"wave",variant:"text",height:40}),ee=ae=>{const{children:T}=ae,R=(0,l.$L)(),W=(0,ne.h_)(ne.Ds),{title:L,setTitle:C,subtitle:X,setSubtitle:Ie,entityRef:Ke,metadata:{value:Fe,loading:He},entityMetadata:{value:We,loading:jt}}=(0,l.x1)();(0,n.useEffect)(()=>{!Fe||(C(Fe.site_name),Ie(()=>{let{site_description:ce}=Fe;return(!ce||ce==="None")&&(ce=""),ce}))},[Fe,C,Ie]);const Qe=W.getOptional("app.title")||"Backstage",ye=[L,X,Qe].filter(Boolean).join(" | "),{locationMetadata:_e,spec:wt}=We||{},dt=wt==null?void 0:wt.lifecycle,bt=We?(0,k.hF)(We,ie.S4):[],ut=(0,ne.tg)(O._Z)(),Rt=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(_.i9,{label:(0,D.capitalize)((We==null?void 0:We.kind)||"entity"),value:(0,h.jsx)(k.dx,{color:"inherit",entityRef:Ke,title:We==null?void 0:We.metadata.title,defaultKind:"Component"})}),bt.length>0&&(0,h.jsx)(_.i9,{label:"Owner",value:(0,h.jsx)(k.rI,{color:"inherit",entityRefs:bt,defaultKind:"group"})}),dt?(0,h.jsx)(_.i9,{label:"Lifecycle",value:dt}):null,_e&&_e.type!=="dir"&&_e.type!=="file"?(0,h.jsx)(_.i9,{label:"",value:(0,h.jsxs)(B.Z,{container:!0,direction:"column",alignItems:"center",style:{color:"#fff"},children:[(0,h.jsx)(B.Z,{style:{padding:0},item:!0,children:(0,h.jsx)(S.Z,{style:{marginTop:"-25px"}})}),(0,h.jsx)(B.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:_e.target}):null]});return!jt&&We===void 0||!He&&Fe===void 0?null:(0,h.jsxs)(_.h4,{type:"Documentation",typeLink:ut,title:L||V,subtitle:X===""?void 0:X||V,children:[(0,h.jsx)(z.Z,{titleTemplate:"%s",children:(0,h.jsx)("title",{children:ye})}),Rt,T,R.renderComponentsByLocation(l.oZ.Header)]})}},65124:function(At,Oe,t){"use strict";t.d(Oe,{b:function(){return D}});var h=t(52322),n=t(2784),z=t(79692),B=t(15223),m=t(95544),S=t(80030),l=t(61837),k=t(48348),ie=t(47603),_=t(61886);const ne=(0,z.Z)(O=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:O.spacing(3,3,0)}})),D=O=>{const V=ne(),[ee,ae]=(0,n.useState)(null),T=(0,n.useCallback)(Ke=>{ae(Ke.currentTarget)},[]),R=(0,n.useCallback)(()=>{ae(null)},[]),{entityMetadata:{value:W,loading:L}}=(0,_.x1)(),C=(0,_.$L)(),X=C.renderComponentsByLocation(_.oZ.Subheader),Ie=C.renderComponentsByLocation(_.oZ.Settings);return!X&&!Ie||L===!1&&!W?null:(0,h.jsx)(B.Z,{classes:V,...O.toolbarProps,children:(0,h.jsxs)(m.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[X,Ie?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(S.ZP,{title:"Settings",children:(0,h.jsx)(l.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:T,children:(0,h.jsx)(ie.Z,{})})}),(0,h.jsx)(k.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:ee,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(ee),onClose:R,keepMounted:!0,children:Ie})]}):null]})})}},95481:function(At,Oe,t){"use strict";t.d(Oe,{DK:function(){return D},m1:function(){return V}});var h=t(52322),n=t(2784),z=t(79635),B=t(61886),m=t(25248),S=t(64279),l=t(77446);function k({contentLoading:ee,content:ae,activeSyncState:T}){return ee||T==="BUILD_READY_RELOAD"||!ae&&T==="CHECKING"?"CHECKING":!ae&&T==="BUILDING"?"INITIAL_BUILD":ae?T==="BUILDING"?"CONTENT_STALE_REFRESHING":T==="BUILD_READY"?"CONTENT_STALE_READY":T==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function ie(ee,ae){const T={...ee};switch(ae.type){case"sync":ae.state==="CHECKING"&&(T.buildLog=[]),T.activeSyncState=ae.state,T.syncError=ae.syncError;break;case"contentLoading":T.contentLoading=!0,T.contentError=void 0;break;case"content":typeof ae.path=="string"&&(T.path=ae.path),T.contentLoading=!1,T.content=ae.content,T.contentError=ae.contentError;break;case"buildLog":T.buildLog=T.buildLog.concat(ae.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(T.activeSyncState)&&["contentLoading","content"].includes(ae.type)&&(T.activeSyncState="UP_TO_DATE",T.buildLog=[]),T}function _(ee,ae,T,R){var W,L;const[C,X]=(0,n.useReducer)(ie,{activeSyncState:"CHECKING",path:R,contentLoading:!0,buildLog:[]}),Ie=(0,m.h_)(B.Dl),{retry:Ke}=(0,l.Z)(async()=>{X({type:"contentLoading"});try{const We=await Ie.getEntityDocs({kind:ee,namespace:ae,name:T},R);return X({type:"content",content:We,path:R}),We}catch(We){X({type:"content",contentError:We,path:R})}},[Ie,ee,ae,T,R]),Fe=(0,n.useRef)({content:void 0,reload:()=>{}});return Fe.current={content:C.content,reload:Ke},(0,S.default)(async()=>{X({type:"sync",state:"CHECKING"});const We=setTimeout(()=>{X({type:"sync",state:"BUILDING"})},1e3);try{switch(await Ie.syncEntityDocs({kind:ee,namespace:ae,name:T},Qe=>{X({type:"buildLog",log:Qe})})){case"updated":Fe.current.content?X({type:"sync",state:"BUILD_READY"}):(Fe.current.reload(),X({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":X({type:"sync",state:"UP_TO_DATE"});break;default:X({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(jt){X({type:"sync",state:"ERROR",syncError:jt})}finally{clearTimeout(We)}},[ee,T,ae,Ie,X,Fe]),{state:(0,n.useMemo)(()=>k({activeSyncState:C.activeSyncState,contentLoading:C.contentLoading,content:C.content}),[C.activeSyncState,C.content,C.contentLoading]),contentReload:Ke,path:C.path,content:C.content,contentErrorMessage:(W=C.contentError)===null||W===void 0?void 0:W.toString(),syncErrorMessage:(L=C.syncError)===null||L===void 0?void 0:L.toString(),buildLog:C.buildLog}}const ne=(0,n.createContext)({}),D=()=>(0,n.useContext)(ne),O=({children:ee})=>{const{"*":ae=""}=(0,z.UO)(),{entityRef:T}=(0,B.x1)(),{kind:R,namespace:W,name:L}=T,C=_(R,W,L,ae);return(0,h.jsx)(ne.Provider,{value:C,children:ee instanceof Function?ee(C):ee})},V=ee=>ae=>(0,h.jsx)(O,{children:(0,h.jsx)(ee,{...ae})})},95573:function(At,Oe,t){"use strict";t.d(Oe,{Fw:function(){return z},_Z:function(){return n},pd:function(){return B}});var h=t(25248);const n=(0,h.NT)({id:"techdocs:index-page"}),z=(0,h.NT)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),B=(0,h.NT)({id:"techdocs:catalog-reader-view"})},55511:function(At,Oe,t){"use strict";t.r(Oe),t.d(Oe,{TechDocsSearchResultListItem:function(){return D}});var h=t(52322),n=t(2784),z=t(79692),B=t(49378),m=t(38402),S=t(86136),l=t(85256),k=t(90436),ie=t(23196),_=t(15096);const ne=(0,z.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),D=O=>{const{result:V,highlight:ee,lineClamp:ae=5,asListItem:T=!0,asLink:R=!0,title:W,icon:L}=O,C=ne(),X=({children:Fe})=>R?(0,h.jsx)(ie.rU,{noTrack:!0,to:V.location,children:Fe}):(0,h.jsx)(h.Fragment,{children:Fe}),Ie=()=>{const Fe=ee!=null&&ee.fields.title?(0,h.jsx)(_.FA,{text:ee.fields.title,preTag:ee.preTag,postTag:ee.postTag}):V.title,He=ee!=null&&ee.fields.entityTitle?(0,h.jsx)(_.FA,{text:ee.fields.entityTitle,preTag:ee.preTag,postTag:ee.postTag}):V.entityTitle,We=ee!=null&&ee.fields.name?(0,h.jsx)(_.FA,{text:ee.fields.name,preTag:ee.preTag,postTag:ee.postTag}):V.name;return V?(0,h.jsx)(B.Z,{className:C.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,h.jsx)(X,{children:W||(0,h.jsxs)(h.Fragment,{children:[Fe," | ",He!=null?He:We," docs"]})}),secondary:(0,h.jsx)(k.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:ae,overflow:"hidden"},children:ee!=null&&ee.fields.text?(0,h.jsx)(_.FA,{text:ee.fields.text,preTag:ee.preTag,postTag:ee.postTag}):V.text})}):null},Ke=({children:Fe})=>T?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(m.Z,{alignItems:"flex-start",children:[L&&(0,h.jsx)(S.Z,{children:L}),(0,h.jsx)("div",{className:C.flexContainer,children:Fe})]}),(0,h.jsx)(l.Z,{component:"li"})]}):(0,h.jsx)(h.Fragment,{children:Fe});return(0,h.jsx)(Ke,{children:(0,h.jsx)(Ie,{})})}},22478:function(At,Oe,t){"use strict";t.d(Oe,{S:function(){return ne}});var h=t(52322),n=t(15096),z=t(79692),B=t(27556),m=t(2784),S=t(79635),l=t(55511);const k=(0,z.Z)(D=>({root:{width:"100%"},bar:{padding:D.spacing(1)}})),ie=D=>D==null?void 0:D.document,_=D=>{const{entityId:O,entityTitle:V,debounceTime:ee=150}=D,[ae,T]=(0,m.useState)(!1),R=(0,S.s0)(),{setFilters:W,result:{loading:L,value:C}}=(0,n.Rx)(),X=k(),[Ie,Ke]=(0,m.useState)([]);(0,m.useEffect)(()=>{let Qe=!0;if(Qe&&C){const ye=C.results.slice(0,10);Ke(ye)}return()=>{Qe=!1}},[L,C]);const{kind:Fe,name:He,namespace:We}=O;(0,m.useEffect)(()=>{W(Qe=>({...Qe,kind:Fe,namespace:We,name:He}))},[Fe,We,He,W]);const jt=(Qe,ye)=>{if(ie(ye)){const{location:_e}=ye.document;R(_e)}};return(0,h.jsx)(B.Z,{className:X.bar,variant:"outlined",children:(0,h.jsx)(n.qO,{classes:{root:X.root},"data-testid":"techdocs-search-bar",size:"small",open:ae,getOptionLabel:()=>"",filterOptions:Qe=>Qe,onClose:()=>{T(!1)},onFocus:()=>{T(!0)},onChange:jt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ie,renderOption:({document:Qe,highlight:ye})=>(0,h.jsx)(l.TechDocsSearchResultListItem,{result:Qe,lineClamp:3,asListItem:!1,asLink:!1,title:Qe.title,highlight:ye}),loading:L,inputDebounceTime:ee,inputPlaceholder:`Search ${V||O.name} docs`,freeSolo:!1})})},ne=D=>{const O={term:"",types:["techdocs"],pageCursor:"",filters:D.entityId};return(0,h.jsx)(n.Nd,{initialState:O,children:(0,h.jsx)(_,{...D})})}},53260:function(){}},function(At){var Oe=function(h){return At(At.s=h)};At.O(0,[2370,6202,9284,9035,2126,7012,2194,1410,427,6816,5218,5924,4736],function(){return Oe(49636)});var t=At.O()}]);})();
502
502
 
503
- //# sourceMappingURL=main.dd3e123f.js.map
503
+ //# sourceMappingURL=main.164cf371.js.map