PageSourceSearch

https://www.techietribe.ai/assets/DocsList-B8GM5ir_.js

js techietribe.ai collected 2026-10-05 12:44:46 UTC 4,700 bytes, 2 lines download raw bytes

1import{r as s,u as L,d as R,j as t,c as m,L as P}from"./frontendTemplateSiteData--Oq-hEBy.js";import{h as _,J as k,K as N,N as B,O as T,t as W,Q as $,r as F}from"./main-DBLgW3GG.js";import{b as j,c as O,D as e,a as Q}from"./DocsLayout-DvYFIbvj.js";import{B as H}from"./Breadcrumbs-z_WnAYUt.js";import{B as r,S as q}from"./TemplateEngine-DxO5mW8-.js";import"./Drawer-BqkPn01O.js";import"./Slide-McNp9kbS.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"b2c5c7d2d433d6519411d05bd4d13389d2ae988c"};var c=new o.Error().stack;c&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[c]="83a8070a-e81b-4001-91d8-b282c56c3492",o._sentryDebugIdIdentifier="sentry-dbid-83a8070a-e81b-4001-91d8-b282c56c3492")}catch{}})();const v=10,G=(o,c=160)=>{if(o.description)return o.description;const i=(o.content||"").replace(/#+\s/g,"").replace(/[*_`>]/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\n+/g," ").trim();return i.length>c?i.slice(0,c)+"…":i},D=s.memo(({article:o})=>m(r,{component:P,to:`/docs/${o.slug}`,sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:2,py:2,textDecoration:"none",transition:"background-color 0.12s","&:hover":{bgcolor:e.surfaceHover},"&:hover .docs-row-arrow":{opacity:1,transform:"translateX(2px)"}},children:[m(r,{sx:{minWidth:0},children:[t(r,{sx:{fontWeight:650,color:e.text,mb:.25},children:o.title}
1),t(r,{sx:{color:e.textMuted,fontSize:"0.875rem",lineHeight:1.5},children:G(o)})]}),t(r,{className:"docs-row-arrow",sx:{color:e.textFaint,opacity:0,transition:"opacity 0.12s, transform 0.12s",flexShrink:0,display:"flex"},children:t(F,{size:16})})]}));D.displayName="ArticleRow";const J=s.memo(()=>{const{category:o=""}=L(),[c,i]=R(),u=parseInt(c.get("page")||"1",10),[g,f]=s.useState([]),[b,y]=s.useState(0),[S,w]=s.useState(1),[h]=s.useState(!1),[p,I]=s.useState(null),[d,E]=s.useState(""),C=j(o),A=s.useCallback(async()=>{I(null);const a=O(o,u,v);f(a.articles),y(a.total),w(a.totalPages);try{const n=(await _.get("/docs",{params:{category:o,page:u,limit:v}})).data;Array.isArray(n==null?void 0:n.articles)&&(f(n.articles),y((n==null?void 0:n.total)??n.articles.length),w((n==null?void 0:n.totalPages)??1))}catch{}},[o,u]);s.useEffect(()=>{A()},[A]);const x=s.useMemo(()=>{if(!d.trim())return g;const a=d.toLowerCase();return g.filter(l=>l.title.toLowerCase().includes(a))},[g,d]),M=s.useCallback((a,l)=>{i({page:String(l)}),window.scrollTo({top:0,behavior:"smooth"})},[i]),z=s.useCallback(a=>E(a.target.value),[]);return t(Q,{children:m(r,{sx:{maxWidth:820,mx:"auto",px:{xs:2.5,md:6},py:{xs:4,md:6}},children:[m(H,{separator:t(k,{size:13,color:e.textFaint}),sx:{mb:2},children:[t(r,{component:P,to:"/docs",sx:{color:e.textMuted,textDecoration:"none",fontSize:"0.8rem","&:hover":{color:e.text}},children:"Docs"}),t(r,{component:"span",sx:{color:e.text,fontWeight:600,fontSize:"0.8rem"},children:C})]}),t(r,{component:"h1",sx:{fontWeight:800,color:e.text,m:0,mb:.5,fontSize:{xs:"1.7rem",md:"2.1rem"},letterSpacing:"-0.02em"},children:C}),t(r,{sx:{color:e.textMuted,mb:3,fontSize:"0.9rem"},children:b>0?`${b} articles`:"No articles yet"}),t(r,{sx:{mb:2,maxWidth:360},children:t(N,{value:d,onChange:z,placeholder:"Filter in this category…",size:"small",fullWidth:!0,InputProps:{startAdornment:t(B,{position:"start",children:t(T,{size:16,color:e.textFaint})})},sx:{"& .MuiOutlinedInput-root":{borderRadius:"10px",bgcolor:e.surface,color:e.text,fontSize:"0.875rem","& fieldset":{borderColor:e.border},"&:hover fieldset":{borderColor:e.borderStrong},"&.Mui-focused fieldset":{borderColor:e.accent}},"& .MuiOutlinedInput-input::placeholder":{color:e.textFaint,opacity:1}}})}),p&&t(W,{severity:"error",sx:{mb:3},children:p}),h&&t(r,{sx:{display:"flex",flexDirection:"column",gap:1},children:Array.from({length:5}).map((a,l)=>t(q,{variant:"rectangular",height:68,sx:{borderRadius:"10px",bgcolor:e.surface}},l))}),!h&&!p&&x.length===0&&t(r,{sx:{textAlign:"center",py:8,color:e.textMuted},children:d?`No articles match "${d}"`:"No articles in this category yet."}),!h&&!p&&x.length>0&&t(r,{sx:{border:`1px solid ${e.border}`,borderRadius:"12px",overflow:"hidden",bgcolor:e.surface,"& > a:not(:last-of-type)":{borderBottom:`1px solid ${e.border}`}},children:x.map(a=>t(D,{article:a},a.id))}),!h&&!p&&S>1&&t(r,{sx:{display:"flex",justifyContent:"center",mt:4,"& .MuiPaginationItem-root":{color:e.textMuted},"& .Mui-selected":{bgcolor:`${e.accentSoftBg} !important`,color:e.accent}},children:t($,{count:S,page:u,onChange:M,shape:"rounded"})})]})})});J.displayName="DocsList";export{J as default};
2//# sourceMappingURL=DocsList-B8GM5ir_.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.