ugcinc-render 1.8.222 → 1.8.224
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.mts +56 -2
- package/dist/index.d.ts +56 -2
- package/dist/index.js +15 -6
- package/dist/index.mjs +13 -6
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -941,8 +941,33 @@ interface InstagramDmCompositionProps {
|
|
|
941
941
|
headerBackgroundColor?: string;
|
|
942
942
|
/** Dynamic cropping configuration - crop output to element bounds */
|
|
943
943
|
dynamicCrop?: DynamicCropConfig;
|
|
944
|
+
/** Center the crop container vertically within the canvas (for preview display) */
|
|
945
|
+
cropVerticalCenter?: boolean;
|
|
944
946
|
}
|
|
945
947
|
|
|
948
|
+
/**
|
|
949
|
+
* Convert InstagramDmComposition props to ImageEditorElements
|
|
950
|
+
*
|
|
951
|
+
* This module transforms the IG DM composition props into an array of
|
|
952
|
+
* ImageEditorElements that can be rendered by ImageEditorComposition.
|
|
953
|
+
*/
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Result of converting props to elements
|
|
957
|
+
*/
|
|
958
|
+
interface ConversionResult$1 {
|
|
959
|
+
/** Elements to render via ImageEditorComposition */
|
|
960
|
+
elements: ImageEditorElement[];
|
|
961
|
+
/** Image URLs keyed by inputId */
|
|
962
|
+
imageUrls: Record<string, string>;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Convert InstagramDmComposition props to ImageEditorElements
|
|
966
|
+
*
|
|
967
|
+
* This is the main entry point that orchestrates all element generation.
|
|
968
|
+
*/
|
|
969
|
+
declare function convertPropsToElements$1(props: InstagramDmCompositionProps): ConversionResult$1;
|
|
970
|
+
|
|
946
971
|
/**
|
|
947
972
|
* Default composition props for registration
|
|
948
973
|
*/
|
|
@@ -1177,7 +1202,34 @@ interface IMessageDmCompositionProps {
|
|
|
1177
1202
|
messages?: ImMessage[];
|
|
1178
1203
|
/** Dynamic cropping configuration - crop output to DM element bounds */
|
|
1179
1204
|
dynamicCrop?: DynamicCropConfig;
|
|
1205
|
+
/** Center the crop container vertically within the canvas (for preview display) */
|
|
1206
|
+
cropVerticalCenter?: boolean;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* Convert iMessage DM Composition props to ImageEditorElements
|
|
1211
|
+
*
|
|
1212
|
+
* This module transforms the composition props into renderable message elements.
|
|
1213
|
+
* Header, footer, and status bar elements are rendered directly in the composition JSX.
|
|
1214
|
+
*/
|
|
1215
|
+
|
|
1216
|
+
/** Tail render data for SVG rendering */
|
|
1217
|
+
interface TailRenderData {
|
|
1218
|
+
id: string;
|
|
1219
|
+
isUser: boolean;
|
|
1220
|
+
messageLeft: number;
|
|
1221
|
+
messageRight: number;
|
|
1222
|
+
messageBottom: number;
|
|
1223
|
+
}
|
|
1224
|
+
/** Result of converting props to elements */
|
|
1225
|
+
interface ConversionResult {
|
|
1226
|
+
elements: ImageEditorElement[];
|
|
1227
|
+
imageUrls: Record<string, string>;
|
|
1228
|
+
tails: TailRenderData[];
|
|
1229
|
+
width: number;
|
|
1230
|
+
height: number;
|
|
1180
1231
|
}
|
|
1232
|
+
declare function convertPropsToElements(props: IMessageDmCompositionProps): ConversionResult;
|
|
1181
1233
|
|
|
1182
1234
|
/**
|
|
1183
1235
|
* iMessage DM Composition
|
|
@@ -1203,6 +1255,8 @@ interface BaseDmCompositionProps {
|
|
|
1203
1255
|
height: number;
|
|
1204
1256
|
/** When set, crop output to these bounds (for dynamic crop) */
|
|
1205
1257
|
cropBounds?: CropBounds;
|
|
1258
|
+
/** Center the crop container vertically within the canvas (preview only — actual renders use calculateMetadata for output dimensions) */
|
|
1259
|
+
cropVerticalCenter?: boolean;
|
|
1206
1260
|
/** Background color */
|
|
1207
1261
|
backgroundColor: string;
|
|
1208
1262
|
/** Show debug overlay with crosshair and coordinates */
|
|
@@ -1300,7 +1354,7 @@ interface BaseDmCompositionProps {
|
|
|
1300
1354
|
/** Status bar elements color (time, cell bars, icons) - defaults to white */
|
|
1301
1355
|
statusBarColor?: string;
|
|
1302
1356
|
}
|
|
1303
|
-
declare function BaseDmComposition({ width, height, cropBounds, backgroundColor, showDebugOverlay, referenceImageUrl, showReferenceImage, referenceOpacity, currentProps, children, time, timeRight, timeBottom, timeFontSize, timeLetterSpacing, timeColor, noNotisTop, noNotisBottom, noNotisLeft, noNotisRight, cellLevel, cell1Top, cell1Bottom, cell1Left, cell1Right, cell2Top, cell2Bottom, cell2Left, cell2Right, cell3Top, cell3Bottom, cell3Left, cell3Right, cell4Top, cell4Bottom, cell4Left, cell4Right, wifiTop, wifiBottom, wifiLeft, wifiRight, batteryTop, batteryBottom, batteryLeft, batteryRight, homeIndicatorTop, homeIndicatorBottom, homeIndicatorLeft, homeIndicatorRight, homeIndicatorColor, statusBarColor, }: BaseDmCompositionProps): react_jsx_runtime.JSX.Element | null;
|
|
1357
|
+
declare function BaseDmComposition({ width, height, cropBounds, cropVerticalCenter, backgroundColor, showDebugOverlay, referenceImageUrl, showReferenceImage, referenceOpacity, currentProps, children, time, timeRight, timeBottom, timeFontSize, timeLetterSpacing, timeColor, noNotisTop, noNotisBottom, noNotisLeft, noNotisRight, cellLevel, cell1Top, cell1Bottom, cell1Left, cell1Right, cell2Top, cell2Bottom, cell2Left, cell2Right, cell3Top, cell3Bottom, cell3Left, cell3Right, cell4Top, cell4Bottom, cell4Left, cell4Right, wifiTop, wifiBottom, wifiLeft, wifiRight, batteryTop, batteryBottom, batteryLeft, batteryRight, homeIndicatorTop, homeIndicatorBottom, homeIndicatorLeft, homeIndicatorRight, homeIndicatorColor, statusBarColor, }: BaseDmCompositionProps): react_jsx_runtime.JSX.Element | null;
|
|
1304
1358
|
|
|
1305
1359
|
/**
|
|
1306
1360
|
* Debug Overlay Component
|
|
@@ -1809,4 +1863,4 @@ declare function useResolvedPositions(elements: ImageEditorElement[], textValues
|
|
|
1809
1863
|
|
|
1810
1864
|
declare const RenderRoot: React.FC;
|
|
1811
1865
|
|
|
1812
|
-
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, CropBounds, 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 };
|
|
1866
|
+
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, CropBounds, 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, convertPropsToElements as convertIMessagePropsToElements, convertPropsToElements$1 as convertInstagramPropsToElements, convertPublicToProps, defaultIMessageDmProps, defaultInstagramDmProps, flattenGroups, groupMessages, isDeduplicationLevel, resolveDeduplicationConfig, useFontsLoaded, useImageLoader, useImagePreloader, useResolvedPositions, validatePublicInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -941,8 +941,33 @@ interface InstagramDmCompositionProps {
|
|
|
941
941
|
headerBackgroundColor?: string;
|
|
942
942
|
/** Dynamic cropping configuration - crop output to element bounds */
|
|
943
943
|
dynamicCrop?: DynamicCropConfig;
|
|
944
|
+
/** Center the crop container vertically within the canvas (for preview display) */
|
|
945
|
+
cropVerticalCenter?: boolean;
|
|
944
946
|
}
|
|
945
947
|
|
|
948
|
+
/**
|
|
949
|
+
* Convert InstagramDmComposition props to ImageEditorElements
|
|
950
|
+
*
|
|
951
|
+
* This module transforms the IG DM composition props into an array of
|
|
952
|
+
* ImageEditorElements that can be rendered by ImageEditorComposition.
|
|
953
|
+
*/
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Result of converting props to elements
|
|
957
|
+
*/
|
|
958
|
+
interface ConversionResult$1 {
|
|
959
|
+
/** Elements to render via ImageEditorComposition */
|
|
960
|
+
elements: ImageEditorElement[];
|
|
961
|
+
/** Image URLs keyed by inputId */
|
|
962
|
+
imageUrls: Record<string, string>;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Convert InstagramDmComposition props to ImageEditorElements
|
|
966
|
+
*
|
|
967
|
+
* This is the main entry point that orchestrates all element generation.
|
|
968
|
+
*/
|
|
969
|
+
declare function convertPropsToElements$1(props: InstagramDmCompositionProps): ConversionResult$1;
|
|
970
|
+
|
|
946
971
|
/**
|
|
947
972
|
* Default composition props for registration
|
|
948
973
|
*/
|
|
@@ -1177,7 +1202,34 @@ interface IMessageDmCompositionProps {
|
|
|
1177
1202
|
messages?: ImMessage[];
|
|
1178
1203
|
/** Dynamic cropping configuration - crop output to DM element bounds */
|
|
1179
1204
|
dynamicCrop?: DynamicCropConfig;
|
|
1205
|
+
/** Center the crop container vertically within the canvas (for preview display) */
|
|
1206
|
+
cropVerticalCenter?: boolean;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
/**
|
|
1210
|
+
* Convert iMessage DM Composition props to ImageEditorElements
|
|
1211
|
+
*
|
|
1212
|
+
* This module transforms the composition props into renderable message elements.
|
|
1213
|
+
* Header, footer, and status bar elements are rendered directly in the composition JSX.
|
|
1214
|
+
*/
|
|
1215
|
+
|
|
1216
|
+
/** Tail render data for SVG rendering */
|
|
1217
|
+
interface TailRenderData {
|
|
1218
|
+
id: string;
|
|
1219
|
+
isUser: boolean;
|
|
1220
|
+
messageLeft: number;
|
|
1221
|
+
messageRight: number;
|
|
1222
|
+
messageBottom: number;
|
|
1223
|
+
}
|
|
1224
|
+
/** Result of converting props to elements */
|
|
1225
|
+
interface ConversionResult {
|
|
1226
|
+
elements: ImageEditorElement[];
|
|
1227
|
+
imageUrls: Record<string, string>;
|
|
1228
|
+
tails: TailRenderData[];
|
|
1229
|
+
width: number;
|
|
1230
|
+
height: number;
|
|
1180
1231
|
}
|
|
1232
|
+
declare function convertPropsToElements(props: IMessageDmCompositionProps): ConversionResult;
|
|
1181
1233
|
|
|
1182
1234
|
/**
|
|
1183
1235
|
* iMessage DM Composition
|
|
@@ -1203,6 +1255,8 @@ interface BaseDmCompositionProps {
|
|
|
1203
1255
|
height: number;
|
|
1204
1256
|
/** When set, crop output to these bounds (for dynamic crop) */
|
|
1205
1257
|
cropBounds?: CropBounds;
|
|
1258
|
+
/** Center the crop container vertically within the canvas (preview only — actual renders use calculateMetadata for output dimensions) */
|
|
1259
|
+
cropVerticalCenter?: boolean;
|
|
1206
1260
|
/** Background color */
|
|
1207
1261
|
backgroundColor: string;
|
|
1208
1262
|
/** Show debug overlay with crosshair and coordinates */
|
|
@@ -1300,7 +1354,7 @@ interface BaseDmCompositionProps {
|
|
|
1300
1354
|
/** Status bar elements color (time, cell bars, icons) - defaults to white */
|
|
1301
1355
|
statusBarColor?: string;
|
|
1302
1356
|
}
|
|
1303
|
-
declare function BaseDmComposition({ width, height, cropBounds, backgroundColor, showDebugOverlay, referenceImageUrl, showReferenceImage, referenceOpacity, currentProps, children, time, timeRight, timeBottom, timeFontSize, timeLetterSpacing, timeColor, noNotisTop, noNotisBottom, noNotisLeft, noNotisRight, cellLevel, cell1Top, cell1Bottom, cell1Left, cell1Right, cell2Top, cell2Bottom, cell2Left, cell2Right, cell3Top, cell3Bottom, cell3Left, cell3Right, cell4Top, cell4Bottom, cell4Left, cell4Right, wifiTop, wifiBottom, wifiLeft, wifiRight, batteryTop, batteryBottom, batteryLeft, batteryRight, homeIndicatorTop, homeIndicatorBottom, homeIndicatorLeft, homeIndicatorRight, homeIndicatorColor, statusBarColor, }: BaseDmCompositionProps): react_jsx_runtime.JSX.Element | null;
|
|
1357
|
+
declare function BaseDmComposition({ width, height, cropBounds, cropVerticalCenter, backgroundColor, showDebugOverlay, referenceImageUrl, showReferenceImage, referenceOpacity, currentProps, children, time, timeRight, timeBottom, timeFontSize, timeLetterSpacing, timeColor, noNotisTop, noNotisBottom, noNotisLeft, noNotisRight, cellLevel, cell1Top, cell1Bottom, cell1Left, cell1Right, cell2Top, cell2Bottom, cell2Left, cell2Right, cell3Top, cell3Bottom, cell3Left, cell3Right, cell4Top, cell4Bottom, cell4Left, cell4Right, wifiTop, wifiBottom, wifiLeft, wifiRight, batteryTop, batteryBottom, batteryLeft, batteryRight, homeIndicatorTop, homeIndicatorBottom, homeIndicatorLeft, homeIndicatorRight, homeIndicatorColor, statusBarColor, }: BaseDmCompositionProps): react_jsx_runtime.JSX.Element | null;
|
|
1304
1358
|
|
|
1305
1359
|
/**
|
|
1306
1360
|
* Debug Overlay Component
|
|
@@ -1809,4 +1863,4 @@ declare function useResolvedPositions(elements: ImageEditorElement[], textValues
|
|
|
1809
1863
|
|
|
1810
1864
|
declare const RenderRoot: React.FC;
|
|
1811
1865
|
|
|
1812
|
-
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, CropBounds, 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 };
|
|
1866
|
+
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, CropBounds, 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, convertPropsToElements as convertIMessagePropsToElements, convertPropsToElements$1 as convertInstagramPropsToElements, convertPublicToProps, defaultIMessageDmProps, defaultInstagramDmProps, flattenGroups, groupMessages, isDeduplicationLevel, resolveDeduplicationConfig, useFontsLoaded, useImageLoader, useImagePreloader, useResolvedPositions, validatePublicInput };
|
package/dist/index.js
CHANGED
|
@@ -83,6 +83,8 @@ __export(index_exports, {
|
|
|
83
83
|
calculateScreenshotAnimationDuration: () => calculateScreenshotAnimationDuration,
|
|
84
84
|
calculateTimelineContentEnd: () => calculateTimelineContentEnd,
|
|
85
85
|
canSetAsReference: () => canSetAsReference,
|
|
86
|
+
convertIMessagePropsToElements: () => convertPropsToElements2,
|
|
87
|
+
convertInstagramPropsToElements: () => convertPropsToElements,
|
|
86
88
|
convertPublicToProps: () => convertPublicToProps,
|
|
87
89
|
debugFontStatus: () => debugFontStatus,
|
|
88
90
|
defaultIMessageDmProps: () => defaultIMessageDmProps,
|
|
@@ -3327,6 +3329,7 @@ function BaseDmComposition({
|
|
|
3327
3329
|
width,
|
|
3328
3330
|
height,
|
|
3329
3331
|
cropBounds,
|
|
3332
|
+
cropVerticalCenter = false,
|
|
3330
3333
|
backgroundColor,
|
|
3331
3334
|
showDebugOverlay = false,
|
|
3332
3335
|
referenceImageUrl,
|
|
@@ -3425,6 +3428,7 @@ function BaseDmComposition({
|
|
|
3425
3428
|
const cropOffsetY = cropBounds?.y ?? 0;
|
|
3426
3429
|
const contentWidth = cropBounds ? cropBounds.width : width;
|
|
3427
3430
|
const contentHeight = cropBounds ? cropBounds.height : height;
|
|
3431
|
+
const cropContainerTop = cropBounds && cropVerticalCenter ? Math.round((height - contentHeight) / 2) : 0;
|
|
3428
3432
|
const isStatusBarDark = statusBarColor === "#000000" || statusBarColor === "#000" || statusBarColor.toLowerCase() === "black";
|
|
3429
3433
|
const iconFilter = isStatusBarDark ? "invert(1)" : "none";
|
|
3430
3434
|
const cellBarActiveColor = statusBarColor;
|
|
@@ -3445,7 +3449,7 @@ function BaseDmComposition({
|
|
|
3445
3449
|
{
|
|
3446
3450
|
style: {
|
|
3447
3451
|
position: "absolute",
|
|
3448
|
-
top:
|
|
3452
|
+
top: cropContainerTop,
|
|
3449
3453
|
left: 0,
|
|
3450
3454
|
width: contentWidth,
|
|
3451
3455
|
height: contentHeight,
|
|
@@ -5203,6 +5207,7 @@ function InstagramDmComposition(props) {
|
|
|
5203
5207
|
width,
|
|
5204
5208
|
height,
|
|
5205
5209
|
cropBounds,
|
|
5210
|
+
cropVerticalCenter: props.cropVerticalCenter,
|
|
5206
5211
|
backgroundColor: colors.background,
|
|
5207
5212
|
showDebugOverlay,
|
|
5208
5213
|
referenceImageUrl,
|
|
@@ -5879,7 +5884,7 @@ function generateMessageElements2(props, calculatedMessages) {
|
|
|
5879
5884
|
zIndex: 5 + i,
|
|
5880
5885
|
text: textContent,
|
|
5881
5886
|
font: "apple",
|
|
5882
|
-
fontWeight:
|
|
5887
|
+
fontWeight: "normal",
|
|
5883
5888
|
fontSize: messageFontSize,
|
|
5884
5889
|
letterSpacing: messageLetterSpacing,
|
|
5885
5890
|
lineHeight: lineHeightMultiplier,
|
|
@@ -5952,7 +5957,7 @@ function generateHeaderTextElements(props, calculatedMessages) {
|
|
|
5952
5957
|
zIndex: 4,
|
|
5953
5958
|
text: messageHeaderTimestampText,
|
|
5954
5959
|
font: "apple",
|
|
5955
|
-
fontWeight:
|
|
5960
|
+
fontWeight: "normal",
|
|
5956
5961
|
fontSize: messageHeaderFontSize,
|
|
5957
5962
|
letterSpacing: messageHeaderLetterSpacing,
|
|
5958
5963
|
color: messageHeaderTextColor,
|
|
@@ -5971,7 +5976,7 @@ function generateHeaderTextElements(props, calculatedMessages) {
|
|
|
5971
5976
|
zIndex: 4,
|
|
5972
5977
|
text: messageHeaderImessageText,
|
|
5973
5978
|
font: "apple",
|
|
5974
|
-
fontWeight:
|
|
5979
|
+
fontWeight: "normal",
|
|
5975
5980
|
fontSize: messageHeaderFontSize,
|
|
5976
5981
|
letterSpacing: messageHeaderLetterSpacing,
|
|
5977
5982
|
color: messageHeaderTextColor,
|
|
@@ -6014,7 +6019,7 @@ function generateReadReceiptElement(props, calculatedMessages) {
|
|
|
6014
6019
|
zIndex: 4,
|
|
6015
6020
|
text: readReceiptText,
|
|
6016
6021
|
font: "apple",
|
|
6017
|
-
fontWeight:
|
|
6022
|
+
fontWeight: "bold",
|
|
6018
6023
|
fontSize: readReceiptFontSize,
|
|
6019
6024
|
letterSpacing: readReceiptLetterSpacing,
|
|
6020
6025
|
color: readReceiptColor,
|
|
@@ -6473,6 +6478,7 @@ var IMessageDmComposition = (props) => {
|
|
|
6473
6478
|
width,
|
|
6474
6479
|
height,
|
|
6475
6480
|
cropBounds,
|
|
6481
|
+
cropVerticalCenter: mergedProps.cropVerticalCenter,
|
|
6476
6482
|
backgroundColor: effectiveBackgroundColor,
|
|
6477
6483
|
showDebugOverlay,
|
|
6478
6484
|
referenceImageUrl,
|
|
@@ -8154,7 +8160,8 @@ var iMessageDmPropsSchema = import_zod.z.object({
|
|
|
8154
8160
|
groupWithPrevious: import_zod.z.boolean().optional()
|
|
8155
8161
|
})).optional(),
|
|
8156
8162
|
// Dynamic crop - crop output to element bounds
|
|
8157
|
-
dynamicCrop: import_zod.z.record(import_zod.z.any()).optional()
|
|
8163
|
+
dynamicCrop: import_zod.z.record(import_zod.z.any()).optional(),
|
|
8164
|
+
cropVerticalCenter: import_zod.z.boolean().optional()
|
|
8158
8165
|
});
|
|
8159
8166
|
|
|
8160
8167
|
// src/Root.tsx
|
|
@@ -8821,6 +8828,8 @@ var RenderRoot = () => {
|
|
|
8821
8828
|
calculateScreenshotAnimationDuration,
|
|
8822
8829
|
calculateTimelineContentEnd,
|
|
8823
8830
|
canSetAsReference,
|
|
8831
|
+
convertIMessagePropsToElements,
|
|
8832
|
+
convertInstagramPropsToElements,
|
|
8824
8833
|
convertPublicToProps,
|
|
8825
8834
|
debugFontStatus,
|
|
8826
8835
|
defaultIMessageDmProps,
|
package/dist/index.mjs
CHANGED
|
@@ -2361,6 +2361,7 @@ function BaseDmComposition({
|
|
|
2361
2361
|
width,
|
|
2362
2362
|
height,
|
|
2363
2363
|
cropBounds,
|
|
2364
|
+
cropVerticalCenter = false,
|
|
2364
2365
|
backgroundColor,
|
|
2365
2366
|
showDebugOverlay = false,
|
|
2366
2367
|
referenceImageUrl,
|
|
@@ -2459,6 +2460,7 @@ function BaseDmComposition({
|
|
|
2459
2460
|
const cropOffsetY = cropBounds?.y ?? 0;
|
|
2460
2461
|
const contentWidth = cropBounds ? cropBounds.width : width;
|
|
2461
2462
|
const contentHeight = cropBounds ? cropBounds.height : height;
|
|
2463
|
+
const cropContainerTop = cropBounds && cropVerticalCenter ? Math.round((height - contentHeight) / 2) : 0;
|
|
2462
2464
|
const isStatusBarDark = statusBarColor === "#000000" || statusBarColor === "#000" || statusBarColor.toLowerCase() === "black";
|
|
2463
2465
|
const iconFilter = isStatusBarDark ? "invert(1)" : "none";
|
|
2464
2466
|
const cellBarActiveColor = statusBarColor;
|
|
@@ -2479,7 +2481,7 @@ function BaseDmComposition({
|
|
|
2479
2481
|
{
|
|
2480
2482
|
style: {
|
|
2481
2483
|
position: "absolute",
|
|
2482
|
-
top:
|
|
2484
|
+
top: cropContainerTop,
|
|
2483
2485
|
left: 0,
|
|
2484
2486
|
width: contentWidth,
|
|
2485
2487
|
height: contentHeight,
|
|
@@ -4237,6 +4239,7 @@ function InstagramDmComposition(props) {
|
|
|
4237
4239
|
width,
|
|
4238
4240
|
height,
|
|
4239
4241
|
cropBounds,
|
|
4242
|
+
cropVerticalCenter: props.cropVerticalCenter,
|
|
4240
4243
|
backgroundColor: colors.background,
|
|
4241
4244
|
showDebugOverlay,
|
|
4242
4245
|
referenceImageUrl,
|
|
@@ -4913,7 +4916,7 @@ function generateMessageElements2(props, calculatedMessages) {
|
|
|
4913
4916
|
zIndex: 5 + i,
|
|
4914
4917
|
text: textContent,
|
|
4915
4918
|
font: "apple",
|
|
4916
|
-
fontWeight:
|
|
4919
|
+
fontWeight: "normal",
|
|
4917
4920
|
fontSize: messageFontSize,
|
|
4918
4921
|
letterSpacing: messageLetterSpacing,
|
|
4919
4922
|
lineHeight: lineHeightMultiplier,
|
|
@@ -4986,7 +4989,7 @@ function generateHeaderTextElements(props, calculatedMessages) {
|
|
|
4986
4989
|
zIndex: 4,
|
|
4987
4990
|
text: messageHeaderTimestampText,
|
|
4988
4991
|
font: "apple",
|
|
4989
|
-
fontWeight:
|
|
4992
|
+
fontWeight: "normal",
|
|
4990
4993
|
fontSize: messageHeaderFontSize,
|
|
4991
4994
|
letterSpacing: messageHeaderLetterSpacing,
|
|
4992
4995
|
color: messageHeaderTextColor,
|
|
@@ -5005,7 +5008,7 @@ function generateHeaderTextElements(props, calculatedMessages) {
|
|
|
5005
5008
|
zIndex: 4,
|
|
5006
5009
|
text: messageHeaderImessageText,
|
|
5007
5010
|
font: "apple",
|
|
5008
|
-
fontWeight:
|
|
5011
|
+
fontWeight: "normal",
|
|
5009
5012
|
fontSize: messageHeaderFontSize,
|
|
5010
5013
|
letterSpacing: messageHeaderLetterSpacing,
|
|
5011
5014
|
color: messageHeaderTextColor,
|
|
@@ -5048,7 +5051,7 @@ function generateReadReceiptElement(props, calculatedMessages) {
|
|
|
5048
5051
|
zIndex: 4,
|
|
5049
5052
|
text: readReceiptText,
|
|
5050
5053
|
font: "apple",
|
|
5051
|
-
fontWeight:
|
|
5054
|
+
fontWeight: "bold",
|
|
5052
5055
|
fontSize: readReceiptFontSize,
|
|
5053
5056
|
letterSpacing: readReceiptLetterSpacing,
|
|
5054
5057
|
color: readReceiptColor,
|
|
@@ -5507,6 +5510,7 @@ var IMessageDmComposition = (props) => {
|
|
|
5507
5510
|
width,
|
|
5508
5511
|
height,
|
|
5509
5512
|
cropBounds,
|
|
5513
|
+
cropVerticalCenter: mergedProps.cropVerticalCenter,
|
|
5510
5514
|
backgroundColor: effectiveBackgroundColor,
|
|
5511
5515
|
showDebugOverlay,
|
|
5512
5516
|
referenceImageUrl,
|
|
@@ -6902,7 +6906,8 @@ var iMessageDmPropsSchema = z.object({
|
|
|
6902
6906
|
groupWithPrevious: z.boolean().optional()
|
|
6903
6907
|
})).optional(),
|
|
6904
6908
|
// Dynamic crop - crop output to element bounds
|
|
6905
|
-
dynamicCrop: z.record(z.any()).optional()
|
|
6909
|
+
dynamicCrop: z.record(z.any()).optional(),
|
|
6910
|
+
cropVerticalCenter: z.boolean().optional()
|
|
6906
6911
|
});
|
|
6907
6912
|
|
|
6908
6913
|
// src/Root.tsx
|
|
@@ -7568,6 +7573,8 @@ export {
|
|
|
7568
7573
|
calculateScreenshotAnimationDuration,
|
|
7569
7574
|
calculateTimelineContentEnd,
|
|
7570
7575
|
canSetAsReference,
|
|
7576
|
+
convertPropsToElements2 as convertIMessagePropsToElements,
|
|
7577
|
+
convertPropsToElements as convertInstagramPropsToElements,
|
|
7571
7578
|
convertPublicToProps,
|
|
7572
7579
|
debugFontStatus,
|
|
7573
7580
|
defaultIMessageDmProps,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ugcinc-render",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.224",
|
|
4
4
|
"description": "Unified rendering package for UGC Inc - shared types, components, and compositions for pixel-perfect client/server rendering",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|