@pixerate/editor 0.110.0 → 0.112.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 +3 -0
- package/dist/{chunk-DMRSJBJF.js → chunk-CZOXTEMN.js} +2709 -599
- package/dist/chunk-CZOXTEMN.js.map +1 -0
- package/dist/{chunk-MGL4U5WA.cjs → chunk-YGIMK4NX.cjs} +2697 -587
- package/dist/chunk-YGIMK4NX.cjs.map +1 -0
- package/dist/{export-DRiLzP_j.d.cts → export-DBba-buV.d.cts} +556 -20
- package/dist/{export-CO2ryu3I.d.ts → export-DNu_Jr8p.d.ts} +556 -20
- package/dist/image-editor/index.cjs +1953 -702
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +253 -9
- package/dist/image-editor/index.d.ts +253 -9
- package/dist/image-editor/index.js +1297 -46
- package/dist/image-editor/index.js.map +1 -1
- package/dist/paint-editor/index.cjs +6 -6
- package/dist/paint-editor/index.d.cts +2 -2
- package/dist/paint-editor/index.d.ts +2 -2
- package/dist/paint-editor/index.js +1 -1
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +27 -30
- package/skills/pixerate-image-editor/references/shapes-and-type.md +60 -0
- package/dist/chunk-DMRSJBJF.js.map +0 -1
- package/dist/chunk-MGL4U5WA.cjs.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { e as RasterLayerBase, f as RasterMask$1, b as RasterPixelLayer, G as GroupBlendMode, E as EffectFill, g as GlobalLight, h as EffectPattern, I as Interpolation, i as LayerLocation$1, L as LayerLocks, j as LayerEffect, k as LayerEffects, d as RasterSources, c as RasterCompositor, l as CompositorOptions, m as LayerEffectKind, n as EffectContext } from './render-BEriFuqK.cjs';
|
|
2
2
|
import { b as PixelSurface, B as BlendMode, a as TiledSurface } from './surface-C8RRg_Bh.cjs';
|
|
3
3
|
import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2$1, H as Homography } from './types-CwMPoRMU.cjs';
|
|
4
|
+
import { B as BezierPath } from './bezier-BfwIbVTl.cjs';
|
|
4
5
|
import { v as VectorSubpath, n as Vec2 } from './types-DyQq-WPY.cjs';
|
|
5
6
|
import { B as BrushSettings, M as MixerSettings, d as MixerLoad, f as StrokeCoverage, g as MixerTarget, h as MixerStroke, i as StrokeApply, c as StrokePoint } from './blending-aOE6Y3UE.cjs';
|
|
6
|
-
import { B as BezierPath } from './bezier-BfwIbVTl.cjs';
|
|
7
7
|
import { W as WarpPreset } from './warp-D5jz_tN7.cjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -281,11 +281,13 @@ interface ShapeComponent {
|
|
|
281
281
|
}
|
|
282
282
|
/** PSD data of a shape layer kept for round trips (see the PSD module). */
|
|
283
283
|
interface ShapePsdData {
|
|
284
|
-
/**
|
|
284
|
+
/** The vector blocks as read (`vsms` / `vmsk`, `vscg`, `vstk`, `vogk`, fill blocks), by key. */
|
|
285
285
|
blocks?: Array<{
|
|
286
286
|
key: string;
|
|
287
287
|
data: Uint8Array;
|
|
288
288
|
}>;
|
|
289
|
+
/** The shape as it was read (`shapeSignature`): while unchanged, export writes `blocks` back as they were. */
|
|
290
|
+
signature?: string;
|
|
289
291
|
}
|
|
290
292
|
/**
|
|
291
293
|
* A shape layer: vector components with a fill and a stroke. `surface` is the rendered result in
|
|
@@ -300,6 +302,8 @@ interface ShapeLayer extends LayerBase {
|
|
|
300
302
|
components: ShapeComponent[];
|
|
301
303
|
/** Default `nonzero`. */
|
|
302
304
|
fillRule?: ShapeFillRule;
|
|
305
|
+
/** The fill covers everything except the combined area (Photoshop shapes whose first component subtracts). */
|
|
306
|
+
inverted?: boolean;
|
|
303
307
|
/** `null`: no fill. */
|
|
304
308
|
fill: ShapePaint | null;
|
|
305
309
|
/** `null`: no stroke. */
|
|
@@ -321,6 +325,120 @@ interface ShapeLayer extends LayerBase {
|
|
|
321
325
|
annotation?: Annotation;
|
|
322
326
|
psd?: ShapePsdData;
|
|
323
327
|
}
|
|
328
|
+
/**
|
|
329
|
+
* The character style of a run of text (Photoshop's Character panel). Sizes are document pixels;
|
|
330
|
+
* tracking is in 1/1000 em.
|
|
331
|
+
*/
|
|
332
|
+
interface TextStyle {
|
|
333
|
+
/** Family name ("Inter"); fonts the system lacks fall back to a generic family, with a warning. */
|
|
334
|
+
fontFamily: string;
|
|
335
|
+
/** CSS weight, 100..900 (default 400). */
|
|
336
|
+
fontWeight: number;
|
|
337
|
+
/** Default false. */
|
|
338
|
+
italic?: boolean;
|
|
339
|
+
/** Font size in pixels. */
|
|
340
|
+
fontSize: number;
|
|
341
|
+
/** `#rrggbb`. */
|
|
342
|
+
color: string;
|
|
343
|
+
/** 0..1 (missing = 1). */
|
|
344
|
+
opacity?: number;
|
|
345
|
+
/** Letter spacing in 1/1000 em (missing = 0). */
|
|
346
|
+
tracking?: number;
|
|
347
|
+
/** Baseline-to-baseline distance in pixels; missing = auto (the paragraph's `autoLeading` × size). */
|
|
348
|
+
leading?: number;
|
|
349
|
+
/** Pixels; positive raises the text (missing = 0). */
|
|
350
|
+
baselineShift?: number;
|
|
351
|
+
underline?: boolean;
|
|
352
|
+
strikethrough?: boolean;
|
|
353
|
+
/** PostScript name from a PSD (`ArialMT`), kept so the exact face can be found and written back. */
|
|
354
|
+
postScriptName?: string;
|
|
355
|
+
}
|
|
356
|
+
/** A character style over `length` UTF-16 code units of the text, in order. */
|
|
357
|
+
interface TextRun {
|
|
358
|
+
length: number;
|
|
359
|
+
style: TextStyle;
|
|
360
|
+
}
|
|
361
|
+
type TextAlign = 'left' | 'center' | 'right' | 'justify';
|
|
362
|
+
declare const TEXT_ALIGNS: readonly TextAlign[];
|
|
363
|
+
/** Paragraph style (Photoshop's Paragraph panel); lengths in pixels. */
|
|
364
|
+
interface ParagraphStyle {
|
|
365
|
+
/** Default `left`. `justify` stretches every line of a paragraph box but the last. */
|
|
366
|
+
align?: TextAlign;
|
|
367
|
+
/** Auto leading as a multiple of the font size (default 1.2). */
|
|
368
|
+
autoLeading?: number;
|
|
369
|
+
firstLineIndent?: number;
|
|
370
|
+
startIndent?: number;
|
|
371
|
+
endIndent?: number;
|
|
372
|
+
spaceBefore?: number;
|
|
373
|
+
spaceAfter?: number;
|
|
374
|
+
}
|
|
375
|
+
/** A paragraph style over `length` UTF-16 code units (whole paragraphs, line break included). */
|
|
376
|
+
interface ParagraphRun {
|
|
377
|
+
length: number;
|
|
378
|
+
style: ParagraphStyle;
|
|
379
|
+
}
|
|
380
|
+
/** PSD data of a type layer kept for round trips (see the PSD module). */
|
|
381
|
+
interface TypePsdData {
|
|
382
|
+
/** The `TySh` block as read: written back while the layer is unchanged, else patched. */
|
|
383
|
+
tySh?: Uint8Array;
|
|
384
|
+
/** The layer's text, styles, frame and transform as read (`typeSignature`). */
|
|
385
|
+
signature?: string;
|
|
386
|
+
/** Additional-info blocks we do not model, by key. */
|
|
387
|
+
blocks?: Array<{
|
|
388
|
+
key: string;
|
|
389
|
+
data: Uint8Array;
|
|
390
|
+
}>;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* A type layer: styled text laid out as point text (one line per paragraph, growing from its
|
|
394
|
+
* origin) or paragraph text (wrapped in a box), placed in the document by `transform`. `surface` is
|
|
395
|
+
* the rendered text in document space (offset 0), drawn by the editor's text shaper on every change;
|
|
396
|
+
* the compositor draws it like a pixel layer's pixels. Never paint into it: rasterize the layer.
|
|
397
|
+
*/
|
|
398
|
+
interface TypeLayer extends LayerBase {
|
|
399
|
+
type: 'type';
|
|
400
|
+
text: string;
|
|
401
|
+
/** Character runs covering the text in order (lengths add up to `text.length`). */
|
|
402
|
+
runs: TextRun[];
|
|
403
|
+
/** Paragraph runs covering the text in order. */
|
|
404
|
+
paragraphs: ParagraphRun[];
|
|
405
|
+
/**
|
|
406
|
+
* `point`: text space (0, 0) is the first line's baseline at its alignment edge (`origin: 'top'`:
|
|
407
|
+
* the top of the first line instead, as text annotations were drawn). `box`: text wraps inside
|
|
408
|
+
* `width × height` with its top-left at (0, 0).
|
|
409
|
+
*/
|
|
410
|
+
frame: {
|
|
411
|
+
kind: 'point';
|
|
412
|
+
origin?: 'baseline' | 'top';
|
|
413
|
+
} | {
|
|
414
|
+
kind: 'box';
|
|
415
|
+
width: number;
|
|
416
|
+
height: number;
|
|
417
|
+
};
|
|
418
|
+
/** Text space → document (missing = identity). */
|
|
419
|
+
transform?: AffineMatrix;
|
|
420
|
+
/** Default true. */
|
|
421
|
+
antiAlias?: boolean;
|
|
422
|
+
/** The rendered pixels, document space. */
|
|
423
|
+
surface: PixelSurface;
|
|
424
|
+
/** Always (0, 0): a type layer moves through its transform. */
|
|
425
|
+
offset: {
|
|
426
|
+
x: number;
|
|
427
|
+
y: number;
|
|
428
|
+
};
|
|
429
|
+
/** 0..1, PSD "Fill" (missing = 1). */
|
|
430
|
+
fillOpacity?: number;
|
|
431
|
+
/**
|
|
432
|
+
* How `surface` was made: missing when the shaper laid it out; `'stored'` for pixels kept from a
|
|
433
|
+
* PSD or a save made where no shaper could draw it (the first edit draws it again).
|
|
434
|
+
*/
|
|
435
|
+
rendering?: 'stored';
|
|
436
|
+
/** Families the last render had to replace with a fallback. */
|
|
437
|
+
missingFonts?: string[];
|
|
438
|
+
/** The text annotation this layer was migrated from, while it still is that annotation. */
|
|
439
|
+
annotation?: Annotation;
|
|
440
|
+
psd?: TypePsdData;
|
|
441
|
+
}
|
|
324
442
|
/** A nested layer document: the contents of a smart object made from layers (or an embedded PSD). */
|
|
325
443
|
interface SmartDocument {
|
|
326
444
|
/** Bottom to top, on a canvas of the contents' `width × height`. */
|
|
@@ -436,7 +554,7 @@ interface SmartObjectLayer extends LayerBase {
|
|
|
436
554
|
fillOpacity?: number;
|
|
437
555
|
psd?: SmartPsdData;
|
|
438
556
|
}
|
|
439
|
-
type ImageLayer = PixelLayer | AdjustmentLayerNode | GroupLayer | AnnotationLayer | SmartObjectLayer | ShapeLayer;
|
|
557
|
+
type ImageLayer = PixelLayer | AdjustmentLayerNode | GroupLayer | AnnotationLayer | SmartObjectLayer | ShapeLayer | TypeLayer;
|
|
440
558
|
type ImageLayerType = ImageLayer['type'];
|
|
441
559
|
/** Which part of the active layer painting targets (`filter-mask`: a smart object's filter mask). */
|
|
442
560
|
type LayerTarget = 'pixels' | 'mask' | 'filter-mask';
|
|
@@ -457,15 +575,242 @@ declare function isSpatialFilter(f: LayerFilter): boolean;
|
|
|
457
575
|
declare function pixelLayerBounds(layer: PixelLayer, surface?: PixelSurface): CropBox | null;
|
|
458
576
|
/** Human label of a layer kind. */
|
|
459
577
|
declare function layerTypeLabel(type: ImageLayerType): string;
|
|
460
|
-
/** Layers whose pixels are a surface the compositor draws (pixel layers, smart objects, shapes). */
|
|
461
|
-
declare function hasSurface(layer: ImageLayer): layer is PixelLayer | SmartObjectLayer | ShapeLayer;
|
|
462
|
-
/** Layers whose `surface` is a render cache of their own data (smart objects, shapes): never paint into it. */
|
|
463
|
-
declare function isRenderedLayer(layer: ImageLayer): layer is SmartObjectLayer | ShapeLayer;
|
|
578
|
+
/** Layers whose pixels are a surface the compositor draws (pixel layers, smart objects, shapes, type). */
|
|
579
|
+
declare function hasSurface(layer: ImageLayer): layer is PixelLayer | SmartObjectLayer | ShapeLayer | TypeLayer;
|
|
580
|
+
/** Layers whose `surface` is a render cache of their own data (smart objects, shapes, type): never paint into it. */
|
|
581
|
+
declare function isRenderedLayer(layer: ImageLayer): layer is SmartObjectLayer | ShapeLayer | TypeLayer;
|
|
464
582
|
/** Every shape layer in the stack. */
|
|
465
583
|
declare function shapeLayers(layers: readonly ImageLayer[]): ShapeLayer[];
|
|
466
584
|
/** Every smart object in the stack (nested contents not included). */
|
|
467
585
|
declare function smartObjectLayers(layers: readonly ImageLayer[]): SmartObjectLayer[];
|
|
468
586
|
|
|
587
|
+
/**
|
|
588
|
+
* Type layers: styled runs of text laid out as point or paragraph text and drawn into the layer's
|
|
589
|
+
* `surface` by a text shaper.
|
|
590
|
+
*
|
|
591
|
+
* Layout (paragraphs, line breaking, alignment, tracking, leading, indents, spacing) is ours and
|
|
592
|
+
* runs anywhere. What needs fonts goes through a `TextShaper`: font availability and fallback,
|
|
593
|
+
* metrics, advance widths and drawing, either as glyph outlines (pure; rendered by the shape
|
|
594
|
+
* rasterizer, and what Convert to Shape needs) or onto a 2D canvas (the browser's own text). The
|
|
595
|
+
* editor uses a Canvas 2D shaper in browsers; hosts can plug in another (an OpenType outline
|
|
596
|
+
* shaper, or one for a server). Without a shaper, type layers keep the pixels they were saved with
|
|
597
|
+
* and refuse edits that would need drawing them again.
|
|
598
|
+
*/
|
|
599
|
+
|
|
600
|
+
/** A font as a shaper is asked for it (sizes in pixels). */
|
|
601
|
+
interface TextFont {
|
|
602
|
+
family: string;
|
|
603
|
+
weight: number;
|
|
604
|
+
italic: boolean;
|
|
605
|
+
size: number;
|
|
606
|
+
postScriptName?: string;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* What layout and rendering need from fonts. Implement `outline` (glyph outlines, pure) or `draw`
|
|
610
|
+
* (onto a 2D canvas), or both.
|
|
611
|
+
*/
|
|
612
|
+
interface TextShaper {
|
|
613
|
+
/** Identifies the shaper (part of the render cache key). */
|
|
614
|
+
readonly id: string;
|
|
615
|
+
/** The family that draws `font`: the family itself when available, else a fallback (`available: false`). */
|
|
616
|
+
resolve(font: TextFont): {
|
|
617
|
+
family: string;
|
|
618
|
+
available: boolean;
|
|
619
|
+
};
|
|
620
|
+
/** Ascent and descent (both positive, pixels) of the resolved font at `font.size`. */
|
|
621
|
+
metrics(font: TextFont): {
|
|
622
|
+
ascent: number;
|
|
623
|
+
descent: number;
|
|
624
|
+
};
|
|
625
|
+
/**
|
|
626
|
+
* Caret positions of `text` set in `font`: `text.length + 1` x offsets in pixels from the start
|
|
627
|
+
* (kerning included, tracking not).
|
|
628
|
+
*/
|
|
629
|
+
measure(text: string, font: TextFont): ArrayLike<number>;
|
|
630
|
+
/** Glyph outlines of `text` with its start on the baseline at (`x`, `y`), pixels, y down. */
|
|
631
|
+
outline?(text: string, font: TextFont, x: number, y: number): BezierPath;
|
|
632
|
+
/** Draws `text` with its start on the baseline at (`x`, `y`) in the context's current transform, fill style and alpha. */
|
|
633
|
+
draw?(ctx: CanvasRenderingContext2D, text: string, font: TextFont, x: number, y: number): void;
|
|
634
|
+
/** Families this shaper can draw (for font pickers and agents), when it can tell. */
|
|
635
|
+
families?(): string[];
|
|
636
|
+
}
|
|
637
|
+
/** What rendering a type layer needs besides the layer. */
|
|
638
|
+
interface TextEnv {
|
|
639
|
+
width: number;
|
|
640
|
+
height: number;
|
|
641
|
+
/** `null`: no shaper here; type layers keep their stored pixels. */
|
|
642
|
+
shaper: TextShaper | null;
|
|
643
|
+
/** A 2D canvas for shapers that `draw` (the editor's renderer provides one). */
|
|
644
|
+
createCanvas?(width: number, height: number): HTMLCanvasElement | OffscreenCanvas;
|
|
645
|
+
}
|
|
646
|
+
declare const DEFAULT_TEXT_STYLE: TextStyle;
|
|
647
|
+
declare const DEFAULT_AUTO_LEADING = 1.2;
|
|
648
|
+
/** Runs fitted to a text of `length` (the last run stretches or is cut), never empty while there is text. */
|
|
649
|
+
declare function fitRuns<R extends {
|
|
650
|
+
length: number;
|
|
651
|
+
style: object;
|
|
652
|
+
}>(runs: readonly R[], length: number, fallback: R['style']): R[];
|
|
653
|
+
/** The style of the run holding code unit `index` (the last run past the end). */
|
|
654
|
+
declare function styleAt<S extends object>(runs: ReadonlyArray<{
|
|
655
|
+
length: number;
|
|
656
|
+
style: S;
|
|
657
|
+
}>, index: number, fallback: S): S;
|
|
658
|
+
/** Runs with `patch(style)` applied over [start, end). */
|
|
659
|
+
declare function restyleRange<S extends object>(runs: ReadonlyArray<{
|
|
660
|
+
length: number;
|
|
661
|
+
style: S;
|
|
662
|
+
}>, start: number, end: number, patch: (s: S) => S): Array<{
|
|
663
|
+
length: number;
|
|
664
|
+
style: S;
|
|
665
|
+
}>;
|
|
666
|
+
/** Runs after replacing [start, end) of the text with `inserted` code units styled `style`. */
|
|
667
|
+
declare function spliceRuns<S extends object>(runs: ReadonlyArray<{
|
|
668
|
+
length: number;
|
|
669
|
+
style: S;
|
|
670
|
+
}>, start: number, end: number, inserted: number, style: S): Array<{
|
|
671
|
+
length: number;
|
|
672
|
+
style: S;
|
|
673
|
+
}>;
|
|
674
|
+
/** Paragraph ranges [start, end) of the text, the line break included in the paragraph it ends. */
|
|
675
|
+
declare function paragraphRanges(text: string): Array<{
|
|
676
|
+
start: number;
|
|
677
|
+
end: number;
|
|
678
|
+
content: number;
|
|
679
|
+
}>;
|
|
680
|
+
/** Paragraph runs snapped to whole paragraphs: each paragraph takes the style at its start. */
|
|
681
|
+
declare function fitParagraphRuns(runs: readonly ParagraphRun[], text: string): ParagraphRun[];
|
|
682
|
+
/** One laid-out character. */
|
|
683
|
+
interface LaidChar {
|
|
684
|
+
/** Index in the text (UTF-16 code unit). */
|
|
685
|
+
index: number;
|
|
686
|
+
/** Text-space x of its start and its advance (tracking and justification included). */
|
|
687
|
+
x: number;
|
|
688
|
+
advance: number;
|
|
689
|
+
}
|
|
690
|
+
/** A run of characters on one line in one style. */
|
|
691
|
+
interface LaidFragment {
|
|
692
|
+
start: number;
|
|
693
|
+
end: number;
|
|
694
|
+
style: TextStyle;
|
|
695
|
+
font: TextFont;
|
|
696
|
+
/** The family the shaper draws it with. */
|
|
697
|
+
family: string;
|
|
698
|
+
x: number;
|
|
699
|
+
/** Baseline in text space (baseline shift applied). */
|
|
700
|
+
y: number;
|
|
701
|
+
/** Per-character x positions relative to `x` (`end − start + 1` entries). */
|
|
702
|
+
carets: number[];
|
|
703
|
+
/** Whether characters are placed one by one (tracking or justification). */
|
|
704
|
+
spaced: boolean;
|
|
705
|
+
}
|
|
706
|
+
interface LaidLine {
|
|
707
|
+
start: number;
|
|
708
|
+
/** End of the line's characters (line break and trailing spaces excluded from `width`). */
|
|
709
|
+
end: number;
|
|
710
|
+
baseline: number;
|
|
711
|
+
ascent: number;
|
|
712
|
+
descent: number;
|
|
713
|
+
x: number;
|
|
714
|
+
width: number;
|
|
715
|
+
chars: LaidChar[];
|
|
716
|
+
fragments: LaidFragment[];
|
|
717
|
+
}
|
|
718
|
+
/** A laid-out type layer in text space. */
|
|
719
|
+
interface TextLayout {
|
|
720
|
+
lines: LaidLine[];
|
|
721
|
+
/** Bounds of the lines (ascent to descent), text space; the box for paragraph text. */
|
|
722
|
+
bounds: CropBox;
|
|
723
|
+
/** Families replaced by a fallback. */
|
|
724
|
+
missingFonts: string[];
|
|
725
|
+
}
|
|
726
|
+
declare function fontOf(style: TextStyle): TextFont;
|
|
727
|
+
/** Lays out a type layer with `shaper` (memoised per layer object and shaper). */
|
|
728
|
+
declare function layoutText(layer: Pick<TypeLayer, 'text' | 'runs' | 'paragraphs' | 'frame'>, shaper: TextShaper): TextLayout;
|
|
729
|
+
/** The text index nearest a text-space point (for clicks): the line under it, then the closest caret. */
|
|
730
|
+
declare function textIndexAt(layout: TextLayout, p: {
|
|
731
|
+
x: number;
|
|
732
|
+
y: number;
|
|
733
|
+
}): number;
|
|
734
|
+
/** The caret at text index `index`: its x and the line's top and bottom, text space. */
|
|
735
|
+
declare function caretAt(layout: TextLayout, index: number): {
|
|
736
|
+
x: number;
|
|
737
|
+
top: number;
|
|
738
|
+
bottom: number;
|
|
739
|
+
line: number;
|
|
740
|
+
};
|
|
741
|
+
/** How far beyond the canvas type renders (as shapes). */
|
|
742
|
+
declare const TEXT_RENDER_MARGIN = 512;
|
|
743
|
+
/** Text space → document of a layer. */
|
|
744
|
+
declare function textMatrix(layer: Pick<TypeLayer, 'transform'>): AffineMatrix;
|
|
745
|
+
/** Glyph outlines of a laid-out layer in document space, one path per fragment (needs an outline shaper). */
|
|
746
|
+
declare function textOutlines(layer: TypeLayer, shaper: TextShaper): Array<{
|
|
747
|
+
fragment: LaidFragment;
|
|
748
|
+
path: BezierPath;
|
|
749
|
+
}>;
|
|
750
|
+
/**
|
|
751
|
+
* Renders a type layer into a document-space surface with the env's shaper, or returns `null`
|
|
752
|
+
* when nothing here can draw it (no shaper, or a drawing shaper without a canvas).
|
|
753
|
+
*/
|
|
754
|
+
declare function renderText(layer: TypeLayer, env: TextEnv): {
|
|
755
|
+
surface: PixelSurface;
|
|
756
|
+
missingFonts: string[];
|
|
757
|
+
} | null;
|
|
758
|
+
/** The layer drawn again (`rendering` and `missingFonts` updated); refuses when nothing can draw it. */
|
|
759
|
+
declare function rerenderText(layer: TypeLayer, env: TextEnv): TypeLayer;
|
|
760
|
+
/** Fields of `TextStyle` an edit can set (`null` clears an optional one). */
|
|
761
|
+
declare const TEXT_STYLE_FIELDS: readonly ["fontFamily", "fontWeight", "italic", "fontSize", "color", "opacity", "tracking", "leading", "baselineShift", "underline", "strikethrough"];
|
|
762
|
+
/** `base` with the given style fields changed, validated (`null` clears leading, tracking, …). */
|
|
763
|
+
declare function patchTextStyle(base: TextStyle, patch: Record<string, unknown>, path?: string): TextStyle;
|
|
764
|
+
declare const PARAGRAPH_STYLE_FIELDS: readonly ["align", "autoLeading", "firstLineIndent", "startIndent", "endIndent", "spaceBefore", "spaceAfter"];
|
|
765
|
+
/** `base` with the given paragraph fields changed, validated. */
|
|
766
|
+
declare function patchParagraphStyle(base: ParagraphStyle, patch: Record<string, unknown>, path?: string): ParagraphStyle;
|
|
767
|
+
/** A range of the text from loose input: [start, end) in UTF-16 code units, defaults the whole text. */
|
|
768
|
+
declare function textRange(text: string, start: unknown, end: unknown): [number, number];
|
|
769
|
+
/** The type layer with `id`, or an error saying what it is instead. */
|
|
770
|
+
declare function requireTypeLayer(layers: readonly ImageLayer[], id: string): TypeLayer;
|
|
771
|
+
/** Normalises text: line breaks as `\n`. */
|
|
772
|
+
declare function normalizeText(text: unknown, path?: string): string;
|
|
773
|
+
/** The name Photoshop gives a type layer: its text, cut short. */
|
|
774
|
+
declare function typeLayerName(text: string): string;
|
|
775
|
+
interface TypeLayerData {
|
|
776
|
+
text: string;
|
|
777
|
+
runs: TextRun[];
|
|
778
|
+
paragraphs?: ParagraphRun[];
|
|
779
|
+
frame: TypeLayer['frame'];
|
|
780
|
+
transform?: AffineMatrix;
|
|
781
|
+
name?: string;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* A new type layer, laid out and drawn. Without anything to draw it, refused, or with `lenient`
|
|
785
|
+
* kept undrawn (`rendering: 'stored'`, no pixels) until a shaper draws it.
|
|
786
|
+
*/
|
|
787
|
+
declare function createTypeLayer(init: TypeLayerData, env: TextEnv, id?: string, lenient?: boolean): TypeLayer;
|
|
788
|
+
/** Changes a type layer (dropping its migrated annotation and stored pixels) and draws it again. */
|
|
789
|
+
declare function updateTypeLayer(layers: readonly ImageLayer[], id: string, change: (layer: TypeLayer) => Partial<TypeLayer>, env: TextEnv, action?: string): {
|
|
790
|
+
layers: ImageLayer[];
|
|
791
|
+
layer: TypeLayer;
|
|
792
|
+
};
|
|
793
|
+
/** A type layer's text with [start, end) replaced by `insert`; new text takes the style at `start`. */
|
|
794
|
+
declare function replaceTextRange(layer: TypeLayer, start: number, end: number, insert: string): Pick<TypeLayer, 'text' | 'runs' | 'paragraphs'>;
|
|
795
|
+
/** A type layer moved by an affine `m` (document space). */
|
|
796
|
+
declare function transformTypeLayer(layer: TypeLayer, m: AffineMatrix): TypeLayer;
|
|
797
|
+
/** Text-space frame of a type layer (the box, or the laid-out lines) for Free Transform. */
|
|
798
|
+
declare function typeFrame(layer: TypeLayer, shaper: TextShaper | null): CropBox;
|
|
799
|
+
/** A type layer as a pixel layer with what it shows now (same id, name, mask, effects, blend). */
|
|
800
|
+
declare function typeAsPixelLayer(layer: TypeLayer): PixelLayer;
|
|
801
|
+
/** Document point → text space of a layer. */
|
|
802
|
+
declare function toTextSpace(layer: Pick<TypeLayer, 'transform'>, p: {
|
|
803
|
+
x: number;
|
|
804
|
+
y: number;
|
|
805
|
+
}): {
|
|
806
|
+
x: number;
|
|
807
|
+
y: number;
|
|
808
|
+
};
|
|
809
|
+
/** The type layer data a text annotation draws, or `null` when its colour can't be read. */
|
|
810
|
+
declare function typeFromAnnotation(a: Annotation): TypeLayerData | null;
|
|
811
|
+
/** The annotation a migrated type layer still is (its blend read from the layer). */
|
|
812
|
+
declare function annotationOfType(layer: TypeLayer): Annotation | null;
|
|
813
|
+
|
|
469
814
|
/**
|
|
470
815
|
* Schema version 3 of the image editor document: the layer tree, with pixel layers and painted
|
|
471
816
|
* masks stored as PNG assets (cropped to their content and placed by position), plus the
|
|
@@ -602,6 +947,7 @@ interface SerializedShapeLayer extends SerializedLayerBase {
|
|
|
602
947
|
type: 'shape';
|
|
603
948
|
components: ShapeComponent[];
|
|
604
949
|
fillRule?: 'evenodd';
|
|
950
|
+
inverted?: true;
|
|
605
951
|
fill: ShapePaint | null;
|
|
606
952
|
stroke: ShapeStroke | null;
|
|
607
953
|
fillOpacity?: number;
|
|
@@ -613,9 +959,37 @@ interface SerializedShapeLayer extends SerializedLayerBase {
|
|
|
613
959
|
key: string;
|
|
614
960
|
data: string;
|
|
615
961
|
}>;
|
|
962
|
+
signature?: string;
|
|
616
963
|
};
|
|
617
964
|
}
|
|
618
|
-
type
|
|
965
|
+
/** A type layer: its text and styles, plus the pixels it showed (PNG) for loads without its fonts. */
|
|
966
|
+
interface SerializedTypeLayer extends SerializedLayerBase {
|
|
967
|
+
type: 'type';
|
|
968
|
+
text: string;
|
|
969
|
+
runs: TextRun[];
|
|
970
|
+
paragraphs: ParagraphRun[];
|
|
971
|
+
frame: TypeLayer['frame'];
|
|
972
|
+
transform?: number[];
|
|
973
|
+
antiAlias?: false;
|
|
974
|
+
fillOpacity?: number;
|
|
975
|
+
/** The rendered pixels (RGBA PNG) at `x`, `y` in document space. */
|
|
976
|
+
asset?: string;
|
|
977
|
+
x?: number;
|
|
978
|
+
y?: number;
|
|
979
|
+
missingFonts?: string[];
|
|
980
|
+
/** The text annotation the layer was migrated from, while it still is that annotation. */
|
|
981
|
+
annotation?: Annotation;
|
|
982
|
+
/** PSD blocks kept for round trips (base64). */
|
|
983
|
+
psd?: {
|
|
984
|
+
tySh?: string;
|
|
985
|
+
blocks?: Array<{
|
|
986
|
+
key: string;
|
|
987
|
+
data: string;
|
|
988
|
+
}>;
|
|
989
|
+
signature?: string;
|
|
990
|
+
};
|
|
991
|
+
}
|
|
992
|
+
type SerializedLayer = SerializedPixelLayer | SerializedAdjustmentLayer | SerializedGroupLayer | SerializedAnnotationLayer | SerializedSmartObjectLayer | SerializedShapeLayer | SerializedTypeLayer;
|
|
619
993
|
/** A version 3 document (layers). */
|
|
620
994
|
interface SerializedLayeredImageEditorState {
|
|
621
995
|
version: 3;
|
|
@@ -724,6 +1098,8 @@ interface DeserializeContext {
|
|
|
724
1098
|
problems: string[];
|
|
725
1099
|
/** The document's patterns by id, for shapes painted with one. */
|
|
726
1100
|
pattern?(id: string): EffectPattern | null;
|
|
1101
|
+
/** What draws type layers stored without pixels (and migrated text annotations). */
|
|
1102
|
+
text?: Pick<TextEnv, 'shaper' | 'createCanvas'>;
|
|
727
1103
|
}
|
|
728
1104
|
/** Decodes a PNG data URL into pixels of `channels` bytes each. */
|
|
729
1105
|
declare function decodePngDataUrl(url: string, channels: 1 | 4): {
|
|
@@ -840,6 +1216,15 @@ interface RenderOptions {
|
|
|
840
1216
|
y: number;
|
|
841
1217
|
diameter: number;
|
|
842
1218
|
} | null;
|
|
1219
|
+
/**
|
|
1220
|
+
* On-canvas text editing (`TextEditSession.overlay()`): the caret as a segment, the selected
|
|
1221
|
+
* ranges as quads and the text's frame, in natural pixels.
|
|
1222
|
+
*/
|
|
1223
|
+
textEdit?: {
|
|
1224
|
+
caret: [ImagePoint, ImagePoint] | null;
|
|
1225
|
+
selection: ImagePoint[][];
|
|
1226
|
+
frame: ImagePoint[] | null;
|
|
1227
|
+
} | null;
|
|
843
1228
|
/** Free Transform's frame, handles and reference point in natural pixels (`FreeTransformTool.overlay()`). */
|
|
844
1229
|
freeTransform?: {
|
|
845
1230
|
outline: ImagePoint[];
|
|
@@ -1543,7 +1928,7 @@ declare const PSD_BLEND_KEYS: Record<string, LayerBlendMode>;
|
|
|
1543
1928
|
interface PsdLayerSummary {
|
|
1544
1929
|
name: string;
|
|
1545
1930
|
/** Our layer type, or `null` when the layer was dropped. */
|
|
1546
|
-
type: 'pixel' | 'adjustment' | 'group' | 'smart' | null;
|
|
1931
|
+
type: 'pixel' | 'adjustment' | 'group' | 'smart' | 'shape' | 'type' | null;
|
|
1547
1932
|
/** `mapped`: held exactly; `approximated`: imported with losses; `dropped`: left out. */
|
|
1548
1933
|
status: 'mapped' | 'approximated' | 'dropped';
|
|
1549
1934
|
/** What Photoshop calls it (`pixel`, `type`, `smart-object`, `fill`, `shape`, `Levels` …). */
|
|
@@ -1670,6 +2055,7 @@ interface ShapeLayerData {
|
|
|
1670
2055
|
fill?: ShapePaint | null;
|
|
1671
2056
|
stroke?: ShapeStroke | null;
|
|
1672
2057
|
fillRule?: ShapeFillRule;
|
|
2058
|
+
inverted?: boolean;
|
|
1673
2059
|
visible?: boolean;
|
|
1674
2060
|
opacity?: number;
|
|
1675
2061
|
blend?: BlendMode;
|
|
@@ -1887,6 +2273,8 @@ interface FreeTransformHost {
|
|
|
1887
2273
|
pixelsOf(layer: PixelLayer | SmartObjectLayer): TiledSurface;
|
|
1888
2274
|
/** What shape layers render with (canvas size, document patterns). */
|
|
1889
2275
|
shapeEnv(): ShapeEnv;
|
|
2276
|
+
/** What type layers lay out and draw with. */
|
|
2277
|
+
textEnv(): TextEnv;
|
|
1890
2278
|
/** Opaque pre-transform snapshot. */
|
|
1891
2279
|
capture(): unknown;
|
|
1892
2280
|
/** Shows a live state (no history). */
|
|
@@ -1925,6 +2313,9 @@ declare class FreeTransformSession {
|
|
|
1925
2313
|
/** True when the layer is a shape layer (the transform maps its paths and renders them again). */
|
|
1926
2314
|
readonly shapeLayer: boolean;
|
|
1927
2315
|
private readonly shape;
|
|
2316
|
+
/** True when the layer is a type layer (the transform sets its text matrix; affine only). */
|
|
2317
|
+
readonly typeLayer: boolean;
|
|
2318
|
+
private readonly typeTarget;
|
|
1928
2319
|
private geometryValue;
|
|
1929
2320
|
private readonly smart;
|
|
1930
2321
|
private readonly smartReduced;
|
|
@@ -1962,6 +2353,11 @@ declare class FreeTransformSession {
|
|
|
1962
2353
|
* render only the visible part.
|
|
1963
2354
|
*/
|
|
1964
2355
|
private resampleShape;
|
|
2356
|
+
/**
|
|
2357
|
+
* A type layer with its text matrix set from the corners (affine only: scale, rotate, skew and
|
|
2358
|
+
* flips), drawn again; a linked mask follows by the change's homography.
|
|
2359
|
+
*/
|
|
2360
|
+
private resampleType;
|
|
1965
2361
|
/** A smart object re-rendered from its contents for the current geometry (previews leave the smart filters out). */
|
|
1966
2362
|
private resampleSmart;
|
|
1967
2363
|
/** Whether the geometry (or the interpolation of a smart object) differs from where it started. */
|
|
@@ -2117,6 +2513,11 @@ interface ShapeGeometryInput {
|
|
|
2117
2513
|
/** Default `combine`. */
|
|
2118
2514
|
op?: ShapeOperation;
|
|
2119
2515
|
}
|
|
2516
|
+
/** A stroke as tools and UIs give it: any `ShapeStroke` fields, the paint as a colour string or a paint (or `color`). */
|
|
2517
|
+
type ShapeStrokeInput = Omit<Partial<ShapeStroke>, 'paint'> & {
|
|
2518
|
+
paint?: ShapePaint | string;
|
|
2519
|
+
color?: string;
|
|
2520
|
+
};
|
|
2120
2521
|
/** A new shape layer: its geometry (one component, or `components`), fill and stroke. */
|
|
2121
2522
|
interface ShapeLayerInit extends ShapeGeometryInput, LayerPlacement {
|
|
2122
2523
|
/** Several components instead of `shape` / `subpaths`, bottom first. */
|
|
@@ -2125,10 +2526,7 @@ interface ShapeLayerInit extends ShapeGeometryInput, LayerPlacement {
|
|
|
2125
2526
|
/** A colour string or a paint; `null` for none. Default the foreground colour (none for a stroke-only open path). */
|
|
2126
2527
|
fill?: ShapePaint | string | null;
|
|
2127
2528
|
/** `{ width, paint, align?, cap?, join?, miterLimit?, dashes?, dashOffset? }`, or `null` / missing for none. */
|
|
2128
|
-
stroke?:
|
|
2129
|
-
paint?: ShapePaint | string;
|
|
2130
|
-
color?: string;
|
|
2131
|
-
}) | null;
|
|
2529
|
+
stroke?: ShapeStrokeInput | null;
|
|
2132
2530
|
fillRule?: ShapeFillRule;
|
|
2133
2531
|
opacity?: number;
|
|
2134
2532
|
blend?: BlendMode;
|
|
@@ -2155,6 +2553,63 @@ interface ShapeLayerInfo {
|
|
|
2155
2553
|
/** The annotation id while the layer is still the annotation it was migrated from. */
|
|
2156
2554
|
annotationId?: string;
|
|
2157
2555
|
}
|
|
2556
|
+
/** A new type layer: its text, where it goes, and its character and paragraph style. */
|
|
2557
|
+
interface TextLayerInit extends LayerPlacement {
|
|
2558
|
+
text: string;
|
|
2559
|
+
/**
|
|
2560
|
+
* Document x, y of the text's origin: point text's first baseline at its alignment edge (left
|
|
2561
|
+
* edge for left-aligned, centre for centred, right edge for right-aligned); a paragraph box's
|
|
2562
|
+
* top-left.
|
|
2563
|
+
*/
|
|
2564
|
+
x: number;
|
|
2565
|
+
y: number;
|
|
2566
|
+
/** Paragraph (area) text: wrap inside a `width × height` box (pixels). Missing: point text. */
|
|
2567
|
+
box?: {
|
|
2568
|
+
width: number;
|
|
2569
|
+
height: number;
|
|
2570
|
+
};
|
|
2571
|
+
/** Character style of the whole text (default 24 px sans-serif, the foreground colour). */
|
|
2572
|
+
style?: Partial<TextStyle>;
|
|
2573
|
+
paragraph?: ParagraphStyle;
|
|
2574
|
+
/** Degrees clockwise about the origin. */
|
|
2575
|
+
rotation?: number;
|
|
2576
|
+
name?: string;
|
|
2577
|
+
opacity?: number;
|
|
2578
|
+
blend?: BlendMode;
|
|
2579
|
+
}
|
|
2580
|
+
/** A type layer as tools and panels read it. Ranges are UTF-16 code units, `end` exclusive. */
|
|
2581
|
+
interface TypeLayerInfo {
|
|
2582
|
+
id: string;
|
|
2583
|
+
name: string;
|
|
2584
|
+
text: string;
|
|
2585
|
+
runs: Array<{
|
|
2586
|
+
start: number;
|
|
2587
|
+
end: number;
|
|
2588
|
+
style: TextStyle;
|
|
2589
|
+
}>;
|
|
2590
|
+
paragraphs: Array<{
|
|
2591
|
+
start: number;
|
|
2592
|
+
end: number;
|
|
2593
|
+
style: ParagraphStyle;
|
|
2594
|
+
}>;
|
|
2595
|
+
frame: TypeLayer['frame'];
|
|
2596
|
+
/** Text space → document. */
|
|
2597
|
+
transform: AffineMatrix;
|
|
2598
|
+
/** Laid-out lines: text range, baseline (text space) and width; empty without a shaper. */
|
|
2599
|
+
lines: Array<{
|
|
2600
|
+
start: number;
|
|
2601
|
+
end: number;
|
|
2602
|
+
baseline: number;
|
|
2603
|
+
width: number;
|
|
2604
|
+
}>;
|
|
2605
|
+
/** Rendered bounds in the document. */
|
|
2606
|
+
bounds: CropBox | null;
|
|
2607
|
+
/** Families drawn with a fallback because they are missing here. */
|
|
2608
|
+
missingFonts: string[];
|
|
2609
|
+
/** `live`: drawn here from the text; `stored`: pixels kept from a file until the next edit. */
|
|
2610
|
+
rendering: 'live' | 'stored';
|
|
2611
|
+
annotationId?: string;
|
|
2612
|
+
}
|
|
2158
2613
|
/** Paint tools a stroke can use. */
|
|
2159
2614
|
type StrokeTool = 'brush' | 'eraser' | 'mixer';
|
|
2160
2615
|
/** A stroke: tool, target (default the active layer and target) and brush / colour overrides. */
|
|
@@ -2928,6 +3383,8 @@ declare class ImageEditorController {
|
|
|
2928
3383
|
resetDepthMask(): void;
|
|
2929
3384
|
/** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
|
|
2930
3385
|
private annotationLayer;
|
|
3386
|
+
/** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
|
|
3387
|
+
private annotationEnv;
|
|
2931
3388
|
/**
|
|
2932
3389
|
* Adds an annotation as its own layer (top of the stack unless `aboveId` is given). Pen,
|
|
2933
3390
|
* rectangle, ellipse, line and arrow annotations become shape layers that remember the
|
|
@@ -2936,7 +3393,7 @@ declare class ImageEditorController {
|
|
|
2936
3393
|
*/
|
|
2937
3394
|
addAnnotation(annotation: CreateAnnotationPayload, placement?: AnnotationPlacement): string;
|
|
2938
3395
|
updateAnnotation(id: string, partial: Partial<Annotation>, commitToHistory?: boolean): void;
|
|
2939
|
-
/** `layer` (an annotation or
|
|
3396
|
+
/** `layer` (an annotation, or a shape or type layer migrated from one) showing `annotation` instead, keeping its other properties. */
|
|
2940
3397
|
private layerForAnnotation;
|
|
2941
3398
|
removeAnnotation(id: string): void;
|
|
2942
3399
|
/** Deletes every annotation layer and every shape layer that still is the annotation it was migrated from. */
|
|
@@ -3018,6 +3475,72 @@ declare class ImageEditorController {
|
|
|
3018
3475
|
* new image has different dimensions). Resolves to the masked layer's id in mask mode.
|
|
3019
3476
|
*/
|
|
3020
3477
|
applyBackgroundRemovedImage(newDataUrl: string, options?: AIResultOptions): Promise<string | void>;
|
|
3478
|
+
private textShaperValue;
|
|
3479
|
+
/** The shaper that lays out and draws type layers (`null` when there is none here). */
|
|
3480
|
+
getTextShaper(): TextShaper | null;
|
|
3481
|
+
/** Sets the text shaper (fonts) type layers lay out and draw with; existing layers redraw on their next edit. */
|
|
3482
|
+
setTextShaper(shaper: TextShaper | null): void;
|
|
3483
|
+
/** What type layers lay out and draw with. */
|
|
3484
|
+
private textEnv;
|
|
3485
|
+
/** Font families the shaper offers (generic families at least). */
|
|
3486
|
+
listFonts(): string[];
|
|
3487
|
+
private typeInfo;
|
|
3488
|
+
/** A type layer's text, runs, paragraphs, frame, lines and bounds. */
|
|
3489
|
+
getTextLayer(id: string): TypeLayerInfo;
|
|
3490
|
+
/**
|
|
3491
|
+
* Adds a type layer (one undo step) and makes it active: point text at `x`, `y`, or paragraph
|
|
3492
|
+
* text wrapped in `box`. Refused without a text shaper. Returns its id.
|
|
3493
|
+
*/
|
|
3494
|
+
addTextLayer(init: TextLayerInit): string;
|
|
3495
|
+
/**
|
|
3496
|
+
* Replaces text [start, end) (default all of it) with `text`; inserted text takes the style at
|
|
3497
|
+
* `start`. One undo step unless `commitToHistory` is false (typing). Returns the layer.
|
|
3498
|
+
*/
|
|
3499
|
+
setText(id: string, text: string, range?: {
|
|
3500
|
+
start?: number;
|
|
3501
|
+
end?: number;
|
|
3502
|
+
}, commitToHistory?: boolean): TypeLayerInfo;
|
|
3503
|
+
/** Sets character style fields over [start, end) (default all), one undo step. Returns the layer. */
|
|
3504
|
+
setTextStyle(id: string, style: Partial<TextStyle> & Record<string, unknown>, range?: {
|
|
3505
|
+
start?: number;
|
|
3506
|
+
end?: number;
|
|
3507
|
+
}, commitToHistory?: boolean): TypeLayerInfo;
|
|
3508
|
+
/** Sets paragraph style fields on every paragraph that [start, end) touches (default all), one undo step. */
|
|
3509
|
+
setParagraphStyle(id: string, style: ParagraphStyle & Record<string, unknown>, range?: {
|
|
3510
|
+
start?: number;
|
|
3511
|
+
end?: number;
|
|
3512
|
+
}, commitToHistory?: boolean): TypeLayerInfo;
|
|
3513
|
+
/**
|
|
3514
|
+
* Point text ↔ paragraph text: `{ kind: 'box', width, height }` wraps the text in a box (its
|
|
3515
|
+
* top-left where the first line's top-left is now), `{ kind: 'point' }` sets it on one line per
|
|
3516
|
+
* paragraph. Also resizes a box. One undo step.
|
|
3517
|
+
*/
|
|
3518
|
+
setTextFrame(id: string, frame: {
|
|
3519
|
+
kind: 'point';
|
|
3520
|
+
} | {
|
|
3521
|
+
kind: 'box';
|
|
3522
|
+
width: number;
|
|
3523
|
+
height: number;
|
|
3524
|
+
}, commitToHistory?: boolean): TypeLayerInfo;
|
|
3525
|
+
/**
|
|
3526
|
+
* Convert to Shape: the text's glyph outlines become a shape layer with the same id, name and
|
|
3527
|
+
* layer properties (needs a shaper that gives outlines). The fill is the first run's colour;
|
|
3528
|
+
* `warnings` says when other colours were dropped. One undo step.
|
|
3529
|
+
*/
|
|
3530
|
+
convertTextToShape(id: string): {
|
|
3531
|
+
layerId: string;
|
|
3532
|
+
warnings: string[];
|
|
3533
|
+
};
|
|
3534
|
+
/** The layout of a type layer (lines, characters, bounds in text space), or `null` without a shaper. */
|
|
3535
|
+
getTextLayout(id: string): TextLayout | null;
|
|
3536
|
+
/** The text index nearest a document point (for clicks on a type layer). */
|
|
3537
|
+
textIndexAt(id: string, point: ImagePoint): number;
|
|
3538
|
+
/** The caret at text index `index` as a document-space segment (top to bottom), for drawing it. */
|
|
3539
|
+
textCaret(id: string, index: number): {
|
|
3540
|
+
top: ImagePoint;
|
|
3541
|
+
bottom: ImagePoint;
|
|
3542
|
+
line: number;
|
|
3543
|
+
} | null;
|
|
3021
3544
|
/** What shape rendering needs: the canvas size and the document's patterns. */
|
|
3022
3545
|
private shapeEnv;
|
|
3023
3546
|
/** One component from tool or UI input (validated). */
|
|
@@ -3038,10 +3561,7 @@ declare class ImageEditorController {
|
|
|
3038
3561
|
*/
|
|
3039
3562
|
setShapeStyle(id: string, changes: {
|
|
3040
3563
|
fill?: ShapePaint | string | null;
|
|
3041
|
-
stroke?:
|
|
3042
|
-
paint?: ShapePaint | string;
|
|
3043
|
-
color?: string;
|
|
3044
|
-
}) | null;
|
|
3564
|
+
stroke?: ShapeStrokeInput | null;
|
|
3045
3565
|
fillRule?: ShapeFillRule;
|
|
3046
3566
|
}, commitToHistory?: boolean): ShapeLayerInfo;
|
|
3047
3567
|
private componentIndex;
|
|
@@ -3081,6 +3601,11 @@ declare class ImageEditorController {
|
|
|
3081
3601
|
height: number;
|
|
3082
3602
|
summary: PsdImportResult['summary'];
|
|
3083
3603
|
};
|
|
3604
|
+
/**
|
|
3605
|
+
* Type layers whose fonts the shaper lacks: they keep Photoshop's pixels, are marked with their
|
|
3606
|
+
* `missingFonts`, and a warning names them (an edit draws them with a fallback).
|
|
3607
|
+
*/
|
|
3608
|
+
private checkPsdFonts;
|
|
3084
3609
|
/**
|
|
3085
3610
|
* The document as an 8-bit RGB PSD (PSB above 30 000 px) with real layers, groups, adjustment
|
|
3086
3611
|
* layers and masks, in the source frame. Layer filters and parametric (depth) masks are baked
|
|
@@ -3395,7 +3920,11 @@ interface ImageAnnotation extends BaseAnnotation {
|
|
|
3395
3920
|
}
|
|
3396
3921
|
type Annotation = PenAnnotation | RectAnnotation | CircleAnnotation | ArrowAnnotation | LineAnnotation | TextAnnotation | ImageAnnotation;
|
|
3397
3922
|
type CreateAnnotationPayload = Omit<PenAnnotation, 'id'> | Omit<RectAnnotation, 'id'> | Omit<CircleAnnotation, 'id'> | Omit<ArrowAnnotation, 'id'> | Omit<LineAnnotation, 'id'> | Omit<TextAnnotation, 'id'> | Omit<ImageAnnotation, 'id'>;
|
|
3398
|
-
type ImageEditorTool = 'select' | 'crop' | 'pen' | 'rect' | 'circle' | 'arrow' | 'line' | 'text' | 'watermark' | 'move' | 'brush' | 'eraser' | 'mixer'
|
|
3923
|
+
type ImageEditorTool = 'select' | 'crop' | 'pen' | 'rect' | 'circle' | 'arrow' | 'line' | 'text' | 'watermark' | 'move' | 'brush' | 'eraser' | 'mixer'
|
|
3924
|
+
/** Live shape layers (see `ShapeDrawGesture`). */
|
|
3925
|
+
| 'shape'
|
|
3926
|
+
/** Live type layers, edited on the canvas (see `TypeToolGesture`). */
|
|
3927
|
+
| 'type';
|
|
3399
3928
|
type ImageEditorFit = 'contain' | 'margin';
|
|
3400
3929
|
interface ImageEditorState {
|
|
3401
3930
|
sourceUrl: string | null;
|
|
@@ -3499,6 +4028,13 @@ interface ExportOptions {
|
|
|
3499
4028
|
layerIds?: string[];
|
|
3500
4029
|
}
|
|
3501
4030
|
interface ImageEditorOptions {
|
|
4031
|
+
/**
|
|
4032
|
+
* What lays out and draws type layers. Default: the browser's fonts through Canvas 2D
|
|
4033
|
+
* (`createCanvasTextShaper`) where there is a 2D canvas; `null` (or no canvas) keeps type layers'
|
|
4034
|
+
* stored pixels and refuses edits that would draw them. `createOutlineTextShaper` draws from
|
|
4035
|
+
* fonts you load, anywhere, and enables Convert to Shape.
|
|
4036
|
+
*/
|
|
4037
|
+
textShaper?: TextShaper | null;
|
|
3502
4038
|
image?: string | HTMLImageElement;
|
|
3503
4039
|
initialState?: Partial<SerializedImageEditorState>;
|
|
3504
4040
|
onStateChange?: (state: ImageEditorState) => void;
|
|
@@ -3552,4 +4088,4 @@ interface PsdExportResult {
|
|
|
3552
4088
|
/** Writes the prepared stack as PSD (or PSB) bytes. */
|
|
3553
4089
|
declare function exportPsd(input: PsdExportInput): PsdExportResult;
|
|
3554
4090
|
|
|
3555
|
-
export { type AnnotationType as $, type AdjustmentKind as A, type SmartFilterStack as B, type CurvePoint as C, type DepthMaskOptions as D, type SmartFilter as E, type SmartObjectLayer as F, type SmartContents as G, type HueRange as H, type ImageEditorAssetStore as I, type SmartDocument as J, type SmartPlacement as K, type LevelsChannel as L, type FreeTransformGeometry as M, type LayerPlacement as N, type FreeTransformMode as O, type PsdExportResult as P, type FreeTransformResult as Q, type RefineEdgeParams as R, type SerializedLayer as S, FreeTransformSession as T, type FreeTransformInit as U, type TransformAnchor as V, type AIResultOptions as W, type AdjustmentLayerBase as X, type AdjustmentLayerInit as Y, type AdjustmentLayerUpdate as Z, type AnnotationPlacement as _, type ImageAdjustments as a, type MagicWandOptions as a$, type ArrowAnnotation as a0, type AspectRatio as a1, type BaseAnnotation as a2, type BlackWhiteParams as a3, type BlurFilter as a4, type CircleAnnotation as a5, type ColorBalanceParams as a6, type ColorBalanceTone as a7, type ColorRangeOptions as a8, type ColorRangeSample as a9, type ImageDimensions as aA, type ImageEditorAIHooks as aB, type ImageEditorFit as aC, type ImageEditorOptions as aD, ImageEditorRenderer as aE, type ImageEditorState as aF, type ImageEditorTool as aG, type ImageLayerType as aH, type InpaintHook as aI, type InpaintOptions as aJ, type InvertParams as aK, LAYERED_SCHEMA_VERSION as aL, LIVE_SHAPE_KINDS as aM, type LayerBase as aN, type LayerBlendMode as aO, type LayerFilterKind as aP, type LayerLocation as aQ, type LayerMaskProps as aR, LayerOperationError as aS, type LayerProperties as aT, type LayerSourcesHost as aU, type LayerTarget as aV, type LegacySerializedImageEditorState as aW, type LevelsParams as aX, type LineAnnotation as aY, type LiveShape as aZ, type LiveShapeKind 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_REFINE_EDGE_PARAMS as ag, DEFAULT_TRANSFORM as ah, type DeserializeContext as ai, type DevelopSettings as aj, EMPTY_DISTANCE as ak, type ExportOptions as al, FREE_TRANSFORM_CONTENTS as am, FREE_TRANSFORM_MODES as an, type FillOptions as ao, type FreeTransformContent as ap, type FreeTransformHost as aq, type FreeTransformPreview as ar, GUIDED_FILTER_EPS as as, type GroupLayer as at, HISTOGRAM_BINS as au, type HistogramChannel as av, type HistoryEntryHandle as aw, type HueSaturationParams as ax, IMAGE_EDITOR_SCHEMA_VERSION as ay, type ImageAnnotation as az, type SerializedImageEditorState as b, type ShapeSelectionOptions as b$, type MixerStrokeInit as b0, PSD_BLEND_KEYS as b1, type PaintOptions as b2, type PaintStrokeResult as b3, PaintStrokeSession as b4, type PenAnnotation as b5, type PhotoFilterParams as b6, type PixelBuffer as b7, type PixelLayerInit as b8, type PosterizeParams as b9, type SerializeContext as bA, type SerializedAdjustmentLayer as bB, type SerializedAnnotationLayer as bC, type SerializedGroupLayer as bD, type SerializedLayerEffects as bE, type SerializedLayeredImageEditorState as bF, type SerializedPattern as bG, type SerializedPixelLayer as bH, type SerializedRasterMask as bI, type SerializedSelection as bJ, type SerializedShapeLayer as bK, type SerializedSmartContents as bL, type SerializedSmartFilter as bM, type SerializedSmartObjectLayer as bN, type ShapeArrowhead as bO, type ShapeComponent as bP, type ShapeEnv as bQ, type ShapeFillRule as bR, type ShapeGeometryInput as bS, type ShapeLayerData as bT, type ShapeLayerInfo as bU, type ShapeLayerInit as bV, type ShapeLineCap as bW, type ShapeLineJoin as bX, type ShapeOperation as bY, type ShapePaint as bZ, type ShapePsdData as b_, type PsdChannel as ba, type PsdExportInput as bb, type PsdFile as bc, type PsdHeader as bd, type PsdImportOptions as be, type PsdImportResult as bf, type PsdLayerMask as bg, type PsdLayerRecord as bh, type PsdLayerSummary as bi, type PsdRect as bj, type PsdResource as bk, type PsdSmartFilter as bl, type PsdTaggedBlock as bm, type PsdTreeNode as bn, type RectAnnotation as bo, type RemoveBackgroundHook as bp, type RemoveBackgroundOptions as bq, type RenderOptions as br, SELECTION_MODES as bs, SELECTION_MODIFY_OPS as bt, SHAPE_OPERATIONS as bu, SHAPE_RENDER_MARGIN as bv, type SampleOptions as bw, type SelectionChannel as bx, type SelectionCommandOptions as by, type SelectionModifyOp as bz, type AdjustmentLayer as c, expandCoverage as c$, type ShapeStroke as c0, type ShapeStrokeAlign as c1, type SmartFilterKind as c2, type SmartObjectInfo as c3, type SmartPsdData as c4, type StrokeInit as c5, type StrokeTool as c6, TONE_RANGE_PRESETS as c7, TRANSFORM_ANCHORS as c8, type TextAnnotation as c9, computeSelectionBounds as cA, contractCoverage as cB, cornersFromMatrix as cC, coverageToByte as cD, createSelectionMask as cE, createShapeLayer as cF, decodeLayerChannel as cG, decodeLayerMask as cH, decodeMergedImage as cI, decodePngDataUrl as cJ, decodeSelectionRle as cK, defaultShapeName as cL, depthMaskAlpha as cM, describeTransform as cN, deserializeEffects as cO, deserializeLayer as cP, deserializeLayers as cQ, deserializePatterns as cR, deserializeSelection as cS, developFilter as cT, distanceTransform as cU, duplicateLayer as cV, edgeWidth as cW, ellipsePoints as cX, ellipseSelection as cY, encodeSelectionRle as cZ, encodeSurface as c_, type ThresholdParams as ca, type ToneRangePreset as cb, type TransformParams as cc, type TransformReadout as cd, type VibranceParams as ce, type ViewportMetrics as cf, addLayerEffect as cg, addLayerFilter as ch, adjustmentNodeAsLayer as ci, anchorPoint as cj, annotationBlend as ck, annotationOfShape as cl, applyImageProjectionToContext as cm, applyParams as cn, blurFilter as co, borderCoverage as cp, boxMean as cq, boxPointOf as cr, buildLayerMaskPlanes as cs, calculateCropDrag as ct, canvasToImagePoint as cu, clampCropToImage as cv, colorRange as cw, combineSelections as cx, componentPath as cy, computeHistogram as cz, type AdjustmentParamsMap as d, normalizeShapeStroke as d$, exportPsd as d0, featherCoverage as d1, flipCorners as d2, fullSelection as d3, geometryHomography as d4, getAnnotationBounds as d5, getCropCursor as d6, getRotatedSize as d7, getViewportMetrics as d8, getViewportProjection as d9, layerEffectsOf as dA, layerMaskCoverage as dB, layerMaskFromSelection as dC, layerMaskKey as dD, layerName as dE, layerTree as dF, layerTypeLabel as dG, liveComponent as dH, liveShapeSubpaths as dI, magicWand as dJ, mapCropHandle as dK, mapSubpaths as dL, matrixFromCorners as dM, matrixFromParams as dN, mergeShapeComponents as dO, migrateSerializedImageEditorState as dP, migrateToLayeredState as dQ, modifySelection as dR, moveLayer as dS, newLayerId as dT, normalizeAngle as dU, normalizeFilter as dV, normalizeLayerMask as dW, normalizeLiveShape as dX, normalizeRect as dY, normalizeRefineEdgeParams as dZ, normalizeShapePaint as d_, globalImageCache as da, greyMorphology as db, groupLayers as dc, guidePlanes as dd, guidedFilterColor as de, hasSurface as df, hasWarp as dg, hashMaskContent as dh, histogramPath as di, hitTestAnnotation as dj, hitTestCrop as dk, hueRange as dl, identityTransform as dm, imageToCanvasPoint as dn, importPsd as dp, invertSelection as dq, isActiveFilter as dr, isIdentityTransform as ds, isQuarterTurnSwapped as dt, isRenderedLayer as du, isSelectionEmpty as dv, isSelectionMode as dw, isSpatialFilter as dx, isTransformAnchor as dy, isValidWarp as dz, type AdjustmentLayerMask as e, smoothCoverage as e$, normalizeStoredAdjustments as e0, normalizeSubpaths as e1, offsetLayer as e2, offsetShape as e3, parseBlend as e4, parseColor as e5, parseSelectionMode as e6, pixelLayerBounds as e7, pixelLayers as e8, placeLayer as e9, resolveExternalAssets as eA, runLayerFilters as eB, selectionArea as eC, selectionFromCoverage as eD, selectionFromPixels as eE, selectionToCoverage as eF, selectionToPixels as eG, selectionValueAt as eH, serializeContents as eI, serializeEffects as eJ, serializeLayer as eK, serializeLayers as eL, serializeLayersExternal as eM, serializePatterns as eN, serializeSelection as eO, setLayerEffects as eP, setLayerEffectsEnabled as eQ, setLayerMask as eR, setLayerProperties as eS, shapeAsPixelLayer as eT, shapeFromAnnotation as eU, shapeGeometryBounds as eV, shapeLayers as eW, shapeOutline as eX, shapeRenderClip as eY, shiftCoverage as eZ, smartObjectLayers as e_, polygonCoverage as ea, polygonSelection as eb, presetWarp as ec, previewStep as ed, projectImagePoint as ee, projectImageRect as ef, projectMaskCoverage as eg, psdToLayers as eh, readPsd as ei, rectSelection as ej, referencePoint as ek, refineCoverage as el, refineEdgeHalo as em, refineSelection as en, removeLayer as eo, removeLayerEffect as ep, removeLayerFilter as eq, renderShape as er, renderShapeRect as es, requireLayer as et, requireOperation as eu, requireShapeLayer as ev, requireUnlocked as ew, rerenderShape as ex, resizePixels as ey, resizeSelection as ez, type AdjustmentLayerOf as f, srgb8ToLab as f0, toHex as f1, toneRange as f2, transformHomography as f3, transformMap as f4, transformShapeComponents as f5, transformedBox as f6, transformedPoint as f7, ungroupLayer as f8, unionRect as f9, unprojectCanvasPoint as fa, updateLayerEffect as fb, updateLayerFilter as fc, updateLayerMaskProps as fd, updateShapeLayer as fe, withNewIds as ff, writePsd as fg, ImageEditorController as g, 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 LayerFilter as s, type PixelLayer as t, type DevelopFilter as u, type ImageTransform as v, type ImageHistogram as w, type ImageProjection as x, type CompositorSources as y, LayerCompositor as z };
|
|
4091
|
+
export { type FreeTransformResult 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 TextShaper as O, type PsdExportResult as P, type TextFont as Q, type RefineEdgeParams as R, type SerializedLayer as S, type TextEnv as T, type LiveShapeKind as U, type TextAlign as V, type TextStyle as W, type ParagraphStyle as X, type TypeLayerInfo as Y, type LayerPlacement as Z, type FreeTransformMode as _, type ImageAdjustments as a, type LayerBase as a$, FreeTransformSession as a0, type FreeTransformInit as a1, type TransformAnchor as a2, type AIResultOptions as a3, type AdjustmentLayerBase as a4, type AdjustmentLayerInit as a5, type AdjustmentLayerUpdate as a6, type AnnotationPlacement as a7, type AnnotationType as a8, type ArrowAnnotation as a9, type FreeTransformContent as aA, type FreeTransformHost as aB, type FreeTransformPreview as aC, GUIDED_FILTER_EPS as aD, type GroupLayer as aE, HISTOGRAM_BINS as aF, type HistogramChannel as aG, type HistoryEntryHandle as aH, type HueSaturationParams as aI, IMAGE_EDITOR_SCHEMA_VERSION as aJ, type ImageAnnotation as aK, type ImageDimensions as aL, type ImageEditorAIHooks as aM, type ImageEditorFit as aN, type ImageEditorOptions as aO, ImageEditorRenderer as aP, type ImageEditorState as aQ, type ImageEditorTool as aR, type ImageLayerType as aS, type InpaintHook as aT, type InpaintOptions as aU, type InvertParams as aV, LAYERED_SCHEMA_VERSION as aW, LIVE_SHAPE_KINDS as aX, type LaidChar as aY, type LaidFragment as aZ, type LaidLine as a_, type AspectRatio as aa, type BaseAnnotation as ab, type BlackWhiteParams as ac, type BlurFilter as ad, type CircleAnnotation as ae, type ColorBalanceParams as af, type ColorBalanceTone as ag, type ColorRangeOptions as ah, type ColorRangeSample as ai, type CreateAnnotationPayload as aj, type CropHandle as ak, type CurvesParams as al, DEFAULT_ADJUSTMENTS as am, DEFAULT_AUTO_LEADING as an, DEFAULT_DEPTH_MASK as ao, DEFAULT_MITER_LIMIT as ap, DEFAULT_REFINE_EDGE_PARAMS as aq, DEFAULT_TEXT_STYLE as ar, DEFAULT_TRANSFORM as as, type DeserializeContext as at, type DevelopSettings as au, EMPTY_DISTANCE as av, type ExportOptions as aw, FREE_TRANSFORM_CONTENTS as ax, FREE_TRANSFORM_MODES as ay, type FillOptions as az, type SerializedImageEditorState as b, type SerializedSmartFilter as b$, type LayerBlendMode as b0, type LayerFilterKind as b1, type LayerLocation as b2, type LayerMaskProps as b3, LayerOperationError as b4, type LayerProperties as b5, type LayerSourcesHost as b6, type LayerTarget as b7, type LegacySerializedImageEditorState as b8, type LevelsParams as b9, type PsdSmartFilter as bA, type PsdTaggedBlock as bB, type PsdTreeNode as bC, type RectAnnotation as bD, type RemoveBackgroundHook as bE, type RemoveBackgroundOptions as bF, type RenderOptions as bG, SELECTION_MODES as bH, SELECTION_MODIFY_OPS as bI, SHAPE_OPERATIONS as bJ, SHAPE_RENDER_MARGIN as bK, type SampleOptions as bL, type SelectionChannel as bM, type SelectionCommandOptions as bN, type SelectionModifyOp as bO, type SerializeContext as bP, type SerializedAdjustmentLayer as bQ, type SerializedAnnotationLayer as bR, type SerializedGroupLayer as bS, type SerializedLayerEffects as bT, type SerializedLayeredImageEditorState as bU, type SerializedPattern as bV, type SerializedPixelLayer as bW, type SerializedRasterMask as bX, type SerializedSelection as bY, type SerializedShapeLayer as bZ, type SerializedSmartContents as b_, type LineAnnotation as ba, type LiveShape as bb, type MagicWandOptions as bc, type MixerStrokeInit as bd, PARAGRAPH_STYLE_FIELDS as be, PSD_BLEND_KEYS as bf, type PaintOptions as bg, type PaintStrokeResult as bh, PaintStrokeSession as bi, type ParagraphRun as bj, type PenAnnotation as bk, type PhotoFilterParams as bl, type PixelBuffer as bm, type PixelLayerInit as bn, type PosterizeParams as bo, type PsdChannel as bp, type PsdExportInput as bq, type PsdFile as br, type PsdHeader as bs, type PsdImportOptions as bt, type PsdImportResult as bu, type PsdLayerMask as bv, type PsdLayerRecord as bw, type PsdLayerSummary as bx, type PsdRect as by, type PsdResource as bz, type AdjustmentLayer as c, computeSelectionBounds as c$, type SerializedSmartObjectLayer as c0, type SerializedTypeLayer as c1, type ShapeArrowhead as c2, type ShapeComponent as c3, type ShapeEnv as c4, type ShapeFillRule as c5, type ShapeGeometryInput as c6, type ShapeLayerData as c7, type ShapeLayerInfo as c8, type ShapeLayerInit as c9, type TransformReadout as cA, type TypeLayerData as cB, type TypePsdData as cC, type VibranceParams as cD, type ViewportMetrics as cE, addLayerEffect as cF, addLayerFilter as cG, adjustmentNodeAsLayer as cH, anchorPoint as cI, annotationBlend as cJ, annotationOfShape as cK, annotationOfType as cL, applyImageProjectionToContext as cM, applyParams as cN, blurFilter as cO, borderCoverage as cP, boxMean as cQ, boxPointOf as cR, buildLayerMaskPlanes as cS, calculateCropDrag as cT, canvasToImagePoint as cU, caretAt as cV, clampCropToImage as cW, colorRange as cX, combineSelections as cY, componentPath as cZ, computeHistogram as c_, type ShapeLineCap as ca, type ShapeLineJoin as cb, type ShapeOperation as cc, type ShapePaint as cd, type ShapePsdData as ce, type ShapeSelectionOptions as cf, type ShapeStroke as cg, type ShapeStrokeAlign as ch, type ShapeStrokeInput as ci, type SmartFilterKind as cj, type SmartObjectInfo as ck, type SmartPsdData as cl, type StrokeInit as cm, type StrokeTool as cn, TEXT_ALIGNS 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 TextLayout as cv, type TextRun as cw, type ThresholdParams as cx, type ToneRangePreset as cy, type TransformParams as cz, type AdjustmentParamsMap as d, isSelectionMode as d$, contractCoverage as d0, cornersFromMatrix as d1, coverageToByte as d2, createSelectionMask as d3, createShapeLayer as d4, createTypeLayer as d5, decodeLayerChannel as d6, decodeLayerMask as d7, decodeMergedImage as d8, decodePngDataUrl as d9, geometryHomography as dA, getAnnotationBounds as dB, getCropCursor as dC, getRotatedSize as dD, getViewportMetrics as dE, getViewportProjection as dF, globalImageCache as dG, greyMorphology as dH, groupLayers as dI, guidePlanes as dJ, guidedFilterColor as dK, hasSurface as dL, hasWarp as dM, hashMaskContent as dN, histogramPath as dO, hitTestAnnotation as dP, hitTestCrop as dQ, hueRange as dR, identityTransform as dS, imageToCanvasPoint as dT, importPsd as dU, invertSelection as dV, isActiveFilter as dW, isIdentityTransform as dX, isQuarterTurnSwapped as dY, isRenderedLayer as dZ, isSelectionEmpty as d_, decodeSelectionRle as da, defaultShapeName as db, depthMaskAlpha as dc, describeTransform as dd, deserializeEffects as de, deserializeLayer as df, deserializeLayers as dg, deserializePatterns as dh, deserializeSelection as di, developFilter as dj, distanceTransform as dk, duplicateLayer as dl, edgeWidth as dm, ellipsePoints as dn, ellipseSelection as dp, encodeSelectionRle as dq, encodeSurface as dr, expandCoverage as ds, exportPsd as dt, featherCoverage as du, fitParagraphRuns as dv, fitRuns as dw, flipCorners as dx, fontOf as dy, fullSelection as dz, type AdjustmentLayerMask as e, renderShape as e$, isSpatialFilter as e0, isTransformAnchor as e1, isValidWarp as e2, layerEffectsOf as e3, layerMaskCoverage as e4, layerMaskFromSelection as e5, layerMaskKey as e6, layerName as e7, layerTree as e8, layerTypeLabel as e9, offsetShape as eA, paragraphRanges as eB, parseBlend as eC, parseColor as eD, parseSelectionMode as eE, patchParagraphStyle as eF, patchTextStyle as eG, pixelLayerBounds as eH, pixelLayers as eI, placeLayer as eJ, polygonCoverage as eK, polygonSelection as eL, presetWarp as eM, previewStep as eN, projectImagePoint as eO, projectImageRect as eP, projectMaskCoverage as eQ, psdToLayers as eR, readPsd as eS, rectSelection as eT, referencePoint as eU, refineCoverage as eV, refineEdgeHalo as eW, refineSelection as eX, removeLayer as eY, removeLayerEffect as eZ, removeLayerFilter as e_, layoutText as ea, liveComponent as eb, liveShapeSubpaths as ec, magicWand as ed, mapCropHandle as ee, mapSubpaths as ef, matrixFromCorners as eg, matrixFromParams as eh, mergeShapeComponents as ei, migrateSerializedImageEditorState as ej, migrateToLayeredState as ek, modifySelection as el, moveLayer as em, newLayerId as en, normalizeAngle as eo, normalizeFilter as ep, normalizeLayerMask as eq, normalizeLiveShape as er, normalizeRect as es, normalizeRefineEdgeParams as et, normalizeShapePaint as eu, normalizeShapeStroke as ev, normalizeStoredAdjustments as ew, normalizeSubpaths as ex, normalizeText as ey, offsetLayer as ez, type AdjustmentLayerOf as f, unprojectCanvasPoint as f$, renderShapeRect as f0, renderText as f1, replaceTextRange as f2, requireLayer as f3, requireOperation as f4, requireShapeLayer as f5, requireTypeLayer as f6, requireUnlocked as f7, rerenderShape as f8, rerenderText as f9, shapeOutline as fA, shapeRenderClip as fB, shiftCoverage as fC, smartObjectLayers as fD, smoothCoverage as fE, spliceRuns as fF, srgb8ToLab as fG, styleAt as fH, textIndexAt as fI, textMatrix as fJ, textOutlines as fK, textRange as fL, toHex as fM, toTextSpace as fN, toneRange as fO, transformHomography as fP, transformMap as fQ, transformShapeComponents as fR, transformTypeLayer as fS, transformedBox as fT, transformedPoint as fU, typeAsPixelLayer as fV, typeFrame as fW, typeFromAnnotation as fX, typeLayerName as fY, ungroupLayer as fZ, unionRect as f_, resizePixels as fa, resizeSelection as fb, resolveExternalAssets as fc, restyleRange as fd, runLayerFilters as fe, selectionArea as ff, selectionFromCoverage as fg, selectionFromPixels as fh, selectionToCoverage as fi, selectionToPixels as fj, selectionValueAt as fk, serializeContents as fl, serializeEffects as fm, serializeLayer as fn, serializeLayers as fo, serializeLayersExternal as fp, serializePatterns as fq, serializeSelection as fr, setLayerEffects as fs, setLayerEffectsEnabled as ft, setLayerMask as fu, setLayerProperties as fv, shapeAsPixelLayer as fw, shapeFromAnnotation as fx, shapeGeometryBounds as fy, shapeLayers as fz, ImageEditorController as g, updateLayerEffect as g0, updateLayerFilter as g1, updateLayerMaskProps as g2, updateShapeLayer as g3, updateTypeLayer as g4, withNewIds as g5, writePsd as g6, 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 };
|