@pixerate/editor-react 0.31.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.
- package/dist/vector/index.cjs +494 -110
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +36 -5
- package/dist/vector/index.d.ts +36 -5
- package/dist/vector/index.js +485 -100
- package/dist/vector/index.js.map +1 -1
- package/package.json +3 -3
package/dist/vector/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VectorEditorController, VectorEditorState, VectorTool, VectorCommandOptions, VectorEditorOptions,
|
|
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
|
-
/**
|
|
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
|
|
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,12 +113,24 @@ interface VectorStylePanelProps {
|
|
|
105
113
|
className?: string;
|
|
106
114
|
}
|
|
107
115
|
/**
|
|
108
|
-
* Fill, stroke, stroke width, alignment and width profile, arrowheads, live corner radius and
|
|
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
|
*/
|
|
112
120
|
declare function VectorStylePanel({ controller, className }: VectorStylePanelProps): React__default.JSX.Element;
|
|
113
121
|
|
|
122
|
+
interface VectorEffectsPanelProps {
|
|
123
|
+
controller: VectorEditorController;
|
|
124
|
+
className?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The live path effects of the selection: add effects (to every selected node), and for one
|
|
128
|
+
* selected node list its stack (applied top to bottom) to turn on and off, reorder, remove and
|
|
129
|
+
* edit. Slider drags and typing are one undo step each. Expand Appearance bakes the effects and
|
|
130
|
+
* live booleans into plain paths.
|
|
131
|
+
*/
|
|
132
|
+
declare function VectorEffectsPanel({ controller, className }: VectorEffectsPanelProps): React__default.JSX.Element | null;
|
|
133
|
+
|
|
114
134
|
interface VectorEditorProps {
|
|
115
135
|
controller: VectorEditorController;
|
|
116
136
|
/** Tools in the toolbar (default: all). */
|
|
@@ -125,4 +145,15 @@ interface VectorEditorProps {
|
|
|
125
145
|
/** Toolbar, canvas and style panel for a `VectorEditorController`. */
|
|
126
146
|
declare function VectorEditor({ controller, tools, showStylePanel, height, canvasProps, className }: VectorEditorProps): React__default.JSX.Element;
|
|
127
147
|
|
|
128
|
-
|
|
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 };
|