Skip to content

v0.2.0 — Enhanced DX, Validation & Critical Fixes

Choose a tag to compare

@andrei-shpileuski andrei-shpileuski released this 16 Feb 21:29
· 9 commits to main since this release

@grandgular/rive-angular v0.2.0

Major feature release with enhanced developer experience, comprehensive validation system, and critical stability improvements.

🎉 What's New

Debug Mode & Validation

  • 🛠️ Debug Mode — New debugMode input and provideRiveDebug() for configurable logging ('none' | 'error' | 'warn' | 'info' | 'debug')
  • ✅ Automatic Validation — Validates artboard, animation, state machine, and input names against loaded files with helpful suggestions
  • 🏷️ Error Codes — Structured error codes (RIVE_1xx, RIVE_2xx, RIVE_3xx) for programmatic error handling

Reactive Configuration

  • ⚡ Reactive Inputs — All component inputs (fit, alignment, artboard, animations, stateMachines) now trigger appropriate updates
  • 🎨 Layout Optimization — Changes to fit/alignment update layout without full reload

Architecture Improvements

  • 🔒 Readonly Signals — Public signals properly encapsulated to prevent external mutation
  • 🏗️ DI IntegrationElementObserver converted to Angular service for better testability
  • 📦 Type Safety — Eliminated unsafe type assertions in configuration

🐛 Critical Fixes

  • 📱 Multi-Monitor Support — Device pixel ratio now read dynamically, supporting monitor changes and zoom
  • ⏱️ Proper TimingriveReady output now emits after animation fully loads (not just instance creation)
  • 🔄 Race Conditions — Fixed race conditions in RiveFileService and cache management
  • 🧹 Memory Leaks — Fixed clearCache() to properly handle pending loads
  • 🔐 No Mutations — Service no longer mutates ArrayBuffer objects (uses WeakMap)

⚠️ Breaking Changes

1. Readonly Signals

Public signals (isPlaying, isPaused, isLoaded, riveInstance) are now readonly.

Before:

component.isPlaying.set(true); // ❌ No longer works

After:

component.playAnimation(); // ✅ Use component methods

2. riveReady Timing

riveReady output now emits after animation is fully loaded.

Before:

// Emitted immediately, instance might not be ready
(riveReady)="onReady($event)"

After:

// Emits after load, instance is guaranteed ready
(riveReady)="onReady($event)" // artboardNames available
// Or use (loaded) if you don't need the instance

📚 Documentation

See CHANGELOG.md for complete details and migration guide.

🙏 Thanks

All 45 tests passing. Production-ready with comprehensive audit completed.