mosaic 1.2.0
mosaic: ^1.2.0 copied to clipboard
Mosaic is a modular architecture for Flutter that enables clean separation of features using dynamic modules, internal events, UI injection, and centralized builds
1.0.0 #
- Initial version.
0.2.0 #
- Introduced Mosaic CLI.
- Created IMC (Inter Module Communication)
- Removed unused fields.
- Created yaml_encoding to encode json into yaml files
0.2.1 #
- Added support for initialize only actives module
- Commented topological sort
0.2.2 #
- Fixed topological sort
- Fixed sync command
0.2.3 #
- Router fix
0.2.4 #
- Router pop generic type
1.0.1 #
- Fixed argument parsing for profile's commands
1.0.2 #
- Grouped singletons in all one container (also DI container)
1.0.3 #
- Added mosaic service mixin
1.0.4 #
- Added walk command in the CLI
- Deleted debug print
1.0.5 #
- Introduced Imc system
1.0.6 #
- Removed sync command CLI
1.0.7 #
- Optimized look up event listeners
- Introduced namespace support for events
- Fixed empty path events
1.0.8 #
- UI Injection fixedf priority order
1.0.9 #
- CLI mosaic status fixed.
- Added 'no-comment' option to omit comment in generated code.
1.0.10 #
- Fixed bug 'nc'
1.1.0 #
A large feature and correctness release. All changes are backward-compatible.
Added #
- Lazy / dynamic module loading:
registry.registerLazy,load,ensureActivewith depth-first lazy dependency resolution and cycle detection. Modules load transparently when navigated to viarouter.go. - Feature flags: reactive
mosaic.featuresstore with local overrides and async remote resolvers; flags can gate lazy modules. - Module Contracts:
mosaic.contracts— typed public APIs provided/revoked over the module lifecycle, withrequiredContractsboundary enforcement and lazy provider auto-loading.MiddlewareContractroutes typed contract calls through the IMC middleware chain. - Scoped container:
MosaicContaineris now instantiable withMosaicProvider/MosaicContainer.of(context)and areset()for test isolation; the globalmosaicremains the default root scope. - Navigator 2.0 routing (opt-in):
MosaicRouterDelegate+MosaicRouteInformationParserrender the module history as realNavigatorpages with URL/deep-link sync, system back, and transitions.Module.fullScreennow presents the page as a full-screen dialog. - DI enhancements: named/qualified bindings (
name:) and async providers (putAsync/getAsync). - State persistence:
MosaicStoragebackend (defaultInMemoryStorage) +Persistablemixin with debounced save and rehydrate-on-init, built on signals. - Runtime inspector:
MosaicInspectorpanel +MosaicInspectorOverlayshowing module states, contracts, feature flags, and a live event log. - Lifecycle policy:
LifecyclePolicyauto-suspends modules outside a recency window and suspends/resumes on app background/foreground; addedModuleManager.resumeModule. - Typed event channels: optional
EventChannel<T>descriptors for compile-time-checked emit/listen, alongside the existing string API. - A "choosing a communication primitive" guide (
doc/communication.md).
CLI #
mosaic doctor— diagnoses the project: dangling/circular dependencies, missing entry files, mis-configured gates, and invalid profiles.mosaic tessera remove <name>— deletes a tessera (refuses if other tesserae still depend on it).mosaic tessera addgained--lazyand--gate <flag>; theinit.dartcodegen now emitsregisterLazy(...)(with dependencies and an optional feature gate) for lazy tesserae and omits them from the eager init list.mosaic version/--version.tidyandwalknow honor--resolution(global/profile/tesserae);tidypreviously had no handler at all.
Fixed #
DependencyInjector:lazy()now caches the instance after first access (previously rebuilt on everyget);factory()/lazy()doc comments corrected;instancesnow returns resolved objects instead of builder closures.Injectable.lazyregistered the builder closure as a singleton instead of a lazy dependency.ModuleManager.currentModulesetter threw when cleared tonull.Signal.notifyno longer silently swallows listener errors; they are forwarded to the current zone's error handler.- CLI:
utils.upwardno longer loops forever when run outside the home directory (now stops at the filesystem root). - CLI:
Tessera.save/deletethrowCliExceptioninstead of callingexit()from inside the model;mosaic tessera listreads the--pathoption instead of a nonexistent positional. - Removed a stale lint reference (
avoid_returning_null_for_future, removed in Dart 3.3) so the package analyzes clean.