@pixerate/editor-react 0.187.0 → 0.189.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/paint-editor/EvolutionPanel.d.cts +15 -0
- package/dist/paint-editor/EvolutionPanel.d.ts +15 -0
- package/dist/paint-editor/PaintCanvas.d.cts +3 -1
- package/dist/paint-editor/PaintCanvas.d.ts +3 -1
- package/dist/paint-editor/PaintToolbar.d.cts +5 -2
- package/dist/paint-editor/PaintToolbar.d.ts +5 -2
- package/dist/paint-editor/index.cjs +565 -322
- package/dist/paint-editor/index.d.cts +1 -0
- package/dist/paint-editor/index.d.ts +1 -0
- package/dist/paint-editor/index.js +340 -91
- package/package.json +3 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PaintEditorController, type PaintProposals } from '@pixerate/editor/paint-editor';
|
|
3
|
+
export interface EvolutionPanelProps {
|
|
4
|
+
controller: PaintEditorController;
|
|
5
|
+
/** Optional proposals store (defaults to `controller.proposals`). */
|
|
6
|
+
proposals?: PaintProposals;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Evolutionary strokes: pick recorded dry strokes, adjust mutation rates (`geometry`, `color`,
|
|
11
|
+
* `brush`, `seed`), and breed a grid of mutated stroke proposals. Variants can be bred further
|
|
12
|
+
* (single parent mutation or two-parent crossover), accepted as a single undo step, dismissed, or
|
|
13
|
+
* exported as a contact sheet.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EvolutionPanel: React.FC<EvolutionPanelProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PaintEditorController, type PaintProposals } from '@pixerate/editor/paint-editor';
|
|
3
|
+
export interface EvolutionPanelProps {
|
|
4
|
+
controller: PaintEditorController;
|
|
5
|
+
/** Optional proposals store (defaults to `controller.proposals`). */
|
|
6
|
+
proposals?: PaintProposals;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Evolutionary strokes: pick recorded dry strokes, adjust mutation rates (`geometry`, `color`,
|
|
11
|
+
* `brush`, `seed`), and breed a grid of mutated stroke proposals. Variants can be bred further
|
|
12
|
+
* (single parent mutation or two-parent crossover), accepted as a single undo step, dismissed, or
|
|
13
|
+
* exported as a contact sheet.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EvolutionPanel: React.FC<EvolutionPanelProps>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type PaintEditorController, type PaintAgentStrokes, type PaintPresence, type PaintProposals, type PaintTool, type PaintView } from '@pixerate/editor/paint-editor';
|
|
2
|
+
import { type PaintEditorController, type PaintAgentStrokes, type FillRegionOptions, type PaintPresence, type PaintProposals, type PaintTool, type PaintView } from '@pixerate/editor/paint-editor';
|
|
3
3
|
export interface PaintCanvasProps {
|
|
4
4
|
controller: PaintEditorController;
|
|
5
5
|
/** The active tool (default brush). */
|
|
6
6
|
tool?: PaintTool;
|
|
7
|
+
/** Options for the Fill tool (`tool === 'fill'`). */
|
|
8
|
+
fillOptions?: Omit<FillRegionOptions, 'x' | 'y' | 'points'>;
|
|
7
9
|
/** Draw the symmetry axes and perspective lines (default true). */
|
|
8
10
|
showGuides?: boolean;
|
|
9
11
|
/** Fit the canvas in the viewport on mount (default true). */
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type PaintEditorController, type PaintAgentStrokes, type PaintPresence, type PaintProposals, type PaintTool, type PaintView } from '@pixerate/editor/paint-editor';
|
|
2
|
+
import { type PaintEditorController, type PaintAgentStrokes, type FillRegionOptions, type PaintPresence, type PaintProposals, type PaintTool, type PaintView } from '@pixerate/editor/paint-editor';
|
|
3
3
|
export interface PaintCanvasProps {
|
|
4
4
|
controller: PaintEditorController;
|
|
5
5
|
/** The active tool (default brush). */
|
|
6
6
|
tool?: PaintTool;
|
|
7
|
+
/** Options for the Fill tool (`tool === 'fill'`). */
|
|
8
|
+
fillOptions?: Omit<FillRegionOptions, 'x' | 'y' | 'points'>;
|
|
7
9
|
/** Draw the symmetry axes and perspective lines (default true). */
|
|
8
10
|
showGuides?: boolean;
|
|
9
11
|
/** Fit the canvas in the viewport on mount (default true). */
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type PaintEditorController, type PaintTool } from '@pixerate/editor/paint-editor';
|
|
2
|
+
import { type FillRegionOptions, type PaintEditorController, type PaintTool } from '@pixerate/editor/paint-editor';
|
|
3
|
+
export type PaintFillToolbarOptions = Omit<FillRegionOptions, 'x' | 'y' | 'points'>;
|
|
3
4
|
export interface PaintToolbarProps {
|
|
4
5
|
controller: PaintEditorController;
|
|
5
6
|
tool: PaintTool;
|
|
6
7
|
onToolChange: (tool: PaintTool) => void;
|
|
8
|
+
fillOptions?: PaintFillToolbarOptions;
|
|
9
|
+
onFillOptionsChange?: (options: PaintFillToolbarOptions) => void;
|
|
7
10
|
/** Base name of saved and exported files (default `painting`). */
|
|
8
11
|
fileName?: string;
|
|
9
12
|
className?: string;
|
|
10
13
|
}
|
|
11
14
|
/**
|
|
12
|
-
* Tools (brush, eyedropper, pan, rotate view), undo / redo, view rotation, mirroring and reset,
|
|
15
|
+
* Tools (brush, fill, eyedropper, pan, rotate view), undo / redo, view rotation, mirroring and reset,
|
|
13
16
|
* the symmetry and perspective guides, stencils (ruler, circle, mask), the tracing image and reference images, the drawing hand,
|
|
14
17
|
* and file actions: save / open JSON, export PNG, JPEG and PSD, a time-lapse (zipped frames, video
|
|
15
18
|
* project and ffmpeg command) and a PNG repainted from the strokes at twice the size.
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type PaintEditorController, type PaintTool } from '@pixerate/editor/paint-editor';
|
|
2
|
+
import { type FillRegionOptions, type PaintEditorController, type PaintTool } from '@pixerate/editor/paint-editor';
|
|
3
|
+
export type PaintFillToolbarOptions = Omit<FillRegionOptions, 'x' | 'y' | 'points'>;
|
|
3
4
|
export interface PaintToolbarProps {
|
|
4
5
|
controller: PaintEditorController;
|
|
5
6
|
tool: PaintTool;
|
|
6
7
|
onToolChange: (tool: PaintTool) => void;
|
|
8
|
+
fillOptions?: PaintFillToolbarOptions;
|
|
9
|
+
onFillOptionsChange?: (options: PaintFillToolbarOptions) => void;
|
|
7
10
|
/** Base name of saved and exported files (default `painting`). */
|
|
8
11
|
fileName?: string;
|
|
9
12
|
className?: string;
|
|
10
13
|
}
|
|
11
14
|
/**
|
|
12
|
-
* Tools (brush, eyedropper, pan, rotate view), undo / redo, view rotation, mirroring and reset,
|
|
15
|
+
* Tools (brush, fill, eyedropper, pan, rotate view), undo / redo, view rotation, mirroring and reset,
|
|
13
16
|
* the symmetry and perspective guides, stencils (ruler, circle, mask), the tracing image and reference images, the drawing hand,
|
|
14
17
|
* and file actions: save / open JSON, export PNG, JPEG and PSD, a time-lapse (zipped frames, video
|
|
15
18
|
* project and ffmpeg command) and a PNG repainted from the strokes at twice the size.
|