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

@bendyline/docblocks-react

v2.0.0

Published

React components for DocBlocks — file explorer, workspace picker, and editor shell

Readme

@bendyline/docblocks-react

React components for DocBlocks — the complete editor shell (file explorer, workspace picker, app menu, export pipeline) plus the individual components and hooks it's built from. This is the package the DocBlocks web app and desktop renderer both mount.

Installation

npm install @bendyline/docblocks-react

Peer dependencies: React 18 or 19. The DocBlocks core (@bendyline/docblocks) and the Squisq editor packages are regular dependencies and install automatically.

Usage

import { DocBlocksShell } from '@bendyline/docblocks-react';
import '@bendyline/docblocks-react/styles';

function App() {
  return <DocBlocksShell theme="auto" />;
}

The video-export worker uses module chunks. Vite consumers must retain the same worker setting used by the DocBlocks site and desktop renderer:

// vite.config.ts
import { defineConfig } from 'vite';

export default defineConfig({ worker: { format: 'es' } });

Components

DocBlocksShell

The canonical DocBlocks experience in one component — file explorer, workspace picker, app menu, the Squisq editor with its Editor / Markdown / Play views, and the export pipeline.

<DocBlocksShell theme="auto" logoUrl="/logo.png" />
  • theme'light' | 'dark' | 'auto' (auto follows prefers-color-scheme)
  • logoUrl — brand mark for the app menu button

Storage is abstracted behind the byte-authoritative FileSystemProviderV2 contract from @bendyline/docblocks/filesystem: browser-local (IndexedDB), native folders (File System Access API), transient memory workspaces, or the Electron host. Built-in compatibility facades expose it as provider.v2; first-party shell and file-tree operations are v2-first.

FileExplorer / FileTreeNode

File tree browser with inline create (file + folder), rename, and delete. It follows filesystem watch events automatically and re-reads the visible tree when a browser surface resumes. Long names truncate gracefully.

WorkspacePicker

Dropdown for switching between workspaces, creating new ones, and opening local folders, plus the per-workspace settings dialog (rename, download, remove, version-history overrides).

AppMenu

Top-left brand menu with the app-wide Settings dialog (theme preference, global version-history default), optional "Download all workspaces," and the About dialog.

ExportToolbarControls / ExportDialog

Consumers that need the export pipeline without the complete shell can use the public, independently built entry point:

import {
  DEFAULT_OPTIONS,
  ExportDialog,
  buildExportFilename,
  runExport,
} from '@bendyline/docblocks-react/export';

The export flow: quick re-export of the last configuration plus the full dialog — format (PDF, Word, PowerPoint, HTML, Markdown), visual theme, and page size.

Hooks

useDocumentSession(delay?)

React binding for the revisioned DocumentSession. Active-document writes, transitions, conflicts, and close preparation must flow through this session; there is intentionally no independent autosave hook.

useFileTree(provider)

File tree state management over any v2-capable provider — returns the tree, selection, and explicit create/move/remove functions, with a temporary v1 fallback for external providers.

Styles

import '@bendyline/docblocks-react/styles';

One stylesheet (docblocks.css) covers all components in both themes. The package also bundles the self-hosted woff2 fonts used by document themes (see NOTICE.md at the repo root for licenses).

Where new UI belongs

Cross-surface UI that lives inside the shell chrome (file tree, workspace picker, app menu, export dialog) belongs here. The VS Code extension is the deliberate exception — its webview mounts Squisq's EditorShell directly because VS Code provides the file explorer, workspace, and theme itself.

License

MIT