@shotstack/shotstack-studio 2.20.0 → 2.21.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
@@ -186,6 +186,7 @@ export declare class Edit {
186
186
  private commandQueue;
187
187
  private clipsToDispose;
188
188
  private clipErrors;
189
+ private lastGenerationConfigKey;
189
190
  private playerByClipId;
190
191
  private lumaContentRelations;
191
192
  private fontMetadata;
@@ -197,6 +198,7 @@ export declare class Edit {
197
198
  * once the mutation is committed. Bookkeeping only — emitting from here re-enters the command queue.
198
199
  */
199
200
  private readonly onResolvedForGeneration;
201
+ private emitGenerationConfig;
200
202
  /**
201
203
  * Create an Edit instance from a template configuration.
202
204
  */
@@ -483,6 +485,7 @@ export declare class Edit {
483
485
  private findBestContentMatch;
484
486
  private lastClipClick;
485
487
  private static readonly DoubleClickThresholdMs;
488
+ private static readonly GenerationConfigTriggers;
486
489
  private setupGenerationListeners;
487
490
  private setupIntentListeners;
488
491
  }
@@ -75,6 +75,7 @@ export declare class Edit {
75
75
  private commandQueue;
76
76
  private clipsToDispose;
77
77
  private clipErrors;
78
+ private lastGenerationConfigKey;
78
79
  private playerByClipId;
79
80
  private lumaContentRelations;
80
81
  private fontMetadata;
@@ -86,6 +87,7 @@ export declare class Edit {
86
87
  * once the mutation is committed. Bookkeeping only — emitting from here re-enters the command queue.
87
88
  */
88
89
  private readonly onResolvedForGeneration;
90
+ private emitGenerationConfig;
89
91
  /**
90
92
  * Create an Edit instance from a template configuration.
91
93
  */
@@ -372,6 +374,7 @@ export declare class Edit {
372
374
  private findBestContentMatch;
373
375
  private lastClipClick;
374
376
  private static readonly DoubleClickThresholdMs;
377
+ private static readonly GenerationConfigTriggers;
375
378
  private setupGenerationListeners;
376
379
  private setupIntentListeners;
377
380
  }
@@ -524,6 +527,15 @@ declare class EventEmitter<TEventPayloadMap extends EventPayloadMap = EventPaylo
524
527
 
525
528
  declare type EventPayloadMap<TPayload = any> = Record<string, TPayload>;
526
529
 
530
+ export declare type GenerationConfig = {
531
+ clipId: string;
532
+ type: "image" | "video" | "audio";
533
+ model?: string;
534
+ options: Record<string, unknown>;
535
+ length: number | undefined;
536
+ prompt: string;
537
+ };
538
+
527
539
  declare type GenerationModelCatalogueResponse = operations["getModels"]["responses"][200]["content"]["application/json"];
528
540
 
529
541
  declare type GenerationSettingsHandler = (request: {
@@ -531,6 +543,18 @@ declare type GenerationSettingsHandler = (request: {
531
543
  model: string;
532
544
  }) => void;
533
545
 
546
+ export declare type GenerationStatus = {
547
+ text: string;
548
+ tone?: "neutral" | "warning" | "error";
549
+ };
550
+
551
+ export declare type GenerationStatusProvider = (request: GenerationStatusRequest) => GenerationStatus | undefined | Promise<GenerationStatus | undefined>;
552
+
553
+ export declare type GenerationStatusRequest = GenerationConfig & {
554
+ /** Aborted when the configuration changes again or the clip is deselected. */
555
+ signal: AbortSignal;
556
+ };
557
+
534
558
  /**
535
559
  * Thrown by mutation methods (addClip, addTrack, addFont, setFonts) when a
536
560
  * referenced asset/font URL fails preflight.
@@ -637,6 +661,8 @@ declare interface ReadonlyEventEmitter<TEventPayloadMap extends EventPayloadMap>
637
661
 
638
662
  export declare function registerGenerationSettings(edit: Edit, handler: GenerationSettingsHandler): () => void;
639
663
 
664
+ export declare function registerGenerationStatus(edit: Edit, provider: GenerationStatusProvider): () => void;
665
+
640
666
  /**
641
667
  * A number representing time in seconds.
642
668
  * Used at API/configuration boundaries where users specify timing.