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

@stsdti/esign-vue3-webcomponents

v2.2.4

Published

Web-components for implementing cryptographic operations and integrate with the eSign App.

Readme

@stsdti/esign-vue3-webcomponents

Vue 3 components for integrating with the eSign cloud signing service. Supports both Vue 3 (ESM) and framework-free usage as a native custom element.

Requirements

  • Node 20+
  • Vue 3.5+ (ESM usage only)
  • Modern browser with Custom Elements v1, Shadow DOM v1, and WebAssembly support (Chrome 67+, Firefox 63+, Safari 15.4+)

Installation

npm install @stsdti/esign-vue3-webcomponents

Vue 3 usage

EsignCloudDocument

Drop-in button component that handles the full cloud signing workflow: certificate selection, OAuth2 authorization, optional visible signature placement, and document signing.

<template>
  <EsignCloudDocument
    esign-api-host="https://your-esign-api-host"
    bearer-token="your-jwt-token"
    :to-sign-document-callback="fetchDocument"
    @signatureCancel="onCancel"
    @signatureDone="onDone"
  />
</template>

<script setup>
import { EsignCloudDocument } from '@stsdti/esign-vue3-webcomponents'

async function fetchDocument() {
  const res = await fetch('/api/document')
  return await res.text() // base64-encoded PDF
}

function onCancel() {
  console.log('Signing cancelled')
}

function onDone(signedDocument) {
  console.log('Signed PDF (base64):', signedDocument)
}
</script>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | esignApiHost | String | '' | eSign API service base URL | | bearerToken | String | '' | JWT bearer token from your identity provider | | toSignDocument | String | '' | Base64-encoded PDF to sign (static) | | toSignDocumentCallback | Function | — | Async function returning the base64 PDF (preferred over toSignDocument for lazy loading) | | wasmUrl | String | https://cdn.jsdelivr.net/npm/@embedpdf/[email protected]/dist/pdfium.wasm | URL to the pdfium WASM binary used for PDF rendering | | align | String | 'left' | Dropdown menu alignment: 'left' or 'right' | | disabled | Boolean | false | Disables the signing button |

Events

| Event | Payload | Description | |-------|---------|-------------| | signatureCancel | — | User dismissed or cancelled the signing dialog | | signatureDone | String (base64) | Signed PDF document |

Signing flow

  1. User clicks the sign button → the dialog opens and credentials are retrieved from the eSign API
  2. If not yet authorized, an OAuth2 tab opens and the component polls until authorization completes
  3. User selects a certificate (or the default is used automatically)
  4. For visible signatures: user positions the signature box on the PDF preview
  5. The document is signed server-side and signatureDone is emitted with the result

Custom element (framework-free)

The package ships a self-contained IIFE bundle that registers <esign-cloud-document> as a native HTML custom element. No Vue, no build step on the consumer side — just a <script> tag.

Build

npm run build:ce

Output: dist/esign-webcomponents.js

Usage

<script src="esign-webcomponents.js"></script>

<esign-cloud-document
  esign-api-host="https://your-esign-api-host"
  bearer-token="your-jwt-token"
  wasm-url="https://cdn.jsdelivr.net/npm/@embedpdf/[email protected]/dist/pdfium.wasm"
></esign-cloud-document>

<script>
  const el = document.querySelector('esign-cloud-document')

  // Provide the PDF lazily via callback (preferred)
  el.toSignDocumentCallback = async () => {
    const res = await fetch('/api/document')
    return await res.text() // base64 string
  }

  el.addEventListener('signatureDone', (e) => {
    const signedPdfBase64 = e.detail[0]
    console.log('Signed PDF length:', signedPdfBase64.length)
  })

  el.addEventListener('signatureCancel', () => {
    console.log('Signing cancelled')
  })
</script>

Note: signatureDone carries its payload at e.detail[0]. Vue custom element events wrap emit arguments in an array.

Attributes

All props map to kebab-case HTML attributes:

| Attribute | Description | |-----------|-------------| | esign-api-host | eSign API service base URL | | bearer-token | JWT bearer token | | to-sign-document | Base64-encoded PDF (static) | | wasm-url | URL to the pdfium WASM binary | | align | Dropdown alignment: left or right | | disabled | Disables the signing button |

toSignDocumentCallback must be set as a JavaScript property — it cannot be passed as an HTML attribute.

Important: The custom element bundle must be served over HTTP(S). file:// URLs will block WASM loading and Web Worker creation.


Playground

The playground/ folder contains a standalone HTML page for testing the custom element build without a framework.

One-time setup

# Build the bundle
npm run build:ce

# Symlink dist/ into playground/ so the page can load the file when served
ln -s ../dist playground/dist

Run

npx serve playground

Open http://localhost:3000 in your browser.


Development

# Install dependencies
npm install

# Start dev server (Vue app)
npm run dev

# Build library — ESM package (Vue 3)
npm run build

# Build custom element bundle — IIFE (framework-free)
npm run build:ce