@pixerate/editor 0.199.0 → 0.200.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 +17 -0
- package/dist/image-editor/controller.d.ts +17 -0
- package/dist/image-editor/index.cjs +667 -515
- package/dist/image-editor/index.js +388 -236
- package/dist/image-editor/selection/segment/focus.d.cts +22 -0
- package/dist/image-editor/selection/segment/focus.d.ts +22 -0
- package/dist/image-editor/selection/segment/guided.d.cts +13 -0
- package/dist/image-editor/selection/segment/guided.d.ts +13 -0
- package/dist/image-editor/selection/segment/index.d.cts +2 -0
- package/dist/image-editor/selection/segment/index.d.ts +2 -0
- package/dist/image-editor/selection/segment/work.d.cts +2 -2
- package/dist/image-editor/selection/segment/work.d.ts +2 -2
- package/dist/image-editor/selection/tool-options.d.cts +6 -0
- package/dist/image-editor/selection/tool-options.d.ts +6 -0
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +1 -0
- package/skills/pixerate-image-selection-masking/SKILL.md +2 -0
|
@@ -2,6 +2,7 @@ import { AdjustmentKind, AdjustmentLayer, AdjustmentParamsMap, Annotation, Creat
|
|
|
2
2
|
import { type PathToSelectionOptions, type SelectionToPathOptions } from './selection/path.cjs';
|
|
3
3
|
import { type MagneticEdgeOptions } from './selection/magnetic.cjs';
|
|
4
4
|
import { type ObjectTarget } from './selection/segment/grabcut.cjs';
|
|
5
|
+
import { type FocusAreaOptions } from './selection/segment/focus.cjs';
|
|
5
6
|
import { RenderOptions } from './renderer.cjs';
|
|
6
7
|
import { type BlendMode } from './blend.cjs';
|
|
7
8
|
import type { ImageHistogram } from './histogram.cjs';
|
|
@@ -152,6 +153,13 @@ export interface QuickSelectCommandOptions {
|
|
|
152
153
|
/** Smoother, less blocky edges (Photoshop's Auto-Enhance). Default false. */
|
|
153
154
|
enhanceEdge?: boolean;
|
|
154
155
|
}
|
|
156
|
+
/** Options of {@link ImageEditorController.selectFocusArea}. */
|
|
157
|
+
export interface FocusAreaCommandOptions extends FocusAreaOptions {
|
|
158
|
+
/** How the area combines with the selection (default `replace`). */
|
|
159
|
+
mode?: SelectionMode;
|
|
160
|
+
/** Sample every layer (default true) or only the active pixel layer. */
|
|
161
|
+
sampleAllLayers?: boolean;
|
|
162
|
+
}
|
|
155
163
|
/** Options of {@link ImageEditorController.selectObject}. */
|
|
156
164
|
export interface SelectObjectCommandOptions {
|
|
157
165
|
/** How the object combines with the selection (default `replace`). */
|
|
@@ -1540,6 +1548,15 @@ export declare class ImageEditorController {
|
|
|
1540
1548
|
* Resolves to the resulting selection.
|
|
1541
1549
|
*/
|
|
1542
1550
|
selectObject(target: ObjectTarget, options?: SelectObjectCommandOptions): Promise<SelectionMask | null>;
|
|
1551
|
+
/**
|
|
1552
|
+
* Select › Focus Area: selects the parts of the image that are in focus (fine detail above the
|
|
1553
|
+
* image's noise), fitted to its edges, combined with the selection by `mode` as one undo step.
|
|
1554
|
+
* Resolves to the selection and the noise level measured (σ of luminance in levels).
|
|
1555
|
+
*/
|
|
1556
|
+
selectFocusArea(options?: FocusAreaCommandOptions): Promise<{
|
|
1557
|
+
selection: SelectionMask | null;
|
|
1558
|
+
noiseLevel: number;
|
|
1559
|
+
}>;
|
|
1543
1560
|
/**
|
|
1544
1561
|
* Supplies the pixels the selection tools sample (natural size RGBA), e.g. decoded in a worker
|
|
1545
1562
|
* or in a test; `null` goes back to reading the source image. Without a canvas (Node, workers)
|
|
@@ -2,6 +2,7 @@ import { AdjustmentKind, AdjustmentLayer, AdjustmentParamsMap, Annotation, Creat
|
|
|
2
2
|
import { type PathToSelectionOptions, type SelectionToPathOptions } from './selection/path.js';
|
|
3
3
|
import { type MagneticEdgeOptions } from './selection/magnetic.js';
|
|
4
4
|
import { type ObjectTarget } from './selection/segment/grabcut.js';
|
|
5
|
+
import { type FocusAreaOptions } from './selection/segment/focus.js';
|
|
5
6
|
import { RenderOptions } from './renderer.js';
|
|
6
7
|
import { type BlendMode } from './blend.js';
|
|
7
8
|
import type { ImageHistogram } from './histogram.js';
|
|
@@ -152,6 +153,13 @@ export interface QuickSelectCommandOptions {
|
|
|
152
153
|
/** Smoother, less blocky edges (Photoshop's Auto-Enhance). Default false. */
|
|
153
154
|
enhanceEdge?: boolean;
|
|
154
155
|
}
|
|
156
|
+
/** Options of {@link ImageEditorController.selectFocusArea}. */
|
|
157
|
+
export interface FocusAreaCommandOptions extends FocusAreaOptions {
|
|
158
|
+
/** How the area combines with the selection (default `replace`). */
|
|
159
|
+
mode?: SelectionMode;
|
|
160
|
+
/** Sample every layer (default true) or only the active pixel layer. */
|
|
161
|
+
sampleAllLayers?: boolean;
|
|
162
|
+
}
|
|
155
163
|
/** Options of {@link ImageEditorController.selectObject}. */
|
|
156
164
|
export interface SelectObjectCommandOptions {
|
|
157
165
|
/** How the object combines with the selection (default `replace`). */
|
|
@@ -1540,6 +1548,15 @@ export declare class ImageEditorController {
|
|
|
1540
1548
|
* Resolves to the resulting selection.
|
|
1541
1549
|
*/
|
|
1542
1550
|
selectObject(target: ObjectTarget, options?: SelectObjectCommandOptions): Promise<SelectionMask | null>;
|
|
1551
|
+
/**
|
|
1552
|
+
* Select › Focus Area: selects the parts of the image that are in focus (fine detail above the
|
|
1553
|
+
* image's noise), fitted to its edges, combined with the selection by `mode` as one undo step.
|
|
1554
|
+
* Resolves to the selection and the noise level measured (σ of luminance in levels).
|
|
1555
|
+
*/
|
|
1556
|
+
selectFocusArea(options?: FocusAreaCommandOptions): Promise<{
|
|
1557
|
+
selection: SelectionMask | null;
|
|
1558
|
+
noiseLevel: number;
|
|
1559
|
+
}>;
|
|
1543
1560
|
/**
|
|
1544
1561
|
* Supplies the pixels the selection tools sample (natural size RGBA), e.g. decoded in a worker
|
|
1545
1562
|
* or in a test; `null` goes back to reading the source image. Without a canvas (Node, workers)
|