ugcinc-render 1.3.12 → 1.3.13

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 CHANGED
@@ -320,6 +320,10 @@ interface ImageEditorNodeConfig {
320
320
  dimensionPreset: DimensionPresetKey;
321
321
  /** Elements to render */
322
322
  elements: ImageEditorElement[];
323
+ /** Background type: 'image' for image input, 'color' for solid color */
324
+ backgroundType?: 'image' | 'color';
325
+ /** Background color (hex) when backgroundType is 'color' */
326
+ backgroundColor?: string;
323
327
  /** How the background image fits the canvas */
324
328
  backgroundFit?: FitMode;
325
329
  /** Cached background image URL for consistent preview */
@@ -740,6 +744,10 @@ interface ImageEditorCompositionProps {
740
744
  width?: number;
741
745
  /** Canvas height (required when using elements) */
742
746
  height?: number;
747
+ /** Background type: 'image' for image input, 'color' for solid color */
748
+ backgroundType?: 'image' | 'color';
749
+ /** Background color (hex) when backgroundType is 'color' */
750
+ backgroundColor?: string;
743
751
  /** Background fit mode (when using elements) */
744
752
  backgroundFit?: FitMode;
745
753
  /** Background image URL (when using elements) */
@@ -782,7 +790,7 @@ interface ImageEditorCompositionProps {
782
790
  * />
783
791
  * ```
784
792
  */
785
- declare function ImageEditorComposition({ config, sources, scale, elements, width, height, backgroundFit, backgroundUrl, imageUrls, textValues, }: ImageEditorCompositionProps): react_jsx_runtime.JSX.Element;
793
+ declare function ImageEditorComposition({ config, sources, scale, elements, width, height, backgroundType, backgroundColor, backgroundFit, backgroundUrl, imageUrls, textValues, }: ImageEditorCompositionProps): react_jsx_runtime.JSX.Element;
786
794
 
787
795
  interface VideoEditorCompositionProps {
788
796
  /** The editor configuration to render */
package/dist/index.d.ts CHANGED
@@ -320,6 +320,10 @@ interface ImageEditorNodeConfig {
320
320
  dimensionPreset: DimensionPresetKey;
321
321
  /** Elements to render */
322
322
  elements: ImageEditorElement[];
323
+ /** Background type: 'image' for image input, 'color' for solid color */
324
+ backgroundType?: 'image' | 'color';
325
+ /** Background color (hex) when backgroundType is 'color' */
326
+ backgroundColor?: string;
323
327
  /** How the background image fits the canvas */
324
328
  backgroundFit?: FitMode;
325
329
  /** Cached background image URL for consistent preview */
@@ -740,6 +744,10 @@ interface ImageEditorCompositionProps {
740
744
  width?: number;
741
745
  /** Canvas height (required when using elements) */
742
746
  height?: number;
747
+ /** Background type: 'image' for image input, 'color' for solid color */
748
+ backgroundType?: 'image' | 'color';
749
+ /** Background color (hex) when backgroundType is 'color' */
750
+ backgroundColor?: string;
743
751
  /** Background fit mode (when using elements) */
744
752
  backgroundFit?: FitMode;
745
753
  /** Background image URL (when using elements) */
@@ -782,7 +790,7 @@ interface ImageEditorCompositionProps {
782
790
  * />
783
791
  * ```
784
792
  */
785
- declare function ImageEditorComposition({ config, sources, scale, elements, width, height, backgroundFit, backgroundUrl, imageUrls, textValues, }: ImageEditorCompositionProps): react_jsx_runtime.JSX.Element;
793
+ declare function ImageEditorComposition({ config, sources, scale, elements, width, height, backgroundType, backgroundColor, backgroundFit, backgroundUrl, imageUrls, textValues, }: ImageEditorCompositionProps): react_jsx_runtime.JSX.Element;
786
794
 
787
795
  interface VideoEditorCompositionProps {
788
796
  /** The editor configuration to render */
package/dist/index.js CHANGED
@@ -874,6 +874,8 @@ function ImageEditorComposition({
874
874
  elements,
875
875
  width,
876
876
  height,
877
+ backgroundType = "image",
878
+ backgroundColor,
877
879
  backgroundFit = "cover",
878
880
  backgroundUrl,
879
881
  imageUrls = {},
@@ -926,8 +928,9 @@ function ImageEditorComposition({
926
928
  }
927
929
  return void 0;
928
930
  };
929
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_remotion2.AbsoluteFill, { style: { backgroundColor: "#000000" }, children: [
930
- bgUrl && segmentsFromElements && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
931
+ const containerBgColor = backgroundType === "color" && backgroundColor ? backgroundColor : "#000000";
932
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_remotion2.AbsoluteFill, { style: { backgroundColor: containerBgColor }, children: [
933
+ backgroundType === "image" && bgUrl && segmentsFromElements && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
931
934
  import_remotion2.Img,
932
935
  {
933
936
  src: bgUrl,
package/dist/index.mjs CHANGED
@@ -813,6 +813,8 @@ function ImageEditorComposition({
813
813
  elements,
814
814
  width,
815
815
  height,
816
+ backgroundType = "image",
817
+ backgroundColor,
816
818
  backgroundFit = "cover",
817
819
  backgroundUrl,
818
820
  imageUrls = {},
@@ -865,8 +867,9 @@ function ImageEditorComposition({
865
867
  }
866
868
  return void 0;
867
869
  };
868
- return /* @__PURE__ */ jsxs(AbsoluteFill, { style: { backgroundColor: "#000000" }, children: [
869
- bgUrl && segmentsFromElements && /* @__PURE__ */ jsx3(
870
+ const containerBgColor = backgroundType === "color" && backgroundColor ? backgroundColor : "#000000";
871
+ return /* @__PURE__ */ jsxs(AbsoluteFill, { style: { backgroundColor: containerBgColor }, children: [
872
+ backgroundType === "image" && bgUrl && segmentsFromElements && /* @__PURE__ */ jsx3(
870
873
  Img2,
871
874
  {
872
875
  src: bgUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ugcinc-render",
3
- "version": "1.3.12",
3
+ "version": "1.3.13",
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",