@pixerate/editor 0.123.0 → 0.124.1
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/agent/index.cjs +2 -2
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.js +3 -3
- package/dist/animation/index.d.cts +2 -1
- package/dist/animation/index.d.ts +2 -1
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +11 -733
- package/dist/animation-editor/index.d.ts +11 -733
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/{bezier-C-W9LFyD.d.cts → bezier-CBzKKDjl.d.cts} +2 -66
- package/dist/{bezier-DQZE5dxA.d.ts → bezier-CWv6LQal.d.ts} +2 -66
- package/dist/{brushstrokeRender-M4S65DHT.cjs → brushstrokeRender-EELTV7U4.cjs} +8 -8
- package/dist/{brushstrokeRender-M4S65DHT.cjs.map → brushstrokeRender-EELTV7U4.cjs.map} +1 -1
- package/dist/{brushstrokeRender-CDDRSV2W.js → brushstrokeRender-LRV7GXGD.js} +3 -3
- package/dist/canvas/index.cjs +6 -6
- package/dist/canvas/index.d.cts +10 -6
- package/dist/canvas/index.d.ts +10 -6
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-SMJGE7HM.cjs → chunk-4QQZV5Y5.cjs} +512 -39
- package/dist/chunk-4QQZV5Y5.cjs.map +1 -0
- package/dist/{chunk-TVXFHE4T.js → chunk-64PYNEHJ.js} +45 -12
- package/dist/chunk-64PYNEHJ.js.map +1 -0
- package/dist/{chunk-2IW3BWRT.cjs → chunk-7LQO6OHH.cjs} +2 -2
- package/dist/{chunk-2IW3BWRT.cjs.map → chunk-7LQO6OHH.cjs.map} +1 -1
- package/dist/chunk-CN4PJHUG.cjs +234 -0
- package/dist/chunk-CN4PJHUG.cjs.map +1 -0
- package/dist/chunk-FHYDQOPC.cjs +215 -0
- package/dist/chunk-FHYDQOPC.cjs.map +1 -0
- package/dist/{chunk-KMBC4HNV.js → chunk-J67OLQUQ.js} +2 -2
- package/dist/chunk-JRXJTPES.js +215 -0
- package/dist/chunk-JRXJTPES.js.map +1 -0
- package/dist/{chunk-IPFRWILU.js → chunk-ORHMVUR6.js} +488 -15
- package/dist/chunk-ORHMVUR6.js.map +1 -0
- package/dist/{chunk-6CJRDJCU.cjs → chunk-PEHYWUVV.cjs} +176 -111
- package/dist/chunk-PEHYWUVV.cjs.map +1 -0
- package/dist/chunk-QEG3GRN2.js +234 -0
- package/dist/chunk-QEG3GRN2.js.map +1 -0
- package/dist/{chunk-6ZBR4J62.js → chunk-WATAQ2Z2.js} +79 -14
- package/dist/chunk-WATAQ2Z2.js.map +1 -0
- package/dist/{chunk-RLRUAPBJ.cjs → chunk-Z6OUCS2K.cjs} +47 -14
- package/dist/chunk-Z6OUCS2K.cjs.map +1 -0
- package/dist/effects/index.cjs +605 -0
- package/dist/effects/index.cjs.map +1 -0
- package/dist/effects/index.d.cts +163 -0
- package/dist/effects/index.d.ts +163 -0
- package/dist/effects/index.js +605 -0
- package/dist/effects/index.js.map +1 -0
- package/dist/evaluate-2S3vSPLy.d.cts +55 -0
- package/dist/evaluate-CfmT6xA3.d.ts +55 -0
- package/dist/{export-DfjzHAJI.d.ts → export-BGtXgMJ3.d.ts} +536 -128
- package/dist/{export-Dv0-ZVrV.d.cts → export-BdfY_lH0.d.ts} +392 -5
- package/dist/{export-Dv0-ZVrV.d.ts → export-CbpjwxaI.d.cts} +392 -5
- package/dist/{export-lU5qSpHE.d.cts → export-WmYoWmLM.d.cts} +536 -128
- package/dist/flair-CxB3fOcU.d.ts +739 -0
- package/dist/flair-D7BxyBwL.d.cts +739 -0
- package/dist/gradient-KDfCvhuj.d.cts +66 -0
- package/dist/gradient-KDfCvhuj.d.ts +66 -0
- package/dist/helpers-777mC6dc.d.cts +253 -0
- package/dist/helpers-DX2_7L5t.d.ts +253 -0
- package/dist/image-editor/index.cjs +1296 -805
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +39 -182
- package/dist/image-editor/index.d.ts +39 -182
- package/dist/image-editor/index.js +497 -6
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{opentype-p8Xxf-Wh.d.ts → opentype-14PDI5D2.d.ts} +1 -1
- package/dist/{opentype-BV7wWatY.d.cts → opentype-D80AVmMu.d.cts} +1 -1
- package/dist/paint/index.cjs +2 -2
- package/dist/paint/index.d.cts +32 -10
- package/dist/paint/index.d.ts +32 -10
- package/dist/paint/index.js +1 -1
- package/dist/paint-editor/index.cjs +10 -8
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +11 -5
- package/dist/paint-editor/index.d.ts +11 -5
- package/dist/paint-editor/index.js +4 -2
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/parameters/index.d.cts +4 -184
- package/dist/parameters/index.d.ts +4 -184
- package/dist/{pathfinder-IxcyhO00.d.cts → pathfinder-C0UoFypx.d.cts} +1 -1
- package/dist/{pathfinder-StVChJOT.d.ts → pathfinder-DjISxkUv.d.ts} +1 -1
- package/dist/{player-DrcP2xqj.d.cts → player-CBtEoU2x.d.cts} +2 -54
- package/dist/{player-DV4Jujdq.d.ts → player-cGLrngL_.d.ts} +2 -54
- package/dist/{svg-BtND4TJu.d.cts → svg-BDrjRnL1.d.cts} +3 -2
- package/dist/{svg-BfVXG7hL.d.ts → svg-C-vZ3q50.d.ts} +3 -2
- package/dist/tools/index.cjs +2 -2
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.js +3 -3
- package/dist/tools-C7JtLYzo.d.ts +126 -0
- package/dist/tools-DHKGHiSK.d.cts +126 -0
- package/dist/{types-fuXEme9j.d.ts → types-BcX7sCsn.d.ts} +2 -2
- package/dist/{types-DJF3Ghn5.d.cts → types-CznabG7m.d.cts} +2 -2
- package/dist/types-D3-J3TFf.d.ts +185 -0
- package/dist/types-DMcf_z4J.d.cts +185 -0
- package/dist/vector/index.d.cts +10 -10
- package/dist/vector/index.d.ts +10 -10
- package/dist/video-editor/index.cjs +749 -277
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.d.cts +265 -138
- package/dist/video-editor/index.d.ts +265 -138
- package/dist/video-editor/index.js +490 -18
- package/dist/video-editor/index.js.map +1 -1
- package/dist/{warp-BjmAgQwq.d.cts → warp-CH9MM435.d.cts} +1 -1
- package/dist/{warp-Ca5fedzS.d.ts → warp-k_PdtXOG.d.ts} +1 -1
- package/package.json +6 -1
- package/skills/pixerate-image-editor/SKILL.md +7 -0
- package/skills/pixerate-image-editor/references/provider-effects.md +35 -0
- package/skills/pixerate-video-editor/SKILL.md +39 -1
- package/dist/chunk-6CJRDJCU.cjs.map +0 -1
- package/dist/chunk-6ZBR4J62.js.map +0 -1
- package/dist/chunk-IPFRWILU.js.map +0 -1
- package/dist/chunk-RLRUAPBJ.cjs.map +0 -1
- package/dist/chunk-SMJGE7HM.cjs.map +0 -1
- package/dist/chunk-TVXFHE4T.js.map +0 -1
- /package/dist/{brushstrokeRender-CDDRSV2W.js.map → brushstrokeRender-LRV7GXGD.js.map} +0 -0
- /package/dist/{chunk-KMBC4HNV.js.map → chunk-J67OLQUQ.js.map} +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { a2 as RasterLayerBase, a3 as RasterMask$1, a5 as RasterPixelLayer, H as GroupBlendMode, r as EffectFill, G as GlobalLight, u as EffectPattern, M as Interpolation, T as LayerLocation$1, U as LayerLocks, O as LayerEffect, S as LayerEffects, R as RasterSources, a as RasterCompositor, l as CompositorOptions, Q as LayerEffectKind, p as EffectContext, h as BitDepth } from './deep-wwJa7aR6.js';
|
|
2
2
|
import { c as PixelSurface, a as BlendMode, T as TiledSurface, R as RasterRect } from './surface-1MRncXpF.js';
|
|
3
3
|
import { b as BuiltinProfileId, j as Intent, P as Profile, T as Transform, d as ColorSpace } from './builtin-CY97ppKM.js';
|
|
4
|
-
import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2
|
|
5
|
-
import { B as BezierPath } from './bezier-
|
|
6
|
-
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-
|
|
7
|
-
import {
|
|
4
|
+
import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2, H as Homography } from './types-CwMPoRMU.js';
|
|
5
|
+
import { B as BezierPath } from './bezier-CWv6LQal.js';
|
|
6
|
+
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-k_PdtXOG.js';
|
|
7
|
+
import { x as VectorSubpath, p as Vec2$1 } from './types-BcX7sCsn.js';
|
|
8
|
+
import { d as EffectValue, v as EffectsSlot, E as EffectProvider, f as EffectPixels, e as EffectDescription } from './helpers-DX2_7L5t.js';
|
|
8
9
|
import { B as BrushSettings, P as PaintSource, M as MixerSettings, a as MixerLoad, R as RetouchSettings, S as StrokeCoverage, b as MixerTarget, c as MixerStroke, d as RetouchApply, e as StrokePoint, f as RetouchPaint, C as CoverageMap, g as PaintTileTarget, h as StrokeApply } from './rand-DtazXGOB.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -141,7 +142,29 @@ interface BlurFilter {
|
|
|
141
142
|
}
|
|
142
143
|
type LayerFilter = DevelopFilter | BlurFilter;
|
|
143
144
|
type LayerFilterKind = LayerFilter['kind'];
|
|
145
|
+
/**
|
|
146
|
+
* A provider effect (see `@pixerate/editor/effects`) an effect layer is drawn from: generator or
|
|
147
|
+
* overlay effects rendered at the document's size and depth. Kept, with the layer's last rendered
|
|
148
|
+
* pixels, when no provider is registered.
|
|
149
|
+
*/
|
|
150
|
+
interface ImageEffectGenerator {
|
|
151
|
+
/** The provider's effect id. */
|
|
152
|
+
effect: string;
|
|
153
|
+
/** The provider it was rendered with (its `id`). */
|
|
154
|
+
provider?: string;
|
|
155
|
+
/** The effect's name when it was applied. */
|
|
156
|
+
name?: string;
|
|
157
|
+
/** Control values (over the effect's defaults). */
|
|
158
|
+
values: Record<string, EffectValue>;
|
|
159
|
+
/** The moment of the effect drawn (ms, default 0). */
|
|
160
|
+
time?: number;
|
|
161
|
+
}
|
|
144
162
|
interface PixelLayer extends LayerBase, Omit<RasterPixelLayer, keyof RasterLayerBase> {
|
|
163
|
+
/**
|
|
164
|
+
* An effect layer: the pixels are rendered from a provider effect at the document's size and bit
|
|
165
|
+
* depth, and rendered again when its values change (painting on it is kept until then).
|
|
166
|
+
*/
|
|
167
|
+
generator?: ImageEffectGenerator;
|
|
145
168
|
/** Live filters, applied bottom (first) to top before the mask and blend. */
|
|
146
169
|
filters?: LayerFilter[];
|
|
147
170
|
/**
|
|
@@ -454,8 +477,25 @@ interface PsdSmartFilter {
|
|
|
454
477
|
/** The filter's `filterFX` item descriptor (versioned descriptor bytes), as read. */
|
|
455
478
|
data: Uint8Array;
|
|
456
479
|
}
|
|
457
|
-
/**
|
|
458
|
-
|
|
480
|
+
/**
|
|
481
|
+
* A provider effect (see `@pixerate/editor/effects`) as a smart filter: a filter effect run on the
|
|
482
|
+
* result below it. Without a provider (or while it renders) it passes the pixels through; it keeps
|
|
483
|
+
* its effect id and values either way.
|
|
484
|
+
*/
|
|
485
|
+
interface EffectSmartFilter {
|
|
486
|
+
id: string;
|
|
487
|
+
kind: 'effect';
|
|
488
|
+
enabled: boolean;
|
|
489
|
+
/** The provider's effect id. */
|
|
490
|
+
effect: string;
|
|
491
|
+
provider?: string;
|
|
492
|
+
/** The effect's name when it was applied. */
|
|
493
|
+
name?: string;
|
|
494
|
+
/** Control values (over the effect's defaults). */
|
|
495
|
+
values: Record<string, EffectValue>;
|
|
496
|
+
}
|
|
497
|
+
/** One smart filter: a layer filter, a provider effect or a kept PSD filter, with its own blending over the result below it. */
|
|
498
|
+
type SmartFilter = (LayerFilter | PsdSmartFilter | EffectSmartFilter) & {
|
|
459
499
|
/** How the filter's result blends with the result below it (Photoshop's Blending Options). */
|
|
460
500
|
blend: BlendMode;
|
|
461
501
|
/** 0..1 */
|
|
@@ -788,6 +828,8 @@ interface SerializedPixelLayer extends SerializedLayerBase {
|
|
|
788
828
|
filters?: LayerFilter[];
|
|
789
829
|
/** `'document'`: the pixels are the document's source image (no asset is stored). */
|
|
790
830
|
source?: 'document';
|
|
831
|
+
/** An effect layer's provider effect (its pixels are stored as usual). */
|
|
832
|
+
generator?: ImageEffectGenerator;
|
|
791
833
|
/** 16- or 32-bit samples of the pixels (the PNG asset is their 8-bit rendering), see `raster/deep`. */
|
|
792
834
|
deep?: SerializedDeepPixels;
|
|
793
835
|
}
|
|
@@ -819,7 +861,7 @@ interface SerializedAnnotationLayer extends SerializedLayerBase {
|
|
|
819
861
|
annotation: Annotation;
|
|
820
862
|
}
|
|
821
863
|
/** A smart filter as stored (a Photoshop filter keeps its descriptor as base64). */
|
|
822
|
-
type SerializedSmartFilter = (LayerFilter | (Omit<PsdSmartFilter, 'data'> & {
|
|
864
|
+
type SerializedSmartFilter = (LayerFilter | EffectSmartFilter | (Omit<PsdSmartFilter, 'data'> & {
|
|
823
865
|
data: string;
|
|
824
866
|
})) & {
|
|
825
867
|
blend: string;
|
|
@@ -1698,6 +1740,407 @@ declare function projectMaskCoverage(coverage: Float32Array, maskWidth: number,
|
|
|
1698
1740
|
*/
|
|
1699
1741
|
declare function buildLayerMaskPlanes(layers: readonly AdjustmentLayer[] | undefined, naturalWidth: number, naturalHeight: number, projection: ImageProjection, targetWidth: number, targetHeight: number): Map<string, Float32Array> | undefined;
|
|
1700
1742
|
|
|
1743
|
+
/**
|
|
1744
|
+
* Free Transform geometry for the image editor, as pure functions both the UI bindings and the
|
|
1745
|
+
* agent tools use: a transform is the frame being transformed (`box`, document pixels), where its
|
|
1746
|
+
* four corners land (`corners`, TL, TR, BR, BL) and an optional warp mesh over the box. Scale,
|
|
1747
|
+
* rotate, skew and flips keep the corners a parallelogram (an affine map); Distort and Perspective
|
|
1748
|
+
* move them freely (a projective map); Warp bends the box through a Bézier mesh before the corner
|
|
1749
|
+
* map.
|
|
1750
|
+
*
|
|
1751
|
+
* The maths (homographies, meshes, presets) is shared with the vector editor in `src/geom`.
|
|
1752
|
+
*/
|
|
1753
|
+
|
|
1754
|
+
/** Free Transform modes (Edit › Transform). Scale, rotate and skew stay affine. */
|
|
1755
|
+
type FreeTransformMode = 'scale' | 'rotate' | 'skew' | 'distort' | 'perspective' | 'warp';
|
|
1756
|
+
declare const FREE_TRANSFORM_MODES: readonly FreeTransformMode[];
|
|
1757
|
+
/** The nine reference-point positions of the options bar's locator, over the transformed box. */
|
|
1758
|
+
type TransformAnchor = 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right';
|
|
1759
|
+
declare const TRANSFORM_ANCHORS: readonly TransformAnchor[];
|
|
1760
|
+
declare function isTransformAnchor(value: unknown): value is TransformAnchor;
|
|
1761
|
+
/** A transform in progress: the frame, where its corners go and an optional warp over the frame. */
|
|
1762
|
+
interface FreeTransformGeometry {
|
|
1763
|
+
/** The frame being transformed, in document pixels (the content bounds when it began). */
|
|
1764
|
+
box: CropBox;
|
|
1765
|
+
/** Where the frame's corners land: top-left, top-right, bottom-right, bottom-left (document pixels). */
|
|
1766
|
+
corners: Quad;
|
|
1767
|
+
/**
|
|
1768
|
+
* A warp applied in the frame's own space before the corner map: its control points are in
|
|
1769
|
+
* document pixels of the untransformed frame (`identityWarpMesh(box)` is no warp).
|
|
1770
|
+
*/
|
|
1771
|
+
warp?: WarpMesh | null;
|
|
1772
|
+
}
|
|
1773
|
+
/** The untransformed geometry of a box. */
|
|
1774
|
+
declare function identityTransform(box: CropBox): FreeTransformGeometry;
|
|
1775
|
+
/** Where `box`'s corners go under the affine `m`. */
|
|
1776
|
+
declare function cornersFromMatrix(box: CropBox, m: AffineMatrix): Quad;
|
|
1777
|
+
/** The affine matrix taking `box` onto `corners` when they form a parallelogram, else `null`. */
|
|
1778
|
+
declare function matrixFromCorners(box: CropBox, corners: Quad, eps?: number): AffineMatrix | null;
|
|
1779
|
+
/** The projective map of the corner move (box → corners), or `null` when the corners are degenerate. */
|
|
1780
|
+
declare function transformHomography(geometry: FreeTransformGeometry): Homography | null;
|
|
1781
|
+
/** Whether a warp mesh changes anything (not the identity over the box). */
|
|
1782
|
+
declare function hasWarp(geometry: FreeTransformGeometry): boolean;
|
|
1783
|
+
/** Whether the geometry changes nothing. */
|
|
1784
|
+
declare function isIdentityTransform(geometry: FreeTransformGeometry): boolean;
|
|
1785
|
+
/**
|
|
1786
|
+
* The forward map of the whole transform (document pixels of the source → document pixels of the
|
|
1787
|
+
* result): the warp over the box, then the corner map. `null` where it is undefined.
|
|
1788
|
+
*/
|
|
1789
|
+
declare function transformMap(geometry: FreeTransformGeometry): ((p: Vec2) => Vec2 | null) | null;
|
|
1790
|
+
/** A point of the transformed box at box fractions (`fx`, `fy`), warp included. */
|
|
1791
|
+
declare function transformedPoint(geometry: FreeTransformGeometry, fx: number, fy: number): Vec2 | null;
|
|
1792
|
+
/** Where an anchor of the box is after the corner map (the warp ignored). */
|
|
1793
|
+
declare function anchorPoint(geometry: FreeTransformGeometry, anchor: TransformAnchor): Vec2;
|
|
1794
|
+
/** Bounds of the transformed result's outline (document pixels, not rounded). */
|
|
1795
|
+
declare function transformedBox(geometry: FreeTransformGeometry): CropBox | null;
|
|
1796
|
+
/** Free Transform as numbers, as Photoshop's options bar shows it. */
|
|
1797
|
+
interface TransformParams {
|
|
1798
|
+
/** Width in percent of the frame (default 100; negative flips). */
|
|
1799
|
+
scaleX?: number;
|
|
1800
|
+
/** Height in percent of the frame (default 100; negative flips). */
|
|
1801
|
+
scaleY?: number;
|
|
1802
|
+
/** Rotation in degrees, clockwise (default 0). */
|
|
1803
|
+
rotate?: number;
|
|
1804
|
+
/** Horizontal skew in degrees: vertical edges lean right for positive angles (default 0). */
|
|
1805
|
+
skewX?: number;
|
|
1806
|
+
/** Vertical skew in degrees: horizontal edges lean down for positive angles (default 0). */
|
|
1807
|
+
skewY?: number;
|
|
1808
|
+
/** Move after scaling and rotating, in document pixels (default 0). */
|
|
1809
|
+
dx?: number;
|
|
1810
|
+
dy?: number;
|
|
1811
|
+
/** The fixed point of scale, skew and rotation: an anchor of the frame or a document point (default the centre). */
|
|
1812
|
+
reference?: TransformAnchor | Vec2;
|
|
1813
|
+
}
|
|
1814
|
+
/** The reference point of params over a box (default its centre). */
|
|
1815
|
+
declare function referencePoint(box: CropBox, reference: TransformParams['reference']): Vec2;
|
|
1816
|
+
/**
|
|
1817
|
+
* The affine matrix of `params` over `box`: about the reference point, skew, then scale, then
|
|
1818
|
+
* rotate; then the move.
|
|
1819
|
+
*/
|
|
1820
|
+
declare function matrixFromParams(box: CropBox, params: TransformParams): AffineMatrix;
|
|
1821
|
+
/** What the options bar shows for a transform. */
|
|
1822
|
+
interface TransformReadout {
|
|
1823
|
+
/** False for Distort, Perspective and Warp: only `bounds` and `corners` then mean anything. */
|
|
1824
|
+
affine: boolean;
|
|
1825
|
+
/** Width and height in percent of the frame. */
|
|
1826
|
+
scaleX: number;
|
|
1827
|
+
scaleY: number;
|
|
1828
|
+
/** Rotation in degrees, clockwise, in (−180, 180]. */
|
|
1829
|
+
rotate: number;
|
|
1830
|
+
/** Horizontal skew in degrees (vertical skew is folded into rotation and scale). */
|
|
1831
|
+
skewX: number;
|
|
1832
|
+
/** Where the reference point is now (document pixels). */
|
|
1833
|
+
x: number;
|
|
1834
|
+
y: number;
|
|
1835
|
+
/** Bounds of the transformed outline. */
|
|
1836
|
+
bounds: CropBox | null;
|
|
1837
|
+
corners: Quad;
|
|
1838
|
+
}
|
|
1839
|
+
/**
|
|
1840
|
+
* Decomposes a transform for the options bar: the linear part as rotate · scale · skew (QR) with
|
|
1841
|
+
* the given reference point. Non-affine geometry reports its bounds and corners only.
|
|
1842
|
+
*/
|
|
1843
|
+
declare function describeTransform(geometry: FreeTransformGeometry, reference?: TransformParams['reference']): TransformReadout;
|
|
1844
|
+
/**
|
|
1845
|
+
* Corners for a transform given as numbers relative to the current corners: `params` are applied
|
|
1846
|
+
* after the current affine part (when the corners are a parallelogram) about the reference point
|
|
1847
|
+
* of the current geometry, so typing "rotate 15" rotates the box as it is now.
|
|
1848
|
+
*/
|
|
1849
|
+
declare function applyParams(geometry: FreeTransformGeometry, params: TransformParams): Quad;
|
|
1850
|
+
/** Flip of the corners about the box's centre line (horizontal: left ↔ right). */
|
|
1851
|
+
declare function flipCorners(geometry: FreeTransformGeometry, axis: 'horizontal' | 'vertical'): Quad;
|
|
1852
|
+
/** Inverse of `matrixFromCorners` (box space → document) for mapping a document point back into the box. */
|
|
1853
|
+
declare function boxPointOf(geometry: FreeTransformGeometry, p: Vec2): Vec2 | null;
|
|
1854
|
+
/** A warp mesh from a preset over the box (null when it changes nothing). */
|
|
1855
|
+
declare function presetWarp(box: CropBox, preset: WarpPreset): WarpMesh | null;
|
|
1856
|
+
/** Validates a warp mesh for a box: well formed, finite, the right number of points. */
|
|
1857
|
+
declare function isValidWarp(mesh: unknown): mesh is WarpMesh;
|
|
1858
|
+
/** The geometry's affine map when it is one (no warp, a parallelogram), as a homography; else the projective map. */
|
|
1859
|
+
declare function geometryHomography(geometry: FreeTransformGeometry): Homography | null;
|
|
1860
|
+
|
|
1861
|
+
/**
|
|
1862
|
+
* How far beyond the canvas a smart object is rendered (document pixels): enough for any layer
|
|
1863
|
+
* effect to see the parts just outside the canvas. Further out a smart object is not drawn.
|
|
1864
|
+
*/
|
|
1865
|
+
declare const SMART_RENDER_MARGIN = 512;
|
|
1866
|
+
/** The document canvas a smart object renders for. */
|
|
1867
|
+
interface SmartCanvas {
|
|
1868
|
+
width: number;
|
|
1869
|
+
height: number;
|
|
1870
|
+
/** Where provider effect smart filters get their results (the controller's effects engine); without it they pass pixels through. */
|
|
1871
|
+
effects?: SmartEffectResolver;
|
|
1872
|
+
}
|
|
1873
|
+
/**
|
|
1874
|
+
* Runs provider effect smart filters for `applySmartFilters`, which is synchronous: a result is
|
|
1875
|
+
* returned when it is ready, else `null` (the filter passes the pixels through for now) and, when
|
|
1876
|
+
* `pending` is set, the surface is marked incomplete (`isSmartSurfaceIncomplete`) so it is
|
|
1877
|
+
* rendered again once the result lands.
|
|
1878
|
+
*/
|
|
1879
|
+
interface SmartEffectResolver {
|
|
1880
|
+
/** Changes whenever results may differ (a new provider): part of the cache key. */
|
|
1881
|
+
readonly token: number;
|
|
1882
|
+
resolve(filter: EffectSmartFilter, input: Uint8ClampedArray, width: number, height: number, key: string): {
|
|
1883
|
+
result: Uint8ClampedArray | null;
|
|
1884
|
+
pending: boolean;
|
|
1885
|
+
};
|
|
1886
|
+
}
|
|
1887
|
+
/** True for a smart object surface rendered while one of its effect smart filters was still rendering. */
|
|
1888
|
+
declare const isSmartSurfaceIncomplete: (surface: PixelSurface) => boolean;
|
|
1889
|
+
/** A fresh contents id (independent contents). */
|
|
1890
|
+
declare function newContentsId(): string;
|
|
1891
|
+
/** The contents' rectangle in its own pixels. */
|
|
1892
|
+
declare function contentsBox(contents: SmartContents): CropBox;
|
|
1893
|
+
/** A smart object's placement as Free Transform geometry (the frame is the contents' rectangle). */
|
|
1894
|
+
declare function placementGeometry(layer: Pick<SmartObjectLayer, 'contents' | 'placement'>): FreeTransformGeometry;
|
|
1895
|
+
/** The placement that draws the contents 1:1 with their top-left corner at (`x`, `y`). */
|
|
1896
|
+
declare function placementAt(contents: Pick<SmartContents, 'width' | 'height'>, x: number, y: number): SmartPlacement;
|
|
1897
|
+
/** Whether the contents can be rendered here (decoded pixels or a layer document). */
|
|
1898
|
+
declare function isContentsDecoded(contents: SmartContents): boolean;
|
|
1899
|
+
/** The layer with `id`, which must be a smart object. */
|
|
1900
|
+
declare function requireSmartObject(layers: readonly ImageLayer[], id: string): SmartObjectLayer;
|
|
1901
|
+
/**
|
|
1902
|
+
* The contents as pixels at (0, 0) in their own space: the raster, or the nested document
|
|
1903
|
+
* composited at its size (annotation layers inside need a canvas and are left out). Memoised.
|
|
1904
|
+
*/
|
|
1905
|
+
declare function contentsSurface(contents: SmartContents): PixelSurface;
|
|
1906
|
+
/** Raster contents from RGBA pixels. */
|
|
1907
|
+
declare function rasterContents(pixels: {
|
|
1908
|
+
width: number;
|
|
1909
|
+
height: number;
|
|
1910
|
+
data: ArrayLike<number>;
|
|
1911
|
+
}, name: string, id?: string): SmartContents;
|
|
1912
|
+
/** Document contents from layers on a `width × height` canvas. */
|
|
1913
|
+
declare function documentContents(document: SmartDocument, width: number, height: number, name: string, id?: string): SmartContents;
|
|
1914
|
+
/** How a render runs: full quality (default), or a fast preview. */
|
|
1915
|
+
interface SmartRenderOptions {
|
|
1916
|
+
/** Preview block size (a power of two): sample a reduced copy of the contents once per block. */
|
|
1917
|
+
step?: number;
|
|
1918
|
+
/** Only this part of the document (the visible area). */
|
|
1919
|
+
clip?: RasterRect;
|
|
1920
|
+
/** Leave the smart filters out (previews while transforming). */
|
|
1921
|
+
skipFilters?: boolean;
|
|
1922
|
+
/** Reduced copies of the contents by factor, kept by the caller between previews. */
|
|
1923
|
+
reduced?: Map<number, PixelSurface>;
|
|
1924
|
+
}
|
|
1925
|
+
/** The contents placed in the document (no filters), clipped to the canvas grown by the render margin. */
|
|
1926
|
+
declare function placeContents(layer: Pick<SmartObjectLayer, 'contents' | 'placement'>, canvas: SmartCanvas, options?: SmartRenderOptions): PixelSurface;
|
|
1927
|
+
/** The filters of a stack that change pixels (the stack enabled, each filter active, a modelled kind). Provider effects are listed by `activeEffectSmartFilters`. */
|
|
1928
|
+
declare function activeSmartFilters(stack: SmartFilterStack | undefined): Array<SmartFilter & LayerFilter>;
|
|
1929
|
+
/** The enabled provider effect smart filters of a stack. */
|
|
1930
|
+
declare function activeEffectSmartFilters(stack: SmartFilterStack | undefined): Array<SmartFilter & EffectSmartFilter>;
|
|
1931
|
+
/** A filter mask's coverage over the canvas (0..1), after density and feather; `null` reveals all. */
|
|
1932
|
+
declare function filterMaskCoverage(mask: RasterMask | undefined, canvas: SmartCanvas): Float32Array | null;
|
|
1933
|
+
/**
|
|
1934
|
+
* Runs a smart filter stack over the placed contents, over the canvas (spatial filters clamp at
|
|
1935
|
+
* its edges, as a pixel layer's filters do): each filter filters the result below it, and its own
|
|
1936
|
+
* blend mode and opacity mix its result with that input. The filter mask then mixes the filtered
|
|
1937
|
+
* result with the unfiltered contents. Returns `placed` itself when no filter is active.
|
|
1938
|
+
*/
|
|
1939
|
+
declare function applySmartFilters(placed: PixelSurface, stack: SmartFilterStack | undefined, canvas: SmartCanvas): PixelSurface;
|
|
1940
|
+
/** A smart object's pixels: the contents through the placement, then the smart filters. */
|
|
1941
|
+
declare function renderSmartObject(layer: Pick<SmartObjectLayer, 'contents' | 'placement' | 'smartFilters'>, canvas: SmartCanvas, options?: SmartRenderOptions): PixelSurface;
|
|
1942
|
+
/** The layer with its pixels rendered again (refused when the contents are not decoded). */
|
|
1943
|
+
declare function rerender(layer: SmartObjectLayer, canvas: SmartCanvas, action?: string): SmartObjectLayer;
|
|
1944
|
+
/** Validates a placement for contents of `width × height`; returns a clean copy. */
|
|
1945
|
+
declare function normalizePlacement(raw: SmartPlacement, contents: Pick<SmartContents, 'width' | 'height'>): SmartPlacement;
|
|
1946
|
+
/**
|
|
1947
|
+
* Sets a smart object's placement (corners, warp, interpolation) and renders it again from its
|
|
1948
|
+
* contents. A linked layer mask and filter mask follow a warp-free change. Returns the stack and
|
|
1949
|
+
* whether the masks moved.
|
|
1950
|
+
*/
|
|
1951
|
+
declare function setSmartPlacement(layers: readonly ImageLayer[], id: string, placement: SmartPlacement, canvas: SmartCanvas): {
|
|
1952
|
+
layers: ImageLayer[];
|
|
1953
|
+
layer: SmartObjectLayer;
|
|
1954
|
+
masksMoved: boolean;
|
|
1955
|
+
};
|
|
1956
|
+
/**
|
|
1957
|
+
* Moves a smart object by whole pixels (the move tool): its corners, a linked mask and filter mask
|
|
1958
|
+
* move with it. Without spatial smart filters the rendered pixels are shifted, not resampled.
|
|
1959
|
+
*/
|
|
1960
|
+
declare function offsetSmartObject(layers: readonly ImageLayer[], id: string, dx: number, dy: number, canvas: SmartCanvas): ImageLayer[];
|
|
1961
|
+
interface ConvertOptions {
|
|
1962
|
+
/** The pixels of a pixel layer (resolves the Background's document source). */
|
|
1963
|
+
surfaceOf(layer: PixelLayer): PixelSurface;
|
|
1964
|
+
/** Name of the new layer (default: the top layer's name). */
|
|
1965
|
+
name?: string;
|
|
1966
|
+
}
|
|
1967
|
+
/**
|
|
1968
|
+
* Layer › Smart Objects › Convert to Smart Object: sibling layers become one smart object at the
|
|
1969
|
+
* position of the topmost one.
|
|
1970
|
+
*
|
|
1971
|
+
* - One pixel layer becomes raster contents (its pixels, cropped to their bounds) and keeps its
|
|
1972
|
+
* id, name, visibility, opacity, fill, blend, clipping, mask and effects; its filters become
|
|
1973
|
+
* smart filters. It renders exactly as before.
|
|
1974
|
+
* - Anything else (several layers, a group, an adjustment, a smart object) becomes a nested
|
|
1975
|
+
* document holding the layers as they were, sized to their bounds (effects included), and the
|
|
1976
|
+
* new layer is a plain Normal layer named after the top one, rendering the isolated composite.
|
|
1977
|
+
*
|
|
1978
|
+
* Returns the stack, the new layer and its contents.
|
|
1979
|
+
*/
|
|
1980
|
+
declare function convertToSmartObject(layers: readonly ImageLayer[], ids: readonly string[], canvas: SmartCanvas, options: ConvertOptions): {
|
|
1981
|
+
layers: ImageLayer[];
|
|
1982
|
+
layer: SmartObjectLayer;
|
|
1983
|
+
};
|
|
1984
|
+
/**
|
|
1985
|
+
* Layer › Smart Objects › Rasterize: the smart object becomes a pixel layer holding what it
|
|
1986
|
+
* renders (filters baked), with its mask, effects, blend, opacity and fill. Same id.
|
|
1987
|
+
*/
|
|
1988
|
+
declare function rasterizeSmartObject(layers: readonly ImageLayer[], id: string): {
|
|
1989
|
+
layers: ImageLayer[];
|
|
1990
|
+
layer: PixelLayer;
|
|
1991
|
+
};
|
|
1992
|
+
/**
|
|
1993
|
+
* Layer › Smart Objects › New Smart Object via Copy (`linked: false`, fresh contents that edit
|
|
1994
|
+
* independently) or a linked duplicate (`linked: true`, shared contents), directly above.
|
|
1995
|
+
*/
|
|
1996
|
+
declare function copySmartObject(layers: readonly ImageLayer[], id: string, linked: boolean, name?: string): {
|
|
1997
|
+
layers: ImageLayer[];
|
|
1998
|
+
layer: SmartObjectLayer;
|
|
1999
|
+
};
|
|
2000
|
+
/** Ids of the smart objects in the stack placed from contents `contentsId` (linked instances), bottom first. */
|
|
2001
|
+
declare function instancesOf(layers: readonly ImageLayer[], contentsId: string): string[];
|
|
2002
|
+
/**
|
|
2003
|
+
* Puts new contents into every instance of `contentsId` and renders them again. With
|
|
2004
|
+
* `keepPlacement` false (Replace Contents of a different size), each instance keeps its scale and
|
|
2005
|
+
* rotation about the contents' centre, and a warp is stretched to the new size.
|
|
2006
|
+
*/
|
|
2007
|
+
declare function replaceContents(layers: readonly ImageLayer[], contentsId: string, contents: SmartContents, canvas: SmartCanvas): {
|
|
2008
|
+
layers: ImageLayer[];
|
|
2009
|
+
ids: string[];
|
|
2010
|
+
};
|
|
2011
|
+
/** A clean smart filter from loose input: a `develop` or `blur` filter plus blend and opacity. */
|
|
2012
|
+
declare function normalizeSmartFilter(raw: Record<string, unknown> & {
|
|
2013
|
+
kind: string;
|
|
2014
|
+
}, id?: string): SmartFilter;
|
|
2015
|
+
/** Adds a smart filter at `index` (default the top). Returns the stack and the filter. */
|
|
2016
|
+
declare function addSmartFilter(layers: readonly ImageLayer[], id: string, filter: SmartFilter, canvas: SmartCanvas, index?: number): {
|
|
2017
|
+
layers: ImageLayer[];
|
|
2018
|
+
layer: SmartObjectLayer;
|
|
2019
|
+
filter: SmartFilter;
|
|
2020
|
+
};
|
|
2021
|
+
/** Changes one smart filter (settings, enabled, blend, opacity; validated). */
|
|
2022
|
+
declare function updateSmartFilter(layers: readonly ImageLayer[], id: string, filterId: string, changes: Record<string, unknown>, canvas: SmartCanvas): {
|
|
2023
|
+
layers: ImageLayer[];
|
|
2024
|
+
layer: SmartObjectLayer;
|
|
2025
|
+
filter: SmartFilter;
|
|
2026
|
+
};
|
|
2027
|
+
/** Removes one smart filter. */
|
|
2028
|
+
declare function removeSmartFilter(layers: readonly ImageLayer[], id: string, filterId: string, canvas: SmartCanvas): {
|
|
2029
|
+
layers: ImageLayer[];
|
|
2030
|
+
layer: SmartObjectLayer;
|
|
2031
|
+
};
|
|
2032
|
+
/** Moves one smart filter to `index` (0 = bottom, applied first). */
|
|
2033
|
+
declare function moveSmartFilter(layers: readonly ImageLayer[], id: string, filterId: string, index: number, canvas: SmartCanvas): {
|
|
2034
|
+
layers: ImageLayer[];
|
|
2035
|
+
layer: SmartObjectLayer;
|
|
2036
|
+
};
|
|
2037
|
+
/** Turns the whole smart filter stack on or off (each filter keeps its own switch). */
|
|
2038
|
+
declare function setSmartFiltersEnabled(layers: readonly ImageLayer[], id: string, enabled: boolean, canvas: SmartCanvas): {
|
|
2039
|
+
layers: ImageLayer[];
|
|
2040
|
+
layer: SmartObjectLayer;
|
|
2041
|
+
};
|
|
2042
|
+
/** Sets or removes (`null`) the smart filter mask. */
|
|
2043
|
+
declare function setSmartFilterMask(layers: readonly ImageLayer[], id: string, mask: RasterMask | null, canvas: SmartCanvas): {
|
|
2044
|
+
layers: ImageLayer[];
|
|
2045
|
+
layer: SmartObjectLayer;
|
|
2046
|
+
};
|
|
2047
|
+
/** A smart object's filter mask surface replaced (painting it), rendered again. */
|
|
2048
|
+
declare function withFilterMaskSurface(layer: SmartObjectLayer, surface: PixelSurface, canvas: SmartCanvas): SmartObjectLayer;
|
|
2049
|
+
/** The transformed outline of a smart object's contents (document bounds, warp included). */
|
|
2050
|
+
declare function placementBounds(layer: Pick<SmartObjectLayer, 'contents' | 'placement'>): CropBox | null;
|
|
2051
|
+
|
|
2052
|
+
/**
|
|
2053
|
+
* Provider effects in the image editor (see `@pixerate/editor/effects`): `effect` smart filters on
|
|
2054
|
+
* smart objects, and effect layers (pixel layers drawn from a generator or overlay effect at the
|
|
2055
|
+
* document's size and depth).
|
|
2056
|
+
*
|
|
2057
|
+
* Smart filters render synchronously (`applySmartFilters`). An effect filter asks this engine for
|
|
2058
|
+
* its result: a cached one is used at once; a missing one is rendered in the background while the
|
|
2059
|
+
* filter passes its pixels through and the surface is marked incomplete. When the render lands,
|
|
2060
|
+
* the controller renders the smart object again (a cache refresh, not an undo step).
|
|
2061
|
+
*/
|
|
2062
|
+
|
|
2063
|
+
/** Which uses each place in the image editor takes. */
|
|
2064
|
+
declare const IMAGE_EFFECT_PLACES: {
|
|
2065
|
+
/** A smart filter: the effect changes the pixels below it. */
|
|
2066
|
+
readonly filter: readonly ["filter"];
|
|
2067
|
+
/** An effect layer: drawn at the document's size. */
|
|
2068
|
+
readonly layer: readonly ["generator", "overlay", "title"];
|
|
2069
|
+
};
|
|
2070
|
+
type ImageEffectPlace = keyof typeof IMAGE_EFFECT_PLACES;
|
|
2071
|
+
/** Refuses an effect that cannot go in `place`, saying what to use instead. */
|
|
2072
|
+
declare function checkImageEffectPlace(d: EffectDescription, place: ImageEffectPlace): void;
|
|
2073
|
+
/**
|
|
2074
|
+
* Pixels from a provider as a layer surface at `depth`: 8-bit data, or deep samples from the
|
|
2075
|
+
* provider's linear float (16-bit as encoded codes, 32-bit as linear light).
|
|
2076
|
+
*/
|
|
2077
|
+
declare function effectPixelsToSurface(p: EffectPixels, depth: 8 | 16 | 32): PixelSurface;
|
|
2078
|
+
interface ImageEffectsEngineOptions {
|
|
2079
|
+
/** The provider slot to follow (a controller passes its own). Default: a new one. */
|
|
2080
|
+
slot?: EffectsSlot;
|
|
2081
|
+
/** Smart filter results kept (default 24). */
|
|
2082
|
+
maxEntries?: number;
|
|
2083
|
+
/** Live renderers kept (default 4): GPU providers hold a graphics context each (see `EffectRendererPool`). */
|
|
2084
|
+
maxRenderers?: number;
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Renders provider effects for one image editor and keeps smart filter results. Follows the
|
|
2088
|
+
* provider slot: with no provider effect filters pass pixels through, and a new provider clears
|
|
2089
|
+
* the results and disposes the old renderers.
|
|
2090
|
+
*/
|
|
2091
|
+
declare class ImageEffectsEngine implements SmartEffectResolver {
|
|
2092
|
+
readonly slot: EffectsSlot;
|
|
2093
|
+
private readonly cache;
|
|
2094
|
+
private readonly pending;
|
|
2095
|
+
private readonly failures;
|
|
2096
|
+
private readonly pool;
|
|
2097
|
+
private readonly descriptions;
|
|
2098
|
+
private readonly listeners;
|
|
2099
|
+
private readonly maxEntries;
|
|
2100
|
+
private generation;
|
|
2101
|
+
private readonly detach;
|
|
2102
|
+
constructor(options?: ImageEffectsEngineOptions);
|
|
2103
|
+
get provider(): EffectProvider | null;
|
|
2104
|
+
/** See `SmartEffectResolver.token`: bumped when the provider changes. */
|
|
2105
|
+
get token(): number;
|
|
2106
|
+
/** True while a render is under way. */
|
|
2107
|
+
get busy(): boolean;
|
|
2108
|
+
/** See `SmartEffectResolver`. */
|
|
2109
|
+
resolve(filter: EffectSmartFilter, input: Uint8ClampedArray, width: number, height: number, key: string): {
|
|
2110
|
+
result: Uint8ClampedArray | null;
|
|
2111
|
+
pending: boolean;
|
|
2112
|
+
};
|
|
2113
|
+
/** A filter effect over `source`: its result, or (for an overlay) the effect drawn over it. */
|
|
2114
|
+
private filter;
|
|
2115
|
+
/**
|
|
2116
|
+
* Renders a generator or overlay effect at a size and depth (an effect layer's pixels). Rejects
|
|
2117
|
+
* with the provider's error, or without a provider.
|
|
2118
|
+
*/
|
|
2119
|
+
renderLayer(effect: string, values: Record<string, EffectValue>, size: {
|
|
2120
|
+
width: number;
|
|
2121
|
+
height: number;
|
|
2122
|
+
depth?: 8 | 16 | 32;
|
|
2123
|
+
time?: number;
|
|
2124
|
+
}): Promise<EffectPixels>;
|
|
2125
|
+
/** Why the result for `key` failed, if it did. */
|
|
2126
|
+
failure(key: string): Error | undefined;
|
|
2127
|
+
/** Every failure so far. */
|
|
2128
|
+
failuresList(): {
|
|
2129
|
+
key: string;
|
|
2130
|
+
error: Error;
|
|
2131
|
+
}[];
|
|
2132
|
+
/** Resolves when nothing is rendering. */
|
|
2133
|
+
idle(): Promise<void>;
|
|
2134
|
+
/** The provider's description of an effect, fetched once per provider. */
|
|
2135
|
+
describe(provider: EffectProvider, id: string): Promise<EffectDescription>;
|
|
2136
|
+
private render;
|
|
2137
|
+
/** Forgets every result and failure and disposes the renderers. */
|
|
2138
|
+
reset(): void;
|
|
2139
|
+
subscribe(listener: () => void): () => void;
|
|
2140
|
+
private notify;
|
|
2141
|
+
destroy(): void;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
1701
2144
|
/** A refused layer operation; the message says why and how to fix it. */
|
|
1702
2145
|
declare class LayerOperationError extends Error {
|
|
1703
2146
|
constructor(message: string);
|
|
@@ -1972,7 +2415,7 @@ interface ShapeEnv {
|
|
|
1972
2415
|
pattern?(id: string): EffectPattern | null;
|
|
1973
2416
|
}
|
|
1974
2417
|
/** Subpaths with every anchor and handle mapped by `f` (live corners are cut first, then mapped). */
|
|
1975
|
-
declare function mapSubpaths(subpaths: readonly VectorSubpath[], f: (p: Vec2) => Vec2): VectorSubpath[];
|
|
2418
|
+
declare function mapSubpaths(subpaths: readonly VectorSubpath[], f: (p: Vec2$1) => Vec2$1): VectorSubpath[];
|
|
1976
2419
|
/** The subpaths a live shape describes, in document pixels. */
|
|
1977
2420
|
declare function liveShapeSubpaths(live: LiveShape): VectorSubpath[];
|
|
1978
2421
|
/** A component drawn as a live shape. */
|
|
@@ -2043,7 +2486,7 @@ declare function updateShapeLayer(layers: readonly ImageLayer[], id: string, cha
|
|
|
2043
2486
|
layer: ShapeLayer;
|
|
2044
2487
|
};
|
|
2045
2488
|
/** Moves every component of a shape by `f` (a document-space point map); `affine` keeps live shapes live. */
|
|
2046
|
-
declare function transformShapeComponents(components: readonly ShapeComponent[], f: (p: Vec2) => Vec2, affine?: AffineMatrix): ShapeComponent[];
|
|
2489
|
+
declare function transformShapeComponents(components: readonly ShapeComponent[], f: (p: Vec2$1) => Vec2$1, affine?: AffineMatrix): ShapeComponent[];
|
|
2047
2490
|
/** A shape moved by (dx, dy), rendered again. */
|
|
2048
2491
|
declare function offsetShape(layer: ShapeLayer, dx: number, dy: number, env: ShapeEnv): ShapeLayer;
|
|
2049
2492
|
/** Merge Shape Components: the combined area as one `combine` component (live shapes become paths). */
|
|
@@ -2060,124 +2503,6 @@ declare function annotationBlend(a: Annotation, layerBlend: string): BlendMode;
|
|
|
2060
2503
|
/** The annotation a migrated shape layer still is (its blend read from the layer). */
|
|
2061
2504
|
declare function annotationOfShape(layer: ShapeLayer): Annotation | null;
|
|
2062
2505
|
|
|
2063
|
-
/**
|
|
2064
|
-
* Free Transform geometry for the image editor, as pure functions both the UI bindings and the
|
|
2065
|
-
* agent tools use: a transform is the frame being transformed (`box`, document pixels), where its
|
|
2066
|
-
* four corners land (`corners`, TL, TR, BR, BL) and an optional warp mesh over the box. Scale,
|
|
2067
|
-
* rotate, skew and flips keep the corners a parallelogram (an affine map); Distort and Perspective
|
|
2068
|
-
* move them freely (a projective map); Warp bends the box through a Bézier mesh before the corner
|
|
2069
|
-
* map.
|
|
2070
|
-
*
|
|
2071
|
-
* The maths (homographies, meshes, presets) is shared with the vector editor in `src/geom`.
|
|
2072
|
-
*/
|
|
2073
|
-
|
|
2074
|
-
/** Free Transform modes (Edit › Transform). Scale, rotate and skew stay affine. */
|
|
2075
|
-
type FreeTransformMode = 'scale' | 'rotate' | 'skew' | 'distort' | 'perspective' | 'warp';
|
|
2076
|
-
declare const FREE_TRANSFORM_MODES: readonly FreeTransformMode[];
|
|
2077
|
-
/** The nine reference-point positions of the options bar's locator, over the transformed box. */
|
|
2078
|
-
type TransformAnchor = 'top-left' | 'top' | 'top-right' | 'left' | 'center' | 'right' | 'bottom-left' | 'bottom' | 'bottom-right';
|
|
2079
|
-
declare const TRANSFORM_ANCHORS: readonly TransformAnchor[];
|
|
2080
|
-
declare function isTransformAnchor(value: unknown): value is TransformAnchor;
|
|
2081
|
-
/** A transform in progress: the frame, where its corners go and an optional warp over the frame. */
|
|
2082
|
-
interface FreeTransformGeometry {
|
|
2083
|
-
/** The frame being transformed, in document pixels (the content bounds when it began). */
|
|
2084
|
-
box: CropBox;
|
|
2085
|
-
/** Where the frame's corners land: top-left, top-right, bottom-right, bottom-left (document pixels). */
|
|
2086
|
-
corners: Quad;
|
|
2087
|
-
/**
|
|
2088
|
-
* A warp applied in the frame's own space before the corner map: its control points are in
|
|
2089
|
-
* document pixels of the untransformed frame (`identityWarpMesh(box)` is no warp).
|
|
2090
|
-
*/
|
|
2091
|
-
warp?: WarpMesh | null;
|
|
2092
|
-
}
|
|
2093
|
-
/** The untransformed geometry of a box. */
|
|
2094
|
-
declare function identityTransform(box: CropBox): FreeTransformGeometry;
|
|
2095
|
-
/** Where `box`'s corners go under the affine `m`. */
|
|
2096
|
-
declare function cornersFromMatrix(box: CropBox, m: AffineMatrix): Quad;
|
|
2097
|
-
/** The affine matrix taking `box` onto `corners` when they form a parallelogram, else `null`. */
|
|
2098
|
-
declare function matrixFromCorners(box: CropBox, corners: Quad, eps?: number): AffineMatrix | null;
|
|
2099
|
-
/** The projective map of the corner move (box → corners), or `null` when the corners are degenerate. */
|
|
2100
|
-
declare function transformHomography(geometry: FreeTransformGeometry): Homography | null;
|
|
2101
|
-
/** Whether a warp mesh changes anything (not the identity over the box). */
|
|
2102
|
-
declare function hasWarp(geometry: FreeTransformGeometry): boolean;
|
|
2103
|
-
/** Whether the geometry changes nothing. */
|
|
2104
|
-
declare function isIdentityTransform(geometry: FreeTransformGeometry): boolean;
|
|
2105
|
-
/**
|
|
2106
|
-
* The forward map of the whole transform (document pixels of the source → document pixels of the
|
|
2107
|
-
* result): the warp over the box, then the corner map. `null` where it is undefined.
|
|
2108
|
-
*/
|
|
2109
|
-
declare function transformMap(geometry: FreeTransformGeometry): ((p: Vec2$1) => Vec2$1 | null) | null;
|
|
2110
|
-
/** A point of the transformed box at box fractions (`fx`, `fy`), warp included. */
|
|
2111
|
-
declare function transformedPoint(geometry: FreeTransformGeometry, fx: number, fy: number): Vec2$1 | null;
|
|
2112
|
-
/** Where an anchor of the box is after the corner map (the warp ignored). */
|
|
2113
|
-
declare function anchorPoint(geometry: FreeTransformGeometry, anchor: TransformAnchor): Vec2$1;
|
|
2114
|
-
/** Bounds of the transformed result's outline (document pixels, not rounded). */
|
|
2115
|
-
declare function transformedBox(geometry: FreeTransformGeometry): CropBox | null;
|
|
2116
|
-
/** Free Transform as numbers, as Photoshop's options bar shows it. */
|
|
2117
|
-
interface TransformParams {
|
|
2118
|
-
/** Width in percent of the frame (default 100; negative flips). */
|
|
2119
|
-
scaleX?: number;
|
|
2120
|
-
/** Height in percent of the frame (default 100; negative flips). */
|
|
2121
|
-
scaleY?: number;
|
|
2122
|
-
/** Rotation in degrees, clockwise (default 0). */
|
|
2123
|
-
rotate?: number;
|
|
2124
|
-
/** Horizontal skew in degrees: vertical edges lean right for positive angles (default 0). */
|
|
2125
|
-
skewX?: number;
|
|
2126
|
-
/** Vertical skew in degrees: horizontal edges lean down for positive angles (default 0). */
|
|
2127
|
-
skewY?: number;
|
|
2128
|
-
/** Move after scaling and rotating, in document pixels (default 0). */
|
|
2129
|
-
dx?: number;
|
|
2130
|
-
dy?: number;
|
|
2131
|
-
/** The fixed point of scale, skew and rotation: an anchor of the frame or a document point (default the centre). */
|
|
2132
|
-
reference?: TransformAnchor | Vec2$1;
|
|
2133
|
-
}
|
|
2134
|
-
/** The reference point of params over a box (default its centre). */
|
|
2135
|
-
declare function referencePoint(box: CropBox, reference: TransformParams['reference']): Vec2$1;
|
|
2136
|
-
/**
|
|
2137
|
-
* The affine matrix of `params` over `box`: about the reference point, skew, then scale, then
|
|
2138
|
-
* rotate; then the move.
|
|
2139
|
-
*/
|
|
2140
|
-
declare function matrixFromParams(box: CropBox, params: TransformParams): AffineMatrix;
|
|
2141
|
-
/** What the options bar shows for a transform. */
|
|
2142
|
-
interface TransformReadout {
|
|
2143
|
-
/** False for Distort, Perspective and Warp: only `bounds` and `corners` then mean anything. */
|
|
2144
|
-
affine: boolean;
|
|
2145
|
-
/** Width and height in percent of the frame. */
|
|
2146
|
-
scaleX: number;
|
|
2147
|
-
scaleY: number;
|
|
2148
|
-
/** Rotation in degrees, clockwise, in (−180, 180]. */
|
|
2149
|
-
rotate: number;
|
|
2150
|
-
/** Horizontal skew in degrees (vertical skew is folded into rotation and scale). */
|
|
2151
|
-
skewX: number;
|
|
2152
|
-
/** Where the reference point is now (document pixels). */
|
|
2153
|
-
x: number;
|
|
2154
|
-
y: number;
|
|
2155
|
-
/** Bounds of the transformed outline. */
|
|
2156
|
-
bounds: CropBox | null;
|
|
2157
|
-
corners: Quad;
|
|
2158
|
-
}
|
|
2159
|
-
/**
|
|
2160
|
-
* Decomposes a transform for the options bar: the linear part as rotate · scale · skew (QR) with
|
|
2161
|
-
* the given reference point. Non-affine geometry reports its bounds and corners only.
|
|
2162
|
-
*/
|
|
2163
|
-
declare function describeTransform(geometry: FreeTransformGeometry, reference?: TransformParams['reference']): TransformReadout;
|
|
2164
|
-
/**
|
|
2165
|
-
* Corners for a transform given as numbers relative to the current corners: `params` are applied
|
|
2166
|
-
* after the current affine part (when the corners are a parallelogram) about the reference point
|
|
2167
|
-
* of the current geometry, so typing "rotate 15" rotates the box as it is now.
|
|
2168
|
-
*/
|
|
2169
|
-
declare function applyParams(geometry: FreeTransformGeometry, params: TransformParams): Quad;
|
|
2170
|
-
/** Flip of the corners about the box's centre line (horizontal: left ↔ right). */
|
|
2171
|
-
declare function flipCorners(geometry: FreeTransformGeometry, axis: 'horizontal' | 'vertical'): Quad;
|
|
2172
|
-
/** Inverse of `matrixFromCorners` (box space → document) for mapping a document point back into the box. */
|
|
2173
|
-
declare function boxPointOf(geometry: FreeTransformGeometry, p: Vec2$1): Vec2$1 | null;
|
|
2174
|
-
/** A warp mesh from a preset over the box (null when it changes nothing). */
|
|
2175
|
-
declare function presetWarp(box: CropBox, preset: WarpPreset): WarpMesh | null;
|
|
2176
|
-
/** Validates a warp mesh for a box: well formed, finite, the right number of points. */
|
|
2177
|
-
declare function isValidWarp(mesh: unknown): mesh is WarpMesh;
|
|
2178
|
-
/** The geometry's affine map when it is one (no warp, a parallelogram), as a homography; else the projective map. */
|
|
2179
|
-
declare function geometryHomography(geometry: FreeTransformGeometry): Homography | null;
|
|
2180
|
-
|
|
2181
2506
|
/**
|
|
2182
2507
|
* Free Transform sessions: what a transform moves (a layer's pixels with its linked mask, a lone
|
|
2183
2508
|
* unlinked mask, the selected pixels as a floating piece, a copy of them on a new layer, or just
|
|
@@ -2850,6 +3175,11 @@ declare class ImageEditorController {
|
|
|
2850
3175
|
private viewKey;
|
|
2851
3176
|
/** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
|
|
2852
3177
|
private compositor;
|
|
3178
|
+
/** The effects provider slot (see `setEffectsProvider`). */
|
|
3179
|
+
readonly effects: EffectsSlot;
|
|
3180
|
+
/** Renders provider effects: effect smart filter results and effect layers. */
|
|
3181
|
+
readonly effectsEngine: ImageEffectsEngine;
|
|
3182
|
+
private effectRefresh;
|
|
2853
3183
|
constructor(options?: ImageEditorOptions);
|
|
2854
3184
|
/**
|
|
2855
3185
|
* Loads a new source image and makes it the baseline that `reset()` returns to.
|
|
@@ -2867,6 +3197,76 @@ declare class ImageEditorController {
|
|
|
2867
3197
|
*/
|
|
2868
3198
|
private pendingDirty;
|
|
2869
3199
|
private notify;
|
|
3200
|
+
private queueEffectRefresh;
|
|
3201
|
+
/**
|
|
3202
|
+
* Renders smart objects with effect filters again: every one (`all`, after the provider changed)
|
|
3203
|
+
* or those drawn while a result was rendering, once it is in. A cache refresh: no undo step.
|
|
3204
|
+
*/
|
|
3205
|
+
private refreshEffectSurfaces;
|
|
3206
|
+
/** The registered effects provider, or `null`. */
|
|
3207
|
+
get effectsProvider(): EffectProvider | null;
|
|
3208
|
+
/** Registers (or with `null` removes) the effects provider. Not an edit: no undo step. */
|
|
3209
|
+
setEffectsProvider(provider: EffectProvider | null): void;
|
|
3210
|
+
/** Registers `provider` and returns a function that removes it again (if it is still the one set). */
|
|
3211
|
+
useEffects(provider: EffectProvider): () => void;
|
|
3212
|
+
/** The provider's description of an effect, checked for `place` (rejects without a provider or for an unknown id). */
|
|
3213
|
+
describeEffect(effect: string, place?: ImageEffectPlace): Promise<EffectDescription>;
|
|
3214
|
+
/** Resolves when every effect render has landed and the surfaces waiting for them are drawn. */
|
|
3215
|
+
effectsIdle(): Promise<void>;
|
|
3216
|
+
/**
|
|
3217
|
+
* Applies a provider filter effect as a smart filter (at `index`, default the top), one undo
|
|
3218
|
+
* step. A pixel, shape or type layer (or a group) is first converted to a smart object in the
|
|
3219
|
+
* same step (Filter › Convert for Smart Filters), keeping its id when it is one layer. `values`
|
|
3220
|
+
* are checked against the effect's controls and stored over its defaults.
|
|
3221
|
+
*/
|
|
3222
|
+
applyEffectFilter(layerId: string, effect: string, options?: {
|
|
3223
|
+
values?: Record<string, EffectValue>;
|
|
3224
|
+
index?: number;
|
|
3225
|
+
enabled?: boolean;
|
|
3226
|
+
blend?: string;
|
|
3227
|
+
opacity?: number;
|
|
3228
|
+
}): Promise<{
|
|
3229
|
+
layerId: string;
|
|
3230
|
+
filter: SmartFilter;
|
|
3231
|
+
converted: boolean;
|
|
3232
|
+
}>;
|
|
3233
|
+
/**
|
|
3234
|
+
* Changes an effect smart filter: `values` merged over its own (`null` resets a control to the
|
|
3235
|
+
* effect's default), `enabled`, `blend`, `opacity` or its place in the stack (`index`). Values
|
|
3236
|
+
* are checked against the provider's controls. One undo step (none with `commitToHistory`
|
|
3237
|
+
* false, during a drag).
|
|
3238
|
+
*/
|
|
3239
|
+
updateEffectFilter(layerId: string, filterId: string, changes: {
|
|
3240
|
+
values?: Record<string, EffectValue | null>;
|
|
3241
|
+
enabled?: boolean;
|
|
3242
|
+
blend?: string;
|
|
3243
|
+
opacity?: number;
|
|
3244
|
+
index?: number;
|
|
3245
|
+
}, commitToHistory?: boolean): Promise<SmartFilter>;
|
|
3246
|
+
/**
|
|
3247
|
+
* Adds an effect layer: a pixel layer drawn by a provider generator, overlay or title effect at
|
|
3248
|
+
* the document's size and bit depth (at `time` ms, default 0), placed like `addPixelLayer`. One
|
|
3249
|
+
* undo step. Masks, blend and opacity apply as to any layer. Returns its id.
|
|
3250
|
+
*/
|
|
3251
|
+
addEffectLayer(effect: string, options?: LayerPlacement & {
|
|
3252
|
+
values?: Record<string, EffectValue>;
|
|
3253
|
+
name?: string;
|
|
3254
|
+
time?: number;
|
|
3255
|
+
opacity?: number;
|
|
3256
|
+
blend?: string;
|
|
3257
|
+
id?: string;
|
|
3258
|
+
}): Promise<string>;
|
|
3259
|
+
/**
|
|
3260
|
+
* Draws an effect layer again with new `values` (merged over its own; `null` resets a control)
|
|
3261
|
+
* or `time`, at the document's size and depth, replacing its pixels (painting on it is lost).
|
|
3262
|
+
* One undo step (none with `commitToHistory` false). Returns its effect settings.
|
|
3263
|
+
*/
|
|
3264
|
+
updateEffectLayer(layerId: string, changes: {
|
|
3265
|
+
values?: Record<string, EffectValue | null>;
|
|
3266
|
+
time?: number;
|
|
3267
|
+
}, commitToHistory?: boolean): Promise<NonNullable<PixelLayer['generator']>>;
|
|
3268
|
+
/** Turns an effect layer into a plain pixel layer keeping its pixels (one undo step). */
|
|
3269
|
+
rasterizeEffectLayer(layerId: string): void;
|
|
2870
3270
|
private displayFor;
|
|
2871
3271
|
/** Keeps the renderer's display transform in step with the document profile, mode and Proof Setup. */
|
|
2872
3272
|
private syncDisplay;
|
|
@@ -4244,6 +4644,7 @@ interface ExportOptions {
|
|
|
4244
4644
|
/** Render only these layers (groups with their children). */
|
|
4245
4645
|
layerIds?: string[];
|
|
4246
4646
|
}
|
|
4647
|
+
|
|
4247
4648
|
interface ImageEditorOptions {
|
|
4248
4649
|
/**
|
|
4249
4650
|
* What lays out and draws type layers. Default: the browser's fonts through Canvas 2D
|
|
@@ -4263,6 +4664,13 @@ interface ImageEditorOptions {
|
|
|
4263
4664
|
maxHistoryBytes?: number;
|
|
4264
4665
|
/** Viewport fit mode: 'contain' scales to full viewport bounds; 'margin' scales to 85% with 1.0 cap (default). */
|
|
4265
4666
|
fit?: ImageEditorFit;
|
|
4667
|
+
/**
|
|
4668
|
+
* An effects provider (see `@pixerate/editor/effects`) for effect smart filters and effect
|
|
4669
|
+
* layers. Optional: without one the editor behaves as before; documents keep their effects
|
|
4670
|
+
* (effect filters pass pixels through, effect layers keep their last pixels). Change it later
|
|
4671
|
+
* with `setEffectsProvider`.
|
|
4672
|
+
*/
|
|
4673
|
+
effects?: EffectProvider | null;
|
|
4266
4674
|
}
|
|
4267
4675
|
interface InpaintOptions {
|
|
4268
4676
|
prompt: string;
|
|
@@ -4318,4 +4726,4 @@ interface PsdExportResult {
|
|
|
4318
4726
|
/** Writes the prepared stack as PSD (or PSB) bytes. */
|
|
4319
4727
|
declare function exportPsd(input: PsdExportInput): PsdExportResult;
|
|
4320
4728
|
|
|
4321
|
-
export { type AdjustmentLayerBase as $, type AdjustmentKind as A, LayerCompositor as B, type CurvePoint as C, type DepthMaskOptions as D, type SmartFilterStack as E, type SmartFilter as F, type SmartObjectLayer as G, type HueRange as H, type ImageEditorAssetStore as I, type SmartContents as J, type SmartDocument as K, type LevelsChannel as L, type SmartPlacement as M, type FreeTransformGeometry as N, type LiveShapeKind as O, type PsdExportResult as P, type TypeLayerInfo as Q, type RefineEdgeParams as R, type SerializedLayer as S, type TextEnv as T, type LayerPlacement as U, type FreeTransformMode as V, type FreeTransformResult as W, FreeTransformSession as X, type FreeTransformInit as Y, type TransformAnchor as Z, type AIResultOptions as _, type ImageAdjustments as a, type LayerProperties as a$, type AdjustmentLayerInit as a0, type AdjustmentLayerUpdate as a1, type AnnotationPlacement as a2, type AnnotationType as a3, type ArrowAnnotation as a4, type AspectRatio as a5, type BaseAnnotation as a6, type BlackWhiteParams as a7, type BlurFilter as a8, type CircleAnnotation as a9, GUIDED_FILTER_EPS as aA, type GroupLayer as aB, HISTOGRAM_BINS as aC, type HistogramChannel as aD, type HistoryEntryHandle as aE, type HueSaturationParams as aF, IMAGE_EDITOR_SCHEMA_VERSION as aG, type ImageAnnotation as aH, type ImageDimensions as aI, type ImageEditorAIHooks as aJ, type ImageEditorFit as aK, type ImageEditorOptions as aL, ImageEditorRenderer as aM, type ImageEditorState as aN, type ImageEditorTool as aO, type ImageLayerType as aP, type InpaintHook as aQ, type InpaintOptions as aR, type InvertParams as aS, LAYERED_SCHEMA_VERSION as aT, LIVE_SHAPE_KINDS as aU, type LayerBase as aV, type LayerBlendMode as aW, type LayerFilterKind as aX, type LayerLocation as aY, type LayerMaskProps as aZ, LayerOperationError as a_, type CloneSource as aa, type ColorBalanceParams as ab, type ColorBalanceTone as ac, type ColorRangeOptions as ad, type ColorRangeSample as ae, type CreateAnnotationPayload as af, type CropHandle as ag, type CurvesParams as ah, DEFAULT_ADJUSTMENTS as ai, DEFAULT_DEPTH_MASK as aj, DEFAULT_MITER_LIMIT as ak, DEFAULT_PROOF as al, DEFAULT_REFINE_EDGE_PARAMS as am, DEFAULT_TRANSFORM as an, type DeserializeContext as ao, type DevelopSettings as ap, type DocumentColorMode as aq, type DocumentColorProfile as ar, EMPTY_DISTANCE as as, type ExportOptions as at, FREE_TRANSFORM_CONTENTS as au, FREE_TRANSFORM_MODES as av, type FillOptions as aw, type FreeTransformContent as ax, type FreeTransformHost as ay, type FreeTransformPreview as az, type SerializedImageEditorState as b, type SerializedSmartContents as b$, type LayerSourcesHost as b0, type LayerTarget as b1, type LegacySerializedImageEditorState as b2, type LevelsParams as b3, type LineAnnotation as b4, type LiveShape as b5, type MagicWandOptions as b6, type MixerStrokeInit as b7, PARAGRAPH_STYLE_FIELDS as b8, PSD_BLEND_KEYS as b9, type RemoveBackgroundHook as bA, type RemoveBackgroundOptions as bB, type RenderOptions as bC, type RetouchStrokeInit as bD, type RetouchTool as bE, SELECTION_MODES as bF, SELECTION_MODIFY_OPS as bG, SHAPE_OPERATIONS as bH, SHAPE_RENDER_MARGIN as bI, type SampleOptions as bJ, type SelectionChannel as bK, type SelectionCommandOptions as bL, type SelectionModifyOp as bM, type SerializeContext as bN, type SerializedAdjustmentLayer as bO, type SerializedAnnotationLayer as bP, type SerializedColorMode as bQ, type SerializedColorProfile as bR, type SerializedDeepPixels as bS, type SerializedGroupLayer as bT, type SerializedLayerEffects as bU, type SerializedLayeredImageEditorState as bV, type SerializedPattern as bW, type SerializedPixelLayer as bX, type SerializedRasterMask as bY, type SerializedSelection as bZ, type SerializedShapeLayer as b_, type PaintOptions as ba, type PaintStrokeResult as bb, PaintStrokeSession as bc, type PenAnnotation as bd, type PhotoFilterParams as be, type PixelBuffer as bf, type PixelLayerInit as bg, type PixelTransform as bh, type PosterizeParams as bi, type ProofSetup as bj, type PsdChannel as bk, type PsdExportInput as bl, type PsdFile as bm, type PsdHeader as bn, type PsdImportOptions as bo, type PsdImportResult as bp, type PsdLayerMask as bq, type PsdLayerRecord as br, type PsdLayerSummary as bs, type PsdRect as bt, type PsdResource as bu, type PsdSmartFilter as bv, type PsdTaggedBlock as bw, type PsdTreeNode as bx, RETOUCH_TOOLS as by, type RectAnnotation as bz, type AdjustmentLayer as c, contractCoverage as c$, type SerializedSmartFilter as c0, type SerializedSmartObjectLayer as c1, type SerializedTypeLayer as c2, type ShapeArrowhead as c3, type ShapeComponent as c4, type ShapeEnv as c5, type ShapeFillRule as c6, type ShapeGeometryInput as c7, type ShapeLayerData as c8, type ShapeLayerInfo as c9, type TypePsdData as cA, type VibranceParams as cB, type ViewportMetrics as cC, addLayerEffect as cD, addLayerFilter as cE, adjustmentNodeAsLayer as cF, anchorPoint as cG, annotationBlend as cH, annotationOfShape as cI, annotationOfType as cJ, applyImageProjectionToContext as cK, applyParams as cL, blurFilter as cM, borderCoverage as cN, boxMean as cO, boxPointOf as cP, buildLayerMaskPlanes as cQ, calculateCropDrag as cR, canvasToImagePoint as cS, clampCropToImage as cT, colorModePlanes as cU, colorRange as cV, combineSelections as cW, componentPath as cX, compositeDeep as cY, computeHistogram as cZ, computeSelectionBounds as c_, type ShapeLayerInit as ca, type ShapeLineCap as cb, type ShapeLineJoin as cc, type ShapeOperation as cd, type ShapePaint as ce, type ShapePsdData as cf, type ShapeSelectionOptions as cg, type ShapeStroke as ch, type ShapeStrokeAlign as ci, type ShapeStrokeInput as cj, type SmartFilterKind as ck, type SmartObjectInfo as cl, type SmartPsdData as cm, type StrokeInit as cn, type StrokeTool as co, TEXT_RENDER_MARGIN as cp, TEXT_STYLE_FIELDS as cq, TONE_RANGE_PRESETS as cr, TRANSFORM_ANCHORS as cs, type TextAnnotation as ct, type TextLayerInit as cu, type ThresholdParams as cv, type ToneRangePreset as cw, type TransformParams as cx, type TransformReadout as cy, type TypeLayerData as cz, type AdjustmentParamsMap as d, isActiveFilter as d$, convertHex as d0, convertSurfaceColors as d1, cornersFromMatrix as d2, coverageToByte as d3, createSelectionMask as d4, createShapeLayer as d5, createTypeLayer as d6, decodeDeepSurface as d7, decodeLayerChannel as d8, decodeLayerMask as d9, expandCoverage as dA, exportPsd as dB, featherCoverage as dC, flipCorners as dD, fullSelection as dE, geometryHomography as dF, getAnnotationBounds as dG, getCropCursor as dH, getRotatedSize as dI, getViewportMetrics as dJ, getViewportProjection as dK, globalImageCache as dL, greyMorphology as dM, groupLayers as dN, guidePlanes as dO, guidedFilterColor as dP, hasSurface as dQ, hasWarp as dR, hashMaskContent as dS, histogramPath as dT, hitTestAnnotation as dU, hitTestCrop as dV, hueRange as dW, identityTransform as dX, imageToCanvasPoint as dY, importPsd as dZ, invertSelection as d_, decodeMergedImage as da, decodePngDataUrl as db, decodeSelectionRle as dc, defaultShapeName as dd, depthMaskAlpha as de, describeTransform as df, deserializeColorMode as dg, deserializeColorProfile as dh, deserializeEffects as di, deserializeLayer as dj, deserializeLayers as dk, deserializePatterns as dl, deserializeSelection as dm, developFilter as dn, displayTransform as dp, distanceTransform as dq, documentProfile as dr, duplicateLayer as ds, edgeWidth as dt, effectiveProof as du, ellipsePoints as dv, ellipseSelection as dw, encodeDeepSurface as dx, encodeSelectionRle as dy, encodeSurface as dz, type AdjustmentLayerMask as e, refineCoverage as e$, isIdentityTransform as e0, isQuarterTurnSwapped as e1, isRenderedLayer as e2, isRetouchTool as e3, isSelectionEmpty as e4, isSelectionMode as e5, isSpatialFilter as e6, isSrgb as e7, isTransformAnchor as e8, isValidWarp as e9, normalizeShapePaint as eA, normalizeShapeStroke as eB, normalizeStoredAdjustments as eC, normalizeSubpaths as eD, normalizeText as eE, offsetLayer as eF, offsetShape as eG, parseBlend as eH, parseColor as eI, parseSelectionMode as eJ, patchParagraphStyle as eK, patchTextStyle as eL, pixelLayerBounds as eM, pixelLayers as eN, placeLayer as eO, polygonCoverage as eP, polygonSelection as eQ, presetWarp as eR, previewStep as eS, profileBytes as eT, projectImagePoint as eU, projectImageRect as eV, projectMaskCoverage as eW, psdToLayers as eX, readPsd as eY, rectSelection as eZ, referencePoint as e_, layerEffectsOf as ea, layerMaskCoverage as eb, layerMaskFromSelection as ec, layerMaskKey as ed, layerName as ee, layerTree as ef, layerTypeLabel as eg, liveComponent as eh, liveShapeSubpaths as ei, magicWand as ej, mapCropHandle as ek, mapSubpaths as el, matrixFromCorners as em, matrixFromParams as en, mergeShapeComponents as eo, migrateSerializedImageEditorState as ep, migrateToLayeredState as eq, modifySelection as er, moveLayer as es, newLayerId as et, normalizeAngle as eu, normalizeFilter as ev, normalizeLayerMask as ew, normalizeLiveShape as ex, normalizeRect as ey, normalizeRefineEdgeParams as ez, type AdjustmentLayerOf as f, typeAsPixelLayer as f$, refineEdgeHalo as f0, refineSelection as f1, removeLayer as f2, removeLayerEffect as f3, removeLayerFilter as f4, renderShape as f5, renderShapeRect as f6, renderText as f7, replaceTextRange as f8, requireLayer as f9, serializeSelection as fA, setLayerEffects as fB, setLayerEffectsEnabled as fC, setLayerMask as fD, setLayerProperties as fE, shapeAsPixelLayer as fF, shapeFromAnnotation as fG, shapeGeometryBounds as fH, shapeLayers as fI, shapeOutline as fJ, shapeRenderClip as fK, shiftCoverage as fL, smartObjectLayers as fM, smoothCoverage as fN, srgb8ToLab as fO, textMatrix as fP, textOutlines as fQ, textRange as fR, toHex as fS, toTextSpace as fT, toneRange as fU, transformHomography as fV, transformMap as fW, transformShapeComponents as fX, transformTypeLayer as fY, transformedBox as fZ, transformedPoint as f_, requireOperation as fa, requireShapeLayer as fb, requireTypeLayer as fc, requireUnlocked as fd, rerenderShape as fe, rerenderText as ff, resizePixels as fg, resizeSelection as fh, resolveExternalAssets as fi, resolveProfile as fj, runLayerFilters as fk, runLayerFiltersFloat as fl, selectionArea as fm, selectionFromCoverage as fn, selectionFromPixels as fo, selectionToCoverage as fp, selectionToPixels as fq, selectionValueAt as fr, serializeColorMode as fs, serializeColorProfile as ft, serializeContents as fu, serializeEffects as fv, serializeLayer as fw, serializeLayers as fx, serializeLayersExternal as fy, serializePatterns as fz, ImageEditorController as g, typeFrame as g0, typeFromAnnotation as g1, typeLayerName as g2, ungroupLayer as g3, unionRect as g4, unprojectCanvasPoint as g5, updateLayerEffect as g6, updateLayerFilter as g7, updateLayerMaskProps as g8, updateShapeLayer as g9, updateTypeLayer as ga, withNewIds as gb, writePsd as gc, type SelectionMask as h, type SelectionMode as i, type ColorDistance as j, type ImagePoint as k, type ImageLayer as l, type CropBox as m, type RasterMask as n, type Annotation as o, type AdjustmentLayerNode as p, type AnnotationLayer as q, type ShapeLayer as r, type TypeLayer as s, type LayerFilter as t, type PixelLayer as u, type DevelopFilter as v, type ImageTransform as w, type ImageHistogram as x, type ImageProjection as y, type CompositorSources as z };
|
|
4729
|
+
export { type AspectRatio as $, type AdjustmentKind as A, LayerCompositor as B, type CurvePoint as C, type DepthMaskOptions as D, type LiveShapeKind as E, type TypeLayerInfo as F, type SmartFilter as G, type HueRange as H, type ImageEditorAssetStore as I, type LayerPlacement as J, type FreeTransformMode as K, type LevelsChannel as L, type FreeTransformResult as M, FreeTransformSession as N, type FreeTransformInit as O, type PsdExportResult as P, type TransformAnchor as Q, type RefineEdgeParams as R, type SerializedLayer as S, type TextEnv as T, type AIResultOptions as U, type AdjustmentLayerBase as V, type AdjustmentLayerInit as W, type AdjustmentLayerUpdate as X, type AnnotationPlacement as Y, type AnnotationType as Z, type ArrowAnnotation as _, type ImageAdjustments as a, type LayerMaskProps as a$, type BaseAnnotation as a0, type BlackWhiteParams as a1, type BlurFilter as a2, type CircleAnnotation as a3, type CloneSource as a4, type ColorBalanceParams as a5, type ColorBalanceTone as a6, type ColorRangeOptions as a7, type ColorRangeSample as a8, type ConvertOptions as a9, type HistogramChannel as aA, type HistoryEntryHandle as aB, type HueSaturationParams as aC, IMAGE_EDITOR_SCHEMA_VERSION as aD, IMAGE_EFFECT_PLACES as aE, type ImageAnnotation as aF, type ImageDimensions as aG, type ImageEditorAIHooks as aH, type ImageEditorFit as aI, type ImageEditorOptions as aJ, ImageEditorRenderer as aK, type ImageEditorState as aL, type ImageEditorTool as aM, type ImageEffectGenerator as aN, type ImageEffectPlace as aO, ImageEffectsEngine as aP, type ImageEffectsEngineOptions as aQ, type ImageLayerType as aR, type InpaintHook as aS, type InpaintOptions as aT, type InvertParams as aU, LAYERED_SCHEMA_VERSION as aV, LIVE_SHAPE_KINDS as aW, type LayerBase as aX, type LayerBlendMode as aY, type LayerFilterKind as aZ, type LayerLocation as a_, type CreateAnnotationPayload as aa, type CropHandle as ab, type CurvesParams as ac, DEFAULT_ADJUSTMENTS as ad, DEFAULT_DEPTH_MASK as ae, DEFAULT_MITER_LIMIT as af, DEFAULT_PROOF as ag, DEFAULT_REFINE_EDGE_PARAMS as ah, DEFAULT_TRANSFORM as ai, type DeserializeContext as aj, type DevelopSettings as ak, type DocumentColorMode as al, type DocumentColorProfile as am, EMPTY_DISTANCE as an, type EffectSmartFilter as ao, type ExportOptions as ap, FREE_TRANSFORM_CONTENTS as aq, FREE_TRANSFORM_MODES as ar, type FillOptions as as, type FreeTransformContent as at, type FreeTransformGeometry as au, type FreeTransformHost as av, type FreeTransformPreview as aw, GUIDED_FILTER_EPS as ax, type GroupLayer as ay, HISTOGRAM_BINS as az, type SerializedImageEditorState as b, type SerializedRasterMask as b$, LayerOperationError as b0, type LayerProperties as b1, type LayerSourcesHost as b2, type LayerTarget as b3, type LegacySerializedImageEditorState as b4, type LevelsParams as b5, type LineAnnotation as b6, type LiveShape as b7, type MagicWandOptions as b8, type MixerStrokeInit as b9, RETOUCH_TOOLS as bA, type RectAnnotation as bB, type RemoveBackgroundHook as bC, type RemoveBackgroundOptions as bD, type RenderOptions as bE, type RetouchStrokeInit as bF, type RetouchTool as bG, SELECTION_MODES as bH, SELECTION_MODIFY_OPS as bI, SHAPE_OPERATIONS as bJ, SHAPE_RENDER_MARGIN as bK, SMART_RENDER_MARGIN as bL, type SampleOptions as bM, type SelectionChannel as bN, type SelectionCommandOptions as bO, type SelectionModifyOp as bP, type SerializeContext as bQ, type SerializedAdjustmentLayer as bR, type SerializedAnnotationLayer as bS, type SerializedColorMode as bT, type SerializedColorProfile as bU, type SerializedDeepPixels as bV, type SerializedGroupLayer as bW, type SerializedLayerEffects as bX, type SerializedLayeredImageEditorState as bY, type SerializedPattern as bZ, type SerializedPixelLayer as b_, PARAGRAPH_STYLE_FIELDS as ba, PSD_BLEND_KEYS as bb, type PaintOptions as bc, type PaintStrokeResult as bd, PaintStrokeSession as be, type PenAnnotation as bf, type PhotoFilterParams as bg, type PixelBuffer as bh, type PixelLayerInit as bi, type PixelTransform as bj, type PosterizeParams as bk, type ProofSetup as bl, type PsdChannel as bm, type PsdExportInput as bn, type PsdFile as bo, type PsdHeader as bp, type PsdImportOptions as bq, type PsdImportResult as br, type PsdLayerMask as bs, type PsdLayerRecord as bt, type PsdLayerSummary as bu, type PsdRect as bv, type PsdResource as bw, type PsdSmartFilter as bx, type PsdTaggedBlock as by, type PsdTreeNode as bz, type AdjustmentLayer as c, blurFilter as c$, type SerializedSelection as c0, type SerializedShapeLayer as c1, type SerializedSmartContents as c2, type SerializedSmartFilter as c3, type SerializedSmartObjectLayer as c4, type SerializedTypeLayer as c5, type ShapeArrowhead as c6, type ShapeComponent as c7, type ShapeEnv as c8, type ShapeFillRule as c9, TEXT_RENDER_MARGIN as cA, TEXT_STYLE_FIELDS as cB, TONE_RANGE_PRESETS as cC, TRANSFORM_ANCHORS as cD, type TextAnnotation as cE, type TextLayerInit as cF, type ThresholdParams as cG, type ToneRangePreset as cH, type TransformParams as cI, type TransformReadout as cJ, type TypeLayerData as cK, type TypePsdData as cL, type VibranceParams as cM, type ViewportMetrics as cN, activeEffectSmartFilters as cO, activeSmartFilters as cP, addLayerEffect as cQ, addLayerFilter as cR, addSmartFilter as cS, adjustmentNodeAsLayer as cT, anchorPoint as cU, annotationBlend as cV, annotationOfShape as cW, annotationOfType as cX, applyImageProjectionToContext as cY, applyParams as cZ, applySmartFilters as c_, type ShapeGeometryInput as ca, type ShapeLayerData as cb, type ShapeLayerInfo as cc, type ShapeLayerInit as cd, type ShapeLineCap as ce, type ShapeLineJoin as cf, type ShapeOperation as cg, type ShapePaint as ch, type ShapePsdData as ci, type ShapeSelectionOptions as cj, type ShapeStroke as ck, type ShapeStrokeAlign as cl, type ShapeStrokeInput as cm, type SmartCanvas as cn, type SmartContents as co, type SmartDocument as cp, type SmartEffectResolver as cq, type SmartFilterKind as cr, type SmartFilterStack as cs, type SmartObjectInfo as ct, type SmartObjectLayer as cu, type SmartPlacement as cv, type SmartPsdData as cw, type SmartRenderOptions as cx, type StrokeInit as cy, type StrokeTool as cz, type AdjustmentParamsMap as d, fullSelection as d$, borderCoverage as d0, boxMean as d1, boxPointOf as d2, buildLayerMaskPlanes as d3, calculateCropDrag as d4, canvasToImagePoint as d5, checkImageEffectPlace as d6, clampCropToImage as d7, colorModePlanes as d8, colorRange as d9, describeTransform as dA, deserializeColorMode as dB, deserializeColorProfile as dC, deserializeEffects as dD, deserializeLayer as dE, deserializeLayers as dF, deserializePatterns as dG, deserializeSelection as dH, developFilter as dI, displayTransform as dJ, distanceTransform as dK, documentContents as dL, documentProfile as dM, duplicateLayer as dN, edgeWidth as dO, effectPixelsToSurface as dP, effectiveProof as dQ, ellipsePoints as dR, ellipseSelection as dS, encodeDeepSurface as dT, encodeSelectionRle as dU, encodeSurface as dV, expandCoverage as dW, exportPsd as dX, featherCoverage as dY, filterMaskCoverage as dZ, flipCorners as d_, combineSelections as da, componentPath as db, compositeDeep as dc, computeHistogram as dd, computeSelectionBounds as de, contentsBox as df, contentsSurface as dg, contractCoverage as dh, convertHex as di, convertSurfaceColors as dj, convertToSmartObject as dk, copySmartObject as dl, cornersFromMatrix as dm, coverageToByte as dn, createSelectionMask as dp, createShapeLayer as dq, createTypeLayer as dr, decodeDeepSurface as ds, decodeLayerChannel as dt, decodeLayerMask as du, decodeMergedImage as dv, decodePngDataUrl as dw, decodeSelectionRle as dx, defaultShapeName as dy, depthMaskAlpha as dz, type AdjustmentLayerMask as e, normalizeRect as e$, geometryHomography as e0, getAnnotationBounds as e1, getCropCursor as e2, getRotatedSize as e3, getViewportMetrics as e4, getViewportProjection as e5, globalImageCache as e6, greyMorphology as e7, groupLayers as e8, guidePlanes as e9, layerEffectsOf as eA, layerMaskCoverage as eB, layerMaskFromSelection as eC, layerMaskKey as eD, layerName as eE, layerTree as eF, layerTypeLabel as eG, liveComponent as eH, liveShapeSubpaths as eI, magicWand as eJ, mapCropHandle as eK, mapSubpaths as eL, matrixFromCorners as eM, matrixFromParams as eN, mergeShapeComponents as eO, migrateSerializedImageEditorState as eP, migrateToLayeredState as eQ, modifySelection as eR, moveLayer as eS, moveSmartFilter as eT, newContentsId as eU, newLayerId as eV, normalizeAngle as eW, normalizeFilter as eX, normalizeLayerMask as eY, normalizeLiveShape as eZ, normalizePlacement as e_, guidedFilterColor as ea, hasSurface as eb, hasWarp as ec, hashMaskContent as ed, histogramPath as ee, hitTestAnnotation as ef, hitTestCrop as eg, hueRange as eh, identityTransform as ei, imageToCanvasPoint as ej, importPsd as ek, instancesOf as el, invertSelection as em, isActiveFilter as en, isContentsDecoded as eo, isIdentityTransform as ep, isQuarterTurnSwapped as eq, isRenderedLayer as er, isRetouchTool as es, isSelectionEmpty as et, isSelectionMode as eu, isSmartSurfaceIncomplete as ev, isSpatialFilter as ew, isSrgb as ex, isTransformAnchor as ey, isValidWarp as ez, type AdjustmentLayerOf as f, runLayerFiltersFloat as f$, normalizeRefineEdgeParams as f0, normalizeShapePaint as f1, normalizeShapeStroke as f2, normalizeSmartFilter as f3, normalizeStoredAdjustments as f4, normalizeSubpaths as f5, normalizeText as f6, offsetLayer as f7, offsetShape as f8, offsetSmartObject as f9, refineCoverage as fA, refineEdgeHalo as fB, refineSelection as fC, removeLayer as fD, removeLayerEffect as fE, removeLayerFilter as fF, removeSmartFilter as fG, renderShape as fH, renderShapeRect as fI, renderSmartObject as fJ, renderText as fK, replaceContents as fL, replaceTextRange as fM, requireLayer as fN, requireOperation as fO, requireShapeLayer as fP, requireSmartObject as fQ, requireTypeLayer as fR, requireUnlocked as fS, rerender as fT, rerenderShape as fU, rerenderText as fV, resizePixels as fW, resizeSelection as fX, resolveExternalAssets as fY, resolveProfile as fZ, runLayerFilters as f_, parseBlend as fa, parseColor as fb, parseSelectionMode as fc, patchParagraphStyle as fd, patchTextStyle as fe, pixelLayerBounds as ff, pixelLayers as fg, placeContents as fh, placeLayer as fi, placementAt as fj, placementBounds as fk, placementGeometry as fl, polygonCoverage as fm, polygonSelection as fn, presetWarp as fo, previewStep as fp, profileBytes as fq, projectImagePoint as fr, projectImageRect as fs, projectMaskCoverage as ft, psdToLayers as fu, rasterContents as fv, rasterizeSmartObject as fw, readPsd as fx, rectSelection as fy, referencePoint as fz, ImageEditorController as g, selectionArea as g0, selectionFromCoverage as g1, selectionFromPixels as g2, selectionToCoverage as g3, selectionToPixels as g4, selectionValueAt as g5, serializeColorMode as g6, serializeColorProfile as g7, serializeContents as g8, serializeEffects as g9, toTextSpace as gA, toneRange as gB, transformHomography as gC, transformMap as gD, transformShapeComponents as gE, transformTypeLayer as gF, transformedBox as gG, transformedPoint as gH, typeAsPixelLayer as gI, typeFrame as gJ, typeFromAnnotation as gK, typeLayerName as gL, ungroupLayer as gM, unionRect as gN, unprojectCanvasPoint as gO, updateLayerEffect as gP, updateLayerFilter as gQ, updateLayerMaskProps as gR, updateShapeLayer as gS, updateSmartFilter as gT, updateTypeLayer as gU, withFilterMaskSurface as gV, withNewIds as gW, writePsd as gX, serializeLayer as ga, serializeLayers as gb, serializeLayersExternal as gc, serializePatterns as gd, serializeSelection as ge, setLayerEffects as gf, setLayerEffectsEnabled as gg, setLayerMask as gh, setLayerProperties as gi, setSmartFilterMask as gj, setSmartFiltersEnabled as gk, setSmartPlacement as gl, shapeAsPixelLayer as gm, shapeFromAnnotation as gn, shapeGeometryBounds as go, shapeLayers as gp, shapeOutline as gq, shapeRenderClip as gr, shiftCoverage as gs, smartObjectLayers as gt, smoothCoverage as gu, srgb8ToLab as gv, textMatrix as gw, textOutlines as gx, textRange as gy, toHex as gz, type SelectionMask as h, type SelectionMode as i, type ColorDistance as j, type ImagePoint as k, type ImageLayer as l, type CropBox as m, type RasterMask as n, type Annotation as o, type AdjustmentLayerNode as p, type AnnotationLayer as q, type ShapeLayer as r, type TypeLayer as s, type LayerFilter as t, type PixelLayer as u, type DevelopFilter as v, type ImageTransform as w, type ImageHistogram as x, type ImageProjection as y, type CompositorSources as z };
|