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

@breakflow/browser

v0.1.2

Published

Browser DOM layout measurement, sandbox cloning, DOM pagination, and debug overlay for BreakFlow.

Readme

@breakflow/browser

Browser DOM layout measurement, sandbox cloning, DOM pagination, and debug overlay for BreakFlow.

NPM Version Live Demo License: MIT

🚀 Try the Live Interactive Demo (Angular 22 + Signals + client-side jsPDF showcase)


Overview

@breakflow/browser brings intelligent HTML pagination into web browsers. It analyzes printable HTML containers, measures exact layout geometry, and reconstructs pixel-perfect paged containers (.breakflow-page) without ever mutating or disturbing your live application DOM.

Perfect for Angular, React, Vue, Svelte, or Vanilla JavaScript applications generating invoices, statements, resumes, or multi-page analytic reports.

Key Features

  • Non-Destructive Sandbox: Clones your printable component into a hidden iframe sandbox for layout measurement. Reactive application states (e.g. Angular Signals, React state) remain completely untouched.
  • Accurate CSS Measurement: Respects stylesheets, web fonts, padding, borders, and CSS vertical margin collapsing.
  • Smart Table Slicing: Automatically splits long tables across pages, cloning and repeating <thead> headers with fixed column geometries on every continuation slice.
  • Visual Debug Mode: Renders page boundary guidelines, dimension badges, and vertical page budget analysis without modifying layout geometry.
  • Client-Side PDF Integration: Prepares clean vector print DOM ready for browser print dialog (window.print()) or client-side libraries like jsPDF (jsPDF.html() with autoPaging: false).

Installation

npm install @breakflow/core @breakflow/browser

Or using pnpm / yarn:

pnpm add @breakflow/core @breakflow/browser
# or
yarn add @breakflow/core @breakflow/browser

Quick Start

import { createPaginator } from '@breakflow/browser';

// 1. Create a paginator instance with A4 format and smart defaults
const paginator = createPaginator({
  page: {
    format: 'A4',
    margin: { top: '15mm', bottom: '15mm', left: '15mm', right: '15mm' }
  },
  smartDefaults: true,
  table: {
    repeatHeader: true,
    preventRowSplit: true
  }
});

// 2. Analyze without altering your live DOM
const analysis = await paginator.analyze('#invoice-report');
console.log(`Planned Pages: ${analysis.pageCount}, Issues: ${analysis.issues.length}`);

// 3. Generate printable paged DOM
const result = await paginator.paginate('#invoice-report', {
  replaceOriginal: false,
  injectStyles: true
});

// 4. Mount paginated pages or pass to jsPDF / window.print()
document.getElementById('print-container')!.appendChild(result.element);

Client-Side jsPDF Integration Example

import { jsPDF } from 'jspdf';
import { createPaginator } from '@breakflow/browser';

const paginator = createPaginator({ page: { format: 'A4', margin: '15mm' } });
const { element } = await paginator.paginate('#printable-area');

const pdf = new jsPDF({ format: 'a4', unit: 'mm' });

// Use autoPaging: false so BreakFlow controls exact physical page slices
await pdf.html(element, {
  callback: (doc) => doc.save('document.pdf'),
  autoPaging: false
});

Monorepo Packages


Links

License

MIT © BreakFlow Contributors