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

@genart-dev/plugin-compositing

v0.2.0

Published

Compositing design layer plugin for genart.dev

Readme

@genart-dev/plugin-compositing

Compositing design layer plugin for genart.dev — solid fill, gradient fill (linear, radial, angular, diamond), image, and group layers with masking support. Includes MCP tools for AI-agent control.

Part of genart.dev — a generative art platform with an MCP server, desktop app, and IDE extensions.

Examples

Gradient types

Gradient variations

Source files: gradient-types.genart · gradient-variations.genart

Install

npm install @genart-dev/plugin-compositing

Usage

import compositingPlugin from "@genart-dev/plugin-compositing";
import { createDefaultRegistry } from "@genart-dev/core";

const registry = createDefaultRegistry();
registry.registerPlugin(compositingPlugin);

// Or access individual exports
import {
  solidLayerType,
  gradientLayerType,
  imageLayerType,
  groupLayerType,
  compositingMcpTools,
} from "@genart-dev/plugin-compositing";

Layer Types

Solid Fill (composite:solid)

Fills the layer bounds with a single color.

| Property | Type | Default | Description | |----------|------|---------|-------------| | color | color | "#000000" | Fill color |

Gradient Fill (composite:gradient)

Fills with a gradient. Linear and radial use Canvas 2D gradient API; angular and diamond render per-pixel.

| Property | Type | Default | Description | |----------|------|---------|-------------| | gradientType | select | "linear" | linear, radial, angular, diamond | | stops | string (JSON) | 2-stop black→white | GradientStop[] (min 2) | | angle | number | 0 | Angle in degrees (0–360) | | centerX | number | 0.5 | Center X (0–1) | | centerY | number | 0.5 | Center Y (0–1) | | scale | number | 1.0 | Scale (0.1–5) |

Image (composite:image)

Renders a sketch asset with fit and anchor control.

| Property | Type | Default | Description | |----------|------|---------|-------------| | assetId | string | "" | Sketch asset reference | | fit | select | "cover" | cover, contain, fill, none | | anchorX | number | 0.5 | Anchor X (0–1) | | anchorY | number | 0.5 | Anchor Y (0–1) | | flipX | boolean | false | Flip horizontally | | flipY | boolean | false | Flip vertically |

Group (composite:group)

Groups child layers with optional isolation, clipping, and masking.

| Property | Type | Default | Description | |----------|------|---------|-------------| | isolate | boolean | true | Render children into offscreen canvas | | clip | boolean | false | Clip children to group bounds | | maskLayerId | string | "" | Layer ID to use as mask |

MCP Tools (6)

| Tool | Description | |------|-------------| | add_solid | Add a solid color fill layer | | add_gradient | Add a gradient fill layer | | import_image | Import a base64-encoded image as a sketch asset and layer | | create_group | Create a group, optionally moving existing layers into it | | set_mask | Apply a mask (alpha, luminosity, or inverted-alpha mode) | | list_assets | List all image assets in the current sketch |

Related Packages

| Package | Purpose | |---------|---------| | @genart-dev/core | Plugin host, layer system (dependency) | | @genart-dev/mcp-server | MCP server that surfaces plugin tools to AI agents |

Support

Questions, bugs, or feedback — [email protected] or open an issue.

License

MIT