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

@itzsa/page-builder

v0.2.0

Published

Drag-and-drop visual page builder — primitives, canvas, editor chrome, preview, author CSS/JS

Readme

@itzsa/page-builder

Drag-and-drop visual page builder for React (Elementor / Webflow / Puck class).

Authors compose pages from registered blocks. You own the data — persist structured Page JSON. Canvas, Preview, and Open Page share one React render path.

Full docs (site): /page-builder in this monorepo. Design authority: ARCHITECTURE-PAGE-BUILDER.md. Topic tree: docs/page-builder/.

Features

| Feature | Description | | --- | --- | | Block registry | Register React blocks (or use primitives) with fields + render | | Page JSON | Persist a schema-validated document — not a one-off HTML dump | | Render parity | Same render for canvas / preview / open | | Localization | First-class i18nProps with host-configured locales | | Author CSS / JS | Look from composers — no engine decorative skins | | Motion Effects | Entrance + hover via block.motion (canvas / preview / open parity) | | Visibility | Device, locale, publish, renderContext predicates | | Data sources | Repeater + {{item.*}} via fetchDataSource | | Feature toggling | capabilities + host UI flags |

Install

pnpm add @itzsa/page-builder zod

Peers: react, react-dom (^18 || ^19).

import "@itzsa/page-builder/styles.css";

Render the editor

import { useState } from "react";
import {
  PageBuilder,
  createRegistry,
  registerPrimitives,
  createDefaultLocaleConfig,
  PAGE_SCHEMA_VERSION,
  type Page,
} from "@itzsa/page-builder";
import "@itzsa/page-builder/styles.css";

const registry = createRegistry();
registerPrimitives(registry);
const localeConfig = createDefaultLocaleConfig();

const initialPage: Page = {
  id: "home",
  schemaVersion: PAGE_SCHEMA_VERSION,
  revision: "1",
  meta: { title: "Home" },
  blocks: [],
};

export function Editor() {
  const [page, setPage] = useState(initialPage);
  const [locale, setLocale] = useState(localeConfig.defaultLocale);

  return (
    <PageBuilder
      page={page}
      onChange={setPage}
      registry={registry}
      localeConfig={localeConfig}
      activeLocale={locale}
      onActiveLocaleChange={setLocale}
      onSave={(next) => {
        void savePage(next);
      }}
      capabilities={{ allowCustomCss: true, allowCustomJs: false }}
    />
  );
}

Render the page

import {
  RenderPage,
  OpenPageView,
  createRegistry,
  registerPrimitives,
  createDefaultLocaleConfig,
  type Page,
} from "@itzsa/page-builder";

const registry = createRegistry();
registerPrimitives(registry);
const localeConfig = createDefaultLocaleConfig();

export function PageView({ page, locale }: { page: Page; locale: string }) {
  return (
    <RenderPage
      page={page}
      registry={registry}
      localeConfig={localeConfig}
      activeLocale={locale}
      surface="open"
    />
  );
}

export function PublishedPage({ page, locale }: { page: Page; locale: string }) {
  return (
    <OpenPageView
      page={page}
      registry={registry}
      localeConfig={localeConfig}
      activeLocale={locale}
    />
  );
}

Show page on your site (save → fetch → render)

  1. SaveonSave persists Page JSON to your API (not HTML as source of truth).
  2. Preview (optional) — createPreviewSession + buildPreviewUrl → another route loads with loadPreviewSession + OpenPageView (opaque id in URL only).
  3. Public page — fetch JSON by slug/id, then mount OpenPageView with the same registry as the editor.
// Public route — this is the component visitors see
const page = await getPageBySlug(slug); // your backend

return (
  <OpenPageView
    page={page}
    registry={registry}
    localeConfig={localeConfig}
    activeLocale={localeConfig.defaultLocale}
  />
);

Full guide: docs/page-builder/guides/show-page-on-site.md · live docs /page-builder#show-on-site.

Flex & Grid nesting

Drop Flex or Grid on the canvas, then drop other blocks into the dashed Empty / Drop here zone. Children are stored on block.children.

Palette filters

palette={{
  hideCategories: ["other"],
  hideBlocks: ["html", "repeater"],
}}

Locales

import {
  createDefaultLocaleConfig, // en + ne
  createEnglishOnlyLocaleConfig,
  createNepaliOnlyLocaleConfig,
  createLocaleConfig,
} from "@itzsa/page-builder";

Validate author CSS / JS on save

import { validateAuthorCode } from "@itzsa/page-builder";

const result = validateAuthorCode(page);
if (!result.ok) {
  // reject — result.cssErrors / result.jsErrors
}

License

MIT — Copyright (c) 2026 Suman Acharya.

Contributing & bugs