Releases: AndreyAkinshin/avatarka
v3.0.0
Summary
Version 3.0.0 reworks avatar rendering to display only the central subject, fitted precisely into a bounding circle, and removes a range of decorative theme options in the process. React lock behavior is also made consistent across all selection paths.
Breaking Changes
- Removed the
decorationoption from every theme that had it (gems, weather, plants, birds, food, insects), and dropped the now-unusedsparkleColorfrom gems. - Removed additional theme parameters:
hasBubbles,hasPlants, andmagic. - Removed ambient framing overlays (ocean bubbles, dinosaur foliage, mythical magic) and floating decor baked into generators (weather glow auras and particles, phoenix/kitsune sparkles, plant soil bases). Subject-defining parts such as sun rays, lion mane, whale spout, comet tail, and rainbow arc are kept.
- Removed the
wrapeye style from aliens.
Features
- Avatars now render only the central subject, fitted into the inscribed bounding circle (radius 46) via the new
fitToCircleutility, replacing the hand-tuned per-type scale tables. - Added a fit-to-circle scaling utility that computes SVG content bounds analytically (honoring nested and element transforms, sampling curves, skipping non-drawn defs/clipPath, and accounting for stroke width), then scales and centers content into a padded inscribed circle so it never overflows.
- avatarka-react: Locked field values are now preserved when selecting an avatar from the gallery, consistent with manual theme switching and the Randomize button.
- avatarka-react: A locked field keeps its lock when its value changes, and a manual theme switch via the dropdown now preserves the theme lock and all field locks, carrying over locked values (such as
primaryColor) that also exist in the new theme.
Bug Fixes
- Bounded SVG arc (
A) path commands infitToCircleby sampling via the endpoint-to-center parameterization, so arched shapes like the rainbow no longer overflow the fit circle.
Documentation
- Corrected the stale
wrapSvgWithShapecomment to clarify that callers pre-size content withfitToCircleand the wrapper applies no clip. - Removed the dropped parameters (
decoration,sparkleColor,hasBubbles,hasPlants,magic) from the theme lists in the README.
Internal
- Added a no-overflow invariant test across all themes, now exercising every shape value of every theme (rather than relying on random seeds that may skip creature types).
- Added a regression test pinning the SVG transform composition order, and fixed a TypeScript index-access error in the exhaustive test.
- Regenerated SVG snapshots to reflect the new rendering.
Full Changelog: v2.0.0...v3.0.0
Release notes generated by herald v1.0.4
v2.0.0
Breaking Changes
- PRNG replaced: Mulberry32 (32-bit state, djb2 hash) is replaced with pragmastat's
Rngclass (xoshiro256++, 256-bit state, FNV-1a hash) for cross-language reproducibility. All seeded outputs produce different avatars.mulberry32andstringToSeedare no longer exported; useRngfrom pragmastat instead.
Features
- 9 new themes: gems (diamonds, rubies, crystals), weather (sun, rain, snow, lightning), food (sushi, pizza, cupcakes), plants (cacti, sunflowers, mushrooms), birds (parrot, owl, penguin, flamingo), insects (butterfly, beetle, ladybug, bee), mythical creatures, ocean (octopus, jellyfish, crab, whale), and dinosaurs (T-Rex, Triceratops, Brachiosaurus, and more)
- Constraint-based gallery generation:
generateGallery()now distributes themes round-robin and tracks used field values to maximize visual diversity across gallery items; fully schema-driven with no per-theme configuration needed - Lock buttons in picker: Each editor control and theme dropdown can be individually locked to preserve its value when clicking Randomize; locks clear automatically on theme change
alwaysTransparentBackgroundprop: NewAvatarPickerprop forces transparent avatar backgrounds and hides the background color controlshapeParamonThemeinterface: Each theme declares its primary shape parameter, enabling programmatic shape enumeration for diverse gallery generation- Shuffle picks a random theme: The randomize button now picks a random theme in addition to random params
Improvements
- People theme: Scaled-down eyes for more natural proportions, eyebrows derived from hair color, skin-derived mouth color, softer expression curves, and redesigned hair styles (bob, long, curly, bald, mohawk, ponytail)
- Animals theme: Eye color support for bear/koala/panda, eye ellipses behind sleepy eyelids, refined cat ears, fox face mask, dog/penguin iris layers
- Monsters theme: Four distinct horn types (none, spikes, curved, antlers) with highlight shading, replacing the old binary yes/no toggle
- Picker header redesign: Spinning dice icon replaces Randomize text button; SVG/PNG save actions added as text buttons via
onSaveSvg/onSavePngcallback props; flat design without box-shadow - Demo app: Dynamic favicon matching current avatar, transparent background checkerboard toggle, GitHub/npm footer links, random initial theme on page load, improved dark theme gradient
Internal
- Migrated to mise as task runner with a
VERSIONfile as single source of truth for package versions - Consolidated CI into
ci.yml(all branches) andpublish.yml(manual dispatch), replacing the previousbuild.yml,deploy.yml, andrelease.ymlworkflows - Removed geometric theme
Documentation
- Updated all READMEs and AGENTS.md to accurately reflect 14 themes, pragmastat PRNG, complete
AvatarEditor/AvatarPickerprops,generateGalleryAPI,styles.cssimport requirement, and corrected file tree
Full Changelog: v1.1.0...v2.0.0
Release notes generated by herald v1.0.4
avatarka v1.1.0
Avatarka v1.1.0 adds a compact layout mode for the avatar picker and flexible grid dimensions for the gallery.
Features
- Add compact layout mode for
AvatarPicker— newlayoutprop accepts'default'or'compact', with side-by-side editor arrangement and reduced spacing - Add
gridWidthandgridHeightprops toAvatarPickerfor non-square gallery grids (fall back togridSizewhen not specified) - Export
AvatarPickerLayouttype fromavatarka-react
Full Changelog: v1.0.1...v1.1.0
Release notes generated by herald v1.0.4
avatarka v1.0.1
Patch release adding npm and demo badges to README files across all packages.
Documentation
- Add npm version badges for
avatarkaandavatarka-reactto root README - Add live demo badge to root README,
avatarka/README.md, andavatarka-react/README.md
Full Changelog: v1.0.0...v1.0.1
Release notes generated by herald v1.0.4
avatarka v1.0.0
Summary
Initial release of Avatarka — a zero-dependency TypeScript library for generating unique, customizable SVG avatars with seed-based determinism, multiple themes, and ready-to-use React components.
Features
- Core avatar generation with seed-based deterministic output from any string (email, user ID, etc.)
- 6 built-in themes: people, animals, monsters, robots, aliens, and ocean (10 sea creatures)
- React components:
<Avatar />for display,<AvatarEditor />for interactive customization, and<AvatarPicker />for gallery-based selection - AvatarPicker layouts: support for both standard and compact layout modes with configurable
gridWidthandgridHeight alwaysTransparentBackgroundprop on AvatarPicker to force transparent backgrounds and hide the background color control- Gallery diversity:
generateGallery()ensures unique (theme, shape) pairs with no duplicates across generated avatars shapeParamon Theme interface for programmatic discovery of each theme's primary shape options- PNG export via
svgToPng()andsvgToPngDataUrl()using the Canvas API (browser environments) - Full TypeScript support with exported types and strongly-typed theme parameters
Improvements
- Redesigned people theme hair styles and refined facial feature proportions
- Improved animal theme eye rendering and proportions
- Expanded monster theme horn types with spikes, curved, and antlers variants
Internal
- Monorepo setup with pnpm workspaces and Turborepo
- Two packages:
avatarka(core, zero dependencies) andavatarka-react - Interactive demo app with live preview
- Snapshot tests for all theme renderers
- CI/CD workflows for build, deploy, and release
- Migrated task runner to mise with VERSION-based publishing
Release notes generated by herald v1.0.4