npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reopt-ai/opt-calendar

v1.0.0

Published

AI-editing-friendly React calendar: events + booking/availability, drag/resize, recurrence, timezones, remote source.

Downloads

34

Readme

@reopt-ai/opt-calendar

AI-editing-friendly React calendar. Events and booking/availability as first-class strengths, modeled after @reopt-ai/opt-editor's AI-first architecture (schema-driven streaming + RFC 6902 JSON Patch).

  • AI-first. A flat CalendarSpec is edited by streaming JSON Patch ops — the same edit path used by drag/resize and the visual editor, so AI edits and manual edits share one undo/history.
  • Multi-view. Month / week / day / agenda / timeline, plus Cal.com-style public booking selectors and full availability/admin booking surfaces.
  • v1 engine. Drag & resize, recurrence (RRULE), timezones (IANA via native Intl), and a windowed remote event source.
  • opt infrastructure. Themed via var(--opt-*) tokens (opt-palette / opt-shell), a11y built on opt-ui-primitives, and a ShellCalendarAdapter.

Core has zero runtime dependencies; ai and zod are optional peers used only by the /server and /ai-sdk entries.

Sub-path exports

| Export | Purpose | Peer deps | | ----------------------------------- | ------------------------------- | ------------------ | | @reopt-ai/opt-calendar | Core (Calendar, hooks, types) | react | | @reopt-ai/opt-calendar/server | Server helpers (no React) | react (optional) | | @reopt-ai/opt-calendar/ai-sdk | AI SDK adapters | ai, zod (optional) | | @reopt-ai/opt-calendar/styles.css | Structural CSS | — |

import "@reopt-ai/opt-calendar/styles.css";

Event calendar

"use client";

import {
  Calendar,
  createCalendarStore,
  createEmptyCalendarSpec,
} from "@reopt-ai/opt-calendar";
import "@reopt-ai/opt-calendar/styles.css";
import { useState } from "react";

export function EventsCalendar() {
  const [store] = useState(() => {
    const spec = createEmptyCalendarSpec("Asia/Seoul");
    spec.events.standup = {
      id: "standup",
      title: "Team standup",
      start: "2026-07-06T09:00:00+09:00",
      end: "2026-07-06T09:15:00+09:00",
      rrule: "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR",
    };
    return createCalendarStore(spec);
  });

  return <Calendar store={store} timeZone="Asia/Seoul" weekStartsOn={1} />;
}

Booking selector

Use variant="booking" when the spec contains an availability schedule and an eventType. bookingMode="public" renders the customer-facing date/time picker only. Omit it or pass "full" to include availability editing and booking administration panels in the same surface.

<Calendar
  store={store}
  variant="booking"
  bookingMode="public"
  timeZone="Asia/Seoul"
/>

Production readiness checklist

  • Events: Month/week/day/agenda/timeline share one editor, one hover/focus language, and the same store.applyPatch(ops) mutation path.
  • Booking: Use bookingMode="public" for the customer-facing selector and bookingMode="full" for internal availability and booking administration.
  • Accessibility: Every role="grid" view ships roving-tabindex arrow-key navigation — 2D (±1 day / ±1 week) in the month view, across day columns in the week/day time grid — plus visible focus, first-field autofocus for create/booking flows, and localized status copy.
  • Remote data: useCalendarRemoteSource fetches only the visible window, recovers from Strict Mode aborts, and batches saves through patch ops.
  • Time safety: Drag/resize updates ignore non-finite time deltas instead of writing invalid dates, and booking views initialize against the current date unless the caller supplies an explicit selection.
  • AI review: useCalendarSuggestion renders shadow draft changes before approval, so generated edits do not bypass the manual review path.
  • Verification: Package tests, typecheck, lint, build, and the web e2e/opt-calendar.spec.ts flow cover Events, Booking, AI, Remote Source, Playground, Explore, and docs entry points.

Production examples

  • Playground: /tools/opt-calendar-playground
  • Explore hub: /explore/opt-calendar
  • Booking example: /explore/opt-calendar/booking-selector