@pixerate/editor-react 0.171.0 → 0.172.1

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.
@@ -1074,7 +1074,7 @@ function useEffectDescription(provider, effect) {
1074
1074
  var import_react12 = require("react");
1075
1075
  var import_effects = require("@pixerate/editor/effects");
1076
1076
  var import_jsx_runtime12 = require("react/jsx-runtime");
1077
- var LABELS = { motion: "Motion", camera: "Camera" };
1077
+ var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
1078
1078
  function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
1079
1079
  const ref = (0, import_react12.useRef)(null);
1080
1080
  const [failed, setFailed] = (0, import_react12.useState)(effect.kind in LABELS);
@@ -4,7 +4,7 @@ import {
4
4
  EffectsBrowser,
5
5
  useEffectDescription,
6
6
  useEffects
7
- } from "../chunk-TOYSB4DK.js";
7
+ } from "../chunk-W6UZ7PVT.js";
8
8
  import "../chunk-5RPB4WGT.js";
9
9
  import "../chunk-KIRIU53A.js";
10
10
  import "../chunk-3I7FOSLF.js";
@@ -2005,7 +2005,7 @@ function useEffectDescription(provider, effect) {
2005
2005
  var import_react22 = require("react");
2006
2006
  var import_effects = require("@pixerate/editor/effects");
2007
2007
  var import_jsx_runtime7 = require("react/jsx-runtime");
2008
- var LABELS = { motion: "Motion", camera: "Camera" };
2008
+ var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
2009
2009
  function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
2010
2010
  const ref = (0, import_react22.useRef)(null);
2011
2011
  const [failed, setFailed] = (0, import_react22.useState)(effect.kind in LABELS);
@@ -2,7 +2,7 @@ import {
2
2
  EffectParameters,
3
3
  EffectsBrowser,
4
4
  useEffectDescription
5
- } from "../chunk-TOYSB4DK.js";
5
+ } from "../chunk-W6UZ7PVT.js";
6
6
  import "../chunk-5RPB4WGT.js";
7
7
  import "../chunk-KIRIU53A.js";
8
8
  import "../chunk-3I7FOSLF.js";
@@ -31,7 +31,7 @@ import {
31
31
  EffectsBrowser,
32
32
  useEffectDescription,
33
33
  useEffects
34
- } from "./chunk-TOYSB4DK.js";
34
+ } from "./chunk-W6UZ7PVT.js";
35
35
  import {
36
36
  resolveParameterComponents,
37
37
  useParameterComponents
@@ -34,7 +34,7 @@ function useEffectDescription(provider, effect) {
34
34
  import { useEffect as useEffect2, useRef, useState as useState2 } from "react";
35
35
  import { renderEffectThumbnail } from "@pixerate/editor/effects";
36
36
  import { jsx } from "react/jsx-runtime";
37
- var LABELS = { motion: "Motion", camera: "Camera" };
37
+ var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
38
38
  function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
39
39
  const ref = useRef(null);
40
40
  const [failed, setFailed] = useState2(effect.kind in LABELS);
@@ -71,7 +71,7 @@ function useEffectDescription(provider, effect) {
71
71
  var import_react2 = require("react");
72
72
  var import_effects = require("@pixerate/editor/effects");
73
73
  var import_jsx_runtime = require("react/jsx-runtime");
74
- var LABELS = { motion: "Motion", camera: "Camera" };
74
+ var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
75
75
  function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
76
76
  const ref = (0, import_react2.useRef)(null);
77
77
  const [failed, setFailed] = (0, import_react2.useState)(effect.kind in LABELS);
@@ -7,7 +7,7 @@ import {
7
7
  useEffectAuthoring,
8
8
  useEffectDescription,
9
9
  useEffects
10
- } from "../chunk-TOYSB4DK.js";
10
+ } from "../chunk-W6UZ7PVT.js";
11
11
  import "../chunk-5RPB4WGT.js";
12
12
  import "../chunk-KIRIU53A.js";
13
13
  import "../chunk-3I7FOSLF.js";
@@ -2415,7 +2415,7 @@ function useEffectDescription(provider, effect) {
2415
2415
  var import_react15 = require("react");
2416
2416
  var import_effects = require("@pixerate/editor/effects");
2417
2417
  var import_jsx_runtime13 = require("react/jsx-runtime");
2418
- var LABELS = { motion: "Motion", camera: "Camera" };
2418
+ var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
2419
2419
  function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
2420
2420
  const ref = (0, import_react15.useRef)(null);
2421
2421
  const [failed, setFailed] = (0, import_react15.useState)(effect.kind in LABELS);
@@ -29,7 +29,7 @@ import {
29
29
  useImageEditor,
30
30
  useImageEffectsTools,
31
31
  useImageHistogram
32
- } from "../chunk-2UD3JH4W.js";
32
+ } from "../chunk-NQ22NA7S.js";
33
33
  import {
34
34
  ImageCheckbox,
35
35
  ImageColor,
@@ -39,7 +39,7 @@ import {
39
39
  LayerEffectsPanel,
40
40
  useImageEditorControls
41
41
  } from "../chunk-EP6C5N54.js";
42
- import "../chunk-TOYSB4DK.js";
42
+ import "../chunk-W6UZ7PVT.js";
43
43
  import "../chunk-5RPB4WGT.js";
44
44
  import "../chunk-KIRIU53A.js";
45
45
  import "../chunk-3I7FOSLF.js";
package/dist/index.cjs CHANGED
@@ -6179,7 +6179,7 @@ function useEffectDescription(provider, effect) {
6179
6179
  var import_react51 = require("react");
6180
6180
  var import_effects = require("@pixerate/editor/effects");
6181
6181
  var import_jsx_runtime30 = require("react/jsx-runtime");
6182
- var LABELS = { motion: "Motion", camera: "Camera" };
6182
+ var LABELS = { motion: "Motion", camera: "Camera", timing: "Timing" };
6183
6183
  function EffectThumbnail({ provider, effect, width = 96, height = 54, className = "" }) {
6184
6184
  const ref = (0, import_react51.useRef)(null);
6185
6185
  const [failed, setFailed] = (0, import_react51.useState)(effect.kind in LABELS);
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ import {
53
53
  useImageEditor,
54
54
  useImageEffectsTools,
55
55
  useImageHistogram
56
- } from "./chunk-2UD3JH4W.js";
56
+ } from "./chunk-NQ22NA7S.js";
57
57
  import {
58
58
  ImageCheckbox,
59
59
  ImageColor,
@@ -63,7 +63,7 @@ import {
63
63
  LayerEffectsPanel,
64
64
  useImageEditorControls
65
65
  } from "./chunk-EP6C5N54.js";
66
- import "./chunk-TOYSB4DK.js";
66
+ import "./chunk-W6UZ7PVT.js";
67
67
  import "./chunk-5RPB4WGT.js";
68
68
  import "./chunk-KIRIU53A.js";
69
69
  import "./chunk-3I7FOSLF.js";
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import { type Brush, type BrushHostProfile } from '@pixerate/editor/brushes';
3
+ type Pixels = {
4
+ width: number;
5
+ height: number;
6
+ data: Uint8ClampedArray;
7
+ };
8
+ export interface BrushEditorProps {
9
+ /** The brush being edited, as facets. */
10
+ brush: Brush;
11
+ /** What the host renders (default the paint editor): other controls are left out. */
12
+ profile?: BrushHostProfile;
13
+ /** Called with the whole brush after each change (normalised). */
14
+ onChange: (brush: Brush) => void;
15
+ /** A live preview stroke of `brush` (e.g. `controller.brushThumbnail`). */
16
+ preview?: Pixels | null;
17
+ /** With it, a name field and "Save brush" save the brush under that name. */
18
+ onSaveAs?: (name: string) => unknown;
19
+ /** Extra controls a host adds to a section (e.g. the sticker picker for stamps). */
20
+ renderExtra?: (section: string) => React.ReactNode;
21
+ className?: string;
22
+ }
23
+ /**
24
+ * Edits a brush by its facets (`brushEditorSections`): Medium, Shape, Marks, Feel, Behaviour,
25
+ * Light, Motion and Colour, each control a facet, with a live preview stroke and "Save as". Only
26
+ * what the host profile renders is shown; settings it paints without carry a note.
27
+ */
28
+ export declare const BrushEditor: React.FC<BrushEditorProps>;
29
+ export {};
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import { type Brush, type BrushHostProfile } from '@pixerate/editor/brushes';
3
+ type Pixels = {
4
+ width: number;
5
+ height: number;
6
+ data: Uint8ClampedArray;
7
+ };
8
+ export interface BrushEditorProps {
9
+ /** The brush being edited, as facets. */
10
+ brush: Brush;
11
+ /** What the host renders (default the paint editor): other controls are left out. */
12
+ profile?: BrushHostProfile;
13
+ /** Called with the whole brush after each change (normalised). */
14
+ onChange: (brush: Brush) => void;
15
+ /** A live preview stroke of `brush` (e.g. `controller.brushThumbnail`). */
16
+ preview?: Pixels | null;
17
+ /** With it, a name field and "Save brush" save the brush under that name. */
18
+ onSaveAs?: (name: string) => unknown;
19
+ /** Extra controls a host adds to a section (e.g. the sticker picker for stamps). */
20
+ renderExtra?: (section: string) => React.ReactNode;
21
+ className?: string;
22
+ }
23
+ /**
24
+ * Edits a brush by its facets (`brushEditorSections`): Medium, Shape, Marks, Feel, Behaviour,
25
+ * Light, Motion and Colour, each control a facet, with a live preview stroke and "Save as". Only
26
+ * what the host profile renders is shown; settings it paints without carry a note.
27
+ */
28
+ export declare const BrushEditor: React.FC<BrushEditorProps>;
29
+ export {};
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { type BrushHostProfile, type BrushLibraryEntry } from '@pixerate/editor/brushes';
3
+ type Pixels = {
4
+ width: number;
5
+ height: number;
6
+ data: Uint8ClampedArray;
7
+ };
8
+ export interface BrushLibraryBrowserProps {
9
+ /** The library's brushes (built-in presets and saved ones), as facets. */
10
+ entries: readonly BrushLibraryEntry[];
11
+ /** The active brush id. */
12
+ activeId?: string;
13
+ onSelect: (id: string) => void;
14
+ /** Only brushes this host renders. */
15
+ profile?: BrushHostProfile;
16
+ /** A thumbnail for a brush (a test stroke). */
17
+ thumbnail?: (id: string) => Pixels | null;
18
+ thumbnailWidth?: number;
19
+ thumbnailHeight?: number;
20
+ className?: string;
21
+ }
22
+ /** The brush library grouped by medium, then variety, with tools as their own group, and a filter (`brushLibraryGroups`). */
23
+ export declare const BrushLibraryBrowser: React.FC<BrushLibraryBrowserProps>;
24
+ export {};
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { type BrushHostProfile, type BrushLibraryEntry } from '@pixerate/editor/brushes';
3
+ type Pixels = {
4
+ width: number;
5
+ height: number;
6
+ data: Uint8ClampedArray;
7
+ };
8
+ export interface BrushLibraryBrowserProps {
9
+ /** The library's brushes (built-in presets and saved ones), as facets. */
10
+ entries: readonly BrushLibraryEntry[];
11
+ /** The active brush id. */
12
+ activeId?: string;
13
+ onSelect: (id: string) => void;
14
+ /** Only brushes this host renders. */
15
+ profile?: BrushHostProfile;
16
+ /** A thumbnail for a brush (a test stroke). */
17
+ thumbnail?: (id: string) => Pixels | null;
18
+ thumbnailWidth?: number;
19
+ thumbnailHeight?: number;
20
+ className?: string;
21
+ }
22
+ /** The brush library grouped by medium, then variety, with tools as their own group, and a filter (`brushLibraryGroups`). */
23
+ export declare const BrushLibraryBrowser: React.FC<BrushLibraryBrowserProps>;
24
+ export {};
@@ -8,11 +8,10 @@ export interface BrushPanelProps {
8
8
  className?: string;
9
9
  }
10
10
  /**
11
- * The brush library (thumbnails rendered from a test stroke on the current paper, grouped by
12
- * category) and the active brush's settings: size, opacity, flow, hardness, spacing, roundness,
13
- * angle, paper grain, position and pressure smoothing, dynamics, rotation mode and blend mode;
14
- * then the engine's own controls (`brushEngineControls`): blender strength and blend distance,
15
- * smudge strength and length, pick-up and mix ratios, RGB / pigment mixing, dirty brush,
16
- * the brush's own gradient paint (the multi-colour brush) and the brush load. Save the edited brush, import and export libraries as JSON.
11
+ * The brush library (`BrushLibraryBrowser`: thumbnails of a test stroke on the current paper,
12
+ * grouped by medium and variety, tools apart) and the active brush in the `BrushEditor`: its
13
+ * facets with a live preview, and "Save brush" into the editor's brush library. The paint
14
+ * editor adds the brush's own gradient, the sticker stamps, what the brush carries (Load /
15
+ * Clean), and import and export of library files.
17
16
  */
18
17
  export declare const BrushPanel: React.FC<BrushPanelProps>;
@@ -8,11 +8,10 @@ export interface BrushPanelProps {
8
8
  className?: string;
9
9
  }
10
10
  /**
11
- * The brush library (thumbnails rendered from a test stroke on the current paper, grouped by
12
- * category) and the active brush's settings: size, opacity, flow, hardness, spacing, roundness,
13
- * angle, paper grain, position and pressure smoothing, dynamics, rotation mode and blend mode;
14
- * then the engine's own controls (`brushEngineControls`): blender strength and blend distance,
15
- * smudge strength and length, pick-up and mix ratios, RGB / pigment mixing, dirty brush,
16
- * the brush's own gradient paint (the multi-colour brush) and the brush load. Save the edited brush, import and export libraries as JSON.
11
+ * The brush library (`BrushLibraryBrowser`: thumbnails of a test stroke on the current paper,
12
+ * grouped by medium and variety, tools apart) and the active brush in the `BrushEditor`: its
13
+ * facets with a live preview, and "Save brush" into the editor's brush library. The paint
14
+ * editor adds the brush's own gradient, the sticker stamps, what the brush carries (Load /
15
+ * Clean), and import and export of library files.
17
16
  */
18
17
  export declare const BrushPanel: React.FC<BrushPanelProps>;