@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,7 @@
|
|
|
1
|
+
export { ColorPicker } from "./ColorPicker.cjs";
|
|
2
|
+
export type { ColorPickerProps } from "./ColorPicker.cjs";
|
|
3
|
+
export { DualColorPicker } from "./DualColorPicker.cjs";
|
|
4
|
+
export type { DualColorPickerProps } from "./DualColorPicker.cjs";
|
|
5
|
+
export { useColorScheme, useResolvedColor } from "./useColorScheme.cjs";
|
|
6
|
+
export type { UseColorSchemeOptions } from "./useColorScheme.cjs";
|
|
7
|
+
export * from "@pixerate/editor/color";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { ColorPicker } from "./ColorPicker.js";
|
|
2
|
+
export type { ColorPickerProps } from "./ColorPicker.js";
|
|
3
|
+
export { DualColorPicker } from "./DualColorPicker.js";
|
|
4
|
+
export type { DualColorPickerProps } from "./DualColorPicker.js";
|
|
5
|
+
export { useColorScheme, useResolvedColor } from "./useColorScheme.js";
|
|
6
|
+
export type { UseColorSchemeOptions } from "./useColorScheme.js";
|
|
7
|
+
export * from "@pixerate/editor/color";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ColorScheme, ColorValue } from '@pixerate/editor/color';
|
|
2
|
+
export interface UseColorSchemeOptions {
|
|
3
|
+
/** Explicit scheme override ('light' or 'dark'). If provided, takes precedence over document and system. */
|
|
4
|
+
override?: ColorScheme | null;
|
|
5
|
+
/** Attribute on documentElement to watch (e.g. 'data-theme' or 'class'). 'class' checks for presence of 'dark'. */
|
|
6
|
+
attribute?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Returns the active color scheme ('light' or 'dark'), tracking DOM element attributes or system prefers-color-scheme.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useColorScheme(options?: UseColorSchemeOptions): ColorScheme;
|
|
12
|
+
/**
|
|
13
|
+
* Resolves a colour value (plain colour, dual colour object, or light-dark() string)
|
|
14
|
+
* to a normalised hex string for the current or specified scheme.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useResolvedColor(value: ColorValue, scheme?: ColorScheme): string | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ColorScheme, ColorValue } from '@pixerate/editor/color';
|
|
2
|
+
export interface UseColorSchemeOptions {
|
|
3
|
+
/** Explicit scheme override ('light' or 'dark'). If provided, takes precedence over document and system. */
|
|
4
|
+
override?: ColorScheme | null;
|
|
5
|
+
/** Attribute on documentElement to watch (e.g. 'data-theme' or 'class'). 'class' checks for presence of 'dark'. */
|
|
6
|
+
attribute?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Returns the active color scheme ('light' or 'dark'), tracking DOM element attributes or system prefers-color-scheme.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useColorScheme(options?: UseColorSchemeOptions): ColorScheme;
|
|
12
|
+
/**
|
|
13
|
+
* Resolves a colour value (plain colour, dual colour object, or light-dark() string)
|
|
14
|
+
* to a normalised hex string for the current or specified scheme.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useResolvedColor(value: ColorValue, scheme?: ColorScheme): string | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type EffectAuthoringSession } from '@pixerate/editor/effects';
|
|
3
|
+
export interface EffectAuthoringEditorProps {
|
|
4
|
+
/** The effect authoring session to edit. */
|
|
5
|
+
session: EffectAuthoringSession | null;
|
|
6
|
+
/** Whether to show the source code editor pane when supported (default true). */
|
|
7
|
+
showSource?: boolean;
|
|
8
|
+
/** Whether to show the keyframe timeline below parameters (default true). */
|
|
9
|
+
showTimeline?: boolean;
|
|
10
|
+
/** Size of the preview canvas (default 480 × 270). */
|
|
11
|
+
previewSize?: {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
15
|
+
/** Additional CSS class names. */
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Visual effect authoring editor: preview canvas, source code pane with line gutter,
|
|
20
|
+
* parameter controls with keyframe toggles, and keyframe timeline.
|
|
21
|
+
*/
|
|
22
|
+
export declare function EffectAuthoringEditor({ session, showSource, showTimeline, previewSize, className }: EffectAuthoringEditorProps): React.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type EffectAuthoringSession } from '@pixerate/editor/effects';
|
|
3
|
+
export interface EffectAuthoringEditorProps {
|
|
4
|
+
/** The effect authoring session to edit. */
|
|
5
|
+
session: EffectAuthoringSession | null;
|
|
6
|
+
/** Whether to show the source code editor pane when supported (default true). */
|
|
7
|
+
showSource?: boolean;
|
|
8
|
+
/** Whether to show the keyframe timeline below parameters (default true). */
|
|
9
|
+
showTimeline?: boolean;
|
|
10
|
+
/** Size of the preview canvas (default 480 × 270). */
|
|
11
|
+
previewSize?: {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
15
|
+
/** Additional CSS class names. */
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Visual effect authoring editor: preview canvas, source code pane with line gutter,
|
|
20
|
+
* parameter controls with keyframe toggles, and keyframe timeline.
|
|
21
|
+
*/
|
|
22
|
+
export declare function EffectAuthoringEditor({ session, showSource, showTimeline, previewSize, className }: EffectAuthoringEditorProps): React.JSX.Element;
|
|
@@ -17,6 +17,10 @@ export interface EffectParametersProps {
|
|
|
17
17
|
keyframed?: ReadonlySet<string>;
|
|
18
18
|
/** Applies a preset's values. */
|
|
19
19
|
onPreset?: (values: Readonly<Record<string, unknown>>) => void;
|
|
20
|
+
/** Applies a preset by name. */
|
|
21
|
+
onPresetName?: (name: string) => void;
|
|
22
|
+
/** Optional addon rendered next to the control label (e.g. keyframe toggle button). */
|
|
23
|
+
renderControlAddon?: (control: string) => React.ReactNode;
|
|
20
24
|
disabled?: boolean;
|
|
21
25
|
className?: string;
|
|
22
26
|
}
|
|
@@ -25,4 +29,4 @@ export interface EffectParametersProps {
|
|
|
25
29
|
* numbers, switches, choices, colour pickers, vectors and text, with each control's description,
|
|
26
30
|
* per-control reset and the effect's presets.
|
|
27
31
|
*/
|
|
28
|
-
export declare function EffectParameters({ description, values, onChange, onReset, keyframed, onPreset, disabled, className }: EffectParametersProps): React.JSX.Element;
|
|
32
|
+
export declare function EffectParameters({ description, values, onChange, onReset, keyframed, onPreset, onPresetName, renderControlAddon, disabled, className }: EffectParametersProps): React.JSX.Element;
|
|
@@ -17,6 +17,10 @@ export interface EffectParametersProps {
|
|
|
17
17
|
keyframed?: ReadonlySet<string>;
|
|
18
18
|
/** Applies a preset's values. */
|
|
19
19
|
onPreset?: (values: Readonly<Record<string, unknown>>) => void;
|
|
20
|
+
/** Applies a preset by name. */
|
|
21
|
+
onPresetName?: (name: string) => void;
|
|
22
|
+
/** Optional addon rendered next to the control label (e.g. keyframe toggle button). */
|
|
23
|
+
renderControlAddon?: (control: string) => React.ReactNode;
|
|
20
24
|
disabled?: boolean;
|
|
21
25
|
className?: string;
|
|
22
26
|
}
|
|
@@ -25,4 +29,4 @@ export interface EffectParametersProps {
|
|
|
25
29
|
* numbers, switches, choices, colour pickers, vectors and text, with each control's description,
|
|
26
30
|
* per-control reset and the effect's presets.
|
|
27
31
|
*/
|
|
28
|
-
export declare function EffectParameters({ description, values, onChange, onReset, keyframed, onPreset, disabled, className }: EffectParametersProps): React.JSX.Element;
|
|
32
|
+
export declare function EffectParameters({ description, values, onChange, onReset, keyframed, onPreset, onPresetName, renderControlAddon, disabled, className }: EffectParametersProps): React.JSX.Element;
|