Skip to content

Releases: AndreyAkinshin/avatarka

v3.0.0

31 May 08:16
9fed802

Choose a tag to compare

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 decoration option from every theme that had it (gems, weather, plants, birds, food, insects), and dropped the now-unused sparkleColor from gems.
  • Removed additional theme parameters: hasBubbles, hasPlants, and magic.
  • 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 wrap eye style from aliens.

Features

  • Avatars now render only the central subject, fitted into the inscribed bounding circle (radius 46) via the new fitToCircle utility, 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 in fitToCircle by sampling via the endpoint-to-center parameterization, so arched shapes like the rainbow no longer overflow the fit circle.

Documentation

  • Corrected the stale wrapSvgWithShape comment to clarify that callers pre-size content with fitToCircle and 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

21 Feb 17:18
91d5027

Choose a tag to compare

Breaking Changes

  • PRNG replaced: Mulberry32 (32-bit state, djb2 hash) is replaced with pragmastat's Rng class (xoshiro256++, 256-bit state, FNV-1a hash) for cross-language reproducibility. All seeded outputs produce different avatars. mulberry32 and stringToSeed are no longer exported; use Rng from 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
  • alwaysTransparentBackground prop: New AvatarPicker prop forces transparent avatar backgrounds and hides the background color control
  • shapeParam on Theme interface: 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/onSavePng callback 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 VERSION file as single source of truth for package versions
  • Consolidated CI into ci.yml (all branches) and publish.yml (manual dispatch), replacing the previous build.yml, deploy.yml, and release.yml workflows
  • Removed geometric theme

Documentation

  • Updated all READMEs and AGENTS.md to accurately reflect 14 themes, pragmastat PRNG, complete AvatarEditor/AvatarPicker props, generateGallery API, styles.css import 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

11 Dec 22:13
f768e70

Choose a tag to compare

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 — new layout prop accepts 'default' or 'compact', with side-by-side editor arrangement and reduced spacing
  • Add gridWidth and gridHeight props to AvatarPicker for non-square gallery grids (fall back to gridSize when not specified)
  • Export AvatarPickerLayout type from avatarka-react

Full Changelog: v1.0.1...v1.1.0

Release notes generated by herald v1.0.4

avatarka v1.0.1

09 Dec 16:58
058ec24

Choose a tag to compare

Patch release adding npm and demo badges to README files across all packages.

Documentation

  • Add npm version badges for avatarka and avatarka-react to root README
  • Add live demo badge to root README, avatarka/README.md, and avatarka-react/README.md

Full Changelog: v1.0.0...v1.0.1

Release notes generated by herald v1.0.4

avatarka v1.0.0

09 Dec 16:22
675f83f

Choose a tag to compare

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 gridWidth and gridHeight
  • alwaysTransparentBackground prop 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
  • shapeParam on Theme interface for programmatic discovery of each theme's primary shape options
  • PNG export via svgToPng() and svgToPngDataUrl() 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) and avatarka-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