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

@wgnhs/elements

v0.2.8

Published

Generic Layout Web Components for WGNHS apps

Downloads

22

Readme

@wgnhs/elements

Generic Layout Web Components for WGNHS apps

Usage

Served via jsdelivr:

Package includes baseline css and variables. You can replace variables with your own project specific copy.

  <link rel="stylesheet" href="css/variables.css" />
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@wgnhs/elements@^0/dist/css/reset.css" />
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@wgnhs/elements@^0/dist/css/typography.css" />

Using scripts, include common first:

  <script src="https://cdn.jsdelivr.net/npm/@wgnhs/elements@^0/dist/common.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@wgnhs/elements@^0/dist/layout.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@wgnhs/elements@^0/dist/router.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@wgnhs/elements@^0/dist/pdf.min.js"></script>

Components

Common

Contains baseline styles in both CSS and Constructable Stylesheets, packaged lit-element dependency, and small utility functions to quickly generate unique ID's and dispatch events.

  • lit-element
  • styles
    • reset
    • typography
  • utils

Layout

Contains basic structural building blocks for UIs.

  • app-collapsible
  • app-sidebar
  • app-spinner
  • interact
    • button-link
    • toggle-switch
    • in-radio

Router

Contains a general purpose front-end router based off of UI-Router.

  • site-router

PDF

Contains an in-browser PDF renderer and controls. Based off of Mozilla's PDF.js

  • pdf-view

Requires import of library:

  <!-- Load PDF renderer -->
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/build/pdf.min.js"></script>

  <!-- Load WGNHS PDF viewer -->
  <script src="https://cdn.jsdelivr.net/npm/@wgnhs/elements@^0/dist/common.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@wgnhs/elements@^0/dist/pdf.min.js"></script>

Development

This project requires NodeJS 8+ installed on your development system. We recommend using the latest LTS version.

Setup

npm install

After cloning the repository, bring up a terminal in the repository's root directory and run npm install to download the dependencies.

Running

npm start

The npm start command is configured to build the project, then serve the project at http://127.0.0.1:8081/wgnhs-elements/

The server will watch for source changes and automatically refresh the browser.

Creating your own components

Replace {{class-name}} with a CamelCase name and {{tag-name}} with the corresponding dash-separated name

import { LitElement, html, css } from 'lit-element';
import { styles } from 'wgnhs-common';

export class {{class-name}} extends LitElement {
  static get properties() {
    return {

    };
  }

  constructor() {
    super();
  }

  static get styles() {
    return [
      ...styles,
      css`
    `];
  }

  render() {
    return html`
    `;
  }
}
customElements.define('{{tag-name}}', {{class-name}});

Building

npm run build

The distributable folder dist/ can be generated by runnning npm run build

Publishing GitHub Pages

npm run pages

The command npm run pages will build the source code, and commit the dist/ folder to the gh-pages branch of the repository. It will also push the branch to the git remote named origin

Releasing

A baseline release process is implemented in npm scripts:

npm run release

The command will:

  • install dependencies
  • run a fresh build
  • configure publishing options
  • version to the next patch version
  • push the newly created commit and tag
  • publish to npm
  • push ghpages content