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

@allternit/ix

v0.1.0

Published

A2R Interface eXecution - Declarative UI generation with json-render compatibility

Readme

@allternit/ix

A2R Interface eXecution - Declarative UI generation with Vercel Labs json-render compatibility.

Overview

A2R-IX enables LLM-generated UI through a JSON Intermediate Representation (IR) with full compatibility for Vercel Labs json-render patterns. This allows AI agents to generate user interfaces declaratively, which are then rendered by the platform.

Features

  • UI IR Schema: Structured declarative UI definitions
  • Component Catalog: 15 built-in components with semantic versioning
  • State Store: Scoped state management with persistence
  • JSON Patch Engine: RFC 6902 compliant state synchronization
  • json-render Adapter: Bidirectional compatibility with Vercel Labs format
  • React Renderer: Full React component rendering
  • Vue Renderer: Vue 3 component generation
  • Svelte Renderer: Svelte component compilation
  • IX Capsule Runtime: Sandboxed execution with P3.9 integration
  • Policy Gates: Security controls (rate limiting, sanitization, validation)
  • LLM-to-IX Pipeline: Multi-format conversion from LLM outputs
  • Real-time Collaboration: Yjs/CRDT integration
  • Visual Editor: Fluent API for building UI IR

Installation

pnpm add @allternit/ix

Quick Start

Basic React Usage

import { createReactRenderer, createDefaultCatalog, createStateStore } from '@allternit/ix';

const renderer = createReactRenderer({
  catalog: createDefaultCatalog(),
  stateStore: createStateStore(),
});

const ui = {
  version: '1.0.0',
  components: [
    {
      id: 'header',
      type: 'Heading',
      props: { children: 'Hello World', level: 1 },
    },
    {
      id: 'input',
      type: 'Input',
      props: { placeholder: 'Enter name' },
      bindings: [
        { prop: 'value', statePath: 'name', direction: 'two-way' },
      ],
    },
  ],
  state: {
    variables: [
      { path: 'name', type: 'string', default: '' },
    ],
  },
  actions: [],
};

// Render in React
function App() {
  return <renderer.UIRoot root={ui} />;
}

Vue Renderer

import { createVueRenderer, compileToVue } from '@allternit/ix/vue';

// Generate Vue component definition
const vueComponent = compileToVue(uiDefinition);

// Use with Vue compiler or runtime
const { template, setup } = vueComponent;

Svelte Renderer

import { compileToSvelte } from '@allternit/ix/svelte';

// Generate Svelte component code
const svelteCode = compileToSvelte(uiDefinition);
// Use with Svelte compiler

Visual Editor

import { ui } from '@allternit/ix';

// Build UI programmatically
const myUI = ui.create()
  .state('count', 'number', 0)
  .add(
    ui.components.layout.Box({ padding: 4 })
      .child(ui.components.typography.Heading('Counter', 1))
      .child(
        ui.components.input.Button('Increment')
          .on('onClick', 'increment')
      )
  )
  .build();

Real-time Collaboration

import { createYjsAdapter } from '@allternit/ix/collab';
import * as Y from 'yjs';
import { WebsocketProvider } from 'y-websocket';

const doc = new Y.Doc();
const provider = new WebsocketProvider('ws://localhost:1234', 'room', doc);

const adapter = createYjsAdapter({
  doc,
  provider,
  userId: 'user-1',
  userInfo: { name: 'Alice', color: '#ff0000' },
});

// Collaborative state store
const store = adapter.getStore();
store.set('shared.value', 42); // Syncs to all connected clients

JSON-Render Compatibility

import { jsonRenderAdapter, llmToIX } from '@allternit/ix';

// From json-render to A2R-IX
const jsonRenderSchema = {
  version: '1.0.0',
  root: {
    type: 'Fragment',
    children: [
      { type: 'Text', props: { children: 'Hello' } },
    ],
  },
};

const a2rUi = jsonRenderAdapter.fromJsonRender(jsonRenderSchema);

// Auto-detect and convert
const result = llmToIX.convert(jsonRenderSchema);

IX Capsule Runtime

import { 
  createIXCapsule, 
  globalCapsuleRegistry,
  createRateLimitGate,
  createPropSanitizationGate,
} from '@allternit/ix';

// Create capsule with security policies
const capsule = globalCapsuleRegistry.create({
  id: 'my-capsule',
  ui: a2rUi,
  stateStore: createStateStore(),
  policyGates: [
    createRateLimitGate({ maxActionsPerMinute: 60 }),
    createPropSanitizationGate({ allowHTML: false }),
  ],
});

// Subscribe to events
capsule.subscribe((event) => {
  console.log('Capsule event:', event);
});

// Apply state patches
capsule.applyPatch([
  { op: 'replace', path: '/count', value: 10 },
]);

Architecture

A2R-IX
├── types/           # TypeScript interfaces
├── schema/          # UI IR schema definitions
├── catalog/         # Component registry with semver
├── state/           # Store + JSON Patch engine (RFC 6902)
├── adapters/        # Format converters (json-render)
├── react/           # React renderer
├── vue/             # Vue renderer
├── svelte/          # Svelte renderer
├── runtime/         # Capsule runtime + policy gates
├── sdk/             # API client + React hooks
├── pipeline/        # LLM-to-IX conversion
└── collab/          # Yjs/CRDT + Visual Editor

Component Catalog

Built-in components:

| Component | Category | Props | |-----------|----------|-------| | Box | layout | padding, margin, width, height, display, gap | | Stack | layout | direction, spacing, align, justify | | Text | typography | variant, size, weight, color, align | | Heading | typography | level, color | | Button | input | variant, size, disabled, onClick | | Input | input | value, placeholder, type, onChange | | TextArea | input | value, rows, onChange | | Select | input | value, options, onChange | | Card | display | padding, elevation, borderRadius | | List | display | items, renderItem, emptyText | | Table | display | data, columns, onRowClick |

API Reference

State Management

import { createStateStore, applyPatch } from '@allternit/ix';

const store = createStateStore({
  initial: { count: 0 },
  persist: true,
  scopeId: 'my-app',
});

// Subscribe to changes
const unsubscribe = store.subscribe('count', (value) => {
  console.log('Count:', value);
});

// Apply JSON Patch
const patch = [
  { op: 'replace', path: '/count', value: 5 },
];
applyPatchToStore(store, patch);

Policy Gates

import {
  createRateLimitGate,
  createActionAllowlistGate,
  createStateValidationGate,
  composePolicyGates,
} from '@allternit/ix';

const policies = composePolicyGates(
  createRateLimitGate({ maxActionsPerMinute: 60 }),
  createActionAllowlistGate(['submit', 'cancel']),
  createStateValidationGate({
    email: {
      type: 'string',
      required: true,
      validate: (v) => v.includes('@') || 'Invalid email',
    },
  })
);

LLM-to-IX Pipeline

import { llmToIX } from '@allternit/ix';

// From JSX-like string
const result = llmToIX.fromJSX(`
  <Card>
    <Heading level={2}>Sign Up</Heading>
    <Input $value={email} placeholder="Email" />
    <Button onClick="submit">Submit</Button>
  </Card>
`);

// Auto-detect format
const detected = llmToIX.convert(unknownInput);
console.log(detected.confidence); // 0.0 - 1.0

Implementation Status

Week 1 ✅

  • UI IR Schema (UIRoot, UIComponent, UIState, UIAction)
  • Component Catalog (15 built-ins, semver support)
  • State Store (scoped state, persistence, bindings)
  • JSON Patch Engine (RFC 6902, full implementation)
  • json-render Adapter (bidirectional conversion)

Weeks 2-3 ✅

  • React Renderer (complete with all built-ins)
  • IX Capsule Runtime (sandboxed execution)
  • Policy Gates (7 gate types + composition)
  • LLM-to-IX Pipeline (multi-format conversion)
  • Rust API Integration (Axum routes)
  • TypeScript SDK (API client + React hooks)

Option 4: Enhancements ✅

  • Vue Renderer (component generation)
  • Svelte Renderer (component compilation)
  • Yjs/CRDT Integration (real-time collaboration)
  • Visual Editor (fluent API for UI building)
  • Awareness API (cursor positions, selections)

License

MIT