@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.
Files changed (45) hide show
  1. package/dist/animation-editor/AnimationEditor.d.cts +11 -1
  2. package/dist/animation-editor/AnimationEditor.d.ts +11 -1
  3. package/dist/animation-editor/index.cjs +494 -366
  4. package/dist/animation-editor/index.js +48 -4
  5. package/dist/canvas/index.cjs +3 -2
  6. package/dist/canvas/index.js +4 -4
  7. package/dist/chart/ChartEditor.d.cts +12 -1
  8. package/dist/chart/ChartEditor.d.ts +12 -1
  9. package/dist/chart/index.cjs +187 -29
  10. package/dist/chart/index.js +74 -10
  11. package/dist/{chunk-6MDTFAPY.js → chunk-6YRSQW2V.js} +5 -5
  12. package/dist/chunk-7I73DW4V.js +43 -0
  13. package/dist/{chunk-GML6BYCN.js → chunk-GECXTPSH.js} +53 -3
  14. package/dist/{chunk-ECBC4HD7.js → chunk-IPVWWVSF.js} +3 -2
  15. package/dist/image-editor/index.cjs +3 -2
  16. package/dist/image-editor/index.js +2 -2
  17. package/dist/index.cjs +609 -527
  18. package/dist/index.js +10 -6
  19. package/dist/paint-editor/PaintEditor.d.cts +12 -1
  20. package/dist/paint-editor/PaintEditor.d.ts +12 -1
  21. package/dist/paint-editor/index.cjs +319 -164
  22. package/dist/paint-editor/index.js +84 -11
  23. package/dist/parameters/ParametersPanel.d.cts +11 -1
  24. package/dist/parameters/ParametersPanel.d.ts +11 -1
  25. package/dist/parameters/index.cjs +190 -41
  26. package/dist/parameters/index.js +23 -4
  27. package/dist/playback/index.d.cts +1 -0
  28. package/dist/playback/index.d.ts +1 -0
  29. package/dist/playback/useElementPlaybackSurface.d.cts +19 -0
  30. package/dist/playback/useElementPlaybackSurface.d.ts +19 -0
  31. package/dist/playback/usePlaybackSurface.d.cts +3 -1
  32. package/dist/playback/usePlaybackSurface.d.ts +3 -1
  33. package/dist/spreadsheet/SpreadsheetEditor.d.cts +10 -0
  34. package/dist/spreadsheet/SpreadsheetEditor.d.ts +10 -0
  35. package/dist/spreadsheet/index.cjs +443 -313
  36. package/dist/spreadsheet/index.js +2 -1
  37. package/dist/vector/index.cjs +3 -2
  38. package/dist/vector/index.js +5 -5
  39. package/dist/video-editor/VideoEditor.d.cts +6 -1
  40. package/dist/video-editor/VideoEditor.d.ts +6 -1
  41. package/dist/video-editor/VideoTimeline.d.cts +11 -1
  42. package/dist/video-editor/VideoTimeline.d.ts +11 -1
  43. package/dist/video-editor/index.cjs +463 -332
  44. package/dist/video-editor/index.js +53 -5
  45. package/package.json +3 -3
@@ -12,7 +12,8 @@ import {
12
12
  useSpreadsheetClipboard,
13
13
  useSpreadsheetEditor,
14
14
  useSpreadsheetViewport
15
- } from "../chunk-GML6BYCN.js";
15
+ } from "../chunk-GECXTPSH.js";
16
+ import "../chunk-IPVWWVSF.js";
16
17
  export {
17
18
  FormulaHints,
18
19
  NameManager,
@@ -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 [presence] = (0, import_react3.useState)(() => new import_tools.PresenceStore());
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)(() => {
@@ -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;