@remotion/studio 4.0.506 → 4.0.508
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/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 +6 -0
- package/dist/components/CodingAgentIcon.js +12 -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.d.ts +1 -0
- package/dist/components/ContextMenu.js +42 -13
- package/dist/components/EditorContent.js +4 -3
- package/dist/components/EditorContexts.js +6 -5
- package/dist/components/ExpandedTracksProvider.js +10 -53
- package/dist/components/InlineAction.d.ts +2 -1
- package/dist/components/InlineAction.js +3 -3
- package/dist/components/InspectorLocationCopy.js +8 -8
- package/dist/components/InspectorOpenInEditor.d.ts +2 -0
- package/dist/components/InspectorOpenInEditor.js +81 -50
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +3 -1
- 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/InspectorPanel/styles.js +1 -1
- package/dist/components/InspectorSequenceSection.js +36 -4
- 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/MenuBuildIndicator.js +1 -1
- 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/PlayPause.d.ts +1 -1
- package/dist/components/PlayPause.js +61 -12
- package/dist/components/Preview.js +29 -4
- 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.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +3 -3
- 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 +8 -3
- 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 +2 -2
- 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/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/SelectedOutlineCanvasRotation.d.ts +9 -0
- package/dist/components/SelectedOutlineCanvasRotation.js +237 -0
- package/dist/components/SelectedOutlineElement.d.ts +16 -18
- package/dist/components/SelectedOutlineElement.js +144 -931
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +7 -0
- package/dist/components/SelectedOutlineKeyboardControls.js +261 -0
- package/dist/components/SelectedOutlineOverlay.d.ts +7 -14
- package/dist/components/SelectedOutlineOverlay.js +378 -864
- package/dist/components/SelectedOutlinePolygon.d.ts +26 -0
- package/dist/components/SelectedOutlinePolygon.js +360 -0
- package/dist/components/SelectedOutlineRenderer.d.ts +19 -0
- package/dist/components/SelectedOutlineRenderer.js +225 -0
- package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +17 -0
- package/dist/components/SelectedOutlineRotationCornerHandle.js +271 -0
- package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +17 -0
- package/dist/components/SelectedOutlineScaleEdgeLine.js +215 -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 +312 -0
- package/dist/components/SelectedOutlineUvControls.d.ts +3 -9
- package/dist/components/SelectedOutlineUvControls.js +57 -12
- package/dist/components/SequencePropsSubscriptionProvider.js +8 -0
- 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/SequencePropsObserver.js +97 -1
- package/dist/components/Timeline/SubscribeToNodePaths.js +4 -2
- 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/TimelineEffectItem.js +1 -4
- 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/TimelineFieldRowContent.js +10 -3
- 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 +45 -2
- package/dist/components/Timeline/TimelineSequence.js +28 -25
- package/dist/components/Timeline/TimelineSequenceItem.js +91 -28
- package/dist/components/Timeline/TimelineSequencePropItem.js +5 -2
- package/dist/components/Timeline/TimelineTrack.js +2 -1
- 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.d.ts +6 -3
- package/dist/components/Timeline/get-sequence-context-menu-items.js +69 -57
- 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/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} +21 -5
- 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 +45 -9
- 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-expanded-tree.d.ts +4 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +45 -1
- 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/get-open-in-menu-items.d.ts +17 -0
- package/dist/components/get-open-in-menu-items.js +144 -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 +7 -2
- package/dist/components/selected-outline-measurement.js +28 -1
- 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 +15 -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-zpn4m49r.js} +12924 -10139
- package/dist/esm/index.mjs +357 -2
- package/dist/esm/internals.mjs +12923 -10138
- package/dist/esm/previewEntry.mjs +12771 -9986
- 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/get-box-quads-polyfill-internals.js +10 -2
- package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
- package/dist/helpers/open-in-editor.d.ts +4 -1
- package/dist/helpers/open-in-editor.js +9 -1
- 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/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/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/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/state/timeline-sequence-hover.d.ts +9 -3
- package/dist/state/timeline-sequence-hover.js +63 -12
- package/dist/state/transform-3d-mode.d.ts +10 -0
- package/dist/state/transform-3d-mode.js +27 -0
- package/dist/state/z-index.js +5 -8
- package/package.json +12 -12
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
WHITE,
|
|
5
5
|
__require,
|
|
6
6
|
__toESM
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-fgedsvhb.js";
|
|
8
8
|
|
|
9
9
|
// src/renderEntry.tsx
|
|
10
10
|
import { useContext, useEffect, useRef, useState } from "react";
|
|
@@ -212,7 +212,7 @@ var renderContent = (Root) => {
|
|
|
212
212
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
213
213
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
214
214
|
}));
|
|
215
|
-
import("./chunk-
|
|
215
|
+
import("./chunk-zpn4m49r.js").then(({ StudioInternals }) => {
|
|
216
216
|
window.remotion_isStudio = true;
|
|
217
217
|
window.remotion_isReadOnlyStudio = true;
|
|
218
218
|
window.remotion_inputProps = "{}";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.areSequenceNodePathInfosEqual = void 0;
|
|
4
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
|
+
const areSequenceNodePathInfosEqual = (first, second) => {
|
|
6
|
+
if (first.index !== second.index ||
|
|
7
|
+
first.numberOfSequencesWithThisNodePath !==
|
|
8
|
+
second.numberOfSequencesWithThisNodePath ||
|
|
9
|
+
first.supportsEffects !== second.supportsEffects ||
|
|
10
|
+
(0, studio_shared_1.stringifySequenceSubscriptionKey)(first.sequenceSubscriptionKey) !==
|
|
11
|
+
(0, studio_shared_1.stringifySequenceSubscriptionKey)(second.sequenceSubscriptionKey) ||
|
|
12
|
+
first.auxiliaryKeys.length !== second.auxiliaryKeys.length ||
|
|
13
|
+
!first.auxiliaryKeys.every((key, index) => key === second.auxiliaryKeys[index])) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const firstVideoConfig = first.sequenceSubscriptionKey.videoConfigValues;
|
|
17
|
+
const secondVideoConfig = second.sequenceSubscriptionKey.videoConfigValues;
|
|
18
|
+
return (firstVideoConfig === secondVideoConfig ||
|
|
19
|
+
(firstVideoConfig !== null &&
|
|
20
|
+
secondVideoConfig !== null &&
|
|
21
|
+
firstVideoConfig.durationInFrames ===
|
|
22
|
+
secondVideoConfig.durationInFrames &&
|
|
23
|
+
firstVideoConfig.fps === secondVideoConfig.fps &&
|
|
24
|
+
firstVideoConfig.height === secondVideoConfig.height &&
|
|
25
|
+
firstVideoConfig.width === secondVideoConfig.width));
|
|
26
|
+
};
|
|
27
|
+
exports.areSequenceNodePathInfosEqual = areSequenceNodePathInfosEqual;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.calculateTimeline = void 0;
|
|
4
|
-
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
4
|
const get_connected_compositions_1 = require("./get-connected-compositions");
|
|
6
5
|
const get_sequence_visible_range_1 = require("./get-sequence-visible-range");
|
|
7
6
|
const get_timeline_nestedness_1 = require("./get-timeline-nestedness");
|
|
8
7
|
const get_timeline_sequence_sort_key_1 = require("./get-timeline-sequence-sort-key");
|
|
9
8
|
const sort_by_nonce_history_1 = require("./sort-by-nonce-history");
|
|
9
|
+
const timeline_node_path_key_1 = require("./timeline-node-path-key");
|
|
10
10
|
const getInheritedLoopDisplay = (sequence, sequences) => {
|
|
11
11
|
if (sequence.loopDisplay) {
|
|
12
12
|
return sequence.loopDisplay;
|
|
@@ -113,7 +113,7 @@ const calculateTimeline = ({ sequences, overrideIdsToNodePaths, compositions = [
|
|
|
113
113
|
if (track.nodePathInfo === null) {
|
|
114
114
|
return track;
|
|
115
115
|
}
|
|
116
|
-
const key = (0,
|
|
116
|
+
const key = (0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey);
|
|
117
117
|
const index = (_a = nodePathIndexCounters.get(key)) !== null && _a !== void 0 ? _a : 0;
|
|
118
118
|
nodePathIndexCounters.set(key, index + 1);
|
|
119
119
|
return {
|
|
@@ -132,7 +132,7 @@ const calculateTimeline = ({ sequences, overrideIdsToNodePaths, compositions = [
|
|
|
132
132
|
if (track.nodePathInfo === null) {
|
|
133
133
|
return track;
|
|
134
134
|
}
|
|
135
|
-
const key = (0,
|
|
135
|
+
const key = (0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey);
|
|
136
136
|
return {
|
|
137
137
|
...track,
|
|
138
138
|
nodePathInfo: {
|
|
@@ -71,6 +71,7 @@ const PreviewServerConnection = ({ children }) => {
|
|
|
71
71
|
type: 'init',
|
|
72
72
|
});
|
|
73
73
|
const [configFileChangeRevision, setConfigFileChangeRevision] = react_1.default.useState(0);
|
|
74
|
+
const clientId = (0, react_1.useRef)(null);
|
|
74
75
|
(0, react_1.useEffect)(() => {
|
|
75
76
|
const handleEvent = (newEvent) => {
|
|
76
77
|
var _a, _b;
|
|
@@ -83,12 +84,18 @@ const PreviewServerConnection = ({ children }) => {
|
|
|
83
84
|
window.remotion_studioConfig = newEvent.studioRuntimeConfig;
|
|
84
85
|
window.remotion_editorName = newEvent.editorName;
|
|
85
86
|
setConfigFileChangeRevision((revision) => revision + 1);
|
|
86
|
-
|
|
87
|
+
const isOwnRuntimeConfigChange = newEvent.changeType === 'runtime' &&
|
|
88
|
+
newEvent.originatorClientId !== null &&
|
|
89
|
+
newEvent.originatorClientId === clientId.current;
|
|
90
|
+
if (!isOwnRuntimeConfigChange) {
|
|
91
|
+
(0, NotificationCenter_1.showNotification)((0, studio_shared_1.getConfigFileChangeMessage)(newEvent.changeType), 4000);
|
|
92
|
+
}
|
|
87
93
|
}
|
|
88
94
|
if (newEvent.type === 'config-file-reload-failed') {
|
|
89
95
|
(0, NotificationCenter_1.showNotification)(newEvent.errorMessage, 4000);
|
|
90
96
|
}
|
|
91
97
|
if (newEvent.type === 'init') {
|
|
98
|
+
clientId.current = newEvent.clientId;
|
|
92
99
|
latestUndoRedoEvent.current = {
|
|
93
100
|
type: 'undo-redo-stack-changed',
|
|
94
101
|
undoFile: newEvent.undoFile,
|
|
@@ -6,7 +6,7 @@ export declare const formatFileLocation: ({ location, root, }: {
|
|
|
6
6
|
readonly location: FileLocation | null;
|
|
7
7
|
readonly root: string;
|
|
8
8
|
}) => string | null;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const formatContextForAgents: ({ name, location, root, }: {
|
|
10
10
|
readonly name: string | null;
|
|
11
11
|
readonly location: FileLocation | null;
|
|
12
12
|
readonly root: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.formatContextForAgents = exports.formatFileLocation = void 0;
|
|
4
4
|
const normalizeSlashes = (path) => path.replace(/\\/g, '/');
|
|
5
5
|
const stripTrailingSlashes = (path) => path.replace(/\/+$/, '');
|
|
6
6
|
const stripLeadingDotSlash = (path) => path.replace(/^\.\/+/, '');
|
|
@@ -25,11 +25,11 @@ const formatFileLocation = ({ location, root, }) => {
|
|
|
25
25
|
return `${stripLeadingDotSlash(relativeSource)}:${location.line}`;
|
|
26
26
|
};
|
|
27
27
|
exports.formatFileLocation = formatFileLocation;
|
|
28
|
-
const
|
|
28
|
+
const formatContextForAgents = ({ name, location, root, }) => {
|
|
29
29
|
const fileLocation = (0, exports.formatFileLocation)({ location, root });
|
|
30
30
|
if (!name || !fileLocation) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
33
|
return `${name} in ${fileLocation}`;
|
|
34
34
|
};
|
|
35
|
-
exports.
|
|
35
|
+
exports.formatContextForAgents = formatContextForAgents;
|
|
@@ -1658,10 +1658,18 @@ function getElementCombinedTransform(element, iframes) {
|
|
|
1658
1658
|
m.multiplySelf(new DOMMatrix('translate(' + tr.replaceAll(' ', ',') + ')'));
|
|
1659
1659
|
}
|
|
1660
1660
|
if (hasRotate) {
|
|
1661
|
-
|
|
1661
|
+
const rotateParts = s.rotate.trim().split(/\s+/);
|
|
1662
|
+
const rotateTransform = rotateParts.length === 1
|
|
1663
|
+
? `rotate(${rotateParts[0]})`
|
|
1664
|
+
: rotateParts.length === 2 && /^[xyz]$/i.test(rotateParts[0])
|
|
1665
|
+
? `rotate${rotateParts[0].toUpperCase()}(${rotateParts[1]})`
|
|
1666
|
+
: `rotate3d(${rotateParts.join(',')})`;
|
|
1667
|
+
m.multiplySelf(new DOMMatrix(rotateTransform));
|
|
1662
1668
|
}
|
|
1663
1669
|
if (hasScale) {
|
|
1664
|
-
|
|
1670
|
+
const scaleParts = s.scale.trim().split(/\s+/);
|
|
1671
|
+
const scaleFunction = scaleParts.length === 3 ? 'scale3d' : 'scale';
|
|
1672
|
+
m.multiplySelf(new DOMMatrix(`${scaleFunction}(${scaleParts.join(',')})`));
|
|
1665
1673
|
}
|
|
1666
1674
|
if (hasOffsetPath) {
|
|
1667
1675
|
m.multiplySelf(computeOffsetTransformMatrix(element));
|
|
@@ -11,12 +11,12 @@ const migrateExpandedTracksForSubscriptionKey = (prev, oldKey, newKey) => {
|
|
|
11
11
|
let changed = false;
|
|
12
12
|
const next = { ...prev };
|
|
13
13
|
for (const [key, value] of Object.entries(prev)) {
|
|
14
|
-
if (value
|
|
14
|
+
if (!value || !key.startsWith(oldPrefix + '.')) {
|
|
15
15
|
continue;
|
|
16
16
|
}
|
|
17
17
|
const migratedKey = newPrefix + key.slice(oldPrefix.length);
|
|
18
|
-
if (next[migratedKey]
|
|
19
|
-
next[migratedKey] =
|
|
18
|
+
if (!next[migratedKey]) {
|
|
19
|
+
next[migratedKey] = true;
|
|
20
20
|
}
|
|
21
21
|
delete next[key];
|
|
22
22
|
changed = true;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TerminalId } from '@remotion/studio-shared';
|
|
2
|
+
import type { CompositionComponentInfoResponse, EditorPickerId, OpenInTerminalResponse, SymbolicatedStackFrame } from '@remotion/studio-shared';
|
|
2
3
|
import type { CodePosition, OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
3
4
|
export declare const openInEditor: (stack: SymbolicatedStackFrame, editorId: EditorPickerId | null) => Promise<import("@remotion/studio-shared").OpenInEditorResponse>;
|
|
5
|
+
export declare const openInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", prompt: string | null) => Promise<import("@remotion/studio-shared").OpenInCodingAgentResponse>;
|
|
6
|
+
export declare const openInTerminal: (terminalId: TerminalId, directory: string) => Promise<OpenInTerminalResponse>;
|
|
4
7
|
export declare const openOriginalPositionInEditor: (originalPosition: OriginalPosition, editorId: EditorPickerId | null) => Promise<void>;
|
|
5
8
|
export declare const openOriginalPositionInEditorAtProperty: ({ originalPosition, property, }: {
|
|
6
9
|
originalPosition: CodePosition;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.openCompositionComponentInEditor = exports.preloadCompositionComponentInfo = exports.loadCompositionComponentInfo = exports.useCachedCompositionComponentInfo = exports.getCachedCompositionComponentInfo = exports.subscribeToCompositionComponentInfo = exports.openOriginalPositionInEditorAtProperty = exports.openOriginalPositionInEditor = exports.openInEditor = void 0;
|
|
3
|
+
exports.openCompositionComponentInEditor = exports.preloadCompositionComponentInfo = exports.loadCompositionComponentInfo = exports.useCachedCompositionComponentInfo = exports.getCachedCompositionComponentInfo = exports.subscribeToCompositionComponentInfo = exports.openOriginalPositionInEditorAtProperty = exports.openOriginalPositionInEditor = exports.openInTerminal = exports.openInCodingAgent = exports.openInEditor = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const call_api_1 = require("../components/call-api");
|
|
6
6
|
const browser_studio_operations_1 = require("./browser-studio-operations");
|
|
@@ -18,6 +18,14 @@ const openInEditor = (stack, editorId) => {
|
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
exports.openInEditor = openInEditor;
|
|
21
|
+
const openInCodingAgent = (codingAgentId, prompt) => {
|
|
22
|
+
return (0, call_api_1.callApi)('/api/open-in-coding-agent', { codingAgentId, prompt });
|
|
23
|
+
};
|
|
24
|
+
exports.openInCodingAgent = openInCodingAgent;
|
|
25
|
+
const openInTerminal = (terminalId, directory) => {
|
|
26
|
+
return (0, call_api_1.callApi)('/api/open-in-terminal', { directory, terminalId });
|
|
27
|
+
};
|
|
28
|
+
exports.openInTerminal = openInTerminal;
|
|
21
29
|
const openOriginalPositionInEditor = async (originalPosition, editorId) => {
|
|
22
30
|
const response = await (0, exports.openInEditor)({
|
|
23
31
|
originalColumnNumber: originalPosition.column,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.subscribeToPreviewServerConnectionState = exports.subscribeToPreviewServerEvents = exports.ensurePreviewServerEventSource = void 0;
|
|
6
6
|
const browser_studio_operations_1 = require("./browser-studio-operations");
|
|
7
|
+
const sequence_node_path_mutations_1 = require("./sequence-node-path-mutations");
|
|
7
8
|
let source = null;
|
|
8
9
|
let unsubscribeFromBrowserStudio = null;
|
|
9
10
|
let browserStudioReadyListenerInstalled = false;
|
|
@@ -18,6 +19,9 @@ const notifyConnectionState = () => {
|
|
|
18
19
|
}
|
|
19
20
|
};
|
|
20
21
|
const dispatch = (event) => {
|
|
22
|
+
if (event.type === 'sequence-node-paths-remapped') {
|
|
23
|
+
(0, sequence_node_path_mutations_1.queueSequenceNodePathMutation)(event.mutation);
|
|
24
|
+
}
|
|
21
25
|
if (event.type === 'init') {
|
|
22
26
|
lastInitEvent = event;
|
|
23
27
|
connectionState = {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SequenceNodePathMutation } from '@remotion/studio-shared';
|
|
2
|
+
export declare const queueSequenceNodePathMutation: (mutation: SequenceNodePathMutation) => void;
|
|
3
|
+
export declare const queueSequenceNodePathMutationFromApiResponse: (response: unknown) => void;
|
|
4
|
+
export declare const takePendingSequenceNodePathMutations: () => SequenceNodePathMutation[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.takePendingSequenceNodePathMutations = exports.queueSequenceNodePathMutationFromApiResponse = exports.queueSequenceNodePathMutation = void 0;
|
|
4
|
+
const pendingMutations = [];
|
|
5
|
+
const seenMutationIds = new Set();
|
|
6
|
+
const queueSequenceNodePathMutation = (mutation) => {
|
|
7
|
+
if (seenMutationIds.has(mutation.mutationId)) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
seenMutationIds.add(mutation.mutationId);
|
|
11
|
+
pendingMutations.push(mutation);
|
|
12
|
+
};
|
|
13
|
+
exports.queueSequenceNodePathMutation = queueSequenceNodePathMutation;
|
|
14
|
+
const queueSequenceNodePathMutationFromApiResponse = (response) => {
|
|
15
|
+
if (typeof response !== 'object' ||
|
|
16
|
+
response === null ||
|
|
17
|
+
!('nodePathMutation' in response)) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const { nodePathMutation } = response;
|
|
21
|
+
if (typeof nodePathMutation !== 'object' ||
|
|
22
|
+
nodePathMutation === null ||
|
|
23
|
+
!('mutationId' in nodePathMutation) ||
|
|
24
|
+
typeof nodePathMutation.mutationId !== 'string') {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
(0, exports.queueSequenceNodePathMutation)(nodePathMutation);
|
|
28
|
+
};
|
|
29
|
+
exports.queueSequenceNodePathMutationFromApiResponse = queueSequenceNodePathMutationFromApiResponse;
|
|
30
|
+
const takePendingSequenceNodePathMutations = () => pendingMutations.splice(0);
|
|
31
|
+
exports.takePendingSequenceNodePathMutations = takePendingSequenceNodePathMutations;
|
|
@@ -6,9 +6,12 @@ exports.DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = 300;
|
|
|
6
6
|
const defaultStudioRuntimeConfig = {
|
|
7
7
|
askAIEnabled: false,
|
|
8
8
|
bufferStateDelayInMilliseconds: null,
|
|
9
|
+
defaultCodingAgent: null,
|
|
10
|
+
defaultEditor: null,
|
|
9
11
|
interactivityEnabled: true,
|
|
10
12
|
keyboardShortcutsEnabled: true,
|
|
11
13
|
maxTimelineTracks: null,
|
|
14
|
+
publicLicenseKey: null,
|
|
12
15
|
};
|
|
13
16
|
const getStudioRuntimeConfig = () => {
|
|
14
17
|
var _a;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import type { SequencePropsSubscriptionKey } from 'remotion';
|
|
1
2
|
import type { SequenceNodePathInfo } from './get-timeline-sequence-sort-key';
|
|
3
|
+
export declare const timelineSequenceNodePathToKey: (key: SequencePropsSubscriptionKey) => string;
|
|
2
4
|
export declare const timelineNodePathInfoToKey: (info: SequenceNodePathInfo) => string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.timelineNodePathInfoToKey = void 0;
|
|
3
|
+
exports.timelineNodePathInfoToKey = exports.timelineSequenceNodePathToKey = void 0;
|
|
4
4
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
|
+
const timelineSequenceNodePathToKey = (key) => `${key.absolutePath}:${JSON.stringify(key.nodePath)}`;
|
|
6
|
+
exports.timelineSequenceNodePathToKey = timelineSequenceNodePathToKey;
|
|
5
7
|
const timelineNodePathInfoToKey = (info) => [
|
|
6
8
|
(0, studio_shared_1.stringifySequenceExpandedRowKey)(info.sequenceSubscriptionKey),
|
|
7
9
|
info.auxiliaryKeys.join('.'),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const isAssetUploadDragEvent: (event: {
|
|
2
2
|
readonly dataTransfer: DataTransfer;
|
|
3
3
|
}) => boolean;
|
|
4
|
+
export declare const getRenderOutputDragData: (dataTransfer: DataTransfer) => import("@remotion/studio-protocol").RenderOutputDragData | null;
|
|
4
5
|
declare function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation }: {
|
|
5
6
|
name: string | null;
|
|
6
7
|
parentFolder: string | null;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getRenderOutputDragData = exports.isAssetUploadDragEvent = void 0;
|
|
4
|
+
const studio_protocol_1 = require("@remotion/studio-protocol");
|
|
4
5
|
const react_1 = require("react");
|
|
5
6
|
const no_react_1 = require("remotion/no-react");
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const isAssetUploadDragEvent = (event) => {
|
|
8
|
+
var _a;
|
|
9
|
+
return (Array.from(event.dataTransfer.types).includes('Files') ||
|
|
10
|
+
((_a = studio_protocol_1.StudioProtocolInternals.getDragPreviewMetadata(event.dataTransfer.types)) === null || _a === void 0 ? void 0 : _a.type) === 'render-output');
|
|
8
11
|
};
|
|
9
|
-
exports.
|
|
12
|
+
exports.isAssetUploadDragEvent = isAssetUploadDragEvent;
|
|
13
|
+
const getRenderOutputDragData = (dataTransfer) => {
|
|
14
|
+
const parsed = studio_protocol_1.StudioProtocolInternals.parseDragData(dataTransfer);
|
|
15
|
+
return (parsed === null || parsed === void 0 ? void 0 : parsed.type) === 'render-output' ? parsed.data : null;
|
|
16
|
+
};
|
|
17
|
+
exports.getRenderOutputDragData = getRenderOutputDragData;
|
|
10
18
|
function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation, }) {
|
|
11
19
|
const dragDepthRef = (0, react_1.useRef)(0);
|
|
12
20
|
const combinedParents = (0, react_1.useMemo)(() => {
|
|
@@ -16,7 +24,7 @@ function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation,
|
|
|
16
24
|
return dropLocation === combinedParents;
|
|
17
25
|
}, [combinedParents, dropLocation]);
|
|
18
26
|
const onDragEnter = (0, react_1.useCallback)((event) => {
|
|
19
|
-
if (!(0, exports.
|
|
27
|
+
if (!(0, exports.isAssetUploadDragEvent)(event)) {
|
|
20
28
|
return;
|
|
21
29
|
}
|
|
22
30
|
if (dragDepthRef.current === 0) {
|
|
@@ -27,7 +35,7 @@ function useAssetDragEvents({ name, parentFolder, dropLocation, setDropLocation,
|
|
|
27
35
|
dragDepthRef.current++;
|
|
28
36
|
}, [combinedParents, dragDepthRef, setDropLocation]);
|
|
29
37
|
const onDragLeave = (0, react_1.useCallback)((event) => {
|
|
30
|
-
if (!(0, exports.
|
|
38
|
+
if (!(0, exports.isAssetUploadDragEvent)(event)) {
|
|
31
39
|
return;
|
|
32
40
|
}
|
|
33
41
|
dragDepthRef.current--;
|
|
@@ -1045,7 +1045,7 @@ const itemToSearchResult = (item, setSelectedModal, prefixes) => {
|
|
|
1045
1045
|
if (item.subMenu) {
|
|
1046
1046
|
return item.subMenu.items
|
|
1047
1047
|
.map((subItem) => {
|
|
1048
|
-
if (subItem.type
|
|
1048
|
+
if (subItem.type !== 'item') {
|
|
1049
1049
|
return null;
|
|
1050
1050
|
}
|
|
1051
1051
|
return itemToSearchResult(subItem, setSelectedModal, [
|
|
@@ -1072,7 +1072,7 @@ const makeSearchResults = (actions, setSelectedModal) => {
|
|
|
1072
1072
|
const items = actions
|
|
1073
1073
|
.map((menu) => {
|
|
1074
1074
|
return menu.items.map((item) => {
|
|
1075
|
-
if (item.type
|
|
1075
|
+
if (item.type !== 'item') {
|
|
1076
1076
|
return null;
|
|
1077
1077
|
}
|
|
1078
1078
|
return itemToSearchResult(item, setSelectedModal, []);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { SequenceRegistrationControls } from 'remotion';
|
|
2
|
-
type RuntimeValueSelectorResult = string | number | boolean | bigint | symbol | null | undefined;
|
|
3
2
|
export declare const useRuntimeValues: (controls: SequenceRegistrationControls | null) => Readonly<Record<string, unknown>>;
|
|
4
3
|
export declare const useRuntimeValue: (controls: SequenceRegistrationControls | null, key: string) => unknown;
|
|
5
|
-
export declare const useRuntimeValueSelector: <T
|
|
4
|
+
export declare const useRuntimeValueSelector: <T>({ controls, selector, isEqual, }: {
|
|
6
5
|
controls: SequenceRegistrationControls | null;
|
|
7
6
|
selector: (values: Readonly<Record<string, unknown>>) => T;
|
|
8
7
|
isEqual?: ((first: T, second: T) => boolean) | undefined;
|
|
9
8
|
}) => T;
|
|
10
9
|
export declare const useRuntimeValueSnapshots: (controls: readonly SequenceRegistrationControls[]) => readonly Readonly<Record<string, unknown>>[];
|
|
11
|
-
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CubeIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const CubeIcon = ({ color, ...props }) => (jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", ...props, children: jsx_runtime_1.jsx("path", { fill: color, d: "M234.5 5.7c13.6-7.6 29.3-7.6 42.9 0l192 107.3c14.2 7.9 22.9 22.9 22.9 39.2v207.6c0 16.3-8.8 31.2-22.9 39.2l-192 107.3c-13.6 7.6-29.3 7.6-42.9 0l-192-107.3c-14.2-7.9-22.9-22.9-22.9-39.2V152.2c0-16.3 8.8-31.2 22.9-39.2l192-107.3zM256 50.4L82.2 147.5 256 244.7l173.8-97.2L256 50.4zm-192 137v172.4l168 93.9V281.3L64 187.4zm216 266.3l168-93.9V187.4l-168 93.9v172.4z" }) }));
|
|
6
|
+
exports.CubeIcon = CubeIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FinderIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const FinderIcon = ({ size }) => {
|
|
6
|
+
return (jsx_runtime_1.jsx("img", { alt: "", "aria-hidden": true, "data-file-manager-icon": "finder", draggable: false, src: "/api/app-icon/file-manager/finder.png", style: { flexShrink: 0, height: size, width: size } }));
|
|
7
|
+
};
|
|
8
|
+
exports.FinderIcon = FinderIcon;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TerminalIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../helpers/colors");
|
|
6
|
+
const apps_1 = require("./apps");
|
|
7
|
+
// Brand shapes adapted from Simple Icons (CC0 1.0):
|
|
8
|
+
// https://github.com/simple-icons/simple-icons/tree/34c22501f9ac9f22b12f825677ccbab1fb22e14b/icons
|
|
9
|
+
const iconStyle = (size) => ({
|
|
10
|
+
flexShrink: 0,
|
|
11
|
+
height: size,
|
|
12
|
+
width: size,
|
|
13
|
+
});
|
|
14
|
+
const simpleTerminalIcons = {
|
|
15
|
+
warp: {
|
|
16
|
+
color: '#01A4FF',
|
|
17
|
+
path: 'M12.035 2.723h9.253A2.712 2.712 0 0 1 24 5.435v10.529a2.712 2.712 0 0 1-2.712 2.713H8.047Zm-1.681 2.6L6.766 19.677h5.598l-.399 1.6H2.712A2.712 2.712 0 0 1 0 18.565V8.036a2.712 2.712 0 0 1 2.712-2.712Z',
|
|
18
|
+
},
|
|
19
|
+
wezterm: {
|
|
20
|
+
color: '#4E49EE',
|
|
21
|
+
path: 'M3.27 8.524c0-.623.62-1.007 2.123-1.007l-.5 2.757c-.931-.623-1.624-1.199-1.624-1.75zm4.008 6.807c0 .647-.644 1.079-2.123 1.15l.524-2.924c.931.624 1.6 1.175 1.6 1.774zm-2.625 5.992.454-2.708c3.603-.336 5.01-1.798 5.01-3.404 0-1.653-2.004-2.948-3.841-4.074l.668-3.548c.764.072 1.67.216 2.744.432l.31-2.469c-.81-.12-1.575-.168-2.29-.216L8.257 2.7l-2.363-.024-.453 2.684C1.838 5.648.43 7.158.43 8.764c0 1.63 2.004 2.876 3.841 3.954l-.668 3.716c-.859-.048-1.908-.192-3.125-.408L0 18.495c1.026.12 1.98.192 2.84.216l-.525 2.588zm15.553-1.894h2.673c.334-2.804.81-8.46 1.121-14.86h-2.553c-.071 1.51-.334 10.498-.43 11.241h-.071c-.644-2.42-1.169-4.386-1.813-6.782h-1.456c-.62 2.396-1.05 4.194-1.694 6.782h-.096c-.071-.743-.477-9.73-.525-11.24h-2.648c.31 6.399.763 12.055 1.097 14.86h2.625l1.838-7.12z',
|
|
22
|
+
},
|
|
23
|
+
alacritty: {
|
|
24
|
+
color: '#F46D01',
|
|
25
|
+
path: 'm10.065 0-8.57 21.269h3.595l6.91-16.244 6.91 16.244h3.594l-8.57-21.269zm1.935 9.935c-.76666 1.8547-1.5334 3.7094-2.298 5.565 1.475 4.54 1.475 4.54 2.298 8.5.823-3.96.823-3.96 2.297-8.5-.76637-1.8547-1.5315-3.7099-2.297-5.565z',
|
|
26
|
+
},
|
|
27
|
+
'gnome-terminal': {
|
|
28
|
+
color: colors_1.CURRENT_COLOR,
|
|
29
|
+
path: 'M1.846 0A1.841 1.841 0 000 1.846v18.463c0 1.022.823 1.845 1.846 1.845h20.308A1.841 1.841 0 0024 20.31V1.846A1.841 1.841 0 0022.154 0H1.846zm0 .924h20.308c.512 0 .922.41.922.922v18.463c0 .511-.41.921-.922.921H1.846a.919.919 0 01-.922-.921V1.846c0-.512.41-.922.922-.922zm0 .922v18.463h20.308V1.846H1.846zm1.845 2.14l3.235 1.758v.836L3.69 8.477V7.385l2.243-1.207v-.033L3.69 5.076v-1.09zM7.846 9.23h3.693v.924H7.846V9.23zM0 21.736v.418C0 23.177.823 24 1.846 24h20.308A1.841 1.841 0 0024 22.154v-.418a2.334 2.334 0 01-1.846.918H1.846A2.334 2.334 0 010 21.736Z',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
const TerminalIcon = ({ terminalId, size }) => {
|
|
33
|
+
const hasArtwork = terminalId === 'terminal' ||
|
|
34
|
+
terminalId === 'iterm2' ||
|
|
35
|
+
terminalId === 'ghostty' ||
|
|
36
|
+
terminalId === 'windows-terminal';
|
|
37
|
+
if (hasArtwork) {
|
|
38
|
+
return (jsx_runtime_1.jsx("img", { alt: "", "aria-hidden": true, "data-terminal-icon": terminalId, draggable: false, src: `/api/app-icon/terminal/${terminalId}.png`, style: iconStyle(size) }));
|
|
39
|
+
}
|
|
40
|
+
const icon = simpleTerminalIcons[terminalId];
|
|
41
|
+
if (!icon) {
|
|
42
|
+
return (jsx_runtime_1.jsx(apps_1.AppsIcon, { "aria-hidden": true, "data-terminal-icon": terminalId, height: size, width: size }));
|
|
43
|
+
}
|
|
44
|
+
return (jsx_runtime_1.jsx("svg", { "aria-hidden": true, "data-terminal-icon": terminalId, style: iconStyle(size), viewBox: "0 0 24 24", children: jsx_runtime_1.jsx("path", { d: icon.path, fill: icon.color }) }));
|
|
45
|
+
};
|
|
46
|
+
exports.TerminalIcon = TerminalIcon;
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,21 @@ export { watchPublicFolder } from './api/watch-public-folder';
|
|
|
16
16
|
export { watchStaticFile } from './api/watch-static-file';
|
|
17
17
|
export { writeStaticFile } from './api/write-static-file';
|
|
18
18
|
export declare const StudioInternals: {
|
|
19
|
+
CodingAgentIcon: import("react").FC<{
|
|
20
|
+
readonly codingAgentId: "claude-code" | "codex" | "copilot" | "cursor" | null;
|
|
21
|
+
readonly size: number;
|
|
22
|
+
}>;
|
|
23
|
+
EditorIcon: import("react").FC<{
|
|
24
|
+
readonly editorId: import("@remotion/studio-shared").EditorPickerId | null;
|
|
25
|
+
readonly size: number | null;
|
|
26
|
+
}>;
|
|
27
|
+
FinderIcon: import("react").FC<{
|
|
28
|
+
readonly size: number;
|
|
29
|
+
}>;
|
|
30
|
+
TerminalIcon: import("react").FC<{
|
|
31
|
+
readonly terminalId: import("@remotion/studio-shared").TerminalId;
|
|
32
|
+
readonly size: number;
|
|
33
|
+
}>;
|
|
19
34
|
createComposition: <Schema extends import("remotion").AnyZodObject, Props extends Record<string, unknown>>({ ...other }: import("remotion").CompositionProps<Schema, Props>) => () => import("react/jsx-runtime").JSX.Element;
|
|
20
35
|
createStill: <Schema extends import("remotion").AnyZodObject, Props extends Record<string, unknown>>({ ...other }: import("remotion").StillProps<Schema, Props>) => () => import("react/jsx-runtime").JSX.Element;
|
|
21
36
|
};
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StudioInternals = exports.writeStaticFile = exports.watchStaticFile = exports.watchPublicFolder = exports.visualControl = exports.updateDefaultProps = exports.toggle = exports.seek = exports.saveDefaultProps = exports.restartStudio = exports.reevaluateComposition = exports.play = exports.pause = exports.goToComposition = exports.getStaticFiles = exports.focusDefaultPropsPath = exports.deleteStaticFile = void 0;
|
|
4
4
|
const create_composition_1 = require("./api/create-composition");
|
|
5
|
+
const CodingAgentIcon_1 = require("./components/CodingAgentIcon");
|
|
6
|
+
const editor_1 = require("./icons/editor");
|
|
7
|
+
const finder_1 = require("./icons/finder");
|
|
8
|
+
const terminal_1 = require("./icons/terminal");
|
|
5
9
|
const delete_static_file_1 = require("./api/delete-static-file");
|
|
6
10
|
Object.defineProperty(exports, "deleteStaticFile", { enumerable: true, get: function () { return delete_static_file_1.deleteStaticFile; } });
|
|
7
11
|
const focus_default_props_path_1 = require("./api/focus-default-props-path");
|
|
@@ -35,6 +39,10 @@ Object.defineProperty(exports, "watchStaticFile", { enumerable: true, get: funct
|
|
|
35
39
|
const write_static_file_1 = require("./api/write-static-file");
|
|
36
40
|
Object.defineProperty(exports, "writeStaticFile", { enumerable: true, get: function () { return write_static_file_1.writeStaticFile; } });
|
|
37
41
|
exports.StudioInternals = {
|
|
42
|
+
CodingAgentIcon: CodingAgentIcon_1.CodingAgentIcon,
|
|
43
|
+
EditorIcon: editor_1.EditorIcon,
|
|
44
|
+
FinderIcon: finder_1.FinderIcon,
|
|
45
|
+
TerminalIcon: terminal_1.TerminalIcon,
|
|
38
46
|
createComposition: create_composition_1.createComposition,
|
|
39
47
|
createStill: create_composition_1.createStill,
|
|
40
48
|
};
|
|
@@ -2,13 +2,19 @@ import type { Dispatch, SetStateAction } from 'react';
|
|
|
2
2
|
import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
|
|
3
3
|
export type TimelineSequenceHover = {
|
|
4
4
|
readonly key: string;
|
|
5
|
+
readonly nodePathKey: string;
|
|
5
6
|
readonly source: 'canvas' | 'timeline';
|
|
6
7
|
};
|
|
7
|
-
type
|
|
8
|
-
readonly
|
|
8
|
+
type TimelineSequenceHoverStore = {
|
|
9
|
+
readonly getSnapshot: () => TimelineSequenceHover | null;
|
|
10
|
+
readonly subscribe: (listener: () => void) => () => void;
|
|
9
11
|
readonly setHoveredSequence: Dispatch<SetStateAction<TimelineSequenceHover | null>>;
|
|
10
12
|
};
|
|
11
|
-
export declare const
|
|
13
|
+
export declare const createTimelineSequenceHoverStore: () => TimelineSequenceHoverStore;
|
|
14
|
+
export declare const TimelineSequenceHoverContext: import("react").Context<TimelineSequenceHoverStore>;
|
|
15
|
+
export declare const useTimelineSequenceHoverState: () => TimelineSequenceHover | null;
|
|
16
|
+
export declare const useSetTimelineSequenceHover: () => Dispatch<SetStateAction<TimelineSequenceHover | null>>;
|
|
17
|
+
export declare const useIsTimelineSequenceHovered: (nodePathKey: string | null) => boolean;
|
|
12
18
|
export declare const useTimelineSequenceHover: (nodePathInfo: SequenceNodePathInfo | null) => {
|
|
13
19
|
hovered: boolean;
|
|
14
20
|
onPointerEnter: () => void;
|