
Product
Introducing Immutable Scans
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.
@mitre/nuxt-smartscript
Advanced tools
Smart typography transformations for Nuxt - automatic superscript, subscript, and symbol formatting
Smart typography transformations for Nuxt - automatic superscript, subscript, and symbol formatting.
Install the module:
# npm
npm install @mitre/nuxt-smartscript
# pnpm
pnpm add @mitre/nuxt-smartscript
# yarn
yarn add @mitre/nuxt-smartscript
Add to your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@mitre/nuxt-smartscript']
})
That's it! The plugin will automatically process your content ✨
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
Customize the behavior in nuxt.config.ts:
export default defineNuxtConfig({
modules: ['@mitre/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
}
}
})
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>
We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.
# Install dependencies
pnpm install
# Run tests
pnpm test
# Build module
pnpm prepack
# Run playground
pnpm dev
# Lint code
pnpm lint
Apache-2.0 - MITRE Corporation
FAQs
Smart typography transformations for Nuxt - automatic superscript, subscript, and symbol formatting
We found that @mitre/nuxt-smartscript demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.

Product
Campaign-level threat intelligence in Socket now shows when active supply chain attacks affect your repositories and packages.