@shotstack/shotstack-studio 2.0.3 → 2.1.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.
package/dist/index.d.ts CHANGED
@@ -28,6 +28,9 @@ export declare class Canvas {
28
28
  private minZoom;
29
29
  private maxZoom;
30
30
  private currentZoom;
31
+ private isPanning;
32
+ private panStart;
33
+ private panStartPosition;
31
34
  private onTickBound;
32
35
  private onBackgroundClickBound;
33
36
  private onWheelBound;
@@ -36,6 +39,9 @@ export declare class Canvas {
36
39
  load(): Promise<void>;
37
40
  private setupTouchHandling;
38
41
  private onWheel;
42
+ private onPanPointerDown;
43
+ private onPanPointerMove;
44
+ private onPanPointerUp;
39
45
  centerEdit(): void;
40
46
  zoomToFit(padding?: number): void;
41
47
  resize(): void;
@@ -261,6 +267,7 @@ declare const EditEvent: {
261
267
  readonly OutputFormatChanged: "output:formatChanged";
262
268
  readonly OutputDestinationsChanged: "output:destinationsChanged";
263
269
  readonly MergeFieldChanged: "mergefield:changed";
270
+ readonly TimelineResized: "timeline:resized";
264
271
  };
265
272
 
266
273
  declare type EditEventMap = {
@@ -333,6 +340,9 @@ declare type EditEventMap = {
333
340
  [EditEvent.MergeFieldChanged]: {
334
341
  fields: MergeField[];
335
342
  };
343
+ [EditEvent.TimelineResized]: {
344
+ height: number;
345
+ };
336
346
  };
337
347
 
338
348
  declare type EventPayloadMap<TPayload = any> = Record<string, TPayload>;
@@ -373,6 +383,7 @@ export declare class Timeline {
373
383
  private readonly edit;
374
384
  readonly element: HTMLElement;
375
385
  private readonly container;
386
+ private readonly options;
376
387
  private readonly stateManager;
377
388
  private clipRenderers;
378
389
  private thumbnailGenerator;
@@ -385,6 +396,7 @@ export declare class Timeline {
385
396
  private playheadGhost;
386
397
  private feedbackLayer;
387
398
  private interactionController;
399
+ private resizeHandle;
388
400
  private animationFrameId;
389
401
  private isRenderLoopActive;
390
402
  private lastFrameTime;
@@ -398,7 +410,7 @@ export declare class Timeline {
398
410
  private readonly handleClipLoadFailed;
399
411
  private readonly handleClipUpdated;
400
412
  private readonly handleRulerMouseMove;
401
- constructor(edit: Edit, container: HTMLElement);
413
+ constructor(edit: Edit, container: HTMLElement, options?: TimelineOptions);
402
414
  /** Initialize and mount the timeline */
403
415
  load(): Promise<void>;
404
416
  /** Clean up and unmount the timeline */
@@ -423,6 +435,11 @@ export declare class Timeline {
423
435
  zoomOut(): void;
424
436
  }
425
437
 
438
+ declare interface TimelineOptions {
439
+ /** Enable the drag-to-resize handle. Default: true */
440
+ resizable?: boolean;
441
+ }
442
+
426
443
  /**
427
444
  * Configuration for a toolbar button.
428
445
  */
@@ -181,6 +181,7 @@ declare const EditEvent: {
181
181
  readonly OutputFormatChanged: "output:formatChanged";
182
182
  readonly OutputDestinationsChanged: "output:destinationsChanged";
183
183
  readonly MergeFieldChanged: "mergefield:changed";
184
+ readonly TimelineResized: "timeline:resized";
184
185
  };
185
186
 
186
187
  declare type EditEventMap = {
@@ -253,6 +254,9 @@ declare type EditEventMap = {
253
254
  [EditEvent.MergeFieldChanged]: {
254
255
  fields: MergeField[];
255
256
  };
257
+ [EditEvent.TimelineResized]: {
258
+ height: number;
259
+ };
256
260
  };
257
261
 
258
262
  declare class EventEmitter<TEventPayloadMap extends EventPayloadMap = EventPayloadMap> {