easecut-react 1.1.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/LICENSE +21 -0
- package/README.md +224 -0
- package/dist/.dist-D4zXwUWp.js +81 -0
- package/dist/assets/audio-waveform.worker-DiTI_wJb.js +353 -0
- package/dist/assets/fonts/alibaba-puhuiti-2-regular.woff2 +0 -0
- package/dist/assets/fonts/licenses/source-han-sans-OFL-1.1.txt +96 -0
- package/dist/assets/fonts/licenses/zcool-gaoduanhei-usage-statement.txt +52 -0
- package/dist/assets/fonts/source-han-sans-cn-regular.otf +0 -0
- package/dist/assets/fonts/zcool-canger-yuyang-w03.ttf +0 -0
- package/dist/assets/fonts/zcool-gaoduanhei.ttf +0 -0
- package/dist/assets/fonts/zcool-kuaile.ttf +0 -0
- package/dist/assets/fonts/zcool-kuhei.ttf +0 -0
- package/dist/assets/fonts/zcool-wenyi.ttf +0 -0
- package/dist/assets/fonts/zcool-xiaowei-logo.otf +0 -0
- package/dist/assets/frame-preview.worker-ruBHl77w.js +345 -0
- package/dist/assets/soundtouch-processor-BKTidsbT.js +2062 -0
- package/dist/index.js +10802 -0
- package/dist/styles.css +1 -0
- package/dist/types/editor/EaseCut.d.ts +4 -0
- package/dist/types/editor/EaseCut.d.ts.map +1 -0
- package/dist/types/editor/api/create-easecut-api.d.ts +12 -0
- package/dist/types/editor/api/create-easecut-api.d.ts.map +1 -0
- package/dist/types/editor/api/easecut-api-context.d.ts +12 -0
- package/dist/types/editor/api/easecut-api-context.d.ts.map +1 -0
- package/dist/types/editor/api/errors.d.ts +6 -0
- package/dist/types/editor/api/errors.d.ts.map +1 -0
- package/dist/types/editor/api/index.d.ts +3 -0
- package/dist/types/editor/api/index.d.ts.map +1 -0
- package/dist/types/editor/api/source-input.d.ts +7 -0
- package/dist/types/editor/api/source-input.d.ts.map +1 -0
- package/dist/types/editor/api/source-store.d.ts +16 -0
- package/dist/types/editor/api/source-store.d.ts.map +1 -0
- package/dist/types/editor/api/types.d.ts +78 -0
- package/dist/types/editor/api/types.d.ts.map +1 -0
- package/dist/types/editor/components/AudioFloatingInspector.d.ts +10 -0
- package/dist/types/editor/components/AudioFloatingInspector.d.ts.map +1 -0
- package/dist/types/editor/components/CanvasRatioPanel.d.ts +2 -0
- package/dist/types/editor/components/CanvasRatioPanel.d.ts.map +1 -0
- package/dist/types/editor/components/ExportMenu.d.ts +8 -0
- package/dist/types/editor/components/ExportMenu.d.ts.map +1 -0
- package/dist/types/editor/components/FloatingInspector.d.ts +11 -0
- package/dist/types/editor/components/FloatingInspector.d.ts.map +1 -0
- package/dist/types/editor/components/FloatingInspectorBasicPanel.d.ts +10 -0
- package/dist/types/editor/components/FloatingInspectorBasicPanel.d.ts.map +1 -0
- package/dist/types/editor/components/FloatingInspectorShell.d.ts +15 -0
- package/dist/types/editor/components/FloatingInspectorShell.d.ts.map +1 -0
- package/dist/types/editor/components/FloatingInspectorSpeedPanel.d.ts +7 -0
- package/dist/types/editor/components/FloatingInspectorSpeedPanel.d.ts.map +1 -0
- package/dist/types/editor/components/FormDialog.d.ts +16 -0
- package/dist/types/editor/components/FormDialog.d.ts.map +1 -0
- package/dist/types/editor/components/PreviewPanel.d.ts +9 -0
- package/dist/types/editor/components/PreviewPanel.d.ts.map +1 -0
- package/dist/types/editor/components/TextFloatingInspector.d.ts +12 -0
- package/dist/types/editor/components/TextFloatingInspector.d.ts.map +1 -0
- package/dist/types/editor/components/TimelineToolbar.d.ts +8 -0
- package/dist/types/editor/components/TimelineToolbar.d.ts.map +1 -0
- package/dist/types/editor/components/TitleContentTextarea.d.ts +8 -0
- package/dist/types/editor/components/TitleContentTextarea.d.ts.map +1 -0
- package/dist/types/editor/components/VideoFloatingInspector.d.ts +12 -0
- package/dist/types/editor/components/VideoFloatingInspector.d.ts.map +1 -0
- package/dist/types/editor/components/ui/ColorInput.d.ts +15 -0
- package/dist/types/editor/components/ui/ColorInput.d.ts.map +1 -0
- package/dist/types/editor/components/ui/IconButton.d.ts +15 -0
- package/dist/types/editor/components/ui/IconButton.d.ts.map +1 -0
- package/dist/types/editor/components/ui/InputNumber.d.ts +13 -0
- package/dist/types/editor/components/ui/InputNumber.d.ts.map +1 -0
- package/dist/types/editor/components/ui/Select.d.ts +14 -0
- package/dist/types/editor/components/ui/Select.d.ts.map +1 -0
- package/dist/types/editor/components/ui/TextInput.d.ts +10 -0
- package/dist/types/editor/components/ui/TextInput.d.ts.map +1 -0
- package/dist/types/editor/core/audio-waveform-bars.d.ts +50 -0
- package/dist/types/editor/core/audio-waveform-bars.d.ts.map +1 -0
- package/dist/types/editor/core/canvas-size.d.ts +44 -0
- package/dist/types/editor/core/canvas-size.d.ts.map +1 -0
- package/dist/types/editor/core/clip-speed.d.ts +11 -0
- package/dist/types/editor/core/clip-speed.d.ts.map +1 -0
- package/dist/types/editor/core/collision.d.ts +96 -0
- package/dist/types/editor/core/collision.d.ts.map +1 -0
- package/dist/types/editor/core/composition.d.ts +47 -0
- package/dist/types/editor/core/composition.d.ts.map +1 -0
- package/dist/types/editor/core/export-schema.d.ts +5 -0
- package/dist/types/editor/core/export-schema.d.ts.map +1 -0
- package/dist/types/editor/core/index.d.ts +11 -0
- package/dist/types/editor/core/index.d.ts.map +1 -0
- package/dist/types/editor/core/model.d.ts +187 -0
- package/dist/types/editor/core/model.d.ts.map +1 -0
- package/dist/types/editor/core/preview-snapping.d.ts +27 -0
- package/dist/types/editor/core/preview-snapping.d.ts.map +1 -0
- package/dist/types/editor/core/text-fonts.d.ts +76 -0
- package/dist/types/editor/core/text-fonts.d.ts.map +1 -0
- package/dist/types/editor/core/time.d.ts +15 -0
- package/dist/types/editor/core/time.d.ts.map +1 -0
- package/dist/types/editor/core/timeline-commands.d.ts +143 -0
- package/dist/types/editor/core/timeline-commands.d.ts.map +1 -0
- package/dist/types/editor/core/timeline-layout.d.ts +25 -0
- package/dist/types/editor/core/timeline-layout.d.ts.map +1 -0
- package/dist/types/editor/core/timeline-math.d.ts +22 -0
- package/dist/types/editor/core/timeline-math.d.ts.map +1 -0
- package/dist/types/editor/core/timeline-tracks.d.ts +47 -0
- package/dist/types/editor/core/timeline-tracks.d.ts.map +1 -0
- package/dist/types/editor/media/audio-waveform-peaks.d.ts +17 -0
- package/dist/types/editor/media/audio-waveform-peaks.d.ts.map +1 -0
- package/dist/types/editor/media/audio-waveform.d.ts +8 -0
- package/dist/types/editor/media/audio-waveform.d.ts.map +1 -0
- package/dist/types/editor/media/frame-preview.d.ts +25 -0
- package/dist/types/editor/media/frame-preview.d.ts.map +1 -0
- package/dist/types/editor/media/index.d.ts +6 -0
- package/dist/types/editor/media/index.d.ts.map +1 -0
- package/dist/types/editor/media/media-runtime.d.ts +47 -0
- package/dist/types/editor/media/media-runtime.d.ts.map +1 -0
- package/dist/types/editor/media/mediabunny-audio-waveform.d.ts +8 -0
- package/dist/types/editor/media/mediabunny-audio-waveform.d.ts.map +1 -0
- package/dist/types/editor/media/mediabunny-frame-preview.d.ts +21 -0
- package/dist/types/editor/media/mediabunny-frame-preview.d.ts.map +1 -0
- package/dist/types/editor/media/preview-audio-engine.d.ts +23 -0
- package/dist/types/editor/media/preview-audio-engine.d.ts.map +1 -0
- package/dist/types/editor/media/preview-playback-controller.d.ts +26 -0
- package/dist/types/editor/media/preview-playback-controller.d.ts.map +1 -0
- package/dist/types/editor/media/single-frame-preview.d.ts +30 -0
- package/dist/types/editor/media/single-frame-preview.d.ts.map +1 -0
- package/dist/types/editor/media/text-layout-runtime.d.ts +27 -0
- package/dist/types/editor/media/text-layout-runtime.d.ts.map +1 -0
- package/dist/types/editor/store/index.d.ts +3 -0
- package/dist/types/editor/store/index.d.ts.map +1 -0
- package/dist/types/editor/store/timeline-store-context.d.ts +14 -0
- package/dist/types/editor/store/timeline-store-context.d.ts.map +1 -0
- package/dist/types/editor/store/timeline-store.d.ts +115 -0
- package/dist/types/editor/store/timeline-store.d.ts.map +1 -0
- package/dist/types/editor/timeline/AudioWaveformCanvas.d.ts +13 -0
- package/dist/types/editor/timeline/AudioWaveformCanvas.d.ts.map +1 -0
- package/dist/types/editor/timeline/TimelineClip.d.ts +41 -0
- package/dist/types/editor/timeline/TimelineClip.d.ts.map +1 -0
- package/dist/types/editor/timeline/TimelineDragGhost.d.ts +9 -0
- package/dist/types/editor/timeline/TimelineDragGhost.d.ts.map +1 -0
- package/dist/types/editor/timeline/TimelinePanel.d.ts +11 -0
- package/dist/types/editor/timeline/TimelinePanel.d.ts.map +1 -0
- package/dist/types/editor/timeline/TimelineRuler.d.ts +14 -0
- package/dist/types/editor/timeline/TimelineRuler.d.ts.map +1 -0
- package/dist/types/editor/timeline/TimelineTrimHandle.d.ts +12 -0
- package/dist/types/editor/timeline/TimelineTrimHandle.d.ts.map +1 -0
- package/dist/types/editor/timeline/TimelineViewport.d.ts +8 -0
- package/dist/types/editor/timeline/TimelineViewport.d.ts.map +1 -0
- package/dist/types/editor/timeline/clip-reveal.d.ts +29 -0
- package/dist/types/editor/timeline/clip-reveal.d.ts.map +1 -0
- package/dist/types/editor/timeline/timeline-interaction.d.ts +79 -0
- package/dist/types/editor/timeline/timeline-interaction.d.ts.map +1 -0
- package/dist/types/editor/timeline/useTimelineController.d.ts +22 -0
- package/dist/types/editor/timeline/useTimelineController.d.ts.map +1 -0
- package/dist/types/editor/types.d.ts +52 -0
- package/dist/types/editor/types.d.ts.map +1 -0
- package/dist/types/editor/util/abort-error.d.ts +3 -0
- package/dist/types/editor/util/abort-error.d.ts.map +1 -0
- package/dist/types/editor/util/browser.d.ts +5 -0
- package/dist/types/editor/util/browser.d.ts.map +1 -0
- package/dist/types/editor/util/format-canvas-font.d.ts +7 -0
- package/dist/types/editor/util/format-canvas-font.d.ts.map +1 -0
- package/dist/types/editor/util/format-media-label.d.ts +4 -0
- package/dist/types/editor/util/format-media-label.d.ts.map +1 -0
- package/dist/types/editor/util/format-text-color.d.ts +4 -0
- package/dist/types/editor/util/format-text-color.d.ts.map +1 -0
- package/dist/types/editor/util/format-timeline-time.d.ts +6 -0
- package/dist/types/editor/util/format-timeline-time.d.ts.map +1 -0
- package/dist/types/editor/util/id.d.ts +2 -0
- package/dist/types/editor/util/id.d.ts.map +1 -0
- package/dist/types/editor/util/media-file-format.d.ts +6 -0
- package/dist/types/editor/util/media-file-format.d.ts.map +1 -0
- package/dist/types/editor/util/number.d.ts +6 -0
- package/dist/types/editor/util/number.d.ts.map +1 -0
- package/dist/types/editor/util/text.d.ts +2 -0
- package/dist/types/editor/util/text.d.ts.map +1 -0
- package/dist/types/editor/util/url.d.ts +5 -0
- package/dist/types/editor/util/url.d.ts.map +1 -0
- package/dist/types/editor/util/value.d.ts +3 -0
- package/dist/types/editor/util/value.d.ts.map +1 -0
- package/dist/types/editor/workers/audio-waveform-protocol.d.ts +24 -0
- package/dist/types/editor/workers/audio-waveform-protocol.d.ts.map +1 -0
- package/dist/types/editor/workers/audio-waveform.worker.d.ts +2 -0
- package/dist/types/editor/workers/audio-waveform.worker.d.ts.map +1 -0
- package/dist/types/editor/workers/frame-preview-protocol.d.ts +35 -0
- package/dist/types/editor/workers/frame-preview-protocol.d.ts.map +1 -0
- package/dist/types/editor/workers/frame-preview.worker.d.ts +2 -0
- package/dist/types/editor/workers/frame-preview.worker.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { TimelineClipSpeed } from './model';
|
|
2
|
+
export declare const AUDIO_WAVEFORM_BAR_SPACING_PIXELS = 2;
|
|
3
|
+
export declare const AUDIO_WAVEFORM_TILE_WIDTH_PIXELS = 1024;
|
|
4
|
+
export type AudioWaveformBar = Readonly<{
|
|
5
|
+
height: number;
|
|
6
|
+
width: number;
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
}>;
|
|
10
|
+
export type AudioWaveformTile = Readonly<{
|
|
11
|
+
index: number;
|
|
12
|
+
left: number;
|
|
13
|
+
sourceStartUs: number;
|
|
14
|
+
width: number;
|
|
15
|
+
}>;
|
|
16
|
+
export type AudioWaveformBitmapSize = Readonly<{
|
|
17
|
+
height: number;
|
|
18
|
+
pixelRatio: number;
|
|
19
|
+
width: number;
|
|
20
|
+
}>;
|
|
21
|
+
type AudioWaveformBarOptions = Readonly<{
|
|
22
|
+
height: number;
|
|
23
|
+
pixelsPerSecond: number;
|
|
24
|
+
sourceDurationUs: number;
|
|
25
|
+
sourceStartUs: number;
|
|
26
|
+
volume: number;
|
|
27
|
+
width: number;
|
|
28
|
+
}>;
|
|
29
|
+
type AudioWaveformTileOptions = Readonly<{
|
|
30
|
+
clipDurationUs: number;
|
|
31
|
+
pixelsPerSecond: number;
|
|
32
|
+
speed: TimelineClipSpeed;
|
|
33
|
+
timelineStartUs: number;
|
|
34
|
+
trimStartUs: number;
|
|
35
|
+
visibleTimeEndUs: number;
|
|
36
|
+
visibleTimeStartUs: number;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const getAudioWaveformBitmapSize: (width: number, height: number, devicePixelRatio: number) => AudioWaveformBitmapSize;
|
|
39
|
+
/**
|
|
40
|
+
* Returns fixed, clip-anchored canvases for the visible range. Stable tile
|
|
41
|
+
* geometry lets native scrolling move existing bitmaps without resizing them.
|
|
42
|
+
*/
|
|
43
|
+
export declare const getAudioWaveformTiles: ({ clipDurationUs, pixelsPerSecond, speed, timelineStartUs, trimStartUs, visibleTimeEndUs, visibleTimeStartUs, }: AudioWaveformTileOptions) => AudioWaveformTile[];
|
|
44
|
+
/**
|
|
45
|
+
* Draws a fixed two-pixel bar grid anchored at source time zero. Trimming only
|
|
46
|
+
* changes the viewport into this grid, so overlapping source content is stable.
|
|
47
|
+
*/
|
|
48
|
+
export declare const getAudioWaveformBars: (samples: readonly number[], { height, pixelsPerSecond, sourceDurationUs, sourceStartUs, volume, width, }: AudioWaveformBarOptions) => AudioWaveformBar[];
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=audio-waveform-bars.d.ts.map
|
|
@@ -0,0 +1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,EAAE,MAAM,CAAC;CAC5B,CAAC,CAAC;AAKH,eAAO,MAAM,0BAA0B,GACrC,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,kBAAkB,MAAM,KACvB,uBASF,CAAC;AAiDF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,iHAQnC,wBAAwB,KAAG,iBAAiB,EAsE9C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,SAAS,MAAM,EAAE,EAC1B,8EAOG,uBAAuB,KACzB,gBAAgB,EAwDlB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type TimelineCanvasPreset, type TimelineCanvasSelection, type TimelineCanvasSize, type TimelineClip } from './model';
|
|
2
|
+
export declare const DEFAULT_COMPOSITION_CANVAS_SIZE: TimelineCanvasSize;
|
|
3
|
+
export declare const COMPOSITION_CANVAS_PRESET_NAMES: readonly ["16:9", "4:3", "2:1", "9:16", "1:1", "3:4"];
|
|
4
|
+
export declare const COMPOSITION_CANVAS_PRESETS: {
|
|
5
|
+
readonly '16:9': {
|
|
6
|
+
readonly height: 720;
|
|
7
|
+
readonly width: 1280;
|
|
8
|
+
};
|
|
9
|
+
readonly '4:3': {
|
|
10
|
+
readonly height: 720;
|
|
11
|
+
readonly width: 960;
|
|
12
|
+
};
|
|
13
|
+
readonly '2:1': {
|
|
14
|
+
readonly height: 720;
|
|
15
|
+
readonly width: 1440;
|
|
16
|
+
};
|
|
17
|
+
readonly '9:16': {
|
|
18
|
+
readonly height: 1280;
|
|
19
|
+
readonly width: 720;
|
|
20
|
+
};
|
|
21
|
+
readonly '1:1': {
|
|
22
|
+
readonly height: 720;
|
|
23
|
+
readonly width: 720;
|
|
24
|
+
};
|
|
25
|
+
readonly '3:4': {
|
|
26
|
+
readonly height: 960;
|
|
27
|
+
readonly width: 720;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export type CompositionCanvasPreset = TimelineCanvasPreset;
|
|
31
|
+
export type CompositionCanvasSelection = TimelineCanvasSelection;
|
|
32
|
+
type CanvasSourceCandidate = {
|
|
33
|
+
height?: number;
|
|
34
|
+
type: string;
|
|
35
|
+
width?: number;
|
|
36
|
+
};
|
|
37
|
+
export declare const findOriginalCanvasSize: (sources: readonly CanvasSourceCandidate[]) => TimelineCanvasSize | null;
|
|
38
|
+
export declare const getOriginalCanvasSize: (sources: readonly CanvasSourceCandidate[]) => TimelineCanvasSize;
|
|
39
|
+
export declare const areCanvasSizesEqual: (left: TimelineCanvasSize, right: TimelineCanvasSize) => boolean;
|
|
40
|
+
export declare const getCanvasSizeForSelection: (selection: CompositionCanvasSelection, originalCanvasSize: TimelineCanvasSize | null) => TimelineCanvasSize;
|
|
41
|
+
export declare const findCanvasSelection: (canvasSize: TimelineCanvasSize, originalCanvasSize: TimelineCanvasSize | null) => CompositionCanvasSelection | null;
|
|
42
|
+
export declare const resizeClipsForCanvas: (clips: readonly TimelineClip[], referenceSize: TimelineCanvasSize, currentSize: TimelineCanvasSize, nextSize: TimelineCanvasSize) => TimelineClip[];
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=canvas-size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canvas-size.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/canvas-size.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAElB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,+BAA+B,EAAE,kBAG7C,CAAC;AAEF,eAAO,MAAM,+BAA+B,uDAOQ,CAAC;AAErD,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;CAO8B,CAAC;AAEtE,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAC3D,MAAM,MAAM,0BAA0B,GAAG,uBAAuB,CAAC;AAEjE,KAAK,qBAAqB,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAKF,eAAO,MAAM,sBAAsB,GACjC,SAAS,SAAS,qBAAqB,EAAE,KACxC,kBAAkB,GAAG,IAWvB,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,SAAS,SAAS,qBAAqB,EAAE,KACxC,kBACwE,CAAC;AAE5E,eAAO,MAAM,mBAAmB,GAC9B,MAAM,kBAAkB,EACxB,OAAO,kBAAkB,YACoC,CAAC;AAEhE,eAAO,MAAM,yBAAyB,GACpC,WAAW,0BAA0B,EACrC,oBAAoB,kBAAkB,GAAG,IAAI,KAC5C,kBAGwC,CAAC;AAE5C,eAAO,MAAM,mBAAmB,GAC9B,YAAY,kBAAkB,EAC9B,oBAAoB,kBAAkB,GAAG,IAAI,KAC5C,0BAA0B,GAAG,IAa/B,CAAC;AAyCF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,SAAS,YAAY,EAAE,EAC9B,eAAe,kBAAkB,EACjC,aAAa,kBAAkB,EAC/B,UAAU,kBAAkB,KAC3B,YAAY,EAsCd,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TimelineTimedMediaClip, TimelineClipSpeed } from './model';
|
|
2
|
+
export declare const DEFAULT_CLIP_SPEED: TimelineClipSpeed;
|
|
3
|
+
export declare const MIN_CLIP_SPEED: TimelineClipSpeed;
|
|
4
|
+
export declare const MAX_CLIP_SPEED: TimelineClipSpeed;
|
|
5
|
+
export declare const isValidClipSpeed: (speed: number) => speed is TimelineClipSpeed;
|
|
6
|
+
export declare const sourceTimeToSpeedAdjustedTimeUs: (sourceTimeUs: number, speed: TimelineClipSpeed) => number;
|
|
7
|
+
export declare const getSpeedAdjustedDurationUs: (trimStartUs: number, trimEndUs: number, speed: TimelineClipSpeed) => number;
|
|
8
|
+
export declare const scaleTimelineOffsetToSourceUs: (timelineOffsetUs: number, speed: TimelineClipSpeed) => number;
|
|
9
|
+
export declare const timelineTimeToClipSourceTimeUs: (clip: Pick<TimelineTimedMediaClip, "durationUs" | "speed" | "startUs" | "trimEndUs" | "trimStartUs">, timelineTimeUs: number) => number;
|
|
10
|
+
export declare const getSpeedAdjustedPixelsPerSecond: (pixelsPerSecond: number, speed: TimelineClipSpeed) => number;
|
|
11
|
+
//# sourceMappingURL=clip-speed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clip-speed.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/clip-speed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGzE,eAAO,MAAM,kBAAkB,EAAE,iBAAqB,CAAC;AACvD,eAAO,MAAM,cAAc,EAAE,iBAAuB,CAAC;AACrD,eAAO,MAAM,cAAc,EAAE,iBAAqB,CAAC;AAEnD,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,KACZ,KAAK,IAAI,iBAGa,CAAC;AAE1B,eAAO,MAAM,+BAA+B,GAC1C,cAAc,MAAM,EACpB,OAAO,iBAAiB,WAUzB,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,OAAO,iBAAiB,WAczB,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,kBAAkB,MAAM,EACxB,OAAO,iBAAiB,WAczB,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACzC,MAAM,IAAI,CACR,sBAAsB,EACpB,YAAY,GACZ,OAAO,GACP,SAAS,GACT,WAAW,GACX,aAAa,CAChB,EACD,gBAAgB,MAAM,WAoBvB,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAC1C,iBAAiB,MAAM,EACvB,OAAO,iBAAiB,WAUzB,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { TimelineClip } from './model';
|
|
2
|
+
type ClipMoveSnapEdge = 'start' | 'end';
|
|
3
|
+
type ClipInsertionLayout = {
|
|
4
|
+
clips: TimelineClip[];
|
|
5
|
+
insertedStartUs: number;
|
|
6
|
+
shiftedClipIds: string[];
|
|
7
|
+
};
|
|
8
|
+
type PreservedGapInsertionLayoutOptions = {
|
|
9
|
+
allowTrailingFreeStart?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const sortClipsByStart: (clips: TimelineClip[]) => TimelineClip[];
|
|
12
|
+
export declare const getTrackClips: (clips: TimelineClip[], trackId: string) => TimelineClip[];
|
|
13
|
+
export declare const layoutTrackSequentially: (clips: TimelineClip[]) => ({
|
|
14
|
+
startUs: number;
|
|
15
|
+
zIndex: number;
|
|
16
|
+
durationUs: number;
|
|
17
|
+
hidden: boolean;
|
|
18
|
+
id: string;
|
|
19
|
+
trackId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
sourceId: string;
|
|
22
|
+
src: string;
|
|
23
|
+
transform: import("./model").TimelineClipTransform;
|
|
24
|
+
type: "image";
|
|
25
|
+
} | {
|
|
26
|
+
startUs: number;
|
|
27
|
+
zIndex: number;
|
|
28
|
+
durationUs: number;
|
|
29
|
+
hidden: boolean;
|
|
30
|
+
id: string;
|
|
31
|
+
trackId: string;
|
|
32
|
+
name: string;
|
|
33
|
+
sourceId: string;
|
|
34
|
+
src: string;
|
|
35
|
+
sourceDurationUs: number;
|
|
36
|
+
speed: import("./model").TimelineClipSpeed;
|
|
37
|
+
trimEndUs: number;
|
|
38
|
+
trimStartUs: number;
|
|
39
|
+
transform: import("./model").TimelineClipTransform;
|
|
40
|
+
volume: import("./model").TimelineClipVolume;
|
|
41
|
+
waveformSrc?: string;
|
|
42
|
+
type: "video";
|
|
43
|
+
} | {
|
|
44
|
+
startUs: number;
|
|
45
|
+
zIndex: number;
|
|
46
|
+
durationUs: number;
|
|
47
|
+
hidden: boolean;
|
|
48
|
+
id: string;
|
|
49
|
+
trackId: string;
|
|
50
|
+
name: string;
|
|
51
|
+
sourceId: string;
|
|
52
|
+
src: string;
|
|
53
|
+
sourceDurationUs: number;
|
|
54
|
+
speed: import("./model").TimelineClipSpeed;
|
|
55
|
+
trimEndUs: number;
|
|
56
|
+
trimStartUs: number;
|
|
57
|
+
transform: import("./model").TimelineClipTransform;
|
|
58
|
+
volume: import("./model").TimelineClipVolume;
|
|
59
|
+
waveformSrc?: string;
|
|
60
|
+
type: "audio";
|
|
61
|
+
} | {
|
|
62
|
+
startUs: number;
|
|
63
|
+
zIndex: number;
|
|
64
|
+
durationUs: number;
|
|
65
|
+
hidden: boolean;
|
|
66
|
+
id: string;
|
|
67
|
+
trackId: string;
|
|
68
|
+
bold: boolean;
|
|
69
|
+
fontColor: string;
|
|
70
|
+
fontSize: number;
|
|
71
|
+
fontType: import("./text-fonts").TimelineTextFontType;
|
|
72
|
+
italic: boolean;
|
|
73
|
+
layoutSize: import("./model").TimelineTextLayoutSize;
|
|
74
|
+
position: import("./model").TimelineClipPosition;
|
|
75
|
+
text: string;
|
|
76
|
+
type: "text";
|
|
77
|
+
underline: boolean;
|
|
78
|
+
})[];
|
|
79
|
+
export declare const relayoutTrackInClipSet: (allClips: TimelineClip[], trackId: string) => TimelineClip[];
|
|
80
|
+
export declare const getTimelineDuration: (clips: TimelineClip[]) => number;
|
|
81
|
+
export declare const getInsertionIndex: (trackClips: TimelineClip[], draggedClipId: string, draggedClipX: number, draggedClipWidth: number, pixelsPerSecond: number) => number;
|
|
82
|
+
export declare const getPreservedGapInsertionLayout: (trackClips: TimelineClip[], draggedClip: TimelineClip, insertionIndex: number, candidateStartUs: number, options?: PreservedGapInsertionLayoutOptions) => ClipInsertionLayout;
|
|
83
|
+
export declare const getCompactInsertionLayout: (trackClips: TimelineClip[], draggedClip: TimelineClip, insertionIndex: number) => ClipInsertionLayout;
|
|
84
|
+
export declare const planClipInsertion: (trackClips: TimelineClip[], draggedClip: TimelineClip, insertionIndex: number, candidateStartUs: number, compact: boolean) => ClipInsertionLayout;
|
|
85
|
+
export declare const getClipSnapCandidates: (clips: TimelineClip[], draggedClipId?: string) => number[];
|
|
86
|
+
export declare const snapTimeUsToCandidates: (timeUs: number, candidates: number[], pixelsPerSecond: number, thresholdPx: number) => {
|
|
87
|
+
snappedTimeUs: number;
|
|
88
|
+
snappedToUs: number | null;
|
|
89
|
+
};
|
|
90
|
+
export declare const snapClipMoveToCandidates: (startUs: number, durationUs: number, candidates: number[], pixelsPerSecond: number, thresholdPx: number) => {
|
|
91
|
+
snappedEdge: ClipMoveSnapEdge | null;
|
|
92
|
+
snappedStartUs: number;
|
|
93
|
+
snappedToUs: number | null;
|
|
94
|
+
};
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=collision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collision.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/collision.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,KAAK,gBAAgB,GAAG,OAAO,GAAG,KAAK,CAAC;AAMxC,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,KAAK,kCAAkC,GAAG;IACxC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAIF,eAAO,MAAM,gBAAgB,GAAI,OAAO,YAAY,EAAE,mBAGnD,CAAC;AAEJ,eAAO,MAAM,aAAa,GAAI,OAAO,YAAY,EAAE,EAAE,SAAS,MAAM,mBACA,CAAC;AAErE,eAAO,MAAM,uBAAuB,GAAI,OAAO,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAY5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,UAAU,YAAY,EAAE,EACxB,SAAS,MAAM,mBAQhB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,YAAY,EAAE,WAItD,CAAC;AAEJ,eAAO,MAAM,iBAAiB,GAC5B,YAAY,YAAY,EAAE,EAC1B,eAAe,MAAM,EACrB,cAAc,MAAM,EACpB,kBAAkB,MAAM,EACxB,iBAAiB,MAAM,WAuBxB,CAAC;AAEF,eAAO,MAAM,8BAA8B,GACzC,YAAY,YAAY,EAAE,EAC1B,aAAa,YAAY,EACzB,gBAAgB,MAAM,EACtB,kBAAkB,MAAM,EACxB,UAAS,kCAAuC,KAC/C,mBA4DF,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,YAAY,YAAY,EAAE,EAC1B,aAAa,YAAY,EACzB,gBAAgB,MAAM,KACrB,mBAgCF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,YAAY,YAAY,EAAE,EAC1B,aAAa,YAAY,EACzB,gBAAgB,MAAM,EACtB,kBAAkB,MAAM,EACxB,SAAS,OAAO,wBASX,CAAC;AAER,eAAO,MAAM,qBAAqB,GAChC,OAAO,YAAY,EAAE,EACrB,gBAAgB,MAAM,aAMvB,CAAC;AA8BF,eAAO,MAAM,sBAAsB,GACjC,QAAQ,MAAM,EACd,YAAY,MAAM,EAAE,EACpB,iBAAiB,MAAM,EACvB,aAAa,MAAM;;;CAgBpB,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,SAAS,MAAM,EACf,YAAY,MAAM,EAClB,YAAY,MAAM,EAAE,EACpB,iBAAiB,MAAM,EACvB,aAAa,MAAM;;;;CAmDpB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { TimelineCanvasSize, TimelineClip, TimelineImageClip, TimelineTimedMediaClip, TimelineClipTransform, TimelineProject, TimelineTextClip, TimelineTrack } from './model';
|
|
2
|
+
export type CompositionSnapshotInput = Readonly<{
|
|
3
|
+
canvasSize: TimelineCanvasSize;
|
|
4
|
+
clips: readonly TimelineClip[];
|
|
5
|
+
schemaVersion?: TimelineProject['schemaVersion'];
|
|
6
|
+
tracks: readonly TimelineTrack[];
|
|
7
|
+
}>;
|
|
8
|
+
export type CompositionSnapshot = Readonly<{
|
|
9
|
+
canvasSize: TimelineCanvasSize;
|
|
10
|
+
clips: readonly TimelineClip[];
|
|
11
|
+
schemaVersion: 12;
|
|
12
|
+
tracks: readonly TimelineTrack[];
|
|
13
|
+
}>;
|
|
14
|
+
export type CompositionVideoGap = Readonly<{
|
|
15
|
+
endUs: number;
|
|
16
|
+
startUs: number;
|
|
17
|
+
}>;
|
|
18
|
+
export type CompositionMediaLayer = Readonly<{
|
|
19
|
+
clip: TimelineTimedMediaClip;
|
|
20
|
+
sourceTimeUs: number;
|
|
21
|
+
track: TimelineTrack;
|
|
22
|
+
transform: TimelineClipTransform;
|
|
23
|
+
volume: number;
|
|
24
|
+
}>;
|
|
25
|
+
export type CompositionImageLayer = Readonly<{
|
|
26
|
+
clip: TimelineImageClip;
|
|
27
|
+
track: TimelineTrack;
|
|
28
|
+
transform: TimelineClipTransform;
|
|
29
|
+
}>;
|
|
30
|
+
export type CompositionTextLayer = Readonly<{
|
|
31
|
+
clip: TimelineTextClip;
|
|
32
|
+
track: TimelineTrack;
|
|
33
|
+
transform: TimelineClipTransform;
|
|
34
|
+
}>;
|
|
35
|
+
export type CompositionEvaluation = Readonly<{
|
|
36
|
+
audioLayers: readonly CompositionMediaLayer[];
|
|
37
|
+
imageLayers: readonly CompositionImageLayer[];
|
|
38
|
+
textLayers: readonly CompositionTextLayer[];
|
|
39
|
+
timeUs: number;
|
|
40
|
+
videoLayers: readonly CompositionMediaLayer[];
|
|
41
|
+
}>;
|
|
42
|
+
export declare const createCompositionSnapshot: (input: CompositionSnapshotInput) => CompositionSnapshot;
|
|
43
|
+
export declare const getCompositionTrackClips: (snapshot: CompositionSnapshot, trackId: string) => TimelineClip[];
|
|
44
|
+
export declare const getCompositionActiveClips: (snapshot: CompositionSnapshot, timeUs: number) => TimelineClip[];
|
|
45
|
+
export declare const evaluateCompositionAt: (snapshot: CompositionSnapshot, timeUs: number) => CompositionEvaluation;
|
|
46
|
+
export declare const getCompositionVideoGaps: (snapshot: CompositionSnapshot) => readonly CompositionVideoGap[];
|
|
47
|
+
//# sourceMappingURL=composition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composition.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/composition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACd,MAAM,SAAS,CAAC;AAiBjB,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,UAAU,EAAE,kBAAkB,CAAC;IAC/B,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,aAAa,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;IAC/B,aAAa,EAAE,EAAE,CAAC;IAClB,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,IAAI,EAAE,sBAAsB,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,qBAAqB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,IAAI,EAAE,iBAAiB,CAAC;IACxB,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,qBAAqB,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,qBAAqB,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,WAAW,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC9C,WAAW,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC9C,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,SAAS,qBAAqB,EAAE,CAAC;CAC/C,CAAC,CAAC;AAoIH,eAAO,MAAM,yBAAyB,GACpC,OAAO,wBAAwB,KAC9B,mBAgDF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,UAAU,mBAAmB,EAC7B,SAAS,MAAM,mBAC6C,CAAC;AAE/D,eAAO,MAAM,yBAAyB,GACpC,UAAU,mBAAmB,EAC7B,QAAQ,MAAM,mBAWf,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAChC,UAAU,mBAAmB,EAC7B,QAAQ,MAAM,KACb,qBA0CF,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,UAAU,mBAAmB,KAC5B,SAAS,mBAAmB,EA8B9B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CompositionExportPayload, TimelineCanvasSize, TimelineClip, TimelineTrack } from './model';
|
|
2
|
+
import { type CompositionSnapshotInput } from './composition';
|
|
3
|
+
export declare function createCompositionExportPayload(snapshot: CompositionSnapshotInput): CompositionExportPayload;
|
|
4
|
+
export declare function createCompositionExportPayload(tracks: readonly TimelineTrack[], clips: readonly TimelineClip[], canvasSize: TimelineCanvasSize): CompositionExportPayload;
|
|
5
|
+
//# sourceMappingURL=export-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-schema.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/export-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,eAAe,CAAC;AA2FvB,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,wBAAwB,GACjC,wBAAwB,CAAC;AAC5B,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,KAAK,EAAE,SAAS,YAAY,EAAE,EAC9B,UAAU,EAAE,kBAAkB,GAC7B,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './collision';
|
|
2
|
+
export * from './clip-speed';
|
|
3
|
+
export * from './text-fonts';
|
|
4
|
+
export * from './composition';
|
|
5
|
+
export * from './export-schema';
|
|
6
|
+
export * from './model';
|
|
7
|
+
export * from './time';
|
|
8
|
+
export * from './timeline-commands';
|
|
9
|
+
export * from './timeline-layout';
|
|
10
|
+
export * from './timeline-math';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
export type TimelineMediaType = 'video' | 'audio' | 'image';
|
|
2
|
+
export type TimelineTimedMediaType = Exclude<TimelineMediaType, 'image'>;
|
|
3
|
+
export type TimelineClipType = TimelineMediaType | 'text';
|
|
4
|
+
export type TimelineTrackType = TimelineTimedMediaType | 'text';
|
|
5
|
+
export type TimelineClipTrimEdge = 'start' | 'end';
|
|
6
|
+
export type TimelineClipSpeed = number;
|
|
7
|
+
export type TimelineClipVolume = number;
|
|
8
|
+
type TimelineSourceBase = {
|
|
9
|
+
fileName: string;
|
|
10
|
+
id: string;
|
|
11
|
+
src: string;
|
|
12
|
+
};
|
|
13
|
+
type TimelineTimedMediaSource = TimelineSourceBase & {
|
|
14
|
+
durationUs?: number;
|
|
15
|
+
height?: number;
|
|
16
|
+
type: TimelineTimedMediaType;
|
|
17
|
+
waveformSrc?: string;
|
|
18
|
+
width?: number;
|
|
19
|
+
};
|
|
20
|
+
type TimelineImageSource = TimelineSourceBase & {
|
|
21
|
+
durationUs?: number;
|
|
22
|
+
height?: number;
|
|
23
|
+
type: 'image';
|
|
24
|
+
width?: number;
|
|
25
|
+
};
|
|
26
|
+
export type TimelineSource = TimelineTimedMediaSource | TimelineImageSource;
|
|
27
|
+
export type TimelineTrack = {
|
|
28
|
+
id: string;
|
|
29
|
+
muted: boolean;
|
|
30
|
+
name: string;
|
|
31
|
+
type: TimelineTrackType;
|
|
32
|
+
zIndex: number;
|
|
33
|
+
};
|
|
34
|
+
export type TimelineClipTransform = {
|
|
35
|
+
height: number;
|
|
36
|
+
width: number;
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
};
|
|
40
|
+
export type TimelineClipPosition = {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
};
|
|
44
|
+
export type TimelineTextLayoutSize = {
|
|
45
|
+
height: number;
|
|
46
|
+
width: number;
|
|
47
|
+
};
|
|
48
|
+
type TimelineClipBase = {
|
|
49
|
+
durationUs: number;
|
|
50
|
+
hidden: boolean;
|
|
51
|
+
id: string;
|
|
52
|
+
startUs: number;
|
|
53
|
+
trackId: string;
|
|
54
|
+
zIndex: number;
|
|
55
|
+
};
|
|
56
|
+
type TimelineSourceClipFields = TimelineClipBase & {
|
|
57
|
+
name: string;
|
|
58
|
+
sourceId: string;
|
|
59
|
+
src: string;
|
|
60
|
+
};
|
|
61
|
+
type TimelineTimedMediaClipFields = TimelineSourceClipFields & {
|
|
62
|
+
sourceDurationUs: number;
|
|
63
|
+
speed: TimelineClipSpeed;
|
|
64
|
+
trimEndUs: number;
|
|
65
|
+
trimStartUs: number;
|
|
66
|
+
transform: TimelineClipTransform;
|
|
67
|
+
volume: TimelineClipVolume;
|
|
68
|
+
waveformSrc?: string;
|
|
69
|
+
};
|
|
70
|
+
export type TimelineVideoClip = TimelineTimedMediaClipFields & {
|
|
71
|
+
type: 'video';
|
|
72
|
+
};
|
|
73
|
+
export type TimelineAudioClip = TimelineTimedMediaClipFields & {
|
|
74
|
+
type: 'audio';
|
|
75
|
+
};
|
|
76
|
+
export type TimelineImageClip = TimelineSourceClipFields & {
|
|
77
|
+
transform: TimelineClipTransform;
|
|
78
|
+
type: 'image';
|
|
79
|
+
};
|
|
80
|
+
export type TimelineTimedMediaClip = TimelineVideoClip | TimelineAudioClip;
|
|
81
|
+
export type TimelineVisualMediaClip = TimelineVideoClip | TimelineImageClip;
|
|
82
|
+
export type TimelineMediaClip = TimelineTimedMediaClip | TimelineImageClip;
|
|
83
|
+
export type TimelineTextClip = TimelineClipBase & {
|
|
84
|
+
bold: boolean;
|
|
85
|
+
fontColor: string;
|
|
86
|
+
fontSize: number;
|
|
87
|
+
fontType: TimelineTextFontType;
|
|
88
|
+
italic: boolean;
|
|
89
|
+
layoutSize: TimelineTextLayoutSize;
|
|
90
|
+
position: TimelineClipPosition;
|
|
91
|
+
text: string;
|
|
92
|
+
type: 'text';
|
|
93
|
+
underline: boolean;
|
|
94
|
+
};
|
|
95
|
+
export type TimelineClip = TimelineMediaClip | TimelineTextClip;
|
|
96
|
+
export declare const isTimelineMediaClip: (clip: TimelineClip) => clip is TimelineMediaClip;
|
|
97
|
+
export declare const isTimelineTimedMediaClip: (clip: TimelineClip) => clip is TimelineTimedMediaClip;
|
|
98
|
+
export declare const isTimelineVisualMediaClip: (clip: TimelineClip) => clip is TimelineVisualMediaClip;
|
|
99
|
+
export declare const isTimelineTextClip: (clip: TimelineClip) => clip is TimelineTextClip;
|
|
100
|
+
export declare const getTimelineClipTransform: (clip: TimelineClip) => TimelineClipTransform;
|
|
101
|
+
export declare const getTimelineTrackTypeForClipType: (type: TimelineClipType) => TimelineTrackType;
|
|
102
|
+
export type TimelineCanvasSize = {
|
|
103
|
+
height: number;
|
|
104
|
+
width: number;
|
|
105
|
+
};
|
|
106
|
+
export type TimelineCanvasPreset = '16:9' | '4:3' | '2:1' | '9:16' | '1:1' | '3:4';
|
|
107
|
+
export type TimelineCanvasSelection = 'original' | TimelineCanvasPreset;
|
|
108
|
+
export type TimelineProject = {
|
|
109
|
+
canvasSize: TimelineCanvasSize;
|
|
110
|
+
clips: TimelineClip[];
|
|
111
|
+
schemaVersion: 12;
|
|
112
|
+
/** Bottom-to-top layer order. Track zIndex equals its array index. */
|
|
113
|
+
tracks: TimelineTrack[];
|
|
114
|
+
};
|
|
115
|
+
export type TimelineSnapshot = {
|
|
116
|
+
canvasSelection: TimelineCanvasSelection | null;
|
|
117
|
+
canvasSize: TimelineCanvasSize;
|
|
118
|
+
clips: TimelineClip[];
|
|
119
|
+
selectedClipId: string | null;
|
|
120
|
+
tracks: TimelineTrack[];
|
|
121
|
+
};
|
|
122
|
+
export type TimelineClipTimingPreview = {
|
|
123
|
+
clipId: string;
|
|
124
|
+
durationUs: number;
|
|
125
|
+
startUs: number;
|
|
126
|
+
};
|
|
127
|
+
export type CompositionExportCanvas = {
|
|
128
|
+
Height: number;
|
|
129
|
+
Width: number;
|
|
130
|
+
};
|
|
131
|
+
export type CompositionExportTrim = {
|
|
132
|
+
EndTime: number;
|
|
133
|
+
StartTime: number;
|
|
134
|
+
Type: 'trim';
|
|
135
|
+
};
|
|
136
|
+
export type CompositionExportSpeed = {
|
|
137
|
+
Speed: TimelineClipSpeed;
|
|
138
|
+
Type: 'speed';
|
|
139
|
+
};
|
|
140
|
+
export type CompositionExportTransform = {
|
|
141
|
+
Height: number;
|
|
142
|
+
PosX: number;
|
|
143
|
+
PosY: number;
|
|
144
|
+
Type: 'transform';
|
|
145
|
+
Width: number;
|
|
146
|
+
};
|
|
147
|
+
export type CompositionExportVolume = {
|
|
148
|
+
Type: 'a_volume';
|
|
149
|
+
Volume: TimelineClipVolume;
|
|
150
|
+
};
|
|
151
|
+
export type CompositionExportTimedMediaClip = {
|
|
152
|
+
Extra: Array<CompositionExportSpeed | CompositionExportTransform | CompositionExportTrim | CompositionExportVolume>;
|
|
153
|
+
Source: string;
|
|
154
|
+
TargetTime: [number, number];
|
|
155
|
+
Type: TimelineTimedMediaType;
|
|
156
|
+
};
|
|
157
|
+
export type CompositionExportImageClip = {
|
|
158
|
+
Extra: [CompositionExportTransform];
|
|
159
|
+
Source: string;
|
|
160
|
+
TargetTime: [number, number];
|
|
161
|
+
Type: 'image';
|
|
162
|
+
};
|
|
163
|
+
export type CompositionExportMediaClip = CompositionExportTimedMediaClip | CompositionExportImageClip;
|
|
164
|
+
export type CompositionExportTextClip = {
|
|
165
|
+
Bold?: boolean;
|
|
166
|
+
Extra: [CompositionExportTransform];
|
|
167
|
+
FontColor: string;
|
|
168
|
+
FontSize: number;
|
|
169
|
+
FontType: TimelineTextFontType;
|
|
170
|
+
Italic?: boolean;
|
|
171
|
+
TargetTime: [number, number];
|
|
172
|
+
Text: string;
|
|
173
|
+
Type: 'text';
|
|
174
|
+
Underline?: boolean;
|
|
175
|
+
};
|
|
176
|
+
export type CompositionExportClip = CompositionExportMediaClip | CompositionExportTextClip;
|
|
177
|
+
export type CompositionExportPayload = {
|
|
178
|
+
Canvas: CompositionExportCanvas;
|
|
179
|
+
/** Composition duration in milliseconds, including hidden tail clips. */
|
|
180
|
+
Duration: number;
|
|
181
|
+
/** Bottom-to-top layer order. Track[0] is the lowest layer. */
|
|
182
|
+
Track: CompositionExportClip[][];
|
|
183
|
+
};
|
|
184
|
+
export type VideoTimelineDraft = TimelineProject;
|
|
185
|
+
import type { TimelineTextFontType } from './text-fonts';
|
|
186
|
+
export {};
|
|
187
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/model.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AACzE,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG,MAAM,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,sBAAsB,GAAG,MAAM,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,KAAK,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACvC,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,KAAK,wBAAwB,GAAG,kBAAkB,GAAG;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,mBAAmB,GAAG,kBAAkB,GAAG;IAC9C,UAAU,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QAAQ,EAAE,oBAAoB,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAC7B,0BAA0B,GAC1B,yBAAyB,CAAC;AAE9B,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,uBAAuB,CAAC;IAChC,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,KAAK,EAAE,qBAAqB,EAAE,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { TimelineCanvasSize, TimelineClipTransform } from './model';
|
|
2
|
+
export declare const PREVIEW_SNAP_THRESHOLD_PX = 6;
|
|
3
|
+
export type PreviewResizeHandle = 'nw' | 'ne' | 'sw' | 'se';
|
|
4
|
+
export type PreviewInteractionMode = 'move' | PreviewResizeHandle;
|
|
5
|
+
export type PreviewSnapGuide = {
|
|
6
|
+
axis: 'x' | 'y';
|
|
7
|
+
position: number;
|
|
8
|
+
};
|
|
9
|
+
type GetPreviewInteractionUpdateParams = {
|
|
10
|
+
canvasSize: TimelineCanvasSize;
|
|
11
|
+
deltaX: number;
|
|
12
|
+
deltaY: number;
|
|
13
|
+
initialTransform: TimelineClipTransform;
|
|
14
|
+
keepAspectRatio: boolean;
|
|
15
|
+
minimumSize: number;
|
|
16
|
+
mode: PreviewInteractionMode;
|
|
17
|
+
previewScale: number;
|
|
18
|
+
snappingEnabled: boolean;
|
|
19
|
+
targetTransforms: TimelineClipTransform[];
|
|
20
|
+
};
|
|
21
|
+
export type PreviewInteractionUpdate = {
|
|
22
|
+
guides: PreviewSnapGuide[];
|
|
23
|
+
transform: TimelineClipTransform;
|
|
24
|
+
};
|
|
25
|
+
export declare const getPreviewInteractionUpdate: ({ canvasSize, deltaX, deltaY, initialTransform, keepAspectRatio, minimumSize, mode, previewScale, snappingEnabled, targetTransforms, }: GetPreviewInteractionUpdateParams) => PreviewInteractionUpdate;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=preview-snapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-snapping.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/preview-snapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5D,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,mBAAmB,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,GAAG,GAAG,GAAG,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAqBF,KAAK,iCAAiC,GAAG;IACvC,UAAU,EAAE,kBAAkB,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,eAAe,EAAE,OAAO,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,sBAAsB,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,qBAAqB,EAAE,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,SAAS,EAAE,qBAAqB,CAAC;CAClC,CAAC;AA8ZF,eAAO,MAAM,2BAA2B,GAAI,wIAWzC,iCAAiC,KAAG,wBAuCtC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare const TIMELINE_TEXT_FONT_PRESETS: readonly [{
|
|
2
|
+
readonly family: "ZCOOL CangEr YuYang";
|
|
3
|
+
readonly fontType: "1187223";
|
|
4
|
+
readonly label: "站酷仓耳渔阳体";
|
|
5
|
+
}, {
|
|
6
|
+
readonly family: "ZCOOL GaoDuanHei";
|
|
7
|
+
readonly fontType: "1187221";
|
|
8
|
+
readonly label: "站酷高端黑";
|
|
9
|
+
}, {
|
|
10
|
+
readonly family: "ZCOOL KuHei";
|
|
11
|
+
readonly fontType: "1187219";
|
|
12
|
+
readonly label: "站酷酷黑体";
|
|
13
|
+
}, {
|
|
14
|
+
readonly family: "ZCOOL KuaiLe";
|
|
15
|
+
readonly fontType: "1187217";
|
|
16
|
+
readonly label: "站酷快乐体";
|
|
17
|
+
}, {
|
|
18
|
+
readonly family: "ZCOOL WenYi";
|
|
19
|
+
readonly fontType: "1187213";
|
|
20
|
+
readonly label: "站酷文艺体";
|
|
21
|
+
}, {
|
|
22
|
+
readonly family: "ZCOOL XiaoWei";
|
|
23
|
+
readonly fontType: "1187211";
|
|
24
|
+
readonly label: "站酷小薇体";
|
|
25
|
+
}, {
|
|
26
|
+
readonly family: "Source Han Sans SC";
|
|
27
|
+
readonly fontType: "SY_Black";
|
|
28
|
+
readonly label: "思源黑体";
|
|
29
|
+
}, {
|
|
30
|
+
readonly family: "Alibaba PuHuiTi";
|
|
31
|
+
readonly fontType: "ALi_PuHui";
|
|
32
|
+
readonly label: "阿里巴巴普惠体";
|
|
33
|
+
}];
|
|
34
|
+
export type TimelineTextFontType = (typeof TIMELINE_TEXT_FONT_PRESETS)[number]['fontType'];
|
|
35
|
+
export type TimelineTextFontPreset = Readonly<{
|
|
36
|
+
family: string;
|
|
37
|
+
fontType: TimelineTextFontType;
|
|
38
|
+
label: string;
|
|
39
|
+
}>;
|
|
40
|
+
export declare const DEFAULT_TIMELINE_TEXT_FONT_TYPE = "SY_Black";
|
|
41
|
+
export declare const DEFAULT_TIMELINE_TEXT_FONT_SIZE = 120;
|
|
42
|
+
export declare const getTimelineTextFontPreset: (fontType: string) => {
|
|
43
|
+
readonly family: "ZCOOL CangEr YuYang";
|
|
44
|
+
readonly fontType: "1187223";
|
|
45
|
+
readonly label: "站酷仓耳渔阳体";
|
|
46
|
+
} | {
|
|
47
|
+
readonly family: "ZCOOL GaoDuanHei";
|
|
48
|
+
readonly fontType: "1187221";
|
|
49
|
+
readonly label: "站酷高端黑";
|
|
50
|
+
} | {
|
|
51
|
+
readonly family: "ZCOOL KuHei";
|
|
52
|
+
readonly fontType: "1187219";
|
|
53
|
+
readonly label: "站酷酷黑体";
|
|
54
|
+
} | {
|
|
55
|
+
readonly family: "ZCOOL KuaiLe";
|
|
56
|
+
readonly fontType: "1187217";
|
|
57
|
+
readonly label: "站酷快乐体";
|
|
58
|
+
} | {
|
|
59
|
+
readonly family: "ZCOOL WenYi";
|
|
60
|
+
readonly fontType: "1187213";
|
|
61
|
+
readonly label: "站酷文艺体";
|
|
62
|
+
} | {
|
|
63
|
+
readonly family: "ZCOOL XiaoWei";
|
|
64
|
+
readonly fontType: "1187211";
|
|
65
|
+
readonly label: "站酷小薇体";
|
|
66
|
+
} | {
|
|
67
|
+
readonly family: "Source Han Sans SC";
|
|
68
|
+
readonly fontType: "SY_Black";
|
|
69
|
+
readonly label: "思源黑体";
|
|
70
|
+
} | {
|
|
71
|
+
readonly family: "Alibaba PuHuiTi";
|
|
72
|
+
readonly fontType: "ALi_PuHui";
|
|
73
|
+
readonly label: "阿里巴巴普惠体";
|
|
74
|
+
} | null;
|
|
75
|
+
export declare const isTimelineTextFontType: (fontType: string) => fontType is TimelineTextFontType;
|
|
76
|
+
//# sourceMappingURL=text-fonts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-fonts.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/text-fonts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyC7B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,eAAO,MAAM,+BAA+B,aAAa,CAAC;AAC1D,eAAO,MAAM,+BAA+B,MAAM,CAAC;AAMnD,eAAO,MAAM,yBAAyB,GAAI,UAAU,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAG/C,CAAC;AAEZ,eAAO,MAAM,sBAAsB,GACjC,UAAU,MAAM,KACf,QAAQ,IAAI,oBACgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const MICROSECONDS_PER_MILLISECOND = 1000;
|
|
2
|
+
export declare const MICROSECONDS_PER_SECOND = 1000000;
|
|
3
|
+
export type RationalFrameRate = Readonly<{
|
|
4
|
+
denominator: number;
|
|
5
|
+
numerator: number;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const isValidTimeUs: (timeUs: number) => boolean;
|
|
8
|
+
export declare const normalizeTimeUs: (timeUs: number) => number;
|
|
9
|
+
export declare const secondsToMicroseconds: (seconds: number) => number;
|
|
10
|
+
export declare const millisecondsToMicroseconds: (milliseconds: number) => number;
|
|
11
|
+
export declare const microsecondsToSeconds: (timeUs: number) => number;
|
|
12
|
+
export declare const microsecondsToMilliseconds: (timeUs: number) => number;
|
|
13
|
+
export declare const frameIndexToTimeUs: (frameIndex: number, frameRate: RationalFrameRate) => number;
|
|
14
|
+
export declare const timeUsToFrameIndex: (timeUs: number, frameRate: RationalFrameRate) => number;
|
|
15
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../../src/editor/core/time.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,OAAQ,CAAC;AAClD,eAAO,MAAM,uBAAuB,UAAY,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC,CAAC;AAYH,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,YACC,CAAC;AAE9C,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,WAS7C,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,SAAS,MAAM,WAGpD,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,cAAc,MAAM,WAG9D,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,WAMnD,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,WAMxD,CAAC;AAaF,eAAO,MAAM,kBAAkB,GAC7B,YAAY,MAAM,EAClB,WAAW,iBAAiB,WAgB7B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,MAAM,EACd,WAAW,iBAAiB,WAc7B,CAAC"}
|