day line
a day at true scale: the date, the names over their blocks, ticks and a now mark. it shows the shape of the day at a glance.
bunx --bun shadcn@latest add @mk/day-lineserves constellation, trisys, and orbit.
example
each block sits where its meeting sits on the clock. a block carries its whole meaning in its aria label, and the names above it are for the eye. the mark is now, and it moves with useMinute.
the date
the date can open the same day as a plain list. it keeps its underline while the list is open, and on a phone it is the way in, because the blocks there are not targets.
through the day
on a timeline solid means an event and nothing else, so nothing fills in behind the mark. a meeting that has ended dims and loses its word. a meeting underway keeps its brief, since that’s when it’s read, and the word sits on the block’s own face, so the mark passes behind it. a day gone by reads as spent all through, with no mark. two blocks that touch keep a 1 px seam.
kinds of event
an outline is tentative, and its name says so. a dotted edge is a read that may be behind, and the foot says why and when it was last good. two meetings that overlap stack at half height, earlier on top, and share one name. the first ink marks the selected block. a plain date is an all-day event, which goes in the head and never on the strip.
a heavy day
when names can’t sit side by side they stagger on two rows and drop their times, and a tentative name keeps its word on the title’s line. each name truncates before the next one in its row, and a long name at the end of the day stops short of the one before it.
the scale
the scale runs 08:00 to 18:00 and widens to the whole hours that hold the first start and the last end. it never widens for now, so nothing moves as the day goes by. outside the scale the mark waits at the edge and still prints the real time.
no events
a day with no timed event prints its children where the names go: what the day holds. until the first read loading holds the strip’s height with bars in the names’ band, and nothing solid on the track. a refresh keeps the blocks it has.
now
now
when a read fails
a fault has one home: the foot under the strip, with why the day can’t be trusted, when it was last good and one quiet action. it holds its 24 px while it’s empty, so a fault from any calendar comes and goes and nothing moves. with nothing drawn, the band stays empty, so a failed read never reads as an empty day.
on a phone
on a narrow strip one name prints, on one line beside its time: the selected meeting’s, or else the next one’s. past the middle of the day it ends at its block’s right edge. blocks are not targets on a phone, so they print the brief glyph, and the date takes 44 px.
parts
DayLine- the head and the strip, 16 px apart, and the foot right under the strip.
DayLineHead- the date, a note, the steps and the all-day line, in fixed places.
DayLineDate- the date, as words, a link, or a button that opens the day in place. render an
h1when it titles the page. DayLineNote- a calendar’s note beside the date. on a phone it drops under the date at its whole width.
DayLineAllDay- prints
all day:before the words it holds. DayLineSteps- the ways to the next day, usually
Onwardlinks. DayLineStrip- names, track, ticks and now, from
day,events,now,timeZoneandloading. its children print when the day holds no timed event. DayLineFoot- the line under the strip for a fault’s words and when the read was last good, with its one
action. it holds its height while it’s empty. DayLineAction- the foot’s one action, such as
try again.