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

@gwn-sheet-stack/svelte

v0.1.0

Published

Headless Svelte 5 bindings for sheet-stack — stack/layer FSM + motion coordinator, bring your own surface.

Downloads

358

Readme

@gwn-sheet-stack/svelte

Headless Svelte 5 bindings for sheet-stack. Built on runes. Ships the stack/layer FSM and portal lifecycle — bring your own surface (vaul-svelte, plain divs, etc.). Animation and gestures are the adapter's responsibility.

Install

bun add @gwn-sheet-stack/core @gwn-sheet-stack/svelte

@gwn-sheet-stack/core and svelte ^5 are peer dependencies.

Quick start

<script lang="ts">
  import { StackProvider, Stage, defineRegistry } from '@gwn-sheet-stack/svelte';
  import ConfirmModal from './ConfirmModal.svelte'; // your adapter

  const registry = defineRegistry({ confirm: ConfirmModal });
</script>

<StackProvider {registry}>
  <YourAppContent />
  <Stage />
</StackProvider>

Build adapter .svelte components that wrap whichever UI library you like, attach the layer's surface ref via getLayer(), and call getStack().dispatch(id, { type: 'DISMISS', source: 'user' }) on dismiss intents. See docs/integration.md for the contract (React-flavoured, but the seam is identical).

One <Stage> per app, inside <StackProvider>.

Components

  • StackProvider — provides the StackStore via Svelte context.
  • Stage — single host. Mounts every Layer.
  • LayerHost — per-Layer wrapper (usually rendered by Stage).

API

  • getStack() — read the StackStore from Svelte context.
  • getLayer() — read the current Layer from inside a presentation component.
  • defineRegistry(map) — type-safe registry helper.
  • portal — Svelte action for portalling content out of the current DOM tree.
  • keyboardAvoidance — Svelte action for soft-keyboard avoidance.

Lifecycle

Call inside any presentation component to hook into Layer lifecycle:

  • onLayerLoad
  • onLayerWillAppear / onLayerDidAppear
  • onLayerWillDisappear / onLayerDidDisappear
  • onLayerMemoryWarning
  • onLayerSnapshot
  • getLayerVisibility()

Notes

  • The package ships compiled JS plus original .svelte source in dist/. Consumer bundlers compile .svelte files with the consumer's Svelte version (which is why svelte is a peer dep).
  • Svelte 5 (runes) only.

License

MIT