@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.
- package/README.md +2 -0
- package/dist/animation-editor/index.cjs +1261 -198
- package/dist/animation-editor/index.js +4 -2
- package/dist/canvas/index.cjs +1439 -376
- package/dist/canvas/index.js +4 -2
- package/dist/chunk-3I7FOSLF.js +988 -0
- package/dist/{chunk-OTGJEYHV.js → chunk-5LFQ2UQZ.js} +75 -68
- package/dist/chunk-KIRIU53A.js +72 -0
- package/dist/{chunk-6YRSQW2V.js → chunk-NC4RLZTK.js} +1 -1
- package/dist/chunk-Q7LAFHGP.js +655 -0
- package/dist/color/ColorPicker.d.cts +30 -0
- package/dist/color/ColorPicker.d.ts +30 -0
- package/dist/color/DualColorPicker.d.cts +29 -0
- package/dist/color/DualColorPicker.d.ts +29 -0
- package/dist/color/index.cjs +1067 -0
- package/dist/color/index.d.cts +7 -0
- package/dist/color/index.d.ts +7 -0
- package/dist/color/index.js +14 -0
- package/dist/color/useColorScheme.d.cts +16 -0
- package/dist/color/useColorScheme.d.ts +16 -0
- package/dist/effects/EffectAuthoringEditor.d.cts +22 -0
- package/dist/effects/EffectAuthoringEditor.d.ts +22 -0
- package/dist/effects/EffectParameters.d.cts +5 -1
- package/dist/effects/EffectParameters.d.ts +5 -1
- package/dist/effects/index.cjs +1624 -127
- package/dist/effects/index.d.cts +2 -0
- package/dist/effects/index.d.ts +2 -0
- package/dist/effects/index.js +8 -2
- package/dist/effects/useEffectAuthoring.d.cts +6 -0
- package/dist/effects/useEffectAuthoring.d.ts +6 -0
- package/dist/gradient/FillPicker.d.cts +27 -0
- package/dist/gradient/FillPicker.d.ts +27 -0
- package/dist/gradient/GradientEditor.d.cts +21 -0
- package/dist/gradient/GradientEditor.d.ts +21 -0
- package/dist/gradient/index.cjs +1601 -0
- package/dist/gradient/index.d.cts +6 -0
- package/dist/gradient/index.d.ts +6 -0
- package/dist/gradient/index.js +617 -0
- package/dist/gradient/useGradientController.d.cts +10 -0
- package/dist/gradient/useGradientController.d.ts +10 -0
- package/dist/image-editor/index.cjs +1763 -700
- package/dist/image-editor/index.js +5 -3
- package/dist/index.cjs +2181 -1118
- package/dist/index.js +5 -3
- package/dist/paint-editor/index.cjs +1254 -191
- package/dist/paint-editor/index.js +4 -2
- package/dist/parameters/fields.d.cts +1 -1
- package/dist/parameters/fields.d.ts +1 -1
- package/dist/parameters/index.cjs +1218 -173
- package/dist/parameters/index.js +3 -1
- package/dist/vector/index.cjs +1240 -177
- package/dist/vector/index.js +4 -2
- package/dist/video-editor/index.cjs +1251 -188
- package/dist/video-editor/index.js +4 -2
- package/package.json +29 -3
- package/dist/chunk-5R67YSSD.js +0 -205
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ColorPickerProps {
|
|
3
|
+
/** The current colour value (any valid CSS colour string or hex). */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Called when the colour value changes. */
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
/** Called when a continuous pointer drag or keyboard interaction starts. */
|
|
8
|
+
onGestureStart?: () => void;
|
|
9
|
+
/** Called when a continuous pointer drag or keyboard interaction ends. */
|
|
10
|
+
onGestureEnd?: () => void;
|
|
11
|
+
/** Whether the alpha channel slider is shown and alpha hex values emitted. Default: false. */
|
|
12
|
+
alpha?: boolean;
|
|
13
|
+
/** Palette swatches shown beneath the sliders. */
|
|
14
|
+
swatches?: readonly string[];
|
|
15
|
+
/** Controlled recent colours. If omitted, internal recents persisted in localStorage are used. */
|
|
16
|
+
recent?: readonly string[];
|
|
17
|
+
/** Called when the list of recent colours changes. */
|
|
18
|
+
onRecentChange?: (recent: readonly string[]) => void;
|
|
19
|
+
/** If provided, renders live WCAG contrast ratio badges against this background colour. */
|
|
20
|
+
contrastAgainst?: string;
|
|
21
|
+
/** Whether the picker is disabled. */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Additional CSS class names for the outer container. */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Optional DOM id for the container. */
|
|
26
|
+
id?: string;
|
|
27
|
+
/** Accessible label for the colour picker group. */
|
|
28
|
+
"aria-label"?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const ColorPicker: React.FC<ColorPickerProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ColorScheme, type ColorValue, type DualColor } from '@pixerate/editor/color';
|
|
3
|
+
export interface DualColorPickerProps {
|
|
4
|
+
/** Active color value: plain CSS colour, light-dark() string, or { light, dark } object. */
|
|
5
|
+
value: ColorValue;
|
|
6
|
+
/** Called when either half changes. Always receives normalised DualColor with hex values. */
|
|
7
|
+
onChange: (value: DualColor) => void;
|
|
8
|
+
/** Called when a continuous dragging gesture begins in the inner picker or during derivation. */
|
|
9
|
+
onGestureStart?: () => void;
|
|
10
|
+
/** Called when a continuous dragging gesture ends in the inner picker or during derivation. */
|
|
11
|
+
onGestureEnd?: () => void;
|
|
12
|
+
/** Which scheme half is currently selected for editing ('light' or 'dark'). */
|
|
13
|
+
scheme?: ColorScheme;
|
|
14
|
+
/** Called when the selected scheme half changes. */
|
|
15
|
+
onSchemeChange?: (scheme: ColorScheme) => void;
|
|
16
|
+
/** Background surfaces for light and dark previews. Default { light: '#ffffff', dark: '#0b0b0f' }. */
|
|
17
|
+
surfaces?: DualColor;
|
|
18
|
+
/** Contrast reference target to measure against in both schemes. */
|
|
19
|
+
contrastAgainst?: ColorValue;
|
|
20
|
+
/** Whether alpha transparency is enabled. Default false. */
|
|
21
|
+
alpha?: boolean;
|
|
22
|
+
/** Swatch palette colours. */
|
|
23
|
+
swatches?: string[];
|
|
24
|
+
/** Whether interactions are disabled. Default false. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Additional CSS class name. */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function DualColorPicker({ value, onChange, onGestureStart, onGestureEnd, scheme: controlledScheme, onSchemeChange, surfaces, contrastAgainst, alpha, swatches, disabled, className }: DualColorPickerProps): React.ReactElement;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ColorScheme, type ColorValue, type DualColor } from '@pixerate/editor/color';
|
|
3
|
+
export interface DualColorPickerProps {
|
|
4
|
+
/** Active color value: plain CSS colour, light-dark() string, or { light, dark } object. */
|
|
5
|
+
value: ColorValue;
|
|
6
|
+
/** Called when either half changes. Always receives normalised DualColor with hex values. */
|
|
7
|
+
onChange: (value: DualColor) => void;
|
|
8
|
+
/** Called when a continuous dragging gesture begins in the inner picker or during derivation. */
|
|
9
|
+
onGestureStart?: () => void;
|
|
10
|
+
/** Called when a continuous dragging gesture ends in the inner picker or during derivation. */
|
|
11
|
+
onGestureEnd?: () => void;
|
|
12
|
+
/** Which scheme half is currently selected for editing ('light' or 'dark'). */
|
|
13
|
+
scheme?: ColorScheme;
|
|
14
|
+
/** Called when the selected scheme half changes. */
|
|
15
|
+
onSchemeChange?: (scheme: ColorScheme) => void;
|
|
16
|
+
/** Background surfaces for light and dark previews. Default { light: '#ffffff', dark: '#0b0b0f' }. */
|
|
17
|
+
surfaces?: DualColor;
|
|
18
|
+
/** Contrast reference target to measure against in both schemes. */
|
|
19
|
+
contrastAgainst?: ColorValue;
|
|
20
|
+
/** Whether alpha transparency is enabled. Default false. */
|
|
21
|
+
alpha?: boolean;
|
|
22
|
+
/** Swatch palette colours. */
|
|
23
|
+
swatches?: string[];
|
|
24
|
+
/** Whether interactions are disabled. Default false. */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Additional CSS class name. */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function DualColorPicker({ value, onChange, onGestureStart, onGestureEnd, scheme: controlledScheme, onSchemeChange, surfaces, contrastAgainst, alpha, swatches, disabled, className }: DualColorPickerProps): React.ReactElement;
|