@techdocs/cli 0.0.0-nightly-20221208023006 → 0.0.0-nightly-20221209022835
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 +6 -6
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{main.b6183e05.js → main.cdfaed72.js} +1 -1
- package/dist/embedded-app/static/{main.b6183e05.js.map → main.cdfaed72.js.map} +1 -1
- package/dist/embedded-app/static/module-remix-run.e15d5a2e.js +12 -0
- package/dist/embedded-app/static/module-remix-run.e15d5a2e.js.map +1 -0
- package/dist/embedded-app/static/{runtime.b6183e05.js → runtime.cdfaed72.js} +1 -1
- package/dist/embedded-app/static/{runtime.b6183e05.js.map → runtime.cdfaed72.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.b6183e05.js → vendor.cdfaed72.js} +5 -5
- package/dist/embedded-app/static/{vendor.b6183e05.js.map → vendor.cdfaed72.js.map} +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/module-remix-run.ed639a8d.js +0 -12
- package/dist/embedded-app/static/module-remix-run.ed639a8d.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20221209022835
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- 8015ff1258: Tweaked wording to use inclusive terminology
|
|
8
8
|
- Updated dependencies
|
|
9
|
-
- @backstage/backend-common@0.0.0-nightly-
|
|
10
|
-
- @backstage/plugin-techdocs-node@0.0.0-nightly-
|
|
11
|
-
- @backstage/cli-common@0.0.0-nightly-
|
|
12
|
-
- @backstage/catalog-model@0.0.0-nightly-
|
|
13
|
-
- @backstage/config@0.0.0-nightly-
|
|
9
|
+
- @backstage/backend-common@0.0.0-nightly-20221209022835
|
|
10
|
+
- @backstage/plugin-techdocs-node@0.0.0-nightly-20221209022835
|
|
11
|
+
- @backstage/cli-common@0.0.0-nightly-20221209022835
|
|
12
|
+
- @backstage/catalog-model@0.0.0-nightly-20221209022835
|
|
13
|
+
- @backstage/config@0.0.0-nightly-20221209022835
|
|
14
14
|
|
|
15
15
|
## 1.2.4-next.2
|
|
16
16
|
|
|
@@ -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.
|
|
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.cdfaed72.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.2efe45a5.js"></script><script defer="defer" src="/static/module-material-table.ac270938.js"></script><script defer="defer" src="/static/module-luxon.8ea19264.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/module-remix-run.e15d5a2e.js"></script><script defer="defer" src="/static/vendor.cdfaed72.js"></script><script defer="defer" src="/static/main.cdfaed72.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:`),Ye=(ke==null?void 0:ke.type)==="github"?(0,Sn.BT)(Ce.href,"blob"):Ce.href,ft=Jt()(Ye),yt=`/${ft.organization}/${ft.name}`,ct=ue.cloneNode();switch(ke==null?void 0:ke.type){case"gitlab":ct.href=`${Ce.origin}${yt}/issues/new?issue[title]=${lt}&issue[description]=${St}`;break;case"github":ct.href=`${Ce.origin}${yt}/issues/new?title=${lt}&body=${St}`;break;default:return H}return pn.render(n.createElement(Dn.Z),ct),ct.style.paddingLeft="5px",ct.title="Leave feedback for this page",ct.id="git-feedback-link",ue==null||ue.insertAdjacentElement("beforebegin",ct),H};var Fn=t(44882);const un=()=>C=>{const H=C.querySelector('.md-header label[for="__drawer"]'),me=C.querySelector("article");if(!H||!me)return C;const ue=H.cloneNode();return pn.render(n.createElement(Fn.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),C},fn=()=>C=>(((me,ue)=>{Array.from(me).filter(Ce=>Ce.hasAttribute(ue)).forEach(Ce=>{const ke=Ce.getAttribute(ue);if(ke){ke.match(/^https?:\/\//i)&&Ce.setAttribute("target","_blank");try{const Ue=gn(window.location.href);Ce.setAttribute(ue,new URL(ke,Ue).toString())}catch{Ce.replaceWith(Ce.textContent||ke)}}})})(Array.from(C.getElementsByTagName("a")),"href"),C);function gn(C){const H=new URL(C);return!H.pathname.endsWith("/")&&!H.pathname.endsWith(".html")&&(H.pathname+="/"),H.toString()}const In=({baseUrl:C,onClick:H})=>me=>(Array.from(me.getElementsByTagName("a")).forEach(ue=>{ue.addEventListener("click",Ce=>{const Ue=ue.getAttribute("href");!Ue||Ue.startsWith(C)&&!ue.hasAttribute("download")&&(Ce.preventDefault(),H(Ce,Ue))})}),me);var Rn=t(15459),mn=t(80030),ge=t(72379),ee=t(41547);const Ae=(0,Rn.Z)(C=>({tooltip:{fontSize:"inherit",color:C.palette.text.primary,margin:0,padding:C.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(mn.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:C})=>{const[H,me]=(0,n.useState)(!1),ue=(0,n.useCallback)(()=>{window.navigator.clipboard.writeText(C),me(!0)},[C]),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,{})})})},bt=C=>H=>{const me=H.querySelectorAll("pre > code");for(const Ce of me){var ue;const ke=Ce.textContent||"",Ue=document.createElement("div");Ce==null||(ue=Ce.parentElement)===null||ue===void 0||ue.prepend(Ue),pn.render((0,h.jsx)(ee.Z,{theme:C,children:(0,h.jsx)(qe,{text:ke})}),Ue)}return H},ie=()=>C=>{var H;return(H=C.querySelector(".md-header"))===null||H===void 0||H.remove(),C},k=()=>C=>{var H,me;return(H=C.querySelector(".md-footer .md-copyright"))===null||H===void 0||H.remove(),(me=C.querySelector(".md-footer-copyright"))===null||me===void 0||me.remove(),C},ce=({onLoading:C,onLoaded:H})=>me=>(C(),me.addEventListener(g.Ox,function ue(){H(),me.removeEventListener(g.Ox,ue)}),me),Be=()=>C=>(setTimeout(()=>{if(window.location.hash){var H;const me=window.location.hash.slice(1);(H=C==null?void 0:C.querySelector(`[id="${me}"]`))===null||H===void 0||H.scrollIntoView()}},200),C),D=()=>C=>(setTimeout(()=>{const H=C==null?void 0:C.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),C),U=async(C,H)=>{let me;if(typeof C=="string")me=new DOMParser().parseFromString(C,"text/html").documentElement;else if(C instanceof Element)me=C;else throw new Error("dom is not a recognized type");for(const ue of H)me=await ue(me);return me},de="screen and (max-width: 76.1875em)",fe=C=>{const H=(0,et.s0)(),me=(0,Xe.Z)(),ue=(0,Je.Z)(de),Ce=Ie(),ke=cn(),Ue=(0,O.z$)(),lt=(0,O.h_)(g.Dl),St=(0,O.h_)(He.q3),{state:Ye,path:ft,content:yt}=(0,S.DK)(),[ct,Tt]=(0,n.useState)(null),Ft=(0,g.ux)(ct),Ut=(0,n.useCallback)(()=>{if(!ct)return;ct.querySelectorAll(".md-sidebar").forEach(Mt=>{if(ue)Mt.style.top="0px";else{const yn=document==null?void 0:document.querySelector(".techdocs-reader-page");var an;const Ln=(an=yn==null?void 0:yn.getBoundingClientRect().top)!==null&&an!==void 0?an:0;var Cn;let zn=(Cn=ct.getBoundingClientRect().top)!==null&&Cn!==void 0?Cn:0;const tn=ct.querySelector(".md-container > .md-tabs");var Qn;const xn=(Qn=tn==null?void 0:tn.getBoundingClientRect().height)!==null&&Qn!==void 0?Qn:0;zn<Ln&&(zn=Ln),Mt.style.top=`${Math.max(zn,0)+xn}px`}Mt.style.setProperty("opacity","1")})},[ct,ue]);(0,n.useEffect)(()=>(window.addEventListener("resize",Ut),window.addEventListener("scroll",Ut,!0),()=>{window.removeEventListener("resize",Ut),window.removeEventListener("scroll",Ut,!0)}),[ct,Ut]);const Un=(0,n.useCallback)(()=>{if(!ct)return;const Dt=ct.querySelector(".md-footer");Dt&&(Dt.style.width=`${ct.getBoundingClientRect().width}px`)},[ct]);(0,n.useEffect)(()=>(window.addEventListener("resize",Un),()=>{window.removeEventListener("resize",Un)}),[ct,Un]),(0,n.useEffect)(()=>{Ft||(Un(),Ut())},[Ye,Ft,Un,Ut]);const Mn=(0,n.useCallback)((Dt,Mt)=>U(Dt,[Ce,Zn({techdocsStorageApi:lt,entityId:C,path:Mt}),fn(),un(),ie(),k(),Nn(St),ke]),[C,St,lt,Ce,ke]),vn=(0,n.useCallback)(async Dt=>U(Dt,[Be(),D(),bt(me),In({baseUrl:window.location.origin,onClick:(Mt,an)=>{var Cn;const Qn=Mt.ctrlKey||Mt.metaKey,yn=new URL(an),Ln=`${yn.pathname}${yn.search}${yn.hash}`,zn=((Cn=Mt.target)===null||Cn===void 0?void 0:Cn.innerText)||an,tn=an.replace(window.location.origin,"");if(Ue.captureEvent("click",zn,{attributes:{to:tn}}),yn.hash)if(Qn)window.open(Ln,"_blank");else{var xn;H(Ln),(xn=Dt==null?void 0:Dt.querySelector(`[id="${yn.hash.slice(1)}"]`))===null||xn===void 0||xn.scrollIntoView()}else Qn?window.open(Ln,"_blank"):H(Ln)}}),ce({onLoading:()=>{},onLoaded:()=>{var Mt;(Mt=Dt.querySelector(".md-nav__title"))===null||Mt===void 0||Mt.removeAttribute("for")}}),ce({onLoading:()=>{Array.from(Dt.querySelectorAll(".md-sidebar")).forEach(an=>{an.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[me,H,Ue]);return(0,n.useEffect)(()=>{if(!yt)return()=>{};let Dt=!0;return Mn(yt,ft).then(async Mt=>{if(!(Mt!=null&&Mt.innerHTML)||!Dt)return;window.scroll({top:0});const an=await vn(Mt);Tt(an)}),()=>{Dt=!1}},[yt,ft,Mn,vn]),ct};var ye=t(8560);const Pe=()=>{const C=(0,g.$L)(),{shadowRoot:H}=(0,g.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 ke=H==null?void 0:H.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let Ue=ke==null?void 0:ke.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return Ue||(Ue=document.createElement("div"),Ue.setAttribute("data-techdocs-addons-location","secondary sidebar"),ke==null||ke.prepend(Ue)),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(ye.Z,{container:Ce,children:C.renderComponentsByLocation(g.oZ.PrimarySidebar)}),(0,h.jsx)(ye.Z,{container:me,children:C.renderComponentsByLocation(g.oZ.Content)}),(0,h.jsx)(ye.Z,{container:Ue,children:C.renderComponentsByLocation(g.oZ.SecondarySidebar)})]})},Le=(0,W.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),Me=(0,S.m1)(C=>{var H;const{withSearch:me=!0,onReady:ue}=C,Ce=Le(),{entityMetadata:{value:ke,loading:Ue},entityRef:lt,setShadowRoot:St}=(0,g.x1)(),Ye=fe(lt),ft=(0,n.useCallback)(yt=>{St(yt),ue instanceof Function&&ue()},[St,ue]);return Ue===!1&&!ke?(0,h.jsx)(b.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}):Ye?(0,h.jsx)(b.VY,{children:(0,h.jsxs)($.Z,{container:!0,children:[(0,h.jsx)($.Z,{xs:12,item:!0,children:(0,h.jsx)(Te,{})}),me&&(0,h.jsx)($.Z,{className:Ce.search,xs:"auto",item:!0,children:(0,h.jsx)(l.S,{entityId:lt,entityTitle:ke==null||(H=ke.metadata)===null||H===void 0?void 0:H.title})}),(0,h.jsx)($.Z,{xs:12,item:!0,children:(0,h.jsx)(g.VA,{element:Ye,onAppend:ft,children:(0,h.jsx)(Pe,{})})})]})}):(0,h.jsx)(b.VY,{children:(0,h.jsx)($.Z,{container:!0,children:(0,h.jsx)($.Z,{xs:12,item:!0,children:(0,h.jsx)(Te,{})})})})}),nt=null},93225:function(It,ze,t){"use strict";t.d(ze,{S:function(){return ae}});var h=t(52322),n=t(2784),W=t(18671),$=t(60905),g=t(98069),b=t(73250),l=t(61886),P=t(92848),ne=t(25271),Q=t(93414),X=t(25248),M=t(76635),z=t(95573);const _=(0,h.jsx)(g.Z,{animation:"wave",variant:"text",height:40}),ae=le=>{const{children:A}=le,L=(0,l.$L)(),O=(0,X.h_)(X.Ds),{title:T,setTitle:S,subtitle:q,setSubtitle:Te,entityRef:et,metadata:{value:Xe,loading:Je},entityMetadata:{value:He,loading:gt}}=(0,l.x1)();(0,n.useEffect)(()=>{!Xe||(S(Xe.site_name),Te(()=>{let{site_description:se}=Xe;return(!se||se==="None")&&(se=""),se}))},[Xe,S,Te]);const Ee=O.getOptional("app.title")||"Backstage",Ke=[T,q,Ee].filter(Boolean).join(" | "),{locationMetadata:ot,spec:mt}=He||{},rt=mt==null?void 0:mt.lifecycle,it=He?(0,P.hF)(He,ne.S4):[],ut=(0,X.tg)(z._Z)(),xt=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q.i9,{label:(0,M.capitalize)((He==null?void 0:He.kind)||"entity"),value:(0,h.jsx)(P.dx,{color:"inherit",entityRef:et,title:He==null?void 0:He.metadata.title,defaultKind:"Component"})}),it.length>0&&(0,h.jsx)(Q.i9,{label:"Owner",value:(0,h.jsx)(P.rI,{color:"inherit",entityRefs:it,defaultKind:"group"})}),rt?(0,h.jsx)(Q.i9,{label:"Lifecycle",value:rt}):null,ot&&ot.type!=="dir"&&ot.type!=="file"?(0,h.jsx)(Q.i9,{label:"",value:(0,h.jsxs)($.Z,{container:!0,direction:"column",alignItems:"center",style:{color:"#fff"},children:[(0,h.jsx)($.Z,{style:{padding:0},item:!0,children:(0,h.jsx)(b.Z,{style:{marginTop:"-25px"}})}),(0,h.jsx)($.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:ot.target}):null]});return!gt&&He===void 0||!Je&&Xe===void 0?null:(0,h.jsxs)(Q.h4,{type:"Documentation",typeLink:ut,title:T||_,subtitle:q===""?void 0:q||_,children:[(0,h.jsx)(W.Z,{titleTemplate:"%s",children:(0,h.jsx)("title",{children:Ke})}),xt,A,L.renderComponentsByLocation(l.oZ.Header)]})}},65124:function(It,ze,t){"use strict";t.d(ze,{b:function(){return M}});var h=t(52322),n=t(2784),W=t(79692),$=t(15223),g=t(95544),b=t(80030),l=t(61837),P=t(48348),ne=t(47603),Q=t(61886);const X=(0,W.Z)(z=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:z.spacing(3,3,0)}})),M=z=>{const _=X(),[ae,le]=(0,n.useState)(null),A=(0,n.useCallback)(et=>{le(et.currentTarget)},[]),L=(0,n.useCallback)(()=>{le(null)},[]),{entityMetadata:{value:O,loading:T}}=(0,Q.x1)(),S=(0,Q.$L)(),q=S.renderComponentsByLocation(Q.oZ.Subheader),Te=S.renderComponentsByLocation(Q.oZ.Settings);return!q&&!Te||T===!1&&!O?null:(0,h.jsx)($.Z,{classes:_,...z.toolbarProps,children:(0,h.jsxs)(g.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[q,Te?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(b.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)(P.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:ae,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(ae),onClose:L,keepMounted:!0,children:Te})]}):null]})})}},95481:function(It,ze,t){"use strict";t.d(ze,{DK:function(){return M},m1:function(){return _}});var h=t(52322),n=t(2784),W=t(73557),$=t(61886),g=t(25248),b=t(64279),l=t(77446);function P({contentLoading:ae,content:le,activeSyncState:A}){return ae||A==="BUILD_READY_RELOAD"||!le&&A==="CHECKING"?"CHECKING":!le&&A==="BUILDING"?"INITIAL_BUILD":le?A==="BUILDING"?"CONTENT_STALE_REFRESHING":A==="BUILD_READY"?"CONTENT_STALE_READY":A==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function ne(ae,le){const A={...ae};switch(le.type){case"sync":le.state==="CHECKING"&&(A.buildLog=[]),A.activeSyncState=le.state,A.syncError=le.syncError;break;case"contentLoading":A.contentLoading=!0,A.contentError=void 0;break;case"content":typeof le.path=="string"&&(A.path=le.path),A.contentLoading=!1,A.content=le.content,A.contentError=le.contentError;break;case"buildLog":A.buildLog=A.buildLog.concat(le.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(A.activeSyncState)&&["contentLoading","content"].includes(le.type)&&(A.activeSyncState="UP_TO_DATE",A.buildLog=[]),A}function Q(ae,le,A,L){var O,T;const[S,q]=(0,n.useReducer)(ne,{activeSyncState:"CHECKING",path:L,contentLoading:!0,buildLog:[]}),Te=(0,g.h_)($.Dl),{retry:et}=(0,l.Z)(async()=>{q({type:"contentLoading"});try{const He=await Te.getEntityDocs({kind:ae,namespace:le,name:A},L);return q({type:"content",content:He,path:L}),He}catch(He){q({type:"content",contentError:He,path:L})}},[Te,ae,le,A,L]),Xe=(0,n.useRef)({content:void 0,reload:()=>{}});return Xe.current={content:S.content,reload:et},(0,b.default)(async()=>{q({type:"sync",state:"CHECKING"});const He=setTimeout(()=>{q({type:"sync",state:"BUILDING"})},1e3);try{switch(await Te.syncEntityDocs({kind:ae,namespace:le,name:A},Ee=>{q({type:"buildLog",log:Ee})})){case"updated":Xe.current.content?q({type:"sync",state:"BUILD_READY"}):(Xe.current.reload(),q({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":q({type:"sync",state:"UP_TO_DATE"});break;default:q({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(gt){q({type:"sync",state:"ERROR",syncError:gt})}finally{clearTimeout(He)}},[ae,A,le,Te,q,Xe]),{state:(0,n.useMemo)(()=>P({activeSyncState:S.activeSyncState,contentLoading:S.contentLoading,content:S.content}),[S.activeSyncState,S.content,S.contentLoading]),contentReload:et,path:S.path,content:S.content,contentErrorMessage:(O=S.contentError)===null||O===void 0?void 0:O.toString(),syncErrorMessage:(T=S.syncError)===null||T===void 0?void 0:T.toString(),buildLog:S.buildLog}}const X=(0,n.createContext)({}),M=()=>(0,n.useContext)(X),z=({children:ae})=>{const{"*":le=""}=(0,W.UO)(),{entityRef:A}=(0,$.x1)(),{kind:L,namespace:O,name:T}=A,S=Q(L,O,T,le);return(0,h.jsx)(X.Provider,{value:S,children:ae instanceof Function?ae(S):ae})},_=ae=>le=>(0,h.jsx)(z,{children:(0,h.jsx)(ae,{...le})})},95573:function(It,ze,t){"use strict";t.d(ze,{Fw:function(){return W},_Z:function(){return n},pd:function(){return $}});var h=t(25248);const n=(0,h.NT)({id:"techdocs:index-page"}),W=(0,h.NT)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),$=(0,h.NT)({id:"techdocs:catalog-reader-view"})},17339:function(It,ze,t){"use strict";t.d(ze,{S:function(){return L}});var h=t(52322),n=t(2784),W=t(79692),$=t(49378),g=t(38402),b=t(86136),l=t(85256),P=t(93414),ne=t(25248),Q=t(65826);const X=(0,W.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),M=O=>{const{result:T,highlight:S,rank:q,lineClamp:Te=5,asListItem:et=!0,asLink:Xe=!0,title:Je,icon:He}=O,gt=X(),Ee=(0,ne.z$)(),Ke=()=>{Ee.captureEvent("discover",T.title,{attributes:{to:T.location},value:q})},ot=({children:it})=>Xe?(0,h.jsx)(P.rU,{noTrack:!0,to:T.location,onClick:Ke,children:it}):(0,h.jsx)(h.Fragment,{children:it}),mt=()=>{const it=S!=null&&S.fields.title?(0,h.jsx)(Q.FA,{text:S.fields.title,preTag:S.preTag,postTag:S.postTag}):T.title,ut=S!=null&&S.fields.entityTitle?(0,h.jsx)(Q.FA,{text:S.fields.entityTitle,preTag:S.preTag,postTag:S.postTag}):T.entityTitle,xt=S!=null&&S.fields.name?(0,h.jsx)(Q.FA,{text:S.fields.name,preTag:S.preTag,postTag:S.postTag}):T.name;return(0,h.jsx)($.Z,{className:gt.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,h.jsx)(ot,{children:Je||(0,h.jsxs)(h.Fragment,{children:[it," | ",ut!=null?ut:xt," docs"]})}),secondary:(0,h.jsx)("span",{style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:Te,overflow:"hidden"},children:S!=null&&S.fields.text?(0,h.jsx)(Q.FA,{text:S.fields.text,preTag:S.preTag,postTag:S.postTag}):T.text})})},rt=({children:it})=>et?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(g.Z,{alignItems:"flex-start",children:[He&&(0,h.jsx)(b.Z,{children:He}),(0,h.jsx)("div",{className:gt.flexContainer,children:it})]}),(0,h.jsx)(l.Z,{component:"li"})]}):(0,h.jsx)(h.Fragment,{children:it});return(0,h.jsx)(rt,{children:(0,h.jsx)(mt,{})})};var z=t(27556),_=t(73557);const ae=(0,W.Z)(O=>({root:{width:"100%"},bar:{padding:O.spacing(1)}})),le=O=>O==null?void 0:O.document,A=O=>{const{entityId:T,entityTitle:S,debounceTime:q=150}=O,[Te,et]=(0,n.useState)(!1),Xe=(0,_.s0)(),{setFilters:Je,result:{loading:He,value:gt}}=(0,Q.Rx)(),Ee=ae(),[Ke,ot]=(0,n.useState)([]);(0,n.useEffect)(()=>{let xt=!0;if(xt&>){const Rt=gt.results.slice(0,10);ot(Rt)}return()=>{xt=!1}},[He,gt]);const{kind:mt,name:rt,namespace:it}=T;(0,n.useEffect)(()=>{Je(xt=>({...xt,kind:mt,namespace:it,name:rt}))},[mt,it,rt,Je]);const ut=(xt,Rt)=>{if(le(Rt)){const{location:We}=Rt.document;Xe(We)}};return(0,h.jsx)(z.Z,{className:Ee.bar,variant:"outlined",children:(0,h.jsx)(Q.qO,{classes:{root:Ee.root},"data-testid":"techdocs-search-bar",size:"small",open:Te,getOptionLabel:()=>"",filterOptions:xt=>xt,onClose:()=>{et(!1)},onFocus:()=>{et(!0)},onChange:ut,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ke,renderOption:({document:xt,highlight:Rt})=>(0,h.jsx)(M,{result:xt,lineClamp:3,asListItem:!1,asLink:!1,title:xt.title,highlight:Rt}),loading:He,inputDebounceTime:q,inputPlaceholder:`Search ${S||T.name} docs`,freeSolo:!1})})},L=O=>{const T={term:"",types:["techdocs"],pageCursor:"",filters:O.entityId};return(0,h.jsx)(Q.Nd,{initialState:T,children:(0,h.jsx)(A,{...O})})}},53260:function(){}},function(It){var ze=function(h){return It(It.s=h)};It.O(0,[2370,6202,9284,9035,2126,7012,2194,1410,427,6816,5218,5924,4736],function(){return ze(89925)});var t=It.O()}]);})();
|
|
493
493
|
|
|
494
|
-
//# sourceMappingURL=main.
|
|
494
|
+
//# sourceMappingURL=main.cdfaed72.js.map
|