@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
package/dist/esm/internals.mjs
CHANGED
|
@@ -25,12 +25,12 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
25
25
|
// src/Studio.tsx
|
|
26
26
|
import { useLayoutEffect as useLayoutEffect7 } from "react";
|
|
27
27
|
import { createPortal } from "react-dom";
|
|
28
|
-
import { Internals as
|
|
28
|
+
import { Internals as Internals122 } from "remotion";
|
|
29
29
|
|
|
30
30
|
// src/components/Editor.tsx
|
|
31
31
|
import { PlayerInternals as PlayerInternals23 } from "@remotion/player";
|
|
32
32
|
import React256, { useCallback as useCallback217, useMemo as useMemo220, useState as useState127 } from "react";
|
|
33
|
-
import { Internals as
|
|
33
|
+
import { Internals as Internals117 } from "remotion";
|
|
34
34
|
|
|
35
35
|
// src/helpers/colors.ts
|
|
36
36
|
var BLACK = "black";
|
|
@@ -1264,11 +1264,11 @@ var CANVAS_CAPTURE_ENABLED = false;
|
|
|
1264
1264
|
|
|
1265
1265
|
// src/components/EditorContent.tsx
|
|
1266
1266
|
import { useCallback as useCallback172, useContext as useContext126 } from "react";
|
|
1267
|
-
import { Internals as
|
|
1267
|
+
import { Internals as Internals105 } from "remotion";
|
|
1268
1268
|
|
|
1269
1269
|
// src/components/GlobalKeybindings.tsx
|
|
1270
1270
|
import { useCallback as useCallback27, useContext as useContext19, useEffect as useEffect21, useMemo as useMemo29 } from "react";
|
|
1271
|
-
import { Internals as
|
|
1271
|
+
import { Internals as Internals22 } from "remotion";
|
|
1272
1272
|
|
|
1273
1273
|
// src/helpers/calculate-timeline.ts
|
|
1274
1274
|
import { stringifySequenceSubscriptionKey } from "@remotion/studio-shared";
|
|
@@ -5875,13 +5875,17 @@ var useStaticFiles = () => {
|
|
|
5875
5875
|
var useSelectComposition = () => {
|
|
5876
5876
|
const { setCompositionFoldersExpanded } = useContext13(FolderContext);
|
|
5877
5877
|
const { setCanvasContent } = useContext13(Internals9.CompositionSetters);
|
|
5878
|
+
const setFrame = Internals9.useTimelineSetFrame();
|
|
5878
5879
|
const isMobileLayout = useMobileLayout();
|
|
5879
5880
|
const { setSidebarCollapsedState } = useContext13(SidebarContext);
|
|
5880
|
-
return useCallback22((c, push) => {
|
|
5881
|
+
return useCallback22((c, push, frame = null) => {
|
|
5881
5882
|
if (push) {
|
|
5882
5883
|
pushUrl(`/${c.id}`);
|
|
5883
5884
|
}
|
|
5884
5885
|
explorerSidebarTabs.current?.selectCompositionPanel();
|
|
5886
|
+
if (frame !== null) {
|
|
5887
|
+
setFrame((current) => ({ ...current, [c.id]: frame }));
|
|
5888
|
+
}
|
|
5885
5889
|
setCanvasContent({ type: "composition", compositionId: c.id });
|
|
5886
5890
|
const { folderName, parentFolderName } = c;
|
|
5887
5891
|
if (folderName !== null) {
|
|
@@ -5904,6 +5908,7 @@ var useSelectComposition = () => {
|
|
|
5904
5908
|
isMobileLayout,
|
|
5905
5909
|
setCanvasContent,
|
|
5906
5910
|
setCompositionFoldersExpanded,
|
|
5911
|
+
setFrame,
|
|
5907
5912
|
setSidebarCollapsedState
|
|
5908
5913
|
]);
|
|
5909
5914
|
};
|
|
@@ -6330,7 +6335,7 @@ import {
|
|
|
6330
6335
|
useState as useState21
|
|
6331
6336
|
} from "react";
|
|
6332
6337
|
import {
|
|
6333
|
-
Internals as
|
|
6338
|
+
Internals as Internals21
|
|
6334
6339
|
} from "remotion";
|
|
6335
6340
|
|
|
6336
6341
|
// src/helpers/interactivity-enabled.ts
|
|
@@ -6680,7 +6685,7 @@ import {
|
|
|
6680
6685
|
} from "@remotion/studio-shared";
|
|
6681
6686
|
import { useContext as useContext16, useEffect as useEffect18, useRef as useRef15 } from "react";
|
|
6682
6687
|
import {
|
|
6683
|
-
Internals as
|
|
6688
|
+
Internals as Internals17
|
|
6684
6689
|
} from "remotion";
|
|
6685
6690
|
|
|
6686
6691
|
// src/components/ConfirmationDialog.tsx
|
|
@@ -7243,7 +7248,8 @@ var callDeleteKeyframes = ({
|
|
|
7243
7248
|
previous: prev,
|
|
7244
7249
|
keyframes: keyframes.map((keyframe) => ({
|
|
7245
7250
|
fieldKey: keyframe.fieldKey,
|
|
7246
|
-
frame: keyframe.sourceFrame
|
|
7251
|
+
frame: keyframe.sourceFrame,
|
|
7252
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
7247
7253
|
}))
|
|
7248
7254
|
}));
|
|
7249
7255
|
}
|
|
@@ -7257,7 +7263,8 @@ var callDeleteKeyframes = ({
|
|
|
7257
7263
|
keyframes: keyframes.map((keyframe) => ({
|
|
7258
7264
|
effectIndex: keyframe.effectIndex,
|
|
7259
7265
|
fieldKey: keyframe.fieldKey,
|
|
7260
|
-
frame: keyframe.sourceFrame
|
|
7266
|
+
frame: keyframe.sourceFrame,
|
|
7267
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
7261
7268
|
}))
|
|
7262
7269
|
}));
|
|
7263
7270
|
}
|
|
@@ -7267,7 +7274,8 @@ var callDeleteKeyframes = ({
|
|
|
7267
7274
|
nodePath: keyframe.nodePath,
|
|
7268
7275
|
key: keyframe.fieldKey,
|
|
7269
7276
|
frame: keyframe.sourceFrame,
|
|
7270
|
-
schema: keyframe.schema
|
|
7277
|
+
schema: keyframe.schema,
|
|
7278
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
7271
7279
|
})),
|
|
7272
7280
|
effectKeyframes: effectKeyframes.map((keyframe) => ({
|
|
7273
7281
|
fileName: keyframe.fileName,
|
|
@@ -7275,7 +7283,8 @@ var callDeleteKeyframes = ({
|
|
|
7275
7283
|
effectIndex: keyframe.effectIndex,
|
|
7276
7284
|
key: keyframe.fieldKey,
|
|
7277
7285
|
frame: keyframe.sourceFrame,
|
|
7278
|
-
schema: keyframe.schema
|
|
7286
|
+
schema: keyframe.schema,
|
|
7287
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
7279
7288
|
})),
|
|
7280
7289
|
clientId
|
|
7281
7290
|
}).then(() => {
|
|
@@ -7350,7 +7359,10 @@ var callUpdateEffectKeyframeSettings = ({
|
|
|
7350
7359
|
};
|
|
7351
7360
|
|
|
7352
7361
|
// src/components/Timeline/delete-selected-timeline-item.ts
|
|
7353
|
-
import { Internals as
|
|
7362
|
+
import { Internals as Internals15 } from "remotion";
|
|
7363
|
+
|
|
7364
|
+
// src/components/Timeline/delete-selected-keyframe.ts
|
|
7365
|
+
import { Internals as Internals13 } from "remotion";
|
|
7354
7366
|
|
|
7355
7367
|
// src/components/Timeline/find-track-for-node-path-info.ts
|
|
7356
7368
|
import { stringifySequenceExpandedRowKey as stringifySequenceExpandedRowKey3 } from "@remotion/studio-shared";
|
|
@@ -7386,11 +7398,26 @@ var parseKeyframeFieldFromNodePath = (auxiliaryKeys) => {
|
|
|
7386
7398
|
};
|
|
7387
7399
|
|
|
7388
7400
|
// src/components/Timeline/delete-selected-keyframe.ts
|
|
7401
|
+
var getValueWhenLastKeyframeDeleted = ({
|
|
7402
|
+
propStatus,
|
|
7403
|
+
playheadSourceFrame
|
|
7404
|
+
}) => {
|
|
7405
|
+
if (propStatus?.status !== "keyframed" || playheadSourceFrame === null) {
|
|
7406
|
+
return null;
|
|
7407
|
+
}
|
|
7408
|
+
return Internals13.interpolateKeyframedStatus({
|
|
7409
|
+
forceSpringAllowTail: null,
|
|
7410
|
+
frame: playheadSourceFrame,
|
|
7411
|
+
status: propStatus
|
|
7412
|
+
}) ?? null;
|
|
7413
|
+
};
|
|
7389
7414
|
var getSelectedKeyframeDeletion = ({
|
|
7390
7415
|
nodePathInfo,
|
|
7391
7416
|
frame,
|
|
7392
7417
|
sequences,
|
|
7393
|
-
overrideIdsToNodePaths
|
|
7418
|
+
overrideIdsToNodePaths,
|
|
7419
|
+
propStatuses,
|
|
7420
|
+
timelinePosition
|
|
7394
7421
|
}) => {
|
|
7395
7422
|
const field = parseKeyframeFieldFromNodePath(nodePathInfo.auxiliaryKeys);
|
|
7396
7423
|
if (field === null) {
|
|
@@ -7406,6 +7433,7 @@ var getSelectedKeyframeDeletion = ({
|
|
|
7406
7433
|
return null;
|
|
7407
7434
|
}
|
|
7408
7435
|
const sourceFrame = frame - (track?.keyframeDisplayOffset ?? 0);
|
|
7436
|
+
const playheadSourceFrame = timelinePosition === null ? null : timelinePosition - (track?.keyframeDisplayOffset ?? 0);
|
|
7409
7437
|
const nodePath = nodePathInfo.sequenceSubscriptionKey;
|
|
7410
7438
|
const fileName = nodePath.absolutePath;
|
|
7411
7439
|
if (field.type === "effect") {
|
|
@@ -7413,6 +7441,16 @@ var getSelectedKeyframeDeletion = ({
|
|
|
7413
7441
|
if (!effect) {
|
|
7414
7442
|
return null;
|
|
7415
7443
|
}
|
|
7444
|
+
const effectStatus = propStatuses !== null ? Internals13.getEffectPropStatusesCtx({
|
|
7445
|
+
propStatuses,
|
|
7446
|
+
nodePath,
|
|
7447
|
+
effectIndex: field.effectIndex
|
|
7448
|
+
}) : null;
|
|
7449
|
+
const effectPropStatus = effectStatus?.type === "can-update-effect" ? effectStatus.props[field.fieldKey] : null;
|
|
7450
|
+
const effectValueWhenLastKeyframeDeleted = getValueWhenLastKeyframeDeleted({
|
|
7451
|
+
propStatus: effectPropStatus,
|
|
7452
|
+
playheadSourceFrame
|
|
7453
|
+
});
|
|
7416
7454
|
return {
|
|
7417
7455
|
type: "effect",
|
|
7418
7456
|
fileName,
|
|
@@ -7420,16 +7458,23 @@ var getSelectedKeyframeDeletion = ({
|
|
|
7420
7458
|
effectIndex: field.effectIndex,
|
|
7421
7459
|
fieldKey: field.fieldKey,
|
|
7422
7460
|
sourceFrame,
|
|
7423
|
-
schema: effect.schema
|
|
7461
|
+
schema: effect.schema,
|
|
7462
|
+
valueWhenLastKeyframeDeleted: effectValueWhenLastKeyframeDeleted
|
|
7424
7463
|
};
|
|
7425
7464
|
}
|
|
7465
|
+
const sequencePropStatus = propStatuses !== null ? Internals13.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey] : null;
|
|
7466
|
+
const sequenceValueWhenLastKeyframeDeleted = getValueWhenLastKeyframeDeleted({
|
|
7467
|
+
propStatus: sequencePropStatus,
|
|
7468
|
+
playheadSourceFrame
|
|
7469
|
+
});
|
|
7426
7470
|
return {
|
|
7427
7471
|
type: "sequence",
|
|
7428
7472
|
fileName,
|
|
7429
7473
|
nodePath,
|
|
7430
7474
|
fieldKey: field.fieldKey,
|
|
7431
7475
|
sourceFrame,
|
|
7432
|
-
schema: sequence.controls.schema
|
|
7476
|
+
schema: sequence.controls.schema,
|
|
7477
|
+
valueWhenLastKeyframeDeleted: sequenceValueWhenLastKeyframeDeleted
|
|
7433
7478
|
};
|
|
7434
7479
|
};
|
|
7435
7480
|
var deleteSelectedKeyframes = ({
|
|
@@ -7437,13 +7482,17 @@ var deleteSelectedKeyframes = ({
|
|
|
7437
7482
|
sequences,
|
|
7438
7483
|
overrideIdsToNodePaths,
|
|
7439
7484
|
setPropStatuses,
|
|
7440
|
-
clientId
|
|
7485
|
+
clientId,
|
|
7486
|
+
propStatuses,
|
|
7487
|
+
timelinePosition
|
|
7441
7488
|
}) => {
|
|
7442
7489
|
const deletions = keyframes.map((keyframe) => getSelectedKeyframeDeletion({
|
|
7443
7490
|
nodePathInfo: keyframe.nodePathInfo,
|
|
7444
7491
|
frame: keyframe.frame,
|
|
7445
7492
|
sequences,
|
|
7446
|
-
overrideIdsToNodePaths
|
|
7493
|
+
overrideIdsToNodePaths,
|
|
7494
|
+
propStatuses,
|
|
7495
|
+
timelinePosition
|
|
7447
7496
|
})).filter((deletion) => deletion !== null);
|
|
7448
7497
|
if (deletions.length === 0) {
|
|
7449
7498
|
return null;
|
|
@@ -7492,7 +7541,7 @@ import {
|
|
|
7492
7541
|
LINEAR_KEYFRAME_EASING
|
|
7493
7542
|
} from "@remotion/studio-shared";
|
|
7494
7543
|
import { canEditEasingForInterpolationFunction as canEditEasingForInterpolationFunction2 } from "@remotion/studio-shared";
|
|
7495
|
-
import { Internals as
|
|
7544
|
+
import { Internals as Internals14 } from "remotion";
|
|
7496
7545
|
var isEasingSelection = (selection) => selection.type === "easing";
|
|
7497
7546
|
var getSelectedEasingUpdate = ({
|
|
7498
7547
|
selection,
|
|
@@ -7519,7 +7568,7 @@ var getSelectedEasingUpdate = ({
|
|
|
7519
7568
|
if (!sequence.controls) {
|
|
7520
7569
|
return null;
|
|
7521
7570
|
}
|
|
7522
|
-
const sequencePropStatus =
|
|
7571
|
+
const sequencePropStatus = Internals14.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey];
|
|
7523
7572
|
if (sequencePropStatus?.status !== "keyframed" || !canEditEasingForInterpolationFunction(sequencePropStatus.interpolationFunction)) {
|
|
7524
7573
|
return null;
|
|
7525
7574
|
}
|
|
@@ -7538,7 +7587,7 @@ var getSelectedEasingUpdate = ({
|
|
|
7538
7587
|
if (!effect) {
|
|
7539
7588
|
return null;
|
|
7540
7589
|
}
|
|
7541
|
-
const effectStatus =
|
|
7590
|
+
const effectStatus = Internals14.getEffectPropStatusesCtx({
|
|
7542
7591
|
propStatuses,
|
|
7543
7592
|
nodePath,
|
|
7544
7593
|
effectIndex: field.effectIndex
|
|
@@ -7783,7 +7832,7 @@ var getEasingSelectionAfterDeletingKeyframes = ({
|
|
|
7783
7832
|
const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
|
|
7784
7833
|
const sourceFrame = selection.frame - track.keyframeDisplayOffset;
|
|
7785
7834
|
if (field.type === "sequence") {
|
|
7786
|
-
const sequencePropStatus =
|
|
7835
|
+
const sequencePropStatus = Internals15.getPropStatusesCtx(propStatuses, nodePath)?.[field.fieldKey];
|
|
7787
7836
|
if (sequencePropStatus?.status !== "keyframed" || !canEditEasingForInterpolationFunction2(sequencePropStatus.interpolationFunction)) {
|
|
7788
7837
|
return null;
|
|
7789
7838
|
}
|
|
@@ -7795,7 +7844,7 @@ var getEasingSelectionAfterDeletingKeyframes = ({
|
|
|
7795
7844
|
timelinePosition
|
|
7796
7845
|
});
|
|
7797
7846
|
}
|
|
7798
|
-
const effectStatus =
|
|
7847
|
+
const effectStatus = Internals15.getEffectPropStatusesCtx({
|
|
7799
7848
|
propStatuses,
|
|
7800
7849
|
nodePath,
|
|
7801
7850
|
effectIndex: field.effectIndex
|
|
@@ -7858,7 +7907,9 @@ var deleteSelectedTimelineItems = ({
|
|
|
7858
7907
|
overrideIdsToNodePaths,
|
|
7859
7908
|
setPropStatuses,
|
|
7860
7909
|
clientId,
|
|
7861
|
-
confirm
|
|
7910
|
+
confirm,
|
|
7911
|
+
propStatuses,
|
|
7912
|
+
timelinePosition
|
|
7862
7913
|
}) => {
|
|
7863
7914
|
const firstSelection = selections[0];
|
|
7864
7915
|
if (!firstSelection) {
|
|
@@ -7877,7 +7928,9 @@ var deleteSelectedTimelineItems = ({
|
|
|
7877
7928
|
sequences,
|
|
7878
7929
|
overrideIdsToNodePaths,
|
|
7879
7930
|
setPropStatuses,
|
|
7880
|
-
clientId
|
|
7931
|
+
clientId,
|
|
7932
|
+
propStatuses,
|
|
7933
|
+
timelinePosition
|
|
7881
7934
|
});
|
|
7882
7935
|
return promise?.then(() => true) ?? null;
|
|
7883
7936
|
}
|
|
@@ -7972,13 +8025,13 @@ import {
|
|
|
7972
8025
|
LINEAR_KEYFRAME_EASING as LINEAR_KEYFRAME_EASING2
|
|
7973
8026
|
} from "@remotion/studio-shared";
|
|
7974
8027
|
import {
|
|
7975
|
-
Internals as
|
|
8028
|
+
Internals as Internals16
|
|
7976
8029
|
} from "remotion";
|
|
7977
8030
|
var getKeyframeClipboardFieldType = ({
|
|
7978
8031
|
schema,
|
|
7979
8032
|
fieldKey
|
|
7980
8033
|
}) => {
|
|
7981
|
-
const field =
|
|
8034
|
+
const field = Internals16.getFlatSchemaWithAllKeys(schema)[fieldKey];
|
|
7982
8035
|
if (!field) {
|
|
7983
8036
|
return null;
|
|
7984
8037
|
}
|
|
@@ -8026,7 +8079,7 @@ var resolveKeyframeField = ({
|
|
|
8026
8079
|
if (!track.sequence.controls) {
|
|
8027
8080
|
return null;
|
|
8028
8081
|
}
|
|
8029
|
-
const sequencePropStatus =
|
|
8082
|
+
const sequencePropStatus = Internals16.getPropStatusesCtx(propStatuses, nodePath)?.[identity.fieldKey];
|
|
8030
8083
|
if (!sequencePropStatus || sequencePropStatus.status === "computed") {
|
|
8031
8084
|
return null;
|
|
8032
8085
|
}
|
|
@@ -8045,7 +8098,7 @@ var resolveKeyframeField = ({
|
|
|
8045
8098
|
};
|
|
8046
8099
|
}
|
|
8047
8100
|
const effect = track.sequence.effects[identity.effectIndex];
|
|
8048
|
-
const effectStatus =
|
|
8101
|
+
const effectStatus = Internals16.getEffectPropStatusesCtx({
|
|
8049
8102
|
propStatuses,
|
|
8050
8103
|
nodePath,
|
|
8051
8104
|
effectIndex: identity.effectIndex
|
|
@@ -8068,7 +8121,7 @@ var resolveKeyframeField = ({
|
|
|
8068
8121
|
};
|
|
8069
8122
|
};
|
|
8070
8123
|
var areResolvedFieldsEqual = (first, second) => {
|
|
8071
|
-
if (
|
|
8124
|
+
if (Internals16.makeSequencePropsSubscriptionKey(first.nodePath) !== Internals16.makeSequencePropsSubscriptionKey(second.nodePath)) {
|
|
8072
8125
|
return false;
|
|
8073
8126
|
}
|
|
8074
8127
|
if (first.identity.type !== second.identity.type) {
|
|
@@ -8395,7 +8448,7 @@ var getSnapshotsFromSelection = ({
|
|
|
8395
8448
|
return null;
|
|
8396
8449
|
}
|
|
8397
8450
|
const { sequenceSubscriptionKey } = selection.nodePathInfo;
|
|
8398
|
-
const sequenceStatus = propStatuses[
|
|
8451
|
+
const sequenceStatus = propStatuses[Internals17.makeSequencePropsSubscriptionKey(sequenceSubscriptionKey)];
|
|
8399
8452
|
if (!sequenceStatus || !sequenceStatus.canUpdate) {
|
|
8400
8453
|
return null;
|
|
8401
8454
|
}
|
|
@@ -8500,7 +8553,7 @@ var getEffectPropClipboardDataFromSelection = ({
|
|
|
8500
8553
|
if (selection.type !== "sequence-effect-prop") {
|
|
8501
8554
|
return null;
|
|
8502
8555
|
}
|
|
8503
|
-
const sequenceStatus = propStatuses[
|
|
8556
|
+
const sequenceStatus = propStatuses[Internals17.makeSequencePropsSubscriptionKey(selection.nodePathInfo.sequenceSubscriptionKey)];
|
|
8504
8557
|
if (!sequenceStatus || !sequenceStatus.canUpdate) {
|
|
8505
8558
|
return null;
|
|
8506
8559
|
}
|
|
@@ -8597,7 +8650,7 @@ var getPasteEffectPropTarget = ({
|
|
|
8597
8650
|
if (!effect || !isVisibleFieldSchema(fieldSchema)) {
|
|
8598
8651
|
return { type: "prop-mismatch" };
|
|
8599
8652
|
}
|
|
8600
|
-
const sequenceStatus = propStatuses[
|
|
8653
|
+
const sequenceStatus = propStatuses[Internals17.makeSequencePropsSubscriptionKey(selection.nodePathInfo.sequenceSubscriptionKey)];
|
|
8601
8654
|
if (!sequenceStatus?.canUpdate) {
|
|
8602
8655
|
return { type: "uncopyable" };
|
|
8603
8656
|
}
|
|
@@ -8624,16 +8677,16 @@ var getPasteEffectPropTarget = ({
|
|
|
8624
8677
|
};
|
|
8625
8678
|
var TimelineClipboardKeybindings = () => {
|
|
8626
8679
|
const keybindings = useKeybinding();
|
|
8627
|
-
const timelinePosition =
|
|
8680
|
+
const timelinePosition = Internals17.Timeline.useTimelinePosition();
|
|
8628
8681
|
const timelinePositionRef = useRef15(timelinePosition);
|
|
8629
8682
|
timelinePositionRef.current = timelinePosition;
|
|
8630
8683
|
const { previewServerState } = useContext16(StudioServerConnectionCtx);
|
|
8631
8684
|
const { canSelect } = useTimelineSelection();
|
|
8632
8685
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
8633
|
-
const propStatusesRef = useContext16(
|
|
8634
|
-
const { setPropStatuses } = useContext16(
|
|
8635
|
-
const sequencesRef = useContext16(
|
|
8636
|
-
const { overrideIdToNodePathMappings } = useContext16(
|
|
8686
|
+
const propStatusesRef = useContext16(Internals17.VisualModePropStatusesRefContext);
|
|
8687
|
+
const { setPropStatuses } = useContext16(Internals17.VisualModeSettersContext);
|
|
8688
|
+
const sequencesRef = useContext16(Internals17.SequenceManagerRefContext);
|
|
8689
|
+
const { overrideIdToNodePathMappings } = useContext16(Internals17.OverrideIdsToNodePathsGettersContext);
|
|
8637
8690
|
const confirm = useConfirmationDialog();
|
|
8638
8691
|
useEffect18(() => {
|
|
8639
8692
|
if (!canSelect || previewServerState.type !== "connected") {
|
|
@@ -8782,7 +8835,9 @@ var TimelineClipboardKeybindings = () => {
|
|
|
8782
8835
|
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
8783
8836
|
setPropStatuses,
|
|
8784
8837
|
clientId,
|
|
8785
|
-
confirm
|
|
8838
|
+
confirm,
|
|
8839
|
+
propStatuses,
|
|
8840
|
+
timelinePosition: timelinePositionRef.current
|
|
8786
8841
|
});
|
|
8787
8842
|
return deletePromise?.then((deleted) => {
|
|
8788
8843
|
if (!deleted) {
|
|
@@ -8867,7 +8922,8 @@ var TimelineClipboardKeybindings = () => {
|
|
|
8867
8922
|
nodePath: keyframeTarget.nodePath,
|
|
8868
8923
|
fieldKey: keyframeTarget.fieldKey,
|
|
8869
8924
|
sourceFrame,
|
|
8870
|
-
schema: keyframeTarget.schema
|
|
8925
|
+
schema: keyframeTarget.schema,
|
|
8926
|
+
valueWhenLastKeyframeDeleted: null
|
|
8871
8927
|
}));
|
|
8872
8928
|
return callDeleteKeyframes({
|
|
8873
8929
|
sequenceKeyframes: effectIndex === null ? deletions : [],
|
|
@@ -9072,7 +9128,7 @@ var TimelineClipboardKeybindings = () => {
|
|
|
9072
9128
|
// src/components/Timeline/TimelineDeleteKeybindings.tsx
|
|
9073
9129
|
import { LINEAR_KEYFRAME_EASING as LINEAR_KEYFRAME_EASING3 } from "@remotion/studio-shared";
|
|
9074
9130
|
import { useContext as useContext17, useEffect as useEffect19, useRef as useRef16 } from "react";
|
|
9075
|
-
import { Internals as
|
|
9131
|
+
import { Internals as Internals20 } from "remotion";
|
|
9076
9132
|
|
|
9077
9133
|
// src/state/editor-guides.ts
|
|
9078
9134
|
import { createContext as createContext14 } from "react";
|
|
@@ -9197,7 +9253,7 @@ var duplicateSelectedTimelineItems = ({
|
|
|
9197
9253
|
|
|
9198
9254
|
// src/components/Timeline/reset-selected-timeline-props.ts
|
|
9199
9255
|
import { getEffectFieldsToShow as getEffectFieldsToShow3 } from "@remotion/studio-shared";
|
|
9200
|
-
import { Internals as
|
|
9256
|
+
import { Internals as Internals18 } from "remotion";
|
|
9201
9257
|
|
|
9202
9258
|
// src/components/Timeline/save-sequence-prop.ts
|
|
9203
9259
|
import {
|
|
@@ -9443,7 +9499,7 @@ var getActiveFieldSchema = ({
|
|
|
9443
9499
|
key: key2,
|
|
9444
9500
|
resolveValue
|
|
9445
9501
|
}) => {
|
|
9446
|
-
return
|
|
9502
|
+
return Internals18.flattenActiveSchema(schema, resolveValue)[key2];
|
|
9447
9503
|
};
|
|
9448
9504
|
var getTimelinePropResetTargets = ({
|
|
9449
9505
|
selections,
|
|
@@ -9475,8 +9531,8 @@ var getTimelinePropResetTargets = ({
|
|
|
9475
9531
|
if (!sequence.controls) {
|
|
9476
9532
|
continue;
|
|
9477
9533
|
}
|
|
9478
|
-
const sequencePropStatus =
|
|
9479
|
-
const { merged: sequenceValuesDotNotation } =
|
|
9534
|
+
const sequencePropStatus = Internals18.getPropStatusesCtx(propStatuses, nodePath);
|
|
9535
|
+
const { merged: sequenceValuesDotNotation } = Internals18.computeEffectiveSchemaValuesDotNotation({
|
|
9480
9536
|
schema: sequence.controls.schema,
|
|
9481
9537
|
currentValue: sequence.controls.currentRuntimeValueDotNotation,
|
|
9482
9538
|
overrideValues: {},
|
|
@@ -9515,7 +9571,7 @@ var getTimelinePropResetTargets = ({
|
|
|
9515
9571
|
getEffectDragOverrides: () => ({})
|
|
9516
9572
|
}).find((candidate) => candidate.key === selection.key) : null;
|
|
9517
9573
|
const fieldSchema = field?.fieldSchema;
|
|
9518
|
-
const effectStatus =
|
|
9574
|
+
const effectStatus = Internals18.getEffectPropStatusesCtx({
|
|
9519
9575
|
propStatuses,
|
|
9520
9576
|
nodePath,
|
|
9521
9577
|
effectIndex: selection.i
|
|
@@ -9596,7 +9652,7 @@ var resetSelectedTimelineProps = ({
|
|
|
9596
9652
|
};
|
|
9597
9653
|
|
|
9598
9654
|
// src/components/Timeline/split-selected-timeline-item.ts
|
|
9599
|
-
import { Internals as
|
|
9655
|
+
import { Internals as Internals19 } from "remotion";
|
|
9600
9656
|
var getTimelineSequenceSplitUnsupportedReason = (componentName) => {
|
|
9601
9657
|
if (componentName === "<TransitionSeries.Sequence>" || componentName === "<TransitionSeries.Overlay>") {
|
|
9602
9658
|
return `${componentName} cannot be split from source`;
|
|
@@ -9731,7 +9787,7 @@ var splitSelectedTimelineItems = ({
|
|
|
9731
9787
|
overrideIdsToNodePaths,
|
|
9732
9788
|
nodePathInfo: selection.nodePathInfo
|
|
9733
9789
|
});
|
|
9734
|
-
const sequencePropStatuses = propStatuses ?
|
|
9790
|
+
const sequencePropStatuses = propStatuses ? Internals19.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey) : undefined;
|
|
9735
9791
|
const eligibility = getTimelineSequenceSplitEligibility({
|
|
9736
9792
|
selection,
|
|
9737
9793
|
sequence: track?.sequence ?? null,
|
|
@@ -9752,15 +9808,15 @@ var splitSelectedTimelineItems = ({
|
|
|
9752
9808
|
var TimelineDeleteKeybindings = () => {
|
|
9753
9809
|
const keybindings = useKeybinding();
|
|
9754
9810
|
const { previewServerState } = useContext17(StudioServerConnectionCtx);
|
|
9755
|
-
const sequencesRef = useContext17(
|
|
9756
|
-
const { overrideIdToNodePathMappings } = useContext17(
|
|
9757
|
-
const propStatusesRef = useContext17(
|
|
9758
|
-
const { setPropStatuses } = useContext17(
|
|
9811
|
+
const sequencesRef = useContext17(Internals20.SequenceManagerRefContext);
|
|
9812
|
+
const { overrideIdToNodePathMappings } = useContext17(Internals20.OverrideIdsToNodePathsGettersContext);
|
|
9813
|
+
const propStatusesRef = useContext17(Internals20.VisualModePropStatusesRefContext);
|
|
9814
|
+
const { setPropStatuses } = useContext17(Internals20.VisualModeSettersContext);
|
|
9759
9815
|
const { setGuidesList } = useContext17(EditorShowGuidesContext);
|
|
9760
9816
|
const { canSelect } = useTimelineSelection();
|
|
9761
9817
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
9762
9818
|
const confirm = useConfirmationDialog();
|
|
9763
|
-
const timelinePosition =
|
|
9819
|
+
const timelinePosition = Internals20.Timeline.useTimelinePosition();
|
|
9764
9820
|
const timelinePositionRef = useRef16(timelinePosition);
|
|
9765
9821
|
timelinePositionRef.current = timelinePosition;
|
|
9766
9822
|
useEffect19(() => {
|
|
@@ -9791,7 +9847,9 @@ var TimelineDeleteKeybindings = () => {
|
|
|
9791
9847
|
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
9792
9848
|
setPropStatuses,
|
|
9793
9849
|
clientId,
|
|
9794
|
-
confirm
|
|
9850
|
+
confirm,
|
|
9851
|
+
propStatuses,
|
|
9852
|
+
timelinePosition: timelinePositionRef.current
|
|
9795
9853
|
});
|
|
9796
9854
|
if (deletePromise !== null) {
|
|
9797
9855
|
deletePromise.then((deleted) => {
|
|
@@ -10287,10 +10345,10 @@ var getTimelineTreeNodeCanEditEasing = ({
|
|
|
10287
10345
|
return false;
|
|
10288
10346
|
}
|
|
10289
10347
|
if (node.field.kind === "sequence-field") {
|
|
10290
|
-
const sequencePropStatus =
|
|
10348
|
+
const sequencePropStatus = Internals21.getPropStatusesCtx(propStatuses, nodePathInfo.sequenceSubscriptionKey)?.[node.field.key];
|
|
10291
10349
|
return sequencePropStatus?.status === "keyframed" && canEditEasingForInterpolationFunction3(sequencePropStatus.interpolationFunction);
|
|
10292
10350
|
}
|
|
10293
|
-
const effectStatus =
|
|
10351
|
+
const effectStatus = Internals21.getEffectPropStatusesCtx({
|
|
10294
10352
|
propStatuses,
|
|
10295
10353
|
nodePath: nodePathInfo.sequenceSubscriptionKey,
|
|
10296
10354
|
effectIndex: node.field.effectIndex
|
|
@@ -10444,9 +10502,9 @@ var TimelineEscapeKeybindings = () => {
|
|
|
10444
10502
|
};
|
|
10445
10503
|
var TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
10446
10504
|
const { getIsExpanded } = useContext18(ExpandedTracksGetterContext);
|
|
10447
|
-
const { propStatuses } = useContext18(
|
|
10448
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext18(
|
|
10449
|
-
const timelinePosition =
|
|
10505
|
+
const { propStatuses } = useContext18(Internals21.VisualModePropStatusesContext);
|
|
10506
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext18(Internals21.VisualModeDragOverridesContext);
|
|
10507
|
+
const timelinePosition = Internals21.Timeline.useTimelinePosition();
|
|
10450
10508
|
const { selectedItems } = useTimelineSelection();
|
|
10451
10509
|
const selectableItems = useMemo28(() => getSelectableTimelineItems({
|
|
10452
10510
|
getDragOverrides,
|
|
@@ -10472,7 +10530,7 @@ var TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
|
10472
10530
|
};
|
|
10473
10531
|
var TimelineSelectionProvider = ({ children }) => {
|
|
10474
10532
|
const { previewServerState } = useContext18(StudioServerConnectionCtx);
|
|
10475
|
-
const { canvasContent } = useContext18(
|
|
10533
|
+
const { canvasContent } = useContext18(Internals21.CompositionManager);
|
|
10476
10534
|
const timelineSelectionScope = canvasContent?.type === "composition" ? canvasContent.compositionId : null;
|
|
10477
10535
|
const { expandParentTracks } = useContext18(ExpandedTracksSetterContext);
|
|
10478
10536
|
const canSelect = studioInteractivityEnabled && previewServerState.type === "connected" && !window.remotion_isReadOnlyStudio;
|
|
@@ -10974,11 +11032,11 @@ var GlobalKeybindings = () => {
|
|
|
10974
11032
|
const { setCheckerboard } = useContext19(CheckerboardContext);
|
|
10975
11033
|
const { setEditorSnapping } = useContext19(EditorSnappingContext);
|
|
10976
11034
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
10977
|
-
const { sequences } = useContext19(
|
|
10978
|
-
const videoConfig =
|
|
10979
|
-
const { overrideIdToNodePathMappings } = useContext19(
|
|
11035
|
+
const { sequences } = useContext19(Internals22.SequenceManager);
|
|
11036
|
+
const videoConfig = Internals22.useUnsafeVideoConfig();
|
|
11037
|
+
const { overrideIdToNodePathMappings } = useContext19(Internals22.OverrideIdsToNodePathsGettersContext);
|
|
10980
11038
|
const { navigateToNextComposition, navigateToPreviousComposition } = useCompositionNavigation();
|
|
10981
|
-
const video =
|
|
11039
|
+
const video = Internals22.useVideo();
|
|
10982
11040
|
const timeline = useMemo29(() => {
|
|
10983
11041
|
if (videoConfig === null) {
|
|
10984
11042
|
return [];
|
|
@@ -11170,7 +11228,7 @@ import { useCallback as useCallback161, useMemo as useMemo163, useState as useSt
|
|
|
11170
11228
|
|
|
11171
11229
|
// src/helpers/use-menu-structure.tsx
|
|
11172
11230
|
import { useContext as useContext22, useEffect as useEffect24, useMemo as useMemo35 } from "react";
|
|
11173
|
-
import { Internals as
|
|
11231
|
+
import { Internals as Internals26 } from "remotion";
|
|
11174
11232
|
import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
|
|
11175
11233
|
|
|
11176
11234
|
// src/api/restart-studio.ts
|
|
@@ -11187,7 +11245,7 @@ var restartStudio = () => {
|
|
|
11187
11245
|
|
|
11188
11246
|
// src/components/SizeSelector.tsx
|
|
11189
11247
|
import { useContext as useContext20, useMemo as useMemo32 } from "react";
|
|
11190
|
-
import { Internals as
|
|
11248
|
+
import { Internals as Internals23 } from "remotion";
|
|
11191
11249
|
|
|
11192
11250
|
// src/helpers/get-preview-file-type.ts
|
|
11193
11251
|
var getPreviewFileType = (fileName) => {
|
|
@@ -11524,8 +11582,8 @@ var getUniqueSizes = (size) => {
|
|
|
11524
11582
|
};
|
|
11525
11583
|
var zoomableFileTypes = ["video", "image"];
|
|
11526
11584
|
var SizeSelector = () => {
|
|
11527
|
-
const { size, setSize } = useContext20(
|
|
11528
|
-
const { canvasContent } = useContext20(
|
|
11585
|
+
const { size, setSize } = useContext20(Internals23.PreviewSizeContext);
|
|
11586
|
+
const { canvasContent } = useContext20(Internals23.CompositionManager);
|
|
11529
11587
|
const style2 = useMemo32(() => {
|
|
11530
11588
|
return {
|
|
11531
11589
|
padding: CONTROL_BUTTON_PADDING
|
|
@@ -11588,7 +11646,7 @@ import {
|
|
|
11588
11646
|
useEffect as useEffect23,
|
|
11589
11647
|
useImperativeHandle as useImperativeHandle5
|
|
11590
11648
|
} from "react";
|
|
11591
|
-
import { Internals as
|
|
11649
|
+
import { Internals as Internals25 } from "remotion";
|
|
11592
11650
|
import { NoReactInternals as NoReactInternals4 } from "remotion/no-react";
|
|
11593
11651
|
|
|
11594
11652
|
// src/icons/timelineInOutPointer.tsx
|
|
@@ -11624,7 +11682,7 @@ var TimelineOutPointer = (props) => {
|
|
|
11624
11682
|
|
|
11625
11683
|
// src/state/in-out.ts
|
|
11626
11684
|
import { createContext as createContext16, useContext as useContext21, useMemo as useMemo33 } from "react";
|
|
11627
|
-
import { Internals as
|
|
11685
|
+
import { Internals as Internals24 } from "remotion";
|
|
11628
11686
|
var TimelineInOutContext = createContext16({});
|
|
11629
11687
|
var SetTimelineInOutContext = createContext16({
|
|
11630
11688
|
setInAndOutFrames: () => {
|
|
@@ -11632,7 +11690,7 @@ var SetTimelineInOutContext = createContext16({
|
|
|
11632
11690
|
}
|
|
11633
11691
|
});
|
|
11634
11692
|
var useTimelineInOutFramePosition = () => {
|
|
11635
|
-
const videoConfig =
|
|
11693
|
+
const videoConfig = Internals24.useUnsafeVideoConfig();
|
|
11636
11694
|
const state = useContext21(TimelineInOutContext);
|
|
11637
11695
|
const id = videoConfig?.id;
|
|
11638
11696
|
const durationInFrames = videoConfig?.durationInFrames;
|
|
@@ -11670,7 +11728,7 @@ var defaultInOutValue = { inFrame: null, outFrame: null };
|
|
|
11670
11728
|
var TimelineInOutPointToggle = () => {
|
|
11671
11729
|
const { inFrame, outFrame } = useTimelineInOutFramePosition();
|
|
11672
11730
|
const { setInAndOutFrames } = useTimelineSetInOutFramePosition();
|
|
11673
|
-
const videoConfig =
|
|
11731
|
+
const videoConfig = Internals25.useUnsafeVideoConfig();
|
|
11674
11732
|
const keybindings = useKeybinding();
|
|
11675
11733
|
const { getCurrentFrame: getCurrentFrame2, isFirstFrame, isLastFrame } = PlayerInternals6.usePlayer();
|
|
11676
11734
|
const onInOutClear = useCallback29((composition) => {
|
|
@@ -12224,8 +12282,8 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
12224
12282
|
const { editorShowRulers, setEditorShowRulers } = useContext22(EditorShowRulersContext);
|
|
12225
12283
|
const { editorShowGuides, setEditorShowGuides } = useContext22(EditorShowGuidesContext);
|
|
12226
12284
|
const { editorSnapping, setEditorSnapping } = useContext22(EditorSnappingContext);
|
|
12227
|
-
const { size, setSize } = useContext22(
|
|
12228
|
-
const { canvasContent, compositions } = useContext22(
|
|
12285
|
+
const { size, setSize } = useContext22(Internals26.PreviewSizeContext);
|
|
12286
|
+
const { canvasContent, compositions } = useContext22(Internals26.CompositionManager);
|
|
12229
12287
|
const { type } = useContext22(StudioServerConnectionCtx).previewServerState;
|
|
12230
12288
|
const {
|
|
12231
12289
|
setSidebarCollapsedState,
|
|
@@ -12663,7 +12721,7 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
12663
12721
|
leftItem: null,
|
|
12664
12722
|
onClick: () => {
|
|
12665
12723
|
closeMenu();
|
|
12666
|
-
|
|
12724
|
+
Internals26.timeValueRef.current?.goToFrame();
|
|
12667
12725
|
},
|
|
12668
12726
|
subMenu: null,
|
|
12669
12727
|
type: "item",
|
|
@@ -12688,7 +12746,7 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
12688
12746
|
value: "fullscreen",
|
|
12689
12747
|
quickSwitcherLabel: "Go Fullscreen"
|
|
12690
12748
|
} : null
|
|
12691
|
-
].filter(
|
|
12749
|
+
].filter(Internals26.truthy)
|
|
12692
12750
|
},
|
|
12693
12751
|
{
|
|
12694
12752
|
id: "composition",
|
|
@@ -12754,7 +12812,7 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
12754
12812
|
subMenu: null,
|
|
12755
12813
|
quickSwitcherLabel: `Install package...`
|
|
12756
12814
|
}
|
|
12757
|
-
].filter(
|
|
12815
|
+
].filter(Internals26.truthy),
|
|
12758
12816
|
quickSwitcherLabel: null
|
|
12759
12817
|
},
|
|
12760
12818
|
{
|
|
@@ -12898,7 +12956,7 @@ var useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
12898
12956
|
}
|
|
12899
12957
|
]
|
|
12900
12958
|
}
|
|
12901
|
-
].filter(
|
|
12959
|
+
].filter(Internals26.truthy);
|
|
12902
12960
|
if (mobileLayout) {
|
|
12903
12961
|
struct = [
|
|
12904
12962
|
{
|
|
@@ -13152,7 +13210,7 @@ import {
|
|
|
13152
13210
|
|
|
13153
13211
|
// src/components/MenuCompositionName.tsx
|
|
13154
13212
|
import { useCallback as useCallback31, useContext as useContext23, useMemo as useMemo37, useState as useState24 } from "react";
|
|
13155
|
-
import { Internals as
|
|
13213
|
+
import { Internals as Internals27 } from "remotion";
|
|
13156
13214
|
import { jsx as jsx55, jsxs as jsxs17, Fragment as Fragment9 } from "react/jsx-runtime";
|
|
13157
13215
|
var baseStyle = {
|
|
13158
13216
|
color: "inherit",
|
|
@@ -13180,7 +13238,7 @@ var slashStyle = {
|
|
|
13180
13238
|
top: 1
|
|
13181
13239
|
};
|
|
13182
13240
|
var MenuCompositionName = () => {
|
|
13183
|
-
const { canvasContent, compositions } = useContext23(
|
|
13241
|
+
const { canvasContent, compositions } = useContext23(Internals27.CompositionManager);
|
|
13184
13242
|
const connectionStatus = useContext23(StudioServerConnectionCtx).previewServerState.type;
|
|
13185
13243
|
const [opening, setOpening] = useState24(false);
|
|
13186
13244
|
const [hovered, setHovered] = useState24(false);
|
|
@@ -13398,7 +13456,7 @@ import { useCallback as useCallback158, useContext as useContext105, useEffect a
|
|
|
13398
13456
|
|
|
13399
13457
|
// src/components/TopPanel.tsx
|
|
13400
13458
|
import React185, { useCallback as useCallback157, useContext as useContext104, useEffect as useEffect78, useMemo as useMemo161 } from "react";
|
|
13401
|
-
import { Internals as
|
|
13459
|
+
import { Internals as Internals86 } from "remotion";
|
|
13402
13460
|
|
|
13403
13461
|
// src/helpers/use-breakpoint.ts
|
|
13404
13462
|
import { useEffect as useEffect26, useRef as useRef20, useState as useState26 } from "react";
|
|
@@ -13422,7 +13480,7 @@ function useBreakpoint(breakpoint2) {
|
|
|
13422
13480
|
|
|
13423
13481
|
// src/components/CanvasIfSizeIsAvailable.tsx
|
|
13424
13482
|
import { useContext as useContext40, useMemo as useMemo59 } from "react";
|
|
13425
|
-
import { Internals as
|
|
13483
|
+
import { Internals as Internals45 } from "remotion";
|
|
13426
13484
|
|
|
13427
13485
|
// src/helpers/ruler-canvas-size.ts
|
|
13428
13486
|
var applyRulerInsetsToCanvasSize = ({
|
|
@@ -13443,7 +13501,7 @@ var applyRulerInsetsToCanvasSize = ({
|
|
|
13443
13501
|
|
|
13444
13502
|
// src/components/CanvasOrLoading.tsx
|
|
13445
13503
|
import { useContext as useContext39, useEffect as useEffect44 } from "react";
|
|
13446
|
-
import { Internals as
|
|
13504
|
+
import { Internals as Internals44 } from "remotion";
|
|
13447
13505
|
|
|
13448
13506
|
// src/error-overlay/remotion-overlay/ErrorLoader.tsx
|
|
13449
13507
|
import { getLocationFromBuildError as getLocationFromBuildError3 } from "@remotion/studio-shared";
|
|
@@ -13484,7 +13542,7 @@ var setErrorsRef = createRef9();
|
|
|
13484
13542
|
|
|
13485
13543
|
// src/error-overlay/react-overlay/utils/unmapper.ts
|
|
13486
13544
|
import { sourceContentFor } from "@jridgewell/trace-mapping";
|
|
13487
|
-
import { Internals as
|
|
13545
|
+
import { Internals as Internals28 } from "remotion";
|
|
13488
13546
|
|
|
13489
13547
|
// src/error-overlay/react-overlay/utils/get-lines-around.ts
|
|
13490
13548
|
function getLinesAround(line2, count, lines2) {
|
|
@@ -13508,7 +13566,7 @@ var getFileContents = async (fileName) => {
|
|
|
13508
13566
|
var unmap = async (frames, contextLines) => {
|
|
13509
13567
|
const transpiled = frames.filter((s) => s.type === "transpiled").map((s) => s.frame);
|
|
13510
13568
|
const uniqueFileNames = [
|
|
13511
|
-
...new Set(transpiled.map((f) => f.fileName).filter(
|
|
13569
|
+
...new Set(transpiled.map((f) => f.fileName).filter(Internals28.truthy))
|
|
13512
13570
|
];
|
|
13513
13571
|
const maps = await Promise.all(uniqueFileNames.map(async (fileName) => {
|
|
13514
13572
|
const fileContents = await getFileContents(fileName);
|
|
@@ -13539,7 +13597,7 @@ var unmap = async (frames, contextLines) => {
|
|
|
13539
13597
|
originalLineNumber: pos.line,
|
|
13540
13598
|
originalScriptCode: scriptCode
|
|
13541
13599
|
};
|
|
13542
|
-
}).filter(
|
|
13600
|
+
}).filter(Internals28.truthy);
|
|
13543
13601
|
};
|
|
13544
13602
|
|
|
13545
13603
|
// src/error-overlay/react-overlay/utils/get-stack-frames.ts
|
|
@@ -13666,9 +13724,9 @@ var CopyStackTrace = ({ errorText }) => {
|
|
|
13666
13724
|
};
|
|
13667
13725
|
|
|
13668
13726
|
// src/error-overlay/react-overlay/index.ts
|
|
13669
|
-
import { Internals as
|
|
13727
|
+
import { Internals as Internals29 } from "remotion";
|
|
13670
13728
|
var didUnmountReactApp = () => {
|
|
13671
|
-
return !
|
|
13729
|
+
return !Internals29.getPreviewDomElement()?.hasChildNodes();
|
|
13672
13730
|
};
|
|
13673
13731
|
|
|
13674
13732
|
// src/error-overlay/remotion-overlay/DismissButton.tsx
|
|
@@ -14911,7 +14969,7 @@ import {
|
|
|
14911
14969
|
useRef as useRef33,
|
|
14912
14970
|
useState as useState42
|
|
14913
14971
|
} from "react";
|
|
14914
|
-
import { Internals as
|
|
14972
|
+
import { Internals as Internals42, watchStaticFile } from "remotion";
|
|
14915
14973
|
|
|
14916
14974
|
// src/helpers/get-asset-metadata.ts
|
|
14917
14975
|
import { getVideoMetadata } from "@remotion/media-utils";
|
|
@@ -14995,7 +15053,7 @@ var getAssetMetadata = async (canvasContent, addTime) => {
|
|
|
14995
15053
|
};
|
|
14996
15054
|
|
|
14997
15055
|
// src/helpers/get-effective-translation.ts
|
|
14998
|
-
import { Internals as
|
|
15056
|
+
import { Internals as Internals30 } from "remotion";
|
|
14999
15057
|
|
|
15000
15058
|
// src/helpers/smooth-zoom.ts
|
|
15001
15059
|
var BASE = Math.E / 4;
|
|
@@ -15085,7 +15143,7 @@ var applyZoomAroundFocalPoint = ({
|
|
|
15085
15143
|
clientX,
|
|
15086
15144
|
clientY
|
|
15087
15145
|
}) => {
|
|
15088
|
-
const scale =
|
|
15146
|
+
const scale = Internals30.calculateScale({
|
|
15089
15147
|
canvasSize,
|
|
15090
15148
|
compositionHeight: contentDimensions.height,
|
|
15091
15149
|
compositionWidth: contentDimensions.width,
|
|
@@ -15230,18 +15288,18 @@ var getRemoteAssetUrlFromDataTransfer = (dataTransfer) => {
|
|
|
15230
15288
|
|
|
15231
15289
|
// src/components/EditorGuides/index.tsx
|
|
15232
15290
|
import { useContext as useContext27, useMemo as useMemo47 } from "react";
|
|
15233
|
-
import { Internals as
|
|
15291
|
+
import { Internals as Internals32 } from "remotion";
|
|
15234
15292
|
|
|
15235
15293
|
// src/helpers/use-studio-canvas-dimensions.ts
|
|
15236
15294
|
import { PlayerInternals as PlayerInternals9 } from "@remotion/player";
|
|
15237
15295
|
import { useContext as useContext25, useMemo as useMemo44 } from "react";
|
|
15238
|
-
import { Internals as
|
|
15296
|
+
import { Internals as Internals31 } from "remotion";
|
|
15239
15297
|
var useStudioCanvasDimensions = ({
|
|
15240
15298
|
canvasSize,
|
|
15241
15299
|
contentDimensions,
|
|
15242
15300
|
assetMetadata
|
|
15243
15301
|
}) => {
|
|
15244
|
-
const { size: previewSize } = useContext25(
|
|
15302
|
+
const { size: previewSize } = useContext25(Internals31.PreviewSizeContext);
|
|
15245
15303
|
const { centerX, centerY, scale } = useMemo44(() => {
|
|
15246
15304
|
if (contentDimensions === "none" || contentDimensions === null || assetMetadata && (assetMetadata.type === "not-found" || assetMetadata.type === "metadata-error") || !canvasSize) {
|
|
15247
15305
|
return {
|
|
@@ -15641,7 +15699,7 @@ var EditorGuides = ({ canvasSize, contentDimensions, assetMetadata }) => {
|
|
|
15641
15699
|
contentDimensions,
|
|
15642
15700
|
assetMetadata
|
|
15643
15701
|
});
|
|
15644
|
-
const { canvasContent } = useContext27(
|
|
15702
|
+
const { canvasContent } = useContext27(Internals32.CompositionManager);
|
|
15645
15703
|
if (canvasContent === null || canvasContent.type !== "composition") {
|
|
15646
15704
|
throw new Error("Expected to be in a composition");
|
|
15647
15705
|
}
|
|
@@ -15887,7 +15945,7 @@ import {
|
|
|
15887
15945
|
useMemo as useMemo48,
|
|
15888
15946
|
useRef as useRef24
|
|
15889
15947
|
} from "react";
|
|
15890
|
-
import { Internals as
|
|
15948
|
+
import { Internals as Internals33 } from "remotion";
|
|
15891
15949
|
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
15892
15950
|
var makeGuideId = () => {
|
|
15893
15951
|
return Math.random().toString(36).substring(7);
|
|
@@ -15913,7 +15971,7 @@ var Ruler = ({
|
|
|
15913
15971
|
setEditorShowGuides
|
|
15914
15972
|
} = useContext28(EditorShowGuidesContext);
|
|
15915
15973
|
const { selectedItems } = useTimelineSelection();
|
|
15916
|
-
const unsafeVideoConfig =
|
|
15974
|
+
const unsafeVideoConfig = Internals33.useUnsafeVideoConfig();
|
|
15917
15975
|
if (!unsafeVideoConfig) {
|
|
15918
15976
|
throw new Error("Video config not set");
|
|
15919
15977
|
}
|
|
@@ -16199,9 +16257,9 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
|
|
|
16199
16257
|
|
|
16200
16258
|
// src/components/EditorRuler/use-is-ruler-visible.ts
|
|
16201
16259
|
import { useContext as useContext30 } from "react";
|
|
16202
|
-
import { Internals as
|
|
16260
|
+
import { Internals as Internals34 } from "remotion";
|
|
16203
16261
|
var useIsRulerVisible = () => {
|
|
16204
|
-
const { canvasContent } = useContext30(
|
|
16262
|
+
const { canvasContent } = useContext30(Internals34.CompositionManager);
|
|
16205
16263
|
const { editorShowRulers } = useContext30(EditorShowRulersContext);
|
|
16206
16264
|
return editorShowRulers && canvasContent && canvasContent.type === "composition";
|
|
16207
16265
|
};
|
|
@@ -16349,7 +16407,7 @@ import {
|
|
|
16349
16407
|
getRequiredPackageForInsertableElement,
|
|
16350
16408
|
isUrl
|
|
16351
16409
|
} from "@remotion/studio-shared";
|
|
16352
|
-
import { Internals as
|
|
16410
|
+
import { Internals as Internals35, staticFile as staticFile2 } from "remotion";
|
|
16353
16411
|
import { NoReactInternals as NoReactInternals7 } from "remotion/no-react";
|
|
16354
16412
|
|
|
16355
16413
|
// src/api/write-static-file.ts
|
|
@@ -16382,6 +16440,16 @@ var getAssetElement = ({
|
|
|
16382
16440
|
fileType,
|
|
16383
16441
|
src
|
|
16384
16442
|
}) => {
|
|
16443
|
+
if (fileType.type === "webp" && fileType.animated) {
|
|
16444
|
+
return {
|
|
16445
|
+
type: "asset",
|
|
16446
|
+
assetType: "animated-image",
|
|
16447
|
+
src,
|
|
16448
|
+
srcType: "static",
|
|
16449
|
+
dimensions: fileType.dimensions,
|
|
16450
|
+
position: null
|
|
16451
|
+
};
|
|
16452
|
+
}
|
|
16385
16453
|
if (fileType.type === "png" || fileType.type === "jpeg" || fileType.type === "webp" || fileType.type === "bmp") {
|
|
16386
16454
|
return {
|
|
16387
16455
|
type: "asset",
|
|
@@ -16442,7 +16510,7 @@ var getAssetElementFromPath = (assetPath) => {
|
|
|
16442
16510
|
if (!extension || extension === assetPath.toLowerCase()) {
|
|
16443
16511
|
return null;
|
|
16444
16512
|
}
|
|
16445
|
-
if (["png", "jpg", "jpeg", "webp", "bmp"].includes(extension)) {
|
|
16513
|
+
if (["png", "jpg", "jpeg", "webp", "bmp", "svg"].includes(extension)) {
|
|
16446
16514
|
return {
|
|
16447
16515
|
type: "asset",
|
|
16448
16516
|
assetType: "image",
|
|
@@ -16494,6 +16562,19 @@ var getAssetElementFromPath = (assetPath) => {
|
|
|
16494
16562
|
}
|
|
16495
16563
|
return null;
|
|
16496
16564
|
};
|
|
16565
|
+
var getAssetElementForDroppedFile = ({
|
|
16566
|
+
fileType,
|
|
16567
|
+
src
|
|
16568
|
+
}) => {
|
|
16569
|
+
const detectedElement = getAssetElement({ fileType, src });
|
|
16570
|
+
if (detectedElement !== null) {
|
|
16571
|
+
return detectedElement;
|
|
16572
|
+
}
|
|
16573
|
+
if (fileType.type !== "unknown" || !src.toLowerCase().endsWith(".svg")) {
|
|
16574
|
+
return null;
|
|
16575
|
+
}
|
|
16576
|
+
return getAssetElementFromPath(src);
|
|
16577
|
+
};
|
|
16497
16578
|
var getAssetLabel = (element) => {
|
|
16498
16579
|
if (element.type !== "asset") {
|
|
16499
16580
|
throw new Error("Expected asset element");
|
|
@@ -16558,6 +16639,16 @@ var getCompositionPositionForDrop = ({
|
|
|
16558
16639
|
dropPosition
|
|
16559
16640
|
});
|
|
16560
16641
|
};
|
|
16642
|
+
var getAssetPositionForDrop = ({
|
|
16643
|
+
assetDimensions,
|
|
16644
|
+
destinationDimensions,
|
|
16645
|
+
dropPosition
|
|
16646
|
+
}) => {
|
|
16647
|
+
if (assetDimensions !== null && destinationDimensions !== null && assetDimensions.width === destinationDimensions.width && assetDimensions.height === destinationDimensions.height) {
|
|
16648
|
+
return null;
|
|
16649
|
+
}
|
|
16650
|
+
return getCenteredPosition({ dimensions: assetDimensions, dropPosition });
|
|
16651
|
+
};
|
|
16561
16652
|
var getComponentPropNumber = (props, name) => {
|
|
16562
16653
|
const prop = props.find((p) => p.name === name);
|
|
16563
16654
|
return typeof prop?.value === "number" ? prop.value : null;
|
|
@@ -16606,6 +16697,10 @@ var getFileDimensions = async ({
|
|
|
16606
16697
|
file,
|
|
16607
16698
|
fileType
|
|
16608
16699
|
}) => {
|
|
16700
|
+
if (fileType.type === "unknown" && file.name.toLowerCase().endsWith(".svg")) {
|
|
16701
|
+
const objectUrl = URL.createObjectURL(file);
|
|
16702
|
+
return getImageDimensions({ revokeObjectUrl: true, src: objectUrl });
|
|
16703
|
+
}
|
|
16609
16704
|
if (fileType.type === "wav" || fileType.type === "mp3" || fileType.type === "aac" || fileType.type === "flac") {
|
|
16610
16705
|
return null;
|
|
16611
16706
|
}
|
|
@@ -16629,7 +16724,7 @@ var getFileDimensions = async ({
|
|
|
16629
16724
|
var getStaticAssetDimensions = (assetPath) => {
|
|
16630
16725
|
const extension = assetPath.split(".").pop()?.toLowerCase();
|
|
16631
16726
|
const src = staticFile2(assetPath);
|
|
16632
|
-
if (extension && ["png", "jpg", "jpeg", "webp", "bmp", "gif", "apng"].includes(extension)) {
|
|
16727
|
+
if (extension && ["png", "jpg", "jpeg", "webp", "bmp", "gif", "apng", "svg"].includes(extension)) {
|
|
16633
16728
|
return getImageDimensions({ revokeObjectUrl: false, src });
|
|
16634
16729
|
}
|
|
16635
16730
|
if (extension && ["mp4", "m4v", "mov", "avi", "webm", "ts", "m2ts"].includes(extension)) {
|
|
@@ -16656,7 +16751,7 @@ var getStaticAssetDimensionsOrNull = async (assetPath) => {
|
|
|
16656
16751
|
};
|
|
16657
16752
|
var getStaticAssetFileType = async (assetPath) => {
|
|
16658
16753
|
const extension = assetPath.split(".").pop()?.toLowerCase();
|
|
16659
|
-
if (extension !== "png" && extension !== "apng") {
|
|
16754
|
+
if (extension !== "png" && extension !== "apng" && extension !== "webp") {
|
|
16660
16755
|
return null;
|
|
16661
16756
|
}
|
|
16662
16757
|
try {
|
|
@@ -16744,6 +16839,7 @@ var downloadRemoteAsset = (url) => {
|
|
|
16744
16839
|
var importAssets = async ({
|
|
16745
16840
|
compositionFile,
|
|
16746
16841
|
compositionId,
|
|
16842
|
+
destinationDimensions,
|
|
16747
16843
|
dropPosition,
|
|
16748
16844
|
files
|
|
16749
16845
|
}) => {
|
|
@@ -16773,7 +16869,7 @@ var importAssets = async ({
|
|
|
16773
16869
|
for (const file of files) {
|
|
16774
16870
|
const contents = await file.arrayBuffer();
|
|
16775
16871
|
const fileType = detectFileType(new Uint8Array(contents));
|
|
16776
|
-
const element =
|
|
16872
|
+
const element = getAssetElementForDroppedFile({
|
|
16777
16873
|
fileType,
|
|
16778
16874
|
src: file.name
|
|
16779
16875
|
});
|
|
@@ -16790,14 +16886,16 @@ var importAssets = async ({
|
|
|
16790
16886
|
addedStaticFiles.push(file.name);
|
|
16791
16887
|
}
|
|
16792
16888
|
const dimensions = await getFileDimensionsOrNull({ file, fileType });
|
|
16889
|
+
const resolvedDimensions = element.dimensions ?? dimensions;
|
|
16793
16890
|
const inserted = await insertAssetElement({
|
|
16794
16891
|
compositionFile,
|
|
16795
16892
|
compositionId,
|
|
16796
16893
|
element: {
|
|
16797
16894
|
...element,
|
|
16798
|
-
dimensions:
|
|
16799
|
-
position:
|
|
16800
|
-
|
|
16895
|
+
dimensions: resolvedDimensions,
|
|
16896
|
+
position: getAssetPositionForDrop({
|
|
16897
|
+
assetDimensions: resolvedDimensions,
|
|
16898
|
+
destinationDimensions,
|
|
16801
16899
|
dropPosition
|
|
16802
16900
|
})
|
|
16803
16901
|
}
|
|
@@ -16818,6 +16916,7 @@ var importAssets = async ({
|
|
|
16818
16916
|
var importRemoteAsset = async ({
|
|
16819
16917
|
compositionFile,
|
|
16820
16918
|
compositionId,
|
|
16919
|
+
destinationDimensions,
|
|
16821
16920
|
dropPosition,
|
|
16822
16921
|
url
|
|
16823
16922
|
}) => {
|
|
@@ -16835,8 +16934,9 @@ var importRemoteAsset = async ({
|
|
|
16835
16934
|
compositionId,
|
|
16836
16935
|
element: {
|
|
16837
16936
|
...element,
|
|
16838
|
-
position:
|
|
16839
|
-
|
|
16937
|
+
position: getAssetPositionForDrop({
|
|
16938
|
+
assetDimensions: element.dimensions,
|
|
16939
|
+
destinationDimensions,
|
|
16840
16940
|
dropPosition
|
|
16841
16941
|
})
|
|
16842
16942
|
}
|
|
@@ -16884,6 +16984,7 @@ var insertExistingAssets = async ({
|
|
|
16884
16984
|
assetPaths,
|
|
16885
16985
|
compositionFile,
|
|
16886
16986
|
compositionId,
|
|
16987
|
+
destinationDimensions,
|
|
16887
16988
|
dropPosition
|
|
16888
16989
|
}) => {
|
|
16889
16990
|
if (assetPaths.length === 0) {
|
|
@@ -16905,8 +17006,9 @@ var insertExistingAssets = async ({
|
|
|
16905
17006
|
element: {
|
|
16906
17007
|
...element,
|
|
16907
17008
|
dimensions,
|
|
16908
|
-
position:
|
|
16909
|
-
dimensions,
|
|
17009
|
+
position: getAssetPositionForDrop({
|
|
17010
|
+
assetDimensions: dimensions,
|
|
17011
|
+
destinationDimensions,
|
|
16910
17012
|
dropPosition
|
|
16911
17013
|
})
|
|
16912
17014
|
}
|
|
@@ -16975,7 +17077,7 @@ var insertComposition = async ({
|
|
|
16975
17077
|
return;
|
|
16976
17078
|
}
|
|
16977
17079
|
try {
|
|
16978
|
-
const resolver =
|
|
17080
|
+
const resolver = Internals35.resolveCompositionsRef.current;
|
|
16979
17081
|
if (!resolver) {
|
|
16980
17082
|
throw new Error("No composition resolver available");
|
|
16981
17083
|
}
|
|
@@ -17046,7 +17148,7 @@ import {
|
|
|
17046
17148
|
useMemo as useMemo57,
|
|
17047
17149
|
useRef as useRef32
|
|
17048
17150
|
} from "react";
|
|
17049
|
-
import { Internals as
|
|
17151
|
+
import { Internals as Internals41 } from "remotion";
|
|
17050
17152
|
|
|
17051
17153
|
// src/helpers/checkerboard-background.ts
|
|
17052
17154
|
var getCheckerboardBackgroundSize = (size2) => `${size2}px ${size2}px`;
|
|
@@ -17481,7 +17583,7 @@ import React68, {
|
|
|
17481
17583
|
useRef as useRef31,
|
|
17482
17584
|
useState as useState41
|
|
17483
17585
|
} from "react";
|
|
17484
|
-
import { Internals as
|
|
17586
|
+
import { Internals as Internals40 } from "remotion";
|
|
17485
17587
|
import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
|
|
17486
17588
|
|
|
17487
17589
|
// src/state/editor-outlines.ts
|
|
@@ -17502,7 +17604,7 @@ var EditorShowOutlinesContext = createContext19({
|
|
|
17502
17604
|
});
|
|
17503
17605
|
|
|
17504
17606
|
// src/components/selected-outline-drag.ts
|
|
17505
|
-
import { Internals as
|
|
17607
|
+
import { Internals as Internals37 } from "remotion";
|
|
17506
17608
|
import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
|
|
17507
17609
|
|
|
17508
17610
|
// src/components/selected-outline-geometry.ts
|
|
@@ -19127,7 +19229,7 @@ var transformOriginFieldKey = "style.transformOrigin";
|
|
|
19127
19229
|
var selectedOutlineDragThresholdPx = 4;
|
|
19128
19230
|
|
|
19129
19231
|
// src/components/selected-outline-uv.ts
|
|
19130
|
-
import { Internals as
|
|
19232
|
+
import { Internals as Internals36 } from "remotion";
|
|
19131
19233
|
|
|
19132
19234
|
// src/components/Timeline/timeline-field-utils.ts
|
|
19133
19235
|
var getDecimalPlaces = (num) => {
|
|
@@ -19646,7 +19748,7 @@ var getSelectedUvHandles = ({
|
|
|
19646
19748
|
if (!effect) {
|
|
19647
19749
|
continue;
|
|
19648
19750
|
}
|
|
19649
|
-
const effectStatus =
|
|
19751
|
+
const effectStatus = Internals36.getEffectPropStatusesCtx({
|
|
19650
19752
|
propStatuses,
|
|
19651
19753
|
nodePath,
|
|
19652
19754
|
effectIndex
|
|
@@ -19659,12 +19761,12 @@ var getSelectedUvHandles = ({
|
|
|
19659
19761
|
continue;
|
|
19660
19762
|
}
|
|
19661
19763
|
const dragOverrides = getEffectDragOverrides(nodePath, effectIndex);
|
|
19662
|
-
const activeSchema =
|
|
19764
|
+
const activeSchema = Internals36.flattenActiveSchema(effect.schema, (key3) => {
|
|
19663
19765
|
const propStatus = effectStatus.props[key3];
|
|
19664
19766
|
if (propStatus?.status !== "static" && propStatus?.status !== "keyframed") {
|
|
19665
19767
|
return;
|
|
19666
19768
|
}
|
|
19667
|
-
return
|
|
19769
|
+
return Internals36.getEffectiveVisualModeValue({
|
|
19668
19770
|
propStatus,
|
|
19669
19771
|
dragOverrideValue: dragOverrides[key3],
|
|
19670
19772
|
defaultValue: undefined,
|
|
@@ -19681,7 +19783,7 @@ var getSelectedUvHandles = ({
|
|
|
19681
19783
|
if (propStatus?.status !== "static" && propStatus?.status !== "keyframed") {
|
|
19682
19784
|
continue;
|
|
19683
19785
|
}
|
|
19684
|
-
effectValues[fieldKey] =
|
|
19786
|
+
effectValues[fieldKey] = Internals36.getEffectiveVisualModeValue({
|
|
19685
19787
|
propStatus,
|
|
19686
19788
|
dragOverrideValue: dragOverrides[fieldKey],
|
|
19687
19789
|
defaultValue: fieldSchema.default,
|
|
@@ -21251,14 +21353,14 @@ var getSelectedOutlineActiveSchema = ({
|
|
|
21251
21353
|
propStatus,
|
|
21252
21354
|
frame: frame2
|
|
21253
21355
|
}) => {
|
|
21254
|
-
const { merged: valuesDotNotation } =
|
|
21356
|
+
const { merged: valuesDotNotation } = Internals37.computeEffectiveSchemaValuesDotNotation({
|
|
21255
21357
|
schema,
|
|
21256
21358
|
currentValue: currentRuntimeValueDotNotation,
|
|
21257
21359
|
overrideValues: dragOverrides,
|
|
21258
21360
|
propStatus,
|
|
21259
21361
|
frame: frame2
|
|
21260
21362
|
});
|
|
21261
|
-
return
|
|
21363
|
+
return Internals37.flattenActiveSchema(schema, (key3) => valuesDotNotation[key3]);
|
|
21262
21364
|
};
|
|
21263
21365
|
var getSelectedOutlineDragStates = ({
|
|
21264
21366
|
dragTargets,
|
|
@@ -21268,7 +21370,7 @@ var getSelectedOutlineDragStates = ({
|
|
|
21268
21370
|
return dragTargets.map((target) => {
|
|
21269
21371
|
const dragOverrideValue = (getDragOverrides(target.nodePath) ?? {})[translateFieldKey];
|
|
21270
21372
|
const sourceFrame = timelinePosition - target.keyframeDisplayOffset;
|
|
21271
|
-
const effectiveValue =
|
|
21373
|
+
const effectiveValue = Internals37.getEffectiveVisualModeValue({
|
|
21272
21374
|
propStatus: target.propStatus,
|
|
21273
21375
|
dragOverrideValue,
|
|
21274
21376
|
defaultValue: target.fieldDefault,
|
|
@@ -21278,7 +21380,7 @@ var getSelectedOutlineDragStates = ({
|
|
|
21278
21380
|
const [startX, startY] = parseTranslate(String(effectiveValue ?? "0px 0px"));
|
|
21279
21381
|
return {
|
|
21280
21382
|
defaultValue: target.fieldDefault !== undefined ? JSON.stringify(target.fieldDefault) : null,
|
|
21281
|
-
key:
|
|
21383
|
+
key: Internals37.makeSequencePropsSubscriptionKey(target.nodePath),
|
|
21282
21384
|
sourceFrame,
|
|
21283
21385
|
startX,
|
|
21284
21386
|
startY,
|
|
@@ -21428,7 +21530,7 @@ var getSelectedOutlineScaleDragStates = ({
|
|
|
21428
21530
|
return dragTargets.map((target) => {
|
|
21429
21531
|
const dragOverrideValue = (getDragOverrides(target.nodePath) ?? {})[scaleFieldKey];
|
|
21430
21532
|
const sourceFrame = timelinePosition - target.keyframeDisplayOffset;
|
|
21431
|
-
const effectiveValue =
|
|
21533
|
+
const effectiveValue = Internals37.getEffectiveVisualModeValue({
|
|
21432
21534
|
propStatus: target.propStatus,
|
|
21433
21535
|
dragOverrideValue,
|
|
21434
21536
|
defaultValue: target.fieldDefault,
|
|
@@ -21438,7 +21540,7 @@ var getSelectedOutlineScaleDragStates = ({
|
|
|
21438
21540
|
const [startX, startY, startZ] = NoReactInternals9.parseScaleValue(effectiveValue);
|
|
21439
21541
|
return {
|
|
21440
21542
|
defaultValue: target.fieldDefault !== undefined ? JSON.stringify(target.fieldDefault) : null,
|
|
21441
|
-
key:
|
|
21543
|
+
key: Internals37.makeSequencePropsSubscriptionKey(target.nodePath),
|
|
21442
21544
|
sourceFrame,
|
|
21443
21545
|
startX,
|
|
21444
21546
|
startY,
|
|
@@ -21534,7 +21636,7 @@ var getSelectedOutlineRotationDragStates = ({
|
|
|
21534
21636
|
return dragTargets.map((target) => {
|
|
21535
21637
|
const dragOverrideValue = (getDragOverrides(target.nodePath) ?? {})[rotateFieldKey];
|
|
21536
21638
|
const sourceFrame = timelinePosition - target.keyframeDisplayOffset;
|
|
21537
|
-
const effectiveValue =
|
|
21639
|
+
const effectiveValue = Internals37.getEffectiveVisualModeValue({
|
|
21538
21640
|
propStatus: target.propStatus,
|
|
21539
21641
|
dragOverrideValue,
|
|
21540
21642
|
defaultValue: target.fieldDefault,
|
|
@@ -21543,7 +21645,7 @@ var getSelectedOutlineRotationDragStates = ({
|
|
|
21543
21645
|
});
|
|
21544
21646
|
return {
|
|
21545
21647
|
defaultValue: target.fieldDefault !== undefined ? JSON.stringify(target.fieldDefault) : null,
|
|
21546
|
-
key:
|
|
21648
|
+
key: Internals37.makeSequencePropsSubscriptionKey(target.nodePath),
|
|
21547
21649
|
sourceFrame,
|
|
21548
21650
|
startDegrees: parseCssRotationToDegrees(String(effectiveValue ?? "0deg")),
|
|
21549
21651
|
target
|
|
@@ -21930,7 +22032,7 @@ var findSelectedOutlineSnap = ({
|
|
|
21930
22032
|
|
|
21931
22033
|
// src/components/SelectedOutlineElement.tsx
|
|
21932
22034
|
import React66, { useContext as useContext33, useMemo as useMemo54, useRef as useRef30, useState as useState40 } from "react";
|
|
21933
|
-
import { Internals as
|
|
22035
|
+
import { Internals as Internals38 } from "remotion";
|
|
21934
22036
|
import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
|
|
21935
22037
|
|
|
21936
22038
|
// src/helpers/get-sequence-double-click-action.ts
|
|
@@ -21947,6 +22049,17 @@ var getSequenceDoubleClickAction = ({
|
|
|
21947
22049
|
}
|
|
21948
22050
|
return canOpenInEditor ? "open-in-editor" : null;
|
|
21949
22051
|
};
|
|
22052
|
+
var getConnectedCompositionFrame = ({
|
|
22053
|
+
timelinePosition,
|
|
22054
|
+
sequence,
|
|
22055
|
+
sequenceFrameOffset
|
|
22056
|
+
}) => {
|
|
22057
|
+
const relativeFrame = timelinePosition - sequence.from;
|
|
22058
|
+
if (relativeFrame < 0 || relativeFrame >= sequence.duration) {
|
|
22059
|
+
return null;
|
|
22060
|
+
}
|
|
22061
|
+
return sequence.frozenFrame ?? relativeFrame + sequenceFrameOffset;
|
|
22062
|
+
};
|
|
21950
22063
|
|
|
21951
22064
|
// src/components/Timeline/disable-sequence-interactivity.ts
|
|
21952
22065
|
import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
|
|
@@ -22261,7 +22374,7 @@ var getSequenceContextMenuItems = ({
|
|
|
22261
22374
|
import { jsx as jsx89, jsxs as jsxs38, Fragment as Fragment17 } from "react/jsx-runtime";
|
|
22262
22375
|
var emptyContextMenuValues = [];
|
|
22263
22376
|
var SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target }) => {
|
|
22264
|
-
const { setDragOverrides, clearDragOverrides, setPropStatuses } = useContext33(
|
|
22377
|
+
const { setDragOverrides, clearDragOverrides, setPropStatuses } = useContext33(Internals38.VisualModeSettersContext);
|
|
22265
22378
|
const { editorSnapping } = useContext33(EditorSnappingContext);
|
|
22266
22379
|
const transformOriginDrag = target?.transformOriginDrag ?? null;
|
|
22267
22380
|
const parsed = useMemo54(() => transformOriginDrag === null ? null : parseTransformOrigin(transformOriginDrag.originValue), [transformOriginDrag]);
|
|
@@ -22349,16 +22462,16 @@ var SelectedOutlineTransformOriginHandle = ({ outline, onDraggingChange, target
|
|
|
22349
22462
|
});
|
|
22350
22463
|
const translate = serializeTranslate(nextTranslateX, nextTranslateY);
|
|
22351
22464
|
last = { uv: nextUv, origin, translate };
|
|
22352
|
-
setDragOverrides(transformOriginDrag.nodePath, transformOriginFieldKey, transformOriginDrag.originPropStatus.status === "keyframed" ?
|
|
22465
|
+
setDragOverrides(transformOriginDrag.nodePath, transformOriginFieldKey, transformOriginDrag.originPropStatus.status === "keyframed" ? Internals38.makeKeyframedDragOverride({
|
|
22353
22466
|
status: transformOriginDrag.originPropStatus,
|
|
22354
22467
|
frame: transformOriginDrag.sourceFrame,
|
|
22355
22468
|
value: origin
|
|
22356
|
-
}) :
|
|
22357
|
-
setDragOverrides(transformOriginDrag.nodePath, translateFieldKey, transformOriginDrag.translatePropStatus.status === "keyframed" ?
|
|
22469
|
+
}) : Internals38.makeStaticDragOverride(origin));
|
|
22470
|
+
setDragOverrides(transformOriginDrag.nodePath, translateFieldKey, transformOriginDrag.translatePropStatus.status === "keyframed" ? Internals38.makeKeyframedDragOverride({
|
|
22358
22471
|
status: transformOriginDrag.translatePropStatus,
|
|
22359
22472
|
frame: transformOriginDrag.sourceFrame,
|
|
22360
22473
|
value: translate
|
|
22361
|
-
}) :
|
|
22474
|
+
}) : Internals38.makeStaticDragOverride(translate));
|
|
22362
22475
|
};
|
|
22363
22476
|
updateFromPointerPosition();
|
|
22364
22477
|
const onPointerMove = (moveEvent) => {
|
|
@@ -22525,10 +22638,10 @@ var SelectedOutlinePolygon = ({
|
|
|
22525
22638
|
snapTargets,
|
|
22526
22639
|
target
|
|
22527
22640
|
}) => {
|
|
22528
|
-
const { getDragOverrides } = useContext33(
|
|
22529
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(
|
|
22641
|
+
const { getDragOverrides } = useContext33(Internals38.VisualModeDragOverridesContext);
|
|
22642
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(Internals38.VisualModeSettersContext);
|
|
22530
22643
|
const { editorSnapping } = useContext33(EditorSnappingContext);
|
|
22531
|
-
const timelinePosition =
|
|
22644
|
+
const timelinePosition = Internals38.Timeline.useTimelinePosition();
|
|
22532
22645
|
const timelinePositionRef = useRef30(timelinePosition);
|
|
22533
22646
|
timelinePositionRef.current = timelinePosition;
|
|
22534
22647
|
const polygonRef = useRef30(null);
|
|
@@ -22621,13 +22734,13 @@ var SelectedOutlinePolygon = ({
|
|
|
22621
22734
|
throw new Error("Expected drag value to be available");
|
|
22622
22735
|
}
|
|
22623
22736
|
if (dragState.target.propStatus.status === "keyframed") {
|
|
22624
|
-
setDragOverrides(dragState.target.nodePath, translateFieldKey,
|
|
22737
|
+
setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals38.makeKeyframedDragOverride({
|
|
22625
22738
|
status: dragState.target.propStatus,
|
|
22626
22739
|
frame: dragState.sourceFrame,
|
|
22627
22740
|
value
|
|
22628
22741
|
}));
|
|
22629
22742
|
} else {
|
|
22630
|
-
setDragOverrides(dragState.target.nodePath, translateFieldKey,
|
|
22743
|
+
setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals38.makeStaticDragOverride(value));
|
|
22631
22744
|
}
|
|
22632
22745
|
}
|
|
22633
22746
|
};
|
|
@@ -22813,9 +22926,9 @@ var SelectedOutlineScaleEdgeLine = ({
|
|
|
22813
22926
|
onSelect,
|
|
22814
22927
|
target
|
|
22815
22928
|
}) => {
|
|
22816
|
-
const { getDragOverrides } = useContext33(
|
|
22817
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(
|
|
22818
|
-
const timelinePosition =
|
|
22929
|
+
const { getDragOverrides } = useContext33(Internals38.VisualModeDragOverridesContext);
|
|
22930
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(Internals38.VisualModeSettersContext);
|
|
22931
|
+
const timelinePosition = Internals38.Timeline.useTimelinePosition();
|
|
22819
22932
|
const timelinePositionRef = useRef30(timelinePosition);
|
|
22820
22933
|
timelinePositionRef.current = timelinePosition;
|
|
22821
22934
|
const scaleDrag = target?.scaleDrag ?? null;
|
|
@@ -22877,13 +22990,13 @@ var SelectedOutlineScaleEdgeLine = ({
|
|
|
22877
22990
|
throw new Error("Expected scale drag value to be available");
|
|
22878
22991
|
}
|
|
22879
22992
|
if (dragState.target.propStatus.status === "keyframed") {
|
|
22880
|
-
setDragOverrides(dragState.target.nodePath, scaleFieldKey,
|
|
22993
|
+
setDragOverrides(dragState.target.nodePath, scaleFieldKey, Internals38.makeKeyframedDragOverride({
|
|
22881
22994
|
status: dragState.target.propStatus,
|
|
22882
22995
|
frame: dragState.sourceFrame,
|
|
22883
22996
|
value
|
|
22884
22997
|
}));
|
|
22885
22998
|
} else {
|
|
22886
|
-
setDragOverrides(dragState.target.nodePath, scaleFieldKey,
|
|
22999
|
+
setDragOverrides(dragState.target.nodePath, scaleFieldKey, Internals38.makeStaticDragOverride(value));
|
|
22887
23000
|
}
|
|
22888
23001
|
}
|
|
22889
23002
|
};
|
|
@@ -23005,10 +23118,10 @@ var SelectedOutlineRotationCornerHandle = ({
|
|
|
23005
23118
|
onSelect,
|
|
23006
23119
|
target
|
|
23007
23120
|
}) => {
|
|
23008
|
-
const { getDragOverrides } = useContext33(
|
|
23009
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(
|
|
23121
|
+
const { getDragOverrides } = useContext33(Internals38.VisualModeDragOverridesContext);
|
|
23122
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext33(Internals38.VisualModeSettersContext);
|
|
23010
23123
|
const { editorSnapping } = useContext33(EditorSnappingContext);
|
|
23011
|
-
const timelinePosition =
|
|
23124
|
+
const timelinePosition = Internals38.Timeline.useTimelinePosition();
|
|
23012
23125
|
const timelinePositionRef = useRef30(timelinePosition);
|
|
23013
23126
|
timelinePositionRef.current = timelinePosition;
|
|
23014
23127
|
const rotationDrag = target?.rotationDrag ?? null;
|
|
@@ -23075,13 +23188,13 @@ var SelectedOutlineRotationCornerHandle = ({
|
|
|
23075
23188
|
throw new Error("Expected rotation drag value to be available");
|
|
23076
23189
|
}
|
|
23077
23190
|
if (dragState.target.propStatus.status === "keyframed") {
|
|
23078
|
-
setDragOverrides(dragState.target.nodePath, rotateFieldKey,
|
|
23191
|
+
setDragOverrides(dragState.target.nodePath, rotateFieldKey, Internals38.makeKeyframedDragOverride({
|
|
23079
23192
|
status: dragState.target.propStatus,
|
|
23080
23193
|
frame: dragState.sourceFrame,
|
|
23081
23194
|
value
|
|
23082
23195
|
}));
|
|
23083
23196
|
} else {
|
|
23084
|
-
setDragOverrides(dragState.target.nodePath, rotateFieldKey,
|
|
23197
|
+
setDragOverrides(dragState.target.nodePath, rotateFieldKey, Internals38.makeStaticDragOverride(value));
|
|
23085
23198
|
}
|
|
23086
23199
|
}
|
|
23087
23200
|
};
|
|
@@ -23247,12 +23360,12 @@ var SelectedOutlineElement = ({
|
|
|
23247
23360
|
target
|
|
23248
23361
|
}) => {
|
|
23249
23362
|
const { previewServerState } = useContext33(StudioServerConnectionCtx);
|
|
23250
|
-
const { setPropStatuses } = useContext33(
|
|
23251
|
-
const updateResolvedStackTrace = useContext33(
|
|
23363
|
+
const { setPropStatuses } = useContext33(Internals38.VisualModeSettersContext);
|
|
23364
|
+
const updateResolvedStackTrace = useContext33(Internals38.SequenceStackTracesUpdateContext);
|
|
23252
23365
|
const confirm = useConfirmationDialog();
|
|
23253
23366
|
const selectAsset = useSelectAsset();
|
|
23254
23367
|
const selectComposition = useSelectComposition();
|
|
23255
|
-
const { compositions } = useContext33(
|
|
23368
|
+
const { compositions } = useContext33(Internals38.CompositionManager);
|
|
23256
23369
|
const { setSelectedModal } = useContext33(ModalsContext);
|
|
23257
23370
|
const resolveOriginalLocation = React66.useCallback(async (resolveTarget) => {
|
|
23258
23371
|
const stack2 = resolveTarget.sequence.getStack();
|
|
@@ -23481,7 +23594,7 @@ var SelectedOutlineElement = ({
|
|
|
23481
23594
|
|
|
23482
23595
|
// src/components/SelectedOutlineUvControls.tsx
|
|
23483
23596
|
import React67, { useContext as useContext34, useMemo as useMemo55 } from "react";
|
|
23484
|
-
import { Internals as
|
|
23597
|
+
import { Internals as Internals39 } from "remotion";
|
|
23485
23598
|
import { jsx as jsx90, jsxs as jsxs39, Fragment as Fragment18 } from "react/jsx-runtime";
|
|
23486
23599
|
var getSvgPointFromPointerEvent = ({
|
|
23487
23600
|
event,
|
|
@@ -23642,7 +23755,7 @@ var getLocalEllipseWidthProgress = ({
|
|
|
23642
23755
|
}) / (width / 2);
|
|
23643
23756
|
};
|
|
23644
23757
|
var SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) => {
|
|
23645
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(
|
|
23758
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals39.VisualModeSettersContext);
|
|
23646
23759
|
const { startControl } = control;
|
|
23647
23760
|
const field = startControl?.field;
|
|
23648
23761
|
const onPointerDown = React67.useCallback((event) => {
|
|
@@ -23677,11 +23790,11 @@ var SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) => {
|
|
|
23677
23790
|
width: control.width
|
|
23678
23791
|
}), field.fieldSchema);
|
|
23679
23792
|
lastValue = nextValue;
|
|
23680
|
-
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ?
|
|
23793
|
+
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals39.makeKeyframedDragOverride({
|
|
23681
23794
|
status: field.propStatus,
|
|
23682
23795
|
frame: control.handle.sourceFrame,
|
|
23683
23796
|
value: nextValue
|
|
23684
|
-
}) :
|
|
23797
|
+
}) : Internals39.makeStaticDragOverride(nextValue));
|
|
23685
23798
|
};
|
|
23686
23799
|
const onPointerMove = (moveEvent) => {
|
|
23687
23800
|
moveEvent.preventDefault();
|
|
@@ -23751,7 +23864,7 @@ var SelectedUvEllipseStartHandle = ({ control, onDraggingChange, outline }) => {
|
|
|
23751
23864
|
});
|
|
23752
23865
|
};
|
|
23753
23866
|
var SelectedUvEllipseResizeHandle = ({ axis, control, onDraggingChange, outline }) => {
|
|
23754
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(
|
|
23867
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals39.VisualModeSettersContext);
|
|
23755
23868
|
const resizeControl = control.resize.find((item) => item.axis === axis);
|
|
23756
23869
|
const field = resizeControl?.field;
|
|
23757
23870
|
const onPointerDown = React67.useCallback((event) => {
|
|
@@ -23787,11 +23900,11 @@ var SelectedUvEllipseResizeHandle = ({ axis, control, onDraggingChange, outline
|
|
|
23787
23900
|
});
|
|
23788
23901
|
const nextValue = roundNumericUvEllipseValue(Math.max(0, axisValue * 2), field.fieldSchema);
|
|
23789
23902
|
lastValue = nextValue;
|
|
23790
|
-
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ?
|
|
23903
|
+
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals39.makeKeyframedDragOverride({
|
|
23791
23904
|
status: field.propStatus,
|
|
23792
23905
|
frame: control.handle.sourceFrame,
|
|
23793
23906
|
value: nextValue
|
|
23794
|
-
}) :
|
|
23907
|
+
}) : Internals39.makeStaticDragOverride(nextValue));
|
|
23795
23908
|
};
|
|
23796
23909
|
const onPointerMove = (moveEvent) => {
|
|
23797
23910
|
moveEvent.preventDefault();
|
|
@@ -23891,7 +24004,7 @@ var trimLineToCircleEdges = ({
|
|
|
23891
24004
|
};
|
|
23892
24005
|
};
|
|
23893
24006
|
var SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
|
|
23894
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(
|
|
24007
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals39.VisualModeSettersContext);
|
|
23895
24008
|
const { editorSnapping } = useContext34(EditorSnappingContext);
|
|
23896
24009
|
const { rotationControl } = control;
|
|
23897
24010
|
const field = rotationControl?.field;
|
|
@@ -23930,11 +24043,11 @@ var SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
|
|
|
23930
24043
|
});
|
|
23931
24044
|
lastValue = nextValue;
|
|
23932
24045
|
forceSpecificCursor(getRotationCursor(startCursorDegrees + cursorDelta));
|
|
23933
|
-
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ?
|
|
24046
|
+
setEffectDragOverrides(control.handle.nodePath, control.handle.effectIndex, field.fieldKey, field.propStatus.status === "keyframed" ? Internals39.makeKeyframedDragOverride({
|
|
23934
24047
|
status: field.propStatus,
|
|
23935
24048
|
frame: control.handle.sourceFrame,
|
|
23936
24049
|
value: nextValue
|
|
23937
|
-
}) :
|
|
24050
|
+
}) : Internals39.makeStaticDragOverride(nextValue));
|
|
23938
24051
|
};
|
|
23939
24052
|
const onPointerMove = (moveEvent) => {
|
|
23940
24053
|
moveEvent.preventDefault();
|
|
@@ -24051,7 +24164,7 @@ var SelectedUvEllipseRotationHandle = ({ control, onDraggingChange }) => {
|
|
|
24051
24164
|
});
|
|
24052
24165
|
};
|
|
24053
24166
|
var SelectedUvHandleCircle = ({ handle, nodePathInfo, onDraggingChange, onSelect, outline }) => {
|
|
24054
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(
|
|
24167
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext34(Internals39.VisualModeSettersContext);
|
|
24055
24168
|
const { editorSnapping } = useContext34(EditorSnappingContext);
|
|
24056
24169
|
const position = useMemo55(() => getUvHandlePosition(outline.points, handle.value), [handle.value, outline.points]);
|
|
24057
24170
|
const onPointerDown = React67.useCallback((event) => {
|
|
@@ -24092,11 +24205,11 @@ var SelectedUvHandleCircle = ({ handle, nodePathInfo, onDraggingChange, onSelect
|
|
|
24092
24205
|
}) : rawUv;
|
|
24093
24206
|
const nextValue = roundUvCoordinate(constrainUv(snappedUv, handle.fieldSchema), handle.fieldSchema);
|
|
24094
24207
|
lastValue = nextValue;
|
|
24095
|
-
setEffectDragOverrides(handle.nodePath, handle.effectIndex, handle.fieldKey, handle.propStatus.status === "keyframed" ?
|
|
24208
|
+
setEffectDragOverrides(handle.nodePath, handle.effectIndex, handle.fieldKey, handle.propStatus.status === "keyframed" ? Internals39.makeKeyframedDragOverride({
|
|
24096
24209
|
status: handle.propStatus,
|
|
24097
24210
|
frame: handle.sourceFrame,
|
|
24098
24211
|
value: nextValue
|
|
24099
|
-
}) :
|
|
24212
|
+
}) : Internals39.makeStaticDragOverride(nextValue));
|
|
24100
24213
|
};
|
|
24101
24214
|
const updateDragFromPointerEvent = (pointerEvent) => {
|
|
24102
24215
|
if (!dragging) {
|
|
@@ -24539,19 +24652,19 @@ var SelectedOutlineOverlay = ({
|
|
|
24539
24652
|
translationY
|
|
24540
24653
|
}) => {
|
|
24541
24654
|
const { selectedItems, selectItem } = useTimelineSelection();
|
|
24542
|
-
const { sequences } = useContext35(
|
|
24543
|
-
const { canvasContent, compositions } = useContext35(
|
|
24544
|
-
const { propStatuses } = useContext35(
|
|
24655
|
+
const { sequences } = useContext35(Internals40.SequenceManager);
|
|
24656
|
+
const { canvasContent, compositions } = useContext35(Internals40.CompositionManager);
|
|
24657
|
+
const { propStatuses } = useContext35(Internals40.VisualModePropStatusesContext);
|
|
24545
24658
|
const { previewServerState } = useContext35(StudioServerConnectionCtx);
|
|
24546
|
-
const { overrideIdToNodePathMappings } = useContext35(
|
|
24547
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext35(
|
|
24548
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext35(
|
|
24659
|
+
const { overrideIdToNodePathMappings } = useContext35(Internals40.OverrideIdsToNodePathsGettersContext);
|
|
24660
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext35(Internals40.VisualModeDragOverridesContext);
|
|
24661
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext35(Internals40.VisualModeSettersContext);
|
|
24549
24662
|
const { getScaleLockState } = useContext35(ScaleLockContext);
|
|
24550
24663
|
const { editorShowOutlines } = useContext35(EditorShowOutlinesContext);
|
|
24551
24664
|
const { editorShowGuides, guidesList } = useContext35(EditorShowGuidesContext);
|
|
24552
24665
|
const { frameBack, frameForward, getCurrentFrame: getCurrentFrame2, seek } = PlayerInternals10.usePlayer();
|
|
24553
24666
|
const keybindings = useKeybinding();
|
|
24554
|
-
const timelinePosition =
|
|
24667
|
+
const timelinePosition = Internals40.Timeline.useTimelinePosition();
|
|
24555
24668
|
const [outlines, setOutlines] = useState41([]);
|
|
24556
24669
|
const [hoveredOutlineKey, setHoveredOutlineKey] = useState41(null);
|
|
24557
24670
|
const [draggingOutline, setDraggingOutline] = useState41(false);
|
|
@@ -24596,7 +24709,7 @@ var SelectedOutlineOverlay = ({
|
|
|
24596
24709
|
const containsSelection = sequenceKeysContainingSelection.has(key3);
|
|
24597
24710
|
const nodePath = nodePathInfo.sequenceSubscriptionKey;
|
|
24598
24711
|
const { controls } = sequence;
|
|
24599
|
-
const nodePropStatuses =
|
|
24712
|
+
const nodePropStatuses = Internals40.getPropStatusesCtx(propStatuses, nodePath);
|
|
24600
24713
|
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
24601
24714
|
const dragOverrides = getDragOverrides(nodePath) ?? {};
|
|
24602
24715
|
const activeSchema = controls ? getSelectedOutlineActiveSchema({
|
|
@@ -24614,7 +24727,7 @@ var SelectedOutlineOverlay = ({
|
|
|
24614
24727
|
const rotationPropStatus = nodePropStatuses?.[rotateFieldKey];
|
|
24615
24728
|
const transformOriginFieldSchema = activeSchema?.[transformOriginFieldKey];
|
|
24616
24729
|
const transformOriginPropStatus = nodePropStatuses?.[transformOriginFieldKey];
|
|
24617
|
-
const transformOriginValueForRotation = transformOriginFieldSchema?.type === "transform-origin" && (transformOriginPropStatus?.status === "static" || transformOriginPropStatus?.status === "keyframed") ? String(
|
|
24730
|
+
const transformOriginValueForRotation = transformOriginFieldSchema?.type === "transform-origin" && (transformOriginPropStatus?.status === "static" || transformOriginPropStatus?.status === "keyframed") ? String(Internals40.getEffectiveVisualModeValue({
|
|
24618
24731
|
propStatus: transformOriginPropStatus,
|
|
24619
24732
|
dragOverrideValue: dragOverrides[transformOriginFieldKey],
|
|
24620
24733
|
defaultValue: transformOriginFieldSchema.default,
|
|
@@ -24665,7 +24778,7 @@ var SelectedOutlineOverlay = ({
|
|
|
24665
24778
|
fieldKey: scaleFieldKey,
|
|
24666
24779
|
defaultValue: (() => {
|
|
24667
24780
|
const dragOverrideValue = dragOverrides[scaleFieldKey];
|
|
24668
|
-
const effectiveValue =
|
|
24781
|
+
const effectiveValue = Internals40.getEffectiveVisualModeValue({
|
|
24669
24782
|
propStatus: scalePropStatus,
|
|
24670
24783
|
dragOverrideValue,
|
|
24671
24784
|
defaultValue: scaleFieldSchema.default,
|
|
@@ -24694,21 +24807,21 @@ var SelectedOutlineOverlay = ({
|
|
|
24694
24807
|
nodePath,
|
|
24695
24808
|
originDefault: transformOriginFieldSchema.default,
|
|
24696
24809
|
originPropStatus: transformOriginPropStatus,
|
|
24697
|
-
originValue: String(
|
|
24810
|
+
originValue: String(Internals40.getEffectiveVisualModeValue({
|
|
24698
24811
|
propStatus: transformOriginPropStatus,
|
|
24699
24812
|
dragOverrideValue: dragOverrides[transformOriginFieldKey],
|
|
24700
24813
|
defaultValue: transformOriginFieldSchema.default,
|
|
24701
24814
|
frame: transformOriginSourceFrame,
|
|
24702
24815
|
shouldResortToDefaultValueIfUndefined: true
|
|
24703
24816
|
}) ?? transformOriginFieldSchema.default),
|
|
24704
|
-
rotateValue: String(rotationPropStatus?.status === "static" || rotationPropStatus?.status === "keyframed" ?
|
|
24817
|
+
rotateValue: String(rotationPropStatus?.status === "static" || rotationPropStatus?.status === "keyframed" ? Internals40.getEffectiveVisualModeValue({
|
|
24705
24818
|
propStatus: rotationPropStatus,
|
|
24706
24819
|
dragOverrideValue: dragOverrides[rotateFieldKey],
|
|
24707
24820
|
defaultValue: rotationFieldSchema?.type === "rotation-css" ? rotationFieldSchema.default : "0deg",
|
|
24708
24821
|
frame: transformOriginSourceFrame,
|
|
24709
24822
|
shouldResortToDefaultValueIfUndefined: true
|
|
24710
24823
|
}) ?? "0deg" : "0deg"),
|
|
24711
|
-
scaleValue: scalePropStatus?.status === "static" || scalePropStatus?.status === "keyframed" ? String(
|
|
24824
|
+
scaleValue: scalePropStatus?.status === "static" || scalePropStatus?.status === "keyframed" ? String(Internals40.getEffectiveVisualModeValue({
|
|
24712
24825
|
propStatus: scalePropStatus,
|
|
24713
24826
|
dragOverrideValue: dragOverrides[scaleFieldKey],
|
|
24714
24827
|
defaultValue: scaleFieldSchema?.type === "scale" ? scaleFieldSchema.default : 1,
|
|
@@ -24719,7 +24832,7 @@ var SelectedOutlineOverlay = ({
|
|
|
24719
24832
|
sourceFrame: transformOriginSourceFrame,
|
|
24720
24833
|
translateDefault: fieldSchema.default,
|
|
24721
24834
|
translatePropStatus: propStatus,
|
|
24722
|
-
translateValue: String(
|
|
24835
|
+
translateValue: String(Internals40.getEffectiveVisualModeValue({
|
|
24723
24836
|
propStatus,
|
|
24724
24837
|
dragOverrideValue: dragOverrides[translateFieldKey],
|
|
24725
24838
|
defaultValue: fieldSchema.default,
|
|
@@ -24955,13 +25068,13 @@ var SelectedOutlineOverlay = ({
|
|
|
24955
25068
|
throw new Error("Expected drag value to be available");
|
|
24956
25069
|
}
|
|
24957
25070
|
if (dragState.target.propStatus.status === "keyframed") {
|
|
24958
|
-
setDragOverrides(dragState.target.nodePath, translateFieldKey,
|
|
25071
|
+
setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals40.makeKeyframedDragOverride({
|
|
24959
25072
|
status: dragState.target.propStatus,
|
|
24960
25073
|
frame: dragState.sourceFrame,
|
|
24961
25074
|
value
|
|
24962
25075
|
}));
|
|
24963
25076
|
} else {
|
|
24964
|
-
setDragOverrides(dragState.target.nodePath, translateFieldKey,
|
|
25077
|
+
setDragOverrides(dragState.target.nodePath, translateFieldKey, Internals40.makeStaticDragOverride(value));
|
|
24965
25078
|
}
|
|
24966
25079
|
}
|
|
24967
25080
|
}, [
|
|
@@ -25228,7 +25341,7 @@ var VideoPreview = ({
|
|
|
25228
25341
|
});
|
|
25229
25342
|
};
|
|
25230
25343
|
var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
|
|
25231
|
-
const { size: previewSize } = useContext37(
|
|
25344
|
+
const { size: previewSize } = useContext37(Internals41.PreviewSizeContext);
|
|
25232
25345
|
const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo57(() => {
|
|
25233
25346
|
if (contentDimensions === "none") {
|
|
25234
25347
|
return {
|
|
@@ -25339,9 +25452,9 @@ var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) =
|
|
|
25339
25452
|
]);
|
|
25340
25453
|
useEffect41(() => {
|
|
25341
25454
|
const { current } = portalContainer;
|
|
25342
|
-
current?.appendChild(
|
|
25455
|
+
current?.appendChild(Internals41.portalNode());
|
|
25343
25456
|
return () => {
|
|
25344
|
-
current?.removeChild(
|
|
25457
|
+
current?.removeChild(Internals41.portalNode());
|
|
25345
25458
|
};
|
|
25346
25459
|
}, []);
|
|
25347
25460
|
const onPointerDown = useCallback49((event) => {
|
|
@@ -25512,7 +25625,7 @@ var getDropPosition = ({
|
|
|
25512
25625
|
if (contentDimensions === null || contentDimensions === "none") {
|
|
25513
25626
|
return null;
|
|
25514
25627
|
}
|
|
25515
|
-
const scale =
|
|
25628
|
+
const scale = Internals42.calculateScale({
|
|
25516
25629
|
canvasSize: size2,
|
|
25517
25630
|
compositionHeight: contentDimensions.height,
|
|
25518
25631
|
compositionWidth: contentDimensions.width,
|
|
@@ -25542,7 +25655,7 @@ var isDragEventInsideCanvas = (event) => {
|
|
|
25542
25655
|
return event.clientX >= rect.left && event.clientX <= rect.right && event.clientY >= rect.top && event.clientY <= rect.bottom;
|
|
25543
25656
|
};
|
|
25544
25657
|
var Canvas = ({ canvasContent, size: size2 }) => {
|
|
25545
|
-
const { setSize, size: previewSize } = useContext38(
|
|
25658
|
+
const { setSize, size: previewSize } = useContext38(Internals42.PreviewSizeContext);
|
|
25546
25659
|
const { editorZoomGestures } = useContext38(EditorZoomGesturesContext);
|
|
25547
25660
|
const previewSnapshotRef = useRef33({
|
|
25548
25661
|
previewSize,
|
|
@@ -25554,10 +25667,10 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
25554
25667
|
const touchPinchRef = useRef33(null);
|
|
25555
25668
|
const keybindings = useKeybinding();
|
|
25556
25669
|
const confirm = useConfirmationDialog();
|
|
25557
|
-
const config =
|
|
25670
|
+
const config = Internals42.useUnsafeVideoConfig();
|
|
25558
25671
|
const areRulersVisible = useIsRulerVisible();
|
|
25559
25672
|
const { editorShowGuides } = useContext38(EditorShowGuidesContext);
|
|
25560
|
-
const { compositions } = useContext38(
|
|
25673
|
+
const { compositions } = useContext38(Internals42.CompositionManager);
|
|
25561
25674
|
const { previewServerState, subscribeToEvent } = useContext38(StudioServerConnectionCtx);
|
|
25562
25675
|
const previewServerClientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
|
|
25563
25676
|
const [isAddingAsset, setIsAddingAsset] = useState42(false);
|
|
@@ -25617,7 +25730,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
25617
25730
|
}
|
|
25618
25731
|
ev.preventDefault();
|
|
25619
25732
|
setSize((prevSize) => {
|
|
25620
|
-
const scale =
|
|
25733
|
+
const scale = Internals42.calculateScale({
|
|
25621
25734
|
canvasSize: size2,
|
|
25622
25735
|
compositionHeight: contentDimensions.height,
|
|
25623
25736
|
compositionWidth: contentDimensions.width,
|
|
@@ -25690,7 +25803,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
25690
25803
|
}
|
|
25691
25804
|
e.preventDefault();
|
|
25692
25805
|
suppressWheelFromWebKitPinchRef.current = true;
|
|
25693
|
-
const fitted =
|
|
25806
|
+
const fitted = Internals42.calculateScale({
|
|
25694
25807
|
canvasSize: canvasSz,
|
|
25695
25808
|
compositionHeight: cdim.height,
|
|
25696
25809
|
compositionWidth: cdim.width,
|
|
@@ -25710,7 +25823,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
25710
25823
|
const dimensions = cdim;
|
|
25711
25824
|
e.preventDefault();
|
|
25712
25825
|
setSize((prevSize) => {
|
|
25713
|
-
const scale =
|
|
25826
|
+
const scale = Internals42.calculateScale({
|
|
25714
25827
|
canvasSize: canvasSz,
|
|
25715
25828
|
compositionHeight: dimensions.height,
|
|
25716
25829
|
compositionWidth: dimensions.width,
|
|
@@ -25765,7 +25878,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
25765
25878
|
if (initialDistance < 0.000001) {
|
|
25766
25879
|
return;
|
|
25767
25880
|
}
|
|
25768
|
-
const fitted =
|
|
25881
|
+
const fitted = Internals42.calculateScale({
|
|
25769
25882
|
canvasSize: snap.canvasSize,
|
|
25770
25883
|
compositionHeight: snap.contentDimensions.height,
|
|
25771
25884
|
compositionWidth: snap.contentDimensions.width,
|
|
@@ -25789,7 +25902,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
25789
25902
|
setSize((prevSize) => {
|
|
25790
25903
|
const canvasSz = snap.canvasSize;
|
|
25791
25904
|
const cdim = snap.contentDimensions;
|
|
25792
|
-
const scale =
|
|
25905
|
+
const scale = Internals42.calculateScale({
|
|
25793
25906
|
canvasSize: canvasSz,
|
|
25794
25907
|
compositionHeight: cdim.height,
|
|
25795
25908
|
compositionWidth: cdim.width,
|
|
@@ -25842,7 +25955,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
25842
25955
|
return;
|
|
25843
25956
|
}
|
|
25844
25957
|
setSize((prevSize) => {
|
|
25845
|
-
const scale =
|
|
25958
|
+
const scale = Internals42.calculateScale({
|
|
25846
25959
|
canvasSize: size2,
|
|
25847
25960
|
compositionHeight: contentDimensions.height,
|
|
25848
25961
|
compositionWidth: contentDimensions.width,
|
|
@@ -25865,7 +25978,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
25865
25978
|
return;
|
|
25866
25979
|
}
|
|
25867
25980
|
setSize((prevSize) => {
|
|
25868
|
-
const scale =
|
|
25981
|
+
const scale = Internals42.calculateScale({
|
|
25869
25982
|
canvasSize: size2,
|
|
25870
25983
|
compositionHeight: contentDimensions.height,
|
|
25871
25984
|
compositionWidth: contentDimensions.width,
|
|
@@ -26129,6 +26242,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
26129
26242
|
files,
|
|
26130
26243
|
compositionFile,
|
|
26131
26244
|
compositionId: currentCompositionId,
|
|
26245
|
+
destinationDimensions: contentDimensions === "none" ? null : contentDimensions,
|
|
26132
26246
|
dropPosition
|
|
26133
26247
|
});
|
|
26134
26248
|
} else if (isAssetDragEvent(event)) {
|
|
@@ -26140,6 +26254,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
26140
26254
|
assetPaths: [assetPath],
|
|
26141
26255
|
compositionFile,
|
|
26142
26256
|
compositionId: currentCompositionId,
|
|
26257
|
+
destinationDimensions: contentDimensions === "none" ? null : contentDimensions,
|
|
26143
26258
|
dropPosition
|
|
26144
26259
|
});
|
|
26145
26260
|
} else if (isSfxDragEvent(event)) {
|
|
@@ -26193,6 +26308,7 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
26193
26308
|
url,
|
|
26194
26309
|
compositionFile,
|
|
26195
26310
|
compositionId: currentCompositionId,
|
|
26311
|
+
destinationDimensions: contentDimensions === "none" ? null : contentDimensions,
|
|
26196
26312
|
dropPosition
|
|
26197
26313
|
});
|
|
26198
26314
|
}
|
|
@@ -26257,17 +26373,17 @@ var Canvas = ({ canvasContent, size: size2 }) => {
|
|
|
26257
26373
|
|
|
26258
26374
|
// src/components/FramePersistor.tsx
|
|
26259
26375
|
import { useEffect as useEffect43 } from "react";
|
|
26260
|
-
import { Internals as
|
|
26376
|
+
import { Internals as Internals43, useVideoConfig as useVideoConfig2 } from "remotion";
|
|
26261
26377
|
var FramePersistor = () => {
|
|
26262
|
-
const [playing] =
|
|
26378
|
+
const [playing] = Internals43.Timeline.usePlayingState();
|
|
26263
26379
|
const config = useVideoConfig2();
|
|
26264
|
-
const frame2 =
|
|
26265
|
-
const setFrame =
|
|
26380
|
+
const frame2 = Internals43.Timeline.useTimelinePosition();
|
|
26381
|
+
const setFrame = Internals43.useTimelineSetFrame();
|
|
26266
26382
|
useEffect43(() => {
|
|
26267
26383
|
if (!playing) {
|
|
26268
26384
|
setFrame((f) => {
|
|
26269
26385
|
const newObj = f[config.id] === frame2 ? f : { ...f, [config.id]: frame2 };
|
|
26270
|
-
|
|
26386
|
+
Internals43.persistCurrentFrame(newObj);
|
|
26271
26387
|
return newObj;
|
|
26272
26388
|
});
|
|
26273
26389
|
}
|
|
@@ -26359,9 +26475,9 @@ var container19 = {
|
|
|
26359
26475
|
flexDirection: "column"
|
|
26360
26476
|
};
|
|
26361
26477
|
var CanvasOrLoading = ({ size: size2 }) => {
|
|
26362
|
-
const resolved =
|
|
26478
|
+
const resolved = Internals44.useResolvedVideoConfig(null);
|
|
26363
26479
|
const { setZoom } = useContext39(TimelineZoomCtx);
|
|
26364
|
-
const { canvasContent } = useContext39(
|
|
26480
|
+
const { canvasContent } = useContext39(Internals44.CompositionManager);
|
|
26365
26481
|
const { error: renderError } = useContext39(RenderErrorContext);
|
|
26366
26482
|
useEffect44(() => {
|
|
26367
26483
|
if (resolved?.type !== "success" && resolved?.type !== "success-and-refreshing") {
|
|
@@ -26450,7 +26566,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
|
|
|
26450
26566
|
canHaveDismissButton: false,
|
|
26451
26567
|
keyboardShortcuts: true,
|
|
26452
26568
|
error,
|
|
26453
|
-
onRetry: () =>
|
|
26569
|
+
onRetry: () => Internals44.resolveCompositionsRef.current?.reloadCurrentlySelectedComposition(),
|
|
26454
26570
|
calculateMetadata: calculateMetadataContext
|
|
26455
26571
|
}, error.stack)
|
|
26456
26572
|
});
|
|
@@ -26460,7 +26576,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
|
|
|
26460
26576
|
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
26461
26577
|
var CanvasIfSizeIsAvailable = () => {
|
|
26462
26578
|
const rulersAreVisible = useIsRulerVisible();
|
|
26463
|
-
const context = useContext40(
|
|
26579
|
+
const context = useContext40(Internals45.CurrentScaleContext);
|
|
26464
26580
|
const sizeWithRulersApplied = useMemo59(() => {
|
|
26465
26581
|
const size2 = context && context.type === "canvas-size" ? context.canvasSize : null;
|
|
26466
26582
|
if (!rulersAreVisible) {
|
|
@@ -26481,7 +26597,7 @@ var CanvasIfSizeIsAvailable = () => {
|
|
|
26481
26597
|
|
|
26482
26598
|
// src/components/CurrentCompositionSideEffects.tsx
|
|
26483
26599
|
import { useContext as useContext41, useEffect as useEffect45 } from "react";
|
|
26484
|
-
import { Internals as
|
|
26600
|
+
import { Internals as Internals46 } from "remotion";
|
|
26485
26601
|
|
|
26486
26602
|
// src/helpers/document-title.ts
|
|
26487
26603
|
import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
|
|
@@ -26536,7 +26652,7 @@ var getProgressInBrackets = (selectedCompositionId, jobs) => {
|
|
|
26536
26652
|
// src/components/CurrentCompositionSideEffects.tsx
|
|
26537
26653
|
var TitleUpdater = () => {
|
|
26538
26654
|
const renderQueue = useContext41(RenderQueueContext);
|
|
26539
|
-
const { canvasContent } = useContext41(
|
|
26655
|
+
const { canvasContent } = useContext41(Internals46.CompositionManager);
|
|
26540
26656
|
const { jobs } = renderQueue;
|
|
26541
26657
|
useEffect45(() => {
|
|
26542
26658
|
if (!canvasContent) {
|
|
@@ -26629,7 +26745,7 @@ import {
|
|
|
26629
26745
|
useRef as useRef35,
|
|
26630
26746
|
useState as useState43
|
|
26631
26747
|
} from "react";
|
|
26632
|
-
import { Internals as
|
|
26748
|
+
import { Internals as Internals47 } from "remotion";
|
|
26633
26749
|
import { NoReactInternals as NoReactInternals16 } from "remotion/no-react";
|
|
26634
26750
|
|
|
26635
26751
|
// src/api/delete-static-file.ts
|
|
@@ -26869,8 +26985,8 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
|
|
|
26869
26985
|
const onPointerEnter = useCallback53(() => {
|
|
26870
26986
|
setHovered(true);
|
|
26871
26987
|
}, []);
|
|
26872
|
-
const { setCanvasContent } = useContext42(
|
|
26873
|
-
const { canvasContent } = useContext42(
|
|
26988
|
+
const { setCanvasContent } = useContext42(Internals47.CompositionSetters);
|
|
26989
|
+
const { canvasContent } = useContext42(Internals47.CompositionManager);
|
|
26874
26990
|
const relativePath = useMemo61(() => {
|
|
26875
26991
|
return parentFolder ? parentFolder + "/" + item.name : item.name;
|
|
26876
26992
|
}, [parentFolder, item.name]);
|
|
@@ -27309,10 +27425,10 @@ var AssetSelector = ({ readOnlyStudio }) => {
|
|
|
27309
27425
|
|
|
27310
27426
|
// src/components/CompSelectorRef.tsx
|
|
27311
27427
|
import { useCallback as useCallback55, useContext as useContext44, useImperativeHandle as useImperativeHandle9, useMemo as useMemo63 } from "react";
|
|
27312
|
-
import { Internals as
|
|
27428
|
+
import { Internals as Internals48 } from "remotion";
|
|
27313
27429
|
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
27314
27430
|
var CompSelectorRef = ({ children }) => {
|
|
27315
|
-
const { compositions } = useContext44(
|
|
27431
|
+
const { compositions } = useContext44(Internals48.CompositionManager);
|
|
27316
27432
|
const { compositionFoldersExpanded, setCompositionFoldersExpanded } = useContext44(FolderContext);
|
|
27317
27433
|
const selectComposition = useSelectComposition();
|
|
27318
27434
|
const toggleFolder = useCallback55((folderName, parentName) => {
|
|
@@ -27323,7 +27439,7 @@ var CompSelectorRef = ({ children }) => {
|
|
|
27323
27439
|
return foldersExpandedState;
|
|
27324
27440
|
});
|
|
27325
27441
|
}, [setCompositionFoldersExpanded]);
|
|
27326
|
-
useImperativeHandle9(
|
|
27442
|
+
useImperativeHandle9(Internals48.compositionSelectorRef, () => {
|
|
27327
27443
|
return {
|
|
27328
27444
|
expandComposition: (compName) => {
|
|
27329
27445
|
const compositionToExpand = compositions.find((c) => c.id === compName);
|
|
@@ -27580,13 +27696,13 @@ import React76, {
|
|
|
27580
27696
|
useMemo as useMemo65,
|
|
27581
27697
|
useState as useState47
|
|
27582
27698
|
} from "react";
|
|
27583
|
-
import { Internals as
|
|
27699
|
+
import { Internals as Internals49 } from "remotion";
|
|
27584
27700
|
import { NoReactInternals as NoReactInternals17 } from "remotion/no-react";
|
|
27585
27701
|
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
27586
27702
|
var ObserveDefaultPropsContext = React76.createContext(null);
|
|
27587
27703
|
var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
|
|
27588
27704
|
const { previewServerState, subscribeToEvent } = useContext45(StudioServerConnectionCtx);
|
|
27589
|
-
const { updateProps } = useContext45(
|
|
27705
|
+
const { updateProps } = useContext45(Internals49.EditorPropsContext);
|
|
27590
27706
|
const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState47({});
|
|
27591
27707
|
const canSaveDefaultProps = useMemo65(() => {
|
|
27592
27708
|
if (compositionId === null) {
|
|
@@ -27666,7 +27782,7 @@ import {
|
|
|
27666
27782
|
useMemo as useMemo155,
|
|
27667
27783
|
useState as useState85
|
|
27668
27784
|
} from "react";
|
|
27669
|
-
import { Internals as
|
|
27785
|
+
import { Internals as Internals76 } from "remotion";
|
|
27670
27786
|
|
|
27671
27787
|
// src/components/get-zod-if-possible.tsx
|
|
27672
27788
|
import {
|
|
@@ -28193,7 +28309,7 @@ var InspectorDefaultPropsWarnings = ({ warnings }) => {
|
|
|
28193
28309
|
|
|
28194
28310
|
// src/components/InspectorPanel/DefaultInspector.tsx
|
|
28195
28311
|
import { useContext as useContext56, useEffect as useEffect61, useMemo as useMemo110, useState as useState70 } from "react";
|
|
28196
|
-
import { Internals as
|
|
28312
|
+
import { Internals as Internals55 } from "remotion";
|
|
28197
28313
|
|
|
28198
28314
|
// src/visual-controls/VisualControls.tsx
|
|
28199
28315
|
import {
|
|
@@ -28383,7 +28499,7 @@ var VisualControlsProvider = ({ children }) => {
|
|
|
28383
28499
|
// src/components/CurrentAsset.tsx
|
|
28384
28500
|
import { formatBytes as formatBytes2 } from "@remotion/studio-shared";
|
|
28385
28501
|
import { useCallback as useCallback62, useContext as useContext48, useMemo as useMemo70 } from "react";
|
|
28386
|
-
import { Internals as
|
|
28502
|
+
import { Internals as Internals51, staticFile as staticFile4 } from "remotion";
|
|
28387
28503
|
|
|
28388
28504
|
// src/helpers/format-media-duration.ts
|
|
28389
28505
|
var formatMediaDuration = (seconds) => {
|
|
@@ -28795,7 +28911,7 @@ var InspectorInfoSubtitle = ({ children }) => {
|
|
|
28795
28911
|
|
|
28796
28912
|
// src/components/NewComposition/use-rename-static-file.ts
|
|
28797
28913
|
import { useCallback as useCallback61, useContext as useContext47 } from "react";
|
|
28798
|
-
import { Internals as
|
|
28914
|
+
import { Internals as Internals50 } from "remotion";
|
|
28799
28915
|
|
|
28800
28916
|
// src/api/rename-static-file.ts
|
|
28801
28917
|
import { getRemotionEnvironment as getRemotionEnvironment5 } from "remotion";
|
|
@@ -28863,8 +28979,8 @@ var useRenameStaticFile = ({
|
|
|
28863
28979
|
relativePath,
|
|
28864
28980
|
staticFiles
|
|
28865
28981
|
}) => {
|
|
28866
|
-
const { canvasContent } = useContext47(
|
|
28867
|
-
const { setCanvasContent } = useContext47(
|
|
28982
|
+
const { canvasContent } = useContext47(Internals50.CompositionManager);
|
|
28983
|
+
const { setCanvasContent } = useContext47(Internals50.CompositionSetters);
|
|
28868
28984
|
return useCallback61(async (newName) => {
|
|
28869
28985
|
const newRelativePath = getRenamedStaticFilePath({
|
|
28870
28986
|
newName,
|
|
@@ -29006,7 +29122,7 @@ var AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStudio
|
|
|
29006
29122
|
});
|
|
29007
29123
|
};
|
|
29008
29124
|
var CurrentAsset = ({ readOnlyStudio }) => {
|
|
29009
|
-
const { canvasContent } = useContext48(
|
|
29125
|
+
const { canvasContent } = useContext48(Internals51.CompositionManager);
|
|
29010
29126
|
const assetName = canvasContent?.type === "asset" ? canvasContent.asset : null;
|
|
29011
29127
|
return /* @__PURE__ */ jsx115(AssetInfo, {
|
|
29012
29128
|
assetName,
|
|
@@ -29021,7 +29137,7 @@ import {
|
|
|
29021
29137
|
useEffect as useEffect52,
|
|
29022
29138
|
useMemo as useMemo75
|
|
29023
29139
|
} from "react";
|
|
29024
|
-
import { Internals as
|
|
29140
|
+
import { Internals as Internals53 } from "remotion";
|
|
29025
29141
|
|
|
29026
29142
|
// src/icons/react.tsx
|
|
29027
29143
|
import { jsx as jsx116 } from "react/jsx-runtime";
|
|
@@ -29058,10 +29174,10 @@ var resolvedStackToSymbolicated = (location2) => {
|
|
|
29058
29174
|
import { useCallback as useCallback63, useMemo as useMemo71 } from "react";
|
|
29059
29175
|
|
|
29060
29176
|
// src/helpers/validate-new-comp-data.ts
|
|
29061
|
-
import { Internals as
|
|
29177
|
+
import { Internals as Internals52 } from "remotion";
|
|
29062
29178
|
var validateCompositionName = (compName, compositions) => {
|
|
29063
|
-
if (!
|
|
29064
|
-
return
|
|
29179
|
+
if (!Internals52.isCompositionIdValid(compName)) {
|
|
29180
|
+
return Internals52.invalidCompositionErrorMessage;
|
|
29065
29181
|
}
|
|
29066
29182
|
if (compositions.find((c) => c.id === compName)) {
|
|
29067
29183
|
return `A composition with that name already exists.`;
|
|
@@ -29402,8 +29518,8 @@ var renderReactIcon = (color) => {
|
|
|
29402
29518
|
});
|
|
29403
29519
|
};
|
|
29404
29520
|
var CurrentComposition = () => {
|
|
29405
|
-
const video =
|
|
29406
|
-
const { compositions } = useContext49(
|
|
29521
|
+
const video = Internals53.useVideo();
|
|
29522
|
+
const { compositions } = useContext49(Internals53.CompositionManager);
|
|
29407
29523
|
const currentComposition = useMemo75(() => {
|
|
29408
29524
|
if (!video) {
|
|
29409
29525
|
return null;
|
|
@@ -34773,7 +34889,7 @@ var VisualControlsContent = () => {
|
|
|
34773
34889
|
|
|
34774
34890
|
// src/components/InspectorPanel/CompositionDimensions.tsx
|
|
34775
34891
|
import { useCallback as useCallback99, useEffect as useEffect60, useMemo as useMemo109, useRef as useRef45, useState as useState69 } from "react";
|
|
34776
|
-
import { Internals as
|
|
34892
|
+
import { Internals as Internals54 } from "remotion";
|
|
34777
34893
|
|
|
34778
34894
|
// src/components/InspectorPanel/optimistic-composition-metadata.ts
|
|
34779
34895
|
var removePendingValue = ({
|
|
@@ -34954,8 +35070,8 @@ var CompositionMetadataValue = ({
|
|
|
34954
35070
|
});
|
|
34955
35071
|
};
|
|
34956
35072
|
var CompositionDimensions = ({ compositionId, disabled, stack: stack2 }) => {
|
|
34957
|
-
const video =
|
|
34958
|
-
const resolvedVideoConfig =
|
|
35073
|
+
const video = Internals54.useVideo();
|
|
35074
|
+
const resolvedVideoConfig = Internals54.useResolvedVideoConfig(compositionId);
|
|
34959
35075
|
const resolvedConfig = resolvedVideoConfig?.type === "success" || resolvedVideoConfig?.type === "success-and-refreshing" ? resolvedVideoConfig.result : null;
|
|
34960
35076
|
const resolvedConfigRef = useRef45(resolvedConfig);
|
|
34961
35077
|
resolvedConfigRef.current = resolvedConfig;
|
|
@@ -35079,7 +35195,7 @@ var CompositionDimensions = ({ compositionId, disabled, stack: stack2 }) => {
|
|
|
35079
35195
|
// src/components/InspectorPanel/DefaultInspector.tsx
|
|
35080
35196
|
import { jsx as jsx174, jsxs as jsxs93, Fragment as Fragment29 } from "react/jsx-runtime";
|
|
35081
35197
|
var DefaultInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
|
|
35082
|
-
const { canvasContent } = useContext56(
|
|
35198
|
+
const { canvasContent } = useContext56(Internals55.CompositionManager);
|
|
35083
35199
|
const hasSelectedAsset = canvasContent?.type === "asset";
|
|
35084
35200
|
const z = useZodIfPossible();
|
|
35085
35201
|
const canSaveDefaultProps = useContext56(ObserveDefaultPropsContext);
|
|
@@ -35265,7 +35381,7 @@ var getSameSequenceInspectorSelection = (selections) => {
|
|
|
35265
35381
|
|
|
35266
35382
|
// src/components/InspectorPanel/EasingInspector.tsx
|
|
35267
35383
|
import { useCallback as useCallback109, useContext as useContext68, useMemo as useMemo121 } from "react";
|
|
35268
|
-
import { Internals as
|
|
35384
|
+
import { Internals as Internals64, useVideoConfig as useVideoConfig6 } from "remotion";
|
|
35269
35385
|
|
|
35270
35386
|
// src/state/render-frame.ts
|
|
35271
35387
|
var renderFrame = (frame2, fps) => {
|
|
@@ -35298,7 +35414,7 @@ import {
|
|
|
35298
35414
|
useRef as useRef46,
|
|
35299
35415
|
useState as useState71
|
|
35300
35416
|
} from "react";
|
|
35301
|
-
import { Easing, Internals as
|
|
35417
|
+
import { Easing, Internals as Internals56 } from "remotion";
|
|
35302
35418
|
import { jsx as jsx175, jsxs as jsxs94, Fragment as Fragment30 } from "react/jsx-runtime";
|
|
35303
35419
|
var SVG_WIDTH = 560;
|
|
35304
35420
|
var SVG_HEIGHT = 320;
|
|
@@ -35533,14 +35649,14 @@ var areEasingsEqual = (first, second) => {
|
|
|
35533
35649
|
}
|
|
35534
35650
|
};
|
|
35535
35651
|
var getEasingUpdateTargetKey = (update) => {
|
|
35536
|
-
const nodePathKey =
|
|
35652
|
+
const nodePathKey = Internals56.makeSequencePropsSubscriptionKey(update.nodePath);
|
|
35537
35653
|
if (update.type === "sequence") {
|
|
35538
35654
|
return `sequence:${nodePathKey}:${update.fieldKey}:${update.segmentIndex}`;
|
|
35539
35655
|
}
|
|
35540
35656
|
return `effect:${nodePathKey}:${update.effectIndex}:${update.fieldKey}:${update.segmentIndex}`;
|
|
35541
35657
|
};
|
|
35542
35658
|
var getBuiltInVisualStyleFieldSchema = (fieldKey) => {
|
|
35543
|
-
const transformSchema =
|
|
35659
|
+
const transformSchema = Internals56.transformSchema;
|
|
35544
35660
|
const directField = transformSchema[fieldKey];
|
|
35545
35661
|
if (directField) {
|
|
35546
35662
|
return directField;
|
|
@@ -35722,16 +35838,16 @@ var EasingPresetButton = ({ currentEasing, disabled, onClick, preset }) => {
|
|
|
35722
35838
|
};
|
|
35723
35839
|
var EasingEditor = ({ state, renderHeader }) => {
|
|
35724
35840
|
const { previewServerState } = useContext57(StudioServerConnectionCtx);
|
|
35725
|
-
const sequencesRef = useContext57(
|
|
35726
|
-
const propStatusesRef = useContext57(
|
|
35841
|
+
const sequencesRef = useContext57(Internals56.SequenceManagerRefContext);
|
|
35842
|
+
const propStatusesRef = useContext57(Internals56.VisualModePropStatusesRefContext);
|
|
35727
35843
|
const {
|
|
35728
35844
|
setDragOverrides,
|
|
35729
35845
|
clearDragOverrides,
|
|
35730
35846
|
setEffectDragOverrides,
|
|
35731
35847
|
clearEffectDragOverrides,
|
|
35732
35848
|
setPropStatuses
|
|
35733
|
-
} = useContext57(
|
|
35734
|
-
const { overrideIdToNodePathMappings } = useContext57(
|
|
35849
|
+
} = useContext57(Internals56.VisualModeSettersContext);
|
|
35850
|
+
const { overrideIdToNodePathMappings } = useContext57(Internals56.OverrideIdsToNodePathsGettersContext);
|
|
35735
35851
|
const svgRef = useRef46(null);
|
|
35736
35852
|
const [mode, setMode] = useState71(() => easingToMode(state.initialEasing));
|
|
35737
35853
|
const [bezier, setBezier] = useState71(() => easingToBezier(state.initialEasing));
|
|
@@ -35767,7 +35883,7 @@ var EasingEditor = ({ state, renderHeader }) => {
|
|
|
35767
35883
|
const sequenceTargets = new Set;
|
|
35768
35884
|
const effectTargets = new Set;
|
|
35769
35885
|
for (const update of updates) {
|
|
35770
|
-
const key3 =
|
|
35886
|
+
const key3 = Internals56.makeSequencePropsSubscriptionKey(update.nodePath);
|
|
35771
35887
|
if (update.type === "sequence") {
|
|
35772
35888
|
if (!sequenceTargets.has(key3)) {
|
|
35773
35889
|
sequenceTargets.add(key3);
|
|
@@ -36486,7 +36602,7 @@ var getEasingSelectionFromCurrentKeyframes = ({
|
|
|
36486
36602
|
|
|
36487
36603
|
// src/components/InspectorPanel/KeyframeEasingNavigator.tsx
|
|
36488
36604
|
import { useCallback as useCallback104, useMemo as useMemo114 } from "react";
|
|
36489
|
-
import { Internals as
|
|
36605
|
+
import { Internals as Internals59, useVideoConfig as useVideoConfig5 } from "remotion";
|
|
36490
36606
|
|
|
36491
36607
|
// src/components/Timeline/TimelineKeyframeDiamondIcon.tsx
|
|
36492
36608
|
import { jsx as jsx176, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
@@ -36527,7 +36643,7 @@ import {
|
|
|
36527
36643
|
LINEAR_KEYFRAME_EASING as LINEAR_KEYFRAME_EASING5
|
|
36528
36644
|
} from "@remotion/studio-shared";
|
|
36529
36645
|
import React121, { useCallback as useCallback103, useContext as useContext60, useMemo as useMemo113, useRef as useRef47 } from "react";
|
|
36530
|
-
import { Internals as
|
|
36646
|
+
import { Internals as Internals58, useVideoConfig as useVideoConfig4 } from "remotion";
|
|
36531
36647
|
|
|
36532
36648
|
// src/components/Timeline/use-timeline-keyframe-drag.ts
|
|
36533
36649
|
import {
|
|
@@ -36535,7 +36651,7 @@ import {
|
|
|
36535
36651
|
moveKeyframesInPropStatus
|
|
36536
36652
|
} from "@remotion/studio-shared";
|
|
36537
36653
|
import { useCallback as useCallback102, useContext as useContext59 } from "react";
|
|
36538
|
-
import { Internals as
|
|
36654
|
+
import { Internals as Internals57, useVideoConfig as useVideoConfig3 } from "remotion";
|
|
36539
36655
|
|
|
36540
36656
|
// src/components/Timeline/get-bounded-keyframe-drag-delta.ts
|
|
36541
36657
|
var getBoundedKeyframeDragDelta = ({
|
|
@@ -36691,7 +36807,7 @@ var getTimelineSelectionsAfterEasingKeyframeDrag = ({
|
|
|
36691
36807
|
var getCodeValueForTarget = ({
|
|
36692
36808
|
propStatuses,
|
|
36693
36809
|
nodePath
|
|
36694
|
-
}) => propStatuses[
|
|
36810
|
+
}) => propStatuses[Internals57.makeSequencePropsSubscriptionKey(nodePath)];
|
|
36695
36811
|
var getTimelineKeyframeDragTarget = ({
|
|
36696
36812
|
propStatuses,
|
|
36697
36813
|
displayFrame,
|
|
@@ -36890,16 +37006,16 @@ var useTimelineKeyframeDrag = ({
|
|
|
36890
37006
|
const videoConfig = useVideoConfig3();
|
|
36891
37007
|
const timelineWidth = useContext59(TimelineWidthContext);
|
|
36892
37008
|
const { previewServerState } = useContext59(StudioServerConnectionCtx);
|
|
36893
|
-
const sequencesRef = useContext59(
|
|
36894
|
-
const { overrideIdToNodePathMappings } = useContext59(
|
|
36895
|
-
const propStatusesRef = useContext59(
|
|
37009
|
+
const sequencesRef = useContext59(Internals57.SequenceManagerRefContext);
|
|
37010
|
+
const { overrideIdToNodePathMappings } = useContext59(Internals57.OverrideIdsToNodePathsGettersContext);
|
|
37011
|
+
const propStatusesRef = useContext59(Internals57.VisualModePropStatusesRefContext);
|
|
36896
37012
|
const {
|
|
36897
37013
|
clearDragOverrides,
|
|
36898
37014
|
clearEffectDragOverrides,
|
|
36899
37015
|
setPropStatuses,
|
|
36900
37016
|
setDragOverrides,
|
|
36901
37017
|
setEffectDragOverrides
|
|
36902
|
-
} = useContext59(
|
|
37018
|
+
} = useContext59(Internals57.VisualModeSettersContext);
|
|
36903
37019
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
36904
37020
|
const { clearDraggedKeyframes, setDraggedKeyframes } = useTimelineKeyframeDragState();
|
|
36905
37021
|
return useCallback102((e) => {
|
|
@@ -37092,16 +37208,16 @@ var useTimelineEasingKeyframeDrag = ({
|
|
|
37092
37208
|
const videoConfig = useVideoConfig3();
|
|
37093
37209
|
const timelineWidth = useContext59(TimelineWidthContext);
|
|
37094
37210
|
const { previewServerState } = useContext59(StudioServerConnectionCtx);
|
|
37095
|
-
const sequencesRef = useContext59(
|
|
37096
|
-
const { overrideIdToNodePathMappings } = useContext59(
|
|
37097
|
-
const propStatusesRef = useContext59(
|
|
37211
|
+
const sequencesRef = useContext59(Internals57.SequenceManagerRefContext);
|
|
37212
|
+
const { overrideIdToNodePathMappings } = useContext59(Internals57.OverrideIdsToNodePathsGettersContext);
|
|
37213
|
+
const propStatusesRef = useContext59(Internals57.VisualModePropStatusesRefContext);
|
|
37098
37214
|
const {
|
|
37099
37215
|
clearDragOverrides,
|
|
37100
37216
|
clearEffectDragOverrides,
|
|
37101
37217
|
setPropStatuses,
|
|
37102
37218
|
setDragOverrides,
|
|
37103
37219
|
setEffectDragOverrides
|
|
37104
|
-
} = useContext59(
|
|
37220
|
+
} = useContext59(Internals57.VisualModeSettersContext);
|
|
37105
37221
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
37106
37222
|
const { clearDraggedKeyframes } = useTimelineKeyframeDragState();
|
|
37107
37223
|
return useCallback102((e) => {
|
|
@@ -37332,10 +37448,10 @@ var TimelineKeyframeEasingLineUnmemoized = ({ fromFrame, toFrame, rowHeight, nod
|
|
|
37332
37448
|
});
|
|
37333
37449
|
useTimelineMarqueeSelectableItem(selectionItem, buttonRef);
|
|
37334
37450
|
const { previewServerState } = useContext60(StudioServerConnectionCtx);
|
|
37335
|
-
const sequencesRef = useContext60(
|
|
37336
|
-
const propStatusesRef = useContext60(
|
|
37337
|
-
const { setPropStatuses } = useContext60(
|
|
37338
|
-
const { overrideIdToNodePathMappings } = useContext60(
|
|
37451
|
+
const sequencesRef = useContext60(Internals58.SequenceManagerRefContext);
|
|
37452
|
+
const propStatusesRef = useContext60(Internals58.VisualModePropStatusesRefContext);
|
|
37453
|
+
const { setPropStatuses } = useContext60(Internals58.VisualModeSettersContext);
|
|
37454
|
+
const { overrideIdToNodePathMappings } = useContext60(Internals58.OverrideIdsToNodePathsGettersContext);
|
|
37339
37455
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
37340
37456
|
const getTargetSelections = useCallback103(() => {
|
|
37341
37457
|
const selectedEasings = getEasingSelections(currentSelection.current.selectedItems);
|
|
@@ -37624,7 +37740,7 @@ var TimelineNavigatorItem = ({ extendLineLeft, extendLineRight, item: item2, onS
|
|
|
37624
37740
|
};
|
|
37625
37741
|
var KeyframeEasingNavigator = ({ currentSelection, includeEasings, keyframes, nodePathInfo }) => {
|
|
37626
37742
|
const { isSelected, selectItems } = useTimelineSelection();
|
|
37627
|
-
const setFrame =
|
|
37743
|
+
const setFrame = Internals59.useTimelineSetFrame();
|
|
37628
37744
|
const videoConfig = useVideoConfig5();
|
|
37629
37745
|
const items = useMemo114(() => getKeyframeEasingNavigatorItems({
|
|
37630
37746
|
includeEasings,
|
|
@@ -37643,7 +37759,7 @@ var KeyframeEasingNavigator = ({ currentSelection, includeEasings, keyframes, no
|
|
|
37643
37759
|
const frame2 = getNavigatorItemPlayheadFrame(item2);
|
|
37644
37760
|
setFrame((current) => {
|
|
37645
37761
|
const next = { ...current, [videoConfig.id]: frame2 };
|
|
37646
|
-
|
|
37762
|
+
Internals59.persistCurrentFrame(next);
|
|
37647
37763
|
return next;
|
|
37648
37764
|
});
|
|
37649
37765
|
}, [setFrame, videoConfig.id]);
|
|
@@ -37723,7 +37839,7 @@ import {
|
|
|
37723
37839
|
useMemo as useMemo115,
|
|
37724
37840
|
useState as useState73
|
|
37725
37841
|
} from "react";
|
|
37726
|
-
import { Internals as
|
|
37842
|
+
import { Internals as Internals60 } from "remotion";
|
|
37727
37843
|
import { jsx as jsx180, jsxs as jsxs98, Fragment as Fragment32 } from "react/jsx-runtime";
|
|
37728
37844
|
var comboStyle2 = {
|
|
37729
37845
|
minWidth: 120
|
|
@@ -37775,7 +37891,7 @@ var getOutputValues = (onSelect, disabled) => {
|
|
|
37775
37891
|
}));
|
|
37776
37892
|
};
|
|
37777
37893
|
var KeyframeSettings = ({ update }) => {
|
|
37778
|
-
const { setPropStatuses } = useContext61(
|
|
37894
|
+
const { setPropStatuses } = useContext61(Internals60.VisualModeSettersContext);
|
|
37779
37895
|
const { previewServerState } = useContext61(StudioServerConnectionCtx);
|
|
37780
37896
|
const { propStatus } = update;
|
|
37781
37897
|
const [posterize, setPosterize] = useState73(propStatus.posterize ?? 0);
|
|
@@ -37999,7 +38115,7 @@ var useOpenSequenceInEditor = (sequence) => {
|
|
|
37999
38115
|
|
|
38000
38116
|
// src/components/Timeline/use-rename-sequence.ts
|
|
38001
38117
|
import { useCallback as useCallback107, useContext as useContext64, useMemo as useMemo117 } from "react";
|
|
38002
|
-
import { Internals as
|
|
38118
|
+
import { Internals as Internals61 } from "remotion";
|
|
38003
38119
|
var getSequenceNameSaveAction = ({
|
|
38004
38120
|
editedName,
|
|
38005
38121
|
currentDisplayName,
|
|
@@ -38023,11 +38139,11 @@ var useRenameSequence = ({
|
|
|
38023
38139
|
sequence,
|
|
38024
38140
|
validatedLocation
|
|
38025
38141
|
}) => {
|
|
38026
|
-
const { propStatuses } = useContext64(
|
|
38027
|
-
const { setPropStatuses } = useContext64(
|
|
38142
|
+
const { propStatuses } = useContext64(Internals61.VisualModePropStatusesContext);
|
|
38143
|
+
const { setPropStatuses } = useContext64(Internals61.VisualModeSettersContext);
|
|
38028
38144
|
const nodePath = nodePathInfo?.sequenceSubscriptionKey ?? null;
|
|
38029
38145
|
const propStatusesForOverride = useMemo117(() => {
|
|
38030
|
-
return nodePath ?
|
|
38146
|
+
return nodePath ? Internals61.getPropStatusesCtx(propStatuses, nodePath) : undefined;
|
|
38031
38147
|
}, [propStatuses, nodePath]);
|
|
38032
38148
|
const codeNameStatus = propStatusesForOverride?.name;
|
|
38033
38149
|
const fallbackDisplayName = sequence.controls?.componentName ?? "<Sequence>";
|
|
@@ -38101,7 +38217,7 @@ var useRenameSequence = ({
|
|
|
38101
38217
|
|
|
38102
38218
|
// src/components/InspectorPanel/ConnectedCompositionsSection.tsx
|
|
38103
38219
|
import { useContext as useContext65, useMemo as useMemo118 } from "react";
|
|
38104
|
-
import { Internals as
|
|
38220
|
+
import { Internals as Internals62 } from "remotion";
|
|
38105
38221
|
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
38106
38222
|
var compositionIconStyle = {
|
|
38107
38223
|
height: 13,
|
|
@@ -38115,7 +38231,7 @@ var compositionListStyle = {
|
|
|
38115
38231
|
var useConnectedCompositions = ({
|
|
38116
38232
|
track
|
|
38117
38233
|
}) => {
|
|
38118
|
-
const { compositions } = useContext65(
|
|
38234
|
+
const { compositions } = useContext65(Internals62.CompositionManager);
|
|
38119
38235
|
return useMemo118(() => getConnectedCompositions({
|
|
38120
38236
|
compositions,
|
|
38121
38237
|
singleChildComponent: track.sequence.singleChildComponent
|
|
@@ -38248,10 +38364,10 @@ var SequenceInspectorSections = ({ track }) => {
|
|
|
38248
38364
|
|
|
38249
38365
|
// src/components/InspectorPanel/use-track-for-selection.ts
|
|
38250
38366
|
import { useContext as useContext67, useMemo as useMemo120 } from "react";
|
|
38251
|
-
import { Internals as
|
|
38367
|
+
import { Internals as Internals63 } from "remotion";
|
|
38252
38368
|
var useTrackForSelection = (selection) => {
|
|
38253
|
-
const { sequences } = useContext67(
|
|
38254
|
-
const { overrideIdToNodePathMappings } = useContext67(
|
|
38369
|
+
const { sequences } = useContext67(Internals63.SequenceManager);
|
|
38370
|
+
const { overrideIdToNodePathMappings } = useContext67(Internals63.OverrideIdsToNodePathsGettersContext);
|
|
38255
38371
|
return useMemo120(() => {
|
|
38256
38372
|
if (selection.type === "guide") {
|
|
38257
38373
|
return null;
|
|
@@ -38274,12 +38390,12 @@ var addKeyframeIcon = {
|
|
|
38274
38390
|
var EasingInspector = ({ selection }) => {
|
|
38275
38391
|
const track = useTrackForSelection(selection);
|
|
38276
38392
|
const videoConfig = useVideoConfig6();
|
|
38277
|
-
const timelinePosition =
|
|
38278
|
-
const { sequences } = useContext68(
|
|
38279
|
-
const { overrideIdToNodePathMappings } = useContext68(
|
|
38280
|
-
const { propStatuses } = useContext68(
|
|
38281
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext68(
|
|
38282
|
-
const { setPropStatuses } = useContext68(
|
|
38393
|
+
const timelinePosition = Internals64.Timeline.useTimelinePosition();
|
|
38394
|
+
const { sequences } = useContext68(Internals64.SequenceManager);
|
|
38395
|
+
const { overrideIdToNodePathMappings } = useContext68(Internals64.OverrideIdsToNodePathsGettersContext);
|
|
38396
|
+
const { propStatuses } = useContext68(Internals64.VisualModePropStatusesContext);
|
|
38397
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext68(Internals64.VisualModeDragOverridesContext);
|
|
38398
|
+
const { setPropStatuses } = useContext68(Internals64.VisualModeSettersContext);
|
|
38283
38399
|
const { previewServerState } = useContext68(StudioServerConnectionCtx);
|
|
38284
38400
|
const { selectItems } = useTimelineSelection();
|
|
38285
38401
|
const parentSelection = useMemo121(() => getTimelineSelectionFromNodePathInfo(selection.nodePathInfo), [selection.nodePathInfo]);
|
|
@@ -38383,7 +38499,7 @@ var EasingInspector = ({ selection }) => {
|
|
|
38383
38499
|
return;
|
|
38384
38500
|
}
|
|
38385
38501
|
const sourceFrame = timelinePosition - track.keyframeDisplayOffset;
|
|
38386
|
-
const value =
|
|
38502
|
+
const value = Internals64.getEffectiveVisualModeValue({
|
|
38387
38503
|
propStatus: easingUpdate.propStatus,
|
|
38388
38504
|
dragOverrideValue: easingDetails.dragOverrideValue,
|
|
38389
38505
|
defaultValue: easingDetails.defaultValue,
|
|
@@ -38604,7 +38720,7 @@ import {
|
|
|
38604
38720
|
useMemo as useMemo139,
|
|
38605
38721
|
useState as useState81
|
|
38606
38722
|
} from "react";
|
|
38607
|
-
import { Internals as
|
|
38723
|
+
import { Internals as Internals69, useVideoConfig as useVideoConfig10 } from "remotion";
|
|
38608
38724
|
|
|
38609
38725
|
// src/components/Timeline/TimelineEffectPropItem.tsx
|
|
38610
38726
|
import {
|
|
@@ -38612,7 +38728,7 @@ import {
|
|
|
38612
38728
|
optimisticUpdateForEffectPropStatuses as optimisticUpdateForEffectPropStatuses2
|
|
38613
38729
|
} from "@remotion/studio-shared";
|
|
38614
38730
|
import { useCallback as useCallback126, useContext as useContext74, useMemo as useMemo137 } from "react";
|
|
38615
|
-
import { Internals as
|
|
38731
|
+
import { Internals as Internals67, useVideoConfig as useVideoConfig8 } from "remotion";
|
|
38616
38732
|
|
|
38617
38733
|
// src/components/Timeline/get-animation-item-selection-for-frame.ts
|
|
38618
38734
|
var getKeyframeSelection = ({
|
|
@@ -38873,7 +38989,7 @@ var TimelineFieldRowContent = ({ field, rowDepth, selected, children }) => {
|
|
|
38873
38989
|
// src/components/Timeline/TimelineKeyframeControls.tsx
|
|
38874
38990
|
import { isSchemaFieldKeyframable } from "@remotion/studio-shared";
|
|
38875
38991
|
import { useCallback as useCallback111, useContext as useContext72, useMemo as useMemo124 } from "react";
|
|
38876
|
-
import { Internals as
|
|
38992
|
+
import { Internals as Internals65, useVideoConfig as useVideoConfig7 } from "remotion";
|
|
38877
38993
|
|
|
38878
38994
|
// src/components/Timeline/get-keyframe-navigation.ts
|
|
38879
38995
|
var isKeyframeInTimelineRange = (frame2, durationInFrames) => {
|
|
@@ -39025,7 +39141,7 @@ var resolveKeyframeControlTarget = ({
|
|
|
39025
39141
|
}
|
|
39026
39142
|
const nodePath = nodePathInfo.sequenceSubscriptionKey;
|
|
39027
39143
|
if (fieldNode.field.kind === "sequence-field") {
|
|
39028
|
-
const sequencePropStatuses =
|
|
39144
|
+
const sequencePropStatuses = Internals65.getPropStatusesCtx(propStatuses, nodePath);
|
|
39029
39145
|
const sequenceSelectedPropStatus = sequencePropStatuses?.[fieldNode.field.key] ?? null;
|
|
39030
39146
|
if (sequenceSelectedPropStatus === null) {
|
|
39031
39147
|
return null;
|
|
@@ -39044,7 +39160,7 @@ var resolveKeyframeControlTarget = ({
|
|
|
39044
39160
|
effectIndex: null
|
|
39045
39161
|
};
|
|
39046
39162
|
}
|
|
39047
|
-
const effectStatus =
|
|
39163
|
+
const effectStatus = Internals65.getEffectPropStatusesCtx({
|
|
39048
39164
|
propStatuses,
|
|
39049
39165
|
nodePath,
|
|
39050
39166
|
effectIndex: fieldNode.field.effectIndex
|
|
@@ -39111,7 +39227,8 @@ var getDeleteChange = (target) => {
|
|
|
39111
39227
|
nodePath: target.nodePath,
|
|
39112
39228
|
fieldKey: target.fieldKey,
|
|
39113
39229
|
sourceFrame: target.sourceFrame,
|
|
39114
|
-
schema: target.schema
|
|
39230
|
+
schema: target.schema,
|
|
39231
|
+
valueWhenLastKeyframeDeleted: null
|
|
39115
39232
|
};
|
|
39116
39233
|
if (target.effectIndex === null) {
|
|
39117
39234
|
return change;
|
|
@@ -39131,7 +39248,7 @@ function getCurrentKeyframeValue({
|
|
|
39131
39248
|
dragOverrideValue
|
|
39132
39249
|
}) {
|
|
39133
39250
|
if (isKeyframedStatus(propStatus)) {
|
|
39134
|
-
return
|
|
39251
|
+
return Internals65.getEffectiveVisualModeValue({
|
|
39135
39252
|
propStatus,
|
|
39136
39253
|
dragOverrideValue,
|
|
39137
39254
|
frame: jsxFrame,
|
|
@@ -39140,7 +39257,7 @@ function getCurrentKeyframeValue({
|
|
|
39140
39257
|
});
|
|
39141
39258
|
}
|
|
39142
39259
|
if (propStatus.status === "static") {
|
|
39143
|
-
return
|
|
39260
|
+
return Internals65.getEffectiveVisualModeValue({
|
|
39144
39261
|
propStatus,
|
|
39145
39262
|
dragOverrideValue,
|
|
39146
39263
|
frame: jsxFrame,
|
|
@@ -39189,11 +39306,11 @@ var TimelineKeyframeControls = ({
|
|
|
39189
39306
|
mode = "timeline"
|
|
39190
39307
|
}) => {
|
|
39191
39308
|
const videoConfig = useVideoConfig7();
|
|
39192
|
-
const timelinePosition =
|
|
39193
|
-
const setFrame =
|
|
39194
|
-
const { setPropStatuses } = useContext72(
|
|
39195
|
-
const { propStatuses } = useContext72(
|
|
39196
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext72(
|
|
39309
|
+
const timelinePosition = Internals65.Timeline.useTimelinePosition();
|
|
39310
|
+
const setFrame = Internals65.useTimelineSetFrame();
|
|
39311
|
+
const { setPropStatuses } = useContext72(Internals65.VisualModeSettersContext);
|
|
39312
|
+
const { propStatuses } = useContext72(Internals65.VisualModePropStatusesContext);
|
|
39313
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext72(Internals65.VisualModeDragOverridesContext);
|
|
39197
39314
|
const { previewServerState } = useContext72(StudioServerConnectionCtx);
|
|
39198
39315
|
const { selectedItems, selectItems } = useTimelineSelection();
|
|
39199
39316
|
const tracks = useTimelineKeyframeTracks();
|
|
@@ -39284,7 +39401,7 @@ var TimelineKeyframeControls = ({
|
|
|
39284
39401
|
const seekToDisplayFrame = useCallback111((frame2) => {
|
|
39285
39402
|
setFrame((current) => {
|
|
39286
39403
|
const next = { ...current, [videoConfig.id]: frame2 };
|
|
39287
|
-
|
|
39404
|
+
Internals65.persistCurrentFrame(next);
|
|
39288
39405
|
return next;
|
|
39289
39406
|
});
|
|
39290
39407
|
}, [setFrame, videoConfig.id]);
|
|
@@ -39438,7 +39555,7 @@ var TimelineKeyframeControls = ({
|
|
|
39438
39555
|
|
|
39439
39556
|
// src/components/Timeline/TimelineKeyframedValue.tsx
|
|
39440
39557
|
import { useCallback as useCallback124, useMemo as useMemo134 } from "react";
|
|
39441
|
-
import { Internals as
|
|
39558
|
+
import { Internals as Internals66 } from "remotion";
|
|
39442
39559
|
|
|
39443
39560
|
// src/components/Timeline/TimelineSchemaField.tsx
|
|
39444
39561
|
import React144 from "react";
|
|
@@ -43141,7 +43258,7 @@ var TimelineKeyframedValue = ({
|
|
|
43141
43258
|
scaleLockNodePath
|
|
43142
43259
|
}) => {
|
|
43143
43260
|
const computedValue = useMemo134(() => {
|
|
43144
|
-
const raw =
|
|
43261
|
+
const raw = Internals66.interpolateKeyframedStatus({
|
|
43145
43262
|
forceSpringAllowTail: false,
|
|
43146
43263
|
frame: sourceFrame,
|
|
43147
43264
|
status: propStatus
|
|
@@ -43156,7 +43273,7 @@ var TimelineKeyframedValue = ({
|
|
|
43156
43273
|
codeValue: computedValue
|
|
43157
43274
|
}), [computedValue]);
|
|
43158
43275
|
const effectiveValue = useMemo134(() => {
|
|
43159
|
-
return
|
|
43276
|
+
return Internals66.getEffectiveVisualModeValue({
|
|
43160
43277
|
propStatus: fakeStatus,
|
|
43161
43278
|
dragOverrideValue,
|
|
43162
43279
|
frame: sourceFrame,
|
|
@@ -43364,23 +43481,23 @@ var isResettableStatus = ({
|
|
|
43364
43481
|
return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
|
|
43365
43482
|
};
|
|
43366
43483
|
var TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFrame }) => {
|
|
43367
|
-
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext74(
|
|
43368
|
-
const { getEffectDragOverrides } = useContext74(
|
|
43369
|
-
const { propStatuses: visualModePropStatuses } = useContext74(
|
|
43484
|
+
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = useContext74(Internals67.VisualModeSettersContext);
|
|
43485
|
+
const { getEffectDragOverrides } = useContext74(Internals67.VisualModeDragOverridesContext);
|
|
43486
|
+
const { propStatuses: visualModePropStatuses } = useContext74(Internals67.VisualModePropStatusesContext);
|
|
43370
43487
|
const { previewServerState } = useContext74(StudioServerConnectionCtx);
|
|
43371
43488
|
const clientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
|
|
43372
|
-
const effectStatus =
|
|
43489
|
+
const effectStatus = Internals67.getEffectPropStatusesCtx({
|
|
43373
43490
|
propStatuses: visualModePropStatuses,
|
|
43374
43491
|
nodePath,
|
|
43375
43492
|
effectIndex: field.effectIndex
|
|
43376
43493
|
});
|
|
43377
43494
|
const propStatus = effectStatus.type === "can-update-effect" ? effectStatus.props?.[field.key] ?? null : null;
|
|
43378
43495
|
const onDragValueChange = useCallback126((value) => {
|
|
43379
|
-
const nextDragOverrideValue = propStatus !== null && isKeyframedStatus2(propStatus) ?
|
|
43496
|
+
const nextDragOverrideValue = propStatus !== null && isKeyframedStatus2(propStatus) ? Internals67.makeKeyframedDragOverride({
|
|
43380
43497
|
status: propStatus,
|
|
43381
43498
|
frame: sourceFrame,
|
|
43382
43499
|
value
|
|
43383
|
-
}) :
|
|
43500
|
+
}) : Internals67.makeStaticDragOverride(value);
|
|
43384
43501
|
setEffectDragOverrides(nodePath, field.effectIndex, field.key, nextDragOverrideValue);
|
|
43385
43502
|
}, [
|
|
43386
43503
|
field.effectIndex,
|
|
@@ -43535,7 +43652,7 @@ var TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFrame
|
|
|
43535
43652
|
fixHref: TIMELINE_COMPUTED_EFFECT_FIX_LINK
|
|
43536
43653
|
});
|
|
43537
43654
|
}
|
|
43538
|
-
const effectiveValue =
|
|
43655
|
+
const effectiveValue = Internals67.getEffectiveVisualModeValue({
|
|
43539
43656
|
propStatus,
|
|
43540
43657
|
dragOverrideValue,
|
|
43541
43658
|
defaultValue: field.fieldSchema.default,
|
|
@@ -43562,19 +43679,19 @@ var TimelineEffectPropItem = ({
|
|
|
43562
43679
|
keyframeControlsMode = "timeline"
|
|
43563
43680
|
}) => {
|
|
43564
43681
|
const { previewServerState } = useContext74(StudioServerConnectionCtx);
|
|
43565
|
-
const { setPropStatuses } = useContext74(
|
|
43566
|
-
const { propStatuses } = useContext74(
|
|
43567
|
-
const { getEffectDragOverrides } = useContext74(
|
|
43682
|
+
const { setPropStatuses } = useContext74(Internals67.VisualModeSettersContext);
|
|
43683
|
+
const { propStatuses } = useContext74(Internals67.VisualModePropStatusesContext);
|
|
43684
|
+
const { getEffectDragOverrides } = useContext74(Internals67.VisualModeDragOverridesContext);
|
|
43568
43685
|
const selection = useTimelineRowSelection(nodePathInfo);
|
|
43569
43686
|
const { selectItems } = useTimelineSelection();
|
|
43570
|
-
const setFrame =
|
|
43687
|
+
const setFrame = Internals67.useTimelineSetFrame();
|
|
43571
43688
|
const videoConfig = useVideoConfig8();
|
|
43572
|
-
const timelinePosition =
|
|
43689
|
+
const timelinePosition = Internals67.Timeline.useTimelinePosition();
|
|
43573
43690
|
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
43574
43691
|
const style8 = useMemo137(() => {
|
|
43575
43692
|
return field.typeName === "text-content" ? fieldRowBase : { ...fieldRowBase, height: field.rowHeight };
|
|
43576
43693
|
}, [field.rowHeight, field.typeName]);
|
|
43577
|
-
const effectStatus = useMemo137(() =>
|
|
43694
|
+
const effectStatus = useMemo137(() => Internals67.getEffectPropStatusesCtx({
|
|
43578
43695
|
propStatuses,
|
|
43579
43696
|
nodePath,
|
|
43580
43697
|
effectIndex: field.effectIndex
|
|
@@ -43664,7 +43781,7 @@ var TimelineEffectPropItem = ({
|
|
|
43664
43781
|
const seekToDisplayFrame = useCallback126((frame2) => {
|
|
43665
43782
|
setFrame((current) => {
|
|
43666
43783
|
const next = { ...current, [videoConfig.id]: frame2 };
|
|
43667
|
-
|
|
43784
|
+
Internals67.persistCurrentFrame(next);
|
|
43668
43785
|
return next;
|
|
43669
43786
|
});
|
|
43670
43787
|
}, [setFrame, videoConfig.id]);
|
|
@@ -43681,7 +43798,7 @@ var TimelineEffectPropItem = ({
|
|
|
43681
43798
|
if (!keyframable || previewServerState.type !== "connected") {
|
|
43682
43799
|
return;
|
|
43683
43800
|
}
|
|
43684
|
-
const value =
|
|
43801
|
+
const value = Internals67.getEffectiveVisualModeValue({
|
|
43685
43802
|
propStatus,
|
|
43686
43803
|
dragOverrideValue,
|
|
43687
43804
|
frame: sourceFrame,
|
|
@@ -43775,7 +43892,7 @@ var TimelineEffectPropItem = ({
|
|
|
43775
43892
|
// src/components/Timeline/TimelineSequencePropItem.tsx
|
|
43776
43893
|
import { isSchemaFieldKeyframable as isSchemaFieldKeyframable3 } from "@remotion/studio-shared";
|
|
43777
43894
|
import { useCallback as useCallback127, useContext as useContext75, useMemo as useMemo138 } from "react";
|
|
43778
|
-
import { Internals as
|
|
43895
|
+
import { Internals as Internals68, useVideoConfig as useVideoConfig9 } from "remotion";
|
|
43779
43896
|
import { jsx as jsx208 } from "react/jsx-runtime";
|
|
43780
43897
|
var fieldRowBase2 = {};
|
|
43781
43898
|
var isKeyframedStatus3 = (status) => {
|
|
@@ -43798,18 +43915,18 @@ var isResettableStatus2 = ({
|
|
|
43798
43915
|
return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
|
|
43799
43916
|
};
|
|
43800
43917
|
var Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
43801
|
-
const { getDragOverrides } = useContext75(
|
|
43802
|
-
const { setDragOverrides, clearDragOverrides } = useContext75(
|
|
43918
|
+
const { getDragOverrides } = useContext75(Internals68.VisualModeDragOverridesContext);
|
|
43919
|
+
const { setDragOverrides, clearDragOverrides } = useContext75(Internals68.VisualModeSettersContext);
|
|
43803
43920
|
const dragOverrideValue = useMemo138(() => {
|
|
43804
43921
|
return nodePath === null ? undefined : (getDragOverrides(nodePath) ?? {})[field.key];
|
|
43805
43922
|
}, [getDragOverrides, nodePath, field.key]);
|
|
43806
|
-
const effectiveValue =
|
|
43923
|
+
const effectiveValue = Internals68.getEffectiveVisualModeValue({
|
|
43807
43924
|
propStatus,
|
|
43808
43925
|
dragOverrideValue,
|
|
43809
43926
|
defaultValue: field.fieldSchema.default,
|
|
43810
43927
|
shouldResortToDefaultValueIfUndefined: true
|
|
43811
43928
|
});
|
|
43812
|
-
const { setPropStatuses } = useContext75(
|
|
43929
|
+
const { setPropStatuses } = useContext75(Internals68.VisualModeSettersContext);
|
|
43813
43930
|
const { previewServerState } = useContext75(StudioServerConnectionCtx);
|
|
43814
43931
|
const clientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
|
|
43815
43932
|
const onSave = useCallback127((value, options) => {
|
|
@@ -43858,7 +43975,7 @@ var Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
43858
43975
|
if (nodePath === null) {
|
|
43859
43976
|
throw new Error("Cannot drag value");
|
|
43860
43977
|
}
|
|
43861
|
-
setDragOverrides(nodePath, field.key,
|
|
43978
|
+
setDragOverrides(nodePath, field.key, Internals68.makeStaticDragOverride(value));
|
|
43862
43979
|
}, [setDragOverrides, nodePath, field.key]);
|
|
43863
43980
|
const onDragEnd = useCallback127(() => {
|
|
43864
43981
|
if (nodePath === null) {
|
|
@@ -43877,8 +43994,8 @@ var Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
43877
43994
|
});
|
|
43878
43995
|
};
|
|
43879
43996
|
var TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, propStatus, sourceFrame }) => {
|
|
43880
|
-
const { getDragOverrides } = useContext75(
|
|
43881
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext75(
|
|
43997
|
+
const { getDragOverrides } = useContext75(Internals68.VisualModeDragOverridesContext);
|
|
43998
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext75(Internals68.VisualModeSettersContext);
|
|
43882
43999
|
const { previewServerState } = useContext75(StudioServerConnectionCtx);
|
|
43883
44000
|
const clientId = previewServerState.type === "connected" ? previewServerState.clientId : null;
|
|
43884
44001
|
const dragOverrideValue = useMemo138(() => {
|
|
@@ -43900,7 +44017,7 @@ var TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, propS
|
|
|
43900
44017
|
});
|
|
43901
44018
|
}, [clientId, field.key, fileName, nodePath, schema, setPropStatuses]);
|
|
43902
44019
|
const onKeyframedDragValueChange = useCallback127((value) => {
|
|
43903
|
-
setDragOverrides(nodePath, field.key,
|
|
44020
|
+
setDragOverrides(nodePath, field.key, Internals68.makeKeyframedDragOverride({
|
|
43904
44021
|
status: propStatus,
|
|
43905
44022
|
frame: sourceFrame,
|
|
43906
44023
|
value
|
|
@@ -43930,17 +44047,17 @@ var TimelineSequencePropItem = ({
|
|
|
43930
44047
|
keyframeDisplayOffset,
|
|
43931
44048
|
keyframeControlsMode = "timeline"
|
|
43932
44049
|
}) => {
|
|
43933
|
-
const { propStatuses: visualModePropStatuses } = useContext75(
|
|
43934
|
-
const { getDragOverrides } = useContext75(
|
|
43935
|
-
const { setPropStatuses } = useContext75(
|
|
44050
|
+
const { propStatuses: visualModePropStatuses } = useContext75(Internals68.VisualModePropStatusesContext);
|
|
44051
|
+
const { getDragOverrides } = useContext75(Internals68.VisualModeDragOverridesContext);
|
|
44052
|
+
const { setPropStatuses } = useContext75(Internals68.VisualModeSettersContext);
|
|
43936
44053
|
const { previewServerState } = useContext75(StudioServerConnectionCtx);
|
|
43937
44054
|
const selection = useTimelineRowSelection(nodePathInfo);
|
|
43938
44055
|
const { selectItems } = useTimelineSelection();
|
|
43939
|
-
const setFrame =
|
|
44056
|
+
const setFrame = Internals68.useTimelineSetFrame();
|
|
43940
44057
|
const videoConfig = useVideoConfig9();
|
|
43941
|
-
const timelinePosition =
|
|
44058
|
+
const timelinePosition = Internals68.Timeline.useTimelinePosition();
|
|
43942
44059
|
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
43943
|
-
const propStatusesForOverride =
|
|
44060
|
+
const propStatusesForOverride = Internals68.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
43944
44061
|
const propStatus = propStatusesForOverride?.[field.key] ?? null;
|
|
43945
44062
|
const dragOverrideValue = useMemo138(() => {
|
|
43946
44063
|
return (getDragOverrides(nodePath) ?? {})[field.key];
|
|
@@ -44034,7 +44151,7 @@ var TimelineSequencePropItem = ({
|
|
|
44034
44151
|
const seekToDisplayFrame = useCallback127((frame2) => {
|
|
44035
44152
|
setFrame((current) => {
|
|
44036
44153
|
const next = { ...current, [videoConfig.id]: frame2 };
|
|
44037
|
-
|
|
44154
|
+
Internals68.persistCurrentFrame(next);
|
|
44038
44155
|
return next;
|
|
44039
44156
|
});
|
|
44040
44157
|
}, [setFrame, videoConfig.id]);
|
|
@@ -44051,7 +44168,7 @@ var TimelineSequencePropItem = ({
|
|
|
44051
44168
|
if (!keyframable || previewServerState.type !== "connected") {
|
|
44052
44169
|
return;
|
|
44053
44170
|
}
|
|
44054
|
-
const value =
|
|
44171
|
+
const value = Internals68.getEffectiveVisualModeValue({
|
|
44055
44172
|
propStatus,
|
|
44056
44173
|
dragOverrideValue,
|
|
44057
44174
|
frame: sourceFrame,
|
|
@@ -44214,16 +44331,16 @@ var TrashIcon = ({ color }) => {
|
|
|
44214
44331
|
var KeyframeInspector = ({ selection }) => {
|
|
44215
44332
|
const track = useTrackForSelection(selection);
|
|
44216
44333
|
const videoConfig = useVideoConfig10();
|
|
44217
|
-
const timelinePosition =
|
|
44218
|
-
const { propStatuses } = useContext76(
|
|
44334
|
+
const timelinePosition = Internals69.Timeline.useTimelinePosition();
|
|
44335
|
+
const { propStatuses } = useContext76(Internals69.VisualModePropStatusesContext);
|
|
44219
44336
|
const {
|
|
44220
44337
|
clearDragOverrides,
|
|
44221
44338
|
clearEffectDragOverrides,
|
|
44222
44339
|
setDragOverrides,
|
|
44223
44340
|
setEffectDragOverrides,
|
|
44224
44341
|
setPropStatuses
|
|
44225
|
-
} = useContext76(
|
|
44226
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext76(
|
|
44342
|
+
} = useContext76(Internals69.VisualModeSettersContext);
|
|
44343
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext76(Internals69.VisualModeDragOverridesContext);
|
|
44227
44344
|
const { previewServerState } = useContext76(StudioServerConnectionCtx);
|
|
44228
44345
|
const { selectItems } = useTimelineSelection();
|
|
44229
44346
|
const [draftFrame, setDraftFrame] = useState81(selection.frame);
|
|
@@ -44252,7 +44369,7 @@ var KeyframeInspector = ({ selection }) => {
|
|
|
44252
44369
|
includeTextContent: false
|
|
44253
44370
|
});
|
|
44254
44371
|
const sequenceField = sequenceFields?.find((candidate) => candidate.key === keyframeField.fieldKey) ?? null;
|
|
44255
|
-
const sequencePropStatus =
|
|
44372
|
+
const sequencePropStatus = Internals69.getPropStatusesCtx(propStatuses, nodePath)?.[keyframeField.fieldKey] ?? null;
|
|
44256
44373
|
if (!sequenceField || sequencePropStatus?.status !== "keyframed") {
|
|
44257
44374
|
return null;
|
|
44258
44375
|
}
|
|
@@ -44280,7 +44397,7 @@ var KeyframeInspector = ({ selection }) => {
|
|
|
44280
44397
|
getEffectDragOverrides
|
|
44281
44398
|
});
|
|
44282
44399
|
const effectField = effectFields.find((candidate) => candidate.key === keyframeField.fieldKey) ?? null;
|
|
44283
|
-
const effectStatus =
|
|
44400
|
+
const effectStatus = Internals69.getEffectPropStatusesCtx({
|
|
44284
44401
|
propStatuses,
|
|
44285
44402
|
nodePath,
|
|
44286
44403
|
effectIndex: keyframeField.effectIndex
|
|
@@ -44589,7 +44706,7 @@ import React152 from "react";
|
|
|
44589
44706
|
|
|
44590
44707
|
// src/components/Timeline/TimelineEffectItem.tsx
|
|
44591
44708
|
import { useCallback as useCallback129, useContext as useContext77, useMemo as useMemo140, useState as useState82 } from "react";
|
|
44592
|
-
import { Internals as
|
|
44709
|
+
import { Internals as Internals70 } from "remotion";
|
|
44593
44710
|
import { jsx as jsx210, jsxs as jsxs112 } from "react/jsx-runtime";
|
|
44594
44711
|
var EFFECT_REORDER_MIME_TYPE = "application/remotion-effect-reorder";
|
|
44595
44712
|
var currentEffectDrag = null;
|
|
@@ -44655,12 +44772,12 @@ var TimelineEffectItem = ({
|
|
|
44655
44772
|
}) => {
|
|
44656
44773
|
const { previewServerState } = useContext77(StudioServerConnectionCtx);
|
|
44657
44774
|
const previewConnected = previewServerState.type === "connected";
|
|
44658
|
-
const { propStatuses } = useContext77(
|
|
44659
|
-
const { setPropStatuses } = useContext77(
|
|
44775
|
+
const { propStatuses } = useContext77(Internals70.VisualModePropStatusesContext);
|
|
44776
|
+
const { setPropStatuses } = useContext77(Internals70.VisualModeSettersContext);
|
|
44660
44777
|
const selection = useTimelineRowSelection(nodePathInfo);
|
|
44661
44778
|
const containsSelection = useTimelineRowContainsSelection(nodePathInfo);
|
|
44662
44779
|
const [dropIndicator, setDropIndicator] = useState82(null);
|
|
44663
|
-
const effectStatus = useMemo140(() =>
|
|
44780
|
+
const effectStatus = useMemo140(() => Internals70.getEffectPropStatusesCtx({
|
|
44664
44781
|
propStatuses,
|
|
44665
44782
|
nodePath,
|
|
44666
44783
|
effectIndex
|
|
@@ -44675,7 +44792,7 @@ var TimelineEffectItem = ({
|
|
|
44675
44792
|
const canToggle = previewConnected && disabledStatus?.status === "static";
|
|
44676
44793
|
const deleteDisabled = !previewConnected || effectStatus.type !== "can-update-effect" || !validatedLocation.source;
|
|
44677
44794
|
const canReorder = previewConnected && effectStatus.type === "can-update-effect" && Boolean(validatedLocation.source);
|
|
44678
|
-
const nodePathKey = useMemo140(() =>
|
|
44795
|
+
const nodePathKey = useMemo140(() => Internals70.makeSequencePropsSubscriptionKey(nodePath), [nodePath]);
|
|
44679
44796
|
const onDeleteEffectFromSource = useCallback129(async () => {
|
|
44680
44797
|
if (deleteDisabled) {
|
|
44681
44798
|
return;
|
|
@@ -45062,7 +45179,7 @@ var TimelineExpandedRow = ({
|
|
|
45062
45179
|
|
|
45063
45180
|
// src/components/Timeline/use-timeline-expanded-tree.ts
|
|
45064
45181
|
import { useContext as useContext78, useMemo as useMemo141 } from "react";
|
|
45065
|
-
import { Internals as
|
|
45182
|
+
import { Internals as Internals71 } from "remotion";
|
|
45066
45183
|
var useTimelineExpandedTree = ({
|
|
45067
45184
|
sequence,
|
|
45068
45185
|
nodePathInfo,
|
|
@@ -45071,8 +45188,8 @@ var useTimelineExpandedTree = ({
|
|
|
45071
45188
|
}) => {
|
|
45072
45189
|
const { getIsExpanded } = useContext78(ExpandedTracksGetterContext);
|
|
45073
45190
|
const { toggleTrack } = useContext78(ExpandedTracksSetterContext);
|
|
45074
|
-
const { propStatuses: visualModePropStatuses } = useContext78(
|
|
45075
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext78(
|
|
45191
|
+
const { propStatuses: visualModePropStatuses } = useContext78(Internals71.VisualModePropStatusesContext);
|
|
45192
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext78(Internals71.VisualModeDragOverridesContext);
|
|
45076
45193
|
const { selectedItems } = useTimelineSelection();
|
|
45077
45194
|
const tree = useMemo141(() => buildTimelineTree({
|
|
45078
45195
|
sequence,
|
|
@@ -45425,7 +45542,7 @@ var InspectorSequenceSection = ({
|
|
|
45425
45542
|
|
|
45426
45543
|
// src/components/InspectorPanel/AlignmentControls.tsx
|
|
45427
45544
|
import { useCallback as useCallback131, useContext as useContext80, useMemo as useMemo143 } from "react";
|
|
45428
|
-
import { Internals as
|
|
45545
|
+
import { Internals as Internals72 } from "remotion";
|
|
45429
45546
|
|
|
45430
45547
|
// src/icons/align-right.tsx
|
|
45431
45548
|
import { jsx as jsx213, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
@@ -45649,16 +45766,16 @@ var AlignmentButton = ({ onClick, title: title2, Icon, disabled }) => {
|
|
|
45649
45766
|
};
|
|
45650
45767
|
var AlignmentControls = ({ track }) => {
|
|
45651
45768
|
const { previewServerState } = useContext80(StudioServerConnectionCtx);
|
|
45652
|
-
const { propStatuses } = useContext80(
|
|
45653
|
-
const { getDragOverrides } = useContext80(
|
|
45654
|
-
const { setPropStatuses } = useContext80(
|
|
45655
|
-
const { canvasContent, compositions } = useContext80(
|
|
45769
|
+
const { propStatuses } = useContext80(Internals72.VisualModePropStatusesContext);
|
|
45770
|
+
const { getDragOverrides } = useContext80(Internals72.VisualModeDragOverridesContext);
|
|
45771
|
+
const { setPropStatuses } = useContext80(Internals72.VisualModeSettersContext);
|
|
45772
|
+
const { canvasContent, compositions } = useContext80(Internals72.CompositionManager);
|
|
45656
45773
|
const currentCompositionMetadata = useMemo143(() => {
|
|
45657
45774
|
if (canvasContent?.type !== "composition")
|
|
45658
45775
|
return null;
|
|
45659
45776
|
return compositions.find((c) => c.id === canvasContent.compositionId) ?? null;
|
|
45660
45777
|
}, [canvasContent, compositions]);
|
|
45661
|
-
const timelinePosition =
|
|
45778
|
+
const timelinePosition = Internals72.Timeline.useTimelinePosition();
|
|
45662
45779
|
const handleAlign = useCallback131((direction) => {
|
|
45663
45780
|
if (previewServerState.type !== "connected" || !track.nodePathInfo || !track.sequence.controls) {
|
|
45664
45781
|
return;
|
|
@@ -45668,7 +45785,7 @@ var AlignmentControls = ({ track }) => {
|
|
|
45668
45785
|
return;
|
|
45669
45786
|
}
|
|
45670
45787
|
const nodePath = track.nodePathInfo.sequenceSubscriptionKey;
|
|
45671
|
-
const nodePropStatuses =
|
|
45788
|
+
const nodePropStatuses = Internals72.getPropStatusesCtx(propStatuses, nodePath);
|
|
45672
45789
|
const sourceFrame = timelinePosition - track.keyframeDisplayOffset;
|
|
45673
45790
|
const dragOverrides = getDragOverrides(nodePath) ?? {};
|
|
45674
45791
|
const activeSchema = getSelectedOutlineActiveSchema({
|
|
@@ -45695,12 +45812,12 @@ var AlignmentControls = ({ track }) => {
|
|
|
45695
45812
|
if (!currentCompositionMetadata?.width) {
|
|
45696
45813
|
return;
|
|
45697
45814
|
}
|
|
45698
|
-
const compositionRect =
|
|
45815
|
+
const compositionRect = Internals72.portalNode().getBoundingClientRect();
|
|
45699
45816
|
if (compositionRect.width === 0 || compositionRect.height === 0) {
|
|
45700
45817
|
return;
|
|
45701
45818
|
}
|
|
45702
45819
|
const scale = compositionRect.width / currentCompositionMetadata.width;
|
|
45703
|
-
const currentTranslate = propStatus ? String(
|
|
45820
|
+
const currentTranslate = propStatus ? String(Internals72.getEffectiveVisualModeValue({
|
|
45704
45821
|
propStatus,
|
|
45705
45822
|
dragOverrideValue: dragOverrides[translateFieldKey],
|
|
45706
45823
|
defaultValue: fieldSchema.default,
|
|
@@ -45768,7 +45885,7 @@ var AlignmentControls = ({ track }) => {
|
|
|
45768
45885
|
return null;
|
|
45769
45886
|
}
|
|
45770
45887
|
const renderNodePath = track.nodePathInfo.sequenceSubscriptionKey;
|
|
45771
|
-
const renderNodePropStatuses =
|
|
45888
|
+
const renderNodePropStatuses = Internals72.getPropStatusesCtx(propStatuses, renderNodePath);
|
|
45772
45889
|
const renderSourceFrame = timelinePosition - track.keyframeDisplayOffset;
|
|
45773
45890
|
const renderDragOverrides = getDragOverrides(renderNodePath) ?? {};
|
|
45774
45891
|
const renderActiveSchema = getSelectedOutlineActiveSchema({
|
|
@@ -46013,7 +46130,7 @@ var SchemaResetButton = ({ onClick }) => {
|
|
|
46013
46130
|
|
|
46014
46131
|
// src/components/RenderQueue/index.tsx
|
|
46015
46132
|
import React168, { useContext as useContext90, useEffect as useEffect69, useMemo as useMemo153 } from "react";
|
|
46016
|
-
import { Internals as
|
|
46133
|
+
import { Internals as Internals75 } from "remotion";
|
|
46017
46134
|
|
|
46018
46135
|
// src/components/RenderQueue/RenderQueueItem.tsx
|
|
46019
46136
|
import {
|
|
@@ -46023,7 +46140,7 @@ import {
|
|
|
46023
46140
|
useMemo as useMemo152,
|
|
46024
46141
|
useState as useState84
|
|
46025
46142
|
} from "react";
|
|
46026
|
-
import { Internals as
|
|
46143
|
+
import { Internals as Internals74 } from "remotion";
|
|
46027
46144
|
|
|
46028
46145
|
// src/components/RenderQueue/client-side-render-types.ts
|
|
46029
46146
|
var isRestoredClientJob = (job) => {
|
|
@@ -46690,13 +46807,13 @@ var RenderQueueProgressMessage = ({ job }) => {
|
|
|
46690
46807
|
|
|
46691
46808
|
// src/components/RenderQueue/RenderQueueRemoveItem.tsx
|
|
46692
46809
|
import { useCallback as useCallback142, useContext as useContext87, useMemo as useMemo150 } from "react";
|
|
46693
|
-
import { Internals as
|
|
46810
|
+
import { Internals as Internals73 } from "remotion";
|
|
46694
46811
|
import { jsx as jsx234 } from "react/jsx-runtime";
|
|
46695
46812
|
var RenderQueueRemoveItem = ({ job }) => {
|
|
46696
46813
|
const isClientJob = isClientRenderJob(job);
|
|
46697
46814
|
const { removeClientJob } = useContext87(RenderQueueContext);
|
|
46698
|
-
const { canvasContent } = useContext87(
|
|
46699
|
-
const { setCanvasContent } = useContext87(
|
|
46815
|
+
const { canvasContent } = useContext87(Internals73.CompositionManager);
|
|
46816
|
+
const { setCanvasContent } = useContext87(Internals73.CompositionSetters);
|
|
46700
46817
|
const onClick = useCallback142((e) => {
|
|
46701
46818
|
e.stopPropagation();
|
|
46702
46819
|
if (isClientJob) {
|
|
@@ -47031,7 +47148,7 @@ var subtitle2 = {
|
|
|
47031
47148
|
var SELECTED_CLASSNAME = "__remotion_selected_classname";
|
|
47032
47149
|
var RenderQueueItem = ({ job, selected }) => {
|
|
47033
47150
|
const [hovered, setHovered] = useState84(false);
|
|
47034
|
-
const { setCanvasContent } = useContext89(
|
|
47151
|
+
const { setCanvasContent } = useContext89(Internals74.CompositionSetters);
|
|
47035
47152
|
const isClientJob = isClientRenderJob(job);
|
|
47036
47153
|
const onPointerEnter = useCallback144(() => {
|
|
47037
47154
|
setHovered(true);
|
|
@@ -47198,7 +47315,7 @@ var renderQueue = {
|
|
|
47198
47315
|
};
|
|
47199
47316
|
var RenderQueue = () => {
|
|
47200
47317
|
const { jobs } = useContext90(RenderQueueContext);
|
|
47201
|
-
const { canvasContent } = useContext90(
|
|
47318
|
+
const { canvasContent } = useContext90(Internals75.CompositionManager);
|
|
47202
47319
|
const previousJobCount = React168.useRef(jobs.length);
|
|
47203
47320
|
const jobCount = jobs.length;
|
|
47204
47321
|
const divRef = React168.useRef(null);
|
|
@@ -47334,7 +47451,7 @@ var persistSelectedOptionsSidebarPanel2 = (panel2) => {
|
|
|
47334
47451
|
localStorage.setItem(localStorageKey2, panel2);
|
|
47335
47452
|
};
|
|
47336
47453
|
var OptionsPanel = ({ readOnlyStudio }) => {
|
|
47337
|
-
const { props, updateProps } = useContext92(
|
|
47454
|
+
const { props, updateProps } = useContext92(Internals76.EditorPropsContext);
|
|
47338
47455
|
const isMobileLayout = useMobileLayout();
|
|
47339
47456
|
const container37 = useMemo155(() => ({
|
|
47340
47457
|
height: "100%",
|
|
@@ -47365,7 +47482,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
|
|
|
47365
47482
|
}
|
|
47366
47483
|
};
|
|
47367
47484
|
}, []);
|
|
47368
|
-
const { compositions, canvasContent } = useContext92(
|
|
47485
|
+
const { compositions, canvasContent } = useContext92(Internals76.CompositionManager);
|
|
47369
47486
|
const composition = useMemo155(() => {
|
|
47370
47487
|
if (canvasContent === null || canvasContent.type !== "composition") {
|
|
47371
47488
|
return null;
|
|
@@ -47508,13 +47625,13 @@ import {
|
|
|
47508
47625
|
useRef as useRef55,
|
|
47509
47626
|
useState as useState89
|
|
47510
47627
|
} from "react";
|
|
47511
|
-
import { Internals as
|
|
47628
|
+
import { Internals as Internals85 } from "remotion";
|
|
47512
47629
|
|
|
47513
47630
|
// src/helpers/is-current-selected-still.ts
|
|
47514
47631
|
import { useContext as useContext93 } from "react";
|
|
47515
|
-
import { Internals as
|
|
47632
|
+
import { Internals as Internals77 } from "remotion";
|
|
47516
47633
|
var useIsStill = () => {
|
|
47517
|
-
const resolved =
|
|
47634
|
+
const resolved = Internals77.useResolvedVideoConfig(null);
|
|
47518
47635
|
if (!resolved || resolved.type !== "success") {
|
|
47519
47636
|
return false;
|
|
47520
47637
|
}
|
|
@@ -47522,7 +47639,7 @@ var useIsStill = () => {
|
|
|
47522
47639
|
};
|
|
47523
47640
|
var useIsVideoComposition = () => {
|
|
47524
47641
|
const isStill = useIsStill();
|
|
47525
|
-
const { canvasContent } = useContext93(
|
|
47642
|
+
const { canvasContent } = useContext93(Internals77.CompositionManager);
|
|
47526
47643
|
if (canvasContent === null) {
|
|
47527
47644
|
return false;
|
|
47528
47645
|
}
|
|
@@ -47587,7 +47704,7 @@ import {
|
|
|
47587
47704
|
useRef as useRef53,
|
|
47588
47705
|
useState as useState86
|
|
47589
47706
|
} from "react";
|
|
47590
|
-
import { Internals as
|
|
47707
|
+
import { Internals as Internals78 } from "remotion";
|
|
47591
47708
|
import { jsxs as jsxs124 } from "react/jsx-runtime";
|
|
47592
47709
|
var label6 = {
|
|
47593
47710
|
color: WHITE,
|
|
@@ -47600,9 +47717,9 @@ var pushWithMaxSize = (arr, value, maxSize) => {
|
|
|
47600
47717
|
return arr.slice(-maxSize);
|
|
47601
47718
|
};
|
|
47602
47719
|
var FpsCounter = ({ playbackSpeed }) => {
|
|
47603
|
-
const videoConfig =
|
|
47604
|
-
const [playing] =
|
|
47605
|
-
const frame2 =
|
|
47720
|
+
const videoConfig = Internals78.useUnsafeVideoConfig();
|
|
47721
|
+
const [playing] = Internals78.Timeline.usePlayingState();
|
|
47722
|
+
const frame2 = Internals78.Timeline.useTimelinePosition();
|
|
47606
47723
|
const [marker, rerender] = useState86({});
|
|
47607
47724
|
const [fps, setFps] = useState86(0);
|
|
47608
47725
|
const previousUpdates = useRef53([]);
|
|
@@ -47664,7 +47781,7 @@ var FpsCounter = ({ playbackSpeed }) => {
|
|
|
47664
47781
|
|
|
47665
47782
|
// src/components/FullscreenToggle.tsx
|
|
47666
47783
|
import { useCallback as useCallback147, useContext as useContext95, useEffect as useEffect71 } from "react";
|
|
47667
|
-
import { Internals as
|
|
47784
|
+
import { Internals as Internals79 } from "remotion";
|
|
47668
47785
|
import { NoReactInternals as NoReactInternals26 } from "remotion/no-react";
|
|
47669
47786
|
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
47670
47787
|
var accessibilityLabel3 = [
|
|
@@ -47673,7 +47790,7 @@ var accessibilityLabel3 = [
|
|
|
47673
47790
|
].filter(NoReactInternals26.truthy).join(" ");
|
|
47674
47791
|
var FullScreenToggle = () => {
|
|
47675
47792
|
const keybindings = useKeybinding();
|
|
47676
|
-
const { setSize } = useContext95(
|
|
47793
|
+
const { setSize } = useContext95(Internals79.PreviewSizeContext);
|
|
47677
47794
|
const onClick = useCallback147(() => {
|
|
47678
47795
|
drawRef.current?.requestFullscreen();
|
|
47679
47796
|
if (document.fullscreenElement)
|
|
@@ -47904,7 +48021,7 @@ var PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
|
|
|
47904
48021
|
|
|
47905
48022
|
// src/components/PlaybackRatePersistor.tsx
|
|
47906
48023
|
import { useEffect as useEffect73 } from "react";
|
|
47907
|
-
import { Internals as
|
|
48024
|
+
import { Internals as Internals80 } from "remotion";
|
|
47908
48025
|
|
|
47909
48026
|
// src/state/playbackrate.ts
|
|
47910
48027
|
var key5 = "remotion.playbackrate";
|
|
@@ -47924,7 +48041,7 @@ var loadPlaybackRate = () => {
|
|
|
47924
48041
|
|
|
47925
48042
|
// src/components/PlaybackRatePersistor.tsx
|
|
47926
48043
|
var PlaybackRatePersistor = () => {
|
|
47927
|
-
const { setPlaybackRate, playbackRate } =
|
|
48044
|
+
const { setPlaybackRate, playbackRate } = Internals80.usePlaybackRate();
|
|
47928
48045
|
useEffect73(() => {
|
|
47929
48046
|
setPlaybackRate(loadPlaybackRate());
|
|
47930
48047
|
}, [setPlaybackRate]);
|
|
@@ -47936,7 +48053,7 @@ var PlaybackRatePersistor = () => {
|
|
|
47936
48053
|
|
|
47937
48054
|
// src/components/PlaybackRateSelector.tsx
|
|
47938
48055
|
import { useContext as useContext97, useMemo as useMemo157 } from "react";
|
|
47939
|
-
import { Internals as
|
|
48056
|
+
import { Internals as Internals81 } from "remotion";
|
|
47940
48057
|
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
47941
48058
|
var commonPlaybackRates = [
|
|
47942
48059
|
-4,
|
|
@@ -47957,7 +48074,7 @@ var getPlaybackRateLabel = (playbackRate) => {
|
|
|
47957
48074
|
var accessibilityLabel5 = "Change the playback rate";
|
|
47958
48075
|
var comboStyle3 = { width: 80 };
|
|
47959
48076
|
var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
|
|
47960
|
-
const { canvasContent } = useContext97(
|
|
48077
|
+
const { canvasContent } = useContext97(Internals81.CompositionManager);
|
|
47961
48078
|
const isStill = useIsStill();
|
|
47962
48079
|
const style8 = useMemo157(() => {
|
|
47963
48080
|
return {
|
|
@@ -48008,7 +48125,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
|
|
|
48008
48125
|
// src/components/PlayPause.tsx
|
|
48009
48126
|
import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
|
|
48010
48127
|
import { useCallback as useCallback152, useEffect as useEffect74, useState as useState87 } from "react";
|
|
48011
|
-
import { Internals as
|
|
48128
|
+
import { Internals as Internals82 } from "remotion";
|
|
48012
48129
|
|
|
48013
48130
|
// src/icons/jump-to-start.tsx
|
|
48014
48131
|
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
@@ -48103,7 +48220,7 @@ var iconButton = {
|
|
|
48103
48220
|
};
|
|
48104
48221
|
var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted }) => {
|
|
48105
48222
|
const { inFrame, outFrame } = useTimelineInOutFramePosition();
|
|
48106
|
-
const videoConfig =
|
|
48223
|
+
const videoConfig = Internals82.useUnsafeVideoConfig();
|
|
48107
48224
|
const [showBufferIndicator, setShowBufferState] = useState87(false);
|
|
48108
48225
|
const {
|
|
48109
48226
|
playing,
|
|
@@ -48329,7 +48446,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds, muted })
|
|
|
48329
48446
|
import { PlayerInternals as PlayerInternals17 } from "@remotion/player";
|
|
48330
48447
|
import { useCallback as useCallback153, useContext as useContext98, useMemo as useMemo158, useRef as useRef54, useState as useState88 } from "react";
|
|
48331
48448
|
import ReactDOM10 from "react-dom";
|
|
48332
|
-
import { Internals as
|
|
48449
|
+
import { Internals as Internals83 } from "remotion";
|
|
48333
48450
|
import { jsx as jsx254, jsxs as jsxs126, Fragment as Fragment42 } from "react/jsx-runtime";
|
|
48334
48451
|
var splitButtonContainer = {
|
|
48335
48452
|
display: "inline-flex",
|
|
@@ -48459,9 +48576,9 @@ var RenderButton = ({
|
|
|
48459
48576
|
}
|
|
48460
48577
|
};
|
|
48461
48578
|
}, []);
|
|
48462
|
-
const video =
|
|
48579
|
+
const video = Internals83.useVideo();
|
|
48463
48580
|
const { getCurrentFrame: getCurrentFrame2 } = PlayerInternals17.usePlayer();
|
|
48464
|
-
const { props } = useContext98(
|
|
48581
|
+
const { props } = useContext98(Internals83.EditorPropsContext);
|
|
48465
48582
|
const openServerRenderModal = useCallback153((copyCommandOnly) => {
|
|
48466
48583
|
if (!video) {
|
|
48467
48584
|
return null;
|
|
@@ -48818,7 +48935,7 @@ var SnappingToggle = ({ disabled }) => {
|
|
|
48818
48935
|
|
|
48819
48936
|
// src/components/Timeline/TimelineZoomControls.tsx
|
|
48820
48937
|
import { useCallback as useCallback155, useContext as useContext100 } from "react";
|
|
48821
|
-
import { Internals as
|
|
48938
|
+
import { Internals as Internals84 } from "remotion";
|
|
48822
48939
|
|
|
48823
48940
|
// src/icons/minus.tsx
|
|
48824
48941
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
@@ -48850,7 +48967,7 @@ var iconStyle5 = {
|
|
|
48850
48967
|
width: 14
|
|
48851
48968
|
};
|
|
48852
48969
|
var TimelineZoomControls = () => {
|
|
48853
|
-
const { canvasContent } = useContext100(
|
|
48970
|
+
const { canvasContent } = useContext100(Internals84.CompositionManager);
|
|
48854
48971
|
const { setZoom, zoom: zoomMap } = useContext100(TimelineZoomCtx);
|
|
48855
48972
|
const { tabIndex } = useZIndex();
|
|
48856
48973
|
const onMinusClicked = useCallback155(() => {
|
|
@@ -48989,10 +49106,10 @@ var PreviewToolbarControl = ({ children }) => {
|
|
|
48989
49106
|
});
|
|
48990
49107
|
};
|
|
48991
49108
|
var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
48992
|
-
const { playbackRate, setPlaybackRate } =
|
|
48993
|
-
const { playerMuted } = useContext101(
|
|
48994
|
-
const { setPlayerMuted } = useContext101(
|
|
48995
|
-
const { canvasContent } = useContext101(
|
|
49109
|
+
const { playbackRate, setPlaybackRate } = Internals85.usePlaybackRate();
|
|
49110
|
+
const { playerMuted } = useContext101(Internals85.MediaVolumeContext);
|
|
49111
|
+
const { setPlayerMuted } = useContext101(Internals85.SetMediaVolumeContext);
|
|
49112
|
+
const { canvasContent } = useContext101(Internals85.CompositionManager);
|
|
48996
49113
|
const isVideoComposition = useIsVideoComposition();
|
|
48997
49114
|
const previewToolbarRef = useRef55(null);
|
|
48998
49115
|
const leftScrollIndicatorRef = useRef55(null);
|
|
@@ -49509,7 +49626,7 @@ var useResponsiveSidebarStatus = () => {
|
|
|
49509
49626
|
var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
|
|
49510
49627
|
const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext104(SidebarContext);
|
|
49511
49628
|
const rulersAreVisible = useIsRulerVisible();
|
|
49512
|
-
const { canvasContent } = useContext104(
|
|
49629
|
+
const { canvasContent } = useContext104(Internals86.CompositionManager);
|
|
49513
49630
|
const actualStateLeft = useResponsiveSidebarStatus();
|
|
49514
49631
|
const actualStateRight = useMemo161(() => {
|
|
49515
49632
|
if (sidebarCollapsedStateRight === "collapsed") {
|
|
@@ -50144,7 +50261,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
|
|
|
50144
50261
|
|
|
50145
50262
|
// src/components/Timeline/Timeline.tsx
|
|
50146
50263
|
import React213, { useCallback as useCallback171, useContext as useContext125, useMemo as useMemo185, useState as useState102 } from "react";
|
|
50147
|
-
import { Internals as
|
|
50264
|
+
import { Internals as Internals104 } from "remotion";
|
|
50148
50265
|
|
|
50149
50266
|
// src/components/Timeline/MaxTimelineTracks.tsx
|
|
50150
50267
|
import { jsxs as jsxs134 } from "react/jsx-runtime";
|
|
@@ -50175,10 +50292,10 @@ var MaxTimelineTracksReached = () => {
|
|
|
50175
50292
|
|
|
50176
50293
|
// src/components/Timeline/SequencePropsObserver.tsx
|
|
50177
50294
|
import { useContext as useContext108, useEffect as useEffect82 } from "react";
|
|
50178
|
-
import { Internals as
|
|
50295
|
+
import { Internals as Internals87 } from "remotion";
|
|
50179
50296
|
var SequencePropsObserver = () => {
|
|
50180
50297
|
const { subscribeToEvent } = useContext108(StudioServerConnectionCtx);
|
|
50181
|
-
const { setPropStatuses } = useContext108(
|
|
50298
|
+
const { setPropStatuses } = useContext108(Internals87.VisualModeSettersContext);
|
|
50182
50299
|
useEffect82(() => {
|
|
50183
50300
|
const handleEvent = (event) => {
|
|
50184
50301
|
if (event.type !== "sequence-props-updated") {
|
|
@@ -50223,11 +50340,11 @@ import {
|
|
|
50223
50340
|
stringifySequenceSubscriptionKey as stringifySequenceSubscriptionKey2
|
|
50224
50341
|
} from "@remotion/studio-shared";
|
|
50225
50342
|
import { useContext as useContext109, useEffect as useEffect83, useMemo as useMemo164, useRef as useRef59 } from "react";
|
|
50226
|
-
import { Internals as
|
|
50343
|
+
import { Internals as Internals89 } from "remotion";
|
|
50227
50344
|
|
|
50228
50345
|
// src/components/Timeline/sequence-props-subscription-store.ts
|
|
50229
50346
|
import { getAllSchemaKeys, getAssetSchemaKeys as getAssetSchemaKeys2 } from "@remotion/studio-shared";
|
|
50230
|
-
import { Internals as
|
|
50347
|
+
import { Internals as Internals88 } from "remotion";
|
|
50231
50348
|
var makeKey2 = ({
|
|
50232
50349
|
fileName,
|
|
50233
50350
|
line: line3,
|
|
@@ -50302,7 +50419,7 @@ var acquireSequencePropsSubscription = ({
|
|
|
50302
50419
|
return;
|
|
50303
50420
|
}
|
|
50304
50421
|
current.applyOnce = null;
|
|
50305
|
-
|
|
50422
|
+
Internals88.Log.error(err);
|
|
50306
50423
|
});
|
|
50307
50424
|
}
|
|
50308
50425
|
entry.refCount++;
|
|
@@ -50347,16 +50464,16 @@ var useSequencePropsSubscription = ({
|
|
|
50347
50464
|
schema,
|
|
50348
50465
|
effects
|
|
50349
50466
|
}) => {
|
|
50350
|
-
const { setPropStatuses } = useContext109(
|
|
50351
|
-
const { setOverrideIdToNodePath } = useContext109(
|
|
50352
|
-
const { overrideIdToNodePathMappings } = useContext109(
|
|
50467
|
+
const { setPropStatuses } = useContext109(Internals89.VisualModeSettersContext);
|
|
50468
|
+
const { setOverrideIdToNodePath } = useContext109(Internals89.OverrideIdsToNodePathsSettersContext);
|
|
50469
|
+
const { overrideIdToNodePathMappings } = useContext109(Internals89.OverrideIdsToNodePathsGettersContext);
|
|
50353
50470
|
const { migrateExpandedTracksForSubscriptionKey: migrateExpandedTracksForSubscriptionKey2 } = useContext109(ExpandedTracksSetterContext);
|
|
50354
50471
|
const { previewServerState: state } = useContext109(StudioServerConnectionCtx);
|
|
50355
50472
|
const previousNodePathRef = useRef59(null);
|
|
50356
50473
|
const overrideIdToNodePathMappingsRef = useRef59(overrideIdToNodePathMappings);
|
|
50357
50474
|
overrideIdToNodePathMappingsRef.current = overrideIdToNodePathMappings;
|
|
50358
50475
|
const clientId = state.type === "connected" ? state.clientId : undefined;
|
|
50359
|
-
const videoConfig =
|
|
50476
|
+
const videoConfig = Internals89.useUnsafeVideoConfig();
|
|
50360
50477
|
const effectsSignature = useMemo164(() => effects.map((effect) => getAllSchemaKeys2(effect).join("\x00")).join("\x00\x00"), [effects]);
|
|
50361
50478
|
const validatedLocation = useMemo164(() => {
|
|
50362
50479
|
if (!originalLocation || !originalLocation.source || !originalLocation.line) {
|
|
@@ -50463,11 +50580,11 @@ import React192, {
|
|
|
50463
50580
|
useRef as useRef62,
|
|
50464
50581
|
useState as useState94
|
|
50465
50582
|
} from "react";
|
|
50466
|
-
import { Internals as
|
|
50583
|
+
import { Internals as Internals92, useVideoConfig as useVideoConfig11 } from "remotion";
|
|
50467
50584
|
|
|
50468
50585
|
// src/components/Timeline/TimelineTimeIndicators.tsx
|
|
50469
50586
|
import { useContext as useContext110, useEffect as useEffect85, useMemo as useMemo166, useRef as useRef61 } from "react";
|
|
50470
|
-
import { Internals as
|
|
50587
|
+
import { Internals as Internals91 } from "remotion";
|
|
50471
50588
|
|
|
50472
50589
|
// src/components/TimeValue.tsx
|
|
50473
50590
|
import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
|
|
@@ -50477,7 +50594,7 @@ import {
|
|
|
50477
50594
|
useImperativeHandle as useImperativeHandle13,
|
|
50478
50595
|
useRef as useRef60
|
|
50479
50596
|
} from "react";
|
|
50480
|
-
import { Internals as
|
|
50597
|
+
import { Internals as Internals90, useCurrentFrame } from "remotion";
|
|
50481
50598
|
import { jsx as jsx270, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
50482
50599
|
var text = {
|
|
50483
50600
|
color: WHITE,
|
|
@@ -50504,7 +50621,7 @@ var frameStyle = {
|
|
|
50504
50621
|
};
|
|
50505
50622
|
var TimeValue = () => {
|
|
50506
50623
|
const frame2 = useCurrentFrame();
|
|
50507
|
-
const config =
|
|
50624
|
+
const config = Internals90.useUnsafeVideoConfig();
|
|
50508
50625
|
const isStill = useIsStill();
|
|
50509
50626
|
const { seek, play, pause, toggle } = PlayerInternals20.usePlayer();
|
|
50510
50627
|
const keybindings = useKeybinding();
|
|
@@ -50515,7 +50632,7 @@ var TimeValue = () => {
|
|
|
50515
50632
|
const onValueChange = useCallback162((val) => {
|
|
50516
50633
|
seek(val);
|
|
50517
50634
|
}, [seek]);
|
|
50518
|
-
useImperativeHandle13(
|
|
50635
|
+
useImperativeHandle13(Internals90.timeValueRef, () => ({
|
|
50519
50636
|
goToFrame: () => {
|
|
50520
50637
|
ref2.current?.click();
|
|
50521
50638
|
},
|
|
@@ -50625,7 +50742,7 @@ var TimelineTimePadding = () => {
|
|
|
50625
50742
|
};
|
|
50626
50743
|
var TimelineTimeIndicators = () => {
|
|
50627
50744
|
const sliderTrack = useContext110(TimelineWidthContext);
|
|
50628
|
-
const video =
|
|
50745
|
+
const video = Internals91.useVideo();
|
|
50629
50746
|
if (sliderTrack === null) {
|
|
50630
50747
|
return null;
|
|
50631
50748
|
}
|
|
@@ -50740,9 +50857,9 @@ var getClientXWithScroll = (x) => {
|
|
|
50740
50857
|
return x + scrollableRef.current?.scrollLeft;
|
|
50741
50858
|
};
|
|
50742
50859
|
var TimelineDragHandler = () => {
|
|
50743
|
-
const video =
|
|
50860
|
+
const video = Internals92.useUnsafeVideoConfig();
|
|
50744
50861
|
const { zoom: zoomMap } = useContext111(TimelineZoomCtx);
|
|
50745
|
-
const { canvasContent } = useContext111(
|
|
50862
|
+
const { canvasContent } = useContext111(Internals92.CompositionManager);
|
|
50746
50863
|
const containerStyle9 = useMemo167(() => {
|
|
50747
50864
|
if (!canvasContent || canvasContent.type !== "composition") {
|
|
50748
50865
|
return {};
|
|
@@ -50771,7 +50888,7 @@ var TimelineDragHandlerInner = () => {
|
|
|
50771
50888
|
shouldApplyCssTransforms: true
|
|
50772
50889
|
});
|
|
50773
50890
|
const { isHighestContext } = useZIndex();
|
|
50774
|
-
const setFrame =
|
|
50891
|
+
const setFrame = Internals92.useTimelineSetFrame();
|
|
50775
50892
|
const width = scrollableRef.current?.scrollWidth ?? 0;
|
|
50776
50893
|
const left3 = size3?.left ?? 0;
|
|
50777
50894
|
const [dragging, setDragging] = useState94({
|
|
@@ -50903,7 +51020,7 @@ var TimelineDragHandlerInner = () => {
|
|
|
50903
51020
|
});
|
|
50904
51021
|
setFrame((c) => {
|
|
50905
51022
|
const newObj = { ...c, [videoConfig.id]: frame2 };
|
|
50906
|
-
|
|
51023
|
+
Internals92.persistCurrentFrame(newObj);
|
|
50907
51024
|
return newObj;
|
|
50908
51025
|
});
|
|
50909
51026
|
if (dragging.wasPlaying) {
|
|
@@ -50956,15 +51073,15 @@ import React193, { useMemo as useMemo169 } from "react";
|
|
|
50956
51073
|
|
|
50957
51074
|
// src/components/Timeline/use-timeline-height.ts
|
|
50958
51075
|
import { useContext as useContext112, useMemo as useMemo168 } from "react";
|
|
50959
|
-
import { Internals as
|
|
51076
|
+
import { Internals as Internals93 } from "remotion";
|
|
50960
51077
|
var useTimelineHeight = ({
|
|
50961
51078
|
shown,
|
|
50962
51079
|
hasBeenCut
|
|
50963
51080
|
}) => {
|
|
50964
51081
|
const { getIsExpanded } = useContext112(ExpandedTracksGetterContext);
|
|
50965
51082
|
const { previewServerState } = useContext112(StudioServerConnectionCtx);
|
|
50966
|
-
const { propStatuses } = useContext112(
|
|
50967
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext112(
|
|
51083
|
+
const { propStatuses } = useContext112(Internals93.VisualModePropStatusesContext);
|
|
51084
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext112(Internals93.VisualModeDragOverridesContext);
|
|
50968
51085
|
const { selectedItems } = useTimelineSelection();
|
|
50969
51086
|
const previewServerConnected = previewServerState.type === "connected";
|
|
50970
51087
|
const selectedRowKeys = useMemo168(() => getSelectedTimelineExpandedRowKeys(selectedItems), [selectedItems]);
|
|
@@ -51053,11 +51170,11 @@ import React196, {
|
|
|
51053
51170
|
useMemo as useMemo171,
|
|
51054
51171
|
useState as useState95
|
|
51055
51172
|
} from "react";
|
|
51056
|
-
import { Internals as
|
|
51173
|
+
import { Internals as Internals95, useVideoConfig as useVideoConfig13 } from "remotion";
|
|
51057
51174
|
|
|
51058
51175
|
// src/components/Timeline/TimelineInOutPointer.tsx
|
|
51059
51176
|
import { createRef as createRef11, useContext as useContext113 } from "react";
|
|
51060
|
-
import { Internals as
|
|
51177
|
+
import { Internals as Internals94 } from "remotion";
|
|
51061
51178
|
import { jsx as jsx274, jsxs as jsxs136, Fragment as Fragment47 } from "react/jsx-runtime";
|
|
51062
51179
|
var areaHighlight = {
|
|
51063
51180
|
position: "absolute",
|
|
@@ -51071,7 +51188,7 @@ var inMarkerAreaRef = createRef11();
|
|
|
51071
51188
|
var outMarkerAreaRef = createRef11();
|
|
51072
51189
|
var TimelineInOutPointer = () => {
|
|
51073
51190
|
const { inFrame, outFrame } = useTimelineInOutFramePosition();
|
|
51074
|
-
const videoConfig =
|
|
51191
|
+
const videoConfig = Internals94.useUnsafeVideoConfig();
|
|
51075
51192
|
const timelineWidth = useContext113(TimelineWidthContext);
|
|
51076
51193
|
if (!videoConfig || timelineWidth === null) {
|
|
51077
51194
|
return null;
|
|
@@ -51155,8 +51272,8 @@ var getClientXWithScroll2 = (x) => {
|
|
|
51155
51272
|
return x + scrollableRef.current?.scrollLeft;
|
|
51156
51273
|
};
|
|
51157
51274
|
var TimelineInOutDragHandler = () => {
|
|
51158
|
-
const video =
|
|
51159
|
-
const { canvasContent } = useContext115(
|
|
51275
|
+
const video = Internals95.useUnsafeVideoConfig();
|
|
51276
|
+
const { canvasContent } = useContext115(Internals95.CompositionManager);
|
|
51160
51277
|
if (!canvasContent || canvasContent.type !== "composition") {
|
|
51161
51278
|
return null;
|
|
51162
51279
|
}
|
|
@@ -51424,7 +51541,7 @@ var TimelineInOutDragHandlerInnerMemo = React196.memo(TimelineInOutDragHandlerIn
|
|
|
51424
51541
|
|
|
51425
51542
|
// src/components/Timeline/TimelineSequenceItem.tsx
|
|
51426
51543
|
import React200, { useCallback as useCallback167, useContext as useContext116, useMemo as useMemo176, useState as useState97 } from "react";
|
|
51427
|
-
import { Internals as
|
|
51544
|
+
import { Internals as Internals97 } from "remotion";
|
|
51428
51545
|
|
|
51429
51546
|
// src/components/Timeline/TimelineExpandedSection.tsx
|
|
51430
51547
|
import React197, { useMemo as useMemo172 } from "react";
|
|
@@ -51497,7 +51614,7 @@ var TimelineExpandedSection = ({
|
|
|
51497
51614
|
|
|
51498
51615
|
// src/components/Timeline/TimelineMediaInfo.tsx
|
|
51499
51616
|
import { useMemo as useMemo173 } from "react";
|
|
51500
|
-
import { Internals as
|
|
51617
|
+
import { Internals as Internals96 } from "remotion";
|
|
51501
51618
|
import { jsx as jsx278 } from "react/jsx-runtime";
|
|
51502
51619
|
var lineStyle = {
|
|
51503
51620
|
whiteSpace: "nowrap",
|
|
@@ -51527,7 +51644,7 @@ var useAssetLink = (src) => {
|
|
|
51527
51644
|
};
|
|
51528
51645
|
};
|
|
51529
51646
|
var TimelineMediaInfo = ({ src }) => {
|
|
51530
|
-
const fileName = useMemo173(() =>
|
|
51647
|
+
const fileName = useMemo173(() => Internals96.getAssetDisplayName(src), [src]);
|
|
51531
51648
|
const { linkInfo, fileNameStyle } = useAssetLink(src);
|
|
51532
51649
|
return /* @__PURE__ */ jsx278("div", {
|
|
51533
51650
|
style: fileNameStyle,
|
|
@@ -51842,7 +51959,7 @@ var TimelineSequenceItem = ({
|
|
|
51842
51959
|
const previewInteractive = previewConnected && studioInteractivityEnabled;
|
|
51843
51960
|
const { getIsExpanded } = useContext116(ExpandedTracksGetterContext);
|
|
51844
51961
|
const { toggleTrack } = useContext116(ExpandedTracksSetterContext);
|
|
51845
|
-
const { setPropStatuses } = useContext116(
|
|
51962
|
+
const { setPropStatuses } = useContext116(Internals97.VisualModeSettersContext);
|
|
51846
51963
|
const { setSelectedModal } = useContext116(ModalsContext);
|
|
51847
51964
|
const { isHighestContext } = useKeybinding();
|
|
51848
51965
|
const selectAsset = useSelectAsset();
|
|
@@ -51854,7 +51971,7 @@ var TimelineSequenceItem = ({
|
|
|
51854
51971
|
const [isRenaming, setIsRenaming] = useState97(false);
|
|
51855
51972
|
const [sequenceDropIndicator, setSequenceDropIndicator] = useState97(null);
|
|
51856
51973
|
const [sequenceDropRejection, setSequenceDropRejection] = useState97(null);
|
|
51857
|
-
const timelinePosition =
|
|
51974
|
+
const timelinePosition = Internals97.Timeline.useTimelinePosition();
|
|
51858
51975
|
const { canOpenInEditor, openInEditor: openInEditor2, originalLocation } = useOpenSequenceInEditor(sequence);
|
|
51859
51976
|
const fileLocation = useMemo176(() => formatFileLocation({
|
|
51860
51977
|
location: originalLocation,
|
|
@@ -51884,7 +52001,7 @@ var TimelineSequenceItem = ({
|
|
|
51884
52001
|
});
|
|
51885
52002
|
const timelineDisplayName = sequence.displayName === "" && connectedCompositions.length === 1 ? connectedCompositions[0].id : displayName;
|
|
51886
52003
|
const canDeleteFromSource = Boolean(nodePath && validatedLocation?.source);
|
|
51887
|
-
const nodePathKey = useMemo176(() => nodePath ?
|
|
52004
|
+
const nodePathKey = useMemo176(() => nodePath ? Internals97.makeSequencePropsSubscriptionKey(nodePath) : null, [nodePath]);
|
|
51888
52005
|
const parentId = sequence.parent ?? null;
|
|
51889
52006
|
const canReorderSequence = previewInteractive && Boolean(nodePath && nodePathKey && validatedLocation?.source) && nodePathInfo?.numberOfSequencesWithThisNodePath === 1;
|
|
51890
52007
|
const canHandleSequenceDrag = previewInteractive;
|
|
@@ -52189,11 +52306,23 @@ var TimelineSequenceItem = ({
|
|
|
52189
52306
|
}
|
|
52190
52307
|
e.stopPropagation();
|
|
52191
52308
|
if (action2 === "open-connected-composition") {
|
|
52192
|
-
selectComposition(connectedCompositions[0], true
|
|
52309
|
+
selectComposition(connectedCompositions[0], true, getConnectedCompositionFrame({
|
|
52310
|
+
timelinePosition,
|
|
52311
|
+
sequence,
|
|
52312
|
+
sequenceFrameOffset
|
|
52313
|
+
}));
|
|
52193
52314
|
return;
|
|
52194
52315
|
}
|
|
52195
52316
|
openInEditor2();
|
|
52196
|
-
}, [
|
|
52317
|
+
}, [
|
|
52318
|
+
canOpenInEditor,
|
|
52319
|
+
connectedCompositions,
|
|
52320
|
+
openInEditor2,
|
|
52321
|
+
selectComposition,
|
|
52322
|
+
sequence,
|
|
52323
|
+
sequenceFrameOffset,
|
|
52324
|
+
timelinePosition
|
|
52325
|
+
]);
|
|
52197
52326
|
const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
|
|
52198
52327
|
const canRenameSelectedSequence = canRenameThisSequence && selected && selectedItems.length === 1 && selectedItems[0]?.type === "sequence";
|
|
52199
52328
|
const onCancelRenaming = useCallback167(() => {
|
|
@@ -52518,12 +52647,12 @@ var TimelineList = ({ timeline }) => {
|
|
|
52518
52647
|
|
|
52519
52648
|
// src/components/Timeline/TimelinePinchZoom.tsx
|
|
52520
52649
|
import { useCallback as useCallback168, useContext as useContext117, useEffect as useEffect89, useRef as useRef64 } from "react";
|
|
52521
|
-
import { Internals as
|
|
52650
|
+
import { Internals as Internals98 } from "remotion";
|
|
52522
52651
|
var ZOOM_WHEEL_DELTA = 0.06;
|
|
52523
52652
|
var TimelinePinchZoom = () => {
|
|
52524
52653
|
const isVideoComposition = useIsVideoComposition();
|
|
52525
|
-
const videoConfig =
|
|
52526
|
-
const { canvasContent } = useContext117(
|
|
52654
|
+
const videoConfig = Internals98.useUnsafeVideoConfig();
|
|
52655
|
+
const { canvasContent } = useContext117(Internals98.CompositionManager);
|
|
52527
52656
|
const { zoom, setZoom } = useContext117(TimelineZoomCtx);
|
|
52528
52657
|
const { editorZoomGestures } = useContext117(EditorZoomGesturesContext);
|
|
52529
52658
|
const zoomRef = useRef64(zoom);
|
|
@@ -52735,14 +52864,14 @@ var TimelinePinchZoom = () => {
|
|
|
52735
52864
|
|
|
52736
52865
|
// src/components/Timeline/TimelinePlayCursorSyncer.tsx
|
|
52737
52866
|
import { useContext as useContext118, useEffect as useEffect90 } from "react";
|
|
52738
|
-
import { Internals as
|
|
52867
|
+
import { Internals as Internals99 } from "remotion";
|
|
52739
52868
|
var lastTimelinePositionWhileScrolling = null;
|
|
52740
52869
|
var TimelinePlayCursorSyncer = () => {
|
|
52741
|
-
const video =
|
|
52742
|
-
const timelinePosition =
|
|
52743
|
-
const [playing] =
|
|
52744
|
-
const { playbackRate } =
|
|
52745
|
-
const { canvasContent } = useContext118(
|
|
52870
|
+
const video = Internals99.useVideo();
|
|
52871
|
+
const timelinePosition = Internals99.Timeline.useTimelinePosition();
|
|
52872
|
+
const [playing] = Internals99.Timeline.usePlayingState();
|
|
52873
|
+
const { playbackRate } = Internals99.usePlaybackRate();
|
|
52874
|
+
const { canvasContent } = useContext118(Internals99.CompositionManager);
|
|
52746
52875
|
const { zoom: zoomMap } = useContext118(TimelineZoomCtx);
|
|
52747
52876
|
const compositionId = canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null;
|
|
52748
52877
|
const zoom = compositionId ? zoomMap[compositionId] ?? TIMELINE_MIN_ZOOM : null;
|
|
@@ -52968,7 +53097,7 @@ var TimelineExpandedKeyframeRow = React203.memo(TimelineExpandedKeyframeRowUnmem
|
|
|
52968
53097
|
// src/components/Timeline/use-expanded-track-keyframe-rows.ts
|
|
52969
53098
|
import { canEditEasingForInterpolationFunction as canEditEasingForInterpolationFunction4 } from "@remotion/studio-shared";
|
|
52970
53099
|
import { useContext as useContext121, useMemo as useMemo179 } from "react";
|
|
52971
|
-
import { Internals as
|
|
53100
|
+
import { Internals as Internals100 } from "remotion";
|
|
52972
53101
|
var getNodeCanEditEasing = ({
|
|
52973
53102
|
node,
|
|
52974
53103
|
nodePath,
|
|
@@ -52978,10 +53107,10 @@ var getNodeCanEditEasing = ({
|
|
|
52978
53107
|
return false;
|
|
52979
53108
|
}
|
|
52980
53109
|
if (node.field.kind === "sequence-field") {
|
|
52981
|
-
const sequencePropStatus =
|
|
53110
|
+
const sequencePropStatus = Internals100.getPropStatusesCtx(propStatuses, nodePath)?.[node.field.key];
|
|
52982
53111
|
return sequencePropStatus?.status === "keyframed" && canEditEasingForInterpolationFunction4(sequencePropStatus.interpolationFunction);
|
|
52983
53112
|
}
|
|
52984
|
-
const effectStatus =
|
|
53113
|
+
const effectStatus = Internals100.getEffectPropStatusesCtx({
|
|
52985
53114
|
propStatuses,
|
|
52986
53115
|
nodePath,
|
|
52987
53116
|
effectIndex: node.field.effectIndex
|
|
@@ -52995,10 +53124,10 @@ var useExpandedTrackKeyframeRows = ({
|
|
|
52995
53124
|
keyframeDisplayOffset
|
|
52996
53125
|
}) => {
|
|
52997
53126
|
const { getIsExpanded } = useContext121(ExpandedTracksGetterContext);
|
|
52998
|
-
const { propStatuses } = useContext121(
|
|
52999
|
-
const { getDragOverrides, getEffectDragOverrides } = useContext121(
|
|
53127
|
+
const { propStatuses } = useContext121(Internals100.VisualModePropStatusesContext);
|
|
53128
|
+
const { getDragOverrides, getEffectDragOverrides } = useContext121(Internals100.VisualModeDragOverridesContext);
|
|
53000
53129
|
const { selectedItems } = useTimelineSelection();
|
|
53001
|
-
const timelinePosition =
|
|
53130
|
+
const timelinePosition = Internals100.Timeline.useTimelinePosition();
|
|
53002
53131
|
const tree = useMemo179(() => buildTimelineTree({
|
|
53003
53132
|
sequence,
|
|
53004
53133
|
nodePathInfo,
|
|
@@ -53101,7 +53230,7 @@ var TimelineExpandedTrackKeyframes = React204.memo(TimelineExpandedTrackKeyframe
|
|
|
53101
53230
|
|
|
53102
53231
|
// src/components/Timeline/TimelineSequence.tsx
|
|
53103
53232
|
import React210, { useCallback as useCallback170, useContext as useContext123, useMemo as useMemo182, useRef as useRef70 } from "react";
|
|
53104
|
-
import { Internals as
|
|
53233
|
+
import { Internals as Internals103, useCurrentFrame as useCurrentFrame2 } from "remotion";
|
|
53105
53234
|
|
|
53106
53235
|
// src/helpers/get-timeline-sequence-layout.ts
|
|
53107
53236
|
var SEQUENCE_BORDER_WIDTH = 1;
|
|
@@ -53229,7 +53358,7 @@ import {
|
|
|
53229
53358
|
sliceWaveformPeaks
|
|
53230
53359
|
} from "@remotion/timeline-utils";
|
|
53231
53360
|
import { useEffect as useEffect92, useMemo as useMemo180, useRef as useRef66, useState as useState99 } from "react";
|
|
53232
|
-
import { Internals as
|
|
53361
|
+
import { Internals as Internals101 } from "remotion";
|
|
53233
53362
|
import { jsx as jsx286, jsxs as jsxs144 } from "react/jsx-runtime";
|
|
53234
53363
|
var EMPTY_PEAKS = new Float32Array(0);
|
|
53235
53364
|
var canRetryCanvasTransfer = (err) => {
|
|
@@ -53327,7 +53456,7 @@ var AudioWaveform = ({
|
|
|
53327
53456
|
const [error, setError] = useState99(null);
|
|
53328
53457
|
const [waveformCanvasKey, setWaveformCanvasKey] = useState99(0);
|
|
53329
53458
|
const canUseWorkerPath = useMemo180(() => canUseAudioWaveformWorker(), []);
|
|
53330
|
-
const vidConf =
|
|
53459
|
+
const vidConf = Internals101.useUnsafeVideoConfig();
|
|
53331
53460
|
if (vidConf === null) {
|
|
53332
53461
|
throw new Error("Expected video config");
|
|
53333
53462
|
}
|
|
@@ -53733,7 +53862,7 @@ import {
|
|
|
53733
53862
|
useRef as useRef68,
|
|
53734
53863
|
useState as useState100
|
|
53735
53864
|
} from "react";
|
|
53736
|
-
import { Internals as
|
|
53865
|
+
import { Internals as Internals102 } from "remotion";
|
|
53737
53866
|
import { NoReactInternals as NoReactInternals29 } from "remotion/no-react";
|
|
53738
53867
|
import { jsx as jsx291 } from "react/jsx-runtime";
|
|
53739
53868
|
var HANDLE_WIDTH3 = 6;
|
|
@@ -53751,7 +53880,7 @@ var getKeyframedSequenceDragTargets = ({
|
|
|
53751
53880
|
sequence,
|
|
53752
53881
|
propStatuses
|
|
53753
53882
|
}) => {
|
|
53754
|
-
const status = propStatuses[
|
|
53883
|
+
const status = propStatuses[Internals102.makeSequencePropsSubscriptionKey(nodePath)];
|
|
53755
53884
|
if (status === null || status === undefined || !status.canUpdate) {
|
|
53756
53885
|
return { effectKeyframes: [], sequenceKeyframes: [] };
|
|
53757
53886
|
}
|
|
@@ -53792,21 +53921,21 @@ var canUpdateDurationInFrames = ({
|
|
|
53792
53921
|
propStatuses,
|
|
53793
53922
|
nodePath
|
|
53794
53923
|
}) => {
|
|
53795
|
-
const status =
|
|
53924
|
+
const status = Internals102.getPropStatusesCtx(propStatuses, nodePath)?.durationInFrames?.status;
|
|
53796
53925
|
return status === "static";
|
|
53797
53926
|
};
|
|
53798
53927
|
var canUpdateFrom = ({
|
|
53799
53928
|
propStatuses,
|
|
53800
53929
|
nodePath
|
|
53801
53930
|
}) => {
|
|
53802
|
-
const status =
|
|
53931
|
+
const status = Internals102.getPropStatusesCtx(propStatuses, nodePath)?.from?.status;
|
|
53803
53932
|
return status === "static";
|
|
53804
53933
|
};
|
|
53805
53934
|
var canUpdateTrimBefore = ({
|
|
53806
53935
|
propStatuses,
|
|
53807
53936
|
nodePath
|
|
53808
53937
|
}) => {
|
|
53809
|
-
const status =
|
|
53938
|
+
const status = Internals102.getPropStatusesCtx(propStatuses, nodePath)?.trimBefore?.status;
|
|
53810
53939
|
return status === "static";
|
|
53811
53940
|
};
|
|
53812
53941
|
var isTimelineSequenceDurationDraggable = (sequence) => {
|
|
@@ -54146,10 +54275,10 @@ var clearFromDragOverrides = ({
|
|
|
54146
54275
|
}
|
|
54147
54276
|
};
|
|
54148
54277
|
var TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
54149
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(
|
|
54150
|
-
const propStatusesRef = useContext122(
|
|
54151
|
-
const sequencesRef = useContext122(
|
|
54152
|
-
const { overrideIdToNodePathMappings } = useContext122(
|
|
54278
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(Internals102.VisualModeSettersContext);
|
|
54279
|
+
const propStatusesRef = useContext122(Internals102.VisualModePropStatusesRefContext);
|
|
54280
|
+
const sequencesRef = useContext122(Internals102.SequenceManagerRefContext);
|
|
54281
|
+
const { overrideIdToNodePathMappings } = useContext122(Internals102.OverrideIdsToNodePathsGettersContext);
|
|
54153
54282
|
const { previewServerState } = useContext122(StudioServerConnectionCtx);
|
|
54154
54283
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
54155
54284
|
const [dragging, setDragging] = useState100(false);
|
|
@@ -54204,7 +54333,7 @@ var TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineD
|
|
|
54204
54333
|
redoLabel: dragState.targets.length > 1 ? "Resize selected sequences back" : "Resize sequence back"
|
|
54205
54334
|
});
|
|
54206
54335
|
savePromise.catch((err) => {
|
|
54207
|
-
|
|
54336
|
+
Internals102.Log.error({ logLevel: "error", tag: null }, "Could not save left edge drag", err);
|
|
54208
54337
|
}).finally(() => {
|
|
54209
54338
|
clearLeftEdgeDragOverrides({
|
|
54210
54339
|
clearDragOverrides: latestClear,
|
|
@@ -54274,9 +54403,9 @@ var TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineD
|
|
|
54274
54403
|
initialTrimBefore: target.initialTrimBefore,
|
|
54275
54404
|
deltaFrames
|
|
54276
54405
|
});
|
|
54277
|
-
latestRef.current.setDragOverrides(target.nodePath, "from",
|
|
54278
|
-
latestRef.current.setDragOverrides(target.nodePath, "durationInFrames",
|
|
54279
|
-
latestRef.current.setDragOverrides(target.nodePath, "trimBefore",
|
|
54406
|
+
latestRef.current.setDragOverrides(target.nodePath, "from", Internals102.makeStaticDragOverride(nextValues.from));
|
|
54407
|
+
latestRef.current.setDragOverrides(target.nodePath, "durationInFrames", Internals102.makeStaticDragOverride(nextValues.durationInFrames));
|
|
54408
|
+
latestRef.current.setDragOverrides(target.nodePath, "trimBefore", Internals102.makeStaticDragOverride(nextValues.trimBefore));
|
|
54280
54409
|
}
|
|
54281
54410
|
};
|
|
54282
54411
|
const onUp = (e) => {
|
|
@@ -54331,10 +54460,10 @@ var useTimelineSequenceFromDrag = ({
|
|
|
54331
54460
|
clearDragOverrides,
|
|
54332
54461
|
setEffectDragOverrides,
|
|
54333
54462
|
clearEffectDragOverrides
|
|
54334
|
-
} = useContext122(
|
|
54335
|
-
const propStatusesRef = useContext122(
|
|
54336
|
-
const sequencesRef = useContext122(
|
|
54337
|
-
const { overrideIdToNodePathMappings } = useContext122(
|
|
54463
|
+
} = useContext122(Internals102.VisualModeSettersContext);
|
|
54464
|
+
const propStatusesRef = useContext122(Internals102.VisualModePropStatusesRefContext);
|
|
54465
|
+
const sequencesRef = useContext122(Internals102.SequenceManagerRefContext);
|
|
54466
|
+
const { overrideIdToNodePathMappings } = useContext122(Internals102.OverrideIdsToNodePathsGettersContext);
|
|
54338
54467
|
const { previewServerState } = useContext122(StudioServerConnectionCtx);
|
|
54339
54468
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
54340
54469
|
const [dragging, setDragging] = useState100(false);
|
|
@@ -54402,7 +54531,7 @@ var useTimelineSequenceFromDrag = ({
|
|
|
54402
54531
|
redoLabel: dragState.targets.length > 1 ? "Move selected sequences back" : "Move sequence back"
|
|
54403
54532
|
});
|
|
54404
54533
|
savePromise.catch((err) => {
|
|
54405
|
-
|
|
54534
|
+
Internals102.Log.error({ logLevel: "error", tag: null }, "Could not save from", err);
|
|
54406
54535
|
}).finally(() => {
|
|
54407
54536
|
clearFromDragOverrides({
|
|
54408
54537
|
clearDragOverrides: latestClear,
|
|
@@ -54472,7 +54601,7 @@ var useTimelineSequenceFromDrag = ({
|
|
|
54472
54601
|
initialFrom: target.initialFrom,
|
|
54473
54602
|
deltaFrames
|
|
54474
54603
|
});
|
|
54475
|
-
latestRef.current.setDragOverrides(target.nodePath, "from",
|
|
54604
|
+
latestRef.current.setDragOverrides(target.nodePath, "from", Internals102.makeStaticDragOverride(nextFrom));
|
|
54476
54605
|
for (const keyframeTarget of target.sequenceKeyframes) {
|
|
54477
54606
|
latestRef.current.setDragOverrides(target.nodePath, keyframeTarget.fieldKey, {
|
|
54478
54607
|
type: "keyframed",
|
|
@@ -54527,10 +54656,10 @@ var useTimelineSequenceFromDrag = ({
|
|
|
54527
54656
|
};
|
|
54528
54657
|
};
|
|
54529
54658
|
var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
54530
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(
|
|
54531
|
-
const propStatusesRef = useContext122(
|
|
54532
|
-
const sequencesRef = useContext122(
|
|
54533
|
-
const { overrideIdToNodePathMappings } = useContext122(
|
|
54659
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = useContext122(Internals102.VisualModeSettersContext);
|
|
54660
|
+
const propStatusesRef = useContext122(Internals102.VisualModePropStatusesRefContext);
|
|
54661
|
+
const sequencesRef = useContext122(Internals102.SequenceManagerRefContext);
|
|
54662
|
+
const { overrideIdToNodePathMappings } = useContext122(Internals102.OverrideIdsToNodePathsGettersContext);
|
|
54534
54663
|
const { previewServerState } = useContext122(StudioServerConnectionCtx);
|
|
54535
54664
|
const currentSelection = useCurrentTimelineSelectionStateAsRef();
|
|
54536
54665
|
const [dragging, setDragging] = useState100(false);
|
|
@@ -54585,7 +54714,7 @@ var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeline
|
|
|
54585
54714
|
redoLabel: changes.length > 1 ? "Resize selected sequences back" : "Resize sequence back"
|
|
54586
54715
|
});
|
|
54587
54716
|
savePromise.catch((err) => {
|
|
54588
|
-
|
|
54717
|
+
Internals102.Log.error({ logLevel: "error", tag: null }, "Could not save durationInFrames", err);
|
|
54589
54718
|
}).finally(() => {
|
|
54590
54719
|
clearDurationDragOverrides({
|
|
54591
54720
|
clearDragOverrides: latestClear,
|
|
@@ -54649,7 +54778,7 @@ var TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeline
|
|
|
54649
54778
|
const deltaFrames = Math.round(dx / dragState.pxPerFrame);
|
|
54650
54779
|
dragState.latestDeltaFrames = deltaFrames;
|
|
54651
54780
|
for (const target of dragState.targets) {
|
|
54652
|
-
latestRef.current.setDragOverrides(target.nodePath, "durationInFrames",
|
|
54781
|
+
latestRef.current.setDragOverrides(target.nodePath, "durationInFrames", Internals102.makeStaticDragOverride(getTimelineSequenceDurationDragValue({
|
|
54653
54782
|
initialDuration: target.initialDuration,
|
|
54654
54783
|
deltaFrames
|
|
54655
54784
|
})));
|
|
@@ -55124,7 +55253,7 @@ var TimelineVideoInfo = ({
|
|
|
55124
55253
|
|
|
55125
55254
|
// src/components/Timeline/TimelineSequence.tsx
|
|
55126
55255
|
import { jsx as jsx293, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
55127
|
-
var TimelineSequenceFn = ({ s, nodePathInfo, sequenceFrameOffset }) => {
|
|
55256
|
+
var TimelineSequenceFn = ({ s, connectedCompositions, nodePathInfo, sequenceFrameOffset }) => {
|
|
55128
55257
|
const windowWidth = useContext123(TimelineWidthContext);
|
|
55129
55258
|
if (windowWidth === null) {
|
|
55130
55259
|
return null;
|
|
@@ -55132,6 +55261,7 @@ var TimelineSequenceFn = ({ s, nodePathInfo, sequenceFrameOffset }) => {
|
|
|
55132
55261
|
return /* @__PURE__ */ jsx293(TimelineSequenceInner, {
|
|
55133
55262
|
windowWidth,
|
|
55134
55263
|
s,
|
|
55264
|
+
connectedCompositions,
|
|
55135
55265
|
nodePathInfo,
|
|
55136
55266
|
sequenceFrameOffset
|
|
55137
55267
|
});
|
|
@@ -55147,7 +55277,8 @@ var TimelineSequenceCurrentFrame = ({
|
|
|
55147
55277
|
sequenceFrameOffset,
|
|
55148
55278
|
fromCanUpdate,
|
|
55149
55279
|
frozenFrame,
|
|
55150
|
-
onMoveDragPointerDown
|
|
55280
|
+
onMoveDragPointerDown,
|
|
55281
|
+
onDoubleClick
|
|
55151
55282
|
}) => {
|
|
55152
55283
|
const ref2 = useRef70(null);
|
|
55153
55284
|
const { onSelect, selectable, selected, selectionItem } = useTimelineRowSelection(nodePathInfo);
|
|
@@ -55192,6 +55323,7 @@ var TimelineSequenceCurrentFrame = ({
|
|
|
55192
55323
|
style: actualStyle,
|
|
55193
55324
|
title: s.displayName,
|
|
55194
55325
|
onPointerDown: selectable ? onPointerDown : undefined,
|
|
55326
|
+
onDoubleClick,
|
|
55195
55327
|
children: [
|
|
55196
55328
|
premountWidth ? /* @__PURE__ */ jsx293("div", {
|
|
55197
55329
|
style: {
|
|
@@ -55240,8 +55372,14 @@ var TimelineSequenceCurrentFrame = ({
|
|
|
55240
55372
|
]
|
|
55241
55373
|
});
|
|
55242
55374
|
};
|
|
55243
|
-
var TimelineSequenceInner = ({
|
|
55244
|
-
|
|
55375
|
+
var TimelineSequenceInner = ({
|
|
55376
|
+
s,
|
|
55377
|
+
connectedCompositions,
|
|
55378
|
+
windowWidth,
|
|
55379
|
+
nodePathInfo,
|
|
55380
|
+
sequenceFrameOffset
|
|
55381
|
+
}) => {
|
|
55382
|
+
const video = Internals103.useVideo();
|
|
55245
55383
|
const maxMediaDuration = useMaxMediaDuration(s, video?.fps ?? 30);
|
|
55246
55384
|
const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
|
|
55247
55385
|
const originalLocation = useResolveStackAndReactToChange(s.getStack);
|
|
@@ -55255,10 +55393,10 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
|
|
|
55255
55393
|
column: originalLocation.column ?? 0
|
|
55256
55394
|
};
|
|
55257
55395
|
}, [originalLocation]);
|
|
55258
|
-
const { propStatuses } = useContext123(
|
|
55396
|
+
const { propStatuses } = useContext123(Internals103.VisualModePropStatusesContext);
|
|
55259
55397
|
const nodePath = nodePathInfo?.sequenceSubscriptionKey ?? null;
|
|
55260
55398
|
const propStatusesForOverride = useMemo182(() => {
|
|
55261
|
-
return nodePath ?
|
|
55399
|
+
return nodePath ? Internals103.getPropStatusesCtx(propStatuses, nodePath) : undefined;
|
|
55262
55400
|
}, [propStatuses, nodePath]);
|
|
55263
55401
|
const durationCanUpdate = Boolean(studioInteractivityEnabled && propStatusesForOverride?.durationInFrames?.status === "static");
|
|
55264
55402
|
const fromCanUpdate = Boolean(studioInteractivityEnabled && propStatusesForOverride?.from?.status === "static");
|
|
@@ -55266,9 +55404,10 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
|
|
|
55266
55404
|
const { previewServerState } = useContext123(StudioServerConnectionCtx);
|
|
55267
55405
|
const previewConnected = previewServerState.type === "connected";
|
|
55268
55406
|
const previewInteractive = previewConnected && studioInteractivityEnabled;
|
|
55269
|
-
const { setPropStatuses } = useContext123(
|
|
55270
|
-
const timelinePosition =
|
|
55407
|
+
const { setPropStatuses } = useContext123(Internals103.VisualModeSettersContext);
|
|
55408
|
+
const timelinePosition = Internals103.Timeline.useTimelinePosition();
|
|
55271
55409
|
const selectAsset = useSelectAsset();
|
|
55410
|
+
const selectComposition = useSelectComposition();
|
|
55272
55411
|
const confirm = useConfirmationDialog();
|
|
55273
55412
|
const { onSelect, selectable } = useTimelineRowSelection(nodePathInfo);
|
|
55274
55413
|
const fileLocation = useMemo182(() => formatFileLocation({
|
|
@@ -55284,6 +55423,39 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
|
|
|
55284
55423
|
showNotification(err.message, 2000);
|
|
55285
55424
|
});
|
|
55286
55425
|
}, [canOpenInEditor, originalLocation]);
|
|
55426
|
+
const onSequenceDoubleClick = useCallback170((e) => {
|
|
55427
|
+
if (isTimelineSelectionModifierEvent(e)) {
|
|
55428
|
+
e.stopPropagation();
|
|
55429
|
+
return;
|
|
55430
|
+
}
|
|
55431
|
+
const action2 = getSequenceDoubleClickAction({
|
|
55432
|
+
button: e.button,
|
|
55433
|
+
canOpenInEditor,
|
|
55434
|
+
numberOfConnectedCompositions: connectedCompositions.length
|
|
55435
|
+
});
|
|
55436
|
+
if (action2 === null) {
|
|
55437
|
+
return;
|
|
55438
|
+
}
|
|
55439
|
+
e.stopPropagation();
|
|
55440
|
+
if (action2 === "open-connected-composition") {
|
|
55441
|
+
selectComposition(connectedCompositions[0], true, getConnectedCompositionFrame({
|
|
55442
|
+
timelinePosition,
|
|
55443
|
+
sequence: s,
|
|
55444
|
+
sequenceFrameOffset
|
|
55445
|
+
}));
|
|
55446
|
+
return;
|
|
55447
|
+
}
|
|
55448
|
+
openInEditor2();
|
|
55449
|
+
}, [
|
|
55450
|
+
canOpenInEditor,
|
|
55451
|
+
connectedCompositions,
|
|
55452
|
+
openInEditor2,
|
|
55453
|
+
s,
|
|
55454
|
+
selectComposition,
|
|
55455
|
+
sequenceFrameOffset,
|
|
55456
|
+
timelinePosition
|
|
55457
|
+
]);
|
|
55458
|
+
const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
|
|
55287
55459
|
const canDeleteFromSource = Boolean(nodePath && validatedLocation?.source);
|
|
55288
55460
|
const deleteDisabled = !previewInteractive || !s.controls || !canDeleteFromSource;
|
|
55289
55461
|
const duplicateDisabled = deleteDisabled;
|
|
@@ -55463,6 +55635,7 @@ var TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffset
|
|
|
55463
55635
|
fromCanUpdate,
|
|
55464
55636
|
frozenFrame,
|
|
55465
55637
|
onMoveDragPointerDown,
|
|
55638
|
+
onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined,
|
|
55466
55639
|
children: [
|
|
55467
55640
|
s.type === "audio" ? /* @__PURE__ */ jsx293(AudioWaveform, {
|
|
55468
55641
|
src: s.src,
|
|
@@ -55542,6 +55715,7 @@ var TimelineTrackUnmemoized = ({ track }) => {
|
|
|
55542
55715
|
}) : null,
|
|
55543
55716
|
/* @__PURE__ */ jsx294(TimelineSequence, {
|
|
55544
55717
|
s: track.sequence,
|
|
55718
|
+
connectedCompositions: track.connectedCompositions ?? [],
|
|
55545
55719
|
nodePathInfo: track.nodePathInfo,
|
|
55546
55720
|
sequenceFrameOffset: track.sequenceFrameOffset
|
|
55547
55721
|
})
|
|
@@ -55605,8 +55779,8 @@ var noop3 = () => {
|
|
|
55605
55779
|
return;
|
|
55606
55780
|
};
|
|
55607
55781
|
var TimelineContextMenuArea = ({ children }) => {
|
|
55608
|
-
const { compositions, canvasContent } = useContext125(
|
|
55609
|
-
const videoConfig =
|
|
55782
|
+
const { compositions, canvasContent } = useContext125(Internals104.CompositionManager);
|
|
55783
|
+
const videoConfig = Internals104.useUnsafeVideoConfig();
|
|
55610
55784
|
const [isAddingSolid, setIsAddingSolid] = useState102(false);
|
|
55611
55785
|
const [isAddingAsset, setIsAddingAsset] = useState102(false);
|
|
55612
55786
|
const { previewServerState } = useContext125(StudioServerConnectionCtx);
|
|
@@ -55668,6 +55842,7 @@ var TimelineContextMenuArea = ({ children }) => {
|
|
|
55668
55842
|
files,
|
|
55669
55843
|
compositionFile,
|
|
55670
55844
|
compositionId: currentCompositionId,
|
|
55845
|
+
destinationDimensions: null,
|
|
55671
55846
|
dropPosition: null
|
|
55672
55847
|
});
|
|
55673
55848
|
} finally {
|
|
@@ -55712,11 +55887,11 @@ var TimelineContextMenuArea = ({ children }) => {
|
|
|
55712
55887
|
});
|
|
55713
55888
|
};
|
|
55714
55889
|
var TimelineInner = () => {
|
|
55715
|
-
const { sequences } = useContext125(
|
|
55716
|
-
const { compositions } = useContext125(
|
|
55717
|
-
const videoConfig =
|
|
55890
|
+
const { sequences } = useContext125(Internals104.SequenceManager);
|
|
55891
|
+
const { compositions } = useContext125(Internals104.CompositionManager);
|
|
55892
|
+
const videoConfig = Internals104.useUnsafeVideoConfig();
|
|
55718
55893
|
const isStill = useIsStill();
|
|
55719
|
-
const { overrideIdToNodePathMappings } = useContext125(
|
|
55894
|
+
const { overrideIdToNodePathMappings } = useContext125(Internals104.OverrideIdsToNodePathsGettersContext);
|
|
55720
55895
|
const { previewServerState } = useContext125(StudioServerConnectionCtx);
|
|
55721
55896
|
const previewConnected = previewServerState.type === "connected";
|
|
55722
55897
|
const previewInteractive = previewConnected && studioInteractivityEnabled;
|
|
@@ -55864,7 +56039,7 @@ var StudioClearSelectionArea = ({ children }) => {
|
|
|
55864
56039
|
});
|
|
55865
56040
|
};
|
|
55866
56041
|
var EditorContent = ({ readOnlyStudio, children }) => {
|
|
55867
|
-
const { canvasContent } = useContext126(
|
|
56042
|
+
const { canvasContent } = useContext126(Internals105.CompositionManager);
|
|
55868
56043
|
const showTimeline = canvasContent !== null && canvasContent.type === "composition";
|
|
55869
56044
|
const content6 = /* @__PURE__ */ jsxs153(SplitterContainer, {
|
|
55870
56045
|
orientation: "horizontal",
|
|
@@ -56480,7 +56655,7 @@ import { useCallback as useCallback177, useContext as useContext132, useMemo as
|
|
|
56480
56655
|
|
|
56481
56656
|
// src/components/RenderModal/ResolveCompositionBeforeModal.tsx
|
|
56482
56657
|
import React218, { useContext as useContext130, useEffect as useEffect99, useMemo as useMemo187 } from "react";
|
|
56483
|
-
import { Internals as
|
|
56658
|
+
import { Internals as Internals106 } from "remotion";
|
|
56484
56659
|
import { jsx as jsx303, jsxs as jsxs157 } from "react/jsx-runtime";
|
|
56485
56660
|
var loaderContainer2 = {
|
|
56486
56661
|
paddingTop: 40,
|
|
@@ -56500,11 +56675,11 @@ var loaderLabel2 = {
|
|
|
56500
56675
|
};
|
|
56501
56676
|
var ResolvedCompositionContext = React218.createContext(null);
|
|
56502
56677
|
var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
|
|
56503
|
-
const resolved =
|
|
56504
|
-
const unresolvedContext = useContext130(
|
|
56678
|
+
const resolved = Internals106.useResolvedVideoConfig(compositionId);
|
|
56679
|
+
const unresolvedContext = useContext130(Internals106.CompositionManager);
|
|
56505
56680
|
const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
|
|
56506
56681
|
useEffect99(() => {
|
|
56507
|
-
const { current } =
|
|
56682
|
+
const { current } = Internals106.resolveCompositionsRef;
|
|
56508
56683
|
if (!current) {
|
|
56509
56684
|
throw new Error("No ref to trigger composition calc");
|
|
56510
56685
|
}
|
|
@@ -56964,7 +57139,7 @@ var DeleteFolder = ({ folderName, parentName, stack: stack2 }) => {
|
|
|
56964
57139
|
|
|
56965
57140
|
// src/components/NewComposition/DuplicateComposition.tsx
|
|
56966
57141
|
import { useCallback as useCallback180, useContext as useContext133, useMemo as useMemo191, useState as useState105 } from "react";
|
|
56967
|
-
import { Internals as
|
|
57142
|
+
import { Internals as Internals107 } from "remotion";
|
|
56968
57143
|
|
|
56969
57144
|
// src/components/NewComposition/InputAndValidationContainer.tsx
|
|
56970
57145
|
import { jsx as jsx308 } from "react/jsx-runtime";
|
|
@@ -57064,7 +57239,7 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
57064
57239
|
const hadFpsDefined = unresolved.fps !== undefined;
|
|
57065
57240
|
const hadDurationDefined = unresolved.durationInFrames !== undefined;
|
|
57066
57241
|
const [selectedFrameRate, setFrameRate] = useState105(resolved.result.fps);
|
|
57067
|
-
const { compositions } = useContext133(
|
|
57242
|
+
const { compositions } = useContext133(Internals107.CompositionManager);
|
|
57068
57243
|
const [type, setType] = useState105(initialCompType);
|
|
57069
57244
|
const [newId, setName] = useState105(() => {
|
|
57070
57245
|
const numberAtEnd = resolved.result.id.match(/([0-9]+)$/)?.[0];
|
|
@@ -57423,11 +57598,11 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
|
|
|
57423
57598
|
|
|
57424
57599
|
// src/components/NewComposition/NewComposition.tsx
|
|
57425
57600
|
import { useCallback as useCallback182, useContext as useContext135, useState as useState106 } from "react";
|
|
57426
|
-
import { Internals as
|
|
57601
|
+
import { Internals as Internals109 } from "remotion";
|
|
57427
57602
|
|
|
57428
57603
|
// src/helpers/use-create-composition.ts
|
|
57429
57604
|
import { useCallback as useCallback181, useContext as useContext134, useMemo as useMemo192 } from "react";
|
|
57430
|
-
import { Internals as
|
|
57605
|
+
import { Internals as Internals108 } from "remotion";
|
|
57431
57606
|
var toPascalCase = (value) => {
|
|
57432
57607
|
const words = value.match(/[a-zA-Z0-9]+/g) ?? [];
|
|
57433
57608
|
const candidate = words.map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1)}`).join("");
|
|
@@ -57471,7 +57646,7 @@ var useCreateComposition = ({
|
|
|
57471
57646
|
selectedFrameRate,
|
|
57472
57647
|
size: size3
|
|
57473
57648
|
}) => {
|
|
57474
|
-
const { setCanvasContent } = useContext134(
|
|
57649
|
+
const { setCanvasContent } = useContext134(Internals108.CompositionSetters);
|
|
57475
57650
|
const componentName = useMemo192(() => toPascalCase(newId), [newId]);
|
|
57476
57651
|
const nameValidationMessage = useMemo192(() => {
|
|
57477
57652
|
return validateCompositionName(newId, compositions);
|
|
@@ -57557,8 +57732,8 @@ var folderPathStyle = {
|
|
|
57557
57732
|
fontSize: 14
|
|
57558
57733
|
};
|
|
57559
57734
|
var NewCompositionLoaded = ({ folderName, parentName, stack: stack2 }) => {
|
|
57560
|
-
const { compositions } = useContext135(
|
|
57561
|
-
const resolvedComposition =
|
|
57735
|
+
const { compositions } = useContext135(Internals109.CompositionManager);
|
|
57736
|
+
const resolvedComposition = Internals109.useResolvedVideoConfig(null);
|
|
57562
57737
|
const initialComposition = resolvedComposition?.type === "success" || resolvedComposition?.type === "success-and-refreshing" ? resolvedComposition.result : null;
|
|
57563
57738
|
const initialDimensions = getNewCompositionDefaults(initialComposition);
|
|
57564
57739
|
const [newId, setName] = useState106(() => getUniqueCompositionName(compositions));
|
|
@@ -57856,17 +58031,17 @@ import {
|
|
|
57856
58031
|
useRef as useRef72,
|
|
57857
58032
|
useState as useState107
|
|
57858
58033
|
} from "react";
|
|
57859
|
-
import { Internals as
|
|
58034
|
+
import { Internals as Internals111 } from "remotion";
|
|
57860
58035
|
|
|
57861
58036
|
// src/helpers/validate-new-folder-name.ts
|
|
57862
|
-
import { Internals as
|
|
58037
|
+
import { Internals as Internals110 } from "remotion";
|
|
57863
58038
|
var validateNewFolderName = ({
|
|
57864
58039
|
folders,
|
|
57865
58040
|
newName,
|
|
57866
58041
|
parentName
|
|
57867
58042
|
}) => {
|
|
57868
|
-
if (!
|
|
57869
|
-
return
|
|
58043
|
+
if (!Internals110.isFolderNameValid(newName)) {
|
|
58044
|
+
return Internals110.invalidFolderNameErrorMessage;
|
|
57870
58045
|
}
|
|
57871
58046
|
if (folders.find((folder) => {
|
|
57872
58047
|
return folder.name === newName && folder.parent === parentName;
|
|
@@ -57900,7 +58075,7 @@ var getUniqueFolderName = ({
|
|
|
57900
58075
|
}
|
|
57901
58076
|
};
|
|
57902
58077
|
var NewFolder = ({ parentName, stack: stack2 }) => {
|
|
57903
|
-
const { folders } = useContext136(
|
|
58078
|
+
const { folders } = useContext136(Internals111.CompositionManager);
|
|
57904
58079
|
const [newName, setName] = useState107(() => getUniqueFolderName({ folders, parentName }));
|
|
57905
58080
|
const inputRef = useRef72(null);
|
|
57906
58081
|
useEffect101(() => {
|
|
@@ -58028,7 +58203,7 @@ import {
|
|
|
58028
58203
|
useRef as useRef73,
|
|
58029
58204
|
useState as useState108
|
|
58030
58205
|
} from "react";
|
|
58031
|
-
import { Internals as
|
|
58206
|
+
import { Internals as Internals112 } from "remotion";
|
|
58032
58207
|
import { jsx as jsx313, jsxs as jsxs166, Fragment as Fragment57 } from "react/jsx-runtime";
|
|
58033
58208
|
var content12 = {
|
|
58034
58209
|
padding: 12,
|
|
@@ -58044,7 +58219,7 @@ var RenameCompositionLoaded = () => {
|
|
|
58044
58219
|
}
|
|
58045
58220
|
const { resolved, unresolved } = context;
|
|
58046
58221
|
const compositionStack = unresolved.stack ?? null;
|
|
58047
|
-
const { compositions } = useContext137(
|
|
58222
|
+
const { compositions } = useContext137(Internals112.CompositionManager);
|
|
58048
58223
|
const [newId, setName] = useState108(() => {
|
|
58049
58224
|
return resolved.result.id;
|
|
58050
58225
|
});
|
|
@@ -58162,7 +58337,7 @@ import {
|
|
|
58162
58337
|
useRef as useRef74,
|
|
58163
58338
|
useState as useState109
|
|
58164
58339
|
} from "react";
|
|
58165
|
-
import { Internals as
|
|
58340
|
+
import { Internals as Internals113 } from "remotion";
|
|
58166
58341
|
|
|
58167
58342
|
// src/helpers/validate-folder-rename.ts
|
|
58168
58343
|
var validateFolderRename = ({
|
|
@@ -58187,7 +58362,7 @@ var content13 = {
|
|
|
58187
58362
|
minWidth: 500
|
|
58188
58363
|
};
|
|
58189
58364
|
var RenameFolder = ({ folderName, parentName, stack: stack2 }) => {
|
|
58190
|
-
const { folders } = useContext138(
|
|
58365
|
+
const { folders } = useContext138(Internals113.CompositionManager);
|
|
58191
58366
|
const [newName, setName] = useState109(folderName);
|
|
58192
58367
|
const inputRef = useRef74(null);
|
|
58193
58368
|
useEffect103(() => {
|
|
@@ -58439,7 +58614,7 @@ var RenameStaticFileModal = ({ relativePath }) => {
|
|
|
58439
58614
|
|
|
58440
58615
|
// src/components/OverrideInputProps.tsx
|
|
58441
58616
|
import { useCallback as useCallback187, useContext as useContext140, useMemo as useMemo196, useState as useState111 } from "react";
|
|
58442
|
-
import { Internals as
|
|
58617
|
+
import { Internals as Internals114 } from "remotion";
|
|
58443
58618
|
import { jsx as jsx316, jsxs as jsxs169 } from "react/jsx-runtime";
|
|
58444
58619
|
var style10 = {
|
|
58445
58620
|
padding: 12,
|
|
@@ -58475,7 +58650,7 @@ var isValidJSON = (value) => {
|
|
|
58475
58650
|
};
|
|
58476
58651
|
var Inner = () => {
|
|
58477
58652
|
const [value, setValue] = useState111(() => {
|
|
58478
|
-
const override =
|
|
58653
|
+
const override = Internals114.getInputPropsOverride();
|
|
58479
58654
|
if (override) {
|
|
58480
58655
|
return JSON.stringify(override, null, 2);
|
|
58481
58656
|
}
|
|
@@ -58490,14 +58665,14 @@ var Inner = () => {
|
|
|
58490
58665
|
const onChange = useCallback187((newValue) => {
|
|
58491
58666
|
if (newValue.trim() === "") {
|
|
58492
58667
|
setValue(null);
|
|
58493
|
-
|
|
58668
|
+
Internals114.setInputPropsOverride(null);
|
|
58494
58669
|
return;
|
|
58495
58670
|
}
|
|
58496
58671
|
setValue(newValue);
|
|
58497
58672
|
if (!isValidJSON(newValue)) {
|
|
58498
58673
|
return;
|
|
58499
58674
|
}
|
|
58500
|
-
|
|
58675
|
+
Internals114.setInputPropsOverride(JSON.parse(newValue));
|
|
58501
58676
|
}, [setValue]);
|
|
58502
58677
|
const onReset = useCallback187(() => {
|
|
58503
58678
|
onChange("");
|
|
@@ -58568,7 +58743,7 @@ import {
|
|
|
58568
58743
|
useRef as useRef77,
|
|
58569
58744
|
useState as useState113
|
|
58570
58745
|
} from "react";
|
|
58571
|
-
import { Internals as
|
|
58746
|
+
import { Internals as Internals115 } from "remotion";
|
|
58572
58747
|
|
|
58573
58748
|
// src/icons/keys.tsx
|
|
58574
58749
|
import { jsx as jsx317 } from "react/jsx-runtime";
|
|
@@ -59921,7 +60096,7 @@ var mapModeToQuery = (mode) => {
|
|
|
59921
60096
|
throw new Error("no mode" + mode);
|
|
59922
60097
|
};
|
|
59923
60098
|
var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
|
|
59924
|
-
const { compositions } = useContext141(
|
|
60099
|
+
const { compositions } = useContext141(Internals115.CompositionManager);
|
|
59925
60100
|
const [state, setState] = useState113(() => {
|
|
59926
60101
|
return {
|
|
59927
60102
|
query: mapModeToQuery(initialMode),
|
|
@@ -59969,7 +60144,7 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
|
|
|
59969
60144
|
selectComposition(c, true);
|
|
59970
60145
|
setSelectedModal(null);
|
|
59971
60146
|
const selector = `.__remotion-composition[data-compname="${c.id}"]`;
|
|
59972
|
-
|
|
60147
|
+
Internals115.compositionSelectorRef.current?.expandComposition(c.id);
|
|
59973
60148
|
waitForElm(selector).then(() => {
|
|
59974
60149
|
document.querySelector(selector)?.scrollIntoView({ block: "center" });
|
|
59975
60150
|
});
|
|
@@ -67831,7 +68006,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
67831
68006
|
|
|
67832
68007
|
// src/components/SequencePropsSubscriptionProvider.tsx
|
|
67833
68008
|
import { useState as useState126, useCallback as useCallback216, useMemo as useMemo218 } from "react";
|
|
67834
|
-
import { Internals as
|
|
68009
|
+
import { Internals as Internals116 } from "remotion";
|
|
67835
68010
|
import { jsx as jsx373 } from "react/jsx-runtime";
|
|
67836
68011
|
var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
67837
68012
|
const [overrideToNodePathMap, setOverrideIdToNodePathMap] = useState126({});
|
|
@@ -67850,9 +68025,9 @@ var SequencePropsSubscriptionProvider = ({ children }) => {
|
|
|
67850
68025
|
const setters = useMemo218(() => {
|
|
67851
68026
|
return { setOverrideIdToNodePath };
|
|
67852
68027
|
}, [setOverrideIdToNodePath]);
|
|
67853
|
-
return /* @__PURE__ */ jsx373(
|
|
68028
|
+
return /* @__PURE__ */ jsx373(Internals116.OverrideIdsToNodePathsGettersContext.Provider, {
|
|
67854
68029
|
value: getters,
|
|
67855
|
-
children: /* @__PURE__ */ jsx373(
|
|
68030
|
+
children: /* @__PURE__ */ jsx373(Internals116.OverrideIdsToNodePathsSettersContext.Provider, {
|
|
67856
68031
|
value: setters,
|
|
67857
68032
|
children
|
|
67858
68033
|
})
|
|
@@ -67951,7 +68126,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
67951
68126
|
children: /* @__PURE__ */ jsx375(TimelineZoomContext, {
|
|
67952
68127
|
children: /* @__PURE__ */ jsxs207(SequencePropsSubscriptionProvider, {
|
|
67953
68128
|
children: [
|
|
67954
|
-
/* @__PURE__ */ jsxs207(
|
|
68129
|
+
/* @__PURE__ */ jsxs207(Internals117.CurrentScaleContext.Provider, {
|
|
67955
68130
|
value,
|
|
67956
68131
|
children: [
|
|
67957
68132
|
/* @__PURE__ */ jsx375(ForceSpecificCursor, {}),
|
|
@@ -67959,11 +68134,11 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
67959
68134
|
children: /* @__PURE__ */ jsxs207("div", {
|
|
67960
68135
|
style: background,
|
|
67961
68136
|
children: [
|
|
67962
|
-
/* @__PURE__ */ jsx375(
|
|
68137
|
+
/* @__PURE__ */ jsx375(Internals117.CompositionRenderErrorContext.Provider, {
|
|
67963
68138
|
value: compositionRenderErrorContextValue,
|
|
67964
68139
|
children: canvasMounted ? /* @__PURE__ */ jsx375(MemoRoot, {}) : null
|
|
67965
68140
|
}),
|
|
67966
|
-
/* @__PURE__ */ jsx375(
|
|
68141
|
+
/* @__PURE__ */ jsx375(Internals117.CanUseRemotionHooksProvider, {
|
|
67967
68142
|
children: /* @__PURE__ */ jsx375(RenderErrorContext.Provider, {
|
|
67968
68143
|
value: renderErrorContextValue,
|
|
67969
68144
|
children: /* @__PURE__ */ jsx375(EditorContent, {
|
|
@@ -68001,7 +68176,7 @@ import { PlayerInternals as PlayerInternals24 } from "@remotion/player";
|
|
|
68001
68176
|
|
|
68002
68177
|
// src/state/preview-size.tsx
|
|
68003
68178
|
import { useCallback as useCallback218, useContext as useContext147, useMemo as useMemo221, useState as useState128 } from "react";
|
|
68004
|
-
import { Internals as
|
|
68179
|
+
import { Internals as Internals118 } from "remotion";
|
|
68005
68180
|
import { jsx as jsx376 } from "react/jsx-runtime";
|
|
68006
68181
|
var key7 = "remotion.previewSize";
|
|
68007
68182
|
var persistPreviewSizeOption = (option) => {
|
|
@@ -68050,7 +68225,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
68050
68225
|
setTranslation
|
|
68051
68226
|
};
|
|
68052
68227
|
}, [editorZoomGestures, size3, setSize, translation]);
|
|
68053
|
-
return /* @__PURE__ */ jsx376(
|
|
68228
|
+
return /* @__PURE__ */ jsx376(Internals118.PreviewSizeContext.Provider, {
|
|
68054
68229
|
value: previewSizeCtx,
|
|
68055
68230
|
children
|
|
68056
68231
|
});
|
|
@@ -68082,7 +68257,7 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
68082
68257
|
|
|
68083
68258
|
// src/components/MediaVolumeProvider.tsx
|
|
68084
68259
|
import { useMemo as useMemo223, useState as useState130 } from "react";
|
|
68085
|
-
import { Internals as
|
|
68260
|
+
import { Internals as Internals119 } from "remotion";
|
|
68086
68261
|
import { jsx as jsx378 } from "react/jsx-runtime";
|
|
68087
68262
|
var MediaVolumeProvider = ({ children }) => {
|
|
68088
68263
|
const [playerMuted, setPlayerMuted] = useState130(() => loadMuteOption());
|
|
@@ -68099,9 +68274,9 @@ var MediaVolumeProvider = ({ children }) => {
|
|
|
68099
68274
|
setMediaVolume
|
|
68100
68275
|
};
|
|
68101
68276
|
}, []);
|
|
68102
|
-
return /* @__PURE__ */ jsx378(
|
|
68277
|
+
return /* @__PURE__ */ jsx378(Internals119.MediaVolumeContext.Provider, {
|
|
68103
68278
|
value: mediaVolumeContextValue,
|
|
68104
|
-
children: /* @__PURE__ */ jsx378(
|
|
68279
|
+
children: /* @__PURE__ */ jsx378(Internals119.SetMediaVolumeContext.Provider, {
|
|
68105
68280
|
value: setMediaVolumeContextValue,
|
|
68106
68281
|
children
|
|
68107
68282
|
})
|
|
@@ -68476,7 +68651,7 @@ var FastRefreshProvider = ({ children }) => {
|
|
|
68476
68651
|
};
|
|
68477
68652
|
|
|
68478
68653
|
// src/helpers/inject-css.ts
|
|
68479
|
-
import { Internals as
|
|
68654
|
+
import { Internals as Internals120 } from "remotion";
|
|
68480
68655
|
var makeDefaultGlobalCSS = () => {
|
|
68481
68656
|
const unhoveredDragAreaFactor = 2;
|
|
68482
68657
|
const fromMiddle = 50 / unhoveredDragAreaFactor;
|
|
@@ -68487,12 +68662,10 @@ var makeDefaultGlobalCSS = () => {
|
|
|
68487
68662
|
--remotion-cli-internals-blue: ${BLUE};
|
|
68488
68663
|
--remotion-cli-internals-blue-hovered: ${BLUE_HOVERED};
|
|
68489
68664
|
overscroll-behavior-y: none;
|
|
68490
|
-
overscroll-behavior-x: none;
|
|
68491
68665
|
}
|
|
68492
68666
|
|
|
68493
68667
|
body {
|
|
68494
68668
|
overscroll-behavior-y: none;
|
|
68495
|
-
overscroll-behavior-x: none;
|
|
68496
68669
|
/* Override Chakra UI position: relative on body */
|
|
68497
68670
|
position: static !important;
|
|
68498
68671
|
}
|
|
@@ -68631,7 +68804,7 @@ var injectCSS = () => {
|
|
|
68631
68804
|
if (injected) {
|
|
68632
68805
|
return;
|
|
68633
68806
|
}
|
|
68634
|
-
|
|
68807
|
+
Internals120.CSSUtils.injectCSS(makeDefaultGlobalCSS());
|
|
68635
68808
|
injected = true;
|
|
68636
68809
|
};
|
|
68637
68810
|
|
|
@@ -68644,19 +68817,19 @@ import {
|
|
|
68644
68817
|
useMemo as useMemo232,
|
|
68645
68818
|
useState as useState139
|
|
68646
68819
|
} from "react";
|
|
68647
|
-
import { getInputProps as getInputProps2, Internals as
|
|
68820
|
+
import { getInputProps as getInputProps2, Internals as Internals121 } from "remotion";
|
|
68648
68821
|
import { jsx as jsx389 } from "react/jsx-runtime";
|
|
68649
68822
|
var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
68650
68823
|
const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState139(null);
|
|
68651
|
-
const { compositions, canvasContent, currentCompositionMetadata } = useContext150(
|
|
68824
|
+
const { compositions, canvasContent, currentCompositionMetadata } = useContext150(Internals121.CompositionManager);
|
|
68652
68825
|
const { fastRefreshes, manualRefreshes } = useContext150(FastRefreshContext);
|
|
68653
68826
|
if (manualRefreshes) {}
|
|
68654
68827
|
const selectedComposition = useMemo232(() => {
|
|
68655
68828
|
return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
|
|
68656
68829
|
}, [canvasContent, compositions]);
|
|
68657
68830
|
const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
|
|
68658
|
-
const { props: allEditorProps } = useContext150(
|
|
68659
|
-
const env =
|
|
68831
|
+
const { props: allEditorProps } = useContext150(Internals121.EditorPropsContext);
|
|
68832
|
+
const env = Internals121.getRemotionEnvironment();
|
|
68660
68833
|
const inputProps = useMemo232(() => {
|
|
68661
68834
|
return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
|
|
68662
68835
|
}, [env.isPlayer]);
|
|
@@ -68683,7 +68856,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
68683
68856
|
return controller;
|
|
68684
68857
|
}
|
|
68685
68858
|
const { signal } = controller;
|
|
68686
|
-
const result =
|
|
68859
|
+
const result = Internals121.resolveVideoConfigWithMetadataOrCatch({
|
|
68687
68860
|
compositionId,
|
|
68688
68861
|
calculateMetadata,
|
|
68689
68862
|
inputProps: combinedProps,
|
|
@@ -68777,7 +68950,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
68777
68950
|
...inputProps ?? {}
|
|
68778
68951
|
};
|
|
68779
68952
|
const controller = new AbortController;
|
|
68780
|
-
const result =
|
|
68953
|
+
const result = Internals121.resolveVideoConfigWithMetadataOrCatch({
|
|
68781
68954
|
compositionId: composition.id,
|
|
68782
68955
|
calculateMetadata: composition.calculateMetadata,
|
|
68783
68956
|
inputProps: combinedProps,
|
|
@@ -68802,7 +68975,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
68802
68975
|
}));
|
|
68803
68976
|
return resolved.videoConfig;
|
|
68804
68977
|
}, [allEditorProps, compositions, inputProps]);
|
|
68805
|
-
useImperativeHandle14(
|
|
68978
|
+
useImperativeHandle14(Internals121.resolveCompositionsRef, () => {
|
|
68806
68979
|
return {
|
|
68807
68980
|
setCurrentRenderModalComposition: (id) => {
|
|
68808
68981
|
setCurrentRenderModalComposition(id);
|
|
@@ -68944,7 +69117,7 @@ var ResolveCompositionConfigInStudio = ({ children }) => {
|
|
|
68944
69117
|
}, {})
|
|
68945
69118
|
};
|
|
68946
69119
|
}, [compositions, resolvedConfigs]);
|
|
68947
|
-
return /* @__PURE__ */ jsx389(
|
|
69120
|
+
return /* @__PURE__ */ jsx389(Internals121.ResolveCompositionContext.Provider, {
|
|
68948
69121
|
value: resolvedConfigsIncludingStaticOnes,
|
|
68949
69122
|
children
|
|
68950
69123
|
});
|
|
@@ -68956,12 +69129,12 @@ var getServerDisconnectedDomElement = () => {
|
|
|
68956
69129
|
return document.getElementById("server-disconnected-overlay");
|
|
68957
69130
|
};
|
|
68958
69131
|
var StudioInner = ({ rootComponent, readOnly }) => {
|
|
68959
|
-
return /* @__PURE__ */ jsx390(
|
|
69132
|
+
return /* @__PURE__ */ jsx390(Internals122.CompositionManagerProvider, {
|
|
68960
69133
|
onlyRenderComposition: null,
|
|
68961
69134
|
currentCompositionMetadata: null,
|
|
68962
69135
|
initialCompositions: [],
|
|
68963
69136
|
initialCanvasContent: null,
|
|
68964
|
-
children: /* @__PURE__ */ jsx390(
|
|
69137
|
+
children: /* @__PURE__ */ jsx390(Internals122.RemotionRootContexts, {
|
|
68965
69138
|
frameState: null,
|
|
68966
69139
|
audioEnabled: window.remotion_audioEnabled,
|
|
68967
69140
|
videoEnabled: window.remotion_videoEnabled,
|