titan_atlas 1.0.3
titan_atlas: ^1.0.3 copied to clipboard
Atlas — Titan's routing & navigation system. Declarative, type-safe, zero-boilerplate page management with Passages, Sentinels, and deep linking.
Changelog #
All notable changes to the Titan packages will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.1 - 2026-03-02 #
- No API changes. Version bump to align with workspace release.
1.1.0 - 2025-07-23 #
Added #
CoreRefresh— bridges Titan's reactiveCoresignals to Flutter'sListenablefor automatic route re-evaluationrefreshListenableparameter onAtlasconstructor — triggers Sentinel/Drift re-evaluation when the providedListenablenotifies- Automatic cleanup of old refresh listeners when Atlas is replaced
- Re-entrant guard (
_isRefreshing) prevents cascading refresh calls - Both sync and async Sentinel support during refresh
Garrison.refreshAuth— one-call factory combiningauthGuard+guestOnly+CoreRefreshGarrisonAuth— result type withsentinelsandrefreshfields- Post-login redirect:
guestOnlynow readsredirectquery parameter (viauseRedirectQuery) for seamless return to originally requested page _onRefreshpreserves query parameters during re-evaluation (useswaypoint.uriinstead ofwaypoint.path)- 26 tests for CoreRefresh, refreshListenable, Garrison.refreshAuth, and post-login redirect
- 200 tests passing
1.0.0 - 2026-03-02 #
0.1.0 - 2026-03-02 #
Added #
- Atlas.go() / context.atlas.go() — declarative navigation that reuses existing stack entries or replaces the stack. Ideal for tab/bottom-nav switching (prevents duplicate page keys)
- Pub.dev publish preparation — example file, topics, analysis fixes
- 3 new tests for
go()behavior (reuse, fresh, no-op)
Fixed #
- Duplicate page key crash when switching Sanctum tabs via
Atlas.to() WidgetsBindinginitialized defensively inAtlas.configgetterdart formatapplied across all source files
0.0.2 - 2025-07-12 #
Added #
Enterprise Features
- AtlasObserver — Navigation lifecycle observer for analytics, logging, and debugging
onNavigate,onReplace,onPop,onReset,onGuardRedirect,onDriftRedirect,onNotFound
- AtlasLoggingObserver — Built-in console logging observer
- Async Sentinel resolution — Async route guards now fully evaluated during navigation
- Type-safe Rune accessors —
waypoint.intRune('id'),doubleRune(),boolRune()+ query equivalents - Per-route redirects —
Passage('/old', ..., redirect: (wp) => '/new') - Route metadata —
Passage('/admin', ..., metadata: {'title': 'Admin'})accessible viawaypoint.metadata - Route name on Waypoint —
waypoint.namereturns the Passage's named identifier
DI Integration
- Global Pillars —
Atlas(pillars: [AuthPillar.new])registers Pillars viaTitan.forge()on construction - Route-scoped Pillars —
Passage('/checkout', ..., pillars: [CheckoutPillar.new])auto-creates on push, auto-disposes on pop - Shell-scoped Pillars —
Sanctum(pillars: [DashboardPillar.new], ...)Pillars live with the shell Titan.forge()— Registers a Pillar by its runtime type (for dynamic registration)Titan.removeByType()— Removes a Pillar by runtime Type (no generic parameter needed)- 37 new tests (83 total)
0.0.1 - 2025-07-12 #
Added #
Atlas — Routing & Navigation
- Atlas — Declarative router with Navigator 2.0, deep linking, and zero-boilerplate API
- Passage — Route definitions with static, dynamic (
:param), and wildcard (*) patterns - Sanctum — Shell routes for persistent layouts (tab bars, nav rails, drawers)
- Sentinel — Route guards with sync/async,
only(), andexcept()modes - Shift — Page transitions:
fade(),slide(),slideUp(),scale(),none(),custom() - Waypoint — Route state with Runes (path params), query params, and extra data
- Drift — Global redirect function applied before Sentinels
- Runes — Extracted path parameters (
:id→wp.runes['id']) - RouteTrie — O(k) trie-based route matcher with static > dynamic > wildcard priority
- AtlasContext —
context.atlas.to()/.back()/.replace()BuildContext extension - Named routes —
Atlas.toNamed('name', runes: {...})navigation - Stack navigation —
Atlas.to(),.back(),.backTo(),.replace(),.reset() - 404 handling — Default and custom error pages via
onError - 46 tests covering trie matching, waypoint, sentinel, and full widget integration
Added #
Titan Architecture
- Pillar — Structured state management base class with lifecycle (
onInit/onDispose), managed reactives, and auto-disposal - Core (
core()/Core()) — Fine-grained reactive mutable state with auto-tracking, custom equality,peek(),update(),silent(), andlisten() - Derived (
derived()/Derived()) — Auto-computed reactive values with lazy evaluation, caching, and auto-dependency tracking - Strike (
strike()) — Batched state mutations that coalesce notifications - Watch (
watch()) — Managed reactive side effects with cleanup andfireImmediately
Reactive Engine (titan)
TitanState<T>— Signal-based mutable reactive nodeTitanComputed<T>— Derived reactive node with dependency trackingTitanEffect— Reactive side effect with cleanup functions andonNotifycallbacktitanBatch()/titanBatchAsync()— Batch multiple state changes into a single notification cycleTitanStore— Legacy abstract base class for organized state containersTitanContainer— Type-safe DI container with lazy singletons, scoped child containers, and auto-disposalTitanModule/TitanSimpleModule— Module system for grouping DI registrationsAsyncValue<T>— Sealed class (AsyncData,AsyncLoading,AsyncError) withwhen()andmaybeWhen()TitanAsyncState<T>— Reactive async state wrapper withload(),refresh(),setValue(),setError(),reset()TitanObserver— Global state change observerTitanLoggingObserver/TitanHistoryObserver— Console logging and time-travel debuggingTitanConfig— Global configuration withdebugModeandenableLogging()Titan— Global Pillar registry withput(),lazy(),get(),find(),has(),remove(),reset()
Flutter Integration (titan_bastion)
- Vestige — Auto-tracking consumer widget; only rebuilds when accessed Cores change
- Beacon — Scoped Pillar provider with lifecycle management and auto-disposal
BeaconScope/BeaconContext—context.pillar<P>()andcontext.hasPillar<P>()extensionsVestigeRaw— Untyped consumer for standalone Cores (non-Pillar usage)TitanScope— InheritedWidget-based scope forTitanContainerTitanBuilder— Auto-tracking builder widgetTitanConsumer<T>— Typed store consumer widgetTitanSelector<T>— Fine-grained selector with custom equalityTitanAsyncBuilder<T>— Pattern-matched widget forAsyncValuestatesTitanStateMixin— Mixin forStatefulWidgetwithwatch()andtitanEffect()
Documentation
- 11 comprehensive documentation files covering all concepts
- Migration guides from Provider, Bloc, Riverpod, and GetX
- Architecture documentation for contributors
Example
- Counter demo with Pillar, Beacon, and Vestige
- Todo app demo with filtering and CRUD operations
