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

mana-ts

v1.0.4

Published

A high-performance, O(1) reactive state engine and type-governance ecosystem for deeply nested trees.

Readme

mana-ts

A high-performance, O(1) reactive state engine and type-governance ecosystem for deeply nested trees.

mana-ts was engineered from first principles to solve the "Identity Problem" and the "React Tax" in high-complexity data systems. Unlike standard state libraries that rely on global re-renders or heavy Virtual DOM diffing, Mana implements a surgical, fine-grained subscription model that ensures updates stay $O(1)$, regardless of document size.

Built entirely without generative AI. This is pure architectural logic designed for total control over performance, memory management, and structural integrity.


🚀 The Core Philosophy: "No React Tax"

In a standard React tree, changing a single leaf node often forces the parent to re-render, triggering an $O(N)$ reconciliation process where React must walk the tree to find changes.

Mana bypasses this entirely.

By using a custom event system and the ManaVal component architecture, updates are sent directly to the subscribing leaf nodes. The parent never re-renders, the Virtual DOM remains untouched where it doesn't matter, and the UI remains liquid-smooth even with 50,000+ nodes.


🛠 Technical Core

1. Surgical O(1) Reactivity

Mana utilizes a "Value-Observer" pattern. Components subscribe directly to specific "Managers" via an internal event emitter. When a value changes, Mana notifies only the specific observers, achieving true surgical updates.

2. The Retired Manager Cache

To maintain referential integrity in complex document mutations, Mana implements a custom "Retired Manager Cache." This preserves identity across "delete-and-undo" cycles and full-document re-hydrations—a feature missing in standard industry libraries.

3. Manual Tree Mutation Logic

Engineered for structural document orchestration, Mana includes complex algorithms for "tree surgery"—including recursive splitting, merging, and "spilling" of nodes—while maintaining a deterministic state.

4. Full-Stack Type Bridging

Mana includes a reflection-based validation engine that extracts schemas directly from TypeScript/SQL models. This synchronizes the database, API layer, and frontend state, eliminating 100% of manual type-mapping boilerplate.


📦 Installation

npm install mana-ts

🏗 Key Concepts

  • Manager: The core unit of state. It holds the raw data and handles the subscription logic.
  • ManaVal: A specialized component wrapper that listens to a specific Manager property and re-renders only itself when that property changes.
  • ManaDep: A dependency tracker for managing complex, reactive relationships between nested nodes.

🧪 Performance Benchmark

| Scenario | Standard React State | mana-ts | | :--- | :--- | :--- | | 1,000 Node Update | ~15ms (Tree Diffing) | < 1ms (Surgical) | | 10,000 Node Update | ~120ms (UI Lag) | < 1ms (O(1)) | | 50,000 Node Update | Unresponsive | < 2ms |


📜 License

Distributed under the MIT License. See LICENSE for more information.


👨‍💻 Author

Bryce GredigSystems Architect & Full-Stack Framework Engineer
the64bitdude

"I build the tools other developers use. I don't just write code; I engineer systems that are deterministic, high-performance, and built to scale."