@shotstack/shotstack-studio 2.18.0 → 2.19.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.
package/LICENSE CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  <https://polyformproject.org/licenses/shield/1.0.0>
4
4
 
5
+ Required Notice: Copyright Shotstack Pty Ltd (https://shotstack.io)
6
+
7
+ Licensor Line of Business: Shotstack cloud video editing platform, including its APIs, Studio, the Studio SDK and the template library (https://shotstack.io)
8
+
5
9
  ## Acceptance
6
10
 
7
11
  In order to get any license under these terms, you must agree
package/dist/index.d.ts CHANGED
@@ -238,6 +238,16 @@ export declare class Edit {
238
238
  * message says. Without a handler, no generate affordance is shown.
239
239
  */
240
240
  registerAssetGenerator(handler: AssetGeneratorHandler, options?: AssetGeneratorOptions): void;
241
+ /**
242
+ * Generate the asset for a prompt-bearing clip and write the result to it.
243
+ *
244
+ * Rejects only when no generator is registered or the clip has nothing to generate from.
245
+ * A generation failure resolves and surfaces as a `clip:generationFailed` event. Removing
246
+ * the clip, reloading the edit or disposing it resolves writing nothing, and no completed
247
+ * or failed event follows the `clip:generationStarted` already emitted. A second call while
248
+ * one is in flight for the same clip is ignored.
249
+ */
250
+ generateClip(clipId: string): Promise<void>;
241
251
  private applyGeneratedSrc;
242
252
  /**
243
253
  * Look up the (trackIndex, clipIndex) position of a clip by its stable ID.
@@ -497,6 +507,9 @@ declare const EditEvent: {
497
507
  readonly ClipCaptureStarted: "clip:captureStarted";
498
508
  readonly ClipCaptureCompleted: "clip:captureCompleted";
499
509
  readonly ClipCaptureFailed: "clip:captureFailed";
510
+ readonly ClipGenerationStarted: "clip:generationStarted";
511
+ readonly ClipGenerationCompleted: "clip:generationCompleted";
512
+ readonly ClipGenerationFailed: "clip:generationFailed";
500
513
  readonly ClipUnresolved: "clip:unresolved";
501
514
  readonly SelectionCleared: "selection:cleared";
502
515
  readonly EditChanged: "edit:changed";
@@ -553,6 +566,16 @@ declare type EditEventMap = {
553
566
  error: string;
554
567
  fallback: string;
555
568
  };
569
+ [EditEvent.ClipGenerationStarted]: {
570
+ clipId: string;
571
+ };
572
+ [EditEvent.ClipGenerationCompleted]: {
573
+ clipId: string;
574
+ };
575
+ [EditEvent.ClipGenerationFailed]: {
576
+ clipId: string;
577
+ error: string;
578
+ };
556
579
  [EditEvent.ClipUnresolved]: ClipLocation & {
557
580
  assetType: string;
558
581
  clipId: string;
@@ -127,6 +127,16 @@ export declare class Edit {
127
127
  * message says. Without a handler, no generate affordance is shown.
128
128
  */
129
129
  registerAssetGenerator(handler: AssetGeneratorHandler, options?: AssetGeneratorOptions): void;
130
+ /**
131
+ * Generate the asset for a prompt-bearing clip and write the result to it.
132
+ *
133
+ * Rejects only when no generator is registered or the clip has nothing to generate from.
134
+ * A generation failure resolves and surfaces as a `clip:generationFailed` event. Removing
135
+ * the clip, reloading the edit or disposing it resolves writing nothing, and no completed
136
+ * or failed event follows the `clip:generationStarted` already emitted. A second call while
137
+ * one is in flight for the same clip is ignored.
138
+ */
139
+ generateClip(clipId: string): Promise<void>;
130
140
  private applyGeneratedSrc;
131
141
  /**
132
142
  * Look up the (trackIndex, clipIndex) position of a clip by its stable ID.
@@ -383,6 +393,9 @@ declare const EditEvent: {
383
393
  readonly ClipCaptureStarted: "clip:captureStarted";
384
394
  readonly ClipCaptureCompleted: "clip:captureCompleted";
385
395
  readonly ClipCaptureFailed: "clip:captureFailed";
396
+ readonly ClipGenerationStarted: "clip:generationStarted";
397
+ readonly ClipGenerationCompleted: "clip:generationCompleted";
398
+ readonly ClipGenerationFailed: "clip:generationFailed";
386
399
  readonly ClipUnresolved: "clip:unresolved";
387
400
  readonly SelectionCleared: "selection:cleared";
388
401
  readonly EditChanged: "edit:changed";
@@ -439,6 +452,16 @@ declare type EditEventMap = {
439
452
  error: string;
440
453
  fallback: string;
441
454
  };
455
+ [EditEvent.ClipGenerationStarted]: {
456
+ clipId: string;
457
+ };
458
+ [EditEvent.ClipGenerationCompleted]: {
459
+ clipId: string;
460
+ };
461
+ [EditEvent.ClipGenerationFailed]: {
462
+ clipId: string;
463
+ error: string;
464
+ };
442
465
  [EditEvent.ClipUnresolved]: ClipLocation & {
443
466
  assetType: string;
444
467
  clipId: string;