@pixerate/editor-react 0.32.0 → 0.33.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,4 +1,4 @@
1
- import { VectorEditorController, VectorEditorState, VectorTool, VectorCommandOptions, VectorEditorOptions, SvgGradientDef, VectorRenderNode, VectorWidthPointEdit } from '@pixerate/editor/vector';
1
+ import { VectorEditorController, VectorEditorState, VectorTool, VectorCommandOptions, VectorEditorOptions, VectorRenderGradientAnnotator, VectorPaintDef, VectorRenderNode, VectorWidthPointEdit } from '@pixerate/editor/vector';
2
2
  import React__default from 'react';
3
3
 
4
4
  /** A `VectorEditorController` created once for the component's lifetime (destroyed on unmount). */
@@ -44,10 +44,18 @@ interface VectorCanvasProps {
44
44
  /** Accessible label (default "Vector canvas"). */
45
45
  'aria-label'?: string;
46
46
  }
47
- /** Renders `<linearGradient>` / `<radialGradient>` descriptors. */
47
+ /**
48
+ * Renders paint servers: `<linearGradient>` / `<radialGradient>` descriptors and patterns of
49
+ * gradient tiles (conic, diamond and stroke-mode gradients).
50
+ */
48
51
  declare function VectorGradientDefs({ defs }: {
49
- defs: readonly SvgGradientDef[];
52
+ defs: readonly VectorPaintDef[];
50
53
  }): React__default.JSX.Element | null;
54
+ /** The gradient tool's annotator (screen space): extent, bar, handles, stop chips and midpoints. */
55
+ declare function VectorGradientAnnotator({ annotator: g, accentColor }: {
56
+ annotator: VectorRenderGradientAnnotator;
57
+ accentColor?: string;
58
+ }): React__default.JSX.Element;
51
59
  /** Renders scene nodes (paths and groups) from `getVectorSceneRenderData`. */
52
60
  declare function VectorSceneNodes({ nodes }: {
53
61
  nodes: readonly VectorRenderNode[];
@@ -105,7 +113,7 @@ interface VectorStylePanelProps {
105
113
  className?: string;
106
114
  }
107
115
  /**
108
- * Fill, stroke, stroke width, alignment and width profile, arrowheads, live corner radius, opacity and path effects (`VectorEffectsPanel`) of the
116
+ * Fill, stroke and their gradients (`VectorGradientEditor`), stroke width, alignment and width profile, arrowheads, live corner radius, opacity and path effects (`VectorEffectsPanel`) of the
109
117
  * selection (corners of the selected points with the direct tool); with nothing selected it
110
118
  * edits the defaults for new shapes.
111
119
  */
@@ -137,4 +145,15 @@ interface VectorEditorProps {
137
145
  /** Toolbar, canvas and style panel for a `VectorEditorController`. */
138
146
  declare function VectorEditor({ controller, tools, showStylePanel, height, canvasProps, className }: VectorEditorProps): React__default.JSX.Element;
139
147
 
140
- export { type UseVectorEditorResult, VectorCanvas, type VectorCanvasProps, type VectorCommandTarget, VectorEditor, type VectorEditorProps, VectorEffectsPanel, type VectorEffectsPanelProps, VectorGradientDefs, VectorSceneNodes, VectorStylePanel, type VectorStylePanelProps, VectorToolbar, type VectorToolbarProps, VectorWidthPointEditor, type VectorWidthPointEditorProps, useVectorCommands, useVectorEditor, useVectorEditorController, useVectorEditorState };
148
+ interface VectorGradientEditorProps {
149
+ controller: VectorEditorController;
150
+ className?: string;
151
+ }
152
+ /**
153
+ * Gradient editor for the selection's fill or stroke: style (or solid), the stop ramp (click it
154
+ * to add a stop, pick a stop to edit its colour, opacity, position and midpoint), interpolation
155
+ * space, smoothness, spread, how it lies on a stroke, and reverse.
156
+ */
157
+ declare function VectorGradientEditor({ controller, className }: VectorGradientEditorProps): React__default.JSX.Element | null;
158
+
159
+ export { type UseVectorEditorResult, VectorCanvas, type VectorCanvasProps, type VectorCommandTarget, VectorEditor, type VectorEditorProps, VectorEffectsPanel, type VectorEffectsPanelProps, VectorGradientAnnotator, VectorGradientDefs, VectorGradientEditor, type VectorGradientEditorProps, VectorSceneNodes, VectorStylePanel, type VectorStylePanelProps, VectorToolbar, type VectorToolbarProps, VectorWidthPointEditor, type VectorWidthPointEditorProps, useVectorCommands, useVectorEditor, useVectorEditorController, useVectorEditorState };