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

@dotevolve/doc-forge

v0.1.8

Published

DocForge: Pure declarative document and print rendering engine

Readme

@dotevolve/doc-forge

Pure declarative document and print rendering engine for React.

License: MPL 2.0 CI

DocForge provides a pure declarative model for building, previewing, and printing structured business documents (Purchase Orders, Work Orders, Commercial Invoices, Audit Ledgers) in React with pixel-perfect pagination and standard filing margins.


Features

  • 📄 Declarative Document Model: Layouts defined by serializable JSON descriptors (ReportTemplateDescriptor).
  • ⚡ Ready-Data Architecture: Zero arithmetic or aggregation in the rendering path (DataDoc contract).
  • 🖨️ Pixel-Perfect Print & PDF: Automatic page breaks, @media print CSS counters, filing guides, and orientation control.
  • 🎨 Live Customizer Studio: WYSIWYG modal (DocumentPreviewModal) for tweaking margins, typography scale, column visibility, and section order.
  • 🏷️ First-Class Barcodes & Tables: Native Code 128 / Code 39 / QR barcodes with SVG rendering and table column deduplication.

Installation

npm install @dotevolve/doc-forge

Peer dependencies:

npm install react react-dom lucide-react react-to-print

Quick Start

import React from 'react';
import { DocumentPreview, ReportTemplateDescriptor, DataDoc } from '@dotevolve/doc-forge';
import '@dotevolve/doc-forge/styles';

const descriptor: ReportTemplateDescriptor = {
  slug: 'purchase-order',
  name: 'Standard Purchase Order',
  version: 1,
  page: {
    size: 'A4',
    orientation: 'portrait',
    margins: { top: 10, right: 10, bottom: 10, left: 18 },
  },
  styles: { primaryColor: '#0f172a', accentColor: '#2563eb' },
  sections: [
    { id: 'header', type: 'header', showTitle: true, showDate: true },
    { id: 'items', type: 'table', tableKey: 'orderItems', showBorder: true },
    { id: 'footer', type: 'footer', showPageNumbers: true },
  ],
};

const data: DataDoc = {
  metadata: { documentTitle: 'Purchase Order', documentNumber: 'PO-2026-001' },
  units: [
    {
      unitId: 'po-1',
      tables: {
        orderItems: {
          columns: [
            { key: 'code', label: 'Item Code', widthPct: 20 },
            { key: 'desc', label: 'Description', widthPct: 50 },
            { key: 'total', label: 'Total', widthPct: 30, align: 'right' },
          ],
          rows: [{ code: 'SKU-1', desc: 'Industrial Sensor', total: '$450.00' }],
          emptyMessage: 'No items.',
        },
      },
    },
  ],
};

export function MyDocument() {
  return <DocumentPreview descriptor={descriptor} data={data} showToolbar={true} />;
}

Styling & Tailwind Integration

DocForge document rendering (DocumentRenderer, DocumentPreview) is styled via pure CSS Custom Properties and included stylesheets (@dotevolve/doc-forge/styles).

The interactive UI components (DocumentPreviewModal, TemplateCustomizerSidebar) feature zero-config self-contained fallback styles ensuring they never collapse or render transparent even without Tailwind CSS. If your host application uses Tailwind CSS v4, include the source directive in your CSS to inherit your customized design system tokens:

@import 'tailwindcss';
@source "../node_modules/@dotevolve/doc-forge";

Interactive Demo

Try the interactive playground live at doc-forge.dotevolve.net.


License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0 (MPL-2.0).

  • You may freely use, integrate, and distribute this library in commercial and proprietary closed-source applications.
  • If you modify any existing files within this library, those modifications must be made available under the MPL-2.0.