ugcinc-render 1.8.210 → 1.8.212
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/{chunk-4EZKUSAN.mjs → chunk-QLJ7MHUG.mjs} +2 -2
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +473 -40
- package/dist/index.mjs +464 -32
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -621,8 +621,8 @@ function resolveElementPositions(elements, textValues) {
|
|
|
621
621
|
const resolvedX = /* @__PURE__ */ new Map();
|
|
622
622
|
const resolvedY = /* @__PURE__ */ new Map();
|
|
623
623
|
let measureCtx = null;
|
|
624
|
-
const
|
|
625
|
-
if (
|
|
624
|
+
const hasTextElements = elements.some((e) => e.type === "text");
|
|
625
|
+
if (hasTextElements && typeof document !== "undefined") {
|
|
626
626
|
const canvas = document.createElement("canvas");
|
|
627
627
|
measureCtx = canvas.getContext("2d");
|
|
628
628
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1312,6 +1312,16 @@ interface DebugOverlayProps {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
declare function DebugOverlay({ width, height, zoom, scrollX, scrollY, referenceVisible, onZoomChange, onToggleReference, currentProps, }: DebugOverlayProps): react_jsx_runtime.JSX.Element;
|
|
1314
1314
|
|
|
1315
|
+
interface DeduplicationPreviewProps {
|
|
1316
|
+
/** Source media URL */
|
|
1317
|
+
src: string;
|
|
1318
|
+
/** Source media type */
|
|
1319
|
+
srcType: 'video' | 'image';
|
|
1320
|
+
/** Deduplication config */
|
|
1321
|
+
config: DeduplicationConfig;
|
|
1322
|
+
}
|
|
1323
|
+
declare function DeduplicationPreview({ src, srcType, config, }: DeduplicationPreviewProps): react_jsx_runtime.JSX.Element;
|
|
1324
|
+
|
|
1315
1325
|
/**
|
|
1316
1326
|
* Platform-agnostic messaging types
|
|
1317
1327
|
*
|
|
@@ -1789,4 +1799,4 @@ declare function useResolvedPositions(elements: ImageEditorElement[], textValues
|
|
|
1789
1799
|
|
|
1790
1800
|
declare const RenderRoot: React.FC;
|
|
1791
1801
|
|
|
1792
|
-
export { type Acceleration, type AudioConfig, type AudioSegment, AutoCaptionComposition, AutoCaptionCompositionProps, AutoCaptionCompositionWithVideo, type BaseBubbleStyle, BaseDmComposition, type BaseDmCompositionProps, type BaseEditorConfig, type BaseMessage, type BaseMessageType, type BaseSegment, type BlendMode, BorderRadiusConfig, type BubbleRadii, CaptionOverlay, CaptionOverlayProps, type Channel, type ColorFilterConfig, type ColorShiftConfig, type CropConfig, type CuttingConfig, DEDUPLICATION_LEVELS, DebugOverlay, type DeduplicationConfig, type DeduplicationInput, type DeduplicationLevel, type DiagonalFilterConfig, type DiagonalFilterType, DynamicCropConfig, type EditorConfig, type EditorSegment, type EnhanceLevel, type EnhancementConfig, FitMode, FontWeight, type FrameManipulationConfig, type GifOverlayConfig, type GifSource, type GradientColor, type GradientOverlayConfig, IMessageDmComposition, type IMessageDmCompositionProps, type IgDmMessage, type IgDmSender, type IgDmTheme, type IgTheme, type ImMessage, type ImMessageSender, ImageEditorComposition, type ImageEditorCompositionProps, type ImageEditorConfig, ImageEditorElement, ImageElement, type ImageElementProps, type ImageMessage, type ImageSegment, type ImageSequenceSegment, InstagramDmComposition, type InstagramDmCompositionProps, type InstagramDmPublicInput, LEVEL_1_CONFIG, LEVEL_2_CONFIG, LEVEL_3_CONFIG, LEVEL_4_CONFIG, LEVEL_5_CONFIG, type LensCorrectionConfig, MediaBubble, type MediaBubbleProps, type Message, MessageBubble, type MessageBubbleProps, type MessageGroup, type MessageOrTyping, type MessagePosition, type MessageReaction, type MessageSender, type MobileEncodingConfig, type ParticleOverlayConfig, type PhoneConfig, type PhoneModel, type PhoneType, type PictureSegment, PositionResolutionResult, type PositionedMessage, ProfilePic, type ProfilePicProps, Reaction, type ReactionProps, type ReadReceipt, type ReadReceiptState, RelativePositionConfigX, RelativePositionConfigY, RenderRoot, ScreenshotAnimation, ScreenshotAnimationProps, type Segment, SegmentType, type SpeedConfig, type StaticSegment, TYPING_ANIMATION, TextElement, type TextElementProps, type TextMessage, type TextSegment, TextStyleProperties, TimeValue, type TraceRemovalConfig, TypingIndicator, type TypingIndicatorProps, type TypingIndicatorStyle, type TypingMessage, type UserProfile, type ValidationError, type VideoCodec, VideoEditorComposition, type VideoEditorCompositionProps, type VideoEditorConfig, VideoElement, type VideoElementProps, type VideoExtension, type VideoSegment, type VideoSequenceSegment, type VisualAdjustmentsConfig, type VisualSegment, type VisualSegmentUnion, bubbleRadiiToCss, calculateBubbleRadii, convertPublicToProps, defaultIMessageDmProps, defaultInstagramDmProps, flattenGroups, groupMessages, isDeduplicationLevel, resolveDeduplicationConfig, useFontsLoaded, useImageLoader, useImagePreloader, useResolvedPositions, validatePublicInput };
|
|
1802
|
+
export { type Acceleration, type AudioConfig, type AudioSegment, AutoCaptionComposition, AutoCaptionCompositionProps, AutoCaptionCompositionWithVideo, type BaseBubbleStyle, BaseDmComposition, type BaseDmCompositionProps, type BaseEditorConfig, type BaseMessage, type BaseMessageType, type BaseSegment, type BlendMode, BorderRadiusConfig, type BubbleRadii, CaptionOverlay, CaptionOverlayProps, type Channel, type ColorFilterConfig, type ColorShiftConfig, type CropConfig, type CuttingConfig, DEDUPLICATION_LEVELS, DebugOverlay, type DeduplicationConfig, type DeduplicationInput, type DeduplicationLevel, DeduplicationPreview, type DeduplicationPreviewProps, type DiagonalFilterConfig, type DiagonalFilterType, DynamicCropConfig, type EditorConfig, type EditorSegment, type EnhanceLevel, type EnhancementConfig, FitMode, FontWeight, type FrameManipulationConfig, type GifOverlayConfig, type GifSource, type GradientColor, type GradientOverlayConfig, IMessageDmComposition, type IMessageDmCompositionProps, type IgDmMessage, type IgDmSender, type IgDmTheme, type IgTheme, type ImMessage, type ImMessageSender, ImageEditorComposition, type ImageEditorCompositionProps, type ImageEditorConfig, ImageEditorElement, ImageElement, type ImageElementProps, type ImageMessage, type ImageSegment, type ImageSequenceSegment, InstagramDmComposition, type InstagramDmCompositionProps, type InstagramDmPublicInput, LEVEL_1_CONFIG, LEVEL_2_CONFIG, LEVEL_3_CONFIG, LEVEL_4_CONFIG, LEVEL_5_CONFIG, type LensCorrectionConfig, MediaBubble, type MediaBubbleProps, type Message, MessageBubble, type MessageBubbleProps, type MessageGroup, type MessageOrTyping, type MessagePosition, type MessageReaction, type MessageSender, type MobileEncodingConfig, type ParticleOverlayConfig, type PhoneConfig, type PhoneModel, type PhoneType, type PictureSegment, PositionResolutionResult, type PositionedMessage, ProfilePic, type ProfilePicProps, Reaction, type ReactionProps, type ReadReceipt, type ReadReceiptState, RelativePositionConfigX, RelativePositionConfigY, RenderRoot, ScreenshotAnimation, ScreenshotAnimationProps, type Segment, SegmentType, type SpeedConfig, type StaticSegment, TYPING_ANIMATION, TextElement, type TextElementProps, type TextMessage, type TextSegment, TextStyleProperties, TimeValue, type TraceRemovalConfig, TypingIndicator, type TypingIndicatorProps, type TypingIndicatorStyle, type TypingMessage, type UserProfile, type ValidationError, type VideoCodec, VideoEditorComposition, type VideoEditorCompositionProps, type VideoEditorConfig, VideoElement, type VideoElementProps, type VideoExtension, type VideoSegment, type VideoSequenceSegment, type VisualAdjustmentsConfig, type VisualSegment, type VisualSegmentUnion, bubbleRadiiToCss, calculateBubbleRadii, convertPublicToProps, defaultIMessageDmProps, defaultInstagramDmProps, flattenGroups, groupMessages, isDeduplicationLevel, resolveDeduplicationConfig, useFontsLoaded, useImageLoader, useImagePreloader, useResolvedPositions, validatePublicInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -1312,6 +1312,16 @@ interface DebugOverlayProps {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
declare function DebugOverlay({ width, height, zoom, scrollX, scrollY, referenceVisible, onZoomChange, onToggleReference, currentProps, }: DebugOverlayProps): react_jsx_runtime.JSX.Element;
|
|
1314
1314
|
|
|
1315
|
+
interface DeduplicationPreviewProps {
|
|
1316
|
+
/** Source media URL */
|
|
1317
|
+
src: string;
|
|
1318
|
+
/** Source media type */
|
|
1319
|
+
srcType: 'video' | 'image';
|
|
1320
|
+
/** Deduplication config */
|
|
1321
|
+
config: DeduplicationConfig;
|
|
1322
|
+
}
|
|
1323
|
+
declare function DeduplicationPreview({ src, srcType, config, }: DeduplicationPreviewProps): react_jsx_runtime.JSX.Element;
|
|
1324
|
+
|
|
1315
1325
|
/**
|
|
1316
1326
|
* Platform-agnostic messaging types
|
|
1317
1327
|
*
|
|
@@ -1789,4 +1799,4 @@ declare function useResolvedPositions(elements: ImageEditorElement[], textValues
|
|
|
1789
1799
|
|
|
1790
1800
|
declare const RenderRoot: React.FC;
|
|
1791
1801
|
|
|
1792
|
-
export { type Acceleration, type AudioConfig, type AudioSegment, AutoCaptionComposition, AutoCaptionCompositionProps, AutoCaptionCompositionWithVideo, type BaseBubbleStyle, BaseDmComposition, type BaseDmCompositionProps, type BaseEditorConfig, type BaseMessage, type BaseMessageType, type BaseSegment, type BlendMode, BorderRadiusConfig, type BubbleRadii, CaptionOverlay, CaptionOverlayProps, type Channel, type ColorFilterConfig, type ColorShiftConfig, type CropConfig, type CuttingConfig, DEDUPLICATION_LEVELS, DebugOverlay, type DeduplicationConfig, type DeduplicationInput, type DeduplicationLevel, type DiagonalFilterConfig, type DiagonalFilterType, DynamicCropConfig, type EditorConfig, type EditorSegment, type EnhanceLevel, type EnhancementConfig, FitMode, FontWeight, type FrameManipulationConfig, type GifOverlayConfig, type GifSource, type GradientColor, type GradientOverlayConfig, IMessageDmComposition, type IMessageDmCompositionProps, type IgDmMessage, type IgDmSender, type IgDmTheme, type IgTheme, type ImMessage, type ImMessageSender, ImageEditorComposition, type ImageEditorCompositionProps, type ImageEditorConfig, ImageEditorElement, ImageElement, type ImageElementProps, type ImageMessage, type ImageSegment, type ImageSequenceSegment, InstagramDmComposition, type InstagramDmCompositionProps, type InstagramDmPublicInput, LEVEL_1_CONFIG, LEVEL_2_CONFIG, LEVEL_3_CONFIG, LEVEL_4_CONFIG, LEVEL_5_CONFIG, type LensCorrectionConfig, MediaBubble, type MediaBubbleProps, type Message, MessageBubble, type MessageBubbleProps, type MessageGroup, type MessageOrTyping, type MessagePosition, type MessageReaction, type MessageSender, type MobileEncodingConfig, type ParticleOverlayConfig, type PhoneConfig, type PhoneModel, type PhoneType, type PictureSegment, PositionResolutionResult, type PositionedMessage, ProfilePic, type ProfilePicProps, Reaction, type ReactionProps, type ReadReceipt, type ReadReceiptState, RelativePositionConfigX, RelativePositionConfigY, RenderRoot, ScreenshotAnimation, ScreenshotAnimationProps, type Segment, SegmentType, type SpeedConfig, type StaticSegment, TYPING_ANIMATION, TextElement, type TextElementProps, type TextMessage, type TextSegment, TextStyleProperties, TimeValue, type TraceRemovalConfig, TypingIndicator, type TypingIndicatorProps, type TypingIndicatorStyle, type TypingMessage, type UserProfile, type ValidationError, type VideoCodec, VideoEditorComposition, type VideoEditorCompositionProps, type VideoEditorConfig, VideoElement, type VideoElementProps, type VideoExtension, type VideoSegment, type VideoSequenceSegment, type VisualAdjustmentsConfig, type VisualSegment, type VisualSegmentUnion, bubbleRadiiToCss, calculateBubbleRadii, convertPublicToProps, defaultIMessageDmProps, defaultInstagramDmProps, flattenGroups, groupMessages, isDeduplicationLevel, resolveDeduplicationConfig, useFontsLoaded, useImageLoader, useImagePreloader, useResolvedPositions, validatePublicInput };
|
|
1802
|
+
export { type Acceleration, type AudioConfig, type AudioSegment, AutoCaptionComposition, AutoCaptionCompositionProps, AutoCaptionCompositionWithVideo, type BaseBubbleStyle, BaseDmComposition, type BaseDmCompositionProps, type BaseEditorConfig, type BaseMessage, type BaseMessageType, type BaseSegment, type BlendMode, BorderRadiusConfig, type BubbleRadii, CaptionOverlay, CaptionOverlayProps, type Channel, type ColorFilterConfig, type ColorShiftConfig, type CropConfig, type CuttingConfig, DEDUPLICATION_LEVELS, DebugOverlay, type DeduplicationConfig, type DeduplicationInput, type DeduplicationLevel, DeduplicationPreview, type DeduplicationPreviewProps, type DiagonalFilterConfig, type DiagonalFilterType, DynamicCropConfig, type EditorConfig, type EditorSegment, type EnhanceLevel, type EnhancementConfig, FitMode, FontWeight, type FrameManipulationConfig, type GifOverlayConfig, type GifSource, type GradientColor, type GradientOverlayConfig, IMessageDmComposition, type IMessageDmCompositionProps, type IgDmMessage, type IgDmSender, type IgDmTheme, type IgTheme, type ImMessage, type ImMessageSender, ImageEditorComposition, type ImageEditorCompositionProps, type ImageEditorConfig, ImageEditorElement, ImageElement, type ImageElementProps, type ImageMessage, type ImageSegment, type ImageSequenceSegment, InstagramDmComposition, type InstagramDmCompositionProps, type InstagramDmPublicInput, LEVEL_1_CONFIG, LEVEL_2_CONFIG, LEVEL_3_CONFIG, LEVEL_4_CONFIG, LEVEL_5_CONFIG, type LensCorrectionConfig, MediaBubble, type MediaBubbleProps, type Message, MessageBubble, type MessageBubbleProps, type MessageGroup, type MessageOrTyping, type MessagePosition, type MessageReaction, type MessageSender, type MobileEncodingConfig, type ParticleOverlayConfig, type PhoneConfig, type PhoneModel, type PhoneType, type PictureSegment, PositionResolutionResult, type PositionedMessage, ProfilePic, type ProfilePicProps, Reaction, type ReactionProps, type ReadReceipt, type ReadReceiptState, RelativePositionConfigX, RelativePositionConfigY, RenderRoot, ScreenshotAnimation, ScreenshotAnimationProps, type Segment, SegmentType, type SpeedConfig, type StaticSegment, TYPING_ANIMATION, TextElement, type TextElementProps, type TextMessage, type TextSegment, TextStyleProperties, TimeValue, type TraceRemovalConfig, TypingIndicator, type TypingIndicatorProps, type TypingIndicatorStyle, type TypingMessage, type UserProfile, type ValidationError, type VideoCodec, VideoEditorComposition, type VideoEditorCompositionProps, type VideoEditorConfig, VideoElement, type VideoElementProps, type VideoExtension, type VideoSegment, type VideoSequenceSegment, type VisualAdjustmentsConfig, type VisualSegment, type VisualSegmentUnion, bubbleRadiiToCss, calculateBubbleRadii, convertPublicToProps, defaultIMessageDmProps, defaultInstagramDmProps, flattenGroups, groupMessages, isDeduplicationLevel, resolveDeduplicationConfig, useFontsLoaded, useImageLoader, useImagePreloader, useResolvedPositions, validatePublicInput };
|