{"_id":"@academix-admin/lottie-cache","name":"@academix-admin/lottie-cache","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@academix-admin/lottie-cache","version":"0.1.0","description":"Tiny in-memory cache + preloader for Lottie animation JSON.","keywords":["lottie","cache","preload","animation"],"license":"MIT","author":{"name":"Academix"},"repository":{"type":"git","url":"git+https://github.com/academix-admin/academix-ui.git","directory":"packages/lottie-cache"},"homepage":"https://github.com/academix-admin/academix-ui/tree/main/packages/lottie-cache#readme","bugs":{"url":"https://github.com/academix-admin/academix-ui/issues"},"type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"./package.json":"./package.json"},"scripts":{"build":"tsup","clean":"rimraf dist","dev":"tsup --watch","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit"},"devDependencies":{"rimraf":"^6.0.1","tsup":"^8.3.5","typescript":"^5.9.3"},"publishConfig":{"access":"public"},"gitHead":"22fcc5fea088a5b2c708d09013f62309af1e9b79","_id":"@academix-admin/lottie-cache@0.1.0","_nodeVersion":"24.15.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-ZNtVDY4izMPs+VceATVtxQlSUtnMODb/xWi8+3Phw1qa8AztMM20Oe3WnU9xzMg7vGxFNCMwsONG1rYHsZYGnw==","shasum":"b1e42e8382cdaef238d48d2fe18751a70ef7d5f8","tarball":"https://registry.npmjs.org/@academix-admin/lottie-cache/-/lottie-cache-0.1.0.tgz","fileCount":9,"unpackedSize":6810,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDarVcGjDitUFhcN3YpjX8UbZ7WxNZvaQyrWEVXSzaeaQIgJhXIHTyPSwixEzbKArPGyg/r3hcA/bCLO2HuotIGDFE="}]},"_npmUser":{"name":"academix-group","email":"academix.tech4u@gmail.com"},"directories":{},"maintainers":[{"name":"academix-group","email":"academix.tech4u@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lottie-cache_0.1.0_1784657082145_0.5128106038651752"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-21T18:04:41.895Z","0.1.0":"2026-07-21T18:04:42.280Z","modified":"2026-07-21T18:04:42.558Z"},"maintainers":[{"name":"academix-group","email":"academix.tech4u@gmail.com"}],"description":"Tiny in-memory cache + preloader for Lottie animation JSON.","homepage":"https://github.com/academix-admin/academix-ui/tree/main/packages/lottie-cache#readme","keywords":["lottie","cache","preload","animation"],"repository":{"type":"git","url":"git+https://github.com/academix-admin/academix-ui.git","directory":"packages/lottie-cache"},"author":{"name":"Academix"},"bugs":{"url":"https://github.com/academix-admin/academix-ui/issues"},"license":"MIT","readme":"# @academix-admin/lottie-cache\n\nA tiny in-memory **cache + preloader** for Lottie animation JSON, so the same\nanimation isn't fetched twice. Framework-agnostic — no React required.\n\n## Install\n\n```bash\nnpm install @academix-admin/lottie-cache\n```\n\n## Usage\n\n```ts\nimport { preloadLottie, getCachedLottie } from '@academix-admin/lottie-cache';\n\n// Preload (e.g. on app start or route hover):\nconst data = await preloadLottie('spinner', '/animations/spinner.json');\n\n// Later, read synchronously from cache (null if not preloaded):\nconst cached = getCachedLottie('spinner');\n```\n\n## API\n\n- `preloadLottie(id: string, src: string): Promise<any>` — fetch (if needed) and\n  cache the animation JSON under `id`, returning it.\n- `getCachedLottie(id: string): any | null` — synchronous cache read.\n\n## License\n\nMIT © Academix\n","readmeFilename":"README.md","_rev":"1-4853c77b40bc5302e8e22d408c1cee92"}