@pixerate/editor 0.215.0 → 0.216.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.
@@ -1,5 +1,6 @@
1
1
  import { AdjustmentKind, AdjustmentLayer, AdjustmentParamsMap, Annotation, CreateAnnotationPayload, AspectRatio, CropBox, DepthMaskOptions, ExportOptions, ImageAdjustments, ImageDimensions, ImageEditorFit, ImageEditorOptions, ImageEditorState, ImageEditorTool, ImageTransform, ImagePoint, SerializedImageEditorState, DocumentOpener } from './types.cjs';
2
2
  import { type InspectMaskEdgeOptions, type MaskEdgeReport } from './selection/inspect.cjs';
3
+ import { type SelectionUncertainty, type SelectionUncertaintyOptions } from './selection/uncertainty.cjs';
3
4
  import { type PathToSelectionOptions, type SelectionToPathOptions } from './selection/path.cjs';
4
5
  import { type MagneticEdgeOptions } from './selection/magnetic.cjs';
5
6
  import type { ObjectTarget } from './selection/segment/grabcut.cjs';
@@ -1876,6 +1877,8 @@ export declare class ImageEditorController {
1876
1877
  decontaminate?: number;
1877
1878
  edits?: RefineEdit[];
1878
1879
  refineMode?: 'color' | 'object';
1880
+ /** Refine only inside these rectangles (e.g. `selectionUncertainty().regions`); the rest stays as it was. */
1881
+ regions?: CropBox[];
1879
1882
  signal?: AbortSignal;
1880
1883
  }): Promise<RefineOutputResult>;
1881
1884
  /**
@@ -2054,6 +2057,15 @@ export declare class ImageEditorController {
2054
2057
  target: MaskEdgeTarget;
2055
2058
  layerId?: string;
2056
2059
  };
2060
+ /** Whole-pixel rectangles inside the canvas, or a useful error; undefined stays undefined. */
2061
+ private checkRegions;
2062
+ /**
2063
+ * Where the selection is unsure of itself: the stretches of its edge with no image edge under
2064
+ * them, widened into a band (a trimap's unknown), as a mask and regions with bounds and
2065
+ * confidence, least confident first. Measured against the composite. Read-only; an empty
2066
+ * selection has none.
2067
+ */
2068
+ selectionUncertainty(options?: SelectionUncertaintyOptions): SelectionUncertainty;
2057
2069
  /** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
2058
2070
  private layerMaskCoverage;
2059
2071
  /**
@@ -1,5 +1,6 @@
1
1
  import { AdjustmentKind, AdjustmentLayer, AdjustmentParamsMap, Annotation, CreateAnnotationPayload, AspectRatio, CropBox, DepthMaskOptions, ExportOptions, ImageAdjustments, ImageDimensions, ImageEditorFit, ImageEditorOptions, ImageEditorState, ImageEditorTool, ImageTransform, ImagePoint, SerializedImageEditorState, DocumentOpener } from './types.js';
2
2
  import { type InspectMaskEdgeOptions, type MaskEdgeReport } from './selection/inspect.js';
3
+ import { type SelectionUncertainty, type SelectionUncertaintyOptions } from './selection/uncertainty.js';
3
4
  import { type PathToSelectionOptions, type SelectionToPathOptions } from './selection/path.js';
4
5
  import { type MagneticEdgeOptions } from './selection/magnetic.js';
5
6
  import type { ObjectTarget } from './selection/segment/grabcut.js';
@@ -1876,6 +1877,8 @@ export declare class ImageEditorController {
1876
1877
  decontaminate?: number;
1877
1878
  edits?: RefineEdit[];
1878
1879
  refineMode?: 'color' | 'object';
1880
+ /** Refine only inside these rectangles (e.g. `selectionUncertainty().regions`); the rest stays as it was. */
1881
+ regions?: CropBox[];
1879
1882
  signal?: AbortSignal;
1880
1883
  }): Promise<RefineOutputResult>;
1881
1884
  /**
@@ -2054,6 +2057,15 @@ export declare class ImageEditorController {
2054
2057
  target: MaskEdgeTarget;
2055
2058
  layerId?: string;
2056
2059
  };
2060
+ /** Whole-pixel rectangles inside the canvas, or a useful error; undefined stays undefined. */
2061
+ private checkRegions;
2062
+ /**
2063
+ * Where the selection is unsure of itself: the stretches of its edge with no image edge under
2064
+ * them, widened into a band (a trimap's unknown), as a mask and regions with bounds and
2065
+ * confidence, least confident first. Measured against the composite. Read-only; an empty
2066
+ * selection has none.
2067
+ */
2068
+ selectionUncertainty(options?: SelectionUncertaintyOptions): SelectionUncertainty;
2057
2069
  /** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
2058
2070
  private layerMaskCoverage;
2059
2071
  /**