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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tamatashwin/notebook-js

v0.4.9

Published

This is an open sourced block based text editor that's designed to help with writing notes and dynamic content creation.

Readme

NotebookJS

This is an open sourced block based text editor that's designed to help with writing notes and dynamic content creation.

Varied Block Types - It has multiple types of blocks that should help with writing any type of note. Additionally other block types can be added to the system. Editors - It's reasonable to argue that not all data type can be edited through a singular UI system, hence, editors exist to manage the varied block types. Tools - It features tools to allow for rich text editing. Which is also extensible. React Compatible - Overall, this system is react compatible, which I found to be the main difficulty with some other solutions.

Installation

npm install @tamatashwin/notebook-js

Usage

import react, { useState, useCallback } from "react";
import {
    NotebookJS,

    // Import blocks
    ParagraphBlock,
    HeadingBlock,
    SubheadingBlock,
    UnorderedListBlock,
    OrderedListBlock,
    ImageBlock,
    CanvasBlock,
    LatexBlock,

    // Import tools
    BoldTool,
    HighlightTool,

    // Import editors
    SetNumberingEditor,
    ImageEditor,
    CanvasEditor,
    LatexEditor,
} from "@tamatashwin/notebook-js"
import "@tamatashwin/notebook-js/styles.css";

export default function App () {
    let [blocks, setBlocks] = useState([]);
    let handleChange = useCallback((newBlocks) => setBlocks(newBlocks), []);

    return (
        <div className="mb-6 rounded-md border border-gray-300">
            <NotebookJS
                blocks={blocks}
                onChange={handleChange}
                readOnly={false}
                blockTypes={[
                    ParagraphBlock,
                    HeadingBlock,
                    SubheadingBlock,
                    UnorderedListBlock,
                    OrderedListBlock,
                    ImageBlock,
                    CanvasBlock
                ]}
                tools={[
                    BoldTool,
                    HighlightTool
                ]}
                editors={[
                    SetNumberingEditor,
                    ImageEditor,
                    CanvasEditor
                ]}
            />
        </div>
    );
};

Next.js (App Router) Usage

  • Import from the client-only subpath and add the CSS explicitly:
"use client";
import React, { useState, useCallback } from "react";
import {
  NotebookJS,
  ParagraphBlock,
  HeadingBlock,
  SubheadingBlock,
  UnorderedListBlock,
  OrderedListBlock,
  ImageBlock,
  CanvasBlock,
  LatexBlock,
  BoldTool,
  HighlightTool,
  SetNumberingEditor,
  ImageEditor,
  CanvasEditor,
  LatexEditor,
} from "@tamatashwin/notebook-js/client"; // note the /client subpath
import "@tamatashwin/notebook-js/styles.css"; // import styles in a client boundary

export default function Notebook() {
  const [blocks, setBlocks] = useState([]);
  const handleChange = useCallback((next) => setBlocks(next), []);

  return (
    <NotebookJS
      blocks={blocks}
      onChange={handleChange}
      blockTypes=[
        ParagraphBlock,
        HeadingBlock,
        SubheadingBlock,
        UnorderedListBlock,
        OrderedListBlock,
        ImageBlock,
        CanvasBlock,
        LatexBlock
      ]
      tools={[BoldTool, HighlightTool]}
      editors={[SetNumberingEditor, ImageEditor, CanvasEditor, LatexEditor]}
    />
  );
}
  • Since the client entry re-exports unbuilt source, add transpilation in next.config.js:
// next.config.js
module.exports = {
  experimental: {
    // if you're using the app router
  },
  transpilePackages: ["@tamatashwin/notebook-js"],
};

If you accidentally import from @tamatashwin/notebook-js in a React Server Component, the package will throw with a helpful message. Always import from @tamatashwin/notebook-js/client inside a 'use client' file.

Dark Mode

  • The library uses CSS variables and Tailwind tokens with a .dark class toggle.
  • To enable dark mode, add .dark to a parent element (commonly <html class="dark">).
  • Colors adapt via semantic classes like bg-background, text-foreground, border-border, bg-accent, etc.
  • You control the theme toggle; the components automatically respond to the presence/absence of .dark.