@pixerate/editor-react 0.92.0 → 0.93.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.
- package/dist/animation-editor/AnimationEditor.d.cts +11 -1
- package/dist/animation-editor/AnimationEditor.d.ts +11 -1
- package/dist/animation-editor/index.cjs +494 -366
- package/dist/animation-editor/index.js +48 -4
- package/dist/canvas/index.cjs +3 -2
- package/dist/canvas/index.js +4 -4
- package/dist/chart/ChartEditor.d.cts +12 -1
- package/dist/chart/ChartEditor.d.ts +12 -1
- package/dist/chart/index.cjs +187 -29
- package/dist/chart/index.js +74 -10
- package/dist/{chunk-6MDTFAPY.js → chunk-6YRSQW2V.js} +5 -5
- package/dist/chunk-7I73DW4V.js +43 -0
- package/dist/{chunk-GML6BYCN.js → chunk-GECXTPSH.js} +53 -3
- package/dist/{chunk-ECBC4HD7.js → chunk-IPVWWVSF.js} +3 -2
- package/dist/image-editor/index.cjs +3 -2
- package/dist/image-editor/index.js +2 -2
- package/dist/index.cjs +609 -527
- package/dist/index.js +10 -6
- package/dist/paint-editor/PaintEditor.d.cts +12 -1
- package/dist/paint-editor/PaintEditor.d.ts +12 -1
- package/dist/paint-editor/index.cjs +319 -164
- package/dist/paint-editor/index.js +84 -11
- package/dist/parameters/ParametersPanel.d.cts +11 -1
- package/dist/parameters/ParametersPanel.d.ts +11 -1
- package/dist/parameters/index.cjs +190 -41
- package/dist/parameters/index.js +23 -4
- package/dist/playback/index.d.cts +1 -0
- package/dist/playback/index.d.ts +1 -0
- package/dist/playback/useElementPlaybackSurface.d.cts +19 -0
- package/dist/playback/useElementPlaybackSurface.d.ts +19 -0
- package/dist/playback/usePlaybackSurface.d.cts +3 -1
- package/dist/playback/usePlaybackSurface.d.ts +3 -1
- package/dist/spreadsheet/SpreadsheetEditor.d.cts +10 -0
- package/dist/spreadsheet/SpreadsheetEditor.d.ts +10 -0
- package/dist/spreadsheet/index.cjs +443 -313
- package/dist/spreadsheet/index.js +2 -1
- package/dist/vector/index.cjs +3 -2
- package/dist/vector/index.js +5 -5
- package/dist/video-editor/VideoEditor.d.cts +6 -1
- package/dist/video-editor/VideoEditor.d.ts +6 -1
- package/dist/video-editor/VideoTimeline.d.cts +11 -1
- package/dist/video-editor/VideoTimeline.d.ts +11 -1
- package/dist/video-editor/index.cjs +463 -332
- package/dist/video-editor/index.js +53 -5
- package/package.json +3 -3
package/dist/vector/index.cjs
CHANGED
|
@@ -156,10 +156,11 @@ function useAgentPlayback() {
|
|
|
156
156
|
// src/playback/usePlaybackSurface.ts
|
|
157
157
|
var import_react3 = require("react");
|
|
158
158
|
var import_tools = require("@pixerate/editor/tools");
|
|
159
|
-
function usePlaybackSurface(playback, id, options = {}) {
|
|
159
|
+
function usePlaybackSurface(playback, id, options = {}, sharedPresence) {
|
|
160
160
|
const ambient = useAgentPlayback();
|
|
161
161
|
const target = playback === void 0 ? ambient : playback;
|
|
162
|
-
const [
|
|
162
|
+
const [ownPresence] = (0, import_react3.useState)(() => new import_tools.PresenceStore());
|
|
163
|
+
const presence = sharedPresence ?? ownPresence;
|
|
163
164
|
const latest = (0, import_react3.useRef)(options);
|
|
164
165
|
latest.current = options;
|
|
165
166
|
(0, import_react3.useEffect)(() => {
|
package/dist/vector/index.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PresenceLayer,
|
|
3
|
-
useAgentPlayback,
|
|
4
|
-
usePlaybackSurface
|
|
5
|
-
} from "../chunk-ECBC4HD7.js";
|
|
6
1
|
import {
|
|
7
2
|
EffectParameters,
|
|
8
3
|
EffectsBrowser,
|
|
@@ -10,6 +5,11 @@ import {
|
|
|
10
5
|
useEffects
|
|
11
6
|
} from "../chunk-5R67YSSD.js";
|
|
12
7
|
import "../chunk-OTGJEYHV.js";
|
|
8
|
+
import {
|
|
9
|
+
PresenceLayer,
|
|
10
|
+
useAgentPlayback,
|
|
11
|
+
usePlaybackSurface
|
|
12
|
+
} from "../chunk-IPVWWVSF.js";
|
|
13
13
|
|
|
14
14
|
// src/vector/useVectorEditor.ts
|
|
15
15
|
import { useEffect, useMemo, useRef, useSyncExternalStore } from "react";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { VideoEditorController, VideoEditorOptions } from '@pixerate/editor/video-editor';
|
|
3
3
|
import type { EffectProvider } from '@pixerate/editor/effects';
|
|
4
|
+
import type { AgentPlayback } from '@pixerate/editor/tools';
|
|
4
5
|
export interface VideoEditorProps {
|
|
5
6
|
/** The controller to edit. Without it one is created from `options` for the component's lifetime. */
|
|
6
7
|
controller?: VideoEditorController;
|
|
@@ -32,10 +33,14 @@ export interface VideoEditorProps {
|
|
|
32
33
|
/** Show the effects panel (default: when a provider is given or the project has effects). */
|
|
33
34
|
showEffects?: boolean;
|
|
34
35
|
className?: string;
|
|
36
|
+
/** Agent playback on the timeline (see `<VideoTimeline playback>`; default: the nearest `AgentPlaybackProvider`). */
|
|
37
|
+
playback?: AgentPlayback | null;
|
|
38
|
+
/** Bring the editor on screen (switch to its tab) before the agent acts. */
|
|
39
|
+
onPlaybackReveal?: () => void | Promise<void>;
|
|
35
40
|
}
|
|
36
41
|
/**
|
|
37
42
|
* A whole non-linear video editor for a `VideoEditorController`: the media bin, the preview, the
|
|
38
43
|
* transport, the timeline and the clip inspector, with the project's issues listed under the
|
|
39
44
|
* timeline. Every edit is one undo step; the controller's agent tools edit the same project.
|
|
40
45
|
*/
|
|
41
|
-
export declare function VideoEditor({ controller: given, options, editable, pxPerSecond, onPxPerSecondChange, resolution, showIssues, showTranscript, showScopes, effects, showEffects, className }: VideoEditorProps): React.JSX.Element;
|
|
46
|
+
export declare function VideoEditor({ controller: given, options, editable, pxPerSecond, onPxPerSecondChange, resolution, showIssues, showTranscript, showScopes, effects, showEffects, className, playback, onPlaybackReveal }: VideoEditorProps): React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { VideoEditorController, VideoEditorOptions } from '@pixerate/editor/video-editor';
|
|
3
3
|
import type { EffectProvider } from '@pixerate/editor/effects';
|
|
4
|
+
import type { AgentPlayback } from '@pixerate/editor/tools';
|
|
4
5
|
export interface VideoEditorProps {
|
|
5
6
|
/** The controller to edit. Without it one is created from `options` for the component's lifetime. */
|
|
6
7
|
controller?: VideoEditorController;
|
|
@@ -32,10 +33,14 @@ export interface VideoEditorProps {
|
|
|
32
33
|
/** Show the effects panel (default: when a provider is given or the project has effects). */
|
|
33
34
|
showEffects?: boolean;
|
|
34
35
|
className?: string;
|
|
36
|
+
/** Agent playback on the timeline (see `<VideoTimeline playback>`; default: the nearest `AgentPlaybackProvider`). */
|
|
37
|
+
playback?: AgentPlayback | null;
|
|
38
|
+
/** Bring the editor on screen (switch to its tab) before the agent acts. */
|
|
39
|
+
onPlaybackReveal?: () => void | Promise<void>;
|
|
35
40
|
}
|
|
36
41
|
/**
|
|
37
42
|
* A whole non-linear video editor for a `VideoEditorController`: the media bin, the preview, the
|
|
38
43
|
* transport, the timeline and the clip inspector, with the project's issues listed under the
|
|
39
44
|
* timeline. Every edit is one undo step; the controller's agent tools edit the same project.
|
|
40
45
|
*/
|
|
41
|
-
export declare function VideoEditor({ controller: given, options, editable, pxPerSecond, onPxPerSecondChange, resolution, showIssues, showTranscript, showScopes, effects, showEffects, className }: VideoEditorProps): React.JSX.Element;
|
|
46
|
+
export declare function VideoEditor({ controller: given, options, editable, pxPerSecond, onPxPerSecondChange, resolution, showIssues, showTranscript, showScopes, effects, showEffects, className, playback, onPlaybackReveal }: VideoEditorProps): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type VideoEditorController, type VideoWaveformMode } from '@pixerate/editor/video-editor';
|
|
3
|
+
import type { AgentPlayback } from '@pixerate/editor/tools';
|
|
3
4
|
export interface VideoTimelineProps {
|
|
4
5
|
controller: VideoEditorController;
|
|
5
6
|
/** Zoom: pixels per second of timeline. With `onPxPerSecondChange` the host owns it; otherwise it is the starting zoom (default 100). */
|
|
@@ -11,5 +12,14 @@ export interface VideoTimelineProps {
|
|
|
11
12
|
/** Draw waveforms in audio clips (default), in every clip with sound (`all`), or not at all. Sound is decoded once per asset through `controller.audioPeaks`. */
|
|
12
13
|
waveforms?: VideoWaveformMode;
|
|
13
14
|
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Agent playback: act out the video tools' calls here with the agent's cursor (default: the
|
|
17
|
+
* nearest `AgentPlaybackProvider`; `null` turns it off).
|
|
18
|
+
*/
|
|
19
|
+
playback?: AgentPlayback | null;
|
|
20
|
+
/** The playback surface id (default `video`, where the video tool providers play). */
|
|
21
|
+
playbackId?: string;
|
|
22
|
+
/** Bring the timeline on screen (switch to its tab) before the agent acts. */
|
|
23
|
+
onPlaybackReveal?: () => void | Promise<void>;
|
|
14
24
|
}
|
|
15
|
-
export declare function VideoTimeline({ controller, pxPerSecond, onPxPerSecondChange, editable, waveforms, className }: VideoTimelineProps): React.JSX.Element;
|
|
25
|
+
export declare function VideoTimeline({ controller, pxPerSecond, onPxPerSecondChange, editable, waveforms, className, playback, playbackId, onPlaybackReveal }: VideoTimelineProps): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type VideoEditorController, type VideoWaveformMode } from '@pixerate/editor/video-editor';
|
|
3
|
+
import type { AgentPlayback } from '@pixerate/editor/tools';
|
|
3
4
|
export interface VideoTimelineProps {
|
|
4
5
|
controller: VideoEditorController;
|
|
5
6
|
/** Zoom: pixels per second of timeline. With `onPxPerSecondChange` the host owns it; otherwise it is the starting zoom (default 100). */
|
|
@@ -11,5 +12,14 @@ export interface VideoTimelineProps {
|
|
|
11
12
|
/** Draw waveforms in audio clips (default), in every clip with sound (`all`), or not at all. Sound is decoded once per asset through `controller.audioPeaks`. */
|
|
12
13
|
waveforms?: VideoWaveformMode;
|
|
13
14
|
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Agent playback: act out the video tools' calls here with the agent's cursor (default: the
|
|
17
|
+
* nearest `AgentPlaybackProvider`; `null` turns it off).
|
|
18
|
+
*/
|
|
19
|
+
playback?: AgentPlayback | null;
|
|
20
|
+
/** The playback surface id (default `video`, where the video tool providers play). */
|
|
21
|
+
playbackId?: string;
|
|
22
|
+
/** Bring the timeline on screen (switch to its tab) before the agent acts. */
|
|
23
|
+
onPlaybackReveal?: () => void | Promise<void>;
|
|
14
24
|
}
|
|
15
|
-
export declare function VideoTimeline({ controller, pxPerSecond, onPxPerSecondChange, editable, waveforms, className }: VideoTimelineProps): React.JSX.Element;
|
|
25
|
+
export declare function VideoTimeline({ controller, pxPerSecond, onPxPerSecondChange, editable, waveforms, className, playback, playbackId, onPlaybackReveal }: VideoTimelineProps): React.JSX.Element;
|