@shotstack/shotstack-studio 1.0.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.
Files changed (45) hide show
  1. package/LICENSE +164 -0
  2. package/dist/core/animations/curve-interpolator.d.ts +6 -0
  3. package/dist/core/animations/effect-preset-builder.d.ts +18 -0
  4. package/dist/core/animations/keyframe-builder.d.ts +12 -0
  5. package/dist/core/animations/transition-preset-builder.d.ts +20 -0
  6. package/dist/core/entities/audio-player.d.ts +17 -0
  7. package/dist/core/entities/edit.d.ts +46 -0
  8. package/dist/core/entities/entity.d.ts +5 -0
  9. package/dist/core/entities/html-player.d.ts +17 -0
  10. package/dist/core/entities/image-player.d.ts +15 -0
  11. package/dist/core/entities/inspector.d.ts +18 -0
  12. package/dist/core/entities/luma-player.d.ts +18 -0
  13. package/dist/core/entities/player.d.ts +73 -0
  14. package/dist/core/entities/shape-player.d.ts +15 -0
  15. package/dist/core/entities/text-player.d.ts +18 -0
  16. package/dist/core/entities/video-player.d.ts +22 -0
  17. package/dist/core/events/asset-load-tracker.d.ts +16 -0
  18. package/dist/core/events/event-emitter.d.ts +10 -0
  19. package/dist/core/export/video-exporter.d.ts +17 -0
  20. package/dist/core/inputs/controls.d.ts +11 -0
  21. package/dist/core/inputs/pointer.d.ts +4 -0
  22. package/dist/core/layouts/geometry.d.ts +8 -0
  23. package/dist/core/layouts/position-builder.d.ts +8 -0
  24. package/dist/core/loaders/asset-loader.d.ts +9 -0
  25. package/dist/core/loaders/audio-load-parser.d.ts +11 -0
  26. package/dist/core/loaders/font-load-parser.d.ts +13 -0
  27. package/dist/core/schemas/asset.d.ts +648 -0
  28. package/dist/core/schemas/audio-asset.d.ts +82 -0
  29. package/dist/core/schemas/clip.d.ts +1185 -0
  30. package/dist/core/schemas/edit.d.ts +4061 -0
  31. package/dist/core/schemas/html-asset.d.ts +27 -0
  32. package/dist/core/schemas/image-asset.d.ts +57 -0
  33. package/dist/core/schemas/keyframe.d.ts +26 -0
  34. package/dist/core/schemas/luma-asset.d.ts +13 -0
  35. package/dist/core/schemas/shape-asset.d.ts +199 -0
  36. package/dist/core/schemas/text-asset.d.ts +155 -0
  37. package/dist/core/schemas/track.d.ts +1491 -0
  38. package/dist/core/schemas/video-asset.d.ts +126 -0
  39. package/dist/core/shotstack-canvas.d.ts +24 -0
  40. package/dist/index.d.ts +4 -0
  41. package/dist/main.d.ts +1 -0
  42. package/dist/shotstack-studio.es.js +5546 -0
  43. package/dist/shotstack-studio.umd.js +183 -0
  44. package/package.json +56 -0
  45. package/readme.md +298 -0
@@ -0,0 +1,27 @@
1
+ import * as zod from "zod";
2
+ declare const HtmlAssetPositionSchema: zod.ZodEnum<["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"]>;
3
+ export declare const HtmlAssetSchema: zod.ZodObject<{
4
+ type: zod.ZodLiteral<"html">;
5
+ html: zod.ZodString;
6
+ css: zod.ZodString;
7
+ width: zod.ZodOptional<zod.ZodNumber>;
8
+ height: zod.ZodOptional<zod.ZodNumber>;
9
+ position: zod.ZodOptional<zod.ZodEnum<["top", "topRight", "right", "bottomRight", "bottom", "bottomLeft", "left", "topLeft", "center"]>>;
10
+ }, "strip", zod.ZodTypeAny, {
11
+ type: "html";
12
+ html: string;
13
+ css: string;
14
+ width?: number | undefined;
15
+ height?: number | undefined;
16
+ position?: "top" | "topRight" | "right" | "bottomRight" | "bottom" | "bottomLeft" | "left" | "topLeft" | "center" | undefined;
17
+ }, {
18
+ type: "html";
19
+ html: string;
20
+ css: string;
21
+ width?: number | undefined;
22
+ height?: number | undefined;
23
+ position?: "top" | "topRight" | "right" | "bottomRight" | "bottom" | "bottomLeft" | "left" | "topLeft" | "center" | undefined;
24
+ }>;
25
+ export type HtmlAsset = zod.infer<typeof HtmlAssetSchema>;
26
+ export type HtmlAssetPosition = zod.infer<typeof HtmlAssetPositionSchema>;
27
+ export {};
@@ -0,0 +1,57 @@
1
+ import * as zod from "zod";
2
+ export declare const ImageAssetUrlSchema: zod.ZodString;
3
+ export declare const ImageAssetCropSchema: zod.ZodObject<{
4
+ top: zod.ZodOptional<zod.ZodNumber>;
5
+ right: zod.ZodOptional<zod.ZodNumber>;
6
+ bottom: zod.ZodOptional<zod.ZodNumber>;
7
+ left: zod.ZodOptional<zod.ZodNumber>;
8
+ }, "strip", zod.ZodTypeAny, {
9
+ top?: number | undefined;
10
+ right?: number | undefined;
11
+ bottom?: number | undefined;
12
+ left?: number | undefined;
13
+ }, {
14
+ top?: number | undefined;
15
+ right?: number | undefined;
16
+ bottom?: number | undefined;
17
+ left?: number | undefined;
18
+ }>;
19
+ export declare const ImageAssetSchema: zod.ZodObject<{
20
+ type: zod.ZodLiteral<"image">;
21
+ src: zod.ZodString;
22
+ crop: zod.ZodOptional<zod.ZodObject<{
23
+ top: zod.ZodOptional<zod.ZodNumber>;
24
+ right: zod.ZodOptional<zod.ZodNumber>;
25
+ bottom: zod.ZodOptional<zod.ZodNumber>;
26
+ left: zod.ZodOptional<zod.ZodNumber>;
27
+ }, "strip", zod.ZodTypeAny, {
28
+ top?: number | undefined;
29
+ right?: number | undefined;
30
+ bottom?: number | undefined;
31
+ left?: number | undefined;
32
+ }, {
33
+ top?: number | undefined;
34
+ right?: number | undefined;
35
+ bottom?: number | undefined;
36
+ left?: number | undefined;
37
+ }>>;
38
+ }, "strip", zod.ZodTypeAny, {
39
+ src: string;
40
+ type: "image";
41
+ crop?: {
42
+ top?: number | undefined;
43
+ right?: number | undefined;
44
+ bottom?: number | undefined;
45
+ left?: number | undefined;
46
+ } | undefined;
47
+ }, {
48
+ src: string;
49
+ type: "image";
50
+ crop?: {
51
+ top?: number | undefined;
52
+ right?: number | undefined;
53
+ bottom?: number | undefined;
54
+ left?: number | undefined;
55
+ } | undefined;
56
+ }>;
57
+ export type ImageAsset = zod.infer<typeof ImageAssetSchema>;
@@ -0,0 +1,26 @@
1
+ import * as zod from "zod";
2
+ export declare const KeyframeInterpolationSchema: zod.ZodEnum<["linear", "bezier", "constant"]>;
3
+ export declare const KeyframeEasingSchema: zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>;
4
+ export declare const KeyframeSchema: zod.ZodObject<{
5
+ from: zod.ZodNumber;
6
+ to: zod.ZodNumber;
7
+ start: zod.ZodNumber;
8
+ length: zod.ZodNumber;
9
+ interpolation: zod.ZodOptional<zod.ZodEnum<["linear", "bezier", "constant"]>>;
10
+ easing: zod.ZodOptional<zod.ZodEnum<["ease", "easeIn", "easeOut", "easeInOut", "easeInQuad", "easeInCubic", "easeInQuart", "easeInQuint", "easeInSine", "easeInExpo", "easeInCirc", "easeInBack", "easeOutQuad", "easeOutCubic", "easeOutQuart", "easeOutQuint", "easeOutSine", "easeOutExpo", "easeOutCirc", "easeOutBack", "easeInOutQuad", "easeInOutCubic", "easeInOutQuart", "easeInOutQuint", "easeInOutSine", "easeInOutExpo", "easeInOutCirc", "easeInOutBack"]>>;
11
+ }, "strip", zod.ZodTypeAny, {
12
+ length: number;
13
+ from: number;
14
+ to: number;
15
+ start: number;
16
+ interpolation?: "linear" | "bezier" | "constant" | undefined;
17
+ easing?: "ease" | "easeIn" | "easeOut" | "easeInOut" | "easeInQuad" | "easeInCubic" | "easeInQuart" | "easeInQuint" | "easeInSine" | "easeInExpo" | "easeInCirc" | "easeInBack" | "easeOutQuad" | "easeOutCubic" | "easeOutQuart" | "easeOutQuint" | "easeOutSine" | "easeOutExpo" | "easeOutCirc" | "easeOutBack" | "easeInOutQuad" | "easeInOutCubic" | "easeInOutQuart" | "easeInOutQuint" | "easeInOutSine" | "easeInOutExpo" | "easeInOutCirc" | "easeInOutBack" | undefined;
18
+ }, {
19
+ length: number;
20
+ from: number;
21
+ to: number;
22
+ start: number;
23
+ interpolation?: "linear" | "bezier" | "constant" | undefined;
24
+ easing?: "ease" | "easeIn" | "easeOut" | "easeInOut" | "easeInQuad" | "easeInCubic" | "easeInQuart" | "easeInQuint" | "easeInSine" | "easeInExpo" | "easeInCirc" | "easeInBack" | "easeOutQuad" | "easeOutCubic" | "easeOutQuart" | "easeOutQuint" | "easeOutSine" | "easeOutExpo" | "easeOutCirc" | "easeOutBack" | "easeInOutQuad" | "easeInOutCubic" | "easeInOutQuart" | "easeInOutQuint" | "easeInOutSine" | "easeInOutExpo" | "easeInOutCirc" | "easeInOutBack" | undefined;
25
+ }>;
26
+ export type Keyframe = zod.infer<typeof KeyframeSchema>;
@@ -0,0 +1,13 @@
1
+ import * as zod from "zod";
2
+ export declare const LumaAssetUrlSchema: zod.ZodString;
3
+ export declare const LumaAssetSchema: zod.ZodObject<{
4
+ type: zod.ZodLiteral<"luma">;
5
+ src: zod.ZodString;
6
+ }, "strip", zod.ZodTypeAny, {
7
+ src: string;
8
+ type: "luma";
9
+ }, {
10
+ src: string;
11
+ type: "luma";
12
+ }>;
13
+ export type LumaAsset = zod.infer<typeof LumaAssetSchema>;
@@ -0,0 +1,199 @@
1
+ import * as zod from "zod";
2
+ export declare const ShapeAssetColorSchema: zod.ZodString;
3
+ export declare const ShapeAssetRectangleSchema: zod.ZodObject<{
4
+ width: zod.ZodNumber;
5
+ height: zod.ZodNumber;
6
+ }, "strip", zod.ZodTypeAny, {
7
+ width: number;
8
+ height: number;
9
+ }, {
10
+ width: number;
11
+ height: number;
12
+ }>;
13
+ export declare const ShapeAssetCircleSchema: zod.ZodObject<{
14
+ radius: zod.ZodNumber;
15
+ }, "strip", zod.ZodTypeAny, {
16
+ radius: number;
17
+ }, {
18
+ radius: number;
19
+ }>;
20
+ export declare const ShapeAssetLineSchema: zod.ZodObject<{
21
+ length: zod.ZodNumber;
22
+ thickness: zod.ZodNumber;
23
+ }, "strip", zod.ZodTypeAny, {
24
+ length: number;
25
+ thickness: number;
26
+ }, {
27
+ length: number;
28
+ thickness: number;
29
+ }>;
30
+ export declare const ShapeAssetFillSchema: zod.ZodObject<{
31
+ color: zod.ZodString;
32
+ opacity: zod.ZodNumber;
33
+ }, "strip", zod.ZodTypeAny, {
34
+ color: string;
35
+ opacity: number;
36
+ }, {
37
+ color: string;
38
+ opacity: number;
39
+ }>;
40
+ export declare const ShapeAssetStrokeSchema: zod.ZodObject<{
41
+ color: zod.ZodString;
42
+ width: zod.ZodNumber;
43
+ }, "strip", zod.ZodTypeAny, {
44
+ width: number;
45
+ color: string;
46
+ }, {
47
+ width: number;
48
+ color: string;
49
+ }>;
50
+ export declare const ShapeAssetSchema: zod.ZodEffects<zod.ZodObject<{
51
+ type: zod.ZodLiteral<"shape">;
52
+ width: zod.ZodOptional<zod.ZodNumber>;
53
+ height: zod.ZodOptional<zod.ZodNumber>;
54
+ shape: zod.ZodEnum<["rectangle", "circle", "line"]>;
55
+ fill: zod.ZodOptional<zod.ZodObject<{
56
+ color: zod.ZodString;
57
+ opacity: zod.ZodNumber;
58
+ }, "strip", zod.ZodTypeAny, {
59
+ color: string;
60
+ opacity: number;
61
+ }, {
62
+ color: string;
63
+ opacity: number;
64
+ }>>;
65
+ stroke: zod.ZodOptional<zod.ZodObject<{
66
+ color: zod.ZodString;
67
+ width: zod.ZodNumber;
68
+ }, "strip", zod.ZodTypeAny, {
69
+ width: number;
70
+ color: string;
71
+ }, {
72
+ width: number;
73
+ color: string;
74
+ }>>;
75
+ rectangle: zod.ZodOptional<zod.ZodObject<{
76
+ width: zod.ZodNumber;
77
+ height: zod.ZodNumber;
78
+ }, "strip", zod.ZodTypeAny, {
79
+ width: number;
80
+ height: number;
81
+ }, {
82
+ width: number;
83
+ height: number;
84
+ }>>;
85
+ circle: zod.ZodOptional<zod.ZodObject<{
86
+ radius: zod.ZodNumber;
87
+ }, "strip", zod.ZodTypeAny, {
88
+ radius: number;
89
+ }, {
90
+ radius: number;
91
+ }>>;
92
+ line: zod.ZodOptional<zod.ZodObject<{
93
+ length: zod.ZodNumber;
94
+ thickness: zod.ZodNumber;
95
+ }, "strip", zod.ZodTypeAny, {
96
+ length: number;
97
+ thickness: number;
98
+ }, {
99
+ length: number;
100
+ thickness: number;
101
+ }>>;
102
+ }, "strip", zod.ZodTypeAny, {
103
+ type: "shape";
104
+ shape: "rectangle" | "circle" | "line";
105
+ fill?: {
106
+ color: string;
107
+ opacity: number;
108
+ } | undefined;
109
+ width?: number | undefined;
110
+ height?: number | undefined;
111
+ rectangle?: {
112
+ width: number;
113
+ height: number;
114
+ } | undefined;
115
+ circle?: {
116
+ radius: number;
117
+ } | undefined;
118
+ line?: {
119
+ length: number;
120
+ thickness: number;
121
+ } | undefined;
122
+ stroke?: {
123
+ width: number;
124
+ color: string;
125
+ } | undefined;
126
+ }, {
127
+ type: "shape";
128
+ shape: "rectangle" | "circle" | "line";
129
+ fill?: {
130
+ color: string;
131
+ opacity: number;
132
+ } | undefined;
133
+ width?: number | undefined;
134
+ height?: number | undefined;
135
+ rectangle?: {
136
+ width: number;
137
+ height: number;
138
+ } | undefined;
139
+ circle?: {
140
+ radius: number;
141
+ } | undefined;
142
+ line?: {
143
+ length: number;
144
+ thickness: number;
145
+ } | undefined;
146
+ stroke?: {
147
+ width: number;
148
+ color: string;
149
+ } | undefined;
150
+ }>, {
151
+ type: "shape";
152
+ shape: "rectangle" | "circle" | "line";
153
+ fill?: {
154
+ color: string;
155
+ opacity: number;
156
+ } | undefined;
157
+ width?: number | undefined;
158
+ height?: number | undefined;
159
+ rectangle?: {
160
+ width: number;
161
+ height: number;
162
+ } | undefined;
163
+ circle?: {
164
+ radius: number;
165
+ } | undefined;
166
+ line?: {
167
+ length: number;
168
+ thickness: number;
169
+ } | undefined;
170
+ stroke?: {
171
+ width: number;
172
+ color: string;
173
+ } | undefined;
174
+ }, {
175
+ type: "shape";
176
+ shape: "rectangle" | "circle" | "line";
177
+ fill?: {
178
+ color: string;
179
+ opacity: number;
180
+ } | undefined;
181
+ width?: number | undefined;
182
+ height?: number | undefined;
183
+ rectangle?: {
184
+ width: number;
185
+ height: number;
186
+ } | undefined;
187
+ circle?: {
188
+ radius: number;
189
+ } | undefined;
190
+ line?: {
191
+ length: number;
192
+ thickness: number;
193
+ } | undefined;
194
+ stroke?: {
195
+ width: number;
196
+ color: string;
197
+ } | undefined;
198
+ }>;
199
+ export type ShapeAsset = zod.infer<typeof ShapeAssetSchema>;
@@ -0,0 +1,155 @@
1
+ import * as zod from "zod";
2
+ export declare const TextAssetColorSchema: zod.ZodString;
3
+ export declare const TextAssetFontSchema: zod.ZodObject<{
4
+ color: zod.ZodOptional<zod.ZodString>;
5
+ family: zod.ZodOptional<zod.ZodString>;
6
+ size: zod.ZodOptional<zod.ZodNumber>;
7
+ weight: zod.ZodOptional<zod.ZodNumber>;
8
+ lineHeight: zod.ZodOptional<zod.ZodNumber>;
9
+ }, "strip", zod.ZodTypeAny, {
10
+ color?: string | undefined;
11
+ family?: string | undefined;
12
+ size?: number | undefined;
13
+ weight?: number | undefined;
14
+ lineHeight?: number | undefined;
15
+ }, {
16
+ color?: string | undefined;
17
+ family?: string | undefined;
18
+ size?: number | undefined;
19
+ weight?: number | undefined;
20
+ lineHeight?: number | undefined;
21
+ }>;
22
+ export declare const TextAssetAlignmentSchema: zod.ZodObject<{
23
+ horizontal: zod.ZodOptional<zod.ZodEnum<["left", "center", "right"]>>;
24
+ vertical: zod.ZodOptional<zod.ZodEnum<["top", "center", "bottom"]>>;
25
+ }, "strip", zod.ZodTypeAny, {
26
+ horizontal?: "right" | "left" | "center" | undefined;
27
+ vertical?: "top" | "bottom" | "center" | undefined;
28
+ }, {
29
+ horizontal?: "right" | "left" | "center" | undefined;
30
+ vertical?: "top" | "bottom" | "center" | undefined;
31
+ }>;
32
+ export declare const TextAssetBackgroundSchema: zod.ZodObject<{
33
+ color: zod.ZodString;
34
+ opacity: zod.ZodNumber;
35
+ }, "strip", zod.ZodTypeAny, {
36
+ color: string;
37
+ opacity: number;
38
+ }, {
39
+ color: string;
40
+ opacity: number;
41
+ }>;
42
+ export declare const TextAssetStrokeSchema: zod.ZodObject<{
43
+ width: zod.ZodNumber;
44
+ color: zod.ZodString;
45
+ }, "strip", zod.ZodTypeAny, {
46
+ width: number;
47
+ color: string;
48
+ }, {
49
+ width: number;
50
+ color: string;
51
+ }>;
52
+ export declare const TextAssetSchema: zod.ZodObject<{
53
+ type: zod.ZodLiteral<"text">;
54
+ text: zod.ZodString;
55
+ width: zod.ZodOptional<zod.ZodNumber>;
56
+ height: zod.ZodOptional<zod.ZodNumber>;
57
+ font: zod.ZodOptional<zod.ZodObject<{
58
+ color: zod.ZodOptional<zod.ZodString>;
59
+ family: zod.ZodOptional<zod.ZodString>;
60
+ size: zod.ZodOptional<zod.ZodNumber>;
61
+ weight: zod.ZodOptional<zod.ZodNumber>;
62
+ lineHeight: zod.ZodOptional<zod.ZodNumber>;
63
+ }, "strip", zod.ZodTypeAny, {
64
+ color?: string | undefined;
65
+ family?: string | undefined;
66
+ size?: number | undefined;
67
+ weight?: number | undefined;
68
+ lineHeight?: number | undefined;
69
+ }, {
70
+ color?: string | undefined;
71
+ family?: string | undefined;
72
+ size?: number | undefined;
73
+ weight?: number | undefined;
74
+ lineHeight?: number | undefined;
75
+ }>>;
76
+ alignment: zod.ZodOptional<zod.ZodObject<{
77
+ horizontal: zod.ZodOptional<zod.ZodEnum<["left", "center", "right"]>>;
78
+ vertical: zod.ZodOptional<zod.ZodEnum<["top", "center", "bottom"]>>;
79
+ }, "strip", zod.ZodTypeAny, {
80
+ horizontal?: "right" | "left" | "center" | undefined;
81
+ vertical?: "top" | "bottom" | "center" | undefined;
82
+ }, {
83
+ horizontal?: "right" | "left" | "center" | undefined;
84
+ vertical?: "top" | "bottom" | "center" | undefined;
85
+ }>>;
86
+ background: zod.ZodOptional<zod.ZodObject<{
87
+ color: zod.ZodString;
88
+ opacity: zod.ZodNumber;
89
+ }, "strip", zod.ZodTypeAny, {
90
+ color: string;
91
+ opacity: number;
92
+ }, {
93
+ color: string;
94
+ opacity: number;
95
+ }>>;
96
+ stroke: zod.ZodOptional<zod.ZodObject<{
97
+ width: zod.ZodNumber;
98
+ color: zod.ZodString;
99
+ }, "strip", zod.ZodTypeAny, {
100
+ width: number;
101
+ color: string;
102
+ }, {
103
+ width: number;
104
+ color: string;
105
+ }>>;
106
+ }, "strip", zod.ZodTypeAny, {
107
+ type: "text";
108
+ text: string;
109
+ width?: number | undefined;
110
+ height?: number | undefined;
111
+ stroke?: {
112
+ width: number;
113
+ color: string;
114
+ } | undefined;
115
+ font?: {
116
+ color?: string | undefined;
117
+ family?: string | undefined;
118
+ size?: number | undefined;
119
+ weight?: number | undefined;
120
+ lineHeight?: number | undefined;
121
+ } | undefined;
122
+ alignment?: {
123
+ horizontal?: "right" | "left" | "center" | undefined;
124
+ vertical?: "top" | "bottom" | "center" | undefined;
125
+ } | undefined;
126
+ background?: {
127
+ color: string;
128
+ opacity: number;
129
+ } | undefined;
130
+ }, {
131
+ type: "text";
132
+ text: string;
133
+ width?: number | undefined;
134
+ height?: number | undefined;
135
+ stroke?: {
136
+ width: number;
137
+ color: string;
138
+ } | undefined;
139
+ font?: {
140
+ color?: string | undefined;
141
+ family?: string | undefined;
142
+ size?: number | undefined;
143
+ weight?: number | undefined;
144
+ lineHeight?: number | undefined;
145
+ } | undefined;
146
+ alignment?: {
147
+ horizontal?: "right" | "left" | "center" | undefined;
148
+ vertical?: "top" | "bottom" | "center" | undefined;
149
+ } | undefined;
150
+ background?: {
151
+ color: string;
152
+ opacity: number;
153
+ } | undefined;
154
+ }>;
155
+ export type TextAsset = zod.infer<typeof TextAssetSchema>;