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

@avant-garde/design-surfaces

v0.1.0

Published

Design Surface layer (spec 23): Penpot adapter over the safe RPC set, file-first compose lane via @penpot/library, server-side export, tenant provisioning, and the canary conformance suite

Downloads

23

Readme

@avant-garde/design-surfaces

The Design Surface layer (spec 23): the platform's domain-agnostic wrapper around managed Penpot. Creative capability packs (spec 24 social is the first) consume surfaces — brand-templated design documents with lifecycle, provenance, and an export contract — and never talk to Penpot directly.

The two lanes (spec 23 §4)

  • Lane 1 — COMPOSE (headless, default): composeSurfaceFile(spec) builds a .penpot document in memory via @penpot/library; createSurface(...) imports it into the tenant's team and returns everything the platform index row needs. Deterministic, no browser, no MCP.
  • Lane 2 — LIVE (human present): the managed MCP connects the agent to an open canvas session. Not in this package yet (DS5).

Quick start

import { DesignSurfaceAdapter, createSurface, exportSurface } from "@avant-garde/design-surfaces";

const adapter = new DesignSurfaceAdapter({
  baseUrl: process.env.PENPOT_URL!,
  accessToken: process.env.PENPOT_ACCESS_TOKEN!,          // RPC lane
  serviceAccount: {                                        // export lane (session auth)
    email: process.env.PENPOT_SERVICE_EMAIL!,
    password: process.env.PENPOT_SERVICE_PASSWORD!,
  },
});

const team = await adapter.provisionTenantTeam("arthaus");
const project = await adapter.ensureProject(team.id, "Design Surfaces");
const { surface } = await createSurface(adapter, { /* kind, boundTo, spec… */ });
const png = await exportSurface(adapter, { fileId: surface.penpot.fileId, pageId: surface.penpot.pageId });

scripts/demo-arthaus.ts runs the full chain on the real Arthaus DESIGN.md: DTCG tokens (via @avant-garde/brand-md) → composed IG post → editable Penpot file → on-brand PNG.

The canary suite (spec 23 §8 — read before touching the adapter)

Penpot's RPC API is officially internal. Every internal behavior this package depends on is exercised by test/canary.test.ts, which runs against a LIVE instance and gates every Penpot version bump (we are self-supported by decision D4). Never add an adapter call without adding it to the canary suite. Hard-won protocol facts (SSE result streams, transit uuid results, kebab-case multipart fields, the /api/export transit+session protocol, text content-tree synthesis, fillOpacity) are documented where they're handled and in docs/plans/design-surfaces/REVISIT.md.

PENPOT_CANARY=1 PENPOT_URL=… PENPOT_ACCESS_TOKEN=… \
PENPOT_SERVICE_EMAIL=… PENPOT_SERVICE_PASSWORD=… pnpm test:canary