texlite 0.7.2 → 0.7.5
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 -6
- package/README.zh-CN.md +1 -6
- package/dist/client/assets/{BinaryModule-Aj1vLnwf-wAe5fMVe.js → BinaryModule-Aj1vLnwf-CKY6Y_Pt.js} +1 -1
- package/dist/client/assets/{GitDialog-b7cWzpdJ.js → GitDialog-pn8n5Afm.js} +1 -1
- package/dist/client/assets/{HistoryDialog-F8tDuD3v.js → HistoryDialog-BpWEZrYf.js} +1 -1
- package/dist/client/assets/{LatexEditor-BT2E5IIK.js → LatexEditor-DNAmNvHu.js} +1 -1
- package/dist/client/assets/{PdfPreview-C2tw6xhu.js → PdfPreview-BVaG7TtG.js} +1 -1
- package/dist/client/assets/{ProjectNavigationDialogs-CzrF5eh5.js → ProjectNavigationDialogs-CaovMu4V.js} +1 -1
- package/dist/client/assets/{SystemMetricsDialog-OAoXCVVy.js → SystemMetricsDialog-D8jj7epG.js} +1 -1
- package/dist/client/assets/binary-BoldOm0z.js +1 -0
- package/dist/client/assets/index-BQCB3z5H.js +64 -0
- package/dist/client/assets/index-BnvpaWsa.css +1 -0
- package/dist/client/assets/{index-JmuE6_j5.js → index-Byn2Miy9.js} +1 -1
- package/dist/client/assets/{minus-D0DZYQR6.js → minus-K-5IK4nL.js} +1 -1
- package/dist/client/assets/pdf-BB1XvBIF.js +55 -0
- package/dist/client/assets/{spellCheck-TTrb0uqA.js → spellCheck-C32VQVUE.js} +3 -3
- package/dist/client/assets/texFmtRuntime-EYyQNUnJ.js +2 -0
- package/dist/client/assets/tex_fmt_bg-VEAUIuFz.wasm +0 -0
- package/dist/client/index.html +2 -2
- package/dist/server/app.js +0 -40
- package/package.json +3 -1
- package/dist/client/assets/binary-CWru8eff.js +0 -1
- package/dist/client/assets/index-BLOqf18q.js +0 -62
- package/dist/client/assets/index-CwGialPz.css +0 -1
- package/dist/client/assets/pdf-DPnwNQHb.js +0 -55
- package/dist/server/latexFormatter.js +0 -118
|
@@ -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-BQCB3z5H.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-OAoXCVVy.js → SystemMetricsDialog-D8jj7epG.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-BQCB3z5H.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-CKY6Y_Pt.js";import"./index-BQCB3z5H.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};
|