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

@vibephoto/editor-core

v0.1.1

Published

Headless photo editor core with engine-based architecture and canvas renderer.

Readme

VibePhoto Editor Core – Developer Guide

Framework-agnostic photo editing core with non-destructive state, preview pipeline, pluggable renderers (Canvas/WebGL), and robust history management.

Installation

npm install
npm run build

Quick Start

import { PhotoEditor } from "@vibephoto/editor-core";

const canvas = document.getElementById("editorCanvas");
const editor = new PhotoEditor(canvas, {
  rendererKind: "webgl", // "webgl" or "canvas"
  config: {
     // Optional: Override defaults
     history: { maxEntries: 100 }
  }
});

// Load an image
await editor.loadSource({ kind: "url", url: "/photos/example.jpg" });

// Apply an adjustment
await editor.dispatch({ type: "setAdjustment", path: "exposureEV", value: 0.5 });

Configuration

The editor defaults are defined in src/vpconfig.json. You can override these by passing a config object to the PhotoEditor constructor.

Configurable Options:

  • history.maxEntries: Default 50. Maximum number of undo/redo steps.
  • thumbnail.triggerSize: Default 1000. Image dimension threshold to generate thumbnails.
  • thumbnail.maxDim: Default 500. Maximum thumbnail dimension.
  • export.defaultQuality: Default 0.92. Default JPEG/WebP quality.
  • export.profileLutSize: Default 32. Grid size (N) for generated .cube 3D LUTs (NxNxN).
  • renderer.lutCacheMax: Default 5. Max active LUT textures cached in WebGL.

Core Concepts

  • PhotoEditor: High-level facade wiring EditorCore to a renderer.
  • EditorCore: The main editor core.
  • EditorRenderer: The renderer (Canvas2D or WebGL).

Viewport

Viewport Viewport is a virtual camera that projects the image to the render target. You can control the viewport using the viewport commands. You can zoom in/out, pan, and rotate the viewport. Viewport state is stored in the viewport property of the EditorState. Framebox is a virtual frame that projects the image to the render target. Framebox state is stored in the framebox property of the ViewportState. Viewport represented by the viewport property of the EditorState.

  • zoom: Normalized zoom factor for rendering the UI view (1 = default scale).
  • centerX: Normalized center point (0,0 is center).
  • centerY: Normalized center point (0,0 is center).
  • framebox: this is the normalized frame of the image in the viewport. (0,0 is top-left, 1,1 is bottom-right).

Document

  • DocumentState: The source of truth for image state (adjustments, geometry, etc.).
  • EffectiveState: The resolved state used for rendering (committed + draft).
  • History: Use undo/redo commands. History can be saved/restored via VPI files.

API Reference

Initialization

const editor = new PhotoEditor(
  canvas: HTMLCanvasElement,
  initialDocument?: Partial<DocumentState>,
  options?: PhotoEditorOptions,
  lutManifest?: LutManifest
);

Key Commands (editor.dispatch)

  • Asset Loading:
    • { type: "loadSource", source: ImageSource }
    • { type: "unloadSource" }
  • Adjustments:
    • { type: "setAdjustment", path: "exposureEV", value: 0.5 }
    • { type: "setAdjustment", path: "colorChannels.red.hue", value: 20 }
  • Geometry:
    • { type: "geometry:set", patch: { rotation: 90 } }
    • { type: "geometry:setCrop", rect: { x, y, width, height } }
  • LUTs:
    • { type: "lut:apply", lutId: "..." }
  • History:
    • { type: "undo" }
    • { type: "redo" }

Exporting & Saving

  • Save Project (VPI):
    • { type: "export:document", path: "file.vpi", includeHistory: true }
    • Saves state, assets, and optionally history to a JSON file.
  • Export Image:
    • { type: "export:image", path: "image.jpg", quality: 0.9 }
  • Export Profile (LUT):
    • { type: "export:lut", path: "my-style.cube" }
    • Bakes current adjustments into a standardized 3D LUT file.

License

This project is licensed under a Source Available license. See LICENSE.md for terms regarding use and modification.