@pixerate/editor-react 0.95.0 → 0.97.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 (56) hide show
  1. package/README.md +2 -0
  2. package/dist/animation-editor/index.cjs +1261 -198
  3. package/dist/animation-editor/index.js +4 -2
  4. package/dist/canvas/index.cjs +1439 -376
  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-KIRIU53A.js +72 -0
  9. package/dist/{chunk-6YRSQW2V.js → chunk-NC4RLZTK.js} +1 -1
  10. package/dist/chunk-Q7LAFHGP.js +655 -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/EffectAuthoringEditor.d.cts +22 -0
  22. package/dist/effects/EffectAuthoringEditor.d.ts +22 -0
  23. package/dist/effects/EffectParameters.d.cts +5 -1
  24. package/dist/effects/EffectParameters.d.ts +5 -1
  25. package/dist/effects/index.cjs +1624 -127
  26. package/dist/effects/index.d.cts +2 -0
  27. package/dist/effects/index.d.ts +2 -0
  28. package/dist/effects/index.js +8 -2
  29. package/dist/effects/useEffectAuthoring.d.cts +6 -0
  30. package/dist/effects/useEffectAuthoring.d.ts +6 -0
  31. package/dist/gradient/FillPicker.d.cts +27 -0
  32. package/dist/gradient/FillPicker.d.ts +27 -0
  33. package/dist/gradient/GradientEditor.d.cts +21 -0
  34. package/dist/gradient/GradientEditor.d.ts +21 -0
  35. package/dist/gradient/index.cjs +1601 -0
  36. package/dist/gradient/index.d.cts +6 -0
  37. package/dist/gradient/index.d.ts +6 -0
  38. package/dist/gradient/index.js +617 -0
  39. package/dist/gradient/useGradientController.d.cts +10 -0
  40. package/dist/gradient/useGradientController.d.ts +10 -0
  41. package/dist/image-editor/index.cjs +1763 -700
  42. package/dist/image-editor/index.js +5 -3
  43. package/dist/index.cjs +2181 -1118
  44. package/dist/index.js +5 -3
  45. package/dist/paint-editor/index.cjs +1254 -191
  46. package/dist/paint-editor/index.js +4 -2
  47. package/dist/parameters/fields.d.cts +1 -1
  48. package/dist/parameters/fields.d.ts +1 -1
  49. package/dist/parameters/index.cjs +1218 -173
  50. package/dist/parameters/index.js +3 -1
  51. package/dist/vector/index.cjs +1240 -177
  52. package/dist/vector/index.js +4 -2
  53. package/dist/video-editor/index.cjs +1251 -188
  54. package/dist/video-editor/index.js +4 -2
  55. package/package.json +29 -3
  56. package/dist/chunk-5R67YSSD.js +0 -205
@@ -2,3 +2,5 @@ export * from './useEffects.cjs';
2
2
  export * from './EffectThumbnail.cjs';
3
3
  export * from './EffectsBrowser.cjs';
4
4
  export * from './EffectParameters.cjs';
5
+ export * from './useEffectAuthoring.cjs';
6
+ export * from './EffectAuthoringEditor.cjs';
@@ -2,3 +2,5 @@ export * from './useEffects.js';
2
2
  export * from './EffectThumbnail.js';
3
3
  export * from './EffectsBrowser.js';
4
4
  export * from './EffectParameters.js';
5
+ export * from './useEffectAuthoring.js';
6
+ export * from './EffectAuthoringEditor.js';
@@ -1,15 +1,21 @@
1
1
  import {
2
+ EffectAuthoringEditor,
2
3
  EffectParameters,
3
4
  EffectThumbnail,
4
5
  EffectsBrowser,
6
+ useEffectAuthoring,
5
7
  useEffectDescription,
6
8
  useEffects
7
- } from "../chunk-5R67YSSD.js";
8
- import "../chunk-OTGJEYHV.js";
9
+ } from "../chunk-Q7LAFHGP.js";
10
+ import "../chunk-5LFQ2UQZ.js";
11
+ import "../chunk-KIRIU53A.js";
12
+ import "../chunk-3I7FOSLF.js";
9
13
  export {
14
+ EffectAuthoringEditor,
10
15
  EffectParameters,
11
16
  EffectThumbnail,
12
17
  EffectsBrowser,
18
+ useEffectAuthoring,
13
19
  useEffectDescription,
14
20
  useEffects
15
21
  };
@@ -0,0 +1,6 @@
1
+ import type { EffectAuthoringSession, EffectAuthoringState } from '@pixerate/editor/effects';
2
+ /**
3
+ * Subscribes a React component to the observable state of an effect authoring session.
4
+ * Re-renders only when the session's state changes. Returns null when session is null.
5
+ */
6
+ export declare function useEffectAuthoring(session: EffectAuthoringSession | null): EffectAuthoringState | null;
@@ -0,0 +1,6 @@
1
+ import type { EffectAuthoringSession, EffectAuthoringState } from '@pixerate/editor/effects';
2
+ /**
3
+ * Subscribes a React component to the observable state of an effect authoring session.
4
+ * Re-renders only when the session's state changes. Returns null when session is null.
5
+ */
6
+ export declare function useEffectAuthoring(session: EffectAuthoringSession | null): EffectAuthoringState | null;
@@ -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;