@shotstack/shotstack-studio 2.0.0-beta.18 → 2.0.0-beta.19
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/index.d.ts +119 -984
- package/dist/internal.es.js +25065 -24865
- package/dist/internal.umd.js +20 -30
- package/dist/schema/index.cjs +1 -1
- package/dist/schema/index.d.ts +119 -984
- package/dist/schema/index.mjs +136 -332
- package/dist/shotstack-studio.es.js +29415 -12265
- package/dist/shotstack-studio.umd.js +577 -132
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { audioAssetSchema as AudioAssetSchema } from '@shotstack/schemas/zod';
|
|
|
3
3
|
import { captionAssetSchema as CaptionAssetSchema } from '@shotstack/schemas/zod';
|
|
4
4
|
import { clipSchema as ClipSchema } from '@shotstack/schemas/zod';
|
|
5
5
|
import { components } from '@shotstack/schemas';
|
|
6
|
-
import { Container } from 'pixi.js';
|
|
7
6
|
import { cropSchema as CropSchema } from '@shotstack/schemas/zod';
|
|
8
7
|
import { editSchema as EditSchema } from '@shotstack/schemas/zod';
|
|
9
8
|
import { htmlAssetSchema as HtmlAssetSchema } from '@shotstack/schemas/zod';
|
|
@@ -25,61 +24,6 @@ import { z } from 'zod';
|
|
|
25
24
|
|
|
26
25
|
export declare type Asset = components["schemas"]["Asset"];
|
|
27
26
|
|
|
28
|
-
declare type AssetEventMap = {
|
|
29
|
-
onAssetLoadInfoUpdated: AssetLoadInfoUpdatedPayload;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
declare class AssetLoader {
|
|
33
|
-
private static readonly VIDEO_EXTENSIONS;
|
|
34
|
-
private static readonly VIDEO_MIME;
|
|
35
|
-
readonly loadTracker: AssetLoadTracker;
|
|
36
|
-
/** Reference counts for loaded assets - prevents premature unloading during transforms */
|
|
37
|
-
private refCounts;
|
|
38
|
-
/**
|
|
39
|
-
* Increment reference count for an asset.
|
|
40
|
-
* Called when a player starts loading an asset.
|
|
41
|
-
*/
|
|
42
|
-
incrementRef(src: string): void;
|
|
43
|
-
/**
|
|
44
|
-
* Decrement reference count for an asset.
|
|
45
|
-
* @returns true if asset can be safely unloaded (count reached zero)
|
|
46
|
-
*/
|
|
47
|
-
decrementRef(src: string): boolean;
|
|
48
|
-
constructor();
|
|
49
|
-
load<TResolvedAsset>(identifier: string, loadOptions: pixi.UnresolvedAsset): Promise<TResolvedAsset | null>;
|
|
50
|
-
/**
|
|
51
|
-
* Load a video with a unique HTMLVideoElement (not cached).
|
|
52
|
-
* Each call creates an independent video element, allowing multiple VideoPlayers
|
|
53
|
-
* to control playback independently even when using the same video URL.
|
|
54
|
-
*/
|
|
55
|
-
loadVideoUnique(identifier: string, loadOptions: pixi.UnresolvedAsset): Promise<pixi.Texture<pixi.VideoSource> | null>;
|
|
56
|
-
getProgress(): number;
|
|
57
|
-
private extractUrl;
|
|
58
|
-
private hasVideoExtension;
|
|
59
|
-
private getContentType;
|
|
60
|
-
private canPlayVideo;
|
|
61
|
-
private isPlayableVideo;
|
|
62
|
-
private shouldUseSafariVideoLoader;
|
|
63
|
-
private loadVideoForSafari;
|
|
64
|
-
private updateAssetLoadMetadata;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
declare type AssetLoadInfo = {
|
|
68
|
-
progress: number;
|
|
69
|
-
status: AssetLoadInfoStatus;
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
declare type AssetLoadInfoStatus = "pending" | "loading" | "success" | "failed";
|
|
73
|
-
|
|
74
|
-
declare type AssetLoadInfoUpdatedPayload = {
|
|
75
|
-
registry: Record<string, AssetLoadInfo>;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
declare class AssetLoadTracker extends EventEmitter<AssetEventMap> {
|
|
79
|
-
registry: Record<string, AssetLoadInfo>;
|
|
80
|
-
constructor();
|
|
81
|
-
}
|
|
82
|
-
|
|
83
27
|
export { AssetSchema }
|
|
84
28
|
|
|
85
29
|
export declare class AssetToolbar {
|
|
@@ -187,6 +131,9 @@ export declare class Canvas {
|
|
|
187
131
|
private readonly edit;
|
|
188
132
|
/** Container for interactive overlays (handles, guides). Renders above content. */
|
|
189
133
|
readonly overlayContainer: pixi.Container;
|
|
134
|
+
private viewportContainer?;
|
|
135
|
+
private editBackground?;
|
|
136
|
+
private viewportMask?;
|
|
190
137
|
private container?;
|
|
191
138
|
private background?;
|
|
192
139
|
private timeline?;
|
|
@@ -228,6 +175,28 @@ export declare class Canvas {
|
|
|
228
175
|
bottom: number;
|
|
229
176
|
};
|
|
230
177
|
registerTimeline(timeline: Timeline): void;
|
|
178
|
+
/**
|
|
179
|
+
* Get the viewport container for coordinate transforms.
|
|
180
|
+
* Used by selection handles, export coordinator, and other components
|
|
181
|
+
* that need to convert between viewport and world coordinates.
|
|
182
|
+
*/
|
|
183
|
+
getViewportContainer(): pixi.Container;
|
|
184
|
+
/**
|
|
185
|
+
* Update the edit background and viewport mask when size changes.
|
|
186
|
+
* Called from Edit when output size is changed.
|
|
187
|
+
*/
|
|
188
|
+
updateViewportForSize(width: number, height: number, backgroundColor: string): void;
|
|
189
|
+
/**
|
|
190
|
+
* Subscribe to Edit events for visual synchronization.
|
|
191
|
+
* Canvas reacts to these events to update PIXI visuals.
|
|
192
|
+
*/
|
|
193
|
+
private subscribeToEditEvents;
|
|
194
|
+
private onPlayerAddedToTrack;
|
|
195
|
+
private onPlayerMovedBetweenTracks;
|
|
196
|
+
private onPlayerRemovedFromTrack;
|
|
197
|
+
private onTrackContainerRemoved;
|
|
198
|
+
private onViewportSizeChanged;
|
|
199
|
+
private onViewportNeedsZoomToFit;
|
|
231
200
|
private registerExtensions;
|
|
232
201
|
private configureApplication;
|
|
233
202
|
private onTick;
|
|
@@ -355,16 +324,6 @@ declare interface ClipRenderer {
|
|
|
355
324
|
|
|
356
325
|
export { ClipSchema }
|
|
357
326
|
|
|
358
|
-
declare interface ClipStats {
|
|
359
|
-
videos: number;
|
|
360
|
-
images: number;
|
|
361
|
-
text: number;
|
|
362
|
-
richText: number;
|
|
363
|
-
luma: number;
|
|
364
|
-
animatedClips: number;
|
|
365
|
-
cachedFrames: number;
|
|
366
|
-
}
|
|
367
|
-
|
|
368
327
|
/**
|
|
369
328
|
* Toolbar for clip-level properties (timing, linking).
|
|
370
329
|
* Shows compact timing controls for start and length with:
|
|
@@ -385,67 +344,6 @@ export declare class ClipToolbar extends BaseToolbar {
|
|
|
385
344
|
dispose(): void;
|
|
386
345
|
}
|
|
387
346
|
|
|
388
|
-
declare type ClipType = ResolvedClip;
|
|
389
|
-
|
|
390
|
-
declare type CommandContext = {
|
|
391
|
-
getClips(): Player[];
|
|
392
|
-
getTracks(): Player[][];
|
|
393
|
-
getTrack(trackIndex: number): Player[] | null;
|
|
394
|
-
getContainer(): Container;
|
|
395
|
-
addPlayer(trackIdx: number, player: Player): Promise<void>;
|
|
396
|
-
addPlayerToContainer(trackIdx: number, player: Player): void;
|
|
397
|
-
createPlayerFromAssetType(clipConfiguration: ClipType): Player;
|
|
398
|
-
queueDisposeClip(player: Player): void;
|
|
399
|
-
disposeClips(): void;
|
|
400
|
-
clearClipError(trackIdx: number, clipIdx: number): void;
|
|
401
|
-
undeleteClip(trackIdx: number, clip: Player): void;
|
|
402
|
-
setUpdatedClip(clip: Player): void;
|
|
403
|
-
restoreClipConfiguration(clip: Player, previousConfig: ClipType): void;
|
|
404
|
-
updateDuration(): void;
|
|
405
|
-
emitEvent<T extends EditEventName>(name: T, ...args: EditEventMap[T] extends void ? [] : [EditEventMap[T]]): void;
|
|
406
|
-
findClipIndices(player: Player): {
|
|
407
|
-
trackIndex: number;
|
|
408
|
-
clipIndex: number;
|
|
409
|
-
} | null;
|
|
410
|
-
getClipAt(trackIndex: number, clipIndex: number): Player | null;
|
|
411
|
-
getSelectedClip(): Player | null;
|
|
412
|
-
setSelectedClip(clip: Player | null): void;
|
|
413
|
-
movePlayerToTrackContainer(player: Player, fromTrackIdx: number, toTrackIdx: number): void;
|
|
414
|
-
getEditState(): EditType;
|
|
415
|
-
propagateTimingChanges(trackIndex: number, startFromClipIndex: number): void;
|
|
416
|
-
resolveClipAutoLength(clip: Player): Promise<void>;
|
|
417
|
-
untrackEndLengthClip(clip: Player): void;
|
|
418
|
-
trackEndLengthClip(clip: Player): void;
|
|
419
|
-
getMergeFields(): MergeFieldService;
|
|
420
|
-
getOutputSize(): {
|
|
421
|
-
width: number;
|
|
422
|
-
height: number;
|
|
423
|
-
};
|
|
424
|
-
setOutputSize(width: number, height: number): void;
|
|
425
|
-
getOutputFps(): number;
|
|
426
|
-
setOutputFps(fps: number): void;
|
|
427
|
-
getTimelineBackground(): string;
|
|
428
|
-
setTimelineBackground(color: string): void;
|
|
429
|
-
getDocument(): EditDocument | null;
|
|
430
|
-
/** Update a clip's properties in the document (source of truth) */
|
|
431
|
-
documentUpdateClip(trackIdx: number, clipIdx: number, updates: Partial<DocumentClipType>): void;
|
|
432
|
-
/** Add a clip to the document, returns the added clip */
|
|
433
|
-
documentAddClip(trackIdx: number, clip: DocumentClipType, clipIdx?: number): DocumentClipType;
|
|
434
|
-
/** Remove a clip from the document, returns the removed clip or null */
|
|
435
|
-
documentRemoveClip(trackIdx: number, clipIdx: number): DocumentClipType | null;
|
|
436
|
-
/** Derive runtime Player state from document clip (applies document data to Player) */
|
|
437
|
-
derivePlayerFromDocument(trackIdx: number, clipIdx: number): void;
|
|
438
|
-
/**
|
|
439
|
-
* Build resolution context for a clip at the given position.
|
|
440
|
-
* Extracts all dependencies upfront so resolution can be pure.
|
|
441
|
-
*
|
|
442
|
-
* @param trackIdx - Track index
|
|
443
|
-
* @param clipIdx - Clip index on that track
|
|
444
|
-
* @returns Context with previousClipEnd, timelineEnd, intrinsicDuration
|
|
445
|
-
*/
|
|
446
|
-
buildResolutionContext(trackIdx: number, clipIdx: number): ResolutionContext;
|
|
447
|
-
};
|
|
448
|
-
|
|
449
347
|
export declare class Controls {
|
|
450
348
|
private edit;
|
|
451
349
|
private seekDistance;
|
|
@@ -541,86 +439,58 @@ export declare const DestinationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
541
439
|
}, z.core.$strip>>;
|
|
542
440
|
}, z.core.$strip>], "provider">;
|
|
543
441
|
|
|
544
|
-
declare
|
|
545
|
-
|
|
546
|
-
export declare class Edit extends Entity {
|
|
547
|
-
private static readonly ZIndexPadding;
|
|
548
|
-
/**
|
|
549
|
-
* Maximum number of commands to keep in undo history.
|
|
550
|
-
* Prevents unbounded memory growth in long editing sessions.
|
|
551
|
-
* Each command may hold Player references and deep-cloned configs.
|
|
552
|
-
*/
|
|
442
|
+
export declare class Edit {
|
|
553
443
|
private static readonly MAX_HISTORY_SIZE;
|
|
554
|
-
|
|
555
|
-
|
|
444
|
+
private document;
|
|
445
|
+
private backgroundColor;
|
|
556
446
|
private edit;
|
|
557
447
|
private tracks;
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
private
|
|
562
|
-
|
|
563
|
-
totalDuration: number;
|
|
448
|
+
playbackTime: Seconds;
|
|
449
|
+
totalDuration: Seconds;
|
|
450
|
+
isPlaying: boolean;
|
|
451
|
+
private get clips();
|
|
452
|
+
private get endLengthClips();
|
|
564
453
|
private cachedTimelineEnd;
|
|
565
|
-
private endLengthClips;
|
|
566
|
-
private isBatchingEvents;
|
|
567
|
-
private isLoadingEdit;
|
|
568
|
-
private syncCorrectionCount;
|
|
569
|
-
private toolbarButtons;
|
|
570
454
|
private canvas;
|
|
571
455
|
private lumaMaskController;
|
|
456
|
+
private playerReconciler;
|
|
457
|
+
private outputSettings;
|
|
458
|
+
private selectionManager;
|
|
459
|
+
private alignmentGuides;
|
|
460
|
+
private commandHistory;
|
|
461
|
+
private commandIndex;
|
|
462
|
+
private commandQueue;
|
|
463
|
+
private clipsToDispose;
|
|
572
464
|
private clipErrors;
|
|
465
|
+
private playerByClipId;
|
|
573
466
|
private fontMetadata;
|
|
467
|
+
private isBatchingEvents;
|
|
468
|
+
private syncCorrectionCount;
|
|
469
|
+
private isExporting;
|
|
574
470
|
/**
|
|
575
471
|
* Create an Edit instance from a template configuration.
|
|
576
|
-
*
|
|
577
|
-
* @param template - The Edit JSON configuration (aligns with Shotstack API contract)
|
|
578
|
-
*
|
|
579
|
-
* @example
|
|
580
|
-
* ```typescript
|
|
581
|
-
* const edit = new Edit(template);
|
|
582
|
-
* await edit.load();
|
|
583
|
-
*
|
|
584
|
-
* const canvas = new Canvas(edit);
|
|
585
|
-
* await canvas.load();
|
|
586
|
-
* ```
|
|
587
472
|
*/
|
|
588
473
|
constructor(template: Edit_2);
|
|
474
|
+
/**
|
|
475
|
+
* Load the edit session.
|
|
476
|
+
*/
|
|
589
477
|
load(): Promise<void>;
|
|
590
478
|
/**
|
|
591
|
-
* Initialize
|
|
592
|
-
* Called during initial load() and can be called again via loadEdit() for hot-reload.
|
|
593
|
-
* @param source - The source identifier for events (default: "load")
|
|
479
|
+
* Initialize runtime from the document.
|
|
594
480
|
*/
|
|
595
481
|
private initializeFromDocument;
|
|
596
|
-
private updateViewportMask;
|
|
597
|
-
/** Update canvas visuals after size change (viewport mask, background, zoom) */
|
|
598
|
-
private updateCanvasForSize;
|
|
599
482
|
play(): void;
|
|
600
483
|
pause(): void;
|
|
601
|
-
seek(target:
|
|
484
|
+
seek(target: Seconds): void;
|
|
602
485
|
stop(): void;
|
|
603
486
|
/**
|
|
604
487
|
* Reload the edit with a new configuration (hot-reload).
|
|
605
|
-
* Uses smart diffing to only update what changed when possible.
|
|
606
|
-
*
|
|
607
|
-
* For initial loading, use the constructor + load() pattern instead:
|
|
608
|
-
* ```typescript
|
|
609
|
-
* const edit = new Edit(template);
|
|
610
|
-
* await edit.load();
|
|
611
|
-
* ```
|
|
612
|
-
*
|
|
613
|
-
* @param edit - The new Edit configuration to load
|
|
614
488
|
*/
|
|
615
489
|
loadEdit(edit: Edit_2): Promise<void>;
|
|
616
490
|
private loadSoundtrack;
|
|
617
491
|
getEdit(): Edit_2;
|
|
618
492
|
/**
|
|
619
|
-
* Validates an edit configuration
|
|
620
|
-
* Use this to pre-validate user input before calling loadEdit().
|
|
621
|
-
*
|
|
622
|
-
* @param edit - The edit configuration to validate
|
|
623
|
-
* @returns Validation result with valid boolean and any errors
|
|
493
|
+
* Validates an edit configuration.
|
|
624
494
|
*/
|
|
625
495
|
validateEdit(edit: unknown): {
|
|
626
496
|
valid: boolean;
|
|
@@ -630,285 +500,96 @@ export declare class Edit extends Entity {
|
|
|
630
500
|
}>;
|
|
631
501
|
};
|
|
632
502
|
getResolvedEdit(): ResolvedEdit;
|
|
633
|
-
/**
|
|
634
|
-
* Get the original parsed edit configuration.
|
|
635
|
-
* Unlike getResolvedEdit(), this returns the edit as originally parsed,
|
|
636
|
-
* with all clips present regardless of loading state.
|
|
637
|
-
*/
|
|
638
|
-
getOriginalEdit(): ResolvedEdit | null;
|
|
639
503
|
addClip(trackIdx: number, clip: Clip): void | Promise<void>;
|
|
640
504
|
getClip(trackIdx: number, clipIdx: number): Clip | null;
|
|
641
|
-
/**
|
|
642
|
-
* Get the error state for a clip that failed to load.
|
|
643
|
-
* Returns null if the clip loaded successfully.
|
|
644
|
-
*/
|
|
645
|
-
getClipError(trackIdx: number, clipIdx: number): {
|
|
646
|
-
error: string;
|
|
647
|
-
assetType: string;
|
|
648
|
-
} | null;
|
|
649
505
|
/**
|
|
650
506
|
* Clear the error for a deleted clip and shift indices for remaining errors.
|
|
651
|
-
* Called when a clip is deleted to keep error indices in sync.
|
|
652
507
|
*/
|
|
653
508
|
private clearClipErrorAndShift;
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
getOriginalAsset(trackIndex: number, clipIndex: number): unknown | undefined;
|
|
657
|
-
deleteClip(trackIdx: number, clipIdx: number): void;
|
|
658
|
-
splitClip(trackIndex: number, clipIndex: number, splitTime: number): void;
|
|
509
|
+
deleteClip(trackIdx: number, clipIdx: number): Promise<void>;
|
|
510
|
+
splitClip(trackIndex: number, clipIndex: number, splitTime: number): Promise<void>;
|
|
659
511
|
addTrack(trackIdx: number, track: Track): Promise<void>;
|
|
660
512
|
getTrack(trackIdx: number): Track | null;
|
|
661
513
|
deleteTrack(trackIdx: number): void;
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
clipCounts: Record<string, number>;
|
|
665
|
-
totalClips: number;
|
|
666
|
-
richTextCacheStats: {
|
|
667
|
-
clips: number;
|
|
668
|
-
totalFrames: number;
|
|
669
|
-
};
|
|
670
|
-
textPlayerCount: number;
|
|
671
|
-
lumaMaskCount: number;
|
|
672
|
-
commandHistorySize: number;
|
|
673
|
-
trackCount: number;
|
|
674
|
-
};
|
|
675
|
-
getComprehensiveMemoryStats(): {
|
|
676
|
-
textureStats: {
|
|
677
|
-
videos: {
|
|
678
|
-
count: number;
|
|
679
|
-
totalMB: number;
|
|
680
|
-
avgDimensions: string;
|
|
681
|
-
};
|
|
682
|
-
images: {
|
|
683
|
-
count: number;
|
|
684
|
-
totalMB: number;
|
|
685
|
-
avgDimensions: string;
|
|
686
|
-
};
|
|
687
|
-
text: {
|
|
688
|
-
count: number;
|
|
689
|
-
totalMB: number;
|
|
690
|
-
};
|
|
691
|
-
richText: {
|
|
692
|
-
count: number;
|
|
693
|
-
totalMB: number;
|
|
694
|
-
};
|
|
695
|
-
luma: {
|
|
696
|
-
count: number;
|
|
697
|
-
totalMB: number;
|
|
698
|
-
};
|
|
699
|
-
animated: {
|
|
700
|
-
count: number;
|
|
701
|
-
frames: number;
|
|
702
|
-
totalMB: number;
|
|
703
|
-
};
|
|
704
|
-
totalTextures: number;
|
|
705
|
-
totalMB: number;
|
|
706
|
-
};
|
|
707
|
-
assetDetails: Array<{
|
|
708
|
-
id: string;
|
|
709
|
-
type: "video" | "image" | "text" | "rich-text" | "luma" | "audio" | "html" | "shape" | "caption" | "unknown";
|
|
710
|
-
label: string;
|
|
711
|
-
width: number;
|
|
712
|
-
height: number;
|
|
713
|
-
estimatedMB: number;
|
|
714
|
-
}>;
|
|
715
|
-
systemStats: {
|
|
716
|
-
clipCount: number;
|
|
717
|
-
trackCount: number;
|
|
718
|
-
commandCount: number;
|
|
719
|
-
};
|
|
720
|
-
};
|
|
721
|
-
private estimateTextureMB;
|
|
722
|
-
private getAssetLabel;
|
|
723
|
-
getPlaybackHealth(): {
|
|
724
|
-
activePlayerCount: number;
|
|
725
|
-
totalPlayerCount: number;
|
|
726
|
-
videoMaxDrift: number;
|
|
727
|
-
audioMaxDrift: number;
|
|
728
|
-
syncCorrections: number;
|
|
729
|
-
};
|
|
730
|
-
recordSyncCorrection(): void;
|
|
731
|
-
undo(): void;
|
|
732
|
-
redo(): void;
|
|
733
|
-
updateClip(trackIdx: number, clipIdx: number, updates: Partial<Clip>): void;
|
|
514
|
+
undo(): Promise<void>;
|
|
515
|
+
redo(): Promise<void>;
|
|
734
516
|
/**
|
|
735
|
-
*
|
|
736
|
-
* Supports manual values, "auto", and "end" timing modes.
|
|
737
|
-
* @param trackIdx - Track index
|
|
738
|
-
* @param clipIdx - Clip index within track
|
|
739
|
-
* @param params - Timing update parameters (start and/or length in milliseconds)
|
|
517
|
+
* Add a command to history without executing it.
|
|
740
518
|
*/
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
protected executeCommand(command: EditCommand): void | Promise<void>;
|
|
519
|
+
private addCommandToHistory;
|
|
520
|
+
updateClip(trackIdx: number, clipIdx: number, updates: Partial<Clip>): Promise<void>;
|
|
744
521
|
/**
|
|
745
|
-
*
|
|
746
|
-
* Consumers can subscribe to this single event instead of tracking 31+ granular events.
|
|
522
|
+
* Handle command result - only add to history if successful.
|
|
747
523
|
*/
|
|
748
|
-
|
|
524
|
+
private handleCommandResult;
|
|
749
525
|
/**
|
|
750
526
|
* Detects merge field placeholders in the raw edit before substitution.
|
|
751
|
-
* Returns a map of clip keys ("trackIdx-clipIdx") to their merge field bindings.
|
|
752
|
-
* Each binding maps a property path to its placeholder and resolved value.
|
|
753
527
|
*/
|
|
754
528
|
private detectMergeFieldBindings;
|
|
755
529
|
/**
|
|
756
530
|
* Recursively walks an object to find merge field placeholders.
|
|
757
|
-
* Returns a map of property paths to their bindings.
|
|
758
531
|
*/
|
|
759
532
|
private detectBindingsInObject;
|
|
760
533
|
/**
|
|
761
534
|
* Checks if edit has structural changes requiring full reload.
|
|
762
|
-
* Structural = track count, clip count, or asset type changed.
|
|
763
535
|
*/
|
|
764
536
|
private hasStructuralChanges;
|
|
765
537
|
/**
|
|
766
|
-
*
|
|
767
|
-
|
|
538
|
+
* Transfers existing clip IDs from the current document to the new edit configuration.
|
|
539
|
+
*/
|
|
540
|
+
private preserveClipIdsForGranularUpdate;
|
|
541
|
+
/**
|
|
542
|
+
* Applies granular changes without full reload.
|
|
768
543
|
*/
|
|
769
544
|
private applyGranularChanges;
|
|
770
|
-
protected createCommandContext(): CommandContext;
|
|
771
545
|
private queueDisposeClip;
|
|
772
|
-
protected disposeClips(): void;
|
|
773
546
|
/**
|
|
774
547
|
* Remove fonts from timeline.fonts that are no longer referenced by any clip.
|
|
775
|
-
* This keeps the document clean and prevents accumulation of unused font URLs.
|
|
776
548
|
*/
|
|
777
549
|
private cleanupUnusedFonts;
|
|
778
550
|
/**
|
|
779
551
|
* Extract the filename (without extension) from a font URL.
|
|
780
|
-
* e.g., "https://fonts.gstatic.com/s/inter/v20/UcCO3Fwr...Bg-4.ttf" → "UcCO3Fwr...Bg-4"
|
|
781
552
|
*/
|
|
782
553
|
private extractFilenameFromUrl;
|
|
783
554
|
private disposeClip;
|
|
784
555
|
private unloadClipAssets;
|
|
785
|
-
protected clearClips(): void;
|
|
786
556
|
private updateTotalDuration;
|
|
787
557
|
private resolveAllTiming;
|
|
788
|
-
propagateTimingChanges(trackIndex: number, startFromClipIndex: number): void;
|
|
789
|
-
resolveClipAutoLength(clip: Player): Promise<void>;
|
|
790
|
-
private addPlayerToContainer;
|
|
791
558
|
private movePlayerToTrackContainer;
|
|
792
|
-
private createPlayerFromAssetType;
|
|
793
559
|
private addPlayer;
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
isClipSelected(trackIndex: number, clipIndex: number): boolean;
|
|
797
|
-
getSelectedClipInfo(): {
|
|
798
|
-
trackIndex: number;
|
|
799
|
-
clipIndex: number;
|
|
800
|
-
player: Player;
|
|
801
|
-
} | null;
|
|
802
|
-
/**
|
|
803
|
-
* Copy a clip to the internal clipboard
|
|
804
|
-
*/
|
|
805
|
-
copyClip(trackIdx: number, clipIdx: number): void;
|
|
806
|
-
/**
|
|
807
|
-
* Paste the copied clip at the current playhead position
|
|
808
|
-
*/
|
|
809
|
-
pasteClip(): void;
|
|
810
|
-
/**
|
|
811
|
-
* Check if there is a clip in the clipboard
|
|
812
|
-
*/
|
|
813
|
-
hasCopiedClip(): boolean;
|
|
814
|
-
findClipIndices(player: Player): {
|
|
815
|
-
trackIndex: number;
|
|
816
|
-
clipIndex: number;
|
|
817
|
-
} | null;
|
|
818
|
-
getClipAt(trackIndex: number, clipIndex: number): Player | null;
|
|
819
|
-
selectPlayer(player: Player): void;
|
|
820
|
-
isPlayerSelected(player: Player): boolean;
|
|
821
|
-
/**
|
|
822
|
-
* Move the selected clip by a pixel delta.
|
|
823
|
-
* Used for keyboard arrow key positioning.
|
|
824
|
-
*/
|
|
825
|
-
moveSelectedClip(deltaX: number, deltaY: number): void;
|
|
826
|
-
setExportMode(exporting: boolean): void;
|
|
827
|
-
isInExportMode(): boolean;
|
|
828
|
-
setCanvas(canvas: Canvas): void;
|
|
829
|
-
getCanvasZoom(): number;
|
|
830
|
-
setOutputSize(width: number, height: number): void;
|
|
831
|
-
setOutputFps(fps: number): void;
|
|
560
|
+
setOutputSize(width: number, height: number): Promise<void>;
|
|
561
|
+
setOutputFps(fps: number): Promise<void>;
|
|
832
562
|
getOutputFps(): number;
|
|
833
|
-
setOutputFormat(format: string): void
|
|
563
|
+
setOutputFormat(format: string): Promise<void>;
|
|
834
564
|
getOutputFormat(): string;
|
|
835
|
-
setOutputDestinations(destinations: Destination[]): void
|
|
565
|
+
setOutputDestinations(destinations: Destination[]): Promise<void>;
|
|
836
566
|
getOutputDestinations(): Destination[];
|
|
837
|
-
setOutputResolution(resolution: string): void
|
|
567
|
+
setOutputResolution(resolution: string): Promise<void>;
|
|
838
568
|
getOutputResolution(): string | undefined;
|
|
839
|
-
setOutputAspectRatio(aspectRatio: string): void
|
|
569
|
+
setOutputAspectRatio(aspectRatio: string): Promise<void>;
|
|
840
570
|
getOutputAspectRatio(): string | undefined;
|
|
841
571
|
getTimelineFonts(): Array<{
|
|
842
572
|
src: string;
|
|
843
573
|
}>;
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
* Uses normalized metadata extracted from TTF files during font loading.
|
|
847
|
-
* This enables rich-text font resolution for template fonts with UUID-based URLs.
|
|
848
|
-
*
|
|
849
|
-
* @param familyName - The font family name (e.g., "Lato", "Lato Light")
|
|
850
|
-
* @param weight - The font weight (e.g., 300 for Light, 900 for Black)
|
|
851
|
-
* @returns The font URL if found, null otherwise
|
|
852
|
-
*/
|
|
853
|
-
getFontUrlByFamilyAndWeight(familyName: string, weight: number): string | null;
|
|
854
|
-
/**
|
|
855
|
-
* Remove any fonts from timeline.fonts that are no longer used by clips.
|
|
856
|
-
* Call this after changing a clip's font to clean up the old font.
|
|
857
|
-
*/
|
|
858
|
-
pruneUnusedFonts(): void;
|
|
859
|
-
setTimelineBackground(color: string): void;
|
|
574
|
+
setTimelineBackground(color: string): Promise<void>;
|
|
575
|
+
private setTimelineBackgroundInternal;
|
|
860
576
|
getTimelineBackground(): string;
|
|
577
|
+
/** Map of asset src → original asset type (for reliable luma detachment during undo) */
|
|
578
|
+
private originalAssetTypes;
|
|
861
579
|
/**
|
|
862
|
-
*
|
|
863
|
-
* Replaces {{ FIELD_NAME }} patterns with their current values.
|
|
864
|
-
*
|
|
865
|
-
* @param input - String potentially containing merge field placeholders
|
|
866
|
-
* @returns String with all merge fields resolved to their values
|
|
867
|
-
*/
|
|
868
|
-
resolveMergeFields(input: string): string;
|
|
869
|
-
/**
|
|
870
|
-
* @deprecated Use `ui.registerButton()` instead.
|
|
871
|
-
*/
|
|
872
|
-
registerToolbarButton(config: ToolbarButtonConfig_2): void;
|
|
873
|
-
/**
|
|
874
|
-
* @deprecated Use `ui.unregisterButton()` instead.
|
|
875
|
-
*/
|
|
876
|
-
unregisterToolbarButton(id: string): void;
|
|
877
|
-
/**
|
|
878
|
-
* @deprecated Use `ui.getButtons()` instead.
|
|
580
|
+
* Find the luma clip attached to a content clip via timing match.
|
|
879
581
|
*/
|
|
880
|
-
|
|
881
|
-
/** Get the exportable clip (with merge field placeholders restored) */
|
|
882
|
-
protected getTemplateClip(trackIndex: number, clipIndex: number): ResolvedClip | null;
|
|
883
|
-
/** Get the text content from the template clip (with merge field placeholders) */
|
|
884
|
-
getTemplateClipText(trackIdx: number, clipIdx: number): string | null;
|
|
885
|
-
/** Map of content player → luma player for attachment tracking */
|
|
886
|
-
private lumaAttachments;
|
|
887
|
-
/** Map of asset src → original asset type (for reliable luma detachment) */
|
|
888
|
-
private originalAssetTypes;
|
|
582
|
+
private findAttachedLumaPlayer;
|
|
889
583
|
/**
|
|
890
584
|
* Attach a luma mask to a specific clip.
|
|
891
|
-
* Creates a luma clip on the same track with synchronized timing.
|
|
892
|
-
*
|
|
893
|
-
* @param trackIndex - Track index of the content clip
|
|
894
|
-
* @param clipIndex - Clip index of the content clip
|
|
895
|
-
* @param lumaSrc - URL of the luma mask asset (video or image)
|
|
896
585
|
*/
|
|
897
586
|
attachLumaToClip(trackIndex: number, clipIndex: number, lumaSrc: string): Promise<void>;
|
|
898
587
|
/**
|
|
899
588
|
* Detach the luma mask from a clip.
|
|
900
|
-
* Removes the luma clip from the track.
|
|
901
|
-
*
|
|
902
|
-
* @param trackIndex - Track index of the content clip
|
|
903
|
-
* @param clipIndex - Clip index of the content clip
|
|
904
589
|
*/
|
|
905
590
|
detachLumaFromClip(trackIndex: number, clipIndex: number): Promise<void>;
|
|
906
591
|
/**
|
|
907
592
|
* Get the luma mask attached to a clip, if any.
|
|
908
|
-
*
|
|
909
|
-
* @param trackIndex - Track index of the content clip
|
|
910
|
-
* @param clipIndex - Clip index of the content clip
|
|
911
|
-
* @returns Luma info or null if no luma attached
|
|
912
593
|
*/
|
|
913
594
|
getClipLuma(trackIndex: number, clipIndex: number): {
|
|
914
595
|
src: string;
|
|
@@ -916,231 +597,20 @@ export declare class Edit extends Entity {
|
|
|
916
597
|
} | null;
|
|
917
598
|
/**
|
|
918
599
|
* Check if a clip has a luma mask attached.
|
|
919
|
-
*
|
|
920
|
-
* @param trackIndex - Track index of the content clip
|
|
921
|
-
* @param clipIndex - Clip index of the content clip
|
|
922
600
|
*/
|
|
923
601
|
hasLumaMask(trackIndex: number, clipIndex: number): boolean;
|
|
924
602
|
/**
|
|
925
|
-
*
|
|
926
|
-
* This is called when a luma is attached to a content clip (e.g., during drag-drop).
|
|
927
|
-
* The map is used by syncAttachedLuma() to coordinate timing between attached clips.
|
|
603
|
+
* Find the content clip that best matches a luma (by temporal overlap).
|
|
928
604
|
*/
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* Transform a clip to luma type (for attachment).
|
|
932
|
-
* Recreates the player with luma asset type while preserving the src.
|
|
933
|
-
*
|
|
934
|
-
* @param trackIndex - Track index of the clip
|
|
935
|
-
* @param clipIndex - Clip index of the clip
|
|
936
|
-
*/
|
|
937
|
-
transformToLuma(trackIndex: number, clipIndex: number): void;
|
|
938
|
-
/**
|
|
939
|
-
* Transform a luma clip back to its original type (for detachment).
|
|
940
|
-
* Uses stored original type for reliability, with URL extension fallback.
|
|
941
|
-
*
|
|
942
|
-
* @param trackIndex - Track index of the luma clip
|
|
943
|
-
* @param clipIndex - Clip index of the luma clip
|
|
944
|
-
*/
|
|
945
|
-
transformFromLuma(trackIndex: number, clipIndex: number): void;
|
|
605
|
+
private findBestContentMatch;
|
|
946
606
|
private setupIntentListeners;
|
|
947
607
|
}
|
|
948
608
|
|
|
949
609
|
declare type Edit_2 = components["schemas"]["Edit"];
|
|
950
610
|
|
|
951
|
-
declare type EditCommand = {
|
|
952
|
-
execute(context?: CommandContext): void | Promise<void>;
|
|
953
|
-
undo?(context?: CommandContext): void | Promise<void>;
|
|
954
|
-
/**
|
|
955
|
-
* Optional cleanup when command is pruned from history.
|
|
956
|
-
* Called when command is removed to free memory (e.g., Player references, deep-cloned configs).
|
|
957
|
-
*/
|
|
958
|
-
dispose?(): void;
|
|
959
|
-
readonly name: string;
|
|
960
|
-
};
|
|
961
|
-
|
|
962
611
|
/** Alias for Edit type to avoid conflicts with SDK's Edit class */
|
|
963
612
|
export declare type EditConfig = Edit_2;
|
|
964
613
|
|
|
965
|
-
declare class EditDocument {
|
|
966
|
-
private data;
|
|
967
|
-
constructor(edit: Edit_2);
|
|
968
|
-
/**
|
|
969
|
-
* Get the raw timeline configuration
|
|
970
|
-
*/
|
|
971
|
-
getTimeline(): Edit_2["timeline"];
|
|
972
|
-
/**
|
|
973
|
-
* Get timeline background color
|
|
974
|
-
*/
|
|
975
|
-
getBackground(): string | undefined;
|
|
976
|
-
/**
|
|
977
|
-
* Get all tracks (raw, unresolved)
|
|
978
|
-
*/
|
|
979
|
-
getTracks(): Track[];
|
|
980
|
-
/**
|
|
981
|
-
* Get a specific track by index
|
|
982
|
-
*/
|
|
983
|
-
getTrack(index: number): Track | null;
|
|
984
|
-
/**
|
|
985
|
-
* Get total number of tracks
|
|
986
|
-
*/
|
|
987
|
-
getTrackCount(): number;
|
|
988
|
-
/**
|
|
989
|
-
* Get soundtrack configuration
|
|
990
|
-
*/
|
|
991
|
-
getSoundtrack(): Soundtrack | undefined;
|
|
992
|
-
/**
|
|
993
|
-
* Get a specific clip by track and clip index
|
|
994
|
-
*/
|
|
995
|
-
getClip(trackIndex: number, clipIndex: number): Clip | null;
|
|
996
|
-
/**
|
|
997
|
-
* Get all clips in a track
|
|
998
|
-
*/
|
|
999
|
-
getClipsInTrack(trackIndex: number): Clip[];
|
|
1000
|
-
/**
|
|
1001
|
-
* Get total number of clips across all tracks
|
|
1002
|
-
*/
|
|
1003
|
-
getClipCount(): number;
|
|
1004
|
-
/**
|
|
1005
|
-
* Get clip count in a specific track
|
|
1006
|
-
*/
|
|
1007
|
-
getClipCountInTrack(trackIndex: number): number;
|
|
1008
|
-
/**
|
|
1009
|
-
* Get the raw output configuration
|
|
1010
|
-
*/
|
|
1011
|
-
getOutput(): Edit_2["output"];
|
|
1012
|
-
/**
|
|
1013
|
-
* Get output size (width/height)
|
|
1014
|
-
* @throws Error if size is not defined
|
|
1015
|
-
*/
|
|
1016
|
-
getSize(): Size;
|
|
1017
|
-
/**
|
|
1018
|
-
* Get output format (mp4, gif, etc.)
|
|
1019
|
-
*/
|
|
1020
|
-
getFormat(): Edit_2["output"]["format"];
|
|
1021
|
-
/**
|
|
1022
|
-
* Get output FPS
|
|
1023
|
-
*/
|
|
1024
|
-
getFps(): number | undefined;
|
|
1025
|
-
/**
|
|
1026
|
-
* Get output resolution preset
|
|
1027
|
-
*/
|
|
1028
|
-
getResolution(): Edit_2["output"]["resolution"];
|
|
1029
|
-
/**
|
|
1030
|
-
* Get output aspect ratio
|
|
1031
|
-
*/
|
|
1032
|
-
getAspectRatio(): Edit_2["output"]["aspectRatio"];
|
|
1033
|
-
/**
|
|
1034
|
-
* Get merge field definitions
|
|
1035
|
-
*/
|
|
1036
|
-
getMergeFields(): Edit_2["merge"];
|
|
1037
|
-
/**
|
|
1038
|
-
* Add a new track at the specified index
|
|
1039
|
-
* @returns The added track
|
|
1040
|
-
*/
|
|
1041
|
-
addTrack(index: number, track?: Track): Track;
|
|
1042
|
-
/**
|
|
1043
|
-
* Remove a track at the specified index
|
|
1044
|
-
* @returns The removed track, or null if index invalid
|
|
1045
|
-
*/
|
|
1046
|
-
removeTrack(index: number): Track | null;
|
|
1047
|
-
/**
|
|
1048
|
-
* Add a clip to a track
|
|
1049
|
-
* @returns The added clip
|
|
1050
|
-
*/
|
|
1051
|
-
addClip(trackIndex: number, clip: Clip, clipIndex?: number): Clip;
|
|
1052
|
-
/**
|
|
1053
|
-
* Remove a clip from a track
|
|
1054
|
-
* @returns The removed clip, or null if indices invalid
|
|
1055
|
-
*/
|
|
1056
|
-
removeClip(trackIndex: number, clipIndex: number): Clip | null;
|
|
1057
|
-
/**
|
|
1058
|
-
* Update a clip's properties (partial update)
|
|
1059
|
-
*/
|
|
1060
|
-
updateClip(trackIndex: number, clipIndex: number, updates: Partial<Clip>): void;
|
|
1061
|
-
/**
|
|
1062
|
-
* Replace a clip entirely
|
|
1063
|
-
*/
|
|
1064
|
-
replaceClip(trackIndex: number, clipIndex: number, newClip: Clip): Clip | null;
|
|
1065
|
-
/**
|
|
1066
|
-
* Set timeline background color
|
|
1067
|
-
*/
|
|
1068
|
-
setBackground(color: string): void;
|
|
1069
|
-
/**
|
|
1070
|
-
* Set soundtrack
|
|
1071
|
-
*/
|
|
1072
|
-
setSoundtrack(soundtrack: Soundtrack | undefined): void;
|
|
1073
|
-
/**
|
|
1074
|
-
* Get timeline fonts
|
|
1075
|
-
*/
|
|
1076
|
-
getFonts(): Array<{
|
|
1077
|
-
src: string;
|
|
1078
|
-
}>;
|
|
1079
|
-
/**
|
|
1080
|
-
* Add a font to the timeline (if not already present)
|
|
1081
|
-
*/
|
|
1082
|
-
addFont(src: string): void;
|
|
1083
|
-
/**
|
|
1084
|
-
* Remove a font from the timeline
|
|
1085
|
-
*/
|
|
1086
|
-
removeFont(src: string): void;
|
|
1087
|
-
/**
|
|
1088
|
-
* Set all timeline fonts (replaces existing)
|
|
1089
|
-
*/
|
|
1090
|
-
setFonts(fonts: Array<{
|
|
1091
|
-
src: string;
|
|
1092
|
-
}>): void;
|
|
1093
|
-
/**
|
|
1094
|
-
* Set output size
|
|
1095
|
-
*/
|
|
1096
|
-
setSize(size: Size): void;
|
|
1097
|
-
/**
|
|
1098
|
-
* Set output format
|
|
1099
|
-
*/
|
|
1100
|
-
setFormat(format: Edit_2["output"]["format"]): void;
|
|
1101
|
-
/**
|
|
1102
|
-
* Set output FPS (must be a valid FPS value)
|
|
1103
|
-
*/
|
|
1104
|
-
setFps(fps: Edit_2["output"]["fps"]): void;
|
|
1105
|
-
/**
|
|
1106
|
-
* Set output resolution preset
|
|
1107
|
-
*/
|
|
1108
|
-
setResolution(resolution: Edit_2["output"]["resolution"]): void;
|
|
1109
|
-
/**
|
|
1110
|
-
* Clear output resolution preset
|
|
1111
|
-
*/
|
|
1112
|
-
clearResolution(): void;
|
|
1113
|
-
/**
|
|
1114
|
-
* Set output aspect ratio
|
|
1115
|
-
*/
|
|
1116
|
-
setAspectRatio(aspectRatio: Edit_2["output"]["aspectRatio"]): void;
|
|
1117
|
-
/**
|
|
1118
|
-
* Clear output aspect ratio
|
|
1119
|
-
*/
|
|
1120
|
-
clearAspectRatio(): void;
|
|
1121
|
-
/**
|
|
1122
|
-
* Clear output size (for use when setting resolution/aspectRatio)
|
|
1123
|
-
*/
|
|
1124
|
-
clearSize(): void;
|
|
1125
|
-
/**
|
|
1126
|
-
* Set merge field definitions
|
|
1127
|
-
*/
|
|
1128
|
-
setMergeFields(mergeFields: Edit_2["merge"]): void;
|
|
1129
|
-
/**
|
|
1130
|
-
* Export the document as raw Edit JSON (preserves "auto", "end", placeholders)
|
|
1131
|
-
* This is what gets sent to the backend API.
|
|
1132
|
-
*/
|
|
1133
|
-
toJSON(): Edit_2;
|
|
1134
|
-
/**
|
|
1135
|
-
* Create an EditDocument from raw Edit JSON
|
|
1136
|
-
*/
|
|
1137
|
-
static fromJSON(json: Edit_2): EditDocument;
|
|
1138
|
-
/**
|
|
1139
|
-
* Create a deep clone of this document
|
|
1140
|
-
*/
|
|
1141
|
-
clone(): EditDocument;
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
614
|
export declare const EditEvent: {
|
|
1145
615
|
readonly PlaybackPlay: "playback:play";
|
|
1146
616
|
readonly PlaybackPause: "playback:pause";
|
|
@@ -1286,26 +756,12 @@ export declare type EditEventName = (typeof EditEvent)[keyof typeof EditEvent];
|
|
|
1286
756
|
|
|
1287
757
|
export { EditSchema }
|
|
1288
758
|
|
|
1289
|
-
declare type EditType = ResolvedEdit;
|
|
1290
|
-
|
|
1291
759
|
declare abstract class Entity {
|
|
1292
760
|
private readonly container;
|
|
1293
761
|
constructor();
|
|
1294
762
|
abstract load(): Promise<void>;
|
|
1295
763
|
}
|
|
1296
764
|
|
|
1297
|
-
declare class EventEmitter<TEventPayloadMap extends EventPayloadMap = EventPayloadMap> {
|
|
1298
|
-
private readonly events;
|
|
1299
|
-
constructor();
|
|
1300
|
-
on<TEventName extends keyof TEventPayloadMap>(name: TEventName, listener: Listener<TEventPayloadMap[TEventName]>): () => void;
|
|
1301
|
-
once<TEventName extends keyof TEventPayloadMap>(name: TEventName, listener: Listener<TEventPayloadMap[TEventName]>): () => void;
|
|
1302
|
-
off<TEventName extends keyof TEventPayloadMap>(name: TEventName, listener: Listener<TEventPayloadMap[TEventName]>): void;
|
|
1303
|
-
clear(name: keyof TEventPayloadMap): void;
|
|
1304
|
-
emit<TEventName extends keyof TEventPayloadMap>(name: TEventName, ...args: TEventPayloadMap[TEventName] extends void ? [] : [TEventPayloadMap[TEventName]]): void;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
declare type EventPayloadMap<TPayload = any> = Record<string, TPayload>;
|
|
1308
|
-
|
|
1309
765
|
/** SDK-extended CaptionAsset with stroke, width, height, alignment */
|
|
1310
766
|
export declare type ExtendedCaptionAsset = CaptionAsset & {
|
|
1311
767
|
stroke?: {
|
|
@@ -1336,22 +792,23 @@ export declare type ImageAsset = components["schemas"]["ImageAsset"];
|
|
|
1336
792
|
|
|
1337
793
|
export { ImageAssetSchema }
|
|
1338
794
|
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
private
|
|
1354
|
-
private
|
|
795
|
+
/**
|
|
796
|
+
* Inspector displays performance stats as an HTML overlay.
|
|
797
|
+
* Shows FPS, memory, playback health, and clip statistics.
|
|
798
|
+
*/
|
|
799
|
+
export declare class Inspector {
|
|
800
|
+
private container;
|
|
801
|
+
private animationFrameId;
|
|
802
|
+
private lastFrameTime;
|
|
803
|
+
private edit;
|
|
804
|
+
private fpsEl;
|
|
805
|
+
private playbackEl;
|
|
806
|
+
private frameStatsEl;
|
|
807
|
+
private frameSparklineEl;
|
|
808
|
+
private jankEl;
|
|
809
|
+
private heapEl;
|
|
810
|
+
private heapSparklineEl;
|
|
811
|
+
private clipsEl;
|
|
1355
812
|
private historySamples;
|
|
1356
813
|
private readonly maxSamples;
|
|
1357
814
|
private lastSampleTime;
|
|
@@ -1359,41 +816,28 @@ export declare class Inspector extends Entity {
|
|
|
1359
816
|
private frameTimes;
|
|
1360
817
|
private readonly frameTimeWindow;
|
|
1361
818
|
private readonly jankThreshold;
|
|
1362
|
-
constructor();
|
|
1363
|
-
|
|
1364
|
-
|
|
819
|
+
constructor(edit: Edit);
|
|
820
|
+
/**
|
|
821
|
+
* Mount the inspector to a parent element.
|
|
822
|
+
* @param parent - The parent element to append the inspector to
|
|
823
|
+
*/
|
|
824
|
+
mount(parent: HTMLElement): void;
|
|
825
|
+
private startUpdateLoop;
|
|
826
|
+
private update;
|
|
1365
827
|
private trackFrameTime;
|
|
1366
828
|
private getFrameStats;
|
|
1367
829
|
private getFrameTimeSparkline;
|
|
1368
830
|
private addHistorySample;
|
|
1369
831
|
private getJsHeapSparkline;
|
|
1370
|
-
private
|
|
1371
|
-
private getSyncStatusIcon;
|
|
1372
|
-
draw(): void;
|
|
1373
|
-
dispose(): void;
|
|
1374
|
-
private formatClipCounts;
|
|
832
|
+
private render;
|
|
1375
833
|
private getMemoryInfo;
|
|
1376
834
|
private bytesToMegabytes;
|
|
835
|
+
dispose(): void;
|
|
1377
836
|
}
|
|
1378
837
|
|
|
1379
|
-
declare type InternalEventMap = {
|
|
1380
|
-
"canvas:clipClicked": {
|
|
1381
|
-
player: Player;
|
|
1382
|
-
};
|
|
1383
|
-
"canvas:backgroundClicked": void;
|
|
1384
|
-
"font:capabilitiesChanged": {
|
|
1385
|
-
supportsBold: boolean;
|
|
1386
|
-
};
|
|
1387
|
-
"toolbar:buttonsChanged": {
|
|
1388
|
-
buttons: ToolbarButtonConfig_2[];
|
|
1389
|
-
};
|
|
1390
|
-
};
|
|
1391
|
-
|
|
1392
838
|
declare type Keyframe_2 = Tween;
|
|
1393
839
|
export { Keyframe_2 as Keyframe }
|
|
1394
840
|
|
|
1395
|
-
declare type Listener<TPayload = any> = (payload: TPayload) => void;
|
|
1396
|
-
|
|
1397
841
|
export declare type LumaAsset = components["schemas"]["LumaAsset"];
|
|
1398
842
|
|
|
1399
843
|
export { LumaAssetSchema }
|
|
@@ -1440,6 +884,7 @@ export declare class MediaToolbar extends BaseToolbar {
|
|
|
1440
884
|
private isDynamicSource;
|
|
1441
885
|
private dynamicFieldName;
|
|
1442
886
|
private originalSrc;
|
|
887
|
+
private abortController;
|
|
1443
888
|
mount(parent: HTMLElement): void;
|
|
1444
889
|
/**
|
|
1445
890
|
* Mount composite UI components into their placeholder elements.
|
|
@@ -1515,70 +960,6 @@ declare interface MergeField_2 {
|
|
|
1515
960
|
description?: string;
|
|
1516
961
|
}
|
|
1517
962
|
|
|
1518
|
-
/**
|
|
1519
|
-
* Tracks a merge field binding for a specific property path.
|
|
1520
|
-
* Used to restore placeholders on export for properties that haven't changed.
|
|
1521
|
-
*/
|
|
1522
|
-
declare interface MergeFieldBinding {
|
|
1523
|
-
/** The original placeholder string, e.g., "{{ HERO_IMAGE }}" */
|
|
1524
|
-
placeholder: string;
|
|
1525
|
-
/** The resolved value at binding time, used for change detection */
|
|
1526
|
-
resolvedValue: string;
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
declare class MergeFieldService {
|
|
1530
|
-
private fields;
|
|
1531
|
-
private events;
|
|
1532
|
-
constructor(events: EventEmitter);
|
|
1533
|
-
/**
|
|
1534
|
-
* Register or update a merge field.
|
|
1535
|
-
* @param field The merge field to register
|
|
1536
|
-
* @param options.silent If true, suppresses event emission (for command-based operations)
|
|
1537
|
-
*/
|
|
1538
|
-
register(field: MergeField_2, options?: {
|
|
1539
|
-
silent?: boolean;
|
|
1540
|
-
}): void;
|
|
1541
|
-
/**
|
|
1542
|
-
* Remove a merge field by name.
|
|
1543
|
-
* @param name The field name to remove
|
|
1544
|
-
* @param options.silent If true, suppresses event emission (for command-based operations)
|
|
1545
|
-
*/
|
|
1546
|
-
remove(name: string, options?: {
|
|
1547
|
-
silent?: boolean;
|
|
1548
|
-
}): boolean;
|
|
1549
|
-
/** Get a merge field by name */
|
|
1550
|
-
get(name: string): MergeField_2 | undefined;
|
|
1551
|
-
/** Get all registered merge fields */
|
|
1552
|
-
getAll(): MergeField_2[];
|
|
1553
|
-
/** Clear all merge fields */
|
|
1554
|
-
clear(): void;
|
|
1555
|
-
/**
|
|
1556
|
-
* Apply merge field substitutions to a string.
|
|
1557
|
-
* Replaces {{ FIELD_NAME }} patterns with their default values.
|
|
1558
|
-
*/
|
|
1559
|
-
resolve(input: string): string;
|
|
1560
|
-
/**
|
|
1561
|
-
* Check if a string contains unresolved merge fields.
|
|
1562
|
-
* Returns true if any {{ FIELD_NAME }} patterns remain after resolution.
|
|
1563
|
-
*/
|
|
1564
|
-
hasUnresolved(input: string): boolean;
|
|
1565
|
-
/**
|
|
1566
|
-
* Extract the first merge field name from a string.
|
|
1567
|
-
* Returns null if no merge field pattern is found.
|
|
1568
|
-
*/
|
|
1569
|
-
extractFieldName(input: string): string | null;
|
|
1570
|
-
/** Check if a string is a merge field template (contains {{ FIELD }}) */
|
|
1571
|
-
isMergeFieldTemplate(input: string): boolean;
|
|
1572
|
-
/** Create a merge field template string from a field name */
|
|
1573
|
-
createTemplate(fieldName: string): string;
|
|
1574
|
-
/** Export fields in Shotstack API format ({ find, replace }) */
|
|
1575
|
-
toSerializedArray(): SerializedMergeField[];
|
|
1576
|
-
/** Import fields from Shotstack API format (does not emit event - called during loadEdit) */
|
|
1577
|
-
loadFromSerialized(fields: SerializedMergeField[]): void;
|
|
1578
|
-
/** Generate a unique field name with a given prefix (e.g., MEDIA_1, MEDIA_2) */
|
|
1579
|
-
generateUniqueName(prefix: string): string;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
963
|
export declare interface NumericKeyframe {
|
|
1583
964
|
start: number;
|
|
1584
965
|
length: number;
|
|
@@ -1629,159 +1010,8 @@ export declare const OutputSizeSchema: z.ZodObject<{
|
|
|
1629
1010
|
height: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>>;
|
|
1630
1011
|
}, z.core.$strip>;
|
|
1631
1012
|
|
|
1632
|
-
declare interface PlaybackHealth {
|
|
1633
|
-
activePlayerCount: number;
|
|
1634
|
-
totalPlayerCount: number;
|
|
1635
|
-
videoMaxDrift: number;
|
|
1636
|
-
audioMaxDrift: number;
|
|
1637
|
-
syncCorrections: number;
|
|
1638
|
-
}
|
|
1639
|
-
|
|
1640
|
-
/**
|
|
1641
|
-
* Base class for all visual content players in the canvas.
|
|
1642
|
-
*
|
|
1643
|
-
* Player is responsible for rendering clip content (video, image, text, etc.)
|
|
1644
|
-
* and applying keyframe animations.
|
|
1645
|
-
*
|
|
1646
|
-
*/
|
|
1647
|
-
declare abstract class Player extends Entity {
|
|
1648
|
-
private static readonly DiscardedFrameCount;
|
|
1649
|
-
layer: number;
|
|
1650
|
-
shouldDispose: boolean;
|
|
1651
|
-
readonly playerType: PlayerType;
|
|
1652
|
-
protected edit: Edit;
|
|
1653
|
-
clipConfiguration: ResolvedClip;
|
|
1654
|
-
private timingIntent;
|
|
1655
|
-
private resolvedTiming;
|
|
1656
|
-
private positionBuilder;
|
|
1657
|
-
private offsetXKeyframeBuilder?;
|
|
1658
|
-
private offsetYKeyframeBuilder?;
|
|
1659
|
-
private scaleKeyframeBuilder?;
|
|
1660
|
-
private opacityKeyframeBuilder?;
|
|
1661
|
-
private rotationKeyframeBuilder?;
|
|
1662
|
-
private maskXKeyframeBuilder?;
|
|
1663
|
-
private wipeMask;
|
|
1664
|
-
protected contentContainer: pixi.Container;
|
|
1665
|
-
/**
|
|
1666
|
-
* Tracks which properties came from merge field templates.
|
|
1667
|
-
*/
|
|
1668
|
-
private mergeFieldBindings;
|
|
1669
|
-
constructor(edit: Edit, clipConfiguration: ResolvedClip, playerType: PlayerType);
|
|
1670
|
-
reconfigureAfterRestore(): void;
|
|
1671
|
-
/**
|
|
1672
|
-
* Reload the asset for this player (e.g., when asset.src changes).
|
|
1673
|
-
* Override in subclasses that have loadable assets (image, video).
|
|
1674
|
-
* Default implementation is a no-op.
|
|
1675
|
-
*/
|
|
1676
|
-
reloadAsset(): Promise<void>;
|
|
1677
|
-
protected configureKeyframes(): void;
|
|
1678
|
-
load(): Promise<void>;
|
|
1679
|
-
update(_: number, __: number): void;
|
|
1680
|
-
private updateWipeMask;
|
|
1681
|
-
draw(): void;
|
|
1682
|
-
dispose(): void;
|
|
1683
|
-
getStart(): Seconds;
|
|
1684
|
-
getLength(): Seconds;
|
|
1685
|
-
getEnd(): Seconds;
|
|
1686
|
-
getTimingIntent(): TimingIntent;
|
|
1687
|
-
setTimingIntent(intent: Partial<TimingIntent>): void;
|
|
1688
|
-
getResolvedTiming(): ResolvedTiming;
|
|
1689
|
-
setResolvedTiming(timing: ResolvedTiming): void;
|
|
1690
|
-
/**
|
|
1691
|
-
* Set a merge field binding for a property path.
|
|
1692
|
-
*/
|
|
1693
|
-
setMergeFieldBinding(path: string, binding: MergeFieldBinding): void;
|
|
1694
|
-
/**
|
|
1695
|
-
* Get the merge field binding for a property path, if any.
|
|
1696
|
-
*/
|
|
1697
|
-
getMergeFieldBinding(path: string): MergeFieldBinding | undefined;
|
|
1698
|
-
/**
|
|
1699
|
-
* Remove a merge field binding (e.g., when user changes the value).
|
|
1700
|
-
*/
|
|
1701
|
-
removeMergeFieldBinding(path: string): void;
|
|
1702
|
-
/**
|
|
1703
|
-
* Get all merge field bindings for this player.
|
|
1704
|
-
*/
|
|
1705
|
-
getMergeFieldBindings(): Map<string, MergeFieldBinding>;
|
|
1706
|
-
/**
|
|
1707
|
-
* Bulk set bindings during player initialization.
|
|
1708
|
-
*/
|
|
1709
|
-
setInitialBindings(bindings: Map<string, MergeFieldBinding>): void;
|
|
1710
|
-
/**
|
|
1711
|
-
* Get the exportable clip configuration with merge field placeholders restored.
|
|
1712
|
-
*/
|
|
1713
|
-
getExportableClip(): Clip;
|
|
1714
|
-
/**
|
|
1715
|
-
* Get the playback time relative to clip start, in seconds.
|
|
1716
|
-
*/
|
|
1717
|
-
getPlaybackTime(): number;
|
|
1718
|
-
abstract getSize(): Size;
|
|
1719
|
-
/**
|
|
1720
|
-
* Returns the source content dimensions (before fit scaling).
|
|
1721
|
-
*/
|
|
1722
|
-
getContentSize(): Size;
|
|
1723
|
-
getOpacity(): number;
|
|
1724
|
-
getPosition(): Vector;
|
|
1725
|
-
getPivot(): Vector;
|
|
1726
|
-
protected getFitScale(): number;
|
|
1727
|
-
getScale(): number;
|
|
1728
|
-
protected getContainerScale(): Vector;
|
|
1729
|
-
getRotation(): number;
|
|
1730
|
-
isActive(): boolean;
|
|
1731
|
-
shouldDiscardFrame(): boolean;
|
|
1732
|
-
/**
|
|
1733
|
-
* Handle pointer down - emit click event for selection handling.
|
|
1734
|
-
* All drag/resize/rotate interaction is handled by SelectionHandles.
|
|
1735
|
-
*/
|
|
1736
|
-
private onPointerDown;
|
|
1737
|
-
private clipHasKeyframes;
|
|
1738
|
-
protected applyFixedDimensions(): void;
|
|
1739
|
-
protected applyAnchorPositioning(anchor: string, clipWidth: number, clipHeight: number, sprite: pixi.Sprite): void;
|
|
1740
|
-
/**
|
|
1741
|
-
* Override in subclasses to enable edge resize handles for dimension changes.
|
|
1742
|
-
* When true, edge handles will be shown instead of corner scale handles.
|
|
1743
|
-
*/
|
|
1744
|
-
supportsEdgeResize(): boolean;
|
|
1745
|
-
/**
|
|
1746
|
-
* Called when dimensions change via edge resize. Override in subclasses to handle re-rendering.
|
|
1747
|
-
*/
|
|
1748
|
-
protected onDimensionsChanged(): void;
|
|
1749
|
-
/**
|
|
1750
|
-
* Public wrapper for notifying dimension changes.
|
|
1751
|
-
* Called by SelectionHandles after edge resize operations.
|
|
1752
|
-
*/
|
|
1753
|
-
notifyDimensionsChanged(): void;
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
declare enum PlayerType {
|
|
1757
|
-
Video = "video",
|
|
1758
|
-
Image = "image",
|
|
1759
|
-
Audio = "audio",
|
|
1760
|
-
Text = "text",
|
|
1761
|
-
RichText = "rich-text",
|
|
1762
|
-
Luma = "luma",
|
|
1763
|
-
Html = "html",
|
|
1764
|
-
Shape = "shape",
|
|
1765
|
-
Caption = "caption",
|
|
1766
|
-
Svg = "svg"
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
1013
|
declare type ResolutionChangeCallback = (width: number, height: number) => void;
|
|
1770
1014
|
|
|
1771
|
-
/**
|
|
1772
|
-
* Context required to resolve timing intent to concrete values.
|
|
1773
|
-
*
|
|
1774
|
-
* @see resolveTimingIntent - the pure function that uses this context
|
|
1775
|
-
*/
|
|
1776
|
-
declare interface ResolutionContext {
|
|
1777
|
-
/** End time of previous clip on same track (for start: "auto") */
|
|
1778
|
-
readonly previousClipEnd: Seconds;
|
|
1779
|
-
/** Total duration of timeline excluding "end" clips (for length: "end") */
|
|
1780
|
-
readonly timelineEnd: Seconds;
|
|
1781
|
-
/** Intrinsic duration from asset metadata, null if not yet loaded (for length: "auto") */
|
|
1782
|
-
readonly intrinsicDuration: Seconds | null;
|
|
1783
|
-
}
|
|
1784
|
-
|
|
1785
1015
|
declare type ResolvedClip = Omit<Clip, "start" | "length"> & {
|
|
1786
1016
|
start: Seconds;
|
|
1787
1017
|
length: Seconds;
|
|
@@ -1793,16 +1023,6 @@ declare type ResolvedEdit = Omit<Edit_2, "timeline"> & {
|
|
|
1793
1023
|
};
|
|
1794
1024
|
};
|
|
1795
1025
|
|
|
1796
|
-
/**
|
|
1797
|
-
* Resolved timing values in seconds.
|
|
1798
|
-
* Matches the external @shotstack/schemas unit convention.
|
|
1799
|
-
* Conversion to milliseconds happens only in the Player layer for pixi rendering.
|
|
1800
|
-
*/
|
|
1801
|
-
declare interface ResolvedTiming {
|
|
1802
|
-
start: Seconds;
|
|
1803
|
-
length: Seconds;
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
1026
|
declare type ResolvedTrack = {
|
|
1807
1027
|
clips: ResolvedClip[];
|
|
1808
1028
|
};
|
|
@@ -1866,6 +1086,8 @@ export declare class RichTextToolbar extends BaseToolbar {
|
|
|
1866
1086
|
private animationDurationValue;
|
|
1867
1087
|
private animationStyleSection;
|
|
1868
1088
|
private animationDirectionSection;
|
|
1089
|
+
private pendingAnimationDuration;
|
|
1090
|
+
private animationDurationThrottle;
|
|
1869
1091
|
private transitionPopup;
|
|
1870
1092
|
private transitionPanel;
|
|
1871
1093
|
private effectPopup;
|
|
@@ -1891,7 +1113,10 @@ export declare class RichTextToolbar extends BaseToolbar {
|
|
|
1891
1113
|
private updateWeightPopupState;
|
|
1892
1114
|
private setFontWeight;
|
|
1893
1115
|
private toggleSizePopup;
|
|
1116
|
+
/** Build popup once at mount - uses event delegation (no per-item listeners) */
|
|
1894
1117
|
private buildSizePopup;
|
|
1118
|
+
/** Update active state without rebuilding DOM */
|
|
1119
|
+
private updateSizePopupState;
|
|
1895
1120
|
private applyManualSize;
|
|
1896
1121
|
private toggleSpacingPopup;
|
|
1897
1122
|
private toggleAnimationPopup;
|
|
@@ -1953,6 +1178,7 @@ export declare class SelectionHandles implements CanvasOverlayRegistration {
|
|
|
1953
1178
|
private app;
|
|
1954
1179
|
private positionBuilder;
|
|
1955
1180
|
private selectedPlayer;
|
|
1181
|
+
private selectedClipId;
|
|
1956
1182
|
private selectedTrackIndex;
|
|
1957
1183
|
private selectedClipIndex;
|
|
1958
1184
|
private isHovering;
|
|
@@ -2004,32 +1230,12 @@ export declare class SelectionHandles implements CanvasOverlayRegistration {
|
|
|
2004
1230
|
private hasStateChanged;
|
|
2005
1231
|
}
|
|
2006
1232
|
|
|
2007
|
-
/**
|
|
2008
|
-
* Serialized format for JSON export (matches Shotstack API).
|
|
2009
|
-
* The replace value can be any type - strings, numbers, booleans, objects.
|
|
2010
|
-
*/
|
|
2011
|
-
declare interface SerializedMergeField {
|
|
2012
|
-
find: string;
|
|
2013
|
-
replace: unknown;
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
1233
|
export declare type ShapeAsset = components["schemas"]["ShapeAsset"];
|
|
2017
1234
|
|
|
2018
1235
|
export { ShapeAssetSchema }
|
|
2019
1236
|
|
|
2020
|
-
declare type Size = {
|
|
2021
|
-
width: number;
|
|
2022
|
-
height: number;
|
|
2023
|
-
};
|
|
2024
|
-
|
|
2025
1237
|
export declare type Soundtrack = components["schemas"]["Soundtrack"];
|
|
2026
1238
|
|
|
2027
|
-
declare interface SystemStats {
|
|
2028
|
-
clipCount: number;
|
|
2029
|
-
trackCount: number;
|
|
2030
|
-
commandCount: number;
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
1239
|
export declare type TextAsset = components["schemas"]["TextAsset"];
|
|
2034
1240
|
|
|
2035
1241
|
export { TextAssetSchema }
|
|
@@ -2104,9 +1310,9 @@ export declare class TextToolbar extends BaseToolbar {
|
|
|
2104
1310
|
dispose(): void;
|
|
2105
1311
|
}
|
|
2106
1312
|
|
|
2107
|
-
|
|
2108
|
-
export declare class Timeline extends TimelineEntity {
|
|
1313
|
+
export declare class Timeline {
|
|
2109
1314
|
private readonly edit;
|
|
1315
|
+
readonly element: HTMLElement;
|
|
2110
1316
|
private readonly container;
|
|
2111
1317
|
private readonly stateManager;
|
|
2112
1318
|
private features;
|
|
@@ -2126,17 +1332,17 @@ export declare class Timeline extends TimelineEntity {
|
|
|
2126
1332
|
private lastFrameTime;
|
|
2127
1333
|
private isInteracting;
|
|
2128
1334
|
private isLoaded;
|
|
1335
|
+
private thumbnailRenderPending;
|
|
2129
1336
|
private readonly handleTimelineUpdated;
|
|
2130
1337
|
private readonly handlePlaybackPlay;
|
|
2131
1338
|
private readonly handlePlaybackPause;
|
|
2132
1339
|
private readonly handleClipSelected;
|
|
2133
1340
|
private readonly handleClipLoadFailed;
|
|
1341
|
+
private readonly handleClipUpdated;
|
|
2134
1342
|
private readonly handleRulerMouseMove;
|
|
2135
1343
|
constructor(edit: Edit, container: HTMLElement, options?: TimelineOptions);
|
|
2136
1344
|
/** Initialize and mount the timeline */
|
|
2137
1345
|
load(): Promise<void>;
|
|
2138
|
-
/** Update component state (called each frame during active rendering) */
|
|
2139
|
-
update(_deltaTime: number, _elapsed: number): void;
|
|
2140
1346
|
/** Render/draw component to DOM (called each frame after update) */
|
|
2141
1347
|
draw(): void;
|
|
2142
1348
|
/** Clean up and unmount the timeline */
|
|
@@ -2160,7 +1366,7 @@ export declare class Timeline extends TimelineEntity {
|
|
|
2160
1366
|
setZoom(pixelsPerSecond: number): void;
|
|
2161
1367
|
zoomIn(): void;
|
|
2162
1368
|
zoomOut(): void;
|
|
2163
|
-
scrollTo(time:
|
|
1369
|
+
scrollTo(time: Seconds): void;
|
|
2164
1370
|
/** Recalculate size from container and re-render */
|
|
2165
1371
|
resize(): void;
|
|
2166
1372
|
selectClip(trackIndex: number, clipIndex: number): void;
|
|
@@ -2172,38 +1378,6 @@ export declare class Timeline extends TimelineEntity {
|
|
|
2172
1378
|
findClipAtPosition(x: number, y: number): ClipInfo | null;
|
|
2173
1379
|
}
|
|
2174
1380
|
|
|
2175
|
-
/**
|
|
2176
|
-
* Base class for HTML-based timeline components.
|
|
2177
|
-
* Mirrors the Entity pattern used by PixiJS components (load/update/draw/dispose lifecycle).
|
|
2178
|
-
*/
|
|
2179
|
-
declare abstract class TimelineEntity {
|
|
2180
|
-
readonly element: HTMLElement;
|
|
2181
|
-
protected children: TimelineEntity[];
|
|
2182
|
-
constructor(tagName?: keyof HTMLElementTagNameMap, className?: string);
|
|
2183
|
-
/** Initialize the component and its children */
|
|
2184
|
-
abstract load(): Promise<void>;
|
|
2185
|
-
/** Update component state (called each frame during active rendering) */
|
|
2186
|
-
abstract update(deltaTime: number, elapsed: number): void;
|
|
2187
|
-
/** Render/draw component to DOM (called each frame after update) */
|
|
2188
|
-
abstract draw(): void;
|
|
2189
|
-
/** Clean up resources and remove from DOM */
|
|
2190
|
-
abstract dispose(): void;
|
|
2191
|
-
/** Add a child entity */
|
|
2192
|
-
protected addChild(child: TimelineEntity): void;
|
|
2193
|
-
/** Remove a child entity */
|
|
2194
|
-
protected removeChild(child: TimelineEntity): void;
|
|
2195
|
-
/** Remove all children */
|
|
2196
|
-
protected removeAllChildren(): void;
|
|
2197
|
-
/** Load all children */
|
|
2198
|
-
protected loadChildren(): Promise<void>;
|
|
2199
|
-
/** Update all children */
|
|
2200
|
-
protected updateChildren(deltaTime: number, elapsed: number): void;
|
|
2201
|
-
/** Draw all children */
|
|
2202
|
-
protected drawChildren(): void;
|
|
2203
|
-
/** Dispose all children */
|
|
2204
|
-
protected disposeChildren(): void;
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
1381
|
/** Feature toggles for Timeline */
|
|
2208
1382
|
export declare interface TimelineFeatures {
|
|
2209
1383
|
/** Show toolbar with playback controls */
|
|
@@ -2337,33 +1511,6 @@ export declare interface TimelineThemeInput {
|
|
|
2337
1511
|
};
|
|
2338
1512
|
}
|
|
2339
1513
|
|
|
2340
|
-
/**
|
|
2341
|
-
* Stores the original timing intent as specified by the user.
|
|
2342
|
-
* This is preserved even after resolution to numeric values.
|
|
2343
|
-
* All numeric values are in seconds.
|
|
2344
|
-
*/
|
|
2345
|
-
declare interface TimingIntent {
|
|
2346
|
-
start: Seconds | "auto";
|
|
2347
|
-
length: TimingValue;
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
/**
|
|
2351
|
-
* Command parameters for timing updates.
|
|
2352
|
-
* Values in milliseconds (for UI convenience).
|
|
2353
|
-
*/
|
|
2354
|
-
declare interface TimingUpdateParams {
|
|
2355
|
-
start?: number | "auto";
|
|
2356
|
-
length?: number | "auto" | "end";
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
/**
|
|
2360
|
-
* A timing value can be a numeric value (in seconds) or a special string.
|
|
2361
|
-
* - "auto" for start: position after previous clip on track
|
|
2362
|
-
* - "auto" for length: asset's intrinsic duration
|
|
2363
|
-
* - "end" for length: extend to timeline end
|
|
2364
|
-
*/
|
|
2365
|
-
declare type TimingValue = Seconds | "auto" | "end";
|
|
2366
|
-
|
|
2367
1514
|
export declare type TitleAsset = components["schemas"]["TitleAsset"];
|
|
2368
1515
|
|
|
2369
1516
|
/**
|
|
@@ -2380,14 +1527,6 @@ export declare interface ToolbarButtonConfig {
|
|
|
2380
1527
|
dividerBefore?: boolean;
|
|
2381
1528
|
}
|
|
2382
1529
|
|
|
2383
|
-
declare interface ToolbarButtonConfig_2 {
|
|
2384
|
-
id: string;
|
|
2385
|
-
icon: string;
|
|
2386
|
-
tooltip: string;
|
|
2387
|
-
event: string;
|
|
2388
|
-
dividerBefore?: boolean;
|
|
2389
|
-
}
|
|
2390
|
-
|
|
2391
1530
|
export declare type Track = components["schemas"]["Track"];
|
|
2392
1531
|
|
|
2393
1532
|
export { TrackSchema }
|
|
@@ -2461,6 +1600,7 @@ export declare class UIController {
|
|
|
2461
1600
|
private currentTrackIndex;
|
|
2462
1601
|
private currentClipIndex;
|
|
2463
1602
|
private onKeyDownBound;
|
|
1603
|
+
private modeButtonHandlers;
|
|
2464
1604
|
private buttonRegistry;
|
|
2465
1605
|
private buttonEvents;
|
|
2466
1606
|
private assetToolbar;
|
|
@@ -2673,11 +1813,6 @@ export declare interface UIRegistration {
|
|
|
2673
1813
|
dispose(): void;
|
|
2674
1814
|
}
|
|
2675
1815
|
|
|
2676
|
-
declare type Vector = {
|
|
2677
|
-
x: number;
|
|
2678
|
-
y: number;
|
|
2679
|
-
};
|
|
2680
|
-
|
|
2681
1816
|
export declare const VERSION: string;
|
|
2682
1817
|
|
|
2683
1818
|
export declare type VideoAsset = components["schemas"]["VideoAsset"];
|