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

@arrai-innovations/vitepress-theme

v1.0.2

Published

The shared Arrai Innovations documentation theme for VitePress.

Downloads

692

Readme

Arrai VitePress theme

npm Tests Coverage ESLint Prettier Audit License: BSD-3-Clause

The shared VitePress shell for Arrai Innovations public projects. It provides the common visual system, responsive breadcrumbs, and extension points needed by both small documentation sites and application-backed component docs.

The theme deliberately leaves navigation, sidebars, public logo files, generated documentation, and product components with each downstream project.

Requirements

  • Node.js 22 or newer
  • VitePress 1.6
  • Vue 3.5

Install

pnpm add -D @arrai-innovations/vitepress-theme vitepress vue

Use the default theme when a site has no custom Vue setup:

// docs/.vitepress/theme/index.js
export { default } from "@arrai-innovations/vitepress-theme";

The package imports the Arrai styles and locally served variable fonts. The font dependencies include their own SIL Open Font License notices.

Breadcrumbs

Build route metadata in the VitePress config. Existing Markdown pages become safe links. Structural routes that have no landing page remain labels, so generated API hierarchies do not produce dead links.

// docs/.vitepress/config.mjs
import { fileURLToPath } from "node:url";

import { buildBreadcrumbRoutes } from "@arrai-innovations/vitepress-theme/config";
import { defineConfig } from "vitepress";

const docsRoot = fileURLToPath(new URL("..", import.meta.url));

export default defineConfig({
    themeConfig: {
        breadcrumbs: {
            routes: buildBreadcrumbRoutes({
                docsRoot,
                virtualRoutes: {
                    "/reference/api/config": "config",
                    "/reference/api/use": "use",
                    "/reference/api/utils": "utils",
                },
            }),
        },
    },
});

For a local link: install, allow the resolved theme root through Vite's dev-server filesystem guard. Published installs are already inside the downstream dependency tree, but keeping this configuration supports both forms:

import { arraiThemeRoot } from "@arrai-innovations/vitepress-theme/config";

export default defineConfig({
    vite: {
        server: {
            fs: { allow: [repoRoot, arraiThemeRoot] },
        },
    },
});

Breadcrumbs appear when a page has at least two route segments. Change that threshold globally with minDepth, or set breadcrumbs: false in a page's frontmatter.

themeConfig: {
    breadcrumbs: {
        minDepth: 3,
        routes,
    },
}

The index helper accepts an exclude(relativePath) predicate for draft pages and other files omitted from the production site. Its optional getTitle({ filePath, relativePath, route, source }) callback lets a downstream reuse an existing frontmatter or generated-reference parser. A virtual route also accepts { text, link } when a custom route is safe to link.

Extend the theme

Use createArraiTheme when a downstream site registers components or adds content around the shared layout:

// docs/.vitepress/theme/index.js
import { createArraiTheme } from "@arrai-innovations/vitepress-theme";
import { h } from "vue";

import VersionFooter from "./components/VersionFooter.vue";

export default createArraiTheme({
    layoutSlots: {
        "layout-bottom": () => h(VersionFooter),
    },
    enhanceApp({ app }) {
        app.component("ProductDemo", ProductDemo);
    },
});

createArraiTheme calls the VitePress default enhanceApp before the downstream callback. Layout slots use the names from VitePress's default theme, including layout-top, layout-bottom, doc-before, and doc-after.

Downstream adoption

reactive-helpers

The fixtures/reactive-helpers site models the intended minimal integration:

  1. Replace the local theme export with the package default.
  2. Build breadcrumb routes in config.mjs using the existing draft exclusion rules.
  3. Declare config, use, and utils as non-linking virtual routes until group landing pages exist.
  4. Retain the downstream cube logo, favicons, navigation, sidebar, home content, and deployment base.

VUEDA

The fixtures/vueda site models the extended integration:

  1. Replace the local branded CSS, font files, layout, and breadcrumb component with this package.
  2. Keep the version footer through the layout-bottom slot.
  3. Keep demo components, Pinia, Font Awesome, Tailwind, and product theme setup in the downstream enhanceApp callback.
  4. Replace routeTitles with breadcrumbs.routes, retaining the existing generated route scan and exclusions.

Development

pnpm install
pnpm check

The fixture builds are executable integration tests for the two downstream shapes:

pnpm dev:reactive-helpers
pnpm dev:vueda
pnpm build:fixtures

The shared layout imports VitePress 1 default-theme internals because VitePress does not expose the required breadcrumb placement through a stable layout slot. The peer dependency and both fixture builds make that compatibility surface explicit.

Public API

| Export | Purpose | | -------------------------------------- | --------------------------------------------------- | | Package default | Ready-to-use Arrai theme | | createArraiTheme | Theme factory for application and layout extensions | | ArraiLayout | Shared layout component | | Breadcrumbs | Shared breadcrumb component | | breadcrumbsForRoute | Pure route-to-crumb utility | | buildBreadcrumbRoutes from /config | Node-side Markdown route indexer | | /brand.css | Styles without the theme object |

Licence

BSD 3-Clause. Bundled font dependencies are licensed separately under the SIL Open Font License 1.1.