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

@nexa-calendar/core

v1.2.0

Published

Core domain logic, types, and services for Nexa-Calendar. Zero UI dependencies.

Downloads

542

Readme

@nexa-calendar/core

Core domain logic, types, and services for Nexa-Calendar. Zero UI dependencies.

Installation

npm install @nexa-calendar/core
# or
pnpm add @nexa-calendar/core
# or
yarn add @nexa-calendar/core

Features

  • Pure Domain Logic: No UI dependencies, works in any environment
  • 40+ Locales: Built-in i18n with @bereasoftware/time-guard
  • Event Management: Add, update, delete, and query calendar events
  • View Management: Generate grid data for 10+ view types
  • Recurring Events: Support for recurring event patterns
  • Timezone Support: Global event handling across timezones

Usage

import { CalendarStore, DateUtils } from '@nexa-calendar/core';

// Create calendar store
const store = new CalendarStore();

// Navigate dates
store.navigator.today();
store.navigator.next();
store.navigator.previous();

// Change view
store.views.setView('month');

// Add events
const event = store.events.addEvent({
  id: '1',
  title: 'Team Meeting',
  start: DateUtils.today().set({ hour: 10 }),
  duration: 60,
  allDay: false,
});

// Get current view grid
const currentView = store.views.getView();
const range = currentView.getRange(DateUtils.today());
const grid = currentView.generateGrid(range, store.events.getEvents());

API Reference

CalendarStore

Central state management for the calendar.

const store = new CalendarStore(options?: ICalendarOptions);

Properties:

  • events - EventManager instance
  • views - ViewManager instance
  • navigator - CalendarNavigator instance
  • resources - Resource manager
  • plugins - Plugin manager

EventManager

Manage calendar events.

store.events.addEvent(event: ICalendarEvent): string
store.events.updateEvent(id: string, updates: Partial<ICalendarEvent>): void
store.events.deleteEvent(id: string): void
store.events.getEvent(id: string): ICalendarEvent | undefined
store.events.getEvents(range?: IDateRange): ICalendarEvent[]

ICalendarEvent

interface ICalendarEvent {
  id: string;
  title: string;
  start: TimeGuard;
  end?: TimeGuard;
  duration?: number; // minutes
  allDay?: boolean;
  resourceId?: string | string[];
  backgroundColor?: string;
  borderColor?: string;
  textColor?: string;
  classNames?: string[];
  editable?: boolean;
}

ViewManager

Generate view-specific grid data.

const view = store.views.getView(); // Current view instance
const range = view.getRange(DateUtils.today());
const grid = view.generateGrid(range, events);

Supported Views:

  • month - 7xN grid layout
  • week - 7 days with time slots
  • workWeek - Mon-Fri time slots
  • day - Single day view
  • list - Chronological event list
  • timeline - Horizontal timeline
  • timelineDay - Day timeline with resources
  • timelineWeek - Week timeline with resources
  • timelineMonth - Month timeline with resources
  • timelineWorkWeek - Mon-Fri timeline
  • timelineResourceDay - Resource day view
  • timelineResourceWeek - Resource week view
  • timelineResourceMonth - Resource month view
  • timelineResourceWorkWeek - Resource work week
  • year - 12 mini-months

DateUtils

Utility functions for date operations.

DateUtils.today(): TimeGuard
DateUtils.getMonthRange(date: TimeGuard): IDateRange
DateUtils.getWeekRange(date: TimeGuard): IDateRange
DateUtils.getDayRange(date: TimeGuard): IDateRange
DateUtils.getTimelineRange(date: TimeGuard): IDateRange
DateUtils.isInBusinessHours(date: TimeGuard, config: BusinessHours): boolean

License

MIT - see LICENSE