@pixerate/editor-react 0.77.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.
@@ -1,5 +1,7 @@
1
- import { ImageEditorController, ImageEditorState, ImageEditorTool, CropBox, AspectRatio, ImageAdjustments, AdjustmentKind, AdjustmentLayerInit, AdjustmentLayerUpdate, ImageHistogram, DepthMaskOptions, CreateAnnotationPayload, Annotation, ImagePoint, ExportOptions, SerializedImageEditorState, AIResultOptions, ImageEditorOptions, InpaintHook, RemoveBackgroundHook, ImageEditorAIHooks, ControlSpec, CurvePoint, AdjustmentLayer, SelectionToolOptions, SelectionMask, FreeTransformTool, ShapeToolOptions, TypeToolOptions, TextEditSession } from '@pixerate/editor/image-editor';
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';
3
5
  import { P as PaintGradientEditorProps } from '../PaintGradientEditorView-CCPCY5Ib.cjs';
4
6
  import '@pixerate/editor/paint-editor';
5
7
 
@@ -64,6 +66,13 @@ interface UseImageEditorReturn {
64
66
  applyBackgroundRemovedImage: (newDataUrl: string, options?: AIResultOptions) => Promise<string | void>;
65
67
  }
66
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;
67
76
 
68
77
  interface ImageEditorProps {
69
78
  editor?: UseImageEditorReturn;
@@ -75,6 +84,12 @@ interface ImageEditorProps {
75
84
  onInpaint?: InpaintHook;
76
85
  onRemoveBackground?: RemoveBackgroundHook;
77
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;
78
93
  }
79
94
  declare const ImageEditor: React__default.FC<ImageEditorProps>;
80
95
 
@@ -263,7 +278,19 @@ interface TypeOptionsBarProps {
263
278
  */
264
279
  declare const TypeOptionsBar: React__default.FC<TypeOptionsBarProps>;
265
280
 
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
+
266
293
  /** The gradient paint editor for the image editor's brush (see `PaintGradientEditorView`). */
267
294
  declare const PaintGradientEditor: React__default.FC<PaintGradientEditorProps>;
268
295
 
269
- 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, LayerEffectsPanel, type LayerEffectsPanelProps, LayersPanel, type LayersPanelProps, PaintGradientEditor, PaintGradientEditorProps, RefineEdgePanel, type RefineEdgePanelProps, SelectionOptionsBar, type SelectionOptionsBarProps, ShapeOptionsBar, type ShapeOptionsBarProps, TypeOptionsBar, type TypeOptionsBarProps, type UseImageEditorReturn, useImageEditor, useImageHistogram };
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,7 @@
1
- import { ImageEditorController, ImageEditorState, ImageEditorTool, CropBox, AspectRatio, ImageAdjustments, AdjustmentKind, AdjustmentLayerInit, AdjustmentLayerUpdate, ImageHistogram, DepthMaskOptions, CreateAnnotationPayload, Annotation, ImagePoint, ExportOptions, SerializedImageEditorState, AIResultOptions, ImageEditorOptions, InpaintHook, RemoveBackgroundHook, ImageEditorAIHooks, ControlSpec, CurvePoint, AdjustmentLayer, SelectionToolOptions, SelectionMask, FreeTransformTool, ShapeToolOptions, TypeToolOptions, TextEditSession } from '@pixerate/editor/image-editor';
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';
3
5
  import { P as PaintGradientEditorProps } from '../PaintGradientEditorView-CCPCY5Ib.js';
4
6
  import '@pixerate/editor/paint-editor';
5
7
 
@@ -64,6 +66,13 @@ interface UseImageEditorReturn {
64
66
  applyBackgroundRemovedImage: (newDataUrl: string, options?: AIResultOptions) => Promise<string | void>;
65
67
  }
66
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;
67
76
 
68
77
  interface ImageEditorProps {
69
78
  editor?: UseImageEditorReturn;
@@ -75,6 +84,12 @@ interface ImageEditorProps {
75
84
  onInpaint?: InpaintHook;
76
85
  onRemoveBackground?: RemoveBackgroundHook;
77
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;
78
93
  }
79
94
  declare const ImageEditor: React__default.FC<ImageEditorProps>;
80
95
 
@@ -263,7 +278,19 @@ interface TypeOptionsBarProps {
263
278
  */
264
279
  declare const TypeOptionsBar: React__default.FC<TypeOptionsBarProps>;
265
280
 
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
+
266
293
  /** The gradient paint editor for the image editor's brush (see `PaintGradientEditorView`). */
267
294
  declare const PaintGradientEditor: React__default.FC<PaintGradientEditorProps>;
268
295
 
269
- 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, LayerEffectsPanel, type LayerEffectsPanelProps, LayersPanel, type LayersPanelProps, PaintGradientEditor, PaintGradientEditorProps, RefineEdgePanel, type RefineEdgePanelProps, SelectionOptionsBar, type SelectionOptionsBarProps, ShapeOptionsBar, type ShapeOptionsBarProps, TypeOptionsBar, type TypeOptionsBarProps, type UseImageEditorReturn, useImageEditor, useImageHistogram };
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,6 +7,7 @@ import {
7
7
  FreeTransformOptionsBar,
8
8
  Histogram,
9
9
  ImageEditor,
10
+ ImageProviderEffectsPanel,
10
11
  LayerEffectsPanel,
11
12
  LayersPanel,
12
13
  PaintGradientEditor,
@@ -15,8 +16,11 @@ import {
15
16
  ShapeOptionsBar,
16
17
  TypeOptionsBar,
17
18
  useImageEditor,
19
+ useImageEffectsTools,
18
20
  useImageHistogram
19
- } from "../chunk-QARGR5E5.js";
21
+ } from "../chunk-2EW42UXC.js";
22
+ import "../chunk-FX3EREF5.js";
23
+ import "../chunk-ZQZAKUUM.js";
20
24
  import "../chunk-MO354USR.js";
21
25
  export {
22
26
  AdjustmentLayersPanel,
@@ -27,6 +31,7 @@ export {
27
31
  FreeTransformOptionsBar,
28
32
  Histogram,
29
33
  ImageEditor,
34
+ ImageProviderEffectsPanel,
30
35
  LayerEffectsPanel,
31
36
  LayersPanel,
32
37
  PaintGradientEditor,
@@ -35,6 +40,7 @@ export {
35
40
  ShapeOptionsBar,
36
41
  TypeOptionsBar,
37
42
  useImageEditor,
43
+ useImageEffectsTools,
38
44
  useImageHistogram
39
45
  };
40
46
  //# sourceMappingURL=index.js.map