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

@gullabs/flipbook-core

v3.2.1

Published

Framework-agnostic page-curl engine. Maintained fork of StPageFlip.

Readme

@gullabs/flipbook-core

Framework-agnostic HTML page-curl engine. Maintained fork of StPageFlip. Zero runtime dependencies. License: MPL-2.0.

Full monorepo docs (install recipes, styling, events, accessibility, SSR/CSP):

  • https://github.com/gul-labs/flipbook#readme
  • Migration from [email protected]: https://github.com/gul-labs/flipbook/blob/main/MIGRATION.md
  • Locked API surface: https://github.com/gul-labs/flipbook/blob/main/docs/API-CONTRACT.md
  • Known limitations: https://github.com/gul-labs/flipbook/blob/main/docs/KNOWN-LIMITATIONS.md
npm i @gullabs/flipbook-core
import { PageFlip } from '@gullabs/flipbook-core';
// Optional under a strict CSP — default is runtime style injection:
// import '@gullabs/flipbook-core/style.css';

const pageFlip = new PageFlip(root, { width: 400, height: 600 });
pageFlip.loadFromHTML(pages);
// HTML only — loadFromImages / canvas mode were removed in 3.0.0.
// Pictures: put <img alt="…"> inside the HTML page elements.

Essentials

| Topic | Rule | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------- | | Paper color | pageBackground (default #fff) → --stf-paper. Opacity is structural. | | Leaf styling | Style an inner wrapper; the engine owns layout + paper on the leaf root. | | Stylesheet | Default injects CSS. CSP: injectStyles: false + ship style.css / FLIPBOOK_CSS. | | Navigation | flipToPage / flipNext / flipPrev animate; turnTo* are instant. Relative turns return boolean and may emit turnRejected. | | Progress | turnProgress while a fold moves; completion is flip / changeState, not a final progress tick. | | Cancel | cancelTurn() aborts an in-flight turn without committing. | | Queries | getVisiblePages(), canTurn(dir), getPageCount(), getCurrentPageIndex(), isReady(), isAnimating(). |

Error codes

Public failures throw PageFlipError with a stable code and kind (usage | lifecycle | internal). Setting failures also set err.setting.

| Code | Kind | When | | -------------------- | --------- | ------------------------------------------------------- | | INVALID_SETTING | usage | A setting failed validation (err.setting names which) | | INVALID_PAGE | usage | Page index out of range | | PAGE_NOT_IN_SPREAD | usage | Page exists but is in no spread | | INVALID_INDEX | usage | Internal array access out of range | | WRONG_MODE | usage | Reserved after canvas removal; not thrown by HTML today | | DESTROYED | lifecycle | Called after destroy() | | NOT_LOADED | lifecycle | API used before load finished | | DETACHED_PAGE | lifecycle | A page element left the document mid-turn | | NO_ANIMATION_FRAME | lifecycle | Animation frame list was empty | | COLLINEAR_SEGMENTS | internal | Geometry: segments are collinear | | DEGENERATE_SEGMENT | internal | Geometry: a segment has zero length | | FLIP_SETUP | internal | Could not prepare flipping/bottom pages | | INVALID_SPREAD | internal | Spread index invalid during a turn | | RENDER_SETUP | internal | Shadow/DOM render setup failed | | PAGE_FLIP | internal | Generic / unspecified |

flipNext / flipPrev return boolean (false = did not start) and emit turnRejected when refused — that is not an exception path.

License

MPL-2.0 — file-level copyleft. Your application is not Covered Software when you only import and call the public API. Distribution of the engine (including bundled browser JS) requires source availability + notice; for the unmodified npm package, point at https://github.com/gul-labs/flipbook.

Copyright (c) 2026 Gul Labs, with upstream Nodlik MIT notices in LICENSE.