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

c2pa-react-diacc-component

v0.1.9

Published

A React plugin for c2pa-react-component that renders DIACC PCTF conformance assertion data.

Downloads

20

Readme

c2pa-react-diacc-component

React plugin for c2pa-react-component that displays DIACC PCTF conformance data from a C2PA manifest.

The component is intentionally DIACC-specific. It reads only the diacc.pctf.conformance assertion.

What It Displays

The plugin looks for this assertion on the active C2PA manifest:

{
  label: "diacc.pctf.conformance",
  data: {
    name: title,
    description,
    conformance: conformance ?? []
  }
}

It also uses standard manifest fields for the surrounding card:

| Field | Purpose | |---|---| | manifest.title | Fallback title when the DIACC assertion has no name | | manifest.claimGenerator | Displayed organization/tool name | | manifest.claimGeneratorInfo[0].name | Fallback claim generator | | manifest.thumbnail | Optional thumbnail image |

Installation

npm install c2pa-react-diacc-component c2pa-react-component

Peer dependencies:

| Package | Version | |---|---| | react | ^18.0.0 \|\| ^19.0.0 | | react-dom | ^18.0.0 \|\| ^19.0.0 |

Styles

Import the stylesheet once in your application:

import "c2pa-react-diacc-component/style.css";

For Next.js App Router, import it from app/layout.tsx or another global stylesheet entry point.

Usage With c2pa-react-component

import { C2paManifest } from "c2pa-react-component";
import { DIACCManifest } from "c2pa-react-diacc-component";
import type { VerificationOutcome } from "c2pa-react-component-types";
import "c2pa-react-diacc-component/style.css";

export function MediaCard({ outcome }: { outcome: VerificationOutcome }) {
  return (
    <C2paManifest
      manifest={outcome}
      plugin={[DIACCManifest]}
    />
  );
}

Direct Component Usage

You can also render the plugin component directly when you already have a VerificationOutcome:

import { DIACCManifest } from "c2pa-react-diacc-component";
import type { VerificationOutcome } from "c2pa-react-component-types";

export function DiaccPanel({ outcome }: { outcome: VerificationOutcome }) {
  return <DIACCManifest manifest={outcome} level={1} />;
}

Props

DIACCManifest uses the plugin prop shape from c2pa-react-component-types.

| Prop | Type | Default | Description | |---|---|---|---| | manifest | VerificationOutcome | required | C2PA verification result containing one or more manifests | | level | 1 \| 2 \| 3 | 1 | Initial display level | | className | string | - | Applied only to the fallback message when no active manifest exists |

Display Levels

| Level | Display | |---|---| | 1 | Compact card with DIACC title/name, claim generator, and thumbnail or initials | | 2 | Adds description and conformance entries | | 3 | Adds assertion label, structured assertion fields, and expanded conformance details |

The "More Info" button advances from level 1 to 2 to 3. The "Small View" button at level 3 returns to level 1.

Example Assertion

{
  "diacc.pctf.conformance": {
    "name": "DIACC PCTF Conformance Example",
    "description": "Example conformance data for a DIACC Trust Registry manifest.",
    "conformance": [
      "Verified Person",
      "Verified Organization",
      {
        "profile": "PCTF",
        "component": "Digital Trust and Identity",
        "status": "conformant"
      }
    ]
  }
}

See examples/diacc-pctf-example.json for a complete sample verification outcome.

Local Development

Install dependencies:

npm install

Run the dev playground:

npm run dev

Build the library:

npm run build

Run checks:

npm run lint
npm test

Package Scripts

| Script | Description | |---|---| | npm run dev | Starts the Vite dev playground | | npm run build | Type-checks and builds the library into dist | | npm run lint | Runs ESLint over src | | npm test | Runs Vitest | | npm run dev:lib | Builds the library in watch mode | | npm run preview | Previews the Vite app build |

Published Files

The package exports:

| Export | Path | |---|---| | JavaScript module | dist/c2pa-react-diacc-component.js | | CommonJS/UMD bundle | dist/c2pa-react-diacc-component.umd.cjs | | Types | dist/index.d.ts | | Stylesheet | dist/c2pa-react-diacc-component.css |

License

MIT