OptionalboundariesThe session roster strictly inside (from, to) — each session/day
open, ascending. Charts consume it two ways: the tick ladder and the
calendar grid treat every entry as a date anchor, while session
dividers draw only at entries that are true collapse seams (removed
time immediately precedes them, detected via distance) — for a
provider built from real exchange segments (this one) the two coincide,
since every reported start follows a real gap. Optional — a provider
that can't enumerate its sessions omits it, and the axis just collapses
silently. Excludes any boundary at the very domain start (no gap
precedes it).
If value lies inside a removed gap, snap it down to the previous live instant; a value already live is returned unchanged. Out-of-domain behavior is implementation-defined (see clampUp).
If value lies inside a removed gap, snap it up to the next live instant; a value already live is returned unchanged. Behavior for a value outside the provider's whole domain is implementation-defined — identityDiscontinuity leaves it; a bounded provider (segmentDiscontinuity) may snap to its first live edge.
Return an independent copy of this provider.
Live (non-gap) domain distance from from to to. Signed: negative when to < from. Gap time between the two is not counted.
Advance value by amount live-milliseconds, skipping gaps. Inverse of distance.
The disjoint time-axis primitive: a d3fc-style discontinuity provider.
A
DiscontinuityProviderdescribes an axis whose domain is epoch-milliseconds but from which certain ranges — closed-market time — have been excised. It is the structural surface a@pond-ts/chartstrading-time scale consumes to map value → pixel while collapsing the gaps, and the same surface the calendar engine (later in this package) produces from a session schedule. Charts depends on the shape, never on this package (see the trading-calendar RFC).The five methods mirror d3fc's
discontinuity-scaleprovider so the semantics are the well-trodden ones:distance(a, b) === -distance(b, a).distance(offset(a, distance(a, b))lands onb, clamped out of any gap).