@microfox/remotion 1.2.1 → 1.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 253b532: Changes from PR #23: pg_textatoms_3010
8
+
3
9
  ## 1.2.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -331,6 +331,7 @@ interface TextAtomData {
331
331
  text: string;
332
332
  style?: React$1.CSSProperties;
333
333
  className?: string;
334
+ gradient?: string;
334
335
  font?: FontConfig$1;
335
336
  fallbackFonts?: string[];
336
337
  loadingState?: {
package/dist/index.d.ts CHANGED
@@ -331,6 +331,7 @@ interface TextAtomData {
331
331
  text: string;
332
332
  style?: React$1.CSSProperties;
333
333
  className?: string;
334
+ gradient?: string;
334
335
  font?: FontConfig$1;
335
336
  fallbackFonts?: string[];
336
337
  loadingState?: {
package/dist/index.js CHANGED
@@ -2684,11 +2684,26 @@ var Atom3 = ({ id, data }) => {
2684
2684
  }
2685
2685
  }
2686
2686
  }, [data.font, isReady, isLoaded, error]);
2687
- const enhancedStyle = (0, import_react17.useMemo)(() => ({
2688
- fontFamily,
2689
- ...data.style,
2690
- ...overrideStyles
2691
- }), [fontFamily, data.style, overrideStyles]);
2687
+ const enhancedStyle = (0, import_react17.useMemo)(() => {
2688
+ const baseStyle = {
2689
+ fontFamily,
2690
+ ...data.style
2691
+ };
2692
+ if (data.gradient) {
2693
+ return {
2694
+ ...baseStyle,
2695
+ backgroundImage: data.gradient,
2696
+ backgroundClip: "text",
2697
+ WebkitBackgroundClip: "text",
2698
+ color: "transparent",
2699
+ ...overrideStyles
2700
+ };
2701
+ }
2702
+ return {
2703
+ ...baseStyle,
2704
+ ...overrideStyles
2705
+ };
2706
+ }, [fontFamily, data.style, data.gradient, overrideStyles]);
2692
2707
  if (isFontLoading && data.loadingState?.showLoadingIndicator) {
2693
2708
  return /* @__PURE__ */ import_react17.default.createElement("div", { style: enhancedStyle, className: data.className }, /* @__PURE__ */ import_react17.default.createElement("span", { style: data.loadingState.loadingStyle }, data.loadingState.loadingText || "Loading..."));
2694
2709
  }