@linker-design-plus/timeline-track 2.0.22 → 2.0.24
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/core/controllers/previewBackend.d.ts +2 -0
- package/dist/core/controllers/previewTransformOverlay.d.ts +2 -0
- package/dist/core/controllers/timelinePreviewSession.d.ts +3 -0
- package/dist/core/facade/timelineManager.d.ts +19 -1
- package/dist/core/history/timelineHistoryRecorder.d.ts +7 -1
- package/dist/index.cjs.js +50 -50
- package/dist/index.es.js +4133 -3921
- package/package.json +1 -1
|
@@ -26,6 +26,8 @@ export interface TimelinePreviewBackendCallbacks {
|
|
|
26
26
|
onTextRotationCommit?: (clipId: string, rotation: number) => void;
|
|
27
27
|
onPendingPreviewRetry?: () => void;
|
|
28
28
|
onRuntimeError?: (error: unknown) => void;
|
|
29
|
+
/** 预览层文字交互(点击字幕或文字变换控件)时若时间线处于播放中,用于请求暂停 */
|
|
30
|
+
onPauseIfPlaying?: () => void;
|
|
29
31
|
}
|
|
30
32
|
export interface PreviewPendingState {
|
|
31
33
|
mode: 'seek' | 'scrub';
|
|
@@ -17,6 +17,8 @@ interface PreviewTransformOverlayCallbacks {
|
|
|
17
17
|
onFontSizeCommit?: (clipId: string, fontSize: number) => void;
|
|
18
18
|
onRotationChange?: (clipId: string, rotation: number | null) => void;
|
|
19
19
|
onRotationCommit?: (clipId: string, rotation: number) => void;
|
|
20
|
+
/** 文字片段预览变换框上开始拖拽/缩放/旋转(播放中时应暂停) */
|
|
21
|
+
onTextTransformInteractionStart?: () => void;
|
|
20
22
|
}
|
|
21
23
|
export declare class PreviewTransformOverlay {
|
|
22
24
|
private frameElement;
|
|
@@ -14,6 +14,7 @@ interface TimelinePreviewSessionCallbacks {
|
|
|
14
14
|
onTextFontSizeCommit?: (clipId: string, fontSize: number) => void;
|
|
15
15
|
onTextRotationCommit?: (clipId: string, rotation: number) => void;
|
|
16
16
|
onPendingPreviewRetry?: () => void;
|
|
17
|
+
onPauseIfPlaying?: () => void;
|
|
17
18
|
}
|
|
18
19
|
interface TimelinePreviewSessionDependencies {
|
|
19
20
|
createMediaElement?: (kind: TrackType, role: 'current' | 'preload') => HTMLMediaElement;
|
|
@@ -86,7 +87,9 @@ export declare class TimelinePreviewSession {
|
|
|
86
87
|
private isSyncProjecting;
|
|
87
88
|
private readonly deferredPreloadSlotKeys;
|
|
88
89
|
private deferredPreloadFlushScheduled;
|
|
90
|
+
private lastSyncedPlayState;
|
|
89
91
|
constructor(callbacks?: TimelinePreviewSessionCallbacks, dependencies?: TimelinePreviewSessionDependencies);
|
|
92
|
+
private requestPauseIfPlaying;
|
|
90
93
|
private emitDiagnostic;
|
|
91
94
|
private buildSlotTraceData;
|
|
92
95
|
hasPreview(): boolean;
|
|
@@ -82,6 +82,8 @@ export declare class TimelineManager {
|
|
|
82
82
|
private previewSyncInteractionMode;
|
|
83
83
|
private readonly resourceCacheManager;
|
|
84
84
|
private voiceLinkedTextRegenerationTimer;
|
|
85
|
+
private pendingVoiceLinkedTextRegeneration;
|
|
86
|
+
private historyRecordingSuppressionDepth;
|
|
85
87
|
constructor(config?: Partial<TimelineConfig>);
|
|
86
88
|
private createPlaybackAttemptId;
|
|
87
89
|
private refreshPlaybackAttempt;
|
|
@@ -121,6 +123,9 @@ export declare class TimelineManager {
|
|
|
121
123
|
private getDefaultTrackForHistory;
|
|
122
124
|
private getTimelineHistoryRecorder;
|
|
123
125
|
private getTimelineHistoryExecutor;
|
|
126
|
+
private withHistoryBoundary;
|
|
127
|
+
private shouldSkipHistoryRecording;
|
|
128
|
+
private withHistoryTransaction;
|
|
124
129
|
private get selectedClipId();
|
|
125
130
|
private set selectedClipId(value);
|
|
126
131
|
private ensureConfigState;
|
|
@@ -215,6 +220,8 @@ export declare class TimelineManager {
|
|
|
215
220
|
private animate;
|
|
216
221
|
private syncPlaybackClockToPreviewBuffering;
|
|
217
222
|
private clearPreviewBufferingSuspendTimeout;
|
|
223
|
+
/** 播放头不得超过全部片段的最大 endTime(与 canPlay / 播放结束对齐);无片段时不设上限(由别处处理空轨道) */
|
|
224
|
+
private clampPlaybackSeekTime;
|
|
218
225
|
setCurrentTime(time: TimeMs): void;
|
|
219
226
|
getCurrentTime(): TimeMs;
|
|
220
227
|
setEnableClipSnap(enabled: boolean): void;
|
|
@@ -340,6 +347,9 @@ export declare class TimelineManager {
|
|
|
340
347
|
private buildGeneratedAudioClipName;
|
|
341
348
|
private normalizeGeneratedAudioDuration;
|
|
342
349
|
private getVoiceLinkedAudioClips;
|
|
350
|
+
private hasVoiceLinkedAudioClipsToRegenerate;
|
|
351
|
+
private scheduleVoiceLinkedTextRegeneration;
|
|
352
|
+
private flushPendingVoiceLinkedTextRegeneration;
|
|
343
353
|
private applyGeneratedAudioClipResult;
|
|
344
354
|
private syncTextClipDurationToAudio;
|
|
345
355
|
private doesClipOverlapOnTrack;
|
|
@@ -349,6 +359,7 @@ export declare class TimelineManager {
|
|
|
349
359
|
private relocateClipToAvoidOverlap;
|
|
350
360
|
private buildClipboardPasteGroups;
|
|
351
361
|
private createTracksForTypeBoundary;
|
|
362
|
+
private selectBestClipboardPasteStartIndex;
|
|
352
363
|
private buildClipboardPasteGroupPlacementClips;
|
|
353
364
|
private ensureClipboardPasteSourceTracks;
|
|
354
365
|
private resolveClipboardPasteTypeGroupAssignments;
|
|
@@ -539,6 +550,14 @@ export declare class TimelineManager {
|
|
|
539
550
|
private haveSameClipIds;
|
|
540
551
|
private restoreDraggedClipSnapshot;
|
|
541
552
|
private syncMultiDragPeerClips;
|
|
553
|
+
private createMultiDragPlacementContext;
|
|
554
|
+
private doesMultiDragPlacementOverlap;
|
|
555
|
+
private reserveMultiDragPlacement;
|
|
556
|
+
private registerMultiDragPlacementTrack;
|
|
557
|
+
private findNearestAvailableTrackForMultiDragPlacement;
|
|
558
|
+
private resolveMultiDragOverlapTargetTrackId;
|
|
559
|
+
private commitMultiDragPlacements;
|
|
560
|
+
private finalizeMultiDragSameTrack;
|
|
542
561
|
private previewMultiDragCrossTrack;
|
|
543
562
|
private finalizeMultiDragCrossTrack;
|
|
544
563
|
private resolveTrackIndexDelta;
|
|
@@ -551,7 +570,6 @@ export declare class TimelineManager {
|
|
|
551
570
|
private ensureTrackIdByRelativeIndex;
|
|
552
571
|
private findTrackIdByRelativeIndex;
|
|
553
572
|
private getTrackIdsByType;
|
|
554
|
-
private updateClipPositionWithHistory;
|
|
555
573
|
private updateClipPositionSilently;
|
|
556
574
|
private ensureSelectionBoxRect;
|
|
557
575
|
private showSelectionBoxRect;
|
|
@@ -2,6 +2,7 @@ import { HistoryManager } from '../history/history';
|
|
|
2
2
|
import type { Action, Clip, ClipStateUpdate, Track, TrackRestoreAnchor } from '../models/types';
|
|
3
3
|
export declare class TimelineHistoryRecorder {
|
|
4
4
|
private readonly history;
|
|
5
|
+
private readonly transactionStack;
|
|
5
6
|
constructor(history: HistoryManager);
|
|
6
7
|
createAddClipAction(clip: Clip): Action;
|
|
7
8
|
recordAddClip(clip: Clip): Action;
|
|
@@ -16,5 +17,10 @@ export declare class TimelineHistoryRecorder {
|
|
|
16
17
|
createSeparateClipAudioAction(videoClipBefore: Clip, videoClipAfter: Clip, audioClip: Clip | null, audioTrackId: string | null): Action;
|
|
17
18
|
createRestoreClipAudioAction(videoClipBefore: Clip, videoClipAfter: Clip, audioClip: Clip | null, audioTrackId: string | null): Action;
|
|
18
19
|
recordCompoundAction(actions: Action[], label?: string): Action | null;
|
|
19
|
-
|
|
20
|
+
createClipUpdateAction(clip: Clip, originalClip?: Clip, clipUpdates?: ClipStateUpdate[]): Action | null;
|
|
21
|
+
withTransaction<T>(label: string | undefined, callback: () => T): T;
|
|
22
|
+
withTransaction<T>(label: string | undefined, callback: () => Promise<T>): Promise<T>;
|
|
23
|
+
recordAction(action: Action): Action;
|
|
24
|
+
private finalizeTransaction;
|
|
25
|
+
private normalizeTransactionActions;
|
|
20
26
|
}
|