@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.
- package/dist/components/Canvas.js +3 -0
- package/dist/components/InitialCompositionLoader.d.ts +1 -1
- package/dist/components/InitialCompositionLoader.js +6 -1
- package/dist/components/Timeline/Timeline.js +1 -0
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +3 -0
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +2 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
- package/dist/components/Timeline/TimelineSequence.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequence.js +42 -6
- package/dist/components/Timeline/TimelineSequenceItem.js +14 -2
- package/dist/components/Timeline/TimelineTrack.js +2 -1
- package/dist/components/Timeline/call-delete-keyframe.d.ts +1 -0
- package/dist/components/Timeline/call-delete-keyframe.js +4 -0
- package/dist/components/Timeline/delete-selected-keyframe.d.ts +4 -2
- package/dist/components/Timeline/delete-selected-keyframe.js +48 -5
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -1
- package/dist/components/Timeline/delete-selected-timeline-item.js +3 -1
- package/dist/components/import-assets.d.ts +25 -3
- package/dist/components/import-assets.js +54 -15
- package/dist/esm/{chunk-mndqr3zx.js → chunk-tdncqycp.js} +702 -529
- package/dist/esm/internals.mjs +702 -529
- package/dist/esm/previewEntry.mjs +701 -528
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/get-sequence-double-click-action.d.ts +6 -0
- package/dist/helpers/get-sequence-double-click-action.js +10 -1
- package/dist/helpers/inject-css.js +0 -2
- package/package.json +11 -11
|
@@ -24,7 +24,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
24
24
|
|
|
25
25
|
// src/previewEntry.tsx
|
|
26
26
|
import ReactDOM12 from "react-dom/client";
|
|
27
|
-
import { Internals as
|
|
27
|
+
import { Internals as Internals123 } from "remotion";
|
|
28
28
|
import { NoReactInternals as NoReactInternals32 } from "remotion/no-react";
|
|
29
29
|
|
|
30
30
|
// src/components/NoRegisterRoot.tsx
|
|
@@ -258,7 +258,7 @@ var getRoute = () => {
|
|
|
258
258
|
};
|
|
259
259
|
|
|
260
260
|
// src/error-overlay/react-overlay/index.ts
|
|
261
|
-
import { Internals as
|
|
261
|
+
import { Internals as Internals85 } from "remotion";
|
|
262
262
|
|
|
263
263
|
// src/error-overlay/error-origin.ts
|
|
264
264
|
var errorsLoggedByServer = new WeakSet;
|
|
@@ -5603,7 +5603,7 @@ var InlineAction = ({
|
|
|
5603
5603
|
|
|
5604
5604
|
// src/components/TopPanel.tsx
|
|
5605
5605
|
import React185, { useCallback as useCallback155, useContext as useContext103, useEffect as useEffect78, useMemo as useMemo160 } from "react";
|
|
5606
|
-
import { Internals as
|
|
5606
|
+
import { Internals as Internals83 } from "remotion";
|
|
5607
5607
|
|
|
5608
5608
|
// src/helpers/use-breakpoint.ts
|
|
5609
5609
|
import { useEffect as useEffect16, useRef as useRef11, useState as useState17 } from "react";
|
|
@@ -5627,7 +5627,7 @@ function useBreakpoint(breakpoint2) {
|
|
|
5627
5627
|
|
|
5628
5628
|
// src/components/CanvasIfSizeIsAvailable.tsx
|
|
5629
5629
|
import { useContext as useContext35, useMemo as useMemo53 } from "react";
|
|
5630
|
-
import { Internals as
|
|
5630
|
+
import { Internals as Internals40 } from "remotion";
|
|
5631
5631
|
|
|
5632
5632
|
// src/helpers/ruler-canvas-size.ts
|
|
5633
5633
|
var applyRulerInsetsToCanvasSize = ({
|
|
@@ -5648,7 +5648,7 @@ var applyRulerInsetsToCanvasSize = ({
|
|
|
5648
5648
|
|
|
5649
5649
|
// src/components/CanvasOrLoading.tsx
|
|
5650
5650
|
import { useContext as useContext34, useEffect as useEffect43 } from "react";
|
|
5651
|
-
import { Internals as
|
|
5651
|
+
import { Internals as Internals39 } from "remotion";
|
|
5652
5652
|
|
|
5653
5653
|
// src/error-overlay/remotion-overlay/ErrorLoader.tsx
|
|
5654
5654
|
import { getLocationFromBuildError as getLocationFromBuildError3 } from "@remotion/studio-shared";
|
|
@@ -7756,7 +7756,7 @@ import {
|
|
|
7756
7756
|
useRef as useRef30,
|
|
7757
7757
|
useState as useState39
|
|
7758
7758
|
} from "react";
|
|
7759
|
-
import { Internals as
|
|
7759
|
+
import { Internals as Internals37, watchStaticFile } from "remotion";
|
|
7760
7760
|
|
|
7761
7761
|
// src/helpers/get-asset-metadata.ts
|
|
7762
7762
|
import { getVideoMetadata } from "@remotion/media-utils";
|
|
@@ -8245,7 +8245,7 @@ var ConfirmationDialog = ({ state }) => {
|
|
|
8245
8245
|
|
|
8246
8246
|
// src/components/EditorGuides/index.tsx
|
|
8247
8247
|
import { useContext as useContext19, useMemo as useMemo39 } from "react";
|
|
8248
|
-
import { Internals as
|
|
8248
|
+
import { Internals as Internals24 } from "remotion";
|
|
8249
8249
|
|
|
8250
8250
|
// src/helpers/use-studio-canvas-dimensions.ts
|
|
8251
8251
|
import { PlayerInternals as PlayerInternals7 } from "@remotion/player";
|
|
@@ -8700,7 +8700,7 @@ import {
|
|
|
8700
8700
|
useState as useState26
|
|
8701
8701
|
} from "react";
|
|
8702
8702
|
import {
|
|
8703
|
-
Internals as
|
|
8703
|
+
Internals as Internals23
|
|
8704
8704
|
} from "remotion";
|
|
8705
8705
|
|
|
8706
8706
|
// src/helpers/interactivity-enabled.ts
|
|
@@ -9058,7 +9058,7 @@ import {
|
|
|
9058
9058
|
} from "@remotion/studio-shared";
|
|
9059
9059
|
import { useContext as useContext15, useEffect as useEffect27, useRef as useRef17 } from "react";
|
|
9060
9060
|
import {
|
|
9061
|
-
Internals as
|
|
9061
|
+
Internals as Internals19
|
|
9062
9062
|
} from "remotion";
|
|
9063
9063
|
|
|
9064
9064
|
// src/components/Timeline/call-add-keyframe.ts
|
|
@@ -9389,7 +9389,8 @@ var callDeleteKeyframes = ({
|
|
|
9389
9389
|
previous: prev,
|
|
9390
9390
|
keyframes: keyframes.map((keyframe) => ({
|
|
9391
9391
|
fieldKey: keyframe.fieldKey,
|
|
9392
|
-
frame: keyframe.sourceFrame
|
|
9392
|
+
frame: keyframe.sourceFrame,
|
|
9393
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
9393
9394
|
}))
|
|
9394
9395
|
}));
|
|
9395
9396
|
}
|
|
@@ -9403,7 +9404,8 @@ var callDeleteKeyframes = ({
|
|
|
9403
9404
|
keyframes: keyframes.map((keyframe) => ({
|
|
9404
9405
|
effectIndex: keyframe.effectIndex,
|
|
9405
9406
|
fieldKey: keyframe.fieldKey,
|
|
9406
|
-
frame: keyframe.sourceFrame
|
|
9407
|
+
frame: keyframe.sourceFrame,
|
|
9408
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
9407
9409
|
}))
|
|
9408
9410
|
}));
|
|
9409
9411
|
}
|
|
@@ -9413,7 +9415,8 @@ var callDeleteKeyframes = ({
|
|
|
9413
9415
|
nodePath: keyframe.nodePath,
|
|
9414
9416
|
key: keyframe.fieldKey,
|
|
9415
9417
|
frame: keyframe.sourceFrame,
|
|
9416
|
-
schema: keyframe.schema
|
|
9418
|
+
schema: keyframe.schema,
|
|
9419
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
9417
9420
|
})),
|
|
9418
9421
|
effectKeyframes: effectKeyframes.map((keyframe) => ({
|
|
9419
9422
|
fileName: keyframe.fileName,
|
|
@@ -9421,7 +9424,8 @@ var callDeleteKeyframes = ({
|
|
|
9421
9424
|
effectIndex: keyframe.effectIndex,
|
|
9422
9425
|
key: keyframe.fieldKey,
|
|
9423
9426
|
frame: keyframe.sourceFrame,
|
|
9424
|
-
schema: keyframe.schema
|
|
9427
|
+
schema: keyframe.schema,
|
|
9428
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
9425
9429
|
})),
|
|
9426
9430
|
clientId
|
|
9427
9431
|
}).then(() => {
|
|
@@ -9496,7 +9500,10 @@ var callUpdateEffectKeyframeSettings = ({
|
|
|
9496
9500
|
};
|
|
9497
9501
|
|
|
9498
9502
|
// src/components/Timeline/delete-selected-timeline-item.ts
|
|
9499
|
-
import { Internals as
|
|
9503
|
+
import { Internals as Internals17 } from "remotion";
|
|
9504
|
+
|
|
9505
|
+
// src/components/Timeline/delete-selected-keyframe.ts
|
|
9506
|
+
import { Internals as Internals15 } from "remotion";
|
|
9500
9507
|
|
|
9501
9508
|
// src/components/Timeline/find-track-for-node-path-info.ts
|
|
9502
9509
|
import { stringifySequenceExpandedRowKey as stringifySequenceExpandedRowKey3 } from "@remotion/studio-shared";
|
|
@@ -9848,11 +9855,26 @@ var parseKeyframeFieldFromNodePath = (auxiliaryKeys) => {
|
|
|
9848
9855
|
};
|
|
9849
9856
|
|
|
9850
9857
|
// src/components/Timeline/delete-selected-keyframe.ts
|
|
9858
|
+
var getValueWhenLastKeyframeDeleted = ({
|
|
9859
|
+
propStatus,
|
|
9860
|
+
playheadSourceFrame
|
|
9861
|
+
}) => {
|
|
9862
|
+
if (propStatus?.status !== "keyframed" || playheadSourceFrame === null) {
|
|
9863
|
+
return null;
|
|
9864
|
+
}
|
|
9865
|
+
return Internals15.interpolateKeyframedStatus({
|
|
9866
|
+
forceSpringAllowTail: null,
|
|
9867
|
+
frame: playheadSourceFrame,
|
|
9868
|
+
status: propStatus
|
|
9869
|
+
}) ?? null;
|
|
9870
|
+
};
|
|
9851
9871
|
var getSelectedKeyframeDeletion = ({
|
|
9852
9872
|
nodePathInfo,
|
|
9853
9873
|
frame: frame2,
|
|
9854
9874
|
sequences,
|
|
9855
|
-
overrideIdsToNodePaths
|
|
9875
|
+
overrideIdsToNodePaths,
|
|
9876
|
+
propStatuses,
|
|
9877
|
+
timelinePosition
|
|
9856
9878
|
}) => {
|
|
9857
9879
|
const field = parseKeyframeFieldFromNodePath(nodePathInfo.auxiliaryKeys);
|
|
9858
9880
|
if (field === null) {
|
|
@@ -9868,6 +9890,7 @@ var getSelectedKeyframeDeletion = ({
|
|
|
9868
9890
|
return null;
|
|
9869
9891
|
}
|
|
9870
9892
|
const sourceFrame = frame2 - (track?.keyframeDisplayOffset ?? 0);
|
|
9893
|
+
const playheadSourceFrame = timelinePosition === null ? null : timelinePosition - (track?.keyframeDisplayOffset ?? 0);
|
|
9871
9894
|
const nodePath = nodePathInfo.sequenceSubscriptionKey;
|
|
9872
9895
|
const fileName = nodePath.absolutePath;
|
|
9873
9896
|
if (field.type === "effect") {
|
|
@@ -9875,6 +9898,16 @@ var getSelectedKeyframeDeletion = ({
|
|
|
9875
9898
|
if (!effect) {
|
|
9876
9899
|
return null;
|
|
9877
9900
|
}
|
|
9901
|
+
const effectStatus = propStatuses !== null ? Internals15.getEffectPropStatusesCtx({
|
|
9902
|
+
propStatuses,
|
|
9903
|
+
nodePath,
|
|
9904
|
+
effectIndex: field.effectIndex
|
|
9905
|
+
}) : null;
|
|
9906
|
+
const effectPropStatus = effectStatus?.type === "can-update-effect" ? effectStatus.props[field.fieldKey] : null;
|
|
9907
|
+
const effectValueWhenLastKeyframeDeleted = getValueWhenLastKeyframeDeleted({
|
|
9908
|
+
propStatus: effectPropStatus,
|
|
9909
|
+
playheadSourceFrame
|
|
9910
|
+
});
|
|
9878
9911
|
return {
|
|
9879
9912
|
type: "effect",
|
|
9880
9913
|
fileName,
|
|
@@ -9882,16 +9915,23 @@ var getSelectedKeyframeDeletion = ({
|
|
|
9882
9915
|
effectIndex: field.effectIndex,
|
|
9883
9916
|
fieldKey: field.fieldKey,
|
|
9884
9917
|
sourceFrame,
|
|
9885
|
-
schema: effect.schema
|
|
9918
|
+
schema: effect.schema,
|
|
9919
|
+
valueWhenLastKeyframeDeleted: effectValueWhenLastKeyframeDeleted
|
|
9886
9920
|
};
|
|
9887
9921
|
}
|
|
9922
|
+
const sequencePropStatus = propStatuses !== null ? Internals15.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey] : null;
|
|
9923
|
+
const sequenceValueWhenLastKeyframeDeleted = getValueWhenLastKeyframeDeleted({
|
|
9924
|
+
propStatus: sequencePropStatus,
|
|
9925
|
+
playheadSourceFrame
|
|
9926
|
+
});
|
|
9888
9927
|
return {
|
|
9889
9928
|
type: "sequence",
|
|
9890
9929
|
fileName,
|
|
9891
9930
|
nodePath,
|
|
9892
9931
|
fieldKey: field.fieldKey,
|
|
9893
9932
|
sourceFrame,
|
|
9894
|
-
schema: sequence.controls.schema
|
|
9933
|
+
schema: sequence.controls.schema,
|
|
9934
|
+
valueWhenLastKeyframeDeleted: sequenceValueWhenLastKeyframeDeleted
|
|
9895
9935
|
};
|
|
9896
9936
|
};
|
|
9897
9937
|
var deleteSelectedKeyframes = ({
|
|
@@ -9899,13 +9939,17 @@ var deleteSelectedKeyframes = ({
|
|
|
9899
9939
|
sequences,
|
|
9900
9940
|
overrideIdsToNodePaths,
|
|
9901
9941
|
setPropStatuses,
|
|
9902
|
-
clientId
|
|
9942
|
+
clientId,
|
|
9943
|
+
propStatuses,
|
|
9944
|
+
timelinePosition
|
|
9903
9945
|
}) => {
|
|
9904
9946
|
const deletions = keyframes.map((keyframe) => getSelectedKeyframeDeletion({
|
|
9905
9947
|
nodePathInfo: keyframe.nodePathInfo,
|
|
9906
9948
|
frame: keyframe.frame,
|
|
9907
9949
|
sequences,
|
|
9908
|
-
overrideIdsToNodePaths
|
|
9950
|
+
overrideIdsToNodePaths,
|
|
9951
|
+
propStatuses,
|
|
9952
|
+
timelinePosition
|
|
9909
9953
|
})).filter((deletion) => deletion !== null);
|
|
9910
9954
|
if (deletions.length === 0) {
|
|
9911
9955
|
return null;
|
|
@@ -9954,7 +9998,7 @@ import {
|
|
|
9954
9998
|
LINEAR_KEYFRAME_EASING
|
|
9955
9999
|
} from "@remotion/studio-shared";
|
|
9956
10000
|
import { canEditEasingForInterpolationFunction as canEditEasingForInterpolationFunction2 } from "@remotion/studio-shared";
|
|
9957
|
-
import { Internals as
|
|
10001
|
+
import { Internals as Internals16 } from "remotion";
|
|
9958
10002
|
var isEasingSelection = (selection) => selection.type === "easing";
|
|
9959
10003
|
var getSelectedEasingUpdate = ({
|
|
9960
10004
|
selection,
|
|
@@ -9981,7 +10025,7 @@ var getSelectedEasingUpdate = ({
|
|
|
9981
10025
|
if (!sequence.controls) {
|
|
9982
10026
|
return null;
|
|
9983
10027
|
}
|
|
9984
|
-
const sequencePropStatus =
|
|
10028
|
+
const sequencePropStatus = Internals16.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey];
|
|
9985
10029
|
if (sequencePropStatus?.status !== "keyframed" || !canEditEasingForInterpolationFunction(sequencePropStatus.interpolationFunction)) {
|
|
9986
10030
|
return null;
|
|
9987
10031
|
}
|
|
@@ -10000,7 +10044,7 @@ var getSelectedEasingUpdate = ({
|
|
|
10000
10044
|
if (!effect) {
|
|
10001
10045
|
return null;
|
|
10002
10046
|
}
|
|
10003
|
-
const effectStatus =
|
|
10047
|
+
const effectStatus = Internals16.getEffectPropStatusesCtx({
|
|
10004
10048
|
propStatuses,
|
|
10005
10049
|
nodePath,
|
|
10006
10050
|
effectIndex: field.effectIndex
|
|
@@ -10245,7 +10289,7 @@ var getEasingSelectionAfterDeletingKeyframes = ({
|
|
|
10245
10289
|
const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
|
|
10246
10290
|
const sourceFrame = selection.frame - track.keyframeDisplayOffset;
|
|
10247
10291
|
if (field.type === "sequence") {
|
|
10248
|
-
const sequencePropStatus =
|
|
10292
|
+
const sequencePropStatus = Internals17.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey];
|
|
10249
10293
|
if (sequencePropStatus?.status !== "keyframed" || !canEditEasingForInterpolationFunction2(sequencePropStatus.interpolationFunction)) {
|
|
10250
10294
|
return null;
|
|
10251
10295
|
}
|
|
@@ -10257,7 +10301,7 @@ var getEasingSelectionAfterDeletingKeyframes = ({
|
|
|
10257
10301
|
timelinePosition
|
|
10258
10302
|
});
|
|
10259
10303
|
}
|
|
10260
|
-
const effectStatus =
|
|
10304
|
+
const effectStatus = Internals17.getEffectPropStatusesCtx({
|
|
10261
10305
|
propStatuses,
|
|
10262
10306
|
nodePath,
|
|
10263
10307
|
effectIndex: field.effectIndex
|
|
@@ -10320,7 +10364,9 @@ var deleteSelectedTimelineItems = ({
|
|
|
10320
10364
|
overrideIdsToNodePaths,
|
|
10321
10365
|
setPropStatuses,
|
|
10322
10366
|
clientId,
|
|
10323
|
-
confirm
|
|
10367
|
+
confirm,
|
|
10368
|
+
propStatuses,
|
|
10369
|
+
timelinePosition
|
|
10324
10370
|
}) => {
|
|
10325
10371
|
const firstSelection = selections[0];
|
|
10326
10372
|
if (!firstSelection) {
|
|
@@ -10339,7 +10385,9 @@ var deleteSelectedTimelineItems = ({
|
|
|
10339
10385
|
sequences,
|
|
10340
10386
|
overrideIdsToNodePaths,
|
|
10341
10387
|
setPropStatuses,
|
|
10342
|
-
clientId
|
|
10388
|
+
clientId,
|
|
10389
|
+
propStatuses,
|
|
10390
|
+
timelinePosition
|
|
10343
10391
|
});
|
|
10344
10392
|
return promise?.then(() => true) ?? null;
|
|
10345
10393
|
}
|
|
@@ -10434,13 +10482,13 @@ import {
|
|
|
10434
10482
|
LINEAR_KEYFRAME_EASING as LINEAR_KEYFRAME_EASING2
|
|
10435
10483
|
} from "@remotion/studio-shared";
|
|
10436
10484
|
import {
|
|
10437
|
-
Internals as
|
|
10485
|
+
Internals as Internals18
|
|
10438
10486
|
} from "remotion";
|
|
10439
10487
|
var getKeyframeClipboardFieldType = ({
|
|
10440
10488
|
schema,
|
|
10441
10489
|
fieldKey
|
|
10442
10490
|
}) => {
|
|
10443
|
-
const field =
|
|
10491
|
+
const field = Internals18.getFlatSchemaWithAllKeys(schema)[fieldKey];
|
|
10444
10492
|
if (!field) {
|
|
10445
10493
|
return null;
|
|
10446
10494
|
}
|
|
@@ -10488,7 +10536,7 @@ var resolveKeyframeField = ({
|
|
|
10488
10536
|
if (!track.sequence.controls) {
|
|
10489
10537
|
return null;
|
|
10490
10538
|
}
|
|
10491
|
-
const sequencePropStatus =
|
|
10539
|
+
const sequencePropStatus = Internals18.getPropStatusesCtx(propStatuses, nodePath)?.[identity.fieldKey];
|
|
10492
10540
|
if (!sequencePropStatus || sequencePropStatus.status === "computed") {
|
|
10493
10541
|
return null;
|
|
10494
10542
|
}
|
|
@@ -10507,7 +10555,7 @@ var resolveKeyframeField = ({
|
|
|
10507
10555
|
};
|
|
10508
10556
|
}
|
|
10509
10557
|
const effect = track.sequence.effects[identity.effectIndex];
|
|
10510
|
-
const effectStatus =
|
|
10558
|
+
const effectStatus = Internals18.getEffectPropStatusesCtx({
|
|
10511
10559
|
propStatuses,
|
|
10512
10560
|
nodePath,
|
|
10513
10561
|
effectIndex: identity.effectIndex
|
|
@@ -10530,7 +10578,7 @@ var resolveKeyframeField = ({
|
|
|
10530
10578
|
};
|
|
10531
10579
|
};
|
|
10532
10580
|
var areResolvedFieldsEqual = (first, second) => {
|
|
10533
|
-
if (
|
|
10581
|
+
if (Internals18.makeSequencePropsSubscriptionKey(first.nodePath) !== Internals18.makeSequencePropsSubscriptionKey(second.nodePath)) {
|
|
10534
10582
|
return false;
|
|
10535
10583
|
}
|
|
10536
10584
|
if (first.identity.type !== second.identity.type) {
|
|
@@ -10857,7 +10905,7 @@ var getSnapshotsFromSelection = ({
|
|
|
10857
10905
|
return null;
|
|
10858
10906
|
}
|
|
10859
10907
|
const { sequenceSubscriptionKey } = selection.nodePathInfo;
|
|
10860
|
-
const sequenceStatus = propStatuses[
|
|
10908
|
+
const sequenceStatus = propStatuses[Internals19.makeSequencePropsSubscriptionKey(sequenceSubscriptionKey)];
|
|
10861
10909
|
if (!sequenceStatus || !sequenceStatus.canUpdate) {
|
|
10862
10910
|
return null;
|
|
10863
10911
|
}
|
|
@@ -10962,7 +11010,7 @@ var getEffectPropClipboardDataFromSelection = ({
|
|
|
10962
11010
|
if (selection.type !== "sequence-effect-prop") {
|
|
10963
11011
|
return null;
|
|
10964
11012
|
}
|
|
10965
|
-
const sequenceStatus = propStatuses[
|
|
11013
|
+
const sequenceStatus = propStatuses[Internals19.makeSequencePropsSubscriptionKey(selection.nodePathInfo.sequenceSubscriptionKey)];
|
|
10966
11014
|
if (!sequenceStatus || !sequenceStatus.canUpdate) {
|
|
10967
11015
|
return null;
|
|
10968
11016
|
}
|
|
@@ -11059,7 +11107,7 @@ var getPasteEffectPropTarget = ({
|
|
|
11059
11107
|
if (!effect || !isVisibleFieldSchema(fieldSchema)) {
|
|
11060
11108
|
return { type: "prop-mismatch" };
|
|
11061
11109
|
}
|
|
11062
|
-
const sequenceStatus = propStatuses[
|
|
11110
|
+
const sequenceStatus = propStatuses[Internals19.makeSequencePropsSubscriptionKey(selection.nodePathInfo.sequenceSubscriptionKey)];
|
|
11063
11111
|
if (!sequenceStatus?.canUpdate) {
|
|
11064
11112
|
return { type: "uncopyable" };
|
|
11065
11113
|
}
|
|
@@ -11086,16 +11134,16 @@ var getPasteEffectPropTarget = ({
|
|
|
11086
11134
|
};
|
|
11087
11135
|
var TimelineClipboardKeybindings = () => {
|
|
11088
11136
|
const keybindings = useKeybinding();
|
|
11089
|
-
const timelinePosition =
|
|
11137
|
+
const timelinePosition = Internals19.Timeline.useTimelinePosition();
|
|
11090
11138
|
const timelinePositionRef = useRef17(timelinePosition);
|
|
11091
11139
|
timelinePositionRef.current = timelinePosition;
|
|
11092
11140
|
const { previewServerState } = useContext15(StudioServerConnectionCtx);
|
|
11093
11141
|
const { canSelect } = useTimelineSelection();
|
|
11094
11142
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
11095
|
-
const propStatusesRef = useContext15(
|
|
11096
|
-
const { setPropStatuses } = useContext15(
|
|
11097
|
-
const sequencesRef = useContext15(
|
|
11098
|
-
const { overrideIdToNodePathMappings } = useContext15(
|
|
11143
|
+
const propStatusesRef = useContext15(Internals19.VisualModePropStatusesRefContext);
|
|
11144
|
+
const { setPropStatuses } = useContext15(Internals19.VisualModeSettersContext);
|
|
11145
|
+
const sequencesRef = useContext15(Internals19.SequenceManagerRefContext);
|
|
11146
|
+
const { overrideIdToNodePathMappings } = useContext15(Internals19.OverrideIdsToNodePathsGettersContext);
|
|
11099
11147
|
const confirm = useConfirmationDialog();
|
|
11100
11148
|
useEffect27(() => {
|
|
11101
11149
|
if (!canSelect || previewServerState.type !== "connected") {
|
|
@@ -11244,7 +11292,9 @@ var TimelineClipboardKeybindings = () => {
|
|
|
11244
11292
|
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
11245
11293
|
setPropStatuses,
|
|
11246
11294
|
clientId,
|
|
11247
|
-
confirm
|
|
11295
|
+
confirm,
|
|
11296
|
+
propStatuses,
|
|
11297
|
+
timelinePosition: timelinePositionRef.current
|
|
11248
11298
|
});
|
|
11249
11299
|
return deletePromise?.then((deleted) => {
|
|
11250
11300
|
if (!deleted) {
|
|
@@ -11329,7 +11379,8 @@ var TimelineClipboardKeybindings = () => {
|
|
|
11329
11379
|
nodePath: keyframeTarget.nodePath,
|
|
11330
11380
|
fieldKey: keyframeTarget.fieldKey,
|
|
11331
11381
|
sourceFrame,
|
|
11332
|
-
schema: keyframeTarget.schema
|
|
11382
|
+
schema: keyframeTarget.schema,
|
|
11383
|
+
valueWhenLastKeyframeDeleted: null
|
|
11333
11384
|
}));
|
|
11334
11385
|
return callDeleteKeyframes({
|
|
11335
11386
|
sequenceKeyframes: effectIndex === null ? deletions : [],
|
|
@@ -11534,7 +11585,7 @@ var TimelineClipboardKeybindings = () => {
|
|
|
11534
11585
|
// src/components/Timeline/TimelineDeleteKeybindings.tsx
|
|
11535
11586
|
import { LINEAR_KEYFRAME_EASING as LINEAR_KEYFRAME_EASING3 } from "@remotion/studio-shared";
|
|
11536
11587
|
import { useContext as useContext16, useEffect as useEffect28, useRef as useRef18 } from "react";
|
|
11537
|
-
import { Internals as
|
|
11588
|
+
import { Internals as Internals22 } from "remotion";
|
|
11538
11589
|
|
|
11539
11590
|
// src/components/Timeline/duplicate-selected-timeline-item.ts
|
|
11540
11591
|
var confirmDuplicatingProgrammaticallyDuplicatedSequences = (nodePathInfos, confirm) => {
|
|
@@ -11622,7 +11673,7 @@ var duplicateSelectedTimelineItems = ({
|
|
|
11622
11673
|
|
|
11623
11674
|
// src/components/Timeline/reset-selected-timeline-props.ts
|
|
11624
11675
|
import { getEffectFieldsToShow as getEffectFieldsToShow3 } from "@remotion/studio-shared";
|
|
11625
|
-
import { Internals as
|
|
11676
|
+
import { Internals as Internals20 } from "remotion";
|
|
11626
11677
|
|
|
11627
11678
|
// src/components/Timeline/save-sequence-prop.ts
|
|
11628
11679
|
import {
|
|
@@ -11868,7 +11919,7 @@ var getActiveFieldSchema = ({
|
|
|
11868
11919
|
key: key2,
|
|
11869
11920
|
resolveValue
|
|
11870
11921
|
}) => {
|
|
11871
|
-
return
|
|
11922
|
+
return Internals20.flattenActiveSchema(schema, resolveValue)[key2];
|
|
11872
11923
|
};
|
|
11873
11924
|
var getTimelinePropResetTargets = ({
|
|
11874
11925
|
selections,
|
|
@@ -11900,8 +11951,8 @@ var getTimelinePropResetTargets = ({
|
|
|
11900
11951
|
if (!sequence.controls) {
|
|
11901
11952
|
continue;
|
|
11902
11953
|
}
|
|
11903
|
-
const sequencePropStatus =
|
|
11904
|
-
const { merged: sequenceValuesDotNotation } =
|
|
11954
|
+
const sequencePropStatus = Internals20.getPropStatusesCtx(propStatuses, nodePath);
|
|
11955
|
+
const { merged: sequenceValuesDotNotation } = Internals20.computeEffectiveSchemaValuesDotNotation({
|
|
11905
11956
|
schema: sequence.controls.schema,
|
|
11906
11957
|
currentValue: sequence.controls.currentRuntimeValueDotNotation,
|
|
11907
11958
|
overrideValues: {},
|
|
@@ -11940,7 +11991,7 @@ var getTimelinePropResetTargets = ({
|
|
|
11940
11991
|
getEffectDragOverrides: () => ({})
|
|
11941
11992
|
}).find((candidate) => candidate.key === selection.key) : null;
|
|
11942
11993
|
const fieldSchema = field?.fieldSchema;
|
|
11943
|
-
const effectStatus =
|
|
11994
|
+
const effectStatus = Internals20.getEffectPropStatusesCtx({
|
|
11944
11995
|
propStatuses,
|
|
11945
11996
|
nodePath,
|
|
11946
11997
|
effectIndex: selection.i
|
|
@@ -12021,7 +12072,7 @@ var resetSelectedTimelineProps = ({
|
|
|
12021
12072
|
};
|
|
12022
12073
|
|
|
12023
12074
|
// src/components/Timeline/split-selected-timeline-item.ts
|
|
12024
|
-
import { Internals as
|
|
12075
|
+
import { Internals as Internals21 } from "remotion";
|
|
12025
12076
|
var getTimelineSequenceSplitUnsupportedReason = (componentName) => {
|
|
12026
12077
|
if (componentName === "<TransitionSeries.Sequence>" || componentName === "<TransitionSeries.Overlay>") {
|
|
12027
12078
|
return `${componentName} cannot be split from source`;
|
|
@@ -12156,7 +12207,7 @@ var splitSelectedTimelineItems = ({
|
|
|
12156
12207
|
overrideIdsToNodePaths,
|
|
12157
12208
|
nodePathInfo: selection.nodePathInfo
|
|
12158
12209
|
});
|
|
12159
|
-
const sequencePropStatuses = propStatuses ?
|
|
12210
|
+
const sequencePropStatuses = propStatuses ? Internals21.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey) : undefined;
|
|
12160
12211
|
const eligibility = getTimelineSequenceSplitEligibility({
|
|
12161
12212
|
selection,
|
|
12162
12213
|
sequence: track?.sequence ?? null,
|
|
@@ -12177,15 +12228,15 @@ var splitSelectedTimelineItems = ({
|
|
|
12177
12228
|
var TimelineDeleteKeybindings = () => {
|
|
12178
12229
|
const keybindings = useKeybinding();
|
|
12179
12230
|
const { previewServerState } = useContext16(StudioServerConnectionCtx);
|
|
12180
|
-
const sequencesRef = useContext16(
|
|
12181
|
-
const { overrideIdToNodePathMappings } = useContext16(
|
|
12182
|
-
const propStatusesRef = useContext16(
|
|
12183
|
-
const { setPropStatuses } = useContext16(
|
|
12231
|
+
const sequencesRef = useContext16(Internals22.SequenceManagerRefContext);
|
|
12232
|
+
const { overrideIdToNodePathMappings } = useContext16(Internals22.OverrideIdsToNodePathsGettersContext);
|
|
12233
|
+
const propStatusesRef = useContext16(Internals22.VisualModePropStatusesRefContext);
|
|
12234
|
+
const { setPropStatuses } = useContext16(Internals22.VisualModeSettersContext);
|
|
12184
12235
|
const { setGuidesList } = useContext16(EditorShowGuidesContext);
|
|
12185
12236
|
const { canSelect } = useTimelineSelection();
|
|
12186
12237
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
12187
12238
|
const confirm = useConfirmationDialog();
|
|
12188
|
-
const timelinePosition =
|
|
12239
|
+
const timelinePosition = Internals22.Timeline.useTimelinePosition();
|
|
12189
12240
|
const timelinePositionRef = useRef18(timelinePosition);
|
|
12190
12241
|
timelinePositionRef.current = timelinePosition;
|
|
12191
12242
|
useEffect28(() => {
|
|
@@ -12216,7 +12267,9 @@ var TimelineDeleteKeybindings = () => {
|
|
|
12216
12267
|
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
12217
12268
|
setPropStatuses,
|
|
12218
12269
|
clientId,
|
|
12219
|
-
confirm
|
|
12270
|
+
confirm,
|
|
12271
|
+
propStatuses,
|
|
12272
|
+
timelinePosition: timelinePositionRef.current
|
|
12220
12273
|
});
|
|
12221
12274
|
if (deletePromise !== null) {
|
|
12222
12275
|
deletePromise.then((deleted) => {
|
|
@@ -12712,10 +12765,10 @@ var getTimelineTreeNodeCanEditEasing = ({
|
|
|
12712
12765
|
return false;
|
|
12713
12766
|
}
|
|
12714
12767
|
if (node.field.kind === "sequence-field") {
|
|
12715
|
-
const sequencePropStatus =
|
|
12768
|
+
const sequencePropStatus = Internals23.getPropStatusesCtx(propStatuses, nodePathInfo.sequenceSubscriptionKey)?.[node.field.key];
|
|
12716
12769
|
return sequencePropStatus?.status === "keyframed" && canEditEasingForInterpolationFunction3(sequencePropStatus.interpolationFunction);
|
|
12717
12770
|
}
|
|
12718
|
-
const effectStatus =
|
|
12771
|
+
const effectStatus = Internals23.getEffectPropStatusesCtx({
|
|
12719
12772
|
propStatuses,
|
|
12720
12773
|
nodePath: nodePathInfo.sequenceSubscriptionKey,
|
|
12721
12774
|
effectIndex: node.field.effectIndex
|
|
@@ -12869,9 +12922,9 @@ var TimelineEscapeKeybindings = () => {
|
|
|
12869
12922
|
};
|
|
12870
12923
|
var TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
12871
12924
|
const { getIsExpanded } = useContext17(ExpandedTracksGetterContext);
|
|
12872
|
-
const { propStatuses } = useContext17(
|
|
12873
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext17(
|
|
12874
|
-
const timelinePosition =
|
|
12925
|
+
const { propStatuses } = useContext17(Internals23.VisualModePropStatusesContext);
|
|
12926
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext17(Internals23.VisualModeDragOverridesContext);
|
|
12927
|
+
const timelinePosition = Internals23.Timeline.useTimelinePosition();
|
|
12875
12928
|
const { selectedItems } = useTimelineSelection();
|
|
12876
12929
|
const selectableItems = useMemo37(() => getSelectableTimelineItems({
|
|
12877
12930
|
getDragOverrides,
|
|
@@ -12897,7 +12950,7 @@ var TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
|
12897
12950
|
};
|
|
12898
12951
|
var TimelineSelectionProvider = ({ children }) => {
|
|
12899
12952
|
const { previewServerState } = useContext17(StudioServerConnectionCtx);
|
|
12900
|
-
const { canvasContent } = useContext17(
|
|
12953
|
+
const { canvasContent } = useContext17(Internals23.CompositionManager);
|
|
12901
12954
|
const timelineSelectionScope = canvasContent?.type === "composition" ? canvasContent.compositionId : null;
|
|
12902
12955
|
const { expandParentTracks } = useContext17(ExpandedTracksSetterContext);
|
|
12903
12956
|
const canSelect = studioInteractivityEnabled && previewServerState.type === "connected" && !window.remotion_isReadOnlyStudio;
|
|
@@ -13628,7 +13681,7 @@ var EditorGuides = ({ canvasSize, contentDimensions, assetMetadata }) => {
|
|
|
13628
13681
|
contentDimensions,
|
|
13629
13682
|
assetMetadata
|
|
13630
13683
|
});
|
|
13631
|
-
const { canvasContent } = useContext19(
|
|
13684
|
+
const { canvasContent } = useContext19(Internals24.CompositionManager);
|
|
13632
13685
|
if (canvasContent === null || canvasContent.type !== "composition") {
|
|
13633
13686
|
throw new Error("Expected to be in a composition");
|
|
13634
13687
|
}
|
|
@@ -13874,7 +13927,7 @@ import {
|
|
|
13874
13927
|
useMemo as useMemo40,
|
|
13875
13928
|
useRef as useRef21
|
|
13876
13929
|
} from "react";
|
|
13877
|
-
import { Internals as
|
|
13930
|
+
import { Internals as Internals25 } from "remotion";
|
|
13878
13931
|
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
13879
13932
|
var makeGuideId = () => {
|
|
13880
13933
|
return Math.random().toString(36).substring(7);
|
|
@@ -13900,7 +13953,7 @@ var Ruler = ({
|
|
|
13900
13953
|
setEditorShowGuides
|
|
13901
13954
|
} = useContext20(EditorShowGuidesContext);
|
|
13902
13955
|
const { selectedItems } = useTimelineSelection();
|
|
13903
|
-
const unsafeVideoConfig =
|
|
13956
|
+
const unsafeVideoConfig = Internals25.useUnsafeVideoConfig();
|
|
13904
13957
|
if (!unsafeVideoConfig) {
|
|
13905
13958
|
throw new Error("Video config not set");
|
|
13906
13959
|
}
|
|
@@ -14186,9 +14239,9 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
|
|
|
14186
14239
|
|
|
14187
14240
|
// src/components/EditorRuler/use-is-ruler-visible.ts
|
|
14188
14241
|
import { useContext as useContext22 } from "react";
|
|
14189
|
-
import { Internals as
|
|
14242
|
+
import { Internals as Internals26 } from "remotion";
|
|
14190
14243
|
var useIsRulerVisible = () => {
|
|
14191
|
-
const { canvasContent } = useContext22(
|
|
14244
|
+
const { canvasContent } = useContext22(Internals26.CompositionManager);
|
|
14192
14245
|
const { editorShowRulers } = useContext22(EditorShowRulersContext);
|
|
14193
14246
|
return editorShowRulers && canvasContent && canvasContent.type === "composition";
|
|
14194
14247
|
};
|
|
@@ -14336,7 +14389,7 @@ import {
|
|
|
14336
14389
|
getRequiredPackageForInsertableElement,
|
|
14337
14390
|
isUrl
|
|
14338
14391
|
} from "@remotion/studio-shared";
|
|
14339
|
-
import { Internals as
|
|
14392
|
+
import { Internals as Internals27, staticFile as staticFile2 } from "remotion";
|
|
14340
14393
|
import { NoReactInternals as NoReactInternals6 } from "remotion/no-react";
|
|
14341
14394
|
|
|
14342
14395
|
// src/api/get-static-files.ts
|
|
@@ -14398,6 +14451,16 @@ var getAssetElement = ({
|
|
|
14398
14451
|
fileType,
|
|
14399
14452
|
src
|
|
14400
14453
|
}) => {
|
|
14454
|
+
if (fileType.type === "webp" && fileType.animated) {
|
|
14455
|
+
return {
|
|
14456
|
+
type: "asset",
|
|
14457
|
+
assetType: "animated-image",
|
|
14458
|
+
src,
|
|
14459
|
+
srcType: "static",
|
|
14460
|
+
dimensions: fileType.dimensions,
|
|
14461
|
+
position: null
|
|
14462
|
+
};
|
|
14463
|
+
}
|
|
14401
14464
|
if (fileType.type === "png" || fileType.type === "jpeg" || fileType.type === "webp" || fileType.type === "bmp") {
|
|
14402
14465
|
return {
|
|
14403
14466
|
type: "asset",
|
|
@@ -14458,7 +14521,7 @@ var getAssetElementFromPath = (assetPath) => {
|
|
|
14458
14521
|
if (!extension || extension === assetPath.toLowerCase()) {
|
|
14459
14522
|
return null;
|
|
14460
14523
|
}
|
|
14461
|
-
if (["png", "jpg", "jpeg", "webp", "bmp"].includes(extension)) {
|
|
14524
|
+
if (["png", "jpg", "jpeg", "webp", "bmp", "svg"].includes(extension)) {
|
|
14462
14525
|
return {
|
|
14463
14526
|
type: "asset",
|
|
14464
14527
|
assetType: "image",
|
|
@@ -14510,6 +14573,19 @@ var getAssetElementFromPath = (assetPath) => {
|
|
|
14510
14573
|
}
|
|
14511
14574
|
return null;
|
|
14512
14575
|
};
|
|
14576
|
+
var getAssetElementForDroppedFile = ({
|
|
14577
|
+
fileType,
|
|
14578
|
+
src
|
|
14579
|
+
}) => {
|
|
14580
|
+
const detectedElement = getAssetElement({ fileType, src });
|
|
14581
|
+
if (detectedElement !== null) {
|
|
14582
|
+
return detectedElement;
|
|
14583
|
+
}
|
|
14584
|
+
if (fileType.type !== "unknown" || !src.toLowerCase().endsWith(".svg")) {
|
|
14585
|
+
return null;
|
|
14586
|
+
}
|
|
14587
|
+
return getAssetElementFromPath(src);
|
|
14588
|
+
};
|
|
14513
14589
|
var getAssetLabel = (element) => {
|
|
14514
14590
|
if (element.type !== "asset") {
|
|
14515
14591
|
throw new Error("Expected asset element");
|
|
@@ -14574,6 +14650,16 @@ var getCompositionPositionForDrop = ({
|
|
|
14574
14650
|
dropPosition
|
|
14575
14651
|
});
|
|
14576
14652
|
};
|
|
14653
|
+
var getAssetPositionForDrop = ({
|
|
14654
|
+
assetDimensions,
|
|
14655
|
+
destinationDimensions,
|
|
14656
|
+
dropPosition
|
|
14657
|
+
}) => {
|
|
14658
|
+
if (assetDimensions !== null && destinationDimensions !== null && assetDimensions.width === destinationDimensions.width && assetDimensions.height === destinationDimensions.height) {
|
|
14659
|
+
return null;
|
|
14660
|
+
}
|
|
14661
|
+
return getCenteredPosition({ dimensions: assetDimensions, dropPosition });
|
|
14662
|
+
};
|
|
14577
14663
|
var getComponentPropNumber = (props, name) => {
|
|
14578
14664
|
const prop = props.find((p) => p.name === name);
|
|
14579
14665
|
return typeof prop?.value === "number" ? prop.value : null;
|
|
@@ -14622,6 +14708,10 @@ var getFileDimensions = async ({
|
|
|
14622
14708
|
file,
|
|
14623
14709
|
fileType
|
|
14624
14710
|
}) => {
|
|
14711
|
+
if (fileType.type === "unknown" && file.name.toLowerCase().endsWith(".svg")) {
|
|
14712
|
+
const objectUrl = URL.createObjectURL(file);
|
|
14713
|
+
return getImageDimensions({ revokeObjectUrl: true, src: objectUrl });
|
|
14714
|
+
}
|
|
14625
14715
|
if (fileType.type === "wav" || fileType.type === "mp3" || fileType.type === "aac" || fileType.type === "flac") {
|
|
14626
14716
|
return null;
|
|
14627
14717
|
}
|
|
@@ -14645,7 +14735,7 @@ var getFileDimensions = async ({
|
|
|
14645
14735
|
var getStaticAssetDimensions = (assetPath) => {
|
|
14646
14736
|
const extension = assetPath.split(".").pop()?.toLowerCase();
|
|
14647
14737
|
const src = staticFile2(assetPath);
|
|
14648
|
-
if (extension && ["png", "jpg", "jpeg", "webp", "bmp", "gif", "apng"].includes(extension)) {
|
|
14738
|
+
if (extension && ["png", "jpg", "jpeg", "webp", "bmp", "gif", "apng", "svg"].includes(extension)) {
|
|
14649
14739
|
return getImageDimensions({ revokeObjectUrl: false, src });
|
|
14650
14740
|
}
|
|
14651
14741
|
if (extension && ["mp4", "m4v", "mov", "avi", "webm", "ts", "m2ts"].includes(extension)) {
|
|
@@ -14672,7 +14762,7 @@ var getStaticAssetDimensionsOrNull = async (assetPath) => {
|
|
|
14672
14762
|
};
|
|
14673
14763
|
var getStaticAssetFileType = async (assetPath) => {
|
|
14674
14764
|
const extension = assetPath.split(".").pop()?.toLowerCase();
|
|
14675
|
-
if (extension !== "png" && extension !== "apng") {
|
|
14765
|
+
if (extension !== "png" && extension !== "apng" && extension !== "webp") {
|
|
14676
14766
|
return null;
|
|
14677
14767
|
}
|
|
14678
14768
|
try {
|
|
@@ -14760,6 +14850,7 @@ var downloadRemoteAsset = (url) => {
|
|
|
14760
14850
|
var importAssets = async ({
|
|
14761
14851
|
compositionFile,
|
|
14762
14852
|
compositionId,
|
|
14853
|
+
destinationDimensions,
|
|
14763
14854
|
dropPosition,
|
|
14764
14855
|
files
|
|
14765
14856
|
}) => {
|
|
@@ -14789,7 +14880,7 @@ var importAssets = async ({
|
|
|
14789
14880
|
for (const file of files) {
|
|
14790
14881
|
const contents = await file.arrayBuffer();
|
|
14791
14882
|
const fileType = detectFileType(new Uint8Array(contents));
|
|
14792
|
-
const element =
|
|
14883
|
+
const element = getAssetElementForDroppedFile({
|
|
14793
14884
|
fileType,
|
|
14794
14885
|
src: file.name
|
|
14795
14886
|
});
|
|
@@ -14806,14 +14897,16 @@ var importAssets = async ({
|
|
|
14806
14897
|
addedStaticFiles.push(file.name);
|
|
14807
14898
|
}
|
|
14808
14899
|
const dimensions = await getFileDimensionsOrNull({ file, fileType });
|
|
14900
|
+
const resolvedDimensions = element.dimensions ?? dimensions;
|
|
14809
14901
|
const inserted = await insertAssetElement({
|
|
14810
14902
|
compositionFile,
|
|
14811
14903
|
compositionId,
|
|
14812
14904
|
element: {
|
|
14813
14905
|
...element,
|
|
14814
|
-
dimensions:
|
|
14815
|
-
position:
|
|
14816
|
-
|
|
14906
|
+
dimensions: resolvedDimensions,
|
|
14907
|
+
position: getAssetPositionForDrop({
|
|
14908
|
+
assetDimensions: resolvedDimensions,
|
|
14909
|
+
destinationDimensions,
|
|
14817
14910
|
dropPosition
|
|
14818
14911
|
})
|
|
14819
14912
|
}
|
|
@@ -14834,6 +14927,7 @@ var importAssets = async ({
|
|
|
14834
14927
|
var importRemoteAsset = async ({
|
|
14835
14928
|
compositionFile,
|
|
14836
14929
|
compositionId,
|
|
14930
|
+
destinationDimensions,
|
|
14837
14931
|
dropPosition,
|
|
14838
14932
|
url
|
|
14839
14933
|
}) => {
|
|
@@ -14851,8 +14945,9 @@ var importRemoteAsset = async ({
|
|
|
14851
14945
|
compositionId,
|
|
14852
14946
|
element: {
|
|
14853
14947
|
...element,
|
|
14854
|
-
position:
|
|
14855
|
-
|
|
14948
|
+
position: getAssetPositionForDrop({
|
|
14949
|
+
assetDimensions: element.dimensions,
|
|
14950
|
+
destinationDimensions,
|
|
14856
14951
|
dropPosition
|
|
14857
14952
|
})
|
|
14858
14953
|
}
|
|
@@ -14900,6 +14995,7 @@ var insertExistingAssets = async ({
|
|
|
14900
14995
|
assetPaths,
|
|
14901
14996
|
compositionFile,
|
|
14902
14997
|
compositionId,
|
|
14998
|
+
destinationDimensions,
|
|
14903
14999
|
dropPosition
|
|
14904
15000
|
}) => {
|
|
14905
15001
|
if (assetPaths.length === 0) {
|
|
@@ -14921,8 +15017,9 @@ var insertExistingAssets = async ({
|
|
|
14921
15017
|
element: {
|
|
14922
15018
|
...element,
|
|
14923
15019
|
dimensions,
|
|
14924
|
-
position:
|
|
14925
|
-
dimensions,
|
|
15020
|
+
position: getAssetPositionForDrop({
|
|
15021
|
+
assetDimensions: dimensions,
|
|
15022
|
+
destinationDimensions,
|
|
14926
15023
|
dropPosition
|
|
14927
15024
|
})
|
|
14928
15025
|
}
|
|
@@ -14991,7 +15088,7 @@ var insertComposition = async ({
|
|
|
14991
15088
|
return;
|
|
14992
15089
|
}
|
|
14993
15090
|
try {
|
|
14994
|
-
const resolver =
|
|
15091
|
+
const resolver = Internals27.resolveCompositionsRef.current;
|
|
14995
15092
|
if (!resolver) {
|
|
14996
15093
|
throw new Error("No composition resolver available");
|
|
14997
15094
|
}
|
|
@@ -15062,7 +15159,7 @@ import {
|
|
|
15062
15159
|
useMemo as useMemo51,
|
|
15063
15160
|
useRef as useRef29
|
|
15064
15161
|
} from "react";
|
|
15065
|
-
import { Internals as
|
|
15162
|
+
import { Internals as Internals36 } from "remotion";
|
|
15066
15163
|
|
|
15067
15164
|
// src/helpers/checkerboard-background.ts
|
|
15068
15165
|
var getCheckerboardBackgroundSize = (size2) => `${size2}px ${size2}px`;
|
|
@@ -15497,7 +15594,7 @@ import React64, {
|
|
|
15497
15594
|
useRef as useRef28,
|
|
15498
15595
|
useState as useState38
|
|
15499
15596
|
} from "react";
|
|
15500
|
-
import { Internals as
|
|
15597
|
+
import { Internals as Internals35 } from "remotion";
|
|
15501
15598
|
import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
|
|
15502
15599
|
|
|
15503
15600
|
// src/state/editor-outlines.ts
|
|
@@ -15519,12 +15616,12 @@ var EditorShowOutlinesContext = createContext16({
|
|
|
15519
15616
|
|
|
15520
15617
|
// src/state/scale-lock.tsx
|
|
15521
15618
|
import React56, { useCallback as useCallback35, useMemo as useMemo44, useState as useState32 } from "react";
|
|
15522
|
-
import { Internals as
|
|
15619
|
+
import { Internals as Internals28 } from "remotion";
|
|
15523
15620
|
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
15524
15621
|
var makeScaleLockKey = ({
|
|
15525
15622
|
fieldKey,
|
|
15526
15623
|
nodePath
|
|
15527
|
-
}) => `${
|
|
15624
|
+
}) => `${Internals28.makeSequencePropsSubscriptionKey(nodePath)}.${fieldKey}`;
|
|
15528
15625
|
var ScaleLockContext = React56.createContext({
|
|
15529
15626
|
getScaleLockState: ({ defaultValue }) => defaultValue,
|
|
15530
15627
|
setScaleLockState: () => {
|
|
@@ -15549,7 +15646,7 @@ var ScaleLockProvider = ({ children }) => {
|
|
|
15549
15646
|
};
|
|
15550
15647
|
|
|
15551
15648
|
// src/components/selected-outline-drag.ts
|
|
15552
|
-
import { Internals as
|
|
15649
|
+
import { Internals as Internals30 } from "remotion";
|
|
15553
15650
|
import { NoReactInternals as NoReactInternals8 } from "remotion/no-react";
|
|
15554
15651
|
|
|
15555
15652
|
// src/components/selected-outline-geometry.ts
|
|
@@ -17174,7 +17271,7 @@ var transformOriginFieldKey = "style.transformOrigin";
|
|
|
17174
17271
|
var selectedOutlineDragThresholdPx = 4;
|
|
17175
17272
|
|
|
17176
17273
|
// src/components/selected-outline-uv.ts
|
|
17177
|
-
import { Internals as
|
|
17274
|
+
import { Internals as Internals29 } from "remotion";
|
|
17178
17275
|
|
|
17179
17276
|
// src/components/Timeline/timeline-field-utils.ts
|
|
17180
17277
|
var getDecimalPlaces = (num) => {
|
|
@@ -17693,7 +17790,7 @@ var getSelectedUvHandles = ({
|
|
|
17693
17790
|
if (!effect) {
|
|
17694
17791
|
continue;
|
|
17695
17792
|
}
|
|
17696
|
-
const effectStatus =
|
|
17793
|
+
const effectStatus = Internals29.getEffectPropStatusesCtx({
|
|
17697
17794
|
propStatuses,
|
|
17698
17795
|
nodePath,
|
|
17699
17796
|
effectIndex
|
|
@@ -17706,12 +17803,12 @@ var getSelectedUvHandles = ({
|
|
|
17706
17803
|
continue;
|
|
17707
17804
|
}
|
|
17708
17805
|
const dragOverrides = getEffectDragOverrides(nodePath, effectIndex);
|
|
17709
|
-
const activeSchema =
|
|
17806
|
+
const activeSchema = Internals29.flattenActiveSchema(effect.schema, (key3) => {
|
|
17710
17807
|
const propStatus = effectStatus.props[key3];
|
|
17711
17808
|
if (propStatus?.status !== "static" && propStatus?.status !== "keyframed") {
|
|
17712
17809
|
return;
|
|
17713
17810
|
}
|
|
17714
|
-
return
|
|
17811
|
+
return Internals29.getEffectiveVisualModeValue({
|
|
17715
17812
|
propStatus,
|
|
17716
17813
|
dragOverrideValue: dragOverrides[key3],
|
|
17717
17814
|
defaultValue: undefined,
|
|
@@ -17728,7 +17825,7 @@ var getSelectedUvHandles = ({
|
|
|
17728
17825
|
if (propStatus?.status !== "static" && propStatus?.status !== "keyframed") {
|
|
17729
17826
|
continue;
|
|
17730
17827
|
}
|
|
17731
|
-
effectValues[fieldKey] =
|
|
17828
|
+
effectValues[fieldKey] = Internals29.getEffectiveVisualModeValue({
|
|
17732
17829
|
propStatus,
|
|
17733
17830
|
dragOverrideValue: dragOverrides[fieldKey],
|
|
17734
17831
|
defaultValue: fieldSchema.default,
|
|
@@ -19298,14 +19395,14 @@ var getSelectedOutlineActiveSchema = ({
|
|
|
19298
19395
|
propStatus,
|
|
19299
19396
|
frame: frame2
|
|
19300
19397
|
}) => {
|
|
19301
|
-
const { merged: valuesDotNotation } =
|
|
19398
|
+
const { merged: valuesDotNotation } = Internals30.computeEffectiveSchemaValuesDotNotation({
|
|
19302
19399
|
schema,
|
|
19303
19400
|
currentValue: currentRuntimeValueDotNotation,
|
|
19304
19401
|
overrideValues: dragOverrides,
|
|
19305
19402
|
propStatus,
|
|
19306
19403
|
frame: frame2
|
|
19307
19404
|
});
|
|
19308
|
-
return
|
|
19405
|
+
return Internals30.flattenActiveSchema(schema, (key3) => valuesDotNotation[key3]);
|
|
19309
19406
|
};
|
|
19310
19407
|
var getSelectedOutlineDragStates = ({
|
|
19311
19408
|
dragTargets,
|
|
@@ -19315,7 +19412,7 @@ var getSelectedOutlineDragStates = ({
|
|
|
19315
19412
|
return dragTargets.map((target) => {
|
|
19316
19413
|
const dragOverrideValue = (getDragOverrides(target.nodePath) ?? {})[translateFieldKey];
|
|
19317
19414
|
const sourceFrame = timelinePosition - target.keyframeDisplayOffset;
|
|
19318
|
-
const effectiveValue =
|
|
19415
|
+
const effectiveValue = Internals30.getEffectiveVisualModeValue({
|
|
19319
19416
|
propStatus: target.propStatus,
|
|
19320
19417
|
dragOverrideValue,
|
|
19321
19418
|
defaultValue: target.fieldDefault,
|
|
@@ -19325,7 +19422,7 @@ var getSelectedOutlineDragStates = ({
|
|
|
19325
19422
|
const [startX, startY] = parseTranslate(String(effectiveValue ?? "0px 0px"));
|
|
19326
19423
|
return {
|
|
19327
19424
|
defaultValue: target.fieldDefault !== undefined ? JSON.stringify(target.fieldDefault) : null,
|
|
19328
|
-
key:
|
|
19425
|
+
key: Internals30.makeSequencePropsSubscriptionKey(target.nodePath),
|
|
19329
19426
|
sourceFrame,
|
|
19330
19427
|
startX,
|
|
19331
19428
|
startY,
|
|
@@ -19475,7 +19572,7 @@ var getSelectedOutlineScaleDragStates = ({
|
|
|
19475
19572
|
return dragTargets.map((target) => {
|
|
19476
19573
|
const dragOverrideValue = (getDragOverrides(target.nodePath) ?? {})[scaleFieldKey];
|
|
19477
19574
|
const sourceFrame = timelinePosition - target.keyframeDisplayOffset;
|
|
19478
|
-
const effectiveValue =
|
|
19575
|
+
const effectiveValue = Internals30.getEffectiveVisualModeValue({
|
|
19479
19576
|
propStatus: target.propStatus,
|
|
19480
19577
|
dragOverrideValue,
|
|
19481
19578
|
defaultValue: target.fieldDefault,
|
|
@@ -19485,7 +19582,7 @@ var getSelectedOutlineScaleDragStates = ({
|
|
|
19485
19582
|
const [startX, startY, startZ] = NoReactInternals8.parseScaleValue(effectiveValue);
|
|
19486
19583
|
return {
|
|
19487
19584
|
defaultValue: target.fieldDefault !== undefined ? JSON.stringify(target.fieldDefault) : null,
|
|
19488
|
-
key:
|
|
19585
|
+
key: Internals30.makeSequencePropsSubscriptionKey(target.nodePath),
|
|
19489
19586
|
sourceFrame,
|
|
19490
19587
|
startX,
|
|
19491
19588
|
startY,
|
|
@@ -19581,7 +19678,7 @@ var getSelectedOutlineRotationDragStates = ({
|
|
|
19581
19678
|
return dragTargets.map((target) => {
|
|
19582
19679
|
const dragOverrideValue = (getDragOverrides(target.nodePath) ?? {})[rotateFieldKey];
|
|
19583
19680
|
const sourceFrame = timelinePosition - target.keyframeDisplayOffset;
|
|
19584
|
-
const effectiveValue =
|
|
19681
|
+
const effectiveValue = Internals30.getEffectiveVisualModeValue({
|
|
19585
19682
|
propStatus: target.propStatus,
|
|
19586
19683
|
dragOverrideValue,
|
|
19587
19684
|
defaultValue: target.fieldDefault,
|
|
@@ -19590,7 +19687,7 @@ var getSelectedOutlineRotationDragStates = ({
|
|
|
19590
19687
|
});
|
|
19591
19688
|
return {
|
|
19592
19689
|
defaultValue: target.fieldDefault !== undefined ? JSON.stringify(target.fieldDefault) : null,
|
|
19593
|
-
key:
|
|
19690
|
+
key: Internals30.makeSequencePropsSubscriptionKey(target.nodePath),
|
|
19594
19691
|
sourceFrame,
|
|
19595
19692
|
startDegrees: parseCssRotationToDegrees(String(effectiveValue ?? "0deg")),
|
|
19596
19693
|
target
|
|
@@ -19977,7 +20074,7 @@ var findSelectedOutlineSnap = ({
|
|
|
19977
20074
|
|
|
19978
20075
|
// src/components/SelectedOutlineElement.tsx
|
|
19979
20076
|
import React62, { useContext as useContext28, useMemo as useMemo48, useRef as useRef27, useState as useState37 } from "react";
|
|
19980
|
-
import { Internals as
|
|
20077
|
+
import { Internals as Internals33 } from "remotion";
|
|
19981
20078
|
import { NoReactInternals as NoReactInternals11 } from "remotion/no-react";
|
|
19982
20079
|
|
|
19983
20080
|
// src/helpers/get-sequence-double-click-action.ts
|
|
@@ -19994,10 +20091,21 @@ var getSequenceDoubleClickAction = ({
|
|
|
19994
20091
|
}
|
|
19995
20092
|
return canOpenInEditor ? "open-in-editor" : null;
|
|
19996
20093
|
};
|
|
20094
|
+
var getConnectedCompositionFrame = ({
|
|
20095
|
+
timelinePosition,
|
|
20096
|
+
sequence,
|
|
20097
|
+
sequenceFrameOffset
|
|
20098
|
+
}) => {
|
|
20099
|
+
const relativeFrame = timelinePosition - sequence.from;
|
|
20100
|
+
if (relativeFrame < 0 || relativeFrame >= sequence.duration) {
|
|
20101
|
+
return null;
|
|
20102
|
+
}
|
|
20103
|
+
return sequence.frozenFrame ?? relativeFrame + sequenceFrameOffset;
|
|
20104
|
+
};
|
|
19997
20105
|
|
|
19998
20106
|
// src/components/InitialCompositionLoader.tsx
|
|
19999
20107
|
import { useCallback as useCallback40, useContext as useContext27, useEffect as useEffect38 } from "react";
|
|
20000
|
-
import { Internals as
|
|
20108
|
+
import { Internals as Internals32 } from "remotion";
|
|
20001
20109
|
|
|
20002
20110
|
// src/helpers/persist-open-folders.tsx
|
|
20003
20111
|
import { createContext as createContext17 } from "react";
|
|
@@ -20246,9 +20354,9 @@ var explorerSidebarTabs = createRef8();
|
|
|
20246
20354
|
|
|
20247
20355
|
// src/components/use-select-asset.ts
|
|
20248
20356
|
import { useCallback as useCallback39, useContext as useContext25 } from "react";
|
|
20249
|
-
import { Internals as
|
|
20357
|
+
import { Internals as Internals31 } from "remotion";
|
|
20250
20358
|
var useSelectAsset = () => {
|
|
20251
|
-
const { setCanvasContent } = useContext25(
|
|
20359
|
+
const { setCanvasContent } = useContext25(Internals31.CompositionSetters);
|
|
20252
20360
|
const { setAssetFoldersExpanded } = useContext25(FolderContext);
|
|
20253
20361
|
return useCallback39((asset) => {
|
|
20254
20362
|
setCanvasContent({ type: "asset", asset });
|
|
@@ -20322,14 +20430,18 @@ var useStaticFiles = () => {
|
|
|
20322
20430
|
// src/components/InitialCompositionLoader.tsx
|
|
20323
20431
|
var useSelectComposition = () => {
|
|
20324
20432
|
const { setCompositionFoldersExpanded } = useContext27(FolderContext);
|
|
20325
|
-
const { setCanvasContent } = useContext27(
|
|
20433
|
+
const { setCanvasContent } = useContext27(Internals32.CompositionSetters);
|
|
20434
|
+
const setFrame = Internals32.useTimelineSetFrame();
|
|
20326
20435
|
const isMobileLayout = useMobileLayout();
|
|
20327
20436
|
const { setSidebarCollapsedState } = useContext27(SidebarContext);
|
|
20328
|
-
return useCallback40((c, push) => {
|
|
20437
|
+
return useCallback40((c, push, frame2 = null) => {
|
|
20329
20438
|
if (push) {
|
|
20330
20439
|
pushUrl(`/${c.id}`);
|
|
20331
20440
|
}
|
|
20332
20441
|
explorerSidebarTabs.current?.selectCompositionPanel();
|
|
20442
|
+
if (frame2 !== null) {
|
|
20443
|
+
setFrame((current) => ({ ...current, [c.id]: frame2 }));
|
|
20444
|
+
}
|
|
20333
20445
|
setCanvasContent({ type: "composition", compositionId: c.id });
|
|
20334
20446
|
const { folderName, parentFolderName } = c;
|
|
20335
20447
|
if (folderName !== null) {
|
|
@@ -20352,12 +20464,13 @@ var useSelectComposition = () => {
|
|
|
20352
20464
|
isMobileLayout,
|
|
20353
20465
|
setCanvasContent,
|
|
20354
20466
|
setCompositionFoldersExpanded,
|
|
20467
|
+
setFrame,
|
|
20355
20468
|
setSidebarCollapsedState
|
|
20356
20469
|
]);
|
|
20357
20470
|
};
|
|
20358
20471
|
var InitialCompositionLoader = () => {
|
|
20359
|
-
const { compositions, canvasContent } = useContext27(
|
|
20360
|
-
const { setCanvasContent } = useContext27(
|
|
20472
|
+
const { compositions, canvasContent } = useContext27(Internals32.CompositionManager);
|
|
20473
|
+
const { setCanvasContent } = useContext27(Internals32.CompositionSetters);
|
|
20361
20474
|
const selectComposition = useSelectComposition();
|
|
20362
20475
|
const selectAsset = useSelectAsset();
|
|
20363
20476
|
const staticFiles = useStaticFiles();
|
|
@@ -20744,7 +20857,7 @@ var getSequenceContextMenuItems = ({
|
|
|
20744
20857
|
import { jsx as jsx78, jsxs as jsxs36, Fragment as Fragment15 } from "react/jsx-runtime";
|
|
20745
20858
|
var emptyContextMenuValues = [];
|
|
20746
20859
|
var SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target }) => {
|
|
20747
|
-
const { setDragOverrides, clearDragOverrides, setPropStatuses } = useContext28(
|
|
20860
|
+
const { setDragOverrides, clearDragOverrides, setPropStatuses } = useContext28(Internals33.VisualModeSettersContext);
|
|
20748
20861
|
const { editorSnapping } = useContext28(EditorSnappingContext);
|
|
20749
20862
|
const transformOriginDrag = target?.transformOriginDrag ?? null;
|
|
20750
20863
|
const parsed = useMemo48(() => transformOriginDrag === null ? null : parseTransformOrigin(transformOriginDrag.originValue), [transformOriginDrag]);
|
|
@@ -20832,16 +20945,16 @@ var SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target
|
|
|
20832
20945
|
});
|
|
20833
20946
|
const translate = serializeTranslate(nextTranslateX, nextTranslateY);
|
|
20834
20947
|
last = { uv: nextUv, origin, translate };
|
|
20835
|
-
setDragOverrides(transformOriginDrag.nodePath, transformOriginFieldKey, transformOriginDrag.originPropStatus.status === "keyframed" ?
|
|
20948
|
+
setDragOverrides(transformOriginDrag.nodePath, transformOriginFieldKey, transformOriginDrag.originPropStatus.status === "keyframed" ? Internals33.makeKeyframedDragOverride({
|
|
20836
20949
|
status: transformOriginDrag.originPropStatus,
|
|
20837
20950
|
frame: transformOriginDrag.sourceFrame,
|
|
20838
20951
|
value: origin
|
|
20839
|
-
}) :
|
|
20840
|
-
setDragOverrides(transformOriginDrag.nodePath, translateFieldKey, transformOriginDrag.translatePropStatus.status === "keyframed" ?
|
|
20952
|
+
}) : Internals33.makeStaticDragOverride(origin));
|
|
20953
|
+
setDragOverrides(transformOriginDrag.nodePath, translateFieldKey, transformOriginDrag.translatePropStatus.status === "keyframed" ? Internals33.makeKeyframedDragOverride({
|
|
20841
20954
|
status: transformOriginDrag.translatePropStatus,
|
|
20842
20955
|
frame: transformOriginDrag.sourceFrame,
|
|
20843
20956
|
value: translate
|
|
20844
|
-
}) :
|
|
20957
|
+
}) : Internals33.makeStaticDragOverride(translate));
|
|
20845
20958
|
};
|
|
20846
20959
|
updateFromPointerPosition();
|
|
20847
20960
|
const onPointerMove = (moveEvent) => {
|
|
@@ -21008,10 +21121,10 @@ var SelectedOutlinePolygon = ({
|
|
|
21008
21121
|
snapTargets,
|
|
21009
21122
|
target
|
|
21010
21123
|
}) => {
|
|
21011
|
-
const { getDragOverrides } = useContext28(
|
|
21012
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext28(
|
|
21124
|
+
const { getDragOverrides } = useContext28(Internals33.VisualModeDragOverridesContext);
|
|
21125
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext28(Internals33.VisualModeSettersContext);
|
|
21013
21126
|
const { editorSnapping } = useContext28(EditorSnappingContext);
|
|
21014
|
-
const timelinePosition =
|
|
21127
|
+
const timelinePosition = Internals33.Timeline.useTimelinePosition();
|
|
21015
21128
|
const timelinePositionRef = useRef27(timelinePosition);
|
|
21016
21129
|
timelinePositionRef.current = timelinePosition;
|
|
21017
21130
|
const polygonRef = useRef27(null);
|
|
@@ -21104,13 +21217,13 @@ var SelectedOutlinePolygon = ({
|
|
|
21104
21217
|
throw new Error("Expected drag value to be available");
|
|
21105
21218
|
}
|
|
21106
21219
|
if (dragState.target.propStatus.status === "keyframed") {
|
|
21107
|
-
setDragOverrides(dragState.target.nodePath, translateFieldKey,
|
|
21220
|
+
setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals33.makeKeyframedDragOverride({
|
|
21108
21221
|
status: dragState.target.propStatus,
|
|
21109
21222
|
frame: dragState.sourceFrame,
|
|
21110
21223
|
value
|
|
21111
21224
|
}));
|
|
21112
21225
|
} else {
|
|
21113
|
-
setDragOverrides(dragState.target.nodePath, translateFieldKey,
|
|
21226
|
+
setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals33.makeStaticDragOverride(value));
|
|
21114
21227
|
}
|
|
21115
21228
|
}
|
|
21116
21229
|
};
|
|
@@ -21296,9 +21409,9 @@ var SelectedOutlineScaleEdgeLine = ({
|
|
|
21296
21409
|
onSelect,
|
|
21297
21410
|
target
|
|
21298
21411
|
}) => {
|
|
21299
|
-
const { getDragOverrides } = useContext28(
|
|
21300
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext28(
|
|
21301
|
-
const timelinePosition =
|
|
21412
|
+
const { getDragOverrides } = useContext28(Internals33.VisualModeDragOverridesContext);
|
|
21413
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext28(Internals33.VisualModeSettersContext);
|
|
21414
|
+
const timelinePosition = Internals33.Timeline.useTimelinePosition();
|
|
21302
21415
|
const timelinePositionRef = useRef27(timelinePosition);
|
|
21303
21416
|
timelinePositionRef.current = timelinePosition;
|
|
21304
21417
|
const scaleDrag = target?.scaleDrag ?? null;
|
|
@@ -21360,13 +21473,13 @@ var SelectedOutlineScaleEdgeLine = ({
|
|
|
21360
21473
|
throw new Error("Expected scale drag value to be available");
|
|
21361
21474
|
}
|
|
21362
21475
|
if (dragState.target.propStatus.status === "keyframed") {
|
|
21363
|
-
setDragOverrides(dragState.target.nodePath, scaleFieldKey,
|
|
21476
|
+
setDragOverrides(dragState.target.nodePath, scaleFieldKey, Internals33.makeKeyframedDragOverride({
|
|
21364
21477
|
status: dragState.target.propStatus,
|
|
21365
21478
|
frame: dragState.sourceFrame,
|
|
21366
21479
|
value
|
|
21367
21480
|
}));
|
|
21368
21481
|
} else {
|
|
21369
|
-
setDragOverrides(dragState.target.nodePath, scaleFieldKey,
|
|
21482
|
+
setDragOverrides(dragState.target.nodePath, scaleFieldKey, Internals33.makeStaticDragOverride(value));
|
|
21370
21483
|
}
|
|
21371
21484
|
}
|
|
21372
21485
|
};
|
|
@@ -21488,10 +21601,10 @@ var SelectedOutlineRotationCornerHandle = ({
|
|
|
21488
21601
|
onSelect,
|
|
21489
21602
|
target
|
|
21490
21603
|
}) => {
|
|
21491
|
-
const { getDragOverrides } = useContext28(
|
|
21492
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext28(
|
|
21604
|
+
const { getDragOverrides } = useContext28(Internals33.VisualModeDragOverridesContext);
|
|
21605
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext28(Internals33.VisualModeSettersContext);
|
|
21493
21606
|
const { editorSnapping } = useContext28(EditorSnappingContext);
|
|
21494
|
-
const timelinePosition =
|
|
21607
|
+
const timelinePosition = Internals33.Timeline.useTimelinePosition();
|
|
21495
21608
|
const timelinePositionRef = useRef27(timelinePosition);
|
|
21496
21609
|
timelinePositionRef.current = timelinePosition;
|
|
21497
21610
|
const rotationDrag = target?.rotationDrag ?? null;
|
|
@@ -21558,13 +21671,13 @@ var SelectedOutlineRotationCornerHandle = ({
|
|
|
21558
21671
|
throw new Error("Expected rotation drag value to be available");
|
|
21559
21672
|
}
|
|
21560
21673
|
if (dragState.target.propStatus.status === "keyframed") {
|
|
21561
|
-
setDragOverrides(dragState.target.nodePath, rotateFieldKey,
|
|
21674
|
+
setDragOverrides(dragState.target.nodePath, rotateFieldKey, Internals33.makeKeyframedDragOverride({
|
|
21562
21675
|
status: dragState.target.propStatus,
|
|
21563
21676
|
frame: dragState.sourceFrame,
|
|
21564
21677
|
value
|
|
21565
21678
|
}));
|
|
21566
21679
|
} else {
|
|
21567
|
-
setDragOverrides(dragState.target.nodePath, rotateFieldKey,
|
|
21680
|
+
setDragOverrides(dragState.target.nodePath, rotateFieldKey, Internals33.makeStaticDragOverride(value));
|
|
21568
21681
|
}
|
|
21569
21682
|
}
|
|
21570
21683
|
};
|
|
@@ -21730,12 +21843,12 @@ var SelectedOutlineElement = ({
|
|
|
21730
21843
|
target
|
|
21731
21844
|
}) => {
|
|
21732
21845
|
const { previewServerState } = useContext28(StudioServerConnectionCtx);
|
|
21733
|
-
const { setPropStatuses } = useContext28(
|
|
21734
|
-
const updateResolvedStackTrace = useContext28(
|
|
21846
|
+
const { setPropStatuses } = useContext28(Internals33.VisualModeSettersContext);
|
|
21847
|
+
const updateResolvedStackTrace = useContext28(Internals33.SequenceStackTracesUpdateContext);
|
|
21735
21848
|
const confirm = useConfirmationDialog();
|
|
21736
21849
|
const selectAsset = useSelectAsset();
|
|
21737
21850
|
const selectComposition = useSelectComposition();
|
|
21738
|
-
const { compositions } = useContext28(
|
|
21851
|
+
const { compositions } = useContext28(Internals33.CompositionManager);
|
|
21739
21852
|
const { setSelectedModal } = useContext28(ModalsContext);
|
|
21740
21853
|
const resolveOriginalLocation = React62.useCallback(async (resolveTarget) => {
|
|
21741
21854
|
const stack2 = resolveTarget.sequence.getStack();
|
|
@@ -21964,7 +22077,7 @@ var SelectedOutlineElement = ({
|
|
|
21964
22077
|
|
|
21965
22078
|
// src/components/SelectedOutlineUvControls.tsx
|
|
21966
22079
|
import React63, { useContext as useContext29, useMemo as useMemo49 } from "react";
|
|
21967
|
-
import { Internals as
|
|
22080
|
+
import { Internals as Internals34 } from "remotion";
|
|
21968
22081
|
import { jsx as jsx79, jsxs as jsxs37, Fragment as Fragment16 } from "react/jsx-runtime";
|
|
21969
22082
|
var getSvgPointFromPointerEvent = ({
|
|
21970
22083
|
event,
|
|
@@ -22125,7 +22238,7 @@ var getLocalEllipseWidthProgress = ({
|
|
|
22125
22238
|
}) / (width / 2);
|
|
22126
22239
|
};
|
|
22127
22240
|
var SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) => {
|
|
22128
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext29(
|
|
22241
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext29(Internals34.VisualModeSettersContext);
|
|
22129
22242
|
const { startControl } = control;
|
|
22130
22243
|
const field = startControl?.field;
|
|
22131
22244
|
const onPointerDown = React63.useCallback((event) => {
|
|
@@ -22160,11 +22273,11 @@ var SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) => {
|
|
|
22160
22273
|
width: control.width
|
|
22161
22274
|
}), field.fieldSchema);
|
|
22162
22275
|
lastValue = nextValue;
|
|
22163
|
-
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ?
|
|
22276
|
+
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals34.makeKeyframedDragOverride({
|
|
22164
22277
|
status: field.propStatus,
|
|
22165
22278
|
frame: control.handle.sourceFrame,
|
|
22166
22279
|
value: nextValue
|
|
22167
|
-
}) :
|
|
22280
|
+
}) : Internals34.makeStaticDragOverride(nextValue));
|
|
22168
22281
|
};
|
|
22169
22282
|
const onPointerMove = (moveEvent) => {
|
|
22170
22283
|
moveEvent.preventDefault();
|
|
@@ -22234,7 +22347,7 @@ var SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) => {
|
|
|
22234
22347
|
});
|
|
22235
22348
|
};
|
|
22236
22349
|
var SelectedUvEllipseResizeHandle = ({ axis, control, onDraggingChange, outline }) => {
|
|
22237
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext29(
|
|
22350
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext29(Internals34.VisualModeSettersContext);
|
|
22238
22351
|
const resizeControl = control.resize.find((item) => item.axis === axis);
|
|
22239
22352
|
const field = resizeControl?.field;
|
|
22240
22353
|
const onPointerDown = React63.useCallback((event) => {
|
|
@@ -22270,11 +22383,11 @@ var SelectedUvEllipseResizeHandle = ({ axis, control, onDraggingChange, outline
|
|
|
22270
22383
|
});
|
|
22271
22384
|
const nextValue = roundNumericUvEllipseValue(Math.max(0, axisValue * 2), field.fieldSchema);
|
|
22272
22385
|
lastValue = nextValue;
|
|
22273
|
-
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ?
|
|
22386
|
+
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals34.makeKeyframedDragOverride({
|
|
22274
22387
|
status: field.propStatus,
|
|
22275
22388
|
frame: control.handle.sourceFrame,
|
|
22276
22389
|
value: nextValue
|
|
22277
|
-
}) :
|
|
22390
|
+
}) : Internals34.makeStaticDragOverride(nextValue));
|
|
22278
22391
|
};
|
|
22279
22392
|
const onPointerMove = (moveEvent) => {
|
|
22280
22393
|
moveEvent.preventDefault();
|
|
@@ -22374,7 +22487,7 @@ var trimLineToCircleEdges = ({
|
|
|
22374
22487
|
};
|
|
22375
22488
|
};
|
|
22376
22489
|
var SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
|
|
22377
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext29(
|
|
22490
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext29(Internals34.VisualModeSettersContext);
|
|
22378
22491
|
const { editorSnapping } = useContext29(EditorSnappingContext);
|
|
22379
22492
|
const { rotationControl } = control;
|
|
22380
22493
|
const field = rotationControl?.field;
|
|
@@ -22413,11 +22526,11 @@ var SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
|
|
|
22413
22526
|
});
|
|
22414
22527
|
lastValue = nextValue;
|
|
22415
22528
|
forceSpecificCursor(getRotationCursor(startCursorDegrees + cursorDelta));
|
|
22416
|
-
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ?
|
|
22529
|
+
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals34.makeKeyframedDragOverride({
|
|
22417
22530
|
status: field.propStatus,
|
|
22418
22531
|
frame: control.handle.sourceFrame,
|
|
22419
22532
|
value: nextValue
|
|
22420
|
-
}) :
|
|
22533
|
+
}) : Internals34.makeStaticDragOverride(nextValue));
|
|
22421
22534
|
};
|
|
22422
22535
|
const onPointerMove = (moveEvent) => {
|
|
22423
22536
|
moveEvent.preventDefault();
|
|
@@ -22534,7 +22647,7 @@ var SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
|
|
|
22534
22647
|
});
|
|
22535
22648
|
};
|
|
22536
22649
|
var SelectedUvHandleCircle = ({ handle, nodePathInfo, onDraggingChange, onSelect, outline }) => {
|
|
22537
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext29(
|
|
22650
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext29(Internals34.VisualModeSettersContext);
|
|
22538
22651
|
const { editorSnapping } = useContext29(EditorSnappingContext);
|
|
22539
22652
|
const position = useMemo49(() => getUvHandlePosition(outline.points, handle.value), [handle.value, outline.points]);
|
|
22540
22653
|
const onPointerDown = React63.useCallback((event) => {
|
|
@@ -22575,11 +22688,11 @@ var SelectedUvHandleCircle = ({ handle, nodePathInfo, onDraggingChange, onSelect
|
|
|
22575
22688
|
}) : rawUv;
|
|
22576
22689
|
const nextValue = roundUvCoordinate(constrainUv(snappedUv, handle.fieldSchema), handle.fieldSchema);
|
|
22577
22690
|
lastValue = nextValue;
|
|
22578
|
-
setEffectDragOverrides(handle.nodePath, handle.effectIndex, handle.fieldKey, handle.propStatus.status === "keyframed" ?
|
|
22691
|
+
setEffectDragOverrides(handle.nodePath, handle.effectIndex, handle.fieldKey, handle.propStatus.status === "keyframed" ? Internals34.makeKeyframedDragOverride({
|
|
22579
22692
|
status: handle.propStatus,
|
|
22580
22693
|
frame: handle.sourceFrame,
|
|
22581
22694
|
value: nextValue
|
|
22582
|
-
}) :
|
|
22695
|
+
}) : Internals34.makeStaticDragOverride(nextValue));
|
|
22583
22696
|
};
|
|
22584
22697
|
const updateDragFromPointerEvent = (pointerEvent) => {
|
|
22585
22698
|
if (!dragging) {
|
|
@@ -23022,19 +23135,19 @@ var SelectedOutlineOverlay = ({
|
|
|
23022
23135
|
translationY
|
|
23023
23136
|
}) => {
|
|
23024
23137
|
const { selectedItems, selectItem } = useTimelineSelection();
|
|
23025
|
-
const { sequences } = useContext30(
|
|
23026
|
-
const { canvasContent, compositions } = useContext30(
|
|
23027
|
-
const { propStatuses } = useContext30(
|
|
23138
|
+
const { sequences } = useContext30(Internals35.SequenceManager);
|
|
23139
|
+
const { canvasContent, compositions } = useContext30(Internals35.CompositionManager);
|
|
23140
|
+
const { propStatuses } = useContext30(Internals35.VisualModePropStatusesContext);
|
|
23028
23141
|
const { previewServerState } = useContext30(StudioServerConnectionCtx);
|
|
23029
|
-
const { overrideIdToNodePathMappings } = useContext30(
|
|
23030
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext30(
|
|
23031
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext30(
|
|
23142
|
+
const { overrideIdToNodePathMappings } = useContext30(Internals35.OverrideIdsToNodePathsGettersContext);
|
|
23143
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext30(Internals35.VisualModeDragOverridesContext);
|
|
23144
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext30(Internals35.VisualModeSettersContext);
|
|
23032
23145
|
const { getScaleLockState } = useContext30(ScaleLockContext);
|
|
23033
23146
|
const { editorShowOutlines } = useContext30(EditorShowOutlinesContext);
|
|
23034
23147
|
const { editorShowGuides, guidesList } = useContext30(EditorShowGuidesContext);
|
|
23035
23148
|
const { frameBack, frameForward, getCurrentFrame: getCurrentFrame2, seek } = PlayerInternals9.usePlayer();
|
|
23036
23149
|
const keybindings = useKeybinding();
|
|
23037
|
-
const timelinePosition =
|
|
23150
|
+
const timelinePosition = Internals35.Timeline.useTimelinePosition();
|
|
23038
23151
|
const [outlines, setOutlines] = useState38([]);
|
|
23039
23152
|
const [hoveredOutlineKey, setHoveredOutlineKey] = useState38(null);
|
|
23040
23153
|
const [draggingOutline, setDraggingOutline] = useState38(false);
|
|
@@ -23079,7 +23192,7 @@ var SelectedOutlineOverlay = ({
|
|
|
23079
23192
|
const containsSelection = sequenceKeysContainingSelection.has(key3);
|
|
23080
23193
|
const nodePath = nodePathInfo.sequenceSubscriptionKey;
|
|
23081
23194
|
const { controls } = sequence;
|
|
23082
|
-
const nodePropStatuses =
|
|
23195
|
+
const nodePropStatuses = Internals35.getPropStatusesCtx(propStatuses, nodePath);
|
|
23083
23196
|
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
23084
23197
|
const dragOverrides = getDragOverrides(nodePath) ?? {};
|
|
23085
23198
|
const activeSchema = controls ? getSelectedOutlineActiveSchema({
|
|
@@ -23097,7 +23210,7 @@ var SelectedOutlineOverlay = ({
|
|
|
23097
23210
|
const rotationPropStatus = nodePropStatuses?.[rotateFieldKey];
|
|
23098
23211
|
const transformOriginFieldSchema = activeSchema?.[transformOriginFieldKey];
|
|
23099
23212
|
const transformOriginPropStatus = nodePropStatuses?.[transformOriginFieldKey];
|
|
23100
|
-
const transformOriginValueForRotation = transformOriginFieldSchema?.type === "transform-origin" && (transformOriginPropStatus?.status === "static" || transformOriginPropStatus?.status === "keyframed") ? String(
|
|
23213
|
+
const transformOriginValueForRotation = transformOriginFieldSchema?.type === "transform-origin" && (transformOriginPropStatus?.status === "static" || transformOriginPropStatus?.status === "keyframed") ? String(Internals35.getEffectiveVisualModeValue({
|
|
23101
23214
|
propStatus: transformOriginPropStatus,
|
|
23102
23215
|
dragOverrideValue: dragOverrides[transformOriginFieldKey],
|
|
23103
23216
|
defaultValue: transformOriginFieldSchema.default,
|
|
@@ -23148,7 +23261,7 @@ var SelectedOutlineOverlay = ({
|
|
|
23148
23261
|
fieldKey: scaleFieldKey,
|
|
23149
23262
|
defaultValue: (() => {
|
|
23150
23263
|
const dragOverrideValue = dragOverrides[scaleFieldKey];
|
|
23151
|
-
const effectiveValue =
|
|
23264
|
+
const effectiveValue = Internals35.getEffectiveVisualModeValue({
|
|
23152
23265
|
propStatus: scalePropStatus,
|
|
23153
23266
|
dragOverrideValue,
|
|
23154
23267
|
defaultValue: scaleFieldSchema.default,
|
|
@@ -23177,21 +23290,21 @@ var SelectedOutlineOverlay = ({
|
|
|
23177
23290
|
nodePath,
|
|
23178
23291
|
originDefault: transformOriginFieldSchema.default,
|
|
23179
23292
|
originPropStatus: transformOriginPropStatus,
|
|
23180
|
-
originValue: String(
|
|
23293
|
+
originValue: String(Internals35.getEffectiveVisualModeValue({
|
|
23181
23294
|
propStatus: transformOriginPropStatus,
|
|
23182
23295
|
dragOverrideValue: dragOverrides[transformOriginFieldKey],
|
|
23183
23296
|
defaultValue: transformOriginFieldSchema.default,
|
|
23184
23297
|
frame: transformOriginSourceFrame,
|
|
23185
23298
|
shouldResortToDefaultValueIfUndefined: true
|
|
23186
23299
|
}) ?? transformOriginFieldSchema.default),
|
|
23187
|
-
rotateValue: String(rotationPropStatus?.status === "static" || rotationPropStatus?.status === "keyframed" ?
|
|
23300
|
+
rotateValue: String(rotationPropStatus?.status === "static" || rotationPropStatus?.status === "keyframed" ? Internals35.getEffectiveVisualModeValue({
|
|
23188
23301
|
propStatus: rotationPropStatus,
|
|
23189
23302
|
dragOverrideValue: dragOverrides[rotateFieldKey],
|
|
23190
23303
|
defaultValue: rotationFieldSchema?.type === "rotation-css" ? rotationFieldSchema.default : "0deg",
|
|
23191
23304
|
frame: transformOriginSourceFrame,
|
|
23192
23305
|
shouldResortToDefaultValueIfUndefined: true
|
|
23193
23306
|
}) ?? "0deg" : "0deg"),
|
|
23194
|
-
scaleValue: scalePropStatus?.status === "static" || scalePropStatus?.status === "keyframed" ? String(
|
|
23307
|
+
scaleValue: scalePropStatus?.status === "static" || scalePropStatus?.status === "keyframed" ? String(Internals35.getEffectiveVisualModeValue({
|
|
23195
23308
|
propStatus: scalePropStatus,
|
|
23196
23309
|
dragOverrideValue: dragOverrides[scaleFieldKey],
|
|
23197
23310
|
defaultValue: scaleFieldSchema?.type === "scale" ? scaleFieldSchema.default : 1,
|
|
@@ -23202,7 +23315,7 @@ var SelectedOutlineOverlay = ({
|
|
|
23202
23315
|
sourceFrame: transformOriginSourceFrame,
|
|
23203
23316
|
translateDefault: fieldSchema.default,
|
|
23204
23317
|
translatePropStatus: propStatus,
|
|
23205
|
-
translateValue: String(
|
|
23318
|
+
translateValue: String(Internals35.getEffectiveVisualModeValue({
|
|
23206
23319
|
propStatus,
|
|
23207
23320
|
dragOverrideValue: dragOverrides[translateFieldKey],
|
|
23208
23321
|
defaultValue: fieldSchema.default,
|
|
@@ -23438,13 +23551,13 @@ var SelectedOutlineOverlay = ({
|
|
|
23438
23551
|
throw new Error("Expected drag value to be available");
|
|
23439
23552
|
}
|
|
23440
23553
|
if (dragState.target.propStatus.status === "keyframed") {
|
|
23441
|
-
setDragOverrides(dragState.target.nodePath, translateFieldKey,
|
|
23554
|
+
setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals35.makeKeyframedDragOverride({
|
|
23442
23555
|
status: dragState.target.propStatus,
|
|
23443
23556
|
frame: dragState.sourceFrame,
|
|
23444
23557
|
value
|
|
23445
23558
|
}));
|
|
23446
23559
|
} else {
|
|
23447
|
-
setDragOverrides(dragState.target.nodePath, translateFieldKey,
|
|
23560
|
+
setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals35.makeStaticDragOverride(value));
|
|
23448
23561
|
}
|
|
23449
23562
|
}
|
|
23450
23563
|
}, [
|
|
@@ -23711,7 +23824,7 @@ var VideoPreview = ({
|
|
|
23711
23824
|
});
|
|
23712
23825
|
};
|
|
23713
23826
|
var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
|
|
23714
|
-
const { size: previewSize } = useContext32(
|
|
23827
|
+
const { size: previewSize } = useContext32(Internals36.PreviewSizeContext);
|
|
23715
23828
|
const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo51(() => {
|
|
23716
23829
|
if (contentDimensions === "none") {
|
|
23717
23830
|
return {
|
|
@@ -23822,9 +23935,9 @@ var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) =
|
|
|
23822
23935
|
]);
|
|
23823
23936
|
useEffect40(() => {
|
|
23824
23937
|
const { current } = portalContainer;
|
|
23825
|
-
current?.appendChild(
|
|
23938
|
+
current?.appendChild(Internals36.portalNode());
|
|
23826
23939
|
return () => {
|
|
23827
|
-
current?.removeChild(
|
|
23940
|
+
current?.removeChild(Internals36.portalNode());
|
|
23828
23941
|
};
|
|
23829
23942
|
}, []);
|
|
23830
23943
|
const onPointerDown = useCallback42((event) => {
|
|
@@ -23995,7 +24108,7 @@ var getDropPosition = ({
|
|
|
23995
24108
|
if (contentDimensions === null || contentDimensions === "none") {
|
|
23996
24109
|
return null;
|
|
23997
24110
|
}
|
|
23998
|
-
const scale =
|
|
24111
|
+
const scale = Internals37.calculateScale({
|
|
23999
24112
|
canvasSize: size2,
|
|
24000
24113
|
compositionHeight: contentDimensions.height,
|
|
24001
24114
|
compositionWidth: contentDimensions.width,
|
|
@@ -24025,7 +24138,7 @@ var isDragEventInsideCanvas = (event) => {
|
|
|
24025
24138
|
return event.clientX >= rect.left && event.clientX <= rect.right && event.clientY >= rect.top && event.clientY <= rect.bottom;
|
|
24026
24139
|
};
|
|
24027
24140
|
var Canvas = ({ canvasContent, size: size2 }) => {
|
|
24028
|
-
const { setSize, size: previewSize } = useContext33(
|
|
24141
|
+
const { setSize, size: previewSize } = useContext33(Internals37.PreviewSizeContext);
|
|
24029
24142
|
const { editorZoomGestures } = useContext33(EditorZoomGesturesContext);
|
|
24030
24143
|
const previewSnapshotRef = useRef30({
|
|
24031
24144
|
previewSize,
|
|
@@ -24037,10 +24150,10 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24037
24150
|
const touchPinchRef = useRef30(null);
|
|
24038
24151
|
const keybindings = useKeybinding();
|
|
24039
24152
|
const confirm = useConfirmationDialog();
|
|
24040
|
-
const config =
|
|
24153
|
+
const config = Internals37.useUnsafeVideoConfig();
|
|
24041
24154
|
const areRulersVisible = useIsRulerVisible();
|
|
24042
24155
|
const { editorShowGuides } = useContext33(EditorShowGuidesContext);
|
|
24043
|
-
const { compositions } = useContext33(
|
|
24156
|
+
const { compositions } = useContext33(Internals37.CompositionManager);
|
|
24044
24157
|
const { previewServerState, subscribeToEvent } = useContext33(StudioServerConnectionCtx);
|
|
24045
24158
|
const previewServerClientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
|
|
24046
24159
|
const [isAddingAsset, setIsAddingAsset] = useState39(false);
|
|
@@ -24100,7 +24213,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24100
24213
|
}
|
|
24101
24214
|
ev.preventDefault();
|
|
24102
24215
|
setSize((prevSize) => {
|
|
24103
|
-
const scale =
|
|
24216
|
+
const scale = Internals37.calculateScale({
|
|
24104
24217
|
canvasSize: size2,
|
|
24105
24218
|
compositionHeight: contentDimensions.height,
|
|
24106
24219
|
compositionWidth: contentDimensions.width,
|
|
@@ -24173,7 +24286,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24173
24286
|
}
|
|
24174
24287
|
e.preventDefault();
|
|
24175
24288
|
suppressWheelFromWebKitPinchRef.current = true;
|
|
24176
|
-
const fitted =
|
|
24289
|
+
const fitted = Internals37.calculateScale({
|
|
24177
24290
|
canvasSize: canvasSz,
|
|
24178
24291
|
compositionHeight: cdim.height,
|
|
24179
24292
|
compositionWidth: cdim.width,
|
|
@@ -24193,7 +24306,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24193
24306
|
const dimensions = cdim;
|
|
24194
24307
|
e.preventDefault();
|
|
24195
24308
|
setSize((prevSize) => {
|
|
24196
|
-
const scale =
|
|
24309
|
+
const scale = Internals37.calculateScale({
|
|
24197
24310
|
canvasSize: canvasSz,
|
|
24198
24311
|
compositionHeight: dimensions.height,
|
|
24199
24312
|
compositionWidth: dimensions.width,
|
|
@@ -24248,7 +24361,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24248
24361
|
if (initialDistance < 0.000001) {
|
|
24249
24362
|
return;
|
|
24250
24363
|
}
|
|
24251
|
-
const fitted =
|
|
24364
|
+
const fitted = Internals37.calculateScale({
|
|
24252
24365
|
canvasSize: snap.canvasSize,
|
|
24253
24366
|
compositionHeight: snap.contentDimensions.height,
|
|
24254
24367
|
compositionWidth: snap.contentDimensions.width,
|
|
@@ -24272,7 +24385,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24272
24385
|
setSize((prevSize) => {
|
|
24273
24386
|
const canvasSz = snap.canvasSize;
|
|
24274
24387
|
const cdim = snap.contentDimensions;
|
|
24275
|
-
const scale =
|
|
24388
|
+
const scale = Internals37.calculateScale({
|
|
24276
24389
|
canvasSize: canvasSz,
|
|
24277
24390
|
compositionHeight: cdim.height,
|
|
24278
24391
|
compositionWidth: cdim.width,
|
|
@@ -24325,7 +24438,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24325
24438
|
return;
|
|
24326
24439
|
}
|
|
24327
24440
|
setSize((prevSize) => {
|
|
24328
|
-
const scale =
|
|
24441
|
+
const scale = Internals37.calculateScale({
|
|
24329
24442
|
canvasSize: size2,
|
|
24330
24443
|
compositionHeight: contentDimensions.height,
|
|
24331
24444
|
compositionWidth: contentDimensions.width,
|
|
@@ -24348,7 +24461,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24348
24461
|
return;
|
|
24349
24462
|
}
|
|
24350
24463
|
setSize((prevSize) => {
|
|
24351
|
-
const scale =
|
|
24464
|
+
const scale = Internals37.calculateScale({
|
|
24352
24465
|
canvasSize: size2,
|
|
24353
24466
|
compositionHeight: contentDimensions.height,
|
|
24354
24467
|
compositionWidth: contentDimensions.width,
|
|
@@ -24612,6 +24725,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24612
24725
|
files,
|
|
24613
24726
|
compositionFile,
|
|
24614
24727
|
compositionId: currentCompositionId,
|
|
24728
|
+
destinationDimensions: contentDimensions === "none" ? null : contentDimensions,
|
|
24615
24729
|
dropPosition
|
|
24616
24730
|
});
|
|
24617
24731
|
} else if (isAssetDragEvent(event)) {
|
|
@@ -24623,6 +24737,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24623
24737
|
assetPaths: [assetPath],
|
|
24624
24738
|
compositionFile,
|
|
24625
24739
|
compositionId: currentCompositionId,
|
|
24740
|
+
destinationDimensions: contentDimensions === "none" ? null : contentDimensions,
|
|
24626
24741
|
dropPosition
|
|
24627
24742
|
});
|
|
24628
24743
|
} else if (isSfxDragEvent(event)) {
|
|
@@ -24676,6 +24791,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24676
24791
|
url,
|
|
24677
24792
|
compositionFile,
|
|
24678
24793
|
compositionId: currentCompositionId,
|
|
24794
|
+
destinationDimensions: contentDimensions === "none" ? null : contentDimensions,
|
|
24679
24795
|
dropPosition
|
|
24680
24796
|
});
|
|
24681
24797
|
}
|
|
@@ -24740,17 +24856,17 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
24740
24856
|
|
|
24741
24857
|
// src/components/FramePersistor.tsx
|
|
24742
24858
|
import { useEffect as useEffect42 } from "react";
|
|
24743
|
-
import { Internals as
|
|
24859
|
+
import { Internals as Internals38, useVideoConfig as useVideoConfig2 } from "remotion";
|
|
24744
24860
|
var FramePersistor = () => {
|
|
24745
|
-
const [playing] =
|
|
24861
|
+
const [playing] = Internals38.Timeline.usePlayingState();
|
|
24746
24862
|
const config = useVideoConfig2();
|
|
24747
|
-
const frame2 =
|
|
24748
|
-
const setFrame =
|
|
24863
|
+
const frame2 = Internals38.Timeline.useTimelinePosition();
|
|
24864
|
+
const setFrame = Internals38.useTimelineSetFrame();
|
|
24749
24865
|
useEffect42(() => {
|
|
24750
24866
|
if (!playing) {
|
|
24751
24867
|
setFrame((f) => {
|
|
24752
24868
|
const newObj = f[config.id] === frame2 ? f : { ...f, [config.id]: frame2 };
|
|
24753
|
-
|
|
24869
|
+
Internals38.persistCurrentFrame(newObj);
|
|
24754
24870
|
return newObj;
|
|
24755
24871
|
});
|
|
24756
24872
|
}
|
|
@@ -24842,9 +24958,9 @@ var container19 = {
|
|
|
24842
24958
|
flexDirection: "column"
|
|
24843
24959
|
};
|
|
24844
24960
|
var CanvasOrLoading = ({ size: size2 }) => {
|
|
24845
|
-
const resolved =
|
|
24961
|
+
const resolved = Internals39.useResolvedVideoConfig(null);
|
|
24846
24962
|
const { setZoom } = useContext34(TimelineZoomCtx);
|
|
24847
|
-
const { canvasContent } = useContext34(
|
|
24963
|
+
const { canvasContent } = useContext34(Internals39.CompositionManager);
|
|
24848
24964
|
const { error: renderError } = useContext34(RenderErrorContext);
|
|
24849
24965
|
useEffect43(() => {
|
|
24850
24966
|
if (resolved?.type !== "success" && resolved?.type !== "success-and-refreshing") {
|
|
@@ -24933,7 +25049,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
|
|
|
24933
25049
|
canHaveDismissButton: false,
|
|
24934
25050
|
keyboardShortcuts: true,
|
|
24935
25051
|
error,
|
|
24936
|
-
onRetry: () =>
|
|
25052
|
+
onRetry: () => Internals39.resolveCompositionsRef.current?.reloadCurrentlySelectedComposition(),
|
|
24937
25053
|
calculateMetadata: calculateMetadataContext
|
|
24938
25054
|
}, error.stack)
|
|
24939
25055
|
});
|
|
@@ -24943,7 +25059,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
|
|
|
24943
25059
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
24944
25060
|
var CanvasIfSizeIsAvailable = () => {
|
|
24945
25061
|
const rulersAreVisible = useIsRulerVisible();
|
|
24946
|
-
const context = useContext35(
|
|
25062
|
+
const context = useContext35(Internals40.CurrentScaleContext);
|
|
24947
25063
|
const sizeWithRulersApplied = useMemo53(() => {
|
|
24948
25064
|
const size2 = context && context.type === "canvas-size" ? context.canvasSize : null;
|
|
24949
25065
|
if (!rulersAreVisible) {
|
|
@@ -24964,7 +25080,7 @@ var CanvasIfSizeIsAvailable = () => {
|
|
|
24964
25080
|
|
|
24965
25081
|
// src/components/CurrentCompositionSideEffects.tsx
|
|
24966
25082
|
import { useContext as useContext36, useEffect as useEffect44 } from "react";
|
|
24967
|
-
import { Internals as
|
|
25083
|
+
import { Internals as Internals41 } from "remotion";
|
|
24968
25084
|
|
|
24969
25085
|
// src/helpers/document-title.ts
|
|
24970
25086
|
import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
|
|
@@ -25019,7 +25135,7 @@ var getProgressInBrackets = (selectedCompositionId, jobs) => {
|
|
|
25019
25135
|
// src/components/CurrentCompositionSideEffects.tsx
|
|
25020
25136
|
var TitleUpdater = () => {
|
|
25021
25137
|
const renderQueue = useContext36(RenderQueueContext);
|
|
25022
|
-
const { canvasContent } = useContext36(
|
|
25138
|
+
const { canvasContent } = useContext36(Internals41.CompositionManager);
|
|
25023
25139
|
const { jobs } = renderQueue;
|
|
25024
25140
|
useEffect44(() => {
|
|
25025
25141
|
if (!canvasContent) {
|
|
@@ -25112,7 +25228,7 @@ import {
|
|
|
25112
25228
|
useRef as useRef32,
|
|
25113
25229
|
useState as useState40
|
|
25114
25230
|
} from "react";
|
|
25115
|
-
import { Internals as
|
|
25231
|
+
import { Internals as Internals42 } from "remotion";
|
|
25116
25232
|
import { NoReactInternals as NoReactInternals15 } from "remotion/no-react";
|
|
25117
25233
|
|
|
25118
25234
|
// src/api/delete-static-file.ts
|
|
@@ -25467,8 +25583,8 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
|
|
|
25467
25583
|
const onPointerEnter = useCallback46(() => {
|
|
25468
25584
|
setHovered(true);
|
|
25469
25585
|
}, []);
|
|
25470
|
-
const { setCanvasContent } = useContext37(
|
|
25471
|
-
const { canvasContent } = useContext37(
|
|
25586
|
+
const { setCanvasContent } = useContext37(Internals42.CompositionSetters);
|
|
25587
|
+
const { canvasContent } = useContext37(Internals42.CompositionManager);
|
|
25472
25588
|
const relativePath = useMemo55(() => {
|
|
25473
25589
|
return parentFolder ? parentFolder + "/" + item.name : item.name;
|
|
25474
25590
|
}, [parentFolder, item.name]);
|
|
@@ -25919,7 +26035,7 @@ import {
|
|
|
25919
26035
|
useRef as useRef35,
|
|
25920
26036
|
useState as useState44
|
|
25921
26037
|
} from "react";
|
|
25922
|
-
import { Internals as
|
|
26038
|
+
import { Internals as Internals44 } from "remotion";
|
|
25923
26039
|
|
|
25924
26040
|
// src/components/CompositionSelectorItem.tsx
|
|
25925
26041
|
import {
|
|
@@ -26295,7 +26411,7 @@ var getFolderMenuItems = ({
|
|
|
26295
26411
|
|
|
26296
26412
|
// src/components/SidebarRenderButton.tsx
|
|
26297
26413
|
import { useCallback as useCallback50, useContext as useContext40, useMemo as useMemo59 } from "react";
|
|
26298
|
-
import { Internals as
|
|
26414
|
+
import { Internals as Internals43 } from "remotion";
|
|
26299
26415
|
|
|
26300
26416
|
// src/icons/render.tsx
|
|
26301
26417
|
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
@@ -26325,7 +26441,7 @@ var SidebarRenderButton = ({ composition, visible }) => {
|
|
|
26325
26441
|
};
|
|
26326
26442
|
}, []);
|
|
26327
26443
|
const connectionStatus = useContext40(StudioServerConnectionCtx).previewServerState.type;
|
|
26328
|
-
const { props } = useContext40(
|
|
26444
|
+
const { props } = useContext40(Internals43.EditorPropsContext);
|
|
26329
26445
|
const onClick = useCallback50((e) => {
|
|
26330
26446
|
const defaults = window.remotion_renderDefaults;
|
|
26331
26447
|
if (!defaults) {
|
|
@@ -26799,7 +26915,7 @@ var getRootCompositionMenuItems = ({
|
|
|
26799
26915
|
// src/components/CompositionSelector.tsx
|
|
26800
26916
|
import { jsx as jsx103, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
26801
26917
|
var useCompositionNavigation = () => {
|
|
26802
|
-
const { compositions, canvasContent } = useContext42(
|
|
26918
|
+
const { compositions, canvasContent } = useContext42(Internals44.CompositionManager);
|
|
26803
26919
|
const selectComposition = useSelectComposition();
|
|
26804
26920
|
const navigateToNextComposition = useCallback52(() => {
|
|
26805
26921
|
if (!canvasContent || canvasContent.type !== "composition" || compositions.length <= 1) {
|
|
@@ -26883,7 +26999,7 @@ var getAutoScrollSpeed = ({
|
|
|
26883
26999
|
return 0;
|
|
26884
27000
|
};
|
|
26885
27001
|
var CompositionSelector = () => {
|
|
26886
|
-
const { compositions, canvasContent, folders } = useContext42(
|
|
27002
|
+
const { compositions, canvasContent, folders } = useContext42(Internals44.CompositionManager);
|
|
26887
27003
|
const { foldersExpanded } = useContext42(ExpandedFoldersContext);
|
|
26888
27004
|
const { setSelectedModal } = useContext42(ModalsContext);
|
|
26889
27005
|
const connectionStatus = useContext42(StudioServerConnectionCtx).previewServerState.type;
|
|
@@ -26917,7 +27033,7 @@ var CompositionSelector = () => {
|
|
|
26917
27033
|
};
|
|
26918
27034
|
}, [rootDragHovered]);
|
|
26919
27035
|
const toggleFolder = useCallback52((folderName, parentName) => {
|
|
26920
|
-
|
|
27036
|
+
Internals44.compositionSelectorRef.current?.toggleFolder(folderName, parentName);
|
|
26921
27037
|
}, []);
|
|
26922
27038
|
const openQuickSwitcher = useCallback52(() => {
|
|
26923
27039
|
setSelectedModal({
|
|
@@ -27083,10 +27199,10 @@ var CompositionSelector = () => {
|
|
|
27083
27199
|
|
|
27084
27200
|
// src/components/CompSelectorRef.tsx
|
|
27085
27201
|
import { useCallback as useCallback53, useContext as useContext43, useImperativeHandle as useImperativeHandle8, useMemo as useMemo62 } from "react";
|
|
27086
|
-
import { Internals as
|
|
27202
|
+
import { Internals as Internals45 } from "remotion";
|
|
27087
27203
|
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
27088
27204
|
var CompSelectorRef = ({ children }) => {
|
|
27089
|
-
const { compositions } = useContext43(
|
|
27205
|
+
const { compositions } = useContext43(Internals45.CompositionManager);
|
|
27090
27206
|
const { compositionFoldersExpanded, setCompositionFoldersExpanded } = useContext43(FolderContext);
|
|
27091
27207
|
const selectComposition = useSelectComposition();
|
|
27092
27208
|
const toggleFolder = useCallback53((folderName, parentName) => {
|
|
@@ -27097,7 +27213,7 @@ var CompSelectorRef = ({ children }) => {
|
|
|
27097
27213
|
return foldersExpandedState;
|
|
27098
27214
|
});
|
|
27099
27215
|
}, [setCompositionFoldersExpanded]);
|
|
27100
|
-
useImperativeHandle8(
|
|
27216
|
+
useImperativeHandle8(Internals45.compositionSelectorRef, () => {
|
|
27101
27217
|
return {
|
|
27102
27218
|
expandComposition: (compName) => {
|
|
27103
27219
|
const compositionToExpand = compositions.find((c) => c.id === compName);
|
|
@@ -27354,13 +27470,13 @@ import React76, {
|
|
|
27354
27470
|
useMemo as useMemo64,
|
|
27355
27471
|
useState as useState47
|
|
27356
27472
|
} from "react";
|
|
27357
|
-
import { Internals as
|
|
27473
|
+
import { Internals as Internals46 } from "remotion";
|
|
27358
27474
|
import { NoReactInternals as NoReactInternals17 } from "remotion/no-react";
|
|
27359
27475
|
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
27360
27476
|
var ObserveDefaultPropsContext = React76.createContext(null);
|
|
27361
27477
|
var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
|
|
27362
27478
|
const { previewServerState, subscribeToEvent } = useContext44(StudioServerConnectionCtx);
|
|
27363
|
-
const { updateProps } = useContext44(
|
|
27479
|
+
const { updateProps } = useContext44(Internals46.EditorPropsContext);
|
|
27364
27480
|
const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState47({});
|
|
27365
27481
|
const canSaveDefaultProps = useMemo64(() => {
|
|
27366
27482
|
if (compositionId === null) {
|
|
@@ -27440,7 +27556,7 @@ import {
|
|
|
27440
27556
|
useMemo as useMemo154,
|
|
27441
27557
|
useState as useState85
|
|
27442
27558
|
} from "react";
|
|
27443
|
-
import { Internals as
|
|
27559
|
+
import { Internals as Internals73 } from "remotion";
|
|
27444
27560
|
|
|
27445
27561
|
// src/components/get-zod-if-possible.tsx
|
|
27446
27562
|
import {
|
|
@@ -27967,7 +28083,7 @@ var InspectorDefaultPropsWarnings = ({ warnings }) => {
|
|
|
27967
28083
|
|
|
27968
28084
|
// src/components/InspectorPanel/DefaultInspector.tsx
|
|
27969
28085
|
import { useContext as useContext55, useEffect as useEffect61, useMemo as useMemo109, useState as useState70 } from "react";
|
|
27970
|
-
import { Internals as
|
|
28086
|
+
import { Internals as Internals52 } from "remotion";
|
|
27971
28087
|
|
|
27972
28088
|
// src/visual-controls/VisualControls.tsx
|
|
27973
28089
|
import {
|
|
@@ -28157,7 +28273,7 @@ var VisualControlsProvider = ({ children }) => {
|
|
|
28157
28273
|
// src/components/CurrentAsset.tsx
|
|
28158
28274
|
import { formatBytes as formatBytes2 } from "@remotion/studio-shared";
|
|
28159
28275
|
import { useCallback as useCallback60, useContext as useContext47, useMemo as useMemo69 } from "react";
|
|
28160
|
-
import { Internals as
|
|
28276
|
+
import { Internals as Internals48, staticFile as staticFile4 } from "remotion";
|
|
28161
28277
|
|
|
28162
28278
|
// src/helpers/format-media-duration.ts
|
|
28163
28279
|
var formatMediaDuration = (seconds) => {
|
|
@@ -28569,7 +28685,7 @@ var InspectorInfoSubtitle = ({ children }) => {
|
|
|
28569
28685
|
|
|
28570
28686
|
// src/components/NewComposition/use-rename-static-file.ts
|
|
28571
28687
|
import { useCallback as useCallback59, useContext as useContext46 } from "react";
|
|
28572
|
-
import { Internals as
|
|
28688
|
+
import { Internals as Internals47 } from "remotion";
|
|
28573
28689
|
|
|
28574
28690
|
// src/api/rename-static-file.ts
|
|
28575
28691
|
import { getRemotionEnvironment as getRemotionEnvironment5 } from "remotion";
|
|
@@ -28637,8 +28753,8 @@ var useRenameStaticFile = ({
|
|
|
28637
28753
|
relativePath,
|
|
28638
28754
|
staticFiles
|
|
28639
28755
|
}) => {
|
|
28640
|
-
const { canvasContent } = useContext46(
|
|
28641
|
-
const { setCanvasContent } = useContext46(
|
|
28756
|
+
const { canvasContent } = useContext46(Internals47.CompositionManager);
|
|
28757
|
+
const { setCanvasContent } = useContext46(Internals47.CompositionSetters);
|
|
28642
28758
|
return useCallback59(async (newName) => {
|
|
28643
28759
|
const newRelativePath = getRenamedStaticFilePath({
|
|
28644
28760
|
newName,
|
|
@@ -28780,7 +28896,7 @@ var AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStudio
|
|
|
28780
28896
|
});
|
|
28781
28897
|
};
|
|
28782
28898
|
var CurrentAsset = ({ readOnlyStudio }) => {
|
|
28783
|
-
const { canvasContent } = useContext47(
|
|
28899
|
+
const { canvasContent } = useContext47(Internals48.CompositionManager);
|
|
28784
28900
|
const assetName = canvasContent?.type === "asset" ? canvasContent.asset : null;
|
|
28785
28901
|
return /* @__PURE__ */ jsx115(AssetInfo, {
|
|
28786
28902
|
assetName,
|
|
@@ -28795,7 +28911,7 @@ import {
|
|
|
28795
28911
|
useEffect as useEffect52,
|
|
28796
28912
|
useMemo as useMemo74
|
|
28797
28913
|
} from "react";
|
|
28798
|
-
import { Internals as
|
|
28914
|
+
import { Internals as Internals50 } from "remotion";
|
|
28799
28915
|
|
|
28800
28916
|
// src/icons/react.tsx
|
|
28801
28917
|
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
@@ -28832,10 +28948,10 @@ var resolvedStackToSymbolicated = (location2) => {
|
|
|
28832
28948
|
import { useCallback as useCallback61, useMemo as useMemo70 } from "react";
|
|
28833
28949
|
|
|
28834
28950
|
// src/helpers/validate-new-comp-data.ts
|
|
28835
|
-
import { Internals as
|
|
28951
|
+
import { Internals as Internals49 } from "remotion";
|
|
28836
28952
|
var validateCompositionName = (compName, compositions) => {
|
|
28837
|
-
if (!
|
|
28838
|
-
return
|
|
28953
|
+
if (!Internals49.isCompositionIdValid(compName)) {
|
|
28954
|
+
return Internals49.invalidCompositionErrorMessage;
|
|
28839
28955
|
}
|
|
28840
28956
|
if (compositions.find((c) => c.id === compName)) {
|
|
28841
28957
|
return `A composition with that name already exists.`;
|
|
@@ -29176,8 +29292,8 @@ var renderReactIcon = (color) => {
|
|
|
29176
29292
|
});
|
|
29177
29293
|
};
|
|
29178
29294
|
var CurrentComposition = () => {
|
|
29179
|
-
const video =
|
|
29180
|
-
const { compositions } = useContext48(
|
|
29295
|
+
const video = Internals50.useVideo();
|
|
29296
|
+
const { compositions } = useContext48(Internals50.CompositionManager);
|
|
29181
29297
|
const currentComposition = useMemo74(() => {
|
|
29182
29298
|
if (!video) {
|
|
29183
29299
|
return null;
|
|
@@ -34547,7 +34663,7 @@ var VisualControlsContent = () => {
|
|
|
34547
34663
|
|
|
34548
34664
|
// src/components/InspectorPanel/CompositionDimensions.tsx
|
|
34549
34665
|
import { useCallback as useCallback97, useEffect as useEffect60, useMemo as useMemo108, useRef as useRef45, useState as useState69 } from "react";
|
|
34550
|
-
import { Internals as
|
|
34666
|
+
import { Internals as Internals51 } from "remotion";
|
|
34551
34667
|
|
|
34552
34668
|
// src/components/InspectorPanel/optimistic-composition-metadata.ts
|
|
34553
34669
|
var removePendingValue = ({
|
|
@@ -34728,8 +34844,8 @@ var CompositionMetadataValue = ({
|
|
|
34728
34844
|
});
|
|
34729
34845
|
};
|
|
34730
34846
|
var CompositionDimensions = ({ compositionId, disabled, stack: stack2 }) => {
|
|
34731
|
-
const video =
|
|
34732
|
-
const resolvedVideoConfig =
|
|
34847
|
+
const video = Internals51.useVideo();
|
|
34848
|
+
const resolvedVideoConfig = Internals51.useResolvedVideoConfig(compositionId);
|
|
34733
34849
|
const resolvedConfig = resolvedVideoConfig?.type === "success" || resolvedVideoConfig?.type === "success-and-refreshing" ? resolvedVideoConfig.result : null;
|
|
34734
34850
|
const resolvedConfigRef = useRef45(resolvedConfig);
|
|
34735
34851
|
resolvedConfigRef.current = resolvedConfig;
|
|
@@ -34853,7 +34969,7 @@ var CompositionDimensions = ({ compositionId, disabled, stack: stack2 }) => {
|
|
|
34853
34969
|
// src/components/InspectorPanel/DefaultInspector.tsx
|
|
34854
34970
|
import { jsx as jsx174, jsxs as jsxs94, Fragment as Fragment29 } from "react/jsx-runtime";
|
|
34855
34971
|
var DefaultInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
|
|
34856
|
-
const { canvasContent } = useContext55(
|
|
34972
|
+
const { canvasContent } = useContext55(Internals52.CompositionManager);
|
|
34857
34973
|
const hasSelectedAsset = canvasContent?.type === "asset";
|
|
34858
34974
|
const z = useZodIfPossible();
|
|
34859
34975
|
const canSaveDefaultProps = useContext55(ObserveDefaultPropsContext);
|
|
@@ -35039,7 +35155,7 @@ var getSameSequenceInspectorSelection = (selections) => {
|
|
|
35039
35155
|
|
|
35040
35156
|
// src/components/InspectorPanel/EasingInspector.tsx
|
|
35041
35157
|
import { useCallback as useCallback107, useContext as useContext67, useMemo as useMemo120 } from "react";
|
|
35042
|
-
import { Internals as
|
|
35158
|
+
import { Internals as Internals61, useVideoConfig as useVideoConfig6 } from "remotion";
|
|
35043
35159
|
|
|
35044
35160
|
// src/state/render-frame.ts
|
|
35045
35161
|
var renderFrame = (frame2, fps) => {
|
|
@@ -35072,7 +35188,7 @@ import {
|
|
|
35072
35188
|
useRef as useRef46,
|
|
35073
35189
|
useState as useState71
|
|
35074
35190
|
} from "react";
|
|
35075
|
-
import { Easing, Internals as
|
|
35191
|
+
import { Easing, Internals as Internals53 } from "remotion";
|
|
35076
35192
|
import { jsx as jsx175, jsxs as jsxs95, Fragment as Fragment30 } from "react/jsx-runtime";
|
|
35077
35193
|
var SVG_WIDTH = 560;
|
|
35078
35194
|
var SVG_HEIGHT = 320;
|
|
@@ -35307,14 +35423,14 @@ var areEasingsEqual = (first, second) => {
|
|
|
35307
35423
|
}
|
|
35308
35424
|
};
|
|
35309
35425
|
var getEasingUpdateTargetKey = (update) => {
|
|
35310
|
-
const nodePathKey =
|
|
35426
|
+
const nodePathKey = Internals53.makeSequencePropsSubscriptionKey(update.nodePath);
|
|
35311
35427
|
if (update.type === "sequence") {
|
|
35312
35428
|
return `sequence:${nodePathKey}:${update.fieldKey}:${update.segmentIndex}`;
|
|
35313
35429
|
}
|
|
35314
35430
|
return `effect:${nodePathKey}:${update.effectIndex}:${update.fieldKey}:${update.segmentIndex}`;
|
|
35315
35431
|
};
|
|
35316
35432
|
var getBuiltInVisualStyleFieldSchema = (fieldKey) => {
|
|
35317
|
-
const transformSchema =
|
|
35433
|
+
const transformSchema = Internals53.transformSchema;
|
|
35318
35434
|
const directField = transformSchema[fieldKey];
|
|
35319
35435
|
if (directField) {
|
|
35320
35436
|
return directField;
|
|
@@ -35496,16 +35612,16 @@ var EasingPresetButton = ({ currentEasing, disabled, onClick, preset }) => {
|
|
|
35496
35612
|
};
|
|
35497
35613
|
var EasingEditor = ({ state, renderHeader }) => {
|
|
35498
35614
|
const { previewServerState } = useContext56(StudioServerConnectionCtx);
|
|
35499
|
-
const sequencesRef = useContext56(
|
|
35500
|
-
const propStatusesRef = useContext56(
|
|
35615
|
+
const sequencesRef = useContext56(Internals53.SequenceManagerRefContext);
|
|
35616
|
+
const propStatusesRef = useContext56(Internals53.VisualModePropStatusesRefContext);
|
|
35501
35617
|
const {
|
|
35502
35618
|
setDragOverrides,
|
|
35503
35619
|
clearDragOverrides,
|
|
35504
35620
|
setEffectDragOverrides,
|
|
35505
35621
|
clearEffectDragOverrides,
|
|
35506
35622
|
setPropStatuses
|
|
35507
|
-
} = useContext56(
|
|
35508
|
-
const { overrideIdToNodePathMappings } = useContext56(
|
|
35623
|
+
} = useContext56(Internals53.VisualModeSettersContext);
|
|
35624
|
+
const { overrideIdToNodePathMappings } = useContext56(Internals53.OverrideIdsToNodePathsGettersContext);
|
|
35509
35625
|
const svgRef = useRef46(null);
|
|
35510
35626
|
const [mode, setMode] = useState71(() => easingToMode(state.initialEasing));
|
|
35511
35627
|
const [bezier, setBezier] = useState71(() => easingToBezier(state.initialEasing));
|
|
@@ -35541,7 +35657,7 @@ var EasingEditor = ({ state, renderHeader }) => {
|
|
|
35541
35657
|
const sequenceTargets = new Set;
|
|
35542
35658
|
const effectTargets = new Set;
|
|
35543
35659
|
for (const update of updates) {
|
|
35544
|
-
const key3 =
|
|
35660
|
+
const key3 = Internals53.makeSequencePropsSubscriptionKey(update.nodePath);
|
|
35545
35661
|
if (update.type === "sequence") {
|
|
35546
35662
|
if (!sequenceTargets.has(key3)) {
|
|
35547
35663
|
sequenceTargets.add(key3);
|
|
@@ -36260,7 +36376,7 @@ var getEasingSelectionFromCurrentKeyframes = ({
|
|
|
36260
36376
|
|
|
36261
36377
|
// src/components/InspectorPanel/KeyframeEasingNavigator.tsx
|
|
36262
36378
|
import { useCallback as useCallback102, useMemo as useMemo113 } from "react";
|
|
36263
|
-
import { Internals as
|
|
36379
|
+
import { Internals as Internals56, useVideoConfig as useVideoConfig5 } from "remotion";
|
|
36264
36380
|
|
|
36265
36381
|
// src/components/Timeline/TimelineKeyframeDiamondIcon.tsx
|
|
36266
36382
|
import { jsx as jsx176, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
@@ -36301,7 +36417,7 @@ import {
|
|
|
36301
36417
|
LINEAR_KEYFRAME_EASING as LINEAR_KEYFRAME_EASING5
|
|
36302
36418
|
} from "@remotion/studio-shared";
|
|
36303
36419
|
import React121, { useCallback as useCallback101, useContext as useContext59, useMemo as useMemo112, useRef as useRef47 } from "react";
|
|
36304
|
-
import { Internals as
|
|
36420
|
+
import { Internals as Internals55, useVideoConfig as useVideoConfig4 } from "remotion";
|
|
36305
36421
|
|
|
36306
36422
|
// src/components/Timeline/use-timeline-keyframe-drag.ts
|
|
36307
36423
|
import {
|
|
@@ -36309,7 +36425,7 @@ import {
|
|
|
36309
36425
|
moveKeyframesInPropStatus
|
|
36310
36426
|
} from "@remotion/studio-shared";
|
|
36311
36427
|
import { useCallback as useCallback100, useContext as useContext58 } from "react";
|
|
36312
|
-
import { Internals as
|
|
36428
|
+
import { Internals as Internals54, useVideoConfig as useVideoConfig3 } from "remotion";
|
|
36313
36429
|
|
|
36314
36430
|
// src/components/Timeline/get-bounded-keyframe-drag-delta.ts
|
|
36315
36431
|
var getBoundedKeyframeDragDelta = ({
|
|
@@ -36465,7 +36581,7 @@ var getTimelineSelectionsAfterEasingKeyframeDrag = ({
|
|
|
36465
36581
|
var getCodeValueForTarget = ({
|
|
36466
36582
|
propStatuses,
|
|
36467
36583
|
nodePath
|
|
36468
|
-
}) => propStatuses[
|
|
36584
|
+
}) => propStatuses[Internals54.makeSequencePropsSubscriptionKey(nodePath)];
|
|
36469
36585
|
var getTimelineKeyframeDragTarget = ({
|
|
36470
36586
|
propStatuses,
|
|
36471
36587
|
displayFrame,
|
|
@@ -36664,16 +36780,16 @@ var useTimelineKeyframeDrag = ({
|
|
|
36664
36780
|
const videoConfig = useVideoConfig3();
|
|
36665
36781
|
const timelineWidth = useContext58(TimelineWidthContext);
|
|
36666
36782
|
const { previewServerState } = useContext58(StudioServerConnectionCtx);
|
|
36667
|
-
const sequencesRef = useContext58(
|
|
36668
|
-
const { overrideIdToNodePathMappings } = useContext58(
|
|
36669
|
-
const propStatusesRef = useContext58(
|
|
36783
|
+
const sequencesRef = useContext58(Internals54.SequenceManagerRefContext);
|
|
36784
|
+
const { overrideIdToNodePathMappings } = useContext58(Internals54.OverrideIdsToNodePathsGettersContext);
|
|
36785
|
+
const propStatusesRef = useContext58(Internals54.VisualModePropStatusesRefContext);
|
|
36670
36786
|
const {
|
|
36671
36787
|
clearDragOverrides,
|
|
36672
36788
|
clearEffectDragOverrides,
|
|
36673
36789
|
setPropStatuses,
|
|
36674
36790
|
setDragOverrides,
|
|
36675
36791
|
setEffectDragOverrides
|
|
36676
|
-
} = useContext58(
|
|
36792
|
+
} = useContext58(Internals54.VisualModeSettersContext);
|
|
36677
36793
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
36678
36794
|
const { clearDraggedKeyframes, setDraggedKeyframes } = useTimelineKeyframeDragState();
|
|
36679
36795
|
return useCallback100((e) => {
|
|
@@ -36866,16 +36982,16 @@ var useTimelineEasingKeyframeDrag = ({
|
|
|
36866
36982
|
const videoConfig = useVideoConfig3();
|
|
36867
36983
|
const timelineWidth = useContext58(TimelineWidthContext);
|
|
36868
36984
|
const { previewServerState } = useContext58(StudioServerConnectionCtx);
|
|
36869
|
-
const sequencesRef = useContext58(
|
|
36870
|
-
const { overrideIdToNodePathMappings } = useContext58(
|
|
36871
|
-
const propStatusesRef = useContext58(
|
|
36985
|
+
const sequencesRef = useContext58(Internals54.SequenceManagerRefContext);
|
|
36986
|
+
const { overrideIdToNodePathMappings } = useContext58(Internals54.OverrideIdsToNodePathsGettersContext);
|
|
36987
|
+
const propStatusesRef = useContext58(Internals54.VisualModePropStatusesRefContext);
|
|
36872
36988
|
const {
|
|
36873
36989
|
clearDragOverrides,
|
|
36874
36990
|
clearEffectDragOverrides,
|
|
36875
36991
|
setPropStatuses,
|
|
36876
36992
|
setDragOverrides,
|
|
36877
36993
|
setEffectDragOverrides
|
|
36878
|
-
} = useContext58(
|
|
36994
|
+
} = useContext58(Internals54.VisualModeSettersContext);
|
|
36879
36995
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
36880
36996
|
const { clearDraggedKeyframes } = useTimelineKeyframeDragState();
|
|
36881
36997
|
return useCallback100((e) => {
|
|
@@ -37106,10 +37222,10 @@ var TimelineKeyframeEasingLineUnmemoized = ({ fromFrame, toFrame, rowHeight, nod
|
|
|
37106
37222
|
});
|
|
37107
37223
|
useTimelineMarqueeSelectableItem(selectionItem, buttonRef);
|
|
37108
37224
|
const { previewServerState } = useContext59(StudioServerConnectionCtx);
|
|
37109
|
-
const sequencesRef = useContext59(
|
|
37110
|
-
const propStatusesRef = useContext59(
|
|
37111
|
-
const { setPropStatuses } = useContext59(
|
|
37112
|
-
const { overrideIdToNodePathMappings } = useContext59(
|
|
37225
|
+
const sequencesRef = useContext59(Internals55.SequenceManagerRefContext);
|
|
37226
|
+
const propStatusesRef = useContext59(Internals55.VisualModePropStatusesRefContext);
|
|
37227
|
+
const { setPropStatuses } = useContext59(Internals55.VisualModeSettersContext);
|
|
37228
|
+
const { overrideIdToNodePathMappings } = useContext59(Internals55.OverrideIdsToNodePathsGettersContext);
|
|
37113
37229
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
37114
37230
|
const getTargetSelections = useCallback101(() => {
|
|
37115
37231
|
const selectedEasings = getEasingSelections(currentSelection.current.selectedItems);
|
|
@@ -37398,7 +37514,7 @@ var TimelineNavigatorItem = ({ extendLineLeft, extendLineRight, item: item2, onS
|
|
|
37398
37514
|
};
|
|
37399
37515
|
var KeyframeEasingNavigator = ({ currentSelection, includeEasings, keyframes, nodePathInfo }) => {
|
|
37400
37516
|
const { isSelected, selectItems } = useTimelineSelection();
|
|
37401
|
-
const setFrame =
|
|
37517
|
+
const setFrame = Internals56.useTimelineSetFrame();
|
|
37402
37518
|
const videoConfig = useVideoConfig5();
|
|
37403
37519
|
const items = useMemo113(() => getKeyframeEasingNavigatorItems({
|
|
37404
37520
|
includeEasings,
|
|
@@ -37417,7 +37533,7 @@ var KeyframeEasingNavigator = ({ currentSelection, includeEasings, keyframes, no
|
|
|
37417
37533
|
const frame2 = getNavigatorItemPlayheadFrame(item2);
|
|
37418
37534
|
setFrame((current) => {
|
|
37419
37535
|
const next = { ...current, [videoConfig.id]: frame2 };
|
|
37420
|
-
|
|
37536
|
+
Internals56.persistCurrentFrame(next);
|
|
37421
37537
|
return next;
|
|
37422
37538
|
});
|
|
37423
37539
|
}, [setFrame, videoConfig.id]);
|
|
@@ -37497,7 +37613,7 @@ import {
|
|
|
37497
37613
|
useMemo as useMemo114,
|
|
37498
37614
|
useState as useState73
|
|
37499
37615
|
} from "react";
|
|
37500
|
-
import { Internals as
|
|
37616
|
+
import { Internals as Internals57 } from "remotion";
|
|
37501
37617
|
import { jsx as jsx180, jsxs as jsxs99, Fragment as Fragment32 } from "react/jsx-runtime";
|
|
37502
37618
|
var comboStyle2 = {
|
|
37503
37619
|
minWidth: 120
|
|
@@ -37549,7 +37665,7 @@ var getOutputValues = (onSelect, disabled) => {
|
|
|
37549
37665
|
}));
|
|
37550
37666
|
};
|
|
37551
37667
|
var KeyframeSettings = ({ update }) => {
|
|
37552
|
-
const { setPropStatuses } = useContext60(
|
|
37668
|
+
const { setPropStatuses } = useContext60(Internals57.VisualModeSettersContext);
|
|
37553
37669
|
const { previewServerState } = useContext60(StudioServerConnectionCtx);
|
|
37554
37670
|
const { propStatus } = update;
|
|
37555
37671
|
const [posterize, setPosterize] = useState73(propStatus.posterize ?? 0);
|
|
@@ -37773,7 +37889,7 @@ var useOpenSequenceInEditor = (sequence) => {
|
|
|
37773
37889
|
|
|
37774
37890
|
// src/components/Timeline/use-rename-sequence.ts
|
|
37775
37891
|
import { useCallback as useCallback105, useContext as useContext63, useMemo as useMemo116 } from "react";
|
|
37776
|
-
import { Internals as
|
|
37892
|
+
import { Internals as Internals58 } from "remotion";
|
|
37777
37893
|
var getSequenceNameSaveAction = ({
|
|
37778
37894
|
editedName,
|
|
37779
37895
|
currentDisplayName,
|
|
@@ -37797,11 +37913,11 @@ var useRenameSequence = ({
|
|
|
37797
37913
|
sequence,
|
|
37798
37914
|
validatedLocation
|
|
37799
37915
|
}) => {
|
|
37800
|
-
const { propStatuses } = useContext63(
|
|
37801
|
-
const { setPropStatuses } = useContext63(
|
|
37916
|
+
const { propStatuses } = useContext63(Internals58.VisualModePropStatusesContext);
|
|
37917
|
+
const { setPropStatuses } = useContext63(Internals58.VisualModeSettersContext);
|
|
37802
37918
|
const nodePath = nodePathInfo?.sequenceSubscriptionKey ?? null;
|
|
37803
37919
|
const propStatusesForOverride = useMemo116(() => {
|
|
37804
|
-
return nodePath ?
|
|
37920
|
+
return nodePath ? Internals58.getPropStatusesCtx(propStatuses, nodePath) : undefined;
|
|
37805
37921
|
}, [propStatuses, nodePath]);
|
|
37806
37922
|
const codeNameStatus = propStatusesForOverride?.name;
|
|
37807
37923
|
const fallbackDisplayName = sequence.controls?.componentName ?? "<Sequence>";
|
|
@@ -37875,7 +37991,7 @@ var useRenameSequence = ({
|
|
|
37875
37991
|
|
|
37876
37992
|
// src/components/InspectorPanel/ConnectedCompositionsSection.tsx
|
|
37877
37993
|
import { useContext as useContext64, useMemo as useMemo117 } from "react";
|
|
37878
|
-
import { Internals as
|
|
37994
|
+
import { Internals as Internals59 } from "remotion";
|
|
37879
37995
|
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
37880
37996
|
var compositionIconStyle = {
|
|
37881
37997
|
height: 13,
|
|
@@ -37889,7 +38005,7 @@ var compositionListStyle = {
|
|
|
37889
38005
|
var useConnectedCompositions = ({
|
|
37890
38006
|
track
|
|
37891
38007
|
}) => {
|
|
37892
|
-
const { compositions } = useContext64(
|
|
38008
|
+
const { compositions } = useContext64(Internals59.CompositionManager);
|
|
37893
38009
|
return useMemo117(() => getConnectedCompositions({
|
|
37894
38010
|
compositions,
|
|
37895
38011
|
singleChildComponent: track.sequence.singleChildComponent
|
|
@@ -38022,10 +38138,10 @@ var SequenceInspectorSections = ({ track }) => {
|
|
|
38022
38138
|
|
|
38023
38139
|
// src/components/InspectorPanel/use-track-for-selection.ts
|
|
38024
38140
|
import { useContext as useContext66, useMemo as useMemo119 } from "react";
|
|
38025
|
-
import { Internals as
|
|
38141
|
+
import { Internals as Internals60 } from "remotion";
|
|
38026
38142
|
var useTrackForSelection = (selection) => {
|
|
38027
|
-
const { sequences } = useContext66(
|
|
38028
|
-
const { overrideIdToNodePathMappings } = useContext66(
|
|
38143
|
+
const { sequences } = useContext66(Internals60.SequenceManager);
|
|
38144
|
+
const { overrideIdToNodePathMappings } = useContext66(Internals60.OverrideIdsToNodePathsGettersContext);
|
|
38029
38145
|
return useMemo119(() => {
|
|
38030
38146
|
if (selection.type === "guide") {
|
|
38031
38147
|
return null;
|
|
@@ -38048,12 +38164,12 @@ var addKeyframeIcon = {
|
|
|
38048
38164
|
var EasingInspector = ({ selection }) => {
|
|
38049
38165
|
const track = useTrackForSelection(selection);
|
|
38050
38166
|
const videoConfig = useVideoConfig6();
|
|
38051
|
-
const timelinePosition =
|
|
38052
|
-
const { sequences } = useContext67(
|
|
38053
|
-
const { overrideIdToNodePathMappings } = useContext67(
|
|
38054
|
-
const { propStatuses } = useContext67(
|
|
38055
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext67(
|
|
38056
|
-
const { setPropStatuses } = useContext67(
|
|
38167
|
+
const timelinePosition = Internals61.Timeline.useTimelinePosition();
|
|
38168
|
+
const { sequences } = useContext67(Internals61.SequenceManager);
|
|
38169
|
+
const { overrideIdToNodePathMappings } = useContext67(Internals61.OverrideIdsToNodePathsGettersContext);
|
|
38170
|
+
const { propStatuses } = useContext67(Internals61.VisualModePropStatusesContext);
|
|
38171
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext67(Internals61.VisualModeDragOverridesContext);
|
|
38172
|
+
const { setPropStatuses } = useContext67(Internals61.VisualModeSettersContext);
|
|
38057
38173
|
const { previewServerState } = useContext67(StudioServerConnectionCtx);
|
|
38058
38174
|
const { selectItems } = useTimelineSelection();
|
|
38059
38175
|
const parentSelection = useMemo120(() => getTimelineSelectionFromNodePathInfo(selection.nodePathInfo), [selection.nodePathInfo]);
|
|
@@ -38157,7 +38273,7 @@ var EasingInspector = ({ selection }) => {
|
|
|
38157
38273
|
return;
|
|
38158
38274
|
}
|
|
38159
38275
|
const sourceFrame = timelinePosition - track.keyframeDisplayOffset;
|
|
38160
|
-
const value =
|
|
38276
|
+
const value = Internals61.getEffectiveVisualModeValue({
|
|
38161
38277
|
propStatus: easingUpdate.propStatus,
|
|
38162
38278
|
dragOverrideValue: easingDetails.dragOverrideValue,
|
|
38163
38279
|
defaultValue: easingDetails.defaultValue,
|
|
@@ -38378,7 +38494,7 @@ import {
|
|
|
38378
38494
|
useMemo as useMemo138,
|
|
38379
38495
|
useState as useState81
|
|
38380
38496
|
} from "react";
|
|
38381
|
-
import { Internals as
|
|
38497
|
+
import { Internals as Internals66, useVideoConfig as useVideoConfig10 } from "remotion";
|
|
38382
38498
|
|
|
38383
38499
|
// src/components/Timeline/TimelineEffectPropItem.tsx
|
|
38384
38500
|
import {
|
|
@@ -38386,7 +38502,7 @@ import {
|
|
|
38386
38502
|
optimisticUpdateForEffectPropStatuses as optimisticUpdateForEffectPropStatuses2
|
|
38387
38503
|
} from "@remotion/studio-shared";
|
|
38388
38504
|
import { useCallback as useCallback124, useContext as useContext73, useMemo as useMemo136 } from "react";
|
|
38389
|
-
import { Internals as
|
|
38505
|
+
import { Internals as Internals64, useVideoConfig as useVideoConfig8 } from "remotion";
|
|
38390
38506
|
|
|
38391
38507
|
// src/components/Timeline/get-animation-item-selection-for-frame.ts
|
|
38392
38508
|
var getKeyframeSelection = ({
|
|
@@ -38647,7 +38763,7 @@ var TimelineFieldRowContent = ({ field, rowDepth, selected, children }) => {
|
|
|
38647
38763
|
// src/components/Timeline/TimelineKeyframeControls.tsx
|
|
38648
38764
|
import { isSchemaFieldKeyframable } from "@remotion/studio-shared";
|
|
38649
38765
|
import { useCallback as useCallback109, useContext as useContext71, useMemo as useMemo123 } from "react";
|
|
38650
|
-
import { Internals as
|
|
38766
|
+
import { Internals as Internals62, useVideoConfig as useVideoConfig7 } from "remotion";
|
|
38651
38767
|
|
|
38652
38768
|
// src/components/Timeline/get-keyframe-navigation.ts
|
|
38653
38769
|
var isKeyframeInTimelineRange = (frame2, durationInFrames) => {
|
|
@@ -38799,7 +38915,7 @@ var resolveKeyframeControlTarget = ({
|
|
|
38799
38915
|
}
|
|
38800
38916
|
const nodePath = nodePathInfo.sequenceSubscriptionKey;
|
|
38801
38917
|
if (fieldNode.field.kind === "sequence-field") {
|
|
38802
|
-
const sequencePropStatuses =
|
|
38918
|
+
const sequencePropStatuses = Internals62.getPropStatusesCtx(propStatuses, nodePath);
|
|
38803
38919
|
const sequenceSelectedPropStatus = sequencePropStatuses?.[fieldNode.field.key] ?? null;
|
|
38804
38920
|
if (sequenceSelectedPropStatus === null) {
|
|
38805
38921
|
return null;
|
|
@@ -38818,7 +38934,7 @@ var resolveKeyframeControlTarget = ({
|
|
|
38818
38934
|
effectIndex: null
|
|
38819
38935
|
};
|
|
38820
38936
|
}
|
|
38821
|
-
const effectStatus =
|
|
38937
|
+
const effectStatus = Internals62.getEffectPropStatusesCtx({
|
|
38822
38938
|
propStatuses,
|
|
38823
38939
|
nodePath,
|
|
38824
38940
|
effectIndex: fieldNode.field.effectIndex
|
|
@@ -38885,7 +39001,8 @@ var getDeleteChange = (target) => {
|
|
|
38885
39001
|
nodePath: target.nodePath,
|
|
38886
39002
|
fieldKey: target.fieldKey,
|
|
38887
39003
|
sourceFrame: target.sourceFrame,
|
|
38888
|
-
schema: target.schema
|
|
39004
|
+
schema: target.schema,
|
|
39005
|
+
valueWhenLastKeyframeDeleted: null
|
|
38889
39006
|
};
|
|
38890
39007
|
if (target.effectIndex === null) {
|
|
38891
39008
|
return change;
|
|
@@ -38905,7 +39022,7 @@ function getCurrentKeyframeValue({
|
|
|
38905
39022
|
dragOverrideValue
|
|
38906
39023
|
}) {
|
|
38907
39024
|
if (isKeyframedStatus(propStatus)) {
|
|
38908
|
-
return
|
|
39025
|
+
return Internals62.getEffectiveVisualModeValue({
|
|
38909
39026
|
propStatus,
|
|
38910
39027
|
dragOverrideValue,
|
|
38911
39028
|
frame: jsxFrame,
|
|
@@ -38914,7 +39031,7 @@ function getCurrentKeyframeValue({
|
|
|
38914
39031
|
});
|
|
38915
39032
|
}
|
|
38916
39033
|
if (propStatus.status === "static") {
|
|
38917
|
-
return
|
|
39034
|
+
return Internals62.getEffectiveVisualModeValue({
|
|
38918
39035
|
propStatus,
|
|
38919
39036
|
dragOverrideValue,
|
|
38920
39037
|
frame: jsxFrame,
|
|
@@ -38963,11 +39080,11 @@ var TimelineKeyframeControls = ({
|
|
|
38963
39080
|
mode = "timeline"
|
|
38964
39081
|
}) => {
|
|
38965
39082
|
const videoConfig = useVideoConfig7();
|
|
38966
|
-
const timelinePosition =
|
|
38967
|
-
const setFrame =
|
|
38968
|
-
const { setPropStatuses } = useContext71(
|
|
38969
|
-
const { propStatuses } = useContext71(
|
|
38970
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext71(
|
|
39083
|
+
const timelinePosition = Internals62.Timeline.useTimelinePosition();
|
|
39084
|
+
const setFrame = Internals62.useTimelineSetFrame();
|
|
39085
|
+
const { setPropStatuses } = useContext71(Internals62.VisualModeSettersContext);
|
|
39086
|
+
const { propStatuses } = useContext71(Internals62.VisualModePropStatusesContext);
|
|
39087
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext71(Internals62.VisualModeDragOverridesContext);
|
|
38971
39088
|
const { previewServerState } = useContext71(StudioServerConnectionCtx);
|
|
38972
39089
|
const { selectedItems, selectItems } = useTimelineSelection();
|
|
38973
39090
|
const tracks = useTimelineKeyframeTracks();
|
|
@@ -39058,7 +39175,7 @@ var TimelineKeyframeControls = ({
|
|
|
39058
39175
|
const seekToDisplayFrame = useCallback109((frame2) => {
|
|
39059
39176
|
setFrame((current) => {
|
|
39060
39177
|
const next = { ...current, [videoConfig.id]: frame2 };
|
|
39061
|
-
|
|
39178
|
+
Internals62.persistCurrentFrame(next);
|
|
39062
39179
|
return next;
|
|
39063
39180
|
});
|
|
39064
39181
|
}, [setFrame, videoConfig.id]);
|
|
@@ -39212,7 +39329,7 @@ var TimelineKeyframeControls = ({
|
|
|
39212
39329
|
|
|
39213
39330
|
// src/components/Timeline/TimelineKeyframedValue.tsx
|
|
39214
39331
|
import { useCallback as useCallback122, useMemo as useMemo133 } from "react";
|
|
39215
|
-
import { Internals as
|
|
39332
|
+
import { Internals as Internals63 } from "remotion";
|
|
39216
39333
|
|
|
39217
39334
|
// src/components/Timeline/TimelineSchemaField.tsx
|
|
39218
39335
|
import React144 from "react";
|
|
@@ -42915,7 +43032,7 @@ var TimelineKeyframedValue = ({
|
|
|
42915
43032
|
scaleLockNodePath
|
|
42916
43033
|
}) => {
|
|
42917
43034
|
const computedValue = useMemo133(() => {
|
|
42918
|
-
const raw =
|
|
43035
|
+
const raw = Internals63.interpolateKeyframedStatus({
|
|
42919
43036
|
forceSpringAllowTail: false,
|
|
42920
43037
|
frame: sourceFrame,
|
|
42921
43038
|
status: propStatus
|
|
@@ -42930,7 +43047,7 @@ var TimelineKeyframedValue = ({
|
|
|
42930
43047
|
codeValue: computedValue
|
|
42931
43048
|
}), [computedValue]);
|
|
42932
43049
|
const effectiveValue = useMemo133(() => {
|
|
42933
|
-
return
|
|
43050
|
+
return Internals63.getEffectiveVisualModeValue({
|
|
42934
43051
|
propStatus: fakeStatus,
|
|
42935
43052
|
dragOverrideValue,
|
|
42936
43053
|
frame: sourceFrame,
|
|
@@ -43138,23 +43255,23 @@ var isResettableStatus = ({
|
|
|
43138
43255
|
return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
|
|
43139
43256
|
};
|
|
43140
43257
|
var TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFrame }) => {
|
|
43141
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext73(
|
|
43142
|
-
const { getEffectDragOverrides } = useContext73(
|
|
43143
|
-
const { propStatuses: visualModePropStatuses } = useContext73(
|
|
43258
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext73(Internals64.VisualModeSettersContext);
|
|
43259
|
+
const { getEffectDragOverrides } = useContext73(Internals64.VisualModeDragOverridesContext);
|
|
43260
|
+
const { propStatuses: visualModePropStatuses } = useContext73(Internals64.VisualModePropStatusesContext);
|
|
43144
43261
|
const { previewServerState } = useContext73(StudioServerConnectionCtx);
|
|
43145
43262
|
const clientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
|
|
43146
|
-
const effectStatus =
|
|
43263
|
+
const effectStatus = Internals64.getEffectPropStatusesCtx({
|
|
43147
43264
|
propStatuses: visualModePropStatuses,
|
|
43148
43265
|
nodePath,
|
|
43149
43266
|
effectIndex: field.effectIndex
|
|
43150
43267
|
});
|
|
43151
43268
|
const propStatus = effectStatus.type === "can-update-effect" ? effectStatus.props?.[field.key] ?? null : null;
|
|
43152
43269
|
const onDragValueChange = useCallback124((value) => {
|
|
43153
|
-
const nextDragOverrideValue = propStatus !== null && isKeyframedStatus2(propStatus) ?
|
|
43270
|
+
const nextDragOverrideValue = propStatus !== null && isKeyframedStatus2(propStatus) ? Internals64.makeKeyframedDragOverride({
|
|
43154
43271
|
status: propStatus,
|
|
43155
43272
|
frame: sourceFrame,
|
|
43156
43273
|
value
|
|
43157
|
-
}) :
|
|
43274
|
+
}) : Internals64.makeStaticDragOverride(value);
|
|
43158
43275
|
setEffectDragOverrides(nodePath, field.effectIndex, field.key, nextDragOverrideValue);
|
|
43159
43276
|
}, [
|
|
43160
43277
|
field.effectIndex,
|
|
@@ -43309,7 +43426,7 @@ var TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFrame
|
|
|
43309
43426
|
fixHref: TIMELINE_COMPUTED_EFFECT_FIX_LINK
|
|
43310
43427
|
});
|
|
43311
43428
|
}
|
|
43312
|
-
const effectiveValue =
|
|
43429
|
+
const effectiveValue = Internals64.getEffectiveVisualModeValue({
|
|
43313
43430
|
propStatus,
|
|
43314
43431
|
dragOverrideValue,
|
|
43315
43432
|
defaultValue: field.fieldSchema.default,
|
|
@@ -43336,19 +43453,19 @@ var TimelineEffectPropItem = ({
|
|
|
43336
43453
|
keyframeControlsMode = "timeline"
|
|
43337
43454
|
}) => {
|
|
43338
43455
|
const { previewServerState } = useContext73(StudioServerConnectionCtx);
|
|
43339
|
-
const { setPropStatuses } = useContext73(
|
|
43340
|
-
const { propStatuses } = useContext73(
|
|
43341
|
-
const { getEffectDragOverrides } = useContext73(
|
|
43456
|
+
const { setPropStatuses } = useContext73(Internals64.VisualModeSettersContext);
|
|
43457
|
+
const { propStatuses } = useContext73(Internals64.VisualModePropStatusesContext);
|
|
43458
|
+
const { getEffectDragOverrides } = useContext73(Internals64.VisualModeDragOverridesContext);
|
|
43342
43459
|
const selection = useTimelineRowSelection(nodePathInfo);
|
|
43343
43460
|
const { selectItems } = useTimelineSelection();
|
|
43344
|
-
const setFrame =
|
|
43461
|
+
const setFrame = Internals64.useTimelineSetFrame();
|
|
43345
43462
|
const videoConfig = useVideoConfig8();
|
|
43346
|
-
const timelinePosition =
|
|
43463
|
+
const timelinePosition = Internals64.Timeline.useTimelinePosition();
|
|
43347
43464
|
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
43348
43465
|
const style8 = useMemo136(() => {
|
|
43349
43466
|
return field.typeName === "text-content" ? fieldRowBase : { ...fieldRowBase, height: field.rowHeight };
|
|
43350
43467
|
}, [field.rowHeight, field.typeName]);
|
|
43351
|
-
const effectStatus = useMemo136(() =>
|
|
43468
|
+
const effectStatus = useMemo136(() => Internals64.getEffectPropStatusesCtx({
|
|
43352
43469
|
propStatuses,
|
|
43353
43470
|
nodePath,
|
|
43354
43471
|
effectIndex: field.effectIndex
|
|
@@ -43438,7 +43555,7 @@ var TimelineEffectPropItem = ({
|
|
|
43438
43555
|
const seekToDisplayFrame = useCallback124((frame2) => {
|
|
43439
43556
|
setFrame((current) => {
|
|
43440
43557
|
const next = { ...current, [videoConfig.id]: frame2 };
|
|
43441
|
-
|
|
43558
|
+
Internals64.persistCurrentFrame(next);
|
|
43442
43559
|
return next;
|
|
43443
43560
|
});
|
|
43444
43561
|
}, [setFrame, videoConfig.id]);
|
|
@@ -43455,7 +43572,7 @@ var TimelineEffectPropItem = ({
|
|
|
43455
43572
|
if (!keyframable || previewServerState.type !== "connected") {
|
|
43456
43573
|
return;
|
|
43457
43574
|
}
|
|
43458
|
-
const value =
|
|
43575
|
+
const value = Internals64.getEffectiveVisualModeValue({
|
|
43459
43576
|
propStatus,
|
|
43460
43577
|
dragOverrideValue,
|
|
43461
43578
|
frame: sourceFrame,
|
|
@@ -43549,7 +43666,7 @@ var TimelineEffectPropItem = ({
|
|
|
43549
43666
|
// src/components/Timeline/TimelineSequencePropItem.tsx
|
|
43550
43667
|
import { isSchemaFieldKeyframable as isSchemaFieldKeyframable3 } from "@remotion/studio-shared";
|
|
43551
43668
|
import { useCallback as useCallback125, useContext as useContext74, useMemo as useMemo137 } from "react";
|
|
43552
|
-
import { Internals as
|
|
43669
|
+
import { Internals as Internals65, useVideoConfig as useVideoConfig9 } from "remotion";
|
|
43553
43670
|
import { jsx as jsx208 } from "react/jsx-runtime";
|
|
43554
43671
|
var fieldRowBase2 = {};
|
|
43555
43672
|
var isKeyframedStatus3 = (status) => {
|
|
@@ -43572,18 +43689,18 @@ var isResettableStatus2 = ({
|
|
|
43572
43689
|
return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
|
|
43573
43690
|
};
|
|
43574
43691
|
var Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
43575
|
-
const { getDragOverrides } = useContext74(
|
|
43576
|
-
const { setDragOverrides, clearDragOverrides } = useContext74(
|
|
43692
|
+
const { getDragOverrides } = useContext74(Internals65.VisualModeDragOverridesContext);
|
|
43693
|
+
const { setDragOverrides, clearDragOverrides } = useContext74(Internals65.VisualModeSettersContext);
|
|
43577
43694
|
const dragOverrideValue = useMemo137(() => {
|
|
43578
43695
|
return nodePath === null ? undefined : (getDragOverrides(nodePath) ?? {})[field.key];
|
|
43579
43696
|
}, [getDragOverrides, nodePath, field.key]);
|
|
43580
|
-
const effectiveValue =
|
|
43697
|
+
const effectiveValue = Internals65.getEffectiveVisualModeValue({
|
|
43581
43698
|
propStatus,
|
|
43582
43699
|
dragOverrideValue,
|
|
43583
43700
|
defaultValue: field.fieldSchema.default,
|
|
43584
43701
|
shouldResortToDefaultValueIfUndefined: true
|
|
43585
43702
|
});
|
|
43586
|
-
const { setPropStatuses } = useContext74(
|
|
43703
|
+
const { setPropStatuses } = useContext74(Internals65.VisualModeSettersContext);
|
|
43587
43704
|
const { previewServerState } = useContext74(StudioServerConnectionCtx);
|
|
43588
43705
|
const clientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
|
|
43589
43706
|
const onSave = useCallback125((value, options) => {
|
|
@@ -43632,7 +43749,7 @@ var Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
43632
43749
|
if (nodePath === null) {
|
|
43633
43750
|
throw new Error("Cannot drag value");
|
|
43634
43751
|
}
|
|
43635
|
-
setDragOverrides(nodePath, field.key,
|
|
43752
|
+
setDragOverrides(nodePath, field.key, Internals65.makeStaticDragOverride(value));
|
|
43636
43753
|
}, [setDragOverrides, nodePath, field.key]);
|
|
43637
43754
|
const onDragEnd = useCallback125(() => {
|
|
43638
43755
|
if (nodePath === null) {
|
|
@@ -43651,8 +43768,8 @@ var Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
43651
43768
|
});
|
|
43652
43769
|
};
|
|
43653
43770
|
var TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, propStatus, sourceFrame }) => {
|
|
43654
|
-
const { getDragOverrides } = useContext74(
|
|
43655
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext74(
|
|
43771
|
+
const { getDragOverrides } = useContext74(Internals65.VisualModeDragOverridesContext);
|
|
43772
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext74(Internals65.VisualModeSettersContext);
|
|
43656
43773
|
const { previewServerState } = useContext74(StudioServerConnectionCtx);
|
|
43657
43774
|
const clientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
|
|
43658
43775
|
const dragOverrideValue = useMemo137(() => {
|
|
@@ -43674,7 +43791,7 @@ var TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, propS
|
|
|
43674
43791
|
});
|
|
43675
43792
|
}, [clientId, field.key, fileName, nodePath, schema, setPropStatuses]);
|
|
43676
43793
|
const onKeyframedDragValueChange = useCallback125((value) => {
|
|
43677
|
-
setDragOverrides(nodePath, field.key,
|
|
43794
|
+
setDragOverrides(nodePath, field.key, Internals65.makeKeyframedDragOverride({
|
|
43678
43795
|
status: propStatus,
|
|
43679
43796
|
frame: sourceFrame,
|
|
43680
43797
|
value
|
|
@@ -43704,17 +43821,17 @@ var TimelineSequencePropItem = ({
|
|
|
43704
43821
|
keyframeDisplayOffset,
|
|
43705
43822
|
keyframeControlsMode = "timeline"
|
|
43706
43823
|
}) => {
|
|
43707
|
-
const { propStatuses: visualModePropStatuses } = useContext74(
|
|
43708
|
-
const { getDragOverrides } = useContext74(
|
|
43709
|
-
const { setPropStatuses } = useContext74(
|
|
43824
|
+
const { propStatuses: visualModePropStatuses } = useContext74(Internals65.VisualModePropStatusesContext);
|
|
43825
|
+
const { getDragOverrides } = useContext74(Internals65.VisualModeDragOverridesContext);
|
|
43826
|
+
const { setPropStatuses } = useContext74(Internals65.VisualModeSettersContext);
|
|
43710
43827
|
const { previewServerState } = useContext74(StudioServerConnectionCtx);
|
|
43711
43828
|
const selection = useTimelineRowSelection(nodePathInfo);
|
|
43712
43829
|
const { selectItems } = useTimelineSelection();
|
|
43713
|
-
const setFrame =
|
|
43830
|
+
const setFrame = Internals65.useTimelineSetFrame();
|
|
43714
43831
|
const videoConfig = useVideoConfig9();
|
|
43715
|
-
const timelinePosition =
|
|
43832
|
+
const timelinePosition = Internals65.Timeline.useTimelinePosition();
|
|
43716
43833
|
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
43717
|
-
const propStatusesForOverride =
|
|
43834
|
+
const propStatusesForOverride = Internals65.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
43718
43835
|
const propStatus = propStatusesForOverride?.[field.key] ?? null;
|
|
43719
43836
|
const dragOverrideValue = useMemo137(() => {
|
|
43720
43837
|
return (getDragOverrides(nodePath) ?? {})[field.key];
|
|
@@ -43808,7 +43925,7 @@ var TimelineSequencePropItem = ({
|
|
|
43808
43925
|
const seekToDisplayFrame = useCallback125((frame2) => {
|
|
43809
43926
|
setFrame((current) => {
|
|
43810
43927
|
const next = { ...current, [videoConfig.id]: frame2 };
|
|
43811
|
-
|
|
43928
|
+
Internals65.persistCurrentFrame(next);
|
|
43812
43929
|
return next;
|
|
43813
43930
|
});
|
|
43814
43931
|
}, [setFrame, videoConfig.id]);
|
|
@@ -43825,7 +43942,7 @@ var TimelineSequencePropItem = ({
|
|
|
43825
43942
|
if (!keyframable || previewServerState.type !== "connected") {
|
|
43826
43943
|
return;
|
|
43827
43944
|
}
|
|
43828
|
-
const value =
|
|
43945
|
+
const value = Internals65.getEffectiveVisualModeValue({
|
|
43829
43946
|
propStatus,
|
|
43830
43947
|
dragOverrideValue,
|
|
43831
43948
|
frame: sourceFrame,
|
|
@@ -43988,16 +44105,16 @@ var TrashIcon = ({ color }) => {
|
|
|
43988
44105
|
var KeyframeInspector = ({ selection }) => {
|
|
43989
44106
|
const track = useTrackForSelection(selection);
|
|
43990
44107
|
const videoConfig = useVideoConfig10();
|
|
43991
|
-
const timelinePosition =
|
|
43992
|
-
const { propStatuses } = useContext75(
|
|
44108
|
+
const timelinePosition = Internals66.Timeline.useTimelinePosition();
|
|
44109
|
+
const { propStatuses } = useContext75(Internals66.VisualModePropStatusesContext);
|
|
43993
44110
|
const {
|
|
43994
44111
|
clearDragOverrides,
|
|
43995
44112
|
clearEffectDragOverrides,
|
|
43996
44113
|
setDragOverrides,
|
|
43997
44114
|
setEffectDragOverrides,
|
|
43998
44115
|
setPropStatuses
|
|
43999
|
-
} = useContext75(
|
|
44000
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext75(
|
|
44116
|
+
} = useContext75(Internals66.VisualModeSettersContext);
|
|
44117
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext75(Internals66.VisualModeDragOverridesContext);
|
|
44001
44118
|
const { previewServerState } = useContext75(StudioServerConnectionCtx);
|
|
44002
44119
|
const { selectItems } = useTimelineSelection();
|
|
44003
44120
|
const [draftFrame, setDraftFrame] = useState81(selection.frame);
|
|
@@ -44026,7 +44143,7 @@ var KeyframeInspector = ({ selection }) => {
|
|
|
44026
44143
|
includeTextContent: false
|
|
44027
44144
|
});
|
|
44028
44145
|
const sequenceField = sequenceFields?.find((candidate) => candidate.key === keyframeField.fieldKey) ?? null;
|
|
44029
|
-
const sequencePropStatus =
|
|
44146
|
+
const sequencePropStatus = Internals66.getPropStatusesCtx(propStatuses, nodePath)?.[keyframeField.fieldKey] ?? null;
|
|
44030
44147
|
if (!sequenceField || sequencePropStatus?.status !== "keyframed") {
|
|
44031
44148
|
return null;
|
|
44032
44149
|
}
|
|
@@ -44054,7 +44171,7 @@ var KeyframeInspector = ({ selection }) => {
|
|
|
44054
44171
|
getEffectDragOverrides
|
|
44055
44172
|
});
|
|
44056
44173
|
const effectField = effectFields.find((candidate) => candidate.key === keyframeField.fieldKey) ?? null;
|
|
44057
|
-
const effectStatus =
|
|
44174
|
+
const effectStatus = Internals66.getEffectPropStatusesCtx({
|
|
44058
44175
|
propStatuses,
|
|
44059
44176
|
nodePath,
|
|
44060
44177
|
effectIndex: keyframeField.effectIndex
|
|
@@ -44363,7 +44480,7 @@ import React152 from "react";
|
|
|
44363
44480
|
|
|
44364
44481
|
// src/components/Timeline/TimelineEffectItem.tsx
|
|
44365
44482
|
import { useCallback as useCallback127, useContext as useContext76, useMemo as useMemo139, useState as useState82 } from "react";
|
|
44366
|
-
import { Internals as
|
|
44483
|
+
import { Internals as Internals67 } from "remotion";
|
|
44367
44484
|
import { jsx as jsx210, jsxs as jsxs113 } from "react/jsx-runtime";
|
|
44368
44485
|
var EFFECT_REORDER_MIME_TYPE = "application/remotion-effect-reorder";
|
|
44369
44486
|
var currentEffectDrag = null;
|
|
@@ -44429,12 +44546,12 @@ var TimelineEffectItem = ({
|
|
|
44429
44546
|
}) => {
|
|
44430
44547
|
const { previewServerState } = useContext76(StudioServerConnectionCtx);
|
|
44431
44548
|
const previewConnected = previewServerState.type === "connected";
|
|
44432
|
-
const { propStatuses } = useContext76(
|
|
44433
|
-
const { setPropStatuses } = useContext76(
|
|
44549
|
+
const { propStatuses } = useContext76(Internals67.VisualModePropStatusesContext);
|
|
44550
|
+
const { setPropStatuses } = useContext76(Internals67.VisualModeSettersContext);
|
|
44434
44551
|
const selection = useTimelineRowSelection(nodePathInfo);
|
|
44435
44552
|
const containsSelection = useTimelineRowContainsSelection(nodePathInfo);
|
|
44436
44553
|
const [dropIndicator, setDropIndicator] = useState82(null);
|
|
44437
|
-
const effectStatus = useMemo139(() =>
|
|
44554
|
+
const effectStatus = useMemo139(() => Internals67.getEffectPropStatusesCtx({
|
|
44438
44555
|
propStatuses,
|
|
44439
44556
|
nodePath,
|
|
44440
44557
|
effectIndex
|
|
@@ -44449,7 +44566,7 @@ var TimelineEffectItem = ({
|
|
|
44449
44566
|
const canToggle = previewConnected && disabledStatus?.status === "static";
|
|
44450
44567
|
const deleteDisabled = !previewConnected || effectStatus.type !== "can-update-effect" || !validatedLocation.source;
|
|
44451
44568
|
const canReorder = previewConnected && effectStatus.type === "can-update-effect" && Boolean(validatedLocation.source);
|
|
44452
|
-
const nodePathKey = useMemo139(() =>
|
|
44569
|
+
const nodePathKey = useMemo139(() => Internals67.makeSequencePropsSubscriptionKey(nodePath), [nodePath]);
|
|
44453
44570
|
const onDeleteEffectFromSource = useCallback127(async () => {
|
|
44454
44571
|
if (deleteDisabled) {
|
|
44455
44572
|
return;
|
|
@@ -44836,7 +44953,7 @@ var TimelineExpandedRow = ({
|
|
|
44836
44953
|
|
|
44837
44954
|
// src/components/Timeline/use-timeline-expanded-tree.ts
|
|
44838
44955
|
import { useContext as useContext77, useMemo as useMemo140 } from "react";
|
|
44839
|
-
import { Internals as
|
|
44956
|
+
import { Internals as Internals68 } from "remotion";
|
|
44840
44957
|
var useTimelineExpandedTree = ({
|
|
44841
44958
|
sequence,
|
|
44842
44959
|
nodePathInfo,
|
|
@@ -44845,8 +44962,8 @@ var useTimelineExpandedTree = ({
|
|
|
44845
44962
|
}) => {
|
|
44846
44963
|
const { getIsExpanded } = useContext77(ExpandedTracksGetterContext);
|
|
44847
44964
|
const { toggleTrack } = useContext77(ExpandedTracksSetterContext);
|
|
44848
|
-
const { propStatuses: visualModePropStatuses } = useContext77(
|
|
44849
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext77(
|
|
44965
|
+
const { propStatuses: visualModePropStatuses } = useContext77(Internals68.VisualModePropStatusesContext);
|
|
44966
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext77(Internals68.VisualModeDragOverridesContext);
|
|
44850
44967
|
const { selectedItems } = useTimelineSelection();
|
|
44851
44968
|
const tree = useMemo140(() => buildTimelineTree({
|
|
44852
44969
|
sequence,
|
|
@@ -45199,7 +45316,7 @@ var InspectorSequenceSection = ({
|
|
|
45199
45316
|
|
|
45200
45317
|
// src/components/InspectorPanel/AlignmentControls.tsx
|
|
45201
45318
|
import { useCallback as useCallback129, useContext as useContext79, useMemo as useMemo142 } from "react";
|
|
45202
|
-
import { Internals as
|
|
45319
|
+
import { Internals as Internals69 } from "remotion";
|
|
45203
45320
|
|
|
45204
45321
|
// src/icons/align-right.tsx
|
|
45205
45322
|
import { jsx as jsx213, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
@@ -45423,16 +45540,16 @@ var AlignmentButton = ({ onClick, title: title2, Icon, disabled }) => {
|
|
|
45423
45540
|
};
|
|
45424
45541
|
var AlignmentControls = ({ track }) => {
|
|
45425
45542
|
const { previewServerState } = useContext79(StudioServerConnectionCtx);
|
|
45426
|
-
const { propStatuses } = useContext79(
|
|
45427
|
-
const { getDragOverrides } = useContext79(
|
|
45428
|
-
const { setPropStatuses } = useContext79(
|
|
45429
|
-
const { canvasContent, compositions } = useContext79(
|
|
45543
|
+
const { propStatuses } = useContext79(Internals69.VisualModePropStatusesContext);
|
|
45544
|
+
const { getDragOverrides } = useContext79(Internals69.VisualModeDragOverridesContext);
|
|
45545
|
+
const { setPropStatuses } = useContext79(Internals69.VisualModeSettersContext);
|
|
45546
|
+
const { canvasContent, compositions } = useContext79(Internals69.CompositionManager);
|
|
45430
45547
|
const currentCompositionMetadata = useMemo142(() => {
|
|
45431
45548
|
if (canvasContent?.type !== "composition")
|
|
45432
45549
|
return null;
|
|
45433
45550
|
return compositions.find((c) => c.id === canvasContent.compositionId) ?? null;
|
|
45434
45551
|
}, [canvasContent, compositions]);
|
|
45435
|
-
const timelinePosition =
|
|
45552
|
+
const timelinePosition = Internals69.Timeline.useTimelinePosition();
|
|
45436
45553
|
const handleAlign = useCallback129((direction) => {
|
|
45437
45554
|
if (previewServerState.type !== "connected" || !track.nodePathInfo || !track.sequence.controls) {
|
|
45438
45555
|
return;
|
|
@@ -45442,7 +45559,7 @@ var AlignmentControls = ({ track }) => {
|
|
|
45442
45559
|
return;
|
|
45443
45560
|
}
|
|
45444
45561
|
const nodePath = track.nodePathInfo.sequenceSubscriptionKey;
|
|
45445
|
-
const nodePropStatuses =
|
|
45562
|
+
const nodePropStatuses = Internals69.getPropStatusesCtx(propStatuses, nodePath);
|
|
45446
45563
|
const sourceFrame = timelinePosition - track.keyframeDisplayOffset;
|
|
45447
45564
|
const dragOverrides = getDragOverrides(nodePath) ?? {};
|
|
45448
45565
|
const activeSchema = getSelectedOutlineActiveSchema({
|
|
@@ -45469,12 +45586,12 @@ var AlignmentControls = ({ track }) => {
|
|
|
45469
45586
|
if (!currentCompositionMetadata?.width) {
|
|
45470
45587
|
return;
|
|
45471
45588
|
}
|
|
45472
|
-
const compositionRect =
|
|
45589
|
+
const compositionRect = Internals69.portalNode().getBoundingClientRect();
|
|
45473
45590
|
if (compositionRect.width === 0 || compositionRect.height === 0) {
|
|
45474
45591
|
return;
|
|
45475
45592
|
}
|
|
45476
45593
|
const scale = compositionRect.width / currentCompositionMetadata.width;
|
|
45477
|
-
const currentTranslate = propStatus ? String(
|
|
45594
|
+
const currentTranslate = propStatus ? String(Internals69.getEffectiveVisualModeValue({
|
|
45478
45595
|
propStatus,
|
|
45479
45596
|
dragOverrideValue: dragOverrides[translateFieldKey],
|
|
45480
45597
|
defaultValue: fieldSchema.default,
|
|
@@ -45542,7 +45659,7 @@ var AlignmentControls = ({ track }) => {
|
|
|
45542
45659
|
return null;
|
|
45543
45660
|
}
|
|
45544
45661
|
const renderNodePath = track.nodePathInfo.sequenceSubscriptionKey;
|
|
45545
|
-
const renderNodePropStatuses =
|
|
45662
|
+
const renderNodePropStatuses = Internals69.getPropStatusesCtx(propStatuses, renderNodePath);
|
|
45546
45663
|
const renderSourceFrame = timelinePosition - track.keyframeDisplayOffset;
|
|
45547
45664
|
const renderDragOverrides = getDragOverrides(renderNodePath) ?? {};
|
|
45548
45665
|
const renderActiveSchema = getSelectedOutlineActiveSchema({
|
|
@@ -45787,7 +45904,7 @@ var SchemaResetButton = ({ onClick }) => {
|
|
|
45787
45904
|
|
|
45788
45905
|
// src/components/RenderQueue/index.tsx
|
|
45789
45906
|
import React168, { useContext as useContext89, useEffect as useEffect69, useMemo as useMemo152 } from "react";
|
|
45790
|
-
import { Internals as
|
|
45907
|
+
import { Internals as Internals72 } from "remotion";
|
|
45791
45908
|
|
|
45792
45909
|
// src/components/RenderQueue/RenderQueueItem.tsx
|
|
45793
45910
|
import {
|
|
@@ -45797,7 +45914,7 @@ import {
|
|
|
45797
45914
|
useMemo as useMemo151,
|
|
45798
45915
|
useState as useState84
|
|
45799
45916
|
} from "react";
|
|
45800
|
-
import { Internals as
|
|
45917
|
+
import { Internals as Internals71 } from "remotion";
|
|
45801
45918
|
|
|
45802
45919
|
// src/components/RenderQueue/client-side-render-types.ts
|
|
45803
45920
|
var isRestoredClientJob = (job) => {
|
|
@@ -46464,13 +46581,13 @@ var RenderQueueProgressMessage = ({ job }) => {
|
|
|
46464
46581
|
|
|
46465
46582
|
// src/components/RenderQueue/RenderQueueRemoveItem.tsx
|
|
46466
46583
|
import { useCallback as useCallback140, useContext as useContext86, useMemo as useMemo149 } from "react";
|
|
46467
|
-
import { Internals as
|
|
46584
|
+
import { Internals as Internals70 } from "remotion";
|
|
46468
46585
|
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
46469
46586
|
var RenderQueueRemoveItem = ({ job }) => {
|
|
46470
46587
|
const isClientJob = isClientRenderJob(job);
|
|
46471
46588
|
const { removeClientJob } = useContext86(RenderQueueContext);
|
|
46472
|
-
const { canvasContent } = useContext86(
|
|
46473
|
-
const { setCanvasContent } = useContext86(
|
|
46589
|
+
const { canvasContent } = useContext86(Internals70.CompositionManager);
|
|
46590
|
+
const { setCanvasContent } = useContext86(Internals70.CompositionSetters);
|
|
46474
46591
|
const onClick = useCallback140((e) => {
|
|
46475
46592
|
e.stopPropagation();
|
|
46476
46593
|
if (isClientJob) {
|
|
@@ -46805,7 +46922,7 @@ var subtitle2 = {
|
|
|
46805
46922
|
var SELECTED_CLASSNAME = "__remotion_selected_classname";
|
|
46806
46923
|
var RenderQueueItem = ({ job, selected }) => {
|
|
46807
46924
|
const [hovered, setHovered] = useState84(false);
|
|
46808
|
-
const { setCanvasContent } = useContext88(
|
|
46925
|
+
const { setCanvasContent } = useContext88(Internals71.CompositionSetters);
|
|
46809
46926
|
const isClientJob = isClientRenderJob(job);
|
|
46810
46927
|
const onPointerEnter = useCallback142(() => {
|
|
46811
46928
|
setHovered(true);
|
|
@@ -46972,7 +47089,7 @@ var renderQueue = {
|
|
|
46972
47089
|
};
|
|
46973
47090
|
var RenderQueue = () => {
|
|
46974
47091
|
const { jobs } = useContext89(RenderQueueContext);
|
|
46975
|
-
const { canvasContent } = useContext89(
|
|
47092
|
+
const { canvasContent } = useContext89(Internals72.CompositionManager);
|
|
46976
47093
|
const previousJobCount = React168.useRef(jobs.length);
|
|
46977
47094
|
const jobCount = jobs.length;
|
|
46978
47095
|
const divRef = React168.useRef(null);
|
|
@@ -47108,7 +47225,7 @@ var persistSelectedOptionsSidebarPanel2 = (panel2) => {
|
|
|
47108
47225
|
localStorage.setItem(localStorageKey2, panel2);
|
|
47109
47226
|
};
|
|
47110
47227
|
var OptionsPanel = ({ readOnlyStudio }) => {
|
|
47111
|
-
const { props, updateProps } = useContext91(
|
|
47228
|
+
const { props, updateProps } = useContext91(Internals73.EditorPropsContext);
|
|
47112
47229
|
const isMobileLayout = useMobileLayout();
|
|
47113
47230
|
const container38 = useMemo154(() => ({
|
|
47114
47231
|
height: "100%",
|
|
@@ -47139,7 +47256,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
|
|
|
47139
47256
|
}
|
|
47140
47257
|
};
|
|
47141
47258
|
}, []);
|
|
47142
|
-
const { compositions, canvasContent } = useContext91(
|
|
47259
|
+
const { compositions, canvasContent } = useContext91(Internals73.CompositionManager);
|
|
47143
47260
|
const composition = useMemo154(() => {
|
|
47144
47261
|
if (canvasContent === null || canvasContent.type !== "composition") {
|
|
47145
47262
|
return null;
|
|
@@ -47282,13 +47399,13 @@ import {
|
|
|
47282
47399
|
useRef as useRef55,
|
|
47283
47400
|
useState as useState89
|
|
47284
47401
|
} from "react";
|
|
47285
|
-
import { Internals as
|
|
47402
|
+
import { Internals as Internals82 } from "remotion";
|
|
47286
47403
|
|
|
47287
47404
|
// src/helpers/is-current-selected-still.ts
|
|
47288
47405
|
import { useContext as useContext92 } from "react";
|
|
47289
|
-
import { Internals as
|
|
47406
|
+
import { Internals as Internals74 } from "remotion";
|
|
47290
47407
|
var useIsStill = () => {
|
|
47291
|
-
const resolved =
|
|
47408
|
+
const resolved = Internals74.useResolvedVideoConfig(null);
|
|
47292
47409
|
if (!resolved || resolved.type !== "success") {
|
|
47293
47410
|
return false;
|
|
47294
47411
|
}
|
|
@@ -47296,7 +47413,7 @@ var useIsStill = () => {
|
|
|
47296
47413
|
};
|
|
47297
47414
|
var useIsVideoComposition = () => {
|
|
47298
47415
|
const isStill = useIsStill();
|
|
47299
|
-
const { canvasContent } = useContext92(
|
|
47416
|
+
const { canvasContent } = useContext92(Internals74.CompositionManager);
|
|
47300
47417
|
if (canvasContent === null) {
|
|
47301
47418
|
return false;
|
|
47302
47419
|
}
|
|
@@ -47361,7 +47478,7 @@ import {
|
|
|
47361
47478
|
useRef as useRef53,
|
|
47362
47479
|
useState as useState86
|
|
47363
47480
|
} from "react";
|
|
47364
|
-
import { Internals as
|
|
47481
|
+
import { Internals as Internals75 } from "remotion";
|
|
47365
47482
|
import { jsxs as jsxs125 } from "react/jsx-runtime";
|
|
47366
47483
|
var label7 = {
|
|
47367
47484
|
color: WHITE,
|
|
@@ -47374,9 +47491,9 @@ var pushWithMaxSize = (arr, value, maxSize) => {
|
|
|
47374
47491
|
return arr.slice(-maxSize);
|
|
47375
47492
|
};
|
|
47376
47493
|
var FpsCounter = ({ playbackSpeed }) => {
|
|
47377
|
-
const videoConfig =
|
|
47378
|
-
const [playing] =
|
|
47379
|
-
const frame2 =
|
|
47494
|
+
const videoConfig = Internals75.useUnsafeVideoConfig();
|
|
47495
|
+
const [playing] = Internals75.Timeline.usePlayingState();
|
|
47496
|
+
const frame2 = Internals75.Timeline.useTimelinePosition();
|
|
47380
47497
|
const [marker, rerender] = useState86({});
|
|
47381
47498
|
const [fps, setFps] = useState86(0);
|
|
47382
47499
|
const previousUpdates = useRef53([]);
|
|
@@ -47438,7 +47555,7 @@ var FpsCounter = ({ playbackSpeed }) => {
|
|
|
47438
47555
|
|
|
47439
47556
|
// src/components/FullscreenToggle.tsx
|
|
47440
47557
|
import { useCallback as useCallback145, useContext as useContext94, useEffect as useEffect71 } from "react";
|
|
47441
|
-
import { Internals as
|
|
47558
|
+
import { Internals as Internals76 } from "remotion";
|
|
47442
47559
|
import { NoReactInternals as NoReactInternals26 } from "remotion/no-react";
|
|
47443
47560
|
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
47444
47561
|
var accessibilityLabel3 = [
|
|
@@ -47447,7 +47564,7 @@ var accessibilityLabel3 = [
|
|
|
47447
47564
|
].filter(NoReactInternals26.truthy).join(" ");
|
|
47448
47565
|
var FullScreenToggle = () => {
|
|
47449
47566
|
const keybindings = useKeybinding();
|
|
47450
|
-
const { setSize } = useContext94(
|
|
47567
|
+
const { setSize } = useContext94(Internals76.PreviewSizeContext);
|
|
47451
47568
|
const onClick = useCallback145(() => {
|
|
47452
47569
|
drawRef.current?.requestFullscreen();
|
|
47453
47570
|
if (document.fullscreenElement)
|
|
@@ -47678,7 +47795,7 @@ var PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
|
|
|
47678
47795
|
|
|
47679
47796
|
// src/components/PlaybackRatePersistor.tsx
|
|
47680
47797
|
import { useEffect as useEffect73 } from "react";
|
|
47681
|
-
import { Internals as
|
|
47798
|
+
import { Internals as Internals77 } from "remotion";
|
|
47682
47799
|
|
|
47683
47800
|
// src/state/playbackrate.ts
|
|
47684
47801
|
var key5 = "remotion.playbackrate";
|
|
@@ -47698,7 +47815,7 @@ var loadPlaybackRate = () => {
|
|
|
47698
47815
|
|
|
47699
47816
|
// src/components/PlaybackRatePersistor.tsx
|
|
47700
47817
|
var PlaybackRatePersistor = () => {
|
|
47701
|
-
const { setPlaybackRate, playbackRate } =
|
|
47818
|
+
const { setPlaybackRate, playbackRate } = Internals77.usePlaybackRate();
|
|
47702
47819
|
useEffect73(() => {
|
|
47703
47820
|
setPlaybackRate(loadPlaybackRate());
|
|
47704
47821
|
}, [setPlaybackRate]);
|
|
@@ -47710,7 +47827,7 @@ var PlaybackRatePersistor = () => {
|
|
|
47710
47827
|
|
|
47711
47828
|
// src/components/PlaybackRateSelector.tsx
|
|
47712
47829
|
import { useContext as useContext96, useMemo as useMemo156 } from "react";
|
|
47713
|
-
import { Internals as
|
|
47830
|
+
import { Internals as Internals78 } from "remotion";
|
|
47714
47831
|
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
47715
47832
|
var commonPlaybackRates = [
|
|
47716
47833
|
-4,
|
|
@@ -47731,7 +47848,7 @@ var getPlaybackRateLabel = (playbackRate) => {
|
|
|
47731
47848
|
var accessibilityLabel5 = "Change the playback rate";
|
|
47732
47849
|
var comboStyle3 = { width: 80 };
|
|
47733
47850
|
var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
|
|
47734
|
-
const { canvasContent } = useContext96(
|
|
47851
|
+
const { canvasContent } = useContext96(Internals78.CompositionManager);
|
|
47735
47852
|
const isStill = useIsStill();
|
|
47736
47853
|
const style8 = useMemo156(() => {
|
|
47737
47854
|
return {
|
|
@@ -47782,7 +47899,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
|
|
|
47782
47899
|
// src/components/PlayPause.tsx
|
|
47783
47900
|
import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
|
|
47784
47901
|
import { useCallback as useCallback150, useEffect as useEffect74, useState as useState87 } from "react";
|
|
47785
|
-
import { Internals as
|
|
47902
|
+
import { Internals as Internals79 } from "remotion";
|
|
47786
47903
|
|
|
47787
47904
|
// src/icons/jump-to-start.tsx
|
|
47788
47905
|
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
@@ -47877,7 +47994,7 @@ var iconButton = {
|
|
|
47877
47994
|
};
|
|
47878
47995
|
var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }) => {
|
|
47879
47996
|
const { inFrame, outFrame } = useTimelineInOutFramePosition();
|
|
47880
|
-
const videoConfig =
|
|
47997
|
+
const videoConfig = Internals79.useUnsafeVideoConfig();
|
|
47881
47998
|
const [showBufferIndicator, setShowBufferState] = useState87(false);
|
|
47882
47999
|
const {
|
|
47883
48000
|
playing,
|
|
@@ -48103,7 +48220,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted })
|
|
|
48103
48220
|
import { PlayerInternals as PlayerInternals17 } from "@remotion/player";
|
|
48104
48221
|
import { useCallback as useCallback151, useContext as useContext97, useMemo as useMemo157, useRef as useRef54, useState as useState88 } from "react";
|
|
48105
48222
|
import ReactDOM10 from "react-dom";
|
|
48106
|
-
import { Internals as
|
|
48223
|
+
import { Internals as Internals80 } from "remotion";
|
|
48107
48224
|
import { jsx as jsx254, jsxs as jsxs127, Fragment as Fragment42 } from "react/jsx-runtime";
|
|
48108
48225
|
var splitButtonContainer = {
|
|
48109
48226
|
display: "inline-flex",
|
|
@@ -48233,9 +48350,9 @@ var RenderButton = ({
|
|
|
48233
48350
|
}
|
|
48234
48351
|
};
|
|
48235
48352
|
}, []);
|
|
48236
|
-
const video =
|
|
48353
|
+
const video = Internals80.useVideo();
|
|
48237
48354
|
const { getCurrentFrame: getCurrentFrame2 } = PlayerInternals17.usePlayer();
|
|
48238
|
-
const { props } = useContext97(
|
|
48355
|
+
const { props } = useContext97(Internals80.EditorPropsContext);
|
|
48239
48356
|
const openServerRenderModal = useCallback151((copyCommandOnly) => {
|
|
48240
48357
|
if (!video) {
|
|
48241
48358
|
return null;
|
|
@@ -48592,7 +48709,7 @@ var SnappingToggle = ({ disabled }) => {
|
|
|
48592
48709
|
|
|
48593
48710
|
// src/components/Timeline/TimelineZoomControls.tsx
|
|
48594
48711
|
import { useCallback as useCallback153, useContext as useContext99 } from "react";
|
|
48595
|
-
import { Internals as
|
|
48712
|
+
import { Internals as Internals81 } from "remotion";
|
|
48596
48713
|
|
|
48597
48714
|
// src/icons/minus.tsx
|
|
48598
48715
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
@@ -48624,7 +48741,7 @@ var iconStyle5 = {
|
|
|
48624
48741
|
width: 14
|
|
48625
48742
|
};
|
|
48626
48743
|
var TimelineZoomControls = () => {
|
|
48627
|
-
const { canvasContent } = useContext99(
|
|
48744
|
+
const { canvasContent } = useContext99(Internals81.CompositionManager);
|
|
48628
48745
|
const { setZoom, zoom: zoomMap } = useContext99(TimelineZoomCtx);
|
|
48629
48746
|
const { tabIndex } = useZIndex();
|
|
48630
48747
|
const onMinusClicked = useCallback153(() => {
|
|
@@ -48763,10 +48880,10 @@ var PreviewToolbarControl = ({ children }) => {
|
|
|
48763
48880
|
});
|
|
48764
48881
|
};
|
|
48765
48882
|
var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
48766
|
-
const { playbackRate, setPlaybackRate } =
|
|
48767
|
-
const { playerMuted } = useContext100(
|
|
48768
|
-
const { setPlayerMuted } = useContext100(
|
|
48769
|
-
const { canvasContent } = useContext100(
|
|
48883
|
+
const { playbackRate, setPlaybackRate } = Internals82.usePlaybackRate();
|
|
48884
|
+
const { playerMuted } = useContext100(Internals82.MediaVolumeContext);
|
|
48885
|
+
const { setPlayerMuted } = useContext100(Internals82.SetMediaVolumeContext);
|
|
48886
|
+
const { canvasContent } = useContext100(Internals82.CompositionManager);
|
|
48770
48887
|
const isVideoComposition = useIsVideoComposition();
|
|
48771
48888
|
const previewToolbarRef = useRef55(null);
|
|
48772
48889
|
const leftScrollIndicatorRef = useRef55(null);
|
|
@@ -49283,7 +49400,7 @@ var useResponsiveSidebarStatus = () => {
|
|
|
49283
49400
|
var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
|
|
49284
49401
|
const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext103(SidebarContext);
|
|
49285
49402
|
const rulersAreVisible = useIsRulerVisible();
|
|
49286
|
-
const { canvasContent } = useContext103(
|
|
49403
|
+
const { canvasContent } = useContext103(Internals83.CompositionManager);
|
|
49287
49404
|
const actualStateLeft = useResponsiveSidebarStatus();
|
|
49288
49405
|
const actualStateRight = useMemo160(() => {
|
|
49289
49406
|
if (sidebarCollapsedStateRight === "collapsed") {
|
|
@@ -50128,7 +50245,7 @@ function unregisterUnhandledRejection(target) {
|
|
|
50128
50245
|
|
|
50129
50246
|
// src/error-overlay/react-overlay/utils/unmapper.ts
|
|
50130
50247
|
import { sourceContentFor } from "@jridgewell/trace-mapping";
|
|
50131
|
-
import { Internals as
|
|
50248
|
+
import { Internals as Internals84 } from "remotion";
|
|
50132
50249
|
|
|
50133
50250
|
// src/error-overlay/react-overlay/utils/get-lines-around.ts
|
|
50134
50251
|
function getLinesAround(line3, count, lines2) {
|
|
@@ -50152,7 +50269,7 @@ var getFileContents = async (fileName) => {
|
|
|
50152
50269
|
var unmap = async (frames, contextLines) => {
|
|
50153
50270
|
const transpiled = frames.filter((s) => s.type === "transpiled").map((s) => s.frame);
|
|
50154
50271
|
const uniqueFileNames = [
|
|
50155
|
-
...new Set(transpiled.map((f) => f.fileName).filter(
|
|
50272
|
+
...new Set(transpiled.map((f) => f.fileName).filter(Internals84.truthy))
|
|
50156
50273
|
];
|
|
50157
50274
|
const maps = await Promise.all(uniqueFileNames.map(async (fileName) => {
|
|
50158
50275
|
const fileContents = await getFileContents(fileName);
|
|
@@ -50183,7 +50300,7 @@ var unmap = async (frames, contextLines) => {
|
|
|
50183
50300
|
originalLineNumber: pos.line,
|
|
50184
50301
|
originalScriptCode: scriptCode
|
|
50185
50302
|
};
|
|
50186
|
-
}).filter(
|
|
50303
|
+
}).filter(Internals84.truthy);
|
|
50187
50304
|
};
|
|
50188
50305
|
|
|
50189
50306
|
// src/error-overlay/react-overlay/utils/get-stack-frames.ts
|
|
@@ -50261,7 +50378,7 @@ function listenToRuntimeErrors(crash) {
|
|
|
50261
50378
|
// src/error-overlay/react-overlay/index.ts
|
|
50262
50379
|
var stopListeningToRuntimeErrors = null;
|
|
50263
50380
|
var didUnmountReactApp = () => {
|
|
50264
|
-
return !
|
|
50381
|
+
return !Internals85.getPreviewDomElement()?.hasChildNodes();
|
|
50265
50382
|
};
|
|
50266
50383
|
function startReportingRuntimeErrors(onError) {
|
|
50267
50384
|
if (stopListeningToRuntimeErrors !== null) {
|
|
@@ -50533,23 +50650,23 @@ var enableHotMiddleware = () => {
|
|
|
50533
50650
|
// src/Studio.tsx
|
|
50534
50651
|
import { useLayoutEffect as useLayoutEffect7 } from "react";
|
|
50535
50652
|
import { createPortal } from "react-dom";
|
|
50536
|
-
import { Internals as
|
|
50653
|
+
import { Internals as Internals122 } from "remotion";
|
|
50537
50654
|
|
|
50538
50655
|
// src/components/Editor.tsx
|
|
50539
50656
|
import { PlayerInternals as PlayerInternals23 } from "@remotion/player";
|
|
50540
50657
|
import React257, { useCallback as useCallback217, useMemo as useMemo220, useState as useState128 } from "react";
|
|
50541
|
-
import { Internals as
|
|
50658
|
+
import { Internals as Internals117 } from "remotion";
|
|
50542
50659
|
|
|
50543
50660
|
// src/components/canvas-capture-enabled.ts
|
|
50544
50661
|
var CANVAS_CAPTURE_ENABLED = false;
|
|
50545
50662
|
|
|
50546
50663
|
// src/components/EditorContent.tsx
|
|
50547
50664
|
import { useCallback as useCallback172, useContext as useContext126 } from "react";
|
|
50548
|
-
import { Internals as
|
|
50665
|
+
import { Internals as Internals105 } from "remotion";
|
|
50549
50666
|
|
|
50550
50667
|
// src/components/GlobalKeybindings.tsx
|
|
50551
50668
|
import { useCallback as useCallback161, useContext as useContext107, useEffect as useEffect82, useMemo as useMemo163 } from "react";
|
|
50552
|
-
import { Internals as
|
|
50669
|
+
import { Internals as Internals86 } from "remotion";
|
|
50553
50670
|
var sequencePropShortcuts = {
|
|
50554
50671
|
p: "style.translate",
|
|
50555
50672
|
r: "style.rotate",
|
|
@@ -50563,11 +50680,11 @@ var GlobalKeybindings = () => {
|
|
|
50563
50680
|
const { setCheckerboard } = useContext107(CheckerboardContext);
|
|
50564
50681
|
const { setEditorSnapping } = useContext107(EditorSnappingContext);
|
|
50565
50682
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
50566
|
-
const { sequences } = useContext107(
|
|
50567
|
-
const videoConfig =
|
|
50568
|
-
const { overrideIdToNodePathMappings } = useContext107(
|
|
50683
|
+
const { sequences } = useContext107(Internals86.SequenceManager);
|
|
50684
|
+
const videoConfig = Internals86.useUnsafeVideoConfig();
|
|
50685
|
+
const { overrideIdToNodePathMappings } = useContext107(Internals86.OverrideIdsToNodePathsGettersContext);
|
|
50569
50686
|
const { navigateToNextComposition, navigateToPreviousComposition } = useCompositionNavigation();
|
|
50570
|
-
const video =
|
|
50687
|
+
const video = Internals86.useVideo();
|
|
50571
50688
|
const timeline = useMemo163(() => {
|
|
50572
50689
|
if (videoConfig === null) {
|
|
50573
50690
|
return [];
|
|
@@ -50756,7 +50873,7 @@ var GlobalKeybindings = () => {
|
|
|
50756
50873
|
|
|
50757
50874
|
// src/components/Timeline/Timeline.tsx
|
|
50758
50875
|
import React214, { useCallback as useCallback171, useContext as useContext125, useMemo as useMemo185, useState as useState103 } from "react";
|
|
50759
|
-
import { Internals as
|
|
50876
|
+
import { Internals as Internals104 } from "remotion";
|
|
50760
50877
|
|
|
50761
50878
|
// src/components/Timeline/MaxTimelineTracks.tsx
|
|
50762
50879
|
import { jsxs as jsxs135 } from "react/jsx-runtime";
|
|
@@ -50787,10 +50904,10 @@ var MaxTimelineTracksReached = () => {
|
|
|
50787
50904
|
|
|
50788
50905
|
// src/components/Timeline/SequencePropsObserver.tsx
|
|
50789
50906
|
import { useContext as useContext108, useEffect as useEffect83 } from "react";
|
|
50790
|
-
import { Internals as
|
|
50907
|
+
import { Internals as Internals87 } from "remotion";
|
|
50791
50908
|
var SequencePropsObserver = () => {
|
|
50792
50909
|
const { subscribeToEvent } = useContext108(StudioServerConnectionCtx);
|
|
50793
|
-
const { setPropStatuses } = useContext108(
|
|
50910
|
+
const { setPropStatuses } = useContext108(Internals87.VisualModeSettersContext);
|
|
50794
50911
|
useEffect83(() => {
|
|
50795
50912
|
const handleEvent = (event) => {
|
|
50796
50913
|
if (event.type !== "sequence-props-updated") {
|
|
@@ -50835,11 +50952,11 @@ import {
|
|
|
50835
50952
|
stringifySequenceSubscriptionKey as stringifySequenceSubscriptionKey2
|
|
50836
50953
|
} from "@remotion/studio-shared";
|
|
50837
50954
|
import { useContext as useContext109, useEffect as useEffect84, useMemo as useMemo164, useRef as useRef59 } from "react";
|
|
50838
|
-
import { Internals as
|
|
50955
|
+
import { Internals as Internals89 } from "remotion";
|
|
50839
50956
|
|
|
50840
50957
|
// src/components/Timeline/sequence-props-subscription-store.ts
|
|
50841
50958
|
import { getAllSchemaKeys, getAssetSchemaKeys as getAssetSchemaKeys2 } from "@remotion/studio-shared";
|
|
50842
|
-
import { Internals as
|
|
50959
|
+
import { Internals as Internals88 } from "remotion";
|
|
50843
50960
|
var makeKey2 = ({
|
|
50844
50961
|
fileName,
|
|
50845
50962
|
line: line3,
|
|
@@ -50914,7 +51031,7 @@ var acquireSequencePropsSubscription = ({
|
|
|
50914
51031
|
return;
|
|
50915
51032
|
}
|
|
50916
51033
|
current.applyOnce = null;
|
|
50917
|
-
|
|
51034
|
+
Internals88.Log.error(err);
|
|
50918
51035
|
});
|
|
50919
51036
|
}
|
|
50920
51037
|
entry.refCount++;
|
|
@@ -50959,16 +51076,16 @@ var useSequencePropsSubscription = ({
|
|
|
50959
51076
|
schema,
|
|
50960
51077
|
effects
|
|
50961
51078
|
}) => {
|
|
50962
|
-
const { setPropStatuses } = useContext109(
|
|
50963
|
-
const { setOverrideIdToNodePath } = useContext109(
|
|
50964
|
-
const { overrideIdToNodePathMappings } = useContext109(
|
|
51079
|
+
const { setPropStatuses } = useContext109(Internals89.VisualModeSettersContext);
|
|
51080
|
+
const { setOverrideIdToNodePath } = useContext109(Internals89.OverrideIdsToNodePathsSettersContext);
|
|
51081
|
+
const { overrideIdToNodePathMappings } = useContext109(Internals89.OverrideIdsToNodePathsGettersContext);
|
|
50965
51082
|
const { migrateExpandedTracksForSubscriptionKey: migrateExpandedTracksForSubscriptionKey2 } = useContext109(ExpandedTracksSetterContext);
|
|
50966
51083
|
const { previewServerState: state } = useContext109(StudioServerConnectionCtx);
|
|
50967
51084
|
const previousNodePathRef = useRef59(null);
|
|
50968
51085
|
const overrideIdToNodePathMappingsRef = useRef59(overrideIdToNodePathMappings);
|
|
50969
51086
|
overrideIdToNodePathMappingsRef.current = overrideIdToNodePathMappings;
|
|
50970
51087
|
const clientId = state.type === "connected" ? state.clientId : undefined;
|
|
50971
|
-
const videoConfig =
|
|
51088
|
+
const videoConfig = Internals89.useUnsafeVideoConfig();
|
|
50972
51089
|
const effectsSignature = useMemo164(() => effects.map((effect) => getAllSchemaKeys2(effect).join("\x00")).join("\x00\x00"), [effects]);
|
|
50973
51090
|
const validatedLocation = useMemo164(() => {
|
|
50974
51091
|
if (!originalLocation || !originalLocation.source || !originalLocation.line) {
|
|
@@ -51075,11 +51192,11 @@ import React193, {
|
|
|
51075
51192
|
useRef as useRef62,
|
|
51076
51193
|
useState as useState95
|
|
51077
51194
|
} from "react";
|
|
51078
|
-
import { Internals as
|
|
51195
|
+
import { Internals as Internals92, useVideoConfig as useVideoConfig11 } from "remotion";
|
|
51079
51196
|
|
|
51080
51197
|
// src/components/Timeline/TimelineTimeIndicators.tsx
|
|
51081
51198
|
import { useContext as useContext110, useEffect as useEffect86, useMemo as useMemo166, useRef as useRef61 } from "react";
|
|
51082
|
-
import { Internals as
|
|
51199
|
+
import { Internals as Internals91 } from "remotion";
|
|
51083
51200
|
|
|
51084
51201
|
// src/components/TimeValue.tsx
|
|
51085
51202
|
import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
|
|
@@ -51089,7 +51206,7 @@ import {
|
|
|
51089
51206
|
useImperativeHandle as useImperativeHandle13,
|
|
51090
51207
|
useRef as useRef60
|
|
51091
51208
|
} from "react";
|
|
51092
|
-
import { Internals as
|
|
51209
|
+
import { Internals as Internals90, useCurrentFrame } from "remotion";
|
|
51093
51210
|
import { jsx as jsx272, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
51094
51211
|
var text = {
|
|
51095
51212
|
color: WHITE,
|
|
@@ -51116,7 +51233,7 @@ var frameStyle = {
|
|
|
51116
51233
|
};
|
|
51117
51234
|
var TimeValue = () => {
|
|
51118
51235
|
const frame2 = useCurrentFrame();
|
|
51119
|
-
const config =
|
|
51236
|
+
const config = Internals90.useUnsafeVideoConfig();
|
|
51120
51237
|
const isStill = useIsStill();
|
|
51121
51238
|
const { seek, play, pause, toggle } = PlayerInternals20.usePlayer();
|
|
51122
51239
|
const keybindings = useKeybinding();
|
|
@@ -51127,7 +51244,7 @@ var TimeValue = () => {
|
|
|
51127
51244
|
const onValueChange = useCallback162((val) => {
|
|
51128
51245
|
seek(val);
|
|
51129
51246
|
}, [seek]);
|
|
51130
|
-
useImperativeHandle13(
|
|
51247
|
+
useImperativeHandle13(Internals90.timeValueRef, () => ({
|
|
51131
51248
|
goToFrame: () => {
|
|
51132
51249
|
ref2.current?.click();
|
|
51133
51250
|
},
|
|
@@ -51237,7 +51354,7 @@ var TimelineTimePadding = () => {
|
|
|
51237
51354
|
};
|
|
51238
51355
|
var TimelineTimeIndicators = () => {
|
|
51239
51356
|
const sliderTrack = useContext110(TimelineWidthContext);
|
|
51240
|
-
const video =
|
|
51357
|
+
const video = Internals91.useVideo();
|
|
51241
51358
|
if (sliderTrack === null) {
|
|
51242
51359
|
return null;
|
|
51243
51360
|
}
|
|
@@ -51352,9 +51469,9 @@ var getClientXWithScroll = (x) => {
|
|
|
51352
51469
|
return x + scrollableRef.current?.scrollLeft;
|
|
51353
51470
|
};
|
|
51354
51471
|
var TimelineDragHandler = () => {
|
|
51355
|
-
const video =
|
|
51472
|
+
const video = Internals92.useUnsafeVideoConfig();
|
|
51356
51473
|
const { zoom: zoomMap } = useContext111(TimelineZoomCtx);
|
|
51357
|
-
const { canvasContent } = useContext111(
|
|
51474
|
+
const { canvasContent } = useContext111(Internals92.CompositionManager);
|
|
51358
51475
|
const containerStyle9 = useMemo167(() => {
|
|
51359
51476
|
if (!canvasContent || canvasContent.type !== "composition") {
|
|
51360
51477
|
return {};
|
|
@@ -51383,7 +51500,7 @@ var TimelineDragHandlerInner = () => {
|
|
|
51383
51500
|
shouldApplyCssTransforms: true
|
|
51384
51501
|
});
|
|
51385
51502
|
const { isHighestContext } = useZIndex();
|
|
51386
|
-
const setFrame =
|
|
51503
|
+
const setFrame = Internals92.useTimelineSetFrame();
|
|
51387
51504
|
const width = scrollableRef.current?.scrollWidth ?? 0;
|
|
51388
51505
|
const left3 = size3?.left ?? 0;
|
|
51389
51506
|
const [dragging, setDragging] = useState95({
|
|
@@ -51515,7 +51632,7 @@ var TimelineDragHandlerInner = () => {
|
|
|
51515
51632
|
});
|
|
51516
51633
|
setFrame((c) => {
|
|
51517
51634
|
const newObj = { ...c, [videoConfig.id]: frame2 };
|
|
51518
|
-
|
|
51635
|
+
Internals92.persistCurrentFrame(newObj);
|
|
51519
51636
|
return newObj;
|
|
51520
51637
|
});
|
|
51521
51638
|
if (dragging.wasPlaying) {
|
|
@@ -51568,15 +51685,15 @@ import React194, { useMemo as useMemo169 } from "react";
|
|
|
51568
51685
|
|
|
51569
51686
|
// src/components/Timeline/use-timeline-height.ts
|
|
51570
51687
|
import { useContext as useContext112, useMemo as useMemo168 } from "react";
|
|
51571
|
-
import { Internals as
|
|
51688
|
+
import { Internals as Internals93 } from "remotion";
|
|
51572
51689
|
var useTimelineHeight = ({
|
|
51573
51690
|
shown,
|
|
51574
51691
|
hasBeenCut
|
|
51575
51692
|
}) => {
|
|
51576
51693
|
const { getIsExpanded } = useContext112(ExpandedTracksGetterContext);
|
|
51577
51694
|
const { previewServerState } = useContext112(StudioServerConnectionCtx);
|
|
51578
|
-
const { propStatuses } = useContext112(
|
|
51579
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext112(
|
|
51695
|
+
const { propStatuses } = useContext112(Internals93.VisualModePropStatusesContext);
|
|
51696
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext112(Internals93.VisualModeDragOverridesContext);
|
|
51580
51697
|
const { selectedItems } = useTimelineSelection();
|
|
51581
51698
|
const previewServerConnected = previewServerState.type === "connected";
|
|
51582
51699
|
const selectedRowKeys = useMemo168(() => getSelectedTimelineExpandedRowKeys(selectedItems), [selectedItems]);
|
|
@@ -51665,11 +51782,11 @@ import React197, {
|
|
|
51665
51782
|
useMemo as useMemo171,
|
|
51666
51783
|
useState as useState96
|
|
51667
51784
|
} from "react";
|
|
51668
|
-
import { Internals as
|
|
51785
|
+
import { Internals as Internals95, useVideoConfig as useVideoConfig13 } from "remotion";
|
|
51669
51786
|
|
|
51670
51787
|
// src/components/Timeline/TimelineInOutPointer.tsx
|
|
51671
51788
|
import { createRef as createRef11, useContext as useContext113 } from "react";
|
|
51672
|
-
import { Internals as
|
|
51789
|
+
import { Internals as Internals94 } from "remotion";
|
|
51673
51790
|
import { jsx as jsx276, jsxs as jsxs137, Fragment as Fragment47 } from "react/jsx-runtime";
|
|
51674
51791
|
var areaHighlight = {
|
|
51675
51792
|
position: "absolute",
|
|
@@ -51683,7 +51800,7 @@ var inMarkerAreaRef = createRef11();
|
|
|
51683
51800
|
var outMarkerAreaRef = createRef11();
|
|
51684
51801
|
var TimelineInOutPointer = () => {
|
|
51685
51802
|
const { inFrame, outFrame } = useTimelineInOutFramePosition();
|
|
51686
|
-
const videoConfig =
|
|
51803
|
+
const videoConfig = Internals94.useUnsafeVideoConfig();
|
|
51687
51804
|
const timelineWidth = useContext113(TimelineWidthContext);
|
|
51688
51805
|
if (!videoConfig || timelineWidth === null) {
|
|
51689
51806
|
return null;
|
|
@@ -51767,8 +51884,8 @@ var getClientXWithScroll2 = (x) => {
|
|
|
51767
51884
|
return x + scrollableRef.current?.scrollLeft;
|
|
51768
51885
|
};
|
|
51769
51886
|
var TimelineInOutDragHandler = () => {
|
|
51770
|
-
const video =
|
|
51771
|
-
const { canvasContent } = useContext115(
|
|
51887
|
+
const video = Internals95.useUnsafeVideoConfig();
|
|
51888
|
+
const { canvasContent } = useContext115(Internals95.CompositionManager);
|
|
51772
51889
|
if (!canvasContent || canvasContent.type !== "composition") {
|
|
51773
51890
|
return null;
|
|
51774
51891
|
}
|
|
@@ -52036,7 +52153,7 @@ var TimelineInOutDragHandlerInnerMemo = React197.memo(TimelineInOutDragHandlerIn
|
|
|
52036
52153
|
|
|
52037
52154
|
// src/components/Timeline/TimelineSequenceItem.tsx
|
|
52038
52155
|
import React201, { useCallback as useCallback167, useContext as useContext116, useMemo as useMemo176, useState as useState98 } from "react";
|
|
52039
|
-
import { Internals as
|
|
52156
|
+
import { Internals as Internals97 } from "remotion";
|
|
52040
52157
|
|
|
52041
52158
|
// src/components/Timeline/TimelineExpandedSection.tsx
|
|
52042
52159
|
import React198, { useMemo as useMemo172 } from "react";
|
|
@@ -52109,7 +52226,7 @@ var TimelineExpandedSection = ({
|
|
|
52109
52226
|
|
|
52110
52227
|
// src/components/Timeline/TimelineMediaInfo.tsx
|
|
52111
52228
|
import { useMemo as useMemo173 } from "react";
|
|
52112
|
-
import { Internals as
|
|
52229
|
+
import { Internals as Internals96 } from "remotion";
|
|
52113
52230
|
import { jsx as jsx280 } from "react/jsx-runtime";
|
|
52114
52231
|
var lineStyle = {
|
|
52115
52232
|
whiteSpace: "nowrap",
|
|
@@ -52139,7 +52256,7 @@ var useAssetLink = (src) => {
|
|
|
52139
52256
|
};
|
|
52140
52257
|
};
|
|
52141
52258
|
var TimelineMediaInfo = ({ src }) => {
|
|
52142
|
-
const fileName = useMemo173(() =>
|
|
52259
|
+
const fileName = useMemo173(() => Internals96.getAssetDisplayName(src), [src]);
|
|
52143
52260
|
const { linkInfo, fileNameStyle } = useAssetLink(src);
|
|
52144
52261
|
return /* @__PURE__ */ jsx280("div", {
|
|
52145
52262
|
style: fileNameStyle,
|
|
@@ -52454,7 +52571,7 @@ var TimelineSequenceItem = ({
|
|
|
52454
52571
|
const previewInteractive = previewConnected && studioInteractivityEnabled;
|
|
52455
52572
|
const { getIsExpanded } = useContext116(ExpandedTracksGetterContext);
|
|
52456
52573
|
const { toggleTrack } = useContext116(ExpandedTracksSetterContext);
|
|
52457
|
-
const { setPropStatuses } = useContext116(
|
|
52574
|
+
const { setPropStatuses } = useContext116(Internals97.VisualModeSettersContext);
|
|
52458
52575
|
const { setSelectedModal } = useContext116(ModalsContext);
|
|
52459
52576
|
const { isHighestContext } = useKeybinding();
|
|
52460
52577
|
const selectAsset = useSelectAsset();
|
|
@@ -52466,7 +52583,7 @@ var TimelineSequenceItem = ({
|
|
|
52466
52583
|
const [isRenaming, setIsRenaming] = useState98(false);
|
|
52467
52584
|
const [sequenceDropIndicator, setSequenceDropIndicator] = useState98(null);
|
|
52468
52585
|
const [sequenceDropRejection, setSequenceDropRejection] = useState98(null);
|
|
52469
|
-
const timelinePosition =
|
|
52586
|
+
const timelinePosition = Internals97.Timeline.useTimelinePosition();
|
|
52470
52587
|
const { canOpenInEditor, openInEditor: openInEditor2, originalLocation } = useOpenSequenceInEditor(sequence);
|
|
52471
52588
|
const fileLocation = useMemo176(() => formatFileLocation({
|
|
52472
52589
|
location: originalLocation,
|
|
@@ -52496,7 +52613,7 @@ var TimelineSequenceItem = ({
|
|
|
52496
52613
|
});
|
|
52497
52614
|
const timelineDisplayName = sequence.displayName === "" && connectedCompositions.length === 1 ? connectedCompositions[0].id : displayName;
|
|
52498
52615
|
const canDeleteFromSource = Boolean(nodePath && validatedLocation?.source);
|
|
52499
|
-
const nodePathKey = useMemo176(() => nodePath ?
|
|
52616
|
+
const nodePathKey = useMemo176(() => nodePath ? Internals97.makeSequencePropsSubscriptionKey(nodePath) : null, [nodePath]);
|
|
52500
52617
|
const parentId = sequence.parent ?? null;
|
|
52501
52618
|
const canReorderSequence = previewInteractive && Boolean(nodePath && nodePathKey && validatedLocation?.source) && nodePathInfo?.numberOfSequencesWithThisNodePath === 1;
|
|
52502
52619
|
const canHandleSequenceDrag = previewInteractive;
|
|
@@ -52801,11 +52918,23 @@ var TimelineSequenceItem = ({
|
|
|
52801
52918
|
}
|
|
52802
52919
|
e.stopPropagation();
|
|
52803
52920
|
if (action2 === "open-connected-composition") {
|
|
52804
|
-
selectComposition(connectedCompositions[0], true
|
|
52921
|
+
selectComposition(connectedCompositions[0], true, getConnectedCompositionFrame({
|
|
52922
|
+
timelinePosition,
|
|
52923
|
+
sequence,
|
|
52924
|
+
sequenceFrameOffset
|
|
52925
|
+
}));
|
|
52805
52926
|
return;
|
|
52806
52927
|
}
|
|
52807
52928
|
openInEditor2();
|
|
52808
|
-
}, [
|
|
52929
|
+
}, [
|
|
52930
|
+
canOpenInEditor,
|
|
52931
|
+
connectedCompositions,
|
|
52932
|
+
openInEditor2,
|
|
52933
|
+
selectComposition,
|
|
52934
|
+
sequence,
|
|
52935
|
+
sequenceFrameOffset,
|
|
52936
|
+
timelinePosition
|
|
52937
|
+
]);
|
|
52809
52938
|
const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
|
|
52810
52939
|
const canRenameSelectedSequence = canRenameThisSequence && selected && selectedItems.length === 1 && selectedItems[0]?.type === "sequence";
|
|
52811
52940
|
const onCancelRenaming = useCallback167(() => {
|
|
@@ -53130,12 +53259,12 @@ var TimelineList = ({ timeline }) => {
|
|
|
53130
53259
|
|
|
53131
53260
|
// src/components/Timeline/TimelinePinchZoom.tsx
|
|
53132
53261
|
import { useCallback as useCallback168, useContext as useContext117, useEffect as useEffect90, useRef as useRef64 } from "react";
|
|
53133
|
-
import { Internals as
|
|
53262
|
+
import { Internals as Internals98 } from "remotion";
|
|
53134
53263
|
var ZOOM_WHEEL_DELTA = 0.06;
|
|
53135
53264
|
var TimelinePinchZoom = () => {
|
|
53136
53265
|
const isVideoComposition = useIsVideoComposition();
|
|
53137
|
-
const videoConfig =
|
|
53138
|
-
const { canvasContent } = useContext117(
|
|
53266
|
+
const videoConfig = Internals98.useUnsafeVideoConfig();
|
|
53267
|
+
const { canvasContent } = useContext117(Internals98.CompositionManager);
|
|
53139
53268
|
const { zoom, setZoom } = useContext117(TimelineZoomCtx);
|
|
53140
53269
|
const { editorZoomGestures } = useContext117(EditorZoomGesturesContext);
|
|
53141
53270
|
const zoomRef = useRef64(zoom);
|
|
@@ -53347,14 +53476,14 @@ var TimelinePinchZoom = () => {
|
|
|
53347
53476
|
|
|
53348
53477
|
// src/components/Timeline/TimelinePlayCursorSyncer.tsx
|
|
53349
53478
|
import { useContext as useContext118, useEffect as useEffect91 } from "react";
|
|
53350
|
-
import { Internals as
|
|
53479
|
+
import { Internals as Internals99 } from "remotion";
|
|
53351
53480
|
var lastTimelinePositionWhileScrolling = null;
|
|
53352
53481
|
var TimelinePlayCursorSyncer = () => {
|
|
53353
|
-
const video =
|
|
53354
|
-
const timelinePosition =
|
|
53355
|
-
const [playing] =
|
|
53356
|
-
const { playbackRate } =
|
|
53357
|
-
const { canvasContent } = useContext118(
|
|
53482
|
+
const video = Internals99.useVideo();
|
|
53483
|
+
const timelinePosition = Internals99.Timeline.useTimelinePosition();
|
|
53484
|
+
const [playing] = Internals99.Timeline.usePlayingState();
|
|
53485
|
+
const { playbackRate } = Internals99.usePlaybackRate();
|
|
53486
|
+
const { canvasContent } = useContext118(Internals99.CompositionManager);
|
|
53358
53487
|
const { zoom: zoomMap } = useContext118(TimelineZoomCtx);
|
|
53359
53488
|
const compositionId = canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null;
|
|
53360
53489
|
const zoom = compositionId ? zoomMap[compositionId] ?? TIMELINE_MIN_ZOOM : null;
|
|
@@ -53580,7 +53709,7 @@ var TimelineExpandedKeyframeRow = React204.memo(TimelineExpandedKeyframeRowUnmem
|
|
|
53580
53709
|
// src/components/Timeline/use-expanded-track-keyframe-rows.ts
|
|
53581
53710
|
import { canEditEasingForInterpolationFunction as canEditEasingForInterpolationFunction4 } from "@remotion/studio-shared";
|
|
53582
53711
|
import { useContext as useContext121, useMemo as useMemo179 } from "react";
|
|
53583
|
-
import { Internals as
|
|
53712
|
+
import { Internals as Internals100 } from "remotion";
|
|
53584
53713
|
var getNodeCanEditEasing = ({
|
|
53585
53714
|
node,
|
|
53586
53715
|
nodePath,
|
|
@@ -53590,10 +53719,10 @@ var getNodeCanEditEasing = ({
|
|
|
53590
53719
|
return false;
|
|
53591
53720
|
}
|
|
53592
53721
|
if (node.field.kind === "sequence-field") {
|
|
53593
|
-
const sequencePropStatus =
|
|
53722
|
+
const sequencePropStatus = Internals100.getPropStatusesCtx(propStatuses, nodePath)?.[node.field.key];
|
|
53594
53723
|
return sequencePropStatus?.status === "keyframed" && canEditEasingForInterpolationFunction4(sequencePropStatus.interpolationFunction);
|
|
53595
53724
|
}
|
|
53596
|
-
const effectStatus =
|
|
53725
|
+
const effectStatus = Internals100.getEffectPropStatusesCtx({
|
|
53597
53726
|
propStatuses,
|
|
53598
53727
|
nodePath,
|
|
53599
53728
|
effectIndex: node.field.effectIndex
|
|
@@ -53607,10 +53736,10 @@ var useExpandedTrackKeyframeRows = ({
|
|
|
53607
53736
|
keyframeDisplayOffset
|
|
53608
53737
|
}) => {
|
|
53609
53738
|
const { getIsExpanded } = useContext121(ExpandedTracksGetterContext);
|
|
53610
|
-
const { propStatuses } = useContext121(
|
|
53611
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext121(
|
|
53739
|
+
const { propStatuses } = useContext121(Internals100.VisualModePropStatusesContext);
|
|
53740
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext121(Internals100.VisualModeDragOverridesContext);
|
|
53612
53741
|
const { selectedItems } = useTimelineSelection();
|
|
53613
|
-
const timelinePosition =
|
|
53742
|
+
const timelinePosition = Internals100.Timeline.useTimelinePosition();
|
|
53614
53743
|
const tree = useMemo179(() => buildTimelineTree({
|
|
53615
53744
|
sequence,
|
|
53616
53745
|
nodePathInfo,
|
|
@@ -53713,7 +53842,7 @@ var TimelineExpandedTrackKeyframes = React205.memo(TimelineExpandedTrackKeyframe
|
|
|
53713
53842
|
|
|
53714
53843
|
// src/components/Timeline/TimelineSequence.tsx
|
|
53715
53844
|
import React211, { useCallback as useCallback170, useContext as useContext123, useMemo as useMemo182, useRef as useRef70 } from "react";
|
|
53716
|
-
import { Internals as
|
|
53845
|
+
import { Internals as Internals103, useCurrentFrame as useCurrentFrame2 } from "remotion";
|
|
53717
53846
|
|
|
53718
53847
|
// src/helpers/get-timeline-sequence-layout.ts
|
|
53719
53848
|
var SEQUENCE_BORDER_WIDTH = 1;
|
|
@@ -53841,7 +53970,7 @@ import {
|
|
|
53841
53970
|
sliceWaveformPeaks
|
|
53842
53971
|
} from "@remotion/timeline-utils";
|
|
53843
53972
|
import { useEffect as useEffect93, useMemo as useMemo180, useRef as useRef66, useState as useState100 } from "react";
|
|
53844
|
-
import { Internals as
|
|
53973
|
+
import { Internals as Internals101 } from "remotion";
|
|
53845
53974
|
import { jsx as jsx288, jsxs as jsxs145 } from "react/jsx-runtime";
|
|
53846
53975
|
var EMPTY_PEAKS = new Float32Array(0);
|
|
53847
53976
|
var canRetryCanvasTransfer = (err) => {
|
|
@@ -53939,7 +54068,7 @@ var AudioWaveform = ({
|
|
|
53939
54068
|
const [error, setError] = useState100(null);
|
|
53940
54069
|
const [waveformCanvasKey, setWaveformCanvasKey] = useState100(0);
|
|
53941
54070
|
const canUseWorkerPath = useMemo180(() => canUseAudioWaveformWorker(), []);
|
|
53942
|
-
const vidConf =
|
|
54071
|
+
const vidConf = Internals101.useUnsafeVideoConfig();
|
|
53943
54072
|
if (vidConf === null) {
|
|
53944
54073
|
throw new Error("Expected video config");
|
|
53945
54074
|
}
|
|
@@ -54345,7 +54474,7 @@ import {
|
|
|
54345
54474
|
useRef as useRef68,
|
|
54346
54475
|
useState as useState101
|
|
54347
54476
|
} from "react";
|
|
54348
|
-
import { Internals as
|
|
54477
|
+
import { Internals as Internals102 } from "remotion";
|
|
54349
54478
|
import { NoReactInternals as NoReactInternals29 } from "remotion/no-react";
|
|
54350
54479
|
import { jsx as jsx293 } from "react/jsx-runtime";
|
|
54351
54480
|
var HANDLE_WIDTH3 = 6;
|
|
@@ -54363,7 +54492,7 @@ var getKeyframedSequenceDragTargets = ({
|
|
|
54363
54492
|
sequence,
|
|
54364
54493
|
propStatuses
|
|
54365
54494
|
}) => {
|
|
54366
|
-
const status = propStatuses[
|
|
54495
|
+
const status = propStatuses[Internals102.makeSequencePropsSubscriptionKey(nodePath)];
|
|
54367
54496
|
if (status === null || status === undefined || !status.canUpdate) {
|
|
54368
54497
|
return { effectKeyframes: [], sequenceKeyframes: [] };
|
|
54369
54498
|
}
|
|
@@ -54404,21 +54533,21 @@ var canUpdateDurationInFrames = ({
|
|
|
54404
54533
|
propStatuses,
|
|
54405
54534
|
nodePath
|
|
54406
54535
|
}) => {
|
|
54407
|
-
const status =
|
|
54536
|
+
const status = Internals102.getPropStatusesCtx(propStatuses, nodePath)?.durationInFrames?.status;
|
|
54408
54537
|
return status === "static";
|
|
54409
54538
|
};
|
|
54410
54539
|
var canUpdateFrom = ({
|
|
54411
54540
|
propStatuses,
|
|
54412
54541
|
nodePath
|
|
54413
54542
|
}) => {
|
|
54414
|
-
const status =
|
|
54543
|
+
const status = Internals102.getPropStatusesCtx(propStatuses, nodePath)?.from?.status;
|
|
54415
54544
|
return status === "static";
|
|
54416
54545
|
};
|
|
54417
54546
|
var canUpdateTrimBefore = ({
|
|
54418
54547
|
propStatuses,
|
|
54419
54548
|
nodePath
|
|
54420
54549
|
}) => {
|
|
54421
|
-
const status =
|
|
54550
|
+
const status = Internals102.getPropStatusesCtx(propStatuses, nodePath)?.trimBefore?.status;
|
|
54422
54551
|
return status === "static";
|
|
54423
54552
|
};
|
|
54424
54553
|
var isTimelineSequenceDurationDraggable = (sequence) => {
|
|
@@ -54758,10 +54887,10 @@ var clearFromDragOverrides = ({
|
|
|
54758
54887
|
}
|
|
54759
54888
|
};
|
|
54760
54889
|
var TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
54761
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(
|
|
54762
|
-
const propStatusesRef = useContext122(
|
|
54763
|
-
const sequencesRef = useContext122(
|
|
54764
|
-
const { overrideIdToNodePathMappings } = useContext122(
|
|
54890
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(Internals102.VisualModeSettersContext);
|
|
54891
|
+
const propStatusesRef = useContext122(Internals102.VisualModePropStatusesRefContext);
|
|
54892
|
+
const sequencesRef = useContext122(Internals102.SequenceManagerRefContext);
|
|
54893
|
+
const { overrideIdToNodePathMappings } = useContext122(Internals102.OverrideIdsToNodePathsGettersContext);
|
|
54765
54894
|
const { previewServerState } = useContext122(StudioServerConnectionCtx);
|
|
54766
54895
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
54767
54896
|
const [dragging, setDragging] = useState101(false);
|
|
@@ -54816,7 +54945,7 @@ var TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineD
|
|
|
54816
54945
|
redoLabel: dragState.targets.length > 1 ? "Resize selected sequences back" : "Resize sequence back"
|
|
54817
54946
|
});
|
|
54818
54947
|
savePromise.catch((err) => {
|
|
54819
|
-
|
|
54948
|
+
Internals102.Log.error({ logLevel: "error", tag: null }, "Could not save left edge drag", err);
|
|
54820
54949
|
}).finally(() => {
|
|
54821
54950
|
clearLeftEdgeDragOverrides({
|
|
54822
54951
|
clearDragOverrides: latestClear,
|
|
@@ -54886,9 +55015,9 @@ var TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineD
|
|
|
54886
55015
|
initialTrimBefore: target.initialTrimBefore,
|
|
54887
55016
|
deltaFrames
|
|
54888
55017
|
});
|
|
54889
|
-
latestRef.current.setDragOverrides(target.nodePath, "from",
|
|
54890
|
-
latestRef.current.setDragOverrides(target.nodePath, "durationInFrames",
|
|
54891
|
-
latestRef.current.setDragOverrides(target.nodePath, "trimBefore",
|
|
55018
|
+
latestRef.current.setDragOverrides(target.nodePath, "from", Internals102.makeStaticDragOverride(nextValues.from));
|
|
55019
|
+
latestRef.current.setDragOverrides(target.nodePath, "durationInFrames", Internals102.makeStaticDragOverride(nextValues.durationInFrames));
|
|
55020
|
+
latestRef.current.setDragOverrides(target.nodePath, "trimBefore", Internals102.makeStaticDragOverride(nextValues.trimBefore));
|
|
54892
55021
|
}
|
|
54893
55022
|
};
|
|
54894
55023
|
const onUp = (e) => {
|
|
@@ -54943,10 +55072,10 @@ var useTimelineSequenceFromDrag = ({
|
|
|
54943
55072
|
clearDragOverrides,
|
|
54944
55073
|
setEffectDragOverrides,
|
|
54945
55074
|
clearEffectDragOverrides
|
|
54946
|
-
} = useContext122(
|
|
54947
|
-
const propStatusesRef = useContext122(
|
|
54948
|
-
const sequencesRef = useContext122(
|
|
54949
|
-
const { overrideIdToNodePathMappings } = useContext122(
|
|
55075
|
+
} = useContext122(Internals102.VisualModeSettersContext);
|
|
55076
|
+
const propStatusesRef = useContext122(Internals102.VisualModePropStatusesRefContext);
|
|
55077
|
+
const sequencesRef = useContext122(Internals102.SequenceManagerRefContext);
|
|
55078
|
+
const { overrideIdToNodePathMappings } = useContext122(Internals102.OverrideIdsToNodePathsGettersContext);
|
|
54950
55079
|
const { previewServerState } = useContext122(StudioServerConnectionCtx);
|
|
54951
55080
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
54952
55081
|
const [dragging, setDragging] = useState101(false);
|
|
@@ -55014,7 +55143,7 @@ var useTimelineSequenceFromDrag = ({
|
|
|
55014
55143
|
redoLabel: dragState.targets.length > 1 ? "Move selected sequences back" : "Move sequence back"
|
|
55015
55144
|
});
|
|
55016
55145
|
savePromise.catch((err) => {
|
|
55017
|
-
|
|
55146
|
+
Internals102.Log.error({ logLevel: "error", tag: null }, "Could not save from", err);
|
|
55018
55147
|
}).finally(() => {
|
|
55019
55148
|
clearFromDragOverrides({
|
|
55020
55149
|
clearDragOverrides: latestClear,
|
|
@@ -55084,7 +55213,7 @@ var useTimelineSequenceFromDrag = ({
|
|
|
55084
55213
|
initialFrom: target.initialFrom,
|
|
55085
55214
|
deltaFrames
|
|
55086
55215
|
});
|
|
55087
|
-
latestRef.current.setDragOverrides(target.nodePath, "from",
|
|
55216
|
+
latestRef.current.setDragOverrides(target.nodePath, "from", Internals102.makeStaticDragOverride(nextFrom));
|
|
55088
55217
|
for (const keyframeTarget of target.sequenceKeyframes) {
|
|
55089
55218
|
latestRef.current.setDragOverrides(target.nodePath, keyframeTarget.fieldKey, {
|
|
55090
55219
|
type: "keyframed",
|
|
@@ -55139,10 +55268,10 @@ var useTimelineSequenceFromDrag = ({
|
|
|
55139
55268
|
};
|
|
55140
55269
|
};
|
|
55141
55270
|
var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
55142
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(
|
|
55143
|
-
const propStatusesRef = useContext122(
|
|
55144
|
-
const sequencesRef = useContext122(
|
|
55145
|
-
const { overrideIdToNodePathMappings } = useContext122(
|
|
55271
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(Internals102.VisualModeSettersContext);
|
|
55272
|
+
const propStatusesRef = useContext122(Internals102.VisualModePropStatusesRefContext);
|
|
55273
|
+
const sequencesRef = useContext122(Internals102.SequenceManagerRefContext);
|
|
55274
|
+
const { overrideIdToNodePathMappings } = useContext122(Internals102.OverrideIdsToNodePathsGettersContext);
|
|
55146
55275
|
const { previewServerState } = useContext122(StudioServerConnectionCtx);
|
|
55147
55276
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
55148
55277
|
const [dragging, setDragging] = useState101(false);
|
|
@@ -55197,7 +55326,7 @@ var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeline
|
|
|
55197
55326
|
redoLabel: changes.length > 1 ? "Resize selected sequences back" : "Resize sequence back"
|
|
55198
55327
|
});
|
|
55199
55328
|
savePromise.catch((err) => {
|
|
55200
|
-
|
|
55329
|
+
Internals102.Log.error({ logLevel: "error", tag: null }, "Could not save durationInFrames", err);
|
|
55201
55330
|
}).finally(() => {
|
|
55202
55331
|
clearDurationDragOverrides({
|
|
55203
55332
|
clearDragOverrides: latestClear,
|
|
@@ -55261,7 +55390,7 @@ var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeline
|
|
|
55261
55390
|
const deltaFrames = Math.round(dx / dragState.pxPerFrame);
|
|
55262
55391
|
dragState.latestDeltaFrames = deltaFrames;
|
|
55263
55392
|
for (const target of dragState.targets) {
|
|
55264
|
-
latestRef.current.setDragOverrides(target.nodePath, "durationInFrames",
|
|
55393
|
+
latestRef.current.setDragOverrides(target.nodePath, "durationInFrames", Internals102.makeStaticDragOverride(getTimelineSequenceDurationDragValue({
|
|
55265
55394
|
initialDuration: target.initialDuration,
|
|
55266
55395
|
deltaFrames
|
|
55267
55396
|
})));
|
|
@@ -55736,7 +55865,7 @@ var TimelineVideoInfo = ({
|
|
|
55736
55865
|
|
|
55737
55866
|
// src/components/Timeline/TimelineSequence.tsx
|
|
55738
55867
|
import { jsx as jsx295, jsxs as jsxs150 } from "react/jsx-runtime";
|
|
55739
|
-
var TimelineSequenceFn = ({ s, nodePathInfo, sequenceFrameOffset }) => {
|
|
55868
|
+
var TimelineSequenceFn = ({ s, connectedCompositions, nodePathInfo, sequenceFrameOffset }) => {
|
|
55740
55869
|
const windowWidth = useContext123(TimelineWidthContext);
|
|
55741
55870
|
if (windowWidth === null) {
|
|
55742
55871
|
return null;
|
|
@@ -55744,6 +55873,7 @@ var TimelineSequenceFn = ({ s, nodePathInfo, sequenceFrameOffset }) => {
|
|
|
55744
55873
|
return /* @__PURE__ */ jsx295(TimelineSequenceInner, {
|
|
55745
55874
|
windowWidth,
|
|
55746
55875
|
s,
|
|
55876
|
+
connectedCompositions,
|
|
55747
55877
|
nodePathInfo,
|
|
55748
55878
|
sequenceFrameOffset
|
|
55749
55879
|
});
|
|
@@ -55759,7 +55889,8 @@ var TimelineSequenceCurrentFrame = ({
|
|
|
55759
55889
|
sequenceFrameOffset,
|
|
55760
55890
|
fromCanUpdate,
|
|
55761
55891
|
frozenFrame,
|
|
55762
|
-
onMoveDragPointerDown
|
|
55892
|
+
onMoveDragPointerDown,
|
|
55893
|
+
onDoubleClick
|
|
55763
55894
|
}) => {
|
|
55764
55895
|
const ref2 = useRef70(null);
|
|
55765
55896
|
const { onSelect, selectable, selected, selectionItem } = useTimelineRowSelection(nodePathInfo);
|
|
@@ -55804,6 +55935,7 @@ var TimelineSequenceCurrentFrame = ({
|
|
|
55804
55935
|
style: actualStyle,
|
|
55805
55936
|
title: s.displayName,
|
|
55806
55937
|
onPointerDown: selectable ? onPointerDown : undefined,
|
|
55938
|
+
onDoubleClick,
|
|
55807
55939
|
children: [
|
|
55808
55940
|
premountWidth ? /* @__PURE__ */ jsx295("div", {
|
|
55809
55941
|
style: {
|
|
@@ -55852,8 +55984,14 @@ var TimelineSequenceCurrentFrame = ({
|
|
|
55852
55984
|
]
|
|
55853
55985
|
});
|
|
55854
55986
|
};
|
|
55855
|
-
var TimelineSequenceInner = ({
|
|
55856
|
-
|
|
55987
|
+
var TimelineSequenceInner = ({
|
|
55988
|
+
s,
|
|
55989
|
+
connectedCompositions,
|
|
55990
|
+
windowWidth,
|
|
55991
|
+
nodePathInfo,
|
|
55992
|
+
sequenceFrameOffset
|
|
55993
|
+
}) => {
|
|
55994
|
+
const video = Internals103.useVideo();
|
|
55857
55995
|
const maxMediaDuration = useMaxMediaDuration(s, video?.fps ?? 30);
|
|
55858
55996
|
const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
|
|
55859
55997
|
const originalLocation = useResolveStackAndReactToChange(s.getStack);
|
|
@@ -55867,10 +56005,10 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
|
|
|
55867
56005
|
column: originalLocation.column ?? 0
|
|
55868
56006
|
};
|
|
55869
56007
|
}, [originalLocation]);
|
|
55870
|
-
const { propStatuses } = useContext123(
|
|
56008
|
+
const { propStatuses } = useContext123(Internals103.VisualModePropStatusesContext);
|
|
55871
56009
|
const nodePath = nodePathInfo?.sequenceSubscriptionKey ?? null;
|
|
55872
56010
|
const propStatusesForOverride = useMemo182(() => {
|
|
55873
|
-
return nodePath ?
|
|
56011
|
+
return nodePath ? Internals103.getPropStatusesCtx(propStatuses, nodePath) : undefined;
|
|
55874
56012
|
}, [propStatuses, nodePath]);
|
|
55875
56013
|
const durationCanUpdate = Boolean(studioInteractivityEnabled && propStatusesForOverride?.durationInFrames?.status === "static");
|
|
55876
56014
|
const fromCanUpdate = Boolean(studioInteractivityEnabled && propStatusesForOverride?.from?.status === "static");
|
|
@@ -55878,9 +56016,10 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
|
|
|
55878
56016
|
const { previewServerState } = useContext123(StudioServerConnectionCtx);
|
|
55879
56017
|
const previewConnected = previewServerState.type === "connected";
|
|
55880
56018
|
const previewInteractive = previewConnected && studioInteractivityEnabled;
|
|
55881
|
-
const { setPropStatuses } = useContext123(
|
|
55882
|
-
const timelinePosition =
|
|
56019
|
+
const { setPropStatuses } = useContext123(Internals103.VisualModeSettersContext);
|
|
56020
|
+
const timelinePosition = Internals103.Timeline.useTimelinePosition();
|
|
55883
56021
|
const selectAsset = useSelectAsset();
|
|
56022
|
+
const selectComposition = useSelectComposition();
|
|
55884
56023
|
const confirm = useConfirmationDialog();
|
|
55885
56024
|
const { onSelect, selectable } = useTimelineRowSelection(nodePathInfo);
|
|
55886
56025
|
const fileLocation = useMemo182(() => formatFileLocation({
|
|
@@ -55896,6 +56035,39 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
|
|
|
55896
56035
|
showNotification(err.message, 2000);
|
|
55897
56036
|
});
|
|
55898
56037
|
}, [canOpenInEditor, originalLocation]);
|
|
56038
|
+
const onSequenceDoubleClick = useCallback170((e) => {
|
|
56039
|
+
if (isTimelineSelectionModifierEvent(e)) {
|
|
56040
|
+
e.stopPropagation();
|
|
56041
|
+
return;
|
|
56042
|
+
}
|
|
56043
|
+
const action2 = getSequenceDoubleClickAction({
|
|
56044
|
+
button: e.button,
|
|
56045
|
+
canOpenInEditor,
|
|
56046
|
+
numberOfConnectedCompositions: connectedCompositions.length
|
|
56047
|
+
});
|
|
56048
|
+
if (action2 === null) {
|
|
56049
|
+
return;
|
|
56050
|
+
}
|
|
56051
|
+
e.stopPropagation();
|
|
56052
|
+
if (action2 === "open-connected-composition") {
|
|
56053
|
+
selectComposition(connectedCompositions[0], true, getConnectedCompositionFrame({
|
|
56054
|
+
timelinePosition,
|
|
56055
|
+
sequence: s,
|
|
56056
|
+
sequenceFrameOffset
|
|
56057
|
+
}));
|
|
56058
|
+
return;
|
|
56059
|
+
}
|
|
56060
|
+
openInEditor2();
|
|
56061
|
+
}, [
|
|
56062
|
+
canOpenInEditor,
|
|
56063
|
+
connectedCompositions,
|
|
56064
|
+
openInEditor2,
|
|
56065
|
+
s,
|
|
56066
|
+
selectComposition,
|
|
56067
|
+
sequenceFrameOffset,
|
|
56068
|
+
timelinePosition
|
|
56069
|
+
]);
|
|
56070
|
+
const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
|
|
55899
56071
|
const canDeleteFromSource = Boolean(nodePath && validatedLocation?.source);
|
|
55900
56072
|
const deleteDisabled = !previewInteractive || !s.controls || !canDeleteFromSource;
|
|
55901
56073
|
const duplicateDisabled = deleteDisabled;
|
|
@@ -56075,6 +56247,7 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
|
|
|
56075
56247
|
fromCanUpdate,
|
|
56076
56248
|
frozenFrame,
|
|
56077
56249
|
onMoveDragPointerDown,
|
|
56250
|
+
onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined,
|
|
56078
56251
|
children: [
|
|
56079
56252
|
s.type === "audio" ? /* @__PURE__ */ jsx295(AudioWaveform, {
|
|
56080
56253
|
src: s.src,
|
|
@@ -56154,6 +56327,7 @@ var TimelineTrackUnmemoized = ({ track }) => {
|
|
|
56154
56327
|
}) : null,
|
|
56155
56328
|
/* @__PURE__ */ jsx296(TimelineSequence, {
|
|
56156
56329
|
s: track.sequence,
|
|
56330
|
+
connectedCompositions: track.connectedCompositions ?? [],
|
|
56157
56331
|
nodePathInfo: track.nodePathInfo,
|
|
56158
56332
|
sequenceFrameOffset: track.sequenceFrameOffset
|
|
56159
56333
|
})
|
|
@@ -56217,8 +56391,8 @@ var noop3 = () => {
|
|
|
56217
56391
|
return;
|
|
56218
56392
|
};
|
|
56219
56393
|
var TimelineContextMenuArea = ({ children }) => {
|
|
56220
|
-
const { compositions, canvasContent } = useContext125(
|
|
56221
|
-
const videoConfig =
|
|
56394
|
+
const { compositions, canvasContent } = useContext125(Internals104.CompositionManager);
|
|
56395
|
+
const videoConfig = Internals104.useUnsafeVideoConfig();
|
|
56222
56396
|
const [isAddingSolid, setIsAddingSolid] = useState103(false);
|
|
56223
56397
|
const [isAddingAsset, setIsAddingAsset] = useState103(false);
|
|
56224
56398
|
const { previewServerState } = useContext125(StudioServerConnectionCtx);
|
|
@@ -56280,6 +56454,7 @@ var TimelineContextMenuArea = ({ children }) => {
|
|
|
56280
56454
|
files,
|
|
56281
56455
|
compositionFile,
|
|
56282
56456
|
compositionId: currentCompositionId,
|
|
56457
|
+
destinationDimensions: null,
|
|
56283
56458
|
dropPosition: null
|
|
56284
56459
|
});
|
|
56285
56460
|
} finally {
|
|
@@ -56324,11 +56499,11 @@ var TimelineContextMenuArea = ({ children }) => {
|
|
|
56324
56499
|
});
|
|
56325
56500
|
};
|
|
56326
56501
|
var TimelineInner = () => {
|
|
56327
|
-
const { sequences } = useContext125(
|
|
56328
|
-
const { compositions } = useContext125(
|
|
56329
|
-
const videoConfig =
|
|
56502
|
+
const { sequences } = useContext125(Internals104.SequenceManager);
|
|
56503
|
+
const { compositions } = useContext125(Internals104.CompositionManager);
|
|
56504
|
+
const videoConfig = Internals104.useUnsafeVideoConfig();
|
|
56330
56505
|
const isStill = useIsStill();
|
|
56331
|
-
const { overrideIdToNodePathMappings } = useContext125(
|
|
56506
|
+
const { overrideIdToNodePathMappings } = useContext125(Internals104.OverrideIdsToNodePathsGettersContext);
|
|
56332
56507
|
const { previewServerState } = useContext125(StudioServerConnectionCtx);
|
|
56333
56508
|
const previewConnected = previewServerState.type === "connected";
|
|
56334
56509
|
const previewInteractive = previewConnected && studioInteractivityEnabled;
|
|
@@ -56476,7 +56651,7 @@ var StudioClearSelectionArea = ({ children }) => {
|
|
|
56476
56651
|
});
|
|
56477
56652
|
};
|
|
56478
56653
|
var EditorContent = ({ readOnlyStudio, children }) => {
|
|
56479
|
-
const { canvasContent } = useContext126(
|
|
56654
|
+
const { canvasContent } = useContext126(Internals105.CompositionManager);
|
|
56480
56655
|
const showTimeline = canvasContent !== null && canvasContent.type === "composition";
|
|
56481
56656
|
const content6 = /* @__PURE__ */ jsxs154(SplitterContainer, {
|
|
56482
56657
|
orientation: "horizontal",
|
|
@@ -57092,7 +57267,7 @@ import { useCallback as useCallback177, useContext as useContext132, useMemo as
|
|
|
57092
57267
|
|
|
57093
57268
|
// src/components/RenderModal/ResolveCompositionBeforeModal.tsx
|
|
57094
57269
|
import React219, { useContext as useContext130, useEffect as useEffect100, useMemo as useMemo187 } from "react";
|
|
57095
|
-
import { Internals as
|
|
57270
|
+
import { Internals as Internals106 } from "remotion";
|
|
57096
57271
|
import { jsx as jsx305, jsxs as jsxs158 } from "react/jsx-runtime";
|
|
57097
57272
|
var loaderContainer2 = {
|
|
57098
57273
|
paddingTop: 40,
|
|
@@ -57112,11 +57287,11 @@ var loaderLabel2 = {
|
|
|
57112
57287
|
};
|
|
57113
57288
|
var ResolvedCompositionContext = React219.createContext(null);
|
|
57114
57289
|
var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
|
|
57115
|
-
const resolved =
|
|
57116
|
-
const unresolvedContext = useContext130(
|
|
57290
|
+
const resolved = Internals106.useResolvedVideoConfig(compositionId);
|
|
57291
|
+
const unresolvedContext = useContext130(Internals106.CompositionManager);
|
|
57117
57292
|
const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
|
|
57118
57293
|
useEffect100(() => {
|
|
57119
|
-
const { current } =
|
|
57294
|
+
const { current } = Internals106.resolveCompositionsRef;
|
|
57120
57295
|
if (!current) {
|
|
57121
57296
|
throw new Error("No ref to trigger composition calc");
|
|
57122
57297
|
}
|
|
@@ -57576,7 +57751,7 @@ var DeleteFolder = ({ folderName, parentName, stack: stack2 }) => {
|
|
|
57576
57751
|
|
|
57577
57752
|
// src/components/NewComposition/DuplicateComposition.tsx
|
|
57578
57753
|
import { useCallback as useCallback180, useContext as useContext133, useMemo as useMemo191, useState as useState106 } from "react";
|
|
57579
|
-
import { Internals as
|
|
57754
|
+
import { Internals as Internals107 } from "remotion";
|
|
57580
57755
|
|
|
57581
57756
|
// src/components/NewComposition/InputAndValidationContainer.tsx
|
|
57582
57757
|
import { jsx as jsx310 } from "react/jsx-runtime";
|
|
@@ -57676,7 +57851,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
57676
57851
|
const hadFpsDefined = unresolved.fps !== undefined;
|
|
57677
57852
|
const hadDurationDefined = unresolved.durationInFrames !== undefined;
|
|
57678
57853
|
const [selectedFrameRate, setFrameRate] = useState106(resolved.result.fps);
|
|
57679
|
-
const { compositions } = useContext133(
|
|
57854
|
+
const { compositions } = useContext133(Internals107.CompositionManager);
|
|
57680
57855
|
const [type, setType] = useState106(initialCompType);
|
|
57681
57856
|
const [newId, setName] = useState106(() => {
|
|
57682
57857
|
const numberAtEnd = resolved.result.id.match(/([0-9]+)$/)?.[0];
|
|
@@ -58035,11 +58210,11 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
|
|
|
58035
58210
|
|
|
58036
58211
|
// src/components/NewComposition/NewComposition.tsx
|
|
58037
58212
|
import { useCallback as useCallback182, useContext as useContext135, useState as useState107 } from "react";
|
|
58038
|
-
import { Internals as
|
|
58213
|
+
import { Internals as Internals109 } from "remotion";
|
|
58039
58214
|
|
|
58040
58215
|
// src/helpers/use-create-composition.ts
|
|
58041
58216
|
import { useCallback as useCallback181, useContext as useContext134, useMemo as useMemo192 } from "react";
|
|
58042
|
-
import { Internals as
|
|
58217
|
+
import { Internals as Internals108 } from "remotion";
|
|
58043
58218
|
var toPascalCase = (value) => {
|
|
58044
58219
|
const words = value.match(/[a-zA-Z0-9]+/g) ?? [];
|
|
58045
58220
|
const candidate = words.map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1)}`).join("");
|
|
@@ -58083,7 +58258,7 @@ var useCreateComposition = ({
|
|
|
58083
58258
|
selectedFrameRate,
|
|
58084
58259
|
size: size3
|
|
58085
58260
|
}) => {
|
|
58086
|
-
const { setCanvasContent } = useContext134(
|
|
58261
|
+
const { setCanvasContent } = useContext134(Internals108.CompositionSetters);
|
|
58087
58262
|
const componentName = useMemo192(() => toPascalCase(newId), [newId]);
|
|
58088
58263
|
const nameValidationMessage = useMemo192(() => {
|
|
58089
58264
|
return validateCompositionName(newId, compositions);
|
|
@@ -58169,8 +58344,8 @@ var folderPathStyle = {
|
|
|
58169
58344
|
fontSize: 14
|
|
58170
58345
|
};
|
|
58171
58346
|
var NewCompositionLoaded = ({ folderName, parentName, stack: stack2 }) => {
|
|
58172
|
-
const { compositions } = useContext135(
|
|
58173
|
-
const resolvedComposition =
|
|
58347
|
+
const { compositions } = useContext135(Internals109.CompositionManager);
|
|
58348
|
+
const resolvedComposition = Internals109.useResolvedVideoConfig(null);
|
|
58174
58349
|
const initialComposition = resolvedComposition?.type === "success" || resolvedComposition?.type === "success-and-refreshing" ? resolvedComposition.result : null;
|
|
58175
58350
|
const initialDimensions = getNewCompositionDefaults(initialComposition);
|
|
58176
58351
|
const [newId, setName] = useState107(() => getUniqueCompositionName(compositions));
|
|
@@ -58468,17 +58643,17 @@ import {
|
|
|
58468
58643
|
useRef as useRef72,
|
|
58469
58644
|
useState as useState108
|
|
58470
58645
|
} from "react";
|
|
58471
|
-
import { Internals as
|
|
58646
|
+
import { Internals as Internals111 } from "remotion";
|
|
58472
58647
|
|
|
58473
58648
|
// src/helpers/validate-new-folder-name.ts
|
|
58474
|
-
import { Internals as
|
|
58649
|
+
import { Internals as Internals110 } from "remotion";
|
|
58475
58650
|
var validateNewFolderName = ({
|
|
58476
58651
|
folders,
|
|
58477
58652
|
newName,
|
|
58478
58653
|
parentName
|
|
58479
58654
|
}) => {
|
|
58480
|
-
if (!
|
|
58481
|
-
return
|
|
58655
|
+
if (!Internals110.isFolderNameValid(newName)) {
|
|
58656
|
+
return Internals110.invalidFolderNameErrorMessage;
|
|
58482
58657
|
}
|
|
58483
58658
|
if (folders.find((folder) => {
|
|
58484
58659
|
return folder.name === newName && folder.parent === parentName;
|
|
@@ -58512,7 +58687,7 @@ var getUniqueFolderName = ({
|
|
|
58512
58687
|
}
|
|
58513
58688
|
};
|
|
58514
58689
|
var NewFolder = ({ parentName, stack: stack2 }) => {
|
|
58515
|
-
const { folders } = useContext136(
|
|
58690
|
+
const { folders } = useContext136(Internals111.CompositionManager);
|
|
58516
58691
|
const [newName, setName] = useState108(() => getUniqueFolderName({ folders, parentName }));
|
|
58517
58692
|
const inputRef = useRef72(null);
|
|
58518
58693
|
useEffect102(() => {
|
|
@@ -58640,7 +58815,7 @@ import {
|
|
|
58640
58815
|
useRef as useRef73,
|
|
58641
58816
|
useState as useState109
|
|
58642
58817
|
} from "react";
|
|
58643
|
-
import { Internals as
|
|
58818
|
+
import { Internals as Internals112 } from "remotion";
|
|
58644
58819
|
import { jsx as jsx315, jsxs as jsxs167, Fragment as Fragment57 } from "react/jsx-runtime";
|
|
58645
58820
|
var content12 = {
|
|
58646
58821
|
padding: 12,
|
|
@@ -58656,7 +58831,7 @@ var RenameCompositionLoaded = () => {
|
|
|
58656
58831
|
}
|
|
58657
58832
|
const { resolved, unresolved } = context;
|
|
58658
58833
|
const compositionStack = unresolved.stack ?? null;
|
|
58659
|
-
const { compositions } = useContext137(
|
|
58834
|
+
const { compositions } = useContext137(Internals112.CompositionManager);
|
|
58660
58835
|
const [newId, setName] = useState109(() => {
|
|
58661
58836
|
return resolved.result.id;
|
|
58662
58837
|
});
|
|
@@ -58774,7 +58949,7 @@ import {
|
|
|
58774
58949
|
useRef as useRef74,
|
|
58775
58950
|
useState as useState110
|
|
58776
58951
|
} from "react";
|
|
58777
|
-
import { Internals as
|
|
58952
|
+
import { Internals as Internals113 } from "remotion";
|
|
58778
58953
|
|
|
58779
58954
|
// src/helpers/validate-folder-rename.ts
|
|
58780
58955
|
var validateFolderRename = ({
|
|
@@ -58799,7 +58974,7 @@ var content13 = {
|
|
|
58799
58974
|
minWidth: 500
|
|
58800
58975
|
};
|
|
58801
58976
|
var RenameFolder = ({ folderName, parentName, stack: stack2 }) => {
|
|
58802
|
-
const { folders } = useContext138(
|
|
58977
|
+
const { folders } = useContext138(Internals113.CompositionManager);
|
|
58803
58978
|
const [newName, setName] = useState110(folderName);
|
|
58804
58979
|
const inputRef = useRef74(null);
|
|
58805
58980
|
useEffect104(() => {
|
|
@@ -59051,7 +59226,7 @@ var RenameStaticFileModal = ({ relativePath }) => {
|
|
|
59051
59226
|
|
|
59052
59227
|
// src/components/OverrideInputProps.tsx
|
|
59053
59228
|
import { useCallback as useCallback187, useContext as useContext140, useMemo as useMemo196, useState as useState112 } from "react";
|
|
59054
|
-
import { Internals as
|
|
59229
|
+
import { Internals as Internals114 } from "remotion";
|
|
59055
59230
|
import { jsx as jsx318, jsxs as jsxs170 } from "react/jsx-runtime";
|
|
59056
59231
|
var style10 = {
|
|
59057
59232
|
padding: 12,
|
|
@@ -59087,7 +59262,7 @@ var isValidJSON = (value) => {
|
|
|
59087
59262
|
};
|
|
59088
59263
|
var Inner = () => {
|
|
59089
59264
|
const [value, setValue] = useState112(() => {
|
|
59090
|
-
const override =
|
|
59265
|
+
const override = Internals114.getInputPropsOverride();
|
|
59091
59266
|
if (override) {
|
|
59092
59267
|
return JSON.stringify(override, null, 2);
|
|
59093
59268
|
}
|
|
@@ -59102,14 +59277,14 @@ var Inner = () => {
|
|
|
59102
59277
|
const onChange = useCallback187((newValue) => {
|
|
59103
59278
|
if (newValue.trim() === "") {
|
|
59104
59279
|
setValue(null);
|
|
59105
|
-
|
|
59280
|
+
Internals114.setInputPropsOverride(null);
|
|
59106
59281
|
return;
|
|
59107
59282
|
}
|
|
59108
59283
|
setValue(newValue);
|
|
59109
59284
|
if (!isValidJSON(newValue)) {
|
|
59110
59285
|
return;
|
|
59111
59286
|
}
|
|
59112
|
-
|
|
59287
|
+
Internals114.setInputPropsOverride(JSON.parse(newValue));
|
|
59113
59288
|
}, [setValue]);
|
|
59114
59289
|
const onReset = useCallback187(() => {
|
|
59115
59290
|
onChange("");
|
|
@@ -59180,7 +59355,7 @@ import {
|
|
|
59180
59355
|
useRef as useRef77,
|
|
59181
59356
|
useState as useState114
|
|
59182
59357
|
} from "react";
|
|
59183
|
-
import { Internals as
|
|
59358
|
+
import { Internals as Internals115 } from "remotion";
|
|
59184
59359
|
|
|
59185
59360
|
// src/icons/keys.tsx
|
|
59186
59361
|
import { jsx as jsx319 } from "react/jsx-runtime";
|
|
@@ -60533,7 +60708,7 @@ var mapModeToQuery = (mode) => {
|
|
|
60533
60708
|
throw new Error("no mode" + mode);
|
|
60534
60709
|
};
|
|
60535
60710
|
var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
|
|
60536
|
-
const { compositions } = useContext141(
|
|
60711
|
+
const { compositions } = useContext141(Internals115.CompositionManager);
|
|
60537
60712
|
const [state, setState] = useState114(() => {
|
|
60538
60713
|
return {
|
|
60539
60714
|
query: mapModeToQuery(initialMode),
|
|
@@ -60581,7 +60756,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
60581
60756
|
selectComposition(c, true);
|
|
60582
60757
|
setSelectedModal(null);
|
|
60583
60758
|
const selector = `.__remotion-composition[data-compname="${c.id}"]`;
|
|
60584
|
-
|
|
60759
|
+
Internals115.compositionSelectorRef.current?.expandComposition(c.id);
|
|
60585
60760
|
waitForElm(selector).then(() => {
|
|
60586
60761
|
document.querySelector(selector)?.scrollIntoView({ block: "center" });
|
|
60587
60762
|
});
|
|
@@ -68443,7 +68618,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
68443
68618
|
|
|
68444
68619
|
// src/components/SequencePropsSubscriptionProvider.tsx
|
|
68445
68620
|
import { useState as useState127, useCallback as useCallback216, useMemo as useMemo218 } from "react";
|
|
68446
|
-
import { Internals as
|
|
68621
|
+
import { Internals as Internals116 } from "remotion";
|
|
68447
68622
|
import { jsx as jsx375 } from "react/jsx-runtime";
|
|
68448
68623
|
var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
68449
68624
|
const [overrideToNodePathMap, setOverrideIdToNodePathMap] = useState127({});
|
|
@@ -68462,9 +68637,9 @@ var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
|
68462
68637
|
const setters = useMemo218(() => {
|
|
68463
68638
|
return { setOverrideIdToNodePath };
|
|
68464
68639
|
}, [setOverrideIdToNodePath]);
|
|
68465
|
-
return /* @__PURE__ */ jsx375(
|
|
68640
|
+
return /* @__PURE__ */ jsx375(Internals116.OverrideIdsToNodePathsGettersContext.Provider, {
|
|
68466
68641
|
value: getters,
|
|
68467
|
-
children: /* @__PURE__ */ jsx375(
|
|
68642
|
+
children: /* @__PURE__ */ jsx375(Internals116.OverrideIdsToNodePathsSettersContext.Provider, {
|
|
68468
68643
|
value: setters,
|
|
68469
68644
|
children
|
|
68470
68645
|
})
|
|
@@ -68563,7 +68738,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
68563
68738
|
children: /* @__PURE__ */ jsx377(TimelineZoomContext, {
|
|
68564
68739
|
children: /* @__PURE__ */ jsxs208(SequencePropsSubscriptionProvider, {
|
|
68565
68740
|
children: [
|
|
68566
|
-
/* @__PURE__ */ jsxs208(
|
|
68741
|
+
/* @__PURE__ */ jsxs208(Internals117.CurrentScaleContext.Provider, {
|
|
68567
68742
|
value,
|
|
68568
68743
|
children: [
|
|
68569
68744
|
/* @__PURE__ */ jsx377(ForceSpecificCursor, {}),
|
|
@@ -68571,11 +68746,11 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
68571
68746
|
children: /* @__PURE__ */ jsxs208("div", {
|
|
68572
68747
|
style: background,
|
|
68573
68748
|
children: [
|
|
68574
|
-
/* @__PURE__ */ jsx377(
|
|
68749
|
+
/* @__PURE__ */ jsx377(Internals117.CompositionRenderErrorContext.Provider, {
|
|
68575
68750
|
value: compositionRenderErrorContextValue,
|
|
68576
68751
|
children: canvasMounted ? /* @__PURE__ */ jsx377(MemoRoot, {}) : null
|
|
68577
68752
|
}),
|
|
68578
|
-
/* @__PURE__ */ jsx377(
|
|
68753
|
+
/* @__PURE__ */ jsx377(Internals117.CanUseRemotionHooksProvider, {
|
|
68579
68754
|
children: /* @__PURE__ */ jsx377(RenderErrorContext.Provider, {
|
|
68580
68755
|
value: renderErrorContextValue,
|
|
68581
68756
|
children: /* @__PURE__ */ jsx377(EditorContent, {
|
|
@@ -68613,7 +68788,7 @@ import { PlayerInternals as PlayerInternals24 } from "@remotion/player";
|
|
|
68613
68788
|
|
|
68614
68789
|
// src/state/preview-size.tsx
|
|
68615
68790
|
import { useCallback as useCallback218, useContext as useContext147, useMemo as useMemo221, useState as useState129 } from "react";
|
|
68616
|
-
import { Internals as
|
|
68791
|
+
import { Internals as Internals118 } from "remotion";
|
|
68617
68792
|
import { jsx as jsx378 } from "react/jsx-runtime";
|
|
68618
68793
|
var key7 = "remotion.previewSize";
|
|
68619
68794
|
var persistPreviewSizeOption = (option) => {
|
|
@@ -68662,7 +68837,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
68662
68837
|
setTranslation
|
|
68663
68838
|
};
|
|
68664
68839
|
}, [editorZoomGestures, size3, setSize, translation]);
|
|
68665
|
-
return /* @__PURE__ */ jsx378(
|
|
68840
|
+
return /* @__PURE__ */ jsx378(Internals118.PreviewSizeContext.Provider, {
|
|
68666
68841
|
value: previewSizeCtx,
|
|
68667
68842
|
children
|
|
68668
68843
|
});
|
|
@@ -68694,7 +68869,7 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
68694
68869
|
|
|
68695
68870
|
// src/components/MediaVolumeProvider.tsx
|
|
68696
68871
|
import { useMemo as useMemo223, useState as useState131 } from "react";
|
|
68697
|
-
import { Internals as
|
|
68872
|
+
import { Internals as Internals119 } from "remotion";
|
|
68698
68873
|
import { jsx as jsx380 } from "react/jsx-runtime";
|
|
68699
68874
|
var MediaVolumeProvider = ({ children }) => {
|
|
68700
68875
|
const [playerMuted, setPlayerMuted] = useState131(() => loadMuteOption());
|
|
@@ -68711,9 +68886,9 @@ var MediaVolumeProvider = ({ children }) => {
|
|
|
68711
68886
|
setMediaVolume
|
|
68712
68887
|
};
|
|
68713
68888
|
}, []);
|
|
68714
|
-
return /* @__PURE__ */ jsx380(
|
|
68889
|
+
return /* @__PURE__ */ jsx380(Internals119.MediaVolumeContext.Provider, {
|
|
68715
68890
|
value: mediaVolumeContextValue,
|
|
68716
|
-
children: /* @__PURE__ */ jsx380(
|
|
68891
|
+
children: /* @__PURE__ */ jsx380(Internals119.SetMediaVolumeContext.Provider, {
|
|
68717
68892
|
value: setMediaVolumeContextValue,
|
|
68718
68893
|
children
|
|
68719
68894
|
})
|
|
@@ -69088,7 +69263,7 @@ var FastRefreshProvider = ({ children }) => {
|
|
|
69088
69263
|
};
|
|
69089
69264
|
|
|
69090
69265
|
// src/helpers/inject-css.ts
|
|
69091
|
-
import { Internals as
|
|
69266
|
+
import { Internals as Internals120 } from "remotion";
|
|
69092
69267
|
var makeDefaultGlobalCSS = () => {
|
|
69093
69268
|
const unhoveredDragAreaFactor = 2;
|
|
69094
69269
|
const fromMiddle = 50 / unhoveredDragAreaFactor;
|
|
@@ -69099,12 +69274,10 @@ var makeDefaultGlobalCSS = () => {
|
|
|
69099
69274
|
--remotion-cli-internals-blue: ${BLUE};
|
|
69100
69275
|
--remotion-cli-internals-blue-hovered: ${BLUE_HOVERED};
|
|
69101
69276
|
overscroll-behavior-y: none;
|
|
69102
|
-
overscroll-behavior-x: none;
|
|
69103
69277
|
}
|
|
69104
69278
|
|
|
69105
69279
|
body {
|
|
69106
69280
|
overscroll-behavior-y: none;
|
|
69107
|
-
overscroll-behavior-x: none;
|
|
69108
69281
|
/* Override Chakra UI position: relative on body */
|
|
69109
69282
|
position: static !important;
|
|
69110
69283
|
}
|
|
@@ -69243,7 +69416,7 @@ var injectCSS = () => {
|
|
|
69243
69416
|
if (injected) {
|
|
69244
69417
|
return;
|
|
69245
69418
|
}
|
|
69246
|
-
|
|
69419
|
+
Internals120.CSSUtils.injectCSS(makeDefaultGlobalCSS());
|
|
69247
69420
|
injected = true;
|
|
69248
69421
|
};
|
|
69249
69422
|
|
|
@@ -69256,19 +69429,19 @@ import {
|
|
|
69256
69429
|
useMemo as useMemo232,
|
|
69257
69430
|
useState as useState140
|
|
69258
69431
|
} from "react";
|
|
69259
|
-
import { getInputProps as getInputProps2, Internals as
|
|
69432
|
+
import { getInputProps as getInputProps2, Internals as Internals121 } from "remotion";
|
|
69260
69433
|
import { jsx as jsx391 } from "react/jsx-runtime";
|
|
69261
69434
|
var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
69262
69435
|
const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState140(null);
|
|
69263
|
-
const { compositions, canvasContent, currentCompositionMetadata } = useContext150(
|
|
69436
|
+
const { compositions, canvasContent, currentCompositionMetadata } = useContext150(Internals121.CompositionManager);
|
|
69264
69437
|
const { fastRefreshes, manualRefreshes } = useContext150(FastRefreshContext);
|
|
69265
69438
|
if (manualRefreshes) {}
|
|
69266
69439
|
const selectedComposition = useMemo232(() => {
|
|
69267
69440
|
return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
|
|
69268
69441
|
}, [canvasContent, compositions]);
|
|
69269
69442
|
const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
|
|
69270
|
-
const { props: allEditorProps } = useContext150(
|
|
69271
|
-
const env =
|
|
69443
|
+
const { props: allEditorProps } = useContext150(Internals121.EditorPropsContext);
|
|
69444
|
+
const env = Internals121.getRemotionEnvironment();
|
|
69272
69445
|
const inputProps = useMemo232(() => {
|
|
69273
69446
|
return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
|
|
69274
69447
|
}, [env.isPlayer]);
|
|
@@ -69295,7 +69468,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
69295
69468
|
return controller;
|
|
69296
69469
|
}
|
|
69297
69470
|
const { signal } = controller;
|
|
69298
|
-
const result =
|
|
69471
|
+
const result = Internals121.resolveVideoConfigWithMetadataOrCatch({
|
|
69299
69472
|
compositionId,
|
|
69300
69473
|
calculateMetadata,
|
|
69301
69474
|
inputProps: combinedProps,
|
|
@@ -69389,7 +69562,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
69389
69562
|
...inputProps ?? {}
|
|
69390
69563
|
};
|
|
69391
69564
|
const controller = new AbortController;
|
|
69392
|
-
const result =
|
|
69565
|
+
const result = Internals121.resolveVideoConfigWithMetadataOrCatch({
|
|
69393
69566
|
compositionId: composition.id,
|
|
69394
69567
|
calculateMetadata: composition.calculateMetadata,
|
|
69395
69568
|
inputProps: combinedProps,
|
|
@@ -69414,7 +69587,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
69414
69587
|
}));
|
|
69415
69588
|
return resolved.videoConfig;
|
|
69416
69589
|
}, [allEditorProps, compositions, inputProps]);
|
|
69417
|
-
useImperativeHandle14(
|
|
69590
|
+
useImperativeHandle14(Internals121.resolveCompositionsRef, () => {
|
|
69418
69591
|
return {
|
|
69419
69592
|
setCurrentRenderModalComposition: (id) => {
|
|
69420
69593
|
setCurrentRenderModalComposition(id);
|
|
@@ -69556,7 +69729,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
69556
69729
|
}, {})
|
|
69557
69730
|
};
|
|
69558
69731
|
}, [compositions, resolvedConfigs]);
|
|
69559
|
-
return /* @__PURE__ */ jsx391(
|
|
69732
|
+
return /* @__PURE__ */ jsx391(Internals121.ResolveCompositionContext.Provider, {
|
|
69560
69733
|
value: resolvedConfigsIncludingStaticOnes,
|
|
69561
69734
|
children
|
|
69562
69735
|
});
|
|
@@ -69568,12 +69741,12 @@ var getServerDisconnectedDomElement = () => {
|
|
|
69568
69741
|
return document.getElementById("server-disconnected-overlay");
|
|
69569
69742
|
};
|
|
69570
69743
|
var StudioInner = ({ rootComponent, readOnly }) => {
|
|
69571
|
-
return /* @__PURE__ */ jsx392(
|
|
69744
|
+
return /* @__PURE__ */ jsx392(Internals122.CompositionManagerProvider, {
|
|
69572
69745
|
onlyRenderComposition: null,
|
|
69573
69746
|
currentCompositionMetadata: null,
|
|
69574
69747
|
initialCompositions: [],
|
|
69575
69748
|
initialCanvasContent: null,
|
|
69576
|
-
children: /* @__PURE__ */ jsx392(
|
|
69749
|
+
children: /* @__PURE__ */ jsx392(Internals122.RemotionRootContexts, {
|
|
69577
69750
|
frameState: null,
|
|
69578
69751
|
audioEnabled: window.remotion_audioEnabled,
|
|
69579
69752
|
videoEnabled: window.remotion_videoEnabled,
|
|
@@ -69612,7 +69785,7 @@ var Studio = ({ rootComponent, readOnly }) => {
|
|
|
69612
69785
|
|
|
69613
69786
|
// src/previewEntry.tsx
|
|
69614
69787
|
import { jsx as jsx393 } from "react/jsx-runtime";
|
|
69615
|
-
|
|
69788
|
+
Internals123.CSSUtils.injectCSS(Internals123.CSSUtils.makeDefaultPreviewCSS(null, BACKGROUND_HEX));
|
|
69616
69789
|
if (!window.__remotionOverlayStarted) {
|
|
69617
69790
|
window.__remotionOverlayStarted = true;
|
|
69618
69791
|
try {
|
|
@@ -69627,7 +69800,7 @@ var getRootForElement = () => {
|
|
|
69627
69800
|
if (root) {
|
|
69628
69801
|
return root;
|
|
69629
69802
|
}
|
|
69630
|
-
root = ReactDOM12.createRoot(
|
|
69803
|
+
root = ReactDOM12.createRoot(Internals123.getPreviewDomElement());
|
|
69631
69804
|
return root;
|
|
69632
69805
|
};
|
|
69633
69806
|
var renderToDOM = (content16) => {
|
|
@@ -69635,13 +69808,13 @@ var renderToDOM = (content16) => {
|
|
|
69635
69808
|
if (NoReactInternals32.ENABLE_V5_BREAKING_CHANGES) {
|
|
69636
69809
|
throw new Error("Remotion 5.0 does only support React 18+. However, ReactDOM.createRoot() is undefined.");
|
|
69637
69810
|
}
|
|
69638
|
-
ReactDOM12.render(content16,
|
|
69811
|
+
ReactDOM12.render(content16, Internals123.getPreviewDomElement());
|
|
69639
69812
|
return;
|
|
69640
69813
|
}
|
|
69641
69814
|
getRootForElement().render(content16);
|
|
69642
69815
|
};
|
|
69643
69816
|
renderToDOM(/* @__PURE__ */ jsx393(NoRegisterRoot, {}));
|
|
69644
|
-
|
|
69817
|
+
Internals123.waitForRoot((NewRoot) => {
|
|
69645
69818
|
renderToDOM(/* @__PURE__ */ jsx393(Studio, {
|
|
69646
69819
|
readOnly: false,
|
|
69647
69820
|
rootComponent: NewRoot
|