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

@appnotes/sdk

v0.11.2

Published

Embeddable AppNotes SDK for private notes in SPA applications

Readme

@appnotes/sdk

Embeddable AppNotes SDK for any SPA application.

import { initAppNotes } from "@appnotes/sdk";

const appNotes = initAppNotes({
  projectKey: "appnotes_pk_example",
  roomId: "account-42",
  roomName: "Codeception",
  toggleDomElement: "#appnotes-toggle",
  rootDomElement: document.body,
});

appNotes.open();

SaaS integrations default to https://api.appnotes.tech/api and wss://ws.appnotes.tech/v1. Self-hosted and development integrations should declare both transport endpoints:

const appNotes = initAppNotes({
  projectKey: "appnotes_pk_example",
  roomId: "account-42",
  endpoints: {
    apiUrl: "https://notes.example.com/api",
    realtimeUrl: "wss://notes.example.com/api/realtime",
  },
});

The legacy apiUrl option remains supported and derives a WebSocket URL by appending /realtime; explicit endpoints are preferred because they do not couple the two transports to one routing convention.

roomId is the stable room key used to isolate and filter notes. The optional roomName is a human-readable label shown in the drawer header and dashboard room filter. When the active account changes, update both values together:

appNotes.setRoom(nextAccount.id, nextAccount.name);

If roomName is omitted, AppNotes displays roomId as before.

The SDK mounts the button and drawer in separate Shadow DOM roots, tracks navigation through the History API, keeps the short-lived access token in memory, and automatically rotates it through a project-specific HttpOnly refresh cookie. The refresh credential is never returned to JavaScript and is never written to the host application's storage. Existing SDK credentials are removed from localStorage during the first initialization after upgrading; users must sign in again after the server-side session-scope migration.

SDK requests use credentials: "include". Production therefore requires HTTPS, an exact allowed origin for the project, and browser support for the API's SameSite=None; Secure third-party cookie. A host may explicitly provide the storage option to persist the access token, but the SDK still never places the refresh credential in that storage. Omitting storage is the recommended and default memory-only mode.

Members can edit, pin, archive, and restore their own notes, while owners and administrators can manage every note. Any writable member can change a note's open or resolved status. Pinned notes appear above the creation-date-ordered list. It subscribes to room changes over WebSocket and synchronizes the current REST representation whenever an event arrives or the connection is restored. It also synchronizes when the browser window regains focus. Per-user unread counters are shown on the launcher, tabs, and note cards; opening a note marks the fetched version as read. Notes created from the All tab apply to the whole room, while notes created from the This page tab remain bound to the current page. Writable members can attach up to ten images or files to their own notes and comments. Images are previewed inside the drawer, while every file is downloaded through the authenticated API; the SDK never exposes a server storage path. Each file is limited to 20 MiB. Supported formats are JPEG, PNG, GIF, WebP, PDF, UTF-8 text, CSV, Markdown, and log files. On screens wider than 640px, the drawer reserves its configured width on the document body so the host page reflows beside it. The host page's minimum width is preserved, allowing native horizontal scrolling when the remaining viewport is too narrow. On smaller screens, the drawer remains a full-screen panel. Its open or closed state is stored per project in localStorage and restored on the next page load.

The browser build exports the same API as window.AppNotes.init(options). SaaS serves the short-cache alias from https://js.appnotes.tech/appnotes.global.js and immutable releases from https://js.appnotes.tech/v<VERSION>/appnotes.global.js.

Host applications with Content Security Policy must allow https://js.appnotes.tech in script-src and both https://api.appnotes.tech and wss://ws.appnotes.tech in connect-src.