@pixerate/editor 0.245.0 → 0.248.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation-editor/index.cjs +59 -59
- package/dist/animation-editor/index.js +3 -3
- package/dist/{brushstrokeRender-QA5WVIDT.cjs → brushstrokeRender-DTDPFBLC.cjs} +5 -5
- package/dist/{brushstrokeRender-4542T5HP.js → brushstrokeRender-QLCXROJK.js} +2 -2
- package/dist/canvas/index.cjs +8 -8
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-OSTKS3YN.js → chunk-5GLYUSNT.js} +1 -1
- package/dist/{chunk-4T47Z4J3.cjs → chunk-6G6ZDDDB.cjs} +400 -27
- package/dist/chunk-7T7JWTVE.cjs +192 -0
- package/dist/{chunk-SD23XMVJ.cjs → chunk-IBDU6EGZ.cjs} +35 -35
- package/dist/{chunk-IZL5V5RK.cjs → chunk-L6REDLNB.cjs} +2 -2
- package/dist/{chunk-L5PB7EG3.js → chunk-NZ3O3A5C.js} +1 -1
- package/dist/{chunk-4EQY4TZJ.js → chunk-Q2HA52V4.js} +1 -1
- package/dist/chunk-SC2RZ5EF.js +192 -0
- package/dist/{chunk-HZ547SGQ.cjs → chunk-TPWB4Y6L.cjs} +1 -1
- package/dist/{chunk-TBJEMELS.js → chunk-VNBUDVD4.js} +398 -25
- package/dist/{chunk-M6JORA5Z.cjs → chunk-WVS5KQDH.cjs} +442 -87
- package/dist/{chunk-5RFENYO5.js → chunk-XNRBMYNB.js} +1 -1
- package/dist/{chunk-BDIH4DYR.cjs → chunk-XWTRATIM.cjs} +23 -23
- package/dist/{chunk-7YQNKSQ7.js → chunk-ZFSLEOSQ.js} +357 -2
- package/dist/image-editor/effect-tools.d.cts +37 -4
- package/dist/image-editor/effect-tools.d.ts +37 -4
- package/dist/image-editor/index.cjs +1059 -1552
- package/dist/image-editor/index.d.cts +1 -1
- package/dist/image-editor/index.d.ts +1 -1
- package/dist/image-editor/index.js +275 -768
- package/dist/paint-editor/controller.d.cts +34 -1
- package/dist/paint-editor/controller.d.ts +34 -1
- package/dist/paint-editor/index.cjs +426 -257
- package/dist/paint-editor/index.js +184 -15
- package/dist/paint-editor/procedural.d.cts +82 -5
- package/dist/paint-editor/procedural.d.ts +82 -5
- package/dist/paint-editor/tools.d.cts +1 -1
- package/dist/paint-editor/tools.d.ts +1 -1
- package/dist/paint-editor/ui.d.cts +15 -2
- package/dist/paint-editor/ui.d.ts +15 -2
- package/dist/{image-editor/layers/effects-ui.d.cts → raster/effects/ui.d.cts} +32 -5
- package/dist/{image-editor/layers/effects-ui.d.ts → raster/effects/ui.d.ts} +32 -5
- package/dist/raster/index.cjs +13 -1
- package/dist/raster/index.d.cts +1 -0
- package/dist/raster/index.d.ts +1 -0
- package/dist/raster/index.js +12 -0
- package/dist/vector/index.cjs +962 -962
- package/dist/vector/index.js +4 -4
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +18 -27
- package/skills/pixerate-paint-editor/references/gradient-paint.md +23 -0
- package/skills/pixerate-paint-editor/references/layer-effects.md +28 -0
- package/skills/pixerate-paint-editor/references/light-paint.md +10 -2
- package/skills/pixerate-paint-editor/references/particle-brushes.md +66 -0
|
@@ -15,6 +15,8 @@ import { type MixerLoad } from '../paint/mixer.cjs';
|
|
|
15
15
|
import { type PaintSource } from '../paint/gradient-paint.cjs';
|
|
16
16
|
import { type BlendMode } from '../raster/blend.cjs';
|
|
17
17
|
import { type LayerLocks } from '../raster/layers.cjs';
|
|
18
|
+
import { type LayerEffect, type LayerEffectKind, type LayerEffects } from '../raster/effects/model.cjs';
|
|
19
|
+
import type { EffectPattern } from '../raster/effects/patterns.cjs';
|
|
18
20
|
import { TiledSurface, type RasterRect, type Tile } from '../raster/surface.cjs';
|
|
19
21
|
import { type PaintBrushInput, type BrushLibraryFile, type PaintBrush } from './brushes.cjs';
|
|
20
22
|
import { type PaintCanvas, type PaintDocumentState, type PaintLayer } from './document.cjs';
|
|
@@ -44,7 +46,6 @@ import type { EffectDescription, EffectProvider, EffectValue } from '../effects/
|
|
|
44
46
|
import { type PaintEffectPaint } from './effect-paint.cjs';
|
|
45
47
|
import { type PaintEffectPlace, type PaintEffectSource, type PaintPaperEffect, type PaperEffectBlend } from './effects.cjs';
|
|
46
48
|
import { type PaintLighting } from './thick.cjs';
|
|
47
|
-
/** A refusal with a message that says what is wrong and how to fix it. */
|
|
48
49
|
export declare class PaintEditorError extends Error {
|
|
49
50
|
constructor(message: string);
|
|
50
51
|
}
|
|
@@ -172,6 +173,8 @@ export interface PaintLayerInfo {
|
|
|
172
173
|
depth: number;
|
|
173
174
|
/** A live stroke layer (its pixels are drawn from its strokes, which stay editable): how many strokes it has. */
|
|
174
175
|
liveStrokes?: number;
|
|
176
|
+
/** How many live layer effects (glows, shadows, strokes…) it has, when any (`getLayerEffects`). */
|
|
177
|
+
effects?: number;
|
|
175
178
|
}
|
|
176
179
|
export interface PaintStrokeInit {
|
|
177
180
|
/** Default the active layer. */
|
|
@@ -453,6 +456,36 @@ export declare class PaintEditorController {
|
|
|
453
456
|
parentId?: string | null;
|
|
454
457
|
}): PaintLayerInfo;
|
|
455
458
|
updateLayer(id: string, update: LayerUpdate): PaintLayerInfo;
|
|
459
|
+
/** A layer's live effects (an empty, enabled list when it has none). */
|
|
460
|
+
getLayerEffects(id: string): LayerEffects;
|
|
461
|
+
/**
|
|
462
|
+
* Adds a live effect of `kind` (outer and inner glow, drop and inner shadow, stroke, bevel &
|
|
463
|
+
* emboss, satin, colour / gradient / pattern overlay) with Photoshop's defaults and `settings`
|
|
464
|
+
* applied, at `index` in the layer's list (default the end). The effect is drawn from the
|
|
465
|
+
* layer's pixels when it is composited, so it follows later painting. One undo step.
|
|
466
|
+
*/
|
|
467
|
+
addLayerEffect(id: string, kind: LayerEffectKind, settings?: Record<string, unknown>, index?: number): {
|
|
468
|
+
effect: LayerEffect;
|
|
469
|
+
effects: LayerEffects;
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* Changes one effect: only the given settings (nested objects replace whole; `null` removes an
|
|
473
|
+
* optional contour or texture). One undo step, or with `commitToHistory` false folded into the
|
|
474
|
+
* last change of this effect (a slider drag). Returns the layer's effects.
|
|
475
|
+
*/
|
|
476
|
+
updateLayerEffect(id: string, effectId: string, changes: Record<string, unknown>, commitToHistory?: boolean): LayerEffects;
|
|
477
|
+
/** Removes one effect (one undo step). Returns the layer's remaining effects. */
|
|
478
|
+
removeLayerEffect(id: string, effectId: string): LayerEffects;
|
|
479
|
+
/** Turns all of a layer's effects on or off and, when given, sets Scale Effects (0.01..10). One undo step. */
|
|
480
|
+
setLayerEffectsEnabled(id: string, enabled: boolean, scale?: number, commitToHistory?: boolean): LayerEffects;
|
|
481
|
+
/** Replaces a layer's effects, validated (`null` removes them). One undo step. Returns the effects. */
|
|
482
|
+
setLayerEffects(id: string, effects: LayerEffects | null, commitToHistory?: boolean): LayerEffects;
|
|
483
|
+
/** Document patterns for pattern effects besides the built-in ones: none (paint documents bring none). */
|
|
484
|
+
getDocumentPatterns(): EffectPattern[];
|
|
485
|
+
private effectsLayer;
|
|
486
|
+
private requireEffect;
|
|
487
|
+
/** Writes a layer's effects (dropped when empty, enabled and unscaled), as an undo step or folded into the last one. */
|
|
488
|
+
private writeLayerEffects;
|
|
456
489
|
removeLayer(id: string): {
|
|
457
490
|
removed: string;
|
|
458
491
|
activeLayerId: string | null;
|
|
@@ -15,6 +15,8 @@ import { type MixerLoad } from '../paint/mixer.js';
|
|
|
15
15
|
import { type PaintSource } from '../paint/gradient-paint.js';
|
|
16
16
|
import { type BlendMode } from '../raster/blend.js';
|
|
17
17
|
import { type LayerLocks } from '../raster/layers.js';
|
|
18
|
+
import { type LayerEffect, type LayerEffectKind, type LayerEffects } from '../raster/effects/model.js';
|
|
19
|
+
import type { EffectPattern } from '../raster/effects/patterns.js';
|
|
18
20
|
import { TiledSurface, type RasterRect, type Tile } from '../raster/surface.js';
|
|
19
21
|
import { type PaintBrushInput, type BrushLibraryFile, type PaintBrush } from './brushes.js';
|
|
20
22
|
import { type PaintCanvas, type PaintDocumentState, type PaintLayer } from './document.js';
|
|
@@ -44,7 +46,6 @@ import type { EffectDescription, EffectProvider, EffectValue } from '../effects/
|
|
|
44
46
|
import { type PaintEffectPaint } from './effect-paint.js';
|
|
45
47
|
import { type PaintEffectPlace, type PaintEffectSource, type PaintPaperEffect, type PaperEffectBlend } from './effects.js';
|
|
46
48
|
import { type PaintLighting } from './thick.js';
|
|
47
|
-
/** A refusal with a message that says what is wrong and how to fix it. */
|
|
48
49
|
export declare class PaintEditorError extends Error {
|
|
49
50
|
constructor(message: string);
|
|
50
51
|
}
|
|
@@ -172,6 +173,8 @@ export interface PaintLayerInfo {
|
|
|
172
173
|
depth: number;
|
|
173
174
|
/** A live stroke layer (its pixels are drawn from its strokes, which stay editable): how many strokes it has. */
|
|
174
175
|
liveStrokes?: number;
|
|
176
|
+
/** How many live layer effects (glows, shadows, strokes…) it has, when any (`getLayerEffects`). */
|
|
177
|
+
effects?: number;
|
|
175
178
|
}
|
|
176
179
|
export interface PaintStrokeInit {
|
|
177
180
|
/** Default the active layer. */
|
|
@@ -453,6 +456,36 @@ export declare class PaintEditorController {
|
|
|
453
456
|
parentId?: string | null;
|
|
454
457
|
}): PaintLayerInfo;
|
|
455
458
|
updateLayer(id: string, update: LayerUpdate): PaintLayerInfo;
|
|
459
|
+
/** A layer's live effects (an empty, enabled list when it has none). */
|
|
460
|
+
getLayerEffects(id: string): LayerEffects;
|
|
461
|
+
/**
|
|
462
|
+
* Adds a live effect of `kind` (outer and inner glow, drop and inner shadow, stroke, bevel &
|
|
463
|
+
* emboss, satin, colour / gradient / pattern overlay) with Photoshop's defaults and `settings`
|
|
464
|
+
* applied, at `index` in the layer's list (default the end). The effect is drawn from the
|
|
465
|
+
* layer's pixels when it is composited, so it follows later painting. One undo step.
|
|
466
|
+
*/
|
|
467
|
+
addLayerEffect(id: string, kind: LayerEffectKind, settings?: Record<string, unknown>, index?: number): {
|
|
468
|
+
effect: LayerEffect;
|
|
469
|
+
effects: LayerEffects;
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* Changes one effect: only the given settings (nested objects replace whole; `null` removes an
|
|
473
|
+
* optional contour or texture). One undo step, or with `commitToHistory` false folded into the
|
|
474
|
+
* last change of this effect (a slider drag). Returns the layer's effects.
|
|
475
|
+
*/
|
|
476
|
+
updateLayerEffect(id: string, effectId: string, changes: Record<string, unknown>, commitToHistory?: boolean): LayerEffects;
|
|
477
|
+
/** Removes one effect (one undo step). Returns the layer's remaining effects. */
|
|
478
|
+
removeLayerEffect(id: string, effectId: string): LayerEffects;
|
|
479
|
+
/** Turns all of a layer's effects on or off and, when given, sets Scale Effects (0.01..10). One undo step. */
|
|
480
|
+
setLayerEffectsEnabled(id: string, enabled: boolean, scale?: number, commitToHistory?: boolean): LayerEffects;
|
|
481
|
+
/** Replaces a layer's effects, validated (`null` removes them). One undo step. Returns the effects. */
|
|
482
|
+
setLayerEffects(id: string, effects: LayerEffects | null, commitToHistory?: boolean): LayerEffects;
|
|
483
|
+
/** Document patterns for pattern effects besides the built-in ones: none (paint documents bring none). */
|
|
484
|
+
getDocumentPatterns(): EffectPattern[];
|
|
485
|
+
private effectsLayer;
|
|
486
|
+
private requireEffect;
|
|
487
|
+
/** Writes a layer's effects (dropped when empty, enabled and unscaled), as an undo step or folded into the last one. */
|
|
488
|
+
private writeLayerEffects;
|
|
456
489
|
removeLayer(id: string): {
|
|
457
490
|
removed: string;
|
|
458
491
|
activeLayerId: string | null;
|