@remotion/studio 4.0.432 → 4.0.433
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/Studio.js +1 -3
- package/dist/components/CompositionSelector.js +16 -9
- package/dist/components/CurrentComposition.js +2 -5
- package/dist/components/EditorContent.js +4 -5
- package/dist/components/NewComposition/DuplicateComposition.js +4 -1
- package/dist/components/NewComposition/InputDragger.d.ts +1 -0
- package/dist/components/NewComposition/InputDragger.js +27 -8
- package/dist/components/OptionsPanel.js +1 -1
- package/dist/components/PlaybackRatePersistor.js +1 -1
- package/dist/components/PreviewToolbar.js +4 -2
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +3 -1
- package/dist/components/RenderModal/WebRenderModalAudio.js +2 -0
- package/dist/components/RenderModal/WebRenderModalBasic.js +8 -1
- package/dist/components/RendersTab.js +1 -9
- package/dist/components/Timeline/TimelineBooleanField.d.ts +9 -0
- package/dist/components/Timeline/TimelineBooleanField.js +20 -0
- package/dist/components/Timeline/TimelineEmptyState.d.ts +2 -0
- package/dist/components/Timeline/TimelineEmptyState.js +15 -0
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +5 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +45 -7
- package/dist/components/Timeline/TimelineFieldRow.d.ts +3 -0
- package/dist/components/Timeline/TimelineFieldRow.js +17 -12
- package/dist/components/Timeline/TimelineListItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineListItem.js +7 -7
- package/dist/components/Timeline/TimelineNumberField.d.ts +11 -0
- package/dist/components/Timeline/TimelineNumberField.js +53 -0
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.d.ts +11 -0
- package/dist/components/Timeline/TimelineRotationField.js +64 -0
- package/dist/components/Timeline/TimelineSchemaField.d.ts +1 -3
- package/dist/components/Timeline/TimelineSchemaField.js +19 -74
- package/dist/components/Timeline/TimelineTranslateField.d.ts +11 -0
- package/dist/components/Timeline/TimelineTranslateField.js +115 -0
- package/dist/components/Timeline/timeline-field-utils.d.ts +2 -0
- package/dist/components/Timeline/timeline-field-utils.js +12 -0
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +2 -1
- package/dist/components/Timeline/use-sequence-props-subscription.js +32 -12
- package/dist/esm/{chunk-t28xqw5n.js → chunk-bd1bkakk.js} +2697 -2266
- package/dist/esm/internals.mjs +2697 -2266
- package/dist/esm/previewEntry.mjs +2702 -2271
- package/dist/esm/renderEntry.mjs +1 -3
- package/dist/helpers/calculate-timeline.js +17 -11
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.js +6 -3
- package/dist/helpers/inject-css.js +6 -1
- package/dist/helpers/sort-by-nonce-history.d.ts +5 -0
- package/dist/helpers/sort-by-nonce-history.js +73 -0
- package/dist/helpers/timeline-layout.js +8 -2
- package/dist/renderEntry.js +2 -2
- package/package.json +11 -11
|
@@ -43,6 +43,14 @@ const useSequencePropsSubscription = (sequence, originalLocation) => {
|
|
|
43
43
|
currentLocationLine.current = locationLine;
|
|
44
44
|
const currentLocationColumn = (0, react_1.useRef)(locationColumn);
|
|
45
45
|
currentLocationColumn.current = locationColumn;
|
|
46
|
+
const nodePathRef = (0, react_1.useRef)(null);
|
|
47
|
+
const isMountedRef = (0, react_1.useRef)(true);
|
|
48
|
+
(0, react_1.useEffect)(() => {
|
|
49
|
+
isMountedRef.current = true;
|
|
50
|
+
return () => {
|
|
51
|
+
isMountedRef.current = false;
|
|
52
|
+
};
|
|
53
|
+
}, []);
|
|
46
54
|
(0, react_1.useEffect)(() => {
|
|
47
55
|
if (!clientId ||
|
|
48
56
|
!locationSource ||
|
|
@@ -67,25 +75,36 @@ const useSequencePropsSubscription = (sequence, originalLocation) => {
|
|
|
67
75
|
return;
|
|
68
76
|
}
|
|
69
77
|
if (result.canUpdate) {
|
|
78
|
+
nodePathRef.current = result.nodePath;
|
|
70
79
|
setPropStatusesForSequence(result.props);
|
|
71
80
|
}
|
|
72
81
|
else {
|
|
82
|
+
nodePathRef.current = null;
|
|
73
83
|
setPropStatusesForSequence(null);
|
|
74
84
|
}
|
|
75
85
|
})
|
|
76
|
-
.catch(() => {
|
|
86
|
+
.catch((err) => {
|
|
87
|
+
nodePathRef.current = null;
|
|
88
|
+
remotion_1.Internals.Log.error(err);
|
|
77
89
|
setPropStatusesForSequence(null);
|
|
78
90
|
});
|
|
79
91
|
return () => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
const currentNodePath = nodePathRef.current;
|
|
93
|
+
// Only clear props on true unmount, not on re-subscribe due to
|
|
94
|
+
// line number changes — avoids flicker while re-subscribing.
|
|
95
|
+
if (!isMountedRef.current) {
|
|
96
|
+
setPropStatusesForSequence(null);
|
|
97
|
+
}
|
|
98
|
+
nodePathRef.current = null;
|
|
99
|
+
if (currentNodePath) {
|
|
100
|
+
(0, call_api_1.callApi)('/api/unsubscribe-from-sequence-props', {
|
|
101
|
+
fileName: locationSource,
|
|
102
|
+
nodePath: currentNodePath,
|
|
103
|
+
clientId,
|
|
104
|
+
}).catch(() => {
|
|
105
|
+
// Ignore unsubscribe errors
|
|
106
|
+
});
|
|
107
|
+
}
|
|
89
108
|
};
|
|
90
109
|
}, [
|
|
91
110
|
clientId,
|
|
@@ -104,8 +123,8 @@ const useSequencePropsSubscription = (sequence, originalLocation) => {
|
|
|
104
123
|
return;
|
|
105
124
|
}
|
|
106
125
|
if (event.fileName !== currentLocationSource.current ||
|
|
107
|
-
|
|
108
|
-
event.
|
|
126
|
+
!nodePathRef.current ||
|
|
127
|
+
JSON.stringify(event.nodePath) !== JSON.stringify(nodePathRef.current)) {
|
|
109
128
|
return;
|
|
110
129
|
}
|
|
111
130
|
if (event.result.canUpdate) {
|
|
@@ -126,5 +145,6 @@ const useSequencePropsSubscription = (sequence, originalLocation) => {
|
|
|
126
145
|
subscribeToEvent,
|
|
127
146
|
setPropStatusesForSequence,
|
|
128
147
|
]);
|
|
148
|
+
return nodePathRef.current;
|
|
129
149
|
};
|
|
130
150
|
exports.useSequencePropsSubscription = useSequencePropsSubscription;
|