remotion 4.0.232 → 4.0.233

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.
@@ -1,13 +1,21 @@
1
1
  import React from 'react';
2
+ type Size = {
3
+ width: number;
4
+ height: number;
5
+ left: number;
6
+ top: number;
7
+ windowSize: {
8
+ width: number;
9
+ height: number;
10
+ };
11
+ refresh: () => void;
12
+ };
2
13
  export type CurrentScaleContextType = {
3
14
  type: 'scale';
4
15
  scale: number;
5
16
  } | {
6
17
  type: 'canvas-size';
7
- canvasSize: {
8
- width: number;
9
- height: number;
10
- };
18
+ canvasSize: Size;
11
19
  };
12
20
  export declare const CurrentScaleContext: React.Context<CurrentScaleContextType | null>;
13
21
  type Options = {
@@ -3,4 +3,4 @@
3
3
  * @see [Documentation](https://remotion.dev/docs/version)
4
4
  * @returns {string} The current version of the remotion package
5
5
  */
6
- export declare const VERSION = "4.0.232";
6
+ export declare const VERSION = "4.0.233";
@@ -7,4 +7,4 @@ exports.VERSION = void 0;
7
7
  * @see [Documentation](https://remotion.dev/docs/version)
8
8
  * @returns {string} The current version of the remotion package
9
9
  */
10
- exports.VERSION = '4.0.232';
10
+ exports.VERSION = '4.0.233';
@@ -19,7 +19,10 @@ const use_unsafe_video_config_js_1 = require("../use-unsafe-video-config.js");
19
19
  const volume_prop_js_1 = require("../volume-prop.js");
20
20
  const get_current_time_js_1 = require("./get-current-time.js");
21
21
  const offthread_video_source_js_1 = require("./offthread-video-source.js");
22
- const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, allowAmplificationDuringRender, transparent = false, toneMapped = true, toneFrequency, name, loopVolumeCurveBehavior, delayRenderRetries, delayRenderTimeoutInMilliseconds, onVideoFrame, ...props }) => {
22
+ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, allowAmplificationDuringRender, transparent = false, toneMapped = true, toneFrequency, name, loopVolumeCurveBehavior, delayRenderRetries, delayRenderTimeoutInMilliseconds, onVideoFrame,
23
+ // Remove crossOrigin prop during rendering
24
+ // https://discord.com/channels/809501355504959528/844143007183667220/1311639632496033813
25
+ crossOrigin, ...props }) => {
23
26
  const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)();
24
27
  const frame = (0, use_current_frame_js_1.useCurrentFrame)();
25
28
  const volumePropsFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(loopVolumeCurveBehavior !== null && loopVolumeCurveBehavior !== void 0 ? loopVolumeCurveBehavior : 'repeat');
@@ -23,7 +23,8 @@ if (typeof createContext !== "function") {
23
23
  ' "use client";',
24
24
  ' import {useCurrentFrame} from "remotion";'
25
25
  ];
26
- throw new Error(err.join("\n"));
26
+ throw new Error(err.join(`
27
+ `));
27
28
  }
28
29
 
29
30
  // src/Clipper.tsx
@@ -101,7 +102,7 @@ function truthy(value) {
101
102
  }
102
103
 
103
104
  // src/version.ts
104
- var VERSION = "4.0.232";
105
+ var VERSION = "4.0.233";
105
106
 
106
107
  // src/multiple-versions-warning.ts
107
108
  var checkMultipleRemotionVersions = () => {
@@ -126,7 +127,8 @@ var checkMultipleRemotionVersions = () => {
126
127
  throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
127
128
  VERSION,
128
129
  typeof alreadyImported === "string" ? alreadyImported : "an older version"
129
- ].filter(truthy).join(" and ")}. This will cause things to break in an unexpected way.\nCheck that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`);
130
+ ].filter(truthy).join(" and ")}. This will cause things to break in an unexpected way.
131
+ Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`);
130
132
  }
131
133
  set();
132
134
  };
@@ -1626,21 +1628,6 @@ var calculateLoopDuration = ({
1626
1628
  };
1627
1629
 
1628
1630
  // src/cancel-render.ts
1629
- function cancelRender(err) {
1630
- let error;
1631
- if (isErrorLike(err)) {
1632
- error = err;
1633
- if (!error.stack) {
1634
- error.stack = new Error(error.message).stack;
1635
- }
1636
- } else if (typeof err === "string") {
1637
- error = Error(err);
1638
- } else {
1639
- error = Error("Rendering was cancelled");
1640
- }
1641
- window.remotion_cancelledError = error.stack;
1642
- throw error;
1643
- }
1644
1631
  var isErrorLike = (err) => {
1645
1632
  if (err instanceof Error) {
1646
1633
  return true;
@@ -1665,6 +1652,21 @@ var isErrorLike = (err) => {
1665
1652
  }
1666
1653
  return true;
1667
1654
  };
1655
+ function cancelRender(err) {
1656
+ let error;
1657
+ if (isErrorLike(err)) {
1658
+ error = err;
1659
+ if (!error.stack) {
1660
+ error.stack = new Error(error.message).stack;
1661
+ }
1662
+ } else if (typeof err === "string") {
1663
+ error = Error(err);
1664
+ } else {
1665
+ error = Error("Rendering was cancelled");
1666
+ }
1667
+ window.remotion_cancelledError = error.stack;
1668
+ throw error;
1669
+ }
1668
1670
 
1669
1671
  // src/loop/index.tsx
1670
1672
  import React8, { createContext as createContext11, useMemo as useMemo11 } from "react";
@@ -2815,7 +2817,8 @@ var warnAboutNonSeekableMedia = (ref, type) => {
2815
2817
  "2) The media does not support seeking.",
2816
2818
  "3) The media was loaded with security headers prventing it from being included.",
2817
2819
  "Please see https://remotion.dev/docs/non-seekable-media for assistance."
2818
- ].join("\n");
2820
+ ].join(`
2821
+ `);
2819
2822
  if (type === "console-error") {
2820
2823
  console.error(msg);
2821
2824
  } else if (type === "console-warning") {
@@ -3825,19 +3828,19 @@ var Loading = () => {
3825
3828
  /* @__PURE__ */ jsx19("style", {
3826
3829
  type: "text/css",
3827
3830
  children: `
3828
- @keyframes anim {
3829
- from {
3830
- opacity: 0
3831
- }
3832
- to {
3833
- opacity: 1
3834
- }
3835
- }
3836
- #remotion-comp-loading {
3837
- animation: anim 2s;
3838
- animation-fill-mode: forwards;
3839
- }
3840
- `
3831
+ \t\t\t\t@keyframes anim {
3832
+ \t\t\t\t\tfrom {
3833
+ \t\t\t\t\t\topacity: 0
3834
+ \t\t\t\t\t}
3835
+ \t\t\t\t\tto {
3836
+ \t\t\t\t\t\topacity: 1
3837
+ \t\t\t\t\t}
3838
+ \t\t\t\t}
3839
+ \t\t\t\t#remotion-comp-loading {
3840
+ \t\t\t\t\tanimation: anim 2s;
3841
+ \t\t\t\t\tanimation-fill-mode: forwards;
3842
+ \t\t\t\t}
3843
+ \t\t\t`
3841
3844
  }),
3842
3845
  /* @__PURE__ */ jsx19("svg", {
3843
3846
  width: ICON_SIZE,
@@ -4148,6 +4151,13 @@ var CompositionManagerProvider = ({ children, numberOfAudioTags }) => {
4148
4151
  });
4149
4152
  };
4150
4153
  // src/bezier.ts
4154
+ var NEWTON_ITERATIONS = 4;
4155
+ var NEWTON_MIN_SLOPE = 0.001;
4156
+ var SUBDIVISION_PRECISION = 0.0000001;
4157
+ var SUBDIVISION_MAX_ITERATIONS = 10;
4158
+ var kSplineTableSize = 11;
4159
+ var kSampleStepSize = 1 / (kSplineTableSize - 1);
4160
+ var float32ArraySupported = typeof Float32Array === "function";
4151
4161
  function a(aA1, aA2) {
4152
4162
  return 1 - 3 * aA2 + 3 * aA1;
4153
4163
  }
@@ -4246,13 +4256,6 @@ function bezier(mX1, mY1, mX2, mY2) {
4246
4256
  return calcBezier(getTForX(x), mY1, mY2);
4247
4257
  };
4248
4258
  }
4249
- var NEWTON_ITERATIONS = 4;
4250
- var NEWTON_MIN_SLOPE = 0.001;
4251
- var SUBDIVISION_PRECISION = 0.0000001;
4252
- var SUBDIVISION_MAX_ITERATIONS = 10;
4253
- var kSplineTableSize = 11;
4254
- var kSampleStepSize = 1 / (kSplineTableSize - 1);
4255
- var float32ArraySupported = typeof Float32Array === "function";
4256
4259
 
4257
4260
  // src/easing.ts
4258
4261
  class Easing {
@@ -4403,10 +4406,10 @@ import {
4403
4406
  useLayoutEffect as useLayoutEffect3,
4404
4407
  useRef as useRef11
4405
4408
  } from "react";
4409
+ import { jsx as jsx23 } from "react/jsx-runtime";
4406
4410
  function exponentialBackoff(errorCount) {
4407
4411
  return 1000 * 2 ** (errorCount - 1);
4408
4412
  }
4409
- import { jsx as jsx23 } from "react/jsx-runtime";
4410
4413
  var ImgRefForwarding = ({
4411
4414
  onError,
4412
4415
  maxRetries = 2,
@@ -4558,7 +4561,7 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
4558
4561
  }
4559
4562
  body {
4560
4563
  margin: 0;
4561
- background-color: ${backgroundColor};
4564
+ \t background-color: ${backgroundColor};
4562
4565
  }
4563
4566
  .${OFFTHREAD_VIDEO_CLASS_NAME} {
4564
4567
  object-fit: contain;
@@ -4781,7 +4784,8 @@ var useCurrentScale = (options) => {
4781
4784
  "This hook can only be called in a component that is being rendered by Remotion.",
4782
4785
  "If you want to this hook to return 1 outside of Remotion, pass {dontThrowIfOutsideOfRemotion: true} as an option.",
4783
4786
  "If you think you called this hook in a Remotion component, make sure all versions of Remotion are aligned."
4784
- ].join("\n"));
4787
+ ].join(`
4788
+ `));
4785
4789
  }
4786
4790
  if (hasContext.type === "scale") {
4787
4791
  return hasContext.scale;
@@ -4833,6 +4837,7 @@ var watchStaticFile = (fileName, callback) => {
4833
4837
 
4834
4838
  // src/wrap-remotion-context.tsx
4835
4839
  import React23, { useMemo as useMemo25 } from "react";
4840
+ import { jsx as jsx25 } from "react/jsx-runtime";
4836
4841
  function useRemotionContexts() {
4837
4842
  const compositionManagerCtx = React23.useContext(CompositionManager);
4838
4843
  const timelineContext = React23.useContext(TimelineContext);
@@ -4871,7 +4876,6 @@ function useRemotionContexts() {
4871
4876
  bufferManagerContext
4872
4877
  ]);
4873
4878
  }
4874
- import { jsx as jsx25 } from "react/jsx-runtime";
4875
4879
  var RemotionContextProvider = (props2) => {
4876
4880
  const { children, contexts } = props2;
4877
4881
  return /* @__PURE__ */ jsx25(CanUseRemotionHooks.Provider, {
@@ -4973,6 +4977,8 @@ var Internals = {
4973
4977
  validateRenderAsset
4974
4978
  };
4975
4979
  // src/interpolate-colors.ts
4980
+ var NUMBER = "[-+]?\\d*\\.?\\d+";
4981
+ var PERCENTAGE = NUMBER + "%";
4976
4982
  function call(...args) {
4977
4983
  return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
4978
4984
  }
@@ -5060,60 +5066,6 @@ function parsePercentage(str) {
5060
5066
  }
5061
5067
  return int / 100;
5062
5068
  }
5063
- function normalizeColor(color) {
5064
- const matchers = getMatchers();
5065
- let match;
5066
- if (matchers.hex6) {
5067
- if (match = matchers.hex6.exec(color)) {
5068
- return Number.parseInt(match[1] + "ff", 16) >>> 0;
5069
- }
5070
- }
5071
- if (colorNames[color] !== undefined) {
5072
- return colorNames[color];
5073
- }
5074
- if (matchers.rgb) {
5075
- if (match = matchers.rgb.exec(color)) {
5076
- return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;
5077
- }
5078
- }
5079
- if (matchers.rgba) {
5080
- if (match = matchers.rgba.exec(color)) {
5081
- return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;
5082
- }
5083
- }
5084
- if (matchers.hex3) {
5085
- if (match = matchers.hex3.exec(color)) {
5086
- return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + "ff", 16) >>> 0;
5087
- }
5088
- }
5089
- if (matchers.hex8) {
5090
- if (match = matchers.hex8.exec(color)) {
5091
- return Number.parseInt(match[1], 16) >>> 0;
5092
- }
5093
- }
5094
- if (matchers.hex4) {
5095
- if (match = matchers.hex4.exec(color)) {
5096
- return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;
5097
- }
5098
- }
5099
- if (matchers.hsl) {
5100
- if (match = matchers.hsl.exec(color)) {
5101
- return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;
5102
- }
5103
- }
5104
- if (matchers.hsla) {
5105
- if (match = matchers.hsla.exec(color)) {
5106
- return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
5107
- }
5108
- }
5109
- throw new Error(`invalid color string ${color} provided`);
5110
- }
5111
- function processColor(color) {
5112
- const normalizedColor = normalizeColor(color);
5113
- return (normalizedColor << 24 | normalizedColor >>> 8) >>> 0;
5114
- }
5115
- var NUMBER = "[-+]?\\d*\\.?\\d+";
5116
- var PERCENTAGE = NUMBER + "%";
5117
5069
  var colorNames = {
5118
5070
  transparent: 0,
5119
5071
  aliceblue: 4042850303,
@@ -5266,6 +5218,54 @@ var colorNames = {
5266
5218
  yellow: 4294902015,
5267
5219
  yellowgreen: 2597139199
5268
5220
  };
5221
+ function normalizeColor(color) {
5222
+ const matchers = getMatchers();
5223
+ let match;
5224
+ if (matchers.hex6) {
5225
+ if (match = matchers.hex6.exec(color)) {
5226
+ return Number.parseInt(match[1] + "ff", 16) >>> 0;
5227
+ }
5228
+ }
5229
+ if (colorNames[color] !== undefined) {
5230
+ return colorNames[color];
5231
+ }
5232
+ if (matchers.rgb) {
5233
+ if (match = matchers.rgb.exec(color)) {
5234
+ return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;
5235
+ }
5236
+ }
5237
+ if (matchers.rgba) {
5238
+ if (match = matchers.rgba.exec(color)) {
5239
+ return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;
5240
+ }
5241
+ }
5242
+ if (matchers.hex3) {
5243
+ if (match = matchers.hex3.exec(color)) {
5244
+ return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + "ff", 16) >>> 0;
5245
+ }
5246
+ }
5247
+ if (matchers.hex8) {
5248
+ if (match = matchers.hex8.exec(color)) {
5249
+ return Number.parseInt(match[1], 16) >>> 0;
5250
+ }
5251
+ }
5252
+ if (matchers.hex4) {
5253
+ if (match = matchers.hex4.exec(color)) {
5254
+ return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;
5255
+ }
5256
+ }
5257
+ if (matchers.hsl) {
5258
+ if (match = matchers.hsl.exec(color)) {
5259
+ return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;
5260
+ }
5261
+ }
5262
+ if (matchers.hsla) {
5263
+ if (match = matchers.hsla.exec(color)) {
5264
+ return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
5265
+ }
5266
+ }
5267
+ throw new Error(`invalid color string ${color} provided`);
5268
+ }
5269
5269
  var opacity = (c2) => {
5270
5270
  return (c2 >> 24 & 255) / 255;
5271
5271
  };
@@ -5281,6 +5281,10 @@ var blue = (c2) => {
5281
5281
  var rgbaColor = (r, g, b2, alpha) => {
5282
5282
  return `rgba(${r}, ${g}, ${b2}, ${alpha})`;
5283
5283
  };
5284
+ function processColor(color) {
5285
+ const normalizedColor = normalizeColor(color);
5286
+ return (normalizedColor << 24 | normalizedColor >>> 8) >>> 0;
5287
+ }
5284
5288
  var interpolateColorsRGB = (value, inputRange, colors) => {
5285
5289
  const [r, g, b2, a2] = [red, green, blue, opacity].map((f) => {
5286
5290
  const unrounded = interpolate(value, inputRange, colors.map((c2) => f(c2)), {
@@ -5482,6 +5486,13 @@ var validateSpringDuration = (dur) => {
5482
5486
  };
5483
5487
 
5484
5488
  // src/spring/spring-utils.ts
5489
+ var defaultSpringConfig = {
5490
+ damping: 10,
5491
+ mass: 1,
5492
+ stiffness: 100,
5493
+ overshootClamping: false
5494
+ };
5495
+ var advanceCache = {};
5485
5496
  function advance({
5486
5497
  animation,
5487
5498
  now,
@@ -5533,6 +5544,7 @@ function advance({
5533
5544
  advanceCache[cacheKey] = animationNode;
5534
5545
  return animationNode;
5535
5546
  }
5547
+ var calculationCache = {};
5536
5548
  function springCalculation({
5537
5549
  frame,
5538
5550
  fps,
@@ -5577,16 +5589,9 @@ function springCalculation({
5577
5589
  calculationCache[cacheKey] = animation;
5578
5590
  return animation;
5579
5591
  }
5580
- var defaultSpringConfig = {
5581
- damping: 10,
5582
- mass: 1,
5583
- stiffness: 100,
5584
- overshootClamping: false
5585
- };
5586
- var advanceCache = {};
5587
- var calculationCache = {};
5588
5592
 
5589
5593
  // src/spring/measure-spring.ts
5594
+ var cache = new Map;
5590
5595
  function measureSpring({
5591
5596
  fps,
5592
5597
  config = {},
@@ -5654,7 +5659,6 @@ function measureSpring({
5654
5659
  cache.set(cacheKey, finishedFrame);
5655
5660
  return finishedFrame;
5656
5661
  }
5657
- var cache = new Map;
5658
5662
 
5659
5663
  // src/spring/index.ts
5660
5664
  function spring({
@@ -5741,6 +5745,7 @@ var OffthreadVideoForRendering = ({
5741
5745
  delayRenderRetries,
5742
5746
  delayRenderTimeoutInMilliseconds,
5743
5747
  onVideoFrame,
5748
+ crossOrigin,
5744
5749
  ...props2
5745
5750
  }) => {
5746
5751
  const absoluteFrame = useTimelinePosition();
@@ -6605,7 +6610,7 @@ var Config = new Proxy(proxyObj, {
6605
6610
  return Config;
6606
6611
  }
6607
6612
  return () => {
6608
- console.warn("\u26A0\uFE0F The CLI configuration has been extracted from Remotion Core.");
6613
+ console.warn("⚠️ The CLI configuration has been extracted from Remotion Core.");
6609
6614
  console.warn("Update the import from the config file:");
6610
6615
  console.warn();
6611
6616
  console.warn("- Delete:");
@@ -290,6 +290,8 @@ var deserializeJSONWithCustomFields = (data) => {
290
290
  };
291
291
 
292
292
  // src/interpolate-colors.ts
293
+ var NUMBER = "[-+]?\\d*\\.?\\d+";
294
+ var PERCENTAGE = NUMBER + "%";
293
295
  function call(...args) {
294
296
  return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
295
297
  }
@@ -377,60 +379,6 @@ function parsePercentage(str) {
377
379
  }
378
380
  return int / 100;
379
381
  }
380
- function normalizeColor(color) {
381
- const matchers = getMatchers();
382
- let match;
383
- if (matchers.hex6) {
384
- if (match = matchers.hex6.exec(color)) {
385
- return Number.parseInt(match[1] + "ff", 16) >>> 0;
386
- }
387
- }
388
- if (colorNames[color] !== undefined) {
389
- return colorNames[color];
390
- }
391
- if (matchers.rgb) {
392
- if (match = matchers.rgb.exec(color)) {
393
- return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;
394
- }
395
- }
396
- if (matchers.rgba) {
397
- if (match = matchers.rgba.exec(color)) {
398
- return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;
399
- }
400
- }
401
- if (matchers.hex3) {
402
- if (match = matchers.hex3.exec(color)) {
403
- return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + "ff", 16) >>> 0;
404
- }
405
- }
406
- if (matchers.hex8) {
407
- if (match = matchers.hex8.exec(color)) {
408
- return Number.parseInt(match[1], 16) >>> 0;
409
- }
410
- }
411
- if (matchers.hex4) {
412
- if (match = matchers.hex4.exec(color)) {
413
- return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;
414
- }
415
- }
416
- if (matchers.hsl) {
417
- if (match = matchers.hsl.exec(color)) {
418
- return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;
419
- }
420
- }
421
- if (matchers.hsla) {
422
- if (match = matchers.hsla.exec(color)) {
423
- return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
424
- }
425
- }
426
- throw new Error(`invalid color string ${color} provided`);
427
- }
428
- function processColor(color) {
429
- const normalizedColor = normalizeColor(color);
430
- return (normalizedColor << 24 | normalizedColor >>> 8) >>> 0;
431
- }
432
- var NUMBER = "[-+]?\\d*\\.?\\d+";
433
- var PERCENTAGE = NUMBER + "%";
434
382
  var colorNames = {
435
383
  transparent: 0,
436
384
  aliceblue: 4042850303,
@@ -583,6 +531,58 @@ var colorNames = {
583
531
  yellow: 4294902015,
584
532
  yellowgreen: 2597139199
585
533
  };
534
+ function normalizeColor(color) {
535
+ const matchers = getMatchers();
536
+ let match;
537
+ if (matchers.hex6) {
538
+ if (match = matchers.hex6.exec(color)) {
539
+ return Number.parseInt(match[1] + "ff", 16) >>> 0;
540
+ }
541
+ }
542
+ if (colorNames[color] !== undefined) {
543
+ return colorNames[color];
544
+ }
545
+ if (matchers.rgb) {
546
+ if (match = matchers.rgb.exec(color)) {
547
+ return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;
548
+ }
549
+ }
550
+ if (matchers.rgba) {
551
+ if (match = matchers.rgba.exec(color)) {
552
+ return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;
553
+ }
554
+ }
555
+ if (matchers.hex3) {
556
+ if (match = matchers.hex3.exec(color)) {
557
+ return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + "ff", 16) >>> 0;
558
+ }
559
+ }
560
+ if (matchers.hex8) {
561
+ if (match = matchers.hex8.exec(color)) {
562
+ return Number.parseInt(match[1], 16) >>> 0;
563
+ }
564
+ }
565
+ if (matchers.hex4) {
566
+ if (match = matchers.hex4.exec(color)) {
567
+ return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;
568
+ }
569
+ }
570
+ if (matchers.hsl) {
571
+ if (match = matchers.hsl.exec(color)) {
572
+ return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;
573
+ }
574
+ }
575
+ if (matchers.hsla) {
576
+ if (match = matchers.hsla.exec(color)) {
577
+ return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;
578
+ }
579
+ }
580
+ throw new Error(`invalid color string ${color} provided`);
581
+ }
582
+ function processColor(color) {
583
+ const normalizedColor = normalizeColor(color);
584
+ return (normalizedColor << 24 | normalizedColor >>> 8) >>> 0;
585
+ }
586
586
 
587
587
  // src/v5-flag.ts
588
588
  var ENABLE_V5_BREAKING_CHANGES = false;
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "4.0.232";
2
+ var VERSION = "4.0.233";
3
3
  export {
4
4
  VERSION
5
5
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
4
4
  },
5
5
  "name": "remotion",
6
- "version": "4.0.232",
6
+ "version": "4.0.233",
7
7
  "description": "Make videos programmatically",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "webpack": "5.96.1",
29
29
  "zod": "3.22.3",
30
30
  "eslint": "9.14.0",
31
- "@remotion/eslint-config-internal": "4.0.232"
31
+ "@remotion/eslint-config-internal": "4.0.233"
32
32
  },
33
33
  "keywords": [
34
34
  "remotion",