drip_core 0.2.0-alpha
drip_core: ^0.2.0-alpha copied to clipboard
High-performance, zero-dependency reactive engine for the DRIP framework. Synchronous-only tracking with microtask coalescing.
0.2.0-alpha #
Added #
DripReadable<T>— common read + subscribe interface implemented byDripState<T>,DripComputed<T>, andDripAsync<T>DripAsyncValue<T>— sealed class with three variants:DripLoading<T>— carries optionalpreviousDatafor refresh patternsDripData<T>— carries the successful result valueDripError<T>— carries error, stackTrace, optionalpreviousData- Convenience:
isLoading,hasData,hasError,dataOrNull,getDataOr(),map(),hasPreviousData
DripAsync<T>— reactive async state container extendingDripState<DripAsyncValue<T>>setLoading()— transitions to loading, preserves previous datasetData(value)— transitions to datasetError(error, stack)— transitions to error, preserves previous datarun(computation)— manages all three transitions automatically with generation-counter concurrent-call cancellation guaranteefromFuture()— static factoryfromStream()— static factory with scope-registered subscription
Changed #
DripState<T>— now implementsDripReadable<T>DripComputed<T>— now implementsDripReadable<T>
0.1.1-alpha - 2026-05-14 #
Added #
DripValue<T>interface — public readable/subscribable contract shared byDripState<T>andDripComputed<T>. Enables the Flutter render layer to accept either as a binding source without casting.DripListenerinterface andListenerSubscriberadapter — moved todrip_state_base.dartfor package-wide accessibility.subscribe(DripListener)/unsubscribe(DripListener)on bothDripState<T>andDripComputed<T>.
Exports (drip_core.dart) #
DripValueandDripListenernow exported from the public barrel viadrip_state_base.dart.
0.1.0-alpha - 2026-05-13 #
Initial Release of the DRIP Reactive Engine.
Added #
DripState<T>— atomic reactive value with version clock and equality check.DripComputed<T>— lazy, cached derived value with automatic dependency tracking.DripEffect— side-effect runner with automatic re-execution on dependency change.DripScope— lifetime owner with LIFO disposal guarantee.DripBatch— microtask-based coalescing scheduler (O(1) propagation passes per synchronous block).TrackingContext— stack-based, synchronous-only dependency registration.Equality<T>interface withDefaultEqualityandIdentityEqualityimplementations.DripCircularDependencyError— thrown on circular computed dependency.DripDisposedScopeError— thrown on access to a disposed scope.- Top-level
dripState<T>()factory function.
Architecture #
- Zero Flutter dependency — usable in Dart CLI and server applications.
- Zero Zone-based tracking — async gaps never register spurious dependencies.
- Pure Dart SDK
>=3.3.0— no third-party runtime dependencies.
Testing #
- 30+ unit tests covering all invariants.
- CI-gated benchmark tests: write throughput, propagation efficiency, batching.