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

formulize-math

v0.1.31

Published

A powerful formula editor and visualization library for mathematical expressions

Downloads

221

Readme

Formulize

An API for interactive mathematical formula built with React, TypeScript, and Vite that provides real-time formula visualization and computation capabilities.

Features

  • Formulize API - Declarative API for programmatic "executable" formula configuration
  • Multi-Engine Computation - Support for manual step-through, symbolic algebra
  • Real-time Visualization - 2D/3D plotting with D3.js and Plotly.js integration
  • Variable Management - Dependency tracking and automatic recomputation

Installation

Quick Start (Recommended)

Install with all peer dependencies automatically:

npx install-peerdeps formulize-math
npm install formulize-math

Manual Peer Dependencies Installation

Formulize requires several peer dependencies. Install them based on your needs:

Core (Required):

npm install react react-dom mobx mobx-react-lite mobx-state-tree

Math Rendering (Required):

npm install mathjax-full better-react-mathjax katex mathjs

Formula Canvas (Required for FormulaComponent):

npm install @xyflow/react lucide-react lodash

3D Plotting (Optional - for Plot3D):

npm install plotly.js-dist d3

Code Editor (Optional - for step-through debugging):

npm install codemirror @codemirror/autocomplete @codemirror/lang-javascript @codemirror/language @codemirror/legacy-modes @codemirror/state @codemirror/view @uiw/react-codemirror

All-in-one installation:

npm install formulize-math react react-dom mobx mobx-react-lite mobx-state-tree mathjax-full better-react-mathjax katex mathjs @xyflow/react lucide-react lodash plotly.js-dist d3 codemirror @codemirror/autocomplete @codemirror/lang-javascript @codemirror/language @codemirror/legacy-modes @codemirror/state @codemirror/view @uiw/react-codemirror

Don't forget to import the CSS:

import "formulize-math/style.css";

Technology Stack

  • Frontend: React 18 + TypeScript + Vite
  • State Management: MobX with decorators
  • Math Rendering: KaTeX, MathJax
  • Code Editor: CodeMirror 6
  • Visualization: D3.js, Plotly.js

Development

Prerequisites

  • Node.js (version 16 or higher)
  • npm or yarn

Setup

npm install

Development

Start the development server:

npm run dev

The application will be available at http://localhost:3005

Building

Build for production:

npm run build

Preview the production build:

npm run preview

Code Quality

Run linting:

npm run lint

Run TypeScript type checking:

tsc

Deployment

Deploy to docs/forge/ directory:

npm run deploy

Project Structure

  • src/api/ - Formulize API and computation engines
  • src/renderer/ - Core interactive formula components
  • src/visualizations/ - 2D/3D plotting engines
  • src/types/ - TypeScript type definitions
  • src/examples/ - Example formula API configurations

Architecture

The application uses a multi-store MobX architecture with:

  • computationStore - Variable computation and evaluation

Three computation engines are available:

  • manual - Manual step-through with JS interpreter
  • symbolic-algebra - Mathematical computation engine