// today/lib.jsx — primitives for the Today/Home tab const PROJECTS = { ordentus: { name: 'Ordentus v1', color: '#5E5CE6' }, thesis: { name: 'Thesis', color: '#AF52DE' }, flat: { name: 'New flat', color: '#FF9500' }, fitness: { name: 'Run · half-mara',color: '#34C759' }, }; function ArcRow({ kind = 'upcoming', feed, time, title, location }) { return (
{time.h} {time.s}
{title}
{location &&
{location}
}
{kind === 'now' && Now} {kind !== 'now' && }
); } function TodoRow({ done = false, title, projectColor, due }) { return (
{done && }
{title}
{due && {due}} {projectColor && }
); } function BucketHeader({ title, count, add = true }) { return (
{title} {count}
{add && }
); } function ProjectCard({ proj, taskCount, doneCount, pct }) { return (
Project
{PROJECTS[proj].name}
{doneCount} of {taskCount} done · {pct}%
L
M
+2
3 due this week
); } function GoalCard({ title, milestone, percent, color = 'var(--io-indigo)' }) { return (
Goal
{title}
Next · {milestone}
{percent}% on track
); } function ObjectiveRow({ icon, color, title, sub }) { return (
{title}
{sub}
); } function MilestoneRow({ done = false, title, taskCount, dueDate }) { return (
{done && }
{title}
{taskCount} tasks · due {dueDate}
); } Object.assign(window, { PROJECTS, ArcRow, TodoRow, BucketHeader, ProjectCard, GoalCard, ObjectiveRow, MilestoneRow });