Skip to content

Add multiple configs support and granular cache for icons/images - #11

Merged
alexey1312 merged 6 commits into
mainfrom
alexey1312/add-new-feature
Dec 11, 2025
Merged

Add multiple configs support and granular cache for icons/images#11
alexey1312 merged 6 commits into
mainfrom
alexey1312/add-new-feature

Conversation

@alexey1312

Copy link
Copy Markdown
Collaborator

Description

Extends ExFig configuration to support multiple configs for colors, icons, and images, enabling per-frame exports. Adds granular node-level cache tracking for raster images and pre-fetch optimization for batch mode.

  • Add multiple icons configuration with per-frame exports (IconsConfiguration enum)
  • Add multiple colors and images configuration support (ColorsConfiguration, ImagesConfiguration)
  • Add granular cache support for raster images via GranularCacheManager
  • Add nodes and components pre-fetch for batch mode granular cache (FileVersionPreFetcher)
  • Use dedicated Platform.flutter for Flutter exports
  • Add comprehensive tests for new configuration types

1. New `PreFetchedNodes` and `PreFetchedComponents` structs with TaskLocal storage for batch-mode sharing
2. Extended `FileVersionPreFetcher` with methods for pre-fetching nodes and components
3. Updated `Batch.swift` to coordinate the three-phase pre-fetch (metadata → components → nodes)
4. Added new warning types for pre-fetch partial failures
5. Updated loaders to use pre-fetched components
6. Updated `GranularCacheManager` to use pre-fetched nodes
1. New `ColorsConfiguration` and `ImagesConfiguration` enums in `Params.swift` for iOS, Android, and Flutter
2. New `ColorsEntry` and `ImagesEntry` structs with per-frame settings
3. `ImagesLoaderConfig` for passing frame-specific settings to the loader
4. Updated `ExportColors` and `ExportImages` commands to handle multiple entries
5. Comprehensive tests for the new configuration formats
6. Documentation updates in CLAUDE.md and CONFIG.md
Add PNG/WebP granular cache tracking to ImagesLoader using the same
pattern as vector images. This enables per-node change detection for
raster exports, skipping unchanged assets even when Figma file version
changes.

Changes:
- Add loadPNGImagesWithGranularCache method for raster images
- Support granular cache in both single-file and multi-file modes
- Update Configuration.md with images array format documentation
- Add comprehensive tests for ImagesLoaderConfig
Previously Flutter used .android platform internally, which could
cause incorrect behavior in platform-specific code paths. This change
adds a proper .flutter case to the Platform enum and updates all
Flutter export commands and loaders to use it.

Also adds a Flutter config template for the init command.
Add project-specific slash commands for development workflow:
- /local-review: comprehensive code review vs origin/develop
- /plan: task breakdown with dependencies for parallel execution
- /pr-summary: generate GitHub PR summary and copy to clipboard
@alexey1312
alexey1312 merged commit 72eb6ac into main Dec 11, 2025
1 check failed
@alexey1312
alexey1312 deleted the alexey1312/add-new-feature branch December 11, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant