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

@arkyc/widget

v1.2.11

Published

Embeddable, framework-agnostic Arkyc identity-verification widget

Readme

@arkyc/widget

The embeddable Arkyc identity-verification widget — a polished, mobile-friendly, framework-agnostic flow that walks a user through document capture, liveness, and face match. It talks only to the Client/Widget API with a short-lived client token (minted by your backend via @arkyc/sdk).

The flow: Welcome → Document Selection → Front Capture → Back Capture → OCR Processing → Selfie Capture → Passive Liveness → Face Match → Processing → Result. back_capture is skipped automatically for single-sided documents (passports).

Install

npm install @arkyc/widget

Modes

import { ArkycWidget } from '@arkyc/widget'

// Overlay modal (full-screen, dismissable):
ArkycWidget.open({
  token: clientToken,
  branding: { primary_color: '#4f46e5', theme: 'light' },
  onComplete: (r) => console.log(r.status, r.decision),
  onError: (e) => console.error(e),
  onClose: () => {},
})

// Inline (mounted into a container element):
ArkycWidget.mount({ token: clientToken, container: '#verify' })

token comes from arkyc.sessions.create() on your server. branding is usually sourced from your project's configuration (colors, logo, border radius, light/dark theme).

Hosted / standalone

The widget also ships a minified browser global for plain <script> embedding — this is what the hosted widget page (and @arkyc/sdk/browser's ArkycWidget.open iframe launcher) loads:

<script src="https://unpkg.com/@arkyc/widget/dist/arkyc-widget.iife.global.js"></script>
<script>
  // Reads ?token= (and optional ?baseUrl=) from the URL and posts
  // `arkyc:complete` / `arkyc:error` / `arkyc:close` to the parent window.
  Arkyc.ArkycWidget.hosted()
</script>

Build the standalone bundle with pnpm --filter @arkyc/widget build:standalone (the ESM + .d.ts build comes from the workspace tsdown).

Camera & capture

Capture screens use getUserMedia for a live preview and grab a JPEG frame via an offscreen canvas, falling back to a file input when the camera is unavailable or permission is denied. Overlay iframes are launched with allow="camera; microphone".

Messaging contract

In hosted/iframe mode the widget posts these messages to window.parent, which @arkyc/sdk/browser listens for:

| Message | Payload | | ---------------- | ---------------------- | | arkyc:complete | { status, decision } | | arkyc:error | { message, name } | | arkyc:close | — |

onComplete / onError fire when the user acknowledges the result screen, so the user always sees the outcome before the widget tears down.

Programmatic API

Each concern is a class, exported for custom integrations and testing: ArkycClient (the Client API wrapper), Theme (branding → CSS), Camera (capture), and Flow (the step machine: Flow.nextStep, Flow.isTerminal, Flow.statusToDecision, Flow.STEP_ORDER).