{"_id":"@btopto/avatar-core","name":"@btopto/avatar-core","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@btopto/avatar-core","version":"0.1.0","description":"Framework-agnostic avatar engine: schema, serialization, unlocks, tiers and badges","license":"MIT","author":{"name":"Javier Manrique","url":"https://github.com/btopto"},"repository":{"type":"git","url":"git+https://github.com/btopto/avatar.git","directory":"packages/core"},"homepage":"https://github.com/btopto/avatar#readme","bugs":{"url":"https://github.com/btopto/avatar/issues"},"keywords":["avatar","character-creator","gamification","unlocks","badges","progression"],"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"sideEffects":false,"engines":{"node":">=18"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","test":"vitest run"},"_id":"@btopto/avatar-core@0.1.0","gitHead":"c58b4290aa32c65bd6d459b7473bda763e1aa11e","_nodeVersion":"22.23.2","_npmVersion":"10.9.8","dist":{"integrity":"sha512-pZPY6QkLQIQNrgzjmHPeTgXwmg5TnnCEFfQFpzn/HpLcq3VOUYa+Hpf6d2CV64WGXN3F70Vyt4P9VleJqTIEIA==","shasum":"d3335c4de728cfdb45d30714f3196ff8b53676cb","tarball":"https://registry.npmjs.org/@btopto/avatar-core/-/avatar-core-0.1.0.tgz","fileCount":7,"unpackedSize":34015,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@btopto%2favatar-core@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGXj+Sco4xVPQFLQOhBNuZm/mudj7JJ48gq+qMdOV/ktAiEAnRx3Wp3JxYSWQWOGqfcnkfWEkdSXctz8bd5dUV8QbSs="}]},"_npmUser":{"name":"btopto","email":"javiermanrique509@gmail.com"},"directories":{},"maintainers":[{"name":"btopto","email":"javiermanrique509@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/avatar-core_0.1.0_1787373457779_0.0006305984898502537"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-22T04:37:37.618Z","0.1.0":"2026-08-22T04:37:37.921Z","modified":"2026-08-22T04:37:38.279Z"},"maintainers":[{"name":"btopto","email":"javiermanrique509@gmail.com"}],"description":"Framework-agnostic avatar engine: schema, serialization, unlocks, tiers and badges","homepage":"https://github.com/btopto/avatar#readme","keywords":["avatar","character-creator","gamification","unlocks","badges","progression"],"repository":{"type":"git","url":"git+https://github.com/btopto/avatar.git","directory":"packages/core"},"author":{"name":"Javier Manrique","url":"https://github.com/btopto"},"bugs":{"url":"https://github.com/btopto/avatar/issues"},"license":"MIT","readme":"# @btopto/avatar-core\n\nMotor de avatares personalizables con progresión, agnóstico de framework y de render. Cero dependencias.\n\n- **Esquema como datos**: slots, opciones, canales de color y tiers los declara el art pack.\n- **Config serializable**: el avatar es un JSON versionado (`AvatarConfig`) que tu app persiste.\n- **Progresión por entitlements**: tu backend otorga grants (cursos, logros); el motor filtra (`availableOptions`), valida (`validateConfig`) y degrada con gracia (`sanitizeConfig`).\n- Tiers visuales por rango, medallas (`earnedBadges`) y aleatorio reproducible (`randomConfig` con semilla).\n\n```ts\nimport { createDefaultConfig, sanitizeConfig, validateConfig } from '@btopto/avatar-core';\nimport { basicArtPack } from '@btopto/avatar-art-basic';\n\nconst entitlements = ['course.intro']; // viene de tu backend\nconst config = sanitizeConfig(saved ?? createDefaultConfig(basicArtPack, entitlements), basicArtPack, entitlements);\n```\n\nParte del sistema [btopto/avatar](https://github.com/btopto/avatar). Para renderizar usa `@btopto/avatar-renderer-svg`; para UI lista usa `@btopto/avatar-element`.\n","readmeFilename":"README.md","_rev":"1-4d9152bd513ad2e7641467d6cb4622f8"}