texlite 0.6.0 → 0.6.6
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/README.md +1 -0
- package/dist/client/assets/{BinaryModule-Aj1vLnwf-C2TCdTPg.js → BinaryModule-Aj1vLnwf-FnkCpIDV.js} +1 -1
- package/dist/client/assets/{GitDialog-9mNxx8oX.js → GitDialog-BtWtaeZV.js} +1 -1
- package/dist/client/assets/{HistoryDialog-CmoD9Cvf.js → HistoryDialog-DOzAQAQA.js} +1 -1
- package/dist/client/assets/{LatexEditor-Dp8EoZBP.js → LatexEditor-C5S1jijC.js} +20 -20
- package/dist/client/assets/PdfPreview-B3-kvd02.js +1 -0
- package/dist/client/assets/{ProjectNavigationDialogs-veKVnRxc.js → ProjectNavigationDialogs-DeEMFRsp.js} +1 -1
- package/dist/client/assets/{SystemMetricsDialog-D_oiVmBC.js → SystemMetricsDialog-DWh6yS0w.js} +1 -1
- package/dist/client/assets/binary-D_GeVl1T.js +1 -0
- package/dist/client/assets/index-C4KkkecE.js +17 -0
- package/dist/client/assets/index-DwzHKaKD.css +1 -0
- package/dist/client/assets/{index-CyEG4l54.js → index-nywS6bYC.js} +1 -1
- package/dist/client/assets/{plus-Bup73Wq6.js → plus-B_Bl12ZY.js} +1 -1
- package/dist/client/assets/{spellCheck-BHW5bumN.js → spellCheck-BynsoX26.js} +3 -3
- package/dist/client/index.html +2 -2
- package/dist/server/app.js +888 -339
- package/dist/server/archive.js +20 -3
- package/dist/server/auth.js +13 -2
- package/dist/server/collaboration.js +815 -124
- package/dist/server/compileArtifacts.js +31 -13
- package/dist/server/compiler.js +69 -20
- package/dist/server/db.js +6 -0
- package/dist/server/environment.js +4 -2
- package/dist/server/files.js +172 -25
- package/dist/server/git.js +152 -124
- package/dist/server/history.js +86 -18
- package/dist/server/http.js +26 -0
- package/dist/server/index.js +39 -26
- package/dist/server/instanceLock.js +137 -0
- package/dist/server/latexCompletion.js +23 -1
- package/dist/server/latexFormatter.js +4 -2
- package/dist/server/processTree.js +31 -0
- package/dist/server/projectMutations.js +255 -0
- package/dist/server/projectOutline.js +113 -1
- package/dist/server/projectSearch.js +6 -0
- package/dist/server/routes/compile.js +505 -128
- package/dist/server/security.js +61 -1
- package/dist/server/synctex.js +11 -2
- package/dist/server/zip.js +2 -1
- package/package.json +1 -1
- package/dist/client/assets/PdfPreview-IfkmLMSU.js +0 -1
- package/dist/client/assets/binary-DTriWQzf.js +0 -1
- package/dist/client/assets/index-CI87C5Wy.js +0 -17
- package/dist/client/assets/index-DB6GC33g.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as Z,r as i,j as n}from"./react-CsO_xvbl.js";import{g as O,P as U,w as Y,G as F}from"./pdf-DPnwNQHb.js";import{M as X,P as H,a as q}from"./plus-B_Bl12ZY.js";import{L as T}from"./index-C4KkkecE.js";F.workerSrc=Y;const G=new U;function re({url:y,target:u,compiling:N=!1,onViewportLocation:S,onDoubleClickLocation:h}){const{t}=Z(),p=i.useRef(null),[f,L]=i.useState(null),[v,x]=i.useState(0),[o,m]=i.useState(100),[R,M]=i.useState(""),z=i.useRef(new Map),j=i.useCallback((e,r)=>{r?z.current.set(e,r):z.current.delete(e)},[]),E=async e=>{if(!f||e==null)return;let r=e;if(typeof e=="string"&&(r=await f.getDestination(e).catch(()=>null)),!Array.isArray(r)||r.length===0)return;const d=r[0];let l=null;if(typeof d=="number"&&Number.isInteger(d))l=d;else if(d!=null)try{l=await f.getPageIndex(d)}catch{return}l==null||l<0||l>=f.numPages||z.current.get(l+1)?.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},w=()=>{const e=p.current;if(!e)return;const r=e.getBoundingClientRect(),d=r.left+r.width/2,l=r.top+r.height/2,D=[...e.querySelectorAll(".pdf-page")],s=D.find(P=>{const C=P.getBoundingClientRect();return l>=C.top&&l<=C.bottom})??D.reduce((P,C)=>{if(!P)return C;const $=Math.abs(C.getBoundingClientRect().top-l),B=Math.abs(P.getBoundingClientRect().top-l);return $<B?C:P},null);if(!s)return;const a=s.getBoundingClientRect(),c=Number(s.dataset.scale)||1,k=Number(s.dataset.page),W=Math.max(0,Math.min(a.width,d-a.left))/c,I=Math.max(0,Math.min(a.height,l-a.top))/c;k&&S(k,W,I)};i.useEffect(()=>{const e=p.current;if(!e)return;const r=()=>x(e.clientWidth);r();const d=new ResizeObserver(r);return d.observe(e),()=>d.disconnect()},[]),i.useEffect(()=>{let e=!1;L(null),M("");const r=O({url:y,worker:G});return r.promise.then(d=>{e||L(d)}).catch(()=>{e||M(t("editor.pdfLoadFailed"))}),()=>{e=!0,r.destroy()}},[y]),i.useEffect(()=>{o>100||!p.current||(p.current.scrollLeft=0)},[o,v,f]);const g=e=>m(r=>Math.min(200,Math.max(50,r+e))),A=()=>{p.current&&(p.current.scrollLeft=0),m(100)},b=e=>{!e.shiftKey||Math.abs(e.deltaX)>Math.abs(e.deltaY)||(e.preventDefault(),e.currentTarget.scrollLeft+=e.deltaY,w())};return n.jsxs("div",{className:"pdf-viewer",children:[n.jsxs("div",{className:"pdf-toolbar",role:"toolbar","aria-label":t("editor.pdfZoomControls"),children:[n.jsx("button",{disabled:o<=50,title:t("editor.pdfZoomOut"),"aria-label":t("editor.pdfZoomOut"),onClick:()=>g(-10),children:n.jsx(X,{size:14})}),n.jsxs("span",{className:"pdf-zoom-value","aria-live":"polite",children:[o,"%"]}),n.jsx("button",{disabled:o>=200,title:t("editor.pdfZoomIn"),"aria-label":t("editor.pdfZoomIn"),onClick:()=>g(10),children:n.jsx(H,{size:14})}),n.jsxs("button",{className:"pdf-fit-width",title:t("editor.pdfFitWidth"),onClick:A,children:[n.jsx(q,{size:13}),t("editor.pdfFitWidth")]})]}),N&&n.jsxs("div",{className:"pdf-compiling-overlay",role:"status","aria-live":"polite",children:[n.jsx(T,{className:"spin",size:20}),n.jsx("span",{children:t("editor.compiling")})]}),n.jsx("div",{className:"pdf-document",ref:p,onScroll:w,onWheel:b,children:n.jsxs("div",{className:"pdf-pages",style:{width:`${Math.max(1,v-28)*Math.max(1,o/100)}px`},children:[!f&&!R&&n.jsxs("div",{className:"pdf-loading",role:"status","aria-live":"polite",children:[n.jsx(T,{className:"spin",size:24}),n.jsx("span",{children:t("editor.loadingPdf")})]}),R&&n.jsx("div",{className:"preview-empty",children:n.jsx("strong",{children:R})}),f&&v>0&&Array.from({length:f.numPages},(e,r)=>n.jsx(_,{document:f,pageNumber:r+1,availableWidth:v-28,zoom:o/100,target:u?.page===r+1?u:null,onReady:w,onPageElement:j,onInternalLink:E,onDoubleClickLocation:h},r+1))]})})]})}function _({document:y,pageNumber:u,availableWidth:N,zoom:S,target:h,onReady:t,onPageElement:p,onInternalLink:f,onDoubleClickLocation:L}){const v=i.useRef(null),x=i.useRef(null),o=i.useRef(null),[m,R]=i.useState(1),[M,z]=i.useState({width:0,height:0}),[j,E]=i.useState(u===1),[w,g]=i.useState(!1),[A,b]=i.useState(null),[e,r]=i.useState([]);i.useEffect(()=>{const s=v.current;if(!s||j)return;if(!("IntersectionObserver"in window)){E(!0);return}const a=new IntersectionObserver(c=>{c.some(k=>k.isIntersecting)&&(E(!0),a.disconnect())},{rootMargin:"900px 0px"});return a.observe(s),()=>a.disconnect()},[j]),i.useEffect(()=>{h&&E(!0)},[h?.nonce]),i.useEffect(()=>{if(!j)return;let s=!1,a=null;return g(!1),b(null),r([]),y.getPage(u).then(c=>{if(s)return;const k=c.getViewport({scale:1}),W=N/k.width,I=Math.min(3.3,Math.max(.175,W*S)),P=c.getViewport({scale:I});if(R(I),z({width:P.width,height:P.height}),b(P),c.getAnnotations({intent:"display"}).then(B=>{s||r(B)}).catch(()=>{s||r([])}),!x.current)return;const C=Math.max(1,window.devicePixelRatio||1),$=c.getViewport({scale:I*C});return x.current.width=Math.floor($.width),x.current.height=Math.floor($.height),a=c.render({canvas:x.current,viewport:$}),a.promise.then(()=>{s||(g(!0),window.requestAnimationFrame(t))})}).catch(()=>{}),()=>{s=!0,a?.cancel()}},[y,u,N,S,j]),i.useEffect(()=>{!h||!o.current||o.current.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},[h?.nonce,m]);const d=s=>{if(!L||!w||s.target instanceof HTMLElement&&s.target.closest("a"))return;const a=x.current;if(!a)return;const c=a.getBoundingClientRect();if(s.clientX<c.left||s.clientX>c.right||s.clientY<c.top||s.clientY>c.bottom)return;const k=m||1,W=Math.max(0,Math.min(c.width,s.clientX-c.left))/k,I=Math.max(0,Math.min(c.height,s.clientY-c.top))/k;L(u,W,I)},l=Math.max(1,N*S),D=l*(792/612);return n.jsxs("figure",{ref:s=>{v.current=s,p(u,s)},onDoubleClick:d,className:`pdf-page${w?" rendered":" loading"}`,"data-page":u,"data-scale":m,style:{width:`${M.width||l}px`,minHeight:`${M.height||D}px`},children:[n.jsx("canvas",{ref:x,style:{width:`${M.width||l}px`,height:`${M.height||D}px`}}),w&&A&&n.jsx(K,{annotations:e,viewport:A,onInternalLink:f}),h&&n.jsx("span",{ref:o,className:"pdf-sync-marker",style:{left:h.x*m,top:h.y*m}}),n.jsx("figcaption",{children:u})]})}function K({annotations:y,viewport:u,onInternalLink:N}){const{t:S}=Z(),h=S("editor.pdfLink");return n.jsx("div",{className:"pdf-annotation-layer","aria-label":S("editor.pdfLinks"),children:y.filter(t=>t.subtype==="Link"&&Array.isArray(t.rect)&&t.rect.length>=4).map((t,p)=>{const[f,L]=u.convertToViewportPoint(t.rect[0],t.rect[1]),[v,x]=u.convertToViewportPoint(t.rect[2],t.rect[3]),o=[f,L,v,x],m=Math.min(o[0],o[2]),R=Math.min(o[1],o[3]),M=Math.abs(o[2]-o[0]),z=Math.abs(o[3]-o[1]),j=typeof t.title=="string"?t.title.trim():"",E=typeof t.unsafeUrl=="string"?t.unsafeUrl.trim():"",w=typeof t.url=="string"?t.url.trim():"",g=V(w)?w:V(E)?E:"",A=t.dest;if(!g&&A==null)return null;const b=!!g;return n.jsx("a",{className:"pdf-annotation-link",href:g||"#",target:b?"_blank":void 0,rel:b?"noreferrer":void 0,title:j||(b?g:h),"aria-label":j||(b?g:h),style:{left:m,top:R,width:M,height:z},onClick:b?void 0:e=>{e.preventDefault(),N(A)}},`${p}-${m}-${R}`)})})}function V(y){return/^(?:https?|mailto|ftp):/i.test(y)}export{re as PdfPreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as A,r,j as e}from"./react-CsO_xvbl.js";import{i as B,k as R,M as F,n as $,L as I,o as J,l as K,F as V,p as G}from"./index-
|
|
1
|
+
import{u as A,r,j as e}from"./react-CsO_xvbl.js";import{i as B,k as R,M as F,n as $,L as I,o as J,l as K,F as V,p as G}from"./index-C4KkkecE.js";const L=B("Replace",[["path",{d:"M14 4a2 2 0 0 1 2-2",key:"1w2hp7"}],["path",{d:"M16 10a2 2 0 0 1-2-2",key:"shjach"}],["path",{d:"M20 2a2 2 0 0 1 2 2",key:"188mtx"}],["path",{d:"M22 8a2 2 0 0 1-2 2",key:"ddf4tu"}],["path",{d:"m3 7 3 3 3-3",key:"x25e72"}],["path",{d:"M6 10V5a3 3 0 0 1 3-3h1",key:"3y3t5z"}],["rect",{x:"2",y:"14",width:"8",height:"8",rx:"2",key:"4rksxw"}]]);function Z({open:i,files:u,onOpenChange:l,onOpenFile:p}){const{t:a}=A(),[n,m]=r.useState(""),[d,o]=r.useState(0),f=r.useRef(null),h=r.useMemo(()=>u.filter(t=>t.type==="file").map(t=>({entry:t,score:H(t.path,n)})).filter(t=>t.score>=0).sort((t,c)=>c.score-t.score||t.entry.path.localeCompare(c.entry.path)).slice(0,100),[u,n]);r.useEffect(()=>{i&&(m(""),o(0),window.setTimeout(()=>f.current?.focus(),0))},[i]),r.useEffect(()=>o(t=>Math.min(t,Math.max(0,h.length-1))),[h.length]);const x=t=>{p(t),l(!1)};return e.jsx(F,{open:i,wide:!0,title:a("navigation.quickOpen"),description:a("navigation.quickOpenDescription"),onOpenChange:l,children:e.jsxs("div",{className:"quick-open-dialog",children:[e.jsxs("label",{children:[e.jsx($,{size:16}),e.jsx("input",{ref:f,value:n,placeholder:a("navigation.filePlaceholder"),onChange:t=>{m(t.target.value),o(0)},onKeyDown:t=>{t.key==="ArrowDown"&&(t.preventDefault(),o(c=>Math.min(h.length-1,c+1))),t.key==="ArrowUp"&&(t.preventDefault(),o(c=>Math.max(0,c-1))),t.key==="Enter"&&h[d]&&(t.preventDefault(),x(h[d].entry.path))}})]}),e.jsxs("div",{className:"quick-open-results",children:[h.map(({entry:t},c)=>e.jsxs("button",{className:c===d?"active":"",onMouseEnter:()=>o(c),onClick:()=>x(t.path),children:[e.jsx(V,{size:14}),e.jsx("span",{children:t.path}),c===d&&e.jsx(G,{size:13})]},t.path)),h.length===0&&e.jsx("p",{className:"muted padded",children:a("navigation.noFiles")})]})]})})}function _({open:i,project:u,onOpenChange:l,onJump:p}){const{t:a}=A(),[n,m]=r.useState(""),[d,o]=r.useState(""),[f,h]=r.useState(!1),[x,t]=r.useState(!1),[c,w]=r.useState([]),[v,C]=r.useState(0),[P,D]=r.useState(!1),[b,S]=r.useState(!1),[W,N]=r.useState(!1),[z,M]=r.useState(""),[q,k]=r.useState(""),[O,Q]=r.useState(0),y=r.useRef(null);r.useEffect(()=>{if(!i){y.current?.abort();return}if(M(""),k(""),!n.trim()){w([]),C(0),D(!1);return}const s=window.setTimeout(()=>{y.current?.abort();const j=new AbortController;y.current=j,S(!0);const E=new URLSearchParams({q:n});f&&E.set("caseSensitive","1"),x&&E.set("wholeWord","1"),R(`/api/projects/${u.id}/search?${E}`,{signal:j.signal}).then(g=>{w(g.matches),C(g.total),D(g.truncated)}).catch(g=>{g instanceof DOMException&&g.name==="AbortError"||k(T(g))}).finally(()=>{y.current===j&&(y.current=null,S(!1))})},250);return()=>window.clearTimeout(s)},[i,u.id,n,f,x,O]);const U=async()=>{N(!1),S(!0),k(""),M("");try{const s=await R(`/api/projects/${u.id}/search/replace`,{method:"POST",body:JSON.stringify({query:n,replacement:d,caseSensitive:f,wholeWord:x})});M(a("navigation.replaced",{count:s.replacements,files:s.files.length})),w([]),C(0),Q(j=>j+1)}catch(s){k(T(s))}finally{S(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(F,{open:i,extraWide:!0,title:a("navigation.projectSearch"),description:a("navigation.projectSearchDescription"),onOpenChange:l,footer:e.jsx("button",{onClick:()=>l(!1),children:a("common.close")}),children:e.jsxs("div",{className:"project-search-dialog",children:[q&&e.jsx("p",{className:"error",children:q}),z&&e.jsx("p",{className:"success",children:z}),e.jsxs("div",{className:"project-search-form",children:[e.jsxs("label",{className:"project-search-query",children:[e.jsx($,{size:16}),e.jsx("input",{autoFocus:!0,value:n,placeholder:a("navigation.searchPlaceholder"),onChange:s=>m(s.target.value)})]}),u.permission!=="read"&&e.jsxs("label",{className:"project-search-query",children:[e.jsx(L,{size:16}),e.jsx("input",{value:d,placeholder:a("navigation.replacePlaceholder"),onChange:s=>o(s.target.value)})]}),e.jsxs("div",{className:"project-search-options",children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:f,onChange:s=>h(s.target.checked)}),a("editor.search.matchCase")]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:x,onChange:s=>t(s.target.checked)}),a("editor.search.wholeWord")]}),u.permission!=="read"&&e.jsxs("button",{className:"danger-text",disabled:!n.trim()||v===0||b,onClick:()=>N(!0),children:[e.jsx(L,{size:13}),a("navigation.replaceAll",{count:v})]})]})]}),e.jsxs("div",{className:"project-search-summary",children:[e.jsx("span",{children:b?e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"spin",size:13}),a("common.loading")]}):a("navigation.matchSummary",{count:v})}),P&&e.jsx("small",{children:a("navigation.truncated",{count:c.length})})]}),e.jsxs("div",{className:"project-search-results",children:[c.map((s,j)=>e.jsxs("button",{onClick:()=>{p(s.path,s.line,s.column),l(!1)},children:[e.jsx(J,{size:14}),e.jsxs("span",{children:[e.jsxs("strong",{children:[s.path,e.jsxs("small",{children:[":",s.line,":",s.column]})]}),e.jsxs("code",{children:[s.preview.slice(0,s.matchStart),e.jsx("mark",{children:s.preview.slice(s.matchStart,s.matchEnd)}),s.preview.slice(s.matchEnd)]})]})]},`${s.path}-${s.line}-${s.column}-${j}`)),!b&&n.trim()&&c.length===0&&e.jsx("p",{className:"muted padded",children:a("editor.search.noMatches")})]})]})}),e.jsx(K,{open:W,title:a("navigation.replaceConfirmTitle"),description:a("navigation.replaceConfirmDescription",{count:v}),confirmLabel:a("navigation.replaceAll",{count:v}),danger:!0,onCancel:()=>N(!1),onConfirm:()=>{U()}})]})}function H(i,u){const l=i.toLocaleLowerCase(),p=u.trim().toLocaleLowerCase();if(!p)return 1;const a=l.indexOf(p);if(a>=0)return 1e4-a-l.length;let n=0,m=0;for(const d of p){const o=l.indexOf(d,n);if(o<0)return-1;m+=o===n?5:1,n=o+1}return m-l.length/100}function T(i){return i instanceof Error?i.message:String(i)}export{_ as ProjectSearchDialog,Z as QuickOpenDialog};
|
package/dist/client/assets/{SystemMetricsDialog-D_oiVmBC.js → SystemMetricsDialog-DWh6yS0w.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as f,r as n,j as e}from"./react-CsO_xvbl.js";import{i as y,k as M,M as b,A as v}from"./index-
|
|
1
|
+
import{u as f,r as n,j as e}from"./react-CsO_xvbl.js";import{i as y,k as M,M as b,A as v}from"./index-C4KkkecE.js";const $=y("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);function k({open:t,onOpenChange:c}){const{t:s}=f(),[r,p]=n.useState(null),[u,x]=n.useState(!1),[m,j]=n.useState(""),o=n.useCallback(async()=>{x(!0);try{p(await M("/api/health/metrics")),j("")}catch(i){j(i instanceof Error?i.message:s("errors.generic"))}finally{x(!1)}},[s]);return n.useEffect(()=>{if(!t)return;o();const i=window.setInterval(()=>{o()},5e3);return()=>window.clearInterval(i)},[t,o]),e.jsxs(b,{open:t,onOpenChange:c,wide:!0,title:s("metrics.title"),description:s("metrics.description"),footer:e.jsxs("button",{onClick:()=>{o()},disabled:u,children:[e.jsx($,{size:14,className:u?"spin":""}),s("metrics.refresh")]}),children:[m&&e.jsx("p",{className:"error",children:m}),!r&&!m&&e.jsx("p",{className:"muted",children:s("common.loading")}),r&&e.jsxs("div",{className:"system-metrics",children:[e.jsxs("div",{className:"metric-summary-grid",children:[e.jsx(l,{label:s("metrics.uptime"),value:g(r.uptimeSeconds)}),e.jsx(l,{label:s("metrics.memory"),value:`${h(r.memory.rssBytes)} RSS`,detail:`${h(r.memory.heapUsedBytes)} / ${h(r.memory.heapTotalBytes)} ${s("metrics.heap")}`}),e.jsx(l,{label:s("metrics.compileQueue"),value:`${r.compileQueue.running} / ${r.compileQueue.concurrency}`,detail:s("metrics.pending",{count:r.compileQueue.pending})}),e.jsx(l,{label:s("metrics.collaboration"),value:s("metrics.sessions",{count:r.collaboration.sessions}),detail:s("metrics.roomsAndDirty",{rooms:r.collaboration.rooms,dirty:r.collaboration.dirtyFiles})})]}),e.jsxs("section",{className:"metric-section",children:[e.jsxs("h3",{children:[e.jsx(v,{size:15}),s("metrics.eventLoop")]}),e.jsx("p",{children:s("metrics.latencySummary",r.eventLoopDelay)})]}),e.jsxs("section",{className:"metric-section",children:[e.jsx("h3",{children:s("metrics.operationDurations")}),Object.keys(r.durationsMs).length===0?e.jsx("p",{className:"muted",children:s("metrics.noSamples")}):e.jsx("div",{className:"metric-table-wrap",children:e.jsxs("table",{className:"metric-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:s("metrics.operation")}),e.jsx("th",{children:s("metrics.samples")}),e.jsx("th",{children:s("metrics.last")}),e.jsx("th",{children:"P50"}),e.jsx("th",{children:"P95"}),e.jsx("th",{children:s("metrics.max")})]})}),e.jsx("tbody",{children:Object.entries(r.durationsMs).sort(([i],[a])=>i.localeCompare(a)).map(([i,a])=>e.jsxs("tr",{children:[e.jsx("td",{children:N(i,s)}),e.jsx("td",{children:a.count}),e.jsx("td",{children:d(a.last)}),e.jsx("td",{children:d(a.p50)}),e.jsx("td",{children:d(a.p95)}),e.jsx("td",{children:d(a.max)})]},i))})]})})]})]})]})}function l({label:t,value:c,detail:s}){return e.jsxs("article",{className:"metric-card",children:[e.jsx("span",{children:t}),e.jsx("strong",{children:c}),s&&e.jsx("small",{children:s})]})}function h(t){return`${Math.round(t/1024/1024*10)/10} MB`}function g(t){const c=Math.floor(t/86400),s=Math.floor(t%86400/3600),r=Math.floor(t%3600/60);return c?`${c}d ${s}h`:s?`${s}h ${r}m`:`${r}m`}function d(t){return t>=1e3?`${Math.round(t/100)/10}s`:`${Math.round(t*10)/10}ms`}function N(t,c){return c(`metrics.operations.${t}`,{defaultValue:t})}export{k as SystemMetricsDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as r}from"./BinaryModule-Aj1vLnwf-FnkCpIDV.js";import"./index-C4KkkecE.js";import"./react-CsO_xvbl.js";const a=""+new URL("/assets/harper_wasm_bg-LWXDb7Ll.wasm",import.meta.url).href,o=r.create(a,"full");export{o as binary};
|