@pixerate/editor 0.205.0 → 0.207.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.
@@ -13,6 +13,7 @@ import { type GrowSimilarOptions, type ColorRangeOptions, type ColorRangePreset,
13
13
  import { type SelectionModifyOp } from './selection/modify.cjs';
14
14
  import { type SegmentationProvider } from './selection/segmentation.cjs';
15
15
  import { type RefineEdgeParams } from './selection/refine.cjs';
16
+ import { type RefineEdit } from './selection/refine-edits.cjs';
16
17
  import { type LayerMaskProps } from './selection/layer-mask.cjs';
17
18
  import { type AlphaChannel } from './selection/channels.cjs';
18
19
  import type { AdjustmentLayerMask } from './types.cjs';
@@ -170,6 +171,8 @@ export interface RefineOutputResult {
170
171
  layerId?: string;
171
172
  /** The layer it made (`new-layer`, `new-layer-with-mask`). */
172
173
  newLayerId?: string;
174
+ /** How the edge was refined: by colour, or with the segmentation model (object aware). */
175
+ refineMode: 'color' | 'object';
173
176
  }
174
177
  /** Options of {@link ImageEditorController.selectSky}. */
175
178
  export interface SkyCommandOptions extends SkyOptions {
@@ -1651,10 +1654,18 @@ export declare class ImageEditorController {
1651
1654
  * - `new-layer-with-mask`: a copy of the layer masked by the selection, the source hidden.
1652
1655
  * `decontaminate` (0..100, new-layer outputs only) replaces the old background's colour in the
1653
1656
  * soft edge with the subject's own (see `decontaminateColors`).
1657
+ *
1658
+ * `edits` are the workspace's strokes, applied first in order (Quick Selection, Brush and
1659
+ * Refine Edge Brush; see `RefineEdit`); with them, an empty selection is a valid start.
1660
+ * `refineMode: 'object'` asks the segmentation provider for the object in the selection's
1661
+ * bounds and refines from its outline, kept to near the selection's edge.
1654
1662
  */
1655
1663
  refineSelectionTo(params: RefineEdgeParams, output?: RefineOutput, options?: SampleOptions & {
1656
1664
  layerId?: string;
1657
1665
  decontaminate?: number;
1666
+ edits?: RefineEdit[];
1667
+ refineMode?: 'color' | 'object';
1668
+ signal?: AbortSignal;
1658
1669
  }): Promise<RefineOutputResult>;
1659
1670
  /**
1660
1671
  * Decontaminate Colors along the soft edge of `coverage`: the colours are estimated from the
@@ -13,6 +13,7 @@ import { type GrowSimilarOptions, type ColorRangeOptions, type ColorRangePreset,
13
13
  import { type SelectionModifyOp } from './selection/modify.js';
14
14
  import { type SegmentationProvider } from './selection/segmentation.js';
15
15
  import { type RefineEdgeParams } from './selection/refine.js';
16
+ import { type RefineEdit } from './selection/refine-edits.js';
16
17
  import { type LayerMaskProps } from './selection/layer-mask.js';
17
18
  import { type AlphaChannel } from './selection/channels.js';
18
19
  import type { AdjustmentLayerMask } from './types.js';
@@ -170,6 +171,8 @@ export interface RefineOutputResult {
170
171
  layerId?: string;
171
172
  /** The layer it made (`new-layer`, `new-layer-with-mask`). */
172
173
  newLayerId?: string;
174
+ /** How the edge was refined: by colour, or with the segmentation model (object aware). */
175
+ refineMode: 'color' | 'object';
173
176
  }
174
177
  /** Options of {@link ImageEditorController.selectSky}. */
175
178
  export interface SkyCommandOptions extends SkyOptions {
@@ -1651,10 +1654,18 @@ export declare class ImageEditorController {
1651
1654
  * - `new-layer-with-mask`: a copy of the layer masked by the selection, the source hidden.
1652
1655
  * `decontaminate` (0..100, new-layer outputs only) replaces the old background's colour in the
1653
1656
  * soft edge with the subject's own (see `decontaminateColors`).
1657
+ *
1658
+ * `edits` are the workspace's strokes, applied first in order (Quick Selection, Brush and
1659
+ * Refine Edge Brush; see `RefineEdit`); with them, an empty selection is a valid start.
1660
+ * `refineMode: 'object'` asks the segmentation provider for the object in the selection's
1661
+ * bounds and refines from its outline, kept to near the selection's edge.
1654
1662
  */
1655
1663
  refineSelectionTo(params: RefineEdgeParams, output?: RefineOutput, options?: SampleOptions & {
1656
1664
  layerId?: string;
1657
1665
  decontaminate?: number;
1666
+ edits?: RefineEdit[];
1667
+ refineMode?: 'color' | 'object';
1668
+ signal?: AbortSignal;
1658
1669
  }): Promise<RefineOutputResult>;
1659
1670
  /**
1660
1671
  * Decontaminate Colors along the soft edge of `coverage`: the colours are estimated from the