@remotion/studio 4.0.523 → 4.0.525

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 (182) hide show
  1. package/dist/components/ActionTooltip.d.ts +11 -0
  2. package/dist/components/ActionTooltip.js +153 -0
  3. package/dist/components/AppLaunchButton.js +2 -0
  4. package/dist/components/AssetSelectorModal.d.ts +6 -0
  5. package/dist/components/AssetSelectorModal.js +174 -0
  6. package/dist/components/Canvas.js +18 -3
  7. package/dist/components/CheckboardToggle.js +8 -10
  8. package/dist/components/ColorPicker/AlphaSlider.js +1 -1
  9. package/dist/components/ColorPicker/HueSlider.js +1 -1
  10. package/dist/components/ColorPicker/SaturationValueArea.js +1 -1
  11. package/dist/components/CompositionSelector.js +1 -0
  12. package/dist/components/CompositionSelectorItem.js +1 -0
  13. package/dist/components/EditorGuides/Guide.js +1 -1
  14. package/dist/components/ElementInstallConfirmation.js +35 -62
  15. package/dist/components/FullscreenToggle.js +5 -8
  16. package/dist/components/GlobalKeybindings.js +71 -0
  17. package/dist/components/InspectorLocationCopy.js +1 -1
  18. package/dist/components/InspectorOpenInEditor.d.ts +1 -0
  19. package/dist/components/InspectorOpenInEditor.js +18 -15
  20. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +6 -7
  21. package/dist/components/InspectorPanel/CompositionMetadata.js +1 -0
  22. package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -0
  23. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -12
  24. package/dist/components/InspectorSequenceSection.js +23 -14
  25. package/dist/components/LazySyntaxHighlightedSource.d.ts +4 -0
  26. package/dist/components/LazySyntaxHighlightedSource.js +43 -0
  27. package/dist/components/LoopToggle.js +9 -2
  28. package/dist/components/Menu/MenuItem.js +1 -2
  29. package/dist/components/MenuBuildIndicator.js +1 -1
  30. package/dist/components/MenuToolbar.js +6 -4
  31. package/dist/components/Modals.js +2 -1
  32. package/dist/components/MuteToggle.d.ts +1 -0
  33. package/dist/components/MuteToggle.js +17 -6
  34. package/dist/components/NewComposition/CodemodFooter.js +1 -0
  35. package/dist/components/NewComposition/DeleteComposition.js +42 -6
  36. package/dist/components/NewComposition/DeleteFolder.js +1 -0
  37. package/dist/components/NewComposition/DuplicateComposition.js +5 -0
  38. package/dist/components/NewComposition/InputDragger.js +2 -2
  39. package/dist/components/NewComposition/NewComposition.d.ts +1 -0
  40. package/dist/components/NewComposition/NewComposition.js +5 -4
  41. package/dist/components/NewComposition/NewFolder.js +31 -6
  42. package/dist/components/NewComposition/RenameComposition.js +3 -2
  43. package/dist/components/NewComposition/RenameFolder.js +3 -4
  44. package/dist/components/NewComposition/SlugPreview.d.ts +7 -0
  45. package/dist/components/NewComposition/SlugPreview.js +18 -0
  46. package/dist/components/NewComposition/duplicate-composition-api.d.ts +3 -2
  47. package/dist/components/NewComposition/duplicate-composition-api.js +9 -2
  48. package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
  49. package/dist/components/Notifications/NotificationCenter.js +22 -1
  50. package/dist/components/OutlineToggle.js +17 -10
  51. package/dist/components/PlayPause.js +7 -1
  52. package/dist/components/PlaybackKeyboardShortcutsManager.d.ts +2 -0
  53. package/dist/components/PlaybackKeyboardShortcutsManager.js +36 -1
  54. package/dist/components/PlaybackRateSelector.js +2 -2
  55. package/dist/components/Preview.js +0 -3
  56. package/dist/components/PreviewToolbar.js +4 -7
  57. package/dist/components/PreviewToolbarOverflowButton.js +10 -3
  58. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
  59. package/dist/components/RenderButton.js +40 -4
  60. package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
  61. package/dist/components/RenderModal/render-modals.js +3 -0
  62. package/dist/components/RenderQueue/CaptionQueueItem.js +2 -1
  63. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
  64. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
  65. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
  66. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
  67. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
  68. package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
  69. package/dist/components/RenderQueue/VideoMattingQueueItem.js +2 -1
  70. package/dist/components/RenderQueue/actions.d.ts +2 -1
  71. package/dist/components/RenderQueue/actions.js +2 -1
  72. package/dist/components/RulersAndGuidesToggle.js +8 -1
  73. package/dist/components/SegmentedButton.d.ts +1 -0
  74. package/dist/components/SegmentedButton.js +9 -3
  75. package/dist/components/SelectedOutlineElement.js +16 -6
  76. package/dist/components/SelectedOutlinePolygon.js +4 -2
  77. package/dist/components/SettingsButton.js +8 -6
  78. package/dist/components/SettingsContext.d.ts +8 -0
  79. package/dist/components/SettingsContext.js +57 -2
  80. package/dist/components/SettingsModal.js +4 -1
  81. package/dist/components/SettingsModalFooter.js +1 -1
  82. package/dist/components/SidebarCollapserControls.js +13 -16
  83. package/dist/components/SizeSelector.js +2 -2
  84. package/dist/components/SkillsSettings.js +35 -4
  85. package/dist/components/SnappingToggle.js +7 -8
  86. package/dist/components/Splitter/SplitterHandle.js +1 -2
  87. package/dist/components/StudioSettings.js +32 -18
  88. package/dist/components/SyntaxHighlightedSource.d.ts +5 -0
  89. package/dist/components/{HighlightedElementSource.js → SyntaxHighlightedSource.js} +2 -2
  90. package/dist/components/Tabs/vertical.d.ts +1 -1
  91. package/dist/components/Tabs/vertical.js +16 -2
  92. package/dist/components/Timeline/EasingEditorModal.js +2 -2
  93. package/dist/components/Timeline/Timeline.js +47 -39
  94. package/dist/components/Timeline/TimelineAssetField.js +148 -9
  95. package/dist/components/Timeline/TimelineDragHandler.js +1 -2
  96. package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
  97. package/dist/components/Timeline/TimelineEffectItem.js +2 -2
  98. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
  99. package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
  100. package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
  101. package/dist/components/Timeline/TimelineInOutDragHandler.js +1 -2
  102. package/dist/components/Timeline/TimelineLayerChildren.js +12 -9
  103. package/dist/components/Timeline/TimelineSchemaField.js +8 -1
  104. package/dist/components/Timeline/TimelineSelection.d.ts +3 -1
  105. package/dist/components/Timeline/TimelineSelection.js +32 -5
  106. package/dist/components/Timeline/TimelineSequence.js +6 -6
  107. package/dist/components/Timeline/TimelineSequenceItem.js +12 -10
  108. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -12
  109. package/dist/components/Timeline/TimelineTranslateField.js +25 -12
  110. package/dist/components/Timeline/TimelineZoomControls.js +2 -1
  111. package/dist/components/Timeline/get-sequence-context-menu-items.js +22 -6
  112. package/dist/components/Timeline/timeline-field-display-utils.js +12 -7
  113. package/dist/components/Timeline/timeline-translate-utils.d.ts +17 -0
  114. package/dist/components/Timeline/timeline-translate-utils.js +53 -12
  115. package/dist/components/Timeline/use-open-sequence-in-apps.d.ts +2 -0
  116. package/dist/components/Timeline/use-open-sequence-in-apps.js +17 -0
  117. package/dist/components/Timeline/use-timeline-asset-drop.js +17 -3
  118. package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
  119. package/dist/components/TimelineCombobox.d.ts +1 -0
  120. package/dist/components/TimelineCombobox.js +9 -4
  121. package/dist/components/TimelineInOutToggle.js +8 -15
  122. package/dist/components/UndoRedoButtons.js +11 -0
  123. package/dist/components/composition-menu-items.js +56 -2
  124. package/dist/components/folder-menu-items.js +44 -0
  125. package/dist/components/get-open-in-menu-items.js +1 -1
  126. package/dist/components/handle-drop.js +3 -2
  127. package/dist/components/import-assets.d.ts +24 -1
  128. package/dist/components/import-assets.js +3 -1
  129. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  130. package/dist/components/keyboard-shortcuts.js +28 -9
  131. package/dist/error-overlay/remotion-overlay/CodeFrame.js +29 -18
  132. package/dist/esm/LazyModels-gfmpcy4h.mjs +11 -0
  133. package/dist/esm/LazyModels-m1rf06wh.mjs +11 -0
  134. package/dist/esm/{HighlightedElementSource-jfc66k4p.mjs → SyntaxHighlightedSource-3xks91rz.mjs} +4 -4
  135. package/dist/esm/{TranscriptionModal-916jqhry.mjs → TranscriptionModal-8pvrehg4.mjs} +7 -7
  136. package/dist/esm/{VideoMattingModal-2tm79s9b.mjs → VideoMattingModal-fefbzgka.mjs} +7 -7
  137. package/dist/esm/{index-xhe2m2qr.mjs → index-0x13f28h.mjs} +35 -13
  138. package/dist/esm/{index-sgtmgc4h.mjs → index-1089795y.mjs} +3 -3
  139. package/dist/esm/{index-hy4xcgty.mjs → index-41kqns5c.mjs} +5 -3
  140. package/dist/esm/{index-6cvm9a65.mjs → index-ggqpre9v.mjs} +2868 -2099
  141. package/dist/esm/{index-czwvnn9g.mjs → index-hbezgbbq.mjs} +1 -1
  142. package/dist/esm/{index-1x7bsdh6.mjs → index-jrw61pkj.mjs} +2 -2
  143. package/dist/esm/{index-jg13hf2g.mjs → index-k426ye99.mjs} +2 -1
  144. package/dist/esm/{index-te66vvrp.mjs → index-mww32xc8.mjs} +4 -4
  145. package/dist/esm/{index-x7t2y7ws.mjs → index-s848rffx.mjs} +6985 -5956
  146. package/dist/esm/{index-3hgr6gjx.mjs → index-tzxb8808.mjs} +1 -1
  147. package/dist/esm/{index-5qddp5h7.mjs → index-vsxrxfpj.mjs} +1 -1
  148. package/dist/esm/index.mjs +3 -3
  149. package/dist/esm/internals.mjs +8 -8
  150. package/dist/esm/previewEntry.mjs +8 -8
  151. package/dist/esm/renderEntry.mjs +3 -3
  152. package/dist/helpers/colors.d.ts +1 -0
  153. package/dist/helpers/colors.js +4 -3
  154. package/dist/helpers/get-git-menu-item.d.ts +4 -0
  155. package/dist/helpers/get-git-menu-item.js +8 -1
  156. package/dist/helpers/get-sequence-double-click-action.d.ts +3 -3
  157. package/dist/helpers/get-sequence-double-click-action.js +2 -2
  158. package/dist/helpers/inject-css.js +2 -2
  159. package/dist/helpers/pointer-session.d.ts +1 -0
  160. package/dist/helpers/pointer-session.js +10 -1
  161. package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -0
  162. package/dist/helpers/prism-vsc-dark-plus.js +305 -0
  163. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  164. package/dist/helpers/use-create-composition.d.ts +1 -0
  165. package/dist/helpers/use-create-composition.js +17 -7
  166. package/dist/helpers/use-keybinding.d.ts +1 -1
  167. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  168. package/dist/helpers/use-media-metadata.js +5 -1
  169. package/dist/helpers/use-menu-structure.js +6 -2
  170. package/dist/helpers/use-rename-composition.d.ts +1 -0
  171. package/dist/helpers/use-rename-composition.js +16 -5
  172. package/dist/icons/skills.js +1 -1
  173. package/dist/renderEntry.js +2 -2
  174. package/dist/state/modals.d.ts +13 -1
  175. package/dist/state/z-index.js +1 -3
  176. package/package.json +20 -20
  177. package/dist/components/HighlightedElementSource.d.ts +0 -5
  178. package/dist/esm/LazyModels-2trdm224.mjs +0 -11
  179. package/dist/esm/LazyModels-fjb5ckaq.mjs +0 -11
  180. package/dist/helpers/prism-tomorrow.d.ts +0 -1
  181. package/dist/helpers/prism-tomorrow.js +0 -151
  182. /package/dist/esm/{resolve-composition-component-location-14148845.mjs → resolve-composition-component-location-bt2d6qxq.mjs} +0 -0
@@ -1,37 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.ElementInstallConfirmation = exports.ElementLibraryAddConfirmation = void 0;
37
4
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -43,13 +10,16 @@ const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint")
43
10
  const colors_1 = require("../helpers/colors");
44
11
  const hoverable_1 = require("../helpers/hoverable");
45
12
  const resolved_stack_to_symbolicated_1 = require("../helpers/resolved-stack-to-symbolicated");
13
+ const url_state_1 = require("../helpers/url-state");
46
14
  const use_create_composition_1 = require("../helpers/use-create-composition");
47
15
  const validate_new_comp_data_1 = require("../helpers/validate-new-comp-data");
48
16
  const z_index_1 = require("../state/z-index");
49
17
  const Button_1 = require("./Button");
50
18
  const element_install_api_1 = require("./element-install-api");
51
19
  const import_assets_1 = require("./import-assets");
20
+ const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
52
21
  const layout_1 = require("./layout");
22
+ const LazySyntaxHighlightedSource_1 = require("./LazySyntaxHighlightedSource");
53
23
  const is_menu_item_1 = require("./Menu/is-menu-item");
54
24
  const portals_1 = require("./Menu/portals");
55
25
  const ModalButton_1 = require("./ModalButton");
@@ -59,11 +29,9 @@ const ModalHeader_1 = require("./ModalHeader");
59
29
  const NewComposition_1 = require("./NewComposition/NewComposition");
60
30
  const RemInput_1 = require("./NewComposition/RemInput");
61
31
  const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
62
- const NotificationCenter_1 = require("./Notifications/NotificationCenter");
63
32
  const RadioButton_1 = require("./RadioButton");
64
33
  const SegmentedControl_1 = require("./SegmentedControl");
65
34
  const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
66
- const HighlightedElementSource = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./HighlightedElementSource'))));
67
35
  const container = {
68
36
  display: 'flex',
69
37
  flexDirection: 'column',
@@ -287,6 +255,7 @@ const ElementInstallConfirmation = ({ state }) => {
287
255
  const sourcePreview = (0, react_1.useMemo)(() => makeSourceControlsVisible(request.element.sourceCode), [request.element.sourceCode]);
288
256
  const config = remotion_1.Internals.useUnsafeVideoConfig();
289
257
  const { canvasContent, compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
258
+ const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
290
259
  const currentCompositionMetadata = config === null ||
291
260
  (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) !== 'composition' ||
292
261
  canvasContent.compositionId !== request.compositionId
@@ -402,7 +371,7 @@ const ElementInstallConfirmation = ({ state }) => {
402
371
  canceled = true;
403
372
  };
404
373
  }, [folderCompositionFile, newPlan, request.element, selectedFolderStack]);
405
- const { createComposition, heightValidationMessage, nameValidationMessage, valid: newCompositionValuesAreValid, widthValidationMessage, } = (0, use_create_composition_1.useCreateComposition)({
374
+ const { codemod: newCompositionCodemod, compositionId: newCompositionId, heightValidationMessage, nameValidationMessage, valid: newCompositionValuesAreValid, widthValidationMessage, } = (0, use_create_composition_1.useCreateComposition)({
406
375
  canvasCapture: null,
407
376
  compositions,
408
377
  durationInFrames: newCompositionValues.durationInFrames,
@@ -459,9 +428,6 @@ const ElementInstallConfirmation = ({ state }) => {
459
428
  const activePlan = overwriteExisting
460
429
  ? existingDestination.plan
461
430
  : ((_f = preparedInstallation === null || preparedInstallation === void 0 ? void 0 : preparedInstallation.plan) !== null && _f !== void 0 ? _f : null);
462
- const [createdComposition, setCreatedComposition] = (0, react_1.useState)(null);
463
- const creationKey = JSON.stringify(newCompositionValues);
464
- const compositionAlreadyCreated = createdComposition === creationKey;
465
431
  (0, react_1.useEffect)(() => {
466
432
  if (selectedPlan === null) {
467
433
  return;
@@ -554,7 +520,7 @@ const ElementInstallConfirmation = ({ state }) => {
554
520
  : requestedName !== null))) &&
555
521
  (mode === 'current-composition'
556
522
  ? currentPlan !== null
557
- : (newCompositionValuesAreValid || compositionAlreadyCreated) &&
523
+ : newCompositionValuesAreValid &&
558
524
  folderTargetIsReady &&
559
525
  selectedNewCompositionPlan !== null);
560
526
  const submit = (0, react_1.useCallback)(async () => {
@@ -563,18 +529,6 @@ const ElementInstallConfirmation = ({ state }) => {
563
529
  return;
564
530
  }
565
531
  setSubmitting(true);
566
- if (mode === 'new-composition' && !compositionAlreadyCreated) {
567
- const created = await createComposition({
568
- signal: new AbortController().signal,
569
- symbolicatedStack: selectedFolderStack === null ? null : folderSymbolicatedStack,
570
- });
571
- if (!created.success) {
572
- (0, NotificationCenter_1.showNotification)(`Could not create composition: ${created.reason}`, 4000);
573
- setSubmitting(false);
574
- return;
575
- }
576
- setCreatedComposition(creationKey);
577
- }
578
532
  const installed = await (0, import_assets_1.insertElement)({
579
533
  installationName: overwriteExisting
580
534
  ? ((_a = existingDestination === null || existingDestination === void 0 ? void 0 : existingDestination.name) !== null && _a !== void 0 ? _a : installationName)
@@ -582,18 +536,36 @@ const ElementInstallConfirmation = ({ state }) => {
582
536
  compositionFile: mode === 'new-composition'
583
537
  ? selectedPlan.compositionFile
584
538
  : request.compositionFile,
585
- compositionId: mode === 'new-composition'
586
- ? newCompositionValues.id
587
- : request.compositionId,
539
+ compositionId: mode === 'new-composition' ? newCompositionId : request.compositionId,
588
540
  element: request.element,
589
541
  // The insert operation revalidates this even if the name preflight is pending.
590
542
  expectedFileState: (_b = activePlan === null || activePlan === void 0 ? void 0 : activePlan.expectedFileState) !== null && _b !== void 0 ? _b : { exists: false },
591
543
  from: mode === 'new-composition' ? null : request.from,
592
544
  overwriteExisting,
593
545
  position: mode === 'new-composition' ? null : request.position,
546
+ undoRedoNavigation: mode === 'new-composition'
547
+ ? {
548
+ undoRoute: (0, url_state_1.getRoute)(),
549
+ redoRoute: `/${newCompositionId}`,
550
+ }
551
+ : null,
552
+ newComposition: mode === 'new-composition'
553
+ ? {
554
+ codemod: newCompositionCodemod,
555
+ symbolicatedStack: selectedFolderStack === null ? null : folderSymbolicatedStack,
556
+ }
557
+ : null,
594
558
  });
595
- if (installed)
559
+ if (installed) {
560
+ if (mode === 'new-composition') {
561
+ selectComposition({
562
+ id: newCompositionId,
563
+ folderName: newCompositionValues.folder.folderName,
564
+ parentFolderName: newCompositionValues.folder.parentName,
565
+ }, true);
566
+ }
596
567
  onClose();
568
+ }
597
569
  else {
598
570
  setSubmitting(false);
599
571
  setRefreshPlan((value) => value + 1);
@@ -601,19 +573,20 @@ const ElementInstallConfirmation = ({ state }) => {
601
573
  }, [
602
574
  activePlan,
603
575
  existingDestination,
604
- compositionAlreadyCreated,
605
- creationKey,
606
576
  installationName,
607
577
  overwriteExisting,
608
578
  canSubmit,
609
- createComposition,
610
579
  folderSymbolicatedStack,
611
580
  mode,
612
- newCompositionValues.id,
581
+ newCompositionCodemod,
582
+ newCompositionId,
613
583
  onClose,
614
584
  request,
615
585
  selectedFolderStack,
616
586
  selectedPlan,
587
+ selectComposition,
588
+ newCompositionValues.folder.folderName,
589
+ newCompositionValues.folder.parentName,
617
590
  ]);
618
591
  const cancel = (0, react_1.useCallback)(() => {
619
592
  if (!submitting) {
@@ -658,7 +631,7 @@ const ElementInstallConfirmation = ({ state }) => {
658
631
  ] }), currentPlan === null ? (jsx_runtime_1.jsxs("div", { style: warningStyle, role: "status", children: [
659
632
  jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { style: warningIconStyle }), jsx_runtime_1.jsxs("p", { style: warningDescriptionStyle, children: ["Studio could not find a safe place in \u201C", request.compositionId, "\u201D to insert the Element. Install it into a new composition instead."] })
660
633
  ] })) : null, mode === 'new-composition' ? (jsx_runtime_1.jsxs("section", { style: { ...sectionStyle, marginInline: -16 }, "aria-label": "New composition settings", children: [
661
- jsx_runtime_1.jsx(NewComposition_1.NewCompositionFields, { heightValidationMessage: heightValidationMessage, inputRef: inputRef, nameValidationMessage: compositionAlreadyCreated ? null : nameValidationMessage, setValues: setNewCompositionValues, values: newCompositionValues, widthValidationMessage: widthValidationMessage }), (activeNewCompositionPlanState === null || activeNewCompositionPlanState === void 0 ? void 0 : activeNewCompositionPlanState.type) === 'error' ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: activeNewCompositionPlanState.reason, type: "error" })) : null] })) : null, jsx_runtime_1.jsx("section", { style: sectionStyle, "aria-label": "Element implementation", children: existingDestination ? (jsx_runtime_1.jsxs("div", { role: "radiogroup", "aria-label": "Existing Element file", style: sectionStyle, children: [
634
+ jsx_runtime_1.jsx(NewComposition_1.NewCompositionFields, { compositionId: newCompositionId, heightValidationMessage: heightValidationMessage, inputRef: inputRef, nameValidationMessage: nameValidationMessage, setValues: setNewCompositionValues, values: newCompositionValues, widthValidationMessage: widthValidationMessage }), (activeNewCompositionPlanState === null || activeNewCompositionPlanState === void 0 ? void 0 : activeNewCompositionPlanState.type) === 'error' ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: activeNewCompositionPlanState.reason, type: "error" })) : null] })) : null, jsx_runtime_1.jsx("section", { style: sectionStyle, "aria-label": "Element implementation", children: existingDestination ? (jsx_runtime_1.jsxs("div", { role: "radiogroup", "aria-label": "Existing Element file", style: sectionStyle, children: [
662
635
  jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: !overwriteExisting, disabled: submitting, onClick: () => setInput((previous) => ({ ...previous, overwritePlan: null })), children: "Create a copy" }), !overwriteExisting ? (jsx_runtime_1.jsxs("div", { style: {
663
636
  ...sectionStyle,
664
637
  paddingLeft: 28,
@@ -686,7 +659,7 @@ const ElementInstallConfirmation = ({ state }) => {
686
659
  ] })) : null, jsx_runtime_1.jsxs("div", { style: warningStyle, children: [
687
660
  jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { style: warningIconStyle }), jsx_runtime_1.jsx("p", { style: warningDescriptionStyle, children: "Installed code can access your files and network." })
688
661
  ] }), jsx_runtime_1.jsxs("details", { style: sourceDetailsStyle, children: [
689
- jsx_runtime_1.jsx("summary", { className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, style: sourceSummaryStyle, children: "Source code" }), jsx_runtime_1.jsx("div", { style: sourceCodeContainerStyle, children: jsx_runtime_1.jsx("pre", { className: `language-tsx ${is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME} ${is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, style: sourceCodeBlockStyle, children: jsx_runtime_1.jsx("code", { style: sourceCodeStyle, children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: sourcePreview, children: jsx_runtime_1.jsx(HighlightedElementSource, { source: sourcePreview }) }) }) }) })
662
+ jsx_runtime_1.jsx("summary", { className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, style: sourceSummaryStyle, children: "Source code" }), jsx_runtime_1.jsx("div", { style: sourceCodeContainerStyle, children: jsx_runtime_1.jsx("pre", { className: `language-tsx ${is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME} ${is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, style: sourceCodeBlockStyle, children: jsx_runtime_1.jsx("code", { style: sourceCodeStyle, children: jsx_runtime_1.jsx(LazySyntaxHighlightedSource_1.LazySyntaxHighlightedSource, { source: sourcePreview }) }) }) })
690
663
  ] })
691
664
  ] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footerStyle, children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
692
665
  jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(Button_1.Button, { disabled: submitting, onClick: cancel, style: cancelStyle, children: "Cancel" }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs(ModalButton_1.ModalButton, { autoFocus: mode === 'current-composition', disabled: !canSubmit, onClick: submit, children: [submitting
@@ -4,11 +4,11 @@ exports.FullScreenToggle = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
- const no_react_1 = require("remotion/no-react");
8
7
  const use_keybinding_1 = require("../helpers/use-keybinding");
9
8
  const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
10
9
  const fullscreen_1 = require("../icons/fullscreen");
11
10
  const canvas_ref_1 = require("../state/canvas-ref");
11
+ const ActionTooltip_1 = require("./ActionTooltip");
12
12
  const ControlButton_1 = require("./ControlButton");
13
13
  const FullScreenToggle = ({ hidden }) => {
14
14
  const keybindings = (0, use_keybinding_1.useKeybinding)();
@@ -26,12 +26,9 @@ const FullScreenToggle = ({ hidden }) => {
26
26
  }));
27
27
  }, [setSize]);
28
28
  const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('enterFullscreen');
29
- const accessibilityLabel = [
30
- 'Enter fullscreen preview',
31
- (0, use_keybinding_1.areKeyboardShortcutsDisabled)() || shortcut === '' ? null : `(${shortcut})`,
32
- ]
33
- .filter(no_react_1.NoReactInternals.truthy)
34
- .join(' ');
29
+ const ariaKeyShortcuts = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('enterFullscreen');
30
+ const accessibilityLabel = 'Enter fullscreen preview';
31
+ const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
35
32
  (0, react_1.useEffect)(() => {
36
33
  const f = keybindings.registerKeybinding({
37
34
  event: 'keydown',
@@ -45,6 +42,6 @@ const FullScreenToggle = ({ hidden }) => {
45
42
  f.unregister();
46
43
  };
47
44
  }, [keybindings, onClick]);
48
- return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { id: "fullscreen-toggle", title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (color) => (jsx_runtime_1.jsx(fullscreen_1.FullscreenIcon, { color: color, style: { width: 18, height: 18 } })) }));
45
+ return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Fullscreen", shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { id: "fullscreen-toggle", title: "", "aria-label": accessibilityLabel, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaKeyShortcuts || undefined, onClick: onClick, children: (color) => (jsx_runtime_1.jsx(fullscreen_1.FullscreenIcon, { color: color, style: { width: 18, height: 18 } })) }) }));
49
46
  };
50
47
  exports.FullScreenToggle = FullScreenToggle;
@@ -4,10 +4,15 @@ exports.GlobalKeybindings = void 0;
4
4
  const react_1 = require("react");
5
5
  const remotion_1 = require("remotion");
6
6
  const calculate_timeline_1 = require("../helpers/calculate-timeline");
7
+ const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
8
+ const pick_color_1 = require("../helpers/pick-color");
7
9
  const studio_runtime_config_1 = require("../helpers/studio-runtime-config");
8
10
  const timeline_node_path_key_1 = require("../helpers/timeline-node-path-key");
9
11
  const use_keybinding_1 = require("../helpers/use-keybinding");
10
12
  const checkerboard_1 = require("../state/checkerboard");
13
+ const editor_guides_1 = require("../state/editor-guides");
14
+ const editor_outlines_1 = require("../state/editor-outlines");
15
+ const editor_rulers_1 = require("../state/editor-rulers");
11
16
  const editor_snapping_1 = require("../state/editor-snapping");
12
17
  const modals_1 = require("../state/modals");
13
18
  const AskAiModal_1 = require("./AskAiModal");
@@ -27,6 +32,59 @@ const GlobalKeybindings = () => {
27
32
  const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
28
33
  const { setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
29
34
  const { setEditorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
35
+ const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
36
+ const { setEditorShowOutlines } = (0, react_1.useContext)(editor_outlines_1.EditorShowOutlinesContext);
37
+ const { editorShowRulers, setEditorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
38
+ const { editorShowGuides, setEditorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
39
+ const showGuides = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition';
40
+ const showCanvasViewControls = showGuides ||
41
+ ((canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset' &&
42
+ (0, get_preview_file_type_1.getPreviewFileType)(canvasContent.asset) === 'video');
43
+ (0, react_1.useEffect)(() => {
44
+ if (!showCanvasViewControls)
45
+ return;
46
+ const outlines = showGuides
47
+ ? keybindings.registerKeybinding({
48
+ event: 'keydown',
49
+ action: 'toggleOutlines',
50
+ callback: (event) => {
51
+ if (!event.repeat)
52
+ setEditorShowOutlines((current) => !current);
53
+ },
54
+ preventDefault: true,
55
+ triggerIfInputFieldFocused: false,
56
+ keepRegisteredWhenNotHighestContext: false,
57
+ })
58
+ : null;
59
+ const rulers = keybindings.registerKeybinding({
60
+ event: 'keydown',
61
+ action: 'toggleRulersAndGuides',
62
+ callback: (event) => {
63
+ if (event.repeat)
64
+ return;
65
+ const visible = editorShowRulers || (showGuides && editorShowGuides);
66
+ setEditorShowRulers(() => !visible);
67
+ if (showGuides)
68
+ setEditorShowGuides(() => !visible);
69
+ },
70
+ preventDefault: true,
71
+ triggerIfInputFieldFocused: false,
72
+ keepRegisteredWhenNotHighestContext: false,
73
+ });
74
+ return () => {
75
+ outlines === null || outlines === void 0 ? void 0 : outlines.unregister();
76
+ rulers.unregister();
77
+ };
78
+ }, [
79
+ keybindings,
80
+ showCanvasViewControls,
81
+ showGuides,
82
+ editorShowRulers,
83
+ editorShowGuides,
84
+ setEditorShowOutlines,
85
+ setEditorShowRulers,
86
+ setEditorShowGuides,
87
+ ]);
30
88
  const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
31
89
  const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
32
90
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
@@ -127,6 +185,18 @@ const GlobalKeybindings = () => {
127
185
  preventDefault: true,
128
186
  })
129
187
  : null;
188
+ const colorPicker = 'EyeDropper' in window
189
+ ? keybindings.registerKeybinding({
190
+ event: 'keydown',
191
+ action: 'pickColor',
192
+ callback: () => {
193
+ (0, pick_color_1.pickColor)();
194
+ },
195
+ triggerIfInputFieldFocused: false,
196
+ keepRegisteredWhenNotHighestContext: false,
197
+ preventDefault: true,
198
+ })
199
+ : null;
130
200
  const sequencePropKeys = sequencePropShortcuts.map(({ action, fieldKey }) => keybindings.registerKeybinding({
131
201
  event: 'keydown',
132
202
  action,
@@ -217,6 +287,7 @@ const GlobalKeybindings = () => {
217
287
  cmdKKey.unregister();
218
288
  cmdSKey.unregister();
219
289
  cmdIKey === null || cmdIKey === void 0 ? void 0 : cmdIKey.unregister();
290
+ colorPicker === null || colorPicker === void 0 ? void 0 : colorPicker.unregister();
220
291
  pageDown.unregister();
221
292
  pageUp.unregister();
222
293
  shiftMKey.unregister();
@@ -69,6 +69,6 @@ const InspectorLocationCopy = ({ children, location, name, openInEditorLocation
69
69
  opacity: showAction ? 1 : 0,
70
70
  pointerEvents: showAction ? 'auto' : 'none',
71
71
  }, children: [
72
- jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, contextForAgents: contextForAgents, location: openInEditorLocation }), contextForAgents ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopy, renderAction: renderCopyAction, title: "Copy context for agents" })) : null] })) : null] }));
72
+ jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, contextForAgents: contextForAgents, location: openInEditorLocation, showTooltips: false }), contextForAgents ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopy, renderAction: renderCopyAction, title: "Copy context for agents" })) : null] })) : null] }));
73
73
  };
74
74
  exports.InspectorLocationCopy = InspectorLocationCopy;
@@ -5,4 +5,5 @@ export declare const InspectorOpenInEditor: React.FC<{
5
5
  readonly location: OriginalPosition | null;
6
6
  readonly label?: React.ReactNode;
7
7
  readonly locationType: 'file' | 'folder' | null;
8
+ readonly showTooltips: boolean;
8
9
  }>;
@@ -28,13 +28,13 @@ const dropdownSegmentStyle = {
28
28
  width: 20,
29
29
  };
30
30
  const editorButtonIconSize = 18;
31
- const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locationType }) => {
31
+ const githubButtonIconSize = 16;
32
+ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locationType, showTooltips, }) => {
32
33
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
33
34
  const configureDefaultApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
34
35
  const { canConfigureApps, canOpenInEditor, defaultEditorId, defaultEditorName, editorInfo, } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
35
36
  const codingAgentInfo = (0, use_default_editor_info_1.useDefaultCodingAgentInfo)(canConfigureApps);
36
- const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
37
- const defaultActionIsGitHub = !canOpenInEditor && canOpenInGitHub;
37
+ const defaultOpenInTarget = (0, get_git_menu_item_1.getDefaultOpenInTarget)({ canOpenInEditor });
38
38
  const openWithEditor = (0, react_1.useCallback)(async (editorId) => {
39
39
  if (!location) {
40
40
  return;
@@ -57,21 +57,21 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
57
57
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
58
58
  }
59
59
  }, [contextForAgents]);
60
- const defaultAppName = defaultActionIsGitHub
60
+ const defaultAppName = defaultOpenInTarget === 'git-source'
61
61
  ? 'GitHub'
62
62
  : (defaultEditorName !== null && defaultEditorName !== void 0 ? defaultEditorName : 'default editor');
63
- const canOpenDefault = location !== null && (canOpenInEditor || canOpenInGitHub);
63
+ const canOpenDefault = location !== null && defaultOpenInTarget !== null;
64
64
  const onOpenDefault = (0, react_1.useCallback)((event) => {
65
65
  event.stopPropagation();
66
- if (defaultActionIsGitHub) {
66
+ if (defaultOpenInTarget === 'git-source') {
67
67
  (0, get_git_menu_item_1.openGitSource)({ folder: locationType === 'folder', location });
68
68
  }
69
- else if (defaultEditorId) {
69
+ else if (defaultOpenInTarget === 'editor' && defaultEditorId) {
70
70
  openWithEditor(defaultEditorId).catch(() => undefined);
71
71
  }
72
72
  }, [
73
- defaultActionIsGitHub,
74
73
  defaultEditorId,
74
+ defaultOpenInTarget,
75
75
  location,
76
76
  locationType,
77
77
  openWithEditor,
@@ -127,15 +127,15 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
127
127
  });
128
128
  },
129
129
  });
130
- return defaultActionIsGitHub
130
+ return defaultOpenInTarget === 'git-source'
131
131
  ? items.filter((item) => item.id !== 'open-in-github')
132
132
  : items;
133
133
  }, [
134
134
  codingAgentInfo,
135
135
  canOpenInEditor,
136
136
  configureDefaultApps,
137
- defaultActionIsGitHub,
138
137
  defaultEditorId,
138
+ defaultOpenInTarget,
139
139
  editorInfo,
140
140
  location,
141
141
  locationType,
@@ -152,10 +152,11 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
152
152
  idleColor: colors_1.LIGHT_TEXT,
153
153
  onClick: onOpenDefault,
154
154
  onPointerDown: null,
155
- renderContent: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, defaultActionIsGitHub ? (jsx_runtime_1.jsx(github_1.GitHubIcon, { size: editorButtonIconSize })) : (jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: defaultEditorId, size: editorButtonIconSize }))] })),
155
+ renderContent: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, defaultOpenInTarget === 'git-source' ? (jsx_runtime_1.jsx(github_1.GitHubIcon, { size: githubButtonIconSize })) : (jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: defaultEditorId, size: editorButtonIconSize }))] })),
156
156
  segmentId: 'default-editor',
157
157
  style: mainSegmentStyle,
158
- title: `Open in ${defaultAppName}`,
158
+ title: showTooltips ? '' : `Open in ${defaultAppName}`,
159
+ tooltipLabel: showTooltips ? `Open in ${defaultAppName}` : null,
159
160
  type: 'action',
160
161
  },
161
162
  ];
@@ -171,7 +172,8 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
171
172
  segmentId: 'another-app',
172
173
  selectedId: null,
173
174
  style: dropdownSegmentStyle,
174
- title: 'Open in another app',
175
+ title: showTooltips ? '' : 'Open in another app',
176
+ tooltipLabel: showTooltips ? 'Open in another app' : null,
175
177
  type: 'menu',
176
178
  values: menuItems,
177
179
  });
@@ -179,17 +181,18 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
179
181
  return result;
180
182
  }, [
181
183
  canOpenDefault,
182
- defaultActionIsGitHub,
183
184
  defaultAppName,
184
185
  defaultEditorId,
186
+ defaultOpenInTarget,
185
187
  label,
186
188
  menuItems,
187
189
  onOpenDefault,
190
+ showTooltips,
188
191
  ]);
189
192
  if ((0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
190
193
  return null;
191
194
  }
192
- if (previewServerState.type !== 'connected' && !canOpenInGitHub) {
195
+ if (previewServerState.type !== 'connected' && defaultOpenInTarget === null) {
193
196
  return null;
194
197
  }
195
198
  return jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: null, title: null });
@@ -38,7 +38,7 @@ const CompositionInspectorHeader = () => {
38
38
  const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
39
39
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
40
40
  const { canOpenInEditor, defaultEditorId } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
41
- const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
41
+ const defaultOpenInTarget = (0, get_git_menu_item_1.getDefaultOpenInTarget)({ canOpenInEditor });
42
42
  const currentComposition = (0, react_1.useMemo)(() => {
43
43
  var _a;
44
44
  if (!video) {
@@ -75,16 +75,16 @@ const CompositionInspectorHeader = () => {
75
75
  });
76
76
  }, [compositionFile, compositionId]);
77
77
  const openSourceLocation = (0, react_1.useCallback)((location) => {
78
- if (canOpenInEditor && defaultEditorId) {
78
+ if (defaultOpenInTarget === 'editor' && defaultEditorId) {
79
79
  (0, open_in_editor_1.openOriginalPositionInEditor)(location, defaultEditorId).catch((err) => {
80
80
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
81
81
  });
82
82
  return;
83
83
  }
84
- if (canOpenInGitHub) {
84
+ if (defaultOpenInTarget === 'git-source') {
85
85
  (0, get_git_menu_item_1.openGitSource)({ folder: false, location });
86
86
  }
87
- }, [canOpenInEditor, canOpenInGitHub, defaultEditorId]);
87
+ }, [defaultEditorId, defaultOpenInTarget]);
88
88
  const openFileLocation = (0, react_1.useCallback)(() => {
89
89
  if (validatedLocation) {
90
90
  openSourceLocation(validatedLocation);
@@ -102,9 +102,8 @@ const CompositionInspectorHeader = () => {
102
102
  return (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: color, style: sourceLocationIconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: sourceLocationIconStyle }));
103
103
  }, [video]);
104
104
  return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { minHeight: COMPOSITION_INSPECTOR_HEADER_HEIGHT, padding: "4px 0", children: video ? (jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: validatedLocation, name: video.id, openInEditorLocation: componentLocation, children: [
105
- jsx_runtime_1.jsx(InlineCompositionName_1.InlineCompositionName, { compositionId: video.id, stack: (_e = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _e !== void 0 ? _e : null, compositions: compositions }, video.id), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: validatedLocation !== null && (canOpenInEditor || canOpenInGitHub), onOpen: openFileLocation, renderIcon: renderCompositionIcon, size: "quick-action" }), compositionComponentInfo === null &&
105
+ jsx_runtime_1.jsx(InlineCompositionName_1.InlineCompositionName, { compositionId: video.id, stack: (_e = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _e !== void 0 ? _e : null, compositions: compositions }, video.id), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: validatedLocation !== null && defaultOpenInTarget !== null, onOpen: openFileLocation, renderIcon: renderCompositionIcon, size: "quick-action" }), compositionComponentInfo === null &&
106
106
  compositionFile !== null &&
107
- compositionId !== null ? (jsx_runtime_1.jsx("div", { "aria-hidden": true, style: componentLocationPlaceholder })) : (jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null &&
108
- (canOpenInEditor || canOpenInGitHub), onOpen: openComponentLocation, renderIcon: renderReactIcon, size: "quick-action" }))] })) : null }));
107
+ compositionId !== null ? (jsx_runtime_1.jsx("div", { "aria-hidden": true, style: componentLocationPlaceholder })) : (jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null && defaultOpenInTarget !== null, onOpen: openComponentLocation, renderIcon: renderReactIcon, size: "quick-action" }))] })) : null }));
109
108
  };
110
109
  exports.CompositionInspectorHeader = CompositionInspectorHeader;
@@ -242,6 +242,7 @@ const CompositionMetadata = ({ compositionId, disabled, stack }) => {
242
242
  dryRun: false,
243
243
  signal: new AbortController().signal,
244
244
  symbolicatedStack,
245
+ undoRedoNavigation: null,
245
246
  })
246
247
  .then((result) => {
247
248
  if (!result.success) {
@@ -81,6 +81,7 @@ const ElementLibraryButton = () => {
81
81
  selectedId: null,
82
82
  style: elementLibraryDropdownSegmentStyle,
83
83
  title: 'Choose an Element library to browse inside Studio.',
84
+ tooltipLabel: null,
84
85
  type: 'menu',
85
86
  values: [
86
87
  {
@@ -5,7 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const client_id_1 = require("../../helpers/client-id");
7
7
  const colors_1 = require("../../helpers/colors");
8
- const get_git_menu_item_1 = require("../../helpers/get-git-menu-item");
9
8
  const react_2 = require("../../icons/react");
10
9
  const InlineEditableTitle_1 = require("../InlineEditableTitle");
11
10
  const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
@@ -48,8 +47,7 @@ const externalTabIndicatorStyle = {
48
47
  width: 12,
49
48
  };
50
49
  const useSequenceInspectorSourceLocation = (sequence) => {
51
- const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
52
- const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
50
+ const { canOpenSource, openSource, originalLocation } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
53
51
  const validatedLocation = (0, react_1.useMemo)(() => {
54
52
  var _a;
55
53
  if (!originalLocation ||
@@ -64,16 +62,10 @@ const useSequenceInspectorSourceLocation = (sequence) => {
64
62
  };
65
63
  }, [originalLocation]);
66
64
  const openFileLocation = (0, react_1.useCallback)(() => {
67
- if (canOpenInEditor) {
68
- openInEditor(null);
69
- return;
70
- }
71
- if (canOpenInGitHub && validatedLocation) {
72
- (0, get_git_menu_item_1.openGitSource)({ folder: false, location: validatedLocation });
73
- }
74
- }, [canOpenInEditor, canOpenInGitHub, openInEditor, validatedLocation]);
65
+ openSource();
66
+ }, [openSource]);
75
67
  return {
76
- canOpen: validatedLocation !== null && (canOpenInEditor || canOpenInGitHub),
68
+ canOpen: validatedLocation !== null && canOpenSource,
77
69
  openFileLocation,
78
70
  validatedLocation,
79
71
  };