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

lumix-js

v0.1.5

Published

The modular runtime for LumixJS

Downloads

634

Readme

The lumix-js package provides a modular, fine-grained reactive runtime. It is the core engine that powers state management and DOM updates, and it also contains the primary LumixJS CLI.

CLI Core Commands

The lumix binary is the entry point for managing LumixJS projects.

lumix init

Creates a new project from a template.

lumix init <project-name>

lumix dev

Starts the development server.

lumix dev

lumix build

Builds the project for production, generating compiled assets.

lumix build

Core Concepts

The runtime is built on the principle of fine-grained reactivity, using Signals and Effects to ensure that only the parts of the DOM that actually change are updated.

Signals

Signals are the primary primitive for reactive state. A signal holds a value and notifies its subscribers when that value changes.

import { signal } from "lumix-js";

const count = signal(0);

// Read value
console.log(count());

// Update value
count(count() + 1);

// Bulk update with .value
count.value = 10;

Effects

Effects are functions that automatically re-run whenever the signals they depend on change.

import { signal, effect } from "lumix-js";

const name = signal("Lumin");

effect(() => {
  console.log(`Hello, ${name()}!`);
});

name("World"); // Logs: "Hello, World!"

Computed Signals

Computed signals derive their value from other signals. They are automatically updated whenever their dependencies change.

import { signal, computed } from "lumix-js";

const first = signal("John");
const last = signal("Doe");

const full = computed(() => `${first()} ${last()}`);

console.log(full()); // "John Doe"

Lifecycle Hooks

LumixJS provides hooks for managing component lifecycles.

  • onMount(fn): Executes when the component is mounted to the DOM.
  • onDestroy(fn): Executes when the component is unmounted.

Global State Management (Store)

For complex state that needs to be shared across components or persisted, LumixJS provides a robust Store system.

import { store, persist } from "lumix-js";

// Create a reactive store
const auth = store({
  user: null,
  isLoggedIn: false,
});

// Update multiple values in a batch
auth.update({ user: "LuminUser", isLoggedIn: true });

// Reactively listen to all changes
auth.subscribe((state) => {
  console.log("Auth changed:", state);
});

// Persist automatically to localStorage
persist(auth, { key: "lumin_auth" });

Two-Way Binding

The bind helper simplifies the synchronization between UI elements and signals.

<script>
  import { signal, bind } from "lumix-js";

  const email = signal("");
</script>

<div class="field">
    <label>Email</label>
    <input type="email" bind:value={email} />
</div>

The runtime includes specific helpers for different input types:

  • bindValue: For text inputs, textareas, and selects.
  • bindChecked: For checkboxes.
  • bindNumeric: For number and range inputs.
  • bindGroup: For radio button groups.
  • bindSelected: For multiple selects.

Universal Rendering

The runtime includes primitives for both Server-Side Rendering (SSR) and Client-Side Hydration.

  • renderToString(component): Produces a static HTML string.
  • hydrate(root, component): Attaches event listeners and reactivity to existing HTML.

Advanced Control

  • batch(fn): Batches multiple signal updates to trigger effects only once.
  • untrack(fn): Executes a function without tracking dependencies.

License

MIT