@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.
@@ -1378,7 +1378,7 @@ var getDefaultConfig = () => {
1378
1378
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
1379
1379
 
1380
1380
  // ../design/dist/esm/index.mjs
1381
- import React32, { useEffect as useEffect22, useMemo as useMemo42, useState as useState21 } from "react";
1381
+ import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState21 } from "react";
1382
1382
 
1383
1383
  // ../paths/dist/esm/index.mjs
1384
1384
  var cutLInstruction = ({
@@ -3484,6 +3484,94 @@ var getBoundingBox = (d) => {
3484
3484
  const unarced = removeATSHVQInstructions(normalizeInstructions(parsed));
3485
3485
  return getBoundingBoxFromInstructions(unarced);
3486
3486
  };
3487
+ var translateSegments = (segments, x, y) => {
3488
+ return segments.map((segment) => {
3489
+ 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") {
3490
+ return segment;
3491
+ }
3492
+ if (segment.type === "V") {
3493
+ return {
3494
+ type: "V",
3495
+ y: segment.y + y
3496
+ };
3497
+ }
3498
+ if (segment.type === "H") {
3499
+ return {
3500
+ type: "H",
3501
+ x: segment.x + x
3502
+ };
3503
+ }
3504
+ if (segment.type === "A") {
3505
+ return {
3506
+ type: "A",
3507
+ rx: segment.rx,
3508
+ ry: segment.ry,
3509
+ largeArcFlag: segment.largeArcFlag,
3510
+ sweepFlag: segment.sweepFlag,
3511
+ xAxisRotation: segment.xAxisRotation,
3512
+ x: segment.x + x,
3513
+ y: segment.y + y
3514
+ };
3515
+ }
3516
+ if (segment.type === "Z") {
3517
+ return segment;
3518
+ }
3519
+ if (segment.type === "C") {
3520
+ return {
3521
+ type: "C",
3522
+ cp1x: segment.cp1x + x,
3523
+ cp1y: segment.cp1y + y,
3524
+ cp2x: segment.cp2x + x,
3525
+ cp2y: segment.cp2y + y,
3526
+ x: segment.x + x,
3527
+ y: segment.y + y
3528
+ };
3529
+ }
3530
+ if (segment.type === "Q") {
3531
+ return {
3532
+ type: "Q",
3533
+ cpx: segment.cpx + x,
3534
+ cpy: segment.cpy + y,
3535
+ x: segment.x + x,
3536
+ y: segment.y + y
3537
+ };
3538
+ }
3539
+ if (segment.type === "S") {
3540
+ return {
3541
+ type: "S",
3542
+ cpx: segment.cpx + x,
3543
+ cpy: segment.cpy + y,
3544
+ x: segment.x + x,
3545
+ y: segment.y + y
3546
+ };
3547
+ }
3548
+ if (segment.type === "T") {
3549
+ return {
3550
+ type: "T",
3551
+ x: segment.x + x,
3552
+ y: segment.y + y
3553
+ };
3554
+ }
3555
+ if (segment.type === "L") {
3556
+ return {
3557
+ type: "L",
3558
+ x: segment.x + x,
3559
+ y: segment.y + y
3560
+ };
3561
+ }
3562
+ if (segment.type === "M") {
3563
+ return {
3564
+ type: "M",
3565
+ x: segment.x + x,
3566
+ y: segment.y + y
3567
+ };
3568
+ }
3569
+ throw new Error(`Unknown segment type: ${segment.type}`);
3570
+ });
3571
+ };
3572
+ var translatePath = (path, x, y) => {
3573
+ return serializeInstructions(translateSegments(parsePath(path), x, y));
3574
+ };
3487
3575
  var mod = (x, m) => {
3488
3576
  return (x % m + m) % m;
3489
3577
  };
@@ -4045,94 +4133,6 @@ var getLength = (path) => {
4045
4133
  const constructucted = construct(path);
4046
4134
  return constructucted.totalLength;
4047
4135
  };
4048
- var translateSegments = (segments, x, y) => {
4049
- return segments.map((segment) => {
4050
- 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") {
4051
- return segment;
4052
- }
4053
- if (segment.type === "V") {
4054
- return {
4055
- type: "V",
4056
- y: segment.y + y
4057
- };
4058
- }
4059
- if (segment.type === "H") {
4060
- return {
4061
- type: "H",
4062
- x: segment.x + x
4063
- };
4064
- }
4065
- if (segment.type === "A") {
4066
- return {
4067
- type: "A",
4068
- rx: segment.rx,
4069
- ry: segment.ry,
4070
- largeArcFlag: segment.largeArcFlag,
4071
- sweepFlag: segment.sweepFlag,
4072
- xAxisRotation: segment.xAxisRotation,
4073
- x: segment.x + x,
4074
- y: segment.y + y
4075
- };
4076
- }
4077
- if (segment.type === "Z") {
4078
- return segment;
4079
- }
4080
- if (segment.type === "C") {
4081
- return {
4082
- type: "C",
4083
- cp1x: segment.cp1x + x,
4084
- cp1y: segment.cp1y + y,
4085
- cp2x: segment.cp2x + x,
4086
- cp2y: segment.cp2y + y,
4087
- x: segment.x + x,
4088
- y: segment.y + y
4089
- };
4090
- }
4091
- if (segment.type === "Q") {
4092
- return {
4093
- type: "Q",
4094
- cpx: segment.cpx + x,
4095
- cpy: segment.cpy + y,
4096
- x: segment.x + x,
4097
- y: segment.y + y
4098
- };
4099
- }
4100
- if (segment.type === "S") {
4101
- return {
4102
- type: "S",
4103
- cpx: segment.cpx + x,
4104
- cpy: segment.cpy + y,
4105
- x: segment.x + x,
4106
- y: segment.y + y
4107
- };
4108
- }
4109
- if (segment.type === "T") {
4110
- return {
4111
- type: "T",
4112
- x: segment.x + x,
4113
- y: segment.y + y
4114
- };
4115
- }
4116
- if (segment.type === "L") {
4117
- return {
4118
- type: "L",
4119
- x: segment.x + x,
4120
- y: segment.y + y
4121
- };
4122
- }
4123
- if (segment.type === "M") {
4124
- return {
4125
- type: "M",
4126
- x: segment.x + x,
4127
- y: segment.y + y
4128
- };
4129
- }
4130
- throw new Error(`Unknown segment type: ${segment.type}`);
4131
- });
4132
- };
4133
- var translatePath = (path, x, y) => {
4134
- return serializeInstructions(translateSegments(parsePath(path), x, y));
4135
- };
4136
4136
  var resetPath = (d) => {
4137
4137
  const box = getBoundingBox(d);
4138
4138
  return translatePath(d, -box.x1, -box.y1);
@@ -4321,8 +4321,8 @@ import {
4321
4321
  forwardRef as forwardRef10,
4322
4322
  useCallback as useCallback17,
4323
4323
  useContext as useContext32,
4324
- useEffect as useEffect17,
4325
4324
  useImperativeHandle as useImperativeHandle7,
4325
+ useLayoutEffect as useLayoutEffect10,
4326
4326
  useMemo as useMemo31,
4327
4327
  useRef as useRef23,
4328
4328
  useState as useState16
@@ -4330,7 +4330,7 @@ import {
4330
4330
  import { jsx as jsx26 } from "react/jsx-runtime";
4331
4331
  import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
4332
4332
  import { jsx as jsx27 } from "react/jsx-runtime";
4333
- import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
4333
+ import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
4334
4334
  import { jsx as jsx28 } from "react/jsx-runtime";
4335
4335
  import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
4336
4336
  import { jsx as jsx29 } from "react/jsx-runtime";
@@ -4356,8 +4356,8 @@ import { useCallback as useCallback24 } from "react";
4356
4356
  import {
4357
4357
  useCallback as useCallback22,
4358
4358
  useContext as useContext36,
4359
- useEffect as useEffect18,
4360
- useLayoutEffect as useLayoutEffect11,
4359
+ useEffect as useEffect17,
4360
+ useLayoutEffect as useLayoutEffect12,
4361
4361
  useMemo as useMemo35,
4362
4362
  useState as useState19
4363
4363
  } from "react";
@@ -4366,13 +4366,13 @@ import React37, {
4366
4366
  forwardRef as forwardRef13,
4367
4367
  useCallback as useCallback23,
4368
4368
  useContext as useContext37,
4369
- useEffect as useEffect20,
4369
+ useEffect as useEffect19,
4370
4370
  useImperativeHandle as useImperativeHandle9,
4371
4371
  useMemo as useMemo36,
4372
4372
  useRef as useRef27,
4373
4373
  useState as useState20
4374
4374
  } from "react";
4375
- import { useEffect as useEffect19 } from "react";
4375
+ import { useEffect as useEffect18 } from "react";
4376
4376
  import { jsx as jsx34 } from "react/jsx-runtime";
4377
4377
  import { jsx as jsx35 } from "react/jsx-runtime";
4378
4378
  import React39, { useMemo as useMemo37 } from "react";
@@ -4389,9 +4389,9 @@ import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
4389
4389
  import {
4390
4390
  forwardRef as forwardRef15,
4391
4391
  useContext as useContext38,
4392
- useEffect as useEffect21,
4392
+ useEffect as useEffect20,
4393
4393
  useImperativeHandle as useImperativeHandle10,
4394
- useLayoutEffect as useLayoutEffect12,
4394
+ useLayoutEffect as useLayoutEffect13,
4395
4395
  useMemo as useMemo39,
4396
4396
  useRef as useRef28
4397
4397
  } from "react";
@@ -5565,7 +5565,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
5565
5565
  var addSequenceStackTraces = (component) => {
5566
5566
  componentsToAddStacksTo.push(component);
5567
5567
  };
5568
- var VERSION = "4.0.484";
5568
+ var VERSION = "4.0.486";
5569
5569
  var checkMultipleRemotionVersions = () => {
5570
5570
  if (typeof globalThis === "undefined") {
5571
5571
  return;
@@ -5971,6 +5971,12 @@ var textSchema = {
5971
5971
  default: undefined,
5972
5972
  description: "Color"
5973
5973
  },
5974
+ "style.fontFamily": {
5975
+ type: "font-family",
5976
+ default: undefined,
5977
+ description: "Font family",
5978
+ keyframable: false
5979
+ },
5974
5980
  "style.fontSize": {
5975
5981
  type: "number",
5976
5982
  default: undefined,
@@ -6036,6 +6042,14 @@ var textSchema = {
6036
6042
  hiddenFromList: false
6037
6043
  }
6038
6044
  };
6045
+ var textContentSchema = {
6046
+ children: {
6047
+ type: "text-content",
6048
+ default: "",
6049
+ description: "Text",
6050
+ keyframable: false
6051
+ }
6052
+ };
6039
6053
  var premountSchema = {
6040
6054
  premountFor: {
6041
6055
  type: "number",
@@ -8403,10 +8417,21 @@ var getNestedValue = (obj, key) => {
8403
8417
  }
8404
8418
  return current;
8405
8419
  };
8406
- var readValuesFromProps = (props, keys) => {
8420
+ var getRuntimeValueForSchemaKey = ({
8421
+ flatSchema,
8422
+ key,
8423
+ props
8424
+ }) => {
8425
+ const value = getNestedValue(props, key);
8426
+ if (flatSchema[key]?.type === "text-content" && typeof value !== "string") {
8427
+ return;
8428
+ }
8429
+ return value;
8430
+ };
8431
+ var readValuesFromProps = (props, keys, flatSchema) => {
8407
8432
  const out = {};
8408
8433
  for (const key of keys) {
8409
- out[key] = getNestedValue(props, key);
8434
+ out[key] = flatSchema ? getRuntimeValueForSchemaKey({ flatSchema, key, props }) : getNestedValue(props, key);
8410
8435
  }
8411
8436
  return out;
8412
8437
  };
@@ -8414,6 +8439,7 @@ var selectActiveKeys = (schema, values) => {
8414
8439
  return Object.keys(flattenActiveSchema(schema, (key) => values[key]));
8415
8440
  };
8416
8441
  var mergeValues = ({
8442
+ flatSchema,
8417
8443
  props,
8418
8444
  valuesDotNotation,
8419
8445
  schemaKeys,
@@ -8422,6 +8448,9 @@ var mergeValues = ({
8422
8448
  const merged = { ...props };
8423
8449
  for (const key of schemaKeys) {
8424
8450
  const value = valuesDotNotation[key];
8451
+ if (flatSchema[key]?.type === "text-content" && value === undefined) {
8452
+ continue;
8453
+ }
8425
8454
  const parts = key.split(".");
8426
8455
  if (parts.length === 1) {
8427
8456
  merged[key] = value;
@@ -8439,7 +8468,8 @@ var mergeValues = ({
8439
8468
  }
8440
8469
  current[parts[parts.length - 1]] = value;
8441
8470
  }
8442
- deleteNestedKey(merged, propsToDelete);
8471
+ const propsToDeleteWithoutTextContent = new Set([...propsToDelete].filter((key) => !(flatSchema[key]?.type === "text-content" && valuesDotNotation[key] === undefined)));
8472
+ deleteNestedKey(merged, propsToDeleteWithoutTextContent);
8443
8473
  return merged;
8444
8474
  };
8445
8475
  var stackToOverrideMap = {};
@@ -8486,8 +8516,12 @@ var withInteractivitySchema = ({
8486
8516
  return newOverrideId;
8487
8517
  });
8488
8518
  const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
8489
- const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
8490
- const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
8519
+ const runtimeValues = flatKeys.map((key) => getRuntimeValueForSchemaKey({
8520
+ flatSchema,
8521
+ key,
8522
+ props
8523
+ }));
8524
+ const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys, flatSchema), runtimeValues);
8491
8525
  const controls = useMemo13(() => {
8492
8526
  return {
8493
8527
  schema: schemaWithSequenceName,
@@ -8515,6 +8549,7 @@ var withInteractivitySchema = ({
8515
8549
  ]);
8516
8550
  const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
8517
8551
  const mergedProps = mergeValues({
8552
+ flatSchema,
8518
8553
  props,
8519
8554
  valuesDotNotation,
8520
8555
  schemaKeys: activeKeys,
@@ -11138,7 +11173,7 @@ var getTimelineDuration = ({
11138
11173
  trimAfter
11139
11174
  });
11140
11175
  if (parentSequenceDurationInFrames !== null) {
11141
- const cappedDuration = Math.min(parentSequenceDurationInFrames * playbackRate, mediaDuration);
11176
+ const cappedDuration = Math.min(parentSequenceDurationInFrames, mediaDuration);
11142
11177
  return Number(cappedDuration.toFixed(10));
11143
11178
  }
11144
11179
  return mediaDuration;
@@ -13272,6 +13307,18 @@ var loadImage = ({
13272
13307
  function exponentialBackoff(errorCount) {
13273
13308
  return 1000 * 2 ** (errorCount - 1);
13274
13309
  }
13310
+ var waitForNextFrame = ({
13311
+ onFrame
13312
+ }) => {
13313
+ if (typeof requestAnimationFrame === "undefined") {
13314
+ onFrame();
13315
+ return () => {
13316
+ return;
13317
+ };
13318
+ }
13319
+ const frame = requestAnimationFrame(onFrame);
13320
+ return () => cancelAnimationFrame(frame);
13321
+ };
13275
13322
  var CanvasImageContent = forwardRef10(({
13276
13323
  src,
13277
13324
  width,
@@ -13301,6 +13348,17 @@ var CanvasImageContent = forwardRef10(({
13301
13348
  overrideId: controls?.overrideId ?? null
13302
13349
  });
13303
13350
  const sequenceContext = useContext32(SequenceContext);
13351
+ const pendingLoadDelayRef = useRef23(null);
13352
+ const continuePendingLoadDelay = useCallback17(() => {
13353
+ const pending = pendingLoadDelayRef.current;
13354
+ if (!pending || pending.continued) {
13355
+ return;
13356
+ }
13357
+ pending.continued = true;
13358
+ pending.unblock();
13359
+ continueRender2(pending.handle);
13360
+ pendingLoadDelayRef.current = null;
13361
+ }, [continueRender2]);
13304
13362
  const sourceCanvas = useMemo31(() => {
13305
13363
  if (typeof document === "undefined") {
13306
13364
  return null;
@@ -13318,7 +13376,7 @@ var CanvasImageContent = forwardRef10(({
13318
13376
  ref.current = canvas;
13319
13377
  }
13320
13378
  }, [ref, refForOutline]);
13321
- useEffect17(() => {
13379
+ useLayoutEffect10(() => {
13322
13380
  const isPremounting = Boolean(sequenceContext?.premounting);
13323
13381
  const isPostmounting = Boolean(sequenceContext?.postmounting);
13324
13382
  const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
@@ -13330,17 +13388,13 @@ var CanvasImageContent = forwardRef10(({
13330
13388
  };
13331
13389
  const controller = new AbortController;
13332
13390
  let cancelled = false;
13333
- let continued = false;
13334
13391
  let errorCount = 0;
13335
13392
  let timeoutId = null;
13336
13393
  setLoadedImage(null);
13337
- const continueRenderOnce = () => {
13338
- if (continued) {
13339
- return;
13340
- }
13341
- continued = true;
13342
- unblock();
13343
- continueRender2(handle);
13394
+ pendingLoadDelayRef.current = {
13395
+ handle,
13396
+ unblock,
13397
+ continued: false
13344
13398
  };
13345
13399
  const attemptLoad = () => {
13346
13400
  loadImage({ src: actualSrc, signal: controller.signal }).then((image) => {
@@ -13348,13 +13402,9 @@ var CanvasImageContent = forwardRef10(({
13348
13402
  return;
13349
13403
  }
13350
13404
  setLoadedImage(image);
13351
- }).then(() => {
13352
- if (!cancelled) {
13353
- continueRenderOnce();
13354
- }
13355
13405
  }).catch((err) => {
13356
13406
  if (err.name === "AbortError") {
13357
- continueRenderOnce();
13407
+ continuePendingLoadDelay();
13358
13408
  return;
13359
13409
  }
13360
13410
  errorCount++;
@@ -13368,7 +13418,7 @@ var CanvasImageContent = forwardRef10(({
13368
13418
  }, backoff);
13369
13419
  } else if (onError) {
13370
13420
  onError(err);
13371
- continueRenderOnce();
13421
+ continuePendingLoadDelay();
13372
13422
  } else {
13373
13423
  cancelRender2(err);
13374
13424
  }
@@ -13381,12 +13431,12 @@ var CanvasImageContent = forwardRef10(({
13381
13431
  clearTimeout(timeoutId);
13382
13432
  }
13383
13433
  controller.abort();
13384
- continueRenderOnce();
13434
+ continuePendingLoadDelay();
13385
13435
  };
13386
13436
  }, [
13387
13437
  actualSrc,
13388
13438
  cancelRender2,
13389
- continueRender2,
13439
+ continuePendingLoadDelay,
13390
13440
  delayPlayback,
13391
13441
  delayRender2,
13392
13442
  delayRenderRetries,
@@ -13397,13 +13447,16 @@ var CanvasImageContent = forwardRef10(({
13397
13447
  sequenceContext?.postmounting,
13398
13448
  sequenceContext?.premounting
13399
13449
  ]);
13400
- useEffect17(() => {
13450
+ useLayoutEffect10(() => {
13401
13451
  if (!loadedImage || !outputCanvas || !sourceCanvas) {
13402
13452
  return;
13403
13453
  }
13404
13454
  const handle = delayRender2(`Applying effects to <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`);
13405
13455
  let cancelled = false;
13406
13456
  let continued = false;
13457
+ let cancelWaitForNextFrame = () => {
13458
+ return;
13459
+ };
13407
13460
  const continueRenderOnce = () => {
13408
13461
  if (continued) {
13409
13462
  return;
@@ -13438,7 +13491,15 @@ var CanvasImageContent = forwardRef10(({
13438
13491
  height: canvasHeight
13439
13492
  }).then((completed) => {
13440
13493
  if (completed && !cancelled) {
13441
- continueRenderOnce();
13494
+ cancelWaitForNextFrame = waitForNextFrame({
13495
+ onFrame: () => {
13496
+ if (cancelled) {
13497
+ return;
13498
+ }
13499
+ continueRenderOnce();
13500
+ continuePendingLoadDelay();
13501
+ }
13502
+ });
13442
13503
  }
13443
13504
  }).catch((err) => {
13444
13505
  if (cancelled) {
@@ -13447,12 +13508,14 @@ var CanvasImageContent = forwardRef10(({
13447
13508
  if (onError) {
13448
13509
  onError(err);
13449
13510
  continueRenderOnce();
13511
+ continuePendingLoadDelay();
13450
13512
  } else {
13451
13513
  cancelRender2(err);
13452
13514
  }
13453
13515
  });
13454
13516
  return () => {
13455
13517
  cancelled = true;
13518
+ cancelWaitForNextFrame();
13456
13519
  continueRenderOnce();
13457
13520
  };
13458
13521
  }, [
@@ -13460,6 +13523,7 @@ var CanvasImageContent = forwardRef10(({
13460
13523
  cancelRender2,
13461
13524
  chainState,
13462
13525
  continueRender2,
13526
+ continuePendingLoadDelay,
13463
13527
  delayRender2,
13464
13528
  fit,
13465
13529
  height,
@@ -13669,7 +13733,7 @@ var ImgContent = ({
13669
13733
  if (typeof window !== "undefined") {
13670
13734
  const isPremounting = Boolean(sequenceContext?.premounting);
13671
13735
  const isPostmounting = Boolean(sequenceContext?.postmounting);
13672
- useLayoutEffect10(() => {
13736
+ useLayoutEffect11(() => {
13673
13737
  if (window.process?.env?.NODE_ENV === "test") {
13674
13738
  if (imageRef.current) {
13675
13739
  imageRef.current.src = actualSrc;
@@ -13936,7 +14000,8 @@ addSequenceStackTraces(Img);
13936
14000
  var interactiveElementSchema = {
13937
14001
  ...baseSchema,
13938
14002
  ...transformSchema,
13939
- ...textSchema
14003
+ ...textSchema,
14004
+ ...textContentSchema
13940
14005
  };
13941
14006
  var setRef = (ref, value) => {
13942
14007
  if (typeof ref === "function") {
@@ -14564,7 +14629,7 @@ var OffthreadVideoForRendering = ({
14564
14629
  mediaVolume: 1
14565
14630
  });
14566
14631
  warnAboutTooHighVolume(volume);
14567
- useEffect18(() => {
14632
+ useEffect17(() => {
14568
14633
  if (!src) {
14569
14634
  throw new Error("No src passed");
14570
14635
  }
@@ -14621,7 +14686,7 @@ var OffthreadVideoForRendering = ({
14621
14686
  }, [toneMapped, currentTime, src, transparent]);
14622
14687
  const [imageSrc, setImageSrc] = useState19(null);
14623
14688
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
14624
- useLayoutEffect11(() => {
14689
+ useLayoutEffect12(() => {
14625
14690
  if (!window.remotion_videoEnabled) {
14626
14691
  return;
14627
14692
  }
@@ -14725,7 +14790,7 @@ var useEmitVideoFrame = ({
14725
14790
  ref,
14726
14791
  onVideoFrame
14727
14792
  }) => {
14728
- useEffect19(() => {
14793
+ useEffect18(() => {
14729
14794
  const { current } = ref;
14730
14795
  if (!current) {
14731
14796
  return;
@@ -14900,7 +14965,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
14900
14965
  tag: "video",
14901
14966
  mountTime
14902
14967
  }));
14903
- useEffect20(() => {
14968
+ useEffect19(() => {
14904
14969
  const { current } = videoRef;
14905
14970
  if (!current) {
14906
14971
  return;
@@ -14943,7 +15008,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
14943
15008
  const currentOnDurationCallback = useRef27(onDuration);
14944
15009
  currentOnDurationCallback.current = onDuration;
14945
15010
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
14946
- useEffect20(() => {
15011
+ useEffect19(() => {
14947
15012
  const { current } = videoRef;
14948
15013
  if (!current) {
14949
15014
  return;
@@ -14960,7 +15025,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
14960
15025
  current.removeEventListener("loadedmetadata", onLoadedMetadata);
14961
15026
  };
14962
15027
  }, [src]);
14963
- useEffect20(() => {
15028
+ useEffect19(() => {
14964
15029
  const { current } = videoRef;
14965
15030
  if (!current) {
14966
15031
  return;
@@ -15741,7 +15806,7 @@ var VideoForRenderingForwardFunction = ({
15741
15806
  mediaVolume: 1
15742
15807
  });
15743
15808
  warnAboutTooHighVolume(volume);
15744
- useEffect21(() => {
15809
+ useEffect20(() => {
15745
15810
  if (!props2.src) {
15746
15811
  throw new Error("No src passed");
15747
15812
  }
@@ -15785,7 +15850,7 @@ var VideoForRenderingForwardFunction = ({
15785
15850
  return videoRef.current;
15786
15851
  }, []);
15787
15852
  useEmitVideoFrame({ ref: videoRef, onVideoFrame });
15788
- useEffect21(() => {
15853
+ useEffect20(() => {
15789
15854
  if (!window.remotion_videoEnabled) {
15790
15855
  return;
15791
15856
  }
@@ -15875,7 +15940,7 @@ var VideoForRenderingForwardFunction = ({
15875
15940
  ]);
15876
15941
  const { src } = props2;
15877
15942
  if (environment.isRendering) {
15878
- useLayoutEffect12(() => {
15943
+ useLayoutEffect13(() => {
15879
15944
  if (window.process?.env?.NODE_ENV === "test") {
15880
15945
  return;
15881
15946
  }
@@ -18979,7 +19044,7 @@ var extrudeAndTransformElement = (options) => {
18979
19044
  // ../design/dist/esm/index.mjs
18980
19045
  import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
18981
19046
  import { jsx as jsx312, jsxs as jsxs5 } from "react/jsx-runtime";
18982
- import { useEffect as useEffect23, useMemo as useMemo210, useRef as useRef31 } from "react";
19047
+ import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
18983
19048
  import { jsx as jsx44 } from "react/jsx-runtime";
18984
19049
  import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
18985
19050
  import React62 from "react";
@@ -19234,7 +19299,7 @@ var useHoverTransforms = (ref, disabled) => {
19234
19299
  isActive: false
19235
19300
  });
19236
19301
  const eventTarget = useMemo42(() => new EventTarget, []);
19237
- useEffect22(() => {
19302
+ useEffect21(() => {
19238
19303
  if (disabled) {
19239
19304
  eventTarget.dispatchEvent(new Event("disabled"));
19240
19305
  } else {
@@ -19381,7 +19446,7 @@ var getAngle = (ref, coordinates) => {
19381
19446
  var lastCoordinates = null;
19382
19447
  var useMousePosition = (ref) => {
19383
19448
  const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
19384
- useEffect22(() => {
19449
+ useEffect21(() => {
19385
19450
  const element = ref.current;
19386
19451
  if (!element) {
19387
19452
  return;
@@ -19502,7 +19567,7 @@ var Spinner = ({ size, duration }) => {
19502
19567
  };
19503
19568
  }, [size]);
19504
19569
  const pathsRef = useRef31([]);
19505
- useEffect23(() => {
19570
+ useEffect22(() => {
19506
19571
  const animate = () => {
19507
19572
  const now = performance.now();
19508
19573
  for (let index = 0;index < lines; index++) {
@@ -25680,10 +25745,10 @@ var Triangle22 = (props) => {
25680
25745
  };
25681
25746
 
25682
25747
  // src/components/prompts/PromptsGallery.tsx
25683
- import { useEffect as useEffect42, useRef as useRef48, useState as useState40 } from "react";
25748
+ import { useEffect as useEffect41, useRef as useRef48, useState as useState40 } from "react";
25684
25749
 
25685
25750
  // src/components/prompts/CardLikeButton.tsx
25686
- import { useCallback as useCallback39, useEffect as useEffect41, useState as useState39 } from "react";
25751
+ import { useCallback as useCallback39, useEffect as useEffect40, useState as useState39 } from "react";
25687
25752
 
25688
25753
  // src/components/prompts/config.ts
25689
25754
  var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
@@ -25794,7 +25859,7 @@ var CardLikeButton = ({ submissionId, initialLikeCount }) => {
25794
25859
  const [liked, setLiked] = useState39(false);
25795
25860
  const [likeCount, setLikeCount] = useState39(initialLikeCount);
25796
25861
  const { scale, roundness, animate } = useHeartAnimation();
25797
- useEffect41(() => {
25862
+ useEffect40(() => {
25798
25863
  setLiked(getLikedIds().has(submissionId));
25799
25864
  }, [submissionId]);
25800
25865
  const onClick = useCallback39(async (e) => {
@@ -25868,7 +25933,7 @@ var PromptSubmissionCard = ({ promptSubmission }) => {
25868
25933
  const [inView, setInView] = useState40(false);
25869
25934
  const cardRef = useRef48(null);
25870
25935
  const avatarUrl = getAvatarUrl(promptSubmission);
25871
- useEffect42(() => {
25936
+ useEffect41(() => {
25872
25937
  const el = cardRef.current;
25873
25938
  if (!el)
25874
25939
  return;