@remotion/studio 4.0.507 → 4.0.509
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/FastRefreshProvider.js +13 -9
- package/dist/Studio.d.ts +5 -0
- package/dist/Studio.js +2 -2
- package/dist/components/Canvas.js +35 -5
- package/dist/components/CodingAgentIcon.d.ts +3 -1
- package/dist/components/CodingAgentIcon.js +4 -9
- package/dist/components/ColorPicker/AlphaSlider.js +2 -2
- package/dist/components/ColorPicker/HueSlider.js +2 -2
- package/dist/components/ColorPicker/SaturationValueArea.js +2 -2
- package/dist/components/ConfigureDefaultEditorModal.js +1 -1
- package/dist/components/ContextMenu.d.ts +1 -0
- package/dist/components/ContextMenu.js +32 -5
- package/dist/components/EditorContent.js +4 -3
- package/dist/components/EditorGuides/Guide.js +2 -2
- package/dist/components/EditorRuler/index.js +2 -2
- package/dist/components/ExplorerPanel.js +19 -1
- package/dist/components/InlineAction.d.ts +2 -1
- package/dist/components/InlineAction.js +3 -3
- package/dist/components/InspectorLocationCopy.js +1 -1
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +52 -8
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +3 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +3 -3
- package/dist/components/InspectorPanel/styles.js +1 -1
- package/dist/components/InspectorSequenceSection.js +36 -4
- package/dist/components/Menu/MenuItem.js +2 -2
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/ModalContainer.js +1 -1
- package/dist/components/Modals.js +2 -9
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/NewComposition.d.ts +2 -0
- package/dist/components/NewComposition/NewComposition.js +38 -6
- package/dist/components/NewComposition/get-new-composition-defaults.d.ts +1 -1
- package/dist/components/NewComposition/get-new-composition-defaults.js +9 -1
- package/dist/components/PlayPause.d.ts +1 -1
- package/dist/components/PlayPause.js +61 -12
- package/dist/components/RenderButton.js +16 -12
- package/dist/components/RenderModal/GuiRenderStatus.js +23 -6
- package/dist/components/RenderModal/InfoBubble.d.ts +1 -0
- package/dist/components/RenderModal/InfoBubble.js +6 -4
- package/dist/components/RenderModal/InfoTooltip.d.ts +1 -0
- package/dist/components/RenderModal/InfoTooltip.js +12 -12
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +5 -0
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +16 -3
- package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +2 -0
- package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +3 -2
- package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +6 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/zod-schema-type.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/zod-schema-type.js +12 -1
- package/dist/components/SelectedOutlineCanvasRotation.d.ts +9 -0
- package/dist/components/SelectedOutlineCanvasRotation.js +239 -0
- package/dist/components/SelectedOutlineCropControls.js +2 -2
- package/dist/components/SelectedOutlineElement.d.ts +2 -1
- package/dist/components/SelectedOutlineElement.js +40 -5
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +55 -26
- package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
- package/dist/components/SelectedOutlinePolygon.js +6 -5
- package/dist/components/SelectedOutlineRenderer.d.ts +1 -0
- package/dist/components/SelectedOutlineRenderer.js +24 -7
- package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +6 -0
- package/dist/components/SelectedOutlineRotationCornerHandle.js +9 -7
- package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +2 -0
- package/dist/components/SelectedOutlineScaleEdgeLine.js +11 -7
- package/dist/components/SelectedOutlineTransformOriginHandle.js +50 -24
- package/dist/components/SelectedOutlineUvControls.js +8 -8
- package/dist/components/SequencePropsSubscriptionProvider.js +8 -0
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/Splitter/SplitterHandle.js +2 -2
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.js +2 -2
- package/dist/components/Timeline/EasingEditorModal.js +2 -2
- package/dist/components/Timeline/SequencePropsObserver.js +97 -1
- package/dist/components/Timeline/SubscribeToNodePaths.js +4 -2
- package/dist/components/Timeline/Timeline.js +55 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +99 -35
- package/dist/components/Timeline/TimelineDragHandler.js +2 -2
- package/dist/components/Timeline/TimelineEffectItem.js +1 -4
- package/dist/components/Timeline/TimelineEffectPropItem.js +7 -0
- package/dist/components/Timeline/TimelineFieldRowContent.js +10 -3
- package/dist/components/Timeline/TimelineInOutDragHandler.js +2 -2
- package/dist/components/Timeline/TimelineLayerEye.js +2 -2
- package/dist/components/Timeline/TimelineRotationField.js +84 -12
- package/dist/components/Timeline/TimelineScaleField.js +58 -4
- package/dist/components/Timeline/TimelineSelection.d.ts +4 -0
- package/dist/components/Timeline/TimelineSelection.js +47 -4
- package/dist/components/Timeline/TimelineSequenceItem.js +43 -25
- package/dist/components/Timeline/TimelineSequencePropItem.js +12 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +6 -6
- package/dist/components/Timeline/TimelineTransformOriginField.js +78 -4
- package/dist/components/Timeline/TimelineTranslateField.js +55 -15
- package/dist/components/Timeline/Transform3DModeContext.d.ts +1 -0
- package/dist/components/Timeline/Transform3DModeContext.js +5 -0
- package/dist/components/Timeline/delete-selected-timeline-item.js +0 -6
- package/dist/components/Timeline/get-sequence-context-menu-items.js +14 -6
- package/dist/components/Timeline/keyframe-clipboard.d.ts +5 -1
- package/dist/components/Timeline/keyframe-clipboard.js +3 -2
- package/dist/components/Timeline/save-sequence-prop.js +16 -7
- package/dist/components/Timeline/sequence-prop-clipboard.d.ts +31 -0
- package/dist/components/Timeline/sequence-prop-clipboard.js +142 -0
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -1
- package/dist/components/Timeline/sequence-props-subscription-store.js +5 -2
- package/dist/components/Timeline/timeline-field-display-utils.js +2 -2
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +6 -0
- package/dist/components/Timeline/timeline-field-row-layout.js +16 -1
- package/dist/components/Timeline/timeline-rotation-utils.d.ts +16 -0
- package/dist/components/Timeline/timeline-rotation-utils.js +145 -4
- package/dist/components/Timeline/timeline-translate-utils.d.ts +3 -2
- package/dist/components/Timeline/timeline-translate-utils.js +8 -4
- package/dist/components/Timeline/transform-3d-mode.d.ts +6 -0
- package/dist/components/Timeline/transform-3d-mode.js +36 -0
- package/dist/components/Timeline/transform-origin-utils.d.ts +4 -0
- package/dist/components/Timeline/transform-origin-utils.js +12 -6
- package/dist/components/Timeline/update-selected-easing.js +8 -0
- package/dist/components/Timeline/use-open-sequence-in-apps.js +3 -1
- package/dist/components/Timeline/use-resolved-stack-react-to-change.d.ts +5 -1
- package/dist/components/Timeline/use-resolved-stack-react-to-change.js +67 -10
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -1
- package/dist/components/Timeline/use-sequence-props-subscription.js +7 -2
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
- package/dist/components/call-api.js +2 -0
- package/dist/components/canvas-rotation-cursor.d.ts +1 -0
- package/dist/components/canvas-rotation-cursor.js +14 -0
- package/dist/components/folder-menu-items.js +1 -0
- package/dist/components/get-open-in-menu-items.d.ts +8 -1
- package/dist/components/get-open-in-menu-items.js +93 -8
- package/dist/components/import-assets.js +7 -0
- package/dist/components/root-composition-menu-items.js +1 -0
- package/dist/components/selected-outline-control-layout.d.ts +14 -0
- package/dist/components/selected-outline-control-layout.js +94 -0
- package/dist/components/selected-outline-drag.d.ts +11 -5
- package/dist/components/selected-outline-drag.js +80 -42
- package/dist/components/selected-outline-measurement.d.ts +5 -0
- package/dist/components/selected-outline-measurement.js +28 -1
- package/dist/components/selected-outline-types.d.ts +6 -0
- package/dist/components/use-default-editor-info.js +28 -3
- package/dist/esm/{chunk-ptnd65a9.js → chunk-jdn6nkbk.js} +10087 -7919
- package/dist/esm/{chunk-fgedsvhb.js → chunk-r46yxrjr.js} +1 -2
- package/dist/esm/index.mjs +357 -2
- package/dist/esm/internals.mjs +10086 -7918
- package/dist/esm/previewEntry.mjs +9926 -7758
- package/dist/esm/renderEntry.mjs +4 -2
- package/dist/helpers/get-box-quads-polyfill-internals.js +10 -2
- package/dist/helpers/get-canvas-capture-import.d.ts +7 -0
- package/dist/helpers/get-canvas-capture-import.js +43 -0
- package/dist/helpers/get-git-menu-item.d.ts +1 -1
- package/dist/helpers/get-git-menu-item.js +33 -3
- package/dist/helpers/inserted-element-selection.d.ts +12 -0
- package/dist/helpers/inserted-element-selection.js +29 -0
- package/dist/helpers/open-in-editor.d.ts +3 -1
- package/dist/helpers/open-in-editor.js +5 -1
- package/dist/helpers/pointer-session.d.ts +6 -2
- package/dist/helpers/pointer-session.js +29 -12
- package/dist/helpers/preview-server-events.js +4 -0
- package/dist/helpers/sequence-node-path-mutations.d.ts +4 -0
- package/dist/helpers/sequence-node-path-mutations.js +31 -0
- package/dist/helpers/use-create-composition.d.ts +15 -2
- package/dist/helpers/use-create-composition.js +11 -17
- package/dist/helpers/use-menu-structure.js +1 -0
- package/dist/icons/cube.d.ts +4 -0
- package/dist/icons/cube.js +6 -0
- package/dist/icons/finder.d.ts +4 -0
- package/dist/icons/finder.js +8 -0
- package/dist/icons/github.d.ts +4 -0
- package/dist/icons/github.js +11 -0
- package/dist/icons/terminal.d.ts +6 -0
- package/dist/icons/terminal.js +46 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +8 -0
- package/dist/renderEntry.js +2 -2
- package/dist/state/modals.d.ts +9 -1
- package/dist/state/transform-3d-mode.d.ts +10 -0
- package/dist/state/transform-3d-mode.js +27 -0
- package/dist/state/z-index.d.ts +0 -1
- package/dist/state/z-index.js +28 -37
- package/package.json +12 -12
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.serializeCssRotation = exports.parseCssRotationToDegrees = void 0;
|
|
3
|
+
exports.serializeCssRotation = exports.serializeCssRotationFromEuler = exports.serializeCssRotation3d = exports.parseCssRotationToEuler = exports.parseCssRotationToDegrees = exports.parseCssRotation = void 0;
|
|
4
4
|
const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
5
5
|
const unitPattern = /^([+-]?(?:\d+\.?\d*|\.\d+))(deg|rad|turn|grad)$/;
|
|
6
6
|
const unitToDegrees = {
|
|
@@ -9,10 +9,54 @@ const unitToDegrees = {
|
|
|
9
9
|
turn: 360,
|
|
10
10
|
grad: 360 / 400,
|
|
11
11
|
};
|
|
12
|
+
const parseCssRotation = (value) => {
|
|
13
|
+
const trimmed = value.trim();
|
|
14
|
+
const bareAngle = trimmed.match(unitPattern);
|
|
15
|
+
if (bareAngle) {
|
|
16
|
+
return {
|
|
17
|
+
axis: [0, 0, 1],
|
|
18
|
+
degrees: (0, timeline_field_utils_1.normalizeTimelineNumber)(Number(bareAngle[1]) * unitToDegrees[bareAngle[2]]),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const keywordAxis = /^(x|y|z)\s+(.+)$/i.exec(trimmed);
|
|
22
|
+
if (keywordAxis) {
|
|
23
|
+
const keywordAngle = keywordAxis[2].match(unitPattern);
|
|
24
|
+
if (!keywordAngle) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const keywordAxisName = keywordAxis[1].toLowerCase();
|
|
28
|
+
return {
|
|
29
|
+
axis: keywordAxisName === 'x'
|
|
30
|
+
? [1, 0, 0]
|
|
31
|
+
: keywordAxisName === 'y'
|
|
32
|
+
? [0, 1, 0]
|
|
33
|
+
: [0, 0, 1],
|
|
34
|
+
degrees: (0, timeline_field_utils_1.normalizeTimelineNumber)(Number(keywordAngle[1]) * unitToDegrees[keywordAngle[2]]),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const vectorAxis = /^(\S+)\s+(\S+)\s+(\S+)\s+(.+)$/.exec(trimmed);
|
|
38
|
+
if (!vectorAxis) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const vectorAxisComponents = [
|
|
42
|
+
Number(vectorAxis[1]),
|
|
43
|
+
Number(vectorAxis[2]),
|
|
44
|
+
Number(vectorAxis[3]),
|
|
45
|
+
];
|
|
46
|
+
const vectorAngle = vectorAxis[4].match(unitPattern);
|
|
47
|
+
if (!vectorAxisComponents.every(Number.isFinite) || !vectorAngle) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
axis: vectorAxisComponents,
|
|
52
|
+
degrees: (0, timeline_field_utils_1.normalizeTimelineNumber)(Number(vectorAngle[1]) * unitToDegrees[vectorAngle[2]]),
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
exports.parseCssRotation = parseCssRotation;
|
|
12
56
|
const parseCssRotationToDegrees = (value) => {
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
57
|
+
const parsed = (0, exports.parseCssRotation)(value);
|
|
58
|
+
if (parsed) {
|
|
59
|
+
return parsed.degrees;
|
|
16
60
|
}
|
|
17
61
|
if (typeof DOMMatrix === 'undefined') {
|
|
18
62
|
return 0;
|
|
@@ -26,6 +70,103 @@ const parseCssRotationToDegrees = (value) => {
|
|
|
26
70
|
}
|
|
27
71
|
};
|
|
28
72
|
exports.parseCssRotationToDegrees = parseCssRotationToDegrees;
|
|
73
|
+
const parseCssRotationToEuler = (value) => {
|
|
74
|
+
const parsed = (0, exports.parseCssRotation)(value);
|
|
75
|
+
if (parsed === null) {
|
|
76
|
+
return [0, 0, (0, exports.parseCssRotationToDegrees)(value)];
|
|
77
|
+
}
|
|
78
|
+
const [axisX, axisY, axisZ] = parsed.axis;
|
|
79
|
+
if (parsed.degrees === 0) {
|
|
80
|
+
return [0, 0, 0];
|
|
81
|
+
}
|
|
82
|
+
if (axisY === 0 && axisZ === 0 && axisX !== 0) {
|
|
83
|
+
return [Math.sign(axisX) * parsed.degrees, 0, 0];
|
|
84
|
+
}
|
|
85
|
+
if (axisX === 0 && axisZ === 0 && axisY !== 0) {
|
|
86
|
+
return [0, Math.sign(axisY) * parsed.degrees, 0];
|
|
87
|
+
}
|
|
88
|
+
if (axisX === 0 && axisY === 0 && axisZ !== 0) {
|
|
89
|
+
return [0, 0, Math.sign(axisZ) * parsed.degrees];
|
|
90
|
+
}
|
|
91
|
+
const axisLength = Math.hypot(axisX, axisY, axisZ);
|
|
92
|
+
if (axisLength === 0) {
|
|
93
|
+
return [0, 0, 0];
|
|
94
|
+
}
|
|
95
|
+
const halfAngle = (parsed.degrees * Math.PI) / 360;
|
|
96
|
+
const sinHalfAngle = Math.sin(halfAngle);
|
|
97
|
+
const quaternionX = (axisX / axisLength) * sinHalfAngle;
|
|
98
|
+
const quaternionY = (axisY / axisLength) * sinHalfAngle;
|
|
99
|
+
const quaternionZ = (axisZ / axisLength) * sinHalfAngle;
|
|
100
|
+
const quaternionW = Math.cos(halfAngle);
|
|
101
|
+
// Decompose the rotation using the same X → Y → Z order used when serializing.
|
|
102
|
+
const matrix11 = 1 - 2 * (quaternionY * quaternionY + quaternionZ * quaternionZ);
|
|
103
|
+
const matrix12 = 2 * (quaternionX * quaternionY - quaternionZ * quaternionW);
|
|
104
|
+
const matrix13 = 2 * (quaternionX * quaternionZ + quaternionY * quaternionW);
|
|
105
|
+
const matrix22 = 1 - 2 * (quaternionX * quaternionX + quaternionZ * quaternionZ);
|
|
106
|
+
const matrix23 = 2 * (quaternionY * quaternionZ - quaternionX * quaternionW);
|
|
107
|
+
const matrix32 = 2 * (quaternionY * quaternionZ + quaternionX * quaternionW);
|
|
108
|
+
const matrix33 = 1 - 2 * (quaternionX * quaternionX + quaternionY * quaternionY);
|
|
109
|
+
const clampedMatrix13 = Math.max(-1, Math.min(1, matrix13));
|
|
110
|
+
const rotationY = Math.asin(clampedMatrix13);
|
|
111
|
+
const rotationX = Math.abs(clampedMatrix13) < 0.9999999
|
|
112
|
+
? Math.atan2(-matrix23, matrix33)
|
|
113
|
+
: Math.atan2(matrix32, matrix22);
|
|
114
|
+
const rotationZ = Math.abs(clampedMatrix13) < 0.9999999 ? Math.atan2(-matrix12, matrix11) : 0;
|
|
115
|
+
return [rotationX, rotationY, rotationZ].map((rotation) => (0, timeline_field_utils_1.normalizeTimelineNumber)(rotation * (180 / Math.PI)));
|
|
116
|
+
};
|
|
117
|
+
exports.parseCssRotationToEuler = parseCssRotationToEuler;
|
|
118
|
+
const serializeCssRotation3d = ({ axis, degrees, decimalPlaces = 6, }) => {
|
|
119
|
+
const factor = 10 ** decimalPlaces;
|
|
120
|
+
const values = [...axis, degrees].map((value) => {
|
|
121
|
+
const rounded = Math.round((0, timeline_field_utils_1.normalizeTimelineNumber)(value) * factor) / factor;
|
|
122
|
+
return Object.is(rounded, -0) ? 0 : rounded;
|
|
123
|
+
});
|
|
124
|
+
return `${values[0]} ${values[1]} ${values[2]} ${values[3]}deg`;
|
|
125
|
+
};
|
|
126
|
+
exports.serializeCssRotation3d = serializeCssRotation3d;
|
|
127
|
+
const serializeCssRotationFromEuler = ({ rotation, decimalPlaces = 6, }) => {
|
|
128
|
+
const [rotationX, rotationY, rotationZ] = rotation.map((value) => (0, timeline_field_utils_1.normalizeTimelineNumber)(value));
|
|
129
|
+
if (rotationY === 0 && rotationZ === 0) {
|
|
130
|
+
return rotationX === 0
|
|
131
|
+
? (0, exports.serializeCssRotation)(0, decimalPlaces)
|
|
132
|
+
: `x ${(0, exports.serializeCssRotation)(rotationX, decimalPlaces)}`;
|
|
133
|
+
}
|
|
134
|
+
if (rotationX === 0 && rotationZ === 0) {
|
|
135
|
+
return `y ${(0, exports.serializeCssRotation)(rotationY, decimalPlaces)}`;
|
|
136
|
+
}
|
|
137
|
+
if (rotationX === 0 && rotationY === 0) {
|
|
138
|
+
return (0, exports.serializeCssRotation)(rotationZ, decimalPlaces);
|
|
139
|
+
}
|
|
140
|
+
const halfRotationX = (rotationX * Math.PI) / 360;
|
|
141
|
+
const halfRotationY = (rotationY * Math.PI) / 360;
|
|
142
|
+
const halfRotationZ = (rotationZ * Math.PI) / 360;
|
|
143
|
+
const sinX = Math.sin(halfRotationX);
|
|
144
|
+
const cosX = Math.cos(halfRotationX);
|
|
145
|
+
const sinY = Math.sin(halfRotationY);
|
|
146
|
+
const cosY = Math.cos(halfRotationY);
|
|
147
|
+
const sinZ = Math.sin(halfRotationZ);
|
|
148
|
+
const cosZ = Math.cos(halfRotationZ);
|
|
149
|
+
// Compose the three editable angles into the axis-angle form CSS rotate accepts.
|
|
150
|
+
const quaternionX = sinX * cosY * cosZ + cosX * sinY * sinZ;
|
|
151
|
+
const quaternionY = cosX * sinY * cosZ - sinX * cosY * sinZ;
|
|
152
|
+
const quaternionZ = cosX * cosY * sinZ + sinX * sinY * cosZ;
|
|
153
|
+
const quaternionW = cosX * cosY * cosZ - sinX * sinY * sinZ;
|
|
154
|
+
const angle = 2 * Math.acos(Math.max(-1, Math.min(1, quaternionW)));
|
|
155
|
+
const sinHalfAngle = Math.sqrt(Math.max(0, 1 - quaternionW * quaternionW));
|
|
156
|
+
if (sinHalfAngle < 0.0000001) {
|
|
157
|
+
return (0, exports.serializeCssRotation)(0, decimalPlaces);
|
|
158
|
+
}
|
|
159
|
+
return (0, exports.serializeCssRotation3d)({
|
|
160
|
+
axis: [
|
|
161
|
+
quaternionX / sinHalfAngle,
|
|
162
|
+
quaternionY / sinHalfAngle,
|
|
163
|
+
quaternionZ / sinHalfAngle,
|
|
164
|
+
],
|
|
165
|
+
degrees: angle * (180 / Math.PI),
|
|
166
|
+
decimalPlaces,
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
exports.serializeCssRotationFromEuler = serializeCssRotationFromEuler;
|
|
29
170
|
const serializeCssRotation = (value, decimalPlaces = 6) => {
|
|
30
171
|
const factor = 10 ** decimalPlaces;
|
|
31
172
|
const rounded = Math.round((0, timeline_field_utils_1.normalizeTimelineNumber)(value) * factor) / factor;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const
|
|
1
|
+
export type ParsedTranslate = readonly [number, number, number | null];
|
|
2
|
+
export declare const parseTranslate: (value: string) => ParsedTranslate;
|
|
3
|
+
export declare const serializeTranslate: ([x, y, z]: ParsedTranslate, decimalPlaces?: number) => string;
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.serializeTranslate = exports.parseTranslate = void 0;
|
|
4
4
|
const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
5
|
-
const PIXEL_PATTERN = /^(-?\d+(?:\.\d+)?)px(?:\s+(-?\d+(?:\.\d+)?)px)?$/;
|
|
5
|
+
const PIXEL_PATTERN = /^(-?\d+(?:\.\d+)?)px(?:\s+(-?\d+(?:\.\d+)?)px)?(?:\s+(-?\d+(?:\.\d+)?)px)?$/;
|
|
6
6
|
const translateDecimalPlaces = 1;
|
|
7
7
|
const parseTranslate = (value) => {
|
|
8
8
|
const m = value.match(PIXEL_PATTERN);
|
|
9
9
|
if (!m) {
|
|
10
|
-
return [0, 0];
|
|
10
|
+
return [0, 0, null];
|
|
11
11
|
}
|
|
12
12
|
return [
|
|
13
13
|
(0, timeline_field_utils_1.normalizeTimelineNumber)(Number(m[1])),
|
|
14
14
|
m[2] !== undefined ? (0, timeline_field_utils_1.normalizeTimelineNumber)(Number(m[2])) : 0,
|
|
15
|
+
m[3] !== undefined ? (0, timeline_field_utils_1.normalizeTimelineNumber)(Number(m[3])) : null,
|
|
15
16
|
];
|
|
16
17
|
};
|
|
17
18
|
exports.parseTranslate = parseTranslate;
|
|
@@ -20,7 +21,10 @@ const formatTranslateCoordinate = (value, decimalPlaces) => {
|
|
|
20
21
|
const rounded = (0, timeline_field_utils_1.roundToDecimalPlaces)(normalized, decimalPlaces);
|
|
21
22
|
return String(Object.is(rounded, -0) ? 0 : rounded);
|
|
22
23
|
};
|
|
23
|
-
const serializeTranslate = (x, y, decimalPlaces = translateDecimalPlaces) => {
|
|
24
|
-
|
|
24
|
+
const serializeTranslate = ([x, y, z], decimalPlaces = translateDecimalPlaces) => {
|
|
25
|
+
const xy = `${formatTranslateCoordinate(x, decimalPlaces)}px ${formatTranslateCoordinate(y, decimalPlaces)}px`;
|
|
26
|
+
return z === null
|
|
27
|
+
? xy
|
|
28
|
+
: `${xy} ${formatTranslateCoordinate(z, decimalPlaces)}px`;
|
|
25
29
|
};
|
|
26
30
|
exports.serializeTranslate = serializeTranslate;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CanUpdateSequencePropStatus } from 'remotion';
|
|
2
|
+
export declare const propStatusHas3DTransformValue: ({ fieldKey, propStatus, runtimeValue, }: {
|
|
3
|
+
readonly fieldKey: string;
|
|
4
|
+
readonly propStatus: CanUpdateSequencePropStatus | undefined;
|
|
5
|
+
readonly runtimeValue: unknown;
|
|
6
|
+
}) => boolean;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.propStatusHas3DTransformValue = void 0;
|
|
4
|
+
const no_react_1 = require("remotion/no-react");
|
|
5
|
+
const timeline_rotation_utils_1 = require("./timeline-rotation-utils");
|
|
6
|
+
const timeline_translate_utils_1 = require("./timeline-translate-utils");
|
|
7
|
+
const transform_origin_utils_1 = require("./transform-origin-utils");
|
|
8
|
+
const has3DTransformValue = ({ fieldKey, value, }) => {
|
|
9
|
+
if (fieldKey === 'style.scale') {
|
|
10
|
+
return no_react_1.NoReactInternals.parseScaleValue(value)[2] !== 1;
|
|
11
|
+
}
|
|
12
|
+
if (fieldKey === 'style.rotate') {
|
|
13
|
+
const rotation = (0, timeline_rotation_utils_1.parseCssRotationToEuler)(String(value !== null && value !== void 0 ? value : '0deg'));
|
|
14
|
+
return rotation[0] !== 0 || rotation[1] !== 0;
|
|
15
|
+
}
|
|
16
|
+
if (fieldKey === 'style.translate') {
|
|
17
|
+
const z = (0, timeline_translate_utils_1.parseTranslate)(String(value !== null && value !== void 0 ? value : '0px 0px'))[2];
|
|
18
|
+
return z !== null && z !== 0;
|
|
19
|
+
}
|
|
20
|
+
if (fieldKey === 'style.transformOrigin') {
|
|
21
|
+
const parsed = (0, transform_origin_utils_1.parseTransformOrigin)(value);
|
|
22
|
+
const z = (parsed === null || parsed === void 0 ? void 0 : parsed.z) ? (0, transform_origin_utils_1.parseTransformOriginZ)(parsed.z) : null;
|
|
23
|
+
return z !== null && z.value !== 0;
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
};
|
|
27
|
+
const propStatusHas3DTransformValue = ({ fieldKey, propStatus, runtimeValue, }) => {
|
|
28
|
+
if ((propStatus === null || propStatus === void 0 ? void 0 : propStatus.status) === 'keyframed') {
|
|
29
|
+
return propStatus.keyframes.some((keyframe) => has3DTransformValue({ fieldKey, value: keyframe.value }));
|
|
30
|
+
}
|
|
31
|
+
return has3DTransformValue({
|
|
32
|
+
fieldKey,
|
|
33
|
+
value: (propStatus === null || propStatus === void 0 ? void 0 : propStatus.status) === 'static' ? propStatus.codeValue : runtimeValue,
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
exports.propStatusHas3DTransformValue = propStatusHas3DTransformValue;
|
|
@@ -8,6 +8,10 @@ export type ParsedTransformOrigin = {
|
|
|
8
8
|
readonly y: TransformOriginAxisValue;
|
|
9
9
|
readonly z: string | null;
|
|
10
10
|
};
|
|
11
|
+
export declare const parseTransformOriginZ: (token: string) => {
|
|
12
|
+
readonly value: number;
|
|
13
|
+
readonly unit: string;
|
|
14
|
+
} | null;
|
|
11
15
|
export declare const parseTransformOrigin: (value: unknown) => ParsedTransformOrigin | null;
|
|
12
16
|
export declare const axisValueToUv: (axis: TransformOriginAxisValue, size: number) => number | null;
|
|
13
17
|
export declare const parsedTransformOriginToUv: ({ parsed, width, height, }: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformOriginPercentToUv = exports.parsedTransformOriginToPercent = exports.serializeTransformOrigin = exports.parsedTransformOriginToUv = exports.axisValueToUv = exports.parseTransformOrigin = void 0;
|
|
3
|
+
exports.transformOriginPercentToUv = exports.parsedTransformOriginToPercent = exports.serializeTransformOrigin = exports.parsedTransformOriginToUv = exports.axisValueToUv = exports.parseTransformOrigin = exports.parseTransformOriginZ = void 0;
|
|
4
4
|
const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
5
5
|
const cssNumberWithUnit = /^([+-]?(?:\d+\.?\d*|\.\d+))(px|%)$/i;
|
|
6
|
-
const cssLength = /^([+-]?(?:\d+\.?\d*|\.\d+))[a-zA-Z]
|
|
6
|
+
const cssLength = /^([+-]?(?:\d+\.?\d*|\.\d+))([a-zA-Z]+)$/;
|
|
7
7
|
const keywords = new Set(['left', 'center', 'right', 'top', 'bottom']);
|
|
8
8
|
const center = { value: 50, unit: '%' };
|
|
9
9
|
const keywordOptions = (keyword) => {
|
|
@@ -108,12 +108,18 @@ const parseXY = (parts) => {
|
|
|
108
108
|
}
|
|
109
109
|
return keywordIsFirst ? [center, length] : [length, center];
|
|
110
110
|
};
|
|
111
|
-
const
|
|
111
|
+
const parseTransformOriginZ = (token) => {
|
|
112
112
|
if (token.includes('%')) {
|
|
113
|
-
return
|
|
113
|
+
return null;
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
const match = cssLength.exec(token);
|
|
116
|
+
if (!match) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
const value = Number(match[1]);
|
|
120
|
+
return Number.isFinite(value) ? { value, unit: match[2] } : null;
|
|
116
121
|
};
|
|
122
|
+
exports.parseTransformOriginZ = parseTransformOriginZ;
|
|
117
123
|
const parseTransformOrigin = (value) => {
|
|
118
124
|
var _a;
|
|
119
125
|
if (typeof value !== 'string') {
|
|
@@ -128,7 +134,7 @@ const parseTransformOrigin = (value) => {
|
|
|
128
134
|
return null;
|
|
129
135
|
}
|
|
130
136
|
const z = (_a = parts[2]) !== null && _a !== void 0 ? _a : null;
|
|
131
|
-
if (z !== null &&
|
|
137
|
+
if (z !== null && (0, exports.parseTransformOriginZ)(z) === null) {
|
|
132
138
|
return null;
|
|
133
139
|
}
|
|
134
140
|
return { x: xy[0], y: xy[1], z };
|
|
@@ -33,6 +33,10 @@ const getSelectedEasingUpdate = ({ selection, sequences, overrideIdsToNodePaths,
|
|
|
33
33
|
}
|
|
34
34
|
const sequencePropStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[field.fieldKey];
|
|
35
35
|
if ((sequencePropStatus === null || sequencePropStatus === void 0 ? void 0 : sequencePropStatus.status) !== 'keyframed' ||
|
|
36
|
+
(0, studio_shared_1.isSchemaFieldHoldOnly)({
|
|
37
|
+
schema: sequence.controls.schema,
|
|
38
|
+
key: field.fieldKey,
|
|
39
|
+
}) ||
|
|
36
40
|
!(0, studio_shared_1.canEditEasingForInterpolationFunction)(sequencePropStatus.interpolationFunction)) {
|
|
37
41
|
return null;
|
|
38
42
|
}
|
|
@@ -60,6 +64,10 @@ const getSelectedEasingUpdate = ({ selection, sequences, overrideIdsToNodePaths,
|
|
|
60
64
|
? effectStatus.props[field.fieldKey]
|
|
61
65
|
: null;
|
|
62
66
|
if ((effectPropStatus === null || effectPropStatus === void 0 ? void 0 : effectPropStatus.status) !== 'keyframed' ||
|
|
67
|
+
(0, studio_shared_1.isSchemaFieldHoldOnly)({
|
|
68
|
+
schema: effect.schema,
|
|
69
|
+
key: field.fieldKey,
|
|
70
|
+
}) ||
|
|
63
71
|
!(0, studio_shared_1.canEditEasingForInterpolationFunction)(effectPropStatus.interpolationFunction)) {
|
|
64
72
|
return null;
|
|
65
73
|
}
|
|
@@ -8,9 +8,11 @@ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
|
8
8
|
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
9
9
|
const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
|
|
10
10
|
const useOpenSequenceInApps = (sequence) => {
|
|
11
|
+
var _a;
|
|
12
|
+
var _b;
|
|
11
13
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
12
14
|
const previewConnected = previewServerState.type === 'connected';
|
|
13
|
-
const originalLocation = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(sequence.getStack);
|
|
15
|
+
const { resolvedLocation: originalLocation } = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(sequence.getStack, (_b = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.overrideId) !== null && _b !== void 0 ? _b : sequence.id);
|
|
14
16
|
const editorPickerAvailable = (0, use_default_editor_info_1.canUseEditorPicker)(previewConnected);
|
|
15
17
|
const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)(editorPickerAvailable);
|
|
16
18
|
const codingAgentInfo = (0, use_default_editor_info_1.useDefaultCodingAgentInfo)(editorPickerAvailable);
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { ResolvedStackLocation } from 'remotion';
|
|
2
|
-
export declare const useResolveStackAndReactToChange: (getStack: () => string | null) =>
|
|
2
|
+
export declare const useResolveStackAndReactToChange: (getStack: () => string | null, sequenceIdentity: string) => {
|
|
3
|
+
preferMappedNodePath: boolean;
|
|
4
|
+
resolvedLocation: ResolvedStackLocation | null;
|
|
5
|
+
stack: string | null;
|
|
6
|
+
};
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useResolveStackAndReactToChange = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
+
const fast_refresh_context_1 = require("../../fast-refresh-context");
|
|
5
6
|
const client_id_1 = require("../../helpers/client-id");
|
|
6
7
|
const use_resolved_stack_1 = require("./use-resolved-stack");
|
|
7
8
|
// This case: https://github.com/remotion-dev/remotion/issues/7393
|
|
8
9
|
// A code change has been made and we cannot re-calculate the stack right away.
|
|
9
10
|
// In that case, we wait for fast refresh, wait for the new stack trace, triggering a new event.
|
|
10
|
-
const
|
|
11
|
+
const matchesSourceLocation = (event, location) => {
|
|
11
12
|
var _a;
|
|
12
13
|
if (!(location === null || location === void 0 ? void 0 : location.source) || !location.line) {
|
|
13
14
|
return false;
|
|
@@ -16,33 +17,85 @@ const matchesLostNodePathEvent = (event, location) => {
|
|
|
16
17
|
event.line === location.line &&
|
|
17
18
|
event.column === ((_a = location.column) !== null && _a !== void 0 ? _a : 0));
|
|
18
19
|
};
|
|
19
|
-
const useResolveStackAndReactToChange = (getStack) => {
|
|
20
|
+
const useResolveStackAndReactToChange = (getStack, sequenceIdentity) => {
|
|
20
21
|
const { subscribeToEvent } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
21
|
-
const
|
|
22
|
-
const
|
|
22
|
+
const { fastRefreshes } = (0, react_1.useContext)(fast_refresh_context_1.FastRefreshContext);
|
|
23
|
+
const [stackState, setStackState] = (0, react_1.useState)(() => ({
|
|
24
|
+
stack: getStack(),
|
|
25
|
+
preferMappedNodePath: true,
|
|
26
|
+
}));
|
|
27
|
+
const resolvedLocationFromStack = (0, use_resolved_stack_1.useResolvedStack)(stackState.stack);
|
|
28
|
+
const stackIsResolved = (0, use_resolved_stack_1.hasResolvedStack)(stackState.stack);
|
|
29
|
+
const lastResolvedLocation = (0, react_1.useRef)(resolvedLocationFromStack);
|
|
30
|
+
if (stackIsResolved) {
|
|
31
|
+
lastResolvedLocation.current = resolvedLocationFromStack;
|
|
32
|
+
}
|
|
33
|
+
const resolvedLocation = stackIsResolved
|
|
34
|
+
? resolvedLocationFromStack
|
|
35
|
+
: stackState.preferMappedNodePath
|
|
36
|
+
? null
|
|
37
|
+
: lastResolvedLocation.current;
|
|
23
38
|
const resolvedLocationRef = (0, react_1.useRef)(resolvedLocation);
|
|
24
39
|
resolvedLocationRef.current = resolvedLocation;
|
|
40
|
+
const getStackRef = (0, react_1.useRef)(getStack);
|
|
41
|
+
getStackRef.current = getStack;
|
|
42
|
+
(0, react_1.useEffect)(() => {
|
|
43
|
+
const newStack = getStackRef.current();
|
|
44
|
+
setStackState((current) => {
|
|
45
|
+
if (newStack === current.stack) {
|
|
46
|
+
return current;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
stack: newStack,
|
|
50
|
+
// A different identity means a different selected sequence. Its existing
|
|
51
|
+
// node path mapping is still preferred.
|
|
52
|
+
preferMappedNodePath: true,
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
}, [sequenceIdentity]);
|
|
56
|
+
(0, react_1.useEffect)(() => {
|
|
57
|
+
if (fastRefreshes === 0) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const newStack = getStackRef.current();
|
|
61
|
+
setStackState((current) => {
|
|
62
|
+
if (newStack === current.stack) {
|
|
63
|
+
return current;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
stack: newStack,
|
|
67
|
+
// Resolve from the post-refresh source location. The previous node path
|
|
68
|
+
// may now belong to a sibling after a structural edit.
|
|
69
|
+
preferMappedNodePath: false,
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
}, [fastRefreshes]);
|
|
25
73
|
(0, react_1.useEffect)(() => {
|
|
26
74
|
let interval = null;
|
|
27
75
|
const handleEvent = (event) => {
|
|
28
76
|
if (event.type !== 'lost-node-path') {
|
|
29
77
|
return;
|
|
30
78
|
}
|
|
31
|
-
if (!
|
|
79
|
+
if (!matchesSourceLocation(event, resolvedLocationRef.current)) {
|
|
32
80
|
return;
|
|
33
81
|
}
|
|
34
|
-
const initialStack =
|
|
82
|
+
const initialStack = getStackRef.current();
|
|
35
83
|
if (interval !== null) {
|
|
36
84
|
clearInterval(interval);
|
|
37
85
|
}
|
|
38
86
|
interval = setInterval(() => {
|
|
39
|
-
const newStack =
|
|
87
|
+
const newStack = getStackRef.current();
|
|
40
88
|
if (newStack !== initialStack) {
|
|
41
89
|
if (interval !== null) {
|
|
42
90
|
clearInterval(interval);
|
|
43
91
|
interval = null;
|
|
44
92
|
}
|
|
45
|
-
|
|
93
|
+
setStackState({
|
|
94
|
+
stack: newStack,
|
|
95
|
+
// The old override ID may now belong to a sibling. Resolve the
|
|
96
|
+
// node path from the post-refresh source location instead.
|
|
97
|
+
preferMappedNodePath: false,
|
|
98
|
+
});
|
|
46
99
|
}
|
|
47
100
|
}, 10);
|
|
48
101
|
};
|
|
@@ -53,7 +106,11 @@ const useResolveStackAndReactToChange = (getStack) => {
|
|
|
53
106
|
clearInterval(interval);
|
|
54
107
|
}
|
|
55
108
|
};
|
|
56
|
-
}, [subscribeToEvent
|
|
57
|
-
return
|
|
109
|
+
}, [subscribeToEvent]);
|
|
110
|
+
return {
|
|
111
|
+
preferMappedNodePath: stackState.preferMappedNodePath,
|
|
112
|
+
resolvedLocation,
|
|
113
|
+
stack: stackState.stack,
|
|
114
|
+
};
|
|
58
115
|
};
|
|
59
116
|
exports.useResolveStackAndReactToChange = useResolveStackAndReactToChange;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { InteractivitySchema } from 'remotion';
|
|
2
2
|
import type { OriginalPosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
3
|
-
export declare const useSequencePropsSubscription: ({ originalLocation, overrideId, componentIdentity, schema, effects, }: {
|
|
3
|
+
export declare const useSequencePropsSubscription: ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, }: {
|
|
4
4
|
overrideId: string;
|
|
5
5
|
componentIdentity: string | null;
|
|
6
6
|
schema: InteractivitySchema;
|
|
7
7
|
effects: InteractivitySchema[];
|
|
8
8
|
originalLocation: OriginalPosition | null;
|
|
9
|
+
preferMappedNodePath: boolean;
|
|
10
|
+
stack: string | null;
|
|
9
11
|
}) => void;
|
|
@@ -8,7 +8,7 @@ const client_id_1 = require("../../helpers/client-id");
|
|
|
8
8
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
9
9
|
const sequence_props_subscription_store_1 = require("./sequence-props-subscription-store");
|
|
10
10
|
const should_subscribe_to_source_file_1 = require("./should-subscribe-to-source-file");
|
|
11
|
-
const useSequencePropsSubscription = ({ originalLocation, overrideId, componentIdentity, schema, effects, }) => {
|
|
11
|
+
const useSequencePropsSubscription = ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, }) => {
|
|
12
12
|
var _a, _b, _c;
|
|
13
13
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
14
14
|
const { setOverrideIdToNodePath } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsSettersContext);
|
|
@@ -56,8 +56,11 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
|
|
|
56
56
|
schema,
|
|
57
57
|
componentIdentity,
|
|
58
58
|
effects,
|
|
59
|
-
nodePath:
|
|
59
|
+
nodePath: preferMappedNodePath
|
|
60
|
+
? ((_b = nodePathAtResubscribe === null || nodePathAtResubscribe === void 0 ? void 0 : nodePathAtResubscribe.nodePath) !== null && _b !== void 0 ? _b : null)
|
|
61
|
+
: null,
|
|
60
62
|
clientId,
|
|
63
|
+
stack,
|
|
61
64
|
videoConfigValues: {
|
|
62
65
|
durationInFrames: videoConfig.durationInFrames,
|
|
63
66
|
fps: videoConfig.fps,
|
|
@@ -104,9 +107,11 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
|
|
|
104
107
|
locationSource,
|
|
105
108
|
migrateExpandedTracksForSubscriptionKey,
|
|
106
109
|
overrideId,
|
|
110
|
+
preferMappedNodePath,
|
|
107
111
|
schema,
|
|
108
112
|
setPropStatuses,
|
|
109
113
|
setOverrideIdToNodePath,
|
|
114
|
+
stack,
|
|
110
115
|
videoConfig,
|
|
111
116
|
]);
|
|
112
117
|
};
|
|
@@ -436,9 +436,9 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
|
|
|
436
436
|
clearActiveOverrides();
|
|
437
437
|
clearDraggedKeyframes();
|
|
438
438
|
};
|
|
439
|
-
stopPointerSession = (0, pointer_session_1.
|
|
439
|
+
stopPointerSession = (0, pointer_session_1.startCapturedPointerSession)({
|
|
440
440
|
event: e,
|
|
441
|
-
|
|
441
|
+
captureTarget: e.currentTarget,
|
|
442
442
|
onMove: onPointerMove,
|
|
443
443
|
onEnd: (reason) => {
|
|
444
444
|
if (reason === 'pointerup' || reason === 'buttons-released') {
|
|
@@ -643,9 +643,9 @@ const useTimelineEasingKeyframeDrag = ({ onSelect, selectable, selected, selecti
|
|
|
643
643
|
clearActiveOverrides();
|
|
644
644
|
clearDraggedKeyframes();
|
|
645
645
|
};
|
|
646
|
-
stopPointerSession = (0, pointer_session_1.
|
|
646
|
+
stopPointerSession = (0, pointer_session_1.startCapturedPointerSession)({
|
|
647
647
|
event: e,
|
|
648
|
-
|
|
648
|
+
captureTarget: e.currentTarget,
|
|
649
649
|
onMove: onPointerMove,
|
|
650
650
|
onEnd: (reason) => {
|
|
651
651
|
if (reason === 'pointerup' || reason === 'buttons-released') {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.callApi = void 0;
|
|
4
|
+
const sequence_node_path_mutations_1 = require("../helpers/sequence-node-path-mutations");
|
|
4
5
|
const callApi = (endpoint, body, signal) => {
|
|
5
6
|
return new Promise((resolve, reject) => {
|
|
6
7
|
fetch(endpoint, {
|
|
@@ -14,6 +15,7 @@ const callApi = (endpoint, body, signal) => {
|
|
|
14
15
|
.then((res) => res.json())
|
|
15
16
|
.then((data) => {
|
|
16
17
|
if (data.success) {
|
|
18
|
+
(0, sequence_node_path_mutations_1.queueSequenceNodePathMutationFromApiResponse)(data.data);
|
|
17
19
|
resolve(data.data);
|
|
18
20
|
}
|
|
19
21
|
else {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const canvasRotationCursor: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.canvasRotationCursor = void 0;
|
|
4
|
+
const canvasRotationCursorSvg = `<svg width="29" height="30" viewBox="0 0 83 85" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
+
<g filter="url(#shadow)">
|
|
6
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M58.673 35.4941C58.6612 35.1059 58.6552 34.9899 58.6346 34.4705L58.605 33.8746C58.608 33.9357 58.5753 33.3889 58.5813 33.4469L58.5695 33.2635L54.9726 33.508V33.5201C54.9874 33.7371 54.9992 33.9389 55.011 34.1587C55.011 34.1556 55.0851 36.3955 55.0851 36.3924L55.0881 36.4688L55.0851 36.4382L55.0881 36.5268V36.591V36.5604V36.6521V36.6246V36.7163V36.6857L55.0911 36.7927L55.0881 36.7621L55.0911 36.8844V36.8538V36.9913V36.9607V37.1441L55.0908 37.1166V37.3C55.0908 40.1263 54.8952 43.0781 54.4568 46.0083C55.7693 45.6263 57.0555 45.1771 58.273 44.6517C58.5605 42.2072 58.6966 39.7506 58.6966 37.3031C58.6936 36.9149 58.6906 36.527 58.6848 36.1389L58.673 35.4941ZM21.7249 51.5816L11.6923 48.5781L13.6418 46.4055C11.1501 43.9916 9.3219 40.9118 9.3219 37.3C9.33972 34.501 10.3589 32.133 12.0242 29.9697C14.4835 26.8805 17.9916 24.5982 21.9176 22.9633C21.5738 24.4421 21.2893 25.9362 21.0613 27.4426C19.3486 28.3349 17.7752 29.386 16.4095 30.6144C14.7415 32.1421 13.3428 34.0304 13.0051 36.3039C12.7799 37.8317 13.0852 39.2831 13.7724 40.6338C14.3562 41.7765 15.1886 42.8063 16.0896 43.674L18.0364 41.5015L21.7249 51.5816ZM34.2108 19.8313C36.6997 19.5167 39.1175 19.3792 41.3219 19.3792C46.5515 19.3792 51.8463 20.0576 56.8656 21.5854C63.7397 23.6785 73.2715 28.711 73.3219 37.3001C73.3041 40.096 72.2879 42.464 70.6226 44.6274C64.2492 52.639 50.8152 55.221 41.3218 55.221C38.6848 55.221 35.9232 55.056 33.3307 54.6647L33.8196 50.9828C36.2492 51.3495 38.8536 51.5022 41.3248 51.5022C49.3544 51.5022 59.9855 49.6047 66.2374 43.9856C68.1455 42.2377 69.6953 40.0224 69.7189 37.3C69.6804 32.8542 65.5411 29.6123 62.0922 27.7239C55.9115 24.3841 48.2344 23.0948 41.3218 23.0948C38.7026 23.0948 35.8047 23.2965 32.8715 23.7639C33.2479 22.4132 33.6923 21.0965 34.2108 19.8313ZM50.8745 58.1816C52.3146 57.9493 53.7634 57.6652 55.1974 57.317C52.6789 63.6206 48.1633 70.2572 41.3218 70.3C38.6077 70.2816 36.3114 69.2337 34.2137 67.5163C26.4448 60.9408 23.9441 47.09 23.9441 37.3C23.9441 31.91 24.602 26.4466 26.0834 21.2705C28.1131 14.1817 32.9931 4.35195 41.322 4.3C45.63 4.3 49.1057 7.12951 51.5916 10.5272L53.8967 8.76404L55.7041 19.3699L46.3885 14.5025L48.6936 12.7393C46.9723 10.3347 44.3528 8.01873 41.3217 8.01873C37.0106 8.05836 33.8669 12.3302 32.0358 15.8868C28.7972 22.2546 27.5469 30.1715 27.5469 37.3001C27.5469 45.5806 29.387 56.544 34.8388 62.9912C36.5337 64.9589 38.6788 66.5571 41.3217 66.5815C45.6328 66.5418 48.7765 62.2731 50.6076 58.7165L50.8745 58.1816Z" fill="black" stroke="white" stroke-width="3" stroke-linejoin="round" paint-order="stroke"/>
|
|
7
|
+
</g>
|
|
8
|
+
<defs>
|
|
9
|
+
<filter id="shadow" x="0" y="0" width="83" height="85" filterUnits="userSpaceOnUse">
|
|
10
|
+
<feDropShadow dx="0" dy="5" stdDeviation="3.15" flood-color="black" flood-opacity="0.25"/>
|
|
11
|
+
</filter>
|
|
12
|
+
</defs>
|
|
13
|
+
</svg>`;
|
|
14
|
+
exports.canvasRotationCursor = `url("data:image/svg+xml,${encodeURIComponent(canvasRotationCursorSvg)}") 15 13, alias`;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
import type { TerminalId } from '@remotion/studio-shared';
|
|
1
2
|
import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
|
|
3
|
+
import type { OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
2
4
|
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
3
|
-
export declare const getOpenInMenuItems: ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, }: {
|
|
5
|
+
export declare const getOpenInMenuItems: ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder, location, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInTerminal, }: {
|
|
4
6
|
readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
|
|
5
7
|
readonly editorDisabled: boolean;
|
|
6
8
|
readonly editorInfo: GetDefaultEditorInfoResponse | null;
|
|
7
9
|
readonly excludeCodingAgentId: "claude-code" | "codex" | "copilot" | "cursor" | null;
|
|
8
10
|
readonly excludeEditorId: EditorPickerId | null;
|
|
11
|
+
readonly fileManagerDisabled: boolean;
|
|
12
|
+
readonly folder: boolean;
|
|
13
|
+
readonly location: OriginalPosition | null;
|
|
9
14
|
readonly onConfigureApps: () => void;
|
|
10
15
|
readonly onOpenInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", codingAgentName: string) => void;
|
|
11
16
|
readonly onOpenInEditor: (editorId: EditorPickerId) => void;
|
|
17
|
+
readonly onOpenInFileExplorer: () => void;
|
|
18
|
+
readonly onOpenInTerminal: ((terminalId: TerminalId) => void) | null;
|
|
12
19
|
}) => ComboboxValue[];
|