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

@zync-sh/plugin-ui

v0.1.0-beta.1

Published

Sandbox-safe themed UI primitives for Zync plugins

Readme

Zync plugin UI (beta)

Framework-neutral, dependency-free UI primitives for isolated Zync plugin panes. Works with vanilla JavaScript or framework wrappers. It does not import Zync internals, fetch remote assets, inject untrusted HTML, grant permissions, or run SSH commands.

Install and bundle

npm install @zync-sh/plugin-ui@beta
npm install --save-dev @zync-sh/plugin-sdk@beta

Before publication, install the local packages by path instead. The UI package and SDK have separate versions and release lifecycles. This initial UI beta provides theme tokens, buttons, labelled inputs, badges, empty states, dropdowns and tooltips; it is not a full React component library.

import { installThemeBridge, enhanceSelects, installTooltips, createButton } from '@zync-sh/plugin-ui';
import '@zync-sh/plugin-ui/styles.css';

document.body.classList.add('zui-root');
const disposeTheme = installThemeBridge();
const disposeSelects = enhanceSelects();
const disposeTooltips = installTooltips();
document.body.append(createButton({ text: 'Refresh', onClick: () => refreshYourPlugin() }));
// On component teardown: disposeTheme(); disposeSelects(); disposeTooltips();

For Zync's opaque-origin pane, inline the bundled JavaScript and CSS into your packaged HTML. CSS imports need a bundler CSS loader; do not leave a runtime stylesheet URL in the isolated pane. PM2 Monitor demonstrates reading the exported stylesheet during its build and inlining it alongside plugin-specific styles.

Theme contract

installThemeBridge accepts zync:theme:update messages only from the parent window by default. Unknown keys and invalid CSS colors are ignored. Tokens are --zui-background, --zui-surface, --zui-border, --zui-text, --zui-muted, --zui-primary, plus --zui-positive, --zui-negative, --zui-warning, --zui-info. Light/dark mode updates semantic colors and native control color scheme. Dark fallback tokens work before the first host message.

Put zui-root on the pane body or application container for base controls and slim scrollbars. Built primitives use zui-* classes; popup classes are styled independently so they work outside a scrolling container. CSS is scoped to these classes, apart from token defaults on :root.

Controls

  • createButton({text, variant, ariaLabel, onClick}): default, primary, danger, ghost variants. Use ariaLabel for icon-only buttons.
  • createField({label, type, value, placeholder}): returns {field, input} with a visible label. Append field; read input.value.
  • createBadge(text, tone): muted, positive, negative, warning, info tones.
  • createEmptyState({title, description, actions}): labelled section; actions are button elements.
  • enhanceSelects(root, {closeEvent}): native single-select stays the source of truth. Supports arrows, Home/End, typeahead, Escape and Tab; skips disabled/hidden options and optgroups. Dispatch change after setting .value programmatically. Multiple selects remain native. Repeated installation skips existing instances; call the returned disposer to restore native controls and disconnect observers/listeners.
  • installTooltips(root): delegated data-tooltip hover/focus tooltips. Preserves existing aria-describedby, hides detached targets and supports Escape. Call its disposer before reinstalling on the same root.

These controls do not create privileged confirmation dialogs. Use the SDK's host-provided API for permissions and dangerous actions. Theme integration is visual, not a security boundary. Test your actual host build and light/dark/custom themes before distributing a plugin.

Release checks: from the Zync root run npm run ui:release-check. Then run PM2's unit and browser integration suites and review the exact npm tarball. Publish prereleases under beta, not stable. Beta checks are not an independent security audit.