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

@arnilo/liveframe

v0.4.1

Published

Runtime-composable UI: primitives, design-system recipes and TSX widgets that change an app's UI without a deployment.

Readme

Liveframe

CI

Runtime-composable UI for apps: people and AI agents install TSX widgets at runtime and the app's UI changes, with no deployment.

An app ships a small set of trusted primitive components and a design system. Widgets are ordinary TSX written against those primitives. Widget code runs on the app's backend; the browser only draws a validated tree with the app's own components, so the UI looks native and no widget code runs in the page.

Four rules, none of them optional:

  1. Widget code never runs in the browser. Only the app's compiled primitives run there.
  2. The UI tree is data, and it is validated before the renderer reads it.
  3. Widget code never sets colours or raw CSS. Look comes from the design system; layout comes from token-constrained style props.
  4. A widget never holds authority. Data is resolved and actions are run by the app, as the viewer.

Getting started · Specification · How a surface is built · Security model · Compatibility · Changelog

Install

bun add @arnilo/liveframe

The workspace has four packages. The three optional companions share the core version and peer on @arnilo/liveframe. The A2UI converter joined the workspace in 0.4.0.

bun add @arnilo/liveframe-runner-quickjs   # an isolated runner for widget code you do not trust
bun add @arnilo/liveframe-starter          # a conforming catalog, primitives, themes and styles to start from
bun add @arnilo/liveframe-a2ui             # convert an A2UI v0.9/v0.9.1 surface to element JSON

The A2UI converter's guide has the mapping and what it refuses.

Each peer is optional and only the subpaths that need it use it:

| Peer | Range | Needed by | |---|---|---| | react, react-dom | ^19.0.0 | /react, /preview/react, /conformance/react | | playwright | ^1.49.0 | liveframe preview capture, the MCP server's capture_preview | | @modelcontextprotocol/server | ^2.0.0 | liveframe mcp |

The backend subpaths (/store/fs, /preview/worker, the in-process package loader and the CLI) need Bun ≥ 1.4.2. The host-API-free subpaths need ES2022 plus only the globals listed below. The browser subpaths (/css, /react, /dom, /preview/react, /conformance/react, /conformance/dom) need any ESM bundler. The package ships compiled ES2022 JavaScript with .d.ts declarations and the published JSON Schemas; spec §13 has the runtime matrix and package contents.

| Host-API-free subpath | Non-ECMAScript globals | |---|---| | . | none | | sdk | none | | css | none | | authoring | TextEncoder, TextDecoder, URL, console | | runner-kit | none | | template | none | | surface | none | | host | console | | preview/capture | TextEncoder, TextDecoder, URL | | conformance | setTimeout, clearTimeout, TextDecoder, console | | pack | TextDecoder, console | | store | console | | preview | setTimeout, clearTimeout, TextDecoder, console |

Paths are relative to @arnilo/liveframe; . is the root export. The sdk row includes /sdk/gen and both JSX runtimes; /runner-kit.bundle.js and /validator.bundle.js also need no non-ECMAScript globals. Entries include bundled dependencies: Acorn guards its unused console warning, and the packer's source-map codec optionally uses TextDecoder with a pure JavaScript fallback. Preview timers bound module loading, and the runner conformance cases reach them through the reference renderers; capture needs the Encoding and URL APIs. Authoring reaches capture. Source, compiled output and browser bundles are checked against this table in CI.

Quickstart

A catalog, its React implementations and a validator are all a surface needs. compileValidator takes the validated catalog, capabilities and manifest for one widget; createRenderer returns the <Surface> that draws a tree it has validated.

import { type Catalog, compileValidator, defineComponent, obj, str, type UiTree } from "@arnilo/liveframe";
import { createRenderer, implement } from "@arnilo/liveframe/react";

const text = defineComponent({
  kind: "text",
  description: "One line of text.",
  props: obj({ value: str({ maxLength: 200 }) }),
  children: "none",
  variants: ["default"],
  defaultVariant: "default",
  slots: ["root"],
  events: {},
  styleProps: [],
  a11y: { role: "paragraph" },
});

const catalog = {
  format: "liveframe-catalog/1",
  catalogId: "acme.ui@1",
  description: "The app's primitives.",
  vocabulary: {
    colourRoles: ["text.primary", "surface.base", "accent.primary"],
    surfaceRoles: ["surface.base"],
    fillableRoles: ["accent.primary"],
    typographyRoles: ["body"],
    space: ["space.1"],
    radius: ["radius.control"],
    size: ["size.glyph"],
    breakpoints: ["bp.sm"],
    tones: { default: "text.primary" },
    surfaceTypography: "body",
  },
  definitions: [text],
} as const satisfies Catalog;

const capabilities = { format: "liveframe-capabilities/1", sources: {}, actions: {} };
const manifest = {
  format: "liveframe-manifest/1",
  id: "hello",
  version: "1.0.0",
  catalogId: catalog.catalogId,
  params: obj({}),
  state: obj({}),
  context: obj({}),
  initialState: {},
  sources: {},
  actions: [],
};

const Text = implement(text, ({ props, slot, style }) => (
  <p className={slot("root")} style={style}>
    {props.value}
  </p>
));
const { Surface } = createRenderer({ catalog, implementations: [Text] });
const validator = compileValidator({ catalog, capabilities, manifest });
const identity = { id: "acme", version: "1.0.0" };

/** Draw a validated tree that the app's backend rendered. */
export function Hello({
  tree,
  onIntent,
}: {
  tree: unknown;
  onIntent: (intent: { type: "setState" | "action" }) => void;
}) {
  return (
    <Surface
      tree={tree}
      validator={validator}
      theme={identity}
      designSystem={identity}
      onIntent={onIntent}
      fallback={null}
    />
  );
}

export const tree: UiTree = {
  format: "liveframe/1",
  catalogId: catalog.catalogId,
  surfaceId: "hello",
  revision: 1,
  root: { id: "root", kind: "text", props: { value: "Hello from Liveframe" } },
};

Widgets are authored separately with the SDK, which exports render() and the JSX runtime and emits the tree Hello receives. The preview guide shows the backend runners that execute widget code, and the package guide shows how a rendered widget becomes an immutable package a host stores and places.

For streaming updates, diffTrees(prev, next) emits an optional liveframe/tree-patch/1 patch on the backend, and the browser host applies it with applyPatch(base, patch) and passes the patched tree to <Surface> (which validates the whole tree on arrival):

import { applyPatch, diffTrees } from "@arnilo/liveframe";

const next = {
  ...tree,
  revision: 2,
  root: { id: "root", kind: "text", props: { value: "Hello again" } },
};
const patch = diffTrees(tree, next);
if (patch.ok) {
  const updated = applyPatch(tree, patch.value);
  if (updated.ok) Hello({ tree: updated.value, onIntent: () => {} });
}

What is in the package

| Import | Holds | |---|---| | @arnilo/liveframe | Definition, catalog, theme, design-system, UI-tree and tree-patch formats; validateTreePatch, diffTrees and applyPatch; the validator; the recipe resolver; LiveframeFailure and LiveframeError | | @arnilo/liveframe/sdk | The JSX runtime (/sdk/jsx-runtime, /sdk/jsx-dev-runtime), intent helpers and render() | | @arnilo/liveframe/sdk/gen | The host-side emitters behind liveframe gen: generate(), generateDefinitions(), generateElementsSchema(), generateTemplateSchema() and generateDigest() (the agent digest, liveframe gen --digest) | | @arnilo/liveframe/react | The renderer: createRenderer(), <Surface> and implement() | | @arnilo/liveframe/surface | The framework-independent surface core under /react: createSurfaceCore(), node contexts and local state | | @arnilo/liveframe/css | The scoped CSS projection and the class, style, scope and variable helpers; the host inserts sheets | | @arnilo/liveframe/pack | Package and scenario formats, structural validators, pack(), verifyPackage(), checkPackages(), canonicalJson() and packageHash() | | @arnilo/liveframe/store | Record formats, the Store interface, memoryStore() and loadPlacement() | | @arnilo/liveframe/host | renderPlacement(), handleIntent() and dependents(): the ordered, stateless request-time render and intent pipeline, and which placements a change touches | | @arnilo/liveframe/store/fs | fileStore(dir), which reads and writes the file system | | @arnilo/liveframe/preview | The Runner interface, inProcessRunner(), templateRunner() and createPreview() | | @arnilo/liveframe/authoring | Nine typed authoring operations without MCP; the host supplies its runner | | @arnilo/liveframe/runner-kit | renderModule() and linkPackage(), the in-sandbox half of a runner | | @arnilo/liveframe/template | validateTemplate(), renderTemplate() and the expression language of template widgets | | @arnilo/liveframe/runner-kit.bundle.js | The kit, SDK and validator as one import-free ES module for isolates | | @arnilo/liveframe/validator.bundle.js | The root exports as one import-free ES module for hosts that validate without rendering | | @arnilo/liveframe/preview/capture | Capture as bytes with a pluggable backend | | @arnilo/liveframe/dom | The plain DOM adapter: createDomRenderer(), implement() and place(), with no framework | | @arnilo/liveframe/preview/worker | workerRunner(), which needs the Worker global | | @arnilo/liveframe/preview/react | <Preview> | | @arnilo/liveframe/conformance | Host-API-free catalog, design-system and store suites | | @arnilo/liveframe/conformance/react | The renderer suites and conformancePage() | | @arnilo/liveframe/conformance/dom | The same renderer cases against /dom implementations, and domConformancePage() | | @arnilo/liveframe/schemas/<format>.json | The JSON Schema for every format |

The spec defines each subpath's contract.

Use it with a coding agent

liveframe mcp is an MCP server over stdio that lets a coding agent read your catalog, write a draft widget and look at its renders. It is authoring only: no tool installs, places or approves a widget, or runs an action.

  1. Install the optional peers: bun add -d @modelcontextprotocol/server, and bunx playwright install chromium if the agent should capture screenshots.
  2. Write a config module that default-exports an AuthoringConfig (your catalog, capabilities, runner and, for captures, a preview(binding) that starts your <Preview> page). examples/demo-host/mcp.config.ts is a working one.
  3. Register it with the agent. For Claude Code, put this in .mcp.json in your app; Claude Desktop and other clients use the same mcpServers shape in their own config file:
{ "mcpServers": { "liveframe": { "command": "bunx", "args": ["liveframe", "mcp", "./mcp.config.ts"] } } }

The client starts the server itself. The MCP guide covers the nine tools, captures and errors.

Guides

Status

Liveframe is pre-1.0. The latest published release is 0.4.1 (2026-11-24), a security patch of 0.4.0. See the release notes, migration guide, adopter notes and what 0.4.1 changes. The compatibility policy covers the public API, formats and on-disk fileStore layout.

Development

bun install
bun run check   # build, generated output, typecheck, lint, format, tests

Repository layout, roadmap and plans: roadmap.md, plans/. Contributing with agents: AGENTS.md. Security reports: SECURITY.md.

License

MIT — see LICENSE.