Releases: KalebCooper/swift-indefinite-loader
Releases · KalebCooper/swift-indefinite-loader
Release list
v1.0.0
Added
IndefiniteLoader<T>, a one-shot loader that drivesloading,loaded, andfailed
transitions for a single async operation through two timing rules: a grace delay before any
loading indicator is shown (0.8 s by default) and a minimum visible duration once one is (1.2 s
by default). Cached data passed asupdating:stays on screen while the operation runs, a
failure over cached data keeps the data and attaches the error, caller cancellation rewinds to
the cached value, re-entry cancels the previous load, and an optionaltimeoutfails the
operation withIndefiniteLoaderError.timedOut.IndefiniteLoadState<T>andIndefiniteLoadingPhase, the state the loader emits, with
Equatableconformance whenTisEquatableand theerror,isLoadingOrUpdating,
isLoadingOrUpdatingActive,loadedData,loadingPhase, andupdatingPhaseaccessors.IndefiniteLoaderProtocol, the loader's interface, for consumers that substitute their own
implementation.IndefiniteLoaderView, in theIndefiniteLoadingUIproduct, a SwiftUI view that runs the load
from its own.taskand renders the state through caller-suppliedloaded,loading, and
failedbuilders, rendering nothing during the grace delay.IndefiniteLoadStateView, in theIndefiniteLoadingUIproduct, a passive SwiftUI renderer for a
state a view model owns, withloaded,empty, andfailurebranches and a built-in loading
view.ClockProtocol,SystemClock, andMockClock: the clock the loader sleeps on and reads, the
production implementation, and a test clock that moves only when a test moves it.- Two products.
IndefiniteLoadingcarries the loader, its state, and the clock, depends on no UI
framework, and builds and tests on Apple platforms, Linux, Windows, Android, and WebAssembly
(WASI).IndefiniteLoadingUIcarries the SwiftUI views and compiles to an empty module where
SwiftUI is unavailable.