sdui_flutter_sanity 0.3.0
sdui_flutter_sanity: ^0.3.0 copied to clipboard
A Server-Driven UI Flutter package powered by Sanity.io headless CMS with realtime config updates.
0.3.0 #
- CLI Code Generator: Added interactive code generator (
dart run sdui_flutter_sanity:generate) to scaffold Flutter custom components, matching Sanity Studio TypeScript schemas, and custom action handlers in a single command. - Sanity Seed Generator: Added
s/seedCLI option to generate a ready-to-import.ndjsonstarter dataset containing samplehomeandcatalogpages using all built-in components. - Action Dispatch Helper: Added
SduiEngine.handleAction(context, action)for clean action dispatching directly from custom widgets. - BREAKING: Replaced
Stringaction strings with a typedSduiActionmodel. CustomSduiActionHandlerimplementations must now acceptSduiActioninstead ofString. - BREAKING:
ComponentRegistryis now an instance-based class (accessible viaSduiEngine.registry) to ensure test isolation. - Fixed a critical
HiveErrorcrash occurring on hot-restarts due to state leak inSduiEngine. - Fixed a silent socket leak in
SanityRealtimeListenerwhere old SSE connections were kept alive. - Fixed
UiNodeignoring thesupportedVersionconfiguration. - Added
variantsupport to the defaultbuttoncomponent (elevated,outlined,text). - Added
fitsupport to the defaultimagecomponent. - The default
textcomponent is now fully aware of the app'sThemeData(e.g.,Theme.of(context).textTheme). - Added an optional
scrollableflag toSduiView(defaults totrue). - Concurrency Protection: Guarded
SduiEngine.initializewith an internalCompleterto prevent race conditions during concurrent initialization. - Stream Lifecycle Hardening: Improved
ConfigControllerstream teardown and SSE connection cleanup on stream cancel. - Network Resilience: Added HTTP request timeout (10s) and slug validation regex in
SanityClientto guard against network hangs and injection. - Cache Safety: Added
Hive.isBoxOpenguards inConfigCacheto prevent uninitialized access errors. - Enhanced test coverage and comprehensive example application revamp.
0.2.0 #
- BREAKING: Completely redesigned Sanity reference schemas for a better, strongly-typed editing experience.
- Features individual strongly-typed schemas (e.g.,
textComponent,imageComponent,columnComponent). - Updated
UiNodeparsing logic to natively support Sanity polymorphic array blocks.
0.1.0 #
- Initial release.