titan 0.1.0
titan: ^0.1.0 copied to clipboard
Titan - Total Integrated Transfer Architecture Network. A powerful reactive state management engine with Pillars, Cores, and fine-grained auto-tracking.
Changelog #
All notable changes to this package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.0 - 2026-03-02 #
Added #
- Atlas.go() navigation support — declarative stack-based navigation
- Pub.dev publish preparation — example file, topics, analysis fixes
- 20 additional tests (gap coverage: Relic, Codex, Quarry, Scroll, Epoch, API)
Removed #
- TitanMiddleware — dead code removed (use TitanObserver/Oracle instead)
- StateChangeEvent — removed alongside middleware
Fixed #
dart formatapplied across all source files- CHANGELOG headers standardized to Keep a Changelog format
0.0.3 - 2025-07-12 #
Added #
- Herald — Cross-domain event bus for decoupled Pillar-to-Pillar communication
Herald.emit<T>()— Broadcast events by typeHerald.on<T>()— Subscribe to events (returnsStreamSubscription)Herald.once<T>()— One-shot listener (auto-cancels after first event)Herald.stream<T>()— BroadcastStream<T>for advanced compositionHerald.last<T>()— Replay the most recently emitted eventHerald.hasListeners<T>()— Check for active listenersHerald.reset()— Clear all listeners and history (for tests)
- Pillar.listen — Managed Herald subscription (auto-cancelled on dispose)
- Pillar.listenOnce — Managed one-shot Herald subscription
- Pillar.emit — Convenience to emit Herald events from a Pillar
- Vigil — Centralized error tracking with pluggable handlers
Vigil.capture()— Capture errors with severity, context, and stack tracesVigil.addHandler()/Vigil.removeHandler()— Pluggable error sinksConsoleErrorHandler— Built-in formatted console outputFilteredErrorHandler— Route errors by conditionVigil.guard()/Vigil.guardAsync()— Execute with automatic captureVigil.captureAndRethrow()— Capture then propagateVigil.history/Vigil.lastError— Error history with configurable maxVigil.bySeverity()/Vigil.bySource()— Query errorsVigil.errors— Real-time error stream
- Pillar.captureError() — Managed Vigil capture with automatic Pillar context
- Pillar.strikeAsync now auto-captures errors via Vigil before rethrowing
- Chronicle — Structured logging system with named loggers
Chronicle('name')— Named logger instances- Log levels:
trace,debug,info,warning,error,fatal LogSink— Pluggable output destinationsConsoleLogSink— Built-in formatted console output with iconsChronicle.level— Global minimum log levelChronicle.addSink()/Chronicle.removeSink()— Manage sinks
- Pillar.log — Auto-named Chronicle logger per Pillar
- Epoch — Core with undo/redo history (time-travel state)
Epoch<T>— TitanState with undo/redo stacksundo()/redo()— Navigate historycanUndo/canRedo— Check capabilityhistory— Read-only list of past valuesclearHistory()— Wipe history, keep current value- Configurable
maxHistorydepth (default 100)
- Pillar.epoch() — Create managed Epoch (Core with history)
- Flux — Stream-like operators for reactive Cores
core.debounce(duration)— Debounced state propagationcore.throttle(duration)— Throttled state propagationcore.asStream()— Convert Core to typedStream<T>node.onChange— Stream of change signals for any ReactiveNode
- Relic — Persistence & hydration for Cores
RelicAdapter— Pluggable storage backend interfaceInMemoryRelicAdapter— Built-in adapter for testingRelicEntry<T>— Typed serialization config per CoreRelic.hydrate()/Relic.hydrateKey()— Restore from storageRelic.persist()/Relic.persistKey()— Save to storageRelic.enableAutoSave()/Relic.disableAutoSave()— Auto-persist on changesRelic.clear()/Relic.clearKey()— Remove persisted data- Configurable key prefix (default
'titan:')
- Scroll — Form field validation with dirty/touch tracking
Scroll<T>— Validated form field extendingTitanState<T>validate(),touch(),reset(),setError(),clearError()- Properties:
error,isDirty,isPristine,isTouched,isValid ScrollGroup— Aggregate form state (validateAll(),resetAll(),touchAll())
- Pillar.scroll() — Create managed Scroll (form field with validation)
- Codex — Paginated data management
Codex<T>— Generic paginator supporting offset and cursor modesloadFirst(),loadNext(),refresh()- Reactive state:
items,isLoading,hasMore,currentPage,error CodexPage<T>,CodexRequest— Typed page/request models
- Pillar.codex() — Create managed Codex (paginated data)
- Quarry — Data fetching with stale-while-revalidate, retry, and deduplication
Quarry<T>— Managed data fetcher with SWR semanticsfetch(),refetch(),invalidate(),setData(),reset()- Reactive state:
data,isLoading,isFetching,error,isStale,hasData QuarryRetry— Exponential backoff config (maxAttempts,baseDelay)- Request deduplication via
Completer<T>
- Pillar.quarry() — Create managed Quarry (data fetching)
- Herald.allEvents — Global event stream for debug tooling
HeraldEvent— Typed wrapper withtype,payload,timestamp
- Titan.registeredTypes — Set of all registered types (instances + factories)
- Titan.instances — Unmodifiable map of active instances (debug introspection)
Fixed #
- Top-level function shadowing: Removed top-level
strike()andstrikeAsync()fromapi.dart— Dart resolves top-level functions over inherited instance methods in ALL contexts (not justlate finalinitializers), causing_assertNotDisposed()and auto-capture to be bypassed. UsetitanBatch()/titanBatchAsync()for standalone batching.
0.0.2 - 2025-07-12 #
Added #
Titan.forge()— Register a Pillar by its runtime type for dynamic registration (e.g., Atlas DI integration)Titan.removeByType()— Remove a Pillar by runtime Type without needing a generic parameter
0.0.1 - 2025-07-11 #
Added #
- Pillar — Structured state module with lifecycle (
onInit,onDispose) - Core — Fine-grained reactive mutable state (
core(0)/Core(0)) - Derived — Auto-computed values from Cores, cached and lazy (
derived(() => ...)/Derived(() => ...)) - Strike — Batched state mutations (
strike(() { ... })) - Watch — Managed reactive side effects (
watch(() { ... })) - Titan — Global Pillar registry (
Titan.put(),Titan.get(),Titan.lazy()) - TitanObserver (Oracle) — Global state change observer
- TitanContainer (Vault) — Hierarchical DI container
- TitanModule (Forge) — Dependency assembly modules
- AsyncValue (Ether) — Loading / error / data async wrapper
- TitanConfig (Edict) — Global configuration