@video-editor/shared 0.0.1-beta.6 → 0.0.1-beta.7
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 +15 -15
- package/dist/videoEditorShared.js +14 -14
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -84,18 +84,6 @@ export declare interface IImageFramesSegment extends IFramesSegment {
|
|
|
84
84
|
format: 'img' | 'gif';
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
export declare type IImageSegment = ImageSegment<'image'>;
|
|
88
|
-
|
|
89
|
-
declare interface ImageSegment<T extends ITrackType> extends ISegment<T> {
|
|
90
|
-
segmentType: T;
|
|
91
|
-
format: 'img' | 'gif';
|
|
92
|
-
url: string;
|
|
93
|
-
fillMode?: IFillMode;
|
|
94
|
-
animation?: IAnimation;
|
|
95
|
-
transform?: ITransform;
|
|
96
|
-
palette?: IPalette;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
87
|
export declare interface IPalette {
|
|
100
88
|
temperature: number;
|
|
101
89
|
hue: number;
|
|
@@ -141,15 +129,17 @@ export declare function isFilterSegment(segment: SegmentUnion): segment is IFilt
|
|
|
141
129
|
export declare function isFramesSegment(segment: SegmentUnion): segment is IFramesSegmentUnion;
|
|
142
130
|
|
|
143
131
|
/**
|
|
144
|
-
* Type guard: check if segment is
|
|
132
|
+
* Type guard: check if segment is sticker segment
|
|
145
133
|
*/
|
|
146
|
-
export declare function
|
|
134
|
+
export declare function isStickerSegment(segment: SegmentUnion): segment is IStickerSegment;
|
|
147
135
|
|
|
148
136
|
/**
|
|
149
137
|
* Type guard: check if segment is text segment
|
|
150
138
|
*/
|
|
151
139
|
export declare function isTextSegment(segment: SegmentUnion): segment is ITextSegment;
|
|
152
140
|
|
|
141
|
+
export declare type IStickerSegment = StickerSegment<'sticker'>;
|
|
142
|
+
|
|
153
143
|
/**
|
|
154
144
|
* Check if a time point is within a segment's time range
|
|
155
145
|
*/
|
|
@@ -246,6 +236,16 @@ export declare interface SegmentExtraRegistry {
|
|
|
246
236
|
|
|
247
237
|
export declare type SegmentUnion = TrackTypeMapSegment[ITrackType];
|
|
248
238
|
|
|
239
|
+
declare interface StickerSegment<T extends ITrackType> extends ISegment<T> {
|
|
240
|
+
segmentType: T;
|
|
241
|
+
format: 'img' | 'gif';
|
|
242
|
+
url: string;
|
|
243
|
+
fillMode?: IFillMode;
|
|
244
|
+
animation?: IAnimation;
|
|
245
|
+
transform?: ITransform;
|
|
246
|
+
palette?: IPalette;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
249
|
declare interface TextSegment<T extends ITrackType> extends ISegment<T> {
|
|
250
250
|
segmentType: T;
|
|
251
251
|
texts: ITextBasic[];
|
|
@@ -267,7 +267,7 @@ export declare interface TrackExtraRegistry {
|
|
|
267
267
|
export declare interface TrackTypeMapSegment {
|
|
268
268
|
frames: IFramesSegmentUnion;
|
|
269
269
|
text: TextSegment<'text'>;
|
|
270
|
-
|
|
270
|
+
sticker: StickerSegment<'sticker'>;
|
|
271
271
|
audio: AudioSegment<'audio'>;
|
|
272
272
|
effect: EffectSegment<'effect'>;
|
|
273
273
|
filter: FilterSegment<'filter'>;
|
|
@@ -5,41 +5,41 @@ function r(e) {
|
|
|
5
5
|
function u(e) {
|
|
6
6
|
return e.segmentType === "frames" && "type" in e && e.type === "video";
|
|
7
7
|
}
|
|
8
|
-
function m(e) {
|
|
9
|
-
return e.segmentType === "text";
|
|
10
|
-
}
|
|
11
8
|
function s(e) {
|
|
12
|
-
return e.segmentType === "
|
|
9
|
+
return e.segmentType === "text";
|
|
13
10
|
}
|
|
14
11
|
function f(e) {
|
|
12
|
+
return e.segmentType === "sticker";
|
|
13
|
+
}
|
|
14
|
+
function m(e) {
|
|
15
15
|
return e.segmentType === "audio";
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function c(e) {
|
|
18
18
|
return e.segmentType === "effect";
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function o(e) {
|
|
21
21
|
return e.segmentType === "filter";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function T(e) {
|
|
24
24
|
return e.endTime - e.startTime;
|
|
25
25
|
}
|
|
26
26
|
function g(e, t) {
|
|
27
27
|
return e >= t.startTime && e < t.endTime;
|
|
28
28
|
}
|
|
29
|
-
const n = ["frames", "text", "
|
|
29
|
+
const n = ["frames", "text", "sticker", "audio", "effect", "filter"];
|
|
30
30
|
function a(e) {
|
|
31
31
|
return n.includes(e);
|
|
32
32
|
}
|
|
33
33
|
export {
|
|
34
34
|
i as CURRENT_PROTOCOL_VERSION,
|
|
35
35
|
n as TRACK_TYPES,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
T as getSegmentDuration,
|
|
37
|
+
m as isAudioSegment,
|
|
38
|
+
c as isEffectSegment,
|
|
39
|
+
o as isFilterSegment,
|
|
40
40
|
r as isFramesSegment,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
f as isStickerSegment,
|
|
42
|
+
s as isTextSegment,
|
|
43
43
|
g as isTimeInSegment,
|
|
44
44
|
a as isValidTrackType,
|
|
45
45
|
u as isVideoFramesSegment
|