@pixerate/editor 0.123.0 → 0.124.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/dist/agent/index.cjs +2 -2
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.js +3 -3
- package/dist/animation/index.d.cts +2 -1
- package/dist/animation/index.d.ts +2 -1
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +11 -733
- package/dist/animation-editor/index.d.ts +11 -733
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/{bezier-C-W9LFyD.d.cts → bezier-CBzKKDjl.d.cts} +2 -66
- package/dist/{bezier-DQZE5dxA.d.ts → bezier-CWv6LQal.d.ts} +2 -66
- package/dist/{brushstrokeRender-M4S65DHT.cjs → brushstrokeRender-EELTV7U4.cjs} +8 -8
- package/dist/{brushstrokeRender-M4S65DHT.cjs.map → brushstrokeRender-EELTV7U4.cjs.map} +1 -1
- package/dist/{brushstrokeRender-CDDRSV2W.js → brushstrokeRender-LRV7GXGD.js} +3 -3
- package/dist/canvas/index.cjs +6 -6
- package/dist/canvas/index.d.cts +10 -6
- package/dist/canvas/index.d.ts +10 -6
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-TVXFHE4T.js → chunk-64PYNEHJ.js} +45 -12
- package/dist/chunk-64PYNEHJ.js.map +1 -0
- package/dist/{chunk-2IW3BWRT.cjs → chunk-7LQO6OHH.cjs} +2 -2
- package/dist/{chunk-2IW3BWRT.cjs.map → chunk-7LQO6OHH.cjs.map} +1 -1
- package/dist/chunk-IOXKXQNW.cjs +178 -0
- package/dist/chunk-IOXKXQNW.cjs.map +1 -0
- package/dist/{chunk-SMJGE7HM.cjs → chunk-IWSMDQE5.cjs} +523 -39
- package/dist/chunk-IWSMDQE5.cjs.map +1 -0
- package/dist/{chunk-KMBC4HNV.js → chunk-J67OLQUQ.js} +2 -2
- package/dist/{chunk-6CJRDJCU.cjs → chunk-PEHYWUVV.cjs} +176 -111
- package/dist/chunk-PEHYWUVV.cjs.map +1 -0
- package/dist/chunk-TGKT5QAB.js +178 -0
- package/dist/chunk-TGKT5QAB.js.map +1 -0
- package/dist/chunk-TK53AB4Q.cjs +215 -0
- package/dist/chunk-TK53AB4Q.cjs.map +1 -0
- package/dist/chunk-VFAKN46Z.js +215 -0
- package/dist/chunk-VFAKN46Z.js.map +1 -0
- package/dist/{chunk-6ZBR4J62.js → chunk-WATAQ2Z2.js} +79 -14
- package/dist/chunk-WATAQ2Z2.js.map +1 -0
- package/dist/{chunk-IPFRWILU.js → chunk-YVVSTD3B.js} +499 -15
- package/dist/chunk-YVVSTD3B.js.map +1 -0
- package/dist/{chunk-RLRUAPBJ.cjs → chunk-Z6OUCS2K.cjs} +47 -14
- package/dist/chunk-Z6OUCS2K.cjs.map +1 -0
- package/dist/effects/index.cjs +588 -0
- package/dist/effects/index.cjs.map +1 -0
- package/dist/effects/index.d.cts +131 -0
- package/dist/effects/index.d.ts +131 -0
- package/dist/effects/index.js +588 -0
- package/dist/effects/index.js.map +1 -0
- package/dist/evaluate-2S3vSPLy.d.cts +55 -0
- package/dist/evaluate-CfmT6xA3.d.ts +55 -0
- package/dist/{export-DfjzHAJI.d.ts → export-8RnlngAv.d.ts} +534 -128
- package/dist/{export-Dv0-ZVrV.d.ts → export-BzSRXyH6.d.cts} +390 -5
- package/dist/{export-Dv0-ZVrV.d.cts → export-DM3h7QEI.d.ts} +390 -5
- package/dist/{export-lU5qSpHE.d.cts → export-TqXMOlDt.d.cts} +534 -128
- package/dist/flair-CxB3fOcU.d.ts +739 -0
- package/dist/flair-D7BxyBwL.d.cts +739 -0
- package/dist/gradient-KDfCvhuj.d.cts +66 -0
- package/dist/gradient-KDfCvhuj.d.ts +66 -0
- package/dist/helpers-777mC6dc.d.cts +253 -0
- package/dist/helpers-DX2_7L5t.d.ts +253 -0
- package/dist/image-editor/index.cjs +1307 -805
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +39 -182
- package/dist/image-editor/index.d.ts +39 -182
- package/dist/image-editor/index.js +508 -6
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{opentype-p8Xxf-Wh.d.ts → opentype-14PDI5D2.d.ts} +1 -1
- package/dist/{opentype-BV7wWatY.d.cts → opentype-D80AVmMu.d.cts} +1 -1
- package/dist/paint/index.cjs +2 -2
- package/dist/paint/index.d.cts +32 -10
- package/dist/paint/index.d.ts +32 -10
- package/dist/paint/index.js +1 -1
- package/dist/paint-editor/index.cjs +10 -8
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +11 -5
- package/dist/paint-editor/index.d.ts +11 -5
- package/dist/paint-editor/index.js +4 -2
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/parameters/index.d.cts +4 -184
- package/dist/parameters/index.d.ts +4 -184
- package/dist/{pathfinder-IxcyhO00.d.cts → pathfinder-C0UoFypx.d.cts} +1 -1
- package/dist/{pathfinder-StVChJOT.d.ts → pathfinder-DjISxkUv.d.ts} +1 -1
- package/dist/{player-DrcP2xqj.d.cts → player-CBtEoU2x.d.cts} +2 -54
- package/dist/{player-DV4Jujdq.d.ts → player-cGLrngL_.d.ts} +2 -54
- package/dist/{svg-BtND4TJu.d.cts → svg-BDrjRnL1.d.cts} +3 -2
- package/dist/{svg-BfVXG7hL.d.ts → svg-C-vZ3q50.d.ts} +3 -2
- package/dist/tools/index.cjs +2 -2
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.js +3 -3
- package/dist/tools-C7JtLYzo.d.ts +126 -0
- package/dist/tools-DHKGHiSK.d.cts +126 -0
- package/dist/{types-fuXEme9j.d.ts → types-BcX7sCsn.d.ts} +2 -2
- package/dist/{types-DJF3Ghn5.d.cts → types-CznabG7m.d.cts} +2 -2
- package/dist/types-D3-J3TFf.d.ts +185 -0
- package/dist/types-DMcf_z4J.d.cts +185 -0
- package/dist/vector/index.d.cts +10 -10
- package/dist/vector/index.d.ts +10 -10
- package/dist/video-editor/index.cjs +749 -277
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.d.cts +265 -138
- package/dist/video-editor/index.d.ts +265 -138
- package/dist/video-editor/index.js +490 -18
- package/dist/video-editor/index.js.map +1 -1
- package/dist/{warp-BjmAgQwq.d.cts → warp-CH9MM435.d.cts} +1 -1
- package/dist/{warp-Ca5fedzS.d.ts → warp-k_PdtXOG.d.ts} +1 -1
- package/package.json +6 -1
- package/skills/pixerate-image-editor/SKILL.md +7 -0
- package/skills/pixerate-image-editor/references/provider-effects.md +35 -0
- package/skills/pixerate-video-editor/SKILL.md +39 -1
- package/dist/chunk-6CJRDJCU.cjs.map +0 -1
- package/dist/chunk-6ZBR4J62.js.map +0 -1
- package/dist/chunk-IPFRWILU.js.map +0 -1
- package/dist/chunk-RLRUAPBJ.cjs.map +0 -1
- package/dist/chunk-SMJGE7HM.cjs.map +0 -1
- package/dist/chunk-TVXFHE4T.js.map +0 -1
- /package/dist/{brushstrokeRender-CDDRSV2W.js.map → brushstrokeRender-LRV7GXGD.js.map} +0 -0
- /package/dist/{chunk-KMBC4HNV.js.map → chunk-J67OLQUQ.js.map} +0 -0
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { V as VideoProject, a as VideoAnimatable, b as VideoAsset, c as VideoAssetProxy, d as VideoClip, e as VideoClipAnimation, f as
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
1
|
+
import { V as VideoProject, a as VideoAnimatable, b as VideoAsset, c as VideoAssetProxy, d as VideoClip, e as VideoClipAnimation, f as VideoClipEffect, g as VideoEffectRef, h as VideoEffectValues, i as VideoGrade, j as VideoGradeLut, k as VideoKeyframes, l as VideoMarker, m as VideoSequence, n as VideoTrack, o as VideoTranscriptWord, p as VideoTransform, q as VideoTransition, v as videoKeysOf, r as VideoTrackKind, s as VideoPlacementMode, t as VideoKeyframeProperty, u as VideoKey, w as VideoMediaClip, x as VideoEffectsEngine, y as VideoLayer, z as VideoFrame, A as VideoRect, B as VideoEffectPlace, C as VideoFfmpegOptions, D as VideoFfmpegExport, E as VideoEdlOptions, F as VideoFadeCurve, G as VideoFit, H as VideoBlendMode, I as VideoAssetKind, J as VideoClipAnimationEffect, K as VideoTransitionType } from '../export-BzSRXyH6.cjs';
|
|
2
|
+
export { L as VIDEO_BLEND_MODES, M as VIDEO_CLIP_ANIMATION_EFFECTS, N as VIDEO_CLIP_TYPES, O as VIDEO_EASE_NAMES, P as VIDEO_EFFECT_PLACES, Q as VIDEO_FADE_CURVES, R as VIDEO_FITS, S as VIDEO_KEYFRAME_LIMITS, T as VIDEO_KEYFRAME_PROPERTIES, U as VIDEO_PLACEMENT_MODES, W as VIDEO_TRANSFORM_PROPERTIES, X as VIDEO_TRANSITION_TYPES, Y as VIDEO_WIPE_DIRECTIONS, Z as VideoAudioSource, _ as VideoClipType, $ as VideoColorClip, a0 as VideoEase, a1 as VideoEffectClip, a2 as VideoEffectJob, a3 as VideoEffectUse, a4 as VideoEffectsEngineOptions, a5 as VideoLayerEffect, a6 as VideoLoudnessMeasurement, a7 as VideoLoudnessTarget, a8 as VideoSequenceClip, a9 as VideoTextClip, aa as VideoWipeDirection, ab as checkVideoEffectPlace, ac as checkVideoEffectValues, ad as ffmpegFilterValue, ae as isVideoKeyframes, af as mixEffectPixels, ag as overEffectPixels, ah as parseVideoLoudnessMeasurement, ai as placeVideoRect, aj as removeVideoKey, ak as retimeVideoAnimatable, al as setVideoKey, am as sortVideoKeys, an as splitVideoAnimatable, ao as toVideoEdl, ap as toVideoFfmpeg, aq as toVideoLoudnessMeasure, ar as videoClipEffectUses, as as videoClipSoundGain, at as videoEaseBezier, au as videoEaseProgress, av as videoEffectFrameTime, aw as videoEffectLayerKey, ax as videoEffectValuesAt, ay as videoFadeCurveGain, az as videoFfmpegUnsupportedEffects, aA as videoFrameAt, aB as videoFrameLeafLayers, aC as videoKeyframeBreakpoints, aD as videoKeyframeFfmpegExpr, aE as videoLayersUseEffects, aF as videoLayersWithoutTransitionEffects, aG as videoProjectEffects, aH as videoShellQuote, aI as videoTextStyle, aJ as videoTitleFrame, aK as videoTransformAt, aL as videoTransitionAudioCurve, aM as videoTransitionEase, aN as videoValueAt } from '../export-BzSRXyH6.cjs';
|
|
3
|
+
import { A as AnimationPlayer, C as Clock } from '../player-CBtEoU2x.cjs';
|
|
4
|
+
import { b as AnimationLoopMode } from '../evaluate-2S3vSPLy.cjs';
|
|
4
5
|
import { H as HistoryManager } from '../HistoryManager-DeQQMBCj.cjs';
|
|
6
|
+
import { v as EffectsSlot, E as EffectProvider, e as EffectDescription, d as EffectValue } from '../helpers-777mC6dc.cjs';
|
|
5
7
|
import { a as AgentToolProvider } from '../registry-BqA1AZt0.cjs';
|
|
8
|
+
import { A as AppliedEffectInfo } from '../tools-DHKGHiSK.cjs';
|
|
6
9
|
import '../easing-lM0Xo9Ni.cjs';
|
|
7
10
|
import '../types-DsiXGmjo.cjs';
|
|
8
11
|
import '../schema-Di0CS6Pe.cjs';
|
|
12
|
+
import '../flair-D7BxyBwL.cjs';
|
|
13
|
+
import '../behavior-Ymbld6jL.cjs';
|
|
14
|
+
import '../types-CznabG7m.cjs';
|
|
15
|
+
import '../gradient-KDfCvhuj.cjs';
|
|
16
|
+
import '../types-CwMPoRMU.cjs';
|
|
9
17
|
|
|
10
18
|
/**
|
|
11
19
|
* Keyframes `{ keys: [{ t, v, ease }] }`: at least one key, in strictly increasing time (clip-relative
|
|
@@ -27,6 +35,16 @@ declare function parseVideoClipAnimation(v: unknown, path: string): VideoClipAni
|
|
|
27
35
|
declare function parseVideoGrade(v: unknown, path: string): VideoGrade | undefined;
|
|
28
36
|
declare function parseVideoGradeLut(v: unknown, path: string): VideoGradeLut | undefined;
|
|
29
37
|
declare function parseVideoTransition(v: unknown, path: string): VideoTransition | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Effect control values: plain values (numbers, strings, switches, number lists) or, when
|
|
40
|
+
* `keyframes` is allowed, keyframes for numbers. Only their shape is checked here; the effect's
|
|
41
|
+
* control schema needs the provider (`resolveEffectValues`).
|
|
42
|
+
*/
|
|
43
|
+
declare function parseVideoEffectValues(v: unknown, path: string, keyframes?: boolean): VideoEffectValues | undefined;
|
|
44
|
+
/** `{ effect, provider, name, values }`. */
|
|
45
|
+
declare function parseVideoEffectRef(v: unknown, path: string, keyframes?: boolean): VideoEffectRef;
|
|
46
|
+
/** A clip's effect stack: unique ids, each `{ id, effect, provider, name, enabled, opacity, values }`. */
|
|
47
|
+
declare function parseVideoClipEffects(v: unknown, path: string): VideoClipEffect[] | undefined;
|
|
30
48
|
declare function parseVideoTranscriptWords(v: unknown, path: string): VideoTranscriptWord[] | undefined;
|
|
31
49
|
declare function parseVideoAsset(v: unknown, path?: string): VideoAsset;
|
|
32
50
|
declare function parseVideoAssetProxies(v: unknown, path: string): VideoAssetProxy[] | undefined;
|
|
@@ -423,139 +441,6 @@ declare const VIDEO_DEFAULT_TITLE_DURATION = 3000;
|
|
|
423
441
|
*/
|
|
424
442
|
declare function applyVideoEdits(project: VideoProject, edits: VideoEdit | readonly VideoEdit[]): VideoEditResult;
|
|
425
443
|
|
|
426
|
-
/** A rectangle in frame pixels. */
|
|
427
|
-
interface VideoRect {
|
|
428
|
-
x: number;
|
|
429
|
-
y: number;
|
|
430
|
-
width: number;
|
|
431
|
-
height: number;
|
|
432
|
-
}
|
|
433
|
-
/** One picture in a frame, in draw order (first is at the back). */
|
|
434
|
-
interface VideoLayer {
|
|
435
|
-
/**
|
|
436
|
-
* The clip it comes from, or `transition:<clip>` for a dip's colour. Inside a compound clip it is
|
|
437
|
-
* the path of clip ids from the project's own track (`compound/inner`), so the same sequence
|
|
438
|
-
* played twice gives distinct layers.
|
|
439
|
-
*/
|
|
440
|
-
clip: string;
|
|
441
|
-
/** The track it is on (inside a compound: the sequence's track). */
|
|
442
|
-
track: string;
|
|
443
|
-
type: VideoClip['type'];
|
|
444
|
-
/** For media: the asset, its kind and `src`, and the moment of the source to show (ms). */
|
|
445
|
-
asset?: string;
|
|
446
|
-
assetKind?: VideoAsset['kind'];
|
|
447
|
-
src?: string;
|
|
448
|
-
/** For media: the moment of the source to show (ms); for a compound: the moment of its sequence. */
|
|
449
|
-
sourceTime?: number;
|
|
450
|
-
/** For a compound: the sequence it plays. */
|
|
451
|
-
sequence?: string;
|
|
452
|
-
/**
|
|
453
|
-
* For a compound: the sequence's frame at `sourceTime`, back to front in the sequence's own frame
|
|
454
|
-
* (the project's size, transparent where nothing covers it). They are drawn together as one
|
|
455
|
-
* picture, which this layer's rect, rotation, opacity, blend, grade, wipe and iris then apply to.
|
|
456
|
-
*/
|
|
457
|
-
layers?: VideoLayer[];
|
|
458
|
-
/** 0–1, after fades and transitions. */
|
|
459
|
-
opacity: number;
|
|
460
|
-
/** Where the fitted picture sits before rotation (its centre is the rotation centre). */
|
|
461
|
-
rect: VideoRect;
|
|
462
|
-
/** Degrees clockwise about the rect's centre. */
|
|
463
|
-
rotation: number;
|
|
464
|
-
/** For a wipe: the part shown is the `progress` (0–1) of the rect from the edge opposite `direction`. */
|
|
465
|
-
wipe?: {
|
|
466
|
-
direction: VideoWipeDirection;
|
|
467
|
-
progress: number;
|
|
468
|
-
};
|
|
469
|
-
/** For an iris: only a circle on the frame's centre shows, its radius `progress` (0–1) of the way to the frame's corners. */
|
|
470
|
-
iris?: {
|
|
471
|
-
progress: number;
|
|
472
|
-
};
|
|
473
|
-
/** For text: what to draw. */
|
|
474
|
-
text?: {
|
|
475
|
-
text: string;
|
|
476
|
-
color: string;
|
|
477
|
-
fontSize: number;
|
|
478
|
-
fontFamily: string;
|
|
479
|
-
fontWeight: number;
|
|
480
|
-
background?: string;
|
|
481
|
-
};
|
|
482
|
-
/** For colour clips and dips. */
|
|
483
|
-
color?: string;
|
|
484
|
-
/** How it mixes with the layers beneath (absent = normal). */
|
|
485
|
-
blend?: VideoBlendMode;
|
|
486
|
-
/** Colour correction (absent = none). */
|
|
487
|
-
grade?: VideoGrade;
|
|
488
|
-
}
|
|
489
|
-
/** One sound playing at a moment. */
|
|
490
|
-
interface VideoAudioSource {
|
|
491
|
-
/** The clip it comes from (inside a compound: the path of clip ids, `compound/inner`). */
|
|
492
|
-
clip: string;
|
|
493
|
-
/** The track it is on (inside a compound: the sequence's track). */
|
|
494
|
-
track: string;
|
|
495
|
-
asset: string;
|
|
496
|
-
src: string;
|
|
497
|
-
/** The moment of the source playing (ms). */
|
|
498
|
-
sourceTime: number;
|
|
499
|
-
/** Gain after clip and track volume, fades and transitions, and those of any compound it plays in (0 = silent). */
|
|
500
|
-
gain: number;
|
|
501
|
-
speed: number;
|
|
502
|
-
}
|
|
503
|
-
interface VideoFrame {
|
|
504
|
-
time: number;
|
|
505
|
-
width: number;
|
|
506
|
-
height: number;
|
|
507
|
-
background: string;
|
|
508
|
-
layers: VideoLayer[];
|
|
509
|
-
audio: VideoAudioSource[];
|
|
510
|
-
}
|
|
511
|
-
/** A transform's values at clip-relative time `clipTime` (ms), keyframes resolved and defaults filled in. */
|
|
512
|
-
declare function videoTransformAt(transform: VideoClip['transform'], clipTime?: number): {
|
|
513
|
-
x: number;
|
|
514
|
-
y: number;
|
|
515
|
-
scale: number;
|
|
516
|
-
rotation: number;
|
|
517
|
-
};
|
|
518
|
-
/** Places a picture of `size` in the frame by `fit`, then the clip's transform at clip-relative `clipTime` (ms). */
|
|
519
|
-
declare function placeVideoRect(frame: {
|
|
520
|
-
width: number;
|
|
521
|
-
height: number;
|
|
522
|
-
}, size: {
|
|
523
|
-
width: number;
|
|
524
|
-
height: number;
|
|
525
|
-
}, fit?: VideoFit, transform?: VideoClip['transform'], clipTime?: number): VideoRect;
|
|
526
|
-
/** A title's text and style with the defaults filled in. */
|
|
527
|
-
declare function videoTextStyle(clip: VideoTextClip): NonNullable<VideoLayer['text']>;
|
|
528
|
-
/**
|
|
529
|
-
* A frame holding only one title, fully opaque on a transparent background, placed as the preview
|
|
530
|
-
* places it: draw it with `drawVideoFrame` and save the canvas as a PNG to give the ffmpeg export
|
|
531
|
-
* titles without `drawtext` (`VideoFfmpegOptions.titleImage`). Fades and opacity are left to the export.
|
|
532
|
-
* A keyframed transform is placed as it is at `clipTime` (the export passes titles with keyframed
|
|
533
|
-
* transforms without them, and moves the image itself).
|
|
534
|
-
*/
|
|
535
|
-
declare function videoTitleFrame(project: VideoProject, clip: VideoTextClip, clipTime?: number): VideoFrame;
|
|
536
|
-
/** How far a push or slide has moved at `progress` (0–1): eased in and out, (1 − cos πp) / 2. */
|
|
537
|
-
declare const videoTransitionEase: (progress: number) => number;
|
|
538
|
-
/** Gain of a fade shape `x` of the way up (0–1); a fade out uses the time left, so it mirrors the fade in. */
|
|
539
|
-
declare function videoFadeCurveGain(curve: VideoFadeCurve | undefined, x: number): number;
|
|
540
|
-
/**
|
|
541
|
-
* A media or compound clip's own gain at clip time `clipTime` (ms): its volume (or volume keyframes) times its
|
|
542
|
-
* shaped fades. Leaves out track volume and transitions, which depend on the timeline around it.
|
|
543
|
-
*/
|
|
544
|
-
declare function videoClipSoundGain(clip: VideoClip, clipTime: number): number;
|
|
545
|
-
/**
|
|
546
|
-
* What plays at `time` (ms): the pictures to draw, back to front, with their placement, opacity
|
|
547
|
-
* and the moment of source each shows, and the sounds with their gain. A pure function of the
|
|
548
|
-
* project and the time, so previews, exporters and agents all agree on every frame. A compound
|
|
549
|
-
* clip is one layer holding its sequence's frame (`layers`), and its sounds are mixed in with the
|
|
550
|
-
* compound's volume, fades and transitions.
|
|
551
|
-
*/
|
|
552
|
-
declare function videoFrameAt(project: VideoProject, time: number): VideoFrame;
|
|
553
|
-
/**
|
|
554
|
-
* Every layer of a frame that draws a picture of its own, compounds opened up (each compound's
|
|
555
|
-
* layers in place of it), back to front. Hosts use it to find the media a frame needs.
|
|
556
|
-
*/
|
|
557
|
-
declare function videoFrameLeafLayers(layers: readonly VideoLayer[]): VideoLayer[];
|
|
558
|
-
|
|
559
444
|
/**
|
|
560
445
|
* Sound levels of a piece of audio, small enough to keep for every asset: a pyramid of min / max
|
|
561
446
|
* sample values. Level 0 holds one min / max pair per `blockSize` samples; each level above merges
|
|
@@ -1252,6 +1137,8 @@ interface VideoSvgOptions {
|
|
|
1252
1137
|
}
|
|
1253
1138
|
/**
|
|
1254
1139
|
* A frame as standalone SVG: images and posters as `<image>`, video without one as a labelled box.
|
|
1140
|
+
* Provider effects cannot be drawn in SVG: clips show without their effects, effect clips as a
|
|
1141
|
+
* labelled box and effect transitions as crossfades.
|
|
1255
1142
|
* A compound clip is a `<g>` (isolated, so blends inside it mix only with its own layers) holding
|
|
1256
1143
|
* its sequence's layers scaled into its rect, with its opacity, blend, grade filter and clips on it.
|
|
1257
1144
|
*/
|
|
@@ -1296,6 +1183,16 @@ interface VideoDrawOptions {
|
|
|
1296
1183
|
* and a compound's layers are drawn straight onto the frame, without its opacity, blend and grade.
|
|
1297
1184
|
*/
|
|
1298
1185
|
scratch?: (width: number, height: number, slot: number) => VideoScratchCanvas | null;
|
|
1186
|
+
/**
|
|
1187
|
+
* Provider effects (clip effects, effect clips, effect transitions) come from this engine's
|
|
1188
|
+
* cache. A picture not rendered yet is requested and the layer drawn without its effects
|
|
1189
|
+
* meanwhile (`onEffectWaiting` is called); without an engine or a provider, clips draw without
|
|
1190
|
+
* their effects, effect clips as placeholders and effect transitions as crossfades. Needs
|
|
1191
|
+
* `scratch` to read the pictures effects start from.
|
|
1192
|
+
*/
|
|
1193
|
+
effects?: VideoEffectsEngine | null;
|
|
1194
|
+
/** Called when the frame waits for an effect picture still rendering. */
|
|
1195
|
+
onEffectWaiting?: () => void;
|
|
1299
1196
|
}
|
|
1300
1197
|
/**
|
|
1301
1198
|
* Draws a frame on a 2D canvas scaled by `scale` (canvas pixels per frame pixel). `sourceFor`
|
|
@@ -1308,6 +1205,27 @@ interface VideoDrawOptions {
|
|
|
1308
1205
|
* drawn on a scratch canvas of their own (transparent), which is then drawn like a picture.
|
|
1309
1206
|
*/
|
|
1310
1207
|
declare function drawVideoFrame(ctx: VideoCanvasContext, frame: VideoFrame, sourceFor: (layer: VideoLayer) => CanvasImageSource | null, scale?: number, options?: VideoDrawOptions): void;
|
|
1208
|
+
interface VideoExactFrameOptions extends VideoDrawOptions {
|
|
1209
|
+
/** Canvas pixels per frame pixel (default 1). */
|
|
1210
|
+
scale?: number;
|
|
1211
|
+
/** Most draws before giving up on effects still rendering (default 8; nested effects take one each). */
|
|
1212
|
+
maxPasses?: number;
|
|
1213
|
+
}
|
|
1214
|
+
interface VideoExactFrame {
|
|
1215
|
+
/** The frame drawn (at the start of the frame `time` falls in). */
|
|
1216
|
+
frame: VideoFrame;
|
|
1217
|
+
/** False when a media picture was missing or an effect never arrived. */
|
|
1218
|
+
complete: boolean;
|
|
1219
|
+
/** Effect renders that failed for this frame (their layers were drawn without them). */
|
|
1220
|
+
failures: Error[];
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* Draws the frame `time` falls in with every provider effect rendered: frame-exact, the same
|
|
1224
|
+
* drawing as the preview, for exports and agents. `sourceFor` must return ready pictures (decode
|
|
1225
|
+
* the media first: `videoFrameRequestsAt` lists what a frame needs). Draws, waits for the effect
|
|
1226
|
+
* pictures it asked for, and draws again until none is missing.
|
|
1227
|
+
*/
|
|
1228
|
+
declare function renderVideoFrameExact(ctx: VideoCanvasContext, project: VideoProject, time: number, sourceFor: (layer: VideoLayer) => CanvasImageSource | null, options?: VideoExactFrameOptions): Promise<VideoExactFrame>;
|
|
1311
1229
|
|
|
1312
1230
|
/**
|
|
1313
1231
|
* How large a picture the preview plays: `full` (the original), a fraction (0.5 = half size, using
|
|
@@ -1553,6 +1471,8 @@ interface VideoPreviewSource {
|
|
|
1553
1471
|
luts?: VideoLutCache;
|
|
1554
1472
|
/** Decoded source frames with prefetch (a controller has one when the host gives it). */
|
|
1555
1473
|
frameCache?: VideoFrameCache | null;
|
|
1474
|
+
/** Provider effect pictures (a controller has one; it draws nothing until a provider is set). */
|
|
1475
|
+
effectsEngine?: VideoEffectsEngine | null;
|
|
1556
1476
|
}
|
|
1557
1477
|
/** The parts of a media element the preview drives (so tests can pass fakes). */
|
|
1558
1478
|
interface VideoPreviewMedia {
|
|
@@ -1615,6 +1535,8 @@ interface VideoPreviewOptions {
|
|
|
1615
1535
|
* run on the CPU, so a lower `resolution` keeps playback smooth.
|
|
1616
1536
|
*/
|
|
1617
1537
|
createScratch?: (width: number, height: number, slot: number) => VideoScratchCanvas | null;
|
|
1538
|
+
/** Where provider effect pictures come from (default: the source's `effectsEngine`; `null` draws none). */
|
|
1539
|
+
effects?: VideoEffectsEngine | null;
|
|
1618
1540
|
}
|
|
1619
1541
|
/**
|
|
1620
1542
|
* Plays a project in the browser: keeps one `<video>` or `<audio>` element per playing clip in step
|
|
@@ -1646,6 +1568,8 @@ declare class VideoPreviewEngine {
|
|
|
1646
1568
|
private fps;
|
|
1647
1569
|
private readonly unsubscribeLuts;
|
|
1648
1570
|
private readonly scratchCanvases;
|
|
1571
|
+
private readonly effects;
|
|
1572
|
+
private readonly unsubscribeEffects;
|
|
1649
1573
|
constructor(source: VideoPreviewSource, canvas: {
|
|
1650
1574
|
width: number;
|
|
1651
1575
|
height: number;
|
|
@@ -1660,6 +1584,8 @@ declare class VideoPreviewEngine {
|
|
|
1660
1584
|
private release;
|
|
1661
1585
|
/** Brings the media elements in step with the editor and draws the frame. */
|
|
1662
1586
|
update(): void;
|
|
1587
|
+
/** With effects, the frame is drawn at the start of its frame, so effect pictures are cached once per frame. */
|
|
1588
|
+
private drawable;
|
|
1663
1589
|
private redraw;
|
|
1664
1590
|
private sourceFor;
|
|
1665
1591
|
/** Canvas pixels per frame pixel: the option, else the displayed width at the device pixel ratio (at most 1). */
|
|
@@ -1697,7 +1623,22 @@ interface VideoEditorOptions {
|
|
|
1697
1623
|
* stepping then show cached frames at once. Host-side and optional (default none).
|
|
1698
1624
|
*/
|
|
1699
1625
|
frameCache?: VideoFrameCache;
|
|
1626
|
+
/**
|
|
1627
|
+
* An effects provider (see `@pixerate/editor/effects`) for clip effects, effect transitions and
|
|
1628
|
+
* effect clips. Optional: without one the editor behaves as before, and projects that use
|
|
1629
|
+
* effects keep them, drawn as placeholders. Set or change it later with `setEffectsProvider`.
|
|
1630
|
+
*/
|
|
1631
|
+
effects?: EffectProvider | null;
|
|
1700
1632
|
}
|
|
1633
|
+
/** What `applyClipEffect` and the other effect edits return: the edit result plus what they made or changed. */
|
|
1634
|
+
type VideoEffectEditResult = (VideoEditResult & {
|
|
1635
|
+
ok: true;
|
|
1636
|
+
clip: string;
|
|
1637
|
+
effect?: VideoClipEffect;
|
|
1638
|
+
}) | {
|
|
1639
|
+
ok: false;
|
|
1640
|
+
error: string;
|
|
1641
|
+
};
|
|
1701
1642
|
/** A snapshot of the editor. The same object is returned until something changes. */
|
|
1702
1643
|
interface VideoEditorState {
|
|
1703
1644
|
project: VideoProject;
|
|
@@ -1722,6 +1663,8 @@ interface VideoEditorState {
|
|
|
1722
1663
|
redoLabel: string;
|
|
1723
1664
|
/** How large a picture the preview plays: `auto`, `full` or a fraction that picks a proxy. */
|
|
1724
1665
|
previewScale: VideoPreviewScale;
|
|
1666
|
+
/** The registered effects provider, or `null` (effects are then drawn as placeholders and cannot be added). */
|
|
1667
|
+
effectsProvider: EffectProvider | null;
|
|
1725
1668
|
/** Bumped on every change. */
|
|
1726
1669
|
revision: number;
|
|
1727
1670
|
}
|
|
@@ -1744,6 +1687,10 @@ declare class VideoEditorController {
|
|
|
1744
1687
|
readonly luts: VideoLutCache;
|
|
1745
1688
|
/** The host's frame cache, if it gave one (the preview fills and reads it). */
|
|
1746
1689
|
readonly frameCache: VideoFrameCache | null;
|
|
1690
|
+
/** The effects provider slot (see `setEffectsProvider`). */
|
|
1691
|
+
readonly effects: EffectsSlot;
|
|
1692
|
+
/** Rendered effect pictures for the preview and frame-exact exports. */
|
|
1693
|
+
readonly effectsEngine: VideoEffectsEngine;
|
|
1747
1694
|
private project;
|
|
1748
1695
|
private issues;
|
|
1749
1696
|
private selection;
|
|
@@ -1773,10 +1720,12 @@ declare class VideoEditorController {
|
|
|
1773
1720
|
readOnlyReason(): string | null;
|
|
1774
1721
|
/**
|
|
1775
1722
|
* Applies edits as one undo step, all or nothing (see `applyVideoEdits`). With `dryRun` it
|
|
1776
|
-
* reports what would happen and changes nothing.
|
|
1723
|
+
* reports what would happen and changes nothing. Edits with the same `merge` key in a row
|
|
1724
|
+
* (a slider drag) fold into one undo step.
|
|
1777
1725
|
*/
|
|
1778
1726
|
apply(edits: VideoEdit | readonly VideoEdit[], label?: string, options?: {
|
|
1779
1727
|
dryRun?: boolean;
|
|
1728
|
+
merge?: string;
|
|
1780
1729
|
}): VideoEditResult;
|
|
1781
1730
|
/** Opens a project (JSON or object). `clearHistory` drops the undo stack (opening a file); otherwise it is one undo step. */
|
|
1782
1731
|
load(project: VideoProject | string, options?: {
|
|
@@ -1821,6 +1770,77 @@ declare class VideoEditorController {
|
|
|
1821
1770
|
deleteSelection(options?: {
|
|
1822
1771
|
ripple?: boolean;
|
|
1823
1772
|
}): VideoEditResult;
|
|
1773
|
+
/** The registered effects provider, or `null`. */
|
|
1774
|
+
get effectsProvider(): EffectProvider | null;
|
|
1775
|
+
/** Registers (or with `null` removes) the effects provider. Not an edit: no undo step. */
|
|
1776
|
+
setEffectsProvider(provider: EffectProvider | null): void;
|
|
1777
|
+
/** Registers `provider` and returns a function that removes it again (if it is still the one set). */
|
|
1778
|
+
useEffects(provider: EffectProvider): () => void;
|
|
1779
|
+
/** The provider's description of an effect, checked for `place` (rejects without a provider or for an unknown id). */
|
|
1780
|
+
describeEffect(effect: string, place?: VideoEffectPlace): Promise<EffectDescription>;
|
|
1781
|
+
private refused;
|
|
1782
|
+
private effectEdit;
|
|
1783
|
+
private clipOrThrow;
|
|
1784
|
+
/**
|
|
1785
|
+
* Adds a filter or overlay effect to a clip's effect stack (at `index`, default the end: applied
|
|
1786
|
+
* last), with `values` over the effect's defaults (numbers may be keyframes). One undo step.
|
|
1787
|
+
* Returns the effect with its new id.
|
|
1788
|
+
*/
|
|
1789
|
+
applyClipEffect(clip: string, effect: string, options?: {
|
|
1790
|
+
values?: VideoEffectValues;
|
|
1791
|
+
index?: number;
|
|
1792
|
+
enabled?: boolean;
|
|
1793
|
+
opacity?: VideoAnimatable;
|
|
1794
|
+
}): Promise<VideoEffectEditResult>;
|
|
1795
|
+
/**
|
|
1796
|
+
* Changes an effect on a clip: `values` (merged over its current ones; numbers may be
|
|
1797
|
+
* keyframes, `null` resets a control to its default), `enabled`, `opacity` or its place in the
|
|
1798
|
+
* stack (`index`). Values are checked against the provider's controls. One undo step.
|
|
1799
|
+
*/
|
|
1800
|
+
updateClipEffect(clip: string, instance: string, changes: {
|
|
1801
|
+
values?: Record<string, EffectValue | {
|
|
1802
|
+
keys: VideoKey[];
|
|
1803
|
+
} | null>;
|
|
1804
|
+
enabled?: boolean;
|
|
1805
|
+
opacity?: VideoAnimatable;
|
|
1806
|
+
index?: number;
|
|
1807
|
+
}, options?: {
|
|
1808
|
+
merge?: string;
|
|
1809
|
+
}): Promise<VideoEffectEditResult>;
|
|
1810
|
+
/** Removes an effect from a clip's stack (works without a provider, so placeholders can be cleared). One undo step. */
|
|
1811
|
+
removeClipEffect(clip: string, instance: string): VideoEffectEditResult;
|
|
1812
|
+
/**
|
|
1813
|
+
* Sets a provider transition into `clip` from the clip that ends where it starts (centred on the
|
|
1814
|
+
* cut, `duration` ms, default the effect's own length or 1000). One undo step.
|
|
1815
|
+
*/
|
|
1816
|
+
setEffectTransition(clip: string, effect: string, options?: {
|
|
1817
|
+
duration?: number;
|
|
1818
|
+
values?: Record<string, EffectValue>;
|
|
1819
|
+
}): Promise<VideoEffectEditResult>;
|
|
1820
|
+
/**
|
|
1821
|
+
* Adds an effect clip: a generator, title or overlay effect drawn over the whole frame for
|
|
1822
|
+
* `duration` ms (default the effect's own length, else 5 s) at `start` (default the end of the
|
|
1823
|
+
* track). One undo step. Returns the new clip's id.
|
|
1824
|
+
*/
|
|
1825
|
+
addEffectClip(track: string, effect: string, options?: {
|
|
1826
|
+
start?: number;
|
|
1827
|
+
duration?: number;
|
|
1828
|
+
values?: VideoEffectValues;
|
|
1829
|
+
name?: string;
|
|
1830
|
+
mode?: VideoPlacementMode;
|
|
1831
|
+
ripple?: boolean;
|
|
1832
|
+
id?: string;
|
|
1833
|
+
}): Promise<VideoEffectEditResult>;
|
|
1834
|
+
/**
|
|
1835
|
+
* Changes the values of an effect clip's picture (`target` its id) or of the effect transition
|
|
1836
|
+
* into a clip, merged over the current ones and checked against the provider's controls.
|
|
1837
|
+
* Transition values cannot be keyframed. One undo step.
|
|
1838
|
+
*/
|
|
1839
|
+
updateEffectValues(clip: string, part: 'generator' | 'transition', values: VideoEffectValues, options?: {
|
|
1840
|
+
merge?: string;
|
|
1841
|
+
}): Promise<VideoEffectEditResult>;
|
|
1842
|
+
/** Keys for one numeric control of a clip effect (clip-relative ms), or `null` to stop animating it (keeping its value at the clip's start). */
|
|
1843
|
+
setClipEffectKeyframes(clip: string, instance: string, control: string, keys: VideoKey[] | null): Promise<VideoEffectEditResult>;
|
|
1824
1844
|
/** What plays at `time` (default: the playhead). */
|
|
1825
1845
|
frame(time?: number): VideoFrame;
|
|
1826
1846
|
/** The frame at `time` (default: the playhead) as SVG. */
|
|
@@ -1892,6 +1912,7 @@ declare function describeVideoSequence(project: VideoProject, sequence: VideoSeq
|
|
|
1892
1912
|
fadeIn?: number;
|
|
1893
1913
|
fadeOut?: number;
|
|
1894
1914
|
transition?: VideoTransition;
|
|
1915
|
+
effects?: VideoClipEffect[];
|
|
1895
1916
|
} | {
|
|
1896
1917
|
source?: {
|
|
1897
1918
|
in: number;
|
|
@@ -1919,6 +1940,7 @@ declare function describeVideoSequence(project: VideoProject, sequence: VideoSeq
|
|
|
1919
1940
|
fadeIn?: number;
|
|
1920
1941
|
fadeOut?: number;
|
|
1921
1942
|
transition?: VideoTransition;
|
|
1943
|
+
effects?: VideoClipEffect[];
|
|
1922
1944
|
} | {
|
|
1923
1945
|
source?: {
|
|
1924
1946
|
in: number;
|
|
@@ -1941,6 +1963,7 @@ declare function describeVideoSequence(project: VideoProject, sequence: VideoSeq
|
|
|
1941
1963
|
fadeIn?: number;
|
|
1942
1964
|
fadeOut?: number;
|
|
1943
1965
|
transition?: VideoTransition;
|
|
1966
|
+
effects?: VideoClipEffect[];
|
|
1944
1967
|
} | {
|
|
1945
1968
|
source?: {
|
|
1946
1969
|
in: number;
|
|
@@ -1968,6 +1991,32 @@ declare function describeVideoSequence(project: VideoProject, sequence: VideoSeq
|
|
|
1968
1991
|
fadeIn?: number;
|
|
1969
1992
|
fadeOut?: number;
|
|
1970
1993
|
transition?: VideoTransition;
|
|
1994
|
+
effects?: VideoClipEffect[];
|
|
1995
|
+
} | {
|
|
1996
|
+
source?: {
|
|
1997
|
+
in: number;
|
|
1998
|
+
out: number;
|
|
1999
|
+
} | null | undefined;
|
|
2000
|
+
end: number;
|
|
2001
|
+
type: "effect";
|
|
2002
|
+
id: string;
|
|
2003
|
+
name?: string;
|
|
2004
|
+
start: number;
|
|
2005
|
+
duration: number;
|
|
2006
|
+
opacity?: VideoAnimatable;
|
|
2007
|
+
transform?: VideoTransform;
|
|
2008
|
+
fit?: VideoFit;
|
|
2009
|
+
blend?: VideoBlendMode;
|
|
2010
|
+
grade?: VideoGrade;
|
|
2011
|
+
animateIn?: VideoClipAnimation;
|
|
2012
|
+
animateOut?: VideoClipAnimation;
|
|
2013
|
+
fadeIn?: number;
|
|
2014
|
+
fadeOut?: number;
|
|
2015
|
+
transition?: VideoTransition;
|
|
2016
|
+
effects?: VideoClipEffect[];
|
|
2017
|
+
effect: string;
|
|
2018
|
+
provider?: string;
|
|
2019
|
+
values?: VideoEffectValues;
|
|
1971
2020
|
})[];
|
|
1972
2021
|
volume?: number | undefined;
|
|
1973
2022
|
syncLocked?: boolean | undefined;
|
|
@@ -2050,6 +2099,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
2050
2099
|
fadeIn?: number;
|
|
2051
2100
|
fadeOut?: number;
|
|
2052
2101
|
transition?: VideoTransition;
|
|
2102
|
+
effects?: VideoClipEffect[];
|
|
2053
2103
|
} | {
|
|
2054
2104
|
source?: {
|
|
2055
2105
|
in: number;
|
|
@@ -2077,6 +2127,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
2077
2127
|
fadeIn?: number;
|
|
2078
2128
|
fadeOut?: number;
|
|
2079
2129
|
transition?: VideoTransition;
|
|
2130
|
+
effects?: VideoClipEffect[];
|
|
2080
2131
|
} | {
|
|
2081
2132
|
source?: {
|
|
2082
2133
|
in: number;
|
|
@@ -2099,6 +2150,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
2099
2150
|
fadeIn?: number;
|
|
2100
2151
|
fadeOut?: number;
|
|
2101
2152
|
transition?: VideoTransition;
|
|
2153
|
+
effects?: VideoClipEffect[];
|
|
2102
2154
|
} | {
|
|
2103
2155
|
source?: {
|
|
2104
2156
|
in: number;
|
|
@@ -2126,6 +2178,32 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
2126
2178
|
fadeIn?: number;
|
|
2127
2179
|
fadeOut?: number;
|
|
2128
2180
|
transition?: VideoTransition;
|
|
2181
|
+
effects?: VideoClipEffect[];
|
|
2182
|
+
} | {
|
|
2183
|
+
source?: {
|
|
2184
|
+
in: number;
|
|
2185
|
+
out: number;
|
|
2186
|
+
} | null | undefined;
|
|
2187
|
+
end: number;
|
|
2188
|
+
type: "effect";
|
|
2189
|
+
id: string;
|
|
2190
|
+
name?: string;
|
|
2191
|
+
start: number;
|
|
2192
|
+
duration: number;
|
|
2193
|
+
opacity?: VideoAnimatable;
|
|
2194
|
+
transform?: VideoTransform;
|
|
2195
|
+
fit?: VideoFit;
|
|
2196
|
+
blend?: VideoBlendMode;
|
|
2197
|
+
grade?: VideoGrade;
|
|
2198
|
+
animateIn?: VideoClipAnimation;
|
|
2199
|
+
animateOut?: VideoClipAnimation;
|
|
2200
|
+
fadeIn?: number;
|
|
2201
|
+
fadeOut?: number;
|
|
2202
|
+
transition?: VideoTransition;
|
|
2203
|
+
effects?: VideoClipEffect[];
|
|
2204
|
+
effect: string;
|
|
2205
|
+
provider?: string;
|
|
2206
|
+
values?: VideoEffectValues;
|
|
2129
2207
|
})[];
|
|
2130
2208
|
volume?: number | undefined;
|
|
2131
2209
|
syncLocked?: boolean | undefined;
|
|
@@ -2228,6 +2306,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
2228
2306
|
fadeIn?: number;
|
|
2229
2307
|
fadeOut?: number;
|
|
2230
2308
|
transition?: VideoTransition;
|
|
2309
|
+
effects?: VideoClipEffect[];
|
|
2231
2310
|
} | {
|
|
2232
2311
|
source?: {
|
|
2233
2312
|
in: number;
|
|
@@ -2255,6 +2334,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
2255
2334
|
fadeIn?: number;
|
|
2256
2335
|
fadeOut?: number;
|
|
2257
2336
|
transition?: VideoTransition;
|
|
2337
|
+
effects?: VideoClipEffect[];
|
|
2258
2338
|
} | {
|
|
2259
2339
|
source?: {
|
|
2260
2340
|
in: number;
|
|
@@ -2277,6 +2357,7 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
2277
2357
|
fadeIn?: number;
|
|
2278
2358
|
fadeOut?: number;
|
|
2279
2359
|
transition?: VideoTransition;
|
|
2360
|
+
effects?: VideoClipEffect[];
|
|
2280
2361
|
} | {
|
|
2281
2362
|
source?: {
|
|
2282
2363
|
in: number;
|
|
@@ -2304,6 +2385,32 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
2304
2385
|
fadeIn?: number;
|
|
2305
2386
|
fadeOut?: number;
|
|
2306
2387
|
transition?: VideoTransition;
|
|
2388
|
+
effects?: VideoClipEffect[];
|
|
2389
|
+
} | {
|
|
2390
|
+
source?: {
|
|
2391
|
+
in: number;
|
|
2392
|
+
out: number;
|
|
2393
|
+
} | null | undefined;
|
|
2394
|
+
end: number;
|
|
2395
|
+
type: "effect";
|
|
2396
|
+
id: string;
|
|
2397
|
+
name?: string;
|
|
2398
|
+
start: number;
|
|
2399
|
+
duration: number;
|
|
2400
|
+
opacity?: VideoAnimatable;
|
|
2401
|
+
transform?: VideoTransform;
|
|
2402
|
+
fit?: VideoFit;
|
|
2403
|
+
blend?: VideoBlendMode;
|
|
2404
|
+
grade?: VideoGrade;
|
|
2405
|
+
animateIn?: VideoClipAnimation;
|
|
2406
|
+
animateOut?: VideoClipAnimation;
|
|
2407
|
+
fadeIn?: number;
|
|
2408
|
+
fadeOut?: number;
|
|
2409
|
+
transition?: VideoTransition;
|
|
2410
|
+
effects?: VideoClipEffect[];
|
|
2411
|
+
effect: string;
|
|
2412
|
+
provider?: string;
|
|
2413
|
+
values?: VideoEffectValues;
|
|
2307
2414
|
})[];
|
|
2308
2415
|
volume?: number | undefined;
|
|
2309
2416
|
syncLocked?: boolean | undefined;
|
|
@@ -2333,6 +2440,26 @@ declare function describeVideoProject(project: VideoProject): {
|
|
|
2333
2440
|
*/
|
|
2334
2441
|
declare function createVideoEditorToolProvider(controller: VideoEditorController, options?: VideoEditorToolProviderOptions): AgentToolProvider;
|
|
2335
2442
|
|
|
2443
|
+
/**
|
|
2444
|
+
* Agent tools for provider effects in the video editor: the shared effect tools
|
|
2445
|
+
* (`search_effects`, `describe_effect`, `list_applied_effects`, `apply_effect`, `update_effect`,
|
|
2446
|
+
* `remove_effect`) on clips, plus `add_video_effect_clip`, `set_video_effect_transition` and
|
|
2447
|
+
* `set_video_effect_keyframes`.
|
|
2448
|
+
*/
|
|
2449
|
+
|
|
2450
|
+
interface VideoEffectsToolProviderOptions {
|
|
2451
|
+
/** Provider id (unique per registry). Default `video-effects`. */
|
|
2452
|
+
id?: string;
|
|
2453
|
+
/** Always prefix tool names with `<namespace>__`. */
|
|
2454
|
+
namespace?: string;
|
|
2455
|
+
/** The project cannot be edited: write tools are hidden. A string is the reason. */
|
|
2456
|
+
readOnly?: boolean | string | (() => boolean | string);
|
|
2457
|
+
}
|
|
2458
|
+
/** A clip's effects as the tools report them: its effect clip picture, its effect transition, then its stack. */
|
|
2459
|
+
declare function videoClipAppliedEffects(clip: VideoClip): AppliedEffectInfo[];
|
|
2460
|
+
/** The effect tools for a video editor (see the module comment). */
|
|
2461
|
+
declare function createVideoEffectsToolProvider(controller: VideoEditorController, options?: VideoEffectsToolProviderOptions): AgentToolProvider;
|
|
2462
|
+
|
|
2336
2463
|
interface VideoRulerTick {
|
|
2337
2464
|
time: number;
|
|
2338
2465
|
/** Pixels from the timeline's left edge. */
|
|
@@ -2458,4 +2585,4 @@ declare function videoKeyframeToggleEdit(project: VideoProject, clipId: string,
|
|
|
2458
2585
|
*/
|
|
2459
2586
|
declare function videoLutEdits(project: VideoProject, clips: readonly string[], lut: VideoGradeLut | null): VideoEdit[];
|
|
2460
2587
|
|
|
2461
|
-
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_BLEND_MODE_LABELS, VIDEO_CLIP_ANIMATION_DURATION, VIDEO_CLIP_ANIMATION_LABELS, VIDEO_DEFAULT_FILLERS, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EDIT_OPS, VIDEO_FADE_CURVE_LABELS, VIDEO_GRADE_CONTROLS, VIDEO_GRADE_PRESETS, VIDEO_GRADE_PRESET_NAMES, VIDEO_ISSUE_CODES, VIDEO_LUT_MAX_SIZE, VIDEO_PEAK_BLOCK, VIDEO_PREVIEW_SCALE_OPTIONS, VIDEO_PROXY_SCALES, VIDEO_SCOPE_KINDS, VIDEO_TIME_EPSILON, VIDEO_TRANSITION_LABELS, VIDEO_VECTORSCOPE_TARGETS, VideoAnimatable, VideoAsset, VideoAssetKind, VideoAssetProxy, type VideoAudioLevel, type VideoAudioPeaks, VideoAudioPeaksCache, type VideoAudioPeaksLoader,
|
|
2588
|
+
export { type CreateVideoProjectOptions, type NewVideoClip, VIDEO_BLEND_MODE_LABELS, VIDEO_CLIP_ANIMATION_DURATION, VIDEO_CLIP_ANIMATION_LABELS, VIDEO_DEFAULT_FILLERS, VIDEO_DEFAULT_STILL_DURATION, VIDEO_DEFAULT_TITLE_DURATION, VIDEO_EDIT_OPS, VIDEO_FADE_CURVE_LABELS, VIDEO_GRADE_CONTROLS, VIDEO_GRADE_PRESETS, VIDEO_GRADE_PRESET_NAMES, VIDEO_ISSUE_CODES, VIDEO_LUT_MAX_SIZE, VIDEO_PEAK_BLOCK, VIDEO_PREVIEW_SCALE_OPTIONS, VIDEO_PROXY_SCALES, VIDEO_SCOPE_KINDS, VIDEO_TIME_EPSILON, VIDEO_TRANSITION_LABELS, VIDEO_VECTORSCOPE_TARGETS, VideoAnimatable, VideoAsset, VideoAssetKind, VideoAssetProxy, type VideoAudioLevel, type VideoAudioPeaks, VideoAudioPeaksCache, type VideoAudioPeaksLoader, VideoBlendMode, type VideoCacheEntryInfo, type VideoCanvasContext, VideoClip, VideoClipAnimation, VideoClipAnimationEffect, type VideoClipDragInput, type VideoClipDragMode, type VideoClipDragPlan, VideoClipEffect, type VideoClipLocation, type VideoDecodedFrame, type VideoDrawOptions, type VideoEdit, type VideoEditOp, type VideoEditOutcome, type VideoEditResult, VideoEditorController, type VideoEditorOptions, type VideoEditorState, type VideoEditorToolProviderOptions, VideoEdlOptions, type VideoEffectEditResult, VideoEffectPlace, VideoEffectRef, VideoEffectValues, VideoEffectsEngine, type VideoEffectsToolProviderOptions, type VideoExactFrame, type VideoExactFrameOptions, type VideoExposureOptions, type VideoExposureStats, VideoFadeCurve, VideoFfmpegExport, VideoFfmpegOptions, VideoFit, VideoFrame, VideoFrameCache, type VideoFrameCacheOptions, type VideoFrameCacheStats, type VideoFrameDecoder, type VideoFrameRequest, type VideoGap, VideoGrade, type VideoGradeControl, VideoGradeLut, type VideoGradePreset, type VideoGradeSetting, type VideoGradeStep, type VideoHistogram, type VideoIssue, type VideoIssueCode, type VideoIssueSeverity, VideoKey, VideoKeyframeProperty, type VideoKeyframeRow, VideoKeyframes, VideoLayer, type VideoLut, VideoLutCache, type VideoLutLoader, type VideoLutSvgApproximation, VideoMarker, VideoMediaClip, type VideoMediaProbe, type VideoPauseOptions, type VideoPixels, VideoPlacementMode, VideoPreviewEngine, type VideoPreviewImage, type VideoPreviewMedia, type VideoPreviewOptions, VideoPreviewPixels, type VideoPreviewScale, type VideoPreviewSnapshot, type VideoPreviewSource, VideoProject, type VideoProxyCommand, type VideoProxyOptions, VideoRect, type VideoRulerTick, type VideoScopeImage, type VideoScopeKind, type VideoScopeOptions, type VideoScopeSummary, type VideoScopesPanelReading, type VideoScratchCanvas, VideoSequence, type VideoSilenceOptions, type VideoSnapOptions, type VideoSpeedSegment, type VideoSvgOptions, type VideoTimelineWord, VideoTrack, VideoTrackKind, type VideoTranscriptRange, VideoTranscriptWord, VideoTransform, VideoTransition, VideoTransitionType, type VideoVectorscope, type VideoWaveform, type VideoWaveformMode, allVideoClipIds, allVideoTracks, applyVideoEdits, applyVideoGrade, applyVideoLut, applyVideoLutToPixels, buildVideoAudioPeaks, checkVideoProject, checkVideoTimeRemap, createVideoEditorToolProvider, createVideoEffectsToolProvider, createVideoElementDecoder, createVideoProject, decodeVideoAudioPeaks, describeVideoProject, describeVideoSequence, drawVideoFrame, findVideoAudioSilences, findVideoClip, findVideoFillers, findVideoGaps, findVideoSequenceClip, findVideoSequenceCycle, findVideoTranscriptPauses, findVideoTranscriptText, formatVideoSeconds, formatVideoTimecode, formatVideoTimecodeFrames, isVideoDropFrameRate, mergeVideoRanges, nextFreeVideoSlot, normalizeVideoGrade, normalizeVideoGradeLut, normalizeVideoWord, parseVideoAnimatable, parseVideoAsset, parseVideoAssetProxies, parseVideoClip, parseVideoClipAnimation, parseVideoClipEffects, parseVideoCubeLut, parseVideoEffectRef, parseVideoEffectValues, parseVideoGrade, parseVideoGradeLut, parseVideoKeyframes, parseVideoMarker, parseVideoPreviewScale, parseVideoProject, parseVideoSequence, parseVideoTimeRemap, parseVideoTrack, parseVideoTranscript, parseVideoTranscriptWords, parseVideoTransform, parseVideoTransition, planVideoClipDrag, planVideoPrefetch, probeVideoMedia, readVideoScopesPanel, renderVideoFrameExact, resolveVideoPreviewScale, snapToVideoFrame, snapVideoTime, sortedVideoClips, summarizeVideoScopes, videoAssetDropEdit, videoAssetHasSound, videoAssetKindOf, videoAssetMap, videoAssetProxy, videoAudioLevels, videoAudioPeakRange, videoAudioPeakSpans, videoAudioPeaksDuration, videoCacheEvictions, videoChroma, videoClipAfter, videoClipAnimated, videoClipAnimationProperties, videoClipAnimationSpans, videoClipAppliedEffects, videoClipBefore, videoClipEnd, videoClipHandles, videoClipKeyframes, videoClipLabel, videoClipOverhang, videoClipShowsWaveform, videoClipSourceRange, videoClipSourceTime, videoClipSpeed, videoClipSpeedAt, videoClipTint, videoClipWaveform, videoClipWaveformPath, videoClipsAt, videoContactSheetSvg, videoDragLabel, videoDropTracks, videoExposureNotes, videoExposureStats, videoFrameCacheKey, videoFrameDuration, videoFrameRequestsAt, videoFrameToSvg, videoFrames, videoFreezeFrameEdit, videoGradeCssFilter, videoGradeFfmpegFilters, videoGradeGainsFilterId, videoGradeLook, videoGradePreset, videoGradeStepMatrix, videoGradeStepSvgValues, videoGradeSteps, videoGradeSvgDefs, videoGradeSvgFilter, videoHistogram, videoHistogramImage, videoHourFrames, videoIrisRadius, videoIssueKey, videoKeyframeRows, videoKeyframeToggleEdit, videoKeyframeValueEdit, videoKeysOf, videoLuma, videoLumaWaveform, videoLutEdits, videoLutFromFunction, videoLutSvgApproximation, videoLutSvgPrimitives, videoLutToCube, videoOverlap, videoPeakDb, videoPreviewSrc, videoProjectDuration, videoProjectHasProxies, videoProjectSvg, videoProxyFfmpeg, videoProxyName, videoProxyPlan, videoRemoveRangesEdits, videoRulerTicks, videoScopeImage, videoSequenceChildren, videoSequenceDuration, videoSequenceMap, videoSlowMotionRamp, videoSnapPoints, videoSourceFrame, videoSourceFrameTime, videoSpeedRampEdit, videoSpeedRampKeys, videoTimeRemapBreakpoints, videoTimeRemapSpan, videoTimecodeFrames, videoTimelineTranscript, videoTrackSyncLocked, videoTranscriptEdit, videoTranscriptTrack, videoTransitionHasDirection, videoVectorscope, videoVectorscopeAngle, videoVectorscopeImage, videoVectorscopePoint, videoWaveformImage, videoWaveformPath, videoWipeRect, videoWordAt, videoWordsRange };
|