@pixerate/editor-react 0.142.0 → 0.144.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/{chunk-ULBLX67B.js → chunk-3CB4WG24.js} +564 -460
- package/dist/image-editor/ImageEditorCanvas.d.cts +1 -1
- package/dist/image-editor/ImageEditorCanvas.d.ts +1 -1
- package/dist/image-editor/MaskEdgeCheck.d.cts +16 -0
- package/dist/image-editor/MaskEdgeCheck.d.ts +16 -0
- package/dist/image-editor/PathsPanel.d.cts +2 -1
- package/dist/image-editor/PathsPanel.d.ts +2 -1
- package/dist/image-editor/RefineEdgePanel.d.cts +2 -1
- package/dist/image-editor/RefineEdgePanel.d.ts +2 -1
- package/dist/image-editor/index.cjs +596 -494
- package/dist/image-editor/index.d.cts +1 -0
- package/dist/image-editor/index.d.ts +1 -0
- package/dist/image-editor/index.js +3 -1
- package/dist/index.cjs +1121 -1019
- package/dist/index.js +3 -1
- package/package.json +3 -3
|
@@ -6,7 +6,7 @@ import type { UseImageEditorReturn } from './useImageEditor.cjs';
|
|
|
6
6
|
/** What pointer gestures on the canvas do (and whether the crop overlay shows). */
|
|
7
7
|
export type ImageEditorCanvasMode = 'crop' | 'select' | 'paint' | 'annotate' | 'none';
|
|
8
8
|
/** Which gesture an `onError` report comes from. */
|
|
9
|
-
export type ImageEditorCanvasErrorSource = 'paint' | 'select' | 'shape' | 'type';
|
|
9
|
+
export type ImageEditorCanvasErrorSource = 'paint' | 'select' | 'shape' | 'type' | 'path';
|
|
10
10
|
export interface ImageEditorCanvasProps {
|
|
11
11
|
/** The editor to draw and edit (`useImageEditor`). */
|
|
12
12
|
editor: UseImageEditorReturn;
|
|
@@ -6,7 +6,7 @@ import type { UseImageEditorReturn } from './useImageEditor.js';
|
|
|
6
6
|
/** What pointer gestures on the canvas do (and whether the crop overlay shows). */
|
|
7
7
|
export type ImageEditorCanvasMode = 'crop' | 'select' | 'paint' | 'annotate' | 'none';
|
|
8
8
|
/** Which gesture an `onError` report comes from. */
|
|
9
|
-
export type ImageEditorCanvasErrorSource = 'paint' | 'select' | 'shape' | 'type';
|
|
9
|
+
export type ImageEditorCanvasErrorSource = 'paint' | 'select' | 'shape' | 'type' | 'path';
|
|
10
10
|
export interface ImageEditorCanvasProps {
|
|
11
11
|
/** The editor to draw and edit (`useImageEditor`). */
|
|
12
12
|
editor: UseImageEditorReturn;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ImageEditorController, MaskEdgeTarget, SelectionMask } from '@pixerate/editor/image-editor';
|
|
3
|
+
export interface MaskEdgeCheckProps {
|
|
4
|
+
controller: ImageEditorController;
|
|
5
|
+
/** The current selection (`state.selection`): a report on an older selection is cleared. */
|
|
6
|
+
selection?: SelectionMask | null;
|
|
7
|
+
/** What to check (default the selection); masks need `layerId`. */
|
|
8
|
+
target?: MaskEdgeTarget;
|
|
9
|
+
layerId?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Check Edge: measures the selection's (or a mask's) edge, as the `inspect_mask_edge` tool does,
|
|
14
|
+
* and lists the scores (flagged past the thresholds), holes, islands and findings with fixes.
|
|
15
|
+
*/
|
|
16
|
+
export declare const MaskEdgeCheck: React.FC<MaskEdgeCheckProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ImageEditorController, MaskEdgeTarget, SelectionMask } from '@pixerate/editor/image-editor';
|
|
3
|
+
export interface MaskEdgeCheckProps {
|
|
4
|
+
controller: ImageEditorController;
|
|
5
|
+
/** The current selection (`state.selection`): a report on an older selection is cleared. */
|
|
6
|
+
selection?: SelectionMask | null;
|
|
7
|
+
/** What to check (default the selection); masks need `layerId`. */
|
|
8
|
+
target?: MaskEdgeTarget;
|
|
9
|
+
layerId?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Check Edge: measures the selection's (or a mask's) edge, as the `inspect_mask_edge` tool does,
|
|
14
|
+
* and lists the scores (flagged past the thresholds), holes, islands and findings with fixes.
|
|
15
|
+
*/
|
|
16
|
+
export declare const MaskEdgeCheck: React.FC<MaskEdgeCheckProps>;
|
|
@@ -11,6 +11,7 @@ export interface PathsPanelProps {
|
|
|
11
11
|
* thumbnails. Click selects a path, double-click renames it (renaming the Work Path saves it).
|
|
12
12
|
* Load as Selection (Shift adds, Alt subtracts), Make Work Path from the selection, Fill and
|
|
13
13
|
* Stroke on the active layer with a colour and width, Add Vector Mask to the active layer,
|
|
14
|
-
* Duplicate and Delete. Every change is one undo step on
|
|
14
|
+
* Duplicate and Delete. Clicking empty space deselects the path. Every change is one undo step on
|
|
15
|
+
* the controller.
|
|
15
16
|
*/
|
|
16
17
|
export declare const PathsPanel: React.FC<PathsPanelProps>;
|
|
@@ -11,6 +11,7 @@ export interface PathsPanelProps {
|
|
|
11
11
|
* thumbnails. Click selects a path, double-click renames it (renaming the Work Path saves it).
|
|
12
12
|
* Load as Selection (Shift adds, Alt subtracts), Make Work Path from the selection, Fill and
|
|
13
13
|
* Stroke on the active layer with a colour and width, Add Vector Mask to the active layer,
|
|
14
|
-
* Duplicate and Delete. Every change is one undo step on
|
|
14
|
+
* Duplicate and Delete. Clicking empty space deselects the path. Every change is one undo step on
|
|
15
|
+
* the controller.
|
|
15
16
|
*/
|
|
16
17
|
export declare const PathsPanel: React.FC<PathsPanelProps>;
|
|
@@ -9,7 +9,8 @@ export interface RefineEdgePanelProps {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Refine Edge (snap the selection, e.g. a coarse AI mask, to the image's edges)
|
|
12
|
+
* Refine Edge (snap the selection, e.g. a coarse AI mask, to the image's edges), Check Edge (its
|
|
13
|
+
* measured quality, see `MaskEdgeCheck`) and layer masks:
|
|
13
14
|
* use the selection as an adjustment layer's mask, edit mask density and feather, load a mask
|
|
14
15
|
* back as a selection.
|
|
15
16
|
*/
|
|
@@ -9,7 +9,8 @@ export interface RefineEdgePanelProps {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Refine Edge (snap the selection, e.g. a coarse AI mask, to the image's edges)
|
|
12
|
+
* Refine Edge (snap the selection, e.g. a coarse AI mask, to the image's edges), Check Edge (its
|
|
13
|
+
* measured quality, see `MaskEdgeCheck`) and layer masks:
|
|
13
14
|
* use the selection as an adjustment layer's mask, edit mask density and feather, load a mask
|
|
14
15
|
* back as a selection.
|
|
15
16
|
*/
|