@pixerate/editor-react 0.95.0 → 0.96.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.
Files changed (47) hide show
  1. package/README.md +2 -0
  2. package/dist/animation-editor/index.cjs +1240 -195
  3. package/dist/animation-editor/index.js +4 -2
  4. package/dist/canvas/index.cjs +1418 -373
  5. package/dist/canvas/index.js +4 -2
  6. package/dist/chunk-3I7FOSLF.js +988 -0
  7. package/dist/{chunk-OTGJEYHV.js → chunk-5LFQ2UQZ.js} +75 -68
  8. package/dist/{chunk-5R67YSSD.js → chunk-GLSOQNQR.js} +1 -1
  9. package/dist/{chunk-6YRSQW2V.js → chunk-IY6YOY5B.js} +1 -1
  10. package/dist/chunk-KIRIU53A.js +72 -0
  11. package/dist/color/ColorPicker.d.cts +30 -0
  12. package/dist/color/ColorPicker.d.ts +30 -0
  13. package/dist/color/DualColorPicker.d.cts +29 -0
  14. package/dist/color/DualColorPicker.d.ts +29 -0
  15. package/dist/color/index.cjs +1067 -0
  16. package/dist/color/index.d.cts +7 -0
  17. package/dist/color/index.d.ts +7 -0
  18. package/dist/color/index.js +14 -0
  19. package/dist/color/useColorScheme.d.cts +16 -0
  20. package/dist/color/useColorScheme.d.ts +16 -0
  21. package/dist/effects/index.cjs +1169 -124
  22. package/dist/effects/index.js +4 -2
  23. package/dist/gradient/FillPicker.d.cts +27 -0
  24. package/dist/gradient/FillPicker.d.ts +27 -0
  25. package/dist/gradient/GradientEditor.d.cts +21 -0
  26. package/dist/gradient/GradientEditor.d.ts +21 -0
  27. package/dist/gradient/index.cjs +1601 -0
  28. package/dist/gradient/index.d.cts +6 -0
  29. package/dist/gradient/index.d.ts +6 -0
  30. package/dist/gradient/index.js +617 -0
  31. package/dist/gradient/useGradientController.d.cts +10 -0
  32. package/dist/gradient/useGradientController.d.ts +10 -0
  33. package/dist/image-editor/index.cjs +1742 -697
  34. package/dist/image-editor/index.js +5 -3
  35. package/dist/index.cjs +2160 -1115
  36. package/dist/index.js +5 -3
  37. package/dist/paint-editor/index.cjs +1233 -188
  38. package/dist/paint-editor/index.js +4 -2
  39. package/dist/parameters/fields.d.cts +1 -1
  40. package/dist/parameters/fields.d.ts +1 -1
  41. package/dist/parameters/index.cjs +1218 -173
  42. package/dist/parameters/index.js +3 -1
  43. package/dist/vector/index.cjs +1219 -174
  44. package/dist/vector/index.js +4 -2
  45. package/dist/video-editor/index.cjs +1230 -185
  46. package/dist/video-editor/index.js +4 -2
  47. package/package.json +29 -3
@@ -4,8 +4,10 @@ import {
4
4
  EffectsBrowser,
5
5
  useEffectDescription,
6
6
  useEffects
7
- } from "../chunk-5R67YSSD.js";
8
- import "../chunk-OTGJEYHV.js";
7
+ } from "../chunk-GLSOQNQR.js";
8
+ import "../chunk-5LFQ2UQZ.js";
9
+ import "../chunk-KIRIU53A.js";
10
+ import "../chunk-3I7FOSLF.js";
9
11
  export {
10
12
  EffectParameters,
11
13
  EffectThumbnail,
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ export type FillMode = 'solid' | 'gradient';
3
+ export interface FillPickerProps {
4
+ /** Active CSS colour (hex/rgb/hsl etc.) or CSS gradient string. */
5
+ value: string;
6
+ /** Called when the fill value changes. */
7
+ onChange: (value: string) => void;
8
+ /** Called when a continuous pointer drag starts. */
9
+ onGestureStart?: () => void;
10
+ /** Called when a continuous pointer drag ends. */
11
+ onGestureEnd?: () => void;
12
+ /** Allowed fill modes. Default: ['solid', 'gradient']. */
13
+ modes?: readonly FillMode[];
14
+ /** Whether the alpha channel slider is shown on ColorPicker. Default: false. */
15
+ alpha?: boolean;
16
+ /** Preset swatches for ColorPicker. */
17
+ swatches?: readonly string[];
18
+ /** Whether the gradient editor shows preset buttons. Default: true. */
19
+ showPresets?: boolean;
20
+ /** Whether the gradient editor shows the CSS output with a copy button. Default: false. */
21
+ showCss?: boolean;
22
+ /** Additional CSS class names. */
23
+ className?: string;
24
+ /** Whether the picker is disabled. */
25
+ disabled?: boolean;
26
+ }
27
+ export declare function FillPicker({ value, onChange, onGestureStart, onGestureEnd, modes, alpha, swatches, showPresets, showCss, className, disabled }: FillPickerProps): React.JSX.Element;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ export type FillMode = 'solid' | 'gradient';
3
+ export interface FillPickerProps {
4
+ /** Active CSS colour (hex/rgb/hsl etc.) or CSS gradient string. */
5
+ value: string;
6
+ /** Called when the fill value changes. */
7
+ onChange: (value: string) => void;
8
+ /** Called when a continuous pointer drag starts. */
9
+ onGestureStart?: () => void;
10
+ /** Called when a continuous pointer drag ends. */
11
+ onGestureEnd?: () => void;
12
+ /** Allowed fill modes. Default: ['solid', 'gradient']. */
13
+ modes?: readonly FillMode[];
14
+ /** Whether the alpha channel slider is shown on ColorPicker. Default: false. */
15
+ alpha?: boolean;
16
+ /** Preset swatches for ColorPicker. */
17
+ swatches?: readonly string[];
18
+ /** Whether the gradient editor shows preset buttons. Default: true. */
19
+ showPresets?: boolean;
20
+ /** Whether the gradient editor shows the CSS output with a copy button. Default: false. */
21
+ showCss?: boolean;
22
+ /** Additional CSS class names. */
23
+ className?: string;
24
+ /** Whether the picker is disabled. */
25
+ disabled?: boolean;
26
+ }
27
+ export declare function FillPicker({ value, onChange, onGestureStart, onGestureEnd, modes, alpha, swatches, showPresets, showCss, className, disabled }: FillPickerProps): React.JSX.Element;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { type GradientController, type GradientType } from '@pixerate/editor/gradient';
3
+ export interface GradientEditorProps {
4
+ /** Required controller that manages gradient data and history. */
5
+ controller: GradientController;
6
+ /** Allowed gradient types to switch between (default: ['linear', 'radial', 'conic']). */
7
+ types?: readonly GradientType[];
8
+ /** Whether to display preset gradient buttons (default: true). */
9
+ showPresets?: boolean;
10
+ /** Whether to display CSS code with copy button (default: false). */
11
+ showCss?: boolean;
12
+ /** Whether stops support dual light/dark colour definitions (default: false or auto-detected). */
13
+ dual?: boolean;
14
+ /** Called when a continuous edit (stop drag, angle drag, colour drag) starts. */
15
+ onGestureStart?: () => void;
16
+ /** Called when that edit ends. */
17
+ onGestureEnd?: () => void;
18
+ /** Additional CSS class name. */
19
+ className?: string;
20
+ }
21
+ export declare function GradientEditor({ controller, types, showPresets, showCss, dual: controlledDual, onGestureStart, onGestureEnd, className }: GradientEditorProps): React.JSX.Element;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { type GradientController, type GradientType } from '@pixerate/editor/gradient';
3
+ export interface GradientEditorProps {
4
+ /** Required controller that manages gradient data and history. */
5
+ controller: GradientController;
6
+ /** Allowed gradient types to switch between (default: ['linear', 'radial', 'conic']). */
7
+ types?: readonly GradientType[];
8
+ /** Whether to display preset gradient buttons (default: true). */
9
+ showPresets?: boolean;
10
+ /** Whether to display CSS code with copy button (default: false). */
11
+ showCss?: boolean;
12
+ /** Whether stops support dual light/dark colour definitions (default: false or auto-detected). */
13
+ dual?: boolean;
14
+ /** Called when a continuous edit (stop drag, angle drag, colour drag) starts. */
15
+ onGestureStart?: () => void;
16
+ /** Called when that edit ends. */
17
+ onGestureEnd?: () => void;
18
+ /** Additional CSS class name. */
19
+ className?: string;
20
+ }
21
+ export declare function GradientEditor({ controller, types, showPresets, showCss, dual: controlledDual, onGestureStart, onGestureEnd, className }: GradientEditorProps): React.JSX.Element;