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

notion-widget

v0.0.1

Published

Create and publish React widget workspaces for Notion.

Readme

notion-widget

The complete widget framework: public APIs, a React runtime, Vite tooling, daily development commands, and versioned authoring documentation. The package provides widget discovery, configuration validation, a gallery, an editor, embed pages, and static builds.

Widget authors create a workspace with pnpm create notion-widget and import public APIs from notion-widget. Authoring documentation ships with this package; its installed entry point is node_modules/notion-widget/docs/README.md.

Package boundaries

src/
├── index.ts          # Public entry point for widget APIs and utilities
├── cli.ts            # Argument parsing for dev, build, preview, and check
├── lib/              # Definitions, field validation, appearance, time, and config
├── app/              # React pages, components, routing, and CSS
└── vite/             # Workspace discovery, dev, build, preview, and check
bin.js                # notion-widget command entry point
docs/                 # Authoring docs for the installed version
templates/            # Framework configuration templates

apps/demo depends directly on notion-widget. The independent create-notion-widget initializer creates workspaces and adds notion-widget to their dependencies. The framework package provides the daily notion-widget dev, check, build, and preview commands.

| Import path | Exports | | --- | --- | | notion-widget | defineWidget, field and props types, appearance, time, and configuration utilities | | notion-widget/vite | Workspace development, build, preview, validation, and discovery tools | | notion-widget/client | Type declarations for Vite assets and CSS modules | | notion-widget/tsconfig | Shared TypeScript configuration template for workspaces |

tsdown generates ESM and type declarations in dist/. The package also includes React and CSS source in src/app/ so the workspace's Vite pipeline can process browser code and widget assets. These files are maintained by the framework and are not copied into the author's widgets/ directory.

Development and validation

Run from the monorepo root:

pnpm install
pnpm dev
pnpm typecheck
pnpm lint
pnpm test
pnpm build

pnpm dev builds the framework and initializer, then starts the framework's tsdown watcher and the Vite server for apps/demo. pnpm build:package builds only the framework and initializer; pnpm build also builds the demo into apps/demo/dist/.

After changing public APIs, Vite tooling, or package exports, run pnpm test:package to verify that the framework and initializer tarballs work in a fresh workspace. pnpm test:browser checks demo interactions; pnpm test:package --browser checks development and static site behavior using installed packages.