How it works
The packages, which of them React and Solid share, and how your events become a rendered view.
Packages
Time has three layers. The engine and the calendar import no UI framework, and an integration renders them in one:
integration @moltenship/calendar (React) @moltenship/calendar-solid (Solid)
calendar @moltenship/calendar-primitives state, actions, what an agent can call
engine @moltenship/calendar-core adapters, validation, snapshots, queries, changes
@moltenship/calendar-temporal ranges, day boundaries, DST helpersA Solid app imports one package, @moltenship/calendar-solid. It has the parts and the hooks, and
it re-exports the layers under it, so the event adapter, the policies and the functions a view is
made of come from it too:
@moltenship/calendar-solid the Solid integration: Root, parts, hooks
├── @moltenship/calendar-primitives the calendar without a framework: state, actions, agents
├── @moltenship/calendar-dnd drag, resize, and create inside views
├── @moltenship/calendar-core adapters, validation, snapshots, queries, changes
└── @moltenship/calendar-temporal ranges, day boundaries, DST helpersReact and Solid lists what the integration has today.
calendar-dnd builds on calendar-core, which builds on calendar-temporal, and calendar-solid
builds on all three and on calendar-primitives. calendar-core and calendar-temporal don't use
Solid or the DOM, so they also run on a server or in a worker.
The calendar itself is written once, without a framework, in @moltenship/calendar-primitives:
the state, the actions, the pipeline from your events to a view's projection, and what the
calendar tells an AI agent. It's a ui-sdk primitive, and
calendar-solid renders it with @ui-sdk/solid. That is why @ui-sdk/core and @ui-sdk/solid
are peer dependencies. Dates, time zones, recurrence, layouts and policies stay in the calendar's
own engine; ui-sdk's date components aren't used.
Two more packages stand apart: @moltenship/calendar-recurrence expands recurring events into
ordinary events (it builds on core, Temporal and ics), and @moltenship/ics parses iCalendar
text with no dependencies.
| Package | Use it when |
|---|---|
@moltenship/calendar | Your app is on React. It includes calendar-core, calendar-temporal, calendar-react and calendar-dnd. |
@moltenship/calendar-core | You validate or query events in code that loads no framework. |
@moltenship/calendar-temporal | You only need the date and time zone helpers. |
@moltenship/calendar-react | Rarely. @moltenship/calendar already includes everything in it. |
@moltenship/calendar-primitives | You write a framework integration, or want the agent types. See Primitives. |
@moltenship/calendar-solid | Your app is on SolidJS 2. It includes calendar-core, calendar-temporal and the pointer helpers of calendar-dnd. |
@moltenship/calendar-recurrence | Your events repeat. See Recurring events. |
@moltenship/ics | You read iCalendar feeds or files. See ICS. |
Import from the package name only. The packages export nothing else besides ./package.json, so a
path such as
@moltenship/calendar-core/src/events doesn't resolve.
From events to the screen
- You pass
eventstoRoot. Rootruns each record through your adapter, validates it, and builds a snapshot: a frozen, indexed copy of your events.Rootasks the active view's strategy for the visible dates, then calls itsprojectfunction with the snapshot. The result is the view's projection: the events it needs, in the shape it needs.ActiveViewrenders the view'sRendererwith that projection.- Buttons and your own controls call actions such as
navigateNextorsetView. The calendar updates uncontrolled state itself and sends controlled changes to your handlers. A new date or view means a new range and a new projection. - An agent calls the same actions through ui-sdk's agent bridge, if your app creates one. Its changes reach the same handlers and policies, marked as an agent's.
Steps 2 and 3 only run again when their inputs change. A new array with the same records in the same
order reuses the snapshot. A changed array is read again through the adapter, except records with an
unchanged getRevision value; if every record comes out the same, in the same order, the interval indexes are kept.
Using the engine without a framework
Snapshots work anywhere. This finds the meetings in a time range using calendar-core and
calendar-temporal directly:
import { createEventSnapshotCache } from "@moltenship/calendar-core";
import { instantInterval } from "@moltenship/calendar-temporal";
const snapshots = createEventSnapshotCache(eventAdapter);
const snapshot = snapshots.getSnapshot(meetings);
const morning = snapshot.queryTimed(
instantInterval(
Temporal.Instant.from("2026-10-08T06:00:00Z"),
Temporal.Instant.from("2026-10-08T10:00:00Z"),
),
);
morning.map((meeting) => meeting.title); // ["Standup"]eventAdapter and meetings are the ones from the Quick start. The
snapshot reference lists every query.