@remotion/studio 4.0.493 → 4.0.494

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.
Files changed (27) hide show
  1. package/dist/components/Canvas.js +3 -0
  2. package/dist/components/InitialCompositionLoader.d.ts +1 -1
  3. package/dist/components/InitialCompositionLoader.js +6 -1
  4. package/dist/components/Timeline/Timeline.js +1 -0
  5. package/dist/components/Timeline/TimelineClipboardKeybindings.js +3 -0
  6. package/dist/components/Timeline/TimelineDeleteKeybindings.js +2 -0
  7. package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
  8. package/dist/components/Timeline/TimelineSequence.d.ts +1 -0
  9. package/dist/components/Timeline/TimelineSequence.js +42 -6
  10. package/dist/components/Timeline/TimelineSequenceItem.js +14 -2
  11. package/dist/components/Timeline/TimelineTrack.js +2 -1
  12. package/dist/components/Timeline/call-delete-keyframe.d.ts +1 -0
  13. package/dist/components/Timeline/call-delete-keyframe.js +4 -0
  14. package/dist/components/Timeline/delete-selected-keyframe.d.ts +4 -2
  15. package/dist/components/Timeline/delete-selected-keyframe.js +48 -5
  16. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -1
  17. package/dist/components/Timeline/delete-selected-timeline-item.js +3 -1
  18. package/dist/components/import-assets.d.ts +25 -3
  19. package/dist/components/import-assets.js +54 -15
  20. package/dist/esm/{chunk-mndqr3zx.js → chunk-tdncqycp.js} +702 -529
  21. package/dist/esm/internals.mjs +702 -529
  22. package/dist/esm/previewEntry.mjs +701 -528
  23. package/dist/esm/renderEntry.mjs +1 -1
  24. package/dist/helpers/get-sequence-double-click-action.d.ts +6 -0
  25. package/dist/helpers/get-sequence-double-click-action.js +10 -1
  26. package/dist/helpers/inject-css.js +0 -2
  27. package/package.json +11 -11
@@ -111,12 +111,12 @@ import {
111
111
  // src/Studio.tsx
112
112
  import { useLayoutEffect as useLayoutEffect7 } from "react";
113
113
  import { createPortal } from "react-dom";
114
- import { Internals as Internals121 } from "remotion";
114
+ import { Internals as Internals122 } from "remotion";
115
115
 
116
116
  // src/components/Editor.tsx
117
117
  import { PlayerInternals as PlayerInternals23 } from "@remotion/player";
118
118
  import React256, { useCallback as useCallback217, useMemo as useMemo220, useState as useState127 } from "react";
119
- import { Internals as Internals116 } from "remotion";
119
+ import { Internals as Internals117 } from "remotion";
120
120
 
121
121
  // src/helpers/noop.ts
122
122
  var noop = () => {
@@ -1211,11 +1211,11 @@ var CANVAS_CAPTURE_ENABLED = false;
1211
1211
 
1212
1212
  // src/components/EditorContent.tsx
1213
1213
  import { useCallback as useCallback172, useContext as useContext126 } from "react";
1214
- import { Internals as Internals104 } from "remotion";
1214
+ import { Internals as Internals105 } from "remotion";
1215
1215
 
1216
1216
  // src/components/GlobalKeybindings.tsx
1217
1217
  import { useCallback as useCallback27, useContext as useContext19, useEffect as useEffect21, useMemo as useMemo29 } from "react";
1218
- import { Internals as Internals21 } from "remotion";
1218
+ import { Internals as Internals22 } from "remotion";
1219
1219
 
1220
1220
  // src/helpers/calculate-timeline.ts
1221
1221
  import { stringifySequenceSubscriptionKey } from "@remotion/studio-shared";
@@ -5822,13 +5822,17 @@ var useStaticFiles = () => {
5822
5822
  var useSelectComposition = () => {
5823
5823
  const { setCompositionFoldersExpanded } = useContext13(FolderContext);
5824
5824
  const { setCanvasContent } = useContext13(Internals9.CompositionSetters);
5825
+ const setFrame = Internals9.useTimelineSetFrame();
5825
5826
  const isMobileLayout = useMobileLayout();
5826
5827
  const { setSidebarCollapsedState } = useContext13(SidebarContext);
5827
- return useCallback22((c, push) => {
5828
+ return useCallback22((c, push, frame = null) => {
5828
5829
  if (push) {
5829
5830
  pushUrl(`/${c.id}`);
5830
5831
  }
5831
5832
  explorerSidebarTabs.current?.selectCompositionPanel();
5833
+ if (frame !== null) {
5834
+ setFrame((current) => ({ ...current, [c.id]: frame }));
5835
+ }
5832
5836
  setCanvasContent({ type: "composition", compositionId: c.id });
5833
5837
  const { folderName, parentFolderName } = c;
5834
5838
  if (folderName !== null) {
@@ -5851,6 +5855,7 @@ var useSelectComposition = () => {
5851
5855
  isMobileLayout,
5852
5856
  setCanvasContent,
5853
5857
  setCompositionFoldersExpanded,
5858
+ setFrame,
5854
5859
  setSidebarCollapsedState
5855
5860
  ]);
5856
5861
  };
@@ -6277,7 +6282,7 @@ import {
6277
6282
  useState as useState21
6278
6283
  } from "react";
6279
6284
  import {
6280
- Internals as Internals20
6285
+ Internals as Internals21
6281
6286
  } from "remotion";
6282
6287
 
6283
6288
  // src/helpers/interactivity-enabled.ts
@@ -6627,7 +6632,7 @@ import {
6627
6632
  } from "@remotion/studio-shared";
6628
6633
  import { useContext as useContext16, useEffect as useEffect18, useRef as useRef15 } from "react";
6629
6634
  import {
6630
- Internals as Internals16
6635
+ Internals as Internals17
6631
6636
  } from "remotion";
6632
6637
 
6633
6638
  // src/components/ConfirmationDialog.tsx
@@ -7190,7 +7195,8 @@ var callDeleteKeyframes = ({
7190
7195
  previous: prev,
7191
7196
  keyframes: keyframes.map((keyframe) => ({
7192
7197
  fieldKey: keyframe.fieldKey,
7193
- frame: keyframe.sourceFrame
7198
+ frame: keyframe.sourceFrame,
7199
+ valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
7194
7200
  }))
7195
7201
  }));
7196
7202
  }
@@ -7204,7 +7210,8 @@ var callDeleteKeyframes = ({
7204
7210
  keyframes: keyframes.map((keyframe) => ({
7205
7211
  effectIndex: keyframe.effectIndex,
7206
7212
  fieldKey: keyframe.fieldKey,
7207
- frame: keyframe.sourceFrame
7213
+ frame: keyframe.sourceFrame,
7214
+ valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
7208
7215
  }))
7209
7216
  }));
7210
7217
  }
@@ -7214,7 +7221,8 @@ var callDeleteKeyframes = ({
7214
7221
  nodePath: keyframe.nodePath,
7215
7222
  key: keyframe.fieldKey,
7216
7223
  frame: keyframe.sourceFrame,
7217
- schema: keyframe.schema
7224
+ schema: keyframe.schema,
7225
+ valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
7218
7226
  })),
7219
7227
  effectKeyframes: effectKeyframes.map((keyframe) => ({
7220
7228
  fileName: keyframe.fileName,
@@ -7222,7 +7230,8 @@ var callDeleteKeyframes = ({
7222
7230
  effectIndex: keyframe.effectIndex,
7223
7231
  key: keyframe.fieldKey,
7224
7232
  frame: keyframe.sourceFrame,
7225
- schema: keyframe.schema
7233
+ schema: keyframe.schema,
7234
+ valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
7226
7235
  })),
7227
7236
  clientId
7228
7237
  }).then(() => {
@@ -7297,7 +7306,10 @@ var callUpdateEffectKeyframeSettings = ({
7297
7306
  };
7298
7307
 
7299
7308
  // src/components/Timeline/delete-selected-timeline-item.ts
7300
- import { Internals as Internals14 } from "remotion";
7309
+ import { Internals as Internals15 } from "remotion";
7310
+
7311
+ // src/components/Timeline/delete-selected-keyframe.ts
7312
+ import { Internals as Internals13 } from "remotion";
7301
7313
 
7302
7314
  // src/components/Timeline/find-track-for-node-path-info.ts
7303
7315
  import { stringifySequenceExpandedRowKey as stringifySequenceExpandedRowKey3 } from "@remotion/studio-shared";
@@ -7333,11 +7345,26 @@ var parseKeyframeFieldFromNodePath = (auxiliaryKeys) => {
7333
7345
  };
7334
7346
 
7335
7347
  // src/components/Timeline/delete-selected-keyframe.ts
7348
+ var getValueWhenLastKeyframeDeleted = ({
7349
+ propStatus,
7350
+ playheadSourceFrame
7351
+ }) => {
7352
+ if (propStatus?.status !== "keyframed" || playheadSourceFrame === null) {
7353
+ return null;
7354
+ }
7355
+ return Internals13.interpolateKeyframedStatus({
7356
+ forceSpringAllowTail: null,
7357
+ frame: playheadSourceFrame,
7358
+ status: propStatus
7359
+ }) ?? null;
7360
+ };
7336
7361
  var getSelectedKeyframeDeletion = ({
7337
7362
  nodePathInfo,
7338
7363
  frame,
7339
7364
  sequences,
7340
- overrideIdsToNodePaths
7365
+ overrideIdsToNodePaths,
7366
+ propStatuses,
7367
+ timelinePosition
7341
7368
  }) => {
7342
7369
  const field = parseKeyframeFieldFromNodePath(nodePathInfo.auxiliaryKeys);
7343
7370
  if (field === null) {
@@ -7353,6 +7380,7 @@ var getSelectedKeyframeDeletion = ({
7353
7380
  return null;
7354
7381
  }
7355
7382
  const sourceFrame = frame - (track?.keyframeDisplayOffset ?? 0);
7383
+ const playheadSourceFrame = timelinePosition === null ? null : timelinePosition - (track?.keyframeDisplayOffset ?? 0);
7356
7384
  const nodePath = nodePathInfo.sequenceSubscriptionKey;
7357
7385
  const fileName = nodePath.absolutePath;
7358
7386
  if (field.type === "effect") {
@@ -7360,6 +7388,16 @@ var getSelectedKeyframeDeletion = ({
7360
7388
  if (!effect) {
7361
7389
  return null;
7362
7390
  }
7391
+ const effectStatus = propStatuses !== null ? Internals13.getEffectPropStatusesCtx({
7392
+ propStatuses,
7393
+ nodePath,
7394
+ effectIndex: field.effectIndex
7395
+ }) : null;
7396
+ const effectPropStatus = effectStatus?.type === "can-update-effect" ? effectStatus.props[field.fieldKey] : null;
7397
+ const effectValueWhenLastKeyframeDeleted = getValueWhenLastKeyframeDeleted({
7398
+ propStatus: effectPropStatus,
7399
+ playheadSourceFrame
7400
+ });
7363
7401
  return {
7364
7402
  type: "effect",
7365
7403
  fileName,
@@ -7367,16 +7405,23 @@ var getSelectedKeyframeDeletion = ({
7367
7405
  effectIndex: field.effectIndex,
7368
7406
  fieldKey: field.fieldKey,
7369
7407
  sourceFrame,
7370
- schema: effect.schema
7408
+ schema: effect.schema,
7409
+ valueWhenLastKeyframeDeleted: effectValueWhenLastKeyframeDeleted
7371
7410
  };
7372
7411
  }
7412
+ const sequencePropStatus = propStatuses !== null ? Internals13.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey] : null;
7413
+ const sequenceValueWhenLastKeyframeDeleted = getValueWhenLastKeyframeDeleted({
7414
+ propStatus: sequencePropStatus,
7415
+ playheadSourceFrame
7416
+ });
7373
7417
  return {
7374
7418
  type: "sequence",
7375
7419
  fileName,
7376
7420
  nodePath,
7377
7421
  fieldKey: field.fieldKey,
7378
7422
  sourceFrame,
7379
- schema: sequence.controls.schema
7423
+ schema: sequence.controls.schema,
7424
+ valueWhenLastKeyframeDeleted: sequenceValueWhenLastKeyframeDeleted
7380
7425
  };
7381
7426
  };
7382
7427
  var deleteSelectedKeyframes = ({
@@ -7384,13 +7429,17 @@ var deleteSelectedKeyframes = ({
7384
7429
  sequences,
7385
7430
  overrideIdsToNodePaths,
7386
7431
  setPropStatuses,
7387
- clientId
7432
+ clientId,
7433
+ propStatuses,
7434
+ timelinePosition
7388
7435
  }) => {
7389
7436
  const deletions = keyframes.map((keyframe) => getSelectedKeyframeDeletion({
7390
7437
  nodePathInfo: keyframe.nodePathInfo,
7391
7438
  frame: keyframe.frame,
7392
7439
  sequences,
7393
- overrideIdsToNodePaths
7440
+ overrideIdsToNodePaths,
7441
+ propStatuses,
7442
+ timelinePosition
7394
7443
  })).filter((deletion) => deletion !== null);
7395
7444
  if (deletions.length === 0) {
7396
7445
  return null;
@@ -7439,7 +7488,7 @@ import {
7439
7488
  LINEAR_KEYFRAME_EASING
7440
7489
  } from "@remotion/studio-shared";
7441
7490
  import { canEditEasingForInterpolationFunction as canEditEasingForInterpolationFunction2 } from "@remotion/studio-shared";
7442
- import { Internals as Internals13 } from "remotion";
7491
+ import { Internals as Internals14 } from "remotion";
7443
7492
  var isEasingSelection = (selection) => selection.type === "easing";
7444
7493
  var getSelectedEasingUpdate = ({
7445
7494
  selection,
@@ -7466,7 +7515,7 @@ var getSelectedEasingUpdate = ({
7466
7515
  if (!sequence.controls) {
7467
7516
  return null;
7468
7517
  }
7469
- const sequencePropStatus = Internals13.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey];
7518
+ const sequencePropStatus = Internals14.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey];
7470
7519
  if (sequencePropStatus?.status !== "keyframed" || !canEditEasingForInterpolationFunction(sequencePropStatus.interpolationFunction)) {
7471
7520
  return null;
7472
7521
  }
@@ -7485,7 +7534,7 @@ var getSelectedEasingUpdate = ({
7485
7534
  if (!effect) {
7486
7535
  return null;
7487
7536
  }
7488
- const effectStatus = Internals13.getEffectPropStatusesCtx({
7537
+ const effectStatus = Internals14.getEffectPropStatusesCtx({
7489
7538
  propStatuses,
7490
7539
  nodePath,
7491
7540
  effectIndex: field.effectIndex
@@ -7730,7 +7779,7 @@ var getEasingSelectionAfterDeletingKeyframes = ({
7730
7779
  const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
7731
7780
  const sourceFrame = selection.frame - track.keyframeDisplayOffset;
7732
7781
  if (field.type === "sequence") {
7733
- const sequencePropStatus = Internals14.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey];
7782
+ const sequencePropStatus = Internals15.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey];
7734
7783
  if (sequencePropStatus?.status !== "keyframed" || !canEditEasingForInterpolationFunction2(sequencePropStatus.interpolationFunction)) {
7735
7784
  return null;
7736
7785
  }
@@ -7742,7 +7791,7 @@ var getEasingSelectionAfterDeletingKeyframes = ({
7742
7791
  timelinePosition
7743
7792
  });
7744
7793
  }
7745
- const effectStatus = Internals14.getEffectPropStatusesCtx({
7794
+ const effectStatus = Internals15.getEffectPropStatusesCtx({
7746
7795
  propStatuses,
7747
7796
  nodePath,
7748
7797
  effectIndex: field.effectIndex
@@ -7805,7 +7854,9 @@ var deleteSelectedTimelineItems = ({
7805
7854
  overrideIdsToNodePaths,
7806
7855
  setPropStatuses,
7807
7856
  clientId,
7808
- confirm
7857
+ confirm,
7858
+ propStatuses,
7859
+ timelinePosition
7809
7860
  }) => {
7810
7861
  const firstSelection = selections[0];
7811
7862
  if (!firstSelection) {
@@ -7824,7 +7875,9 @@ var deleteSelectedTimelineItems = ({
7824
7875
  sequences,
7825
7876
  overrideIdsToNodePaths,
7826
7877
  setPropStatuses,
7827
- clientId
7878
+ clientId,
7879
+ propStatuses,
7880
+ timelinePosition
7828
7881
  });
7829
7882
  return promise?.then(() => true) ?? null;
7830
7883
  }
@@ -7919,13 +7972,13 @@ import {
7919
7972
  LINEAR_KEYFRAME_EASING as LINEAR_KEYFRAME_EASING2
7920
7973
  } from "@remotion/studio-shared";
7921
7974
  import {
7922
- Internals as Internals15
7975
+ Internals as Internals16
7923
7976
  } from "remotion";
7924
7977
  var getKeyframeClipboardFieldType = ({
7925
7978
  schema,
7926
7979
  fieldKey
7927
7980
  }) => {
7928
- const field = Internals15.getFlatSchemaWithAllKeys(schema)[fieldKey];
7981
+ const field = Internals16.getFlatSchemaWithAllKeys(schema)[fieldKey];
7929
7982
  if (!field) {
7930
7983
  return null;
7931
7984
  }
@@ -7973,7 +8026,7 @@ var resolveKeyframeField = ({
7973
8026
  if (!track.sequence.controls) {
7974
8027
  return null;
7975
8028
  }
7976
- const sequencePropStatus = Internals15.getPropStatusesCtx(propStatuses, nodePath)?.[identity.fieldKey];
8029
+ const sequencePropStatus = Internals16.getPropStatusesCtx(propStatuses, nodePath)?.[identity.fieldKey];
7977
8030
  if (!sequencePropStatus || sequencePropStatus.status === "computed") {
7978
8031
  return null;
7979
8032
  }
@@ -7992,7 +8045,7 @@ var resolveKeyframeField = ({
7992
8045
  };
7993
8046
  }
7994
8047
  const effect = track.sequence.effects[identity.effectIndex];
7995
- const effectStatus = Internals15.getEffectPropStatusesCtx({
8048
+ const effectStatus = Internals16.getEffectPropStatusesCtx({
7996
8049
  propStatuses,
7997
8050
  nodePath,
7998
8051
  effectIndex: identity.effectIndex
@@ -8015,7 +8068,7 @@ var resolveKeyframeField = ({
8015
8068
  };
8016
8069
  };
8017
8070
  var areResolvedFieldsEqual = (first, second) => {
8018
- if (Internals15.makeSequencePropsSubscriptionKey(first.nodePath) !== Internals15.makeSequencePropsSubscriptionKey(second.nodePath)) {
8071
+ if (Internals16.makeSequencePropsSubscriptionKey(first.nodePath) !== Internals16.makeSequencePropsSubscriptionKey(second.nodePath)) {
8019
8072
  return false;
8020
8073
  }
8021
8074
  if (first.identity.type !== second.identity.type) {
@@ -8342,7 +8395,7 @@ var getSnapshotsFromSelection = ({
8342
8395
  return null;
8343
8396
  }
8344
8397
  const { sequenceSubscriptionKey } = selection.nodePathInfo;
8345
- const sequenceStatus = propStatuses[Internals16.makeSequencePropsSubscriptionKey(sequenceSubscriptionKey)];
8398
+ const sequenceStatus = propStatuses[Internals17.makeSequencePropsSubscriptionKey(sequenceSubscriptionKey)];
8346
8399
  if (!sequenceStatus || !sequenceStatus.canUpdate) {
8347
8400
  return null;
8348
8401
  }
@@ -8447,7 +8500,7 @@ var getEffectPropClipboardDataFromSelection = ({
8447
8500
  if (selection.type !== "sequence-effect-prop") {
8448
8501
  return null;
8449
8502
  }
8450
- const sequenceStatus = propStatuses[Internals16.makeSequencePropsSubscriptionKey(selection.nodePathInfo.sequenceSubscriptionKey)];
8503
+ const sequenceStatus = propStatuses[Internals17.makeSequencePropsSubscriptionKey(selection.nodePathInfo.sequenceSubscriptionKey)];
8451
8504
  if (!sequenceStatus || !sequenceStatus.canUpdate) {
8452
8505
  return null;
8453
8506
  }
@@ -8544,7 +8597,7 @@ var getPasteEffectPropTarget = ({
8544
8597
  if (!effect || !isVisibleFieldSchema(fieldSchema)) {
8545
8598
  return { type: "prop-mismatch" };
8546
8599
  }
8547
- const sequenceStatus = propStatuses[Internals16.makeSequencePropsSubscriptionKey(selection.nodePathInfo.sequenceSubscriptionKey)];
8600
+ const sequenceStatus = propStatuses[Internals17.makeSequencePropsSubscriptionKey(selection.nodePathInfo.sequenceSubscriptionKey)];
8548
8601
  if (!sequenceStatus?.canUpdate) {
8549
8602
  return { type: "uncopyable" };
8550
8603
  }
@@ -8571,16 +8624,16 @@ var getPasteEffectPropTarget = ({
8571
8624
  };
8572
8625
  var TimelineClipboardKeybindings = () => {
8573
8626
  const keybindings = useKeybinding();
8574
- const timelinePosition = Internals16.Timeline.useTimelinePosition();
8627
+ const timelinePosition = Internals17.Timeline.useTimelinePosition();
8575
8628
  const timelinePositionRef = useRef15(timelinePosition);
8576
8629
  timelinePositionRef.current = timelinePosition;
8577
8630
  const { previewServerState } = useContext16(StudioServerConnectionCtx);
8578
8631
  const { canSelect } = useTimelineSelection();
8579
8632
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
8580
- const propStatusesRef = useContext16(Internals16.VisualModePropStatusesRefContext);
8581
- const { setPropStatuses } = useContext16(Internals16.VisualModeSettersContext);
8582
- const sequencesRef = useContext16(Internals16.SequenceManagerRefContext);
8583
- const { overrideIdToNodePathMappings } = useContext16(Internals16.OverrideIdsToNodePathsGettersContext);
8633
+ const propStatusesRef = useContext16(Internals17.VisualModePropStatusesRefContext);
8634
+ const { setPropStatuses } = useContext16(Internals17.VisualModeSettersContext);
8635
+ const sequencesRef = useContext16(Internals17.SequenceManagerRefContext);
8636
+ const { overrideIdToNodePathMappings } = useContext16(Internals17.OverrideIdsToNodePathsGettersContext);
8584
8637
  const confirm = useConfirmationDialog();
8585
8638
  useEffect18(() => {
8586
8639
  if (!canSelect || previewServerState.type !== "connected") {
@@ -8729,7 +8782,9 @@ var TimelineClipboardKeybindings = () => {
8729
8782
  overrideIdsToNodePaths: overrideIdToNodePathMappings,
8730
8783
  setPropStatuses,
8731
8784
  clientId,
8732
- confirm
8785
+ confirm,
8786
+ propStatuses,
8787
+ timelinePosition: timelinePositionRef.current
8733
8788
  });
8734
8789
  return deletePromise?.then((deleted) => {
8735
8790
  if (!deleted) {
@@ -8814,7 +8869,8 @@ var TimelineClipboardKeybindings = () => {
8814
8869
  nodePath: keyframeTarget.nodePath,
8815
8870
  fieldKey: keyframeTarget.fieldKey,
8816
8871
  sourceFrame,
8817
- schema: keyframeTarget.schema
8872
+ schema: keyframeTarget.schema,
8873
+ valueWhenLastKeyframeDeleted: null
8818
8874
  }));
8819
8875
  return callDeleteKeyframes({
8820
8876
  sequenceKeyframes: effectIndex === null ? deletions : [],
@@ -9019,7 +9075,7 @@ var TimelineClipboardKeybindings = () => {
9019
9075
  // src/components/Timeline/TimelineDeleteKeybindings.tsx
9020
9076
  import { LINEAR_KEYFRAME_EASING as LINEAR_KEYFRAME_EASING3 } from "@remotion/studio-shared";
9021
9077
  import { useContext as useContext17, useEffect as useEffect19, useRef as useRef16 } from "react";
9022
- import { Internals as Internals19 } from "remotion";
9078
+ import { Internals as Internals20 } from "remotion";
9023
9079
 
9024
9080
  // src/state/editor-guides.ts
9025
9081
  import { createContext as createContext14 } from "react";
@@ -9144,7 +9200,7 @@ var duplicateSelectedTimelineItems = ({
9144
9200
 
9145
9201
  // src/components/Timeline/reset-selected-timeline-props.ts
9146
9202
  import { getEffectFieldsToShow as getEffectFieldsToShow3 } from "@remotion/studio-shared";
9147
- import { Internals as Internals17 } from "remotion";
9203
+ import { Internals as Internals18 } from "remotion";
9148
9204
 
9149
9205
  // src/components/Timeline/save-sequence-prop.ts
9150
9206
  import {
@@ -9390,7 +9446,7 @@ var getActiveFieldSchema = ({
9390
9446
  key: key2,
9391
9447
  resolveValue
9392
9448
  }) => {
9393
- return Internals17.flattenActiveSchema(schema, resolveValue)[key2];
9449
+ return Internals18.flattenActiveSchema(schema, resolveValue)[key2];
9394
9450
  };
9395
9451
  var getTimelinePropResetTargets = ({
9396
9452
  selections,
@@ -9422,8 +9478,8 @@ var getTimelinePropResetTargets = ({
9422
9478
  if (!sequence.controls) {
9423
9479
  continue;
9424
9480
  }
9425
- const sequencePropStatus = Internals17.getPropStatusesCtx(propStatuses, nodePath);
9426
- const { merged: sequenceValuesDotNotation } = Internals17.computeEffectiveSchemaValuesDotNotation({
9481
+ const sequencePropStatus = Internals18.getPropStatusesCtx(propStatuses, nodePath);
9482
+ const { merged: sequenceValuesDotNotation } = Internals18.computeEffectiveSchemaValuesDotNotation({
9427
9483
  schema: sequence.controls.schema,
9428
9484
  currentValue: sequence.controls.currentRuntimeValueDotNotation,
9429
9485
  overrideValues: {},
@@ -9462,7 +9518,7 @@ var getTimelinePropResetTargets = ({
9462
9518
  getEffectDragOverrides: () => ({})
9463
9519
  }).find((candidate) => candidate.key === selection.key) : null;
9464
9520
  const fieldSchema = field?.fieldSchema;
9465
- const effectStatus = Internals17.getEffectPropStatusesCtx({
9521
+ const effectStatus = Internals18.getEffectPropStatusesCtx({
9466
9522
  propStatuses,
9467
9523
  nodePath,
9468
9524
  effectIndex: selection.i
@@ -9543,7 +9599,7 @@ var resetSelectedTimelineProps = ({
9543
9599
  };
9544
9600
 
9545
9601
  // src/components/Timeline/split-selected-timeline-item.ts
9546
- import { Internals as Internals18 } from "remotion";
9602
+ import { Internals as Internals19 } from "remotion";
9547
9603
  var getTimelineSequenceSplitUnsupportedReason = (componentName) => {
9548
9604
  if (componentName === "<TransitionSeries.Sequence>" || componentName === "<TransitionSeries.Overlay>") {
9549
9605
  return `${componentName} cannot be split from source`;
@@ -9678,7 +9734,7 @@ var splitSelectedTimelineItems = ({
9678
9734
  overrideIdsToNodePaths,
9679
9735
  nodePathInfo: selection.nodePathInfo
9680
9736
  });
9681
- const sequencePropStatuses = propStatuses ? Internals18.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey) : undefined;
9737
+ const sequencePropStatuses = propStatuses ? Internals19.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey) : undefined;
9682
9738
  const eligibility = getTimelineSequenceSplitEligibility({
9683
9739
  selection,
9684
9740
  sequence: track?.sequence ?? null,
@@ -9699,15 +9755,15 @@ var splitSelectedTimelineItems = ({
9699
9755
  var TimelineDeleteKeybindings = () => {
9700
9756
  const keybindings = useKeybinding();
9701
9757
  const { previewServerState } = useContext17(StudioServerConnectionCtx);
9702
- const sequencesRef = useContext17(Internals19.SequenceManagerRefContext);
9703
- const { overrideIdToNodePathMappings } = useContext17(Internals19.OverrideIdsToNodePathsGettersContext);
9704
- const propStatusesRef = useContext17(Internals19.VisualModePropStatusesRefContext);
9705
- const { setPropStatuses } = useContext17(Internals19.VisualModeSettersContext);
9758
+ const sequencesRef = useContext17(Internals20.SequenceManagerRefContext);
9759
+ const { overrideIdToNodePathMappings } = useContext17(Internals20.OverrideIdsToNodePathsGettersContext);
9760
+ const propStatusesRef = useContext17(Internals20.VisualModePropStatusesRefContext);
9761
+ const { setPropStatuses } = useContext17(Internals20.VisualModeSettersContext);
9706
9762
  const { setGuidesList } = useContext17(EditorShowGuidesContext);
9707
9763
  const { canSelect } = useTimelineSelection();
9708
9764
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
9709
9765
  const confirm = useConfirmationDialog();
9710
- const timelinePosition = Internals19.Timeline.useTimelinePosition();
9766
+ const timelinePosition = Internals20.Timeline.useTimelinePosition();
9711
9767
  const timelinePositionRef = useRef16(timelinePosition);
9712
9768
  timelinePositionRef.current = timelinePosition;
9713
9769
  useEffect19(() => {
@@ -9738,7 +9794,9 @@ var TimelineDeleteKeybindings = () => {
9738
9794
  overrideIdsToNodePaths: overrideIdToNodePathMappings,
9739
9795
  setPropStatuses,
9740
9796
  clientId,
9741
- confirm
9797
+ confirm,
9798
+ propStatuses,
9799
+ timelinePosition: timelinePositionRef.current
9742
9800
  });
9743
9801
  if (deletePromise !== null) {
9744
9802
  deletePromise.then((deleted) => {
@@ -10234,10 +10292,10 @@ var getTimelineTreeNodeCanEditEasing = ({
10234
10292
  return false;
10235
10293
  }
10236
10294
  if (node.field.kind === "sequence-field") {
10237
- const sequencePropStatus = Internals20.getPropStatusesCtx(propStatuses, nodePathInfo.sequenceSubscriptionKey)?.[node.field.key];
10295
+ const sequencePropStatus = Internals21.getPropStatusesCtx(propStatuses, nodePathInfo.sequenceSubscriptionKey)?.[node.field.key];
10238
10296
  return sequencePropStatus?.status === "keyframed" && canEditEasingForInterpolationFunction3(sequencePropStatus.interpolationFunction);
10239
10297
  }
10240
- const effectStatus = Internals20.getEffectPropStatusesCtx({
10298
+ const effectStatus = Internals21.getEffectPropStatusesCtx({
10241
10299
  propStatuses,
10242
10300
  nodePath: nodePathInfo.sequenceSubscriptionKey,
10243
10301
  effectIndex: node.field.effectIndex
@@ -10391,9 +10449,9 @@ var TimelineEscapeKeybindings = () => {
10391
10449
  };
10392
10450
  var TimelineSelectableItemsProvider = ({ children, timeline }) => {
10393
10451
  const { getIsExpanded } = useContext18(ExpandedTracksGetterContext);
10394
- const { propStatuses } = useContext18(Internals20.VisualModePropStatusesContext);
10395
- const { getDragOverrides, getEffectDragOverrides } = useContext18(Internals20.VisualModeDragOverridesContext);
10396
- const timelinePosition = Internals20.Timeline.useTimelinePosition();
10452
+ const { propStatuses } = useContext18(Internals21.VisualModePropStatusesContext);
10453
+ const { getDragOverrides, getEffectDragOverrides } = useContext18(Internals21.VisualModeDragOverridesContext);
10454
+ const timelinePosition = Internals21.Timeline.useTimelinePosition();
10397
10455
  const { selectedItems } = useTimelineSelection();
10398
10456
  const selectableItems = useMemo28(() => getSelectableTimelineItems({
10399
10457
  getDragOverrides,
@@ -10419,7 +10477,7 @@ var TimelineSelectableItemsProvider = ({ children, timeline }) => {
10419
10477
  };
10420
10478
  var TimelineSelectionProvider = ({ children }) => {
10421
10479
  const { previewServerState } = useContext18(StudioServerConnectionCtx);
10422
- const { canvasContent } = useContext18(Internals20.CompositionManager);
10480
+ const { canvasContent } = useContext18(Internals21.CompositionManager);
10423
10481
  const timelineSelectionScope = canvasContent?.type === "composition" ? canvasContent.compositionId : null;
10424
10482
  const { expandParentTracks } = useContext18(ExpandedTracksSetterContext);
10425
10483
  const canSelect = studioInteractivityEnabled && previewServerState.type === "connected" && !window.remotion_isReadOnlyStudio;
@@ -10921,11 +10979,11 @@ var GlobalKeybindings = () => {
10921
10979
  const { setCheckerboard } = useContext19(CheckerboardContext);
10922
10980
  const { setEditorSnapping } = useContext19(EditorSnappingContext);
10923
10981
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
10924
- const { sequences } = useContext19(Internals21.SequenceManager);
10925
- const videoConfig = Internals21.useUnsafeVideoConfig();
10926
- const { overrideIdToNodePathMappings } = useContext19(Internals21.OverrideIdsToNodePathsGettersContext);
10982
+ const { sequences } = useContext19(Internals22.SequenceManager);
10983
+ const videoConfig = Internals22.useUnsafeVideoConfig();
10984
+ const { overrideIdToNodePathMappings } = useContext19(Internals22.OverrideIdsToNodePathsGettersContext);
10927
10985
  const { navigateToNextComposition, navigateToPreviousComposition } = useCompositionNavigation();
10928
- const video = Internals21.useVideo();
10986
+ const video = Internals22.useVideo();
10929
10987
  const timeline = useMemo29(() => {
10930
10988
  if (videoConfig === null) {
10931
10989
  return [];
@@ -11117,7 +11175,7 @@ import { useCallback as useCallback161, useMemo as useMemo163, useState as useSt
11117
11175
 
11118
11176
  // src/helpers/use-menu-structure.tsx
11119
11177
  import { useContext as useContext22, useEffect as useEffect24, useMemo as useMemo35 } from "react";
11120
- import { Internals as Internals25 } from "remotion";
11178
+ import { Internals as Internals26 } from "remotion";
11121
11179
  import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
11122
11180
 
11123
11181
  // src/api/restart-studio.ts
@@ -11134,7 +11192,7 @@ var restartStudio = () => {
11134
11192
 
11135
11193
  // src/components/SizeSelector.tsx
11136
11194
  import { useContext as useContext20, useMemo as useMemo32 } from "react";
11137
- import { Internals as Internals22 } from "remotion";
11195
+ import { Internals as Internals23 } from "remotion";
11138
11196
 
11139
11197
  // src/helpers/get-preview-file-type.ts
11140
11198
  var getPreviewFileType = (fileName) => {
@@ -11471,8 +11529,8 @@ var getUniqueSizes = (size) => {
11471
11529
  };
11472
11530
  var zoomableFileTypes = ["video", "image"];
11473
11531
  var SizeSelector = () => {
11474
- const { size, setSize } = useContext20(Internals22.PreviewSizeContext);
11475
- const { canvasContent } = useContext20(Internals22.CompositionManager);
11532
+ const { size, setSize } = useContext20(Internals23.PreviewSizeContext);
11533
+ const { canvasContent } = useContext20(Internals23.CompositionManager);
11476
11534
  const style2 = useMemo32(() => {
11477
11535
  return {
11478
11536
  padding: CONTROL_BUTTON_PADDING
@@ -11535,7 +11593,7 @@ import {
11535
11593
  useEffect as useEffect23,
11536
11594
  useImperativeHandle as useImperativeHandle5
11537
11595
  } from "react";
11538
- import { Internals as Internals24 } from "remotion";
11596
+ import { Internals as Internals25 } from "remotion";
11539
11597
  import { NoReactInternals as NoReactInternals4 } from "remotion/no-react";
11540
11598
 
11541
11599
  // src/icons/timelineInOutPointer.tsx
@@ -11571,7 +11629,7 @@ var TimelineOutPointer = (props) => {
11571
11629
 
11572
11630
  // src/state/in-out.ts
11573
11631
  import { createContext as createContext16, useContext as useContext21, useMemo as useMemo33 } from "react";
11574
- import { Internals as Internals23 } from "remotion";
11632
+ import { Internals as Internals24 } from "remotion";
11575
11633
  var TimelineInOutContext = createContext16({});
11576
11634
  var SetTimelineInOutContext = createContext16({
11577
11635
  setInAndOutFrames: () => {
@@ -11579,7 +11637,7 @@ var SetTimelineInOutContext = createContext16({
11579
11637
  }
11580
11638
  });
11581
11639
  var useTimelineInOutFramePosition = () => {
11582
- const videoConfig = Internals23.useUnsafeVideoConfig();
11640
+ const videoConfig = Internals24.useUnsafeVideoConfig();
11583
11641
  const state = useContext21(TimelineInOutContext);
11584
11642
  const id = videoConfig?.id;
11585
11643
  const durationInFrames = videoConfig?.durationInFrames;
@@ -11617,7 +11675,7 @@ var defaultInOutValue = { inFrame: null, outFrame: null };
11617
11675
  var TimelineInOutPointToggle = () => {
11618
11676
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
11619
11677
  const { setInAndOutFrames } = useTimelineSetInOutFramePosition();
11620
- const videoConfig = Internals24.useUnsafeVideoConfig();
11678
+ const videoConfig = Internals25.useUnsafeVideoConfig();
11621
11679
  const keybindings = useKeybinding();
11622
11680
  const { getCurrentFrame: getCurrentFrame2, isFirstFrame, isLastFrame } = PlayerInternals6.usePlayer();
11623
11681
  const onInOutClear = useCallback29((composition) => {
@@ -12171,8 +12229,8 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
12171
12229
  const { editorShowRulers, setEditorShowRulers } = useContext22(EditorShowRulersContext);
12172
12230
  const { editorShowGuides, setEditorShowGuides } = useContext22(EditorShowGuidesContext);
12173
12231
  const { editorSnapping, setEditorSnapping } = useContext22(EditorSnappingContext);
12174
- const { size, setSize } = useContext22(Internals25.PreviewSizeContext);
12175
- const { canvasContent, compositions } = useContext22(Internals25.CompositionManager);
12232
+ const { size, setSize } = useContext22(Internals26.PreviewSizeContext);
12233
+ const { canvasContent, compositions } = useContext22(Internals26.CompositionManager);
12176
12234
  const { type } = useContext22(StudioServerConnectionCtx).previewServerState;
12177
12235
  const {
12178
12236
  setSidebarCollapsedState,
@@ -12610,7 +12668,7 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
12610
12668
  leftItem: null,
12611
12669
  onClick: () => {
12612
12670
  closeMenu();
12613
- Internals25.timeValueRef.current?.goToFrame();
12671
+ Internals26.timeValueRef.current?.goToFrame();
12614
12672
  },
12615
12673
  subMenu: null,
12616
12674
  type: "item",
@@ -12635,7 +12693,7 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
12635
12693
  value: "fullscreen",
12636
12694
  quickSwitcherLabel: "Go Fullscreen"
12637
12695
  } : null
12638
- ].filter(Internals25.truthy)
12696
+ ].filter(Internals26.truthy)
12639
12697
  },
12640
12698
  {
12641
12699
  id: "composition",
@@ -12701,7 +12759,7 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
12701
12759
  subMenu: null,
12702
12760
  quickSwitcherLabel: `Install package...`
12703
12761
  }
12704
- ].filter(Internals25.truthy),
12762
+ ].filter(Internals26.truthy),
12705
12763
  quickSwitcherLabel: null
12706
12764
  },
12707
12765
  {
@@ -12845,7 +12903,7 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
12845
12903
  }
12846
12904
  ]
12847
12905
  }
12848
- ].filter(Internals25.truthy);
12906
+ ].filter(Internals26.truthy);
12849
12907
  if (mobileLayout) {
12850
12908
  struct = [
12851
12909
  {
@@ -13099,7 +13157,7 @@ import {
13099
13157
 
13100
13158
  // src/components/MenuCompositionName.tsx
13101
13159
  import { useCallback as useCallback31, useContext as useContext23, useMemo as useMemo37, useState as useState24 } from "react";
13102
- import { Internals as Internals26 } from "remotion";
13160
+ import { Internals as Internals27 } from "remotion";
13103
13161
  import { jsx as jsx55, jsxs as jsxs17, Fragment as Fragment9 } from "react/jsx-runtime";
13104
13162
  var baseStyle = {
13105
13163
  color: "inherit",
@@ -13127,7 +13185,7 @@ var slashStyle = {
13127
13185
  top: 1
13128
13186
  };
13129
13187
  var MenuCompositionName = () => {
13130
- const { canvasContent, compositions } = useContext23(Internals26.CompositionManager);
13188
+ const { canvasContent, compositions } = useContext23(Internals27.CompositionManager);
13131
13189
  const connectionStatus = useContext23(StudioServerConnectionCtx).previewServerState.type;
13132
13190
  const [opening, setOpening] = useState24(false);
13133
13191
  const [hovered, setHovered] = useState24(false);
@@ -13345,7 +13403,7 @@ import { useCallback as useCallback158, useContext as useContext105, useEffect a
13345
13403
 
13346
13404
  // src/components/TopPanel.tsx
13347
13405
  import React185, { useCallback as useCallback157, useContext as useContext104, useEffect as useEffect78, useMemo as useMemo161 } from "react";
13348
- import { Internals as Internals85 } from "remotion";
13406
+ import { Internals as Internals86 } from "remotion";
13349
13407
 
13350
13408
  // src/helpers/use-breakpoint.ts
13351
13409
  import { useEffect as useEffect26, useRef as useRef20, useState as useState26 } from "react";
@@ -13369,7 +13427,7 @@ function useBreakpoint(breakpoint2) {
13369
13427
 
13370
13428
  // src/components/CanvasIfSizeIsAvailable.tsx
13371
13429
  import { useContext as useContext40, useMemo as useMemo59 } from "react";
13372
- import { Internals as Internals44 } from "remotion";
13430
+ import { Internals as Internals45 } from "remotion";
13373
13431
 
13374
13432
  // src/helpers/ruler-canvas-size.ts
13375
13433
  var applyRulerInsetsToCanvasSize = ({
@@ -13390,7 +13448,7 @@ var applyRulerInsetsToCanvasSize = ({
13390
13448
 
13391
13449
  // src/components/CanvasOrLoading.tsx
13392
13450
  import { useContext as useContext39, useEffect as useEffect44 } from "react";
13393
- import { Internals as Internals43 } from "remotion";
13451
+ import { Internals as Internals44 } from "remotion";
13394
13452
 
13395
13453
  // src/error-overlay/remotion-overlay/ErrorLoader.tsx
13396
13454
  import { getLocationFromBuildError as getLocationFromBuildError3 } from "@remotion/studio-shared";
@@ -13431,7 +13489,7 @@ var setErrorsRef = createRef9();
13431
13489
 
13432
13490
  // src/error-overlay/react-overlay/utils/unmapper.ts
13433
13491
  import { sourceContentFor } from "@jridgewell/trace-mapping";
13434
- import { Internals as Internals27 } from "remotion";
13492
+ import { Internals as Internals28 } from "remotion";
13435
13493
 
13436
13494
  // src/error-overlay/react-overlay/utils/get-lines-around.ts
13437
13495
  function getLinesAround(line2, count, lines2) {
@@ -13455,7 +13513,7 @@ var getFileContents = async (fileName) => {
13455
13513
  var unmap = async (frames, contextLines) => {
13456
13514
  const transpiled = frames.filter((s) => s.type === "transpiled").map((s) => s.frame);
13457
13515
  const uniqueFileNames = [
13458
- ...new Set(transpiled.map((f) => f.fileName).filter(Internals27.truthy))
13516
+ ...new Set(transpiled.map((f) => f.fileName).filter(Internals28.truthy))
13459
13517
  ];
13460
13518
  const maps = await Promise.all(uniqueFileNames.map(async (fileName) => {
13461
13519
  const fileContents = await getFileContents(fileName);
@@ -13486,7 +13544,7 @@ var unmap = async (frames, contextLines) => {
13486
13544
  originalLineNumber: pos.line,
13487
13545
  originalScriptCode: scriptCode
13488
13546
  };
13489
- }).filter(Internals27.truthy);
13547
+ }).filter(Internals28.truthy);
13490
13548
  };
13491
13549
 
13492
13550
  // src/error-overlay/react-overlay/utils/get-stack-frames.ts
@@ -13613,9 +13671,9 @@ var CopyStackTrace = ({ errorText }) => {
13613
13671
  };
13614
13672
 
13615
13673
  // src/error-overlay/react-overlay/index.ts
13616
- import { Internals as Internals28 } from "remotion";
13674
+ import { Internals as Internals29 } from "remotion";
13617
13675
  var didUnmountReactApp = () => {
13618
- return !Internals28.getPreviewDomElement()?.hasChildNodes();
13676
+ return !Internals29.getPreviewDomElement()?.hasChildNodes();
13619
13677
  };
13620
13678
 
13621
13679
  // src/error-overlay/remotion-overlay/DismissButton.tsx
@@ -14858,7 +14916,7 @@ import {
14858
14916
  useRef as useRef33,
14859
14917
  useState as useState42
14860
14918
  } from "react";
14861
- import { Internals as Internals41, watchStaticFile } from "remotion";
14919
+ import { Internals as Internals42, watchStaticFile } from "remotion";
14862
14920
 
14863
14921
  // src/helpers/get-asset-metadata.ts
14864
14922
  import { getVideoMetadata } from "@remotion/media-utils";
@@ -14942,7 +15000,7 @@ var getAssetMetadata = async (canvasContent, addTime) => {
14942
15000
  };
14943
15001
 
14944
15002
  // src/helpers/get-effective-translation.ts
14945
- import { Internals as Internals29 } from "remotion";
15003
+ import { Internals as Internals30 } from "remotion";
14946
15004
 
14947
15005
  // src/helpers/smooth-zoom.ts
14948
15006
  var BASE = Math.E / 4;
@@ -15032,7 +15090,7 @@ var applyZoomAroundFocalPoint = ({
15032
15090
  clientX,
15033
15091
  clientY
15034
15092
  }) => {
15035
- const scale = Internals29.calculateScale({
15093
+ const scale = Internals30.calculateScale({
15036
15094
  canvasSize,
15037
15095
  compositionHeight: contentDimensions.height,
15038
15096
  compositionWidth: contentDimensions.width,
@@ -15177,18 +15235,18 @@ var getRemoteAssetUrlFromDataTransfer = (dataTransfer) => {
15177
15235
 
15178
15236
  // src/components/EditorGuides/index.tsx
15179
15237
  import { useContext as useContext27, useMemo as useMemo47 } from "react";
15180
- import { Internals as Internals31 } from "remotion";
15238
+ import { Internals as Internals32 } from "remotion";
15181
15239
 
15182
15240
  // src/helpers/use-studio-canvas-dimensions.ts
15183
15241
  import { PlayerInternals as PlayerInternals9 } from "@remotion/player";
15184
15242
  import { useContext as useContext25, useMemo as useMemo44 } from "react";
15185
- import { Internals as Internals30 } from "remotion";
15243
+ import { Internals as Internals31 } from "remotion";
15186
15244
  var useStudioCanvasDimensions = ({
15187
15245
  canvasSize,
15188
15246
  contentDimensions,
15189
15247
  assetMetadata
15190
15248
  }) => {
15191
- const { size: previewSize } = useContext25(Internals30.PreviewSizeContext);
15249
+ const { size: previewSize } = useContext25(Internals31.PreviewSizeContext);
15192
15250
  const { centerX, centerY, scale } = useMemo44(() => {
15193
15251
  if (contentDimensions === "none" || contentDimensions === null || assetMetadata && (assetMetadata.type === "not-found" || assetMetadata.type === "metadata-error") || !canvasSize) {
15194
15252
  return {
@@ -15588,7 +15646,7 @@ var EditorGuides = ({ canvasSize, contentDimensions, assetMetadata }) => {
15588
15646
  contentDimensions,
15589
15647
  assetMetadata
15590
15648
  });
15591
- const { canvasContent } = useContext27(Internals31.CompositionManager);
15649
+ const { canvasContent } = useContext27(Internals32.CompositionManager);
15592
15650
  if (canvasContent === null || canvasContent.type !== "composition") {
15593
15651
  throw new Error("Expected to be in a composition");
15594
15652
  }
@@ -15834,7 +15892,7 @@ import {
15834
15892
  useMemo as useMemo48,
15835
15893
  useRef as useRef24
15836
15894
  } from "react";
15837
- import { Internals as Internals32 } from "remotion";
15895
+ import { Internals as Internals33 } from "remotion";
15838
15896
  import { jsx as jsx79 } from "react/jsx-runtime";
15839
15897
  var makeGuideId = () => {
15840
15898
  return Math.random().toString(36).substring(7);
@@ -15860,7 +15918,7 @@ var Ruler = ({
15860
15918
  setEditorShowGuides
15861
15919
  } = useContext28(EditorShowGuidesContext);
15862
15920
  const { selectedItems } = useTimelineSelection();
15863
- const unsafeVideoConfig = Internals32.useUnsafeVideoConfig();
15921
+ const unsafeVideoConfig = Internals33.useUnsafeVideoConfig();
15864
15922
  if (!unsafeVideoConfig) {
15865
15923
  throw new Error("Video config not set");
15866
15924
  }
@@ -16146,9 +16204,9 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
16146
16204
 
16147
16205
  // src/components/EditorRuler/use-is-ruler-visible.ts
16148
16206
  import { useContext as useContext30 } from "react";
16149
- import { Internals as Internals33 } from "remotion";
16207
+ import { Internals as Internals34 } from "remotion";
16150
16208
  var useIsRulerVisible = () => {
16151
- const { canvasContent } = useContext30(Internals33.CompositionManager);
16209
+ const { canvasContent } = useContext30(Internals34.CompositionManager);
16152
16210
  const { editorShowRulers } = useContext30(EditorShowRulersContext);
16153
16211
  return editorShowRulers && canvasContent && canvasContent.type === "composition";
16154
16212
  };
@@ -16296,7 +16354,7 @@ import {
16296
16354
  getRequiredPackageForInsertableElement,
16297
16355
  isUrl
16298
16356
  } from "@remotion/studio-shared";
16299
- import { Internals as Internals34, staticFile as staticFile2 } from "remotion";
16357
+ import { Internals as Internals35, staticFile as staticFile2 } from "remotion";
16300
16358
  import { NoReactInternals as NoReactInternals7 } from "remotion/no-react";
16301
16359
 
16302
16360
  // src/api/write-static-file.ts
@@ -16329,6 +16387,16 @@ var getAssetElement = ({
16329
16387
  fileType,
16330
16388
  src
16331
16389
  }) => {
16390
+ if (fileType.type === "webp" && fileType.animated) {
16391
+ return {
16392
+ type: "asset",
16393
+ assetType: "animated-image",
16394
+ src,
16395
+ srcType: "static",
16396
+ dimensions: fileType.dimensions,
16397
+ position: null
16398
+ };
16399
+ }
16332
16400
  if (fileType.type === "png" || fileType.type === "jpeg" || fileType.type === "webp" || fileType.type === "bmp") {
16333
16401
  return {
16334
16402
  type: "asset",
@@ -16389,7 +16457,7 @@ var getAssetElementFromPath = (assetPath) => {
16389
16457
  if (!extension || extension === assetPath.toLowerCase()) {
16390
16458
  return null;
16391
16459
  }
16392
- if (["png", "jpg", "jpeg", "webp", "bmp"].includes(extension)) {
16460
+ if (["png", "jpg", "jpeg", "webp", "bmp", "svg"].includes(extension)) {
16393
16461
  return {
16394
16462
  type: "asset",
16395
16463
  assetType: "image",
@@ -16441,6 +16509,19 @@ var getAssetElementFromPath = (assetPath) => {
16441
16509
  }
16442
16510
  return null;
16443
16511
  };
16512
+ var getAssetElementForDroppedFile = ({
16513
+ fileType,
16514
+ src
16515
+ }) => {
16516
+ const detectedElement = getAssetElement({ fileType, src });
16517
+ if (detectedElement !== null) {
16518
+ return detectedElement;
16519
+ }
16520
+ if (fileType.type !== "unknown" || !src.toLowerCase().endsWith(".svg")) {
16521
+ return null;
16522
+ }
16523
+ return getAssetElementFromPath(src);
16524
+ };
16444
16525
  var getAssetLabel = (element) => {
16445
16526
  if (element.type !== "asset") {
16446
16527
  throw new Error("Expected asset element");
@@ -16505,6 +16586,16 @@ var getCompositionPositionForDrop = ({
16505
16586
  dropPosition
16506
16587
  });
16507
16588
  };
16589
+ var getAssetPositionForDrop = ({
16590
+ assetDimensions,
16591
+ destinationDimensions,
16592
+ dropPosition
16593
+ }) => {
16594
+ if (assetDimensions !== null && destinationDimensions !== null && assetDimensions.width === destinationDimensions.width && assetDimensions.height === destinationDimensions.height) {
16595
+ return null;
16596
+ }
16597
+ return getCenteredPosition({ dimensions: assetDimensions, dropPosition });
16598
+ };
16508
16599
  var getComponentPropNumber = (props, name) => {
16509
16600
  const prop = props.find((p) => p.name === name);
16510
16601
  return typeof prop?.value === "number" ? prop.value : null;
@@ -16553,6 +16644,10 @@ var getFileDimensions = async ({
16553
16644
  file,
16554
16645
  fileType
16555
16646
  }) => {
16647
+ if (fileType.type === "unknown" && file.name.toLowerCase().endsWith(".svg")) {
16648
+ const objectUrl = URL.createObjectURL(file);
16649
+ return getImageDimensions({ revokeObjectUrl: true, src: objectUrl });
16650
+ }
16556
16651
  if (fileType.type === "wav" || fileType.type === "mp3" || fileType.type === "aac" || fileType.type === "flac") {
16557
16652
  return null;
16558
16653
  }
@@ -16576,7 +16671,7 @@ var getFileDimensions = async ({
16576
16671
  var getStaticAssetDimensions = (assetPath) => {
16577
16672
  const extension = assetPath.split(".").pop()?.toLowerCase();
16578
16673
  const src = staticFile2(assetPath);
16579
- if (extension && ["png", "jpg", "jpeg", "webp", "bmp", "gif", "apng"].includes(extension)) {
16674
+ if (extension && ["png", "jpg", "jpeg", "webp", "bmp", "gif", "apng", "svg"].includes(extension)) {
16580
16675
  return getImageDimensions({ revokeObjectUrl: false, src });
16581
16676
  }
16582
16677
  if (extension && ["mp4", "m4v", "mov", "avi", "webm", "ts", "m2ts"].includes(extension)) {
@@ -16603,7 +16698,7 @@ var getStaticAssetDimensionsOrNull = async (assetPath) => {
16603
16698
  };
16604
16699
  var getStaticAssetFileType = async (assetPath) => {
16605
16700
  const extension = assetPath.split(".").pop()?.toLowerCase();
16606
- if (extension !== "png" && extension !== "apng") {
16701
+ if (extension !== "png" && extension !== "apng" && extension !== "webp") {
16607
16702
  return null;
16608
16703
  }
16609
16704
  try {
@@ -16691,6 +16786,7 @@ var downloadRemoteAsset = (url) => {
16691
16786
  var importAssets = async ({
16692
16787
  compositionFile,
16693
16788
  compositionId,
16789
+ destinationDimensions,
16694
16790
  dropPosition,
16695
16791
  files
16696
16792
  }) => {
@@ -16720,7 +16816,7 @@ var importAssets = async ({
16720
16816
  for (const file of files) {
16721
16817
  const contents = await file.arrayBuffer();
16722
16818
  const fileType = detectFileType(new Uint8Array(contents));
16723
- const element = getAssetElement({
16819
+ const element = getAssetElementForDroppedFile({
16724
16820
  fileType,
16725
16821
  src: file.name
16726
16822
  });
@@ -16737,14 +16833,16 @@ var importAssets = async ({
16737
16833
  addedStaticFiles.push(file.name);
16738
16834
  }
16739
16835
  const dimensions = await getFileDimensionsOrNull({ file, fileType });
16836
+ const resolvedDimensions = element.dimensions ?? dimensions;
16740
16837
  const inserted = await insertAssetElement({
16741
16838
  compositionFile,
16742
16839
  compositionId,
16743
16840
  element: {
16744
16841
  ...element,
16745
- dimensions: element.dimensions ?? dimensions,
16746
- position: getCenteredPosition({
16747
- dimensions,
16842
+ dimensions: resolvedDimensions,
16843
+ position: getAssetPositionForDrop({
16844
+ assetDimensions: resolvedDimensions,
16845
+ destinationDimensions,
16748
16846
  dropPosition
16749
16847
  })
16750
16848
  }
@@ -16765,6 +16863,7 @@ var importAssets = async ({
16765
16863
  var importRemoteAsset = async ({
16766
16864
  compositionFile,
16767
16865
  compositionId,
16866
+ destinationDimensions,
16768
16867
  dropPosition,
16769
16868
  url
16770
16869
  }) => {
@@ -16782,8 +16881,9 @@ var importRemoteAsset = async ({
16782
16881
  compositionId,
16783
16882
  element: {
16784
16883
  ...element,
16785
- position: getCenteredPosition({
16786
- dimensions: element.dimensions,
16884
+ position: getAssetPositionForDrop({
16885
+ assetDimensions: element.dimensions,
16886
+ destinationDimensions,
16787
16887
  dropPosition
16788
16888
  })
16789
16889
  }
@@ -16831,6 +16931,7 @@ var insertExistingAssets = async ({
16831
16931
  assetPaths,
16832
16932
  compositionFile,
16833
16933
  compositionId,
16934
+ destinationDimensions,
16834
16935
  dropPosition
16835
16936
  }) => {
16836
16937
  if (assetPaths.length === 0) {
@@ -16852,8 +16953,9 @@ var insertExistingAssets = async ({
16852
16953
  element: {
16853
16954
  ...element,
16854
16955
  dimensions,
16855
- position: getCenteredPosition({
16856
- dimensions,
16956
+ position: getAssetPositionForDrop({
16957
+ assetDimensions: dimensions,
16958
+ destinationDimensions,
16857
16959
  dropPosition
16858
16960
  })
16859
16961
  }
@@ -16922,7 +17024,7 @@ var insertComposition = async ({
16922
17024
  return;
16923
17025
  }
16924
17026
  try {
16925
- const resolver = Internals34.resolveCompositionsRef.current;
17027
+ const resolver = Internals35.resolveCompositionsRef.current;
16926
17028
  if (!resolver) {
16927
17029
  throw new Error("No composition resolver available");
16928
17030
  }
@@ -16993,7 +17095,7 @@ import {
16993
17095
  useMemo as useMemo57,
16994
17096
  useRef as useRef32
16995
17097
  } from "react";
16996
- import { Internals as Internals40 } from "remotion";
17098
+ import { Internals as Internals41 } from "remotion";
16997
17099
 
16998
17100
  // src/helpers/checkerboard-background.ts
16999
17101
  var getCheckerboardBackgroundSize = (size2) => `${size2}px ${size2}px`;
@@ -17428,7 +17530,7 @@ import React68, {
17428
17530
  useRef as useRef31,
17429
17531
  useState as useState41
17430
17532
  } from "react";
17431
- import { Internals as Internals39 } from "remotion";
17533
+ import { Internals as Internals40 } from "remotion";
17432
17534
  import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
17433
17535
 
17434
17536
  // src/state/editor-outlines.ts
@@ -17449,7 +17551,7 @@ var EditorShowOutlinesContext = createContext19({
17449
17551
  });
17450
17552
 
17451
17553
  // src/components/selected-outline-drag.ts
17452
- import { Internals as Internals36 } from "remotion";
17554
+ import { Internals as Internals37 } from "remotion";
17453
17555
  import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
17454
17556
 
17455
17557
  // src/components/selected-outline-geometry.ts
@@ -19074,7 +19176,7 @@ var transformOriginFieldKey = "style.transformOrigin";
19074
19176
  var selectedOutlineDragThresholdPx = 4;
19075
19177
 
19076
19178
  // src/components/selected-outline-uv.ts
19077
- import { Internals as Internals35 } from "remotion";
19179
+ import { Internals as Internals36 } from "remotion";
19078
19180
 
19079
19181
  // src/components/Timeline/timeline-field-utils.ts
19080
19182
  var getDecimalPlaces = (num) => {
@@ -19593,7 +19695,7 @@ var getSelectedUvHandles = ({
19593
19695
  if (!effect) {
19594
19696
  continue;
19595
19697
  }
19596
- const effectStatus = Internals35.getEffectPropStatusesCtx({
19698
+ const effectStatus = Internals36.getEffectPropStatusesCtx({
19597
19699
  propStatuses,
19598
19700
  nodePath,
19599
19701
  effectIndex
@@ -19606,12 +19708,12 @@ var getSelectedUvHandles = ({
19606
19708
  continue;
19607
19709
  }
19608
19710
  const dragOverrides = getEffectDragOverrides(nodePath, effectIndex);
19609
- const activeSchema = Internals35.flattenActiveSchema(effect.schema, (key3) => {
19711
+ const activeSchema = Internals36.flattenActiveSchema(effect.schema, (key3) => {
19610
19712
  const propStatus = effectStatus.props[key3];
19611
19713
  if (propStatus?.status !== "static" && propStatus?.status !== "keyframed") {
19612
19714
  return;
19613
19715
  }
19614
- return Internals35.getEffectiveVisualModeValue({
19716
+ return Internals36.getEffectiveVisualModeValue({
19615
19717
  propStatus,
19616
19718
  dragOverrideValue: dragOverrides[key3],
19617
19719
  defaultValue: undefined,
@@ -19628,7 +19730,7 @@ var getSelectedUvHandles = ({
19628
19730
  if (propStatus?.status !== "static" && propStatus?.status !== "keyframed") {
19629
19731
  continue;
19630
19732
  }
19631
- effectValues[fieldKey] = Internals35.getEffectiveVisualModeValue({
19733
+ effectValues[fieldKey] = Internals36.getEffectiveVisualModeValue({
19632
19734
  propStatus,
19633
19735
  dragOverrideValue: dragOverrides[fieldKey],
19634
19736
  defaultValue: fieldSchema.default,
@@ -21198,14 +21300,14 @@ var getSelectedOutlineActiveSchema = ({
21198
21300
  propStatus,
21199
21301
  frame: frame2
21200
21302
  }) => {
21201
- const { merged: valuesDotNotation } = Internals36.computeEffectiveSchemaValuesDotNotation({
21303
+ const { merged: valuesDotNotation } = Internals37.computeEffectiveSchemaValuesDotNotation({
21202
21304
  schema,
21203
21305
  currentValue: currentRuntimeValueDotNotation,
21204
21306
  overrideValues: dragOverrides,
21205
21307
  propStatus,
21206
21308
  frame: frame2
21207
21309
  });
21208
- return Internals36.flattenActiveSchema(schema, (key3) => valuesDotNotation[key3]);
21310
+ return Internals37.flattenActiveSchema(schema, (key3) => valuesDotNotation[key3]);
21209
21311
  };
21210
21312
  var getSelectedOutlineDragStates = ({
21211
21313
  dragTargets,
@@ -21215,7 +21317,7 @@ var getSelectedOutlineDragStates = ({
21215
21317
  return dragTargets.map((target) => {
21216
21318
  const dragOverrideValue = (getDragOverrides(target.nodePath) ?? {})[translateFieldKey];
21217
21319
  const sourceFrame = timelinePosition - target.keyframeDisplayOffset;
21218
- const effectiveValue = Internals36.getEffectiveVisualModeValue({
21320
+ const effectiveValue = Internals37.getEffectiveVisualModeValue({
21219
21321
  propStatus: target.propStatus,
21220
21322
  dragOverrideValue,
21221
21323
  defaultValue: target.fieldDefault,
@@ -21225,7 +21327,7 @@ var getSelectedOutlineDragStates = ({
21225
21327
  const [startX, startY] = parseTranslate(String(effectiveValue ?? "0px 0px"));
21226
21328
  return {
21227
21329
  defaultValue: target.fieldDefault !== undefined ? JSON.stringify(target.fieldDefault) : null,
21228
- key: Internals36.makeSequencePropsSubscriptionKey(target.nodePath),
21330
+ key: Internals37.makeSequencePropsSubscriptionKey(target.nodePath),
21229
21331
  sourceFrame,
21230
21332
  startX,
21231
21333
  startY,
@@ -21375,7 +21477,7 @@ var getSelectedOutlineScaleDragStates = ({
21375
21477
  return dragTargets.map((target) => {
21376
21478
  const dragOverrideValue = (getDragOverrides(target.nodePath) ?? {})[scaleFieldKey];
21377
21479
  const sourceFrame = timelinePosition - target.keyframeDisplayOffset;
21378
- const effectiveValue = Internals36.getEffectiveVisualModeValue({
21480
+ const effectiveValue = Internals37.getEffectiveVisualModeValue({
21379
21481
  propStatus: target.propStatus,
21380
21482
  dragOverrideValue,
21381
21483
  defaultValue: target.fieldDefault,
@@ -21385,7 +21487,7 @@ var getSelectedOutlineScaleDragStates = ({
21385
21487
  const [startX, startY, startZ] = NoReactInternals9.parseScaleValue(effectiveValue);
21386
21488
  return {
21387
21489
  defaultValue: target.fieldDefault !== undefined ? JSON.stringify(target.fieldDefault) : null,
21388
- key: Internals36.makeSequencePropsSubscriptionKey(target.nodePath),
21490
+ key: Internals37.makeSequencePropsSubscriptionKey(target.nodePath),
21389
21491
  sourceFrame,
21390
21492
  startX,
21391
21493
  startY,
@@ -21481,7 +21583,7 @@ var getSelectedOutlineRotationDragStates = ({
21481
21583
  return dragTargets.map((target) => {
21482
21584
  const dragOverrideValue = (getDragOverrides(target.nodePath) ?? {})[rotateFieldKey];
21483
21585
  const sourceFrame = timelinePosition - target.keyframeDisplayOffset;
21484
- const effectiveValue = Internals36.getEffectiveVisualModeValue({
21586
+ const effectiveValue = Internals37.getEffectiveVisualModeValue({
21485
21587
  propStatus: target.propStatus,
21486
21588
  dragOverrideValue,
21487
21589
  defaultValue: target.fieldDefault,
@@ -21490,7 +21592,7 @@ var getSelectedOutlineRotationDragStates = ({
21490
21592
  });
21491
21593
  return {
21492
21594
  defaultValue: target.fieldDefault !== undefined ? JSON.stringify(target.fieldDefault) : null,
21493
- key: Internals36.makeSequencePropsSubscriptionKey(target.nodePath),
21595
+ key: Internals37.makeSequencePropsSubscriptionKey(target.nodePath),
21494
21596
  sourceFrame,
21495
21597
  startDegrees: parseCssRotationToDegrees(String(effectiveValue ?? "0deg")),
21496
21598
  target
@@ -21877,7 +21979,7 @@ var findSelectedOutlineSnap = ({
21877
21979
 
21878
21980
  // src/components/SelectedOutlineElement.tsx
21879
21981
  import React66, { useContext as useContext33, useMemo as useMemo54, useRef as useRef30, useState as useState40 } from "react";
21880
- import { Internals as Internals37 } from "remotion";
21982
+ import { Internals as Internals38 } from "remotion";
21881
21983
  import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
21882
21984
 
21883
21985
  // src/helpers/get-sequence-double-click-action.ts
@@ -21894,6 +21996,17 @@ var getSequenceDoubleClickAction = ({
21894
21996
  }
21895
21997
  return canOpenInEditor ? "open-in-editor" : null;
21896
21998
  };
21999
+ var getConnectedCompositionFrame = ({
22000
+ timelinePosition,
22001
+ sequence,
22002
+ sequenceFrameOffset
22003
+ }) => {
22004
+ const relativeFrame = timelinePosition - sequence.from;
22005
+ if (relativeFrame < 0 || relativeFrame >= sequence.duration) {
22006
+ return null;
22007
+ }
22008
+ return sequence.frozenFrame ?? relativeFrame + sequenceFrameOffset;
22009
+ };
21897
22010
 
21898
22011
  // src/components/Timeline/disable-sequence-interactivity.ts
21899
22012
  import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
@@ -22208,7 +22321,7 @@ var getSequenceContextMenuItems = ({
22208
22321
  import { jsx as jsx89, jsxs as jsxs38, Fragment as Fragment17 } from "react/jsx-runtime";
22209
22322
  var emptyContextMenuValues = [];
22210
22323
  var SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target }) => {
22211
- const { setDragOverrides, clearDragOverrides, setPropStatuses } = useContext33(Internals37.VisualModeSettersContext);
22324
+ const { setDragOverrides, clearDragOverrides, setPropStatuses } = useContext33(Internals38.VisualModeSettersContext);
22212
22325
  const { editorSnapping } = useContext33(EditorSnappingContext);
22213
22326
  const transformOriginDrag = target?.transformOriginDrag ?? null;
22214
22327
  const parsed = useMemo54(() => transformOriginDrag === null ? null : parseTransformOrigin(transformOriginDrag.originValue), [transformOriginDrag]);
@@ -22296,16 +22409,16 @@ var SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target
22296
22409
  });
22297
22410
  const translate = serializeTranslate(nextTranslateX, nextTranslateY);
22298
22411
  last = { uv: nextUv, origin, translate };
22299
- setDragOverrides(transformOriginDrag.nodePath, transformOriginFieldKey, transformOriginDrag.originPropStatus.status === "keyframed" ? Internals37.makeKeyframedDragOverride({
22412
+ setDragOverrides(transformOriginDrag.nodePath, transformOriginFieldKey, transformOriginDrag.originPropStatus.status === "keyframed" ? Internals38.makeKeyframedDragOverride({
22300
22413
  status: transformOriginDrag.originPropStatus,
22301
22414
  frame: transformOriginDrag.sourceFrame,
22302
22415
  value: origin
22303
- }) : Internals37.makeStaticDragOverride(origin));
22304
- setDragOverrides(transformOriginDrag.nodePath, translateFieldKey, transformOriginDrag.translatePropStatus.status === "keyframed" ? Internals37.makeKeyframedDragOverride({
22416
+ }) : Internals38.makeStaticDragOverride(origin));
22417
+ setDragOverrides(transformOriginDrag.nodePath, translateFieldKey, transformOriginDrag.translatePropStatus.status === "keyframed" ? Internals38.makeKeyframedDragOverride({
22305
22418
  status: transformOriginDrag.translatePropStatus,
22306
22419
  frame: transformOriginDrag.sourceFrame,
22307
22420
  value: translate
22308
- }) : Internals37.makeStaticDragOverride(translate));
22421
+ }) : Internals38.makeStaticDragOverride(translate));
22309
22422
  };
22310
22423
  updateFromPointerPosition();
22311
22424
  const onPointerMove = (moveEvent) => {
@@ -22472,10 +22585,10 @@ var SelectedOutlinePolygon = ({
22472
22585
  snapTargets,
22473
22586
  target
22474
22587
  }) => {
22475
- const { getDragOverrides } = useContext33(Internals37.VisualModeDragOverridesContext);
22476
- const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(Internals37.VisualModeSettersContext);
22588
+ const { getDragOverrides } = useContext33(Internals38.VisualModeDragOverridesContext);
22589
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(Internals38.VisualModeSettersContext);
22477
22590
  const { editorSnapping } = useContext33(EditorSnappingContext);
22478
- const timelinePosition = Internals37.Timeline.useTimelinePosition();
22591
+ const timelinePosition = Internals38.Timeline.useTimelinePosition();
22479
22592
  const timelinePositionRef = useRef30(timelinePosition);
22480
22593
  timelinePositionRef.current = timelinePosition;
22481
22594
  const polygonRef = useRef30(null);
@@ -22568,13 +22681,13 @@ var SelectedOutlinePolygon = ({
22568
22681
  throw new Error("Expected drag value to be available");
22569
22682
  }
22570
22683
  if (dragState.target.propStatus.status === "keyframed") {
22571
- setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals37.makeKeyframedDragOverride({
22684
+ setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals38.makeKeyframedDragOverride({
22572
22685
  status: dragState.target.propStatus,
22573
22686
  frame: dragState.sourceFrame,
22574
22687
  value
22575
22688
  }));
22576
22689
  } else {
22577
- setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals37.makeStaticDragOverride(value));
22690
+ setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals38.makeStaticDragOverride(value));
22578
22691
  }
22579
22692
  }
22580
22693
  };
@@ -22760,9 +22873,9 @@ var SelectedOutlineScaleEdgeLine = ({
22760
22873
  onSelect,
22761
22874
  target
22762
22875
  }) => {
22763
- const { getDragOverrides } = useContext33(Internals37.VisualModeDragOverridesContext);
22764
- const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(Internals37.VisualModeSettersContext);
22765
- const timelinePosition = Internals37.Timeline.useTimelinePosition();
22876
+ const { getDragOverrides } = useContext33(Internals38.VisualModeDragOverridesContext);
22877
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(Internals38.VisualModeSettersContext);
22878
+ const timelinePosition = Internals38.Timeline.useTimelinePosition();
22766
22879
  const timelinePositionRef = useRef30(timelinePosition);
22767
22880
  timelinePositionRef.current = timelinePosition;
22768
22881
  const scaleDrag = target?.scaleDrag ?? null;
@@ -22824,13 +22937,13 @@ var SelectedOutlineScaleEdgeLine = ({
22824
22937
  throw new Error("Expected scale drag value to be available");
22825
22938
  }
22826
22939
  if (dragState.target.propStatus.status === "keyframed") {
22827
- setDragOverrides(dragState.target.nodePath, scaleFieldKey, Internals37.makeKeyframedDragOverride({
22940
+ setDragOverrides(dragState.target.nodePath, scaleFieldKey, Internals38.makeKeyframedDragOverride({
22828
22941
  status: dragState.target.propStatus,
22829
22942
  frame: dragState.sourceFrame,
22830
22943
  value
22831
22944
  }));
22832
22945
  } else {
22833
- setDragOverrides(dragState.target.nodePath, scaleFieldKey, Internals37.makeStaticDragOverride(value));
22946
+ setDragOverrides(dragState.target.nodePath, scaleFieldKey, Internals38.makeStaticDragOverride(value));
22834
22947
  }
22835
22948
  }
22836
22949
  };
@@ -22952,10 +23065,10 @@ var SelectedOutlineRotationCornerHandle = ({
22952
23065
  onSelect,
22953
23066
  target
22954
23067
  }) => {
22955
- const { getDragOverrides } = useContext33(Internals37.VisualModeDragOverridesContext);
22956
- const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(Internals37.VisualModeSettersContext);
23068
+ const { getDragOverrides } = useContext33(Internals38.VisualModeDragOverridesContext);
23069
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(Internals38.VisualModeSettersContext);
22957
23070
  const { editorSnapping } = useContext33(EditorSnappingContext);
22958
- const timelinePosition = Internals37.Timeline.useTimelinePosition();
23071
+ const timelinePosition = Internals38.Timeline.useTimelinePosition();
22959
23072
  const timelinePositionRef = useRef30(timelinePosition);
22960
23073
  timelinePositionRef.current = timelinePosition;
22961
23074
  const rotationDrag = target?.rotationDrag ?? null;
@@ -23022,13 +23135,13 @@ var SelectedOutlineRotationCornerHandle = ({
23022
23135
  throw new Error("Expected rotation drag value to be available");
23023
23136
  }
23024
23137
  if (dragState.target.propStatus.status === "keyframed") {
23025
- setDragOverrides(dragState.target.nodePath, rotateFieldKey, Internals37.makeKeyframedDragOverride({
23138
+ setDragOverrides(dragState.target.nodePath, rotateFieldKey, Internals38.makeKeyframedDragOverride({
23026
23139
  status: dragState.target.propStatus,
23027
23140
  frame: dragState.sourceFrame,
23028
23141
  value
23029
23142
  }));
23030
23143
  } else {
23031
- setDragOverrides(dragState.target.nodePath, rotateFieldKey, Internals37.makeStaticDragOverride(value));
23144
+ setDragOverrides(dragState.target.nodePath, rotateFieldKey, Internals38.makeStaticDragOverride(value));
23032
23145
  }
23033
23146
  }
23034
23147
  };
@@ -23194,12 +23307,12 @@ var SelectedOutlineElement = ({
23194
23307
  target
23195
23308
  }) => {
23196
23309
  const { previewServerState } = useContext33(StudioServerConnectionCtx);
23197
- const { setPropStatuses } = useContext33(Internals37.VisualModeSettersContext);
23198
- const updateResolvedStackTrace = useContext33(Internals37.SequenceStackTracesUpdateContext);
23310
+ const { setPropStatuses } = useContext33(Internals38.VisualModeSettersContext);
23311
+ const updateResolvedStackTrace = useContext33(Internals38.SequenceStackTracesUpdateContext);
23199
23312
  const confirm = useConfirmationDialog();
23200
23313
  const selectAsset = useSelectAsset();
23201
23314
  const selectComposition = useSelectComposition();
23202
- const { compositions } = useContext33(Internals37.CompositionManager);
23315
+ const { compositions } = useContext33(Internals38.CompositionManager);
23203
23316
  const { setSelectedModal } = useContext33(ModalsContext);
23204
23317
  const resolveOriginalLocation = React66.useCallback(async (resolveTarget) => {
23205
23318
  const stack2 = resolveTarget.sequence.getStack();
@@ -23428,7 +23541,7 @@ var SelectedOutlineElement = ({
23428
23541
 
23429
23542
  // src/components/SelectedOutlineUvControls.tsx
23430
23543
  import React67, { useContext as useContext34, useMemo as useMemo55 } from "react";
23431
- import { Internals as Internals38 } from "remotion";
23544
+ import { Internals as Internals39 } from "remotion";
23432
23545
  import { jsx as jsx90, jsxs as jsxs39, Fragment as Fragment18 } from "react/jsx-runtime";
23433
23546
  var getSvgPointFromPointerEvent = ({
23434
23547
  event,
@@ -23589,7 +23702,7 @@ var getLocalEllipseWidthProgress = ({
23589
23702
  }) / (width / 2);
23590
23703
  };
23591
23704
  var SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) => {
23592
- const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals38.VisualModeSettersContext);
23705
+ const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals39.VisualModeSettersContext);
23593
23706
  const { startControl } = control;
23594
23707
  const field = startControl?.field;
23595
23708
  const onPointerDown = React67.useCallback((event) => {
@@ -23624,11 +23737,11 @@ var SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) => {
23624
23737
  width: control.width
23625
23738
  }), field.fieldSchema);
23626
23739
  lastValue = nextValue;
23627
- setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals38.makeKeyframedDragOverride({
23740
+ setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals39.makeKeyframedDragOverride({
23628
23741
  status: field.propStatus,
23629
23742
  frame: control.handle.sourceFrame,
23630
23743
  value: nextValue
23631
- }) : Internals38.makeStaticDragOverride(nextValue));
23744
+ }) : Internals39.makeStaticDragOverride(nextValue));
23632
23745
  };
23633
23746
  const onPointerMove = (moveEvent) => {
23634
23747
  moveEvent.preventDefault();
@@ -23698,7 +23811,7 @@ var SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) => {
23698
23811
  });
23699
23812
  };
23700
23813
  var SelectedUvEllipseResizeHandle = ({ axis, control, onDraggingChange, outline }) => {
23701
- const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals38.VisualModeSettersContext);
23814
+ const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals39.VisualModeSettersContext);
23702
23815
  const resizeControl = control.resize.find((item) => item.axis === axis);
23703
23816
  const field = resizeControl?.field;
23704
23817
  const onPointerDown = React67.useCallback((event) => {
@@ -23734,11 +23847,11 @@ var SelectedUvEllipseResizeHandle = ({ axis, control, onDraggingChange, outline
23734
23847
  });
23735
23848
  const nextValue = roundNumericUvEllipseValue(Math.max(0, axisValue * 2), field.fieldSchema);
23736
23849
  lastValue = nextValue;
23737
- setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals38.makeKeyframedDragOverride({
23850
+ setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals39.makeKeyframedDragOverride({
23738
23851
  status: field.propStatus,
23739
23852
  frame: control.handle.sourceFrame,
23740
23853
  value: nextValue
23741
- }) : Internals38.makeStaticDragOverride(nextValue));
23854
+ }) : Internals39.makeStaticDragOverride(nextValue));
23742
23855
  };
23743
23856
  const onPointerMove = (moveEvent) => {
23744
23857
  moveEvent.preventDefault();
@@ -23838,7 +23951,7 @@ var trimLineToCircleEdges = ({
23838
23951
  };
23839
23952
  };
23840
23953
  var SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
23841
- const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals38.VisualModeSettersContext);
23954
+ const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals39.VisualModeSettersContext);
23842
23955
  const { editorSnapping } = useContext34(EditorSnappingContext);
23843
23956
  const { rotationControl } = control;
23844
23957
  const field = rotationControl?.field;
@@ -23877,11 +23990,11 @@ var SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
23877
23990
  });
23878
23991
  lastValue = nextValue;
23879
23992
  forceSpecificCursor(getRotationCursor(startCursorDegrees + cursorDelta));
23880
- setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals38.makeKeyframedDragOverride({
23993
+ setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals39.makeKeyframedDragOverride({
23881
23994
  status: field.propStatus,
23882
23995
  frame: control.handle.sourceFrame,
23883
23996
  value: nextValue
23884
- }) : Internals38.makeStaticDragOverride(nextValue));
23997
+ }) : Internals39.makeStaticDragOverride(nextValue));
23885
23998
  };
23886
23999
  const onPointerMove = (moveEvent) => {
23887
24000
  moveEvent.preventDefault();
@@ -23998,7 +24111,7 @@ var SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
23998
24111
  });
23999
24112
  };
24000
24113
  var SelectedUvHandleCircle = ({ handle, nodePathInfo, onDraggingChange, onSelect, outline }) => {
24001
- const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals38.VisualModeSettersContext);
24114
+ const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals39.VisualModeSettersContext);
24002
24115
  const { editorSnapping } = useContext34(EditorSnappingContext);
24003
24116
  const position = useMemo55(() => getUvHandlePosition(outline.points, handle.value), [handle.value, outline.points]);
24004
24117
  const onPointerDown = React67.useCallback((event) => {
@@ -24039,11 +24152,11 @@ var SelectedUvHandleCircle = ({ handle, nodePathInfo, onDraggingChange, onSelect
24039
24152
  }) : rawUv;
24040
24153
  const nextValue = roundUvCoordinate(constrainUv(snappedUv, handle.fieldSchema), handle.fieldSchema);
24041
24154
  lastValue = nextValue;
24042
- setEffectDragOverrides(handle.nodePath, handle.effectIndex, handle.fieldKey, handle.propStatus.status === "keyframed" ? Internals38.makeKeyframedDragOverride({
24155
+ setEffectDragOverrides(handle.nodePath, handle.effectIndex, handle.fieldKey, handle.propStatus.status === "keyframed" ? Internals39.makeKeyframedDragOverride({
24043
24156
  status: handle.propStatus,
24044
24157
  frame: handle.sourceFrame,
24045
24158
  value: nextValue
24046
- }) : Internals38.makeStaticDragOverride(nextValue));
24159
+ }) : Internals39.makeStaticDragOverride(nextValue));
24047
24160
  };
24048
24161
  const updateDragFromPointerEvent = (pointerEvent) => {
24049
24162
  if (!dragging) {
@@ -24486,19 +24599,19 @@ var SelectedOutlineOverlay = ({
24486
24599
  translationY
24487
24600
  }) => {
24488
24601
  const { selectedItems, selectItem } = useTimelineSelection();
24489
- const { sequences } = useContext35(Internals39.SequenceManager);
24490
- const { canvasContent, compositions } = useContext35(Internals39.CompositionManager);
24491
- const { propStatuses } = useContext35(Internals39.VisualModePropStatusesContext);
24602
+ const { sequences } = useContext35(Internals40.SequenceManager);
24603
+ const { canvasContent, compositions } = useContext35(Internals40.CompositionManager);
24604
+ const { propStatuses } = useContext35(Internals40.VisualModePropStatusesContext);
24492
24605
  const { previewServerState } = useContext35(StudioServerConnectionCtx);
24493
- const { overrideIdToNodePathMappings } = useContext35(Internals39.OverrideIdsToNodePathsGettersContext);
24494
- const { getDragOverrides, getEffectDragOverrides } = useContext35(Internals39.VisualModeDragOverridesContext);
24495
- const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext35(Internals39.VisualModeSettersContext);
24606
+ const { overrideIdToNodePathMappings } = useContext35(Internals40.OverrideIdsToNodePathsGettersContext);
24607
+ const { getDragOverrides, getEffectDragOverrides } = useContext35(Internals40.VisualModeDragOverridesContext);
24608
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext35(Internals40.VisualModeSettersContext);
24496
24609
  const { getScaleLockState } = useContext35(ScaleLockContext);
24497
24610
  const { editorShowOutlines } = useContext35(EditorShowOutlinesContext);
24498
24611
  const { editorShowGuides, guidesList } = useContext35(EditorShowGuidesContext);
24499
24612
  const { frameBack, frameForward, getCurrentFrame: getCurrentFrame2, seek } = PlayerInternals10.usePlayer();
24500
24613
  const keybindings = useKeybinding();
24501
- const timelinePosition = Internals39.Timeline.useTimelinePosition();
24614
+ const timelinePosition = Internals40.Timeline.useTimelinePosition();
24502
24615
  const [outlines, setOutlines] = useState41([]);
24503
24616
  const [hoveredOutlineKey, setHoveredOutlineKey] = useState41(null);
24504
24617
  const [draggingOutline, setDraggingOutline] = useState41(false);
@@ -24543,7 +24656,7 @@ var SelectedOutlineOverlay = ({
24543
24656
  const containsSelection = sequenceKeysContainingSelection.has(key3);
24544
24657
  const nodePath = nodePathInfo.sequenceSubscriptionKey;
24545
24658
  const { controls } = sequence;
24546
- const nodePropStatuses = Internals39.getPropStatusesCtx(propStatuses, nodePath);
24659
+ const nodePropStatuses = Internals40.getPropStatusesCtx(propStatuses, nodePath);
24547
24660
  const sourceFrame = timelinePosition - keyframeDisplayOffset;
24548
24661
  const dragOverrides = getDragOverrides(nodePath) ?? {};
24549
24662
  const activeSchema = controls ? getSelectedOutlineActiveSchema({
@@ -24561,7 +24674,7 @@ var SelectedOutlineOverlay = ({
24561
24674
  const rotationPropStatus = nodePropStatuses?.[rotateFieldKey];
24562
24675
  const transformOriginFieldSchema = activeSchema?.[transformOriginFieldKey];
24563
24676
  const transformOriginPropStatus = nodePropStatuses?.[transformOriginFieldKey];
24564
- const transformOriginValueForRotation = transformOriginFieldSchema?.type === "transform-origin" && (transformOriginPropStatus?.status === "static" || transformOriginPropStatus?.status === "keyframed") ? String(Internals39.getEffectiveVisualModeValue({
24677
+ const transformOriginValueForRotation = transformOriginFieldSchema?.type === "transform-origin" && (transformOriginPropStatus?.status === "static" || transformOriginPropStatus?.status === "keyframed") ? String(Internals40.getEffectiveVisualModeValue({
24565
24678
  propStatus: transformOriginPropStatus,
24566
24679
  dragOverrideValue: dragOverrides[transformOriginFieldKey],
24567
24680
  defaultValue: transformOriginFieldSchema.default,
@@ -24612,7 +24725,7 @@ var SelectedOutlineOverlay = ({
24612
24725
  fieldKey: scaleFieldKey,
24613
24726
  defaultValue: (() => {
24614
24727
  const dragOverrideValue = dragOverrides[scaleFieldKey];
24615
- const effectiveValue = Internals39.getEffectiveVisualModeValue({
24728
+ const effectiveValue = Internals40.getEffectiveVisualModeValue({
24616
24729
  propStatus: scalePropStatus,
24617
24730
  dragOverrideValue,
24618
24731
  defaultValue: scaleFieldSchema.default,
@@ -24641,21 +24754,21 @@ var SelectedOutlineOverlay = ({
24641
24754
  nodePath,
24642
24755
  originDefault: transformOriginFieldSchema.default,
24643
24756
  originPropStatus: transformOriginPropStatus,
24644
- originValue: String(Internals39.getEffectiveVisualModeValue({
24757
+ originValue: String(Internals40.getEffectiveVisualModeValue({
24645
24758
  propStatus: transformOriginPropStatus,
24646
24759
  dragOverrideValue: dragOverrides[transformOriginFieldKey],
24647
24760
  defaultValue: transformOriginFieldSchema.default,
24648
24761
  frame: transformOriginSourceFrame,
24649
24762
  shouldResortToDefaultValueIfUndefined: true
24650
24763
  }) ?? transformOriginFieldSchema.default),
24651
- rotateValue: String(rotationPropStatus?.status === "static" || rotationPropStatus?.status === "keyframed" ? Internals39.getEffectiveVisualModeValue({
24764
+ rotateValue: String(rotationPropStatus?.status === "static" || rotationPropStatus?.status === "keyframed" ? Internals40.getEffectiveVisualModeValue({
24652
24765
  propStatus: rotationPropStatus,
24653
24766
  dragOverrideValue: dragOverrides[rotateFieldKey],
24654
24767
  defaultValue: rotationFieldSchema?.type === "rotation-css" ? rotationFieldSchema.default : "0deg",
24655
24768
  frame: transformOriginSourceFrame,
24656
24769
  shouldResortToDefaultValueIfUndefined: true
24657
24770
  }) ?? "0deg" : "0deg"),
24658
- scaleValue: scalePropStatus?.status === "static" || scalePropStatus?.status === "keyframed" ? String(Internals39.getEffectiveVisualModeValue({
24771
+ scaleValue: scalePropStatus?.status === "static" || scalePropStatus?.status === "keyframed" ? String(Internals40.getEffectiveVisualModeValue({
24659
24772
  propStatus: scalePropStatus,
24660
24773
  dragOverrideValue: dragOverrides[scaleFieldKey],
24661
24774
  defaultValue: scaleFieldSchema?.type === "scale" ? scaleFieldSchema.default : 1,
@@ -24666,7 +24779,7 @@ var SelectedOutlineOverlay = ({
24666
24779
  sourceFrame: transformOriginSourceFrame,
24667
24780
  translateDefault: fieldSchema.default,
24668
24781
  translatePropStatus: propStatus,
24669
- translateValue: String(Internals39.getEffectiveVisualModeValue({
24782
+ translateValue: String(Internals40.getEffectiveVisualModeValue({
24670
24783
  propStatus,
24671
24784
  dragOverrideValue: dragOverrides[translateFieldKey],
24672
24785
  defaultValue: fieldSchema.default,
@@ -24902,13 +25015,13 @@ var SelectedOutlineOverlay = ({
24902
25015
  throw new Error("Expected drag value to be available");
24903
25016
  }
24904
25017
  if (dragState.target.propStatus.status === "keyframed") {
24905
- setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals39.makeKeyframedDragOverride({
25018
+ setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals40.makeKeyframedDragOverride({
24906
25019
  status: dragState.target.propStatus,
24907
25020
  frame: dragState.sourceFrame,
24908
25021
  value
24909
25022
  }));
24910
25023
  } else {
24911
- setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals39.makeStaticDragOverride(value));
25024
+ setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals40.makeStaticDragOverride(value));
24912
25025
  }
24913
25026
  }
24914
25027
  }, [
@@ -25175,7 +25288,7 @@ var VideoPreview = ({
25175
25288
  });
25176
25289
  };
25177
25290
  var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
25178
- const { size: previewSize } = useContext37(Internals40.PreviewSizeContext);
25291
+ const { size: previewSize } = useContext37(Internals41.PreviewSizeContext);
25179
25292
  const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo57(() => {
25180
25293
  if (contentDimensions === "none") {
25181
25294
  return {
@@ -25286,9 +25399,9 @@ var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) =
25286
25399
  ]);
25287
25400
  useEffect41(() => {
25288
25401
  const { current } = portalContainer;
25289
- current?.appendChild(Internals40.portalNode());
25402
+ current?.appendChild(Internals41.portalNode());
25290
25403
  return () => {
25291
- current?.removeChild(Internals40.portalNode());
25404
+ current?.removeChild(Internals41.portalNode());
25292
25405
  };
25293
25406
  }, []);
25294
25407
  const onPointerDown = useCallback49((event) => {
@@ -25459,7 +25572,7 @@ var getDropPosition = ({
25459
25572
  if (contentDimensions === null || contentDimensions === "none") {
25460
25573
  return null;
25461
25574
  }
25462
- const scale = Internals41.calculateScale({
25575
+ const scale = Internals42.calculateScale({
25463
25576
  canvasSize: size2,
25464
25577
  compositionHeight: contentDimensions.height,
25465
25578
  compositionWidth: contentDimensions.width,
@@ -25489,7 +25602,7 @@ var isDragEventInsideCanvas = (event) => {
25489
25602
  return event.clientX >= rect.left && event.clientX <= rect.right && event.clientY >= rect.top && event.clientY <= rect.bottom;
25490
25603
  };
25491
25604
  var Canvas = ({ canvasContent, size: size2 }) => {
25492
- const { setSize, size: previewSize } = useContext38(Internals41.PreviewSizeContext);
25605
+ const { setSize, size: previewSize } = useContext38(Internals42.PreviewSizeContext);
25493
25606
  const { editorZoomGestures } = useContext38(EditorZoomGesturesContext);
25494
25607
  const previewSnapshotRef = useRef33({
25495
25608
  previewSize,
@@ -25501,10 +25614,10 @@ var Canvas = ({ canvasContent, size: size2 }) => {
25501
25614
  const touchPinchRef = useRef33(null);
25502
25615
  const keybindings = useKeybinding();
25503
25616
  const confirm = useConfirmationDialog();
25504
- const config = Internals41.useUnsafeVideoConfig();
25617
+ const config = Internals42.useUnsafeVideoConfig();
25505
25618
  const areRulersVisible = useIsRulerVisible();
25506
25619
  const { editorShowGuides } = useContext38(EditorShowGuidesContext);
25507
- const { compositions } = useContext38(Internals41.CompositionManager);
25620
+ const { compositions } = useContext38(Internals42.CompositionManager);
25508
25621
  const { previewServerState, subscribeToEvent } = useContext38(StudioServerConnectionCtx);
25509
25622
  const previewServerClientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
25510
25623
  const [isAddingAsset, setIsAddingAsset] = useState42(false);
@@ -25564,7 +25677,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
25564
25677
  }
25565
25678
  ev.preventDefault();
25566
25679
  setSize((prevSize) => {
25567
- const scale = Internals41.calculateScale({
25680
+ const scale = Internals42.calculateScale({
25568
25681
  canvasSize: size2,
25569
25682
  compositionHeight: contentDimensions.height,
25570
25683
  compositionWidth: contentDimensions.width,
@@ -25637,7 +25750,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
25637
25750
  }
25638
25751
  e.preventDefault();
25639
25752
  suppressWheelFromWebKitPinchRef.current = true;
25640
- const fitted = Internals41.calculateScale({
25753
+ const fitted = Internals42.calculateScale({
25641
25754
  canvasSize: canvasSz,
25642
25755
  compositionHeight: cdim.height,
25643
25756
  compositionWidth: cdim.width,
@@ -25657,7 +25770,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
25657
25770
  const dimensions = cdim;
25658
25771
  e.preventDefault();
25659
25772
  setSize((prevSize) => {
25660
- const scale = Internals41.calculateScale({
25773
+ const scale = Internals42.calculateScale({
25661
25774
  canvasSize: canvasSz,
25662
25775
  compositionHeight: dimensions.height,
25663
25776
  compositionWidth: dimensions.width,
@@ -25712,7 +25825,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
25712
25825
  if (initialDistance < 0.000001) {
25713
25826
  return;
25714
25827
  }
25715
- const fitted = Internals41.calculateScale({
25828
+ const fitted = Internals42.calculateScale({
25716
25829
  canvasSize: snap.canvasSize,
25717
25830
  compositionHeight: snap.contentDimensions.height,
25718
25831
  compositionWidth: snap.contentDimensions.width,
@@ -25736,7 +25849,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
25736
25849
  setSize((prevSize) => {
25737
25850
  const canvasSz = snap.canvasSize;
25738
25851
  const cdim = snap.contentDimensions;
25739
- const scale = Internals41.calculateScale({
25852
+ const scale = Internals42.calculateScale({
25740
25853
  canvasSize: canvasSz,
25741
25854
  compositionHeight: cdim.height,
25742
25855
  compositionWidth: cdim.width,
@@ -25789,7 +25902,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
25789
25902
  return;
25790
25903
  }
25791
25904
  setSize((prevSize) => {
25792
- const scale = Internals41.calculateScale({
25905
+ const scale = Internals42.calculateScale({
25793
25906
  canvasSize: size2,
25794
25907
  compositionHeight: contentDimensions.height,
25795
25908
  compositionWidth: contentDimensions.width,
@@ -25812,7 +25925,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
25812
25925
  return;
25813
25926
  }
25814
25927
  setSize((prevSize) => {
25815
- const scale = Internals41.calculateScale({
25928
+ const scale = Internals42.calculateScale({
25816
25929
  canvasSize: size2,
25817
25930
  compositionHeight: contentDimensions.height,
25818
25931
  compositionWidth: contentDimensions.width,
@@ -26076,6 +26189,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
26076
26189
  files,
26077
26190
  compositionFile,
26078
26191
  compositionId: currentCompositionId,
26192
+ destinationDimensions: contentDimensions === "none" ? null : contentDimensions,
26079
26193
  dropPosition
26080
26194
  });
26081
26195
  } else if (isAssetDragEvent(event)) {
@@ -26087,6 +26201,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
26087
26201
  assetPaths: [assetPath],
26088
26202
  compositionFile,
26089
26203
  compositionId: currentCompositionId,
26204
+ destinationDimensions: contentDimensions === "none" ? null : contentDimensions,
26090
26205
  dropPosition
26091
26206
  });
26092
26207
  } else if (isSfxDragEvent(event)) {
@@ -26140,6 +26255,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
26140
26255
  url,
26141
26256
  compositionFile,
26142
26257
  compositionId: currentCompositionId,
26258
+ destinationDimensions: contentDimensions === "none" ? null : contentDimensions,
26143
26259
  dropPosition
26144
26260
  });
26145
26261
  }
@@ -26204,17 +26320,17 @@ var Canvas = ({ canvasContent, size: size2 }) => {
26204
26320
 
26205
26321
  // src/components/FramePersistor.tsx
26206
26322
  import { useEffect as useEffect43 } from "react";
26207
- import { Internals as Internals42, useVideoConfig as useVideoConfig2 } from "remotion";
26323
+ import { Internals as Internals43, useVideoConfig as useVideoConfig2 } from "remotion";
26208
26324
  var FramePersistor = () => {
26209
- const [playing] = Internals42.Timeline.usePlayingState();
26325
+ const [playing] = Internals43.Timeline.usePlayingState();
26210
26326
  const config = useVideoConfig2();
26211
- const frame2 = Internals42.Timeline.useTimelinePosition();
26212
- const setFrame = Internals42.useTimelineSetFrame();
26327
+ const frame2 = Internals43.Timeline.useTimelinePosition();
26328
+ const setFrame = Internals43.useTimelineSetFrame();
26213
26329
  useEffect43(() => {
26214
26330
  if (!playing) {
26215
26331
  setFrame((f) => {
26216
26332
  const newObj = f[config.id] === frame2 ? f : { ...f, [config.id]: frame2 };
26217
- Internals42.persistCurrentFrame(newObj);
26333
+ Internals43.persistCurrentFrame(newObj);
26218
26334
  return newObj;
26219
26335
  });
26220
26336
  }
@@ -26306,9 +26422,9 @@ var container19 = {
26306
26422
  flexDirection: "column"
26307
26423
  };
26308
26424
  var CanvasOrLoading = ({ size: size2 }) => {
26309
- const resolved = Internals43.useResolvedVideoConfig(null);
26425
+ const resolved = Internals44.useResolvedVideoConfig(null);
26310
26426
  const { setZoom } = useContext39(TimelineZoomCtx);
26311
- const { canvasContent } = useContext39(Internals43.CompositionManager);
26427
+ const { canvasContent } = useContext39(Internals44.CompositionManager);
26312
26428
  const { error: renderError } = useContext39(RenderErrorContext);
26313
26429
  useEffect44(() => {
26314
26430
  if (resolved?.type !== "success" && resolved?.type !== "success-and-refreshing") {
@@ -26397,7 +26513,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
26397
26513
  canHaveDismissButton: false,
26398
26514
  keyboardShortcuts: true,
26399
26515
  error,
26400
- onRetry: () => Internals43.resolveCompositionsRef.current?.reloadCurrentlySelectedComposition(),
26516
+ onRetry: () => Internals44.resolveCompositionsRef.current?.reloadCurrentlySelectedComposition(),
26401
26517
  calculateMetadata: calculateMetadataContext
26402
26518
  }, error.stack)
26403
26519
  });
@@ -26407,7 +26523,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
26407
26523
  import { jsx as jsx99 } from "react/jsx-runtime";
26408
26524
  var CanvasIfSizeIsAvailable = () => {
26409
26525
  const rulersAreVisible = useIsRulerVisible();
26410
- const context = useContext40(Internals44.CurrentScaleContext);
26526
+ const context = useContext40(Internals45.CurrentScaleContext);
26411
26527
  const sizeWithRulersApplied = useMemo59(() => {
26412
26528
  const size2 = context && context.type === "canvas-size" ? context.canvasSize : null;
26413
26529
  if (!rulersAreVisible) {
@@ -26428,7 +26544,7 @@ var CanvasIfSizeIsAvailable = () => {
26428
26544
 
26429
26545
  // src/components/CurrentCompositionSideEffects.tsx
26430
26546
  import { useContext as useContext41, useEffect as useEffect45 } from "react";
26431
- import { Internals as Internals45 } from "remotion";
26547
+ import { Internals as Internals46 } from "remotion";
26432
26548
 
26433
26549
  // src/helpers/document-title.ts
26434
26550
  import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
@@ -26483,7 +26599,7 @@ var getProgressInBrackets = (selectedCompositionId, jobs) => {
26483
26599
  // src/components/CurrentCompositionSideEffects.tsx
26484
26600
  var TitleUpdater = () => {
26485
26601
  const renderQueue = useContext41(RenderQueueContext);
26486
- const { canvasContent } = useContext41(Internals45.CompositionManager);
26602
+ const { canvasContent } = useContext41(Internals46.CompositionManager);
26487
26603
  const { jobs } = renderQueue;
26488
26604
  useEffect45(() => {
26489
26605
  if (!canvasContent) {
@@ -26576,7 +26692,7 @@ import {
26576
26692
  useRef as useRef35,
26577
26693
  useState as useState43
26578
26694
  } from "react";
26579
- import { Internals as Internals46 } from "remotion";
26695
+ import { Internals as Internals47 } from "remotion";
26580
26696
  import { NoReactInternals as NoReactInternals16 } from "remotion/no-react";
26581
26697
 
26582
26698
  // src/api/delete-static-file.ts
@@ -26816,8 +26932,8 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
26816
26932
  const onPointerEnter = useCallback53(() => {
26817
26933
  setHovered(true);
26818
26934
  }, []);
26819
- const { setCanvasContent } = useContext42(Internals46.CompositionSetters);
26820
- const { canvasContent } = useContext42(Internals46.CompositionManager);
26935
+ const { setCanvasContent } = useContext42(Internals47.CompositionSetters);
26936
+ const { canvasContent } = useContext42(Internals47.CompositionManager);
26821
26937
  const relativePath = useMemo61(() => {
26822
26938
  return parentFolder ? parentFolder + "/" + item.name : item.name;
26823
26939
  }, [parentFolder, item.name]);
@@ -27256,10 +27372,10 @@ var AssetSelector = ({ readOnlyStudio }) => {
27256
27372
 
27257
27373
  // src/components/CompSelectorRef.tsx
27258
27374
  import { useCallback as useCallback55, useContext as useContext44, useImperativeHandle as useImperativeHandle9, useMemo as useMemo63 } from "react";
27259
- import { Internals as Internals47 } from "remotion";
27375
+ import { Internals as Internals48 } from "remotion";
27260
27376
  import { jsx as jsx104 } from "react/jsx-runtime";
27261
27377
  var CompSelectorRef = ({ children }) => {
27262
- const { compositions } = useContext44(Internals47.CompositionManager);
27378
+ const { compositions } = useContext44(Internals48.CompositionManager);
27263
27379
  const { compositionFoldersExpanded, setCompositionFoldersExpanded } = useContext44(FolderContext);
27264
27380
  const selectComposition = useSelectComposition();
27265
27381
  const toggleFolder = useCallback55((folderName, parentName) => {
@@ -27270,7 +27386,7 @@ var CompSelectorRef = ({ children }) => {
27270
27386
  return foldersExpandedState;
27271
27387
  });
27272
27388
  }, [setCompositionFoldersExpanded]);
27273
- useImperativeHandle9(Internals47.compositionSelectorRef, () => {
27389
+ useImperativeHandle9(Internals48.compositionSelectorRef, () => {
27274
27390
  return {
27275
27391
  expandComposition: (compName) => {
27276
27392
  const compositionToExpand = compositions.find((c) => c.id === compName);
@@ -27527,13 +27643,13 @@ import React76, {
27527
27643
  useMemo as useMemo65,
27528
27644
  useState as useState47
27529
27645
  } from "react";
27530
- import { Internals as Internals48 } from "remotion";
27646
+ import { Internals as Internals49 } from "remotion";
27531
27647
  import { NoReactInternals as NoReactInternals17 } from "remotion/no-react";
27532
27648
  import { jsx as jsx108 } from "react/jsx-runtime";
27533
27649
  var ObserveDefaultPropsContext = React76.createContext(null);
27534
27650
  var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
27535
27651
  const { previewServerState, subscribeToEvent } = useContext45(StudioServerConnectionCtx);
27536
- const { updateProps } = useContext45(Internals48.EditorPropsContext);
27652
+ const { updateProps } = useContext45(Internals49.EditorPropsContext);
27537
27653
  const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState47({});
27538
27654
  const canSaveDefaultProps = useMemo65(() => {
27539
27655
  if (compositionId === null) {
@@ -27613,7 +27729,7 @@ import {
27613
27729
  useMemo as useMemo155,
27614
27730
  useState as useState85
27615
27731
  } from "react";
27616
- import { Internals as Internals75 } from "remotion";
27732
+ import { Internals as Internals76 } from "remotion";
27617
27733
 
27618
27734
  // src/components/get-zod-if-possible.tsx
27619
27735
  import {
@@ -28140,7 +28256,7 @@ var InspectorDefaultPropsWarnings = ({ warnings }) => {
28140
28256
 
28141
28257
  // src/components/InspectorPanel/DefaultInspector.tsx
28142
28258
  import { useContext as useContext56, useEffect as useEffect61, useMemo as useMemo110, useState as useState70 } from "react";
28143
- import { Internals as Internals54 } from "remotion";
28259
+ import { Internals as Internals55 } from "remotion";
28144
28260
 
28145
28261
  // src/visual-controls/VisualControls.tsx
28146
28262
  import {
@@ -28330,7 +28446,7 @@ var VisualControlsProvider = ({ children }) => {
28330
28446
  // src/components/CurrentAsset.tsx
28331
28447
  import { formatBytes as formatBytes2 } from "@remotion/studio-shared";
28332
28448
  import { useCallback as useCallback62, useContext as useContext48, useMemo as useMemo70 } from "react";
28333
- import { Internals as Internals50, staticFile as staticFile4 } from "remotion";
28449
+ import { Internals as Internals51, staticFile as staticFile4 } from "remotion";
28334
28450
 
28335
28451
  // src/helpers/format-media-duration.ts
28336
28452
  var formatMediaDuration = (seconds) => {
@@ -28742,7 +28858,7 @@ var InspectorInfoSubtitle = ({ children }) => {
28742
28858
 
28743
28859
  // src/components/NewComposition/use-rename-static-file.ts
28744
28860
  import { useCallback as useCallback61, useContext as useContext47 } from "react";
28745
- import { Internals as Internals49 } from "remotion";
28861
+ import { Internals as Internals50 } from "remotion";
28746
28862
 
28747
28863
  // src/api/rename-static-file.ts
28748
28864
  import { getRemotionEnvironment as getRemotionEnvironment5 } from "remotion";
@@ -28810,8 +28926,8 @@ var useRenameStaticFile = ({
28810
28926
  relativePath,
28811
28927
  staticFiles
28812
28928
  }) => {
28813
- const { canvasContent } = useContext47(Internals49.CompositionManager);
28814
- const { setCanvasContent } = useContext47(Internals49.CompositionSetters);
28929
+ const { canvasContent } = useContext47(Internals50.CompositionManager);
28930
+ const { setCanvasContent } = useContext47(Internals50.CompositionSetters);
28815
28931
  return useCallback61(async (newName) => {
28816
28932
  const newRelativePath = getRenamedStaticFilePath({
28817
28933
  newName,
@@ -28953,7 +29069,7 @@ var AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStudio
28953
29069
  });
28954
29070
  };
28955
29071
  var CurrentAsset = ({ readOnlyStudio }) => {
28956
- const { canvasContent } = useContext48(Internals50.CompositionManager);
29072
+ const { canvasContent } = useContext48(Internals51.CompositionManager);
28957
29073
  const assetName = canvasContent?.type === "asset" ? canvasContent.asset : null;
28958
29074
  return /* @__PURE__ */ jsx115(AssetInfo, {
28959
29075
  assetName,
@@ -28968,7 +29084,7 @@ import {
28968
29084
  useEffect as useEffect52,
28969
29085
  useMemo as useMemo75
28970
29086
  } from "react";
28971
- import { Internals as Internals52 } from "remotion";
29087
+ import { Internals as Internals53 } from "remotion";
28972
29088
 
28973
29089
  // src/icons/react.tsx
28974
29090
  import { jsx as jsx116 } from "react/jsx-runtime";
@@ -29005,10 +29121,10 @@ var resolvedStackToSymbolicated = (location2) => {
29005
29121
  import { useCallback as useCallback63, useMemo as useMemo71 } from "react";
29006
29122
 
29007
29123
  // src/helpers/validate-new-comp-data.ts
29008
- import { Internals as Internals51 } from "remotion";
29124
+ import { Internals as Internals52 } from "remotion";
29009
29125
  var validateCompositionName = (compName, compositions) => {
29010
- if (!Internals51.isCompositionIdValid(compName)) {
29011
- return Internals51.invalidCompositionErrorMessage;
29126
+ if (!Internals52.isCompositionIdValid(compName)) {
29127
+ return Internals52.invalidCompositionErrorMessage;
29012
29128
  }
29013
29129
  if (compositions.find((c) => c.id === compName)) {
29014
29130
  return `A composition with that name already exists.`;
@@ -29349,8 +29465,8 @@ var renderReactIcon = (color) => {
29349
29465
  });
29350
29466
  };
29351
29467
  var CurrentComposition = () => {
29352
- const video = Internals52.useVideo();
29353
- const { compositions } = useContext49(Internals52.CompositionManager);
29468
+ const video = Internals53.useVideo();
29469
+ const { compositions } = useContext49(Internals53.CompositionManager);
29354
29470
  const currentComposition = useMemo75(() => {
29355
29471
  if (!video) {
29356
29472
  return null;
@@ -34720,7 +34836,7 @@ var VisualControlsContent = () => {
34720
34836
 
34721
34837
  // src/components/InspectorPanel/CompositionDimensions.tsx
34722
34838
  import { useCallback as useCallback99, useEffect as useEffect60, useMemo as useMemo109, useRef as useRef45, useState as useState69 } from "react";
34723
- import { Internals as Internals53 } from "remotion";
34839
+ import { Internals as Internals54 } from "remotion";
34724
34840
 
34725
34841
  // src/components/InspectorPanel/optimistic-composition-metadata.ts
34726
34842
  var removePendingValue = ({
@@ -34901,8 +35017,8 @@ var CompositionMetadataValue = ({
34901
35017
  });
34902
35018
  };
34903
35019
  var CompositionDimensions = ({ compositionId, disabled, stack: stack2 }) => {
34904
- const video = Internals53.useVideo();
34905
- const resolvedVideoConfig = Internals53.useResolvedVideoConfig(compositionId);
35020
+ const video = Internals54.useVideo();
35021
+ const resolvedVideoConfig = Internals54.useResolvedVideoConfig(compositionId);
34906
35022
  const resolvedConfig = resolvedVideoConfig?.type === "success" || resolvedVideoConfig?.type === "success-and-refreshing" ? resolvedVideoConfig.result : null;
34907
35023
  const resolvedConfigRef = useRef45(resolvedConfig);
34908
35024
  resolvedConfigRef.current = resolvedConfig;
@@ -35026,7 +35142,7 @@ var CompositionDimensions = ({ compositionId, disabled, stack: stack2 }) => {
35026
35142
  // src/components/InspectorPanel/DefaultInspector.tsx
35027
35143
  import { jsx as jsx174, jsxs as jsxs93, Fragment as Fragment29 } from "react/jsx-runtime";
35028
35144
  var DefaultInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
35029
- const { canvasContent } = useContext56(Internals54.CompositionManager);
35145
+ const { canvasContent } = useContext56(Internals55.CompositionManager);
35030
35146
  const hasSelectedAsset = canvasContent?.type === "asset";
35031
35147
  const z = useZodIfPossible();
35032
35148
  const canSaveDefaultProps = useContext56(ObserveDefaultPropsContext);
@@ -35212,7 +35328,7 @@ var getSameSequenceInspectorSelection = (selections) => {
35212
35328
 
35213
35329
  // src/components/InspectorPanel/EasingInspector.tsx
35214
35330
  import { useCallback as useCallback109, useContext as useContext68, useMemo as useMemo121 } from "react";
35215
- import { Internals as Internals63, useVideoConfig as useVideoConfig6 } from "remotion";
35331
+ import { Internals as Internals64, useVideoConfig as useVideoConfig6 } from "remotion";
35216
35332
 
35217
35333
  // src/state/render-frame.ts
35218
35334
  var renderFrame = (frame2, fps) => {
@@ -35245,7 +35361,7 @@ import {
35245
35361
  useRef as useRef46,
35246
35362
  useState as useState71
35247
35363
  } from "react";
35248
- import { Easing, Internals as Internals55 } from "remotion";
35364
+ import { Easing, Internals as Internals56 } from "remotion";
35249
35365
  import { jsx as jsx175, jsxs as jsxs94, Fragment as Fragment30 } from "react/jsx-runtime";
35250
35366
  var SVG_WIDTH = 560;
35251
35367
  var SVG_HEIGHT = 320;
@@ -35480,14 +35596,14 @@ var areEasingsEqual = (first, second) => {
35480
35596
  }
35481
35597
  };
35482
35598
  var getEasingUpdateTargetKey = (update) => {
35483
- const nodePathKey = Internals55.makeSequencePropsSubscriptionKey(update.nodePath);
35599
+ const nodePathKey = Internals56.makeSequencePropsSubscriptionKey(update.nodePath);
35484
35600
  if (update.type === "sequence") {
35485
35601
  return `sequence:${nodePathKey}:${update.fieldKey}:${update.segmentIndex}`;
35486
35602
  }
35487
35603
  return `effect:${nodePathKey}:${update.effectIndex}:${update.fieldKey}:${update.segmentIndex}`;
35488
35604
  };
35489
35605
  var getBuiltInVisualStyleFieldSchema = (fieldKey) => {
35490
- const transformSchema = Internals55.transformSchema;
35606
+ const transformSchema = Internals56.transformSchema;
35491
35607
  const directField = transformSchema[fieldKey];
35492
35608
  if (directField) {
35493
35609
  return directField;
@@ -35669,16 +35785,16 @@ var EasingPresetButton = ({ currentEasing, disabled, onClick, preset }) => {
35669
35785
  };
35670
35786
  var EasingEditor = ({ state, renderHeader }) => {
35671
35787
  const { previewServerState } = useContext57(StudioServerConnectionCtx);
35672
- const sequencesRef = useContext57(Internals55.SequenceManagerRefContext);
35673
- const propStatusesRef = useContext57(Internals55.VisualModePropStatusesRefContext);
35788
+ const sequencesRef = useContext57(Internals56.SequenceManagerRefContext);
35789
+ const propStatusesRef = useContext57(Internals56.VisualModePropStatusesRefContext);
35674
35790
  const {
35675
35791
  setDragOverrides,
35676
35792
  clearDragOverrides,
35677
35793
  setEffectDragOverrides,
35678
35794
  clearEffectDragOverrides,
35679
35795
  setPropStatuses
35680
- } = useContext57(Internals55.VisualModeSettersContext);
35681
- const { overrideIdToNodePathMappings } = useContext57(Internals55.OverrideIdsToNodePathsGettersContext);
35796
+ } = useContext57(Internals56.VisualModeSettersContext);
35797
+ const { overrideIdToNodePathMappings } = useContext57(Internals56.OverrideIdsToNodePathsGettersContext);
35682
35798
  const svgRef = useRef46(null);
35683
35799
  const [mode, setMode] = useState71(() => easingToMode(state.initialEasing));
35684
35800
  const [bezier, setBezier] = useState71(() => easingToBezier(state.initialEasing));
@@ -35714,7 +35830,7 @@ var EasingEditor = ({ state, renderHeader }) => {
35714
35830
  const sequenceTargets = new Set;
35715
35831
  const effectTargets = new Set;
35716
35832
  for (const update of updates) {
35717
- const key3 = Internals55.makeSequencePropsSubscriptionKey(update.nodePath);
35833
+ const key3 = Internals56.makeSequencePropsSubscriptionKey(update.nodePath);
35718
35834
  if (update.type === "sequence") {
35719
35835
  if (!sequenceTargets.has(key3)) {
35720
35836
  sequenceTargets.add(key3);
@@ -36433,7 +36549,7 @@ var getEasingSelectionFromCurrentKeyframes = ({
36433
36549
 
36434
36550
  // src/components/InspectorPanel/KeyframeEasingNavigator.tsx
36435
36551
  import { useCallback as useCallback104, useMemo as useMemo114 } from "react";
36436
- import { Internals as Internals58, useVideoConfig as useVideoConfig5 } from "remotion";
36552
+ import { Internals as Internals59, useVideoConfig as useVideoConfig5 } from "remotion";
36437
36553
 
36438
36554
  // src/components/Timeline/TimelineKeyframeDiamondIcon.tsx
36439
36555
  import { jsx as jsx176, jsxs as jsxs95 } from "react/jsx-runtime";
@@ -36474,7 +36590,7 @@ import {
36474
36590
  LINEAR_KEYFRAME_EASING as LINEAR_KEYFRAME_EASING5
36475
36591
  } from "@remotion/studio-shared";
36476
36592
  import React121, { useCallback as useCallback103, useContext as useContext60, useMemo as useMemo113, useRef as useRef47 } from "react";
36477
- import { Internals as Internals57, useVideoConfig as useVideoConfig4 } from "remotion";
36593
+ import { Internals as Internals58, useVideoConfig as useVideoConfig4 } from "remotion";
36478
36594
 
36479
36595
  // src/components/Timeline/use-timeline-keyframe-drag.ts
36480
36596
  import {
@@ -36482,7 +36598,7 @@ import {
36482
36598
  moveKeyframesInPropStatus
36483
36599
  } from "@remotion/studio-shared";
36484
36600
  import { useCallback as useCallback102, useContext as useContext59 } from "react";
36485
- import { Internals as Internals56, useVideoConfig as useVideoConfig3 } from "remotion";
36601
+ import { Internals as Internals57, useVideoConfig as useVideoConfig3 } from "remotion";
36486
36602
 
36487
36603
  // src/components/Timeline/get-bounded-keyframe-drag-delta.ts
36488
36604
  var getBoundedKeyframeDragDelta = ({
@@ -36638,7 +36754,7 @@ var getTimelineSelectionsAfterEasingKeyframeDrag = ({
36638
36754
  var getCodeValueForTarget = ({
36639
36755
  propStatuses,
36640
36756
  nodePath
36641
- }) => propStatuses[Internals56.makeSequencePropsSubscriptionKey(nodePath)];
36757
+ }) => propStatuses[Internals57.makeSequencePropsSubscriptionKey(nodePath)];
36642
36758
  var getTimelineKeyframeDragTarget = ({
36643
36759
  propStatuses,
36644
36760
  displayFrame,
@@ -36837,16 +36953,16 @@ var useTimelineKeyframeDrag = ({
36837
36953
  const videoConfig = useVideoConfig3();
36838
36954
  const timelineWidth = useContext59(TimelineWidthContext);
36839
36955
  const { previewServerState } = useContext59(StudioServerConnectionCtx);
36840
- const sequencesRef = useContext59(Internals56.SequenceManagerRefContext);
36841
- const { overrideIdToNodePathMappings } = useContext59(Internals56.OverrideIdsToNodePathsGettersContext);
36842
- const propStatusesRef = useContext59(Internals56.VisualModePropStatusesRefContext);
36956
+ const sequencesRef = useContext59(Internals57.SequenceManagerRefContext);
36957
+ const { overrideIdToNodePathMappings } = useContext59(Internals57.OverrideIdsToNodePathsGettersContext);
36958
+ const propStatusesRef = useContext59(Internals57.VisualModePropStatusesRefContext);
36843
36959
  const {
36844
36960
  clearDragOverrides,
36845
36961
  clearEffectDragOverrides,
36846
36962
  setPropStatuses,
36847
36963
  setDragOverrides,
36848
36964
  setEffectDragOverrides
36849
- } = useContext59(Internals56.VisualModeSettersContext);
36965
+ } = useContext59(Internals57.VisualModeSettersContext);
36850
36966
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
36851
36967
  const { clearDraggedKeyframes, setDraggedKeyframes } = useTimelineKeyframeDragState();
36852
36968
  return useCallback102((e) => {
@@ -37039,16 +37155,16 @@ var useTimelineEasingKeyframeDrag = ({
37039
37155
  const videoConfig = useVideoConfig3();
37040
37156
  const timelineWidth = useContext59(TimelineWidthContext);
37041
37157
  const { previewServerState } = useContext59(StudioServerConnectionCtx);
37042
- const sequencesRef = useContext59(Internals56.SequenceManagerRefContext);
37043
- const { overrideIdToNodePathMappings } = useContext59(Internals56.OverrideIdsToNodePathsGettersContext);
37044
- const propStatusesRef = useContext59(Internals56.VisualModePropStatusesRefContext);
37158
+ const sequencesRef = useContext59(Internals57.SequenceManagerRefContext);
37159
+ const { overrideIdToNodePathMappings } = useContext59(Internals57.OverrideIdsToNodePathsGettersContext);
37160
+ const propStatusesRef = useContext59(Internals57.VisualModePropStatusesRefContext);
37045
37161
  const {
37046
37162
  clearDragOverrides,
37047
37163
  clearEffectDragOverrides,
37048
37164
  setPropStatuses,
37049
37165
  setDragOverrides,
37050
37166
  setEffectDragOverrides
37051
- } = useContext59(Internals56.VisualModeSettersContext);
37167
+ } = useContext59(Internals57.VisualModeSettersContext);
37052
37168
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
37053
37169
  const { clearDraggedKeyframes } = useTimelineKeyframeDragState();
37054
37170
  return useCallback102((e) => {
@@ -37279,10 +37395,10 @@ var TimelineKeyframeEasingLineUnmemoized = ({ fromFrame, toFrame, rowHeight, nod
37279
37395
  });
37280
37396
  useTimelineMarqueeSelectableItem(selectionItem, buttonRef);
37281
37397
  const { previewServerState } = useContext60(StudioServerConnectionCtx);
37282
- const sequencesRef = useContext60(Internals57.SequenceManagerRefContext);
37283
- const propStatusesRef = useContext60(Internals57.VisualModePropStatusesRefContext);
37284
- const { setPropStatuses } = useContext60(Internals57.VisualModeSettersContext);
37285
- const { overrideIdToNodePathMappings } = useContext60(Internals57.OverrideIdsToNodePathsGettersContext);
37398
+ const sequencesRef = useContext60(Internals58.SequenceManagerRefContext);
37399
+ const propStatusesRef = useContext60(Internals58.VisualModePropStatusesRefContext);
37400
+ const { setPropStatuses } = useContext60(Internals58.VisualModeSettersContext);
37401
+ const { overrideIdToNodePathMappings } = useContext60(Internals58.OverrideIdsToNodePathsGettersContext);
37286
37402
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
37287
37403
  const getTargetSelections = useCallback103(() => {
37288
37404
  const selectedEasings = getEasingSelections(currentSelection.current.selectedItems);
@@ -37571,7 +37687,7 @@ var TimelineNavigatorItem = ({ extendLineLeft, extendLineRight, item: item2, onS
37571
37687
  };
37572
37688
  var KeyframeEasingNavigator = ({ currentSelection, includeEasings, keyframes, nodePathInfo }) => {
37573
37689
  const { isSelected, selectItems } = useTimelineSelection();
37574
- const setFrame = Internals58.useTimelineSetFrame();
37690
+ const setFrame = Internals59.useTimelineSetFrame();
37575
37691
  const videoConfig = useVideoConfig5();
37576
37692
  const items = useMemo114(() => getKeyframeEasingNavigatorItems({
37577
37693
  includeEasings,
@@ -37590,7 +37706,7 @@ var KeyframeEasingNavigator = ({ currentSelection, includeEasings, keyframes, no
37590
37706
  const frame2 = getNavigatorItemPlayheadFrame(item2);
37591
37707
  setFrame((current) => {
37592
37708
  const next = { ...current, [videoConfig.id]: frame2 };
37593
- Internals58.persistCurrentFrame(next);
37709
+ Internals59.persistCurrentFrame(next);
37594
37710
  return next;
37595
37711
  });
37596
37712
  }, [setFrame, videoConfig.id]);
@@ -37670,7 +37786,7 @@ import {
37670
37786
  useMemo as useMemo115,
37671
37787
  useState as useState73
37672
37788
  } from "react";
37673
- import { Internals as Internals59 } from "remotion";
37789
+ import { Internals as Internals60 } from "remotion";
37674
37790
  import { jsx as jsx180, jsxs as jsxs98, Fragment as Fragment32 } from "react/jsx-runtime";
37675
37791
  var comboStyle2 = {
37676
37792
  minWidth: 120
@@ -37722,7 +37838,7 @@ var getOutputValues = (onSelect, disabled) => {
37722
37838
  }));
37723
37839
  };
37724
37840
  var KeyframeSettings = ({ update }) => {
37725
- const { setPropStatuses } = useContext61(Internals59.VisualModeSettersContext);
37841
+ const { setPropStatuses } = useContext61(Internals60.VisualModeSettersContext);
37726
37842
  const { previewServerState } = useContext61(StudioServerConnectionCtx);
37727
37843
  const { propStatus } = update;
37728
37844
  const [posterize, setPosterize] = useState73(propStatus.posterize ?? 0);
@@ -37946,7 +38062,7 @@ var useOpenSequenceInEditor = (sequence) => {
37946
38062
 
37947
38063
  // src/components/Timeline/use-rename-sequence.ts
37948
38064
  import { useCallback as useCallback107, useContext as useContext64, useMemo as useMemo117 } from "react";
37949
- import { Internals as Internals60 } from "remotion";
38065
+ import { Internals as Internals61 } from "remotion";
37950
38066
  var getSequenceNameSaveAction = ({
37951
38067
  editedName,
37952
38068
  currentDisplayName,
@@ -37970,11 +38086,11 @@ var useRenameSequence = ({
37970
38086
  sequence,
37971
38087
  validatedLocation
37972
38088
  }) => {
37973
- const { propStatuses } = useContext64(Internals60.VisualModePropStatusesContext);
37974
- const { setPropStatuses } = useContext64(Internals60.VisualModeSettersContext);
38089
+ const { propStatuses } = useContext64(Internals61.VisualModePropStatusesContext);
38090
+ const { setPropStatuses } = useContext64(Internals61.VisualModeSettersContext);
37975
38091
  const nodePath = nodePathInfo?.sequenceSubscriptionKey ?? null;
37976
38092
  const propStatusesForOverride = useMemo117(() => {
37977
- return nodePath ? Internals60.getPropStatusesCtx(propStatuses, nodePath) : undefined;
38093
+ return nodePath ? Internals61.getPropStatusesCtx(propStatuses, nodePath) : undefined;
37978
38094
  }, [propStatuses, nodePath]);
37979
38095
  const codeNameStatus = propStatusesForOverride?.name;
37980
38096
  const fallbackDisplayName = sequence.controls?.componentName ?? "<Sequence>";
@@ -38048,7 +38164,7 @@ var useRenameSequence = ({
38048
38164
 
38049
38165
  // src/components/InspectorPanel/ConnectedCompositionsSection.tsx
38050
38166
  import { useContext as useContext65, useMemo as useMemo118 } from "react";
38051
- import { Internals as Internals61 } from "remotion";
38167
+ import { Internals as Internals62 } from "remotion";
38052
38168
  import { jsx as jsx181 } from "react/jsx-runtime";
38053
38169
  var compositionIconStyle = {
38054
38170
  height: 13,
@@ -38062,7 +38178,7 @@ var compositionListStyle = {
38062
38178
  var useConnectedCompositions = ({
38063
38179
  track
38064
38180
  }) => {
38065
- const { compositions } = useContext65(Internals61.CompositionManager);
38181
+ const { compositions } = useContext65(Internals62.CompositionManager);
38066
38182
  return useMemo118(() => getConnectedCompositions({
38067
38183
  compositions,
38068
38184
  singleChildComponent: track.sequence.singleChildComponent
@@ -38195,10 +38311,10 @@ var SequenceInspectorSections = ({ track }) => {
38195
38311
 
38196
38312
  // src/components/InspectorPanel/use-track-for-selection.ts
38197
38313
  import { useContext as useContext67, useMemo as useMemo120 } from "react";
38198
- import { Internals as Internals62 } from "remotion";
38314
+ import { Internals as Internals63 } from "remotion";
38199
38315
  var useTrackForSelection = (selection) => {
38200
- const { sequences } = useContext67(Internals62.SequenceManager);
38201
- const { overrideIdToNodePathMappings } = useContext67(Internals62.OverrideIdsToNodePathsGettersContext);
38316
+ const { sequences } = useContext67(Internals63.SequenceManager);
38317
+ const { overrideIdToNodePathMappings } = useContext67(Internals63.OverrideIdsToNodePathsGettersContext);
38202
38318
  return useMemo120(() => {
38203
38319
  if (selection.type === "guide") {
38204
38320
  return null;
@@ -38221,12 +38337,12 @@ var addKeyframeIcon = {
38221
38337
  var EasingInspector = ({ selection }) => {
38222
38338
  const track = useTrackForSelection(selection);
38223
38339
  const videoConfig = useVideoConfig6();
38224
- const timelinePosition = Internals63.Timeline.useTimelinePosition();
38225
- const { sequences } = useContext68(Internals63.SequenceManager);
38226
- const { overrideIdToNodePathMappings } = useContext68(Internals63.OverrideIdsToNodePathsGettersContext);
38227
- const { propStatuses } = useContext68(Internals63.VisualModePropStatusesContext);
38228
- const { getDragOverrides, getEffectDragOverrides } = useContext68(Internals63.VisualModeDragOverridesContext);
38229
- const { setPropStatuses } = useContext68(Internals63.VisualModeSettersContext);
38340
+ const timelinePosition = Internals64.Timeline.useTimelinePosition();
38341
+ const { sequences } = useContext68(Internals64.SequenceManager);
38342
+ const { overrideIdToNodePathMappings } = useContext68(Internals64.OverrideIdsToNodePathsGettersContext);
38343
+ const { propStatuses } = useContext68(Internals64.VisualModePropStatusesContext);
38344
+ const { getDragOverrides, getEffectDragOverrides } = useContext68(Internals64.VisualModeDragOverridesContext);
38345
+ const { setPropStatuses } = useContext68(Internals64.VisualModeSettersContext);
38230
38346
  const { previewServerState } = useContext68(StudioServerConnectionCtx);
38231
38347
  const { selectItems } = useTimelineSelection();
38232
38348
  const parentSelection = useMemo121(() => getTimelineSelectionFromNodePathInfo(selection.nodePathInfo), [selection.nodePathInfo]);
@@ -38330,7 +38446,7 @@ var EasingInspector = ({ selection }) => {
38330
38446
  return;
38331
38447
  }
38332
38448
  const sourceFrame = timelinePosition - track.keyframeDisplayOffset;
38333
- const value = Internals63.getEffectiveVisualModeValue({
38449
+ const value = Internals64.getEffectiveVisualModeValue({
38334
38450
  propStatus: easingUpdate.propStatus,
38335
38451
  dragOverrideValue: easingDetails.dragOverrideValue,
38336
38452
  defaultValue: easingDetails.defaultValue,
@@ -38551,7 +38667,7 @@ import {
38551
38667
  useMemo as useMemo139,
38552
38668
  useState as useState81
38553
38669
  } from "react";
38554
- import { Internals as Internals68, useVideoConfig as useVideoConfig10 } from "remotion";
38670
+ import { Internals as Internals69, useVideoConfig as useVideoConfig10 } from "remotion";
38555
38671
 
38556
38672
  // src/components/Timeline/TimelineEffectPropItem.tsx
38557
38673
  import {
@@ -38559,7 +38675,7 @@ import {
38559
38675
  optimisticUpdateForEffectPropStatuses as optimisticUpdateForEffectPropStatuses2
38560
38676
  } from "@remotion/studio-shared";
38561
38677
  import { useCallback as useCallback126, useContext as useContext74, useMemo as useMemo137 } from "react";
38562
- import { Internals as Internals66, useVideoConfig as useVideoConfig8 } from "remotion";
38678
+ import { Internals as Internals67, useVideoConfig as useVideoConfig8 } from "remotion";
38563
38679
 
38564
38680
  // src/components/Timeline/get-animation-item-selection-for-frame.ts
38565
38681
  var getKeyframeSelection = ({
@@ -38820,7 +38936,7 @@ var TimelineFieldRowContent = ({ field, rowDepth, selected, children }) => {
38820
38936
  // src/components/Timeline/TimelineKeyframeControls.tsx
38821
38937
  import { isSchemaFieldKeyframable } from "@remotion/studio-shared";
38822
38938
  import { useCallback as useCallback111, useContext as useContext72, useMemo as useMemo124 } from "react";
38823
- import { Internals as Internals64, useVideoConfig as useVideoConfig7 } from "remotion";
38939
+ import { Internals as Internals65, useVideoConfig as useVideoConfig7 } from "remotion";
38824
38940
 
38825
38941
  // src/components/Timeline/get-keyframe-navigation.ts
38826
38942
  var isKeyframeInTimelineRange = (frame2, durationInFrames) => {
@@ -38972,7 +39088,7 @@ var resolveKeyframeControlTarget = ({
38972
39088
  }
38973
39089
  const nodePath = nodePathInfo.sequenceSubscriptionKey;
38974
39090
  if (fieldNode.field.kind === "sequence-field") {
38975
- const sequencePropStatuses = Internals64.getPropStatusesCtx(propStatuses, nodePath);
39091
+ const sequencePropStatuses = Internals65.getPropStatusesCtx(propStatuses, nodePath);
38976
39092
  const sequenceSelectedPropStatus = sequencePropStatuses?.[fieldNode.field.key] ?? null;
38977
39093
  if (sequenceSelectedPropStatus === null) {
38978
39094
  return null;
@@ -38991,7 +39107,7 @@ var resolveKeyframeControlTarget = ({
38991
39107
  effectIndex: null
38992
39108
  };
38993
39109
  }
38994
- const effectStatus = Internals64.getEffectPropStatusesCtx({
39110
+ const effectStatus = Internals65.getEffectPropStatusesCtx({
38995
39111
  propStatuses,
38996
39112
  nodePath,
38997
39113
  effectIndex: fieldNode.field.effectIndex
@@ -39058,7 +39174,8 @@ var getDeleteChange = (target) => {
39058
39174
  nodePath: target.nodePath,
39059
39175
  fieldKey: target.fieldKey,
39060
39176
  sourceFrame: target.sourceFrame,
39061
- schema: target.schema
39177
+ schema: target.schema,
39178
+ valueWhenLastKeyframeDeleted: null
39062
39179
  };
39063
39180
  if (target.effectIndex === null) {
39064
39181
  return change;
@@ -39078,7 +39195,7 @@ function getCurrentKeyframeValue({
39078
39195
  dragOverrideValue
39079
39196
  }) {
39080
39197
  if (isKeyframedStatus(propStatus)) {
39081
- return Internals64.getEffectiveVisualModeValue({
39198
+ return Internals65.getEffectiveVisualModeValue({
39082
39199
  propStatus,
39083
39200
  dragOverrideValue,
39084
39201
  frame: jsxFrame,
@@ -39087,7 +39204,7 @@ function getCurrentKeyframeValue({
39087
39204
  });
39088
39205
  }
39089
39206
  if (propStatus.status === "static") {
39090
- return Internals64.getEffectiveVisualModeValue({
39207
+ return Internals65.getEffectiveVisualModeValue({
39091
39208
  propStatus,
39092
39209
  dragOverrideValue,
39093
39210
  frame: jsxFrame,
@@ -39136,11 +39253,11 @@ var TimelineKeyframeControls = ({
39136
39253
  mode = "timeline"
39137
39254
  }) => {
39138
39255
  const videoConfig = useVideoConfig7();
39139
- const timelinePosition = Internals64.Timeline.useTimelinePosition();
39140
- const setFrame = Internals64.useTimelineSetFrame();
39141
- const { setPropStatuses } = useContext72(Internals64.VisualModeSettersContext);
39142
- const { propStatuses } = useContext72(Internals64.VisualModePropStatusesContext);
39143
- const { getDragOverrides, getEffectDragOverrides } = useContext72(Internals64.VisualModeDragOverridesContext);
39256
+ const timelinePosition = Internals65.Timeline.useTimelinePosition();
39257
+ const setFrame = Internals65.useTimelineSetFrame();
39258
+ const { setPropStatuses } = useContext72(Internals65.VisualModeSettersContext);
39259
+ const { propStatuses } = useContext72(Internals65.VisualModePropStatusesContext);
39260
+ const { getDragOverrides, getEffectDragOverrides } = useContext72(Internals65.VisualModeDragOverridesContext);
39144
39261
  const { previewServerState } = useContext72(StudioServerConnectionCtx);
39145
39262
  const { selectedItems, selectItems } = useTimelineSelection();
39146
39263
  const tracks = useTimelineKeyframeTracks();
@@ -39231,7 +39348,7 @@ var TimelineKeyframeControls = ({
39231
39348
  const seekToDisplayFrame = useCallback111((frame2) => {
39232
39349
  setFrame((current) => {
39233
39350
  const next = { ...current, [videoConfig.id]: frame2 };
39234
- Internals64.persistCurrentFrame(next);
39351
+ Internals65.persistCurrentFrame(next);
39235
39352
  return next;
39236
39353
  });
39237
39354
  }, [setFrame, videoConfig.id]);
@@ -39385,7 +39502,7 @@ var TimelineKeyframeControls = ({
39385
39502
 
39386
39503
  // src/components/Timeline/TimelineKeyframedValue.tsx
39387
39504
  import { useCallback as useCallback124, useMemo as useMemo134 } from "react";
39388
- import { Internals as Internals65 } from "remotion";
39505
+ import { Internals as Internals66 } from "remotion";
39389
39506
 
39390
39507
  // src/components/Timeline/TimelineSchemaField.tsx
39391
39508
  import React144 from "react";
@@ -43088,7 +43205,7 @@ var TimelineKeyframedValue = ({
43088
43205
  scaleLockNodePath
43089
43206
  }) => {
43090
43207
  const computedValue = useMemo134(() => {
43091
- const raw = Internals65.interpolateKeyframedStatus({
43208
+ const raw = Internals66.interpolateKeyframedStatus({
43092
43209
  forceSpringAllowTail: false,
43093
43210
  frame: sourceFrame,
43094
43211
  status: propStatus
@@ -43103,7 +43220,7 @@ var TimelineKeyframedValue = ({
43103
43220
  codeValue: computedValue
43104
43221
  }), [computedValue]);
43105
43222
  const effectiveValue = useMemo134(() => {
43106
- return Internals65.getEffectiveVisualModeValue({
43223
+ return Internals66.getEffectiveVisualModeValue({
43107
43224
  propStatus: fakeStatus,
43108
43225
  dragOverrideValue,
43109
43226
  frame: sourceFrame,
@@ -43311,23 +43428,23 @@ var isResettableStatus = ({
43311
43428
  return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
43312
43429
  };
43313
43430
  var TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFrame }) => {
43314
- const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext74(Internals66.VisualModeSettersContext);
43315
- const { getEffectDragOverrides } = useContext74(Internals66.VisualModeDragOverridesContext);
43316
- const { propStatuses: visualModePropStatuses } = useContext74(Internals66.VisualModePropStatusesContext);
43431
+ const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext74(Internals67.VisualModeSettersContext);
43432
+ const { getEffectDragOverrides } = useContext74(Internals67.VisualModeDragOverridesContext);
43433
+ const { propStatuses: visualModePropStatuses } = useContext74(Internals67.VisualModePropStatusesContext);
43317
43434
  const { previewServerState } = useContext74(StudioServerConnectionCtx);
43318
43435
  const clientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
43319
- const effectStatus = Internals66.getEffectPropStatusesCtx({
43436
+ const effectStatus = Internals67.getEffectPropStatusesCtx({
43320
43437
  propStatuses: visualModePropStatuses,
43321
43438
  nodePath,
43322
43439
  effectIndex: field.effectIndex
43323
43440
  });
43324
43441
  const propStatus = effectStatus.type === "can-update-effect" ? effectStatus.props?.[field.key] ?? null : null;
43325
43442
  const onDragValueChange = useCallback126((value) => {
43326
- const nextDragOverrideValue = propStatus !== null && isKeyframedStatus2(propStatus) ? Internals66.makeKeyframedDragOverride({
43443
+ const nextDragOverrideValue = propStatus !== null && isKeyframedStatus2(propStatus) ? Internals67.makeKeyframedDragOverride({
43327
43444
  status: propStatus,
43328
43445
  frame: sourceFrame,
43329
43446
  value
43330
- }) : Internals66.makeStaticDragOverride(value);
43447
+ }) : Internals67.makeStaticDragOverride(value);
43331
43448
  setEffectDragOverrides(nodePath, field.effectIndex, field.key, nextDragOverrideValue);
43332
43449
  }, [
43333
43450
  field.effectIndex,
@@ -43482,7 +43599,7 @@ var TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFrame
43482
43599
  fixHref: TIMELINE_COMPUTED_EFFECT_FIX_LINK
43483
43600
  });
43484
43601
  }
43485
- const effectiveValue = Internals66.getEffectiveVisualModeValue({
43602
+ const effectiveValue = Internals67.getEffectiveVisualModeValue({
43486
43603
  propStatus,
43487
43604
  dragOverrideValue,
43488
43605
  defaultValue: field.fieldSchema.default,
@@ -43509,19 +43626,19 @@ var TimelineEffectPropItem = ({
43509
43626
  keyframeControlsMode = "timeline"
43510
43627
  }) => {
43511
43628
  const { previewServerState } = useContext74(StudioServerConnectionCtx);
43512
- const { setPropStatuses } = useContext74(Internals66.VisualModeSettersContext);
43513
- const { propStatuses } = useContext74(Internals66.VisualModePropStatusesContext);
43514
- const { getEffectDragOverrides } = useContext74(Internals66.VisualModeDragOverridesContext);
43629
+ const { setPropStatuses } = useContext74(Internals67.VisualModeSettersContext);
43630
+ const { propStatuses } = useContext74(Internals67.VisualModePropStatusesContext);
43631
+ const { getEffectDragOverrides } = useContext74(Internals67.VisualModeDragOverridesContext);
43515
43632
  const selection = useTimelineRowSelection(nodePathInfo);
43516
43633
  const { selectItems } = useTimelineSelection();
43517
- const setFrame = Internals66.useTimelineSetFrame();
43634
+ const setFrame = Internals67.useTimelineSetFrame();
43518
43635
  const videoConfig = useVideoConfig8();
43519
- const timelinePosition = Internals66.Timeline.useTimelinePosition();
43636
+ const timelinePosition = Internals67.Timeline.useTimelinePosition();
43520
43637
  const sourceFrame = timelinePosition - keyframeDisplayOffset;
43521
43638
  const style8 = useMemo137(() => {
43522
43639
  return field.typeName === "text-content" ? fieldRowBase : { ...fieldRowBase, height: field.rowHeight };
43523
43640
  }, [field.rowHeight, field.typeName]);
43524
- const effectStatus = useMemo137(() => Internals66.getEffectPropStatusesCtx({
43641
+ const effectStatus = useMemo137(() => Internals67.getEffectPropStatusesCtx({
43525
43642
  propStatuses,
43526
43643
  nodePath,
43527
43644
  effectIndex: field.effectIndex
@@ -43611,7 +43728,7 @@ var TimelineEffectPropItem = ({
43611
43728
  const seekToDisplayFrame = useCallback126((frame2) => {
43612
43729
  setFrame((current) => {
43613
43730
  const next = { ...current, [videoConfig.id]: frame2 };
43614
- Internals66.persistCurrentFrame(next);
43731
+ Internals67.persistCurrentFrame(next);
43615
43732
  return next;
43616
43733
  });
43617
43734
  }, [setFrame, videoConfig.id]);
@@ -43628,7 +43745,7 @@ var TimelineEffectPropItem = ({
43628
43745
  if (!keyframable || previewServerState.type !== "connected") {
43629
43746
  return;
43630
43747
  }
43631
- const value = Internals66.getEffectiveVisualModeValue({
43748
+ const value = Internals67.getEffectiveVisualModeValue({
43632
43749
  propStatus,
43633
43750
  dragOverrideValue,
43634
43751
  frame: sourceFrame,
@@ -43722,7 +43839,7 @@ var TimelineEffectPropItem = ({
43722
43839
  // src/components/Timeline/TimelineSequencePropItem.tsx
43723
43840
  import { isSchemaFieldKeyframable as isSchemaFieldKeyframable3 } from "@remotion/studio-shared";
43724
43841
  import { useCallback as useCallback127, useContext as useContext75, useMemo as useMemo138 } from "react";
43725
- import { Internals as Internals67, useVideoConfig as useVideoConfig9 } from "remotion";
43842
+ import { Internals as Internals68, useVideoConfig as useVideoConfig9 } from "remotion";
43726
43843
  import { jsx as jsx208 } from "react/jsx-runtime";
43727
43844
  var fieldRowBase2 = {};
43728
43845
  var isKeyframedStatus3 = (status) => {
@@ -43745,18 +43862,18 @@ var isResettableStatus2 = ({
43745
43862
  return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
43746
43863
  };
43747
43864
  var Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
43748
- const { getDragOverrides } = useContext75(Internals67.VisualModeDragOverridesContext);
43749
- const { setDragOverrides, clearDragOverrides } = useContext75(Internals67.VisualModeSettersContext);
43865
+ const { getDragOverrides } = useContext75(Internals68.VisualModeDragOverridesContext);
43866
+ const { setDragOverrides, clearDragOverrides } = useContext75(Internals68.VisualModeSettersContext);
43750
43867
  const dragOverrideValue = useMemo138(() => {
43751
43868
  return nodePath === null ? undefined : (getDragOverrides(nodePath) ?? {})[field.key];
43752
43869
  }, [getDragOverrides, nodePath, field.key]);
43753
- const effectiveValue = Internals67.getEffectiveVisualModeValue({
43870
+ const effectiveValue = Internals68.getEffectiveVisualModeValue({
43754
43871
  propStatus,
43755
43872
  dragOverrideValue,
43756
43873
  defaultValue: field.fieldSchema.default,
43757
43874
  shouldResortToDefaultValueIfUndefined: true
43758
43875
  });
43759
- const { setPropStatuses } = useContext75(Internals67.VisualModeSettersContext);
43876
+ const { setPropStatuses } = useContext75(Internals68.VisualModeSettersContext);
43760
43877
  const { previewServerState } = useContext75(StudioServerConnectionCtx);
43761
43878
  const clientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
43762
43879
  const onSave = useCallback127((value, options) => {
@@ -43805,7 +43922,7 @@ var Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
43805
43922
  if (nodePath === null) {
43806
43923
  throw new Error("Cannot drag value");
43807
43924
  }
43808
- setDragOverrides(nodePath, field.key, Internals67.makeStaticDragOverride(value));
43925
+ setDragOverrides(nodePath, field.key, Internals68.makeStaticDragOverride(value));
43809
43926
  }, [setDragOverrides, nodePath, field.key]);
43810
43927
  const onDragEnd = useCallback127(() => {
43811
43928
  if (nodePath === null) {
@@ -43824,8 +43941,8 @@ var Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
43824
43941
  });
43825
43942
  };
43826
43943
  var TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, propStatus, sourceFrame }) => {
43827
- const { getDragOverrides } = useContext75(Internals67.VisualModeDragOverridesContext);
43828
- const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext75(Internals67.VisualModeSettersContext);
43944
+ const { getDragOverrides } = useContext75(Internals68.VisualModeDragOverridesContext);
43945
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext75(Internals68.VisualModeSettersContext);
43829
43946
  const { previewServerState } = useContext75(StudioServerConnectionCtx);
43830
43947
  const clientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
43831
43948
  const dragOverrideValue = useMemo138(() => {
@@ -43847,7 +43964,7 @@ var TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, propS
43847
43964
  });
43848
43965
  }, [clientId, field.key, fileName, nodePath, schema, setPropStatuses]);
43849
43966
  const onKeyframedDragValueChange = useCallback127((value) => {
43850
- setDragOverrides(nodePath, field.key, Internals67.makeKeyframedDragOverride({
43967
+ setDragOverrides(nodePath, field.key, Internals68.makeKeyframedDragOverride({
43851
43968
  status: propStatus,
43852
43969
  frame: sourceFrame,
43853
43970
  value
@@ -43877,17 +43994,17 @@ var TimelineSequencePropItem = ({
43877
43994
  keyframeDisplayOffset,
43878
43995
  keyframeControlsMode = "timeline"
43879
43996
  }) => {
43880
- const { propStatuses: visualModePropStatuses } = useContext75(Internals67.VisualModePropStatusesContext);
43881
- const { getDragOverrides } = useContext75(Internals67.VisualModeDragOverridesContext);
43882
- const { setPropStatuses } = useContext75(Internals67.VisualModeSettersContext);
43997
+ const { propStatuses: visualModePropStatuses } = useContext75(Internals68.VisualModePropStatusesContext);
43998
+ const { getDragOverrides } = useContext75(Internals68.VisualModeDragOverridesContext);
43999
+ const { setPropStatuses } = useContext75(Internals68.VisualModeSettersContext);
43883
44000
  const { previewServerState } = useContext75(StudioServerConnectionCtx);
43884
44001
  const selection = useTimelineRowSelection(nodePathInfo);
43885
44002
  const { selectItems } = useTimelineSelection();
43886
- const setFrame = Internals67.useTimelineSetFrame();
44003
+ const setFrame = Internals68.useTimelineSetFrame();
43887
44004
  const videoConfig = useVideoConfig9();
43888
- const timelinePosition = Internals67.Timeline.useTimelinePosition();
44005
+ const timelinePosition = Internals68.Timeline.useTimelinePosition();
43889
44006
  const sourceFrame = timelinePosition - keyframeDisplayOffset;
43890
- const propStatusesForOverride = Internals67.getPropStatusesCtx(visualModePropStatuses, nodePath);
44007
+ const propStatusesForOverride = Internals68.getPropStatusesCtx(visualModePropStatuses, nodePath);
43891
44008
  const propStatus = propStatusesForOverride?.[field.key] ?? null;
43892
44009
  const dragOverrideValue = useMemo138(() => {
43893
44010
  return (getDragOverrides(nodePath) ?? {})[field.key];
@@ -43981,7 +44098,7 @@ var TimelineSequencePropItem = ({
43981
44098
  const seekToDisplayFrame = useCallback127((frame2) => {
43982
44099
  setFrame((current) => {
43983
44100
  const next = { ...current, [videoConfig.id]: frame2 };
43984
- Internals67.persistCurrentFrame(next);
44101
+ Internals68.persistCurrentFrame(next);
43985
44102
  return next;
43986
44103
  });
43987
44104
  }, [setFrame, videoConfig.id]);
@@ -43998,7 +44115,7 @@ var TimelineSequencePropItem = ({
43998
44115
  if (!keyframable || previewServerState.type !== "connected") {
43999
44116
  return;
44000
44117
  }
44001
- const value = Internals67.getEffectiveVisualModeValue({
44118
+ const value = Internals68.getEffectiveVisualModeValue({
44002
44119
  propStatus,
44003
44120
  dragOverrideValue,
44004
44121
  frame: sourceFrame,
@@ -44161,16 +44278,16 @@ var TrashIcon = ({ color }) => {
44161
44278
  var KeyframeInspector = ({ selection }) => {
44162
44279
  const track = useTrackForSelection(selection);
44163
44280
  const videoConfig = useVideoConfig10();
44164
- const timelinePosition = Internals68.Timeline.useTimelinePosition();
44165
- const { propStatuses } = useContext76(Internals68.VisualModePropStatusesContext);
44281
+ const timelinePosition = Internals69.Timeline.useTimelinePosition();
44282
+ const { propStatuses } = useContext76(Internals69.VisualModePropStatusesContext);
44166
44283
  const {
44167
44284
  clearDragOverrides,
44168
44285
  clearEffectDragOverrides,
44169
44286
  setDragOverrides,
44170
44287
  setEffectDragOverrides,
44171
44288
  setPropStatuses
44172
- } = useContext76(Internals68.VisualModeSettersContext);
44173
- const { getDragOverrides, getEffectDragOverrides } = useContext76(Internals68.VisualModeDragOverridesContext);
44289
+ } = useContext76(Internals69.VisualModeSettersContext);
44290
+ const { getDragOverrides, getEffectDragOverrides } = useContext76(Internals69.VisualModeDragOverridesContext);
44174
44291
  const { previewServerState } = useContext76(StudioServerConnectionCtx);
44175
44292
  const { selectItems } = useTimelineSelection();
44176
44293
  const [draftFrame, setDraftFrame] = useState81(selection.frame);
@@ -44199,7 +44316,7 @@ var KeyframeInspector = ({ selection }) => {
44199
44316
  includeTextContent: false
44200
44317
  });
44201
44318
  const sequenceField = sequenceFields?.find((candidate) => candidate.key === keyframeField.fieldKey) ?? null;
44202
- const sequencePropStatus = Internals68.getPropStatusesCtx(propStatuses, nodePath)?.[keyframeField.fieldKey] ?? null;
44319
+ const sequencePropStatus = Internals69.getPropStatusesCtx(propStatuses, nodePath)?.[keyframeField.fieldKey] ?? null;
44203
44320
  if (!sequenceField || sequencePropStatus?.status !== "keyframed") {
44204
44321
  return null;
44205
44322
  }
@@ -44227,7 +44344,7 @@ var KeyframeInspector = ({ selection }) => {
44227
44344
  getEffectDragOverrides
44228
44345
  });
44229
44346
  const effectField = effectFields.find((candidate) => candidate.key === keyframeField.fieldKey) ?? null;
44230
- const effectStatus = Internals68.getEffectPropStatusesCtx({
44347
+ const effectStatus = Internals69.getEffectPropStatusesCtx({
44231
44348
  propStatuses,
44232
44349
  nodePath,
44233
44350
  effectIndex: keyframeField.effectIndex
@@ -44536,7 +44653,7 @@ import React152 from "react";
44536
44653
 
44537
44654
  // src/components/Timeline/TimelineEffectItem.tsx
44538
44655
  import { useCallback as useCallback129, useContext as useContext77, useMemo as useMemo140, useState as useState82 } from "react";
44539
- import { Internals as Internals69 } from "remotion";
44656
+ import { Internals as Internals70 } from "remotion";
44540
44657
  import { jsx as jsx210, jsxs as jsxs112 } from "react/jsx-runtime";
44541
44658
  var EFFECT_REORDER_MIME_TYPE = "application/remotion-effect-reorder";
44542
44659
  var currentEffectDrag = null;
@@ -44602,12 +44719,12 @@ var TimelineEffectItem = ({
44602
44719
  }) => {
44603
44720
  const { previewServerState } = useContext77(StudioServerConnectionCtx);
44604
44721
  const previewConnected = previewServerState.type === "connected";
44605
- const { propStatuses } = useContext77(Internals69.VisualModePropStatusesContext);
44606
- const { setPropStatuses } = useContext77(Internals69.VisualModeSettersContext);
44722
+ const { propStatuses } = useContext77(Internals70.VisualModePropStatusesContext);
44723
+ const { setPropStatuses } = useContext77(Internals70.VisualModeSettersContext);
44607
44724
  const selection = useTimelineRowSelection(nodePathInfo);
44608
44725
  const containsSelection = useTimelineRowContainsSelection(nodePathInfo);
44609
44726
  const [dropIndicator, setDropIndicator] = useState82(null);
44610
- const effectStatus = useMemo140(() => Internals69.getEffectPropStatusesCtx({
44727
+ const effectStatus = useMemo140(() => Internals70.getEffectPropStatusesCtx({
44611
44728
  propStatuses,
44612
44729
  nodePath,
44613
44730
  effectIndex
@@ -44622,7 +44739,7 @@ var TimelineEffectItem = ({
44622
44739
  const canToggle = previewConnected && disabledStatus?.status === "static";
44623
44740
  const deleteDisabled = !previewConnected || effectStatus.type !== "can-update-effect" || !validatedLocation.source;
44624
44741
  const canReorder = previewConnected && effectStatus.type === "can-update-effect" && Boolean(validatedLocation.source);
44625
- const nodePathKey = useMemo140(() => Internals69.makeSequencePropsSubscriptionKey(nodePath), [nodePath]);
44742
+ const nodePathKey = useMemo140(() => Internals70.makeSequencePropsSubscriptionKey(nodePath), [nodePath]);
44626
44743
  const onDeleteEffectFromSource = useCallback129(async () => {
44627
44744
  if (deleteDisabled) {
44628
44745
  return;
@@ -45009,7 +45126,7 @@ var TimelineExpandedRow = ({
45009
45126
 
45010
45127
  // src/components/Timeline/use-timeline-expanded-tree.ts
45011
45128
  import { useContext as useContext78, useMemo as useMemo141 } from "react";
45012
- import { Internals as Internals70 } from "remotion";
45129
+ import { Internals as Internals71 } from "remotion";
45013
45130
  var useTimelineExpandedTree = ({
45014
45131
  sequence,
45015
45132
  nodePathInfo,
@@ -45018,8 +45135,8 @@ var useTimelineExpandedTree = ({
45018
45135
  }) => {
45019
45136
  const { getIsExpanded } = useContext78(ExpandedTracksGetterContext);
45020
45137
  const { toggleTrack } = useContext78(ExpandedTracksSetterContext);
45021
- const { propStatuses: visualModePropStatuses } = useContext78(Internals70.VisualModePropStatusesContext);
45022
- const { getDragOverrides, getEffectDragOverrides } = useContext78(Internals70.VisualModeDragOverridesContext);
45138
+ const { propStatuses: visualModePropStatuses } = useContext78(Internals71.VisualModePropStatusesContext);
45139
+ const { getDragOverrides, getEffectDragOverrides } = useContext78(Internals71.VisualModeDragOverridesContext);
45023
45140
  const { selectedItems } = useTimelineSelection();
45024
45141
  const tree = useMemo141(() => buildTimelineTree({
45025
45142
  sequence,
@@ -45372,7 +45489,7 @@ var InspectorSequenceSection = ({
45372
45489
 
45373
45490
  // src/components/InspectorPanel/AlignmentControls.tsx
45374
45491
  import { useCallback as useCallback131, useContext as useContext80, useMemo as useMemo143 } from "react";
45375
- import { Internals as Internals71 } from "remotion";
45492
+ import { Internals as Internals72 } from "remotion";
45376
45493
 
45377
45494
  // src/icons/align-right.tsx
45378
45495
  import { jsx as jsx213, jsxs as jsxs114 } from "react/jsx-runtime";
@@ -45596,16 +45713,16 @@ var AlignmentButton = ({ onClick, title: title2, Icon, disabled }) => {
45596
45713
  };
45597
45714
  var AlignmentControls = ({ track }) => {
45598
45715
  const { previewServerState } = useContext80(StudioServerConnectionCtx);
45599
- const { propStatuses } = useContext80(Internals71.VisualModePropStatusesContext);
45600
- const { getDragOverrides } = useContext80(Internals71.VisualModeDragOverridesContext);
45601
- const { setPropStatuses } = useContext80(Internals71.VisualModeSettersContext);
45602
- const { canvasContent, compositions } = useContext80(Internals71.CompositionManager);
45716
+ const { propStatuses } = useContext80(Internals72.VisualModePropStatusesContext);
45717
+ const { getDragOverrides } = useContext80(Internals72.VisualModeDragOverridesContext);
45718
+ const { setPropStatuses } = useContext80(Internals72.VisualModeSettersContext);
45719
+ const { canvasContent, compositions } = useContext80(Internals72.CompositionManager);
45603
45720
  const currentCompositionMetadata = useMemo143(() => {
45604
45721
  if (canvasContent?.type !== "composition")
45605
45722
  return null;
45606
45723
  return compositions.find((c) => c.id === canvasContent.compositionId) ?? null;
45607
45724
  }, [canvasContent, compositions]);
45608
- const timelinePosition = Internals71.Timeline.useTimelinePosition();
45725
+ const timelinePosition = Internals72.Timeline.useTimelinePosition();
45609
45726
  const handleAlign = useCallback131((direction) => {
45610
45727
  if (previewServerState.type !== "connected" || !track.nodePathInfo || !track.sequence.controls) {
45611
45728
  return;
@@ -45615,7 +45732,7 @@ var AlignmentControls = ({ track }) => {
45615
45732
  return;
45616
45733
  }
45617
45734
  const nodePath = track.nodePathInfo.sequenceSubscriptionKey;
45618
- const nodePropStatuses = Internals71.getPropStatusesCtx(propStatuses, nodePath);
45735
+ const nodePropStatuses = Internals72.getPropStatusesCtx(propStatuses, nodePath);
45619
45736
  const sourceFrame = timelinePosition - track.keyframeDisplayOffset;
45620
45737
  const dragOverrides = getDragOverrides(nodePath) ?? {};
45621
45738
  const activeSchema = getSelectedOutlineActiveSchema({
@@ -45642,12 +45759,12 @@ var AlignmentControls = ({ track }) => {
45642
45759
  if (!currentCompositionMetadata?.width) {
45643
45760
  return;
45644
45761
  }
45645
- const compositionRect = Internals71.portalNode().getBoundingClientRect();
45762
+ const compositionRect = Internals72.portalNode().getBoundingClientRect();
45646
45763
  if (compositionRect.width === 0 || compositionRect.height === 0) {
45647
45764
  return;
45648
45765
  }
45649
45766
  const scale = compositionRect.width / currentCompositionMetadata.width;
45650
- const currentTranslate = propStatus ? String(Internals71.getEffectiveVisualModeValue({
45767
+ const currentTranslate = propStatus ? String(Internals72.getEffectiveVisualModeValue({
45651
45768
  propStatus,
45652
45769
  dragOverrideValue: dragOverrides[translateFieldKey],
45653
45770
  defaultValue: fieldSchema.default,
@@ -45715,7 +45832,7 @@ var AlignmentControls = ({ track }) => {
45715
45832
  return null;
45716
45833
  }
45717
45834
  const renderNodePath = track.nodePathInfo.sequenceSubscriptionKey;
45718
- const renderNodePropStatuses = Internals71.getPropStatusesCtx(propStatuses, renderNodePath);
45835
+ const renderNodePropStatuses = Internals72.getPropStatusesCtx(propStatuses, renderNodePath);
45719
45836
  const renderSourceFrame = timelinePosition - track.keyframeDisplayOffset;
45720
45837
  const renderDragOverrides = getDragOverrides(renderNodePath) ?? {};
45721
45838
  const renderActiveSchema = getSelectedOutlineActiveSchema({
@@ -45960,7 +46077,7 @@ var SchemaResetButton = ({ onClick }) => {
45960
46077
 
45961
46078
  // src/components/RenderQueue/index.tsx
45962
46079
  import React168, { useContext as useContext90, useEffect as useEffect69, useMemo as useMemo153 } from "react";
45963
- import { Internals as Internals74 } from "remotion";
46080
+ import { Internals as Internals75 } from "remotion";
45964
46081
 
45965
46082
  // src/components/RenderQueue/RenderQueueItem.tsx
45966
46083
  import {
@@ -45970,7 +46087,7 @@ import {
45970
46087
  useMemo as useMemo152,
45971
46088
  useState as useState84
45972
46089
  } from "react";
45973
- import { Internals as Internals73 } from "remotion";
46090
+ import { Internals as Internals74 } from "remotion";
45974
46091
 
45975
46092
  // src/components/RenderQueue/client-side-render-types.ts
45976
46093
  var isRestoredClientJob = (job) => {
@@ -46637,13 +46754,13 @@ var RenderQueueProgressMessage = ({ job }) => {
46637
46754
 
46638
46755
  // src/components/RenderQueue/RenderQueueRemoveItem.tsx
46639
46756
  import { useCallback as useCallback142, useContext as useContext87, useMemo as useMemo150 } from "react";
46640
- import { Internals as Internals72 } from "remotion";
46757
+ import { Internals as Internals73 } from "remotion";
46641
46758
  import { jsx as jsx234 } from "react/jsx-runtime";
46642
46759
  var RenderQueueRemoveItem = ({ job }) => {
46643
46760
  const isClientJob = isClientRenderJob(job);
46644
46761
  const { removeClientJob } = useContext87(RenderQueueContext);
46645
- const { canvasContent } = useContext87(Internals72.CompositionManager);
46646
- const { setCanvasContent } = useContext87(Internals72.CompositionSetters);
46762
+ const { canvasContent } = useContext87(Internals73.CompositionManager);
46763
+ const { setCanvasContent } = useContext87(Internals73.CompositionSetters);
46647
46764
  const onClick = useCallback142((e) => {
46648
46765
  e.stopPropagation();
46649
46766
  if (isClientJob) {
@@ -46978,7 +47095,7 @@ var subtitle2 = {
46978
47095
  var SELECTED_CLASSNAME = "__remotion_selected_classname";
46979
47096
  var RenderQueueItem = ({ job, selected }) => {
46980
47097
  const [hovered, setHovered] = useState84(false);
46981
- const { setCanvasContent } = useContext89(Internals73.CompositionSetters);
47098
+ const { setCanvasContent } = useContext89(Internals74.CompositionSetters);
46982
47099
  const isClientJob = isClientRenderJob(job);
46983
47100
  const onPointerEnter = useCallback144(() => {
46984
47101
  setHovered(true);
@@ -47145,7 +47262,7 @@ var renderQueue = {
47145
47262
  };
47146
47263
  var RenderQueue = () => {
47147
47264
  const { jobs } = useContext90(RenderQueueContext);
47148
- const { canvasContent } = useContext90(Internals74.CompositionManager);
47265
+ const { canvasContent } = useContext90(Internals75.CompositionManager);
47149
47266
  const previousJobCount = React168.useRef(jobs.length);
47150
47267
  const jobCount = jobs.length;
47151
47268
  const divRef = React168.useRef(null);
@@ -47281,7 +47398,7 @@ var persistSelectedOptionsSidebarPanel2 = (panel2) => {
47281
47398
  localStorage.setItem(localStorageKey2, panel2);
47282
47399
  };
47283
47400
  var OptionsPanel = ({ readOnlyStudio }) => {
47284
- const { props, updateProps } = useContext92(Internals75.EditorPropsContext);
47401
+ const { props, updateProps } = useContext92(Internals76.EditorPropsContext);
47285
47402
  const isMobileLayout = useMobileLayout();
47286
47403
  const container37 = useMemo155(() => ({
47287
47404
  height: "100%",
@@ -47312,7 +47429,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
47312
47429
  }
47313
47430
  };
47314
47431
  }, []);
47315
- const { compositions, canvasContent } = useContext92(Internals75.CompositionManager);
47432
+ const { compositions, canvasContent } = useContext92(Internals76.CompositionManager);
47316
47433
  const composition = useMemo155(() => {
47317
47434
  if (canvasContent === null || canvasContent.type !== "composition") {
47318
47435
  return null;
@@ -47455,13 +47572,13 @@ import {
47455
47572
  useRef as useRef55,
47456
47573
  useState as useState89
47457
47574
  } from "react";
47458
- import { Internals as Internals84 } from "remotion";
47575
+ import { Internals as Internals85 } from "remotion";
47459
47576
 
47460
47577
  // src/helpers/is-current-selected-still.ts
47461
47578
  import { useContext as useContext93 } from "react";
47462
- import { Internals as Internals76 } from "remotion";
47579
+ import { Internals as Internals77 } from "remotion";
47463
47580
  var useIsStill = () => {
47464
- const resolved = Internals76.useResolvedVideoConfig(null);
47581
+ const resolved = Internals77.useResolvedVideoConfig(null);
47465
47582
  if (!resolved || resolved.type !== "success") {
47466
47583
  return false;
47467
47584
  }
@@ -47469,7 +47586,7 @@ var useIsStill = () => {
47469
47586
  };
47470
47587
  var useIsVideoComposition = () => {
47471
47588
  const isStill = useIsStill();
47472
- const { canvasContent } = useContext93(Internals76.CompositionManager);
47589
+ const { canvasContent } = useContext93(Internals77.CompositionManager);
47473
47590
  if (canvasContent === null) {
47474
47591
  return false;
47475
47592
  }
@@ -47534,7 +47651,7 @@ import {
47534
47651
  useRef as useRef53,
47535
47652
  useState as useState86
47536
47653
  } from "react";
47537
- import { Internals as Internals77 } from "remotion";
47654
+ import { Internals as Internals78 } from "remotion";
47538
47655
  import { jsxs as jsxs124 } from "react/jsx-runtime";
47539
47656
  var label6 = {
47540
47657
  color: WHITE,
@@ -47547,9 +47664,9 @@ var pushWithMaxSize = (arr, value, maxSize) => {
47547
47664
  return arr.slice(-maxSize);
47548
47665
  };
47549
47666
  var FpsCounter = ({ playbackSpeed }) => {
47550
- const videoConfig = Internals77.useUnsafeVideoConfig();
47551
- const [playing] = Internals77.Timeline.usePlayingState();
47552
- const frame2 = Internals77.Timeline.useTimelinePosition();
47667
+ const videoConfig = Internals78.useUnsafeVideoConfig();
47668
+ const [playing] = Internals78.Timeline.usePlayingState();
47669
+ const frame2 = Internals78.Timeline.useTimelinePosition();
47553
47670
  const [marker, rerender] = useState86({});
47554
47671
  const [fps, setFps] = useState86(0);
47555
47672
  const previousUpdates = useRef53([]);
@@ -47611,7 +47728,7 @@ var FpsCounter = ({ playbackSpeed }) => {
47611
47728
 
47612
47729
  // src/components/FullscreenToggle.tsx
47613
47730
  import { useCallback as useCallback147, useContext as useContext95, useEffect as useEffect71 } from "react";
47614
- import { Internals as Internals78 } from "remotion";
47731
+ import { Internals as Internals79 } from "remotion";
47615
47732
  import { NoReactInternals as NoReactInternals26 } from "remotion/no-react";
47616
47733
  import { jsx as jsx242 } from "react/jsx-runtime";
47617
47734
  var accessibilityLabel3 = [
@@ -47620,7 +47737,7 @@ var accessibilityLabel3 = [
47620
47737
  ].filter(NoReactInternals26.truthy).join(" ");
47621
47738
  var FullScreenToggle = () => {
47622
47739
  const keybindings = useKeybinding();
47623
- const { setSize } = useContext95(Internals78.PreviewSizeContext);
47740
+ const { setSize } = useContext95(Internals79.PreviewSizeContext);
47624
47741
  const onClick = useCallback147(() => {
47625
47742
  drawRef.current?.requestFullscreen();
47626
47743
  if (document.fullscreenElement)
@@ -47851,7 +47968,7 @@ var PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
47851
47968
 
47852
47969
  // src/components/PlaybackRatePersistor.tsx
47853
47970
  import { useEffect as useEffect73 } from "react";
47854
- import { Internals as Internals79 } from "remotion";
47971
+ import { Internals as Internals80 } from "remotion";
47855
47972
 
47856
47973
  // src/state/playbackrate.ts
47857
47974
  var key5 = "remotion.playbackrate";
@@ -47871,7 +47988,7 @@ var loadPlaybackRate = () => {
47871
47988
 
47872
47989
  // src/components/PlaybackRatePersistor.tsx
47873
47990
  var PlaybackRatePersistor = () => {
47874
- const { setPlaybackRate, playbackRate } = Internals79.usePlaybackRate();
47991
+ const { setPlaybackRate, playbackRate } = Internals80.usePlaybackRate();
47875
47992
  useEffect73(() => {
47876
47993
  setPlaybackRate(loadPlaybackRate());
47877
47994
  }, [setPlaybackRate]);
@@ -47883,7 +48000,7 @@ var PlaybackRatePersistor = () => {
47883
48000
 
47884
48001
  // src/components/PlaybackRateSelector.tsx
47885
48002
  import { useContext as useContext97, useMemo as useMemo157 } from "react";
47886
- import { Internals as Internals80 } from "remotion";
48003
+ import { Internals as Internals81 } from "remotion";
47887
48004
  import { jsx as jsx247 } from "react/jsx-runtime";
47888
48005
  var commonPlaybackRates = [
47889
48006
  -4,
@@ -47904,7 +48021,7 @@ var getPlaybackRateLabel = (playbackRate) => {
47904
48021
  var accessibilityLabel5 = "Change the playback rate";
47905
48022
  var comboStyle3 = { width: 80 };
47906
48023
  var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
47907
- const { canvasContent } = useContext97(Internals80.CompositionManager);
48024
+ const { canvasContent } = useContext97(Internals81.CompositionManager);
47908
48025
  const isStill = useIsStill();
47909
48026
  const style8 = useMemo157(() => {
47910
48027
  return {
@@ -47955,7 +48072,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
47955
48072
  // src/components/PlayPause.tsx
47956
48073
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
47957
48074
  import { useCallback as useCallback152, useEffect as useEffect74, useState as useState87 } from "react";
47958
- import { Internals as Internals81 } from "remotion";
48075
+ import { Internals as Internals82 } from "remotion";
47959
48076
 
47960
48077
  // src/icons/jump-to-start.tsx
47961
48078
  import { jsx as jsx248 } from "react/jsx-runtime";
@@ -48050,7 +48167,7 @@ var iconButton = {
48050
48167
  };
48051
48168
  var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }) => {
48052
48169
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
48053
- const videoConfig = Internals81.useUnsafeVideoConfig();
48170
+ const videoConfig = Internals82.useUnsafeVideoConfig();
48054
48171
  const [showBufferIndicator, setShowBufferState] = useState87(false);
48055
48172
  const {
48056
48173
  playing,
@@ -48276,7 +48393,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted })
48276
48393
  import { PlayerInternals as PlayerInternals17 } from "@remotion/player";
48277
48394
  import { useCallback as useCallback153, useContext as useContext98, useMemo as useMemo158, useRef as useRef54, useState as useState88 } from "react";
48278
48395
  import ReactDOM10 from "react-dom";
48279
- import { Internals as Internals82 } from "remotion";
48396
+ import { Internals as Internals83 } from "remotion";
48280
48397
  import { jsx as jsx254, jsxs as jsxs126, Fragment as Fragment42 } from "react/jsx-runtime";
48281
48398
  var splitButtonContainer = {
48282
48399
  display: "inline-flex",
@@ -48406,9 +48523,9 @@ var RenderButton = ({
48406
48523
  }
48407
48524
  };
48408
48525
  }, []);
48409
- const video = Internals82.useVideo();
48526
+ const video = Internals83.useVideo();
48410
48527
  const { getCurrentFrame: getCurrentFrame2 } = PlayerInternals17.usePlayer();
48411
- const { props } = useContext98(Internals82.EditorPropsContext);
48528
+ const { props } = useContext98(Internals83.EditorPropsContext);
48412
48529
  const openServerRenderModal = useCallback153((copyCommandOnly) => {
48413
48530
  if (!video) {
48414
48531
  return null;
@@ -48765,7 +48882,7 @@ var SnappingToggle = ({ disabled }) => {
48765
48882
 
48766
48883
  // src/components/Timeline/TimelineZoomControls.tsx
48767
48884
  import { useCallback as useCallback155, useContext as useContext100 } from "react";
48768
- import { Internals as Internals83 } from "remotion";
48885
+ import { Internals as Internals84 } from "remotion";
48769
48886
 
48770
48887
  // src/icons/minus.tsx
48771
48888
  import { jsx as jsx257 } from "react/jsx-runtime";
@@ -48797,7 +48914,7 @@ var iconStyle5 = {
48797
48914
  width: 14
48798
48915
  };
48799
48916
  var TimelineZoomControls = () => {
48800
- const { canvasContent } = useContext100(Internals83.CompositionManager);
48917
+ const { canvasContent } = useContext100(Internals84.CompositionManager);
48801
48918
  const { setZoom, zoom: zoomMap } = useContext100(TimelineZoomCtx);
48802
48919
  const { tabIndex } = useZIndex();
48803
48920
  const onMinusClicked = useCallback155(() => {
@@ -48936,10 +49053,10 @@ var PreviewToolbarControl = ({ children }) => {
48936
49053
  });
48937
49054
  };
48938
49055
  var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
48939
- const { playbackRate, setPlaybackRate } = Internals84.usePlaybackRate();
48940
- const { playerMuted } = useContext101(Internals84.MediaVolumeContext);
48941
- const { setPlayerMuted } = useContext101(Internals84.SetMediaVolumeContext);
48942
- const { canvasContent } = useContext101(Internals84.CompositionManager);
49056
+ const { playbackRate, setPlaybackRate } = Internals85.usePlaybackRate();
49057
+ const { playerMuted } = useContext101(Internals85.MediaVolumeContext);
49058
+ const { setPlayerMuted } = useContext101(Internals85.SetMediaVolumeContext);
49059
+ const { canvasContent } = useContext101(Internals85.CompositionManager);
48943
49060
  const isVideoComposition = useIsVideoComposition();
48944
49061
  const previewToolbarRef = useRef55(null);
48945
49062
  const leftScrollIndicatorRef = useRef55(null);
@@ -49456,7 +49573,7 @@ var useResponsiveSidebarStatus = () => {
49456
49573
  var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
49457
49574
  const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext104(SidebarContext);
49458
49575
  const rulersAreVisible = useIsRulerVisible();
49459
- const { canvasContent } = useContext104(Internals85.CompositionManager);
49576
+ const { canvasContent } = useContext104(Internals86.CompositionManager);
49460
49577
  const actualStateLeft = useResponsiveSidebarStatus();
49461
49578
  const actualStateRight = useMemo161(() => {
49462
49579
  if (sidebarCollapsedStateRight === "collapsed") {
@@ -50091,7 +50208,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
50091
50208
 
50092
50209
  // src/components/Timeline/Timeline.tsx
50093
50210
  import React213, { useCallback as useCallback171, useContext as useContext125, useMemo as useMemo185, useState as useState102 } from "react";
50094
- import { Internals as Internals103 } from "remotion";
50211
+ import { Internals as Internals104 } from "remotion";
50095
50212
 
50096
50213
  // src/components/Timeline/MaxTimelineTracks.tsx
50097
50214
  import { jsxs as jsxs134 } from "react/jsx-runtime";
@@ -50122,10 +50239,10 @@ var MaxTimelineTracksReached = () => {
50122
50239
 
50123
50240
  // src/components/Timeline/SequencePropsObserver.tsx
50124
50241
  import { useContext as useContext108, useEffect as useEffect82 } from "react";
50125
- import { Internals as Internals86 } from "remotion";
50242
+ import { Internals as Internals87 } from "remotion";
50126
50243
  var SequencePropsObserver = () => {
50127
50244
  const { subscribeToEvent } = useContext108(StudioServerConnectionCtx);
50128
- const { setPropStatuses } = useContext108(Internals86.VisualModeSettersContext);
50245
+ const { setPropStatuses } = useContext108(Internals87.VisualModeSettersContext);
50129
50246
  useEffect82(() => {
50130
50247
  const handleEvent = (event) => {
50131
50248
  if (event.type !== "sequence-props-updated") {
@@ -50170,11 +50287,11 @@ import {
50170
50287
  stringifySequenceSubscriptionKey as stringifySequenceSubscriptionKey2
50171
50288
  } from "@remotion/studio-shared";
50172
50289
  import { useContext as useContext109, useEffect as useEffect83, useMemo as useMemo164, useRef as useRef59 } from "react";
50173
- import { Internals as Internals88 } from "remotion";
50290
+ import { Internals as Internals89 } from "remotion";
50174
50291
 
50175
50292
  // src/components/Timeline/sequence-props-subscription-store.ts
50176
50293
  import { getAllSchemaKeys, getAssetSchemaKeys as getAssetSchemaKeys2 } from "@remotion/studio-shared";
50177
- import { Internals as Internals87 } from "remotion";
50294
+ import { Internals as Internals88 } from "remotion";
50178
50295
  var makeKey2 = ({
50179
50296
  fileName,
50180
50297
  line: line3,
@@ -50249,7 +50366,7 @@ var acquireSequencePropsSubscription = ({
50249
50366
  return;
50250
50367
  }
50251
50368
  current.applyOnce = null;
50252
- Internals87.Log.error(err);
50369
+ Internals88.Log.error(err);
50253
50370
  });
50254
50371
  }
50255
50372
  entry.refCount++;
@@ -50294,16 +50411,16 @@ var useSequencePropsSubscription = ({
50294
50411
  schema,
50295
50412
  effects
50296
50413
  }) => {
50297
- const { setPropStatuses } = useContext109(Internals88.VisualModeSettersContext);
50298
- const { setOverrideIdToNodePath } = useContext109(Internals88.OverrideIdsToNodePathsSettersContext);
50299
- const { overrideIdToNodePathMappings } = useContext109(Internals88.OverrideIdsToNodePathsGettersContext);
50414
+ const { setPropStatuses } = useContext109(Internals89.VisualModeSettersContext);
50415
+ const { setOverrideIdToNodePath } = useContext109(Internals89.OverrideIdsToNodePathsSettersContext);
50416
+ const { overrideIdToNodePathMappings } = useContext109(Internals89.OverrideIdsToNodePathsGettersContext);
50300
50417
  const { migrateExpandedTracksForSubscriptionKey: migrateExpandedTracksForSubscriptionKey2 } = useContext109(ExpandedTracksSetterContext);
50301
50418
  const { previewServerState: state } = useContext109(StudioServerConnectionCtx);
50302
50419
  const previousNodePathRef = useRef59(null);
50303
50420
  const overrideIdToNodePathMappingsRef = useRef59(overrideIdToNodePathMappings);
50304
50421
  overrideIdToNodePathMappingsRef.current = overrideIdToNodePathMappings;
50305
50422
  const clientId = state.type === "connected" ? state.clientId : undefined;
50306
- const videoConfig = Internals88.useUnsafeVideoConfig();
50423
+ const videoConfig = Internals89.useUnsafeVideoConfig();
50307
50424
  const effectsSignature = useMemo164(() => effects.map((effect) => getAllSchemaKeys2(effect).join("\x00")).join("\x00\x00"), [effects]);
50308
50425
  const validatedLocation = useMemo164(() => {
50309
50426
  if (!originalLocation || !originalLocation.source || !originalLocation.line) {
@@ -50410,11 +50527,11 @@ import React192, {
50410
50527
  useRef as useRef62,
50411
50528
  useState as useState94
50412
50529
  } from "react";
50413
- import { Internals as Internals91, useVideoConfig as useVideoConfig11 } from "remotion";
50530
+ import { Internals as Internals92, useVideoConfig as useVideoConfig11 } from "remotion";
50414
50531
 
50415
50532
  // src/components/Timeline/TimelineTimeIndicators.tsx
50416
50533
  import { useContext as useContext110, useEffect as useEffect85, useMemo as useMemo166, useRef as useRef61 } from "react";
50417
- import { Internals as Internals90 } from "remotion";
50534
+ import { Internals as Internals91 } from "remotion";
50418
50535
 
50419
50536
  // src/components/TimeValue.tsx
50420
50537
  import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
@@ -50424,7 +50541,7 @@ import {
50424
50541
  useImperativeHandle as useImperativeHandle13,
50425
50542
  useRef as useRef60
50426
50543
  } from "react";
50427
- import { Internals as Internals89, useCurrentFrame } from "remotion";
50544
+ import { Internals as Internals90, useCurrentFrame } from "remotion";
50428
50545
  import { jsx as jsx270, jsxs as jsxs135 } from "react/jsx-runtime";
50429
50546
  var text = {
50430
50547
  color: WHITE,
@@ -50451,7 +50568,7 @@ var frameStyle = {
50451
50568
  };
50452
50569
  var TimeValue = () => {
50453
50570
  const frame2 = useCurrentFrame();
50454
- const config = Internals89.useUnsafeVideoConfig();
50571
+ const config = Internals90.useUnsafeVideoConfig();
50455
50572
  const isStill = useIsStill();
50456
50573
  const { seek, play, pause, toggle } = PlayerInternals20.usePlayer();
50457
50574
  const keybindings = useKeybinding();
@@ -50462,7 +50579,7 @@ var TimeValue = () => {
50462
50579
  const onValueChange = useCallback162((val) => {
50463
50580
  seek(val);
50464
50581
  }, [seek]);
50465
- useImperativeHandle13(Internals89.timeValueRef, () => ({
50582
+ useImperativeHandle13(Internals90.timeValueRef, () => ({
50466
50583
  goToFrame: () => {
50467
50584
  ref2.current?.click();
50468
50585
  },
@@ -50572,7 +50689,7 @@ var TimelineTimePadding = () => {
50572
50689
  };
50573
50690
  var TimelineTimeIndicators = () => {
50574
50691
  const sliderTrack = useContext110(TimelineWidthContext);
50575
- const video = Internals90.useVideo();
50692
+ const video = Internals91.useVideo();
50576
50693
  if (sliderTrack === null) {
50577
50694
  return null;
50578
50695
  }
@@ -50687,9 +50804,9 @@ var getClientXWithScroll = (x) => {
50687
50804
  return x + scrollableRef.current?.scrollLeft;
50688
50805
  };
50689
50806
  var TimelineDragHandler = () => {
50690
- const video = Internals91.useUnsafeVideoConfig();
50807
+ const video = Internals92.useUnsafeVideoConfig();
50691
50808
  const { zoom: zoomMap } = useContext111(TimelineZoomCtx);
50692
- const { canvasContent } = useContext111(Internals91.CompositionManager);
50809
+ const { canvasContent } = useContext111(Internals92.CompositionManager);
50693
50810
  const containerStyle9 = useMemo167(() => {
50694
50811
  if (!canvasContent || canvasContent.type !== "composition") {
50695
50812
  return {};
@@ -50718,7 +50835,7 @@ var TimelineDragHandlerInner = () => {
50718
50835
  shouldApplyCssTransforms: true
50719
50836
  });
50720
50837
  const { isHighestContext } = useZIndex();
50721
- const setFrame = Internals91.useTimelineSetFrame();
50838
+ const setFrame = Internals92.useTimelineSetFrame();
50722
50839
  const width = scrollableRef.current?.scrollWidth ?? 0;
50723
50840
  const left3 = size3?.left ?? 0;
50724
50841
  const [dragging, setDragging] = useState94({
@@ -50850,7 +50967,7 @@ var TimelineDragHandlerInner = () => {
50850
50967
  });
50851
50968
  setFrame((c) => {
50852
50969
  const newObj = { ...c, [videoConfig.id]: frame2 };
50853
- Internals91.persistCurrentFrame(newObj);
50970
+ Internals92.persistCurrentFrame(newObj);
50854
50971
  return newObj;
50855
50972
  });
50856
50973
  if (dragging.wasPlaying) {
@@ -50903,15 +51020,15 @@ import React193, { useMemo as useMemo169 } from "react";
50903
51020
 
50904
51021
  // src/components/Timeline/use-timeline-height.ts
50905
51022
  import { useContext as useContext112, useMemo as useMemo168 } from "react";
50906
- import { Internals as Internals92 } from "remotion";
51023
+ import { Internals as Internals93 } from "remotion";
50907
51024
  var useTimelineHeight = ({
50908
51025
  shown,
50909
51026
  hasBeenCut
50910
51027
  }) => {
50911
51028
  const { getIsExpanded } = useContext112(ExpandedTracksGetterContext);
50912
51029
  const { previewServerState } = useContext112(StudioServerConnectionCtx);
50913
- const { propStatuses } = useContext112(Internals92.VisualModePropStatusesContext);
50914
- const { getDragOverrides, getEffectDragOverrides } = useContext112(Internals92.VisualModeDragOverridesContext);
51030
+ const { propStatuses } = useContext112(Internals93.VisualModePropStatusesContext);
51031
+ const { getDragOverrides, getEffectDragOverrides } = useContext112(Internals93.VisualModeDragOverridesContext);
50915
51032
  const { selectedItems } = useTimelineSelection();
50916
51033
  const previewServerConnected = previewServerState.type === "connected";
50917
51034
  const selectedRowKeys = useMemo168(() => getSelectedTimelineExpandedRowKeys(selectedItems), [selectedItems]);
@@ -51000,11 +51117,11 @@ import React196, {
51000
51117
  useMemo as useMemo171,
51001
51118
  useState as useState95
51002
51119
  } from "react";
51003
- import { Internals as Internals94, useVideoConfig as useVideoConfig13 } from "remotion";
51120
+ import { Internals as Internals95, useVideoConfig as useVideoConfig13 } from "remotion";
51004
51121
 
51005
51122
  // src/components/Timeline/TimelineInOutPointer.tsx
51006
51123
  import { createRef as createRef11, useContext as useContext113 } from "react";
51007
- import { Internals as Internals93 } from "remotion";
51124
+ import { Internals as Internals94 } from "remotion";
51008
51125
  import { jsx as jsx274, jsxs as jsxs136, Fragment as Fragment47 } from "react/jsx-runtime";
51009
51126
  var areaHighlight = {
51010
51127
  position: "absolute",
@@ -51018,7 +51135,7 @@ var inMarkerAreaRef = createRef11();
51018
51135
  var outMarkerAreaRef = createRef11();
51019
51136
  var TimelineInOutPointer = () => {
51020
51137
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
51021
- const videoConfig = Internals93.useUnsafeVideoConfig();
51138
+ const videoConfig = Internals94.useUnsafeVideoConfig();
51022
51139
  const timelineWidth = useContext113(TimelineWidthContext);
51023
51140
  if (!videoConfig || timelineWidth === null) {
51024
51141
  return null;
@@ -51102,8 +51219,8 @@ var getClientXWithScroll2 = (x) => {
51102
51219
  return x + scrollableRef.current?.scrollLeft;
51103
51220
  };
51104
51221
  var TimelineInOutDragHandler = () => {
51105
- const video = Internals94.useUnsafeVideoConfig();
51106
- const { canvasContent } = useContext115(Internals94.CompositionManager);
51222
+ const video = Internals95.useUnsafeVideoConfig();
51223
+ const { canvasContent } = useContext115(Internals95.CompositionManager);
51107
51224
  if (!canvasContent || canvasContent.type !== "composition") {
51108
51225
  return null;
51109
51226
  }
@@ -51371,7 +51488,7 @@ var TimelineInOutDragHandlerInnerMemo = React196.memo(TimelineInOutDragHandlerIn
51371
51488
 
51372
51489
  // src/components/Timeline/TimelineSequenceItem.tsx
51373
51490
  import React200, { useCallback as useCallback167, useContext as useContext116, useMemo as useMemo176, useState as useState97 } from "react";
51374
- import { Internals as Internals96 } from "remotion";
51491
+ import { Internals as Internals97 } from "remotion";
51375
51492
 
51376
51493
  // src/components/Timeline/TimelineExpandedSection.tsx
51377
51494
  import React197, { useMemo as useMemo172 } from "react";
@@ -51444,7 +51561,7 @@ var TimelineExpandedSection = ({
51444
51561
 
51445
51562
  // src/components/Timeline/TimelineMediaInfo.tsx
51446
51563
  import { useMemo as useMemo173 } from "react";
51447
- import { Internals as Internals95 } from "remotion";
51564
+ import { Internals as Internals96 } from "remotion";
51448
51565
  import { jsx as jsx278 } from "react/jsx-runtime";
51449
51566
  var lineStyle = {
51450
51567
  whiteSpace: "nowrap",
@@ -51474,7 +51591,7 @@ var useAssetLink = (src) => {
51474
51591
  };
51475
51592
  };
51476
51593
  var TimelineMediaInfo = ({ src }) => {
51477
- const fileName = useMemo173(() => Internals95.getAssetDisplayName(src), [src]);
51594
+ const fileName = useMemo173(() => Internals96.getAssetDisplayName(src), [src]);
51478
51595
  const { linkInfo, fileNameStyle } = useAssetLink(src);
51479
51596
  return /* @__PURE__ */ jsx278("div", {
51480
51597
  style: fileNameStyle,
@@ -51789,7 +51906,7 @@ var TimelineSequenceItem = ({
51789
51906
  const previewInteractive = previewConnected && studioInteractivityEnabled;
51790
51907
  const { getIsExpanded } = useContext116(ExpandedTracksGetterContext);
51791
51908
  const { toggleTrack } = useContext116(ExpandedTracksSetterContext);
51792
- const { setPropStatuses } = useContext116(Internals96.VisualModeSettersContext);
51909
+ const { setPropStatuses } = useContext116(Internals97.VisualModeSettersContext);
51793
51910
  const { setSelectedModal } = useContext116(ModalsContext);
51794
51911
  const { isHighestContext } = useKeybinding();
51795
51912
  const selectAsset = useSelectAsset();
@@ -51801,7 +51918,7 @@ var TimelineSequenceItem = ({
51801
51918
  const [isRenaming, setIsRenaming] = useState97(false);
51802
51919
  const [sequenceDropIndicator, setSequenceDropIndicator] = useState97(null);
51803
51920
  const [sequenceDropRejection, setSequenceDropRejection] = useState97(null);
51804
- const timelinePosition = Internals96.Timeline.useTimelinePosition();
51921
+ const timelinePosition = Internals97.Timeline.useTimelinePosition();
51805
51922
  const { canOpenInEditor, openInEditor: openInEditor2, originalLocation } = useOpenSequenceInEditor(sequence);
51806
51923
  const fileLocation = useMemo176(() => formatFileLocation({
51807
51924
  location: originalLocation,
@@ -51831,7 +51948,7 @@ var TimelineSequenceItem = ({
51831
51948
  });
51832
51949
  const timelineDisplayName = sequence.displayName === "" && connectedCompositions.length === 1 ? connectedCompositions[0].id : displayName;
51833
51950
  const canDeleteFromSource = Boolean(nodePath && validatedLocation?.source);
51834
- const nodePathKey = useMemo176(() => nodePath ? Internals96.makeSequencePropsSubscriptionKey(nodePath) : null, [nodePath]);
51951
+ const nodePathKey = useMemo176(() => nodePath ? Internals97.makeSequencePropsSubscriptionKey(nodePath) : null, [nodePath]);
51835
51952
  const parentId = sequence.parent ?? null;
51836
51953
  const canReorderSequence = previewInteractive && Boolean(nodePath && nodePathKey && validatedLocation?.source) && nodePathInfo?.numberOfSequencesWithThisNodePath === 1;
51837
51954
  const canHandleSequenceDrag = previewInteractive;
@@ -52136,11 +52253,23 @@ var TimelineSequenceItem = ({
52136
52253
  }
52137
52254
  e.stopPropagation();
52138
52255
  if (action2 === "open-connected-composition") {
52139
- selectComposition(connectedCompositions[0], true);
52256
+ selectComposition(connectedCompositions[0], true, getConnectedCompositionFrame({
52257
+ timelinePosition,
52258
+ sequence,
52259
+ sequenceFrameOffset
52260
+ }));
52140
52261
  return;
52141
52262
  }
52142
52263
  openInEditor2();
52143
- }, [canOpenInEditor, connectedCompositions, openInEditor2, selectComposition]);
52264
+ }, [
52265
+ canOpenInEditor,
52266
+ connectedCompositions,
52267
+ openInEditor2,
52268
+ selectComposition,
52269
+ sequence,
52270
+ sequenceFrameOffset,
52271
+ timelinePosition
52272
+ ]);
52144
52273
  const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
52145
52274
  const canRenameSelectedSequence = canRenameThisSequence && selected && selectedItems.length === 1 && selectedItems[0]?.type === "sequence";
52146
52275
  const onCancelRenaming = useCallback167(() => {
@@ -52465,12 +52594,12 @@ var TimelineList = ({ timeline }) => {
52465
52594
 
52466
52595
  // src/components/Timeline/TimelinePinchZoom.tsx
52467
52596
  import { useCallback as useCallback168, useContext as useContext117, useEffect as useEffect89, useRef as useRef64 } from "react";
52468
- import { Internals as Internals97 } from "remotion";
52597
+ import { Internals as Internals98 } from "remotion";
52469
52598
  var ZOOM_WHEEL_DELTA = 0.06;
52470
52599
  var TimelinePinchZoom = () => {
52471
52600
  const isVideoComposition = useIsVideoComposition();
52472
- const videoConfig = Internals97.useUnsafeVideoConfig();
52473
- const { canvasContent } = useContext117(Internals97.CompositionManager);
52601
+ const videoConfig = Internals98.useUnsafeVideoConfig();
52602
+ const { canvasContent } = useContext117(Internals98.CompositionManager);
52474
52603
  const { zoom, setZoom } = useContext117(TimelineZoomCtx);
52475
52604
  const { editorZoomGestures } = useContext117(EditorZoomGesturesContext);
52476
52605
  const zoomRef = useRef64(zoom);
@@ -52682,14 +52811,14 @@ var TimelinePinchZoom = () => {
52682
52811
 
52683
52812
  // src/components/Timeline/TimelinePlayCursorSyncer.tsx
52684
52813
  import { useContext as useContext118, useEffect as useEffect90 } from "react";
52685
- import { Internals as Internals98 } from "remotion";
52814
+ import { Internals as Internals99 } from "remotion";
52686
52815
  var lastTimelinePositionWhileScrolling = null;
52687
52816
  var TimelinePlayCursorSyncer = () => {
52688
- const video = Internals98.useVideo();
52689
- const timelinePosition = Internals98.Timeline.useTimelinePosition();
52690
- const [playing] = Internals98.Timeline.usePlayingState();
52691
- const { playbackRate } = Internals98.usePlaybackRate();
52692
- const { canvasContent } = useContext118(Internals98.CompositionManager);
52817
+ const video = Internals99.useVideo();
52818
+ const timelinePosition = Internals99.Timeline.useTimelinePosition();
52819
+ const [playing] = Internals99.Timeline.usePlayingState();
52820
+ const { playbackRate } = Internals99.usePlaybackRate();
52821
+ const { canvasContent } = useContext118(Internals99.CompositionManager);
52693
52822
  const { zoom: zoomMap } = useContext118(TimelineZoomCtx);
52694
52823
  const compositionId = canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null;
52695
52824
  const zoom = compositionId ? zoomMap[compositionId] ?? TIMELINE_MIN_ZOOM : null;
@@ -52915,7 +53044,7 @@ var TimelineExpandedKeyframeRow = React203.memo(TimelineExpandedKeyframeRowUnmem
52915
53044
  // src/components/Timeline/use-expanded-track-keyframe-rows.ts
52916
53045
  import { canEditEasingForInterpolationFunction as canEditEasingForInterpolationFunction4 } from "@remotion/studio-shared";
52917
53046
  import { useContext as useContext121, useMemo as useMemo179 } from "react";
52918
- import { Internals as Internals99 } from "remotion";
53047
+ import { Internals as Internals100 } from "remotion";
52919
53048
  var getNodeCanEditEasing = ({
52920
53049
  node,
52921
53050
  nodePath,
@@ -52925,10 +53054,10 @@ var getNodeCanEditEasing = ({
52925
53054
  return false;
52926
53055
  }
52927
53056
  if (node.field.kind === "sequence-field") {
52928
- const sequencePropStatus = Internals99.getPropStatusesCtx(propStatuses, nodePath)?.[node.field.key];
53057
+ const sequencePropStatus = Internals100.getPropStatusesCtx(propStatuses, nodePath)?.[node.field.key];
52929
53058
  return sequencePropStatus?.status === "keyframed" && canEditEasingForInterpolationFunction4(sequencePropStatus.interpolationFunction);
52930
53059
  }
52931
- const effectStatus = Internals99.getEffectPropStatusesCtx({
53060
+ const effectStatus = Internals100.getEffectPropStatusesCtx({
52932
53061
  propStatuses,
52933
53062
  nodePath,
52934
53063
  effectIndex: node.field.effectIndex
@@ -52942,10 +53071,10 @@ var useExpandedTrackKeyframeRows = ({
52942
53071
  keyframeDisplayOffset
52943
53072
  }) => {
52944
53073
  const { getIsExpanded } = useContext121(ExpandedTracksGetterContext);
52945
- const { propStatuses } = useContext121(Internals99.VisualModePropStatusesContext);
52946
- const { getDragOverrides, getEffectDragOverrides } = useContext121(Internals99.VisualModeDragOverridesContext);
53074
+ const { propStatuses } = useContext121(Internals100.VisualModePropStatusesContext);
53075
+ const { getDragOverrides, getEffectDragOverrides } = useContext121(Internals100.VisualModeDragOverridesContext);
52947
53076
  const { selectedItems } = useTimelineSelection();
52948
- const timelinePosition = Internals99.Timeline.useTimelinePosition();
53077
+ const timelinePosition = Internals100.Timeline.useTimelinePosition();
52949
53078
  const tree = useMemo179(() => buildTimelineTree({
52950
53079
  sequence,
52951
53080
  nodePathInfo,
@@ -53048,7 +53177,7 @@ var TimelineExpandedTrackKeyframes = React204.memo(TimelineExpandedTrackKeyframe
53048
53177
 
53049
53178
  // src/components/Timeline/TimelineSequence.tsx
53050
53179
  import React210, { useCallback as useCallback170, useContext as useContext123, useMemo as useMemo182, useRef as useRef70 } from "react";
53051
- import { Internals as Internals102, useCurrentFrame as useCurrentFrame2 } from "remotion";
53180
+ import { Internals as Internals103, useCurrentFrame as useCurrentFrame2 } from "remotion";
53052
53181
 
53053
53182
  // src/helpers/get-timeline-sequence-layout.ts
53054
53183
  var SEQUENCE_BORDER_WIDTH = 1;
@@ -53176,7 +53305,7 @@ import {
53176
53305
  sliceWaveformPeaks
53177
53306
  } from "@remotion/timeline-utils";
53178
53307
  import { useEffect as useEffect92, useMemo as useMemo180, useRef as useRef66, useState as useState99 } from "react";
53179
- import { Internals as Internals100 } from "remotion";
53308
+ import { Internals as Internals101 } from "remotion";
53180
53309
  import { jsx as jsx286, jsxs as jsxs144 } from "react/jsx-runtime";
53181
53310
  var EMPTY_PEAKS = new Float32Array(0);
53182
53311
  var canRetryCanvasTransfer = (err) => {
@@ -53274,7 +53403,7 @@ var AudioWaveform = ({
53274
53403
  const [error, setError] = useState99(null);
53275
53404
  const [waveformCanvasKey, setWaveformCanvasKey] = useState99(0);
53276
53405
  const canUseWorkerPath = useMemo180(() => canUseAudioWaveformWorker(), []);
53277
- const vidConf = Internals100.useUnsafeVideoConfig();
53406
+ const vidConf = Internals101.useUnsafeVideoConfig();
53278
53407
  if (vidConf === null) {
53279
53408
  throw new Error("Expected video config");
53280
53409
  }
@@ -53680,7 +53809,7 @@ import {
53680
53809
  useRef as useRef68,
53681
53810
  useState as useState100
53682
53811
  } from "react";
53683
- import { Internals as Internals101 } from "remotion";
53812
+ import { Internals as Internals102 } from "remotion";
53684
53813
  import { NoReactInternals as NoReactInternals29 } from "remotion/no-react";
53685
53814
  import { jsx as jsx291 } from "react/jsx-runtime";
53686
53815
  var HANDLE_WIDTH3 = 6;
@@ -53698,7 +53827,7 @@ var getKeyframedSequenceDragTargets = ({
53698
53827
  sequence,
53699
53828
  propStatuses
53700
53829
  }) => {
53701
- const status = propStatuses[Internals101.makeSequencePropsSubscriptionKey(nodePath)];
53830
+ const status = propStatuses[Internals102.makeSequencePropsSubscriptionKey(nodePath)];
53702
53831
  if (status === null || status === undefined || !status.canUpdate) {
53703
53832
  return { effectKeyframes: [], sequenceKeyframes: [] };
53704
53833
  }
@@ -53739,21 +53868,21 @@ var canUpdateDurationInFrames = ({
53739
53868
  propStatuses,
53740
53869
  nodePath
53741
53870
  }) => {
53742
- const status = Internals101.getPropStatusesCtx(propStatuses, nodePath)?.durationInFrames?.status;
53871
+ const status = Internals102.getPropStatusesCtx(propStatuses, nodePath)?.durationInFrames?.status;
53743
53872
  return status === "static";
53744
53873
  };
53745
53874
  var canUpdateFrom = ({
53746
53875
  propStatuses,
53747
53876
  nodePath
53748
53877
  }) => {
53749
- const status = Internals101.getPropStatusesCtx(propStatuses, nodePath)?.from?.status;
53878
+ const status = Internals102.getPropStatusesCtx(propStatuses, nodePath)?.from?.status;
53750
53879
  return status === "static";
53751
53880
  };
53752
53881
  var canUpdateTrimBefore = ({
53753
53882
  propStatuses,
53754
53883
  nodePath
53755
53884
  }) => {
53756
- const status = Internals101.getPropStatusesCtx(propStatuses, nodePath)?.trimBefore?.status;
53885
+ const status = Internals102.getPropStatusesCtx(propStatuses, nodePath)?.trimBefore?.status;
53757
53886
  return status === "static";
53758
53887
  };
53759
53888
  var isTimelineSequenceDurationDraggable = (sequence) => {
@@ -54093,10 +54222,10 @@ var clearFromDragOverrides = ({
54093
54222
  }
54094
54223
  };
54095
54224
  var TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
54096
- const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(Internals101.VisualModeSettersContext);
54097
- const propStatusesRef = useContext122(Internals101.VisualModePropStatusesRefContext);
54098
- const sequencesRef = useContext122(Internals101.SequenceManagerRefContext);
54099
- const { overrideIdToNodePathMappings } = useContext122(Internals101.OverrideIdsToNodePathsGettersContext);
54225
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(Internals102.VisualModeSettersContext);
54226
+ const propStatusesRef = useContext122(Internals102.VisualModePropStatusesRefContext);
54227
+ const sequencesRef = useContext122(Internals102.SequenceManagerRefContext);
54228
+ const { overrideIdToNodePathMappings } = useContext122(Internals102.OverrideIdsToNodePathsGettersContext);
54100
54229
  const { previewServerState } = useContext122(StudioServerConnectionCtx);
54101
54230
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
54102
54231
  const [dragging, setDragging] = useState100(false);
@@ -54151,7 +54280,7 @@ var TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineD
54151
54280
  redoLabel: dragState.targets.length > 1 ? "Resize selected sequences back" : "Resize sequence back"
54152
54281
  });
54153
54282
  savePromise.catch((err) => {
54154
- Internals101.Log.error({ logLevel: "error", tag: null }, "Could not save left edge drag", err);
54283
+ Internals102.Log.error({ logLevel: "error", tag: null }, "Could not save left edge drag", err);
54155
54284
  }).finally(() => {
54156
54285
  clearLeftEdgeDragOverrides({
54157
54286
  clearDragOverrides: latestClear,
@@ -54221,9 +54350,9 @@ var TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineD
54221
54350
  initialTrimBefore: target.initialTrimBefore,
54222
54351
  deltaFrames
54223
54352
  });
54224
- latestRef.current.setDragOverrides(target.nodePath, "from", Internals101.makeStaticDragOverride(nextValues.from));
54225
- latestRef.current.setDragOverrides(target.nodePath, "durationInFrames", Internals101.makeStaticDragOverride(nextValues.durationInFrames));
54226
- latestRef.current.setDragOverrides(target.nodePath, "trimBefore", Internals101.makeStaticDragOverride(nextValues.trimBefore));
54353
+ latestRef.current.setDragOverrides(target.nodePath, "from", Internals102.makeStaticDragOverride(nextValues.from));
54354
+ latestRef.current.setDragOverrides(target.nodePath, "durationInFrames", Internals102.makeStaticDragOverride(nextValues.durationInFrames));
54355
+ latestRef.current.setDragOverrides(target.nodePath, "trimBefore", Internals102.makeStaticDragOverride(nextValues.trimBefore));
54227
54356
  }
54228
54357
  };
54229
54358
  const onUp = (e) => {
@@ -54278,10 +54407,10 @@ var useTimelineSequenceFromDrag = ({
54278
54407
  clearDragOverrides,
54279
54408
  setEffectDragOverrides,
54280
54409
  clearEffectDragOverrides
54281
- } = useContext122(Internals101.VisualModeSettersContext);
54282
- const propStatusesRef = useContext122(Internals101.VisualModePropStatusesRefContext);
54283
- const sequencesRef = useContext122(Internals101.SequenceManagerRefContext);
54284
- const { overrideIdToNodePathMappings } = useContext122(Internals101.OverrideIdsToNodePathsGettersContext);
54410
+ } = useContext122(Internals102.VisualModeSettersContext);
54411
+ const propStatusesRef = useContext122(Internals102.VisualModePropStatusesRefContext);
54412
+ const sequencesRef = useContext122(Internals102.SequenceManagerRefContext);
54413
+ const { overrideIdToNodePathMappings } = useContext122(Internals102.OverrideIdsToNodePathsGettersContext);
54285
54414
  const { previewServerState } = useContext122(StudioServerConnectionCtx);
54286
54415
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
54287
54416
  const [dragging, setDragging] = useState100(false);
@@ -54349,7 +54478,7 @@ var useTimelineSequenceFromDrag = ({
54349
54478
  redoLabel: dragState.targets.length > 1 ? "Move selected sequences back" : "Move sequence back"
54350
54479
  });
54351
54480
  savePromise.catch((err) => {
54352
- Internals101.Log.error({ logLevel: "error", tag: null }, "Could not save from", err);
54481
+ Internals102.Log.error({ logLevel: "error", tag: null }, "Could not save from", err);
54353
54482
  }).finally(() => {
54354
54483
  clearFromDragOverrides({
54355
54484
  clearDragOverrides: latestClear,
@@ -54419,7 +54548,7 @@ var useTimelineSequenceFromDrag = ({
54419
54548
  initialFrom: target.initialFrom,
54420
54549
  deltaFrames
54421
54550
  });
54422
- latestRef.current.setDragOverrides(target.nodePath, "from", Internals101.makeStaticDragOverride(nextFrom));
54551
+ latestRef.current.setDragOverrides(target.nodePath, "from", Internals102.makeStaticDragOverride(nextFrom));
54423
54552
  for (const keyframeTarget of target.sequenceKeyframes) {
54424
54553
  latestRef.current.setDragOverrides(target.nodePath, keyframeTarget.fieldKey, {
54425
54554
  type: "keyframed",
@@ -54474,10 +54603,10 @@ var useTimelineSequenceFromDrag = ({
54474
54603
  };
54475
54604
  };
54476
54605
  var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
54477
- const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(Internals101.VisualModeSettersContext);
54478
- const propStatusesRef = useContext122(Internals101.VisualModePropStatusesRefContext);
54479
- const sequencesRef = useContext122(Internals101.SequenceManagerRefContext);
54480
- const { overrideIdToNodePathMappings } = useContext122(Internals101.OverrideIdsToNodePathsGettersContext);
54606
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(Internals102.VisualModeSettersContext);
54607
+ const propStatusesRef = useContext122(Internals102.VisualModePropStatusesRefContext);
54608
+ const sequencesRef = useContext122(Internals102.SequenceManagerRefContext);
54609
+ const { overrideIdToNodePathMappings } = useContext122(Internals102.OverrideIdsToNodePathsGettersContext);
54481
54610
  const { previewServerState } = useContext122(StudioServerConnectionCtx);
54482
54611
  const currentSelection = useCurrentTimelineSelectionStateAsRef();
54483
54612
  const [dragging, setDragging] = useState100(false);
@@ -54532,7 +54661,7 @@ var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeline
54532
54661
  redoLabel: changes.length > 1 ? "Resize selected sequences back" : "Resize sequence back"
54533
54662
  });
54534
54663
  savePromise.catch((err) => {
54535
- Internals101.Log.error({ logLevel: "error", tag: null }, "Could not save durationInFrames", err);
54664
+ Internals102.Log.error({ logLevel: "error", tag: null }, "Could not save durationInFrames", err);
54536
54665
  }).finally(() => {
54537
54666
  clearDurationDragOverrides({
54538
54667
  clearDragOverrides: latestClear,
@@ -54596,7 +54725,7 @@ var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeline
54596
54725
  const deltaFrames = Math.round(dx / dragState.pxPerFrame);
54597
54726
  dragState.latestDeltaFrames = deltaFrames;
54598
54727
  for (const target of dragState.targets) {
54599
- latestRef.current.setDragOverrides(target.nodePath, "durationInFrames", Internals101.makeStaticDragOverride(getTimelineSequenceDurationDragValue({
54728
+ latestRef.current.setDragOverrides(target.nodePath, "durationInFrames", Internals102.makeStaticDragOverride(getTimelineSequenceDurationDragValue({
54600
54729
  initialDuration: target.initialDuration,
54601
54730
  deltaFrames
54602
54731
  })));
@@ -55071,7 +55200,7 @@ var TimelineVideoInfo = ({
55071
55200
 
55072
55201
  // src/components/Timeline/TimelineSequence.tsx
55073
55202
  import { jsx as jsx293, jsxs as jsxs149 } from "react/jsx-runtime";
55074
- var TimelineSequenceFn = ({ s, nodePathInfo, sequenceFrameOffset }) => {
55203
+ var TimelineSequenceFn = ({ s, connectedCompositions, nodePathInfo, sequenceFrameOffset }) => {
55075
55204
  const windowWidth = useContext123(TimelineWidthContext);
55076
55205
  if (windowWidth === null) {
55077
55206
  return null;
@@ -55079,6 +55208,7 @@ var TimelineSequenceFn = ({ s, nodePathInfo, sequenceFrameOffset }) => {
55079
55208
  return /* @__PURE__ */ jsx293(TimelineSequenceInner, {
55080
55209
  windowWidth,
55081
55210
  s,
55211
+ connectedCompositions,
55082
55212
  nodePathInfo,
55083
55213
  sequenceFrameOffset
55084
55214
  });
@@ -55094,7 +55224,8 @@ var TimelineSequenceCurrentFrame = ({
55094
55224
  sequenceFrameOffset,
55095
55225
  fromCanUpdate,
55096
55226
  frozenFrame,
55097
- onMoveDragPointerDown
55227
+ onMoveDragPointerDown,
55228
+ onDoubleClick
55098
55229
  }) => {
55099
55230
  const ref2 = useRef70(null);
55100
55231
  const { onSelect, selectable, selected, selectionItem } = useTimelineRowSelection(nodePathInfo);
@@ -55139,6 +55270,7 @@ var TimelineSequenceCurrentFrame = ({
55139
55270
  style: actualStyle,
55140
55271
  title: s.displayName,
55141
55272
  onPointerDown: selectable ? onPointerDown : undefined,
55273
+ onDoubleClick,
55142
55274
  children: [
55143
55275
  premountWidth ? /* @__PURE__ */ jsx293("div", {
55144
55276
  style: {
@@ -55187,8 +55319,14 @@ var TimelineSequenceCurrentFrame = ({
55187
55319
  ]
55188
55320
  });
55189
55321
  };
55190
- var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset }) => {
55191
- const video = Internals102.useVideo();
55322
+ var TimelineSequenceInner = ({
55323
+ s,
55324
+ connectedCompositions,
55325
+ windowWidth,
55326
+ nodePathInfo,
55327
+ sequenceFrameOffset
55328
+ }) => {
55329
+ const video = Internals103.useVideo();
55192
55330
  const maxMediaDuration = useMaxMediaDuration(s, video?.fps ?? 30);
55193
55331
  const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
55194
55332
  const originalLocation = useResolveStackAndReactToChange(s.getStack);
@@ -55202,10 +55340,10 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
55202
55340
  column: originalLocation.column ?? 0
55203
55341
  };
55204
55342
  }, [originalLocation]);
55205
- const { propStatuses } = useContext123(Internals102.VisualModePropStatusesContext);
55343
+ const { propStatuses } = useContext123(Internals103.VisualModePropStatusesContext);
55206
55344
  const nodePath = nodePathInfo?.sequenceSubscriptionKey ?? null;
55207
55345
  const propStatusesForOverride = useMemo182(() => {
55208
- return nodePath ? Internals102.getPropStatusesCtx(propStatuses, nodePath) : undefined;
55346
+ return nodePath ? Internals103.getPropStatusesCtx(propStatuses, nodePath) : undefined;
55209
55347
  }, [propStatuses, nodePath]);
55210
55348
  const durationCanUpdate = Boolean(studioInteractivityEnabled && propStatusesForOverride?.durationInFrames?.status === "static");
55211
55349
  const fromCanUpdate = Boolean(studioInteractivityEnabled && propStatusesForOverride?.from?.status === "static");
@@ -55213,9 +55351,10 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
55213
55351
  const { previewServerState } = useContext123(StudioServerConnectionCtx);
55214
55352
  const previewConnected = previewServerState.type === "connected";
55215
55353
  const previewInteractive = previewConnected && studioInteractivityEnabled;
55216
- const { setPropStatuses } = useContext123(Internals102.VisualModeSettersContext);
55217
- const timelinePosition = Internals102.Timeline.useTimelinePosition();
55354
+ const { setPropStatuses } = useContext123(Internals103.VisualModeSettersContext);
55355
+ const timelinePosition = Internals103.Timeline.useTimelinePosition();
55218
55356
  const selectAsset = useSelectAsset();
55357
+ const selectComposition = useSelectComposition();
55219
55358
  const confirm = useConfirmationDialog();
55220
55359
  const { onSelect, selectable } = useTimelineRowSelection(nodePathInfo);
55221
55360
  const fileLocation = useMemo182(() => formatFileLocation({
@@ -55231,6 +55370,39 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
55231
55370
  showNotification(err.message, 2000);
55232
55371
  });
55233
55372
  }, [canOpenInEditor, originalLocation]);
55373
+ const onSequenceDoubleClick = useCallback170((e) => {
55374
+ if (isTimelineSelectionModifierEvent(e)) {
55375
+ e.stopPropagation();
55376
+ return;
55377
+ }
55378
+ const action2 = getSequenceDoubleClickAction({
55379
+ button: e.button,
55380
+ canOpenInEditor,
55381
+ numberOfConnectedCompositions: connectedCompositions.length
55382
+ });
55383
+ if (action2 === null) {
55384
+ return;
55385
+ }
55386
+ e.stopPropagation();
55387
+ if (action2 === "open-connected-composition") {
55388
+ selectComposition(connectedCompositions[0], true, getConnectedCompositionFrame({
55389
+ timelinePosition,
55390
+ sequence: s,
55391
+ sequenceFrameOffset
55392
+ }));
55393
+ return;
55394
+ }
55395
+ openInEditor2();
55396
+ }, [
55397
+ canOpenInEditor,
55398
+ connectedCompositions,
55399
+ openInEditor2,
55400
+ s,
55401
+ selectComposition,
55402
+ sequenceFrameOffset,
55403
+ timelinePosition
55404
+ ]);
55405
+ const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
55234
55406
  const canDeleteFromSource = Boolean(nodePath && validatedLocation?.source);
55235
55407
  const deleteDisabled = !previewInteractive || !s.controls || !canDeleteFromSource;
55236
55408
  const duplicateDisabled = deleteDisabled;
@@ -55410,6 +55582,7 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
55410
55582
  fromCanUpdate,
55411
55583
  frozenFrame,
55412
55584
  onMoveDragPointerDown,
55585
+ onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined,
55413
55586
  children: [
55414
55587
  s.type === "audio" ? /* @__PURE__ */ jsx293(AudioWaveform, {
55415
55588
  src: s.src,
@@ -55489,6 +55662,7 @@ var TimelineTrackUnmemoized = ({ track }) => {
55489
55662
  }) : null,
55490
55663
  /* @__PURE__ */ jsx294(TimelineSequence, {
55491
55664
  s: track.sequence,
55665
+ connectedCompositions: track.connectedCompositions ?? [],
55492
55666
  nodePathInfo: track.nodePathInfo,
55493
55667
  sequenceFrameOffset: track.sequenceFrameOffset
55494
55668
  })
@@ -55552,8 +55726,8 @@ var noop3 = () => {
55552
55726
  return;
55553
55727
  };
55554
55728
  var TimelineContextMenuArea = ({ children }) => {
55555
- const { compositions, canvasContent } = useContext125(Internals103.CompositionManager);
55556
- const videoConfig = Internals103.useUnsafeVideoConfig();
55729
+ const { compositions, canvasContent } = useContext125(Internals104.CompositionManager);
55730
+ const videoConfig = Internals104.useUnsafeVideoConfig();
55557
55731
  const [isAddingSolid, setIsAddingSolid] = useState102(false);
55558
55732
  const [isAddingAsset, setIsAddingAsset] = useState102(false);
55559
55733
  const { previewServerState } = useContext125(StudioServerConnectionCtx);
@@ -55615,6 +55789,7 @@ var TimelineContextMenuArea = ({ children }) => {
55615
55789
  files,
55616
55790
  compositionFile,
55617
55791
  compositionId: currentCompositionId,
55792
+ destinationDimensions: null,
55618
55793
  dropPosition: null
55619
55794
  });
55620
55795
  } finally {
@@ -55659,11 +55834,11 @@ var TimelineContextMenuArea = ({ children }) => {
55659
55834
  });
55660
55835
  };
55661
55836
  var TimelineInner = () => {
55662
- const { sequences } = useContext125(Internals103.SequenceManager);
55663
- const { compositions } = useContext125(Internals103.CompositionManager);
55664
- const videoConfig = Internals103.useUnsafeVideoConfig();
55837
+ const { sequences } = useContext125(Internals104.SequenceManager);
55838
+ const { compositions } = useContext125(Internals104.CompositionManager);
55839
+ const videoConfig = Internals104.useUnsafeVideoConfig();
55665
55840
  const isStill = useIsStill();
55666
- const { overrideIdToNodePathMappings } = useContext125(Internals103.OverrideIdsToNodePathsGettersContext);
55841
+ const { overrideIdToNodePathMappings } = useContext125(Internals104.OverrideIdsToNodePathsGettersContext);
55667
55842
  const { previewServerState } = useContext125(StudioServerConnectionCtx);
55668
55843
  const previewConnected = previewServerState.type === "connected";
55669
55844
  const previewInteractive = previewConnected && studioInteractivityEnabled;
@@ -55811,7 +55986,7 @@ var StudioClearSelectionArea = ({ children }) => {
55811
55986
  });
55812
55987
  };
55813
55988
  var EditorContent = ({ readOnlyStudio, children }) => {
55814
- const { canvasContent } = useContext126(Internals104.CompositionManager);
55989
+ const { canvasContent } = useContext126(Internals105.CompositionManager);
55815
55990
  const showTimeline = canvasContent !== null && canvasContent.type === "composition";
55816
55991
  const content6 = /* @__PURE__ */ jsxs153(SplitterContainer, {
55817
55992
  orientation: "horizontal",
@@ -56427,7 +56602,7 @@ import { useCallback as useCallback177, useContext as useContext132, useMemo as
56427
56602
 
56428
56603
  // src/components/RenderModal/ResolveCompositionBeforeModal.tsx
56429
56604
  import React218, { useContext as useContext130, useEffect as useEffect99, useMemo as useMemo187 } from "react";
56430
- import { Internals as Internals105 } from "remotion";
56605
+ import { Internals as Internals106 } from "remotion";
56431
56606
  import { jsx as jsx303, jsxs as jsxs157 } from "react/jsx-runtime";
56432
56607
  var loaderContainer2 = {
56433
56608
  paddingTop: 40,
@@ -56447,11 +56622,11 @@ var loaderLabel2 = {
56447
56622
  };
56448
56623
  var ResolvedCompositionContext = React218.createContext(null);
56449
56624
  var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
56450
- const resolved = Internals105.useResolvedVideoConfig(compositionId);
56451
- const unresolvedContext = useContext130(Internals105.CompositionManager);
56625
+ const resolved = Internals106.useResolvedVideoConfig(compositionId);
56626
+ const unresolvedContext = useContext130(Internals106.CompositionManager);
56452
56627
  const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
56453
56628
  useEffect99(() => {
56454
- const { current } = Internals105.resolveCompositionsRef;
56629
+ const { current } = Internals106.resolveCompositionsRef;
56455
56630
  if (!current) {
56456
56631
  throw new Error("No ref to trigger composition calc");
56457
56632
  }
@@ -56911,7 +57086,7 @@ var DeleteFolder = ({ folderName, parentName, stack: stack2 }) => {
56911
57086
 
56912
57087
  // src/components/NewComposition/DuplicateComposition.tsx
56913
57088
  import { useCallback as useCallback180, useContext as useContext133, useMemo as useMemo191, useState as useState105 } from "react";
56914
- import { Internals as Internals106 } from "remotion";
57089
+ import { Internals as Internals107 } from "remotion";
56915
57090
 
56916
57091
  // src/components/NewComposition/InputAndValidationContainer.tsx
56917
57092
  import { jsx as jsx308 } from "react/jsx-runtime";
@@ -57011,7 +57186,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
57011
57186
  const hadFpsDefined = unresolved.fps !== undefined;
57012
57187
  const hadDurationDefined = unresolved.durationInFrames !== undefined;
57013
57188
  const [selectedFrameRate, setFrameRate] = useState105(resolved.result.fps);
57014
- const { compositions } = useContext133(Internals106.CompositionManager);
57189
+ const { compositions } = useContext133(Internals107.CompositionManager);
57015
57190
  const [type, setType] = useState105(initialCompType);
57016
57191
  const [newId, setName] = useState105(() => {
57017
57192
  const numberAtEnd = resolved.result.id.match(/([0-9]+)$/)?.[0];
@@ -57370,11 +57545,11 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
57370
57545
 
57371
57546
  // src/components/NewComposition/NewComposition.tsx
57372
57547
  import { useCallback as useCallback182, useContext as useContext135, useState as useState106 } from "react";
57373
- import { Internals as Internals108 } from "remotion";
57548
+ import { Internals as Internals109 } from "remotion";
57374
57549
 
57375
57550
  // src/helpers/use-create-composition.ts
57376
57551
  import { useCallback as useCallback181, useContext as useContext134, useMemo as useMemo192 } from "react";
57377
- import { Internals as Internals107 } from "remotion";
57552
+ import { Internals as Internals108 } from "remotion";
57378
57553
  var toPascalCase = (value) => {
57379
57554
  const words = value.match(/[a-zA-Z0-9]+/g) ?? [];
57380
57555
  const candidate = words.map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1)}`).join("");
@@ -57418,7 +57593,7 @@ var useCreateComposition = ({
57418
57593
  selectedFrameRate,
57419
57594
  size: size3
57420
57595
  }) => {
57421
- const { setCanvasContent } = useContext134(Internals107.CompositionSetters);
57596
+ const { setCanvasContent } = useContext134(Internals108.CompositionSetters);
57422
57597
  const componentName = useMemo192(() => toPascalCase(newId), [newId]);
57423
57598
  const nameValidationMessage = useMemo192(() => {
57424
57599
  return validateCompositionName(newId, compositions);
@@ -57504,8 +57679,8 @@ var folderPathStyle = {
57504
57679
  fontSize: 14
57505
57680
  };
57506
57681
  var NewCompositionLoaded = ({ folderName, parentName, stack: stack2 }) => {
57507
- const { compositions } = useContext135(Internals108.CompositionManager);
57508
- const resolvedComposition = Internals108.useResolvedVideoConfig(null);
57682
+ const { compositions } = useContext135(Internals109.CompositionManager);
57683
+ const resolvedComposition = Internals109.useResolvedVideoConfig(null);
57509
57684
  const initialComposition = resolvedComposition?.type === "success" || resolvedComposition?.type === "success-and-refreshing" ? resolvedComposition.result : null;
57510
57685
  const initialDimensions = getNewCompositionDefaults(initialComposition);
57511
57686
  const [newId, setName] = useState106(() => getUniqueCompositionName(compositions));
@@ -57803,17 +57978,17 @@ import {
57803
57978
  useRef as useRef72,
57804
57979
  useState as useState107
57805
57980
  } from "react";
57806
- import { Internals as Internals110 } from "remotion";
57981
+ import { Internals as Internals111 } from "remotion";
57807
57982
 
57808
57983
  // src/helpers/validate-new-folder-name.ts
57809
- import { Internals as Internals109 } from "remotion";
57984
+ import { Internals as Internals110 } from "remotion";
57810
57985
  var validateNewFolderName = ({
57811
57986
  folders,
57812
57987
  newName,
57813
57988
  parentName
57814
57989
  }) => {
57815
- if (!Internals109.isFolderNameValid(newName)) {
57816
- return Internals109.invalidFolderNameErrorMessage;
57990
+ if (!Internals110.isFolderNameValid(newName)) {
57991
+ return Internals110.invalidFolderNameErrorMessage;
57817
57992
  }
57818
57993
  if (folders.find((folder) => {
57819
57994
  return folder.name === newName && folder.parent === parentName;
@@ -57847,7 +58022,7 @@ var getUniqueFolderName = ({
57847
58022
  }
57848
58023
  };
57849
58024
  var NewFolder = ({ parentName, stack: stack2 }) => {
57850
- const { folders } = useContext136(Internals110.CompositionManager);
58025
+ const { folders } = useContext136(Internals111.CompositionManager);
57851
58026
  const [newName, setName] = useState107(() => getUniqueFolderName({ folders, parentName }));
57852
58027
  const inputRef = useRef72(null);
57853
58028
  useEffect101(() => {
@@ -57975,7 +58150,7 @@ import {
57975
58150
  useRef as useRef73,
57976
58151
  useState as useState108
57977
58152
  } from "react";
57978
- import { Internals as Internals111 } from "remotion";
58153
+ import { Internals as Internals112 } from "remotion";
57979
58154
  import { jsx as jsx313, jsxs as jsxs166, Fragment as Fragment57 } from "react/jsx-runtime";
57980
58155
  var content12 = {
57981
58156
  padding: 12,
@@ -57991,7 +58166,7 @@ var RenameCompositionLoaded = () => {
57991
58166
  }
57992
58167
  const { resolved, unresolved } = context;
57993
58168
  const compositionStack = unresolved.stack ?? null;
57994
- const { compositions } = useContext137(Internals111.CompositionManager);
58169
+ const { compositions } = useContext137(Internals112.CompositionManager);
57995
58170
  const [newId, setName] = useState108(() => {
57996
58171
  return resolved.result.id;
57997
58172
  });
@@ -58109,7 +58284,7 @@ import {
58109
58284
  useRef as useRef74,
58110
58285
  useState as useState109
58111
58286
  } from "react";
58112
- import { Internals as Internals112 } from "remotion";
58287
+ import { Internals as Internals113 } from "remotion";
58113
58288
 
58114
58289
  // src/helpers/validate-folder-rename.ts
58115
58290
  var validateFolderRename = ({
@@ -58134,7 +58309,7 @@ var content13 = {
58134
58309
  minWidth: 500
58135
58310
  };
58136
58311
  var RenameFolder = ({ folderName, parentName, stack: stack2 }) => {
58137
- const { folders } = useContext138(Internals112.CompositionManager);
58312
+ const { folders } = useContext138(Internals113.CompositionManager);
58138
58313
  const [newName, setName] = useState109(folderName);
58139
58314
  const inputRef = useRef74(null);
58140
58315
  useEffect103(() => {
@@ -58386,7 +58561,7 @@ var RenameStaticFileModal = ({ relativePath }) => {
58386
58561
 
58387
58562
  // src/components/OverrideInputProps.tsx
58388
58563
  import { useCallback as useCallback187, useContext as useContext140, useMemo as useMemo196, useState as useState111 } from "react";
58389
- import { Internals as Internals113 } from "remotion";
58564
+ import { Internals as Internals114 } from "remotion";
58390
58565
  import { jsx as jsx316, jsxs as jsxs169 } from "react/jsx-runtime";
58391
58566
  var style10 = {
58392
58567
  padding: 12,
@@ -58422,7 +58597,7 @@ var isValidJSON = (value) => {
58422
58597
  };
58423
58598
  var Inner = () => {
58424
58599
  const [value, setValue] = useState111(() => {
58425
- const override = Internals113.getInputPropsOverride();
58600
+ const override = Internals114.getInputPropsOverride();
58426
58601
  if (override) {
58427
58602
  return JSON.stringify(override, null, 2);
58428
58603
  }
@@ -58437,14 +58612,14 @@ var Inner = () => {
58437
58612
  const onChange = useCallback187((newValue) => {
58438
58613
  if (newValue.trim() === "") {
58439
58614
  setValue(null);
58440
- Internals113.setInputPropsOverride(null);
58615
+ Internals114.setInputPropsOverride(null);
58441
58616
  return;
58442
58617
  }
58443
58618
  setValue(newValue);
58444
58619
  if (!isValidJSON(newValue)) {
58445
58620
  return;
58446
58621
  }
58447
- Internals113.setInputPropsOverride(JSON.parse(newValue));
58622
+ Internals114.setInputPropsOverride(JSON.parse(newValue));
58448
58623
  }, [setValue]);
58449
58624
  const onReset = useCallback187(() => {
58450
58625
  onChange("");
@@ -58515,7 +58690,7 @@ import {
58515
58690
  useRef as useRef77,
58516
58691
  useState as useState113
58517
58692
  } from "react";
58518
- import { Internals as Internals114 } from "remotion";
58693
+ import { Internals as Internals115 } from "remotion";
58519
58694
 
58520
58695
  // src/icons/keys.tsx
58521
58696
  import { jsx as jsx317 } from "react/jsx-runtime";
@@ -59868,7 +60043,7 @@ var mapModeToQuery = (mode) => {
59868
60043
  throw new Error("no mode" + mode);
59869
60044
  };
59870
60045
  var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
59871
- const { compositions } = useContext141(Internals114.CompositionManager);
60046
+ const { compositions } = useContext141(Internals115.CompositionManager);
59872
60047
  const [state, setState] = useState113(() => {
59873
60048
  return {
59874
60049
  query: mapModeToQuery(initialMode),
@@ -59916,7 +60091,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
59916
60091
  selectComposition(c, true);
59917
60092
  setSelectedModal(null);
59918
60093
  const selector = `.__remotion-composition[data-compname="${c.id}"]`;
59919
- Internals114.compositionSelectorRef.current?.expandComposition(c.id);
60094
+ Internals115.compositionSelectorRef.current?.expandComposition(c.id);
59920
60095
  waitForElm(selector).then(() => {
59921
60096
  document.querySelector(selector)?.scrollIntoView({ block: "center" });
59922
60097
  });
@@ -67778,7 +67953,7 @@ var Modals = ({ readOnlyStudio }) => {
67778
67953
 
67779
67954
  // src/components/SequencePropsSubscriptionProvider.tsx
67780
67955
  import { useState as useState126, useCallback as useCallback216, useMemo as useMemo218 } from "react";
67781
- import { Internals as Internals115 } from "remotion";
67956
+ import { Internals as Internals116 } from "remotion";
67782
67957
  import { jsx as jsx373 } from "react/jsx-runtime";
67783
67958
  var SequencePropsSubscriptionProvider = ({ children }) => {
67784
67959
  const [overrideToNodePathMap, setOverrideIdToNodePathMap] = useState126({});
@@ -67797,9 +67972,9 @@ var SequencePropsSubscriptionProvider = ({ children }) => {
67797
67972
  const setters = useMemo218(() => {
67798
67973
  return { setOverrideIdToNodePath };
67799
67974
  }, [setOverrideIdToNodePath]);
67800
- return /* @__PURE__ */ jsx373(Internals115.OverrideIdsToNodePathsGettersContext.Provider, {
67975
+ return /* @__PURE__ */ jsx373(Internals116.OverrideIdsToNodePathsGettersContext.Provider, {
67801
67976
  value: getters,
67802
- children: /* @__PURE__ */ jsx373(Internals115.OverrideIdsToNodePathsSettersContext.Provider, {
67977
+ children: /* @__PURE__ */ jsx373(Internals116.OverrideIdsToNodePathsSettersContext.Provider, {
67803
67978
  value: setters,
67804
67979
  children
67805
67980
  })
@@ -67898,7 +68073,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
67898
68073
  children: /* @__PURE__ */ jsx375(TimelineZoomContext, {
67899
68074
  children: /* @__PURE__ */ jsxs207(SequencePropsSubscriptionProvider, {
67900
68075
  children: [
67901
- /* @__PURE__ */ jsxs207(Internals116.CurrentScaleContext.Provider, {
68076
+ /* @__PURE__ */ jsxs207(Internals117.CurrentScaleContext.Provider, {
67902
68077
  value,
67903
68078
  children: [
67904
68079
  /* @__PURE__ */ jsx375(ForceSpecificCursor, {}),
@@ -67906,11 +68081,11 @@ var Editor = ({ Root, readOnlyStudio }) => {
67906
68081
  children: /* @__PURE__ */ jsxs207("div", {
67907
68082
  style: background,
67908
68083
  children: [
67909
- /* @__PURE__ */ jsx375(Internals116.CompositionRenderErrorContext.Provider, {
68084
+ /* @__PURE__ */ jsx375(Internals117.CompositionRenderErrorContext.Provider, {
67910
68085
  value: compositionRenderErrorContextValue,
67911
68086
  children: canvasMounted ? /* @__PURE__ */ jsx375(MemoRoot, {}) : null
67912
68087
  }),
67913
- /* @__PURE__ */ jsx375(Internals116.CanUseRemotionHooksProvider, {
68088
+ /* @__PURE__ */ jsx375(Internals117.CanUseRemotionHooksProvider, {
67914
68089
  children: /* @__PURE__ */ jsx375(RenderErrorContext.Provider, {
67915
68090
  value: renderErrorContextValue,
67916
68091
  children: /* @__PURE__ */ jsx375(EditorContent, {
@@ -67948,7 +68123,7 @@ import { PlayerInternals as PlayerInternals24 } from "@remotion/player";
67948
68123
 
67949
68124
  // src/state/preview-size.tsx
67950
68125
  import { useCallback as useCallback218, useContext as useContext147, useMemo as useMemo221, useState as useState128 } from "react";
67951
- import { Internals as Internals117 } from "remotion";
68126
+ import { Internals as Internals118 } from "remotion";
67952
68127
  import { jsx as jsx376 } from "react/jsx-runtime";
67953
68128
  var key7 = "remotion.previewSize";
67954
68129
  var persistPreviewSizeOption = (option) => {
@@ -67997,7 +68172,7 @@ var PreviewSizeProvider = ({ children }) => {
67997
68172
  setTranslation
67998
68173
  };
67999
68174
  }, [editorZoomGestures, size3, setSize, translation]);
68000
- return /* @__PURE__ */ jsx376(Internals117.PreviewSizeContext.Provider, {
68175
+ return /* @__PURE__ */ jsx376(Internals118.PreviewSizeContext.Provider, {
68001
68176
  value: previewSizeCtx,
68002
68177
  children
68003
68178
  });
@@ -68029,7 +68204,7 @@ var CheckerboardProvider = ({ children }) => {
68029
68204
 
68030
68205
  // src/components/MediaVolumeProvider.tsx
68031
68206
  import { useMemo as useMemo223, useState as useState130 } from "react";
68032
- import { Internals as Internals118 } from "remotion";
68207
+ import { Internals as Internals119 } from "remotion";
68033
68208
  import { jsx as jsx378 } from "react/jsx-runtime";
68034
68209
  var MediaVolumeProvider = ({ children }) => {
68035
68210
  const [playerMuted, setPlayerMuted] = useState130(() => loadMuteOption());
@@ -68046,9 +68221,9 @@ var MediaVolumeProvider = ({ children }) => {
68046
68221
  setMediaVolume
68047
68222
  };
68048
68223
  }, []);
68049
- return /* @__PURE__ */ jsx378(Internals118.MediaVolumeContext.Provider, {
68224
+ return /* @__PURE__ */ jsx378(Internals119.MediaVolumeContext.Provider, {
68050
68225
  value: mediaVolumeContextValue,
68051
- children: /* @__PURE__ */ jsx378(Internals118.SetMediaVolumeContext.Provider, {
68226
+ children: /* @__PURE__ */ jsx378(Internals119.SetMediaVolumeContext.Provider, {
68052
68227
  value: setMediaVolumeContextValue,
68053
68228
  children
68054
68229
  })
@@ -68423,7 +68598,7 @@ var FastRefreshProvider = ({ children }) => {
68423
68598
  };
68424
68599
 
68425
68600
  // src/helpers/inject-css.ts
68426
- import { Internals as Internals119 } from "remotion";
68601
+ import { Internals as Internals120 } from "remotion";
68427
68602
  var makeDefaultGlobalCSS = () => {
68428
68603
  const unhoveredDragAreaFactor = 2;
68429
68604
  const fromMiddle = 50 / unhoveredDragAreaFactor;
@@ -68434,12 +68609,10 @@ var makeDefaultGlobalCSS = () => {
68434
68609
  --remotion-cli-internals-blue: ${BLUE};
68435
68610
  --remotion-cli-internals-blue-hovered: ${BLUE_HOVERED};
68436
68611
  overscroll-behavior-y: none;
68437
- overscroll-behavior-x: none;
68438
68612
  }
68439
68613
 
68440
68614
  body {
68441
68615
  overscroll-behavior-y: none;
68442
- overscroll-behavior-x: none;
68443
68616
  /* Override Chakra UI position: relative on body */
68444
68617
  position: static !important;
68445
68618
  }
@@ -68578,7 +68751,7 @@ var injectCSS = () => {
68578
68751
  if (injected) {
68579
68752
  return;
68580
68753
  }
68581
- Internals119.CSSUtils.injectCSS(makeDefaultGlobalCSS());
68754
+ Internals120.CSSUtils.injectCSS(makeDefaultGlobalCSS());
68582
68755
  injected = true;
68583
68756
  };
68584
68757
 
@@ -68591,19 +68764,19 @@ import {
68591
68764
  useMemo as useMemo232,
68592
68765
  useState as useState139
68593
68766
  } from "react";
68594
- import { getInputProps as getInputProps2, Internals as Internals120 } from "remotion";
68767
+ import { getInputProps as getInputProps2, Internals as Internals121 } from "remotion";
68595
68768
  import { jsx as jsx389 } from "react/jsx-runtime";
68596
68769
  var ResolveCompositionConfigInStudio = ({ children }) => {
68597
68770
  const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState139(null);
68598
- const { compositions, canvasContent, currentCompositionMetadata } = useContext150(Internals120.CompositionManager);
68771
+ const { compositions, canvasContent, currentCompositionMetadata } = useContext150(Internals121.CompositionManager);
68599
68772
  const { fastRefreshes, manualRefreshes } = useContext150(FastRefreshContext);
68600
68773
  if (manualRefreshes) {}
68601
68774
  const selectedComposition = useMemo232(() => {
68602
68775
  return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
68603
68776
  }, [canvasContent, compositions]);
68604
68777
  const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
68605
- const { props: allEditorProps } = useContext150(Internals120.EditorPropsContext);
68606
- const env = Internals120.getRemotionEnvironment();
68778
+ const { props: allEditorProps } = useContext150(Internals121.EditorPropsContext);
68779
+ const env = Internals121.getRemotionEnvironment();
68607
68780
  const inputProps = useMemo232(() => {
68608
68781
  return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
68609
68782
  }, [env.isPlayer]);
@@ -68630,7 +68803,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
68630
68803
  return controller;
68631
68804
  }
68632
68805
  const { signal } = controller;
68633
- const result = Internals120.resolveVideoConfigWithMetadataOrCatch({
68806
+ const result = Internals121.resolveVideoConfigWithMetadataOrCatch({
68634
68807
  compositionId,
68635
68808
  calculateMetadata,
68636
68809
  inputProps: combinedProps,
@@ -68724,7 +68897,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
68724
68897
  ...inputProps ?? {}
68725
68898
  };
68726
68899
  const controller = new AbortController;
68727
- const result = Internals120.resolveVideoConfigWithMetadataOrCatch({
68900
+ const result = Internals121.resolveVideoConfigWithMetadataOrCatch({
68728
68901
  compositionId: composition.id,
68729
68902
  calculateMetadata: composition.calculateMetadata,
68730
68903
  inputProps: combinedProps,
@@ -68749,7 +68922,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
68749
68922
  }));
68750
68923
  return resolved.videoConfig;
68751
68924
  }, [allEditorProps, compositions, inputProps]);
68752
- useImperativeHandle14(Internals120.resolveCompositionsRef, () => {
68925
+ useImperativeHandle14(Internals121.resolveCompositionsRef, () => {
68753
68926
  return {
68754
68927
  setCurrentRenderModalComposition: (id) => {
68755
68928
  setCurrentRenderModalComposition(id);
@@ -68891,7 +69064,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
68891
69064
  }, {})
68892
69065
  };
68893
69066
  }, [compositions, resolvedConfigs]);
68894
- return /* @__PURE__ */ jsx389(Internals120.ResolveCompositionContext.Provider, {
69067
+ return /* @__PURE__ */ jsx389(Internals121.ResolveCompositionContext.Provider, {
68895
69068
  value: resolvedConfigsIncludingStaticOnes,
68896
69069
  children
68897
69070
  });
@@ -68903,12 +69076,12 @@ var getServerDisconnectedDomElement = () => {
68903
69076
  return document.getElementById("server-disconnected-overlay");
68904
69077
  };
68905
69078
  var StudioInner = ({ rootComponent, readOnly }) => {
68906
- return /* @__PURE__ */ jsx390(Internals121.CompositionManagerProvider, {
69079
+ return /* @__PURE__ */ jsx390(Internals122.CompositionManagerProvider, {
68907
69080
  onlyRenderComposition: null,
68908
69081
  currentCompositionMetadata: null,
68909
69082
  initialCompositions: [],
68910
69083
  initialCanvasContent: null,
68911
- children: /* @__PURE__ */ jsx390(Internals121.RemotionRootContexts, {
69084
+ children: /* @__PURE__ */ jsx390(Internals122.RemotionRootContexts, {
68912
69085
  frameState: null,
68913
69086
  audioEnabled: window.remotion_audioEnabled,
68914
69087
  videoEnabled: window.remotion_videoEnabled,