@remotion/promo-pages 4.0.490 → 4.0.491

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/dist/team.js CHANGED
@@ -216,7 +216,7 @@ var TitleTeamCards = () => {
216
216
  // ../design/dist/esm/index.mjs
217
217
  import * as React23 from "react";
218
218
  import * as React3 from "react";
219
- import { Fragment as Fragment2, jsx as jsx44 } from "react/jsx-runtime";
219
+ import { Fragment as Fragment22, jsx as jsx44 } from "react/jsx-runtime";
220
220
  import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
221
221
 
222
222
  // ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
@@ -4564,13 +4564,12 @@ import { jsx as jsx34 } from "react/jsx-runtime";
4564
4564
  import { jsx as jsx35 } from "react/jsx-runtime";
4565
4565
  import React39, { useMemo as useMemo37 } from "react";
4566
4566
  import { jsx as jsx36 } from "react/jsx-runtime";
4567
- import {
4568
- Children,
4567
+ import React41, {
4569
4568
  forwardRef as forwardRef14,
4570
4569
  useMemo as useMemo38
4571
4570
  } from "react";
4572
4571
  import React40 from "react";
4573
- import { jsx as jsx37 } from "react/jsx-runtime";
4572
+ import { jsx as jsx37, jsxs as jsxs32, Fragment } from "react/jsx-runtime";
4574
4573
  import React42 from "react";
4575
4574
  import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
4576
4575
  import {
@@ -5746,7 +5745,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
5746
5745
  var addSequenceStackTraces = (component) => {
5747
5746
  componentsToAddStacksTo.push(component);
5748
5747
  };
5749
- var VERSION = "4.0.490";
5748
+ var VERSION = "4.0.491";
5750
5749
  var checkMultipleRemotionVersions = () => {
5751
5750
  if (typeof globalThis === "undefined") {
5752
5751
  return;
@@ -6359,7 +6358,7 @@ var SequenceManagerRefContext = React11.createContext({
6359
6358
  current: []
6360
6359
  });
6361
6360
  var makeSequencePropsSubscriptionKey = (key) => {
6362
- return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
6361
+ return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
6363
6362
  };
6364
6363
  var VisualModePropStatusesContext = React11.createContext({
6365
6364
  propStatuses: {}
@@ -8972,6 +8971,7 @@ var RegularSequenceRefForwardingFunction = ({
8972
8971
  src: isMedia.data.src,
8973
8972
  getStack: () => stackRef.current,
8974
8973
  startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
8974
+ mediaFrameAtSequenceZero,
8975
8975
  volume: isMedia.data.volumes,
8976
8976
  refForOutline: refForOutline ?? null,
8977
8977
  isInsideSeries,
@@ -9035,6 +9035,7 @@ var RegularSequenceRefForwardingFunction = ({
9035
9035
  isInsideSeries,
9036
9036
  registeredFrozenFrame,
9037
9037
  startMediaFrom,
9038
+ mediaFrameAtSequenceZero,
9038
9039
  frozenMediaFrame
9039
9040
  ]);
9040
9041
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
@@ -10985,7 +10986,9 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
10985
10986
  return;
10986
10987
  }
10987
10988
  if (data === undefined) {
10988
- current.src = EMPTY_AUDIO;
10989
+ if (current.src !== EMPTY_AUDIO) {
10990
+ current.src = EMPTY_AUDIO;
10991
+ }
10989
10992
  return;
10990
10993
  }
10991
10994
  if (!data) {
@@ -11054,7 +11057,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
11054
11057
  if (prevA.id === id) {
11055
11058
  const isTheSame = compareProps(aud, prevA.props) && prevA.premounting === premounting && prevA.postmounting === postmounting;
11056
11059
  if (isTheSame) {
11057
- return prevA;
11060
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
11058
11061
  }
11059
11062
  changed = true;
11060
11063
  return {
@@ -11066,7 +11069,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
11066
11069
  audioMounted
11067
11070
  };
11068
11071
  }
11069
- return prevA;
11072
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
11070
11073
  });
11071
11074
  if (changed) {
11072
11075
  rerenderAudios();
@@ -11105,16 +11108,19 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
11105
11108
  unregisterAudio,
11106
11109
  updateAudio
11107
11110
  ]);
11111
+ const sharedAudioTagElements = useMemo21(() => {
11112
+ return refs.map(({ id, ref }) => {
11113
+ return /* @__PURE__ */ jsx19("audio", {
11114
+ ref,
11115
+ preload: "metadata",
11116
+ src: EMPTY_AUDIO
11117
+ }, id);
11118
+ });
11119
+ }, [refs]);
11108
11120
  return /* @__PURE__ */ jsxs22(SharedAudioTagsContext.Provider, {
11109
11121
  value: audioTagsValue,
11110
11122
  children: [
11111
- refs.map(({ id, ref }) => {
11112
- return /* @__PURE__ */ jsx19("audio", {
11113
- ref,
11114
- preload: "metadata",
11115
- src: EMPTY_AUDIO
11116
- }, id);
11117
- }),
11123
+ sharedAudioTagElements,
11118
11124
  children
11119
11125
  ]
11120
11126
  });
@@ -11575,6 +11581,7 @@ var useMediaInTimeline = ({
11575
11581
  showInTimeline: true,
11576
11582
  nonce: nonce.get(),
11577
11583
  startMediaFrom: 0 - startsAt,
11584
+ mediaFrameAtSequenceZero: null,
11578
11585
  doesVolumeChange,
11579
11586
  loopDisplay,
11580
11587
  playbackRate,
@@ -13208,16 +13215,16 @@ var isMissingPaintRecordError = (error2) => {
13208
13215
  return error2 instanceof DOMException && error2.name === "InvalidStateError";
13209
13216
  };
13210
13217
  var missingPaintRecordMessage = "HtmlInCanvas: Expected the element to be inside the viewport during rendering, but Chrome had no cached paint record for it.";
13211
- var resizeOffscreenCanvas = ({
13212
- offscreen,
13218
+ var resizePaintTarget = ({
13219
+ target,
13213
13220
  width,
13214
13221
  height
13215
13222
  }) => {
13216
- if (offscreen.width !== width) {
13217
- offscreen.width = width;
13223
+ if (target.width !== width) {
13224
+ target.width = width;
13218
13225
  }
13219
- if (offscreen.height !== height) {
13220
- offscreen.height = height;
13226
+ if (target.height !== height) {
13227
+ target.height = height;
13221
13228
  }
13222
13229
  };
13223
13230
  var defaultOnPaint = ({
@@ -13233,7 +13240,7 @@ var defaultOnPaint = ({
13233
13240
  const transform = ctx.drawElementImage(elementImage, 0, 0);
13234
13241
  element.style.transform = transform.toString();
13235
13242
  };
13236
- var HtmlInCanvasAncestorContext = createContext23(false);
13243
+ var HtmlInCanvasAncestorContext = createContext23(null);
13237
13244
  var HtmlInCanvasContent = forwardRef9(({
13238
13245
  width,
13239
13246
  height,
@@ -13245,20 +13252,22 @@ var HtmlInCanvasContent = forwardRef9(({
13245
13252
  controls,
13246
13253
  style
13247
13254
  }, ref) => {
13248
- const isInsideAncestorHtmlInCanvas = useContext31(HtmlInCanvasAncestorContext);
13255
+ const ancestor = useContext31(HtmlInCanvasAncestorContext);
13249
13256
  assertHtmlInCanvasDimensions(width, height);
13250
13257
  const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
13251
13258
  const canvasWidth = Math.ceil(width * resolvedPixelDensity);
13252
13259
  const canvasHeight = Math.ceil(height * resolvedPixelDensity);
13253
13260
  const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
13254
- const { isRendering } = useRemotionEnvironment();
13261
+ const { isClientSideRendering, isRendering } = useRemotionEnvironment();
13262
+ const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
13263
+ const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
13255
13264
  if (!isHtmlInCanvasSupported()) {
13256
13265
  cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
13257
13266
  }
13258
13267
  const canvas2dRef = useRef22(null);
13259
- const offscreenRef = useRef22(null);
13268
+ const paintTargetRef = useRef22(null);
13260
13269
  const divRef = useRef22(null);
13261
- const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
13270
+ const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}-${usesDirectLayoutCanvas ? "direct" : "offscreen"}`;
13262
13271
  const setLayoutCanvasRef = useCallback16((node) => {
13263
13272
  canvas2dRef.current = node;
13264
13273
  if (typeof ref === "function") {
@@ -13281,17 +13290,19 @@ var HtmlInCanvasContent = forwardRef9(({
13281
13290
  const initializedRef = useRef22(false);
13282
13291
  const onInitCleanupRef = useRef22(null);
13283
13292
  const unmountedRef = useRef22(false);
13293
+ const ancestorRef = useRef22(ancestor);
13294
+ ancestorRef.current = ancestor;
13284
13295
  const onPaintCb = useCallback16(async () => {
13285
13296
  const element = divRef.current;
13286
13297
  if (!element) {
13287
13298
  throw new Error("Canvas or scene element not found");
13288
13299
  }
13289
- const offscreen = offscreenRef.current;
13290
- if (!offscreen) {
13291
- throw new Error("HtmlInCanvas: offscreen canvas not ready (transferControlToOffscreen failed or canvas is remounting)");
13300
+ const paintTarget = paintTargetRef.current;
13301
+ if (!paintTarget) {
13302
+ throw new Error("HtmlInCanvas: paint target is not ready because the canvas is remounting");
13292
13303
  }
13293
- resizeOffscreenCanvas({
13294
- offscreen,
13304
+ resizePaintTarget({
13305
+ target: paintTarget,
13295
13306
  width: canvasWidth,
13296
13307
  height: canvasHeight
13297
13308
  });
@@ -13302,22 +13313,30 @@ var HtmlInCanvasContent = forwardRef9(({
13302
13313
  }
13303
13314
  const handle = delayRender("onPaint");
13304
13315
  if (!initializedRef.current) {
13305
- let initImage = null;
13306
- try {
13307
- initImage = placeholderCanvas.captureElementImage(element);
13308
- } catch (error2) {
13309
- if (isMissingPaintRecordError(error2) && !isRendering) {} else if (isMissingPaintRecordError(error2)) {
13310
- throw new Error(missingPaintRecordMessage);
13311
- } else {
13316
+ const currentOnInit = onInitRef.current;
13317
+ if (!currentOnInit) {
13318
+ initializedRef.current = true;
13319
+ } else {
13320
+ let initImage;
13321
+ try {
13322
+ initImage = placeholderCanvas.captureElementImage(element);
13323
+ } catch (error2) {
13324
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
13325
+ continueRender2(handle);
13326
+ return;
13327
+ }
13328
+ if (isMissingPaintRecordError(error2)) {
13329
+ throw new Error(missingPaintRecordMessage);
13330
+ }
13312
13331
  throw error2;
13313
13332
  }
13314
- }
13315
- if (initImage) {
13316
13333
  initializedRef.current = true;
13317
- const currentOnInit = onInitRef.current;
13318
- if (currentOnInit) {
13334
+ try {
13335
+ if (paintTarget instanceof HTMLCanvasElement) {
13336
+ throw new Error("HtmlInCanvas: onInit requires an OffscreenCanvas paint target");
13337
+ }
13319
13338
  const cleanup = await currentOnInit({
13320
- canvas: offscreen,
13339
+ canvas: paintTarget,
13321
13340
  element,
13322
13341
  elementImage: initImage,
13323
13342
  pixelDensity: resolvedPixelDensity
@@ -13330,15 +13349,16 @@ var HtmlInCanvasContent = forwardRef9(({
13330
13349
  } else {
13331
13350
  onInitCleanupRef.current = cleanup;
13332
13351
  }
13352
+ } finally {
13353
+ initImage.close();
13333
13354
  }
13334
13355
  }
13335
13356
  }
13336
- const handler = onPaintRef.current ?? defaultOnPaint;
13337
13357
  let elImage;
13338
13358
  try {
13339
13359
  elImage = placeholderCanvas.captureElementImage(element);
13340
13360
  } catch (error2) {
13341
- if (isMissingPaintRecordError(error2) && !isRendering) {
13361
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
13342
13362
  continueRender2(handle);
13343
13363
  return;
13344
13364
  }
@@ -13347,20 +13367,41 @@ var HtmlInCanvasContent = forwardRef9(({
13347
13367
  }
13348
13368
  throw error2;
13349
13369
  }
13350
- await handler({
13351
- canvas: offscreen,
13352
- element,
13353
- elementImage: elImage,
13354
- pixelDensity: resolvedPixelDensity
13355
- });
13356
- await runEffectChain({
13357
- state: chainState.get(canvasWidth, canvasHeight),
13358
- source: offscreen,
13359
- effects: effectsRef.current,
13360
- output: offscreen,
13361
- width: canvasWidth,
13362
- height: canvasHeight
13363
- });
13370
+ try {
13371
+ const currentOnPaint = onPaintRef.current;
13372
+ if (currentOnPaint) {
13373
+ if (paintTarget instanceof HTMLCanvasElement) {
13374
+ throw new Error("HtmlInCanvas: onPaint requires an OffscreenCanvas paint target");
13375
+ }
13376
+ const paintResult = currentOnPaint({
13377
+ canvas: paintTarget,
13378
+ element,
13379
+ elementImage: elImage,
13380
+ pixelDensity: resolvedPixelDensity
13381
+ });
13382
+ if (paintResult) {
13383
+ await paintResult;
13384
+ }
13385
+ } else {
13386
+ defaultOnPaint({
13387
+ canvas: paintTarget,
13388
+ element,
13389
+ elementImage: elImage,
13390
+ pixelDensity: resolvedPixelDensity
13391
+ });
13392
+ }
13393
+ await runEffectChain({
13394
+ state: chainState.get(canvasWidth, canvasHeight),
13395
+ source: paintTarget,
13396
+ effects: effectsRef.current,
13397
+ output: paintTarget,
13398
+ width: canvasWidth,
13399
+ height: canvasHeight
13400
+ });
13401
+ } finally {
13402
+ elImage.close();
13403
+ }
13404
+ ancestorRef.current?.requestParentPaint();
13364
13405
  continueRender2(handle);
13365
13406
  } catch (error2) {
13366
13407
  cancelRender2(error2);
@@ -13372,7 +13413,7 @@ var HtmlInCanvasContent = forwardRef9(({
13372
13413
  continueRender2,
13373
13414
  cancelRender2,
13374
13415
  resolvedPixelDensity,
13375
- isRendering
13416
+ canRetryMissingPaintRecord
13376
13417
  ]);
13377
13418
  useLayoutEffect9(() => {
13378
13419
  const placeholder = canvas2dRef.current;
@@ -13380,10 +13421,10 @@ var HtmlInCanvasContent = forwardRef9(({
13380
13421
  throw new Error("Canvas not found");
13381
13422
  }
13382
13423
  placeholder.layoutSubtree = true;
13383
- const offscreen = placeholder.transferControlToOffscreen();
13384
- offscreenRef.current = offscreen;
13385
- resizeOffscreenCanvas({
13386
- offscreen,
13424
+ const paintTarget = usesDirectLayoutCanvas ? placeholder : placeholder.transferControlToOffscreen();
13425
+ paintTargetRef.current = paintTarget;
13426
+ resizePaintTarget({
13427
+ target: paintTarget,
13387
13428
  width: canvasWidth,
13388
13429
  height: canvasHeight
13389
13430
  });
@@ -13392,13 +13433,19 @@ var HtmlInCanvasContent = forwardRef9(({
13392
13433
  placeholder.addEventListener("paint", onPaintCb);
13393
13434
  return () => {
13394
13435
  placeholder.removeEventListener("paint", onPaintCb);
13395
- offscreenRef.current = null;
13436
+ paintTargetRef.current = null;
13396
13437
  initializedRef.current = false;
13397
13438
  unmountedRef.current = true;
13398
13439
  onInitCleanupRef.current?.();
13399
13440
  onInitCleanupRef.current = null;
13400
13441
  };
13401
- }, [onPaintCb, cancelRender2, canvasWidth, canvasHeight]);
13442
+ }, [
13443
+ onPaintCb,
13444
+ cancelRender2,
13445
+ canvasWidth,
13446
+ canvasHeight,
13447
+ usesDirectLayoutCanvas
13448
+ ]);
13402
13449
  const onPaintChangedRef = useRef22(false);
13403
13450
  useLayoutEffect9(() => {
13404
13451
  if (!onPaintChangedRef.current) {
@@ -13437,11 +13484,15 @@ var HtmlInCanvasContent = forwardRef9(({
13437
13484
  ...style ?? {}
13438
13485
  };
13439
13486
  }, [height, style, width]);
13440
- if (isInsideAncestorHtmlInCanvas) {
13441
- throw new Error("<HtmlInCanvas> effects cannot be nested together. Chrome will only display the outer effect. Consider merging the effects into one if you can.");
13442
- }
13487
+ const ancestorValue = useMemo30(() => {
13488
+ return {
13489
+ requestParentPaint: () => {
13490
+ canvas2dRef.current?.requestPaint?.();
13491
+ }
13492
+ };
13493
+ }, []);
13443
13494
  return /* @__PURE__ */ jsx25(HtmlInCanvasAncestorContext.Provider, {
13444
- value: true,
13495
+ value: ancestorValue,
13445
13496
  children: /* @__PURE__ */ jsx25("canvas", {
13446
13497
  ref: setLayoutCanvasRef,
13447
13498
  width: canvasWidth,
@@ -15811,66 +15862,130 @@ var flattenChildren = (children) => {
15811
15862
  return flatChildren;
15812
15863
  }, []);
15813
15864
  };
15814
- var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
15865
+ var seriesSequenceSchema = {
15866
+ durationInFrames: Interactive.baseSchema.durationInFrames,
15867
+ name: Interactive.sequenceSchema.name,
15868
+ hidden: Interactive.sequenceSchema.hidden,
15869
+ showInTimeline: Interactive.sequenceSchema.showInTimeline,
15870
+ freeze: Interactive.baseSchema.freeze,
15871
+ layout: Interactive.sequenceSchema.layout
15872
+ };
15873
+ var SeriesSequenceInner = forwardRef14(({
15874
+ offset = 0,
15875
+ className = "",
15876
+ stack = null,
15877
+ _remotionInternalRender = null,
15878
+ ...props2
15879
+ }, ref) => {
15815
15880
  useRequireToBeInsideSeries();
15881
+ if (_remotionInternalRender) {
15882
+ return _remotionInternalRender({ ...props2, offset, className: className || undefined, stack }, ref);
15883
+ }
15816
15884
  return /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
15817
- children
15885
+ children: props2.children
15818
15886
  });
15819
- };
15820
- var SeriesSequence = forwardRef14(SeriesSequenceRefForwardingFunction);
15887
+ });
15888
+ var SeriesSequence = Interactive.withSchema({
15889
+ Component: SeriesSequenceInner,
15890
+ componentName: "<Series.Sequence>",
15891
+ componentIdentity: "dev.remotion.remotion.Series.Sequence",
15892
+ schema: seriesSequenceSchema,
15893
+ supportsEffects: false
15894
+ });
15821
15895
  var SequenceWithoutSchemaWithRef = SequenceWithoutSchema;
15896
+ var validateSeriesSequenceProps = ({
15897
+ durationInFrames,
15898
+ offset: offsetProp,
15899
+ index,
15900
+ childrenLength
15901
+ }) => {
15902
+ const debugInfo = `index = ${index}, duration = ${durationInFrames}`;
15903
+ if (index !== childrenLength - 1 || durationInFrames !== Infinity) {
15904
+ validateDurationInFrames(durationInFrames, {
15905
+ component: `of a <Series.Sequence /> component`,
15906
+ allowFloats: true
15907
+ });
15908
+ }
15909
+ const offset = offsetProp ?? 0;
15910
+ if (Number.isNaN(offset)) {
15911
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
15912
+ }
15913
+ if (!Number.isFinite(offset)) {
15914
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15915
+ }
15916
+ if (offset % 1 !== 0) {
15917
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15918
+ }
15919
+ return offset;
15920
+ };
15822
15921
  var SeriesInner = (props2) => {
15823
15922
  const childrenValue = useMemo38(() => {
15824
- let startFrame = 0;
15825
15923
  const flattenedChildren = flattenChildren(props2.children);
15826
- return Children.map(flattenedChildren, (child, i) => {
15924
+ const renderChildren = (i, startFrame) => {
15925
+ if (i === flattenedChildren.length) {
15926
+ return null;
15927
+ }
15928
+ const child = flattenedChildren[i];
15827
15929
  const castedChild = child;
15828
15930
  if (typeof castedChild === "string") {
15829
15931
  if (castedChild.trim() === "") {
15830
- return null;
15932
+ return renderChildren(i + 1, startFrame);
15831
15933
  }
15832
15934
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}"`);
15833
15935
  }
15834
15936
  if (castedChild.type !== SeriesSequence) {
15835
15937
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
15836
15938
  }
15837
- const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
15838
- const durationInFramesProp = castedChild.props.durationInFrames;
15839
- const {
15840
- durationInFrames,
15841
- children: _children,
15842
- from,
15843
- name,
15844
- ...passedProps
15845
- } = castedChild.props;
15846
- if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {
15847
- validateDurationInFrames(durationInFramesProp, {
15848
- component: `of a <Series.Sequence /> component`,
15849
- allowFloats: true
15850
- });
15851
- }
15852
- const offset = castedChild.props.offset ?? 0;
15853
- if (Number.isNaN(offset)) {
15854
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
15855
- }
15856
- if (!Number.isFinite(offset)) {
15857
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15858
- }
15859
- if (offset % 1 !== 0) {
15860
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
15861
- }
15862
- const currentStartFrame = startFrame + offset;
15863
- startFrame += durationInFramesProp + offset;
15864
- return /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
15865
- ref: castedChild.ref,
15866
- name: name || "<Series.Sequence>",
15867
- _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
15868
- from: currentStartFrame,
15869
- durationInFrames: durationInFramesProp,
15870
- ...passedProps,
15871
- children: child
15939
+ const castedElement = castedChild;
15940
+ validateSeriesSequenceProps({
15941
+ durationInFrames: castedElement.props.durationInFrames,
15942
+ offset: castedElement.props.offset,
15943
+ index: i,
15944
+ childrenLength: flattenedChildren.length
15872
15945
  });
15873
- });
15946
+ return React41.cloneElement(castedElement, {
15947
+ _remotionInternalRender: (resolvedProps, ref) => {
15948
+ const durationInFramesProp = resolvedProps.durationInFrames;
15949
+ const {
15950
+ durationInFrames: _durationInFrames,
15951
+ children: sequenceChildren,
15952
+ offset: offsetProp,
15953
+ controls,
15954
+ stack,
15955
+ from: _from,
15956
+ name,
15957
+ ...passedProps
15958
+ } = resolvedProps;
15959
+ const offset = validateSeriesSequenceProps({
15960
+ durationInFrames: durationInFramesProp,
15961
+ offset: offsetProp,
15962
+ index: i,
15963
+ childrenLength: flattenedChildren.length
15964
+ });
15965
+ const currentStartFrame = startFrame + offset;
15966
+ const nextStartFrame = startFrame + durationInFramesProp + offset;
15967
+ return /* @__PURE__ */ jsxs32(Fragment, {
15968
+ children: [
15969
+ /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
15970
+ ref,
15971
+ name: name || "<Series.Sequence>",
15972
+ _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
15973
+ _remotionInternalStack: stack ?? undefined,
15974
+ controls: controls ?? undefined,
15975
+ from: currentStartFrame,
15976
+ durationInFrames: durationInFramesProp,
15977
+ ...passedProps,
15978
+ children: /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
15979
+ children: sequenceChildren
15980
+ })
15981
+ }),
15982
+ renderChildren(i + 1, nextStartFrame)
15983
+ ]
15984
+ });
15985
+ }
15986
+ });
15987
+ };
15988
+ return renderChildren(0, 0);
15874
15989
  }, [props2.children]);
15875
15990
  return /* @__PURE__ */ jsx37(IsInsideSeriesContainer, {
15876
15991
  children: /* @__PURE__ */ jsx37(Sequence, {
@@ -19388,7 +19503,7 @@ import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
19388
19503
  import React62 from "react";
19389
19504
  import { jsx as jsx63 } from "react/jsx-runtime";
19390
19505
  import { jsx as jsx73 } from "react/jsx-runtime";
19391
- import { jsx as jsx83, jsxs as jsxs32 } from "react/jsx-runtime";
19506
+ import { jsx as jsx83, jsxs as jsxs33 } from "react/jsx-runtime";
19392
19507
  import { jsx as jsx93 } from "react/jsx-runtime";
19393
19508
  import React72 from "react";
19394
19509
  import { jsx as jsx103 } from "react/jsx-runtime";
@@ -19452,12 +19567,12 @@ import { jsx as jsx272 } from "react/jsx-runtime";
19452
19567
  import * as React47 from "react";
19453
19568
  import React402 from "react";
19454
19569
  import * as React392 from "react";
19455
- import { Fragment as Fragment22, jsx as jsx282 } from "react/jsx-runtime";
19570
+ import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
19456
19571
  import { jsx as jsx292 } from "react/jsx-runtime";
19457
19572
  import React210 from "react";
19458
19573
  import { jsx as jsx2102 } from "react/jsx-runtime";
19459
19574
  import * as React422 from "react";
19460
- import * as React41 from "react";
19575
+ import * as React412 from "react";
19461
19576
  import * as React43 from "react";
19462
19577
  import * as ReactDOM5 from "react-dom";
19463
19578
  import { jsx as jsx302 } from "react/jsx-runtime";
@@ -19567,7 +19682,7 @@ function createSlotClone(ownerName) {
19567
19682
  var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
19568
19683
  function createSlottable(ownerName) {
19569
19684
  const Slottable2 = ({ children }) => {
19570
- return /* @__PURE__ */ jsx44(Fragment2, { children });
19685
+ return /* @__PURE__ */ jsx44(Fragment22, { children });
19571
19686
  };
19572
19687
  Slottable2.displayName = `${ownerName}.Slottable`;
19573
19688
  Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
@@ -20128,7 +20243,7 @@ var Counter = ({
20128
20243
  setCount(Math.min(MAX_COUNT, roundedValue));
20129
20244
  };
20130
20245
  const shrink = String(count).length > 6;
20131
- return /* @__PURE__ */ jsxs32(Card, {
20246
+ return /* @__PURE__ */ jsxs33(Card, {
20132
20247
  style: container2,
20133
20248
  className: cn("w-[140px] flex flex-row overflow-hidden"),
20134
20249
  children: [
@@ -20152,7 +20267,7 @@ var Counter = ({
20152
20267
  }
20153
20268
  }
20154
20269
  }),
20155
- /* @__PURE__ */ jsxs32("div", {
20270
+ /* @__PURE__ */ jsxs33("div", {
20156
20271
  className: "flex flex-col h-full",
20157
20272
  children: [
20158
20273
  /* @__PURE__ */ jsx83("button", {
@@ -25466,7 +25581,7 @@ function toSafeIndex(array, index2) {
25466
25581
  function toSafeInteger(number) {
25467
25582
  return number !== number || number === 0 ? 0 : Math.trunc(number);
25468
25583
  }
25469
- var useLayoutEffect222 = globalThis?.document ? React41.useLayoutEffect : () => {};
25584
+ var useLayoutEffect222 = globalThis?.document ? React412.useLayoutEffect : () => {};
25470
25585
  var useReactId2 = React422[" useId ".trim().toString()] || (() => {
25471
25586
  return;
25472
25587
  });