Skip to content

🎥 Make videos programmatically with React

this could fix it

Jonny Burgerb440d90073b3
diff --git a/packages/animation-utils/rollup.config.js b/packages/animation-utils/rollup.config.js
index 145571d05a..692baa92e3 100644
--- a/packages/animation-utils/rollup.config.js
+++ b/packages/animation-utils/rollup.config.js
@@ -11,7 +11,7 @@ export default [
sourcemap: false,
},
],
- external: ['react', 'remotion', 'react/jsx-runtime'],
+ external: ['react', 'remotion', 'remotion/no-react', 'react/jsx-runtime'],
plugins: [
typescript({
tsconfig: 'tsconfig-esm.json',
diff --git a/packages/animation-utils/src/transformation-helpers/interpolate-styles/utils.ts b/packages/animation-utils/src/transformation-helpers/interpolate-styles/utils.ts
index 7db60f8aff..121c52f978 100644
--- a/packages/animation-utils/src/transformation-helpers/interpolate-styles/utils.ts
+++ b/packages/animation-utils/src/transformation-helpers/interpolate-styles/utils.ts
@@ -1,4 +1,4 @@
-import {Internals} from 'remotion';
+import {NoReactInternals} from 'remotion/no-react';
import type {ColorMatchers, CSSPropertiesValue} from '../../type';
import {NUMBER, PERCENTAGE} from './constants';
@@ -110,7 +110,7 @@ const classifyArgsOfFunction = (value: string) => {
};
const isColorValue = (value: string) => {
- if (Object.keys(Internals.colorNames).includes(value)) {
+ if (Object.keys(NoReactInternals.colorNames).includes(value)) {
return true;
}
diff --git a/packages/core/src/internals.ts b/packages/core/src/internals.ts
index 997661bfd3..7abb348e0c 100644
--- a/packages/core/src/internals.ts
+++ b/packages/core/src/internals.ts
@@ -32,7 +32,6 @@ import type {RemotionEnvironment} from './get-remotion-environment.js';
import {getRemotionEnvironment} from './get-remotion-environment.js';
import type {SerializedJSONWithCustomFields} from './input-props-serialization.js';
import {DATE_TOKEN, FILE_TOKEN} from './input-props-serialization.js';
-import {colorNames} from './interpolate-colors.js';
import {IsPlayerContextProvider, useIsPlayer} from './is-player.js';
import {NativeLayersProvider} from './NativeLayers.js';
import {NonceContext} from './nonce.js';
@@ -155,7 +154,6 @@ export const Internals = {
BufferingProvider,
BufferingContextReact,
enableSequenceStackTraces,
- colorNames,
CurrentScaleContext,
PreviewSizeContext,
calculateScale,
diff --git a/packages/core/src/no-react.ts b/packages/core/src/no-react.ts
index c6eb16922f..48ce38776c 100644
--- a/packages/core/src/no-react.ts
+++ b/packages/core/src/no-react.ts
@@ -17,7 +17,7 @@ import {
deserializeJSONWithCustomFields,
serializeJSONWithDate,
} from './input-props-serialization';
-import {processColor} from './interpolate-colors';
+import {colorNames, processColor} from './interpolate-colors';
import {truthy} from './truthy';
import {ENABLE_V5_BREAKING_CHANGES} from './v5-flag';
import {validateFrame} from './validate-frame';
@@ -48,4 +48,5 @@ export const NoReactInternals = {
ENABLE_V5_BREAKING_CHANGES,
MIN_NODE_VERSION: ENABLE_V5_BREAKING_CHANGES ? 18 : 16,
MIN_BUN_VERSION: ENABLE_V5_BREAKING_CHANGES ? '1.1.3' : '1.0.3',
+ colorNames,
};