@shotstack/shotstack-studio 2.0.0-beta.36 → 2.0.0-beta.38

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.
@@ -422,15 +422,15 @@ export declare class ShotstackEdit extends Edit {
422
422
  /**
423
423
  * Apply a merge field to a clip property.
424
424
  */
425
- applyMergeField(trackIndex: number, clipIndex: number, propertyPath: string, fieldName: string, value: string, originalValue?: string): Promise<void>;
425
+ applyMergeField(clipId: string, propertyPath: string, fieldName: string, value: string, originalValue?: string): Promise<void>;
426
426
  /**
427
427
  * Remove a merge field from a clip property, restoring the original value.
428
428
  */
429
- removeMergeField(trackIndex: number, clipIndex: number, propertyPath: string, restoreValue: string): Promise<void>;
429
+ removeMergeField(clipId: string, propertyPath: string, restoreValue: string): Promise<void>;
430
430
  /**
431
431
  * Get the merge field name for a clip property, if any.
432
432
  */
433
- getMergeFieldForProperty(trackIndex: number, clipIndex: number, propertyPath: string): string | null;
433
+ getMergeFieldForProperty(clipId: string, propertyPath: string): string | null;
434
434
  /**
435
435
  * Update the placeholder value of a merge field.
436
436
  */
@@ -440,6 +440,19 @@ export declare class ShotstackEdit extends Edit {
440
440
  * Used by UI to determine if URL validation should be applied.
441
441
  */
442
442
  isSrcMergeField(fieldName: string): boolean;
443
+ /**
444
+ * Check if a value is type-compatible with all properties a merge field is bound to.
445
+ * Temporarily swaps the field value, resolves each bound clip, and validates
446
+ * against ClipSchema — the same Zod schema used at load time.
447
+ */
448
+ validateMergeFieldValue(fieldName: string, value: string): string | null;
449
+ /**
450
+ * Check if a value is compatible with a specific clip property via Zod schema validation.
451
+ * Used by the merge field label manager to filter compatible fields in dropdowns.
452
+ */
453
+ isValueCompatibleWithClipProperty(clipId: string, propertyPath: string, value: string): boolean;
454
+ /** Check if any binding in a clip references the given field name. */
455
+ private clipUsesField;
443
456
  /**
444
457
  * Remove a merge field globally from all clips and the registry.
445
458
  */