I'm excited to announce the release of version 3.0.0, packed with new features, improvements, and breaking changes to enhance functionality and flexibility. This major release focuses on improved integration, customization, and alignment with the Jetpack Compose ecosystem.
✨ New Features
1. Integration with MaterialTheme
- The
SquircleBasedShape
class now extendsCornerBasedShape
, enabling seamless integration withandroidx.compose.material3.Shapes
.- You can now define squircle shapes at the theme level and use them across your Compose components.
2. Corner Smoothing Support
- Added support for
cornerSmoothing
directly within theSquircleBasedShape
constructor.- Smoothly transition corners for a delightful squircle effect.
- Works with both
MaterialTheme
shapes and custom shapes.
3. Enhanced RTL Support
- Improved handling of layout direction with proper adjustments for top-start, top-end, bottom-start, and bottom-end corner radii.
- Fully compatible with both
LayoutDirection.Ltr
andLayoutDirection.Rtl
.
- Fully compatible with both
🛠 Improvements
- Code Simplification: The
createSquircleShapeOutline
function now uses thecornerSmoothing
parameter more efficiently, eliminating the need for overloaded methods. - Performance Optimization: Ensured corner radii are clamped efficiently to fit the size constraints, enhancing rendering performance.
⚠️ Breaking Changes
1. SquircleBasedShape
API Changes
SquircleBasedShape
now directly extendsCornerBasedShape
. This change might require updates in your existing usage of the class, particularly if you were relying on custom implementations.
2. Removal of Overloaded Methods
- Overloaded versions of methods such as
createOutline()
andcopy()
have been replaced with streamlined usage of thecornerSmoothing
field in the base class.
🚀 How to Upgrade
- Update your dependency version to
3.0.0
. - Review the breaking changes section and update your code accordingly.
- Leverage the new
SquircleBasedShape
integration withMaterialTheme
for enhanced customization.
I'm grateful for your continued support and feedback. This release is a big step forward in making squircle shapes more accessible and customizable. Feel free to report issues, share suggestions, or contribute to future improvements.
🎉 Happy Coding! 🎉