@pixerate/editor 0.194.0 → 0.196.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 +7 -0
- package/dist/image-editor/controller.d.ts +7 -0
- package/dist/image-editor/index.cjs +573 -136
- package/dist/image-editor/index.js +447 -10
- package/dist/image-editor/selection/gesture.d.cts +12 -0
- package/dist/image-editor/selection/gesture.d.ts +12 -0
- 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/magnetic.d.cts +60 -0
- package/dist/image-editor/selection/magnetic.d.ts +60 -0
- package/dist/image-editor/selection/tool-options.d.cts +7 -1
- package/dist/image-editor/selection/tool-options.d.ts +7 -1
- package/dist/vector/controller.d.cts +6 -0
- package/dist/vector/controller.d.ts +6 -0
- package/dist/vector/index.cjs +94 -1
- package/dist/vector/index.d.cts +1 -0
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.js +93 -0
- package/dist/vector/layers.d.cts +32 -0
- package/dist/vector/layers.d.ts +32 -0
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +2 -1
- package/skills/pixerate-image-selection-masking/SKILL.md +12 -2
|
@@ -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 } from './types.cjs';
|
|
2
2
|
import { type PathToSelectionOptions, type SelectionToPathOptions } from './selection/path.cjs';
|
|
3
|
+
import { type MagneticEdgeOptions } from './selection/magnetic.cjs';
|
|
3
4
|
import { RenderOptions } from './renderer.cjs';
|
|
4
5
|
import { type BlendMode } from './blend.cjs';
|
|
5
6
|
import type { ImageHistogram } from './histogram.cjs';
|
|
@@ -1498,6 +1499,12 @@ export declare class ImageEditorController {
|
|
|
1498
1499
|
selectEllipse(rect: CropBox, options?: SelectionCommandOptions & ShapeSelectionOptions): boolean;
|
|
1499
1500
|
/** Lasso / polygonal lasso. */
|
|
1500
1501
|
selectPolygon(points: ImagePoint[], options?: SelectionCommandOptions & ShapeSelectionOptions): boolean;
|
|
1502
|
+
/**
|
|
1503
|
+
* Magnetic Lasso for a given outline: each point snaps to the strongest edge within `width` px
|
|
1504
|
+
* and consecutive points (the last back to the first) are joined along the edges. Returns the
|
|
1505
|
+
* snapped outline in natural pixels, for {@link selectPolygon}.
|
|
1506
|
+
*/
|
|
1507
|
+
snapToEdges(points: ImagePoint[], options?: MagneticEdgeOptions & SampleOptions): Promise<ImagePoint[]>;
|
|
1501
1508
|
/**
|
|
1502
1509
|
* Supplies the pixels the selection tools sample (natural size RGBA), e.g. decoded in a worker
|
|
1503
1510
|
* or in a test; `null` goes back to reading the source image. Without a canvas (Node, workers)
|
|
@@ -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 } from './types.js';
|
|
2
2
|
import { type PathToSelectionOptions, type SelectionToPathOptions } from './selection/path.js';
|
|
3
|
+
import { type MagneticEdgeOptions } from './selection/magnetic.js';
|
|
3
4
|
import { RenderOptions } from './renderer.js';
|
|
4
5
|
import { type BlendMode } from './blend.js';
|
|
5
6
|
import type { ImageHistogram } from './histogram.js';
|
|
@@ -1498,6 +1499,12 @@ export declare class ImageEditorController {
|
|
|
1498
1499
|
selectEllipse(rect: CropBox, options?: SelectionCommandOptions & ShapeSelectionOptions): boolean;
|
|
1499
1500
|
/** Lasso / polygonal lasso. */
|
|
1500
1501
|
selectPolygon(points: ImagePoint[], options?: SelectionCommandOptions & ShapeSelectionOptions): boolean;
|
|
1502
|
+
/**
|
|
1503
|
+
* Magnetic Lasso for a given outline: each point snaps to the strongest edge within `width` px
|
|
1504
|
+
* and consecutive points (the last back to the first) are joined along the edges. Returns the
|
|
1505
|
+
* snapped outline in natural pixels, for {@link selectPolygon}.
|
|
1506
|
+
*/
|
|
1507
|
+
snapToEdges(points: ImagePoint[], options?: MagneticEdgeOptions & SampleOptions): Promise<ImagePoint[]>;
|
|
1501
1508
|
/**
|
|
1502
1509
|
* Supplies the pixels the selection tools sample (natural size RGBA), e.g. decoded in a worker
|
|
1503
1510
|
* or in a test; `null` goes back to reading the source image. Without a canvas (Node, workers)
|