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/vue

v0.2.4

Published

Idiomatic Vue 3 bindings for Doran — v-model components over the @doranjs/wc engine, plus headless composables.

Readme

@doranjs/vue

Idiomatic Vue 3 bindings for Doran — the Persian (Jalali) calendar.

The components are thin v-model wrappers over the @doranjs/wc custom elements (the shared engine), so the calendar/grid logic isn't reimplemented per framework. The change convention matches @doranjs/react: v-model carries a DoranDate, and change also emits the Gregorian Date.

pnpm add @doranjs/vue @doranjs/core vue
// main.ts — load the styles once
import '@doranjs/wc/styles.css';

Components

| Component | v-model | Extra change payload | | ------------------ | ------------------------------- | ------------------------------------------- | | DoranDatePicker | DoranDate \| null | Gregorian Date \| null | | DoranCalendar | DoranDate \| null | Gregorian Date \| null | | DoranRangePicker | { start, end } of DoranDate | Gregorian { start, end } | | DoranNlpInput | string | resolve / change with the parsed result | | DoranAgenda | — | selectday(DoranDate) |

<script setup lang="ts">
import { shallowRef } from 'vue';
import { DoranDatePicker } from '@doranjs/vue';
import type { DoranDate } from '@doranjs/core';

// shallowRef: DoranDate is immutable and must not be deep-proxied.
const date = shallowRef<DoranDate | null>(null);

function onChange(_doran: DoranDate | null, gregorian: Date | null) {
  // Post Gregorian ISO straight to your backend.
  if (gregorian) fetch('/api/save', { body: JSON.stringify({ at: gregorian.toISOString() }) });
}
</script>

<template>
  <DoranDatePicker v-model="date" locale="fa" @change="onChange" />
</template>

Any attribute the underlying element supports (locale, placeholder, format, with-time, min, max, …) passes straight through.

Headless — useCalendarGrid

For fully custom markup, the composable reuses the shared buildMonthGrid / navigateFocus from @doranjs/wc — no per-framework grid logic:

import { useCalendarGrid } from '@doranjs/vue';

const { cursor, grid, next, prev, move } = useCalendarGrid();
// grid.value.weeks → GridDay[][] (Saturday-first); next()/prev() step months.

SSR

The custom elements are loaded client-side on mount (@doranjs/wc is SSR-guarded), so server rendering emits the inert tag and hydration upgrades it. To keep digits/tz deterministic, wrap your app in DoranProvider — it sets locale/timeZone for the subtree via provide/inject, request-scoped (no mutable global):

<script setup lang="ts">
import { DoranProvider, DoranDatePicker } from '@doranjs/vue';
</script>

<template>
  <DoranProvider locale="fa" timeZone="Asia/Tehran">
    <DoranDatePicker />
  </DoranProvider>
</template>

Components resolve locale as explicit attr → provider. See the SSR guide for locale/timezone determinism.


Part of the framework-bindings effort (#22). Svelte and Angular bindings follow the same conventions.