texlite 0.5.4 → 0.5.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/dist/client/assets/{BinaryModule-Aj1vLnwf-vCI86hxN.js → BinaryModule-Aj1vLnwf-BsIXahIW.js} +1 -1
- package/dist/client/assets/{GitDialog-DPK1_Lf7.js → GitDialog-CFzsF7ys.js} +1 -1
- package/dist/client/assets/{HistoryDialog-wKZ0ECpn.js → HistoryDialog-YPiAOGU_.js} +1 -1
- package/dist/client/assets/{LatexEditor-0ijwz3Ud.js → LatexEditor-BX4WLdhS.js} +1 -1
- package/dist/client/assets/{PdfPreview-BaOpY89K.js → PdfPreview-FQ8oxyUx.js} +1 -1
- package/dist/client/assets/{ProjectNavigationDialogs-CYY6XsGS.js → ProjectNavigationDialogs-BZanedGt.js} +1 -1
- package/dist/client/assets/{SystemMetricsDialog-D960tY84.js → SystemMetricsDialog-DnH4c7Se.js} +1 -1
- package/dist/client/assets/binary-MtJxbY5b.js +1 -0
- package/dist/client/assets/{index-BNDmKLSB.js → index-B5iMrEn5.js} +1 -1
- package/dist/client/assets/{index-BzkNLkyK.js → index-DdFlmXqA.js} +15 -15
- package/dist/client/assets/{plus-Dd-ee1VQ.js → plus-B-DG5h4y.js} +1 -1
- package/dist/client/assets/{spellCheck-C1kZMEs3.js → spellCheck-4xuNPF_M.js} +3 -3
- package/dist/client/index.html +1 -1
- package/dist/server/synctex.js +5 -1
- package/package.json +1 -1
- package/dist/client/assets/binary-B_l95ePC.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./index-
|
|
1
|
+
import{i as e}from"./index-DdFlmXqA.js";const i=e("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);const s=e("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const y=e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);export{s as M,y as P,i as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{_ as w}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-B5iMrEn5.js","assets/BinaryModule-Aj1vLnwf-BsIXahIW.js","assets/index-DdFlmXqA.js","assets/react-CsO_xvbl.js","assets/index-CUa7L47p.css","assets/binary-MtJxbY5b.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as w}from"./index-DdFlmXqA.js";import"./react-CsO_xvbl.js";const k=/([A-Za-z][A-Za-z0-9_.:/-]*(?:\s+[A-Za-z][A-Za-z0-9_.:/-]*){0,7})\s*$/,S=new Set(["tabular","tabularx","tabulary","longtable","array","matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"]),A=new Set(["math","displaymath","equation","equation*","align","align*","alignat","alignat*","gather","gather*","multline","multline*","flalign","flalign*","tikzpicture","axis","scope","pgfonlayer","pgfpicture","tabular","tabularx","tabulary","longtable","array","matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","verbatim","Verbatim","lstlisting","minted","comment","algorithmic","alignat"]),b=new Set(["documentclass","usepackage","RequirePackage","includegraphics","tikzset","pgfplotsset","hypersetup","lstset","definecolor","colorlet","setlength","setcounter","draw","path","fill","filldraw","shade","node","addplot","color","textcolor","colorbox","pagecolor"]),L=new Set(["label","hypertarget","ref","pageref","autoref","nameref","hyperref","index","gls","Gls","glspl","Glspl","cite","citep","citet","citeauthor","citeyear","citenum","parencite","textcite","autocite","footcite"]),z=5;let d=null,_=Promise.resolve(),x="";function c(t,i,n){n>i&&t.push({from:i,to:n})}function p(t,i,n,a){if(t[i]!==n)return null;let e=0;for(let r=i;r<t.length;r+=1){const l=t[r-1]==="\\"&&t[r-2]!=="\\";if(!l&&t[r]===n&&(e+=1),!l&&t[r]===a&&(e-=1,e===0))return{from:i,to:r+1,end:r+1}}return null}function u(t,i){let n=i;for(;n<t.length&&/[ \t\r\n]/.test(t[n]);)n+=1;return n}function E(t,i){if(t[i]!=="%")return!1;let n=0;for(let a=i-1;a>=0&&t[a]==="\\";a-=1)n+=1;return n%2===0}function P(t){return/[=,!/]/.test(t)||/\b(?:colorbar|legend|width|height|draw|fill|style|domain|samples|anchor|at|axis)\b/.test(t)}function O(t){return L.has(t)||/^cite[A-Za-z]*/.test(t)}function Z(t,i){for(let n=t.indexOf("=");n>=0;n=t.indexOf("=",n+1)){const e=Math.max(...[`
|
|
3
3
|
`,"[","{","]","}",",",";"].map(o=>t.lastIndexOf(o,n-1)+1)),l=t.slice(e,n).match(k);l?.index!==void 0&&c(i,e+l.index,n);let f=n+1;for(;f<t.length&&/\s/.test(t[f]);)f+=1;let s=f;if(t[f]==="{")s=p(t,f,"{","}")?.end??f;else for(;s<t.length&&!/[,\]\}\n]/.test(t[s]);)s+=1;c(i,f,s)}}function I(t,i,n){const a=/\\(begin|end)\s*\{\s*([^{}]+?)\s*\}/g;a.lastIndex=i;let e=1;for(let r=a.exec(t);r;r=a.exec(t))if(r[2].trim()===n){if(r[1]==="begin")e+=1;else if(--e===0)return a.lastIndex}return null}function R(t,i){for(const n of t.matchAll(/\\\((?:\\.|[^])*?\\\)|\\\[(?:\\.|[^])*?\\\]/g))n.index!==void 0&&c(i,n.index,n.index+n[0].length);for(let n=0;n<t.length;n+=1){if(t[n]!=="$"||t[n-1]==="\\")continue;const a=t[n+1]==="$"?"$$":"$",e=t.indexOf(a,n+a.length);e>=0&&(c(i,n,e+a.length),n=e+a.length-1)}}function $(t){const i=[],n=/[A-Za-z@]/;for(let e=0;e<t.length;e+=1){if(E(t,e)){const o=t.indexOf(`
|
|
4
4
|
`,e);c(i,e,o<0?t.length:o),e=o<0?t.length:o;continue}if(t[e]!=="\\")continue;const r=e;let l=e+1;if(n.test(t[l]??""))for(;l<t.length&&/[A-Za-z@0-9:_]/.test(t[l]);)l+=1;else l<t.length&&(l+=1);const f=t.slice(e+1,l);c(i,r,l);let s=u(t,l);if(f==="begin"||f==="end"){const o=p(t,s,"{","}");if(o){c(i,o.from,o.to);const h=t.slice(o.from+1,o.to-1).trim();if(s=u(t,o.end),f==="begin"){const g=p(t,s,"[","]");if(g&&(c(i,g.from,g.to),s=u(t,g.end)),S.has(h)){const m=p(t,s,"{","}");m&&c(i,m.from,m.to)}if(A.has(h)){const m=I(t,o.end,h);if(m!==null){c(i,r,m),e=m-1;continue}}}}e=l-1;continue}if(O(f))for(t[s]==="*"&&(s=u(t,s+1));;){const o=p(t,s,"[","]")??p(t,s,"{","}");if(!o)break;c(i,o.from,o.to),s=u(t,o.end)}else{const o=p(t,s,"[","]");if(o&&(b.has(f)||P(t.slice(o.from+1,o.to-1)))&&(c(i,o.from,o.to),s=u(t,o.end)),b.has(f)){const h=f==="definecolor"||f==="colorlet"?3:1;for(let g=0;g<h;g+=1){const m=p(t,s,"{","}");if(!m)break;c(i,m.from,m.to),s=u(t,m.end)}}}e=l-1}R(t,i),Z(t,i);for(const e of t.matchAll(/(?:https?|ftp):\/\/[^\s]+/gi))e.index!==void 0&&c(i,e.index,e.index+e[0].length);i.sort((e,r)=>e.from-r.from||e.to-r.to);const a=[];for(const e of i){const r=a.at(-1);r&&e.from<=r.to?r.to=Math.max(r.to,e.to):a.push({...e})}return a}function T(t){const i=$(t),n=[];let a=0,e=0;for(const r of t){for(;e<i.length&&i[e].to<=a;)e+=1;const l=i[e];n.push(l&&l.from<=a&&a<l.to&&r!==`
|
|
5
|
-
`&&r!=="\r"?" ":r),a+=r.length}return n.join("")}function V(t){const i=[0];let n=0;for(const a of t)n+=a.length,i.push(n);return i}function B(t){return[...new Set(t.map(i=>i.trim()).filter(Boolean))].sort((i,n)=>i.localeCompare(n)).join("\0")}async function C(t,i){const n=_.then(async()=>{if(!d)try{const[{WorkerLinter:e,LocalLinter:r},{binary:l}]=await Promise.all([w(()=>import("./index-
|
|
5
|
+
`&&r!=="\r"?" ":r),a+=r.length}return n.join("")}function V(t){const i=[0];let n=0;for(const a of t)n+=a.length,i.push(n);return i}function B(t){return[...new Set(t.map(i=>i.trim()).filter(Boolean))].sort((i,n)=>i.localeCompare(n)).join("\0")}async function C(t,i){const n=_.then(async()=>{if(!d)try{const[{WorkerLinter:e,LocalLinter:r},{binary:l}]=await Promise.all([w(()=>import("./index-B5iMrEn5.js"),__vite__mapDeps([0,1,2,3,4])),w(()=>import("./binary-MtJxbY5b.js"),__vite__mapDeps([5,1,2,3,4]))]),f=typeof Worker<"u";try{d=new(f?e:r)({binary:l}),await d.setup()}catch(s){const o=d;if(d=null,await o?.dispose().catch(()=>{}),!f)throw s;d=new r({binary:l}),await d.setup()}}catch(e){throw d=null,x="",e}const a=B(t);return a!==x&&(await d.clearWords(),t.length&&await d.importWords([...new Set(t.map(e=>e.trim()).filter(Boolean))]),x=a),i(d)});return _=n.then(()=>{},()=>{}),n}function q(t){return t.get_replacement_text()}function W(t,i,n,a,e){const r={from:a.start,to:a.end},l={from:e[a.start]??-1,to:e[a.end]??-1},f=[r,l].filter((o,h,g)=>o.from>=0&&o.to>o.from&&o.to<=t.length&&g.findIndex(m=>m.from===o.from&&m.to===o.to)===h);if(f.length===0)return null;const s=n.get_problem_text();return f.find(o=>i.slice(o.from,o.to)===s)??f.find(o=>/[A-Za-z]/.test(i.slice(o.from,o.to)))??f[0]??null}function D(t,i,n,a){const e=n.span();try{const r=W(t,i,n,e,a);if(!r)return null;const{from:l,to:f}=r;if(!/[A-Za-z]/.test(i.slice(l,f)))return null;const s=t.slice(l,f);if(!s.trim()||/[\\%$]/.test(s))return null;const o=n.lint_kind()==="Spelling"||n.lint_kind()==="Typo"?"spelling":"grammar",h=n.suggestions(),g=h.map(q).filter((m,y,v)=>y<z&&v.indexOf(m)===y);for(const m of h)m.free();return{from:l,to:f,word:s,kind:o,message:n.message(),suggestions:g}}finally{e.free()}}function G(t,i=[]){const n=T(t),a=V(t);return C(i,async e=>{const r=await e.lint(n,{language:"plaintext",dedup:!0,isolateEnglish:!1});try{return r.map(l=>D(t,n,l,a)).filter(l=>!!l).sort((l,f)=>l.from-f.from||l.to-f.to)}finally{for(const l of r)l.free()}})}export{$ as ignoredRanges,G as lintLatex,T as maskLatexSource};
|
package/dist/client/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/iosevka@5.2.5/400.css" />
|
|
11
11
|
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
|
|
12
12
|
<title>TexLite</title>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-DdFlmXqA.js"></script>
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/assets/react-CsO_xvbl.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="/assets/index-CUa7L47p.css">
|
|
16
16
|
</head>
|
package/dist/server/synctex.js
CHANGED
|
@@ -22,8 +22,12 @@ export async function sourceToPdf(sourceDirectory, pdfPath, sourcePath, line, co
|
|
|
22
22
|
const page = numericField(output, "Page");
|
|
23
23
|
const x = numericField(output, "x");
|
|
24
24
|
const y = numericField(output, "y");
|
|
25
|
+
// Comments, blank lines, and parts of the preamble may not have a
|
|
26
|
+
// typeset position. SyncTeX exits successfully but returns no result for
|
|
27
|
+
// those locations; that is a normal "nothing to jump to" outcome, not a
|
|
28
|
+
// malformed request.
|
|
25
29
|
if (!page || x === null || y === null)
|
|
26
|
-
|
|
30
|
+
return null;
|
|
27
31
|
return {
|
|
28
32
|
page,
|
|
29
33
|
x,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as r}from"./BinaryModule-Aj1vLnwf-vCI86hxN.js";import"./index-BzkNLkyK.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};
|