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

@weaver-apps/calendar

v0.8.1

Published

The calendar app's weaver for a LoomWeaver distribution: a calendar's appointments by week, booking, editing, cancelling and deleting, behind a gateway the host supplies.

Readme

@weaver-apps/calendar

The calendar app's weaver for a LoomWeaver distribution: a calendar's appointments by week, booking, editing, cancelling and deleting. It talks to the Weaver Apps server through a gateway the host supplies, and holds no key.

Compose it

import {
  calendarPluginId,
  createCalendarPlugin,
  createHttpCalendarGateway,
  provideCalendarGateway,
} from '@weaver-apps/calendar';

provideTranslationNamespaces(calendarPluginId),
provideCapabilityGrants({ [calendarPluginId]: ['contributions', 'navigation', 'ui'] }),
...providePlugins(createCalendarPlugin({ railItem: true })),
provideCalendarGateway(createHttpCalendarGateway({ baseUrl: '/weaver-apps' })),
  • baseUrl is a same-origin path the host's backend forwards to the server, adding the forwarding key and the signed-in person's tenant (X-API-Key, X-Act-For-Tenant). The gateway appends the server's own routes, such as /calendar/calendars/{id}/appointments.
  • Serve the translations: the package carries them under i18n/weaver-apps-calendar; add an assets glob that copies node_modules/@weaver-apps/calendar/i18n/weaver-apps-calendar to i18n/weaver-apps-calendar.
  • Install AG Grid, a peer dependency the list is drawn with: npm i ag-grid-community@^36.2 ag-grid-angular@^36.2 @ag-grid-community/locale@^36.2. @weaver-apps/data-grid, the grid both Weaver Apps weavers share, comes along as a dependency; the host composes nothing for it.
  • If the host compiles the shell's theme with Tailwind, add the package and @weaver-apps/data-grid as an @source.

Titles from the host

By default a calendar is headed and listed by the name stored with it. A host that names calendars itself, say in the reader's language, hands those titles to the weaver:

import { provideCalendarTitles } from '@weaver-apps/calendar';

provideCalendarTitles(() => {
  const names = inject(MyCalendarNames);
  return (calendarId) => names.titleOf(calendarId);
}),
  • The factory runs in the host's injection context, so it may inject what it needs.
  • The returned function answers a calendar id with a title, or null (or a blank string) when the host has none. The calendar page's heading and the list then show the host's title, otherwise the stored name, and while neither is known the weaver's own translated title.
  • The weaver calls the function inside a computed. Every signal it reads, such as the host's active language, is tracked, so a changed title re-titles the open page. A host with an observable turns it into a signal with toSignal first.
  • The function runs for every listed calendar whenever a signal it reads changes; keep it a lookup.

Names in the host

The plugin id is weaver-apps-calendar (calendarPluginId). Every id the plugin registers and every icon it contributes starts with weaver-apps-calendar., its routes live under weaver-apps-calendar/, and its translations are the namespace weaver-apps-calendar. The ids are exported as calendarContributionIds.

| Id | Path | What it shows | |---|---|---| | weaver-apps-calendar.calendars | weaver-apps-calendar | the tenant's calendars | | weaver-apps-calendar.calendar | weaver-apps-calendar/:calendarId | one calendar's appointments, a week at a time | | weaver-apps-calendar.rail | | the rail item, only with railItem: true |

A calendar's week is a grid: a click on a column header sorts it (earliest first by default), and the status column filters by any number of statuses.

calendarPath(id) builds the address of one calendar; a host that shows one entry per calendar navigates there. createCalendarPlugin({ railItem: true }) adds a rail item that opens the list; without it the host decides where the calendar is reached from.

Moving from 0.1.x

0.2.0 draws the list with AG Grid, so a host installs it (see above). It also renamed everything the plugin puts into a host; a host composing it changes three places: the key of its capability grant (calendar becomes weaver-apps-calendar), the translation namespace it declares, and the folder it serves the translations from (i18n/calendar becomes i18n/weaver-apps-calendar). Addresses saved under calendar/... no longer resolve; build them with calendarPath.