@cliquify.me/types 3.1.11 → 3.1.13

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +13 -11
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -12,7 +12,7 @@ export interface State {
12
12
  structure: ItemStructure[];
13
13
  fps: number;
14
14
  }
15
- export type ItemType = "text" | "image" | "video" | "audio" | "helper" | "caption" | "template";
15
+ export type ItemType = "text" | "image" | "video" | "audio" | "helper" | "caption" | "template" | "composition";
16
16
  export interface IDisplay {
17
17
  from: number;
18
18
  to: number;
@@ -73,6 +73,8 @@ export type ITrackItem = (ITrackItemBase & {
73
73
  type: "caption";
74
74
  }) | (ITrackItemBase & {
75
75
  type: "template";
76
+ }) | (ITrackItemBase & {
77
+ type: "composition";
76
78
  });
77
79
  export interface IStateManager {
78
80
  getState(): State;
@@ -328,7 +330,15 @@ export interface ITimelineScaleState {
328
330
  segments: number;
329
331
  index: number;
330
332
  }
331
- export type IItem = IAudio | IImage | IText | IVideo | ICaption | ITemplate;
333
+ export type IItem = IAudio | IImage | IText | IVideo | ICaption | ITemplate | IComposition;
334
+ export interface IComposition extends ITrackItemBase {
335
+ type: "composition";
336
+ trackItemIds: string[];
337
+ trackItemsMap: Record<string, ITrackItem>;
338
+ trackItemDetailsMap: Record<string, IItem>;
339
+ tracks: ITrack[];
340
+ size: ISize;
341
+ }
332
342
  export interface IAudio extends ITrackItemBase {
333
343
  type: "audio";
334
344
  details: IAudioDetails;
@@ -342,14 +352,6 @@ export interface ITemplate extends ITrackItemBase {
342
352
  transitionIds: string[];
343
353
  size: ISize;
344
354
  }
345
- export interface ITemplateDetails {
346
- width: number;
347
- height: number;
348
- top: number;
349
- left: number;
350
- scale: number;
351
- rotate: number;
352
- }
353
355
  export interface ICaption extends ITrackItemBase {
354
356
  type: "caption";
355
357
  details: ICaptionDetails;
@@ -391,7 +393,7 @@ export interface ITrack {
391
393
  }
392
394
  export type ITrackItemAndDetails = ITrackItem & IItem;
393
395
  export type IRecordItemAndDetails = Record<string, ITrackItem & IItem>;
394
- export type ITrackType = "main" | "text" | "image" | "video" | "audio" | "helper" | "caption" | "template";
396
+ export type ITrackType = "main" | "text" | "image" | "video" | "audio" | "helper" | "caption" | "template" | "composition";
395
397
  export interface ITimelineScrollState {
396
398
  /**
397
399
  * Timeline scroll state by X-axis.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cliquify.me/types",
3
- "version": "3.1.11",
3
+ "version": "3.1.13",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist"
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "^20.11.24",
20
- "typescript": "^5.3.3",
20
+ "typescript": "5.4.5",
21
21
  "vite": "^5.2.0",
22
22
  "vite-plugin-dts": "^3.9.1",
23
23
  "@cliquify.me/typescript-config": "0.0.2"