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

@standhigher/puck-page-builder

v0.12.17

Published

React PageDocument editor, extension registry, and web renderer for BestTrack page experiences.

Readme

@standhigher/puck-page-builder

@standhigher/puck-page-builder provides a React PageDocument editor, immutable extension registry and Web renderer for BestTrack page experiences.

This is the package's only install and import name. BestTrack Page Builder is the product name; packages/puck-page-builder is only this repository's source directory.

Installation

pnpm add @standhigher/puck-page-builder react react-dom @puckeditor/core @shopify/polaris @shopify/polaris-icons

The React, Puck and Polaris packages are peer dependencies and must be supplied by the host application.

Web rendering

Import the package styles from the application's global stylesheet entry:

import "@standhigher/puck-page-builder/styles.css";

Load a published PageDocument on the server, validate it at the storage boundary, assemble the business extensions, then render it:

import { migratePageDocument } from "@standhigher/puck-page-builder";
import { WebRenderer } from "@standhigher/puck-page-builder/renderer";
import { createExtensionRegistry } from "@standhigher/puck-page-builder/extensions";

const migration = migratePageDocument(storedDocument);
if (!migration.success) throw new Error("Invalid published PageDocument");

const registry = createExtensionRegistry([bestTrackExtension]);
const page = <WebRenderer document={migration.data} registry={registry} />;

Public entry points

| Import | Purpose | | --- | --- | | @standhigher/puck-page-builder | PageDocument, editor, document migration and base exports | | @standhigher/puck-page-builder/renderer | WebRenderer | | @standhigher/puck-page-builder/extensions | extension definitions and createExtensionRegistry | | @standhigher/puck-page-builder/schema | schema-specific types and migration helpers | | @standhigher/puck-page-builder/styles.css | Builder and Web renderer styles |

Editor policies and field validation

Blocks can declare portable interaction and cardinality rules. required keeps at least one instance; singleton prevents a second instance. Hosts can supplement those declarations with PageDocumentEditorShell's policy prop, including globally disabling add, delete, duplicate, or drag operations. Deletion through the packaged editor always opens its built-in confirmation dialog before changing the document.

const notice = {
  // ...the normal BlockDefinition fields
  policy: { singleton: true, allowDuplicate: false },
  fields: {
    title: { field: "acme.text", control: "text", required: true, validation: { maxLength: 80 } },
    color: { field: "acme.color", control: "color" }
  }
};

<PageDocumentEditorShell
  initialDocument={document}
  registry={registry}
  policy={{ operations: { allowDrag: false } }}
/>

Built-in field controls are text (single line), textarea (multi-line), url, color, and products. products only renders the selected snapshot and a host picker button; Shopify search stays in the host productPicker adapter. A product snapshot may include catalog display money as { amount, currencyCode } minor units; formatted price strings are dropped. Their validation runs in the editor before save or publish; custom fields may continue using a block's validate function. validateFieldValue is exported from /extensions when a host needs the same validation outside the editor.

Theme values remain deliberately token-based: template theme → page theme → variant theme → block style. A block resets an inherited token by setting its local token explicitly (for example { radius: "0" }), so no incompatible persisted style-reset shape is needed.

Runtime and DataSource boundary

The package can register DataSources but does not automatically resolve block.binding, call a Live data source, or inject its result into WebRenderer. Implement authorization, data resolution, caching, error handling and temporary render-data projection in the host application's server-side Runtime. Do not persist tokens, credentials or resolved private data in PageDocument.

See the repository's integration documentation for the Web quick start, extension development and Runtime/DataSource guidance.

Stability

The package is pre-1.0. Public APIs may evolve between minor releases; validate and migrate persisted documents at every read and publish boundary.