bloc_signals 1.10.0
bloc_signals: ^1.10.0 copied to clipboard
Core pure Dart reactive state container bridging BLoC semantics with signals v7 primitives.
1.10.0 #
- Feat (core): Add
manageResource,manageStreamSubscription, andmanageTimerlifecycle helpers toBlocSignalBase(#394). - Feat (concurrency): Expose cooperative cancellation token (
CancellationToken,isCanceled,onCancel) torestartable()event handlers andclose()lifecycle (#498). - Feat (concurrency): Add
concurrent,debounce, andthrottleevent transformers (#480). - Fix (core): Throw
StateErrornaminginitCubitSignalin all build modes whenCubitSignalMixin.emit()is called beforeinitCubitSignal()(#479). - Feat (core): Deduplicate identical observer instances in
BlocSignalObserver.addObserverandCompositeBlocSignalObserver.add, and exporttypedef MultiBlocSignalObserver = CompositeBlocSignalObserver(#479).
1.9.0 #
- Feat (core): Guard
CubitSignalMixin.toString()when uninitialized (<uninitialized>) and add@protected describeState(StateType state)for customizable state formatting (#474). - Feat (devtools): Add
stateRedactor,eventRedactor,errorRedactor,stackTraceRedactor, andmaxPayloadLength(default4096) toDevToolsBlocSignalObserverandDevToolsService, isolate redactor exceptions, recursively sanitizeNaN/Infinityand nested/cyclic metadata, and enforceisEnabledguards across all RPC handlers (#474). - Feat (core): Add
BlocSignalBase.ambientZoneDispatchTokenKeyand propagate a unique per-invocation dispatch token inBlocSignalMixin.addacrossonEvent, transformer/handler execution,onError, andonEventCompleted(#475).
1.8.0 #
- Feat (core): Add
@protectedcoordination hooks (onReset(),isHistorySuppressed, andrunWithoutHistory()) onBlocSignalBaseandCubitSignalMixinso sibling persistence and replay mixins coordinate reset and unrecorded emissions without cross-package coupling (#471). - Fix (core): Dispose owned
StreamSignalandFutureSignalinstances intoAsyncBlocSignal()onclose()with aCompleterlate-settlement guard preventing post-disposeSignalsWriteAfterDisposeError(#470). - Fix (core): Snapshot
CompositeBlocSignalObserverlistener lists across all 8 hooks to tolerate reentrantaddObserver/removeObservercalls, and isolateDevToolsBlocSignalObserver.previousObserverexceptions across all 8 hooks (#470).
1.7.2 #
- Fix (core): Evict
_historyentries viaFinalizer<int>andhandleGetInstancesdeadWeakReferencepruning, scope typedregisterEventDeserializer<T>registrations by container type while preserving unscopedeventNamefallbacks, validatehandleDispatchpayloads (kMaxDispatchPayloadLength = 65536, non-emptyevent,BlocSignalMixintarget), and enforce release-modeisEnabledguards without side-effectingassert(...)closures (#429).
1.7.1 #
- Fix (core): Guard
CubitSignalMixin.createEffectafterclose(), assert in debug mode (returning a no-op closure in release mode), and clean up manually disposed closures from internal effect tracking (#410).
1.7.0 #
- Fix (core): Narrow observer hook error isolation across
CubitSignalMixin,BlocSignalMixin, andCompositeBlocSignalObserverfromon Object catchtoon Exception catchso programming defects (Errorsubtypes such asAssertionError,TypeError, andStateError) propagate instead of being swallowed, and upgrade barecatchblocks in event dispatch and concurrency transformers to expliciton Object catch(#340). - Feat (devtools): Add
DevToolsService.unregisterEventDeserializerandDevToolsService.clearEventDeserializersfor scoped event deserializer lifecycle management (#332).
1.6.0 #
- Fix (core): Throw
StateErrorwhen dispatching an unregistered event to anon<E>-basedBlocSignal(#325). - Fix (concurrency): Track active execution token in
restartable()to prevent falsetask_preemptedtelemetry when an active handler completes while an earlier superseded handler is still in flight (#324). - Fix (core): Remove dead internal
_lifecycleModelno-op effect inCubitSignalMixinthat held a permanent subscription to_stateand preventedSignalOptionswatched,unwatched, andautoDisposecallbacks from firing (#323). - Feat (core): Remove
@protectedannotation fromBlocSignalBase.equalsandCubitSignalMixin.equalsso UI bindings and external adapters can evaluate container state equality without violating visibility diagnostics (#320).
1.5.0 #
- Add
BlocSignalObserver.onEventCompletedlifecycle hook called synchronously or asynchronously upon event handler completion. - Reconcile
DevToolsServicehistory payloads to includeinstanceHashCodeandcurrentStatefor seamless integration withbloc_signals_devtools. - Support typed event deserializer registration in
DevToolsService.registerEventDeserializer()and validate JSON payloads with explicitFormatExceptionhandling inhandleDispatch. - Update
emitContainerTelemetrydocumentation clarifying its role as the public entrypoint for custom concurrency transformers. - Isolate observer exceptions across
onCreate,onEvent,onTransition,onChange, andonCloseintry/catchblocks so that throwing observers cannot abort state updates (_state.value = newState) or lifecycle hooks. All observer exceptions are routed toonError. - Protect
onErroragainst recursive crashes if an observer throws inside its error handler. - Introduce
CompositeBlocSignalObserverand static helpersBlocSignalObserver.addObserver()andBlocSignalObserver.removeObserver()for first-class multi-observer chaining without breaking existing single-observer assignments. - Eliminate release-mode overhead in
DevToolsServiceandDevToolsBlocSignalObserver: elide map allocations and history retention in release builds, and key containers byidentityHashCode(bloc)rather than mutablebloc.hashCode. - Guard
sequential()concurrency event transformers against container closure, automatically discarding pending queued events whenisClosedis true. - Break internal circular import cycles within
lib/src/, transforming internal package structure into a clean Directed Acyclic Graph (DAG).
1.4.0 #
- Add
container.valuegetter as an alias forcontainer.stateValueonBlocSignalBaseandCubitSignalMixinto provide complete 1:1 symmetry withcontainer.state, Flutter context extensions (context.state/context.value), and Flutter'sValueListenable.value.
1.3.0 #
- Introduce
BlocEventTransformer<E, StateType>signature passing hostblocas first parameter(bloc, event, handler, emit)for typed access tostateValue, telemetry, and container context. - Add optional
blocTransformer:parameter toBlocSignalMixin.on<E>()with mutual exclusivity assertion againsttransformer:. - Add
withBloc()instance adapter method onBlocSignalMixinto adapt aBlocEventTransformerinto a standardEventTransformer. - Add
EventTransformerExtension.toBlocTransformer()extension method onEventTransformer<E, StateType>to adapt 3-parameter transformers into 4-parameter contextual transformers. - Refactor
droppableandrestartableto preserve synchronous fast-paths for synchronous handlers, avoiding microtask queue delays and ensuring immediate same-frame execution.
1.2.0 #
- Add
CubitSignalMixin<StateType>andBlocSignalMixin<Event, StateType>to overcome Dart's single inheritance limitation and allow arbitrary classes (ChangeNotifier,TextEditingController,AnimationController,BaseRepository, custom models) to become first-classBlocSignalBasecontainers. - Adopt a DRY core architecture where
CubitSignalandBlocSignalcomposeCubitSignalMixinandBlocSignalMixinas the single source of truth. - Update
DevToolsServiceto recognize and dispatch events to allBlocSignalMixincontainers.
1.1.0 #
- Add
SignalBlocSignalreactive adapter container wrapping anyReadonlySignalinto aBlocSignalBase. - Add
ReadonlySignalBlocSignalExtensiononReadonlySignal<T>(.toBlocSignal()). - Add
FutureBlocSignalcontainer andFutureBlocSignalExtensiononFuture<T>(.toBlocSignal(required initialState:)and.toAsyncBlocSignal()). - Add
StreamBlocSignalExtension.toAsyncBlocSignal()onStream<T>adapting streams toBlocSignalBase<AsyncState<T>>. - Support converting
Signal,Computed,FutureSignal,StreamSignal, and lifted primitives (value.$) intoBlocSignalBase.
1.0.1 #
- Document the streamless
EventTransformerhigher-order model and architecture. - Add recipes and documentation for custom transformers (
debounce,filterEvents). - Expand doc comments for
droppable(),sequential(),restartable(), andon<E>().
1.0.0+1 #
- Re-trigger pub.dev Pana static analysis.
1.0.0 #
- Official 1.0.0 production release.
0.9.0 #
- Staging release candidate for the 1.0.0 production milestone.
- Add streamless custom
EventTransformerAPI support and extendedAsyncStateevaluation test suites. - Complete 100% pub.dev documentation coverage (
///) across all exported symbols and constructors.
0.2.10 #
- Add explicit doc comments to
BlocSignalObserverandMutexconstructors for 100% pub.dev documentation coverage. - Add flush-left side-by-side header logo table to README.
0.2.8 #
- Add configurable options (
SignalOptions,EffectOptions) and rich default debug names across state containers. - Add runnable
@examplecode blocks fordroppable(),sequential(),restartable(), andMutex.protect(). - Add runnable
@examplecode blocks fortoStream(),StreamBlocSignal, andtoBlocSignal(). - Add runnable
@examplecode blocks forDevToolsBlocSignalObserverandDevToolsService.
0.2.7 #
- Add direct links to the Migration Guide and Universal Interoperability Guide skills in README documentation.
0.2.6 #
- Add comprehensive ecosystem package cross-linking table and motto to README.
- Add quick inlined method code examples for
CubitSignal,BlocSignal,on<E>, and concurrency transformers.
0.2.5 #
- Add universal DevTools telemetry observer (
DevToolsBlocSignalObserver) broadcastingbloc_signal.*VM Service events. - Add VM Service RPC extensions (
DevToolsService):- Register
ext.bloc_signal.getInstancesreturning active container metadata and state values. - Register
ext.bloc_signal.getHistoryreturning transition and error history entries per container. - Register
ext.bloc_signal.dispatchenabling remote event dispatching over VM Service RPC.
- Register
0.2.4 #
- Add overridable change-definition (equality/identity) mechanism to state containers:
- Add
@protected bool equals(StateType previous, StateType current)method toBlocSignalBase. - Add optional
equals:constructor parameter toBlocSignalBase,CubitSignal, andBlocSignal. - Add optional
equals:parameter toStream.toBlocSignal()extension. - Automatically synchronize custom equality rules with the underlying
state(ReadonlySignal) graph.
- Add
0.2.3 #
- Add event concurrency strategy transformers and Mutex lock:
- Add optional
transformerparameter toon<E>event handler registry. - Add
droppable(),sequential(), andrestartable()event transformers. - Add zero-dependency
Mutexclass for FIFO queue async mutual exclusion.
- Add optional
0.2.2 #
- Add bidirectional stream interop extensions and progressive migration bridge:
- Add
BlocSignalStreamExtensiononBlocSignalBase(.toStream(),.stream). - Add
StreamBlocSignalcontainer adapting standard DartStream<T>/ BLoCs toBlocSignalBase<T>. - Add
StreamBlocSignalExtensiononStream<T>(.toBlocSignal()). - Auto-close
StreamBlocSignalwhen underlying stream completes.
- Add
0.2.1 #
- Fix package classification on pub.dev to include "Dart" SDK support by migrating from
signalsdependency to pure Dartsignals_core.
0.2.0 #
- Introduce complete BLoC API Parity:
- Add
Changeclass for tracking state updates. - Add
Transitionclass for tracking event-triggered state changes. - Add
onCreate,onChange, andonCloseobserver methods toBlocSignalObserver. - Add
onChangeandonTransitionlocal overrides. - Change
close()to returnFuture<void>.
- Add
0.1.13 #
- Add
createEffecthelper toBlocSignalBaseto support auto-disposed effects in subclass constructors.
0.1.12 #
- Simplify duplicate handler registration check in
on<E>to throwStateErrordirectly and resolve a test coverage gap.
0.1.11 #
- Refactor framework architecture to extract
BlocSignalBaseand introduceCubitSignalfor clean, method-driven state management. - Remove legacy
<void, State>generic typing from Cubits.
0.1.10 #
- Remove pre-release Dart SDK constraints in favor of stable
^3.10.0. - Update documentation and structure the primary BLoC-to-BlocSignal migration guide inside a consumable AI coding assistant skill.
0.1.9 #
- Widen Dart SDK constraint to include pre-release versions of Dart
3.10.0.
0.1.8 #
- Relax Dart SDK constraints to
^3.10.0and relaxmetapackage version constraints.
0.1.7 #
- Add BLoC-compatible
on<Event>API handler registration registry.
0.1.6 #
- Fix relative Migration Guide link in README for pub.dev.
0.1.5 #
- Add assertion to throw
AssertionErrorin debug/development mode whenemit()is called afterclose().
0.1.4 #
- Fix runtime TypeError when async
onEventreturns a non-nullable Future type.
0.1.3 #
- Support asynchronous
onEventhandlers (FutureOr<void>). - Implement zone-based transition event context tracing.
0.1.2 #
- Implement
isClosedand drop events/state updates after disposal.
0.1.1 #
- Add Cubit migration guide to documentation.
0.1.0 #
- Initial release of core
bloc_signalsstate management primitives. - Integrates Rody Davis's
signalspackage with BLoC design patterns.