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

@inlayphp/core

v0.3.14

Published

Framework-neutral contracts and extension registries for Inlay renderers.

Readme

Inlay Core for JavaScript

npm License

Framework-neutral contracts and extension registries for Inlay renderers

@inlayphp/core is the framework-neutral foundation for Inlay's React, Vue, and community renderers. It contains no DOM, React, Vue, or Inertia dependency.

Install

pnpm add @inlayphp/core

Use it directly when implementing a renderer or extension. Official React and Vue packages already depend on the compatible Core version.

Contract compatibility

import { assertContractCompatible } from '@inlayphp/core'

assertContractCompatible(resource.contract, {
  subject: 'tables',
  versions: [1],
})

Contract identifiers use vendor.subject.vN, such as inlay.tables.v1. Invalid vendors, subjects, and versions throw ContractCompatibilityError with a stable code.

Renderer registries

Adapters decide their renderer value type. The kernel only manages names, ownership, and collisions.

import { createRendererRegistries } from '@inlayphp/core'
import type { ComponentType } from 'react'

type ReactRenderers = {
  schema: ComponentType<any>
  layout: ComponentType<any>
  field: ComponentType<any>
  entry: ComponentType<any>
  column: ComponentType<any>
  filter: ComponentType<any>
  action: ComponentType<any>
}

const renderers = createRendererRegistries<ReactRenderers>()

const registration = renderers.column.register('audio-column', AudioColumn, {
  owner: 'acme/inlay-audio-react',
})

renderers.column.require('audio-column')
registration.dispose()

The categories are schema, layout, field, entry, column, filter, and action. Duplicate registration never silently overwrites an existing renderer. The opaque registration token—not the public owner name—is required for explicit replacement or removal:

const replacement = renderers.column.replace('audio-column', BetterAudioColumn, {
  owner: 'acme/inlay-audio-react-v2',
  token: registration.token,
})

// Safe during HMR: an old handle cannot remove its replacement.
registration.dispose() // false
replacement.dispose() // true

Asset manifests

import { defineAssetManifest } from '@inlayphp/core'

export const assets = defineAssetManifest({
  version: 1,
  owner: 'acme/inlay-audio',
  assets: [
    { id: 'acme:audio-style', kind: 'style', source: '/vendor/acme/audio.css' },
    { id: 'acme:audio-player', kind: 'script', source: '/vendor/acme/audio.js', lazy: true },
  ],
})

The normalized wire fields are id, source, kind, lazy, and attributes; omitted lazy values become false. Optional integrity, crossOrigin, and media metadata is preserved. mergeAssetManifests() combines manifests and rejects asset ID collisions. The browser or panel adapter remains responsible for loading the declared assets.

Safe navigation URLs

Use isSafeUrl(value) before placing independently constructed resource URLs in navigation attributes. It permits relative URLs and the http, https, mailto, and tel protocols; executable or opaque protocols such as javascript and data fail closed.

Development checks

The package ships ESM output and TypeScript declarations. From this monorepo, run its Vitest suite, strict typecheck, and build through the root workspace commands. Keep renderer-specific imports out of Core so the same registry and contract helpers remain usable by React, Vue, and community adapters.