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

@oge-ui/react-ai

v1.1.10

Published

React AI components from the OGE UI suite that work with any model: a natural-language grid assistant that turns "orders over 500 from last month, newest first" into validated sort, filter, grouping and column changes, with preview, apply and undo — runni

Readme

@oge-ui/react-ai

AI components for React 18 and 19 that work with your model — OpenAI, Azure OpenAI, Anthropic, a local Ollama, or your own backend. No hosted service, no extra subscription, no row data leaves the page. The same assistant machine, transports and stylesheet as the Angular @oge-ui/ai. MIT.

npm install @oge-ui/react-ai
import '@oge-ui/react-ai/styles.css';

const transport = createOgeAiHttpTransport({ url: '/api/ai' }); // the key stays on the server

function Orders() {
  const grid = useRef<OgeGridHandle<Order>>(null);
  return (
    <OgeAiConfigProvider config={{ transport }}>
      <OgeGridAssistant target={grid} suggestions={['Top 10 orders this month']} />
      <OgeGrid ref={grid} data={orders} columns={columns} />
    </OgeAiConfigProvider>
  );
}

Grid assistant

The user types what they want to see — "orders over 500 from İzmir last month, newest first, grouped by status" — and the grid sorts, filters, groups, searches and shows or hides columns accordingly.

  • Validated, never trusted — every field, operator and value the model returns is checked against the grid's columns and coerced to the column type (dates parse as local days, lookup texts map to their values); the merged state still passes sanitizeGridStateSnapshot. Parts that do not fit are dropped and reported, never applied.
  • Preview, apply, undo — mode="preview" (default) shows the proposed change with Apply / Discard; mode="apply" applies at once. Undo steps back through applied changes; the cancelable applying event can veto one.
  • Private by design — the model sees column names, types and lookup values only. Add descriptions or hide a column from the model with the columns prop; switch whole parts off with capabilities.
  • Follow-ups — earlier exchanges are replayed, so "now group it by city" works; the model may ask back (clarify) or say a request is impossible.
  • Accessible — a labelled region, a polite status line that announces every step, Escape to stop or discard, forced-colours and reduced-motion support, RTL.

Works with the <OgeGrid> ref — or anything with state(), applyState() and describeColumns().

Smart paste

<OgeSmartPaste target={formRef} /> fills a form from text the user copied — an email, a signature, a table row. One click reads the clipboard; the model maps the text onto the form's fields; a Now → New table shows every value before it is written (or mode="apply" writes at once), and Undo puts the old values back.

  • Values must name a writable field, coerce to its type and — for choice fields — be one of the listed values; read-only fields are never offered.
  • The request carries the field catalog and the pasted text, never the form's current values. The text is labelled as data, so instructions inside it are not followed.
  • No clipboard permission (or an insecure origin)? A text box takes the paste.

AI column

createOgeAiColumn() + <OgeAiCell> add a column the model fills — a sentiment, a category, a summary per row. The visible rows are batched into a few requests, every answer is validated against the column's type and choices, values are cached per row, and a failed cell offers a retry. It sends row data: exactly the inputs fields the column names, nothing else.

Chat

<OgeChat conversation={history} onConversationChange={setHistory} /> is a conversation surface: a polite live-region log, a composer (Enter sends, Shift+Enter adds a line, Escape stops), suggestions, typing indicator, stop and retry. With a transport the model answers with your instructions; with transport: null it is a plain chat whose replies you add with addMessage(). Messages render as text, never HTML.

Transports

| Transport | Use it for | | ----------------------------- | ----------------------------------------------------------------------- | | createOgeAiHttpTransport | Production: your backend calls the model; the browser never sees a key. | | createOgeOpenAiTransport | OpenAI and every compatible server: Azure, Ollama, vLLM, LM Studio. | | createOgeAnthropicTransport | Claude, directly or through a proxy. |

Sending an API key from the browser requires dangerouslyAllowBrowser: true — meant for prototypes and internal tools. Any object with a complete(request, { signal }) method is a transport too.

Docs

License

MIT — free forever, like the rest of the open tier. See LICENSE.