@pixerate/editor 0.213.0 → 0.214.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/dist/image-editor/controller.d.cts +15 -0
- package/dist/image-editor/controller.d.ts +15 -0
- package/dist/image-editor/index.cjs +687 -209
- package/dist/image-editor/index.js +495 -17
- package/dist/image-editor/selection/index.d.cts +1 -0
- package/dist/image-editor/selection/index.d.ts +1 -0
- package/dist/image-editor/selection/inspect.d.cts +70 -0
- package/dist/image-editor/selection/inspect.d.ts +70 -0
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +1 -0
- package/skills/pixerate-image-selection-masking/SKILL.md +9 -9
|
@@ -1,4 +1,5 @@
|
|
|
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
|
+
import { type InspectMaskEdgeOptions, type MaskEdgeReport } from './selection/inspect.cjs';
|
|
2
3
|
import { type PathToSelectionOptions, type SelectionToPathOptions } from './selection/path.cjs';
|
|
3
4
|
import { type MagneticEdgeOptions } from './selection/magnetic.cjs';
|
|
4
5
|
import type { ObjectTarget } from './selection/segment/grabcut.cjs';
|
|
@@ -280,6 +281,8 @@ export interface CloneSource {
|
|
|
280
281
|
* closed }]` or SVG path data), and how it combines with the components below it.
|
|
281
282
|
*/
|
|
282
283
|
/** A vector mask's path: several `components`, or one `shape` / `subpaths` (with `op`). */
|
|
284
|
+
/** What `inspectMaskEdge` reads: the selection, a layer's painted mask or its vector mask. */
|
|
285
|
+
export type MaskEdgeTarget = 'selection' | 'layer-mask' | 'vector-mask';
|
|
283
286
|
export interface VectorMaskPathInput extends ShapeGeometryInput {
|
|
284
287
|
components?: ShapeGeometryInput[];
|
|
285
288
|
fillRule?: ShapeFillRule;
|
|
@@ -2010,6 +2013,18 @@ export declare class ImageEditorController {
|
|
|
2010
2013
|
* with `invert`. False without a painted mask (a depth mask is computed, not painted).
|
|
2011
2014
|
*/
|
|
2012
2015
|
selectionFromLayerMask(layerId: string, mode?: SelectionMode, invert?: boolean): boolean;
|
|
2016
|
+
/**
|
|
2017
|
+
* A measured report on a mask's edge (`inspect_mask_edge`): the selection (default), a layer's
|
|
2018
|
+
* painted mask or its vector mask (its path, without density or feather). Halo and alignment are
|
|
2019
|
+
* measured against the layer's own pixels for a pixel layer's masks, else the composite.
|
|
2020
|
+
* Read-only. Throws for an empty selection or a layer without that mask.
|
|
2021
|
+
*/
|
|
2022
|
+
inspectMaskEdge(target?: MaskEdgeTarget, options?: InspectMaskEdgeOptions & {
|
|
2023
|
+
layerId?: string;
|
|
2024
|
+
}): MaskEdgeReport & {
|
|
2025
|
+
target: MaskEdgeTarget;
|
|
2026
|
+
layerId?: string;
|
|
2027
|
+
};
|
|
2013
2028
|
/** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
|
|
2014
2029
|
private layerMaskCoverage;
|
|
2015
2030
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
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
|
+
import { type InspectMaskEdgeOptions, type MaskEdgeReport } from './selection/inspect.js';
|
|
2
3
|
import { type PathToSelectionOptions, type SelectionToPathOptions } from './selection/path.js';
|
|
3
4
|
import { type MagneticEdgeOptions } from './selection/magnetic.js';
|
|
4
5
|
import type { ObjectTarget } from './selection/segment/grabcut.js';
|
|
@@ -280,6 +281,8 @@ export interface CloneSource {
|
|
|
280
281
|
* closed }]` or SVG path data), and how it combines with the components below it.
|
|
281
282
|
*/
|
|
282
283
|
/** A vector mask's path: several `components`, or one `shape` / `subpaths` (with `op`). */
|
|
284
|
+
/** What `inspectMaskEdge` reads: the selection, a layer's painted mask or its vector mask. */
|
|
285
|
+
export type MaskEdgeTarget = 'selection' | 'layer-mask' | 'vector-mask';
|
|
283
286
|
export interface VectorMaskPathInput extends ShapeGeometryInput {
|
|
284
287
|
components?: ShapeGeometryInput[];
|
|
285
288
|
fillRule?: ShapeFillRule;
|
|
@@ -2010,6 +2013,18 @@ export declare class ImageEditorController {
|
|
|
2010
2013
|
* with `invert`. False without a painted mask (a depth mask is computed, not painted).
|
|
2011
2014
|
*/
|
|
2012
2015
|
selectionFromLayerMask(layerId: string, mode?: SelectionMode, invert?: boolean): boolean;
|
|
2016
|
+
/**
|
|
2017
|
+
* A measured report on a mask's edge (`inspect_mask_edge`): the selection (default), a layer's
|
|
2018
|
+
* painted mask or its vector mask (its path, without density or feather). Halo and alignment are
|
|
2019
|
+
* measured against the layer's own pixels for a pixel layer's masks, else the composite.
|
|
2020
|
+
* Read-only. Throws for an empty selection or a layer without that mask.
|
|
2021
|
+
*/
|
|
2022
|
+
inspectMaskEdge(target?: MaskEdgeTarget, options?: InspectMaskEdgeOptions & {
|
|
2023
|
+
layerId?: string;
|
|
2024
|
+
}): MaskEdgeReport & {
|
|
2025
|
+
target: MaskEdgeTarget;
|
|
2026
|
+
layerId?: string;
|
|
2027
|
+
};
|
|
2013
2028
|
/** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
|
|
2014
2029
|
private layerMaskCoverage;
|
|
2015
2030
|
/**
|