@shotstack/shotstack-studio 1.10.0 → 1.10.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.
@@ -86,21 +86,21 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
86
86
  width: t.number().min(0).default(0),
87
87
  color: i.default("#000000"),
88
88
  opacity: t.number().min(0).max(1).default(1)
89
- }).strict(), L = t.object({
89
+ }).strict(), Q = t.object({
90
90
  offsetX: t.number().default(0),
91
91
  offsetY: t.number().default(0),
92
92
  blur: t.number().min(0).default(0),
93
93
  color: i.default("#000000"),
94
94
  opacity: t.number().min(0).max(1).default(0.5)
95
- }).strict(), Q = t.object({
95
+ }).strict(), z = t.object({
96
96
  width: t.number().min(0).default(0),
97
97
  color: i.default("#000000"),
98
98
  opacity: t.number().min(0).max(1).default(1)
99
- }).strict(), z = t.object({
99
+ }).strict(), L = t.object({
100
100
  color: i.optional(),
101
101
  opacity: t.number().min(0).max(1).default(1),
102
102
  borderRadius: t.number().min(0).default(0),
103
- border: Q.optional()
103
+ border: z.optional()
104
104
  }).strict(), V = t.union([
105
105
  t.number().min(0),
106
106
  t.object({
@@ -118,24 +118,17 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
118
118
  duration: t.number().min(0.1).max(60).optional(),
119
119
  style: t.enum(["character", "word"]).optional(),
120
120
  direction: t.enum(["left", "right", "up", "down"]).optional()
121
- }).strict(), U = t.object({
122
- src: t.string().url("Invalid font URL"),
123
- family: t.string(),
124
- weight: t.union([t.string(), t.number()]).default("400")
125
121
  }).strict(), l = t.object({
126
122
  type: t.literal("rich-text"),
127
123
  text: t.string().max(1e4).default(""),
128
- width: t.number().min(1).max(8192).optional(),
129
- height: t.number().min(1).max(8192).optional(),
130
124
  font: k.optional(),
131
125
  style: F.optional(),
132
126
  stroke: P.optional(),
133
- shadow: L.optional(),
134
- background: z.optional(),
127
+ shadow: Q.optional(),
128
+ background: L.optional(),
135
129
  padding: V.optional(),
136
130
  align: E.optional(),
137
- animation: B.optional(),
138
- customFonts: t.array(U).optional()
131
+ animation: B.optional()
139
132
  }).strict(), S = t.string().regex(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|transparent$/, "Invalid color format."), u = t.object({
140
133
  width: t.number().positive(),
141
134
  height: t.number().positive()
@@ -147,7 +140,7 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
147
140
  }).strict(), H = t.object({
148
141
  color: S,
149
142
  opacity: t.number().min(0).max(1)
150
- }).strict(), K = t.object({
143
+ }).strict(), U = t.object({
151
144
  color: S,
152
145
  width: t.number().positive()
153
146
  }).strict(), b = t.object({
@@ -156,23 +149,23 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
156
149
  height: t.number().positive().optional(),
157
150
  shape: t.enum(["rectangle", "circle", "line"]),
158
151
  fill: H.optional(),
159
- stroke: K.optional(),
152
+ stroke: U.optional(),
160
153
  rectangle: u.optional(),
161
154
  circle: p.optional(),
162
155
  line: f.optional()
163
- }).strict().refine((e) => e.shape === "rectangle" ? u.safeParse(e.rectangle) : e.shape === "circle" ? p.safeParse(e.circle) : e.shape === "line" ? f.safeParse(e.line) : !1), a = t.string().regex(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|transparent$/, "Invalid color format."), $ = t.object({
156
+ }).strict().refine((e) => e.shape === "rectangle" ? u.safeParse(e.rectangle) : e.shape === "circle" ? p.safeParse(e.circle) : e.shape === "line" ? f.safeParse(e.line) : !1), a = t.string().regex(/^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})|transparent$/, "Invalid color format."), K = t.object({
164
157
  color: a.optional(),
165
158
  family: t.string().optional(),
166
159
  size: t.number().positive().optional(),
167
160
  weight: t.number().optional(),
168
161
  lineHeight: t.number().optional()
169
- }).strict(), G = t.object({
162
+ }).strict(), $ = t.object({
170
163
  horizontal: t.enum(["left", "center", "right"]).optional(),
171
164
  vertical: t.enum(["top", "center", "bottom"]).optional()
172
- }).strict(), X = t.object({
165
+ }).strict(), G = t.object({
173
166
  color: a,
174
167
  opacity: t.number().min(0).max(1)
175
- }).strict(), Y = t.object({
168
+ }).strict(), X = t.object({
176
169
  width: t.number().positive(),
177
170
  color: a
178
171
  }).strict(), h = t.object({
@@ -180,25 +173,25 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
180
173
  text: t.string(),
181
174
  width: t.number().positive().optional(),
182
175
  height: t.number().positive().optional(),
183
- font: $.optional(),
184
- alignment: G.optional(),
185
- background: X.optional(),
186
- stroke: Y.optional()
187
- }).strict(), D = t.string().url("Invalid video url format."), M = t.object({
176
+ font: K.optional(),
177
+ alignment: $.optional(),
178
+ background: G.optional(),
179
+ stroke: X.optional()
180
+ }).strict(), Y = t.string().url("Invalid video url format."), D = t.object({
188
181
  top: t.number().min(0).optional(),
189
182
  right: t.number().min(0).optional(),
190
183
  bottom: t.number().min(0).optional(),
191
184
  left: t.number().min(0).optional()
192
- }).strict(), q = o.extend({
185
+ }).strict(), M = o.extend({
193
186
  from: t.number().min(0).max(1),
194
187
  to: t.number().min(0).max(1)
195
188
  }).array().or(t.number().min(0).max(1)), d = t.object({
196
189
  type: t.literal("video"),
197
- src: D,
190
+ src: Y,
198
191
  trim: t.number().optional(),
199
- crop: M.optional(),
200
- volume: q.optional()
201
- }).strict(), J = t.union([
192
+ crop: D.optional(),
193
+ volume: M.optional()
194
+ }).strict(), q = t.union([
202
195
  h,
203
196
  l,
204
197
  b,
@@ -207,43 +200,43 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
207
200
  d,
208
201
  m,
209
202
  r
210
- ]).refine((e) => e.type === "text" ? h.safeParse(e) : e.type === "rich-text" ? l.safeParse(e) : e.type === "shape" ? b.safeParse(e) : e.type === "html" ? s.safeParse(e) : e.type === "image" ? c.safeParse(e) : e.type === "video" ? d.safeParse(e) : e.type === "luma" ? m.safeParse(e) : e.type === "audio" ? r.safeParse(e) : !1), N = t.enum(["topLeft", "top", "topRight", "left", "center", "right", "bottomLeft", "bottom", "bottomRight"]), W = t.enum(["crop", "cover", "contain", "none"]), n = t.number().min(-10).max(10).default(0), Z = o.extend({
203
+ ]).refine((e) => e.type === "text" ? h.safeParse(e) : e.type === "rich-text" ? l.safeParse(e) : e.type === "shape" ? b.safeParse(e) : e.type === "html" ? s.safeParse(e) : e.type === "image" ? c.safeParse(e) : e.type === "video" ? d.safeParse(e) : e.type === "luma" ? m.safeParse(e) : e.type === "audio" ? r.safeParse(e) : !1), J = t.enum(["topLeft", "top", "topRight", "left", "center", "right", "bottomLeft", "bottom", "bottomRight"]), N = t.enum(["crop", "cover", "contain", "none"]), n = t.number().min(-10).max(10).default(0), W = o.extend({
211
204
  from: n,
212
205
  to: n
213
- }).array().or(n), _ = o.extend({
206
+ }).array().or(n), Z = o.extend({
214
207
  from: n,
215
208
  to: n
216
- }).array().or(n), tt = t.object({
217
- x: Z.default(0),
218
- y: _.default(0)
219
- }).strict(), et = o.extend({
209
+ }).array().or(n), _ = t.object({
210
+ x: W.default(0),
211
+ y: Z.default(0)
212
+ }).strict(), tt = o.extend({
220
213
  from: t.number().min(0).max(1),
221
214
  to: t.number().min(0).max(1)
222
- }).array().or(t.number().min(0).max(1)), ot = o.extend({
215
+ }).array().or(t.number().min(0).max(1)), et = o.extend({
223
216
  from: t.number().min(0),
224
217
  to: t.number().min(0)
225
- }).array().or(t.number().min(0)), nt = t.object({
218
+ }).array().or(t.number().min(0)), ot = t.object({
226
219
  angle: o.extend({
227
220
  from: t.number(),
228
221
  to: t.number()
229
222
  }).array().or(t.number())
230
- }).strict(), it = t.string(), g = t.string(), at = t.object({
223
+ }).strict(), nt = t.string(), g = t.string(), it = t.object({
231
224
  in: g.optional(),
232
225
  out: g.optional()
226
+ }).strict(), at = t.object({
227
+ rotate: ot.default({ angle: 0 })
233
228
  }).strict(), rt = t.object({
234
- rotate: nt.default({ angle: 0 })
235
- }).strict(), st = t.object({
236
- asset: J,
229
+ asset: q,
237
230
  start: t.union([t.number().min(0), t.literal("auto")]),
238
231
  length: t.union([t.number().positive(), t.literal("auto"), t.literal("end")]),
239
- position: N.default("center").optional(),
240
- fit: W.optional(),
241
- offset: tt.default({ x: 0, y: 0 }).optional(),
242
- opacity: et.default(1).optional(),
243
- scale: ot.default(1).optional(),
244
- transform: rt.default({ rotate: { angle: 0 } }).optional(),
245
- effect: it.optional(),
246
- transition: at.optional(),
232
+ position: J.default("center").optional(),
233
+ fit: N.optional(),
234
+ offset: _.default({ x: 0, y: 0 }).optional(),
235
+ opacity: tt.default(1).optional(),
236
+ scale: et.default(1).optional(),
237
+ transform: at.default({ rotate: { angle: 0 } }).optional(),
238
+ effect: nt.optional(),
239
+ transition: it.optional(),
247
240
  width: t.number().min(1).max(3840).optional(),
248
241
  height: t.number().min(1).max(2160).optional()
249
242
  }).strict().transform((e) => ({
@@ -251,38 +244,38 @@ const x = t.enum(["linear", "bezier", "constant"]), y = t.enum([
251
244
  fit: e.fit ?? (e.asset.type === "rich-text" ? "none" : "crop"),
252
245
  start: e.start,
253
246
  length: e.length
254
- })), ct = t.object({
255
- clips: st.array()
256
- }).strict(), mt = t.string().url("Invalid image url format."), lt = t.object({
257
- src: mt
258
- }).strict(), ut = t.object({
247
+ })), st = t.object({
248
+ clips: rt.array()
249
+ }).strict(), ct = t.string().url("Invalid image url format."), mt = t.object({
250
+ src: ct
251
+ }).strict(), lt = t.object({
259
252
  background: t.string().optional(),
260
- fonts: lt.array().optional(),
261
- tracks: ct.array()
262
- }).strict(), pt = t.object({
253
+ fonts: mt.array().optional(),
254
+ tracks: st.array()
255
+ }).strict(), ut = t.object({
263
256
  size: t.object({
264
257
  width: t.number().positive(),
265
258
  height: t.number().positive()
266
259
  }).strict(),
267
260
  fps: t.number().positive().optional(),
268
261
  format: t.string()
269
- }).strict(), ft = t.object({
262
+ }).strict(), pt = t.object({
270
263
  find: t.string().min(1),
271
264
  replace: t.string()
272
- }), bt = t.object({
273
- timeline: ut,
274
- output: pt,
275
- merge: t.array(ft).optional()
265
+ }), ft = t.object({
266
+ timeline: lt,
267
+ output: ut,
268
+ merge: t.array(pt).optional()
276
269
  }).strict();
277
270
  export {
278
- J as AssetSchema,
271
+ q as AssetSchema,
279
272
  r as AudioAssetSchema,
280
273
  A as AudioAssetUrlSchema,
281
274
  j as AudioAssetVolumeSchema,
282
- st as ClipSchema,
283
- bt as EditSchema,
284
- lt as FontSourceSchema,
285
- mt as FontSourceUrlSchema,
275
+ rt as ClipSchema,
276
+ ft as EditSchema,
277
+ mt as FontSourceSchema,
278
+ ct as FontSourceUrlSchema,
286
279
  s as HtmlAssetSchema,
287
280
  O as ImageAssetCropSchema,
288
281
  c as ImageAssetSchema,
@@ -292,7 +285,7 @@ export {
292
285
  o as KeyframeSchema,
293
286
  m as LumaAssetSchema,
294
287
  T as LumaAssetUrlSchema,
295
- pt as OutputSchema,
288
+ ut as OutputSchema,
296
289
  l as RichTextAssetSchema,
297
290
  p as ShapeAssetCircleSchema,
298
291
  S as ShapeAssetColorSchema,
@@ -300,17 +293,17 @@ export {
300
293
  f as ShapeAssetLineSchema,
301
294
  u as ShapeAssetRectangleSchema,
302
295
  b as ShapeAssetSchema,
303
- K as ShapeAssetStrokeSchema,
304
- G as TextAssetAlignmentSchema,
305
- X as TextAssetBackgroundSchema,
296
+ U as ShapeAssetStrokeSchema,
297
+ $ as TextAssetAlignmentSchema,
298
+ G as TextAssetBackgroundSchema,
306
299
  a as TextAssetColorSchema,
307
- $ as TextAssetFontSchema,
300
+ K as TextAssetFontSchema,
308
301
  h as TextAssetSchema,
309
- Y as TextAssetStrokeSchema,
310
- ut as TimelineSchema,
311
- ct as TrackSchema,
312
- M as VideoAssetCropSchema,
302
+ X as TextAssetStrokeSchema,
303
+ lt as TimelineSchema,
304
+ st as TrackSchema,
305
+ D as VideoAssetCropSchema,
313
306
  d as VideoAssetSchema,
314
- D as VideoAssetUrlSchema,
315
- q as VideoAssetVolumeSchema
307
+ Y as VideoAssetUrlSchema,
308
+ M as VideoAssetVolumeSchema
316
309
  };