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

@squeletteapp/widget

v3.1.3

Published

Embeddable Squelette widget

Readme

Squelette Widget

Embeddable feedback & roadmap widget built with Preact and delivered as a Web Component. It mounts as <squelette-widget> with an isolated Shadow DOM, lazy-loads the interactive app on demand, and streams feedback from https://api.squelette.app using your project credentials.

CDN usage

<script src="https://cdn.squelette.app/widget.js" async></script>
<script>
  const widget = document.createElement('squelette-widget');
  widget.setAttribute('project', 'squelette');
  widget.setAttribute('board', 'feature-requests');
  document.body.appendChild(widget);
</script>

Programmatic helper:

<script src="https://cdn.squelette.app/widget.js" async></script>
<script>
  window.SqueletteWidget?.create({
    project: 'squelette',
    board: 'feature-requests',
    theme: 'auto',
    locale: 'en',
    label: 'Share feedback'
  });
</script>

Attributes & options

| Name | Type | Default | Description | | ----------- | ------------- | ------- | ----------- | | project | string | – | Required. Identifies the project in the Squelette API. | | board | string | null | Optional board/roadmap identifier. | | theme | light\|dark\|auto | auto | Controls light/dark appearance. auto tracks system preference. | | locale | string | en | Locale forwarded to the iframe (?locale=). | | token | string | – | Optional bearer token used when requesting the embedded experience. | | signature | string | – | Optional request signature for API verification. | | label | string | Feedback | Launcher button label. | | open | boolean attr | false | When present, forces the widget open. |

Public methods

Every widget instance exposes an imperative API:

  • open() / close() / toggle()
  • destroy() – unmounts the application and removes the element.
  • on(event, handler) – subscribe to open, close, or submit events. Returns an unsubscribe function.

Submit events are forwarded when the embedded iframe posts window.parent.postMessage({ type: 'squelette:submit', payload }, '*').

Theming

Hosts can override CSS custom properties directly on the element:

squelette-widget {
  --sq-accent: #ff6b00;
  --sq-bg: #11131f;
  --sq-fg: #f8fafc;
  --sq-border: rgba(15, 23, 42, 0.24);
  --sq-radius: 18px;
}

These cascade into the Shadow DOM so host styles never leak inside.

Development

bun install
cd packages/widget
bun run dev      # Vite dev server with auto registration
bun run build    # tsc declarations + Vite library build
bun run test     # Vitest (happy-dom)

The Vite build emits dist/widget.js (IIFE, ready for <script> tags) and dist/widget.es.js (ESM) plus type declarations under dist/types.

Architecture

  • src/widget/element.tsx – custom element class, orchestrates Shadow DOM lifecycle.
  • src/widget/components/widget-shell.tsx – Preact UI for the launcher/panel/loader.
  • src/widget/styles.ts – shared base styles injected via constructable stylesheets.
  • src/widget/utils.ts – helpers for attribute reflection, iframe URL shaping, theming.
  • src/app/app.tsx – lazy-loaded iframe renderer that animates on first paint.

Event bridge & identity

Dispatch an identity update from the host page to enrich the embedded experience:

window.dispatchEvent(
  new CustomEvent('squelette:identity', {
    detail: {
      userId: '123',
      email: '[email protected]',
      name: 'Ada Lovelace'
    }
  })
);

Inside the iframe, send postMessage({ type: 'squelette:submit', payload }) to bubble successful submissions back to the host application.

Security notes

  • All network calls are constrained to https://api.squelette.app via the iframe src URL. No arbitrary HTML injection is allowed.
  • The iframe runs in a restrictive sandbox (allow-scripts, allow-same-origin, allow-forms, and related capabilities expressly required for the widget). Host tokens can be passed via element attributes.