ugcinc 2.40.0 → 2.42.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
@@ -13,4 +13,4 @@ export { RenderClient } from './render';
13
13
  export { AutomationsClient, getAllNodes, getNodeByType } from './automations';
14
14
  export { MediaClient } from './media';
15
15
  export type { ClientConfig, } from './base';
16
- export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, ApiKey, EditorConfig, VideoEditorConfig, ImageEditorConfig, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, RenderJobSubmit, RenderVideoRequest, RenderImageRequest, RenderJobResponse, RenderJobStatus, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, MediaType, NodePort, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, } from './types';
16
+ export type { SuccessResponse, ErrorResponse, ApiResponse, Account, AccountStat, AccountTask, EditProfileInfo, Task, TaskType, Post, PostType, PostStat, ApiKey, EditorConfig, VideoEditorConfig, ImageEditorConfig, EditorChannel, TimeValue, BaseSegmentProps, VisualSegmentProps, EditorSegment, VideoSegment, AudioSegment, ImageSegment, TextSegment, StaticSegment, PositionAnchor, RelativePositionConfig, RenderJobSubmit, RenderVideoRequest, RenderImageRequest, RenderJobResponse, RenderJobStatus, GetAccountsParams, GetAccountStatsParams, GetAccountStatusParams, UpdateAccountInfoParams, UpdateAccountSocialParams, GetTasksParams, GetPostsParams, CreateSlideshowParams, GetPostStatsParams, GetPostStatusParams, CreateVideoParams, RefreshStatsParams, RefreshStatsResponse, RefreshStatsError, DailyAggregatedStat, GetDailyAggregatedStatsParams, DailyPostStat, GetDailyPostStatsParams, TopAccount, GetTopAccountsParams, TopPost, GetTopPostsParams, MediaType, NodePort, NodeControlConfig, NodeTypeEnum, WorkflowNodeDefinition, WorkflowDefinition, CanvasState, AutomationTemplate, AutomationRun, NodeRun, OutputSchemaProperty, SelectionMode, ExhaustionBehavior, SelectionConfig, SelectionState, OutputMode, UserMedia, SocialAudio, Media, GetMediaParams, UploadMediaParams, UploadMediaResponse, UpdateMediaTagParams, DeleteMediaParams, DeleteMediaResponse, CreateSocialAudioParams, CreateMediaFromUrlParams, } from './types';
package/dist/types.d.ts CHANGED
@@ -430,6 +430,23 @@ export interface BorderRadiusConfig {
430
430
  /** Bottom-left corner radius in pixels */
431
431
  bottomLeft?: number;
432
432
  }
433
+ /**
434
+ * Position anchor for relative positioning
435
+ * Specifies which edge of the reference element to anchor to
436
+ */
437
+ export type PositionAnchor = 'top' | 'bottom' | 'left' | 'right';
438
+ /**
439
+ * Relative position configuration
440
+ * When set on a segment, its position is calculated relative to another segment
441
+ */
442
+ export interface RelativePositionConfig {
443
+ /** ID of the segment to position relative to */
444
+ elementId: string;
445
+ /** Which edge of the reference segment to anchor to */
446
+ anchor: PositionAnchor;
447
+ /** Offset in pixels from the anchor point (positive = away from reference) */
448
+ offset: number;
449
+ }
433
450
  /**
434
451
  * Visual segment properties (video, image, text, editor)
435
452
  */
@@ -450,6 +467,16 @@ export interface VisualSegmentProps extends BaseSegmentProps {
450
467
  rotation?: number;
451
468
  /** Opacity percentage 0-100 (default: 100) */
452
469
  opacity?: number;
470
+ /**
471
+ * Relative positioning - when set, xOffset/yOffset are calculated from the reference segment
472
+ * This is useful for stacking elements like text messages where the reference element's
473
+ * height may vary based on text content.
474
+ *
475
+ * @example
476
+ * // Position this segment below another segment with a 10px gap
477
+ * relativePosition: { elementId: 'message-1', anchor: 'bottom', offset: 10 }
478
+ */
479
+ relativePosition?: RelativePositionConfig;
453
480
  }
454
481
  /**
455
482
  * Video segment - displays video content with optional audio
@@ -503,8 +530,16 @@ export interface TextSegment extends VisualSegmentProps {
503
530
  verticalAlign?: 'top' | 'middle' | 'bottom';
504
531
  /** Text direction (default: 'ltr') */
505
532
  direction?: 'ltr' | 'rtl';
506
- /** Inner padding in pixels (default: 0) */
533
+ /** Inner padding in pixels - uniform for all sides (default: 0). Overridden by individual padding values if set. */
507
534
  padding?: number;
535
+ /** Top padding in pixels (overrides uniform padding) */
536
+ paddingTop?: number;
537
+ /** Right padding in pixels (overrides uniform padding) */
538
+ paddingRight?: number;
539
+ /** Bottom padding in pixels (overrides uniform padding) */
540
+ paddingBottom?: number;
541
+ /** Left padding in pixels (overrides uniform padding) */
542
+ paddingLeft?: number;
508
543
  /** Font family (default: 'tiktok') */
509
544
  fontType?: 'tiktok' | 'apple' | 'arial';
510
545
  /** Font size in pixels (default: 40) */
@@ -531,6 +566,8 @@ export interface TextSegment extends VisualSegmentProps {
531
566
  color?: string;
532
567
  /** Background color with optional alpha (default: transparent) */
533
568
  backgroundColor?: string;
569
+ /** Border radius for background box - individual corners (default: 0) */
570
+ backgroundBorderRadius?: BorderRadiusConfig;
534
571
  /** Text outline color (default: none) */
535
572
  strokeColor?: string;
536
573
  /** Outline width in pixels (default: 0) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc",
3
- "version": "2.40.0",
3
+ "version": "2.42.0",
4
4
  "description": "TypeScript/JavaScript client for the UGC Inc API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",