Concepts

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 helpers

A 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 helpers

React 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.

PackageUse it when
@moltenship/calendarYour app is on React. It includes calendar-core, calendar-temporal, calendar-react and calendar-dnd.
@moltenship/calendar-coreYou validate or query events in code that loads no framework.
@moltenship/calendar-temporalYou only need the date and time zone helpers.
@moltenship/calendar-reactRarely. @moltenship/calendar already includes everything in it.
@moltenship/calendar-primitivesYou write a framework integration, or want the agent types. See Primitives.
@moltenship/calendar-solidYour app is on SolidJS 2. It includes calendar-core, calendar-temporal and the pointer helpers of calendar-dnd.
@moltenship/calendar-recurrenceYour events repeat. See Recurring events.
@moltenship/icsYou 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

  1. You pass events to Root.
  2. Root runs each record through your adapter, validates it, and builds a snapshot: a frozen, indexed copy of your events.
  3. Root asks the active view's strategy for the visible dates, then calls its project function with the snapshot. The result is the view's projection: the events it needs, in the shape it needs.
  4. ActiveView renders the view's Renderer with that projection.
  5. Buttons and your own controls call actions such as navigateNext or setView. 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.
  6. 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.

On this page