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

@voyantjs/availability-ui

v0.75.0

Published

Reusable availability UI primitives and page compositions for Voyant operator/admin apps.

Readme

@voyantjs/availability-ui

Reusable availability UI primitives and page compositions for Voyant operator/admin apps.

Exports

| Entry | Description | | --- | --- | | . | Barrel re-exports | | ./i18n | Availability UI message provider, defaults, and helpers | | ./components/* | Availability UI components | | ./utils | Small formatting helpers |

Surface

The package exports reusable pieces that keep app-owned routing and the availability batch mutations injected through props:

  • AvailabilityPage
  • AvailabilityRuleDetailPage, AvailabilitySlotDetailPage, AvailabilityStartTimeDetailPage
  • AvailabilityOverview
  • AvailabilitySlotsTab, AvailabilityRulesTab, AvailabilityStartTimesTab
  • AvailabilityCloseoutsTab, AvailabilityPickupPointsTab
  • AvailabilityRuleDialog, AvailabilityStartTimeDialog, AvailabilitySlotDialog
  • AvailabilityCloseoutDialog, AvailabilityPickupPointDialog
  • AvailabilityPageSkeleton, AvailabilityBodySkeleton, detail skeletons
  • availability*Columns table column builders
  • AvailabilitySectionHeader
  • AvailabilityUiMessagesProvider and i18n helpers from ./i18n
  • formatLocalizedSelectionLabel

Usage

AvailabilityPage owns the common operator availability shell, data hooks, filters, overview metrics, table tabs, calendar tab, and rule/slot/start-time dialogs. Route navigation and batch mutations stay app-specific:

import { AvailabilityPage } from "@voyantjs/availability-ui"

<AvailabilityPage
  onSlotOpen={(id) => navigate({ to: "/availability/$id", params: { id } })}
  onRuleOpen={(id) => navigate({ to: "/availability/rules/$id", params: { id } })}
  onStartTimeOpen={(id) =>
    navigate({ to: "/availability/start-times/$id", params: { id } })
  }
  onProductOpen={(id) => navigate({ to: "/products/$id", params: { id } })}
  onBulkUpdate={handleAvailabilityBulkUpdate}
  onBulkDelete={handleAvailabilityBulkDelete}
/>

Closeout and pickup-point mutations are not owned by availability-react yet. Pass onCloseoutSubmit and onPickupPointSubmit to use the package dialogs, or use the slots.dialogs escape hatch to render app-owned dialogs.

Detail pages expose query/loader helpers that accept the app's API client:

import {
  AvailabilitySlotDetailPage,
  loadAvailabilitySlotDetailPage,
} from "@voyantjs/availability-ui"
import { defaultFetcher } from "@voyantjs/availability-react"

const client = { baseUrl: getApiUrl(), fetcher: defaultFetcher }

export const Route = createFileRoute("/_workspace/availability/$id")({
  loader: ({ context, params }) =>
    loadAvailabilitySlotDetailPage(context.queryClient, client, params.id),
  component: () => {
    const { id } = Route.useParams()
    return (
      <AvailabilitySlotDetailPage
        id={id}
        onBack={() => navigate({ to: "/availability" })}
        onOpenProduct={(productId) =>
          navigate({ to: "/products/$id", params: { id: productId } })
        }
        onOpenStartTime={(startTimeId) =>
          navigate({ to: "/availability/start-times/$id", params: { id: startTimeId } })
        }
      />
    )
  },
})

Wrap consumers in AvailabilityUiMessagesProvider for package-level copy and locale-aware formatting. Without a provider the package falls back to English.

import { AvailabilityUiMessagesProvider } from "@voyantjs/availability-ui/i18n"

<AvailabilityUiMessagesProvider locale={resolvedLocale}>
  <AvailabilityPage onBulkUpdate={handleBulkUpdate} onBulkDelete={handleBulkDelete} />
</AvailabilityUiMessagesProvider>

Leaf components remain available for custom page shells:

import { AvailabilitySectionHeader } from "@voyantjs/availability-ui"

function SlotsHeader() {
  return (
    <AvailabilitySectionHeader
      title="Slots"
      description="Manage generated capacity."
      actionLabel="Create slot"
      onAction={() => setOpen(true)}
    />
  )
}

Table column builders are available for apps that use @voyantjs/ui's DataTable and keep routing behavior app-owned:

import { availabilitySlotColumns } from "@voyantjs/availability-ui"

<DataTable
  columns={availabilitySlotColumns(products, openSlotRoute, messages.availability)}
  data={slots}
/>

Dialogs expose the reusable form UI and validation while the app decides how to persist the payload:

import { AvailabilitySlotDialog } from "@voyantjs/availability-ui"

<AvailabilitySlotDialog
  messages={messages.availability}
  open={open}
  onOpenChange={setOpen}
  products={products}
  rules={rules}
  startTimes={startTimes}
  onSubmit={(payload, context) =>
    context.isEditing
      ? api.patch(`/v1/availability/slots/${context.id}`, payload)
      : api.post("/v1/availability/slots", payload)
  }
  onSuccess={refresh}
/>