Draws a filled rounded-rect bar over a track — the shared rendering core
for BarCountdown (bar shrinks) and BarCounter (bar grows). Both widgets
only differ in how they compute progress; the fill math lives here once.
Shares default style/size/timing config across a subtree of
CardCountdowns, so a whole screen of cards doesn't need to repeat
cardColor:/textStyle:/duration: etc. on every instance.
Mutable, painter-visible animation state for one CardCountdown instance.
Digit ticks and transition progress mutate this directly — no setState
— the painter's repaint listenable (the shared AnimationController)
is what schedules the repaint.
Capabilities injected into a plugin when it is registered.
Plugins hold a reference and call requestFrame whenever they
enqueue a new task and need the ticker to (re-)start.
One-stop provider that configures all three families at once, so a page
using counters, countdowns AND stopwatches doesn't need to hand-nest
CounterProvider / CountdownProvider / ElapsedProvider.
Visual style for the text displays — shared by TextCounter,
TextCountdown and TextElapsed (see the TextCounterStyle /
TextCountdownStyle / TextElapsedStyle aliases in those files).
Mutable output holder for resolveDigitPhase. Callers keep ONE instance and
reuse it every frame so the paint/build hot path stays allocation-free (a
record return would heap-allocate per digit per frame in a perf-critical
counter).
Low-level open-ended elapsed-time (stopwatch) widget that exposes the
current TimeParts via a builder — the elapsed counterpart to
CountdownBuilder. Starts at zero on mount and counts up indefinitely until
removed or ElapsedController.cancelled.
Holds a lazily-created, auto-registered default plugin instance. Replaces
the per-engine _default / _registered bootstrap and the matching
Countman.destroy() reset boilerplate.
A sliding-digit "odometer" counter. Now a thin preset over
AnimatedCounter with CounterTransition.slide and odometer defaults
(fixed-width leading zeros). The previous standalone painter was removed —
AnimatedCounter's slide is the same look — so most rendering knobs are
inherited from it.
Draws a circular arc over a track — the shared rendering core for
RingCountdown (arc depletes) and RingCounter (arc fills). Both widgets
only differ in how they compute progress; the arc math lives here once.
Displays an open-ended elapsed-time counter — a stopwatch, not a
countdown. Starts at zero the moment it's mounted and counts up
indefinitely until removed or ElapsedController.cancelled.
Read-only decomposition of a Duration into its calendar components,
shared per task: the owning countdown/elapsed task computes it once
per tick into a reused fixed-length backing list (zero per-frame
allocation), and every consumer of that task — formatters, progress
widgets, the flip-card's per-unit cells — reads the same instance instead
of each recomputing the %/~/ math.
The default preciseCountdown instance (interval: 0 — processes
every frame) used by widgets with precise: true when no plugin is
given. Lets sub-second formatters (CountdownFormat.msTenths /
CountdownFormat.msMillis) update smoothly without hand-wiring a group.
Auto-registered with Countman on first access.
The default preciseElapsed instance (interval: 0 — processes every
frame) used by widgets with precise: true when no plugin is given.
Auto-registered with Countman on first access.
True when n consists entirely of 9s (9, 99, 999, …): (n + 1) is a power
of ten. Used to detect targets where digit interpolation stalls, animating
to n − ε instead and snapping at completion.
Resolves the odometer triple a single digit column renders THIS frame INTO
out, shared by the painter fast-path (CounterPainter.resolveColumnPhase)
and the widget-tree path (DigitColumn) so the trajectory + end-of-roll
ghost-prevention math lives in ONE tested place instead of being mirrored.
Factory signature for AnimatedCounter.painterBuilder. Receives the exact
arguments the default CounterPainter would be built with, so a custom
implementation can subclass CounterPainter and forward them (overriding
only the drawing methods it cares about) while keeping the in-place
update() / repaint contract the fast path relies on.
Formatter function type for CountdownWidget / TextElapsed. Receives the
shared per-task TimeParts (pre-decomposed d/h/m/s/ms) rather than a raw
Duration, so a formatter reads components directly with no % math.