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

@dateline/views

v0.3.0

Published

Native Astro component library for Dateline themes: calendar (month/week/day/agenda/list), event cards, event details, venue maps, and organizer cards, wired to EmDash's content API.

Downloads

106

Readme

@dateline/views

Native Astro component library for Dateline themes. Provides calendar (month, week, day, agenda, list), event cards, event details, venue maps, and organizer cards. Renders on the theme's Astro runtime; does not run sandboxed. Integrates with EmDash's content API for live event data.

Install

pnpm add @dateline/views @dateline/core astro emdash@^0.9.0

Peer dependencies

  • astro@>=6.0.0 — Astro framework (required)
  • @astrojs/cloudflare@>=13.3.0 — Cloudflare Workers integration for Astro
  • emdash@^0.9.0 — EmDash CMS runtime
  • @dateline/core — event schemas (peer dependency for types)
  • react@>=19.2.3 — React (for some interactive components)
  • [email protected] — Tailwind CSS (optional but recommended for styled components)

Capabilities required

None directly; this is a helper library. It consumes event data via EmDash's public getEmDashCollection() API.

Sandboxed?

❌ No. This is a trusted Astro library that renders at build time and on-demand at the edge via @astrojs/cloudflare. It is not a plugin and has no manifest.

Usage

Basic calendar view

---
import { getEmDashCollection } from "emdash";
import { CalendarMonth } from "@dateline/views";

const { entries: events } = await getEmDashCollection("dateline_events", {
  filter: { startsAt: { gte: new Date() } },
  sort: { startsAt: "asc" },
  limit: 365,
});
---

<CalendarMonth events={events} />

Event list and detail

---
import { CalendarList, EventDetail } from "@dateline/views";

const { entries: events } = await getEmDashCollection("dateline_events", {
  filter: { status: "live" },
  sort: { startsAt: "asc" },
});
---

<CalendarList events={events} />

<!-- Or single event detail -->
{events.length > 0 && (
  <EventDetail event={events[0]} />
)}

Headless components (unstyled)

All components ship styled variants (using Tailwind) and headless variants (no styling) for custom theming:

---
import { CalendarMonthHeadless, EventCardHeadless } from "@dateline/views";
---

<div class="my-custom-styles">
  <CalendarMonthHeadless events={events} />
</div>

Live collections (Astro content)

For editor preview mode, wire events through Astro's live collections API:

// src/content.config.ts
import { defineCollection } from "astro:content";
import { emdashLoader } from "@dateline/views";

export const collections = {
  events: defineCollection({
    loader: emdashLoader({ collection: "dateline_events" }),
    schema: z.object({ /* ... */ }),
  }),
};

Then reference in your Astro pages:

---
import { getCollection } from "astro:content";

const events = await getCollection("events");
---

Key gotchas

RSVP and ticketing components: If @dateline/rsvp or commercial add-ons are installed, additional components are available:

  • <RsvpForm> — public form to submit an RSVP
  • <TicketSelector> — interface to select ticket tiers and quantities
  • <SeatPicker> — interactive seat-map picker (when seats add-on is active)

They're imported the same way:

import { RsvpForm, TicketSelector, SeatPicker } from "@dateline/views";

Timezone display: Events are stored in UTC. Components automatically display start/end times in the viewer's local timezone (via Intl.DateTimeFormat). To override, pass timezone="America/Los_Angeles" to calendar components.

Styling and dependencies: Styled components require Tailwind CSS. If you don't have it, either add it to your Astro project or use the headless variants and write your own styles.

Performance: Calendar views are edge-cached by @astrojs/cloudflare for up to 60 seconds. If you need real-time event updates, lower the cache TTL in your astro.config.mjs.

See also