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

wickchart-layouts

v0.1.0

Published

Named workspace persistence for wickchart — save/restore whole chart setups (type, indicators, theme, view, drawings, positions, alerts) to localStorage. Opt-in plugin, zero dependencies.

Readme

wickchart-layouts

Named workspace persistence for wickchart, as an opt-in plugin — save and restore whole chart setups by name. Zero dependencies, zero core changes: everything rides the core's public getState() / setState() plus the drawing list when wickchart-draw is attached.

A layout captures type, theme, log scale, toggles (stats/profile/ annotations/vol-shading), indicators, view range, positions and alerts — and drawings when a drawings handle is passed.

npm install wickchart wickchart-layouts   // the plugin is a separate package

import 'wickchart';                          // the chart itself
import { attachDrawings } from 'wickchart-draw';
import { attachLayouts } from 'wickchart-layouts';

const chart = document.querySelector('wick-chart');
const draw = attachDrawings(chart);
const layouts = attachLayouts(chart, {
  key: 'my-desk',        // storage key (default 'wickchart-layouts')
  drawings: draw,        // optional — include drawings in saved layouts
  cap: 20,               // max stored layouts (oldest evicted, default 20)
});

layouts.save('swing');    // capture the current setup
layouts.load('swing');    // apply it back
layouts.list();           // → [{ name, at, drawingCount }] newest first
layouts.rename('swing', 'swing-v2');
layouts.delete('swing');
layouts.export();         // → JSON string — share it, store it anywhere
layouts.import(json);     // merge layouts from such a string (replaces
                          // same-name entries); returns the count

chart.addEventListener('wick:layouts', (e) => {
  console.log(e.detail.action, e.detail.name); // save|load|delete|rename|import
});
layouts.detach();
  • wick:layouts fires on every mutation — pair a load with wickchart-alerts-plus's sync() if you also persist alerts, since a layout load replaces the chart's alert list.
  • storage is injectable; storage failures degrade to an in-memory store for the session and never throw. Entries are capped (oldest evicted).

Peer dependency: wickchart ≥ 1.4.0.