titan_atlas 0.0.2
titan_atlas: ^0.0.2 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.
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 - 21 new tests (67 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 containersTitanMiddleware— Abstract middleware for intercepting state changesTitanContainer— 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