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

@evershop/editorjs-product-list

v1.0.0

Published

Product List Tool for EverShop — pick, reorder and remove a list of products inside Editor.js

Readme

Product List Tool for EverShop

A Editor.js block tool that lets an editor build an ordered list of products: search & add, remove, and drag-reorder them. Each card shows the product thumbnail, name, SKU, price, stock and status.

It is a sibling of @evershop/editorjs-image and follows the same conventions (Vite library build, CSS injected by JS, @codexteam/icons).

How it works

The tool ships its own search modal. It stays GraphQL-agnostic: you give it a searchProducts(keyword, { page, limit }) function and it handles the search box, debouncing, pagination, multi-select and the selected-state UI. In EverShop that function runs the admin products(filters: [...]) query. On the storefront the saved snapshot is rendered with EverShop's <ProductList/> component.

Usage

import ProductListTool from "@evershop/editorjs-product-list";

const editor = new EditorJS({
  tools: {
    productList: {
      class: ProductListTool,
      config: {
        defaultColumns: 4,
        pageSize: 20,
        searchProducts: async (keyword, { page, limit }) => {
          const res = await fetch(`/api/products?q=${keyword}&page=${page}&limit=${limit}`);
          const { items, total } = await res.json();
          return { items, total }; // items: ProductItem[]
        },
      },
    },
  },
});

Config

| Option | Type | Description | | ------------------ | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | searchProducts | (keyword: string, opts: { page: number; limit: number }) => Promise<{ items, total }> | Data source for the built-in search modal. | | defaultColumns | number | Storefront grid columns for new blocks (default 4). | | pageSize | number | Page size for the search modal (default 20). | | onSelectProducts | (current: ProductItem[], onSelect: (products: ProductItem[]) => void) => void | Optional override — supply your own picker instead of the built-in modal. Takes precedence. | | placeholder | string | Empty-state text. |

Saved data

{
  "type": "productList",
  "data": {
    "columns": 4,
    "products": [
      {
        "productId": 1,
        "uuid": "…",
        "sku": "TSHIRT-RED-M",
        "name": "Cool T-Shirt",
        "url": "/cool-t-shirt",
        "image": { "url": "…", "alt": "…" },
        "price": { "regular": { "value": 29, "text": "$29.00" }, "special": { "value": 19, "text": "$19.00" } },
        "inStock": true,
        "status": 1
      }
    ]
  }
}

sku is the stable identifier (matching EverShop's ProductSelector and the products(filters: [{ key: "sku", operation: in, value: "…" }]) query).

Develop

npm install
npm run dev    # opens dev/index.html with a mocked host picker
npm run build  # emits dist/product-list.{mjs,umd.js} + index.d.ts

Based on the Image Block for Editor.js.