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

@dbx-tools/ui-email

v0.3.20

Published

React email surfaces for AppKit chat and admin workflows.

Readme

@dbx-tools/ui-email

React email surfaces for AppKit chat and admin workflows.

Import this package when a Databricks App needs to render model-drafted email, collect a human approval decision, or provide a standalone compose form using the same message contract as @dbx-tools/shared-email. Server-side sending and AppKit routes live in @dbx-tools/email.

Key features:

  • Approval card for suspended send_email tool calls.
  • Read-only draft preview for review queues, chat transcripts, and test pages.
  • Standalone compose form that emits shared EmailMessage payloads.
  • Compact Markdown body renderer shared across preview and compose surfaces.
  • Recipient parsing, address display, and attachment-label helpers that mirror server expectations.
  • Styles wired to the AppKit UI/Tailwind foundation so host apps do not need a separate email component theme.

Add The Styles

@import "@databricks/appkit-ui/styles.css";
@import "@dbx-tools/ui-email/styles.css";

The stylesheet pulls in the AppKit UI base styles and scans the email React components for Tailwind classes. Import it once from the app's global CSS entry.

Render A Send Approval

import { EmailApprovalCard } from "@dbx-tools/ui-email/react";
import { email } from "@dbx-tools/shared-email";

const draft = email.emailMessageSchema.parse(toolCall.args);

<EmailApprovalCard
  email={draft}
  pending={pending}
  onApprove={() => addToolResult({ toolCallId: toolCall.id, result: { approved: true } })}
  onDeny={() => addToolResult({ toolCallId: toolCall.id, result: { approved: false } })}
/>;

EmailApprovalCard is the chat-facing component for the send_email tool. It renders the draft fields, Markdown body, attachment names, and Approve/Deny actions while leaving tool-call state and transport decisions to the host app.

Wire onApprove and onDeny to the chat framework's tool-result mechanism. The component deliberately does not call the email API itself; the server-side tool resumes only after the host app records the user's decision.

Preview A Draft Inline

import { EmailPreview } from "@dbx-tools/ui-email/react";

<EmailPreview email={draft} />;

Use EmailPreview when a page needs a compact read-only summary without action buttons, such as a review queue, audit log, or test harness.

Provide A Compose View

import { EmailComposeView } from "@dbx-tools/ui-email/react";

<EmailComposeView
  senders={senderOptions.senders}
  defaultFrom={senderOptions.defaultSender}
  onSend={(message, from) => sendEmail(message, from)}
/>;

EmailComposeView owns the form state, normalizes recipient fields, converts attached files to base64 email attachments, and emits the assembled EmailMessage. Fetch sender options and dispatch the final send through the server package.

Render A Markdown Body

import { EmailBody } from "@dbx-tools/ui-email/react";

<EmailBody className="text-sm">{message.body}</EmailBody>;

EmailBody uses Streamdown to render compact Markdown for email text. It is shared by the compose preview and approval card so drafts look the same before and after submission.

Reuse Field Helpers

import { attachmentNames, joinAddresses, parseAddresses } from "@dbx-tools/ui-email/react";

const to = parseAddresses("[email protected]; [email protected]");
const label = joinAddresses(to);
const files = attachmentNames(message.attachments);

The helpers keep free-text recipient parsing and attachment labels consistent across approval, compose, and custom UI surfaces.

Modules

  • ./react - EmailPreview, EmailApprovalCard, EmailComposeView, EmailBody, address/attachment helpers, shared email message types, and prop types.
  • ./styles.css - Tailwind/AppKit style entrypoint for the email components.

Pair this package with @dbx-tools/email for SMTP or outbox delivery, and with @dbx-tools/shared-email for schema validation in client/server boundaries.