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

@entroparc/entrofeed-widget

v0.1.7

Published

Embeddable React feedback widget for Entrofeed.

Readme

@entroparc/entrofeed-widget

Embeddable React feedback widget for Entrofeed.

For the simplest install, use the hosted script from the Entrofeed project page. Use this React package when the host app needs typed props, richer user context, explicit theme tokens, or custom submit callbacks.

For authenticated production apps, pair version 0.1.7 or later with @entroparc/entrofeed-sdk. The SDK sends through the host app's own server, keeps a recoverable local outbox, and supplies trusted user identity there.

Install

npm install @entroparc/entrofeed-widget
# or
pnpm add @entroparc/entrofeed-widget

Usage

"use client";

import { usePathname } from "next/navigation";
import { EntrofeedWidget } from "@entroparc/entrofeed-widget";

export function ProductFeedback({ user }: { user: { id: string; email?: string } }) {
  const pathname = usePathname();

  return (
    <EntrofeedWidget
      apiBaseUrl={process.env.NEXT_PUBLIC_ENTROFEED_URL!}
      projectKey={process.env.NEXT_PUBLIC_ENTROFEED_PROJECT_KEY!}
      user={{ id: user.id, label: user.email }}
      context={{ path: pathname, route: pathname }}
    />
  );
}

Mount the component once in the host app shell or product layout.

Launcher accessibility

The icon-only circular launcher gets its accessible name from triggerLabel (default "Feedback") through aria-label and title. The pulse dot is decorative (aria-hidden), and its animation stylesheet is injected once into document.head with id entrofeed-widget-pulse-keyframes. Widget state, including an open panel, persists across host client-side navigations when mounted in a persistent layout.

AI Agent Install Prompt

Use this prompt inside a host app repo:

Install Entrofeed feedback into this React/Next.js app.

Use the repo's package manager to add @entroparc/entrofeed-widget.
Set NEXT_PUBLIC_ENTROFEED_URL and NEXT_PUBLIC_ENTROFEED_PROJECT_KEY in the host
app environment.
Mount EntrofeedWidget once in the authenticated app layout or product shell.
Pass the current pathname as both path and route, and pass the current user
id/email when available.
Do not put server secrets in NEXT_PUBLIC vars.
Run lint/build after the change, then submit one live test feedback item and
confirm it appears in Entrofeed.

Required Environment

NEXT_PUBLIC_ENTROFEED_URL=https://www.entrofeed.com
NEXT_PUBLIC_ENTROFEED_PROJECT_KEY=pk_live_xxx

The project key identifies the Entrofeed project. It is not a secret, but it should still be bound to the exact origins that are allowed to submit feedback. The widget also sends the public project key in the submit URL so Entrofeed can answer CORS preflight requests using the project-key origin bindings. Use the canonical Entrofeed app URL. Browser CORS preflights cannot follow domain redirects, so do not use an apex URL if it redirects to www.

Updating An Existing Host App

If the host app already has an older local widget copy, remove that local widget or local package reference, install @entroparc/entrofeed-widget, and replace imports with:

import { EntrofeedWidget } from "@entroparc/entrofeed-widget";

Props

| Prop | Type | Required | Notes | | --- | --- | --- | --- | | apiBaseUrl | string | Quick mode | Entrofeed app URL. Empty string falls back to the current browser origin, useful for same-origin previews. | | projectKey | string | Quick mode | Public project key from Entrofeed. | | transport | EntrofeedWidgetTransport | Full Integration | Same-origin authenticated transport. When present, it is authoritative and Quick mode is not used. | | triggerLabel | string | No | Accessible label and tooltip for the launcher. | | title | string | No | Panel title. | | description | string | No | Short helper copy below the title. | | feedbackTypes | { id: string; label: string }[] | No | Category pills shown above the message field. | | user | { id?: string; label?: string } | No | Current user identity from the host app. | | context | { path?: string; route?: string; appVersion?: string; feedbackType?: string } | No | Host-app context. Current browser path is added automatically and can be overridden. | | placement | "bottom-right" \| "bottom-left" | No | Launcher position. | | requestTimeoutMs | number | No | Submit timeout. Defaults to 12000. | | attachmentUploadTimeoutMs | number | No | Attachment upload timeout when file capture is enabled. Defaults to 60000. | | captureFeatures | ("files")[] | No | Opt-in richer capture features. Omit this prop to keep the default simple widget. | | onSubmitted | (feedbackEventId: string) => void | No | Called after a successful submit. | | onError | (error: Error) => void | No | Called after a failed submit. | | theme | EntrofeedWidgetTheme | No | Explicit, sanitized theme token overrides for brand fit. |

Full Integration

Full Integration separates the widget UI from delivery. Pass the browser transport created by @entroparc/entrofeed-sdk/browser:

<EntrofeedWidget
  transport={fullIntegrationTransport}
  captureFeatures={["files"]}
/>

The editable Your email field is hidden in this mode. The browser cannot claim a trusted user id or email; the host server resolves both from its own authenticated session. Quick Widget keeps its existing email field and direct submission behavior when no transport is supplied.

Optional File Attachments

Manual file attachment capture is opt-in. Enable it only for design-partner or internal review flows where the user intentionally chooses a screenshot or document:

<EntrofeedWidget
  apiBaseUrl={process.env.NEXT_PUBLIC_ENTROFEED_URL!}
  projectKey={process.env.NEXT_PUBLIC_ENTROFEED_PROJECT_KEY!}
  captureFeatures={["files"]}
/>

The widget submits feedback first, then requests a short-lived private upload token for the chosen file. Attachments are stored privately in Entrofeed and are downloaded through authenticated Entrofeed routes by operators.

Default installs do not show file controls.

Theming

The widget keeps the Entrofeed design by default. Host apps can pass explicit theme tokens when they want the launcher and panel to sit closer to the product brand:

import {
  EntrofeedWidget,
  type EntrofeedWidgetTheme,
} from "@entroparc/entrofeed-widget";

const theme: EntrofeedWidgetTheme = {
  accent: "#c49349",
  accentForeground: "#17120a",
  background: "#211d1a",
  panel: "#26221e",
  panelElevated: "rgba(18, 16, 14, 0.9)",
  border: "rgba(255, 255, 255, 0.07)",
  foreground: "#d4d1ca",
  muted: "#8b857d",
  radius: 12,
};

export function ProductFeedback() {
  return (
    <EntrofeedWidget
      apiBaseUrl={process.env.NEXT_PUBLIC_ENTROFEED_URL!}
      projectKey={process.env.NEXT_PUBLIC_ENTROFEED_PROJECT_KEY!}
      theme={theme}
    />
  );
}

Supported theme tokens:

| Token | Purpose | | --- | --- | | accent | Primary action and active signal color. | | accentForeground | Text color on top of the accent color. | | background | Launcher and outer panel surface. | | panel | Inner panel surface. | | panelElevated | Message field surface. | | border | Subtle border color used by controls. | | foreground | Primary text and icon color. | | muted | Secondary text color. | | radius | Outer panel radius, clamped from 4 to 24 pixels. |

Theme values are intentionally bounded. The widget accepts normal CSS color strings such as hex, rgb/rgba, hsl/hsla, named colors, and CSS variables, but it drops suspicious values such as url(...), expression(...), HTML-like text, or long raw CSS fragments. radius accepts a number or a pixel string from 4px to 24px.

Chameleon Widget recipe

For a host app with semantic CSS variables, map those variables once and let the widget follow the host's light and dark modes:

const chameleonTheme: EntrofeedWidgetTheme = {
  background: "var(--background, #faf9f7)",
  panel: "var(--card, #ffffff)",
  panelElevated: "var(--muted, #f5f3f0)",
  foreground: "var(--foreground, #1c1a17)",
  muted: "var(--muted-foreground, #716e67)",
  accent: "var(--primary, #1e2a4a)",
  accentForeground: "var(--primary-foreground, #ffffff)",
  border: "var(--border, #e8e5e0)",
  radius: 8,
};

<EntrofeedWidget
  apiBaseUrl={process.env.NEXT_PUBLIC_ENTROFEED_URL!}
  projectKey={process.env.NEXT_PUBLIC_ENTROFEED_PROJECT_KEY!}
  theme={chameleonTheme}
/>

This explicit mapping is the Chameleon Widget foundation: Entrofeed keeps its layout and behavior while the host controls the palette. The example matches Threom's semantic design tokens, including its existing dark-mode overrides.

Automatic host-site theme detection is not enabled. A future auto mode should be explicitly opt-in, deterministic, and lower priority than the theme prop.

Behavior

  • Sends POST /api/widget/submit?projectKey=... to Entrofeed.
  • When captureFeatures={["files"]} is enabled, sends POST /api/widget/attachments/upload-token?projectKey=... after feedback creation, then uploads the selected file with a private Vercel Blob client token.
  • Adds the current browser path and route by default.
  • Omits browser credentials from the request.
  • Shows visible success and error states.
  • Times out stalled requests after requestTimeoutMs.
  • Keeps React and React DOM as peer dependencies.

Release

Releases are intended to be published from GitHub Actions using npm trusted publishing and provenance. Create a Git tag like:

git tag widget-v0.1.0
git push origin widget-v0.1.0

Before tagging, update package.json, CHANGELOG.md, and run:

npm run widget:build
npm --prefix packages/entrofeed-widget run pack:dry