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

signflow-core

v0.0.5

Published

Framework-agnostic signature capture logic and API client for SignFlow

Downloads

802

Readme

signflow-core

SignFlow logo

npm version npm downloads bundle size license

Framework-agnostic signature capture: pointer/touch/pen event handling with pressure and timing, SVG path export, opt-in geolocation, and a typed API client for the SignFlow backend.

Live demo · Documentation · React wrapper

Features

  • Vector, not raster — strokes captured as SVG path data with a per-point pressure array, not a flattened image
  • Pressure & velocity aware — reads native pointer pressure where supported, falls back gracefully on mouse-only input
  • Server-stamped timestampsdate is assigned by the API, never trusted from the client, so records can't be backdated
  • Opt-in geolocationlocation is null unless the signer explicitly consents; nothing is collected silently
  • Framework-agnostic — plain DOM, React, Vue, or anything else; signflow is a thin React wrapper on top of this package
  • Zero runtime dependencies, tree-shakeable ESM

Install

npm install signflow-core

Usage

import { SignatureCapture, SignClient } from 'signflow-core';

const capture = new SignatureCapture({ element: canvasEl });
// ...user draws...

const client = new SignClient({ apiKey: 'pk_live_...' });

const record = await client.submitSignature({
  signature: capture.toSvgPath(),
  location: null,
  deviceData: capture.getDeviceData(),
  siteUrl: location.href,
  pageName: 'agreement',
  createdBy: '[email protected]',
});

// record.id and record.date are assigned by the server —
// never trust a client-provided timestamp for a signature record.

Use a test key (pk_test_...) while developing. Submissions against a test key are scoped separately from live (pk_live_...) data and can be wiped without touching production records.

API

SignatureCapture

| Method | Returns | Description | |---|---|---| | toSvgPath() | string | The captured stroke(s) as SVG path data | | getDeviceData() | { userAgent, inputType, pressureSupported } | Input context captured during the stroke | | clear() | void | Resets the canvas and discards the current capture | | isEmpty() | boolean | Whether anything has been drawn yet |

SignClient

| Method | Returns | Description | |---|---|---| | submitSignature(payload) | Promise<SignatureRecord> | Submits a captured signature, scoped to the project behind the public key |

Full request/response types are exported from signflow-core. See the API reference for the complete SignatureRecord shape.

Requirements

  • Pointer Events API (all evergreen browsers; no IE11 support)
  • No build step required beyond your existing bundler — ships as ESM

Compliance

Server-assigned timestamps and opt-in-only geolocation are built in, and both support common signature-evidence requirements (POPIA/GDPR, ESIGN Act, eIDAS). Whether your specific use case needs anything further — e.g., signer identity verification beyond OAuth email — depends on your jurisdiction and use case; confirm with counsel rather than treating this package alone as a compliance guarantee. See the Security & Compliance guide for what's covered out of the box.

Related

  • signflow — React wrapper (<SignaturePad />) built on this package
  • Self-hosted backend — NestJS + PostgreSQL, deployed on your own infrastructure

License

See LICENSE