@pixerate/editor 0.103.0 → 0.105.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/THIRD_PARTY_NOTICES.md +2 -0
- package/dist/{chunk-NQLQ2JOI.js → chunk-4X5MIVCE.js} +1155 -295
- package/dist/chunk-4X5MIVCE.js.map +1 -0
- package/dist/{chunk-VSMM7B3P.cjs → chunk-ZID226ZG.cjs} +1169 -309
- package/dist/chunk-ZID226ZG.cjs.map +1 -0
- package/dist/{compositor-CTMU-B1t.d.cts → compositor-Bc3PNP3C.d.cts} +1 -1
- package/dist/{compositor-B1ZrKR89.d.ts → compositor-BsYYllvR.d.ts} +1 -1
- package/dist/{export-X9rY79p0.d.cts → export-_m3Es4ru.d.cts} +19 -4
- package/dist/{export-BLpMyCYg.d.ts → export-iMrop3Jm.d.ts} +19 -4
- package/dist/image-editor/index.cjs +523 -539
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +16 -8
- package/dist/image-editor/index.d.ts +16 -8
- package/dist/image-editor/index.js +37 -53
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{mixer-DGcH6HLu.d.cts → mixer-C1M1Nua_.d.cts} +1 -1
- package/dist/{mixer-DG_9Yu2W.d.ts → mixer-Cu5a9Bzd.d.ts} +1 -1
- package/dist/paint/index.d.cts +2 -2
- package/dist/paint/index.d.ts +2 -2
- package/dist/paint-editor/index.cjs +1531 -128
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +461 -14
- package/dist/paint-editor/index.d.ts +461 -14
- package/dist/paint-editor/index.js +1479 -76
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/raster/index.d.cts +4 -4
- package/dist/raster/index.d.ts +4 -4
- package/dist/{surface-AfHCH7BR.d.cts → surface-BBJN9wxg.d.cts} +1 -1
- package/dist/{surface-AfHCH7BR.d.ts → surface-BBJN9wxg.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +14 -5
- package/skills/pixerate-paint-editor/SKILL.md +49 -8
- package/dist/chunk-NQLQ2JOI.js.map +0 -1
- package/dist/chunk-VSMM7B3P.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BlendMode, R as RasterRect, a as TiledSurface, M as MaskSurface, P as PixelSurface, T as TileKey } from './surface-
|
|
1
|
+
import { B as BlendMode, R as RasterRect, a as TiledSurface, M as MaskSurface, P as PixelSurface, T as TileKey } from './surface-BBJN9wxg.cjs';
|
|
2
2
|
import { H as Homography, V as Vec2 } from './types-CwMPoRMU.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BlendMode, R as RasterRect, a as TiledSurface, M as MaskSurface, P as PixelSurface, T as TileKey } from './surface-
|
|
1
|
+
import { B as BlendMode, R as RasterRect, a as TiledSurface, M as MaskSurface, P as PixelSurface, T as TileKey } from './surface-BBJN9wxg.js';
|
|
2
2
|
import { H as Homography, V as Vec2 } from './types-CwMPoRMU.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { e as RasterLayerBase, f as RasterMask$1, b as RasterPixelLayer, G as GroupBlendMode, g as GlobalLight, E as EffectPattern, I as Interpolation, h as LayerLocation$1, L as LayerLocks, i as LayerEffect, j as LayerEffects, d as RasterSources, c as RasterCompositor, k as CompositorOptions, l as LayerEffectKind } from './compositor-
|
|
2
|
-
import { P as PixelSurface, B as BlendMode, a as TiledSurface } from './surface-
|
|
1
|
+
import { e as RasterLayerBase, f as RasterMask$1, b as RasterPixelLayer, G as GroupBlendMode, g as GlobalLight, E as EffectPattern, I as Interpolation, h as LayerLocation$1, L as LayerLocks, i as LayerEffect, j as LayerEffects, d as RasterSources, c as RasterCompositor, k as CompositorOptions, l as LayerEffectKind } from './compositor-Bc3PNP3C.cjs';
|
|
2
|
+
import { P as PixelSurface, B as BlendMode, a as TiledSurface } from './surface-BBJN9wxg.cjs';
|
|
3
3
|
import { Q as Quad, a as WarpMesh, V as Vec2, A as AffineMatrix, H as Homography } from './types-CwMPoRMU.cjs';
|
|
4
|
-
import { B as BrushSettings, M as MixerSettings, a as MixerLoad, c as StrokeCoverage, d as MixerTarget, e as MixerStroke, f as StrokeApply, S as StrokePoint } from './mixer-
|
|
4
|
+
import { B as BrushSettings, M as MixerSettings, a as MixerLoad, c as StrokeCoverage, d as MixerTarget, e as MixerStroke, f as StrokeApply, S as StrokePoint } from './mixer-C1M1Nua_.cjs';
|
|
5
5
|
import { W as WarpPreset } from './warp-D5jz_tN7.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1365,7 +1365,7 @@ declare const PSD_BLEND_KEYS: Record<string, LayerBlendMode>;
|
|
|
1365
1365
|
interface PsdLayerSummary {
|
|
1366
1366
|
name: string;
|
|
1367
1367
|
/** Our layer type, or `null` when the layer was dropped. */
|
|
1368
|
-
type: 'pixel' | 'adjustment' | 'group' | null;
|
|
1368
|
+
type: 'pixel' | 'adjustment' | 'group' | 'smart' | null;
|
|
1369
1369
|
/** `mapped`: held exactly; `approximated`: imported with losses; `dropped`: left out. */
|
|
1370
1370
|
status: 'mapped' | 'approximated' | 'dropped';
|
|
1371
1371
|
/** What Photoshop calls it (`pixel`, `type`, `smart-object`, `fill`, `shape`, `Levels` …). */
|
|
@@ -1403,6 +1403,8 @@ interface PsdImportOptions {
|
|
|
1403
1403
|
newId?: (hint: string) => string;
|
|
1404
1404
|
/** Skip decoding pixels (inspection only). */
|
|
1405
1405
|
skipPixels?: boolean;
|
|
1406
|
+
/** @internal How deep inside smart object contents this file is (nested PSB files). */
|
|
1407
|
+
depth?: number;
|
|
1406
1408
|
}
|
|
1407
1409
|
/** Maps a parsed PSD to our layers. */
|
|
1408
1410
|
declare function psdToLayers(file: PsdFile, options?: PsdImportOptions): PsdImportResult;
|
|
@@ -2020,6 +2022,11 @@ declare class ImageEditorController {
|
|
|
2020
2022
|
* included), or `null` for an empty or non-pixel layer.
|
|
2021
2023
|
*/
|
|
2022
2024
|
getLayerBounds(id: string): CropBox | null;
|
|
2025
|
+
/**
|
|
2026
|
+
* A tight base64 PNG data URL of a pixel or smart layer's content, or `null` for an unknown or
|
|
2027
|
+
* non-pixel layer, or when the layer is completely transparent.
|
|
2028
|
+
*/
|
|
2029
|
+
getLayerDataURL(id: string): string | null;
|
|
2023
2030
|
/**
|
|
2024
2031
|
* Composites the layer stack in document space without a canvas (annotation layers need one
|
|
2025
2032
|
* and are left out): `rect` (default: the canvas) as RGBA, straight alpha. Crop, rotation and
|
|
@@ -2364,6 +2371,14 @@ declare class ImageEditorController {
|
|
|
2364
2371
|
maxSide?: number;
|
|
2365
2372
|
mask?: boolean;
|
|
2366
2373
|
}): PixelBuffer | null;
|
|
2374
|
+
/**
|
|
2375
|
+
* A small PNG data URL preview of a pixel or smart layer over the canvas (or of its mask with `mask: true`),
|
|
2376
|
+
* longest side `maxSide` px; `null` for layers without pixels.
|
|
2377
|
+
*/
|
|
2378
|
+
getLayerThumbnailDataURL(id: string, options?: {
|
|
2379
|
+
maxSide?: number;
|
|
2380
|
+
mask?: boolean;
|
|
2381
|
+
}): string | null;
|
|
2367
2382
|
/** Brush settings, colours and tool options of the paint tools (view state, no undo). */
|
|
2368
2383
|
setPaintOptions(options: Partial<Omit<PaintOptions, 'brush' | 'mixer' | 'mixerLoad'>> & {
|
|
2369
2384
|
brush?: Partial<BrushSettings>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { e as RasterLayerBase, f as RasterMask$1, b as RasterPixelLayer, G as GroupBlendMode, g as GlobalLight, E as EffectPattern, I as Interpolation, h as LayerLocation$1, L as LayerLocks, i as LayerEffect, j as LayerEffects, d as RasterSources, c as RasterCompositor, k as CompositorOptions, l as LayerEffectKind } from './compositor-
|
|
2
|
-
import { P as PixelSurface, B as BlendMode, a as TiledSurface } from './surface-
|
|
1
|
+
import { e as RasterLayerBase, f as RasterMask$1, b as RasterPixelLayer, G as GroupBlendMode, g as GlobalLight, E as EffectPattern, I as Interpolation, h as LayerLocation$1, L as LayerLocks, i as LayerEffect, j as LayerEffects, d as RasterSources, c as RasterCompositor, k as CompositorOptions, l as LayerEffectKind } from './compositor-BsYYllvR.js';
|
|
2
|
+
import { P as PixelSurface, B as BlendMode, a as TiledSurface } from './surface-BBJN9wxg.js';
|
|
3
3
|
import { Q as Quad, a as WarpMesh, V as Vec2, A as AffineMatrix, H as Homography } from './types-CwMPoRMU.js';
|
|
4
|
-
import { B as BrushSettings, M as MixerSettings, a as MixerLoad, c as StrokeCoverage, d as MixerTarget, e as MixerStroke, f as StrokeApply, S as StrokePoint } from './mixer-
|
|
4
|
+
import { B as BrushSettings, M as MixerSettings, a as MixerLoad, c as StrokeCoverage, d as MixerTarget, e as MixerStroke, f as StrokeApply, S as StrokePoint } from './mixer-Cu5a9Bzd.js';
|
|
5
5
|
import { W as WarpPreset } from './warp-CWHZzE3x.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1365,7 +1365,7 @@ declare const PSD_BLEND_KEYS: Record<string, LayerBlendMode>;
|
|
|
1365
1365
|
interface PsdLayerSummary {
|
|
1366
1366
|
name: string;
|
|
1367
1367
|
/** Our layer type, or `null` when the layer was dropped. */
|
|
1368
|
-
type: 'pixel' | 'adjustment' | 'group' | null;
|
|
1368
|
+
type: 'pixel' | 'adjustment' | 'group' | 'smart' | null;
|
|
1369
1369
|
/** `mapped`: held exactly; `approximated`: imported with losses; `dropped`: left out. */
|
|
1370
1370
|
status: 'mapped' | 'approximated' | 'dropped';
|
|
1371
1371
|
/** What Photoshop calls it (`pixel`, `type`, `smart-object`, `fill`, `shape`, `Levels` …). */
|
|
@@ -1403,6 +1403,8 @@ interface PsdImportOptions {
|
|
|
1403
1403
|
newId?: (hint: string) => string;
|
|
1404
1404
|
/** Skip decoding pixels (inspection only). */
|
|
1405
1405
|
skipPixels?: boolean;
|
|
1406
|
+
/** @internal How deep inside smart object contents this file is (nested PSB files). */
|
|
1407
|
+
depth?: number;
|
|
1406
1408
|
}
|
|
1407
1409
|
/** Maps a parsed PSD to our layers. */
|
|
1408
1410
|
declare function psdToLayers(file: PsdFile, options?: PsdImportOptions): PsdImportResult;
|
|
@@ -2020,6 +2022,11 @@ declare class ImageEditorController {
|
|
|
2020
2022
|
* included), or `null` for an empty or non-pixel layer.
|
|
2021
2023
|
*/
|
|
2022
2024
|
getLayerBounds(id: string): CropBox | null;
|
|
2025
|
+
/**
|
|
2026
|
+
* A tight base64 PNG data URL of a pixel or smart layer's content, or `null` for an unknown or
|
|
2027
|
+
* non-pixel layer, or when the layer is completely transparent.
|
|
2028
|
+
*/
|
|
2029
|
+
getLayerDataURL(id: string): string | null;
|
|
2023
2030
|
/**
|
|
2024
2031
|
* Composites the layer stack in document space without a canvas (annotation layers need one
|
|
2025
2032
|
* and are left out): `rect` (default: the canvas) as RGBA, straight alpha. Crop, rotation and
|
|
@@ -2364,6 +2371,14 @@ declare class ImageEditorController {
|
|
|
2364
2371
|
maxSide?: number;
|
|
2365
2372
|
mask?: boolean;
|
|
2366
2373
|
}): PixelBuffer | null;
|
|
2374
|
+
/**
|
|
2375
|
+
* A small PNG data URL preview of a pixel or smart layer over the canvas (or of its mask with `mask: true`),
|
|
2376
|
+
* longest side `maxSide` px; `null` for layers without pixels.
|
|
2377
|
+
*/
|
|
2378
|
+
getLayerThumbnailDataURL(id: string, options?: {
|
|
2379
|
+
maxSide?: number;
|
|
2380
|
+
mask?: boolean;
|
|
2381
|
+
}): string | null;
|
|
2367
2382
|
/** Brush settings, colours and tool options of the paint tools (view state, no undo). */
|
|
2368
2383
|
setPaintOptions(options: Partial<Omit<PaintOptions, 'brush' | 'mixer' | 'mixerLoad'>> & {
|
|
2369
2384
|
brush?: Partial<BrushSettings>;
|