@techdocs/cli 0.0.0-nightly-20230326022406 → 0.0.0-nightly-20230328022219
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 +3 -3
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{main.11e508c8.js → main.aeb32919.js} +2 -2
- package/dist/embedded-app/static/main.aeb32919.js.map +1 -0
- package/dist/embedded-app/static/module-zod.49079951.js +3 -0
- package/dist/embedded-app/static/module-zod.49079951.js.map +1 -0
- package/dist/embedded-app/static/{runtime.11e508c8.js → runtime.aeb32919.js} +1 -1
- package/dist/embedded-app/static/{runtime.11e508c8.js.map → runtime.aeb32919.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.11e508c8.js → vendor.aeb32919.js} +1 -1
- package/dist/embedded-app/static/{vendor.11e508c8.js.map → vendor.aeb32919.js.map} +1 -1
- package/package.json +4 -4
- package/dist/embedded-app/static/main.11e508c8.js.map +0 -1
- package/dist/embedded-app/static/module-zod.cdb212b6.js +0 -3
- package/dist/embedded-app/static/module-zod.cdb212b6.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-20230328022219
|
|
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-
|
|
9
|
+
- @backstage/backend-common@0.0.0-nightly-20230328022219
|
|
10
10
|
- @backstage/catalog-model@1.2.1
|
|
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-20230328022219
|
|
14
14
|
|
|
15
15
|
## 1.4.1-next.0
|
|
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.aeb32919.js"></script><script defer="defer" src="/static/module-material-ui.1f3c23cb.js"></script><script defer="defer" src="/static/module-lodash.b0e3bf8c.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.f096b58d.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-dom.34e67991.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.aeb32919.js"></script><script defer="defer" src="/static/main.aeb32919.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -122,7 +122,7 @@ spec:
|
|
|
122
122
|
/* TYPESET */
|
|
123
123
|
--md-typeset-font-size: 1rem;
|
|
124
124
|
--md-typeset-color: var(--md-default-fg-color);
|
|
125
|
-
--md-typeset-a-color:
|
|
125
|
+
--md-typeset-a-color: ${g.palette.link};
|
|
126
126
|
--md-typeset-table-color: ${g.palette.text.primary};
|
|
127
127
|
--md-typeset-del-color: ${g.palette.type==="dark"?(0,he.Fq)(g.palette.error.dark,.5):(0,he.Fq)(g.palette.error.light,.5)};
|
|
128
128
|
--md-typeset-ins-color: ${g.palette.type==="dark"?(0,he.Fq)(g.palette.success.dark,.5):(0,he.Fq)(g.palette.success.light,.5)};
|
|
@@ -505,4 +505,4 @@ ${Y.href}
|
|
|
505
505
|
|
|
506
506
|
Feedback:`),yt=(me==null?void 0:me.type)==="github"?(0,ln.BT)(ge.href,"blob"):ge.href,at=Mn()(yt),qe=`/${at.organization}/${at.name}`,Ze=Y.cloneNode();switch(me==null?void 0:me.type){case"gitlab":Ze.href=`${ge.origin}${qe}/issues/new?issue[title]=${it}&issue[description]=${rt}`;break;case"github":Ze.href=`${ge.origin}${qe}/issues/new?title=${it}&body=${rt}`;break;default:return j}return Fn.render(r.createElement(wn.Z),Ze),Ze.style.paddingLeft="5px",Ze.title="Leave feedback for this page",Ze.id="git-feedback-link",Y==null||Y.insertAdjacentElement("beforebegin",Ze),j};var nt=t(44882);const zn=()=>g=>{const j=g.querySelector('.md-header label[for="__drawer"]'),J=g.querySelector("article");if(!j||!J)return g;const Y=j.cloneNode();return Fn.render(r.createElement(nt.Z),Y),Y.id="toggle-sidebar",Y.title="Toggle Sidebar",Y.classList.add("md-content__button"),Y.style.setProperty("padding","0 0 0 5px"),Y.style.setProperty("margin","0.4rem 0 0.4rem 0.4rem"),J==null||J.prepend(Y),g},Pn=()=>g=>(((J,Y)=>{Array.from(J).filter(ge=>ge.hasAttribute(Y)).forEach(ge=>{const me=ge.getAttribute(Y);if(me){me.match(/^https?:\/\//i)&&ge.setAttribute("target","_blank");try{const Ue=Wn(window.location.href);ge.setAttribute(Y,new URL(me,Ue).toString())}catch{ge.replaceWith(ge.textContent||me)}}})})(Array.from(g.getElementsByTagName("a")),"href"),g);function Wn(g){const j=new URL(g);return!j.pathname.endsWith("/")&&!j.pathname.endsWith(".html")&&(j.pathname+="/"),j.toString()}const Sn=({baseUrl:g,onClick:j})=>J=>(Array.from(J.getElementsByTagName("a")).forEach(Y=>{Y.addEventListener("click",ge=>{const Ue=Y.getAttribute("href");Ue&&Ue.startsWith(g)&&!Y.hasAttribute("download")&&(ge.preventDefault(),j(ge,Ue))})}),J);var sn=t(15459),Ln=t(80030),gn=t(72379),jn=t(41547),Vn=t(95074);const fe=(0,sn.Z)(g=>({tooltip:{fontSize:"inherit",color:g.palette.text.primary,margin:0,padding:g.spacing(.5),backgroundColor:"transparent",boxShadow:"none"}}))(Ln.ZP),oe=()=>(0,u.jsx)(gn.Z,{children:(0,u.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"})}),ke=({text:g})=>{const[j,J]=(0,r.useState)(!1),[,Y]=(0,Vn.Z)(),ge=(0,r.useCallback)(()=>{Y(g),J(!0)},[g,Y]),me=(0,r.useCallback)(()=>{J(!1)},[J]);return(0,u.jsx)(fe,{title:"Copied to clipboard",placement:"left",open:j,onClose:me,leaveDelay:1e3,children:(0,u.jsx)(S.Z,{style:{color:"inherit"},className:"md-clipboard md-icon",onClick:ge,children:(0,u.jsx)(oe,{})})})},Fe=g=>j=>{const J=j.querySelectorAll("pre > code");for(const ge of J){var Y;const me=ge.textContent||"",Ue=document.createElement("div");ge==null||(Y=ge.parentElement)===null||Y===void 0||Y.prepend(Ue),Fn.render((0,u.jsx)(jn.Z,{theme:g,children:(0,u.jsx)(ke,{text:me})}),Ue)}return j},Ke=()=>g=>{var j;return(j=g.querySelector(".md-header"))===null||j===void 0||j.remove(),g},te=()=>g=>{var j,J;return(j=g.querySelector(".md-footer .md-copyright"))===null||j===void 0||j.remove(),(J=g.querySelector(".md-footer-copyright"))===null||J===void 0||J.remove(),g},N=({onLoading:g,onLoaded:j})=>J=>(g(),J.addEventListener(m.Ox,function Y(){j(),J.removeEventListener(m.Ox,Y)}),J),pe=()=>g=>(g.addEventListener(m.Ox,function j(){if(window.location.hash){var J;const Y=window.location.hash.slice(1);(J=g==null?void 0:g.querySelector(`[id="${Y}"]`))===null||J===void 0||J.scrollIntoView()}g.removeEventListener(m.Ox,j)}),g),Ae=()=>g=>(setTimeout(()=>{const j=g==null?void 0:g.querySelectorAll("li.md-nav__item--active");j.length!==0&&(j.forEach(Y=>{const ge=Y==null?void 0:Y.querySelector("input");ge!=null&&ge.checked||ge==null||ge.click()}),j[j.length-1].scrollIntoView())},200),g),Qe=async(g,j)=>{let J;if(typeof g=="string")J=new DOMParser().parseFromString(g,"text/html").documentElement;else if(g instanceof Element)J=g;else throw new Error("dom is not a recognized type");for(const Y of j)J=await Y(J);return J},Xe="screen and (max-width: 76.1875em)",Tt=g=>{const j=(0,Ve.s0)(),J=(0,et.Z)(),Y=(0,K.Z)(Xe),ge=ve(),me=Vt(),Ue=(0,R.z$)(),it=(0,R.h_)(m.Dl),rt=(0,R.h_)(tt.q3),{state:yt,path:at,content:qe}=(0,L.DK)(),[Ze,$t]=(0,r.useState)(null),Ht=(0,m.ux)(Ze),Rt=(0,r.useCallback)(()=>{if(!Ze)return;Ze.querySelectorAll(".md-sidebar").forEach(_e=>{if(Y)_e.style.top="0px";else{const cn=document==null?void 0:document.querySelector(".techdocs-reader-page");var Ot;const Cn=(Ot=cn==null?void 0:cn.getBoundingClientRect().top)!==null&&Ot!==void 0?Ot:0;var tn;let Qn=(tn=Ze.getBoundingClientRect().top)!==null&&tn!==void 0?tn:0;const kn=Ze.querySelector(".md-container > .md-tabs");var En;const mn=(En=kn==null?void 0:kn.getBoundingClientRect().height)!==null&&En!==void 0?En:0;Qn<Cn&&(Qn=Cn),_e.style.top=`${Math.max(Qn,0)+mn}px`}_e.style.setProperty("opacity","1")})},[Ze,Y]);(0,r.useEffect)(()=>(window.addEventListener("resize",Rt),window.addEventListener("scroll",Rt,!0),()=>{window.removeEventListener("resize",Rt),window.removeEventListener("scroll",Rt,!0)}),[Ze,Rt]);const It=(0,r.useCallback)(()=>{if(!Ze)return;const vt=Ze.querySelector(".md-footer");vt&&(vt.style.width=`${Ze.getBoundingClientRect().width}px`)},[Ze]);(0,r.useEffect)(()=>(window.addEventListener("resize",It),()=>{window.removeEventListener("resize",It)}),[Ze,It]),(0,r.useEffect)(()=>{Ht||(It(),Rt())},[yt,Ht,It,Rt]);const en=(0,r.useCallback)((vt,_e)=>Qe(vt,[ge,In({techdocsStorageApi:it,entityId:g,path:_e}),Pn(),zn(),Ke(),te(),Jn(rt),me]),[g,rt,it,ge,me]),Dt=(0,r.useCallback)(async vt=>Qe(vt,[pe(),Ae(),Fe(J),Sn({baseUrl:window.location.origin,onClick:(_e,Ot)=>{var tn;const En=_e.ctrlKey||_e.metaKey,cn=new URL(Ot),Cn=`${cn.pathname}${cn.search}${cn.hash}`,Qn=((tn=_e.target)===null||tn===void 0?void 0:tn.innerText)||Ot,kn=Ot.replace(window.location.origin,"");if(Ue.captureEvent("click",Qn,{attributes:{to:kn}}),cn.hash)if(En)window.open(Cn,"_blank");else{var mn;j(Cn),(mn=vt==null?void 0:vt.querySelector(`[id="${cn.hash.slice(1)}"]`))===null||mn===void 0||mn.scrollIntoView()}else En?window.open(Cn,"_blank"):j(Cn)}}),N({onLoading:()=>{},onLoaded:()=>{var _e;(_e=vt.querySelector(".md-nav__title"))===null||_e===void 0||_e.removeAttribute("for")}}),N({onLoading:()=>{Array.from(vt.querySelectorAll(".md-sidebar")).forEach(Ot=>{Ot.style.setProperty("opacity","0")})},onLoaded:()=>{}})]),[J,j,Ue]);return(0,r.useEffect)(()=>{if(!qe)return()=>{};let vt=!0;return en(qe,at).then(async _e=>{if(!(_e!=null&&_e.innerHTML)||!vt)return;window.scroll({top:0});const Ot=await Dt(_e);$t(Ot)}),()=>{vt=!1}},[qe,at,en,Dt]),Ze};var Gt=t(8560);const an=()=>{const g=(0,m.$L)(),{shadowRoot:j}=(0,m.x1)(),J=j==null?void 0:j.querySelector('[data-md-component="content"]'),Y=j==null?void 0:j.querySelector('div[data-md-component="sidebar"][data-md-type="navigation"], div[data-md-component="navigation"]');let ge=Y==null?void 0:Y.querySelector('[data-techdocs-addons-location="primary sidebar"]');ge||(ge=document.createElement("div"),ge.setAttribute("data-techdocs-addons-location","primary sidebar"),Y==null||Y.prepend(ge));const me=j==null?void 0:j.querySelector('div[data-md-component="sidebar"][data-md-type="toc"], div[data-md-component="toc"]');let Ue=me==null?void 0:me.querySelector('[data-techdocs-addons-location="secondary sidebar"]');return Ue||(Ue=document.createElement("div"),Ue.setAttribute("data-techdocs-addons-location","secondary sidebar"),me==null||me.prepend(Ue)),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Gt.Z,{container:ge,children:g.renderComponentsByLocation(m.oZ.PrimarySidebar)}),(0,u.jsx)(Gt.Z,{container:J,children:g.renderComponentsByLocation(m.oZ.Content)}),(0,u.jsx)(Gt.Z,{container:Ue,children:g.renderComponentsByLocation(m.oZ.SecondarySidebar)})]})},ne=(0,z.Z)({search:{width:"100%","@media (min-width: 76.1875em)":{width:"calc(100% - 34.4rem)",margin:"0 auto"}}}),Q=(0,L.m1)(g=>{var j;const{withSearch:J=!0,onReady:Y}=g,ge=ne(),{entityMetadata:{value:me,loading:Ue},entityRef:it,setShadowRoot:rt}=(0,m.x1)(),yt=Tt(it),at=(0,r.useCallback)(qe=>{rt(qe),Y instanceof Function&&Y()},[rt,Y]);return Ue===!1&&!me?(0,u.jsx)(y.mf,{status:"404",statusMessage:"PAGE NOT FOUND"}):yt?(0,u.jsx)(y.VY,{children:(0,u.jsxs)(P.Z,{container:!0,children:[(0,u.jsx)(P.Z,{xs:12,item:!0,children:(0,u.jsx)(Ce,{})}),J&&(0,u.jsx)(P.Z,{className:ge.search,xs:"auto",item:!0,children:(0,u.jsx)(c.S,{entityId:it,entityTitle:me==null||(j=me.metadata)===null||j===void 0?void 0:j.title})}),(0,u.jsx)(P.Z,{xs:12,item:!0,children:(0,u.jsx)(m.VA,{element:yt,onAppend:at,children:(0,u.jsx)(an,{})})})]})}):(0,u.jsx)(y.VY,{children:(0,u.jsx)(P.Z,{container:!0,children:(0,u.jsx)(P.Z,{xs:12,item:!0,children:(0,u.jsx)(Ce,{})})})})}),se=null},93225:function(bt,$e,t){"use strict";t.d($e,{S:function(){return q}});var u=t(52322),r=t(2784),z=t(18671),P=t(60905),m=t(98069),y=t(60364),c=t(73250),$=t(61886),Ee=t(40303),ue=t(25271),G=t(23196),Z=t(60871),S=t(76635),V=t(95573);const re=(0,u.jsx)(m.Z,{animation:"wave",variant:"text",height:40}),q=_=>{const{palette:{common:{white:B}}}=(0,y.Z)(),{children:R}=_,k=(0,$.$L)(),L=(0,Z.h_)(Z.Ds),{title:W,setTitle:Ce,subtitle:Ve,setSubtitle:et,entityRef:K,metadata:{value:tt,loading:dt},entityMetadata:{value:ze,loading:ft}}=(0,$.x1)();(0,r.useEffect)(()=>{tt&&(Ce(tt.site_name),et(()=>{let{site_description:he}=tt;return(!he||he==="None")&&(he=""),he}))},[tt,Ce,et]);const Ie=L.getOptional("app.title")||"Backstage",lt=[W,Ve,Ie].filter(Boolean).join(" | "),{locationMetadata:Et,spec:pt}=ze||{},mt=pt==null?void 0:pt.lifecycle,At=ze?(0,Ee.hF)(ze,ue.S4):[],Nt=(0,Z.tg)(V._Z)(),We=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(G.i9,{label:(0,S.capitalize)((ze==null?void 0:ze.kind)||"entity"),value:(0,u.jsx)(Ee.dx,{color:"inherit",entityRef:K,title:ze==null?void 0:ze.metadata.title,defaultKind:"Component"})}),At.length>0&&(0,u.jsx)(G.i9,{label:"Owner",value:(0,u.jsx)(Ee.rI,{color:"inherit",entityRefs:At,defaultKind:"group"})}),mt?(0,u.jsx)(G.i9,{label:"Lifecycle",value:mt}):null,Et&&Et.type!=="dir"&&Et.type!=="file"?(0,u.jsx)(G.i9,{label:"",value:(0,u.jsxs)(P.Z,{container:!0,direction:"column",alignItems:"center",style:{color:B},children:[(0,u.jsx)(P.Z,{style:{padding:0},item:!0,children:(0,u.jsx)(c.Z,{style:{marginTop:"-25px"}})}),(0,u.jsx)(P.Z,{style:{padding:0},item:!0,children:"Source"})]}),url:Et.target}):null]});return!ft&&ze===void 0||!dt&&tt===void 0?null:(0,u.jsxs)(G.h4,{type:"Documentation",typeLink:Nt,title:W||re,subtitle:Ve===""?void 0:Ve||re,children:[(0,u.jsx)(z.Z,{titleTemplate:"%s",children:(0,u.jsx)("title",{children:lt})}),We,R,k.renderComponentsByLocation($.oZ.Header)]})}},65124:function(bt,$e,t){"use strict";t.d($e,{b:function(){return Z}});var u=t(52322),r=t(2784),z=t(79692),P=t(15223),m=t(95544),y=t(80030),c=t(61837),$=t(48348),Ee=t(47603),ue=t(61886);const G=(0,z.Z)(S=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:S.spacing(3,3,0)}})),Z=S=>{const V=G(),[re,q]=(0,r.useState)(null),_=(0,r.useCallback)(Ve=>{q(Ve.currentTarget)},[]),B=(0,r.useCallback)(()=>{q(null)},[]),{entityMetadata:{value:R,loading:k}}=(0,ue.x1)(),L=(0,ue.$L)(),W=L.renderComponentsByLocation(ue.oZ.Subheader),Ce=L.renderComponentsByLocation(ue.oZ.Settings);return!W&&!Ce||k===!1&&!R?null:(0,u.jsx)(P.Z,{classes:V,...S.toolbarProps,children:(0,u.jsxs)(m.Z,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[W,Ce?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(y.ZP,{title:"Settings",children:(0,u.jsx)(c.Z,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:_,children:(0,u.jsx)(Ee.Z,{})})}),(0,u.jsx)($.Z,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:re,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:Boolean(re),onClose:B,keepMounted:!0,children:(0,u.jsx)("div",{children:Ce})})]}):null]})})}},95481:function(bt,$e,t){"use strict";t.d($e,{DK:function(){return Z},m1:function(){return V}});var u=t(52322),r=t(2784),z=t(79635),P=t(61886),m=t(60871),y=t(64279),c=t(77446);function $({contentLoading:re,content:q,activeSyncState:_}){return re||_==="BUILD_READY_RELOAD"||!q&&_==="CHECKING"?"CHECKING":!q&&_==="BUILDING"?"INITIAL_BUILD":q?_==="BUILDING"?"CONTENT_STALE_REFRESHING":_==="BUILD_READY"?"CONTENT_STALE_READY":_==="ERROR"?"CONTENT_STALE_ERROR":"CONTENT_FRESH":"CONTENT_NOT_FOUND"}function Ee(re,q){const _={...re};switch(q.type){case"sync":q.state==="CHECKING"&&(_.buildLog=[]),_.activeSyncState=q.state,_.syncError=q.syncError;break;case"contentLoading":_.contentLoading=!0,_.contentError=void 0;break;case"content":typeof q.path=="string"&&(_.path=q.path),_.contentLoading=!1,_.content=q.content,_.contentError=q.contentError;break;case"buildLog":_.buildLog=_.buildLog.concat(q.log);break;default:throw new Error}return["BUILD_READY","BUILD_READY_RELOAD"].includes(_.activeSyncState)&&["contentLoading","content"].includes(q.type)&&(_.activeSyncState="UP_TO_DATE",_.buildLog=[]),_}function ue(re,q,_,B){var R,k;const[L,W]=(0,r.useReducer)(Ee,{activeSyncState:"CHECKING",path:B,contentLoading:!0,buildLog:[]}),Ce=(0,m.h_)(P.Dl),{retry:Ve}=(0,c.Z)(async()=>{W({type:"contentLoading"});try{const tt=await Ce.getEntityDocs({kind:re,namespace:q,name:_},B);return W({type:"content",content:tt,path:B}),tt}catch(tt){W({type:"content",contentError:tt,path:B})}},[Ce,re,q,_,B]),et=(0,r.useRef)({content:void 0,reload:()=>{}});return et.current={content:L.content,reload:Ve},(0,y.default)(async()=>{W({type:"sync",state:"CHECKING"});const tt=setTimeout(()=>{W({type:"sync",state:"BUILDING"})},1e3);try{switch(await Ce.syncEntityDocs({kind:re,namespace:q,name:_},ze=>{W({type:"buildLog",log:ze})})){case"updated":et.current.content?W({type:"sync",state:"BUILD_READY"}):(et.current.reload(),W({type:"sync",state:"BUILD_READY_RELOAD"}));break;case"cached":W({type:"sync",state:"UP_TO_DATE"});break;default:W({type:"sync",state:"ERROR",syncError:new Error("Unexpected return state")});break}}catch(dt){W({type:"sync",state:"ERROR",syncError:dt})}finally{clearTimeout(tt)}},[re,_,q,Ce,W,et]),{state:(0,r.useMemo)(()=>$({activeSyncState:L.activeSyncState,contentLoading:L.contentLoading,content:L.content}),[L.activeSyncState,L.content,L.contentLoading]),contentReload:Ve,path:L.path,content:L.content,contentErrorMessage:(R=L.contentError)===null||R===void 0?void 0:R.toString(),syncErrorMessage:(k=L.syncError)===null||k===void 0?void 0:k.toString(),buildLog:L.buildLog}}const G=(0,r.createContext)({}),Z=()=>(0,r.useContext)(G),S=re=>{const{children:q}=re,{"*":_=""}=(0,z.UO)(),{entityRef:B}=(0,P.x1)(),{kind:R,namespace:k,name:L}=B,W=ue(R,k,L,_);return(0,u.jsx)(G.Provider,{value:W,children:q instanceof Function?q(W):q})},V=re=>q=>(0,u.jsx)(S,{children:(0,u.jsx)(re,{...q})})},95573:function(bt,$e,t){"use strict";t.d($e,{Fw:function(){return z},_Z:function(){return r},pd:function(){return P}});var u=t(60871);const r=(0,u.NT)({id:"techdocs:index-page"}),z=(0,u.NT)({id:"techdocs:reader-page",params:["namespace","kind","name"]}),P=(0,u.NT)({id:"techdocs:catalog-reader-view"})},55511:function(bt,$e,t){"use strict";t.r($e),t.d($e,{TechDocsSearchResultListItem:function(){return ue}});var u=t(52322),r=t(2784),z=t(79692),P=t(49378),m=t(86136),y=t(90436),c=t(23196),$=t(15096);const Ee=(0,z.Z)({flexContainer:{flexWrap:"wrap"},itemText:{width:"100%",marginBottom:"1rem"}}),ue=G=>{const{result:Z,highlight:S,lineClamp:V=5,asListItem:re=!0,asLink:q=!0,title:_,icon:B}=G,R=Ee(),k=({children:Ce})=>q?(0,u.jsx)(c.rU,{noTrack:!0,to:Z.location,children:Ce}):(0,u.jsx)(u.Fragment,{children:Ce}),L=()=>{const Ce=S!=null&&S.fields.title?(0,u.jsx)($.FA,{text:S.fields.title,preTag:S.preTag,postTag:S.postTag}):Z.title,Ve=S!=null&&S.fields.entityTitle?(0,u.jsx)($.FA,{text:S.fields.entityTitle,preTag:S.preTag,postTag:S.postTag}):Z.entityTitle,et=S!=null&&S.fields.name?(0,u.jsx)($.FA,{text:S.fields.name,preTag:S.preTag,postTag:S.postTag}):Z.name;return Z?(0,u.jsx)(P.Z,{className:R.itemText,primaryTypographyProps:{variant:"h6"},primary:(0,u.jsx)(k,{children:_||(0,u.jsxs)(u.Fragment,{children:[Ce," | ",Ve!=null?Ve:et," docs"]})}),secondary:(0,u.jsx)(y.Z,{component:"span",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:V,overflow:"hidden"},color:"textSecondary",variant:"body2",children:S!=null&&S.fields.text?(0,u.jsx)($.FA,{text:S.fields.text,preTag:S.preTag,postTag:S.postTag}):Z.text})}):null},W=({children:Ce})=>re?(0,u.jsxs)(u.Fragment,{children:[B&&(0,u.jsx)(m.Z,{children:typeof B=="function"?B(Z):B}),(0,u.jsx)("div",{className:R.flexContainer,children:Ce})]}):(0,u.jsx)(u.Fragment,{children:Ce});return(0,u.jsx)(W,{children:(0,u.jsx)(L,{})})}},22478:function(bt,$e,t){"use strict";t.d($e,{S:function(){return G}});var u=t(52322),r=t(15096),z=t(79692),P=t(27556),m=t(2784),y=t(79635),c=t(55511);const $=(0,z.Z)(Z=>({root:{width:"100%"},bar:{padding:Z.spacing(1)}})),Ee=Z=>Z==null?void 0:Z.document,ue=Z=>{const{entityId:S,entityTitle:V,debounceTime:re=150}=Z,[q,_]=(0,m.useState)(!1),B=(0,y.s0)(),{setFilters:R,result:{loading:k,value:L}}=(0,r.Rx)(),W=$(),[Ce,Ve]=(0,m.useState)([]);(0,m.useEffect)(()=>{let ze=!0;if(ze&&L){const ft=L.results.slice(0,10);Ve(ft)}return()=>{ze=!1}},[k,L]);const{kind:et,name:K,namespace:tt}=S;(0,m.useEffect)(()=>{R(ze=>({...ze,kind:et,namespace:tt,name:K}))},[et,tt,K,R]);const dt=(ze,ft)=>{if(Ee(ft)){const{location:Ie}=ft.document;B(Ie)}};return(0,u.jsx)(P.Z,{className:W.bar,variant:"outlined",children:(0,u.jsx)(r.qO,{classes:{root:W.root},"data-testid":"techdocs-search-bar",size:"small",open:q,getOptionLabel:()=>"",filterOptions:ze=>ze,onClose:()=>{_(!1)},onFocus:()=>{_(!0)},onChange:dt,blurOnSelect:!0,noOptionsText:"No results found",value:null,options:Ce,renderOption:({document:ze,highlight:ft})=>(0,u.jsx)(c.TechDocsSearchResultListItem,{result:ze,lineClamp:3,asListItem:!1,asLink:!1,title:ze.title,highlight:ft}),loading:k,inputDebounceTime:re,inputPlaceholder:`Search ${V||S.name} docs`,freeSolo:!1})})},G=Z=>{const S={term:"",types:["techdocs"],pageCursor:"",filters:Z.entityId};return(0,u.jsx)(r.Nd,{initialState:S,children:(0,u.jsx)(ue,{...Z})})}},53260:function(){}},function(bt){var $e=function(u){return bt(bt.s=u)};bt.O(0,[2370,6202,9284,9035,2126,7012,2194,1410,427,5109,6816,5218,4736],function(){return $e(6290)});var t=bt.O()}]);})();
|
|
507
507
|
|
|
508
|
-
//# sourceMappingURL=main.
|
|
508
|
+
//# sourceMappingURL=main.aeb32919.js.map
|