@techdocs/cli 0.0.0-nightly-20221108024703 → 0.0.0-nightly-20221110024817

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,26 @@
1
1
  # @techdocs/cli
2
2
 
3
- ## 0.0.0-nightly-20221108024703
3
+ ## 0.0.0-nightly-20221110024817
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Updated dependencies
8
- - @backstage/backend-common@0.0.0-nightly-20221108024703
9
- - @backstage/plugin-techdocs-node@0.0.0-nightly-20221108024703
10
- - @backstage/catalog-model@0.0.0-nightly-20221108024703
8
+ - @backstage/backend-common@0.0.0-nightly-20221110024817
9
+ - @backstage/plugin-techdocs-node@0.0.0-nightly-20221110024817
10
+ - @backstage/catalog-model@0.0.0-nightly-20221110024817
11
11
  - @backstage/cli-common@0.1.10
12
- - @backstage/config@0.0.0-nightly-20221108024703
12
+ - @backstage/config@0.0.0-nightly-20221110024817
13
+
14
+ ## 1.2.3-next.1
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+ - @backstage/backend-common@0.16.0-next.1
20
+ - @backstage/plugin-techdocs-node@1.4.2-next.1
21
+ - @backstage/catalog-model@1.1.3-next.0
22
+ - @backstage/cli-common@0.1.10
23
+ - @backstage/config@1.0.4-next.0
13
24
 
14
25
  ## 1.2.3-next.0
15
26
 
@@ -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.3308728f.js"></script><script defer="defer" src="/static/module-material-ui.e3edf608.js"></script><script defer="defer" src="/static/module-lodash.0cada415.js"></script><script defer="defer" src="/static/module-date-fns.d70f4cc3.js"></script><script defer="defer" src="/static/module-yaml.b5c4d531.js"></script><script defer="defer" src="/static/module-ajv.fca02de5.js"></script><script defer="defer" src="/static/module-material-table.5d56e1cb.js"></script><script defer="defer" src="/static/module-luxon.f67513b2.js"></script><script defer="defer" src="/static/module-octokit.ea8cd5cc.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/vendor.3308728f.js"></script><script defer="defer" src="/static/main.3308728f.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.493cf2ef.js"></script><script defer="defer" src="/static/module-material-ui.e3edf608.js"></script><script defer="defer" src="/static/module-lodash.0cada415.js"></script><script defer="defer" src="/static/module-date-fns.d70f4cc3.js"></script><script defer="defer" src="/static/module-yaml.b5c4d531.js"></script><script defer="defer" src="/static/module-ajv.fca02de5.js"></script><script defer="defer" src="/static/module-material-table.5d56e1cb.js"></script><script defer="defer" src="/static/module-luxon.1ec72e86.js"></script><script defer="defer" src="/static/module-octokit.ea8cd5cc.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/vendor.493cf2ef.js"></script><script defer="defer" src="/static/main.493cf2ef.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -491,4 +491,4 @@ ${ue.href}
491
491
 
492
492
  Feedback:`),dt=(Oe==null?void 0:Oe.type)==="github"?(0,ln.BT)(Ce.href,"blob"):Ce.href,_e=Ht()(dt),at=`/${_e.organization}/${_e.name}`,wt=ue.cloneNode();switch(Oe==null?void 0:Oe.type){case"gitlab":wt.href=`${Ce.origin}${at}/issues/new?issue[title]=${nt}&issue[description]=${ft}`;break;case"github":wt.href=`${Ce.origin}${at}/issues/new?title=${nt}&body=${ft}`;break;default:return H}return pn.render(n.createElement(On.Z),wt),wt.style.paddingLeft="5px",wt.title="Leave feedback for this page",wt.id="git-feedback-link",ue==null||ue.insertAdjacentElement("beforebegin",wt),H};var $n=t(44882);const Gt=()=>S=>{const H=S.querySelector('.md-header label[for="__drawer"]'),me=S.querySelector("article");if(!H||!me)return S;const ue=H.cloneNode();return pn.render(n.createElement($n.Z),ue),ue.id="toggle-sidebar",ue.title="Toggle Sidebar",ue.classList.add("md-content__button"),ue.style.setProperty("padding","0 0 0 5px"),ue.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),me==null||me.prepend(ue),S},fn=()=>S=>(((me,ue)=>{Array.from(me).filter(Ce=>Ce.hasAttribute(ue)).forEach(Ce=>{const Oe=Ce.getAttribute(ue);if(Oe){Oe.match(/^https?:\/\//i)&&Ce.setAttribute("target","_blank");try{const Ue=cn(window.location.href);Ce.setAttribute(ue,new URL(Oe,Ue).toString())}catch{Ce.replaceWith(Ce.textContent||Oe)}}})})(Array.from(S.getElementsByTagName("a")),"href"),S);function cn(S){const H=new URL(S);return!H.pathname.endsWith("/")&&!H.pathname.endsWith(".html")&&(H.pathname+="/"),H.toString()}const wn=({baseUrl:S,onClick:H})=>me=>(Array.from(me.getElementsByTagName("a")).forEach(ue=>{ue.addEventListener("click",Ce=>{const Ue=ue.getAttribute("href");!Ue||Ue.startsWith(S)&&!ue.hasAttribute("download")&&(Ce.preventDefault(),H(Ce,Ue))})}),me);var Bn=t(15459),yn=t(80030),ge=t(72379),te=t(41547);const Ae=(0,Bn.Z)(S=>({tooltip:{fontSize:"inherit",color:S.palette.text.primary,margin:0,padding:S.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(yn.ZP),Fe=()=>(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:S})=>{const[H,me]=(0,n.useState)(!1),ue=(0,n.useCallback)(()=>{navigator.clipboard.writeText(S),me(!0)},[S]),Ce=(0,n.useCallback)(()=>{me(!1)},[me]);return(0,h.jsx)(Ae,{title:"Copied to clipboard",placement:"left",open:H,onClose:Ce,leaveDelay:1e3,children:(0,h.jsx)("button",{className:"md-clipboard md-icon",onClick:ue,children:(0,h.jsx)(Fe,{})})})},xt=S=>H=>{const me=H.querySelectorAll("pre > code");for(const Ce of me){var ue;const Oe=Ce.textContent||"",Ue=document.createElement("div");Ce==null||(ue=Ce.parentElement)===null||ue===void 0||ue.prepend(Ue),pn.render((0,h.jsx)(te.Z,{theme:S,children:(0,h.jsx)(Qe,{text:Oe})}),Ue)}return H},oe=()=>S=>{var H;return(H=S.querySelector(".md-header"))===null||H===void 0||H.remove(),S},R=()=>S=>{var H,me;return(H=S.querySelector(".md-footer .md-copyright"))===null||H===void 0||H.remove(),(me=S.querySelector(".md-footer-copyright"))===null||me===void 0||me.remove(),S},J=({onLoading:S,onLoaded:H})=>me=>(S(),me.addEventListener(V.Ox,function ue(){H(),me.removeEventListener(V.Ox,ue)}),me),Ke=()=>S=>(setTimeout(()=>{if(window.location.hash){var H;const me=window.location.hash.slice(1);(H=S==null?void 0:S.querySelector(`[id="${me}"]`))===null||H===void 0||H.scrollIntoView()}},200),S),M=()=>S=>(setTimeout(()=>{const H=S==null?void 0:S.querySelectorAll("li.md-nav__item--active");H.length!==0&&(H.forEach(ue=>{const Ce=ue==null?void 0:ue.querySelector("input");Ce!=null&&Ce.checked||Ce==null||Ce.click()}),H[H.length-1].scrollIntoView())},200),S),Z=async(S,H)=>{let me;if(typeof S=="string")me=new DOMParser().parseFromString(S,"text/html").documentElement;else if(S instanceof Element)me=S;else throw new Error("dom is not a recognized type");for(const ue of H)me=await ue(me);return me},le="screen and (max-width: 76.1875em)",he=S=>{const H=(0,He.s0)(),me=(0,Ne.Z)(),ue=(0,Ee.Z)(le),Ce=Re(),Oe=hn(),Ue=(0,$.h_)(V.Dl),nt=(0,$.h_)(qe.q3),{state:ft,path:dt,content:_e}=(0,T.DK)(),[at,wt]=(0,n.useState)(null),Tt=(0,V.ux)(at),It=(0,n.useCallback)(()=>{if(!at)return;at.querySelectorAll(".md-sidebar").forEach(Nt=>{if(ue)Nt.style.top="0px";else{const jn=document==null?void 0:document.querySelector(".techdocs-reader-page");var gn;const Nn=(gn=jn==null?void 0:jn.getBoundingClientRect().top)!==null&&gn!==void 0?gn:0;var Dn;let qn=(Dn=at.getBoundingClientRect().top)!==null&&Dn!==void 0?Dn:0;const En=at.querySelector(".md-container > .md-tabs");var sn;const xn=(sn=En==null?void 0:En.getBoundingClientRect().height)!==null&&sn!==void 0?sn:0;qn<Nn&&(qn=Nn),Nt.style.top=`${Math.max(qn,0)+xn}px`}Nt.style.setProperty("opacity","1")})},[at,ue]);(0,n.useEffect)(()=>(window.addEventListener("resize",It),window.addEventListener("scroll",It,!0),()=>{window.removeEventListener("resize",It),window.removeEventListener("scroll",It,!0)}),[at,It]);const Ut=(0,n.useCallback)(()=>{if(!at)return;const Dt=at.querySelector(".md-footer");Dt&&(Dt.style.width=`${at.getBoundingClientRect().width}px`)},[at]);(0,n.useEffect)(()=>(window.addEventListener("resize",Ut),()=>{window.removeEventListener("resize",Ut)}),[at,Ut]),(0,n.useEffect)(()=>{Tt||(Ut(),It())},[ft,Tt,Ut,It]);const Zn=(0,n.useCallback)((Dt,Nt)=>Z(Dt,[Ce,kn({techdocsStorageApi:Ue,entityId:S,path:Nt}),fn(),Gt(),oe(),R(),Cn(nt),Oe]),[S,nt,Ue,Ce,Oe]),Wn=(0,n.useCallback)(async Dt=>Z(Dt,[Ke(),M(),xt(me),wn({baseUrl:window.location.origin,onClick:(Nt,gn)=>{const Dn=Nt.ctrlKey||Nt.metaKey,sn=new URL(gn),jn=`${sn.pathname}${sn.search}${sn.hash}`;if(sn.hash)if(Dn)window.open(jn,"_blank");else{var Nn;H(jn),(Nn=Dt==null?void 0:Dt.querySelector(`[id="${sn.hash.slice(1)}"]`))===null||Nn===void 0||Nn.scrollIntoView()}else Dn?window.open(jn,"_blank"):H(jn)}}),J({onLoading:()=>{},onLoaded:()=>{var Nt;(Nt=Dt.querySelector(".md-nav__title"))===null||Nt===void 0||Nt.removeAttribute("for")}}),J({onLoading:()=>{Array.from(Dt.querySelectorAll(".md-sidebar")).forEach(gn=>{gn.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[me,H]);return(0,n.useEffect)(()=>{if(!_e)return()=>{};let Dt=!0;return Zn(_e,dt).then(async Nt=>{if(!(Nt!=null&&Nt.innerHTML)||!Dt)return;window.scroll({top:0});const gn=await Wn(Nt);wt(gn)}),()=>{Dt=!1}},[_e,dt,Zn,Wn]),at};var be=t(8560);const De=()=>{const S=(0,V.$L)(),{shadowRoot:H}=(0,V.x1)(),me=H==null?void 0:H.querySelector('[data-md-component="content"]'),ue=H==null?void 0:H.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Ce=ue==null?void 0:ue.querySelector('[data-techdocs-addons-location="primary sidebar"]');Ce||(Ce=document.createElement("div"),Ce.setAttribute("data-techdocs-addons-location","primary sidebar"),ue==null||ue.prepend(Ce));const Oe=H==null?void 0:H.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let Ue=Oe==null?void 0:Oe.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return Ue||(Ue=document.createElement("div"),Ue.setAttribute("data-techdocs-addons-location","secondary sidebar"),Oe==null||Oe.prepend(Ue)),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(be.Z,{container:Ce,children:S.renderComponentsByLocation(V.oZ.PrimarySidebar)}),(0,h.jsx)(be.Z,{container:me,children:S.renderComponentsByLocation(V.oZ.Content)}),(0,h.jsx)(be.Z,{container:Ue,children:S.renderComponentsByLocation(V.oZ.SecondarySidebar)})]})},$e=(0,g.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),We=(0,T.m1)(S=>{var H;const{withSearch:me=!0,onReady:ue}=S,Ce=$e(),{entityMetadata:{value:Oe,loading:Ue},entityRef:nt,setShadowRoot:ft}=(0,V.x1)(),dt=he(nt),_e=(0,n.useCallback)(at=>{ft(at),ue instanceof Function&&ue()},[ft,ue]);return Ue===!1&&!Oe?(0,h.jsx)(x.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}):dt?(0,h.jsx)(x.VY,{children:(0,h.jsxs)(L.Z,{container:!0,children:[(0,h.jsx)(L.Z,{xs:12,item:!0,children:(0,h.jsx)(je,{})}),me&&(0,h.jsx)(L.Z,{className:Ce.search,xs:"auto",item:!0,children:(0,h.jsx)(l.S,{entityId:nt,entityTitle:Oe==null||(H=Oe.metadata)===null||H===void 0?void 0:H.title})}),(0,h.jsx)(L.Z,{xs:12,item:!0,children:(0,h.jsx)(V.VA,{element:dt,onAppend:_e,children:(0,h.jsx)(De,{})})})]})}):(0,h.jsx)(x.VY,{children:(0,h.jsx)(L.Z,{container:!0,children:(0,h.jsx)(L.Z,{xs:12,item:!0,children:(0,h.jsx)(je,{})})})})}),tt=null},93225:function(jt,Me,t){"use strict";t.d(Me,{S:function(){return Q}});var h=t(52322),n=t(2784),g=t(18671),L=t(98069),V=t(73250),x=t(61886),l=t(43297),k=t(25271),ne=t(93414),q=t(25248),_=t(95573);const F=(0,h.jsx)(L.Z,{animation:"wave",variant:"text",height:40}),Q=X=>{const{children:ve}=X,de=(0,x.$L)(),A=(0,q.h_)(q.Ds),{title:I,setTitle:$,subtitle:E,setSubtitle:T,entityRef:ee,metadata:{value:je,loading:He},entityMetadata:{value:Ne,loading:Ee}}=(0,x.x1)();(0,n.useEffect)(()=>{!je||($(je.site_name),T(()=>{let{site_description:ht}=je;return(!ht||ht==="None")&&(ht="Home"),ht}))},[je,$,T]);const qe=A.getOptional("app.title")||"Backstage",mt=[I,E,qe].filter(Boolean).join(" | "),{locationMetadata:Ze,spec:Ie}=Ne||{},rt=Ie==null?void 0:Ie.lifecycle,lt=Ne?(0,l.hF)(Ne,k.S4):[],st=(0,q.tg)(_._Z)(),ut=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ne.i9,{label:"Component",value:(0,h.jsx)(l.dx,{color:"inherit",entityRef:ee,title:Ne==null?void 0:Ne.metadata.title,defaultKind:"Component"})}),lt.length>0&&(0,h.jsx)(ne.i9,{label:"Owner",value:(0,h.jsx)(l.rI,{color:"inherit",entityRefs:lt,defaultKind:"group"})}),rt?(0,h.jsx)(ne.i9,{label:"Lifecycle",value:rt}):null,Ze&&Ze.type!=="dir"&&Ze.type!=="file"?(0,h.jsx)(ne.i9,{label:"",value:(0,h.jsx)("a",{href:Ze.target,target:"_blank",rel:"noopener noreferrer",children:(0,h.jsx)(V.Z,{style:{marginTop:"-25px",fill:"#fff"}})})}):null]});return!Ee&&Ne===void 0||!He&&je===void 0?null:(0,h.jsxs)(ne.h4,{type:"Documentation",typeLink:st,title:I||F,subtitle:E||F,children:[(0,h.jsx)(g.Z,{titleTemplate:"%s",children:(0,h.jsx)("title",{children:mt})}),ut,ve,de.renderComponentsByLocation(x.oZ.Header)]})}},65124:function(jt,Me,t){"use strict";t.d(Me,{b:function(){return F}});var h=t(52322),n=t(2784),g=t(79692),L=t(15223),V=t(95544),x=t(80030),l=t(61837),k=t(48348),ne=t(47603),q=t(61886);const _=(0,g.Z)(Q=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:Q.spacing(3,3,0)}})),F=Q=>{const X=_(),[ve,de]=(0,n.useState)(null),A=(0,n.useCallback)(He=>{de(He.currentTarget)},[]),I=(0,n.useCallback)(()=>{de(null)},[]),{entityMetadata:{value:$,loading:E}}=(0,q.x1)(),T=(0,q.$L)(),ee=T.renderComponentsByLocation(q.oZ.Subheader),je=T.renderComponentsByLocation(q.oZ.Settings);return!ee&&!je||E===!1&&!$?null:(0,h.jsx)(L.Z,{classes:X,...Q.toolbarProps,children:(0,h.jsxs)(V.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[ee,je?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(x.ZP,{title:"Settings",children:(0,h.jsx)(l.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:A,children:(0,h.jsx)(ne.Z,{})})}),(0,h.jsx)(k.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:ve,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(ve),onClose:I,keepMounted:!0,children:je})]}):null]})})}},95481:function(jt,Me,t){"use strict";t.d(Me,{DK:function(){return F},m1:function(){return X}});var h=t(52322),n=t(2784),g=t(10289),L=t(61886),V=t(25248),x=t(64279),l=t(77446);function k({contentLoading:ve,content:de,activeSyncState:A}){return ve||A==="BUILD_READY_RELOAD"||!de&&A==="CHECKING"?"CHECKING":!de&&A==="BUILDING"?"INITIAL_BUILD":de?A==="BUILDING"?"CONTENT_STALE_REFRESHING":A==="BUILD_READY"?"CONTENT_STALE_READY":A==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function ne(ve,de){const A={...ve};switch(de.type){case"sync":de.state==="CHECKING"&&(A.buildLog=[]),A.activeSyncState=de.state,A.syncError=de.syncError;break;case"contentLoading":A.contentLoading=!0,A.contentError=void 0;break;case"content":typeof de.path=="string"&&(A.path=de.path),A.contentLoading=!1,A.content=de.content,A.contentError=de.contentError;break;case"buildLog":A.buildLog=A.buildLog.concat(de.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(A.activeSyncState)&&["contentLoading","content"].includes(de.type)&&(A.activeSyncState="UP_TO_DATE",A.buildLog=[]),A}function q(ve,de,A,I){var $,E;const[T,ee]=(0,n.useReducer)(ne,{activeSyncState:"CHECKING",path:I,contentLoading:!0,buildLog:[]}),je=(0,V.h_)(L.Dl),{retry:He}=(0,l.Z)(async()=>{ee({type:"contentLoading"});try{const qe=await je.getEntityDocs({kind:ve,namespace:de,name:A},I);return ee({type:"content",content:qe,path:I}),qe}catch(qe){ee({type:"content",contentError:qe,path:I})}},[je,ve,de,A,I]),Ne=(0,n.useRef)({content:void 0,reload:()=>{}});return Ne.current={content:T.content,reload:He},(0,x.default)(async()=>{ee({type:"sync",state:"CHECKING"});const qe=setTimeout(()=>{ee({type:"sync",state:"BUILDING"})},1e3);try{switch(await je.syncEntityDocs({kind:ve,namespace:de,name:A},Ze=>{ee({type:"buildLog",log:Ze})})){case"updated":Ne.current.content?ee({type:"sync",state:"BUILD_READY"}):(Ne.current.reload(),ee({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":ee({type:"sync",state:"UP_TO_DATE"});break;default:ee({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(mt){ee({type:"sync",state:"ERROR",syncError:mt})}finally{clearTimeout(qe)}},[ve,A,de,je,ee,Ne]),{state:(0,n.useMemo)(()=>k({activeSyncState:T.activeSyncState,contentLoading:T.contentLoading,content:T.content}),[T.activeSyncState,T.content,T.contentLoading]),contentReload:He,path:T.path,content:T.content,contentErrorMessage:($=T.contentError)===null||$===void 0?void 0:$.toString(),syncErrorMessage:(E=T.syncError)===null||E===void 0?void 0:E.toString(),buildLog:T.buildLog}}const _=(0,n.createContext)({}),F=()=>(0,n.useContext)(_),Q=({children:ve})=>{const{"*":de=""}=(0,g.UO)(),{entityRef:A}=(0,L.x1)(),{kind:I,namespace:$,name:E}=A,T=q(I,$,E,de);return(0,h.jsx)(_.Provider,{value:T,children:ve instanceof Function?ve(T):ve})},X=ve=>de=>(0,h.jsx)(Q,{children:(0,h.jsx)(ve,{...de})})},95573:function(jt,Me,t){"use strict";t.d(Me,{Fw:function(){return g},_Z:function(){return n},pd:function(){return L}});var h=t(25248);const n=(0,h.NT)({id:"techdocs:index-page"}),g=(0,h.NT)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),L=(0,h.NT)({id:"techdocs:catalog-reader-view"})},17339:function(jt,Me,t){"use strict";t.d(Me,{S:function(){return I}});var h=t(52322),n=t(2784),g=t(79692),L=t(49378),V=t(38402),x=t(86136),l=t(85256),k=t(93414),ne=t(25248),q=t(65826);const _=(0,g.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),F=$=>{const{result:E,highlight:T,rank:ee,lineClamp:je=5,asListItem:He=!0,asLink:Ne=!0,title:Ee,icon:qe}=$,mt=_(),Ze=(0,ne.z$)(),Ie=()=>{Ze.captureEvent("discover",E.title,{attributes:{to:E.location},value:ee})},rt=()=>{const ut=T!=null&&T.fields.title?(0,h.jsx)(q.FA,{text:T.fields.title,preTag:T.preTag,postTag:T.postTag}):E.title,ct=T!=null&&T.fields.entityTitle?(0,h.jsx)(q.FA,{text:T.fields.entityTitle,preTag:T.preTag,postTag:T.postTag}):E.entityTitle,vt=T!=null&&T.fields.name?(0,h.jsx)(q.FA,{text:T.fields.name,preTag:T.preTag,postTag:T.postTag}):E.name;return(0,h.jsx)(L.Z,{className:mt.itemText,primaryTypographyProps:{variant:"h6"},primary:Ee||(0,h.jsxs)(h.Fragment,{children:[ut," | ",ct!=null?ct:vt," docs"]}),secondary:(0,h.jsx)("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:je,overflow:"hidden"},children:T!=null&&T.fields.text?(0,h.jsx)(q.FA,{text:T.fields.text,preTag:T.preTag,postTag:T.postTag}):E.text})})},lt=({children:ut})=>Ne?(0,h.jsx)(k.rU,{noTrack:!0,to:E.location,onClick:Ie,children:ut}):(0,h.jsx)(h.Fragment,{children:ut}),st=({children:ut})=>He?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(V.Z,{alignItems:"flex-start",children:[qe&&(0,h.jsx)(x.Z,{children:qe}),(0,h.jsx)("div",{className:mt.flexContainer,children:ut})]}),(0,h.jsx)(l.Z,{component:"li"})]}):(0,h.jsx)(h.Fragment,{children:ut});return(0,h.jsx)(lt,{children:(0,h.jsx)(st,{children:(0,h.jsx)(rt,{})})})};var Q=t(27556),X=t(10289);const ve=(0,g.Z)($=>({root:{width:"100%"},bar:{padding:$.spacing(1)}})),de=$=>$==null?void 0:$.document,A=$=>{const{entityId:E,entityTitle:T,debounceTime:ee=150}=$,[je,He]=(0,n.useState)(!1),Ne=(0,X.s0)(),{setFilters:Ee,result:{loading:qe,value:mt}}=(0,q.Rx)(),Ze=ve(),[Ie,rt]=(0,n.useState)([]);(0,n.useEffect)(()=>{let vt=!0;if(vt&&mt){const ht=mt.results.slice(0,10);rt(ht)}return()=>{vt=!1}},[qe,mt]);const{kind:lt,name:st,namespace:ut}=E;(0,n.useEffect)(()=>{Ee(vt=>({...vt,kind:lt,namespace:ut,name:st}))},[lt,ut,st,Ee]);const ct=(vt,ht)=>{if(de(ht)){const{location:Ge}=ht.document;Ne(Ge)}};return(0,h.jsx)(Q.Z,{className:Ze.bar,variant:"outlined",children:(0,h.jsx)(q.qO,{classes:{root:Ze.root},"data-testid":"techdocs-search-bar",size:"small",open:je,getOptionLabel:()=>"",filterOptions:vt=>vt,onClose:()=>{He(!1)},onFocus:()=>{He(!0)},onChange:ct,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ie,renderOption:({document:vt,highlight:ht})=>(0,h.jsx)(F,{result:vt,lineClamp:3,asListItem:!1,asLink:!1,title:vt.title,highlight:ht}),loading:qe,inputDebounceTime:ee,inputPlaceholder:`Search ${T||E.name} docs`,freeSolo:!1})})},I=$=>{const E={term:"",types:["techdocs"],pageCursor:"",filters:$.entityId};return(0,h.jsx)(q.Nd,{initialState:E,children:(0,h.jsx)(A,{...$})})}},53260:function(){}},function(jt){var Me=function(h){return jt(jt.s=h)};jt.O(0,[2370,6202,9284,9035,2126,7012,2194,1410,427,6816,5218,4736],function(){return Me(96215)});var t=jt.O()}]);})();
493
493
 
494
- //# sourceMappingURL=main.3308728f.js.map
494
+ //# sourceMappingURL=main.493cf2ef.js.map