@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.
Files changed (211) hide show
  1. package/dist/FastRefreshProvider.js +13 -9
  2. package/dist/api/copy-render-output-to-asset.d.ts +4 -0
  3. package/dist/api/copy-render-output-to-asset.js +11 -0
  4. package/dist/components/AssetSelector.js +19 -4
  5. package/dist/components/AssetSelectorItem.js +2 -2
  6. package/dist/components/CodingAgentIcon.d.ts +6 -0
  7. package/dist/components/CodingAgentIcon.js +12 -0
  8. package/dist/components/ConfigureDefaultEditorModal.d.ts +1 -3
  9. package/dist/components/ConfigureDefaultEditorModal.js +67 -77
  10. package/dist/components/ConfigureLicenseModal.d.ts +1 -4
  11. package/dist/components/ConfigureLicenseModal.js +89 -81
  12. package/dist/components/ContextMenu.d.ts +1 -0
  13. package/dist/components/ContextMenu.js +42 -13
  14. package/dist/components/EditorContent.js +4 -3
  15. package/dist/components/EditorContexts.js +6 -5
  16. package/dist/components/ExpandedTracksProvider.js +10 -53
  17. package/dist/components/InlineAction.d.ts +2 -1
  18. package/dist/components/InlineAction.js +3 -3
  19. package/dist/components/InspectorLocationCopy.js +8 -8
  20. package/dist/components/InspectorOpenInEditor.d.ts +2 -0
  21. package/dist/components/InspectorOpenInEditor.js +81 -50
  22. package/dist/components/InspectorPanel/AlignmentControls.js +2 -2
  23. package/dist/components/InspectorPanel/CompositionInspector.js +3 -1
  24. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -0
  25. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +22 -4
  26. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
  27. package/dist/components/InspectorPanel/styles.js +1 -1
  28. package/dist/components/InspectorSequenceSection.js +36 -4
  29. package/dist/components/Menu/MenuSectionHeader.d.ts +4 -0
  30. package/dist/components/Menu/MenuSectionHeader.js +20 -0
  31. package/dist/components/Menu/SubMenu.js +13 -2
  32. package/dist/components/Menu/menu-tree-context.d.ts +3 -0
  33. package/dist/components/Menu/menu-tree-context.js +13 -0
  34. package/dist/components/MenuBuildIndicator.js +1 -1
  35. package/dist/components/NewComposition/ComboBox.d.ts +6 -1
  36. package/dist/components/NewComposition/MenuContent.js +27 -19
  37. package/dist/components/NewComposition/menu-typeahead.js +2 -2
  38. package/dist/components/PlayPause.d.ts +1 -1
  39. package/dist/components/PlayPause.js +61 -12
  40. package/dist/components/Preview.js +29 -4
  41. package/dist/components/RenderButton.js +16 -12
  42. package/dist/components/RenderModal/GuiRenderStatus.js +23 -6
  43. package/dist/components/RenderModal/InfoBubble.d.ts +1 -0
  44. package/dist/components/RenderModal/InfoBubble.js +6 -4
  45. package/dist/components/RenderModal/InfoTooltip.d.ts +1 -0
  46. package/dist/components/RenderModal/InfoTooltip.js +12 -12
  47. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +5 -0
  48. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +16 -3
  49. package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +1 -1
  50. package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +2 -0
  51. package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +3 -2
  52. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
  53. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  54. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +2 -1
  55. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -0
  56. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +3 -3
  57. package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +1 -1
  58. package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
  59. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
  60. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +1 -1
  61. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +8 -3
  62. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
  63. package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
  64. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +2 -2
  65. package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
  66. package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +1 -1
  67. package/dist/components/RenderModal/SchemaEditor/zod-schema-type.d.ts +1 -0
  68. package/dist/components/RenderModal/SchemaEditor/zod-schema-type.js +12 -1
  69. package/dist/components/RenderModal/ServerRenderModal.js +4 -0
  70. package/dist/components/RenderQueue/RenderQueueItem.js +8 -2
  71. package/dist/components/RenderQueue/actions.d.ts +4 -2
  72. package/dist/components/RenderQueue/actions.js +4 -2
  73. package/dist/components/RenderQueue/index.js +3 -4
  74. package/dist/components/RenderQueue/use-render-output-file-drag.d.ts +8 -0
  75. package/dist/components/RenderQueue/use-render-output-file-drag.js +121 -0
  76. package/dist/components/SegmentedControl.js +0 -1
  77. package/dist/components/SelectedOutlineCanvasRotation.d.ts +9 -0
  78. package/dist/components/SelectedOutlineCanvasRotation.js +237 -0
  79. package/dist/components/SelectedOutlineElement.d.ts +16 -18
  80. package/dist/components/SelectedOutlineElement.js +144 -931
  81. package/dist/components/SelectedOutlineKeyboardControls.d.ts +7 -0
  82. package/dist/components/SelectedOutlineKeyboardControls.js +261 -0
  83. package/dist/components/SelectedOutlineOverlay.d.ts +7 -14
  84. package/dist/components/SelectedOutlineOverlay.js +378 -864
  85. package/dist/components/SelectedOutlinePolygon.d.ts +26 -0
  86. package/dist/components/SelectedOutlinePolygon.js +360 -0
  87. package/dist/components/SelectedOutlineRenderer.d.ts +19 -0
  88. package/dist/components/SelectedOutlineRenderer.js +225 -0
  89. package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +17 -0
  90. package/dist/components/SelectedOutlineRotationCornerHandle.js +271 -0
  91. package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +17 -0
  92. package/dist/components/SelectedOutlineScaleEdgeLine.js +215 -0
  93. package/dist/components/SelectedOutlineSnapIndicators.d.ts +9 -0
  94. package/dist/components/SelectedOutlineSnapIndicators.js +29 -0
  95. package/dist/components/SelectedOutlineTransformOriginHandle.d.ts +9 -0
  96. package/dist/components/SelectedOutlineTransformOriginHandle.js +312 -0
  97. package/dist/components/SelectedOutlineUvControls.d.ts +3 -9
  98. package/dist/components/SelectedOutlineUvControls.js +57 -12
  99. package/dist/components/SequencePropsSubscriptionProvider.js +8 -0
  100. package/dist/components/SettingsContext.d.ts +15 -0
  101. package/dist/components/SettingsContext.js +116 -0
  102. package/dist/components/SettingsModal.js +10 -4
  103. package/dist/components/SettingsModalFooter.d.ts +1 -3
  104. package/dist/components/SettingsModalFooter.js +4 -6
  105. package/dist/components/ShowOutlinesProvider.js +2 -3
  106. package/dist/components/Timeline/EasingEditorModal.js +66 -22
  107. package/dist/components/Timeline/SequencePropsObserver.js +97 -1
  108. package/dist/components/Timeline/SubscribeToNodePaths.js +4 -2
  109. package/dist/components/Timeline/Timeline.js +22 -5
  110. package/dist/components/Timeline/TimelineDuplicateCount.d.ts +4 -0
  111. package/dist/components/Timeline/TimelineDuplicateCount.js +28 -0
  112. package/dist/components/Timeline/TimelineEffectItem.js +1 -4
  113. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +3 -23
  114. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +4 -2
  115. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +11 -1
  116. package/dist/components/Timeline/TimelineFieldRowContent.js +10 -3
  117. package/dist/components/Timeline/TimelineRotationField.js +84 -12
  118. package/dist/components/Timeline/TimelineScaleField.js +58 -4
  119. package/dist/components/Timeline/TimelineSelection.d.ts +4 -0
  120. package/dist/components/Timeline/TimelineSelection.js +45 -2
  121. package/dist/components/Timeline/TimelineSequence.js +28 -25
  122. package/dist/components/Timeline/TimelineSequenceItem.js +91 -28
  123. package/dist/components/Timeline/TimelineSequencePropItem.js +5 -2
  124. package/dist/components/Timeline/TimelineTrack.js +2 -1
  125. package/dist/components/Timeline/TimelineTransformOriginField.js +78 -4
  126. package/dist/components/Timeline/TimelineTranslateField.js +55 -15
  127. package/dist/components/Timeline/Transform3DModeContext.d.ts +1 -0
  128. package/dist/components/Timeline/Transform3DModeContext.js +5 -0
  129. package/dist/components/Timeline/delete-selected-timeline-item.js +0 -6
  130. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -3
  131. package/dist/components/Timeline/get-sequence-context-menu-items.js +69 -57
  132. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -1
  133. package/dist/components/Timeline/sequence-props-subscription-store.js +5 -2
  134. package/dist/components/Timeline/timeline-field-display-utils.js +2 -2
  135. package/dist/components/Timeline/timeline-field-row-layout.d.ts +6 -0
  136. package/dist/components/Timeline/timeline-field-row-layout.js +16 -1
  137. package/dist/components/Timeline/timeline-rotation-utils.d.ts +16 -0
  138. package/dist/components/Timeline/timeline-rotation-utils.js +145 -4
  139. package/dist/components/Timeline/timeline-translate-utils.d.ts +3 -2
  140. package/dist/components/Timeline/timeline-translate-utils.js +8 -4
  141. package/dist/components/Timeline/transform-3d-mode.d.ts +6 -0
  142. package/dist/components/Timeline/transform-3d-mode.js +36 -0
  143. package/dist/components/Timeline/transform-origin-utils.d.ts +4 -0
  144. package/dist/components/Timeline/transform-origin-utils.js +12 -6
  145. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +36 -4
  146. package/dist/components/Timeline/{use-open-sequence-in-editor.d.ts → use-open-sequence-in-apps.d.ts} +4 -1
  147. package/dist/components/Timeline/{use-open-sequence-in-editor.js → use-open-sequence-in-apps.js} +21 -5
  148. package/dist/components/Timeline/use-resolved-stack-react-to-change.d.ts +5 -1
  149. package/dist/components/Timeline/use-resolved-stack-react-to-change.js +45 -9
  150. package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -1
  151. package/dist/components/Timeline/use-sequence-props-subscription.js +7 -2
  152. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +4 -0
  153. package/dist/components/Timeline/use-timeline-expanded-tree.js +45 -1
  154. package/dist/components/call-api.js +2 -0
  155. package/dist/components/canvas-rotation-cursor.d.ts +1 -0
  156. package/dist/components/canvas-rotation-cursor.js +14 -0
  157. package/dist/components/get-open-in-menu-items.d.ts +17 -0
  158. package/dist/components/get-open-in-menu-items.js +144 -0
  159. package/dist/components/selected-outline-drag.d.ts +11 -5
  160. package/dist/components/selected-outline-drag.js +80 -42
  161. package/dist/components/selected-outline-measurement.d.ts +7 -2
  162. package/dist/components/selected-outline-measurement.js +28 -1
  163. package/dist/components/selected-outline-order.d.ts +12 -0
  164. package/dist/components/selected-outline-order.js +251 -0
  165. package/dist/components/selected-outline-types.d.ts +15 -10
  166. package/dist/components/svg-point-to-client-point.d.ts +2 -0
  167. package/dist/components/svg-point-to-client-point.js +10 -0
  168. package/dist/components/use-auto-save-config.d.ts +8 -0
  169. package/dist/components/use-auto-save-config.js +74 -0
  170. package/dist/components/use-default-editor-info.d.ts +1 -0
  171. package/dist/components/use-default-editor-info.js +10 -30
  172. package/dist/esm/{chunk-jefhcs5z.js → chunk-fgedsvhb.js} +1 -2
  173. package/dist/esm/{chunk-b49ec3nz.js → chunk-zpn4m49r.js} +12924 -10139
  174. package/dist/esm/index.mjs +357 -2
  175. package/dist/esm/internals.mjs +12923 -10138
  176. package/dist/esm/previewEntry.mjs +12771 -9986
  177. package/dist/esm/renderEntry.mjs +2 -2
  178. package/dist/helpers/are-sequence-node-path-infos-equal.d.ts +2 -0
  179. package/dist/helpers/are-sequence-node-path-infos-equal.js +27 -0
  180. package/dist/helpers/calculate-timeline.js +3 -3
  181. package/dist/helpers/client-id.js +8 -1
  182. package/dist/helpers/format-file-location.d.ts +1 -1
  183. package/dist/helpers/format-file-location.js +3 -3
  184. package/dist/helpers/get-box-quads-polyfill-internals.js +10 -2
  185. package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
  186. package/dist/helpers/open-in-editor.d.ts +4 -1
  187. package/dist/helpers/open-in-editor.js +9 -1
  188. package/dist/helpers/preview-server-events.js +4 -0
  189. package/dist/helpers/sequence-node-path-mutations.d.ts +4 -0
  190. package/dist/helpers/sequence-node-path-mutations.js +31 -0
  191. package/dist/helpers/studio-runtime-config.js +3 -0
  192. package/dist/helpers/timeline-node-path-key.d.ts +2 -0
  193. package/dist/helpers/timeline-node-path-key.js +3 -1
  194. package/dist/helpers/use-asset-drag-events.d.ts +2 -1
  195. package/dist/helpers/use-asset-drag-events.js +14 -6
  196. package/dist/helpers/use-menu-structure.js +2 -2
  197. package/dist/helpers/use-runtime-values.d.ts +1 -3
  198. package/dist/icons/cube.d.ts +4 -0
  199. package/dist/icons/cube.js +6 -0
  200. package/dist/icons/finder.d.ts +4 -0
  201. package/dist/icons/finder.js +8 -0
  202. package/dist/icons/terminal.d.ts +6 -0
  203. package/dist/icons/terminal.js +46 -0
  204. package/dist/index.d.ts +15 -0
  205. package/dist/index.js +8 -0
  206. package/dist/state/timeline-sequence-hover.d.ts +9 -3
  207. package/dist/state/timeline-sequence-hover.js +63 -12
  208. package/dist/state/transform-3d-mode.d.ts +10 -0
  209. package/dist/state/transform-3d-mode.js +27 -0
  210. package/dist/state/z-index.js +5 -8
  211. package/package.json +12 -12
@@ -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 isSupportedZ = (token) => {
111
+ const parseTransformOriginZ = (token) => {
112
112
  if (token.includes('%')) {
113
- return false;
113
+ return null;
114
114
  }
115
- return cssLength.test(token);
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 && !isSupportedZ(z)) {
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 };
@@ -12,6 +12,35 @@ const get_node_keyframes_1 = require("./get-node-keyframes");
12
12
  const imperative_state_1 = require("./imperative-state");
13
13
  const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
14
14
  const TimelineSelection_1 = require("./TimelineSelection");
15
+ const areTimelineTreeLayoutsEqual = (first, second) => {
16
+ if (first.length !== second.length) {
17
+ return false;
18
+ }
19
+ return first.every((firstNode, index) => {
20
+ const secondNode = second[index];
21
+ if (firstNode.kind !== secondNode.kind ||
22
+ (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(firstNode.nodePathInfo) !==
23
+ (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(secondNode.nodePathInfo)) {
24
+ return false;
25
+ }
26
+ if (firstNode.kind === 'group' && secondNode.kind === 'group') {
27
+ return areTimelineTreeLayoutsEqual(firstNode.children, secondNode.children);
28
+ }
29
+ if (firstNode.kind !== 'field' || secondNode.kind !== 'field') {
30
+ return false;
31
+ }
32
+ if (firstNode.field === null || secondNode.field === null) {
33
+ return firstNode.field === secondNode.field;
34
+ }
35
+ return (firstNode.field.kind === secondNode.field.kind &&
36
+ firstNode.field.key === secondNode.field.key &&
37
+ firstNode.field.typeName === secondNode.field.typeName &&
38
+ firstNode.field.rowHeight === secondNode.field.rowHeight &&
39
+ (firstNode.field.kind !== 'effect-field' ||
40
+ (secondNode.field.kind === 'effect-field' &&
41
+ firstNode.field.effectIndex === secondNode.field.effectIndex)));
42
+ });
43
+ };
15
44
  const getNodeCanEditEasing = ({ node, nodePath, propStatuses, }) => {
16
45
  var _a;
17
46
  if (node.kind !== 'field' || node.field === null) {
@@ -38,8 +67,7 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
38
67
  const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
39
68
  const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
40
69
  const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
41
- const runtimeValues = (0, use_runtime_values_1.useRuntimeValues)(sequence.controls);
42
- const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
70
+ const selectTree = (0, react_1.useCallback)((runtimeValues) => (0, timeline_layout_1.buildTimelineTree)({
43
71
  sequence,
44
72
  nodePathInfo,
45
73
  getDragOverrides,
@@ -49,13 +77,17 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
49
77
  includeSourceControls: false,
50
78
  runtimeValues,
51
79
  }), [
80
+ sequence,
52
81
  propStatuses,
53
82
  getDragOverrides,
54
83
  getEffectDragOverrides,
55
84
  nodePathInfo,
56
- sequence,
57
- runtimeValues,
58
85
  ]);
86
+ const tree = (0, use_runtime_values_1.useRuntimeValueSelector)({
87
+ controls: sequence.controls,
88
+ selector: selectTree,
89
+ isEqual: areTimelineTreeLayoutsEqual,
90
+ });
59
91
  const selectedRowKeys = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.getSelectedTimelineExpandedRowKeys)(selectedItems), [selectedItems]);
60
92
  const filteredTree = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
61
93
  nodes: tree,
@@ -1,8 +1,11 @@
1
1
  import type { EditorPickerId } from '@remotion/studio-shared';
2
2
  import type { TSequence } from 'remotion';
3
- export declare const useOpenSequenceInEditor: (sequence: TSequence) => {
3
+ export declare const useOpenSequenceInApps: (sequence: TSequence) => {
4
4
  canOpenInEditor: boolean;
5
+ canConfigureApps: boolean;
6
+ codingAgentInfo: import("@remotion/studio-shared").GetDefaultCodingAgentInfoResponse | null;
5
7
  editorInfo: import("@remotion/studio-shared").GetDefaultEditorInfoResponse | null;
8
+ openInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", codingAgentName: string, contextForAgents: string | null) => Promise<void>;
6
9
  openInEditor: (editorId: EditorPickerId | null) => Promise<void>;
7
10
  originalLocation: import("remotion").ResolvedStackLocation | null;
8
11
  };
@@ -1,17 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useOpenSequenceInEditor = void 0;
3
+ exports.useOpenSequenceInApps = void 0;
4
4
  const react_1 = require("react");
5
5
  const client_id_1 = require("../../helpers/client-id");
6
6
  const open_in_editor_1 = require("../../helpers/open-in-editor");
7
7
  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
- const useOpenSequenceInEditor = (sequence) => {
10
+ const useOpenSequenceInApps = (sequence) => {
11
11
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
12
12
  const previewConnected = previewServerState.type === 'connected';
13
- const originalLocation = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(sequence.getStack);
14
- const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)((0, use_default_editor_info_1.canUseEditorPicker)(previewConnected));
13
+ const { resolvedLocation: originalLocation } = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(sequence.getStack);
14
+ const editorPickerAvailable = (0, use_default_editor_info_1.canUseEditorPicker)(previewConnected);
15
+ const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)(editorPickerAvailable);
16
+ const codingAgentInfo = (0, use_default_editor_info_1.useDefaultCodingAgentInfo)(editorPickerAvailable);
15
17
  const canOpenInEditor = (0, react_1.useMemo)(() => Boolean(window.remotion_editorName && previewConnected && originalLocation), [originalLocation, previewConnected]);
16
18
  const openInEditor = (0, react_1.useCallback)(async (editorId) => {
17
19
  if (!canOpenInEditor || !originalLocation) {
@@ -24,11 +26,25 @@ const useOpenSequenceInEditor = (sequence) => {
24
26
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
25
27
  }
26
28
  }, [canOpenInEditor, originalLocation]);
29
+ const openInCodingAgent = (0, react_1.useCallback)(async (codingAgentId, codingAgentName, contextForAgents) => {
30
+ try {
31
+ const response = await (0, open_in_editor_1.openInCodingAgent)(codingAgentId, contextForAgents);
32
+ if (!response.success) {
33
+ (0, NotificationCenter_1.showNotification)(`Could not open ${codingAgentName}`, 2000);
34
+ }
35
+ }
36
+ catch (err) {
37
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
38
+ }
39
+ }, []);
27
40
  return {
28
41
  canOpenInEditor,
42
+ canConfigureApps: editorPickerAvailable,
43
+ codingAgentInfo,
29
44
  editorInfo,
45
+ openInCodingAgent,
30
46
  openInEditor,
31
47
  originalLocation,
32
48
  };
33
49
  };
34
- exports.useOpenSequenceInEditor = useOpenSequenceInEditor;
50
+ exports.useOpenSequenceInApps = useOpenSequenceInApps;
@@ -1,2 +1,6 @@
1
1
  import type { ResolvedStackLocation } from 'remotion';
2
- export declare const useResolveStackAndReactToChange: (getStack: () => string | null) => ResolvedStackLocation | null;
2
+ export declare const useResolveStackAndReactToChange: (getStack: () => string | null) => {
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 matchesLostNodePathEvent = (event, location) => {
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;
@@ -18,31 +19,62 @@ const matchesLostNodePathEvent = (event, location) => {
18
19
  };
19
20
  const useResolveStackAndReactToChange = (getStack) => {
20
21
  const { subscribeToEvent } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
21
- const [stack, setStack] = (0, react_1.useState)(() => getStack());
22
- const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(stack);
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 resolvedLocation = (0, use_resolved_stack_1.hasResolvedStack)(stackState.stack)
29
+ ? resolvedLocationFromStack
30
+ : null;
23
31
  const resolvedLocationRef = (0, react_1.useRef)(resolvedLocation);
24
32
  resolvedLocationRef.current = resolvedLocation;
33
+ const getStackRef = (0, react_1.useRef)(getStack);
34
+ getStackRef.current = getStack;
35
+ (0, react_1.useEffect)(() => {
36
+ if (fastRefreshes === 0) {
37
+ return;
38
+ }
39
+ const newStack = getStackRef.current();
40
+ setStackState((current) => {
41
+ if (newStack === current.stack) {
42
+ return current;
43
+ }
44
+ return {
45
+ stack: newStack,
46
+ // Resolve from the post-refresh source location. The previous node path
47
+ // may now belong to a sibling after a structural edit.
48
+ preferMappedNodePath: false,
49
+ };
50
+ });
51
+ }, [fastRefreshes]);
25
52
  (0, react_1.useEffect)(() => {
26
53
  let interval = null;
27
54
  const handleEvent = (event) => {
28
55
  if (event.type !== 'lost-node-path') {
29
56
  return;
30
57
  }
31
- if (!matchesLostNodePathEvent(event, resolvedLocationRef.current)) {
58
+ if (!matchesSourceLocation(event, resolvedLocationRef.current)) {
32
59
  return;
33
60
  }
34
- const initialStack = getStack();
61
+ const initialStack = getStackRef.current();
35
62
  if (interval !== null) {
36
63
  clearInterval(interval);
37
64
  }
38
65
  interval = setInterval(() => {
39
- const newStack = getStack();
66
+ const newStack = getStackRef.current();
40
67
  if (newStack !== initialStack) {
41
68
  if (interval !== null) {
42
69
  clearInterval(interval);
43
70
  interval = null;
44
71
  }
45
- setStack(newStack);
72
+ setStackState({
73
+ stack: newStack,
74
+ // The old override ID may now belong to a sibling. Resolve the
75
+ // node path from the post-refresh source location instead.
76
+ preferMappedNodePath: false,
77
+ });
46
78
  }
47
79
  }, 10);
48
80
  };
@@ -53,7 +85,11 @@ const useResolveStackAndReactToChange = (getStack) => {
53
85
  clearInterval(interval);
54
86
  }
55
87
  };
56
- }, [subscribeToEvent, getStack]);
57
- return resolvedLocation;
88
+ }, [subscribeToEvent]);
89
+ return {
90
+ preferMappedNodePath: stackState.preferMappedNodePath,
91
+ resolvedLocation,
92
+ stack: stackState.stack,
93
+ };
58
94
  };
59
95
  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: (_b = nodePathAtResubscribe === null || nodePathAtResubscribe === void 0 ? void 0 : nodePathAtResubscribe.nodePath) !== null && _b !== void 0 ? _b : null,
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
  };
@@ -1,5 +1,9 @@
1
1
  import { type TSequence } from 'remotion';
2
2
  import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
3
+ export declare const useTimelineSequenceHasExpandableContent: ({ sequence, nodePathInfo, }: {
4
+ readonly sequence: TSequence;
5
+ readonly nodePathInfo: SequenceNodePathInfo;
6
+ }) => boolean;
3
7
  export declare const useTimelineExpandedTree: ({ sequence, nodePathInfo, includeTextContent, includeSourceControls, }: {
4
8
  readonly sequence: TSequence;
5
9
  readonly nodePathInfo: SequenceNodePathInfo;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useTimelineExpandedTree = void 0;
3
+ exports.useTimelineExpandedTree = exports.useTimelineSequenceHasExpandableContent = void 0;
4
4
  const react_1 = require("react");
5
5
  const remotion_1 = require("remotion");
6
6
  const timeline_layout_1 = require("../../helpers/timeline-layout");
@@ -9,6 +9,50 @@ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
9
9
  const get_node_keyframes_1 = require("./get-node-keyframes");
10
10
  const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
11
11
  const TimelineSelection_1 = require("./TimelineSelection");
12
+ const useTimelineSequenceHasExpandableContent = ({ sequence, nodePathInfo, }) => {
13
+ const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
14
+ const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
15
+ const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
16
+ const selectedRowKeys = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.getSelectedTimelineExpandedRowKeys)(selectedItems), [selectedItems]);
17
+ const selectHasExpandableContent = (0, react_1.useCallback)((runtimeValues) => {
18
+ const tree = (0, timeline_layout_1.buildTimelineTree)({
19
+ sequence,
20
+ nodePathInfo,
21
+ getDragOverrides,
22
+ getEffectDragOverrides,
23
+ propStatuses: visualModePropStatuses,
24
+ includeTextContent: false,
25
+ includeSourceControls: false,
26
+ runtimeValues,
27
+ });
28
+ return ((0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
29
+ nodes: tree,
30
+ shouldShowNode: (node) => (0, timeline_expanded_filter_1.isTimelineExpandedNodeSelected)({
31
+ nodePathInfo: node.nodePathInfo,
32
+ selectedRowKeys,
33
+ }) ||
34
+ (0, get_node_keyframes_1.getNodeHasKeyframes)({
35
+ node,
36
+ nodePath: nodePathInfo.sequenceSubscriptionKey,
37
+ propStatuses: visualModePropStatuses,
38
+ getDragOverrides,
39
+ getEffectDragOverrides,
40
+ }),
41
+ }).length > 0);
42
+ }, [
43
+ getDragOverrides,
44
+ getEffectDragOverrides,
45
+ nodePathInfo,
46
+ selectedRowKeys,
47
+ sequence,
48
+ visualModePropStatuses,
49
+ ]);
50
+ return (0, use_runtime_values_1.useRuntimeValueSelector)({
51
+ controls: sequence.controls,
52
+ selector: selectHasExpandableContent,
53
+ });
54
+ };
55
+ exports.useTimelineSequenceHasExpandableContent = useTimelineSequenceHasExpandableContent;
12
56
  const useTimelineExpandedTree = ({ sequence, nodePathInfo, includeTextContent, includeSourceControls, }) => {
13
57
  const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
14
58
  const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
@@ -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`;
@@ -0,0 +1,17 @@
1
+ import type { TerminalId } from '@remotion/studio-shared';
2
+ import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
3
+ import type { ComboboxValue } from './NewComposition/ComboBox';
4
+ export declare const getOpenInMenuItems: ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInTerminal, }: {
5
+ readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
6
+ readonly editorDisabled: boolean;
7
+ readonly editorInfo: GetDefaultEditorInfoResponse | null;
8
+ readonly excludeCodingAgentId: "claude-code" | "codex" | "copilot" | "cursor" | null;
9
+ readonly excludeEditorId: EditorPickerId | null;
10
+ readonly fileManagerDisabled: boolean;
11
+ readonly folder: boolean;
12
+ readonly onConfigureApps: () => void;
13
+ readonly onOpenInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", codingAgentName: string) => void;
14
+ readonly onOpenInEditor: (editorId: EditorPickerId) => void;
15
+ readonly onOpenInFileExplorer: () => void;
16
+ readonly onOpenInTerminal: ((terminalId: TerminalId) => void) | null;
17
+ }) => ComboboxValue[];
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getOpenInMenuItems = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
6
+ const editor_1 = require("../icons/editor");
7
+ const finder_1 = require("../icons/finder");
8
+ const terminal_1 = require("../icons/terminal");
9
+ const CodingAgentIcon_1 = require("./CodingAgentIcon");
10
+ const menuLabel = {
11
+ color: 'inherit',
12
+ fontFamily: 'sans-serif',
13
+ fontSize: 13,
14
+ lineHeight: '16px',
15
+ };
16
+ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInTerminal, }) => {
17
+ var _a, _b, _c;
18
+ const showFinder = window.remotion_fileSystemPlatform === 'darwin';
19
+ const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
20
+ const editors = ((_a = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _a !== void 0 ? _a : [])
21
+ .filter((editor) => editor.id !== excludeEditorId)
22
+ .map((editor) => ({
23
+ disabled: editorDisabled,
24
+ id: `open-in-${editor.id}`,
25
+ keyHint: null,
26
+ label: jsx_runtime_1.jsx("span", { style: menuLabel, children: editor.name }),
27
+ leftItem: jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: editor.id, size: 18 }),
28
+ onClick: () => {
29
+ if (!editorDisabled) {
30
+ onOpenInEditor(editor.id);
31
+ }
32
+ },
33
+ quickSwitcherLabel: null,
34
+ subMenu: null,
35
+ type: 'item',
36
+ value: editor.id,
37
+ }));
38
+ const codingAgents = ((_b = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _b !== void 0 ? _b : [])
39
+ .filter((codingAgent) => codingAgent.id !== excludeCodingAgentId)
40
+ .map((codingAgent) => ({
41
+ id: `open-in-coding-agent-${codingAgent.id}`,
42
+ keyHint: null,
43
+ label: jsx_runtime_1.jsx("span", { style: menuLabel, children: codingAgent.name }),
44
+ leftItem: jsx_runtime_1.jsx(CodingAgentIcon_1.CodingAgentIcon, { codingAgentId: codingAgent.id, size: 18 }),
45
+ onClick: () => onOpenInCodingAgent(codingAgent.id, codingAgent.nameWithType),
46
+ quickSwitcherLabel: null,
47
+ subMenu: null,
48
+ type: 'item',
49
+ value: `coding-agent-${codingAgent.id}`,
50
+ }));
51
+ const terminals = folder ? ((_c = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedTerminals) !== null && _c !== void 0 ? _c : []) : [];
52
+ const showSystemApps = showFinder || terminals.length > 0;
53
+ return [
54
+ ...(editors.length > 0
55
+ ? [
56
+ {
57
+ type: 'section-header',
58
+ id: 'editor-header',
59
+ label: 'Editor',
60
+ },
61
+ ...editors,
62
+ ]
63
+ : []),
64
+ ...(codingAgents.length > 0
65
+ ? [
66
+ {
67
+ type: 'section-header',
68
+ id: 'agent-header',
69
+ label: 'Agent',
70
+ },
71
+ ...codingAgents,
72
+ ]
73
+ : []),
74
+ ...(showSystemApps
75
+ ? [
76
+ ...(terminals.length > 0
77
+ ? [
78
+ {
79
+ type: 'section-header',
80
+ id: 'terminal-header',
81
+ label: 'Terminal',
82
+ },
83
+ ...terminals.map((terminal) => ({
84
+ id: `open-in-terminal-${terminal.id}`,
85
+ keyHint: null,
86
+ label: jsx_runtime_1.jsx("span", { style: menuLabel, children: terminal.name }),
87
+ leftItem: jsx_runtime_1.jsx(terminal_1.TerminalIcon, { terminalId: terminal.id, size: 18 }),
88
+ onClick: () => onOpenInTerminal === null || onOpenInTerminal === void 0 ? void 0 : onOpenInTerminal(terminal.id),
89
+ quickSwitcherLabel: null,
90
+ subMenu: null,
91
+ type: 'item',
92
+ value: `terminal-${terminal.id}`,
93
+ })),
94
+ ]
95
+ : []),
96
+ ...(showFinder
97
+ ? [
98
+ ...(editors.length > 0 ||
99
+ codingAgents.length > 0 ||
100
+ terminals.length > 0
101
+ ? [
102
+ {
103
+ type: 'divider',
104
+ id: 'open-in-file-explorer-divider',
105
+ },
106
+ ]
107
+ : []),
108
+ {
109
+ disabled: fileManagerDisabled,
110
+ id: 'open-in-file-explorer',
111
+ keyHint: null,
112
+ label: jsx_runtime_1.jsx("span", { style: menuLabel, children: fileManagerName }),
113
+ leftItem: jsx_runtime_1.jsx(finder_1.FinderIcon, { size: 18 }),
114
+ onClick: () => {
115
+ if (!fileManagerDisabled) {
116
+ onOpenInFileExplorer();
117
+ }
118
+ },
119
+ quickSwitcherLabel: null,
120
+ subMenu: null,
121
+ type: 'item',
122
+ value: 'file-explorer',
123
+ },
124
+ ]
125
+ : []),
126
+ ]
127
+ : []),
128
+ ...(editors.length > 0 || codingAgents.length > 0 || showSystemApps
129
+ ? [{ type: 'divider', id: 'open-in-settings-divider' }]
130
+ : []),
131
+ {
132
+ id: 'change-default-apps',
133
+ keyHint: null,
134
+ label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "Change default apps..." }),
135
+ leftItem: null,
136
+ onClick: onConfigureApps,
137
+ quickSwitcherLabel: null,
138
+ subMenu: null,
139
+ type: 'item',
140
+ value: 'change-default-apps',
141
+ },
142
+ ];
143
+ };
144
+ exports.getOpenInMenuItems = getOpenInMenuItems;
@@ -4,6 +4,8 @@ import type { SelectedOutlineCropDragTarget, SelectedOutlineCropFieldKey, Select
4
4
  import { type UvCoordinate } from './selected-outline-uv';
5
5
  import type { AddSequenceKeyframeChange } from './Timeline/call-add-keyframe';
6
6
  import type { SaveSequencePropChange } from './Timeline/save-sequence-prop';
7
+ import { type ParsedCssRotation } from './Timeline/timeline-rotation-utils';
8
+ import { type ParsedTranslate } from './Timeline/timeline-translate-utils';
7
9
  export declare const getSelectedOutlineActiveSchema: ({ schema, currentRuntimeValueDotNotation, dragOverrides, propStatus, frame, }: {
8
10
  readonly schema: InteractivitySchema;
9
11
  readonly currentRuntimeValueDotNotation: Record<string, unknown>;
@@ -125,6 +127,11 @@ export declare const getSelectedOutlineRotationDragStates: ({ dragTargets, getDr
125
127
  readonly getDragOverrides: GetDragOverrides;
126
128
  readonly timelinePosition: number;
127
129
  }) => SelectedOutlineRotationDragState[];
130
+ export declare const getSelectedOutline3DRotationDragValues: ({ dragStates, rotationXDeltaDegrees, rotationYDeltaDegrees, }: {
131
+ readonly dragStates: readonly SelectedOutlineRotationDragState[];
132
+ readonly rotationXDeltaDegrees: number;
133
+ readonly rotationYDeltaDegrees: number;
134
+ }) => Map<string, string>;
128
135
  export declare const getSelectedOutlineRotationDragValues: ({ dragStates, rotationDeltaDegrees, }: {
129
136
  readonly dragStates: readonly SelectedOutlineRotationDragState[];
130
137
  readonly rotationDeltaDegrees: number;
@@ -151,16 +158,15 @@ export declare const clearSelectedOutlineRotationDragOverrides: ({ clearDragOver
151
158
  readonly clearDragOverrides: (nodePath: SequencePropsSubscriptionKey) => void;
152
159
  readonly dragStates: readonly SelectedOutlineRotationDragState[];
153
160
  }) => void;
154
- export declare const parseCssRotationToRadians: (value: string) => number | null;
155
- export declare const compensateTranslateForTransformOrigin: ({ startTranslate, deltaOrigin, rotate, scale, }: {
161
+ export declare const compensateTranslateForTransformOrigin: ({ startTranslate, deltaOrigin, rotation, scale, }: {
156
162
  readonly startTranslate: readonly [number, number];
157
163
  readonly deltaOrigin: readonly [number, number];
158
- readonly rotate: number;
159
- readonly scale: readonly [number, number];
164
+ readonly rotation: ParsedCssRotation;
165
+ readonly scale: readonly [number, number, number];
160
166
  }) => readonly [number, number];
161
167
  export declare const getSelectedOutlineTransformOriginDragChanges: ({ target, startTranslate, origin, translate, }: {
162
168
  readonly target: SelectedOutlineTransformOriginDragTarget;
163
- readonly startTranslate: readonly [number, number];
169
+ readonly startTranslate: ParsedTranslate;
164
170
  readonly origin: string;
165
171
  readonly translate: string;
166
172
  }) => {