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

@iriograph/core

v0.12.3

Published

Framework-independent semantic graph projection and validation for Iriograph.

Readme

@iriograph/core

license

Framework-independent ESM core for Iriograph portable documents, RDF/RDFS projection catalogs, semantic and presentation validation, deterministic Turtle serialization, reconciliation, asset-policy contracts, and adapter-based layout.

Install

npm install --save-exact @iriograph/core

Build a view

import {
  buildIriographView,
  createProjectionRuntimeContext,
  createStandardLayoutRegistry,
  standardRdfRdfsCatalog,
  validateIriographDocumentV1,
} from "@iriograph/core";

const runtimeContext = createProjectionRuntimeContext({
  catalogs: [standardRdfRdfsCatalog],
  layouts: createStandardLayoutRegistry(),
});

const validation = validateIriographDocumentV1(document);
if (!validation.valid) throw new Error("Invalid Iriograph document");

const result = await buildIriographView(document, {
  viewId: document.views[0].viewId,
  runtimeContext,
});

Transaction boundaries

Semantic changes use preview/prepare/apply APIs and validate the complete candidate across every named view. Structured human commands and LLM source use deterministic dataset serialization; a valid direct human Turtle commit preserves its input bytes.

Presentation changes use applyViewCommand and a closed sparse overlay. Geometry, routing, templates, icons, and safe style overrides never modify Turtle or trigger global layout.

Key APIs include:

  • previewAuthoringCommands / applyAuthoringPreview
  • previewStructuredAuthoringRequest
  • applyAuthoringSource
  • previewPortableDocumentReplace / applyPortableDocumentReplace
  • previewDocumentRebase / applyDocumentRebasePreview
  • applyViewCommand
  • buildIriographView
  • validateIriographDocumentV1

Every preview is revision- and context-bound. A stale or modified candidate fails closed.

Authoring context

Ordinary authoring uses a host-resolved ResolvedAuthoringContext. UI selects resources by viewId + elementId, node roles by opaque roleId, and predicates by opaque predicateId. Core resolves them back to exact IRIs through Scene provenance and profile metadata.

Creation, multi-target direct relations, membership, final Seq/Alt order, inline new members, type changes, localized text, statement comments, and deletion compile to atomic authoring command sets.

Statement-specific comments use standard RDF reification through set-statement-comments; they remain distinct from predicate descriptions and view captions.

Layout and groups

Core includes a deterministic lightweight layout and an asynchronous adapter registry. Automatic layout moves generated placement only and preserves user geometry.

Bag, classification region, Seq, and Alt project through common group-frame contracts. Sequence badges and alternative guides are display-derived data with exact ordinal provenance; they are not asserted predicate edges.

Automatic edge routing prefers a safe straight route, one-bend orthogonal route, then a bounded cubic Bezier. Derived choices remain transient until a user explicitly edits routing.

Assets and icons

packageDefaultIcons exposes a compact catalog of bundled Lucide SVGs with stable refs such as urn:iriograph:icon:lucide:<name>:1, canonical English labels, and Japanese labels. packageDefaultIconLabel(icon, locales) selects presentation text without changing the ref. The same SVGs are exported through @iriograph/core/icons/<name>.svg; provenance is in @iriograph/core/THIRD_PARTY_NOTICES.md.

withPackageDefaultIconAccess(assetAccess) resolves bundled refs without weakening host policy for workspace or external assets. Asset leases are checked for MIME/signature, encoded size, decoded dimensions/pixels, concurrency, abort, and release. Resolved URLs and bytes never enter portable documents.

Validation

Hosts may inject an engine-independent ResolvedSemanticValidationContext. Direct Turtle, structured datasets, and LLM source use the same port, stable diagnostics, warning binding, abort behavior, and cache identity.

Documentation

License

MIT. Third-party components retain the licenses listed in THIRD_PARTY_NOTICES.md.