@moltenship/calendar 1.0.0-rc.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -6
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/docs/accessibility.md +305 -0
- package/docs/agents/changes.md +449 -0
- package/docs/agents/coding-agents.md +116 -0
- package/docs/agents/connect.md +444 -0
- package/docs/agents/deleting.md +296 -0
- package/docs/agents/reference.md +511 -0
- package/docs/agents/server.md +317 -0
- package/docs/agents/webmcp.md +153 -0
- package/docs/agents.md +355 -0
- package/docs/annotations.md +198 -0
- package/docs/api/changes.md +264 -0
- package/docs/api/components.md +245 -0
- package/docs/api/dnd-kit.md +265 -0
- package/docs/api/events.md +153 -0
- package/docs/api/primitives.md +218 -0
- package/docs/api/store.md +92 -0
- package/docs/api.md +57 -0
- package/docs/availability.md +576 -0
- package/docs/comparison.md +278 -0
- package/docs/concepts/anatomy.md +73 -0
- package/docs/concepts/events.md +163 -0
- package/docs/concepts/how-it-works.md +112 -0
- package/docs/concepts/state.md +244 -0
- package/docs/concepts/time.md +168 -0
- package/docs/customization.md +271 -0
- package/docs/frameworks.md +116 -0
- package/docs/guides/dnd-kit.md +333 -0
- package/docs/guides/google-calendar-sync.md +1246 -0
- package/docs/guides/google-calendar.md +367 -0
- package/docs/guides/motion.md +414 -0
- package/docs/guides/nextjs-app-router.md +630 -0
- package/docs/guides/nextjs.md +149 -0
- package/docs/guides/performance.md +103 -0
- package/docs/guides/tanstack-query.md +485 -0
- package/docs/ics/feed.md +484 -0
- package/docs/ics/import.md +183 -0
- package/docs/ics/reference.md +482 -0
- package/docs/ics.md +142 -0
- package/docs/index.md +149 -0
- package/docs/installation.md +209 -0
- package/docs/interactions.md +441 -0
- package/docs/llms.txt +99 -0
- package/docs/migrating-to-2.md +497 -0
- package/docs/quick-start.md +163 -0
- package/docs/recurrence/calendar.md +598 -0
- package/docs/recurrence/model.md +128 -0
- package/docs/recurrence/reference.md +547 -0
- package/docs/recurrence.md +122 -0
- package/docs/stylex.md +290 -0
- package/docs/temporal/daylight-saving-time.md +172 -0
- package/docs/temporal/month-grid.md +119 -0
- package/docs/temporal/reference.md +167 -0
- package/docs/temporal.md +105 -0
- package/docs/testing.md +600 -0
- package/docs/theme-builder.md +82 -0
- package/docs/theming.md +275 -0
- package/docs/undo-redo.md +347 -0
- package/docs/views/agenda.md +222 -0
- package/docs/views/custom-views.md +195 -0
- package/docs/views/month.md +110 -0
- package/docs/views/resource-columns.md +265 -0
- package/docs/views/resource-timeline.md +226 -0
- package/docs/views/scrolling.md +193 -0
- package/docs/views/week-and-day.md +258 -0
- package/docs/views/year.md +138 -0
- package/docs/views.md +69 -0
- package/package.json +42 -14
- package/skills/moltenship-time/SKILL.md +77 -0
- package/skills/moltenship-time/references/agent-ready.md +272 -0
- package/skills/moltenship-time/references/changes.md +188 -0
- package/skills/moltenship-time/references/compose.md +175 -0
- package/skills/moltenship-time/references/mistakes.md +100 -0
- package/skills/moltenship-time/references/solid.md +213 -0
- package/skills/moltenship-time/references/state.md +129 -0
- package/skills/moltenship-time/references/testing.md +176 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Series and occurrences
|
|
2
|
+
|
|
3
|
+
Series, exceptions and overrides, how each series keeps its own time, occurrence IDs, and what "this", "following" and "all" change.
|
|
4
|
+
|
|
5
|
+
Source: https://time.molten.sh/docs/react/recurrence/model
|
|
6
|
+
|
|
7
|
+
The calendar shows events, and knows nothing about series. `@moltenship/calendar-recurrence` sits
|
|
8
|
+
beside it: it expands each series into its occurrences for the dates on screen, and the calendar
|
|
9
|
+
shows those as ordinary events. Views, drag and drop, and the event engine work the same with or
|
|
10
|
+
without it, and apps that don't import it pay nothing for it.
|
|
11
|
+
|
|
12
|
+
This page explains the model. The [API reference](./reference.md) lists every export.
|
|
13
|
+
|
|
14
|
+
[Show and edit recurring events](./calendar.md) wires the model into a calendar.
|
|
15
|
+
|
|
16
|
+
## Series
|
|
17
|
+
|
|
18
|
+
Apps store repeating events the way iCalendar, Google Calendar and Outlook do:
|
|
19
|
+
|
|
20
|
+
- **A master event**, placed at the series' first occurrence, with its recurrence: a **rule**, such
|
|
21
|
+
as "every weekday" (RRULE), **exception dates**, occurrences that don't happen (EXDATE), and
|
|
22
|
+
**extra dates**, occurrences the rule doesn't give (RDATE).
|
|
23
|
+
- **Overrides**: separate events that each replace one occurrence, such as a meeting moved to
|
|
24
|
+
another time. An override names its series and the occurrence's original start
|
|
25
|
+
(RECURRENCE-ID). A **cancelled** override removes the occurrence, as Google's API and ICS feeds
|
|
26
|
+
record a deleted one.
|
|
27
|
+
- **One-off events**: everything else.
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
Stand-up (master) Mon 19 Oct, 09:00–09:15 every weekday
|
|
31
|
+
exception date Wed 21 Oct, 09:00 no stand-up that day
|
|
32
|
+
Stand-up (override) replaces Thu 22 Oct, 09:00 at 10:00–10:15
|
|
33
|
+
|
|
34
|
+
Occurrences, 19–23 Oct: Mon 09:00, Tue 09:00, Thu 10:00, Fri 09:00
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Your events keep their own shape. A recurrence adapter, beside your event adapter, reads the
|
|
38
|
+
recurrence of a master and what an override replaces, as an [event adapter](../concepts/events.md)
|
|
39
|
+
reads titles and times. Series can be endless, so occurrences exist only for the dates you expand,
|
|
40
|
+
usually the dates the calendar shows.
|
|
41
|
+
|
|
42
|
+
## Each series keeps its own time
|
|
43
|
+
|
|
44
|
+
Every date of a series has the kind of its first occurrence: an instant for a timed series, a date
|
|
45
|
+
for an all-day one, and a wall time for a floating one. That includes exception dates, extra dates,
|
|
46
|
+
the rule's end, and the original starts overrides name. A date of another kind converts, as real
|
|
47
|
+
feeds need: a date-only exception on a timed series excludes every occurrence that day, and a
|
|
48
|
+
date-only end lasts through that day.
|
|
49
|
+
|
|
50
|
+
A timed series repeats on the wall clock of its own time zone, the `sourceTimeZone` of its first
|
|
51
|
+
occurrence. So a 09:00 meeting stays at 09:00 across daylight saving time, and its instant moves by
|
|
52
|
+
an hour instead. A stand-up at 09:00 in Berlin is at 03:00 in New York most weeks, and at 04:00 in
|
|
53
|
+
the weeks between the two cities' clock changes. A floating series repeats at the same wall time in
|
|
54
|
+
every zone, and an all-day series on the same dates.
|
|
55
|
+
|
|
56
|
+
Some times and dates don't exist on a series' calendar:
|
|
57
|
+
|
|
58
|
+
- A start in a daylight saving gap, such as 02:30 on the night clocks go forward, moves forward by
|
|
59
|
+
the gap and still counts. A start the clock repeats takes its first instant.
|
|
60
|
+
- Dates no month has, such as 30 February or the fifth Friday of a month with four, are skipped and
|
|
61
|
+
don't count.
|
|
62
|
+
- The first occurrence is always one and counts toward the rule's COUNT, even when the rule
|
|
63
|
+
wouldn't give it. Occurrences an exception date removes still count.
|
|
64
|
+
|
|
65
|
+
## Occurrence IDs
|
|
66
|
+
|
|
67
|
+
An occurrence's ID is its series' ID and its original start: `standup::2026-10-22T07:00:00Z`.
|
|
68
|
+
Instants are written in UTC, and dates and wall times as they are. The ID stays the same across
|
|
69
|
+
views, time zones and reloads, so you can store it, select it, and link to it.
|
|
70
|
+
|
|
71
|
+
An override keeps the original start of the occurrence it replaces, so an occurrence moved on its
|
|
72
|
+
own keeps its ID, and with it its selection and focus. An override shows under the same ID before
|
|
73
|
+
its master loads. One-off events keep their own IDs.
|
|
74
|
+
|
|
75
|
+
Changing the following occurrences, or all of them, changes their original starts, and so their
|
|
76
|
+
IDs. The edit's `occurrenceIds` maps old IDs to new ones, so your selection can follow.
|
|
77
|
+
|
|
78
|
+
See [Keep the selection](./calendar.md#keep-the-selection).
|
|
79
|
+
|
|
80
|
+
## Editing a series
|
|
81
|
+
|
|
82
|
+
When someone moves, resizes or deletes an occurrence, the app asks which events the change applies
|
|
83
|
+
to, then saves what that means for the series:
|
|
84
|
+
|
|
85
|
+
| Scope | A move or resize | A delete |
|
|
86
|
+
| ------------------------- | ------------------------------------------------------------------------ | ------------------------------- |
|
|
87
|
+
| This event | An override for that occurrence, or a change to its override | An exception date on the master |
|
|
88
|
+
| This and following events | The series ends before it, and a new series starts where it was dropped | The series ends before it |
|
|
89
|
+
| All events | The whole series moves or stretches by the same change, on its own clock | The master and its overrides go |
|
|
90
|
+
|
|
91
|
+
- **All events** moves the rule with the change, such as Monday to Tuesday in a weekly rule, and
|
|
92
|
+
moves exception dates, extra dates and the original starts overrides name, so deleted occurrences
|
|
93
|
+
stay deleted and moved ones don't appear twice. Overrides keep their own times.
|
|
94
|
+
- **This and following events** splits the series, as Google Calendar and Outlook on the web do:
|
|
95
|
+
later exception dates, extra dates and overrides move to the new series.
|
|
96
|
+
- Only scopes that can apply are offered. The first occurrence has no "This and following events",
|
|
97
|
+
since that's all of them, and a rule that can't follow the change, such as "the 28th of each
|
|
98
|
+
month" dragged to a 29th, offers only "This event".
|
|
99
|
+
|
|
100
|
+
## While the change saves
|
|
101
|
+
|
|
102
|
+
The change stays pending, and visible, while the app asks for the scope and saves it. Cancelling
|
|
103
|
+
the question rolls it back.
|
|
104
|
+
|
|
105
|
+
Only the occurrence that was dragged shows the change while it's pending. The calendar keeps
|
|
106
|
+
pending changes per event and knows nothing about series, so the rest of a series moves once your
|
|
107
|
+
events change and the series is expanded again.
|
|
108
|
+
|
|
109
|
+
## Limits
|
|
110
|
+
|
|
111
|
+
- **RANGE=THISANDFUTURE** isn't part of the model. Google Calendar and Outlook split series
|
|
112
|
+
instead, and the ICS bridge splits a series at such an override the same way, so Apple's "this and
|
|
113
|
+
future" changes show on every later occurrence. When the rule can't follow the change, as a
|
|
114
|
+
BYSETPOS rule moved to another day can't, the bridge reports it and the override replaces only its
|
|
115
|
+
own occurrence.
|
|
116
|
+
- **Drags use the calendar's clock.** In a time zone whose daylight saving time changes on other
|
|
117
|
+
dates than the series' zone, a drag, resize or editor change with "All events" or "This and
|
|
118
|
+
following events" moves the series by an hour more or less than the user did, unless the edit
|
|
119
|
+
gets the calendar's `timeZone`. With it, the change is replayed on the series' clock.
|
|
120
|
+
[The guide](./calendar.md#ask-which-events-a-change-applies-to) passes it.
|
|
121
|
+
- **A repeated hour.** A rule can't say "the later 02:30" of the night clocks go back, so with "All
|
|
122
|
+
events" a start dropped on the later of two equal wall times gets an override there, and the rest
|
|
123
|
+
of the series repeats at the earlier one.
|
|
124
|
+
- **Cancelled first occurrences.** Edits read one occurrence and its series. When cancelled overrides
|
|
125
|
+
hide the first occurrences, "This and following events" from the next still splits the series,
|
|
126
|
+
unless the edit gets the series' overrides as `overrides`.
|
|
127
|
+
- **The ISO calendar.** Rules repeat in the ISO calendar, iCalendar's Gregorian one: a monthly series
|
|
128
|
+
steps by Gregorian months even when its dates use another calendar.
|