@remotion/studio 4.0.517 → 4.0.519

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 (146) hide show
  1. package/dist/components/AppLaunchButton.d.ts +16 -0
  2. package/dist/components/AppLaunchButton.js +90 -0
  3. package/dist/components/AssetSelector.js +64 -22
  4. package/dist/components/AssetSelectorItem.d.ts +14 -1
  5. package/dist/components/AssetSelectorItem.js +219 -70
  6. package/dist/components/Button.js +20 -7
  7. package/dist/components/Canvas.js +109 -78
  8. package/dist/components/CanvasOrLoading.js +7 -7
  9. package/dist/components/CaptionTextEditor.js +32 -8
  10. package/dist/components/CodingAgentButton.d.ts +7 -0
  11. package/dist/components/CodingAgentButton.js +59 -0
  12. package/dist/components/CompositionContextButton.d.ts +1 -0
  13. package/dist/components/CompositionContextButton.js +7 -3
  14. package/dist/components/CompositionSelector.js +16 -11
  15. package/dist/components/CompositionSelectorItem.js +16 -23
  16. package/dist/components/ConfigureLicenseModal.js +4 -48
  17. package/dist/components/CurrentAsset.js +1 -1
  18. package/dist/components/EditorContent.js +6 -3
  19. package/dist/components/ElementInstallConfirmation.d.ts +25 -7
  20. package/dist/components/ElementInstallConfirmation.js +347 -30
  21. package/dist/components/ElementLibraryModal.js +3 -1
  22. package/dist/components/FixComputedValueModal.js +5 -131
  23. package/dist/components/InitialCompositionLoader.js +3 -2
  24. package/dist/components/InlineCaptionInspector.js +13 -2
  25. package/dist/components/InspectorOpenInEditor.js +48 -33
  26. package/dist/components/InspectorPanel/CompositionInspector.js +35 -3
  27. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +22 -14
  28. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +3 -1
  29. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +1 -1
  30. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +10 -5
  31. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
  32. package/dist/components/InspectorPanel/common.js +1 -0
  33. package/dist/components/InspectorPanel/styles.js +1 -0
  34. package/dist/components/InspectorSequenceSection.js +8 -3
  35. package/dist/components/InspectorSourceLocation.js +5 -1
  36. package/dist/components/KnownBugs.d.ts +1 -1
  37. package/dist/components/KnownBugs.js +1 -1
  38. package/dist/components/LicenseExplanation.d.ts +2 -0
  39. package/dist/components/LicenseExplanation.js +63 -0
  40. package/dist/components/MenuToolbar.js +7 -1
  41. package/dist/components/Modals.js +50 -2
  42. package/dist/components/NewComposition/InputDragger.js +29 -2
  43. package/dist/components/NewComposition/NewCompDuration.js +1 -1
  44. package/dist/components/NewComposition/NewComposition.d.ts +23 -0
  45. package/dist/components/NewComposition/NewComposition.js +217 -80
  46. package/dist/components/{UpdateModal/OpenIssueButton.js → OpenIssueButton.js} +1 -1
  47. package/dist/components/PlaybackRateSelector.js +2 -5
  48. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.d.ts +2 -0
  49. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +28 -7
  50. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +21 -13
  51. package/dist/components/RenderQueue/actions.d.ts +1 -0
  52. package/dist/components/RenderQueue/actions.js +5 -1
  53. package/dist/components/SelectedOutlineCanvasRotation.js +27 -1
  54. package/dist/components/SelectedOutlineElement.js +2 -1
  55. package/dist/components/SelectedOutlineOverlay.js +9 -10
  56. package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
  57. package/dist/components/SelectedOutlinePolygon.js +12 -4
  58. package/dist/components/SelectedOutlineRenderer.d.ts +1 -1
  59. package/dist/components/SelectedOutlineRenderer.js +33 -35
  60. package/dist/components/SettingsContext.js +2 -1
  61. package/dist/components/SettingsModal.d.ts +1 -1
  62. package/dist/components/SettingsModal.js +19 -3
  63. package/dist/components/SidebarRenderButton.d.ts +1 -0
  64. package/dist/components/SidebarRenderButton.js +15 -5
  65. package/dist/components/Timeline/SequencePropsObserver.js +29 -14
  66. package/dist/components/Timeline/TimelineKeyframeControls.js +3 -1
  67. package/dist/components/Timeline/TimelineRowChrome.js +4 -2
  68. package/dist/components/Timeline/TimelineSequence.js +40 -8
  69. package/dist/components/Timeline/TimelineSequenceItem.js +34 -1
  70. package/dist/components/Timeline/TimelineStack/get-stack.d.ts +1 -0
  71. package/dist/components/Timeline/TimelineStack/get-stack.js +35 -3
  72. package/dist/components/Timeline/duplicate-selected-timeline-item.js +23 -25
  73. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -0
  74. package/dist/components/Timeline/get-sequence-context-menu-items.js +34 -1
  75. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -0
  76. package/dist/components/Timeline/sequence-props-subscription-store.js +22 -1
  77. package/dist/components/Timeline/use-sequence-props-subscription.js +7 -0
  78. package/dist/components/TimelineCombobox.js +1 -0
  79. package/dist/components/UpdateCheck.d.ts +0 -8
  80. package/dist/components/UpdateCheck.js +7 -54
  81. package/dist/components/UpdateStatusContext.d.ts +18 -0
  82. package/dist/components/UpdateStatusContext.js +74 -0
  83. package/dist/components/UpdatesSettings.d.ts +2 -0
  84. package/dist/components/UpdatesSettings.js +251 -0
  85. package/dist/components/WebMcp.d.ts +2 -0
  86. package/dist/components/WebMcp.js +945 -0
  87. package/dist/components/composition-menu-items.js +26 -0
  88. package/dist/components/get-open-in-menu-items.d.ts +4 -0
  89. package/dist/components/get-open-in-menu-items.js +28 -24
  90. package/dist/components/root-composition-menu-items.d.ts +4 -1
  91. package/dist/components/root-composition-menu-items.js +38 -1
  92. package/dist/components/selected-outline-measurement.d.ts +11 -0
  93. package/dist/components/selected-outline-measurement.js +13 -5
  94. package/dist/components/use-configure-default-apps.d.ts +1 -0
  95. package/dist/components/use-configure-default-apps.js +24 -0
  96. package/dist/error-overlay/remotion-overlay/CodeFrame.js +5 -6
  97. package/dist/error-overlay/remotion-overlay/CopyStackTrace.js +1 -1
  98. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +47 -18
  99. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +1 -1
  100. package/dist/error-overlay/remotion-overlay/ErrorTitle.js +5 -4
  101. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +48 -76
  102. package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
  103. package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -2
  104. package/dist/error-overlay/remotion-overlay/StackFrame.js +13 -8
  105. package/dist/error-overlay/remotion-overlay/Symbolicating.js +1 -1
  106. package/dist/esm/{chunk-gzqm3g2m.js → chunk-1fkq5bfq.js} +24093 -21093
  107. package/dist/esm/chunk-6jf1natv.js +25 -0
  108. package/dist/esm/{chunk-4bxz1d3g.js → chunk-je0h1bgt.js} +1 -28
  109. package/dist/esm/chunk-m0jqdbkr.js +14571 -0
  110. package/dist/esm/index.mjs +0 -2
  111. package/dist/esm/internals.mjs +43231 -25675
  112. package/dist/esm/previewEntry.mjs +46334 -28776
  113. package/dist/esm/renderEntry.mjs +6 -3
  114. package/dist/helpers/can-show-updates.d.ts +5 -0
  115. package/dist/helpers/can-show-updates.js +7 -0
  116. package/dist/helpers/colors.d.ts +0 -3
  117. package/dist/helpers/colors.js +2 -5
  118. package/dist/helpers/create-folder-tree.d.ts +5 -0
  119. package/dist/helpers/create-folder-tree.js +40 -2
  120. package/dist/helpers/format-file-location.d.ts +8 -0
  121. package/dist/helpers/format-file-location.js +14 -3
  122. package/dist/helpers/get-asset-metadata.js +1 -1
  123. package/dist/helpers/get-git-menu-item.d.ts +5 -0
  124. package/dist/helpers/get-git-menu-item.js +15 -1
  125. package/dist/helpers/get-timeline-max-zoom.d.ts +8 -0
  126. package/dist/helpers/get-timeline-max-zoom.js +17 -6
  127. package/dist/helpers/hoverable.d.ts +1 -0
  128. package/dist/helpers/hoverable.js +14 -6
  129. package/dist/helpers/open-in-editor.js +51 -1
  130. package/dist/helpers/preview-server-events.js +3 -0
  131. package/dist/helpers/timeline-layout.d.ts +0 -1
  132. package/dist/helpers/timeline-layout.js +1 -5
  133. package/dist/helpers/url-state.d.ts +1 -0
  134. package/dist/helpers/url-state.js +12 -5
  135. package/dist/icons/enter.d.ts +4 -0
  136. package/dist/icons/enter.js +10 -0
  137. package/dist/renderEntry.js +2 -0
  138. package/dist/state/folders.d.ts +3 -0
  139. package/dist/state/folders.js +40 -1
  140. package/dist/state/modals.d.ts +1 -6
  141. package/dist/state/playbackrate.d.ts +1 -0
  142. package/dist/state/playbackrate.js +4 -1
  143. package/package.json +17 -14
  144. package/dist/components/UpdateModal/UpdateModal.d.ts +0 -6
  145. package/dist/components/UpdateModal/UpdateModal.js +0 -104
  146. /package/dist/components/{UpdateModal/OpenIssueButton.d.ts → OpenIssueButton.d.ts} +0 -0
@@ -11,6 +11,7 @@ const serializeCaptions = (captions) => {
11
11
  return JSON.stringify(captions);
12
12
  };
13
13
  const getCaptionPatches = ({ previous, next, }) => {
14
+ var _a;
14
15
  if (previous.length !== next.length) {
15
16
  return null;
16
17
  }
@@ -20,11 +21,21 @@ const getCaptionPatches = ({ previous, next, }) => {
20
21
  if (!after) {
21
22
  return null;
22
23
  }
24
+ const changes = {};
23
25
  if (before.text !== after.text) {
26
+ changes.text = after.text;
27
+ }
28
+ if (Boolean(before.pageBreakAfter) !== Boolean(after.pageBreakAfter)) {
29
+ changes.pageBreakAfter = Boolean(after.pageBreakAfter);
30
+ }
31
+ if (Object.keys(changes).length > 0) {
24
32
  patches.push({
25
33
  index,
26
- before,
27
- changes: { text: after.text },
34
+ before: {
35
+ ...before,
36
+ pageBreakAfter: (_a = before.pageBreakAfter) !== null && _a !== void 0 ? _a : null,
37
+ },
38
+ changes,
28
39
  });
29
40
  }
30
41
  }
@@ -6,14 +6,16 @@ const react_1 = require("react");
6
6
  const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
7
7
  const client_id_1 = require("../helpers/client-id");
8
8
  const colors_1 = require("../helpers/colors");
9
+ const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
9
10
  const open_in_editor_1 = require("../helpers/open-in-editor");
10
11
  const caret_1 = require("../icons/caret");
11
12
  const editor_1 = require("../icons/editor");
12
- const modals_1 = require("../state/modals");
13
+ const github_1 = require("../icons/github");
13
14
  const get_open_in_menu_items_1 = require("./get-open-in-menu-items");
14
15
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
15
16
  const actions_1 = require("./RenderQueue/actions");
16
17
  const SegmentedButton_1 = require("./SegmentedButton");
18
+ const use_configure_default_apps_1 = require("./use-configure-default-apps");
17
19
  const use_default_editor_info_1 = require("./use-default-editor-info");
18
20
  const mainSegmentStyle = {
19
21
  columnGap: 4,
@@ -28,9 +30,11 @@ const dropdownSegmentStyle = {
28
30
  const editorButtonIconSize = 18;
29
31
  const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locationType }) => {
30
32
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
31
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
33
+ const configureDefaultApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
32
34
  const { canConfigureApps, canOpenInEditor, defaultEditorId, defaultEditorName, editorInfo, } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
33
35
  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;
34
38
  const openWithEditor = (0, react_1.useCallback)(async (editorId) => {
35
39
  if (!location) {
36
40
  return;
@@ -53,35 +57,36 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
53
57
  (0, NotificationCenter_1.showNotification)(err.message, 2000);
54
58
  }
55
59
  }, [contextForAgents]);
56
- const editorName = defaultEditorName !== null && defaultEditorName !== void 0 ? defaultEditorName : 'default editor';
57
- const canOpenDefault = location !== null && canOpenInEditor;
60
+ const defaultAppName = defaultActionIsGitHub
61
+ ? 'GitHub'
62
+ : (defaultEditorName !== null && defaultEditorName !== void 0 ? defaultEditorName : 'default editor');
63
+ const canOpenDefault = location !== null && (canOpenInEditor || canOpenInGitHub);
58
64
  const onOpenDefault = (0, react_1.useCallback)((event) => {
59
65
  event.stopPropagation();
60
- if (defaultEditorId) {
66
+ if (defaultActionIsGitHub) {
67
+ (0, get_git_menu_item_1.openGitSource)({ folder: locationType === 'folder', location });
68
+ }
69
+ else if (defaultEditorId) {
61
70
  openWithEditor(defaultEditorId).catch(() => undefined);
62
71
  }
63
- }, [defaultEditorId, openWithEditor]);
72
+ }, [
73
+ defaultActionIsGitHub,
74
+ defaultEditorId,
75
+ location,
76
+ locationType,
77
+ openWithEditor,
78
+ ]);
64
79
  const menuItems = (0, react_1.useMemo)(() => {
65
- return (0, get_open_in_menu_items_1.getOpenInMenuItems)({
80
+ const items = (0, get_open_in_menu_items_1.getOpenInMenuItems)({
66
81
  codingAgentInfo,
67
- editorDisabled: location === null,
82
+ editorDisabled: location === null || !canOpenInEditor,
68
83
  editorInfo,
69
84
  excludeCodingAgentId: null,
70
85
  excludeEditorId: defaultEditorId,
71
- fileManagerDisabled: !(location === null || location === void 0 ? void 0 : location.source),
86
+ fileManagerDisabled: !(location === null || location === void 0 ? void 0 : location.source) || previewServerState.type !== 'connected',
72
87
  folder: locationType === 'folder',
73
88
  location,
74
- onConfigureApps: canConfigureApps
75
- ? () => {
76
- var _a;
77
- var _b;
78
- setSelectedModal({
79
- type: 'settings',
80
- initialTab: 'apps',
81
- initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
82
- });
83
- }
84
- : null,
89
+ onConfigureApps: configureDefaultApps,
85
90
  onOpenInCodingAgent: (codingAgentId, codingAgentName) => {
86
91
  openWithCodingAgent(codingAgentId, codingAgentName).catch(() => undefined);
87
92
  },
@@ -122,34 +127,40 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
122
127
  });
123
128
  },
124
129
  });
130
+ return defaultActionIsGitHub
131
+ ? items.filter((item) => item.id !== 'open-in-github')
132
+ : items;
125
133
  }, [
126
134
  codingAgentInfo,
127
- canConfigureApps,
135
+ canOpenInEditor,
136
+ configureDefaultApps,
137
+ defaultActionIsGitHub,
128
138
  defaultEditorId,
129
139
  editorInfo,
130
140
  location,
131
141
  locationType,
132
142
  openWithCodingAgent,
133
143
  openWithEditor,
134
- setSelectedModal,
144
+ previewServerState.type,
135
145
  ]);
136
146
  const segments = (0, react_1.useMemo)(() => {
137
- return [
147
+ const result = [
138
148
  {
139
- ariaLabel: `Open in ${editorName}`,
149
+ ariaLabel: `Open in ${defaultAppName}`,
140
150
  buttonId: null,
141
151
  disabled: !canOpenDefault,
142
152
  idleColor: colors_1.LIGHT_TEXT,
143
153
  onClick: onOpenDefault,
144
154
  onPointerDown: null,
145
- renderContent: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: defaultEditorId, size: editorButtonIconSize })
146
- ] })),
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 }))] })),
147
156
  segmentId: 'default-editor',
148
157
  style: mainSegmentStyle,
149
- title: `Open in ${editorName}`,
158
+ title: `Open in ${defaultAppName}`,
150
159
  type: 'action',
151
160
  },
152
- {
161
+ ];
162
+ if (menuItems.length > 0) {
163
+ result.push({
153
164
  ariaLabel: 'Open in another app',
154
165
  buttonId: null,
155
166
  disabled: false,
@@ -163,18 +174,22 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
163
174
  title: 'Open in another app',
164
175
  type: 'menu',
165
176
  values: menuItems,
166
- },
167
- ];
177
+ });
178
+ }
179
+ return result;
168
180
  }, [
169
181
  canOpenDefault,
182
+ defaultActionIsGitHub,
183
+ defaultAppName,
170
184
  defaultEditorId,
171
- editorName,
172
185
  label,
173
186
  menuItems,
174
187
  onOpenDefault,
175
188
  ]);
176
- if (previewServerState.type !== 'connected' ||
177
- (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
189
+ if ((0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
190
+ return null;
191
+ }
192
+ if (previewServerState.type !== 'connected' && !canOpenInGitHub) {
178
193
  return null;
179
194
  }
180
195
  return jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: null, title: null });
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
7
7
  const client_id_1 = require("../../helpers/client-id");
8
+ const colors_1 = require("../../helpers/colors");
8
9
  const download_blob_1 = require("../../helpers/download-blob");
9
10
  const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
10
11
  const cloud_download_1 = require("../../icons/cloud-download");
@@ -12,8 +13,10 @@ const frame_1 = require("../../icons/frame");
12
13
  const solid_1 = require("../../icons/solid");
13
14
  const video_1 = require("../../icons/video");
14
15
  const VisualControls_1 = require("../../visual-controls/VisualControls");
16
+ const ConfirmationDialog_1 = require("../ConfirmationDialog");
15
17
  const DefaultPropsEditor_1 = require("../DefaultPropsEditor");
16
18
  const get_zod_if_possible_1 = require("../get-zod-if-possible");
19
+ const LicenseExplanation_1 = require("../LicenseExplanation");
17
20
  const is_menu_item_1 = require("../Menu/is-menu-item");
18
21
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
19
22
  const ObserveDefaultPropsContext_1 = require("../ObserveDefaultPropsContext");
@@ -33,15 +36,42 @@ const actionIconStyle = {
33
36
  height: 18,
34
37
  width: 18,
35
38
  };
39
+ const downloadLicenseAgreement = {
40
+ color: colors_1.LIGHT_TEXT,
41
+ fontFamily: 'sans-serif',
42
+ fontSize: 14,
43
+ lineHeight: 1.5,
44
+ marginBottom: 0,
45
+ marginTop: 20,
46
+ };
47
+ const downloadLicenseLink = {
48
+ color: colors_1.LIGHT_TEXT,
49
+ fontFamily: 'sans-serif',
50
+ fontSize: 14,
51
+ lineHeight: '21px',
52
+ };
36
53
  const CompositionActions = () => {
37
54
  var _a;
38
55
  var _b;
39
56
  const { canInsertAsset, canInsertComposition, canInsertSolid, canShowInsertAsset, canShowInsertComposition, canShowInsertSolid, insertAsset, insertComposition, insertSolid, } = (0, use_composition_actions_1.useCompositionActions)();
40
57
  const downloadProject = (_b = (_a = (0, browser_studio_operations_1.getBrowserStudioOperations)()) === null || _a === void 0 ? void 0 : _a.downloadProject) !== null && _b !== void 0 ? _b : null;
58
+ const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
41
59
  const onDownloadProject = (0, react_1.useCallback)(async () => {
42
60
  if (downloadProject === null) {
43
61
  return;
44
62
  }
63
+ const accepted = await confirm({
64
+ title: 'Download project',
65
+ message: (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
66
+ jsx_runtime_1.jsx(LicenseExplanation_1.LicenseExplanation, {}), jsx_runtime_1.jsxs("p", { style: downloadLicenseAgreement, children: ["By downloading this project, you agree to comply with the", ' ', jsx_runtime_1.jsx("a", { href: "https://remotion.dev/license", rel: "noopener noreferrer", style: downloadLicenseLink, target: "_blank", children: "license" }),
67
+ "."] })
68
+ ] })),
69
+ confirmLabel: 'Accept and download',
70
+ cancelLabel: 'Cancel',
71
+ });
72
+ if (!accepted) {
73
+ return;
74
+ }
45
75
  try {
46
76
  const { data, fileName } = await downloadProject();
47
77
  const arrayBuffer = data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);
@@ -50,14 +80,16 @@ const CompositionActions = () => {
50
80
  catch (error) {
51
81
  (0, NotificationCenter_1.showNotification)(`Could not download project: ${error instanceof Error ? error.message : String(error)}`, 2000);
52
82
  }
53
- }, [downloadProject]);
83
+ }, [confirm, downloadProject]);
54
84
  if (!canShowInsertAsset &&
55
85
  !canShowInsertComposition &&
56
86
  !canShowInsertSolid &&
57
87
  downloadProject === null) {
58
88
  return null;
59
89
  }
60
- return (jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [canShowInsertSolid ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertSolid, onClick: insertSolid, renderIcon: (color) => (jsx_runtime_1.jsx(solid_1.SolidIcon, { color: color, style: actionIconStyle })), children: "Add Solid" })) : null, canShowInsertAsset ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertAsset, onClick: insertAsset, renderIcon: (color) => (jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: actionIconStyle })), children: "Add asset..." })) : null, canShowInsertComposition ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertComposition, onClick: insertComposition, renderIcon: (color) => (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: actionIconStyle })), children: "Add composition..." })) : null, canShowInsertAsset ? jsx_runtime_1.jsx(ElementLibraryButton_1.ElementLibraryButton, {}) : null, downloadProject ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: onDownloadProject, renderIcon: (color) => (jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: actionIconStyle })), children: "Download project" })) : null] }));
90
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
91
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Actions" }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [canShowInsertSolid ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertSolid, onClick: insertSolid, renderIcon: (color) => (jsx_runtime_1.jsx(solid_1.SolidIcon, { color: color, style: actionIconStyle })), children: "Add Solid" })) : null, canShowInsertAsset ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertAsset, onClick: insertAsset, renderIcon: (color) => (jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: actionIconStyle })), children: "Add asset..." })) : null, canShowInsertComposition ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertComposition, onClick: insertComposition, renderIcon: (color) => (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: actionIconStyle })), children: "Add composition..." })) : null, canShowInsertAsset ? jsx_runtime_1.jsx(ElementLibraryButton_1.ElementLibraryButton, {}) : null, downloadProject ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: onDownloadProject, renderIcon: (color) => (jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: actionIconStyle })), children: "Download project" })) : null] })
92
+ ] }));
61
93
  };
62
94
  const CompositionDefaultPropsSection = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
63
95
  var _a;
@@ -139,7 +171,7 @@ const CompositionInspector = ({ composition, currentDefaultProps, readOnlyStudio
139
171
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
140
172
  return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
141
173
  jsx_runtime_1.jsxs("div", { style: styles_1.inspectorOverviewSection, children: [
142
- jsx_runtime_1.jsx(CompositionInspectorHeader_1.CompositionInspectorHeader, {}), jsx_runtime_1.jsx(CompositionMetadata_1.CompositionMetadata, { compositionId: composition.id, disabled: readOnlyStudio || previewServerState.type !== 'connected', stack: composition.stack })
174
+ jsx_runtime_1.jsx(CompositionInspectorHeader_1.CompositionInspectorHeader, {}), jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Metadata" }), jsx_runtime_1.jsx(CompositionMetadata_1.CompositionMetadata, { compositionId: composition.id, disabled: readOnlyStudio || previewServerState.type !== 'connected', stack: composition.stack })
143
175
  ] }), jsx_runtime_1.jsx(CompositionDefaultPropsSection, { composition: composition, currentDefaultProps: currentDefaultProps, readOnlyStudio: readOnlyStudio, setDefaultProps: setDefaultProps }), jsx_runtime_1.jsx(CompositionVisualControlsSection, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CompositionActions, {})
144
176
  ] }));
145
177
  };
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const client_id_1 = require("../../helpers/client-id");
8
+ const get_git_menu_item_1 = require("../../helpers/get-git-menu-item");
8
9
  const is_composition_still_1 = require("../../helpers/is-composition-still");
9
10
  const open_in_editor_1 = require("../../helpers/open-in-editor");
10
11
  const react_2 = require("../../icons/react");
@@ -37,6 +38,7 @@ const CompositionInspectorHeader = () => {
37
38
  const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
38
39
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
39
40
  const { canOpenInEditor, defaultEditorId } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
41
+ const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
40
42
  const currentComposition = (0, react_1.useMemo)(() => {
41
43
  var _a;
42
44
  if (!video) {
@@ -72,22 +74,27 @@ const CompositionInspectorHeader = () => {
72
74
  compositionId,
73
75
  });
74
76
  }, [compositionFile, compositionId]);
75
- const openFileLocation = (0, react_1.useCallback)(() => {
76
- if (!validatedLocation || !defaultEditorId || !canOpenInEditor) {
77
+ const openSourceLocation = (0, react_1.useCallback)((location) => {
78
+ if (canOpenInEditor && defaultEditorId) {
79
+ (0, open_in_editor_1.openOriginalPositionInEditor)(location, defaultEditorId).catch((err) => {
80
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
81
+ });
77
82
  return;
78
83
  }
79
- (0, open_in_editor_1.openOriginalPositionInEditor)(validatedLocation, defaultEditorId).catch((err) => {
80
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
81
- });
82
- }, [canOpenInEditor, defaultEditorId, validatedLocation]);
84
+ if (canOpenInGitHub) {
85
+ (0, get_git_menu_item_1.openGitSource)({ folder: false, location });
86
+ }
87
+ }, [canOpenInEditor, canOpenInGitHub, defaultEditorId]);
88
+ const openFileLocation = (0, react_1.useCallback)(() => {
89
+ if (validatedLocation) {
90
+ openSourceLocation(validatedLocation);
91
+ }
92
+ }, [openSourceLocation, validatedLocation]);
83
93
  const openComponentLocation = (0, react_1.useCallback)(() => {
84
- if (!componentLocation || !defaultEditorId || !canOpenInEditor) {
85
- return;
94
+ if (componentLocation) {
95
+ openSourceLocation(componentLocation);
86
96
  }
87
- (0, open_in_editor_1.openOriginalPositionInEditor)(componentLocation, defaultEditorId).catch((err) => {
88
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
89
- });
90
- }, [canOpenInEditor, componentLocation, defaultEditorId]);
97
+ }, [componentLocation, openSourceLocation]);
91
98
  const renderCompositionIcon = (0, react_1.useCallback)((color) => {
92
99
  if (!video) {
93
100
  return null;
@@ -95,8 +102,9 @@ const CompositionInspectorHeader = () => {
95
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 }));
96
103
  }, [video]);
97
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: [
98
- 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, 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 && (canOpenInEditor || canOpenInGitHub), onOpen: openFileLocation, renderIcon: renderCompositionIcon, size: "quick-action" }), compositionComponentInfo === null &&
99
106
  compositionFile !== null &&
100
- compositionId !== null ? (jsx_runtime_1.jsx("div", { "aria-hidden": true, style: componentLocationPlaceholder })) : (jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null && canOpenInEditor, 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 &&
108
+ (canOpenInEditor || canOpenInGitHub), onOpen: openComponentLocation, renderIcon: renderReactIcon, size: "quick-action" }))] })) : null }));
101
109
  };
102
110
  exports.CompositionInspectorHeader = CompositionInspectorHeader;
@@ -36,7 +36,9 @@ const useConnectedCompositions = ({ track, }) => {
36
36
  };
37
37
  exports.useConnectedCompositions = useConnectedCompositions;
38
38
  const ConnectedCompositionsSection = ({ connectedCompositions }) => {
39
- return (jsx_runtime_1.jsx("div", { style: compositionListStyle, children: connectedCompositions.map((composition) => (jsx_runtime_1.jsx(ConnectedCompositionRow, { composition: composition }, composition.id))) }));
39
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
40
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Connected compositions" }), jsx_runtime_1.jsx("div", { style: compositionListStyle, children: connectedCompositions.map((composition) => (jsx_runtime_1.jsx(ConnectedCompositionRow, { composition: composition }, composition.id))) })
41
+ ] }));
40
42
  };
41
43
  exports.ConnectedCompositionsSection = ConnectedCompositionsSection;
42
44
  const ConnectedCompositionRow = ({ composition }) => {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
3
3
  import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
4
4
  type SequenceInspectorSourceLocation = {
5
- readonly canOpenInEditor: boolean;
5
+ readonly canOpen: boolean;
6
6
  readonly openFileLocation: () => void;
7
7
  readonly validatedLocation: CodePosition | null;
8
8
  };
@@ -5,6 +5,7 @@ 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");
8
9
  const react_2 = require("../../icons/react");
9
10
  const InlineEditableTitle_1 = require("../InlineEditableTitle");
10
11
  const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
@@ -48,6 +49,7 @@ const externalTabIndicatorStyle = {
48
49
  };
49
50
  const useSequenceInspectorSourceLocation = (sequence) => {
50
51
  const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
52
+ const canOpenInGitHub = (0, get_git_menu_item_1.hasReadOnlyGitSource)();
51
53
  const validatedLocation = (0, react_1.useMemo)(() => {
52
54
  var _a;
53
55
  if (!originalLocation ||
@@ -62,13 +64,16 @@ const useSequenceInspectorSourceLocation = (sequence) => {
62
64
  };
63
65
  }, [originalLocation]);
64
66
  const openFileLocation = (0, react_1.useCallback)(() => {
65
- if (!canOpenInEditor) {
67
+ if (canOpenInEditor) {
68
+ openInEditor(null);
66
69
  return;
67
70
  }
68
- openInEditor(null);
69
- }, [canOpenInEditor, openInEditor]);
71
+ if (canOpenInGitHub && validatedLocation) {
72
+ (0, get_git_menu_item_1.openGitSource)({ folder: false, location: validatedLocation });
73
+ }
74
+ }, [canOpenInEditor, canOpenInGitHub, openInEditor, validatedLocation]);
70
75
  return {
71
- canOpenInEditor,
76
+ canOpen: validatedLocation !== null && (canOpenInEditor || canOpenInGitHub),
72
77
  openFileLocation,
73
78
  validatedLocation,
74
79
  };
@@ -105,7 +110,7 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
105
110
  }, [saveName]);
106
111
  return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: true, padding: "4px 0", children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, openInEditorLocation: sourceLocation.validatedLocation, children: [
107
112
  jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename, size: "inspector" }), documentationLink ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, style: defaultCursor, title: "Open component docs", onClick: openDocumentationLink, children: [componentName, jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: externalTabIndicatorStyle, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.CURRENT_COLOR, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
108
- ] })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation, renderIcon: renderReactIcon, size: "quick-action" })
113
+ ] })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpen, onOpen: sourceLocation.openFileLocation, renderIcon: renderReactIcon, size: "quick-action" })
109
114
  ] }) }));
110
115
  };
111
116
  exports.SequenceInspectorHeader = SequenceInspectorHeader;
@@ -168,7 +168,7 @@ const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
168
168
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
169
169
  }
170
170
  return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
171
- jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
171
+ jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Actions" }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
172
172
  jsx_runtime_1.jsx(SplitSequenceQuickAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceQuickActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
173
173
  ] })
174
174
  ] })) : (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Source controls unavailable" }))] }));
@@ -76,6 +76,7 @@ const inlineLabelText = {
76
76
  minWidth: 0,
77
77
  overflow: 'hidden',
78
78
  textOverflow: 'ellipsis',
79
+ userSelect: 'none',
79
80
  whiteSpace: 'nowrap',
80
81
  };
81
82
  const inlineLabelIcon = {
@@ -169,6 +169,7 @@ exports.detailLabel = {
169
169
  minWidth: 0,
170
170
  overflow: 'hidden',
171
171
  textOverflow: 'ellipsis',
172
+ userSelect: 'none',
172
173
  whiteSpace: 'nowrap',
173
174
  };
174
175
  exports.detailValue = {
@@ -21,6 +21,7 @@ const InlineCaptionInspector_1 = require("./InlineCaptionInspector");
21
21
  const CollapsibleInspectorSectionHeader_1 = require("./InspectorPanel/CollapsibleInspectorSectionHeader");
22
22
  const common_1 = require("./InspectorPanel/common");
23
23
  const inspector_section_collapse_1 = require("./InspectorPanel/inspector-section-collapse");
24
+ const styles_1 = require("./InspectorPanel/styles");
24
25
  const asset_search_1 = require("./QuickSwitcher/asset-search");
25
26
  const border_radius_representation_1 = require("./Timeline/border-radius-representation");
26
27
  const save_sequence_prop_1 = require("./Timeline/save-sequence-prop");
@@ -51,6 +52,10 @@ const plusIcon = {
51
52
  width: 15,
52
53
  height: 15,
53
54
  };
55
+ const effectsHeaderTitle = {
56
+ ...styles_1.sectionHeaderTitle,
57
+ flexShrink: 1,
58
+ };
54
59
  const borderRadiusToggleIcon = {
55
60
  flexShrink: 0,
56
61
  height: 15,
@@ -411,7 +416,6 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
411
416
  });
412
417
  }, [isAdditionalSectionExpanded, nodePathInfo]);
413
418
  const captionsExpanded = isAdditionalSectionExpanded('captions');
414
- const effectsExpanded = isAdditionalSectionExpanded('effects');
415
419
  const visibleControlRows = controlGroups.flatMap((group) => {
416
420
  return isControlGroupExpanded(group) ? group.rows : [];
417
421
  });
@@ -495,7 +499,8 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
495
499
  : show3DTransformControls
496
500
  ? 'Hide 3D transform controls'
497
501
  : 'Show 3D transform controls', hoveredColor: show3DTransformControls ? colors_1.BLUE : undefined, unhoveredColor: show3DTransformControls ? colors_1.BLUE : colors_1.LIGHT_TEXT, renderAction: (color) => (jsx_runtime_1.jsx(cube_1.CubeIcon, { color: color, style: transform3DToggleIcon })) }));
498
- const effectsHeader = (jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) }), expanded: effectsExpanded, label: "Effects", onToggle: () => toggleAdditionalSection('effects') }));
502
+ const effectsHeader = (jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
503
+ jsx_runtime_1.jsx("div", { style: effectsHeaderTitle, children: "Effects" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) })] }));
499
504
  const renderRow = ({ node, depth }) => {
500
505
  return (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: 0, rowDepthBase: 0, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: "inspector" }) }, JSON.stringify(node.nodePathInfo)));
501
506
  };
@@ -514,7 +519,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
514
519
  inlineCaptions === null) {
515
520
  return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Controls", children: jsx_runtime_1.jsx("div", { style: emptyState, children: "No schema" }) }) }));
516
521
  }
517
- return (jsx_runtime_1.jsx(TimelineAssetField_1.AssetSelectionContext.Provider, { value: assetSelectionContextValue, children: jsx_runtime_1.jsxs("div", { style: container, children: [controlRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: controlGroupsWithoutLayout.map((group) => (jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(group), children: isControlGroupExpanded(group) ? (group.id === 'transforms' ? (jsx_runtime_1.jsxs(Transform3DModeContext_1.Transform3DModeContext.Provider, { value: show3DTransformControls, children: [renderTransformControls(), group.rows.map(renderRow)] })) : (group.rows.map(renderRow))) : null }, group.id))) })) : null, inlineCaptions ? (jsx_runtime_1.jsx(InlineCaptionInspector_1.InlineCaptionInspector, { captions: inlineCaptions, controls: sequence.controls, expanded: captionsExpanded, nodePath: nodePathInfo.sequenceSubscriptionKey, onToggle: () => toggleAdditionalSection('captions'), readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation })) : null, showEffectsSection ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: effectsHeader, children: effectsExpanded && effectRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: effectSelectableItems, children: effectRows.map(renderRow) })) : null })) : null, layoutGroup ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(layoutGroup), children: isControlGroupExpanded(layoutGroup)
522
+ return (jsx_runtime_1.jsx(TimelineAssetField_1.AssetSelectionContext.Provider, { value: assetSelectionContextValue, children: jsx_runtime_1.jsxs("div", { style: container, children: [controlRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: controlGroupsWithoutLayout.map((group) => (jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(group), children: isControlGroupExpanded(group) ? (group.id === 'transforms' ? (jsx_runtime_1.jsxs(Transform3DModeContext_1.Transform3DModeContext.Provider, { value: show3DTransformControls, children: [renderTransformControls(), group.rows.map(renderRow)] })) : (group.rows.map(renderRow))) : null }, group.id))) })) : null, inlineCaptions ? (jsx_runtime_1.jsx(InlineCaptionInspector_1.InlineCaptionInspector, { captions: inlineCaptions, controls: sequence.controls, expanded: captionsExpanded, nodePath: nodePathInfo.sequenceSubscriptionKey, onToggle: () => toggleAdditionalSection('captions'), readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation })) : null, showEffectsSection ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: effectsHeader, children: effectRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: effectSelectableItems, children: effectRows.map(renderRow) })) : null })) : null, layoutGroup ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(layoutGroup), children: isControlGroupExpanded(layoutGroup)
518
523
  ? layoutGroup.rows.map(renderRow)
519
524
  : null }) })) : null] }) }));
520
525
  };
@@ -27,9 +27,13 @@ const sourceLocationStyle = {
27
27
  textAlign: 'left',
28
28
  textDecoration: 'none',
29
29
  textOverflow: 'ellipsis',
30
+ userSelect: 'none',
30
31
  whiteSpace: 'nowrap',
31
32
  width: 'fit-content',
32
33
  };
34
+ const quickActionStyle = {
35
+ userSelect: 'none',
36
+ };
33
37
  const sourceLocationLabelStyle = {
34
38
  color: 'inherit',
35
39
  display: 'block',
@@ -82,7 +86,7 @@ const InspectorSourceLocation = ({ location, canOpen, onOpen, renderIcon, size =
82
86
  return null;
83
87
  }
84
88
  if (size === 'quick-action') {
85
- return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor), title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, children: label }));
89
+ return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor), style: quickActionStyle, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, children: label }));
86
90
  }
87
91
  return (jsx_runtime_1.jsxs("button", { type: "button", style: style, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [renderIcon ? renderIcon(color) : null, jsx_runtime_1.jsx("span", { style: sourceLocationLabelStyle, children: label })
88
92
  ] }));
@@ -1,4 +1,4 @@
1
- import type { Bug } from './UpdateCheck';
1
+ import type { Bug } from './UpdateStatusContext';
2
2
  export declare const KnownBugs: React.FC<{
3
3
  bugs: Bug[];
4
4
  }>;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KnownBugs = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const OpenIssueButton_1 = require("./UpdateModal/OpenIssueButton");
5
+ const OpenIssueButton_1 = require("./OpenIssueButton");
6
6
  const container = {
7
7
  display: 'flex',
8
8
  flexDirection: 'row',
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const LicenseExplanation: React.FC;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LicenseExplanation = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../helpers/colors");
6
+ const description = {
7
+ color: colors_1.LIGHT_TEXT,
8
+ fontFamily: 'sans-serif',
9
+ fontSize: 14,
10
+ lineHeight: 1.5,
11
+ margin: 0,
12
+ };
13
+ const descriptionLink = {
14
+ color: colors_1.LIGHT_TEXT,
15
+ fontFamily: 'sans-serif',
16
+ fontSize: 14,
17
+ lineHeight: '21px',
18
+ };
19
+ const licenseExplanation = {
20
+ display: 'flex',
21
+ flexDirection: 'column',
22
+ gap: 12,
23
+ };
24
+ const licenseExplanationRow = {
25
+ display: 'flex',
26
+ alignItems: 'center',
27
+ gap: 12,
28
+ };
29
+ const people = {
30
+ display: 'grid',
31
+ gridTemplateColumns: 'repeat(4, 9px)',
32
+ gap: 3,
33
+ flexShrink: 0,
34
+ };
35
+ const person = {
36
+ display: 'block',
37
+ height: 24,
38
+ overflow: 'visible',
39
+ width: 9,
40
+ };
41
+ const PersonIcon = ({ handsUp, opacity }) => {
42
+ return (jsx_runtime_1.jsxs("svg", { "aria-hidden": "true", opacity: opacity, style: person, viewBox: "0 0 192 512", xmlns: "http://www.w3.org/2000/svg", children: [
43
+ jsx_runtime_1.jsx("path", { fill: colors_1.LIGHT_TEXT, d: "M128 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM32 64A64 64 0 1 1 160 64 64 64 0 1 1 32 64zm0 128l0 128 128 0 0-128-128 0zM0 160l192 0 0 192-32 0 0 160-32 0 0-160-64 0 0 160-32 0 0-160-32 0 0-192z" }), handsUp ? (jsx_runtime_1.jsx("path", { d: "M10.667 192 0 -32 M181.333 192 192 -32", fill: "none", stroke: colors_1.LIGHT_TEXT, strokeWidth: "32" })) : null] }));
44
+ };
45
+ const LicenseExplanation = () => {
46
+ return (jsx_runtime_1.jsxs("div", { style: licenseExplanation, children: [
47
+ jsx_runtime_1.jsxs("div", { style: licenseExplanationRow, children: [
48
+ jsx_runtime_1.jsxs("div", { style: people, children: [
49
+ jsx_runtime_1.jsx(PersonIcon, { handsUp: true, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: true, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: true, opacity: 1 })
50
+ ] }), jsx_runtime_1.jsx("p", { style: description, children: "Remotion is free to use if you are an individual or company of 3 or less." })
51
+ ] }), jsx_runtime_1.jsxs("div", { style: licenseExplanationRow, children: [
52
+ jsx_runtime_1.jsxs("div", { style: people, children: [
53
+ jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 })
54
+ ] }), jsx_runtime_1.jsxs("p", { style: description, children: ["If used in an organization with 4+ people, you need a", ' ', jsx_runtime_1.jsx("a", { style: descriptionLink, href: "https://remotion.pro/license", children: "Company License" }),
55
+ "."] })
56
+ ] }), jsx_runtime_1.jsxs("div", { style: licenseExplanationRow, children: [
57
+ jsx_runtime_1.jsxs("div", { style: people, children: [
58
+ jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 0.3 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 0.3 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 0.3 })
59
+ ] }), jsx_runtime_1.jsx("p", { style: description, children: "The total headcount matters, not the amount of people using Remotion." })
60
+ ] })
61
+ ] }));
62
+ };
63
+ exports.LicenseExplanation = LicenseExplanation;