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

@zephytiju/prism-composition-model

v1.1.0

Published

Runtime-neutral Prism Operating System and UI-page composition types, canonicalization, validation, migrations, and fixtures.

Readme

PrismCompositionModel

@zephytiju/prism-composition-model is the runtime-neutral source of truth for Prism Operating System and UI-page documents. It publishes pure TypeScript types, deterministic canonical JSON and SHA-256 digests, validators, layout-variant materialization, versioned migrations, and conformance fixtures.

The package contains no transport, persistence, foundation client, UI state, service wire model, or runtime variant resolver.

Contract

  • Operating Systems pin ordered immutable UI-page revisions.
  • UI-page revisions pin exact layout-template releases and exact Blueprint component versions.
  • layoutConfig is the runtime authority for an instance.
  • appliedLayoutVariant is optional authoring provenance and is retained only while its exact component release, binding fingerprint, key, and digest match the materialized layout.
  • Manual edits and component-version changes clear preset provenance and therefore represent Custom without changing component configuration, bindings, placement, peers, or the page template.
import { applyLayoutVariant, canonicalDigest } from "@zephytiju/prism-composition-model";

const layoutConfigDigest = await canonicalDigest(layoutConfig);
const updated = await applyLayoutVariant(instance, {
  componentRelease: instance.componentRelease,
  bindingFingerprint: instance.bindingFingerprint,
  key: "dense",
  layoutConfig,
  layoutConfigDigest,
});

Run npm run verify to build, execute conformance vectors, and verify the publishable package contents.

Selected split allocation (1.1)

LayoutNode.splitAllocation is optional page state for an exact template-declared resizable split: { version: 1, shares: [{ childId, units }] }. Every immediate child occurs once, in child order, with positive integer units totaling 1,000,000. Omission preserves legacy documents, template releases and canonical digests.

canonicalSplitAllocation validates unknown JSON; splitAllocationFromWeights uses largest remainder with child-order ties and rejects zero-unit results. canonicalizeSplitAllocations and validateUIPageRevision(page, templateDefinition) require the exact template policy for any explicit allocation. The model does not resolve or publish templates. Services remain responsible for exact-reference, whole-page, authorization and concurrency checks.

editSplitLayout(tree, splitId, templateDefinition, edit, innerExtentPx) performs atomic resize, keyboard resize, add, empty-child removal and reorder operations. The available extent excludes external panels, gaps and dividers. Keep the old tree for undo; persist only the resulting canonical page tree. resolveSplitPixels applies the template axis and size bounds without changing saved shares and returns fallback when the viewport cannot fit them. Tabs, collapse and responsive adapters retain the saved allocation and resolve it again on restoration.

The ./fixtures subpath includes splitAllocationVectors for service and Build conformance. New writes require compatible Composition, SDK, Build Service and Builder readers; old strict readers must reject unsupported fields without stripping them.