@pixerate/editor-react 0.76.0 → 0.78.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/PaintGradientEditorView-CCPCY5Ib.d.cts +14 -0
- package/dist/PaintGradientEditorView-CCPCY5Ib.d.ts +14 -0
- package/dist/canvas/index.cjs +662 -561
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +36 -5
- package/dist/canvas/index.d.ts +36 -5
- package/dist/canvas/index.js +232 -129
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-LWMUV5TC.js → chunk-2EW42UXC.js} +639 -461
- package/dist/chunk-2EW42UXC.js.map +1 -0
- package/dist/chunk-FX3EREF5.js +206 -0
- package/dist/chunk-FX3EREF5.js.map +1 -0
- package/dist/chunk-MO354USR.js +126 -0
- package/dist/chunk-MO354USR.js.map +1 -0
- package/dist/chunk-ZQZAKUUM.js +416 -0
- package/dist/chunk-ZQZAKUUM.js.map +1 -0
- package/dist/effects/index.cjs +606 -0
- package/dist/effects/index.cjs.map +1 -0
- package/dist/effects/index.d.cts +80 -0
- package/dist/effects/index.d.ts +80 -0
- package/dist/effects/index.js +16 -0
- package/dist/effects/index.js.map +1 -0
- package/dist/image-editor/index.cjs +1388 -534
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +36 -3
- package/dist/image-editor/index.d.ts +36 -3
- package/dist/image-editor/index.js +10 -1
- package/dist/index.cjs +1806 -952
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/paint-editor/index.cjs +438 -289
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +8 -3
- package/dist/paint-editor/index.d.ts +8 -3
- package/dist/paint-editor/index.js +215 -187
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/parameters/index.js +55 -439
- package/dist/parameters/index.js.map +1 -1
- package/dist/video-editor/index.cjs +732 -17
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.d.cts +31 -3
- package/dist/video-editor/index.d.ts +31 -3
- package/dist/video-editor/index.js +184 -17
- package/dist/video-editor/index.js.map +1 -1
- package/package.json +8 -3
- package/dist/chunk-LWMUV5TC.js.map +0 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToolRegistry } from '@pixerate/editor/tools';
|
|
2
|
+
import { ImageEditorController, ImageEditorState, ImageEditorTool, CropBox, AspectRatio, ImageAdjustments, AdjustmentKind, AdjustmentLayerInit, AdjustmentLayerUpdate, ImageHistogram, DepthMaskOptions, CreateAnnotationPayload, Annotation, ImagePoint, ExportOptions, SerializedImageEditorState, AIResultOptions, ImageEditorOptions, ImageEffectsToolProviderOptions, InpaintHook, RemoveBackgroundHook, ImageEditorAIHooks, ControlSpec, CurvePoint, AdjustmentLayer, SelectionToolOptions, SelectionMask, FreeTransformTool, ShapeToolOptions, TypeToolOptions, TextEditSession } from '@pixerate/editor/image-editor';
|
|
2
3
|
import React__default from 'react';
|
|
4
|
+
import { EffectProvider } from '@pixerate/editor/effects';
|
|
5
|
+
import { P as PaintGradientEditorProps } from '../PaintGradientEditorView-CCPCY5Ib.cjs';
|
|
6
|
+
import '@pixerate/editor/paint-editor';
|
|
3
7
|
|
|
4
8
|
interface UseImageEditorReturn {
|
|
5
9
|
controller: ImageEditorController;
|
|
@@ -62,6 +66,13 @@ interface UseImageEditorReturn {
|
|
|
62
66
|
applyBackgroundRemovedImage: (newDataUrl: string, options?: AIResultOptions) => Promise<string | void>;
|
|
63
67
|
}
|
|
64
68
|
declare function useImageEditor(options?: ImageEditorOptions): UseImageEditorReturn;
|
|
69
|
+
/**
|
|
70
|
+
* Registers the image editor's provider-effect tools (`search_effects`, `describe_effect`,
|
|
71
|
+
* `apply_effect`, `add_effect_layer`, …) in `registry` while mounted. They work once an effects
|
|
72
|
+
* provider is registered (see `useEffects`); before that the read tools say so and the write tools
|
|
73
|
+
* refuse.
|
|
74
|
+
*/
|
|
75
|
+
declare function useImageEffectsTools(registry: ToolRegistry | null | undefined, controller: ImageEditorController, options?: ImageEffectsToolProviderOptions): void;
|
|
65
76
|
|
|
66
77
|
interface ImageEditorProps {
|
|
67
78
|
editor?: UseImageEditorReturn;
|
|
@@ -73,6 +84,12 @@ interface ImageEditorProps {
|
|
|
73
84
|
onInpaint?: InpaintHook;
|
|
74
85
|
onRemoveBackground?: RemoveBackgroundHook;
|
|
75
86
|
aiHooks?: ImageEditorAIHooks;
|
|
87
|
+
/**
|
|
88
|
+
* An effects provider (see `@pixerate/editor/effects`), registered with the controller while
|
|
89
|
+
* mounted: filter effects as smart filters and generator or overlay effects as effect layers,
|
|
90
|
+
* with an Effects section in the Layers tab. Optional: without one the editor is as before.
|
|
91
|
+
*/
|
|
92
|
+
effects?: EffectProvider | null;
|
|
76
93
|
}
|
|
77
94
|
declare const ImageEditor: React__default.FC<ImageEditorProps>;
|
|
78
95
|
|
|
@@ -210,7 +227,8 @@ interface BrushOptionsBarProps {
|
|
|
210
227
|
/**
|
|
211
228
|
* The paint tools: Move / Brush / Mixer / Eraser, the brush's size, hardness, opacity, flow and
|
|
212
229
|
* smoothing, pressure toggles, the foreground and background colours (D resets, X swaps) and
|
|
213
|
-
* Edit › Fill / Clear on the active layer
|
|
230
|
+
* Edit › Fill / Clear on the active layer, and gradient paint for the brush (the colour changes as
|
|
231
|
+
* the stroke goes; `PaintGradientEditor`). With the Mixer Brush: its load (Load brush / Clean
|
|
214
232
|
* brush), Wet / Load / Mix, load and clean each stroke, and the RGB / Pigment mixing toggle.
|
|
215
233
|
* With a retouching tool: the clone source (Alt-click the canvas to set it), Sample, the Spot
|
|
216
234
|
* Healing type, the tone Range, Exposure / Strength and the Aligned / Protect tones / Vibrance
|
|
@@ -260,4 +278,19 @@ interface TypeOptionsBarProps {
|
|
|
260
278
|
*/
|
|
261
279
|
declare const TypeOptionsBar: React__default.FC<TypeOptionsBarProps>;
|
|
262
280
|
|
|
263
|
-
|
|
281
|
+
interface ImageProviderEffectsPanelProps {
|
|
282
|
+
controller: ImageEditorController;
|
|
283
|
+
className?: string;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Provider effects in the image editor, for the active layer: its effect smart filters (apply,
|
|
287
|
+
* turn on and off, opacity, reorder, change controls, remove) and, for an effect layer, its own
|
|
288
|
+
* controls; plus adding effect layers. Applying a filter effect to a pixel layer converts it to a
|
|
289
|
+
* smart object in the same undo step. Without a provider it says why nothing can be added.
|
|
290
|
+
*/
|
|
291
|
+
declare function ImageProviderEffectsPanel({ controller, className }: ImageProviderEffectsPanelProps): React__default.JSX.Element;
|
|
292
|
+
|
|
293
|
+
/** The gradient paint editor for the image editor's brush (see `PaintGradientEditorView`). */
|
|
294
|
+
declare const PaintGradientEditor: React__default.FC<PaintGradientEditorProps>;
|
|
295
|
+
|
|
296
|
+
export { AdjustmentLayersPanel, type AdjustmentLayersPanelProps, BrushOptionsBar, type BrushOptionsBarProps, ColorProfilePanel, type ColorProfilePanelProps, ControlSlider, type ControlSliderProps, CurvesEditor, type CurvesEditorProps, FreeTransformOptionsBar, type FreeTransformOptionsBarProps, Histogram, type HistogramProps, ImageEditor, type ImageEditorProps, ImageProviderEffectsPanel, type ImageProviderEffectsPanelProps, LayerEffectsPanel, type LayerEffectsPanelProps, LayersPanel, type LayersPanelProps, PaintGradientEditor, PaintGradientEditorProps, RefineEdgePanel, type RefineEdgePanelProps, SelectionOptionsBar, type SelectionOptionsBarProps, ShapeOptionsBar, type ShapeOptionsBarProps, TypeOptionsBar, type TypeOptionsBarProps, type UseImageEditorReturn, useImageEditor, useImageEffectsTools, useImageHistogram };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ToolRegistry } from '@pixerate/editor/tools';
|
|
2
|
+
import { ImageEditorController, ImageEditorState, ImageEditorTool, CropBox, AspectRatio, ImageAdjustments, AdjustmentKind, AdjustmentLayerInit, AdjustmentLayerUpdate, ImageHistogram, DepthMaskOptions, CreateAnnotationPayload, Annotation, ImagePoint, ExportOptions, SerializedImageEditorState, AIResultOptions, ImageEditorOptions, ImageEffectsToolProviderOptions, InpaintHook, RemoveBackgroundHook, ImageEditorAIHooks, ControlSpec, CurvePoint, AdjustmentLayer, SelectionToolOptions, SelectionMask, FreeTransformTool, ShapeToolOptions, TypeToolOptions, TextEditSession } from '@pixerate/editor/image-editor';
|
|
2
3
|
import React__default from 'react';
|
|
4
|
+
import { EffectProvider } from '@pixerate/editor/effects';
|
|
5
|
+
import { P as PaintGradientEditorProps } from '../PaintGradientEditorView-CCPCY5Ib.js';
|
|
6
|
+
import '@pixerate/editor/paint-editor';
|
|
3
7
|
|
|
4
8
|
interface UseImageEditorReturn {
|
|
5
9
|
controller: ImageEditorController;
|
|
@@ -62,6 +66,13 @@ interface UseImageEditorReturn {
|
|
|
62
66
|
applyBackgroundRemovedImage: (newDataUrl: string, options?: AIResultOptions) => Promise<string | void>;
|
|
63
67
|
}
|
|
64
68
|
declare function useImageEditor(options?: ImageEditorOptions): UseImageEditorReturn;
|
|
69
|
+
/**
|
|
70
|
+
* Registers the image editor's provider-effect tools (`search_effects`, `describe_effect`,
|
|
71
|
+
* `apply_effect`, `add_effect_layer`, …) in `registry` while mounted. They work once an effects
|
|
72
|
+
* provider is registered (see `useEffects`); before that the read tools say so and the write tools
|
|
73
|
+
* refuse.
|
|
74
|
+
*/
|
|
75
|
+
declare function useImageEffectsTools(registry: ToolRegistry | null | undefined, controller: ImageEditorController, options?: ImageEffectsToolProviderOptions): void;
|
|
65
76
|
|
|
66
77
|
interface ImageEditorProps {
|
|
67
78
|
editor?: UseImageEditorReturn;
|
|
@@ -73,6 +84,12 @@ interface ImageEditorProps {
|
|
|
73
84
|
onInpaint?: InpaintHook;
|
|
74
85
|
onRemoveBackground?: RemoveBackgroundHook;
|
|
75
86
|
aiHooks?: ImageEditorAIHooks;
|
|
87
|
+
/**
|
|
88
|
+
* An effects provider (see `@pixerate/editor/effects`), registered with the controller while
|
|
89
|
+
* mounted: filter effects as smart filters and generator or overlay effects as effect layers,
|
|
90
|
+
* with an Effects section in the Layers tab. Optional: without one the editor is as before.
|
|
91
|
+
*/
|
|
92
|
+
effects?: EffectProvider | null;
|
|
76
93
|
}
|
|
77
94
|
declare const ImageEditor: React__default.FC<ImageEditorProps>;
|
|
78
95
|
|
|
@@ -210,7 +227,8 @@ interface BrushOptionsBarProps {
|
|
|
210
227
|
/**
|
|
211
228
|
* The paint tools: Move / Brush / Mixer / Eraser, the brush's size, hardness, opacity, flow and
|
|
212
229
|
* smoothing, pressure toggles, the foreground and background colours (D resets, X swaps) and
|
|
213
|
-
* Edit › Fill / Clear on the active layer
|
|
230
|
+
* Edit › Fill / Clear on the active layer, and gradient paint for the brush (the colour changes as
|
|
231
|
+
* the stroke goes; `PaintGradientEditor`). With the Mixer Brush: its load (Load brush / Clean
|
|
214
232
|
* brush), Wet / Load / Mix, load and clean each stroke, and the RGB / Pigment mixing toggle.
|
|
215
233
|
* With a retouching tool: the clone source (Alt-click the canvas to set it), Sample, the Spot
|
|
216
234
|
* Healing type, the tone Range, Exposure / Strength and the Aligned / Protect tones / Vibrance
|
|
@@ -260,4 +278,19 @@ interface TypeOptionsBarProps {
|
|
|
260
278
|
*/
|
|
261
279
|
declare const TypeOptionsBar: React__default.FC<TypeOptionsBarProps>;
|
|
262
280
|
|
|
263
|
-
|
|
281
|
+
interface ImageProviderEffectsPanelProps {
|
|
282
|
+
controller: ImageEditorController;
|
|
283
|
+
className?: string;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Provider effects in the image editor, for the active layer: its effect smart filters (apply,
|
|
287
|
+
* turn on and off, opacity, reorder, change controls, remove) and, for an effect layer, its own
|
|
288
|
+
* controls; plus adding effect layers. Applying a filter effect to a pixel layer converts it to a
|
|
289
|
+
* smart object in the same undo step. Without a provider it says why nothing can be added.
|
|
290
|
+
*/
|
|
291
|
+
declare function ImageProviderEffectsPanel({ controller, className }: ImageProviderEffectsPanelProps): React__default.JSX.Element;
|
|
292
|
+
|
|
293
|
+
/** The gradient paint editor for the image editor's brush (see `PaintGradientEditorView`). */
|
|
294
|
+
declare const PaintGradientEditor: React__default.FC<PaintGradientEditorProps>;
|
|
295
|
+
|
|
296
|
+
export { AdjustmentLayersPanel, type AdjustmentLayersPanelProps, BrushOptionsBar, type BrushOptionsBarProps, ColorProfilePanel, type ColorProfilePanelProps, ControlSlider, type ControlSliderProps, CurvesEditor, type CurvesEditorProps, FreeTransformOptionsBar, type FreeTransformOptionsBarProps, Histogram, type HistogramProps, ImageEditor, type ImageEditorProps, ImageProviderEffectsPanel, type ImageProviderEffectsPanelProps, LayerEffectsPanel, type LayerEffectsPanelProps, LayersPanel, type LayersPanelProps, PaintGradientEditor, PaintGradientEditorProps, RefineEdgePanel, type RefineEdgePanelProps, SelectionOptionsBar, type SelectionOptionsBarProps, ShapeOptionsBar, type ShapeOptionsBarProps, TypeOptionsBar, type TypeOptionsBarProps, type UseImageEditorReturn, useImageEditor, useImageEffectsTools, useImageHistogram };
|
|
@@ -7,15 +7,21 @@ import {
|
|
|
7
7
|
FreeTransformOptionsBar,
|
|
8
8
|
Histogram,
|
|
9
9
|
ImageEditor,
|
|
10
|
+
ImageProviderEffectsPanel,
|
|
10
11
|
LayerEffectsPanel,
|
|
11
12
|
LayersPanel,
|
|
13
|
+
PaintGradientEditor,
|
|
12
14
|
RefineEdgePanel,
|
|
13
15
|
SelectionOptionsBar,
|
|
14
16
|
ShapeOptionsBar,
|
|
15
17
|
TypeOptionsBar,
|
|
16
18
|
useImageEditor,
|
|
19
|
+
useImageEffectsTools,
|
|
17
20
|
useImageHistogram
|
|
18
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-2EW42UXC.js";
|
|
22
|
+
import "../chunk-FX3EREF5.js";
|
|
23
|
+
import "../chunk-ZQZAKUUM.js";
|
|
24
|
+
import "../chunk-MO354USR.js";
|
|
19
25
|
export {
|
|
20
26
|
AdjustmentLayersPanel,
|
|
21
27
|
BrushOptionsBar,
|
|
@@ -25,13 +31,16 @@ export {
|
|
|
25
31
|
FreeTransformOptionsBar,
|
|
26
32
|
Histogram,
|
|
27
33
|
ImageEditor,
|
|
34
|
+
ImageProviderEffectsPanel,
|
|
28
35
|
LayerEffectsPanel,
|
|
29
36
|
LayersPanel,
|
|
37
|
+
PaintGradientEditor,
|
|
30
38
|
RefineEdgePanel,
|
|
31
39
|
SelectionOptionsBar,
|
|
32
40
|
ShapeOptionsBar,
|
|
33
41
|
TypeOptionsBar,
|
|
34
42
|
useImageEditor,
|
|
43
|
+
useImageEffectsTools,
|
|
35
44
|
useImageHistogram
|
|
36
45
|
};
|
|
37
46
|
//# sourceMappingURL=index.js.map
|