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

@ramathibodi/nuxt-commons

v4.0.11

Published

Ramathibodi Nuxt modules for common components

Readme

@ramathibodi/nuxt-commons

Nuxt module for Nuxt 3 and Nuxt 4 that provides shared runtime building blocks for Rama projects:

  • globally auto-imported UI components
  • auto-imported composables
  • runtime plugins for permission/dialog/default behavior
  • utility and lab exports

Documentation & playground

The live playground is the project's documentation site — every component has a real demo page running the real module against the real Vuetify theme, with a Vuetify-docs-style API panel (Props / Emits / Slots / Exposed) sourced from docs/ai-summary.json. Bug-repro fixtures live under Scenarios.

https://ramacare.gitlab.rama.mahidol.ac.th/frontend/rama-modules/ (published from master by the pages CI job; if the project later moves to a unique Pages domain, update NUXT_APP_BASE_URL in the CI job accordingly)

Run it locally with pnpm run dev. See CLAUDE.md > Playground for the conventions every new/modified component must follow.

Install

# pnpm
pnpm add -D @ramathibodi/nuxt-commons

# yarn
yarn add --dev @ramathibodi/nuxt-commons

# npm
npm install --save-dev @ramathibodi/nuxt-commons

Nuxt Setup

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@ramathibodi/nuxt-commons'],
})

Supported Nuxt versions: ^3.16.0 || ^4.0.0

Plugin Initialization (Required)

After registering the module, apps must create a Nuxt plugin that provides $appGraphql and $appAuthentication. This wires up the module's internal bridge system so that ModelTable, ModelSelect, useGraphQl(), and other model-driven components can resolve GraphQL operations and access authentication state.

// app/plugins/graphql.ts (or any plugin name)
// graphqlOperation, graphqlType, graphqlInputType, scalarType are
// auto-imported from your generated composables/graphqlObject.ts.
// useAuthentication is auto-imported from your app/composables/authentication.ts.

export default defineNuxtPlugin(() => {
  return {
    provide: {
      appAuthentication: () => useAuthentication(),
      appGraphql: {
        scalarType,
        graphqlType,
        graphqlInputType,
        graphqlOperation,
      },
    },
  }
})

$appGraphql — Provides generated GraphQL operation metadata (scalar types, object types, input types, and operations) so useGraphqlBridge() and useGraphqlModelOperation() inside the module can resolve queries/mutations by name.

$appAuthentication — Provides a factory function returning the app's authentication state (token, hasPermission, login, logout, etc.) so the module's useAuthentication() bridge can access auth context for API calls and permission checks.

Prerequisites:

  1. Run your GraphQL codegen to generate composables/graphqlObject.ts and types/graphql.ts.
  2. Implement useAuthentication() in your app returning at minimum { token, hasPermission, login, logout }.

See playground/plugins/nuxtCommon.ts for a working example.

What The Module Registers

Configured in src/module.ts:

  • Components from src/runtime/components (global + prefixed)
  • Composables from src/runtime/composables/** (auto-imported)
  • Plugins:
    • src/runtime/plugins/permission.ts
    • src/runtime/plugins/dialogManager.ts (client)
    • src/runtime/plugins/clientConfig.ts (client)
    • src/runtime/plugins/default.ts (client)
  • Type templates from src/runtime/types/*.d.ts

Runtime Config

This module uses public runtime config at:

runtimeConfig.public['nuxt-commons']

Module options are merged into this key by module setup.

Development

# Install dependencies
npm install

# Prepare stubs/types
npm run dev:prepare

# Run playground
npm run dev

# Build playground
npm run dev:build

# Lint and test
npm run lint
npm run test

Concepts

Documentation

Generate documentation artifacts from source:

# Vue component API docs (vue-docgen)
npm run docs:api:components

# Composable API docs (typedoc)
npm run docs:api:composables

# Both API docs
npm run docs:api

# AI-focused summary + type index
npm run docs:ai:summary

docs:api:components now runs a post-process step that enriches missing prop/event descriptions and missing type/default cells in generated markdown using docs/ai-summary.json.

Documentation config files:

Generated outputs:

docs:ai:summary generates:

  • docs/ai-summary.md
  • docs/ai-summary.json
  • docs/type-index.json

Publish Notes

package.json version is used to select the publish line by major.minor:

  • Keep the same major.minor line to continue normal releases.
  • Change it to 0.2.0, 1.1.0, etc. to start publishing that new line on the next release.
npm run dev:build
npm run release