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

@sheldom/core

v0.1.0

Published

Core component package of sheldom toolkit.

Readme

@sheldom/core

Native custom elements, with the lifecycle they were always missing.

@sheldom/core ships Component, a base class you extend instead of HTMLElement directly. It stays a real, standards-compliant custom element — just with the ergonomics you'd expect: clear lifecycle hooks, batched re-renders, Shadow DOM stylesheet adoption, and context that flows down your component tree.

✨ Features

🏗️ Still just HTMLElement

Component extends HTMLElement. No wrapper, no synthetic instance — instanceof HTMLElement is always true.

🎯 Clear lifecycle hooks

onBeforeMount, onMounted, onBeforeUnmount, onUnmounted — override what you need, skip what you don't.

🔁 Batched re-renders

requestUpdate() coalesces every synchronous call into a single re-render on the next microtask.

🎨 Automatic Shadow DOM styling

Declare static styles, and every ancestor class's stylesheet gets adopted into the shadow root, in inheritance order.

🌳 Context that crosses shadow boundaries

$context is inherited from the nearest ancestor Component, even through nested shadow roots.

🔌 Renders anything that fits the contract

render() returns a plain string or any TemplateBase — bring your own templating engine, or use @sheldom/dom.

📦 Install

npm install @sheldom/core

🚀 Usage

import { Component } from "@sheldom/core";

export default class Greeting extends Component {
    name = "world";

    onMounted() {
        console.log("mounted!");
    }

    render() {
        return `<p>Hello, ${this.name}!</p>`;
    }
}

customElements.define("my-greeting", Greeting);

Pair it with @sheldom/dom for reactive templates and scoped styles, and @sheldom/state for reactive fields that call requestUpdate() automatically:

import { Component } from "@sheldom/core";
import { css, html } from "@sheldom/dom";
import { state } from "@sheldom/state";

export default class Counter extends Component {
    static styles = css`
        button {
            padding: 0.5rem 1rem;
        }
    `;

    @state count = 0;

    render() {
        return html`
            <button @click=${() => this.count++}>Count: ${this.count}</button>
        `;
    }
}

All three come bundled together in sheldom, which is the recommended way to install the toolkit.

🌱 Part of the Sheldom toolkit

@sheldom/core only needs @sheldom/core-contracts and @sheldom/dom-contracts — it has no dependency on any specific rendering or state library. Most projects should install sheldom instead, which bundles this package with a rendering engine and reactive state.

📄 License

MIT — see LICENSE.