@remotion/promo-pages 4.0.484 → 4.0.486

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.
@@ -18712,7 +18712,7 @@ var getDefaultConfig = () => {
18712
18712
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
18713
18713
 
18714
18714
  // ../design/dist/esm/index.mjs
18715
- import React32, { useEffect as useEffect22, useMemo as useMemo42, useState as useState21 } from "react";
18715
+ import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState21 } from "react";
18716
18716
 
18717
18717
  // ../paths/dist/esm/index.mjs
18718
18718
  var cutLInstruction = ({
@@ -20818,6 +20818,94 @@ var getBoundingBox = (d) => {
20818
20818
  const unarced = removeATSHVQInstructions(normalizeInstructions(parsed));
20819
20819
  return getBoundingBoxFromInstructions(unarced);
20820
20820
  };
20821
+ var translateSegments = (segments, x, y) => {
20822
+ return segments.map((segment) => {
20823
+ if (segment.type === "a" || segment.type === "c" || segment.type === "v" || segment.type === "s" || segment.type === "h" || segment.type === "l" || segment.type === "m" || segment.type === "q" || segment.type === "t") {
20824
+ return segment;
20825
+ }
20826
+ if (segment.type === "V") {
20827
+ return {
20828
+ type: "V",
20829
+ y: segment.y + y
20830
+ };
20831
+ }
20832
+ if (segment.type === "H") {
20833
+ return {
20834
+ type: "H",
20835
+ x: segment.x + x
20836
+ };
20837
+ }
20838
+ if (segment.type === "A") {
20839
+ return {
20840
+ type: "A",
20841
+ rx: segment.rx,
20842
+ ry: segment.ry,
20843
+ largeArcFlag: segment.largeArcFlag,
20844
+ sweepFlag: segment.sweepFlag,
20845
+ xAxisRotation: segment.xAxisRotation,
20846
+ x: segment.x + x,
20847
+ y: segment.y + y
20848
+ };
20849
+ }
20850
+ if (segment.type === "Z") {
20851
+ return segment;
20852
+ }
20853
+ if (segment.type === "C") {
20854
+ return {
20855
+ type: "C",
20856
+ cp1x: segment.cp1x + x,
20857
+ cp1y: segment.cp1y + y,
20858
+ cp2x: segment.cp2x + x,
20859
+ cp2y: segment.cp2y + y,
20860
+ x: segment.x + x,
20861
+ y: segment.y + y
20862
+ };
20863
+ }
20864
+ if (segment.type === "Q") {
20865
+ return {
20866
+ type: "Q",
20867
+ cpx: segment.cpx + x,
20868
+ cpy: segment.cpy + y,
20869
+ x: segment.x + x,
20870
+ y: segment.y + y
20871
+ };
20872
+ }
20873
+ if (segment.type === "S") {
20874
+ return {
20875
+ type: "S",
20876
+ cpx: segment.cpx + x,
20877
+ cpy: segment.cpy + y,
20878
+ x: segment.x + x,
20879
+ y: segment.y + y
20880
+ };
20881
+ }
20882
+ if (segment.type === "T") {
20883
+ return {
20884
+ type: "T",
20885
+ x: segment.x + x,
20886
+ y: segment.y + y
20887
+ };
20888
+ }
20889
+ if (segment.type === "L") {
20890
+ return {
20891
+ type: "L",
20892
+ x: segment.x + x,
20893
+ y: segment.y + y
20894
+ };
20895
+ }
20896
+ if (segment.type === "M") {
20897
+ return {
20898
+ type: "M",
20899
+ x: segment.x + x,
20900
+ y: segment.y + y
20901
+ };
20902
+ }
20903
+ throw new Error(`Unknown segment type: ${segment.type}`);
20904
+ });
20905
+ };
20906
+ var translatePath = (path, x, y) => {
20907
+ return serializeInstructions(translateSegments(parsePath(path), x, y));
20908
+ };
20821
20909
  var mod = (x, m) => {
20822
20910
  return (x % m + m) % m;
20823
20911
  };
@@ -21379,94 +21467,6 @@ var getLength = (path) => {
21379
21467
  const constructucted = construct(path);
21380
21468
  return constructucted.totalLength;
21381
21469
  };
21382
- var translateSegments = (segments, x, y) => {
21383
- return segments.map((segment) => {
21384
- if (segment.type === "a" || segment.type === "c" || segment.type === "v" || segment.type === "s" || segment.type === "h" || segment.type === "l" || segment.type === "m" || segment.type === "q" || segment.type === "t") {
21385
- return segment;
21386
- }
21387
- if (segment.type === "V") {
21388
- return {
21389
- type: "V",
21390
- y: segment.y + y
21391
- };
21392
- }
21393
- if (segment.type === "H") {
21394
- return {
21395
- type: "H",
21396
- x: segment.x + x
21397
- };
21398
- }
21399
- if (segment.type === "A") {
21400
- return {
21401
- type: "A",
21402
- rx: segment.rx,
21403
- ry: segment.ry,
21404
- largeArcFlag: segment.largeArcFlag,
21405
- sweepFlag: segment.sweepFlag,
21406
- xAxisRotation: segment.xAxisRotation,
21407
- x: segment.x + x,
21408
- y: segment.y + y
21409
- };
21410
- }
21411
- if (segment.type === "Z") {
21412
- return segment;
21413
- }
21414
- if (segment.type === "C") {
21415
- return {
21416
- type: "C",
21417
- cp1x: segment.cp1x + x,
21418
- cp1y: segment.cp1y + y,
21419
- cp2x: segment.cp2x + x,
21420
- cp2y: segment.cp2y + y,
21421
- x: segment.x + x,
21422
- y: segment.y + y
21423
- };
21424
- }
21425
- if (segment.type === "Q") {
21426
- return {
21427
- type: "Q",
21428
- cpx: segment.cpx + x,
21429
- cpy: segment.cpy + y,
21430
- x: segment.x + x,
21431
- y: segment.y + y
21432
- };
21433
- }
21434
- if (segment.type === "S") {
21435
- return {
21436
- type: "S",
21437
- cpx: segment.cpx + x,
21438
- cpy: segment.cpy + y,
21439
- x: segment.x + x,
21440
- y: segment.y + y
21441
- };
21442
- }
21443
- if (segment.type === "T") {
21444
- return {
21445
- type: "T",
21446
- x: segment.x + x,
21447
- y: segment.y + y
21448
- };
21449
- }
21450
- if (segment.type === "L") {
21451
- return {
21452
- type: "L",
21453
- x: segment.x + x,
21454
- y: segment.y + y
21455
- };
21456
- }
21457
- if (segment.type === "M") {
21458
- return {
21459
- type: "M",
21460
- x: segment.x + x,
21461
- y: segment.y + y
21462
- };
21463
- }
21464
- throw new Error(`Unknown segment type: ${segment.type}`);
21465
- });
21466
- };
21467
- var translatePath = (path, x, y) => {
21468
- return serializeInstructions(translateSegments(parsePath(path), x, y));
21469
- };
21470
21470
  var resetPath = (d) => {
21471
21471
  const box = getBoundingBox(d);
21472
21472
  return translatePath(d, -box.x1, -box.y1);
@@ -21655,8 +21655,8 @@ import {
21655
21655
  forwardRef as forwardRef10,
21656
21656
  useCallback as useCallback17,
21657
21657
  useContext as useContext32,
21658
- useEffect as useEffect17,
21659
21658
  useImperativeHandle as useImperativeHandle7,
21659
+ useLayoutEffect as useLayoutEffect10,
21660
21660
  useMemo as useMemo31,
21661
21661
  useRef as useRef23,
21662
21662
  useState as useState16
@@ -21664,7 +21664,7 @@ import {
21664
21664
  import { jsx as jsx26 } from "react/jsx-runtime";
21665
21665
  import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
21666
21666
  import { jsx as jsx27 } from "react/jsx-runtime";
21667
- import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
21667
+ import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
21668
21668
  import { jsx as jsx28 } from "react/jsx-runtime";
21669
21669
  import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
21670
21670
  import { jsx as jsx29 } from "react/jsx-runtime";
@@ -21690,8 +21690,8 @@ import { useCallback as useCallback24 } from "react";
21690
21690
  import {
21691
21691
  useCallback as useCallback22,
21692
21692
  useContext as useContext36,
21693
- useEffect as useEffect18,
21694
- useLayoutEffect as useLayoutEffect11,
21693
+ useEffect as useEffect17,
21694
+ useLayoutEffect as useLayoutEffect12,
21695
21695
  useMemo as useMemo35,
21696
21696
  useState as useState19
21697
21697
  } from "react";
@@ -21700,13 +21700,13 @@ import React37, {
21700
21700
  forwardRef as forwardRef13,
21701
21701
  useCallback as useCallback23,
21702
21702
  useContext as useContext37,
21703
- useEffect as useEffect20,
21703
+ useEffect as useEffect19,
21704
21704
  useImperativeHandle as useImperativeHandle9,
21705
21705
  useMemo as useMemo36,
21706
21706
  useRef as useRef27,
21707
21707
  useState as useState20
21708
21708
  } from "react";
21709
- import { useEffect as useEffect19 } from "react";
21709
+ import { useEffect as useEffect18 } from "react";
21710
21710
  import { jsx as jsx34 } from "react/jsx-runtime";
21711
21711
  import { jsx as jsx35 } from "react/jsx-runtime";
21712
21712
  import React39, { useMemo as useMemo37 } from "react";
@@ -21723,9 +21723,9 @@ import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
21723
21723
  import {
21724
21724
  forwardRef as forwardRef15,
21725
21725
  useContext as useContext38,
21726
- useEffect as useEffect21,
21726
+ useEffect as useEffect20,
21727
21727
  useImperativeHandle as useImperativeHandle10,
21728
- useLayoutEffect as useLayoutEffect12,
21728
+ useLayoutEffect as useLayoutEffect13,
21729
21729
  useMemo as useMemo39,
21730
21730
  useRef as useRef28
21731
21731
  } from "react";
@@ -22899,7 +22899,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
22899
22899
  var addSequenceStackTraces = (component) => {
22900
22900
  componentsToAddStacksTo.push(component);
22901
22901
  };
22902
- var VERSION = "4.0.484";
22902
+ var VERSION = "4.0.486";
22903
22903
  var checkMultipleRemotionVersions = () => {
22904
22904
  if (typeof globalThis === "undefined") {
22905
22905
  return;
@@ -23305,6 +23305,12 @@ var textSchema = {
23305
23305
  default: undefined,
23306
23306
  description: "Color"
23307
23307
  },
23308
+ "style.fontFamily": {
23309
+ type: "font-family",
23310
+ default: undefined,
23311
+ description: "Font family",
23312
+ keyframable: false
23313
+ },
23308
23314
  "style.fontSize": {
23309
23315
  type: "number",
23310
23316
  default: undefined,
@@ -23370,6 +23376,14 @@ var textSchema = {
23370
23376
  hiddenFromList: false
23371
23377
  }
23372
23378
  };
23379
+ var textContentSchema = {
23380
+ children: {
23381
+ type: "text-content",
23382
+ default: "",
23383
+ description: "Text",
23384
+ keyframable: false
23385
+ }
23386
+ };
23373
23387
  var premountSchema = {
23374
23388
  premountFor: {
23375
23389
  type: "number",
@@ -25737,10 +25751,21 @@ var getNestedValue = (obj, key) => {
25737
25751
  }
25738
25752
  return current;
25739
25753
  };
25740
- var readValuesFromProps = (props, keys) => {
25754
+ var getRuntimeValueForSchemaKey = ({
25755
+ flatSchema,
25756
+ key,
25757
+ props
25758
+ }) => {
25759
+ const value = getNestedValue(props, key);
25760
+ if (flatSchema[key]?.type === "text-content" && typeof value !== "string") {
25761
+ return;
25762
+ }
25763
+ return value;
25764
+ };
25765
+ var readValuesFromProps = (props, keys, flatSchema) => {
25741
25766
  const out = {};
25742
25767
  for (const key of keys) {
25743
- out[key] = getNestedValue(props, key);
25768
+ out[key] = flatSchema ? getRuntimeValueForSchemaKey({ flatSchema, key, props }) : getNestedValue(props, key);
25744
25769
  }
25745
25770
  return out;
25746
25771
  };
@@ -25748,6 +25773,7 @@ var selectActiveKeys = (schema, values) => {
25748
25773
  return Object.keys(flattenActiveSchema(schema, (key) => values[key]));
25749
25774
  };
25750
25775
  var mergeValues = ({
25776
+ flatSchema,
25751
25777
  props,
25752
25778
  valuesDotNotation,
25753
25779
  schemaKeys,
@@ -25756,6 +25782,9 @@ var mergeValues = ({
25756
25782
  const merged = { ...props };
25757
25783
  for (const key of schemaKeys) {
25758
25784
  const value = valuesDotNotation[key];
25785
+ if (flatSchema[key]?.type === "text-content" && value === undefined) {
25786
+ continue;
25787
+ }
25759
25788
  const parts = key.split(".");
25760
25789
  if (parts.length === 1) {
25761
25790
  merged[key] = value;
@@ -25773,7 +25802,8 @@ var mergeValues = ({
25773
25802
  }
25774
25803
  current[parts[parts.length - 1]] = value;
25775
25804
  }
25776
- deleteNestedKey(merged, propsToDelete);
25805
+ const propsToDeleteWithoutTextContent = new Set([...propsToDelete].filter((key) => !(flatSchema[key]?.type === "text-content" && valuesDotNotation[key] === undefined)));
25806
+ deleteNestedKey(merged, propsToDeleteWithoutTextContent);
25777
25807
  return merged;
25778
25808
  };
25779
25809
  var stackToOverrideMap = {};
@@ -25820,8 +25850,12 @@ var withInteractivitySchema = ({
25820
25850
  return newOverrideId;
25821
25851
  });
25822
25852
  const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
25823
- const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
25824
- const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
25853
+ const runtimeValues = flatKeys.map((key) => getRuntimeValueForSchemaKey({
25854
+ flatSchema,
25855
+ key,
25856
+ props
25857
+ }));
25858
+ const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
25825
25859
  const controls = useMemo13(() => {
25826
25860
  return {
25827
25861
  schema: schemaWithSequenceName,
@@ -25849,6 +25883,7 @@ var withInteractivitySchema = ({
25849
25883
  ]);
25850
25884
  const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
25851
25885
  const mergedProps = mergeValues({
25886
+ flatSchema,
25852
25887
  props,
25853
25888
  valuesDotNotation,
25854
25889
  schemaKeys: activeKeys,
@@ -28472,7 +28507,7 @@ var getTimelineDuration = ({
28472
28507
  trimAfter
28473
28508
  });
28474
28509
  if (parentSequenceDurationInFrames !== null) {
28475
- const cappedDuration = Math.min(parentSequenceDurationInFrames * playbackRate, mediaDuration);
28510
+ const cappedDuration = Math.min(parentSequenceDurationInFrames, mediaDuration);
28476
28511
  return Number(cappedDuration.toFixed(10));
28477
28512
  }
28478
28513
  return mediaDuration;
@@ -30606,6 +30641,18 @@ var loadImage = ({
30606
30641
  function exponentialBackoff(errorCount) {
30607
30642
  return 1000 * 2 ** (errorCount - 1);
30608
30643
  }
30644
+ var waitForNextFrame = ({
30645
+ onFrame
30646
+ }) => {
30647
+ if (typeof requestAnimationFrame === "undefined") {
30648
+ onFrame();
30649
+ return () => {
30650
+ return;
30651
+ };
30652
+ }
30653
+ const frame = requestAnimationFrame(onFrame);
30654
+ return () => cancelAnimationFrame(frame);
30655
+ };
30609
30656
  var CanvasImageContent = forwardRef10(({
30610
30657
  src,
30611
30658
  width,
@@ -30635,6 +30682,17 @@ var CanvasImageContent = forwardRef10(({
30635
30682
  overrideId: controls?.overrideId ?? null
30636
30683
  });
30637
30684
  const sequenceContext = useContext32(SequenceContext);
30685
+ const pendingLoadDelayRef = useRef23(null);
30686
+ const continuePendingLoadDelay = useCallback17(() => {
30687
+ const pending = pendingLoadDelayRef.current;
30688
+ if (!pending || pending.continued) {
30689
+ return;
30690
+ }
30691
+ pending.continued = true;
30692
+ pending.unblock();
30693
+ continueRender2(pending.handle);
30694
+ pendingLoadDelayRef.current = null;
30695
+ }, [continueRender2]);
30638
30696
  const sourceCanvas = useMemo31(() => {
30639
30697
  if (typeof document === "undefined") {
30640
30698
  return null;
@@ -30652,7 +30710,7 @@ var CanvasImageContent = forwardRef10(({
30652
30710
  ref.current = canvas;
30653
30711
  }
30654
30712
  }, [ref, refForOutline]);
30655
- useEffect17(() => {
30713
+ useLayoutEffect10(() => {
30656
30714
  const isPremounting = Boolean(sequenceContext?.premounting);
30657
30715
  const isPostmounting = Boolean(sequenceContext?.postmounting);
30658
30716
  const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
@@ -30664,17 +30722,13 @@ var CanvasImageContent = forwardRef10(({
30664
30722
  };
30665
30723
  const controller = new AbortController;
30666
30724
  let cancelled = false;
30667
- let continued = false;
30668
30725
  let errorCount = 0;
30669
30726
  let timeoutId = null;
30670
30727
  setLoadedImage(null);
30671
- const continueRenderOnce = () => {
30672
- if (continued) {
30673
- return;
30674
- }
30675
- continued = true;
30676
- unblock();
30677
- continueRender2(handle);
30728
+ pendingLoadDelayRef.current = {
30729
+ handle,
30730
+ unblock,
30731
+ continued: false
30678
30732
  };
30679
30733
  const attemptLoad = () => {
30680
30734
  loadImage({ src: actualSrc, signal: controller.signal }).then((image) => {
@@ -30682,13 +30736,9 @@ var CanvasImageContent = forwardRef10(({
30682
30736
  return;
30683
30737
  }
30684
30738
  setLoadedImage(image);
30685
- }).then(() => {
30686
- if (!cancelled) {
30687
- continueRenderOnce();
30688
- }
30689
30739
  }).catch((err) => {
30690
30740
  if (err.name === "AbortError") {
30691
- continueRenderOnce();
30741
+ continuePendingLoadDelay();
30692
30742
  return;
30693
30743
  }
30694
30744
  errorCount++;
@@ -30702,7 +30752,7 @@ var CanvasImageContent = forwardRef10(({
30702
30752
  }, backoff);
30703
30753
  } else if (onError) {
30704
30754
  onError(err);
30705
- continueRenderOnce();
30755
+ continuePendingLoadDelay();
30706
30756
  } else {
30707
30757
  cancelRender2(err);
30708
30758
  }
@@ -30715,12 +30765,12 @@ var CanvasImageContent = forwardRef10(({
30715
30765
  clearTimeout(timeoutId);
30716
30766
  }
30717
30767
  controller.abort();
30718
- continueRenderOnce();
30768
+ continuePendingLoadDelay();
30719
30769
  };
30720
30770
  }, [
30721
30771
  actualSrc,
30722
30772
  cancelRender2,
30723
- continueRender2,
30773
+ continuePendingLoadDelay,
30724
30774
  delayPlayback,
30725
30775
  delayRender2,
30726
30776
  delayRenderRetries,
@@ -30731,13 +30781,16 @@ var CanvasImageContent = forwardRef10(({
30731
30781
  sequenceContext?.postmounting,
30732
30782
  sequenceContext?.premounting
30733
30783
  ]);
30734
- useEffect17(() => {
30784
+ useLayoutEffect10(() => {
30735
30785
  if (!loadedImage || !outputCanvas || !sourceCanvas) {
30736
30786
  return;
30737
30787
  }
30738
30788
  const handle = delayRender2(`Applying effects to <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`);
30739
30789
  let cancelled = false;
30740
30790
  let continued = false;
30791
+ let cancelWaitForNextFrame = () => {
30792
+ return;
30793
+ };
30741
30794
  const continueRenderOnce = () => {
30742
30795
  if (continued) {
30743
30796
  return;
@@ -30772,7 +30825,15 @@ var CanvasImageContent = forwardRef10(({
30772
30825
  height: canvasHeight
30773
30826
  }).then((completed) => {
30774
30827
  if (completed && !cancelled) {
30775
- continueRenderOnce();
30828
+ cancelWaitForNextFrame = waitForNextFrame({
30829
+ onFrame: () => {
30830
+ if (cancelled) {
30831
+ return;
30832
+ }
30833
+ continueRenderOnce();
30834
+ continuePendingLoadDelay();
30835
+ }
30836
+ });
30776
30837
  }
30777
30838
  }).catch((err) => {
30778
30839
  if (cancelled) {
@@ -30781,12 +30842,14 @@ var CanvasImageContent = forwardRef10(({
30781
30842
  if (onError) {
30782
30843
  onError(err);
30783
30844
  continueRenderOnce();
30845
+ continuePendingLoadDelay();
30784
30846
  } else {
30785
30847
  cancelRender2(err);
30786
30848
  }
30787
30849
  });
30788
30850
  return () => {
30789
30851
  cancelled = true;
30852
+ cancelWaitForNextFrame();
30790
30853
  continueRenderOnce();
30791
30854
  };
30792
30855
  }, [
@@ -30794,6 +30857,7 @@ var CanvasImageContent = forwardRef10(({
30794
30857
  cancelRender2,
30795
30858
  chainState,
30796
30859
  continueRender2,
30860
+ continuePendingLoadDelay,
30797
30861
  delayRender2,
30798
30862
  fit,
30799
30863
  height,
@@ -31003,7 +31067,7 @@ var ImgContent = ({
31003
31067
  if (typeof window !== "undefined") {
31004
31068
  const isPremounting = Boolean(sequenceContext?.premounting);
31005
31069
  const isPostmounting = Boolean(sequenceContext?.postmounting);
31006
- useLayoutEffect10(() => {
31070
+ useLayoutEffect11(() => {
31007
31071
  if (window.process?.env?.NODE_ENV === "test") {
31008
31072
  if (imageRef.current) {
31009
31073
  imageRef.current.src = actualSrc;
@@ -31270,7 +31334,8 @@ addSequenceStackTraces(Img);
31270
31334
  var interactiveElementSchema = {
31271
31335
  ...baseSchema,
31272
31336
  ...transformSchema,
31273
- ...textSchema
31337
+ ...textSchema,
31338
+ ...textContentSchema
31274
31339
  };
31275
31340
  var setRef = (ref, value) => {
31276
31341
  if (typeof ref === "function") {
@@ -31898,7 +31963,7 @@ var OffthreadVideoForRendering = ({
31898
31963
  mediaVolume: 1
31899
31964
  });
31900
31965
  warnAboutTooHighVolume(volume);
31901
- useEffect18(() => {
31966
+ useEffect17(() => {
31902
31967
  if (!src) {
31903
31968
  throw new Error("No src passed");
31904
31969
  }
@@ -31955,7 +32020,7 @@ var OffthreadVideoForRendering = ({
31955
32020
  }, [toneMapped, currentTime, src, transparent]);
31956
32021
  const [imageSrc, setImageSrc] = useState19(null);
31957
32022
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
31958
- useLayoutEffect11(() => {
32023
+ useLayoutEffect12(() => {
31959
32024
  if (!window.remotion_videoEnabled) {
31960
32025
  return;
31961
32026
  }
@@ -32059,7 +32124,7 @@ var useEmitVideoFrame = ({
32059
32124
  ref,
32060
32125
  onVideoFrame
32061
32126
  }) => {
32062
- useEffect19(() => {
32127
+ useEffect18(() => {
32063
32128
  const { current } = ref;
32064
32129
  if (!current) {
32065
32130
  return;
@@ -32234,7 +32299,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
32234
32299
  tag: "video",
32235
32300
  mountTime
32236
32301
  }));
32237
- useEffect20(() => {
32302
+ useEffect19(() => {
32238
32303
  const { current } = videoRef;
32239
32304
  if (!current) {
32240
32305
  return;
@@ -32277,7 +32342,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
32277
32342
  const currentOnDurationCallback = useRef27(onDuration);
32278
32343
  currentOnDurationCallback.current = onDuration;
32279
32344
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
32280
- useEffect20(() => {
32345
+ useEffect19(() => {
32281
32346
  const { current } = videoRef;
32282
32347
  if (!current) {
32283
32348
  return;
@@ -32294,7 +32359,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
32294
32359
  current.removeEventListener("loadedmetadata", onLoadedMetadata);
32295
32360
  };
32296
32361
  }, [src]);
32297
- useEffect20(() => {
32362
+ useEffect19(() => {
32298
32363
  const { current } = videoRef;
32299
32364
  if (!current) {
32300
32365
  return;
@@ -33075,7 +33140,7 @@ var VideoForRenderingForwardFunction = ({
33075
33140
  mediaVolume: 1
33076
33141
  });
33077
33142
  warnAboutTooHighVolume(volume);
33078
- useEffect21(() => {
33143
+ useEffect20(() => {
33079
33144
  if (!props2.src) {
33080
33145
  throw new Error("No src passed");
33081
33146
  }
@@ -33119,7 +33184,7 @@ var VideoForRenderingForwardFunction = ({
33119
33184
  return videoRef.current;
33120
33185
  }, []);
33121
33186
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
33122
- useEffect21(() => {
33187
+ useEffect20(() => {
33123
33188
  if (!window.remotion_videoEnabled) {
33124
33189
  return;
33125
33190
  }
@@ -33209,7 +33274,7 @@ var VideoForRenderingForwardFunction = ({
33209
33274
  ]);
33210
33275
  const { src } = props2;
33211
33276
  if (environment.isRendering) {
33212
- useLayoutEffect12(() => {
33277
+ useLayoutEffect13(() => {
33213
33278
  if (window.process?.env?.NODE_ENV === "test") {
33214
33279
  return;
33215
33280
  }
@@ -36313,7 +36378,7 @@ var extrudeAndTransformElement = (options) => {
36313
36378
  // ../design/dist/esm/index.mjs
36314
36379
  import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
36315
36380
  import { jsx as jsx312, jsxs as jsxs5 } from "react/jsx-runtime";
36316
- import { useEffect as useEffect23, useMemo as useMemo210, useRef as useRef31 } from "react";
36381
+ import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
36317
36382
  import { jsx as jsx44 } from "react/jsx-runtime";
36318
36383
  import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
36319
36384
  import React62 from "react";
@@ -36568,7 +36633,7 @@ var useHoverTransforms = (ref, disabled) => {
36568
36633
  isActive: false
36569
36634
  });
36570
36635
  const eventTarget = useMemo42(() => new EventTarget, []);
36571
- useEffect22(() => {
36636
+ useEffect21(() => {
36572
36637
  if (disabled) {
36573
36638
  eventTarget.dispatchEvent(new Event("disabled"));
36574
36639
  } else {
@@ -36715,7 +36780,7 @@ var getAngle = (ref, coordinates) => {
36715
36780
  var lastCoordinates = null;
36716
36781
  var useMousePosition = (ref) => {
36717
36782
  const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
36718
- useEffect22(() => {
36783
+ useEffect21(() => {
36719
36784
  const element = ref.current;
36720
36785
  if (!element) {
36721
36786
  return;
@@ -36836,7 +36901,7 @@ var Spinner = ({ size, duration }) => {
36836
36901
  };
36837
36902
  }, [size]);
36838
36903
  const pathsRef = useRef31([]);
36839
- useEffect23(() => {
36904
+ useEffect22(() => {
36840
36905
  const animate = () => {
36841
36906
  const now = performance.now();
36842
36907
  for (let index = 0;index < lines; index++) {
@@ -43064,7 +43129,7 @@ var CopyPromptButton = ({ prompt }) => {
43064
43129
  };
43065
43130
 
43066
43131
  // src/components/prompts/LikeButton.tsx
43067
- import { useCallback as useCallback40, useEffect as useEffect41, useState as useState40 } from "react";
43132
+ import { useCallback as useCallback40, useEffect as useEffect40, useState as useState40 } from "react";
43068
43133
 
43069
43134
  // src/components/prompts/config.ts
43070
43135
  var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
@@ -43175,7 +43240,7 @@ var LikeButton = ({ submissionId, initialLikeCount }) => {
43175
43240
  const [liked, setLiked] = useState40(false);
43176
43241
  const [likeCount, setLikeCount] = useState40(initialLikeCount);
43177
43242
  const { scale, roundness, animate } = useHeartAnimation();
43178
- useEffect41(() => {
43243
+ useEffect40(() => {
43179
43244
  setLiked(getLikedIds().has(submissionId));
43180
43245
  }, [submissionId]);
43181
43246
  const onClick = useCallback40(async () => {