@techdocs/cli 0.0.0-nightly-20230412021859 → 0.0.0-nightly-20230413021854
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 +4 -4
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{main.0450c515.js → main.aff5c553.js} +1 -1
- package/dist/embedded-app/static/{main.0450c515.js.map → main.aff5c553.js.map} +1 -1
- package/dist/embedded-app/static/module-luxon.ee277e4b.js +3 -0
- package/dist/embedded-app/static/module-luxon.ee277e4b.js.map +1 -0
- package/dist/embedded-app/static/{runtime.0450c515.js → runtime.aff5c553.js} +1 -1
- package/dist/embedded-app/static/{runtime.0450c515.js.map → runtime.aff5c553.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.0450c515.js → vendor.aff5c553.js} +1 -1
- package/dist/embedded-app/static/{vendor.0450c515.js.map → vendor.aff5c553.js.map} +1 -1
- package/package.json +5 -5
- package/dist/embedded-app/static/module-luxon.f096b58d.js +0 -3
- package/dist/embedded-app/static/module-luxon.f096b58d.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-20230413021854
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- b348420a804: Adding global-agent to enable the ability to publish through a proxy
|
|
8
8
|
- Updated dependencies
|
|
9
|
-
- @backstage/backend-common@0.0.0-nightly-
|
|
10
|
-
- @backstage/catalog-model@0.0.0-nightly-
|
|
9
|
+
- @backstage/backend-common@0.0.0-nightly-20230413021854
|
|
10
|
+
- @backstage/catalog-model@0.0.0-nightly-20230413021854
|
|
11
11
|
- @backstage/cli-common@0.1.12
|
|
12
12
|
- @backstage/config@1.0.7
|
|
13
|
-
- @backstage/plugin-techdocs-node@0.0.0-nightly-
|
|
13
|
+
- @backstage/plugin-techdocs-node@0.0.0-nightly-20230413021854
|
|
14
14
|
|
|
15
15
|
## 1.4.1-next.3
|
|
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.aff5c553.js"></script><script defer="defer" src="/static/module-material-ui.1f3c23cb.js"></script><script defer="defer" src="/static/module-lodash.4c9a1319.js"></script><script defer="defer" src="/static/module-date-fns.eeb6d2d2.js"></script><script defer="defer" src="/static/module-yaml.feabae04.js"></script><script defer="defer" src="/static/module-ajv.be583887.js"></script><script defer="defer" src="/static/module-material-table.2aa637a9.js"></script><script defer="defer" src="/static/module-luxon.ee277e4b.js"></script><script defer="defer" src="/static/module-octokit.10809b9e.js"></script><script defer="defer" src="/static/module-react-dom.d698fbed.js"></script><script defer="defer" src="/static/module-react-router.3fa3d41e.js"></script><script defer="defer" src="/static/module-react-router-dom.87e15add.js"></script><script defer="defer" src="/static/module-zod.49079951.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.c3c3faee.js"></script><script defer="defer" src="/static/vendor.aff5c553.js"></script><script defer="defer" src="/static/main.aff5c553.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -505,4 +505,4 @@ ${J.href}
|
|
|
505
505
|
|
|
506
506
|
Feedback:`),lt=(Re==null?void 0:Re.type)==="github"?(0,An.BT)(Ce.href,"blob"):Ce.href,We=Wn()(lt),ut=`/${We.organization}/${We.name}`,it=J.cloneNode();switch(Re==null?void 0:Re.type){case"gitlab":it.href=`${Ce.origin}${ut}/issues/new?issue[title]=${yt}&issue[description]=${Ge}`;break;case"github":it.href=`${Ce.origin}${ut}/issues/new?title=${yt}&body=${Ge}`;break;default:return N}return On.render(r.createElement(hn.Z),it),it.style.paddingLeft="5px",it.title="Leave feedback for this page",it.id="git-feedback-link",J==null||J.insertAdjacentElement("beforebegin",it),N};var Qn=n(44882);const dt=()=>m=>{const N=m.querySelector('.md-header label[for="__drawer"]'),_=m.querySelector("article");if(!N||!_)return m;const J=N.cloneNode();return On.render(r.createElement(Qn.Z),J),J.id="toggle-sidebar",J.title="Toggle Sidebar",J.classList.add("md-content__button"),J.style.setProperty("padding","0 0 0 5px"),J.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),_==null||_.prepend(J),m},Qt=()=>m=>(((_,J)=>{Array.from(_).filter(Ce=>Ce.hasAttribute(J)).forEach(Ce=>{const Re=Ce.getAttribute(J);if(Re){Re.match(/^https?:\/\//i)&&Ce.setAttribute("target","_blank");try{const Xe=wn(window.location.href);Ce.setAttribute(J,new URL(Re,Xe).toString())}catch{Ce.replaceWith(Ce.textContent||Re)}}})})(Array.from(m.getElementsByTagName("a")),"href"),m);function wn(m){const N=new URL(m);return!N.pathname.endsWith("/")&&!N.pathname.endsWith(".html")&&(N.pathname+="/"),N.toString()}const Tn=({baseUrl:m,onClick:N})=>_=>(Array.from(_.getElementsByTagName("a")).forEach(J=>{J.addEventListener("click",Ce=>{const Xe=J.getAttribute("href");Xe&&Xe.startsWith(m)&&!J.hasAttribute("download")&&(Ce.preventDefault(),N(Ce,Xe))})}),_);var yn=n(15459),Mt=n(80030),ln=n(72379),bn=n(41547),on=n(95074);const Hn=(0,yn.Z)(m=>({tooltip:{fontSize:"inherit",color:m.palette.text.primary,margin:0,padding:m.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Mt.ZP),we=()=>(0,d.jsx)(ln.Z,{children:(0,d.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"})}),le=({text:m})=>{const[N,_]=(0,r.useState)(!1),[,J]=(0,on.Z)(),Ce=(0,r.useCallback)(()=>{J(m),_(!0)},[m,J]),Re=(0,r.useCallback)(()=>{_(!1)},[_]);return(0,d.jsx)(Hn,{title:"Copied to clipboard",placement:"left",open:N,onClose:Re,leaveDelay:1e3,children:(0,d.jsx)(R.Z,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:Ce,children:(0,d.jsx)(we,{})})})},$e=m=>N=>{const _=N.querySelectorAll("pre > code");for(const Ce of _){var J;const Re=Ce.textContent||"",Xe=document.createElement("div");Ce==null||(J=Ce.parentElement)===null||J===void 0||J.prepend(Xe),On.render((0,d.jsx)(bn.Z,{theme:m,children:(0,d.jsx)(le,{text:Re})}),Xe)}return N},Ue=()=>m=>{var N;return(N=m.querySelector(".md-header"))===null||N===void 0||N.remove(),m},et=()=>m=>{var N,_;return(N=m.querySelector(".md-footer .md-copyright"))===null||N===void 0||N.remove(),(_=m.querySelector(".md-footer-copyright"))===null||_===void 0||_.remove(),m},q=({onLoading:m,onLoaded:N})=>_=>(m(),_.addEventListener(g.Ox,function J(){N(),_.removeEventListener(g.Ox,J)}),_),U=()=>m=>(m.addEventListener(g.Ox,function N(){if(window.location.hash){var _;const J=window.location.hash.slice(1);(_=m==null?void 0:m.querySelector(`[id="${J}"]`))===null||_===void 0||_.scrollIntoView()}m.removeEventListener(g.Ox,N)}),m),ve=()=>m=>(setTimeout(()=>{const N=m==null?void 0:m.querySelectorAll("li.md-nav__item--active");N.length!==0&&(N.forEach(J=>{const Ce=J==null?void 0:J.querySelector("input");Ce!=null&&Ce.checked||Ce==null||Ce.click()}),N[N.length-1].scrollIntoView())},200),m),Ee=async(m,N)=>{let _;if(typeof m=="string")_=new DOMParser().parseFromString(m,"text/html").documentElement;else if(m instanceof Element)_=m;else throw new Error("dom is not a recognized type");for(const J of N)_=await J(_);return _};var tt=n(73557);function st(m,N){const _=new URL(N),J=`${_.origin}${_.pathname.replace(/\/$/,"")}`,Ce=m.replace(J,"").replace(/\/+$/,"").replace(/^\/+/,""),Re=new URL(`http://localhost/${Ce}`);return`${Re.pathname}${Re.search}${Re.hash}`}function kt(){const m=(0,tt.s0)(),_=(0,A.h_)(A.Ds).getOptionalString("app.baseUrl");return(0,r.useCallback)(Ce=>{let Re=Ce;if(_)try{Re=st(Ce,_)}catch{}m(Re)},[m,_])}const Gt="screen and (max-width: 76.1875em)",pn=m=>{const N=kt(),_=(0,ze.Z)(),J=(0,rt.Z)(Gt),Ce=Xt(),Re=Wt(),Xe=(0,A.z$)(),yt=(0,A.h_)(g.Dl),Ge=(0,A.h_)(H.q3),{state:lt,path:We,content:ut}=(0,P.DK)(),[it,zt]=(0,r.useState)(null),Nt=(0,g.ux)(it),Kt=(0,r.useCallback)(()=>{if(!it)return;it.querySelectorAll(".md-sidebar").forEach(Ot=>{if(J)Ot.style.top="0px";else{const Gn=document==null?void 0:document.querySelector(".techdocs-reader-page");var en;const or=(en=Gn==null?void 0:Gn.getBoundingClientRect().top)!==null&&en!==void 0?en:0;var jn;let fn=(jn=it.getBoundingClientRect().top)!==null&&jn!==void 0?jn:0;const Sn=it.querySelector(".md-container > .md-tabs");var Rn;const sr=(Rn=Sn==null?void 0:Sn.getBoundingClientRect().height)!==null&&Rn!==void 0?Rn:0;fn<or&&(fn=or),Ot.style.top=`${Math.max(fn,0)+sr}px`}Ot.style.setProperty("opacity","1")})},[it,J]);(0,r.useEffect)(()=>(window.addEventListener("resize",Kt),window.addEventListener("scroll",Kt,!0),()=>{window.removeEventListener("resize",Kt),window.removeEventListener("scroll",Kt,!0)}),[it,Kt]);const Vt=(0,r.useCallback)(()=>{if(!it)return;const It=it.querySelector(".md-footer");It&&(It.style.width=`${it.getBoundingClientRect().width}px`)},[it]);(0,r.useEffect)(()=>(window.addEventListener("resize",Vt),()=>{window.removeEventListener("resize",Vt)}),[it,Vt]),(0,r.useEffect)(()=>{Nt||(Vt(),Kt())},[lt,Nt,Vt,Kt]);const Bt=(0,r.useCallback)((It,Ot)=>Ee(It,[Ce,zn({techdocsStorageApi:yt,entityId:m,path:Ot}),Qt(),dt(),Ue(),et(),Bn(Ge),Re]),[m,Ge,yt,Ce,Re]),xt=(0,r.useCallback)(async It=>Ee(It,[U(),ve(),$e(_),Tn({baseUrl:window.location.origin,onClick:(Ot,en)=>{var jn;const Rn=Ot.ctrlKey||Ot.metaKey,Gn=new URL(en),or=((jn=Ot.target)===null||jn===void 0?void 0:jn.innerText)||en,fn=en.replace(window.location.origin,"");if(Xe.captureEvent("click",or,{attributes:{to:fn}}),Gn.hash)if(Rn)window.open(en,"_blank");else{var Sn;N(en),(Sn=It==null?void 0:It.querySelector(`[id="${Gn.hash.slice(1)}"]`))===null||Sn===void 0||Sn.scrollIntoView()}else Rn?window.open(en,"_blank"):N(en)}}),q({onLoading:()=>{},onLoaded:()=>{var Ot;(Ot=It.querySelector(".md-nav__title"))===null||Ot===void 0||Ot.removeAttribute("for")}}),q({onLoading:()=>{Array.from(It.querySelectorAll(".md-sidebar")).forEach(en=>{en.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[_,N,Xe]);return(0,r.useEffect)(()=>{if(!ut)return()=>{};let It=!0;return Bt(ut,We).then(async Ot=>{if(!(Ot!=null&&Ot.innerHTML)||!It)return;window.scroll({top:0});const en=await xt(Ot);zt(en)}),()=>{It=!1}},[ut,We,Bt,xt]),it};var ee=n(8560);const Y=()=>{const m=(0,g.$L)(),{shadowRoot:N}=(0,g.x1)(),_=N==null?void 0:N.querySelector('[data-md-component="content"]'),J=N==null?void 0:N.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let Ce=J==null?void 0:J.querySelector('[data-techdocs-addons-location="primary sidebar"]');Ce||(Ce=document.createElement("div"),Ce.setAttribute("data-techdocs-addons-location","primary sidebar"),J==null||J.prepend(Ce));const Re=N==null?void 0:N.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let Xe=Re==null?void 0:Re.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return Xe||(Xe=document.createElement("div"),Xe.setAttribute("data-techdocs-addons-location","secondary sidebar"),Re==null||Re.prepend(Xe)),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ee.Z,{container:Ce,children:m.renderComponentsByLocation(g.oZ.PrimarySidebar)}),(0,d.jsx)(ee.Z,{container:_,children:m.renderComponentsByLocation(g.oZ.Content)}),(0,d.jsx)(ee.Z,{container:Xe,children:m.renderComponentsByLocation(g.oZ.SecondarySidebar)})]})},oe=(0,z.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),he=(0,P.m1)(m=>{var N;const{withSearch:_=!0,onReady:J}=m,Ce=oe(),{entityMetadata:{value:Re,loading:Xe},entityRef:yt,setShadowRoot:Ge}=(0,g.x1)(),lt=pn(yt),We=(0,r.useCallback)(ut=>{Ge(ut),J instanceof Function&&J()},[Ge,J]);return Xe===!1&&!Re?(0,d.jsx)(v.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}):lt?(0,d.jsx)(v.VY,{children:(0,d.jsxs)(I.Z,{container:!0,children:[(0,d.jsx)(I.Z,{xs:12,item:!0,children:(0,d.jsx)(me,{})}),_&&(0,d.jsx)(I.Z,{className:Ce.search,xs:"auto",item:!0,children:(0,d.jsx)(c.S,{entityId:yt,entityTitle:Re==null||(N=Re.metadata)===null||N===void 0?void 0:N.title})}),(0,d.jsx)(I.Z,{xs:12,item:!0,children:(0,d.jsx)(g.VA,{element:lt,onAppend:We,children:(0,d.jsx)(Y,{})})})]})}):(0,d.jsx)(v.VY,{children:(0,d.jsx)(I.Z,{container:!0,children:(0,d.jsx)(I.Z,{xs:12,item:!0,children:(0,d.jsx)(me,{})})})})}),ie=null},93225:function(wt,De,n){"use strict";n.d(De,{S:function(){return X}});var d=n(52322),r=n(2784),z=n(18671),I=n(60905),g=n(98069),v=n(60364),c=n(73250),B=n(61886),Ie=n(40303),fe=n(25271),G=n(47223),$=n(60871),R=n(76635),O=n(95573);const re=(0,d.jsx)(g.Z,{animation:"wave",variant:"text",height:40}),X=te=>{const{palette:{common:{white:D}}}=(0,v.Z)(),{children:A}=te,L=(0,B.$L)(),P=(0,$.h_)($.Ds),{title:V,setTitle:me,subtitle:ze,setSubtitle:rt,entityRef:H,metadata:{value:ot,loading:vt},entityMetadata:{value:Je,loading:ht}}=(0,B.x1)();(0,r.useEffect)(()=>{ot&&(me(ot.site_name),rt(()=>{let{site_description:xe}=ot;return(!xe||xe==="None")&&(xe=""),xe}))},[ot,me,rt]);const Le=P.getOptional("app.title")||"Backstage",bt=[V,ze,Le].filter(Boolean).join(" | "),{locationMetadata:Tt,spec:pt}=Je||{},gt=pt==null?void 0:pt.lifecycle,jt=Je?(0,Ie.hF)(Je,fe.S4):[],$t=(0,$.tg)(O._Z)(),He=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(G.i9,{label:(0,R.capitalize)((Je==null?void 0:Je.kind)||"entity"),value:(0,d.jsx)(Ie.dx,{color:"inherit",entityRef:H,title:Je==null?void 0:Je.metadata.title,defaultKind:"Component"})}),jt.length>0&&(0,d.jsx)(G.i9,{label:"Owner",value:(0,d.jsx)(Ie.rI,{color:"inherit",entityRefs:jt,defaultKind:"group"})}),gt?(0,d.jsx)(G.i9,{label:"Lifecycle",value:gt}):null,Tt&&Tt.type!=="dir"&&Tt.type!=="file"?(0,d.jsx)(G.i9,{label:"",value:(0,d.jsxs)(I.Z,{container:!0,direction:"column",alignItems:"center",style:{color:D},children:[(0,d.jsx)(I.Z,{style:{padding:0},item:!0,children:(0,d.jsx)(c.Z,{style:{marginTop:"-25px"}})}),(0,d.jsx)(I.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:Tt.target}):null]});return!ht&&Je===void 0||!vt&&ot===void 0?null:(0,d.jsxs)(G.h4,{type:"Documentation",typeLink:$t,title:V||re,subtitle:ze===""?void 0:ze||re,children:[(0,d.jsx)(z.Z,{titleTemplate:"%s",children:(0,d.jsx)("title",{children:bt})}),He,A,L.renderComponentsByLocation(B.oZ.Header)]})}},65124:function(wt,De,n){"use strict";n.d(De,{b:function(){return $}});var d=n(52322),r=n(2784),z=n(79692),I=n(15223),g=n(95544),v=n(80030),c=n(61837),B=n(48348),Ie=n(47603),fe=n(61886);const G=(0,z.Z)(R=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:R.spacing(3,3,0)}})),$=R=>{const O=G(),[re,X]=(0,r.useState)(null),te=(0,r.useCallback)(ze=>{X(ze.currentTarget)},[]),D=(0,r.useCallback)(()=>{X(null)},[]),{entityMetadata:{value:A,loading:L}}=(0,fe.x1)(),P=(0,fe.$L)(),V=P.renderComponentsByLocation(fe.oZ.Subheader),me=P.renderComponentsByLocation(fe.oZ.Settings);return!V&&!me||L===!1&&!A?null:(0,d.jsx)(I.Z,{classes:O,...R.toolbarProps,children:(0,d.jsxs)(g.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[V,me?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(v.ZP,{title:"Settings",children:(0,d.jsx)(c.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:te,children:(0,d.jsx)(Ie.Z,{})})}),(0,d.jsx)(B.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:re,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(re),onClose:D,keepMounted:!0,children:(0,d.jsx)("div",{children:me})})]}):null]})})}},95481:function(wt,De,n){"use strict";n.d(De,{DK:function(){return $},m1:function(){return O}});var d=n(52322),r=n(2784),z=n(73557),I=n(61886),g=n(60871),v=n(64279),c=n(77446);function B({contentLoading:re,content:X,activeSyncState:te}){return re||te==="BUILD_READY_RELOAD"||!X&&te==="CHECKING"?"CHECKING":!X&&te==="BUILDING"?"INITIAL_BUILD":X?te==="BUILDING"?"CONTENT_STALE_REFRESHING":te==="BUILD_READY"?"CONTENT_STALE_READY":te==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Ie(re,X){const te={...re};switch(X.type){case"sync":X.state==="CHECKING"&&(te.buildLog=[]),te.activeSyncState=X.state,te.syncError=X.syncError;break;case"contentLoading":te.contentLoading=!0,te.contentError=void 0;break;case"content":typeof X.path=="string"&&(te.path=X.path),te.contentLoading=!1,te.content=X.content,te.contentError=X.contentError;break;case"buildLog":te.buildLog=te.buildLog.concat(X.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(te.activeSyncState)&&["contentLoading","content"].includes(X.type)&&(te.activeSyncState="UP_TO_DATE",te.buildLog=[]),te}function fe(re,X,te,D){var A,L;const[P,V]=(0,r.useReducer)(Ie,{activeSyncState:"CHECKING",path:D,contentLoading:!0,buildLog:[]}),me=(0,g.h_)(I.Dl),{retry:ze}=(0,c.Z)(async()=>{V({type:"contentLoading"});try{const ot=await me.getEntityDocs({kind:re,namespace:X,name:te},D);return V({type:"content",content:ot,path:D}),ot}catch(ot){V({type:"content",contentError:ot,path:D})}},[me,re,X,te,D]),rt=(0,r.useRef)({content:void 0,reload:()=>{}});return rt.current={content:P.content,reload:ze},(0,v.default)(async()=>{V({type:"sync",state:"CHECKING"});const ot=setTimeout(()=>{V({type:"sync",state:"BUILDING"})},1e3);try{switch(await me.syncEntityDocs({kind:re,namespace:X,name:te},Je=>{V({type:"buildLog",log:Je})})){case"updated":rt.current.content?V({type:"sync",state:"BUILD_READY"}):(rt.current.reload(),V({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":V({type:"sync",state:"UP_TO_DATE"});break;default:V({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(vt){V({type:"sync",state:"ERROR",syncError:vt})}finally{clearTimeout(ot)}},[re,te,X,me,V,rt]),{state:(0,r.useMemo)(()=>B({activeSyncState:P.activeSyncState,contentLoading:P.contentLoading,content:P.content}),[P.activeSyncState,P.content,P.contentLoading]),contentReload:ze,path:P.path,content:P.content,contentErrorMessage:(A=P.contentError)===null||A===void 0?void 0:A.toString(),syncErrorMessage:(L=P.syncError)===null||L===void 0?void 0:L.toString(),buildLog:P.buildLog}}const G=(0,r.createContext)({}),$=()=>(0,r.useContext)(G),R=re=>{const{children:X}=re,{"*":te=""}=(0,z.UO)(),{entityRef:D}=(0,I.x1)(),{kind:A,namespace:L,name:P}=D,V=fe(A,L,P,te);return(0,d.jsx)(G.Provider,{value:V,children:X instanceof Function?X(V):X})},O=re=>X=>(0,d.jsx)(R,{children:(0,d.jsx)(re,{...X})})},95573:function(wt,De,n){"use strict";n.d(De,{Fw:function(){return z},_Z:function(){return r},pd:function(){return I}});var d=n(60871);const r=(0,d.NT)({id:"techdocs:index-page"}),z=(0,d.NT)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),I=(0,d.NT)({id:"techdocs:catalog-reader-view"})},55511:function(wt,De,n){"use strict";n.r(De),n.d(De,{TechDocsSearchResultListItem:function(){return fe}});var d=n(52322),r=n(2784),z=n(79692),I=n(49378),g=n(86136),v=n(90436),c=n(47223),B=n(15096);const Ie=(0,z.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),fe=G=>{const{result:$,highlight:R,lineClamp:O=5,asListItem:re=!0,asLink:X=!0,title:te,icon:D}=G,A=Ie(),L=({children:me})=>X?(0,d.jsx)(c.rU,{noTrack:!0,to:$.location,children:me}):(0,d.jsx)(d.Fragment,{children:me}),P=()=>{const me=R!=null&&R.fields.title?(0,d.jsx)(B.FA,{text:R.fields.title,preTag:R.preTag,postTag:R.postTag}):$.title,ze=R!=null&&R.fields.entityTitle?(0,d.jsx)(B.FA,{text:R.fields.entityTitle,preTag:R.preTag,postTag:R.postTag}):$.entityTitle,rt=R!=null&&R.fields.name?(0,d.jsx)(B.FA,{text:R.fields.name,preTag:R.preTag,postTag:R.postTag}):$.name;return $?(0,d.jsx)(I.Z,{className:A.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,d.jsx)(L,{children:te||(0,d.jsxs)(d.Fragment,{children:[me," | ",ze!=null?ze:rt," docs"]})}),secondary:(0,d.jsx)(v.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:O,overflow:"hidden"},color:"textSecondary",variant:"body2",children:R!=null&&R.fields.text?(0,d.jsx)(B.FA,{text:R.fields.text,preTag:R.preTag,postTag:R.postTag}):$.text})}):null},V=({children:me})=>re?(0,d.jsxs)(d.Fragment,{children:[D&&(0,d.jsx)(g.Z,{children:typeof D=="function"?D($):D}),(0,d.jsx)("div",{className:A.flexContainer,children:me})]}):(0,d.jsx)(d.Fragment,{children:me});return(0,d.jsx)(V,{children:(0,d.jsx)(P,{})})}},22478:function(wt,De,n){"use strict";n.d(De,{S:function(){return G}});var d=n(52322),r=n(15096),z=n(79692),I=n(27556),g=n(2784),v=n(73557),c=n(55511);const B=(0,z.Z)($=>({root:{width:"100%"},bar:{padding:$.spacing(1)}})),Ie=$=>$==null?void 0:$.document,fe=$=>{const{entityId:R,entityTitle:O,debounceTime:re=150}=$,[X,te]=(0,g.useState)(!1),D=(0,v.s0)(),{setFilters:A,result:{loading:L,value:P}}=(0,r.Rx)(),V=B(),[me,ze]=(0,g.useState)([]);(0,g.useEffect)(()=>{let Je=!0;if(Je&&P){const ht=P.results.slice(0,10);ze(ht)}return()=>{Je=!1}},[L,P]);const{kind:rt,name:H,namespace:ot}=R;(0,g.useEffect)(()=>{A(Je=>({...Je,kind:rt,namespace:ot,name:H}))},[rt,ot,H,A]);const vt=(Je,ht)=>{if(Ie(ht)){const{location:Le}=ht.document;D(Le)}};return(0,d.jsx)(I.Z,{className:V.bar,variant:"outlined",children:(0,d.jsx)(r.qO,{classes:{root:V.root},"data-testid":"techdocs-search-bar",size:"small",open:X,getOptionLabel:()=>"",filterOptions:Je=>Je,onClose:()=>{te(!1)},onFocus:()=>{te(!0)},onChange:vt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:me,renderOption:({document:Je,highlight:ht})=>(0,d.jsx)(c.TechDocsSearchResultListItem,{result:Je,lineClamp:3,asListItem:!1,asLink:!1,title:Je.title,highlight:ht}),loading:L,inputDebounceTime:re,inputPlaceholder:`Search ${O||R.name} docs`,freeSolo:!1})})},G=$=>{const R={term:"",types:["techdocs"],pageCursor:"",filters:$.entityId};return(0,d.jsx)(r.Nd,{initialState:R,children:(0,d.jsx)(fe,{...$})})}},53260:function(){}},function(wt){var De=function(d){return wt(wt.s=d)};wt.O(0,[2370,6202,9284,9035,2126,7012,2194,1410,427,242,5109,6816,5218,4736],function(){return De(6290)});var n=wt.O()}]);})();
|
|
507
507
|
|
|
508
|
-
//# sourceMappingURL=main.
|
|
508
|
+
//# sourceMappingURL=main.aff5c553.js.map
|