@remotion/studio 4.0.506 → 4.0.507
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/api/copy-render-output-to-asset.d.ts +4 -0
- package/dist/api/copy-render-output-to-asset.js +11 -0
- package/dist/components/AssetSelector.js +19 -4
- package/dist/components/AssetSelectorItem.js +2 -2
- package/dist/components/CodingAgentIcon.d.ts +4 -0
- package/dist/components/CodingAgentIcon.js +17 -0
- package/dist/components/ConfigureDefaultEditorModal.d.ts +1 -3
- package/dist/components/ConfigureDefaultEditorModal.js +67 -77
- package/dist/components/ConfigureLicenseModal.d.ts +1 -4
- package/dist/components/ConfigureLicenseModal.js +89 -81
- package/dist/components/ContextMenu.js +10 -8
- package/dist/components/EditorContexts.js +6 -5
- package/dist/components/ExpandedTracksProvider.js +10 -53
- package/dist/components/InspectorLocationCopy.js +8 -8
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +39 -49
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -0
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +22 -4
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
- package/dist/components/Menu/MenuSectionHeader.d.ts +4 -0
- package/dist/components/Menu/MenuSectionHeader.js +20 -0
- package/dist/components/Menu/SubMenu.js +13 -2
- package/dist/components/Menu/menu-tree-context.d.ts +3 -0
- package/dist/components/Menu/menu-tree-context.js +13 -0
- package/dist/components/NewComposition/ComboBox.d.ts +6 -1
- package/dist/components/NewComposition/MenuContent.js +27 -19
- package/dist/components/NewComposition/menu-typeahead.js +2 -2
- package/dist/components/Preview.js +29 -4
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +3 -3
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +1 -1
- package/dist/components/RenderModal/ServerRenderModal.js +4 -0
- package/dist/components/RenderQueue/RenderQueueItem.js +8 -2
- package/dist/components/RenderQueue/actions.d.ts +4 -2
- package/dist/components/RenderQueue/actions.js +4 -2
- package/dist/components/RenderQueue/index.js +3 -4
- package/dist/components/RenderQueue/use-render-output-file-drag.d.ts +8 -0
- package/dist/components/RenderQueue/use-render-output-file-drag.js +121 -0
- package/dist/components/SegmentedControl.js +0 -1
- package/dist/components/SelectedOutlineElement.d.ts +14 -17
- package/dist/components/SelectedOutlineElement.js +112 -930
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +7 -0
- package/dist/components/SelectedOutlineKeyboardControls.js +261 -0
- package/dist/components/SelectedOutlineOverlay.d.ts +6 -13
- package/dist/components/SelectedOutlineOverlay.js +349 -864
- package/dist/components/SelectedOutlinePolygon.d.ts +25 -0
- package/dist/components/SelectedOutlinePolygon.js +359 -0
- package/dist/components/SelectedOutlineRenderer.d.ts +18 -0
- package/dist/components/SelectedOutlineRenderer.js +208 -0
- package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +16 -0
- package/dist/components/SelectedOutlineRotationCornerHandle.js +269 -0
- package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +16 -0
- package/dist/components/SelectedOutlineScaleEdgeLine.js +211 -0
- package/dist/components/SelectedOutlineSnapIndicators.d.ts +9 -0
- package/dist/components/SelectedOutlineSnapIndicators.js +29 -0
- package/dist/components/SelectedOutlineTransformOriginHandle.d.ts +9 -0
- package/dist/components/SelectedOutlineTransformOriginHandle.js +286 -0
- package/dist/components/SelectedOutlineUvControls.d.ts +3 -9
- package/dist/components/SelectedOutlineUvControls.js +57 -12
- package/dist/components/SettingsContext.d.ts +15 -0
- package/dist/components/SettingsContext.js +116 -0
- package/dist/components/SettingsModal.js +10 -4
- package/dist/components/SettingsModalFooter.d.ts +1 -3
- package/dist/components/SettingsModalFooter.js +4 -6
- package/dist/components/ShowOutlinesProvider.js +2 -3
- package/dist/components/Timeline/EasingEditorModal.js +66 -22
- package/dist/components/Timeline/Timeline.js +22 -5
- package/dist/components/Timeline/TimelineDuplicateCount.d.ts +4 -0
- package/dist/components/Timeline/TimelineDuplicateCount.js +28 -0
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +3 -23
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +4 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +11 -1
- package/dist/components/Timeline/TimelineSequence.js +28 -25
- package/dist/components/Timeline/TimelineSequenceItem.js +49 -27
- package/dist/components/Timeline/TimelineTrack.js +2 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -3
- package/dist/components/Timeline/get-sequence-context-menu-items.js +58 -53
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +36 -4
- package/dist/components/Timeline/{use-open-sequence-in-editor.d.ts → use-open-sequence-in-apps.d.ts} +4 -1
- package/dist/components/Timeline/{use-open-sequence-in-editor.js → use-open-sequence-in-apps.js} +20 -4
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +4 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +45 -1
- package/dist/components/get-open-in-menu-items.d.ts +12 -0
- package/dist/components/get-open-in-menu-items.js +83 -0
- package/dist/components/selected-outline-measurement.d.ts +2 -2
- package/dist/components/selected-outline-order.d.ts +12 -0
- package/dist/components/selected-outline-order.js +251 -0
- package/dist/components/selected-outline-types.d.ts +9 -10
- package/dist/components/svg-point-to-client-point.d.ts +2 -0
- package/dist/components/svg-point-to-client-point.js +10 -0
- package/dist/components/use-auto-save-config.d.ts +8 -0
- package/dist/components/use-auto-save-config.js +74 -0
- package/dist/components/use-default-editor-info.d.ts +1 -0
- package/dist/components/use-default-editor-info.js +10 -30
- package/dist/esm/{chunk-jefhcs5z.js → chunk-fgedsvhb.js} +1 -2
- package/dist/esm/{chunk-b49ec3nz.js → chunk-ptnd65a9.js} +10602 -9364
- package/dist/esm/internals.mjs +10601 -9363
- package/dist/esm/previewEntry.mjs +10462 -9224
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/are-sequence-node-path-infos-equal.d.ts +2 -0
- package/dist/helpers/are-sequence-node-path-infos-equal.js +27 -0
- package/dist/helpers/calculate-timeline.js +3 -3
- package/dist/helpers/client-id.js +8 -1
- package/dist/helpers/format-file-location.d.ts +1 -1
- package/dist/helpers/format-file-location.js +3 -3
- package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
- package/dist/helpers/open-in-editor.d.ts +1 -0
- package/dist/helpers/open-in-editor.js +5 -1
- package/dist/helpers/studio-runtime-config.js +3 -0
- package/dist/helpers/timeline-node-path-key.d.ts +2 -0
- package/dist/helpers/timeline-node-path-key.js +3 -1
- package/dist/helpers/use-asset-drag-events.d.ts +2 -1
- package/dist/helpers/use-asset-drag-events.js +14 -6
- package/dist/helpers/use-menu-structure.js +2 -2
- package/dist/helpers/use-runtime-values.d.ts +1 -3
- package/dist/state/timeline-sequence-hover.d.ts +9 -3
- package/dist/state/timeline-sequence-hover.js +63 -12
- package/package.json +12 -12
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SelectedOutlineTransformOriginHandle = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
39
|
+
const remotion_1 = require("remotion");
|
|
40
|
+
const no_react_1 = require("remotion/no-react");
|
|
41
|
+
const colors_1 = require("../helpers/colors");
|
|
42
|
+
const pointer_session_1 = require("../helpers/pointer-session");
|
|
43
|
+
const editor_snapping_1 = require("../state/editor-snapping");
|
|
44
|
+
const ForceSpecificCursor_1 = require("./ForceSpecificCursor");
|
|
45
|
+
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
46
|
+
const selected_outline_drag_1 = require("./selected-outline-drag");
|
|
47
|
+
const selected_outline_types_1 = require("./selected-outline-types");
|
|
48
|
+
const selected_outline_uv_1 = require("./selected-outline-uv");
|
|
49
|
+
const call_add_keyframe_1 = require("./Timeline/call-add-keyframe");
|
|
50
|
+
const save_sequence_prop_1 = require("./Timeline/save-sequence-prop");
|
|
51
|
+
const timeline_translate_utils_1 = require("./Timeline/timeline-translate-utils");
|
|
52
|
+
const transform_origin_utils_1 = require("./Timeline/transform-origin-utils");
|
|
53
|
+
const SelectedOutlineTransformOriginHandle = ({ getLatestTargetByKey, layoutTarget, outline, onDraggingChange }) => {
|
|
54
|
+
var _a, _b;
|
|
55
|
+
const { setDragOverrides, clearDragOverrides, setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
56
|
+
const { editorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
|
|
57
|
+
const target = (layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.selectedForTransformOrigin)
|
|
58
|
+
? getLatestTargetByKey(layoutTarget.key)
|
|
59
|
+
: undefined;
|
|
60
|
+
const transformOriginDrag = (_a = target === null || target === void 0 ? void 0 : target.transformOriginDrag) !== null && _a !== void 0 ? _a : null;
|
|
61
|
+
const crop = target === null || target === void 0 ? void 0 : target.crop;
|
|
62
|
+
const transformOriginPoints = (_b = outline.uncroppedPoints) !== null && _b !== void 0 ? _b : outline.points;
|
|
63
|
+
const parsed = (0, react_1.useMemo)(() => transformOriginDrag === null
|
|
64
|
+
? null
|
|
65
|
+
: (0, transform_origin_utils_1.parseTransformOrigin)(transformOriginDrag.originValue), [transformOriginDrag]);
|
|
66
|
+
const uv = (0, react_1.useMemo)(() => {
|
|
67
|
+
if (parsed === null || outline.dimensions === null) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
return (0, transform_origin_utils_1.parsedTransformOriginToUv)({
|
|
71
|
+
parsed,
|
|
72
|
+
width: outline.dimensions.width,
|
|
73
|
+
height: outline.dimensions.height,
|
|
74
|
+
});
|
|
75
|
+
}, [outline.dimensions, parsed]);
|
|
76
|
+
const position = (0, react_1.useMemo)(() => (uv === null ? null : (0, selected_outline_uv_1.getUvHandlePosition)(transformOriginPoints, uv)), [transformOriginPoints, uv]);
|
|
77
|
+
const onPointerDown = react_1.default.useCallback((event) => {
|
|
78
|
+
if (event.button !== 0 ||
|
|
79
|
+
transformOriginDrag === null ||
|
|
80
|
+
parsed === null ||
|
|
81
|
+
uv === null ||
|
|
82
|
+
outline.dimensions === null) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
event.stopPropagation();
|
|
87
|
+
const svg = event.currentTarget.ownerSVGElement;
|
|
88
|
+
if (svg === null) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const rotation = (0, selected_outline_drag_1.parseCssRotationToRadians)(transformOriginDrag.rotateValue);
|
|
92
|
+
if (rotation === null) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const { dimensions } = outline;
|
|
96
|
+
if (dimensions === null) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const [scaleX, scaleY] = no_react_1.NoReactInternals.parseScaleValue(transformOriginDrag.scaleValue);
|
|
100
|
+
const startTranslate = (0, timeline_translate_utils_1.parseTranslate)(transformOriginDrag.translateValue);
|
|
101
|
+
const svgRect = svg.getBoundingClientRect();
|
|
102
|
+
let last = null;
|
|
103
|
+
let currentPointerX = event.clientX;
|
|
104
|
+
let currentPointerY = event.clientY;
|
|
105
|
+
let axisLocked = event.shiftKey;
|
|
106
|
+
onDraggingChange(true);
|
|
107
|
+
(0, ForceSpecificCursor_1.forceSpecificCursor)('crosshair');
|
|
108
|
+
const updateFromPointerPosition = () => {
|
|
109
|
+
const point = {
|
|
110
|
+
x: currentPointerX - svgRect.left,
|
|
111
|
+
y: currentPointerY - svgRect.top,
|
|
112
|
+
};
|
|
113
|
+
const rawUv = (0, selected_outline_uv_1.getUvCoordinateForPoint)(transformOriginPoints, point);
|
|
114
|
+
const lockedAxis = (0, selected_outline_drag_1.getSelectedOutlineTransformOriginLockedAxis)({
|
|
115
|
+
axisLocked,
|
|
116
|
+
dimensions,
|
|
117
|
+
startUv: uv,
|
|
118
|
+
uv: rawUv,
|
|
119
|
+
});
|
|
120
|
+
const axisLockedUv = (0, selected_outline_drag_1.applySelectedOutlineTransformOriginAxisLock)({
|
|
121
|
+
lockedAxis,
|
|
122
|
+
startUv: uv,
|
|
123
|
+
uv: rawUv,
|
|
124
|
+
});
|
|
125
|
+
const snapPoint = lockedAxis === null
|
|
126
|
+
? point
|
|
127
|
+
: (0, selected_outline_uv_1.getUvHandlePosition)(transformOriginPoints, axisLockedUv);
|
|
128
|
+
const snappedUv = editorSnapping
|
|
129
|
+
? (0, selected_outline_drag_1.snapSelectedOutlineTransformOriginUv)({
|
|
130
|
+
crop: crop !== null && crop !== void 0 ? crop : null,
|
|
131
|
+
point: snapPoint,
|
|
132
|
+
points: transformOriginPoints,
|
|
133
|
+
thresholdPx: null,
|
|
134
|
+
uv: axisLockedUv,
|
|
135
|
+
})
|
|
136
|
+
: axisLockedUv;
|
|
137
|
+
const nextUv = (0, selected_outline_drag_1.applySelectedOutlineTransformOriginAxisLock)({
|
|
138
|
+
lockedAxis,
|
|
139
|
+
startUv: uv,
|
|
140
|
+
uv: snappedUv,
|
|
141
|
+
});
|
|
142
|
+
const deltaOrigin = [
|
|
143
|
+
(nextUv[0] - uv[0]) * dimensions.width,
|
|
144
|
+
(nextUv[1] - uv[1]) * dimensions.height,
|
|
145
|
+
];
|
|
146
|
+
const [nextTranslateX, nextTranslateY] = (0, selected_outline_drag_1.compensateTranslateForTransformOrigin)({
|
|
147
|
+
startTranslate,
|
|
148
|
+
deltaOrigin,
|
|
149
|
+
rotate: rotation,
|
|
150
|
+
scale: [scaleX, scaleY],
|
|
151
|
+
});
|
|
152
|
+
const origin = (0, transform_origin_utils_1.serializeTransformOrigin)({
|
|
153
|
+
uv: nextUv,
|
|
154
|
+
z: parsed.z,
|
|
155
|
+
});
|
|
156
|
+
const translate = (0, timeline_translate_utils_1.serializeTranslate)(nextTranslateX, nextTranslateY);
|
|
157
|
+
last = { uv: nextUv, origin, translate };
|
|
158
|
+
setDragOverrides(transformOriginDrag.nodePath, selected_outline_types_1.transformOriginFieldKey, transformOriginDrag.originPropStatus.status === 'keyframed'
|
|
159
|
+
? remotion_1.Internals.makeKeyframedDragOverride({
|
|
160
|
+
status: transformOriginDrag.originPropStatus,
|
|
161
|
+
frame: transformOriginDrag.sourceFrame,
|
|
162
|
+
value: origin,
|
|
163
|
+
})
|
|
164
|
+
: remotion_1.Internals.makeStaticDragOverride(origin));
|
|
165
|
+
setDragOverrides(transformOriginDrag.nodePath, selected_outline_types_1.translateFieldKey, transformOriginDrag.translatePropStatus.status === 'keyframed'
|
|
166
|
+
? transformOriginDrag.originPropStatus.status === 'keyframed'
|
|
167
|
+
? remotion_1.Internals.makeKeyframedDragOverride({
|
|
168
|
+
status: transformOriginDrag.translatePropStatus,
|
|
169
|
+
frame: transformOriginDrag.sourceFrame,
|
|
170
|
+
value: translate,
|
|
171
|
+
})
|
|
172
|
+
: {
|
|
173
|
+
type: 'keyframed',
|
|
174
|
+
status: {
|
|
175
|
+
...transformOriginDrag.translatePropStatus,
|
|
176
|
+
keyframes: transformOriginDrag.translatePropStatus.keyframes.map((keyframe) => {
|
|
177
|
+
const keyframeTranslate = (0, timeline_translate_utils_1.parseTranslate)(String(keyframe.value));
|
|
178
|
+
return {
|
|
179
|
+
...keyframe,
|
|
180
|
+
value: (0, timeline_translate_utils_1.serializeTranslate)(keyframeTranslate[0] +
|
|
181
|
+
nextTranslateX -
|
|
182
|
+
startTranslate[0], keyframeTranslate[1] +
|
|
183
|
+
nextTranslateY -
|
|
184
|
+
startTranslate[1]),
|
|
185
|
+
};
|
|
186
|
+
}),
|
|
187
|
+
},
|
|
188
|
+
}
|
|
189
|
+
: remotion_1.Internals.makeStaticDragOverride(translate));
|
|
190
|
+
};
|
|
191
|
+
updateFromPointerPosition();
|
|
192
|
+
const onPointerMove = (moveEvent) => {
|
|
193
|
+
moveEvent.preventDefault();
|
|
194
|
+
currentPointerX = moveEvent.clientX;
|
|
195
|
+
currentPointerY = moveEvent.clientY;
|
|
196
|
+
axisLocked = moveEvent.shiftKey;
|
|
197
|
+
updateFromPointerPosition();
|
|
198
|
+
};
|
|
199
|
+
const onKeyChange = (keyEvent) => {
|
|
200
|
+
if (keyEvent.key !== 'Shift') {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
const nextAxisLocked = keyEvent.type === 'keydown';
|
|
204
|
+
if (nextAxisLocked === axisLocked) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
axisLocked = nextAxisLocked;
|
|
208
|
+
updateFromPointerPosition();
|
|
209
|
+
};
|
|
210
|
+
const onPointerUp = () => {
|
|
211
|
+
window.removeEventListener('keydown', onKeyChange);
|
|
212
|
+
window.removeEventListener('keyup', onKeyChange);
|
|
213
|
+
(0, ForceSpecificCursor_1.stopForcingSpecificCursor)();
|
|
214
|
+
onDraggingChange(false);
|
|
215
|
+
if (last === null || (0, selected_outline_drag_1.uvsEqual)(last.uv, uv)) {
|
|
216
|
+
clearDragOverrides(transformOriginDrag.nodePath);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
const { staticChanges, keyframedChanges } = (0, selected_outline_drag_1.getSelectedOutlineTransformOriginDragChanges)({
|
|
220
|
+
target: transformOriginDrag,
|
|
221
|
+
startTranslate,
|
|
222
|
+
origin: last.origin,
|
|
223
|
+
translate: last.translate,
|
|
224
|
+
});
|
|
225
|
+
if (staticChanges.length === 0 && keyframedChanges.length === 0) {
|
|
226
|
+
clearDragOverrides(transformOriginDrag.nodePath);
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const promise = staticChanges.length === 0
|
|
230
|
+
? (0, call_add_keyframe_1.callAddKeyframes)({
|
|
231
|
+
sequenceKeyframes: keyframedChanges,
|
|
232
|
+
effectKeyframes: [],
|
|
233
|
+
setPropStatuses,
|
|
234
|
+
clientId: transformOriginDrag.clientId,
|
|
235
|
+
})
|
|
236
|
+
: (0, save_sequence_prop_1.saveSequenceProps)({
|
|
237
|
+
changes: staticChanges,
|
|
238
|
+
addedKeyframes: keyframedChanges,
|
|
239
|
+
movedKeyframes: null,
|
|
240
|
+
setPropStatuses,
|
|
241
|
+
clientId: transformOriginDrag.clientId,
|
|
242
|
+
undoLabel: 'Move transform origin',
|
|
243
|
+
redoLabel: 'Move transform origin back',
|
|
244
|
+
});
|
|
245
|
+
promise
|
|
246
|
+
.catch((err) => {
|
|
247
|
+
(0, NotificationCenter_1.showNotification)(`Could not save transform origin: ${err instanceof Error ? err.message : String(err)}`, 4000);
|
|
248
|
+
})
|
|
249
|
+
.finally(() => {
|
|
250
|
+
clearDragOverrides(transformOriginDrag.nodePath);
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
(0, pointer_session_1.startPointerSession)({
|
|
254
|
+
event,
|
|
255
|
+
target: event.currentTarget,
|
|
256
|
+
onMove: onPointerMove,
|
|
257
|
+
onEnd: onPointerUp,
|
|
258
|
+
});
|
|
259
|
+
window.addEventListener('keydown', onKeyChange);
|
|
260
|
+
window.addEventListener('keyup', onKeyChange);
|
|
261
|
+
}, [
|
|
262
|
+
clearDragOverrides,
|
|
263
|
+
crop,
|
|
264
|
+
editorSnapping,
|
|
265
|
+
onDraggingChange,
|
|
266
|
+
outline,
|
|
267
|
+
parsed,
|
|
268
|
+
setDragOverrides,
|
|
269
|
+
setPropStatuses,
|
|
270
|
+
transformOriginDrag,
|
|
271
|
+
transformOriginPoints,
|
|
272
|
+
uv,
|
|
273
|
+
]);
|
|
274
|
+
if (transformOriginDrag === null ||
|
|
275
|
+
parsed === null ||
|
|
276
|
+
uv === null ||
|
|
277
|
+
position === null) {
|
|
278
|
+
return null;
|
|
279
|
+
}
|
|
280
|
+
return (jsx_runtime_1.jsxs("g", { pointerEvents: "all", cursor: "crosshair", onPointerDown: onPointerDown, "aria-hidden": "true", style: {
|
|
281
|
+
filter: colors_1.SELECTED_OUTLINE_DROP_SHADOW,
|
|
282
|
+
}, children: [
|
|
283
|
+
jsx_runtime_1.jsx("circle", { cx: position.x, cy: position.y, r: 4, stroke: colors_1.BLUE, fill: "none", strokeWidth: 2, vectorEffect: "non-scaling-stroke" }), jsx_runtime_1.jsx("line", { x1: position.x - 8, y1: position.y, x2: position.x + 8, y2: position.y, stroke: colors_1.BLUE, strokeWidth: 2, vectorEffect: "non-scaling-stroke" }), jsx_runtime_1.jsx("line", { x1: position.x, y1: position.y - 8, x2: position.x, y2: position.y + 8, stroke: colors_1.BLUE, strokeWidth: 2, vectorEffect: "non-scaling-stroke" })
|
|
284
|
+
] }));
|
|
285
|
+
};
|
|
286
|
+
exports.SelectedOutlineTransformOriginHandle = SelectedOutlineTransformOriginHandle;
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
|
|
3
3
|
import type { SelectedOutline } from './selected-outline-geometry';
|
|
4
|
-
import {
|
|
4
|
+
import type { SelectedOutlineLayoutTarget } from './selected-outline-types';
|
|
5
5
|
import type { TimelineSelection, TimelineSelectionInteraction } from './Timeline/TimelineSelection';
|
|
6
6
|
export declare const getSelectedOutlineUvHandleTimelineSelection: ({ effectIndex, fieldKey, nodePathInfo, }: {
|
|
7
7
|
readonly effectIndex: number;
|
|
8
8
|
readonly fieldKey: string;
|
|
9
9
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
10
10
|
}) => TimelineSelection;
|
|
11
|
-
type UvTarget = {
|
|
12
|
-
readonly containsSelection: boolean;
|
|
13
|
-
readonly nodePathInfo: SequenceNodePathInfo;
|
|
14
|
-
readonly uvHandles: readonly SelectedOutlineUvHandle[];
|
|
15
|
-
};
|
|
16
11
|
export declare const SelectedOutlineUvHandleConnectionLayer: React.FC<{
|
|
12
|
+
readonly layoutTarget: SelectedOutlineLayoutTarget | undefined;
|
|
17
13
|
readonly outline: SelectedOutline;
|
|
18
|
-
readonly target: UvTarget | undefined;
|
|
19
14
|
}>;
|
|
20
15
|
export declare const SelectedOutlineUvHandleCircleLayer: React.FC<{
|
|
16
|
+
readonly layoutTarget: SelectedOutlineLayoutTarget | undefined;
|
|
21
17
|
readonly onDraggingChange: (dragging: boolean) => void;
|
|
22
18
|
readonly onSelect: (item: TimelineSelection, interaction?: TimelineSelectionInteraction) => void;
|
|
23
19
|
readonly outline: SelectedOutline;
|
|
24
|
-
readonly target: UvTarget | undefined;
|
|
25
20
|
}>;
|
|
26
|
-
export {};
|
|
@@ -37,6 +37,7 @@ exports.SelectedOutlineUvHandleCircleLayer = exports.SelectedOutlineUvHandleConn
|
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const remotion_1 = require("remotion");
|
|
40
|
+
const client_id_1 = require("../helpers/client-id");
|
|
40
41
|
const colors_1 = require("../helpers/colors");
|
|
41
42
|
const pointer_session_1 = require("../helpers/pointer-session");
|
|
42
43
|
const editor_snapping_1 = require("../state/editor-snapping");
|
|
@@ -47,6 +48,7 @@ const selected_outline_measurement_2 = require("./selected-outline-measurement")
|
|
|
47
48
|
const selected_outline_uv_1 = require("./selected-outline-uv");
|
|
48
49
|
const call_add_keyframe_1 = require("./Timeline/call-add-keyframe");
|
|
49
50
|
const save_effect_prop_1 = require("./Timeline/save-effect-prop");
|
|
51
|
+
const TimelineSelection_1 = require("./Timeline/TimelineSelection");
|
|
50
52
|
const getSvgPointFromPointerEvent = ({ event, rect, }) => {
|
|
51
53
|
return {
|
|
52
54
|
x: event.clientX - rect.left,
|
|
@@ -662,27 +664,70 @@ const SelectedUvHandleCircle = ({ handle, nodePathInfo, onDraggingChange, onSele
|
|
|
662
664
|
]);
|
|
663
665
|
return (jsx_runtime_1.jsx("circle", { cx: position.x, cy: position.y, r: handle.isSelected ? selectedUvHandleRadius : uvHandleRadius, fill: colors_1.WHITE, stroke: colors_1.BLUE, strokeWidth: 2, style: uvHandleStyle, vectorEffect: "non-scaling-stroke", pointerEvents: "all", cursor: "default", onPointerDown: onPointerDown }));
|
|
664
666
|
};
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
+
const useSelectedOutlineUvTarget = (layoutTarget) => {
|
|
668
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
669
|
+
const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
670
|
+
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
671
|
+
const { getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
672
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
673
|
+
const selectedEffectsBySequenceKey = (0, react_1.useMemo)(() => (0, selected_outline_measurement_1.getSelectedEffectFieldsBySequenceKey)(selectedItems), [selectedItems]);
|
|
674
|
+
return (0, react_1.useMemo)(() => {
|
|
675
|
+
return {
|
|
676
|
+
containsSelection: layoutTarget.containsSelection,
|
|
677
|
+
nodePathInfo: layoutTarget.nodePathInfo,
|
|
678
|
+
uvHandles: (0, selected_outline_uv_1.getSelectedUvHandles)({
|
|
679
|
+
propStatuses,
|
|
680
|
+
clientId: previewServerState.type === 'connected'
|
|
681
|
+
? previewServerState.clientId
|
|
682
|
+
: null,
|
|
683
|
+
getEffectDragOverrides,
|
|
684
|
+
nodePath: layoutTarget.nodePathInfo.sequenceSubscriptionKey,
|
|
685
|
+
selectedEffects: selectedEffectsBySequenceKey.get(layoutTarget.key),
|
|
686
|
+
sequence: layoutTarget.sequence,
|
|
687
|
+
sourceFrame: timelinePosition - layoutTarget.keyframeDisplayOffset,
|
|
688
|
+
}),
|
|
689
|
+
};
|
|
690
|
+
}, [
|
|
691
|
+
getEffectDragOverrides,
|
|
692
|
+
layoutTarget,
|
|
693
|
+
previewServerState,
|
|
694
|
+
propStatuses,
|
|
695
|
+
selectedEffectsBySequenceKey,
|
|
696
|
+
timelinePosition,
|
|
697
|
+
]);
|
|
698
|
+
};
|
|
699
|
+
const SelectedOutlineUvHandleConnectionLayerActive = ({ layoutTarget, outline }) => {
|
|
700
|
+
const target = useSelectedOutlineUvTarget(layoutTarget);
|
|
701
|
+
if (!target.containsSelection || target.uvHandles.length === 0) {
|
|
667
702
|
return null;
|
|
668
703
|
}
|
|
669
704
|
return (jsx_runtime_1.jsx(SelectedUvHandleConnectionLines, { handles: target.uvHandles, outline: outline }));
|
|
670
705
|
};
|
|
706
|
+
const SelectedOutlineUvHandleConnectionLayer = ({ layoutTarget, outline }) => {
|
|
707
|
+
if ((layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.selectedForUvHandles) !== true) {
|
|
708
|
+
return null;
|
|
709
|
+
}
|
|
710
|
+
return (jsx_runtime_1.jsx(SelectedOutlineUvHandleConnectionLayerActive, { layoutTarget: layoutTarget, outline: outline }));
|
|
711
|
+
};
|
|
671
712
|
exports.SelectedOutlineUvHandleConnectionLayer = SelectedOutlineUvHandleConnectionLayer;
|
|
672
|
-
const
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
}, [outline.dimensions, outline.points, target === null || target === void 0 ? void 0 : target.uvHandles]);
|
|
681
|
-
if (!(target === null || target === void 0 ? void 0 : target.containsSelection) || target.uvHandles.length === 0) {
|
|
713
|
+
const SelectedOutlineUvHandleCircleLayerActive = ({ layoutTarget, onDraggingChange, onSelect, outline }) => {
|
|
714
|
+
const target = useSelectedOutlineUvTarget(layoutTarget);
|
|
715
|
+
const ellipseControls = (0, react_1.useMemo)(() => (0, selected_outline_uv_1.getUvEllipseInteractiveControls)({
|
|
716
|
+
handles: target.uvHandles,
|
|
717
|
+
dimensions: outline.dimensions,
|
|
718
|
+
points: outline.points,
|
|
719
|
+
}), [outline.dimensions, outline.points, target.uvHandles]);
|
|
720
|
+
if (!target.containsSelection || target.uvHandles.length === 0) {
|
|
682
721
|
return null;
|
|
683
722
|
}
|
|
684
723
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [ellipseControls.map((control) => (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [
|
|
685
724
|
jsx_runtime_1.jsx(SelectedUvEllipseStartHandle, { control: control, onDraggingChange: onDraggingChange, outline: outline }), jsx_runtime_1.jsx(SelectedUvEllipseResizeHandle, { axis: "width", control: control, onDraggingChange: onDraggingChange, outline: outline }), jsx_runtime_1.jsx(SelectedUvEllipseResizeHandle, { axis: "height", control: control, onDraggingChange: onDraggingChange, outline: outline }), jsx_runtime_1.jsx(SelectedUvEllipseRotationHandle, { control: control, onDraggingChange: onDraggingChange })
|
|
686
725
|
] }, `${control.handle.effectIndex}-${control.handle.fieldKey}-ellipse-controls`))), target.uvHandles.map((handle) => (jsx_runtime_1.jsx(SelectedUvHandleCircle, { handle: handle, nodePathInfo: target.nodePathInfo, onDraggingChange: onDraggingChange, onSelect: onSelect, outline: outline }, `${handle.effectIndex}-${handle.fieldKey}`)))] }));
|
|
687
726
|
};
|
|
727
|
+
const SelectedOutlineUvHandleCircleLayer = ({ layoutTarget, onDraggingChange, onSelect, outline }) => {
|
|
728
|
+
if ((layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.selectedForUvHandles) !== true) {
|
|
729
|
+
return null;
|
|
730
|
+
}
|
|
731
|
+
return (jsx_runtime_1.jsx(SelectedOutlineUvHandleCircleLayerActive, { layoutTarget: layoutTarget, onDraggingChange: onDraggingChange, onSelect: onSelect, outline: outline }));
|
|
732
|
+
};
|
|
688
733
|
exports.SelectedOutlineUvHandleCircleLayer = SelectedOutlineUvHandleCircleLayer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type SettingsContextValue = {
|
|
4
|
+
readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
|
|
5
|
+
readonly editorInfo: GetDefaultEditorInfoResponse | null;
|
|
6
|
+
readonly error: string | null;
|
|
7
|
+
readonly publicLicenseKey: string | null;
|
|
8
|
+
readonly revision: number;
|
|
9
|
+
readonly setPublicLicenseKey: (publicLicenseKey: string | null) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const SettingsProvider: React.FC<{
|
|
12
|
+
readonly children: React.ReactNode;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const useSettings: () => SettingsContextValue;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSettings = exports.SettingsProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
7
|
+
const client_id_1 = require("../helpers/client-id");
|
|
8
|
+
const call_api_1 = require("./call-api");
|
|
9
|
+
const SettingsContext = (0, react_1.createContext)(null);
|
|
10
|
+
const SettingsProvider = ({ children }) => {
|
|
11
|
+
var _a;
|
|
12
|
+
var _b;
|
|
13
|
+
const { previewServerState, subscribeToEvent } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
14
|
+
const [settings, setSettings] = (0, react_1.useState)({
|
|
15
|
+
codingAgentInfo: null,
|
|
16
|
+
editorInfo: null,
|
|
17
|
+
error: null,
|
|
18
|
+
publicLicenseKey: (_b = (_a = window.remotion_studioConfig) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
|
|
19
|
+
revision: 0,
|
|
20
|
+
});
|
|
21
|
+
(0, react_1.useEffect)(() => {
|
|
22
|
+
if (previewServerState.type !== 'connected' ||
|
|
23
|
+
(0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const controller = new AbortController();
|
|
27
|
+
setSettings((currentSettings) => ({
|
|
28
|
+
...currentSettings,
|
|
29
|
+
error: null,
|
|
30
|
+
}));
|
|
31
|
+
Promise.all([
|
|
32
|
+
(0, call_api_1.callApi)('/api/default-editor-info', {}, controller.signal),
|
|
33
|
+
(0, call_api_1.callApi)('/api/default-coding-agent-info', {}, controller.signal),
|
|
34
|
+
])
|
|
35
|
+
.then(([editorInfo, codingAgentInfo]) => {
|
|
36
|
+
const runtimeConfig = window.remotion_studioConfig;
|
|
37
|
+
setSettings((currentSettings) => ({
|
|
38
|
+
...currentSettings,
|
|
39
|
+
codingAgentInfo: {
|
|
40
|
+
...codingAgentInfo,
|
|
41
|
+
defaultCodingAgent: runtimeConfig
|
|
42
|
+
? runtimeConfig.defaultCodingAgent
|
|
43
|
+
: codingAgentInfo.defaultCodingAgent,
|
|
44
|
+
},
|
|
45
|
+
editorInfo: {
|
|
46
|
+
...editorInfo,
|
|
47
|
+
defaultEditor: runtimeConfig
|
|
48
|
+
? runtimeConfig.defaultEditor
|
|
49
|
+
: editorInfo.defaultEditor,
|
|
50
|
+
},
|
|
51
|
+
error: null,
|
|
52
|
+
revision: currentSettings.revision + 1,
|
|
53
|
+
}));
|
|
54
|
+
})
|
|
55
|
+
.catch((err) => {
|
|
56
|
+
if (controller.signal.aborted) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
setSettings((currentSettings) => ({
|
|
60
|
+
...currentSettings,
|
|
61
|
+
error: err.message,
|
|
62
|
+
}));
|
|
63
|
+
});
|
|
64
|
+
return () => controller.abort();
|
|
65
|
+
}, [previewServerState.type]);
|
|
66
|
+
(0, react_1.useEffect)(() => {
|
|
67
|
+
return subscribeToEvent('config-file-changed', (event) => {
|
|
68
|
+
if (event.type !== 'config-file-changed') {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
setSettings((currentSettings) => ({
|
|
72
|
+
...currentSettings,
|
|
73
|
+
codingAgentInfo: currentSettings.codingAgentInfo
|
|
74
|
+
? {
|
|
75
|
+
...currentSettings.codingAgentInfo,
|
|
76
|
+
defaultCodingAgent: event.studioRuntimeConfig.defaultCodingAgent,
|
|
77
|
+
}
|
|
78
|
+
: null,
|
|
79
|
+
editorInfo: currentSettings.editorInfo
|
|
80
|
+
? {
|
|
81
|
+
...currentSettings.editorInfo,
|
|
82
|
+
defaultEditor: event.studioRuntimeConfig.defaultEditor,
|
|
83
|
+
}
|
|
84
|
+
: null,
|
|
85
|
+
error: null,
|
|
86
|
+
publicLicenseKey: event.studioRuntimeConfig.publicLicenseKey,
|
|
87
|
+
revision: currentSettings.revision + 1,
|
|
88
|
+
}));
|
|
89
|
+
});
|
|
90
|
+
}, [subscribeToEvent]);
|
|
91
|
+
const setPublicLicenseKey = (0, react_1.useCallback)((publicLicenseKey) => {
|
|
92
|
+
setSettings((currentSettings) => {
|
|
93
|
+
if (currentSettings.publicLicenseKey === publicLicenseKey) {
|
|
94
|
+
return currentSettings;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
...currentSettings,
|
|
98
|
+
publicLicenseKey,
|
|
99
|
+
revision: currentSettings.revision + 1,
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
}, []);
|
|
103
|
+
const value = (0, react_1.useMemo)(() => {
|
|
104
|
+
return { ...settings, setPublicLicenseKey };
|
|
105
|
+
}, [setPublicLicenseKey, settings]);
|
|
106
|
+
return (jsx_runtime_1.jsx(SettingsContext.Provider, { value: value, children: children }));
|
|
107
|
+
};
|
|
108
|
+
exports.SettingsProvider = SettingsProvider;
|
|
109
|
+
const useSettings = () => {
|
|
110
|
+
const context = (0, react_1.useContext)(SettingsContext);
|
|
111
|
+
if (context === null) {
|
|
112
|
+
throw new Error('useSettings must be used inside SettingsProvider');
|
|
113
|
+
}
|
|
114
|
+
return context;
|
|
115
|
+
};
|
|
116
|
+
exports.useSettings = useSettings;
|
|
@@ -12,6 +12,8 @@ const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
|
12
12
|
const ModalHeader_1 = require("./ModalHeader");
|
|
13
13
|
const DismissableModal_1 = require("./NewComposition/DismissableModal");
|
|
14
14
|
const render_modals_1 = require("./RenderModal/render-modals");
|
|
15
|
+
const SettingsContext_1 = require("./SettingsContext");
|
|
16
|
+
const SettingsModalFooter_1 = require("./SettingsModalFooter");
|
|
15
17
|
const vertical_1 = require("./Tabs/vertical");
|
|
16
18
|
const hiddenPanel = {
|
|
17
19
|
display: 'none',
|
|
@@ -28,6 +30,7 @@ const appsIconContainer = {
|
|
|
28
30
|
};
|
|
29
31
|
const SettingsModal = ({ initialPublicLicenseKey, initialTab }) => {
|
|
30
32
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
33
|
+
const { setPublicLicenseKey } = (0, SettingsContext_1.useSettings)();
|
|
31
34
|
const [tab, setTab] = (0, react_1.useState)(initialTab);
|
|
32
35
|
const [openedTabs, setOpenedTabs] = (0, react_1.useState)([initialTab]);
|
|
33
36
|
const dismiss = (0, react_1.useCallback)(() => {
|
|
@@ -42,9 +45,12 @@ const SettingsModal = ({ initialPublicLicenseKey, initialTab }) => {
|
|
|
42
45
|
return [...currentOpenedTabs, newTab];
|
|
43
46
|
});
|
|
44
47
|
}, []);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
(0, react_1.useEffect)(() => {
|
|
49
|
+
setPublicLicenseKey(initialPublicLicenseKey);
|
|
50
|
+
}, [initialPublicLicenseKey, setPublicLicenseKey]);
|
|
51
|
+
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { panelStyle: render_modals_1.outerModalStyle, children: jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
52
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Settings", onClose: dismiss }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
|
|
53
|
+
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'apps', onClick: () => selectTab('apps'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: appsIconContainer, children: jsx_runtime_1.jsx(apps_1.AppsIcon, { color: color, style: appsIcon }) })), children: "Apps" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'license', onClick: () => selectTab('license'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(certificate_1.CertificateIcon, { color: color, style: render_modals_1.icon }) })), children: "License" })] }), openedTabs.includes('apps') ? (jsx_runtime_1.jsx("div", { style: tab === 'apps' ? render_modals_1.optionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureDefaultEditorModal_1.DefaultEditorSettings, {}) })) : null, openedTabs.includes('license') ? (jsx_runtime_1.jsx("div", { style: tab === 'license' ? render_modals_1.optionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureLicenseModal_1.LicenseSettings, {}) })) : null] }), jsx_runtime_1.jsx(SettingsModalFooter_1.SettingsModalFooter, {})
|
|
54
|
+
] }) }));
|
|
49
55
|
};
|
|
50
56
|
exports.SettingsModal = SettingsModal;
|
|
@@ -12,7 +12,6 @@ const footer = {
|
|
|
12
12
|
const footerRow = {
|
|
13
13
|
alignItems: 'center',
|
|
14
14
|
display: 'flex',
|
|
15
|
-
justifyContent: 'space-between',
|
|
16
15
|
};
|
|
17
16
|
const configFileHint = {
|
|
18
17
|
alignItems: 'center',
|
|
@@ -30,7 +29,7 @@ const configFileName = {
|
|
|
30
29
|
fontWeight: 'bold',
|
|
31
30
|
lineHeight: '20px',
|
|
32
31
|
};
|
|
33
|
-
const SettingsModalFooter = (
|
|
32
|
+
const SettingsModalFooter = () => {
|
|
34
33
|
const configFileLocation = (0, react_1.useMemo)(() => {
|
|
35
34
|
return {
|
|
36
35
|
source: 'remotion.config.ts',
|
|
@@ -38,9 +37,8 @@ const SettingsModalFooter = ({ children }) => {
|
|
|
38
37
|
column: 1,
|
|
39
38
|
};
|
|
40
39
|
}, []);
|
|
41
|
-
return (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, noBorder: true, children: jsx_runtime_1.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
] }), children] }) }));
|
|
40
|
+
return (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, noBorder: true, children: jsx_runtime_1.jsx("div", { style: footerRow, children: jsx_runtime_1.jsxs("div", { style: configFileHint, children: ["Changes save to",
|
|
41
|
+
jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { location: configFileLocation, label: jsx_runtime_1.jsx("strong", { style: configFileName, children: "remotion.config.ts" }) })
|
|
42
|
+
] }) }) }));
|
|
45
43
|
};
|
|
46
44
|
exports.SettingsModalFooter = SettingsModalFooter;
|
|
@@ -7,7 +7,7 @@ const editor_outlines_1 = require("../state/editor-outlines");
|
|
|
7
7
|
const timeline_sequence_hover_1 = require("../state/timeline-sequence-hover");
|
|
8
8
|
const ShowOutlinesProvider = ({ children }) => {
|
|
9
9
|
const [editorShowOutlines, setEditorShowOutlinesState] = (0, react_1.useState)(() => (0, editor_outlines_1.loadEditorShowOutlinesOption)());
|
|
10
|
-
const
|
|
10
|
+
const timelineSequenceHoverStore = (0, react_1.useMemo)(() => (0, timeline_sequence_hover_1.createTimelineSequenceHoverStore)(), []);
|
|
11
11
|
const setEditorShowOutlines = (0, react_1.useCallback)((newValue) => {
|
|
12
12
|
setEditorShowOutlinesState((prevState) => {
|
|
13
13
|
const newVal = newValue(prevState);
|
|
@@ -21,7 +21,6 @@ const ShowOutlinesProvider = ({ children }) => {
|
|
|
21
21
|
setEditorShowOutlines,
|
|
22
22
|
};
|
|
23
23
|
}, [editorShowOutlines, setEditorShowOutlines]);
|
|
24
|
-
|
|
25
|
-
return (jsx_runtime_1.jsx(editor_outlines_1.EditorShowOutlinesContext.Provider, { value: editorShowOutlinesCtx, children: jsx_runtime_1.jsx(timeline_sequence_hover_1.TimelineSequenceHoverContext.Provider, { value: timelineSequenceHoverCtx, children: children }) }));
|
|
24
|
+
return (jsx_runtime_1.jsx(editor_outlines_1.EditorShowOutlinesContext.Provider, { value: editorShowOutlinesCtx, children: jsx_runtime_1.jsx(timeline_sequence_hover_1.TimelineSequenceHoverContext.Provider, { value: timelineSequenceHoverStore, children: children }) }));
|
|
26
25
|
};
|
|
27
26
|
exports.ShowOutlinesProvider = ShowOutlinesProvider;
|