npm.io
0.0.22 • Published 8h ago

@bubblydoo/uxp-toolkit

Licence
MIT
Version
0.0.22
Deps
3
Size
158 kB
Vulns
0
Weekly
0
Stars
19

@bubblydoo/uxp-toolkit

NPM Version

Typed helpers for Adobe Photoshop UXP plugins: safer batchPlay, command builders, and utilities around layer/document workflows.

Install

pnpm add @bubblydoo/uxp-toolkit

Optional type packages:

pnpm add -D @adobe-uxp-types/uxp @adobe-uxp-types/photoshop

Usage

import { createCommand, batchPlayCommand } from '@bubblydoo/uxp-toolkit';
import { z } from 'zod';

const result = await batchPlayCommand(createCommand({
  modifying: false,
  descriptor: {
    _obj: 'get',
    _target: [{ _ref: 'layer', _id: 123 }],
  },
  schema: z.object({ name: z.string() }),
}));

Unexpected but useful details

  • The package is built around schema-validated command output, so batchPlay results become explicit types instead of ad-hoc any.
  • @bubblydoo/uxp-toolkit/commands exposes prebuilt command descriptors for common Photoshop actions.
  • Utilities such as layer-tree conversion and sourcemap parsing target practical pain points in large UXP plugins.