@designcombo/state 4.0.0 → 4.0.1

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.
@@ -1,4 +1,4 @@
1
- import { State } from '@designcombo/types';
1
+ import { State, IComposition } from '@designcombo/types';
2
2
 
3
3
  interface CompositionOptions {
4
4
  targetTrackIndex?: number;
@@ -6,5 +6,5 @@ interface CompositionOptions {
6
6
  scaleMode?: string;
7
7
  scaleAspectRatio?: number;
8
8
  }
9
- export declare function addComposition(state: State, payload: any, options?: CompositionOptions): Promise<Partial<State>>;
9
+ export declare function addComposition(state: State, payload: IComposition, options?: CompositionOptions): Promise<Partial<State>>;
10
10
  export {};
@@ -1,14 +1,10 @@
1
- import { State, ICustom, ITrack } from '@designcombo/types';
1
+ import { State, ICustom } from '@designcombo/types';
2
2
 
3
- interface CustomPayload {
4
- trackItems: ICustom[];
5
- tracks: ITrack[];
6
- }
7
3
  interface CustomOptions {
8
4
  targetTrackIndex?: number;
9
5
  targetTrackId?: string;
10
6
  scaleMode?: string;
11
7
  scaleAspectRatio?: number;
12
8
  }
13
- export declare function addCustom(state: State, payload: CustomPayload, options?: CustomOptions): Promise<Partial<State>>;
9
+ export declare function addCustom(state: State, payload: ICustom, options?: CustomOptions): Promise<Partial<State>>;
14
10
  export {};
@@ -1,14 +1,10 @@
1
- import { State, IIllustration, ITrack } from '@designcombo/types';
1
+ import { State, IIllustration } from '@designcombo/types';
2
2
 
3
- interface IllustrationPayload {
4
- trackItems: IIllustration[];
5
- tracks: ITrack[];
6
- }
7
3
  interface IllustrationOptions {
8
4
  targetTrackIndex?: number;
9
5
  targetTrackId?: string;
10
6
  scaleMode?: string;
11
7
  scaleAspectRatio?: number;
12
8
  }
13
- export declare function addIllustration(state: State, payload: IllustrationPayload, options?: IllustrationOptions): Promise<Partial<State>>;
9
+ export declare function addIllustration(state: State, payload: IIllustration, options?: IllustrationOptions): Promise<Partial<State>>;
14
10
  export {};
@@ -1,14 +1,10 @@
1
- import { State, IShape, ITrack } from '@designcombo/types';
1
+ import { State, IShape } from '@designcombo/types';
2
2
 
3
- interface ShapePayload {
4
- trackItems: IShape[];
5
- tracks: ITrack[];
6
- }
7
3
  interface ShapeOptions {
8
4
  targetTrackIndex?: number;
9
5
  targetTrackId?: string;
10
6
  scaleMode?: string;
11
7
  scaleAspectRatio?: number;
12
8
  }
13
- export declare function addShape(state: State, payload: ShapePayload, options?: ShapeOptions): Promise<Partial<State>>;
9
+ export declare function addShape(state: State, payload: IShape, options?: ShapeOptions): Promise<Partial<State>>;
14
10
  export {};
@@ -1,24 +1,10 @@
1
- import { State, ITemplate, ITrack } from '@designcombo/types';
1
+ import { State, ITemplate } from '@designcombo/types';
2
2
 
3
- interface TemplatePayload {
4
- trackItems: ITemplate[];
5
- tracks: ITrack[];
6
- trackItemsMap?: Record<string, any>;
7
- trackItemDetailsMap?: Record<string, any>;
8
- transitionsMap?: Record<string, any>;
9
- transitionIds?: string[];
10
- trackItemIds?: string[];
11
- }
12
3
  interface TemplateOptions {
13
- trackIndex?: number;
14
- trackId?: string;
15
- isNewTrack?: boolean;
16
- size?: {
17
- width: number;
18
- height: number;
19
- };
4
+ targetTrackIndex?: number;
5
+ targetTrackId?: string;
20
6
  scaleMode?: string;
21
7
  scaleAspectRatio?: number;
22
8
  }
23
- export declare function addTemplate(state: State, payload: TemplatePayload, options?: TemplateOptions): Promise<Partial<State>>;
9
+ export declare function addTemplate(state: State, payload: ITemplate, options?: TemplateOptions): Promise<Partial<State>>;
24
10
  export {};