Habits

emits.js 17 lines

Files · 10
1234567891011121314151617export const emits = [
  {
    name: "habit-checked",
    description:
      "Emitted once when a previously unchecked eligible date is completed, by UI or listener. Duplicate checks are no-ops.",
  },
  {
    name: "habit-missed",
    description:
      "Emitted once per closed unmet period, caught up on launch and once a minute while running. Daily/weekday periods close at local midnight; N/week closes after Sunday. Only dates on/after start_date and before archived_on are eligible. A final partial week is assessed at its Sunday end, which can follow archival. Backdated checks do not retract historical events.",
  },
  {
    name: "streak-milestone",
    description:
      "Emitted on a new check reaching exactly 7, 14, 30, 60, 100 or 365 consecutive units. Once per habit/milestone/period end, including after undo and recheck.",
  },
];