@remotion/studio 4.0.475 → 4.0.476

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/components/ColorPicker/ColorPickerPopup.d.ts +6 -0
  2. package/dist/components/ColorPicker/ColorPickerPopup.js +11 -6
  3. package/dist/components/GlobalKeybindings.js +12 -0
  4. package/dist/components/KeyboardShortcutsExplainer.js +24 -0
  5. package/dist/components/NewComposition/InputDragger.d.ts +6 -0
  6. package/dist/components/NewComposition/InputDragger.js +40 -14
  7. package/dist/components/NewComposition/RenameComposition.js +8 -1
  8. package/dist/components/NewComposition/RenameFolder.js +8 -1
  9. package/dist/components/NewComposition/RenameStaticFile.js +11 -1
  10. package/dist/components/Notifications/Notification.js +5 -4
  11. package/dist/components/Notifications/NotificationCenter.js +1 -1
  12. package/dist/components/ObserveDefaultPropsContext.js +6 -2
  13. package/dist/components/PlayPause.js +22 -66
  14. package/dist/components/PreviewToolbar.js +15 -1
  15. package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +2 -1
  16. package/dist/components/SelectedOutlineOverlay.d.ts +47 -11
  17. package/dist/components/SelectedOutlineOverlay.js +545 -54
  18. package/dist/components/Timeline/TimelineRotationField.js +17 -17
  19. package/dist/components/Timeline/TimelineScaleField.js +1 -1
  20. package/dist/components/Timeline/TimelineSequenceItem.js +301 -109
  21. package/dist/components/Timeline/TimelineSequenceName.d.ts +4 -2
  22. package/dist/components/Timeline/TimelineSequenceName.js +67 -2
  23. package/dist/components/Timeline/TimelineTransformOriginField.js +1 -1
  24. package/dist/components/Timeline/TimelineTranslateField.js +1 -1
  25. package/dist/components/Timeline/TimelineUvCoordinateField.js +1 -1
  26. package/dist/components/Timeline/disable-sequence-interactivity.d.ts +8 -0
  27. package/dist/components/Timeline/disable-sequence-interactivity.js +24 -0
  28. package/dist/components/Timeline/reset-selected-timeline-props.js +2 -2
  29. package/dist/components/Timeline/timeline-rotation-utils.d.ts +1 -1
  30. package/dist/components/Timeline/timeline-rotation-utils.js +4 -2
  31. package/dist/components/Timeline/use-timeline-keyframe-drag.js +8 -13
  32. package/dist/esm/{chunk-qaqqvw4q.js → chunk-0atarw3p.js} +2659 -1707
  33. package/dist/esm/internals.mjs +2659 -1707
  34. package/dist/esm/previewEntry.mjs +2661 -1709
  35. package/dist/esm/renderEntry.mjs +1 -1
  36. package/package.json +11 -11
@@ -132,7 +132,7 @@ const TimelineTransformOriginField = ({ field, propStatus, effectiveValue, onSav
132
132
  return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "unsupported origin" });
133
133
  }
134
134
  return (jsx_runtime_1.jsxs("span", { style: containerStyle, children: [
135
- jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : percent[0], style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false, snapToStep: false }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : percent[1], style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false, snapToStep: false })
135
+ jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : percent[0], style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false, snapToStep: false, dragDecimalPlaces: decimalPlaces }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : percent[1], style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false, snapToStep: false, dragDecimalPlaces: decimalPlaces })
136
136
  ] }));
137
137
  };
138
138
  exports.TimelineTransformOriginField = TimelineTransformOriginField;
@@ -101,7 +101,7 @@ const TimelineTranslateField = ({ field, propStatus, effectiveValue, onSave, onD
101
101
  }
102
102
  }, [propStatus, onSave, dragX, codeX, decimalPlaces]);
103
103
  return (jsx_runtime_1.jsxs("span", { style: containerStyle, children: [
104
- jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false })
104
+ jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false, snapToStep: false, dragDecimalPlaces: decimalPlaces }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false, snapToStep: false, dragDecimalPlaces: decimalPlaces })
105
105
  ] }));
106
106
  };
107
107
  exports.TimelineTranslateField = TimelineTranslateField;
@@ -120,7 +120,7 @@ const TimelineUvCoordinateField = ({ field, propStatus, effectiveValue, onSave,
120
120
  }
121
121
  }, [propStatus, onSave, dragX, codeX]);
122
122
  return (jsx_runtime_1.jsxs("span", { style: containerStyle, children: [
123
- jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, snapToStep: false }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, snapToStep: false })
123
+ jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, snapToStep: false, dragDecimalPlaces: decimalPlaces }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, snapToStep: false, dragDecimalPlaces: decimalPlaces })
124
124
  ] }));
125
125
  };
126
126
  exports.TimelineUvCoordinateField = TimelineUvCoordinateField;
@@ -0,0 +1,8 @@
1
+ import type { SequencePropsSubscriptionKey } from 'remotion';
2
+ import { type SetPropStatuses } from './save-sequence-prop';
3
+ export declare const disableSequenceInteractivity: ({ clientId, fileName, nodePath, setPropStatuses, }: {
4
+ readonly clientId: string;
5
+ readonly fileName: string;
6
+ readonly nodePath: SequencePropsSubscriptionKey;
7
+ readonly setPropStatuses: SetPropStatuses;
8
+ }) => Promise<void>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.disableSequenceInteractivity = void 0;
4
+ const no_react_1 = require("remotion/no-react");
5
+ const save_sequence_prop_1 = require("./save-sequence-prop");
6
+ const disableSequenceInteractivity = ({ clientId, fileName, nodePath, setPropStatuses, }) => {
7
+ return (0, save_sequence_prop_1.saveSequenceProps)({
8
+ changes: [
9
+ {
10
+ fileName,
11
+ nodePath,
12
+ fieldKey: 'showInTimeline',
13
+ value: false,
14
+ defaultValue: 'true',
15
+ schema: no_react_1.NoReactInternals.sequenceSchema,
16
+ },
17
+ ],
18
+ setPropStatuses,
19
+ clientId,
20
+ undoLabel: 'Disable interactivity',
21
+ redoLabel: 'Disable interactivity again',
22
+ });
23
+ };
24
+ exports.disableSequenceInteractivity = disableSequenceInteractivity;
@@ -17,13 +17,13 @@ function assertPropResetSelections(selections) {
17
17
  const isVisibleFieldSchema = (fieldSchema) => fieldSchema !== undefined && fieldSchema.type !== 'hidden';
18
18
  const isNonDefaultCodeValue = ({ propStatus, defaultValue, }) => JSON.stringify(propStatus !== null && propStatus !== void 0 ? propStatus : defaultValue) !== JSON.stringify(defaultValue);
19
19
  const isResettablePropStatus = ({ propStatus, defaultValue, }) => {
20
- if (!propStatus || propStatus.status === 'computed') {
20
+ if (!propStatus) {
21
21
  return false;
22
22
  }
23
23
  if (defaultValue === undefined) {
24
24
  return false;
25
25
  }
26
- if (propStatus.status === 'keyframed') {
26
+ if (propStatus.status === 'keyframed' || propStatus.status === 'computed') {
27
27
  return true;
28
28
  }
29
29
  return isNonDefaultCodeValue({
@@ -1,2 +1,2 @@
1
1
  export declare const parseCssRotationToDegrees: (value: string) => number;
2
- export declare const serializeCssRotation: (value: number) => string;
2
+ export declare const serializeCssRotation: (value: number, decimalPlaces?: number) => string;
@@ -26,7 +26,9 @@ const parseCssRotationToDegrees = (value) => {
26
26
  }
27
27
  };
28
28
  exports.parseCssRotationToDegrees = parseCssRotationToDegrees;
29
- const serializeCssRotation = (value) => {
30
- return `${(0, timeline_field_utils_1.normalizeTimelineNumber)(value)}deg`;
29
+ const serializeCssRotation = (value, decimalPlaces = 6) => {
30
+ const factor = 10 ** decimalPlaces;
31
+ const rounded = Math.round((0, timeline_field_utils_1.normalizeTimelineNumber)(value) * factor) / factor;
32
+ return `${Object.is(rounded, -0) ? 0 : rounded}deg`;
31
33
  };
32
34
  exports.serializeCssRotation = serializeCssRotation;
@@ -121,21 +121,16 @@ const makeMovedKeyframedDragOverride = ({ group, delta, }) => {
121
121
  if (!first) {
122
122
  throw new Error('Expected a keyframe drag target');
123
123
  }
124
- const moves = new Map(getMovesForGroup({ group, delta }).map((move) => [move.fromFrame, move.toFrame]));
124
+ const movedStatus = (0, studio_shared_1.moveKeyframesInPropStatus)({
125
+ status: first.propStatus,
126
+ moves: getMovesForGroup({ group, delta }),
127
+ });
128
+ if (movedStatus.status !== 'keyframed') {
129
+ throw new Error('Expected keyframed status');
130
+ }
125
131
  return {
126
132
  type: 'keyframed',
127
- status: {
128
- ...first.propStatus,
129
- keyframes: first.propStatus.keyframes
130
- .map((keyframe) => {
131
- var _a;
132
- return ({
133
- ...keyframe,
134
- frame: (_a = moves.get(keyframe.frame)) !== null && _a !== void 0 ? _a : keyframe.frame,
135
- });
136
- })
137
- .sort((a, b) => a.frame - b.frame),
138
- },
133
+ status: movedStatus,
139
134
  };
140
135
  };
141
136
  const applyDragOverrides = ({ delta, setDragOverrides, setEffectDragOverrides, targets, }) => {