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

be5-pagebuilder

v0.0.1

Published

Modular CMS built on Web Components with an inline visual editing system. Bun + MongoDB.

Readme

PageBuilder

Modular CMS built on Web Components, with an inline visual editing system. Powered by Bun and MongoDB.

Architecture

src/
├── core/
│   ├── Component/          # Base Component class (HTMLElement + Shadow DOM)
│   ├── Editor/
│   │   ├── core/           # EditorManager, Editor, ObserverManager, DragManager
│   │   ├── components/     # BlocActionGroup, BlocLibrary, FloatingToolbar, RichTextBar
│   │   │                   # PageConfiguration, TemplateConfiguration, AdminLayout, MediaCenter
│   │   ├── configuration/
│   │   │   ├── Sync/       # AttrSync, CompSync, ImageSync
│   │   │   ├── Inputs/     # P9rSelect, P9rRange, P9rPageLink (styled config inputs)
│   │   │   ├── ConfigPanel.ts
│   │   │   └── ConfigItem.ts
│   │   └── editors/        # TextEditor, ImageEditor, ListEditor
│   ├── Domain/
│   │   └── Media/          # CardMedia, GridMedia, DetailMedia, CropSystem
│   └── global.ts
├── interfaces/
│   ├── contract/           # Repository interfaces, data models (TPage, TBloc, TTemplate, TSystem)
│   └── default-provider/   # MongoDB implementations
├── endpoints/
│   ├── admin-ui/           # Admin pages (pages, templates, editor, settings, media)
│   ├── admin-api/          # REST API (pages, templates, media, system, blocs)
│   └── admin-css/          # Design system tokens (oklch, reset)
│
w13c/
├── core/                   # Reusable UI components
│   ├── Form/               # Input, Select, Checkbox, InputFile, InputTags, SegmentedSwitch, Button
│   ├── Dialog/             # LateralDialog, FormDialog
│   ├── Menu/               # LateralMenu, Toolbar
│   ├── Layout/             # LeftMenuLayout, Article, FixedAdminLayout
│   └── Table/              # Table, Row, Cell, HeaderCell
├── blocs/                  # Editable blocs (page builder components)
│   ├── Layout/             # Grid, Container
│   ├── Presentation/       # Card, Quote, Gallery/Image
│   └── Form/               # Button

Key concepts

  • Component: abstract class extending HTMLElement, creates Shadow DOM, injects CSS + template.
  • Editor: abstract class managing a component's edit mode (action bar, config panel, drag, editor styles).
  • registerEditor: binds a component tag to its Editor class via the build system.
  • Build placeholders: BE5_TAG_TO_BE_REPLACED, BE5_LABEL_TO_BE_REPLACED, BE5_GROUP_TO_BE_REPLACED are replaced at build time with actual values.

Declarative configuration system

Each component's config panel is defined in configuration.html with three sync systems:

| Element | Role | |---|---| | <p9r-attr-sync> | Syncs inputs with HTML attributes on the component | | <p9r-comp-sync> | Manages slots: default content, allowed actions, multiplicity | | <p9r-image-sync> | Image picker via MediaCenter | | <p9r-section> | Visual grouping of controls in the panel | | <p9r-select> | Styled select with label and custom dropdown | | <p9r-range> | Slider with numeric input, fill, min/max bounds |

Bloc structure (5 files)

Card/
├── Card.ts              # Component (extends Component)
├── CardEditor.ts        # Editor (extends Editor + registerEditor)
├── style.css            # Self-contained CSS with local variables
├── template.html        # Semantic HTML with <slot>
└── configuration.html   # Declarative config panel

Content system

| Entity | Description | Admin page | |---|---|---| | Pages | Published content with path, SEO metadata, visibility | /admin/pages | | Templates | Preconfigured element compositions, inserted as independent copies | /admin/templates | | Snippets | Synchronized copies shared across pages (upcoming) | — | | Media | Files & folders with upload, crop, metadata editing | /admin/media |

Editor features

  • Inline visual editing with drag & drop reordering
  • Component library (BlocLibrary) with tabs: Blocs, Templates, Snippets
  • Right-click context menu on components (rename, delete)
  • MediaCenter for image selection and upload
  • Page/Template configuration via lateral dialog panel
  • Floating toolbar with mode switching (edit/preview)

API endpoints

| Method | Route | Description | |---|---|---| | GET | /api/pages | List all pages | | POST | /api/page?identifier=X | Create/update a page | | GET | /api/templates | List all templates | | POST | /api/template | Create a template | | POST | /api/template?id=X | Update a template | | DELETE | /api/template?id=X | Delete a template | | GET | /api/mediaItems | List media items (with parent filter) | | POST | /api/media/file | Upload a file | | POST | /api/media/folder | Create a folder | | GET | /api/media/item?id=X | Get media item metadata | | PATCH | /api/media/item?id=X | Update media metadata | | DELETE | /api/media/item?id=X | Delete a media item | | GET | /api/system | Get system configuration | | POST | /api/system | Update system configuration |