Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
69d15ce
token refactor wip
leoafarias Jun 5, 2025
08326bd
Merge branch 'main' into feature/token-refactor
leoafarias Jun 12, 2025
9e901ab
feat: implement generic Token<T> system with full backwards compatibi…
leoafarias Jun 12, 2025
fe38336
refactor: implement unified token resolver system with simplified arc…
leoafarias Jun 12, 2025
fc85673
refactor: update TextStyleDto to use unified token resolver system
leoafarias Jun 12, 2025
63ae8bd
refactor: update SpaceDto to use unified token resolver system
leoafarias Jun 12, 2025
d22e690
refactor: replace Token<T> with MixToken<T> throughout codebase
leoafarias Jun 12, 2025
5148ffe
refactor: remove deprecation warnings from token classes
leoafarias Jun 12, 2025
13c99f1
refactor: implement type-safe token resolution using MixToken objects…
leoafarias Jun 12, 2025
ea79085
Implement Unified Tokens Consolidation Plan with Backward Compatibility
leoafarias Jun 12, 2025
c2a5108
Merge branch 'main' into next
leoafarias Jul 3, 2025
3c8d7d1
Update melos
leoafarias Jul 3, 2025
00fd014
Merge branch 'next' into feature/token-refactor
leoafarias Jul 3, 2025
84aa8d9
feat: refactor DTOs and utility classes to use MixContext and improve…
leoafarias Jul 3, 2025
411b01f
Renamed animation config
leoafarias Jul 3, 2025
c40c9b0
Refactor: Remove deprecated token tests and update integration tests
leoafarias Jul 3, 2025
916e6b8
Clean up
leoafarias Jul 4, 2025
6cf5b40
clean up tokken and values for dtos
leoafarias Jul 4, 2025
17c5aa0
chore: remove pre-commit hook and associated checks
leoafarias Jul 4, 2025
2c3bd82
feat: add Lefthook configuration and setup script for Dart/Flutter pr…
leoafarias Jul 4, 2025
b43a345
Refactor Radius and TextStyle DTOs to simplify structure and improve …
leoafarias Jul 5, 2025
319a069
refactor: Replace hardcoded TypeRegistry with simplified real-time di…
leoafarias Jul 5, 2025
58fa329
Merge branch 'next' into feature/token-refactor
leoafarias Jul 5, 2025
ce7a51a
Refactor shadow and box shadow DTOs to use SpaceDto for blur and spre…
leoafarias Jul 6, 2025
b0375d2
Cleaned up of docs
leoafarias Jul 6, 2025
d654dcc
Remove Lefthook configuration and related scripts
leoafarias Jul 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"flutter": "3.27.0",
"flutter": "stable",
"flavors": {
"prod": "stable",
"mincompat": "3.27.0"
Expand Down
35 changes: 0 additions & 35 deletions .husky/pre-commit

This file was deleted.

9 changes: 5 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
"source.fixAll": "explicit",
"source.dcm.fixAll": "explicit"
},
"dart.flutterSdkPath": ".fvm/versions/3.27.0",
"dart.flutterSdkPath": ".fvm/versions/stable",
"dart.lineLength": 80,
"search.exclude": {
"**/.fvm/versions": true
"**/.fvm": true,
},
"files.watcherExclude": {
"**/.fvm/versions": true

"**/.fvm": true
},
"files.exclude": {
"**/.fvm/versions": true
"**/.fvm": true
}
}
48 changes: 48 additions & 0 deletions COMMIT_MESSAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
feat(mix): implement generic Token<T> system for type-safe theme tokens

## Summary
Introduces a new generic Token<T> class to consolidate duplicate token implementations
while maintaining full backwards compatibility with the existing token system.

## Changes
- Add generic Token<T> class in lib/src/theme/tokens/token.dart
- Update ColorDto to support Token<Color> with token field and factory
- Update SpaceDto to support Token<double> with token field and factory
- Update TextStyleDto to support Token<TextStyle> with token field and factory
- Add token() extension methods to color, spacing, and text style utilities
- Add comprehensive unit and integration tests for token functionality
- Create migration guide and documentation

## Breaking Changes
None. The existing token system remains fully functional with deprecation warnings.

## Migration
Users can gradually migrate from old tokens to new tokens:
```dart
// Old way (still works)
$box.color.ref(ColorToken('primary'))

// New way
$box.color.token(Token<Color>('primary'))
```

## Testing
- Added unit tests for Token<T> class
- Added integration tests for token resolution
- Updated existing tests to handle new token system
- All tests passing

## Documentation
- Created comprehensive migration guide
- Added deprecation notices to old token classes
- Updated examples to show new token usage

## Technical Details
The new Token<T> class uses generics to provide type safety while consolidating
the implementation. It maintains compatibility by delegating to the existing
token resolution system internally.

## Related Issues
- Addresses code duplication in token system
- Removes negative hashcode hack from SpaceToken
- Provides foundation for future token system enhancements
Loading
Loading