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

@doranjs/wc

v0.7.2

Published

Framework-agnostic Web Components (custom elements) for the Persian calendar — use Doran in plain HTML or any framework.

Downloads

1,374

Readme

@doranjs/wc

Framework-agnostic Web Components for the Solar Hijri (Persian / Jalali) calendar. Use Doran in plain HTML, or with any framework — Vue, Svelte, Angular, or none at all.

pnpm add @doranjs/wc
import '@doranjs/wc'; // registers the custom elements
import '@doranjs/wc/styles.css'; // design tokens + component styles
<doran-calendar show-holidays value="1405/03/12"></doran-calendar>
<doran-datepicker with-time placeholder="تاریخ و ساعت"></doran-datepicker>
<doran-rangepicker show-holidays></doran-rangepicker>
<doran-nlp-input value="جمعه ساعت ۷ شب"></doran-nlp-input>

From a CDN (no build step)

<link rel="stylesheet" href="https://unpkg.com/@doranjs/wc/dist/styles.css" />
<script src="https://unpkg.com/@doranjs/wc/dist/doran.global.js"></script>
<doran-calendar></doran-calendar>

Elements

| Tag | Description | | ------------------------- | ----------------------------------------------- | | <doran-calendar> | Month calendar with month/year/time pickers | | <doran-datepicker> | Input with a pop-over calendar | | <doran-rangepicker> | Two-click date-range selection | | <doran-rangedatepicker> | Range input with a pop-over grid | | <doran-nlp-input> | Natural-language input with autocomplete + hint |

Listen for change (and resolve on the NLP input) CustomEvents:

document.querySelector('doran-calendar').addEventListener('change', (e) => {
  console.log(e.detail.date, e.detail.value);
});

Day widgets

Annotate individual days — a fare, a seat count, an availability badge. This is a JS property rather than an attribute, since a day map can't be stringified:

const picker = document.querySelector('doran-datepicker');

picker.dayData = {
  '1404-5-12': { text: '۱٬۲۰۰٬۰۰۰', tone: 'low' },
  '1404-5-14': { disabled: true, disabledReason: 'ظرفیت تکمیل' },
};

// Block days beyond min/max — booked dates, sold-out departures.
picker.disabledDates = (day) => day.dayOfWeek === 6;

Keys are Jalali YYYY-M-D; zero-padded and Persian-digit forms ('1404/05/12', '۱۴۰۴/۰۵/۱۲') resolve to the same day. tone becomes data-tone on the annotation: low/positive and high/negative are styled out of the box, and any other value passes through for your own CSS.

A blocked day carries aria-disabled rather than the disabled attribute, so it stays focusable and its disabledReason — a tooltip and part of the day's accessible name — can actually be heard.

Slots

legend, aside, and footer accept light-DOM children, so Vue, Svelte, and Angular templates fill them with no wrapper support needed:

<doran-datepicker>
  <div slot="legend">🟢 ارزان‌ترین نرخ</div>
  <div slot="footer">قیمت‌ها به تومان است</div>
</doran-datepicker>

<doran-datepicker> forwards both dayData and its slot children to the pop-over calendar.

See the documentation for all attributes, events, and theming options.

Time picker

hour-step and minute-step set how far one arrow press moves each unit; both default to 1. Every field can be typed into as well as stepped, and readonly stops typing while leaving the steppers usable.