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

@ai-matrx/content-ir-react

v0.11.0

Published

The shared AI Matrx Content IR RENDER layer: kind routing, the component resolver, provisional (streaming) rendering, the runtime-wrapper chrome, and the generic structured floor — as portable React.

Readme

@ai-matrx/content-ir-react

The shared render layer for AI Matrx Content IR.

@ai-matrx/content-ir is the pure kernel — it parses a kind, validates it, reads a streaming partial, and reads a runtime wrapper. This package is the layer above it: the one that decides which component a kind renders through, and draws the chrome around that decision.

It is framework-portable React. No Next.js, no Redux, no Supabase, no router, no host error capture. Every host-specific capability enters through an explicit seam.

npm install @ai-matrx/content-ir-react @ai-matrx/content-ir react

Wire your host once

import {
  ComponentResolver,
  ContentIrRenderProvider,
  applyIrKindRoute,
  type ContentIrHost,
} from "@ai-matrx/content-ir-react";

const components = new ComponentResolver({
  loadAll: () => fetchKindComponentRows(),
  loadForKind: (kind, platform) => fetchKindComponentRows({ kind, platform }),
  reportError: (report) => myErrorLog(report),
});

const host: ContentIrHost = {
  platform: "web",
  kinds: myKindDefinitionSource,
  components,
  reportError: (report) => myErrorLog(report),
  // The host's dispatch table — the ONE place a component key becomes a
  // component. Run the route here.
  renderBlock: (block) => <MyBlockRenderer block={applyIrKindRoute(block, env)} />,
  // The FLOOR: any JSON value as a human document.
  renderValue: ({ value, kind, note }) => (
    <MyStructuredValueView value={value} kind={kind} note={note} />
  ),
};

<ContentIrRenderProvider host={host}>
  <App />
</ContentIrRenderProvider>;

What you get

| Export | What it is | |---|---| | applyIrKindRoute | THE kind route: envelope → registered kind → the right component key. Pure; callable from a reducer or a stream accumulator. | | resolveProvisionalKindRender / resolveAnnouncedKindLoading | The streaming partial-kinds route — a provisional value renders through the SAME component the final value will. | | ComponentResolver | (kind, platform, role) → component, compiled floor + DB override, granular repaint counters, cold-fetch dedupe. | | KindInstanceRender | Render one canonical kind instance through the real production path, with the "no component yet" floor beneath it. | | GenericStructuredView | The R6 disposition for a known shape nothing render-trusted claims — readable, honest, never an error. | | NodeOutcomeView / RunResultView | The runtime-wrapper chrome. Transparent routers: they delegate, they never render a payload. | | ProvisionalKindBoundary / ProvisionalKindFrame | The mid-stream safety net and the "still arriving" affordance. | | useContentIrKindVersion | Granular late-arrival repaint for one kind. |

The rule this package exists to enforce

A shape has exactly one component, everywhere. A second implementation of the routing decisions — in a dashboard, an extension, a desktop webview, a customer's app — is a guaranteed divergence, and it is banned. If this package cannot express what your host needs, add a seam; never fork the route.

Docs

  • Package internals and boundary: FEATURE.md beside this file.
  • Cross-repo system-of-record: common-docs/systems/content-ir-twin/FEATURE.md.
  • Shape System semantics: matrx-frontend/features/content-ir/docs/SHAPE_SYSTEM.md.