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

nuxt-smartscript

v0.1.3

Published

Smart typography transformations for Nuxt - automatic superscript, subscript, and symbol formatting

Readme

Nuxt SmartScript

npm version npm downloads License Nuxt

Smart typography transformations for Nuxt - automatic superscript, subscript, and symbol formatting.

Features

  • 🔤 Trademark, Registered & Copyright Symbols - Converts (TM) → ™, (R) → ®, and (C) → ©
  • 🔢 Ordinal Numbers - 1st, 2nd, 3rd with proper superscript
  • 🧪 Chemical Formulas - H2O, CO2 with subscripts
  • 📐 Mathematical Notation - x^2 superscript, x_1 subscript
  • Performance Optimized - Debounced processing, batch updates
  • 🎨 Fully Customizable - Adjust positioning for different fonts
  • Accessible - Proper ARIA labels for screen readers
  • 🔧 TypeScript Support - Full type safety

Quick Setup

Install the module:

# npm
npm install nuxt-smartscript

# pnpm
pnpm add nuxt-smartscript

# yarn
yarn add nuxt-smartscript

Add to your nuxt.config.ts:

export default defineNuxtConfig({
  modules: ['nuxt-smartscript']
})

That's it! The plugin will automatically process your content ✨

Architecture

The module follows a modular architecture for maintainability:

src/runtime/
├── plugin.ts                 # Main plugin orchestrator
├── composables/
│   └── useSmartScript.ts    # Vue composable for components
└── smartscript/
    ├── types.ts             # TypeScript interfaces
    ├── config.ts            # Configuration management
    ├── patterns.ts          # Regex patterns & matchers
    ├── processor.ts         # Text processing logic
    ├── dom.ts               # DOM manipulation utilities
    ├── engine.ts            # Core processing engine
    ├── errors.ts            # Error handling & recovery
    └── index.ts             # Public API exports

Configuration

Customize the behavior in nuxt.config.ts:

export default defineNuxtConfig({
  modules: ['nuxt-smartscript'],
  
  smartscript: {
    // Customize positioning for your font
    positioning: {
      trademark: {
        body: '-0.5em',
        headers: '-0.7em'
      },
      registered: {
        body: '-0.25em',
        headers: '-0.45em'
      }
    },
    
    // Performance tuning
    performance: {
      debounce: 100,
      batchSize: 50
    }
  }
})

Vue Composable

Use in your components:

<script setup>
const { process, stats, isProcessing } = useSmartScript()

// Manually trigger processing
onMounted(() => {
  process()
})
</script>

<template>
  <div>
    <p>Processed: {{ stats.total }} transformations</p>
  </div>
</template>

Contributing

We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.

Development

# Install dependencies
pnpm install

# Run tests
pnpm test

# Build module
pnpm prepack

# Run playground
pnpm dev

# Lint code
pnpm lint

License

Apache-2.0 - MITRE Corporation