{"_id":"@arnavg12/green-leaf","_rev":"2-a17994d2f1a2eefdd7ef7a1152d6d252","name":"@arnavg12/green-leaf","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@arnavg12/green-leaf","version":"1.0.0","keywords":["latex","clsi","overleaf","pdf","tex","compilation","synctex"],"author":{"name":"Overleaf Contributors"},"license":"MIT","_id":"@arnavg12/green-leaf@1.0.0","maintainers":[{"name":"arnavg12","email":"arnavgoutam5571@gmail.com"}],"dist":{"shasum":"152013d50d18d13a3a4ba9a91e233057ff982525","tarball":"https://registry.npmjs.org/@arnavg12/green-leaf/-/green-leaf-1.0.0.tgz","fileCount":35,"integrity":"sha512-ckjAfVBu/bLV1y1UYLkktdKfihHoKnhJA/Rlo5f4eQmJR0kltamijFbYeWPVDjpq+wOd1tqUX1oAsdax99OsNQ==","signatures":[{"sig":"MEUCIQDqz/rlkeqaaWEqeMtJ283pqiQ1IiXyv5qfq7UmXAuITAIge+zS420SFW7tdYRhl3ID412jXQMdYuB7n8QE5DSWees=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40040},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3f62eac18130040b5d7c365e106813691961a3ae","scripts":{"test":"tsx tests/run-test.ts","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"arnavg12","email":"arnavgoutam5571@gmail.com"},"_npmVersion":"10.9.4","description":"A robust, offline-first LaTeX compilation SDK inspired by Overleaf's CLSI service.","directories":{},"_nodeVersion":"22.22.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.15.0","devDependencies":{"tsx":"^4.21.0","typescript":"^6.0.2","@types/node":"^25.6.0"},"_npmOperationalInternal":{"tmp":"tmp/green-leaf_1.0.0_1775983877304_0.26418679411212276","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@arnavg12/green-leaf","version":"1.0.1","type":"module","description":"A robust, offline-first LaTeX compilation SDK inspired by Overleaf's CLSI service.","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc","test":"tsx tests/run-test.ts","prepublishOnly":"npm run build"},"keywords":["latex","clsi","overleaf","pdf","tex","compilation","synctex"],"author":{"name":"Overleaf Contributors"},"license":"MIT","packageManager":"pnpm@10.15.0","devDependencies":{"@types/node":"^25.6.0","tsx":"^4.21.0","typescript":"^6.0.2"},"_id":"@arnavg12/green-leaf@1.0.1","gitHead":"3f62eac18130040b5d7c365e106813691961a3ae","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-L9DZw2xPvPfpeKYswdQoQbrqkjnjA+FRQ2wOqeRiH9y6+lqU5mIAChGJfJqQpm/oe3j2JGnHrSiVO+7a8p4vtA==","shasum":"185773874a14ce1338cd913c4aebefefdf8f560a","tarball":"https://registry.npmjs.org/@arnavg12/green-leaf/-/green-leaf-1.0.1.tgz","fileCount":35,"unpackedSize":40066,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICco387GCUwbxe/4XggdwXTdJAKiOIbRSRpi0L8mI7p8AiAwFJuF6WF+MoRO44WYeQzuHyRvE+se5lQOO7iJN8LMfQ=="}]},"_npmUser":{"name":"arnavg12","email":"arnavgoutam5571@gmail.com"},"directories":{},"maintainers":[{"name":"arnavg12","email":"arnavgoutam5571@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/green-leaf_1.0.1_1775984397756_0.8269606015706019"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T08:51:17.173Z","modified":"2026-04-12T08:59:58.007Z","1.0.0":"2026-04-12T08:51:17.446Z","1.0.1":"2026-04-12T08:59:57.893Z"},"author":{"name":"Overleaf Contributors"},"license":"MIT","keywords":["latex","clsi","overleaf","pdf","tex","compilation","synctex"],"description":"A robust, offline-first LaTeX compilation SDK inspired by Overleaf's CLSI service.","maintainers":[{"name":"arnavg12","email":"arnavgoutam5571@gmail.com"}],"readme":"# Green Leaf SDK (@arnavg12/green-leaf)\n\nA robust, developer-friendly LaTeX compilation SDK inspired by the architecture of Overleaf's **Common LaTeX Service Interface (CLSI)**.\n\nThis SDK abstracts the complexities of project synchronization, `latexmk` orchestration, and SyncTeX navigation, providing a seamless \"action-oriented\" interface for building LaTeX documents.\n\n## ✨ Features\n\n- **🚀 Triple-Engine Support**: \n  - **Native**: Uses local `latexmk` if available.\n  - **Docker**: Portable compilation via Docker (zero local install).\n  - **Remote**: Seamless fallback to any CLSI-compatible API.\n- **🔄 Smart Synchronization**: Incremental file tracking using stable sync states.\n- **📍 Bidirectional SyncTeX**: Map coordinates between PDF and source files.\n- **📦 Lightweight**: Zero runtime dependencies (uses Node.js built-ins).\n\n## 🚀 Installation\n\n```bash\nnpm install @arnavg12/green-leaf\n```\n\n## 🛠️ Quick Start\n\n```typescript\nimport { LatexProject } from '@arnavg12/green-leaf';\n\nconst project = new LatexProject({\n  rootPath: './project',\n  mainFile: 'main.tex',\n  remoteEndpoint: 'https://clsi.your-domain.com' // Optional fallback\n});\n\n// Compile (Native -> Docker -> Remote)\nconst result = await project.compile({\n  compiler: 'pdflatex'\n});\n\nif (result.status === 'success') {\n  console.log('PDF generated at:', result.pdfUrl);\n}\n```\n\n## 📍 SyncTeX Navigation\n\n```typescript\n// From Code line to PDF coordinates\nconst pdfCoords = await project.syncToPdf('main.tex', 42);\n\n// From PDF coordinates back to source line\nconst sourceLoc = await project.syncToSource(1, 100, 250);\n```\n\n## 📜 License\n\nMIT © Overleaf Contributors\n","readmeFilename":"README.md"}