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

@duckviz/report

v1.3.0

Published

Report editor (Yoopta/Slate) and deck presenter for @duckviz dashboards. Includes PDF, DOCX, and PPTX export.

Downloads

132

Readme

@duckviz/report

AI-powered report editor and deck presenter for DuckViz dashboards. Includes PDF, DOCX, and PPTX export.

Install

npm install @duckviz/report
# peer dependencies
npm install @duckviz/ui @duckviz/widgets @duckviz/db react react-dom @tanstack/react-query

Quick start

Wrap your app with ReportProvider, supplying typed callbacks for your AI backend:

import { ReportProvider, ReportPageContent } from "@duckviz/report";

function App() {
  return (
    <ReportProvider
      callbacks={{
        generateReportSections: async function* (request) {
          // Your SSE endpoint — yield ReportSSEEvent objects
        },
        modifyReportSection: async (request) => {
          // Your modification endpoint — return { content: StructuredReport }
        },
        generateDeckSlides: async function* (request) {
          // Your SSE endpoint — yield DeckSSEEvent objects
        },
        modifyDeckSlides: async (request) => {
          // Your modification endpoint — return { deck: StructuredDeck }
        },
      }}
    >
      <ReportPageContent
        dashboardName="Sales Dashboard"
        widgets={widgets}
        onBack={() => navigate("/dashboard")}
      />
    </ReportProvider>
  );
}

Exports

| Subpath | Description | | ---------------------------- | --------------------------------------------------------- | | @duckviz/report | All components, hooks, utilities, and types (client-side) | | @duckviz/report/server | Types + deck prompts only (server-safe, no React/DOM/CSS) | | @duckviz/report/styles.css | CSS stylesheet (auto-injected via JS import) |

Components

| Export | Description | | -------------------- | ----------------------------------------------------- | | ReportPageContent | Full report page with toolbar, editor, and chat panel | | ReportView | A4-style editor container | | YooptaReportEditor | Yoopta/Slate block editor with toolbar | | ReportOutlinePanel | Document outline sidebar | | ReportRightPanel | AI chat + timeline panel | | DeckView | Slide deck viewer | | DeckPresenter | Fullscreen slide presenter | | DeckSlidePreview | Slide thumbnail strip |

Hooks

| Export | Description | | --------------------- | ------------------------------------------------- | | useReportGeneration | Headless hook: scaffold, stream, chat for reports | | useDeckGeneration | Headless hook: scaffold, stream, chat for decks |

Export utilities

| Export | Description | | -------------- | --------------------------------------- | | exportToPdf | Programmatic PDF from structured report | | exportToDocx | Word document from structured report | | exportToPptx | PowerPoint from structured deck |

Templates

| Export | Description | | ------------------------ | ------------------------------- | | REPORT_TEMPLATES | 22 built-in report templates | | getRelevantTemplateIds | Domain-aware template selection |

Server subpath

API routes and server components should import from @duckviz/report/server to avoid pulling in React and DOM dependencies:

import type { ReportSection, StructuredReport } from "@duckviz/report/server";
import {
  DECK_SYSTEM_PROMPT,
  buildChartSlidePrompt,
} from "@duckviz/report/server";

Peer dependencies

  • react >= 18
  • react-dom >= 18
  • @duckviz/ui >= 0.3.2
  • @duckviz/widgets >= 0.2.0
  • @duckviz/db >= 0.2.0 (optional)
  • @tanstack/react-query >= 5

License

MIT