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

@promptshield/tiptap

v0.0.2

Published

Official Tiptap extension for PromptShield - Protect your editor from Prompt Injection and Trojan Source attacks in real-time.

Readme

@promptshield/tiptap

@promptshield/tiptap: Official Tiptap extension for PromptShield. Protect your editor from Prompt Injection and Trojan Source attacks in real-time.


✨ Why @promptshield/tiptap?

  • Real-time Threat Detection: Scans text for Homoglyphs, Invisible Characters, Unicode Smuggling, and Trojan Source vulnerabilities as the user types.
  • Built-in UI: Provides out-of-the-box text decorations (wavy underlines) and hover tooltips for visual feedback.
  • Quick Fixes: Empowers users to automatically sanitize and fix detected threats programmatically directly within the editor.
  • Ignore Directives: Supports inline ignore directives (e.g. // promptshield-ignore), mirroring the VS Code extension natively.
  • Debounced Scanning: Optimized for performance even with documents up to 50k+ characters. No freezing on keystrokes.
  • AI Co-editing Ready: Ideal for AI text-completion editors, preventing invisible manipulation or "jailbreak" injections from pasting into sensitive LLM input forms.

📦 Installation

$ pnpm add @promptshield/tiptap

or

$ npm install @promptshield/tiptap

or

$ yarn add @promptshield/tiptap

🚀 Usage

import { Editor } from "@tiptap/core";
import Document from "@tiptap/extension-document";
import Paragraph from "@tiptap/extension-paragraph";
import Text from "@tiptap/extension-text";
import { PromptShield } from "@promptshield/tiptap";

// Optionally inject basic styles for the decorations and tooltips
import "@promptshield/tiptap/style.css";

const editor = new Editor({
  extensions: [
    Document,
    Paragraph,
    Text,
    PromptShield.configure({
      // Configure options (defaults shown)
      scanOnUpdate: true,      // Scan dynamically as content changes
      scanOnPaste: true,       // Ensure pasted content is evaluated
      debounceMs: 300,         // Debounce intervals to optimize performance
      hoverUi: true,           // Toggle the tooltip UI
      noInlineIgnore: false,   // Allow the use of inline ignore directives
    }),
  ],
  content: "<p>Hello World</p>",
});

🤖 AI Co-Editing & LLM Interfaces

@promptshield/tiptap is incredibly suited for robust User-to-LLM interfaces. If you are building a chat interface or a co-pilot editor using TipTap:

  1. Prevent Attack Propagation: If an end-user maliciously pastes hidden ZWSP sequences or homoglyphs targeting the AI model.
  2. Warn the User: The immediate visual threat highlights enable the user to automatically rewrite or remove the hidden logic before clicking submit.
  3. Seamlessly Fix: Quick fix actions natively remove invisible characters or normalize strings locally.

License

This library is licensed under the MIT open-source license.