@remotion/studio 4.0.478 → 4.0.479

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 (171) hide show
  1. package/dist/components/AssetSelector.js +8 -14
  2. package/dist/components/Button.d.ts +1 -0
  3. package/dist/components/Button.js +8 -5
  4. package/dist/components/CompactExplanation.d.ts +12 -0
  5. package/dist/components/CompactExplanation.js +52 -0
  6. package/dist/components/CompositionSelector.js +2 -4
  7. package/dist/components/CurrentAsset.d.ts +3 -1
  8. package/dist/components/CurrentAsset.js +42 -34
  9. package/dist/components/CurrentComposition.d.ts +1 -1
  10. package/dist/components/CurrentComposition.js +38 -31
  11. package/dist/components/DefaultPropsEditor.d.ts +12 -2
  12. package/dist/components/DefaultPropsEditor.js +2 -2
  13. package/dist/components/EffectPickerModal.d.ts +5 -0
  14. package/dist/components/EffectPickerModal.js +179 -0
  15. package/dist/components/InspectorInfoHeader.d.ts +11 -0
  16. package/dist/components/InspectorInfoHeader.js +55 -0
  17. package/dist/components/InspectorPanel/DefaultInspector.d.ts +8 -0
  18. package/dist/components/InspectorPanel/DefaultInspector.js +93 -0
  19. package/dist/components/InspectorPanel/EasingInspector.d.ts +5 -0
  20. package/dist/components/InspectorPanel/EasingInspector.js +41 -0
  21. package/dist/components/InspectorPanel/GuideInspector.d.ts +7 -0
  22. package/dist/components/InspectorPanel/GuideInspector.js +55 -0
  23. package/dist/components/InspectorPanel/KeyframeInspector.d.ts +7 -0
  24. package/dist/components/InspectorPanel/KeyframeInspector.js +109 -0
  25. package/dist/components/InspectorPanel/SelectedInspector.d.ts +5 -0
  26. package/dist/components/InspectorPanel/SelectedInspector.js +26 -0
  27. package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +5 -0
  28. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +116 -0
  29. package/dist/components/InspectorPanel/common.d.ts +15 -0
  30. package/dist/components/InspectorPanel/common.js +18 -0
  31. package/dist/components/InspectorPanel/inspector-selection.d.ts +10 -0
  32. package/dist/components/InspectorPanel/inspector-selection.js +34 -0
  33. package/dist/components/InspectorPanel/styles.d.ts +27 -0
  34. package/dist/components/InspectorPanel/styles.js +178 -0
  35. package/dist/components/InspectorPanel/use-track-for-selection.d.ts +2 -0
  36. package/dist/components/InspectorPanel/use-track-for-selection.js +22 -0
  37. package/dist/components/InspectorPanel.d.ts +8 -0
  38. package/dist/components/InspectorPanel.js +26 -0
  39. package/dist/components/InspectorPanelLayout.d.ts +1 -0
  40. package/dist/components/InspectorPanelLayout.js +4 -0
  41. package/dist/components/InspectorSequenceSection.d.ts +16 -0
  42. package/dist/components/InspectorSequenceSection.js +147 -0
  43. package/dist/components/InspectorSourceLocation.d.ts +7 -0
  44. package/dist/components/InspectorSourceLocation.js +71 -0
  45. package/dist/components/Modals.js +3 -3
  46. package/dist/components/NewComposition/InputDragger.js +1 -1
  47. package/dist/components/NewComposition/RemInput.d.ts +1 -0
  48. package/dist/components/NewComposition/RemInput.js +8 -2
  49. package/dist/components/NewComposition/RemTextarea.d.ts +1 -0
  50. package/dist/components/NewComposition/RemTextarea.js +8 -2
  51. package/dist/components/NewComposition/ValidationMessage.d.ts +3 -0
  52. package/dist/components/NewComposition/ValidationMessage.js +16 -5
  53. package/dist/components/OptionsPanel.d.ts +1 -1
  54. package/dist/components/OptionsPanel.js +8 -17
  55. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +2 -7
  56. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +3 -10
  57. package/dist/components/QuickSwitcher/shared.d.ts +4 -0
  58. package/dist/components/QuickSwitcher/shared.js +24 -0
  59. package/dist/components/RenderModal/DataEditor.d.ts +29 -2
  60. package/dist/components/RenderModal/DataEditor.js +107 -56
  61. package/dist/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -0
  62. package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +25 -7
  63. package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +2 -1
  64. package/dist/components/RenderModal/SchemaEditor/Fieldset.js +10 -5
  65. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +4 -0
  66. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +27 -4
  67. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +12 -4
  68. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +23 -9
  69. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -3
  70. package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +8 -1
  71. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
  72. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  73. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
  74. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
  75. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -0
  76. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -6
  77. package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +2 -2
  78. package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +2 -1
  79. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
  80. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +9 -11
  81. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
  82. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
  83. package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
  84. package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
  85. package/dist/components/RenderModal/WarningIndicatorButton.d.ts +1 -0
  86. package/dist/components/RenderModal/WarningIndicatorButton.js +17 -4
  87. package/dist/components/RenderModal/get-render-modal-warnings.d.ts +2 -1
  88. package/dist/components/RenderModal/get-render-modal-warnings.js +6 -3
  89. package/dist/components/RendersTab.js +1 -1
  90. package/dist/components/SegmentedControl.d.ts +3 -0
  91. package/dist/components/SegmentedControl.js +11 -5
  92. package/dist/components/SelectedOutlineElement.js +57 -24
  93. package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
  94. package/dist/components/SelectedOutlineOverlay.js +41 -29
  95. package/dist/components/SelectedOutlineUvControls.d.ts +9 -0
  96. package/dist/components/SelectedOutlineUvControls.js +64 -10
  97. package/dist/components/Tabs/index.js +4 -4
  98. package/dist/components/Timeline/EasingEditorModal.d.ts +5 -4
  99. package/dist/components/Timeline/EasingEditorModal.js +597 -124
  100. package/dist/components/Timeline/KeyframeSettingsModal.d.ts +2 -2
  101. package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -2
  102. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +15 -3
  103. package/dist/components/Timeline/TimelineClipboardKeybindings.js +85 -1
  104. package/dist/components/Timeline/TimelineDeleteKeybindings.js +10 -3
  105. package/dist/components/Timeline/TimelineEffectItem.d.ts +2 -2
  106. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +8 -0
  107. package/dist/components/Timeline/TimelineEffectPropItem.js +24 -20
  108. package/dist/components/Timeline/TimelineExpandedRow.d.ts +5 -2
  109. package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
  110. package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -1
  111. package/dist/components/Timeline/TimelineExpandedSection.js +5 -19
  112. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +8 -2
  113. package/dist/components/Timeline/TimelineKeyframeControls.js +24 -3
  114. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -47
  115. package/dist/components/Timeline/TimelineKeyframedValue.d.ts +1 -1
  116. package/dist/components/Timeline/TimelineKeyframedValue.js +8 -10
  117. package/dist/components/Timeline/TimelineNumberField.js +5 -11
  118. package/dist/components/Timeline/TimelineRotationField.js +5 -6
  119. package/dist/components/Timeline/TimelineScaleField.js +4 -8
  120. package/dist/components/Timeline/TimelineSelection.d.ts +6 -0
  121. package/dist/components/Timeline/TimelineSelection.js +109 -14
  122. package/dist/components/Timeline/TimelineSequence.js +19 -3
  123. package/dist/components/Timeline/TimelineSequenceItem.js +12 -67
  124. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +12 -2
  125. package/dist/components/Timeline/TimelineSequencePropItem.js +56 -52
  126. package/dist/components/Timeline/TimelineTransformOriginField.js +4 -5
  127. package/dist/components/Timeline/TimelineTranslateField.js +4 -5
  128. package/dist/components/Timeline/TimelineUvCoordinateField.js +4 -4
  129. package/dist/components/Timeline/call-add-keyframe.d.ts +4 -4
  130. package/dist/components/Timeline/call-delete-keyframe.d.ts +4 -4
  131. package/dist/components/Timeline/call-move-keyframe.d.ts +2 -2
  132. package/dist/components/Timeline/call-update-keyframe-settings.d.ts +3 -3
  133. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +2 -1
  134. package/dist/components/Timeline/delete-selected-timeline-item.js +27 -1
  135. package/dist/components/Timeline/parse-keyframe-field-from-node-path.js +2 -2
  136. package/dist/components/Timeline/reset-selected-timeline-props.d.ts +3 -3
  137. package/dist/components/Timeline/reset-selected-timeline-props.js +19 -5
  138. package/dist/components/Timeline/save-effect-prop.d.ts +2 -2
  139. package/dist/components/Timeline/save-sequence-prop.d.ts +2 -2
  140. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -3
  141. package/dist/components/Timeline/timeline-field-display-utils.d.ts +5 -0
  142. package/dist/components/Timeline/timeline-field-display-utils.js +244 -0
  143. package/dist/components/Timeline/update-selected-easing.d.ts +47 -4
  144. package/dist/components/Timeline/update-selected-easing.js +40 -9
  145. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +13 -0
  146. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +73 -0
  147. package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -3
  148. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +11 -0
  149. package/dist/components/Timeline/use-timeline-expanded-tree.js +33 -0
  150. package/dist/components/VisualControls/VisualControlsContent.d.ts +1 -1
  151. package/dist/components/VisualControls/VisualControlsContent.js +4 -5
  152. package/dist/components/effect-drag-and-drop.d.ts +10 -0
  153. package/dist/components/effect-drag-and-drop.js +17 -8
  154. package/dist/components/effect-picker-search.d.ts +5 -0
  155. package/dist/components/effect-picker-search.js +77 -0
  156. package/dist/components/selected-outline-drag.d.ts +21 -2
  157. package/dist/components/selected-outline-drag.js +31 -6
  158. package/dist/components/selected-outline-types.d.ts +7 -7
  159. package/dist/components/selected-outline-uv.d.ts +4 -3
  160. package/dist/components/selected-outline-uv.js +6 -2
  161. package/dist/esm/{chunk-hrw9799x.js → chunk-fge2mq5p.js} +16535 -13311
  162. package/dist/esm/internals.mjs +16535 -13311
  163. package/dist/esm/previewEntry.mjs +17141 -13917
  164. package/dist/esm/renderEntry.mjs +1 -1
  165. package/dist/helpers/render-codec-label.d.ts +2 -0
  166. package/dist/helpers/render-codec-label.js +49 -0
  167. package/dist/helpers/timeline-layout.d.ts +4 -4
  168. package/dist/helpers/use-media-metadata.d.ts +8 -2
  169. package/dist/helpers/use-media-metadata.js +17 -4
  170. package/dist/state/modals.d.ts +9 -4
  171. package/package.json +12 -12
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InspectorInfoSubtitle = exports.InspectorInfoTitle = exports.InspectorInfoHeader = exports.INSPECTOR_INFO_HEADER_MIN_HEIGHT = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../helpers/colors");
6
+ const InspectorPanelLayout_1 = require("./InspectorPanelLayout");
7
+ exports.INSPECTOR_INFO_HEADER_MIN_HEIGHT = 84;
8
+ const container = {
9
+ backgroundColor: colors_1.BACKGROUND,
10
+ color: 'white',
11
+ display: 'block',
12
+ minHeight: exports.INSPECTOR_INFO_HEADER_MIN_HEIGHT,
13
+ padding: `6px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
14
+ };
15
+ const row = {
16
+ backgroundColor: colors_1.BACKGROUND,
17
+ display: 'flex',
18
+ flexDirection: 'row',
19
+ lineHeight: '18px',
20
+ minWidth: 0,
21
+ };
22
+ const content = {
23
+ minWidth: 0,
24
+ width: '100%',
25
+ };
26
+ const title = {
27
+ backgroundColor: colors_1.BACKGROUND,
28
+ color: 'white',
29
+ fontSize: 12,
30
+ lineHeight: '18px',
31
+ overflow: 'hidden',
32
+ textOverflow: 'ellipsis',
33
+ whiteSpace: 'nowrap',
34
+ };
35
+ const subtitle = {
36
+ backgroundColor: colors_1.BACKGROUND,
37
+ color: colors_1.LIGHT_TEXT,
38
+ fontSize: 12,
39
+ lineHeight: '18px',
40
+ overflow: 'hidden',
41
+ textOverflow: 'ellipsis',
42
+ whiteSpace: 'nowrap',
43
+ };
44
+ const InspectorInfoHeader = ({ children }) => {
45
+ return (jsx_runtime_1.jsx("div", { style: container, children: children === undefined || children === null ? null : (jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsx("div", { style: content, children: children }) })) }));
46
+ };
47
+ exports.InspectorInfoHeader = InspectorInfoHeader;
48
+ const InspectorInfoTitle = ({ children }) => {
49
+ return jsx_runtime_1.jsx("div", { style: title, children: children });
50
+ };
51
+ exports.InspectorInfoTitle = InspectorInfoTitle;
52
+ const InspectorInfoSubtitle = ({ children }) => {
53
+ return jsx_runtime_1.jsx("div", { style: subtitle, children: children });
54
+ };
55
+ exports.InspectorInfoSubtitle = InspectorInfoSubtitle;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { _InternalTypes } from 'remotion';
3
+ import type { UpdaterFunction } from '../RenderModal/SchemaEditor/ZodSwitch';
4
+ export declare const DefaultInspector: React.FC<{
5
+ readonly composition: _InternalTypes['AnyComposition'] | null;
6
+ readonly currentDefaultProps: Record<string, unknown>;
7
+ readonly setDefaultProps: UpdaterFunction<Record<string, unknown>>;
8
+ }>;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DefaultInspector = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
7
+ const VisualControls_1 = require("../../visual-controls/VisualControls");
8
+ const CurrentAsset_1 = require("../CurrentAsset");
9
+ const CurrentComposition_1 = require("../CurrentComposition");
10
+ const DefaultPropsEditor_1 = require("../DefaultPropsEditor");
11
+ const get_zod_if_possible_1 = require("../get-zod-if-possible");
12
+ const is_menu_item_1 = require("../Menu/is-menu-item");
13
+ const ObserveDefaultPropsContext_1 = require("../ObserveDefaultPropsContext");
14
+ const DataEditor_1 = require("../RenderModal/DataEditor");
15
+ const zod_schema_type_1 = require("../RenderModal/SchemaEditor/zod-schema-type");
16
+ const WarningIndicatorButton_1 = require("../RenderModal/WarningIndicatorButton");
17
+ const SegmentedControl_1 = require("../SegmentedControl");
18
+ const VisualControlsContent_1 = require("../VisualControls/VisualControlsContent");
19
+ const common_1 = require("./common");
20
+ const styles_1 = require("./styles");
21
+ const DefaultInspector = ({ composition, currentDefaultProps, setDefaultProps }) => {
22
+ var _a, _b;
23
+ const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
24
+ const hasSelectedAsset = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset';
25
+ const z = (0, get_zod_if_possible_1.useZodIfPossible)();
26
+ const canSaveDefaultProps = (0, react_1.useContext)(ObserveDefaultPropsContext_1.ObserveDefaultPropsContext);
27
+ const { handles: visualControlHandles } = (0, react_1.useContext)(VisualControls_1.VisualControlsContext);
28
+ const [defaultPropsMode, setDefaultPropsMode] = (0, react_1.useState)('schema');
29
+ const compositionId = (_a = composition === null || composition === void 0 ? void 0 : composition.id) !== null && _a !== void 0 ? _a : null;
30
+ const hasVisualControls = Object.keys(visualControlHandles).length > 0;
31
+ (0, react_1.useEffect)(() => {
32
+ setDefaultPropsMode('schema');
33
+ }, [compositionId]);
34
+ const defaultPropsModeItems = (0, react_1.useMemo)(() => {
35
+ return [
36
+ {
37
+ key: 'schema',
38
+ label: 'Schema',
39
+ onClick: () => {
40
+ setDefaultPropsMode('schema');
41
+ },
42
+ selected: defaultPropsMode === 'schema',
43
+ },
44
+ {
45
+ key: 'json',
46
+ label: 'JSON',
47
+ onClick: () => {
48
+ setDefaultPropsMode('json');
49
+ },
50
+ selected: defaultPropsMode === 'json',
51
+ },
52
+ ];
53
+ }, [defaultPropsMode]);
54
+ const canShowDefaultPropsSection = (0, react_1.useMemo)(() => {
55
+ if (!z || !(composition === null || composition === void 0 ? void 0 : composition.schema) || !composition.defaultProps) {
56
+ return false;
57
+ }
58
+ if (!(typeof composition.schema.safeParse ===
59
+ 'function')) {
60
+ return false;
61
+ }
62
+ return (0, zod_schema_type_1.getZodSchemaType)(composition.schema) !== 'any';
63
+ }, [composition === null || composition === void 0 ? void 0 : composition.defaultProps, composition === null || composition === void 0 ? void 0 : composition.schema, z]);
64
+ const { setShowWarning, showWarning } = (0, DataEditor_1.useDataEditorWarningVisibility)();
65
+ const { warnings: defaultPropsWarnings } = (0, DataEditor_1.useDataEditorWarnings)({
66
+ canSaveDefaultProps: (_b = canSaveDefaultProps === null || canSaveDefaultProps === void 0 ? void 0 : canSaveDefaultProps.canSaveDefaultProps) !== null && _b !== void 0 ? _b : null,
67
+ defaultProps: currentDefaultProps,
68
+ mode: defaultPropsMode,
69
+ propsEditType: 'default-props',
70
+ showCannotSaveDefaultPropsWarning: canShowDefaultPropsSection,
71
+ });
72
+ if (hasSelectedAsset) {
73
+ return (jsx_runtime_1.jsx("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx("div", { style: styles_1.compositionSection, children: jsx_runtime_1.jsx(CurrentAsset_1.CurrentAsset, {}) }) }));
74
+ }
75
+ if (composition === null) {
76
+ return jsx_runtime_1.jsx("div", { style: styles_1.container });
77
+ }
78
+ return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
79
+ jsx_runtime_1.jsx("div", { style: styles_1.compositionSection, children: jsx_runtime_1.jsx(CurrentComposition_1.CurrentComposition, {}) }), canShowDefaultPropsSection ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
80
+ jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }), jsx_runtime_1.jsxs("div", { style: styles_1.defaultPropsSection, children: [
81
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
82
+ jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderStart, children: [
83
+ jsx_runtime_1.jsx("span", { style: styles_1.sectionHeaderTitle, children: "Default Props" }), jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: defaultPropsModeItems, needsWrapping: false, size: "compact" })
84
+ ] }), jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderEnd, children: defaultPropsWarnings.length > 0 ? (jsx_runtime_1.jsx(WarningIndicatorButton_1.WarningIndicatorButton, { setShowWarning: setShowWarning, showWarning: showWarning, warningCount: defaultPropsWarnings.length, size: "compact" })) : null })
85
+ ] }) }), defaultPropsWarnings.length > 0 && showWarning ? (jsx_runtime_1.jsx("div", { style: styles_1.defaultPropsWarningContainer, children: jsx_runtime_1.jsx(common_1.InspectorDefaultPropsWarnings, { warnings: defaultPropsWarnings }) })) : null, jsx_runtime_1.jsx(DefaultPropsEditor_1.DefaultPropsEditor, { unresolvedComposition: composition, defaultProps: currentDefaultProps, setDefaultProps: setDefaultProps, propsEditType: "default-props", schemaErrorMode: "compact", layout: "inspector", mode: defaultPropsMode, onModeChange: setDefaultPropsMode, hideModeControls: canShowDefaultPropsSection, warnings: defaultPropsWarnings, showWarning: false, setShowWarning: setShowWarning, hideWarningButton: true }, composition.id)
86
+ ] })
87
+ ] })) : null, hasVisualControls ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
88
+ jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }), jsx_runtime_1.jsxs("div", { style: styles_1.visualControlsSection, children: [
89
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Visual Controls" }), jsx_runtime_1.jsx(VisualControlsContent_1.VisualControlsContent, {})
90
+ ] })
91
+ ] })) : null] }));
92
+ };
93
+ exports.DefaultInspector = DefaultInspector;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { type EasingSelection } from '../Timeline/update-selected-easing';
3
+ export declare const EasingInspector: React.FC<{
4
+ readonly selection: EasingSelection;
5
+ }>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EasingInspector = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
7
+ const is_menu_item_1 = require("../Menu/is-menu-item");
8
+ const SegmentedControl_1 = require("../SegmentedControl");
9
+ const EasingEditorModal_1 = require("../Timeline/EasingEditorModal");
10
+ const TimelineSelection_1 = require("../Timeline/TimelineSelection");
11
+ const update_selected_easing_1 = require("../Timeline/update-selected-easing");
12
+ const common_1 = require("./common");
13
+ const styles_1 = require("./styles");
14
+ const EasingInspector = ({ selection }) => {
15
+ const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
16
+ const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
17
+ const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
18
+ const initialEasing = (0, react_1.useMemo)(() => (0, update_selected_easing_1.getTimelineEasingValueForSelection)({
19
+ selection,
20
+ sequences,
21
+ overrideIdsToNodePaths: overrideIdToNodePathMappings,
22
+ propStatuses,
23
+ }), [overrideIdToNodePathMappings, propStatuses, selection, sequences]);
24
+ const state = (0, react_1.useMemo)(() => {
25
+ if (initialEasing === null) {
26
+ return null;
27
+ }
28
+ return {
29
+ initialEasing,
30
+ selections: [selection],
31
+ };
32
+ }, [initialEasing, selection]);
33
+ const renderHeader = (0, react_1.useCallback)((modeItems) => (jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderRow, children: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderStart, children: [
34
+ jsx_runtime_1.jsx("span", { style: styles_1.sectionHeaderTitle, children: "Easing" }), jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: modeItems, needsWrapping: false, size: "compact" })
35
+ ] }) }) })), []);
36
+ if (state === null) {
37
+ return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Easing unavailable" });
38
+ }
39
+ return (jsx_runtime_1.jsx("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(EasingEditorModal_1.EasingEditor, { state: state, renderHeader: renderHeader }, (0, TimelineSelection_1.getTimelineSelectionKey)(selection)) }));
40
+ };
41
+ exports.EasingInspector = EasingInspector;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { TimelineSelection } from '../Timeline/TimelineSelection';
3
+ export declare const GuideInspector: React.FC<{
4
+ readonly selection: Extract<TimelineSelection, {
5
+ type: 'guide';
6
+ }>;
7
+ }>;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GuideInspector = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const editor_guides_1 = require("../../state/editor-guides");
7
+ const is_menu_item_1 = require("../Menu/is-menu-item");
8
+ const InputDragger_1 = require("../NewComposition/InputDragger");
9
+ const common_1 = require("./common");
10
+ const styles_1 = require("./styles");
11
+ const updateGuidePosition = ({ guideId, persist, position, setGuidesList, }) => {
12
+ setGuidesList((prevState) => {
13
+ const newGuides = prevState.map((guide) => {
14
+ if (guide.id !== guideId) {
15
+ return guide;
16
+ }
17
+ return {
18
+ ...guide,
19
+ position: Math.round(position),
20
+ show: true,
21
+ };
22
+ });
23
+ if (persist) {
24
+ (0, editor_guides_1.persistGuidesList)(newGuides);
25
+ }
26
+ return newGuides;
27
+ });
28
+ };
29
+ const GuideInspector = ({ selection }) => {
30
+ const { guidesList, setGuidesList } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
31
+ const guide = guidesList.find((candidate) => candidate.id === selection.guideId);
32
+ const onValueChange = (0, react_1.useCallback)((value) => {
33
+ updateGuidePosition({
34
+ guideId: selection.guideId,
35
+ persist: false,
36
+ position: value,
37
+ setGuidesList,
38
+ });
39
+ }, [selection.guideId, setGuidesList]);
40
+ const onValueChangeEnd = (0, react_1.useCallback)((value) => {
41
+ updateGuidePosition({
42
+ guideId: selection.guideId,
43
+ persist: true,
44
+ position: value,
45
+ setGuidesList,
46
+ });
47
+ }, [selection.guideId, setGuidesList]);
48
+ if (!guide) {
49
+ return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Guide unavailable" });
50
+ }
51
+ return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
52
+ jsx_runtime_1.jsxs(common_1.InspectorSectionHeader, { children: [guide.orientation === 'vertical' ? 'Vertical' : 'Horizontal', " guide"] }), jsx_runtime_1.jsx("div", { style: styles_1.guideDetailsContainer, children: jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: guide.orientation === 'vertical' ? 'X position' : 'Y position', children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: guide.position, status: "ok", onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: () => undefined, step: 1, formatter: (value) => String(Math.round(Number(value))), rightAlign: true, small: true }) }) })
53
+ ] }));
54
+ };
55
+ exports.GuideInspector = GuideInspector;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { TimelineSelection } from '../Timeline/TimelineSelection';
3
+ export declare const KeyframeInspector: React.FC<{
4
+ readonly selection: Extract<TimelineSelection, {
5
+ type: 'keyframe';
6
+ }>;
7
+ }>;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KeyframeInspector = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
7
+ const timeline_layout_1 = require("../../helpers/timeline-layout");
8
+ const is_menu_item_1 = require("../Menu/is-menu-item");
9
+ const parse_keyframe_field_from_node_path_1 = require("../Timeline/parse-keyframe-field-from-node-path");
10
+ const TimelineEffectPropItem_1 = require("../Timeline/TimelineEffectPropItem");
11
+ const TimelineSequencePropItem_1 = require("../Timeline/TimelineSequencePropItem");
12
+ const common_1 = require("./common");
13
+ const styles_1 = require("./styles");
14
+ const use_track_for_selection_1 = require("./use-track-for-selection");
15
+ const KeyframeInspector = ({ selection }) => {
16
+ const track = (0, use_track_for_selection_1.useTrackForSelection)(selection);
17
+ const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
18
+ const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
19
+ const details = (0, react_1.useMemo)(() => {
20
+ var _a;
21
+ var _b, _c, _d, _e, _f, _g;
22
+ if (!track || !track.sequence.controls) {
23
+ return null;
24
+ }
25
+ const keyframeField = (0, parse_keyframe_field_from_node_path_1.parseKeyframeFieldFromNodePath)(selection.nodePathInfo.auxiliaryKeys);
26
+ if (keyframeField === null) {
27
+ return null;
28
+ }
29
+ const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
30
+ const { keyframeDisplayOffset } = track;
31
+ const sourceFrame = selection.frame - keyframeDisplayOffset;
32
+ if (keyframeField.type === 'sequence') {
33
+ const sequenceFields = (0, timeline_layout_1.getFieldsToShow)({
34
+ schema: track.sequence.controls.schema,
35
+ currentRuntimeValueDotNotation: track.sequence.controls.currentRuntimeValueDotNotation,
36
+ getDragOverrides,
37
+ propStatuses,
38
+ nodePath,
39
+ });
40
+ const sequenceField = (_b = sequenceFields === null || sequenceFields === void 0 ? void 0 : sequenceFields.find((candidate) => candidate.key === keyframeField.fieldKey)) !== null && _b !== void 0 ? _b : null;
41
+ const sequencePropStatus = (_c = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[keyframeField.fieldKey]) !== null && _c !== void 0 ? _c : null;
42
+ if (!sequenceField || (sequencePropStatus === null || sequencePropStatus === void 0 ? void 0 : sequencePropStatus.status) !== 'keyframed') {
43
+ return null;
44
+ }
45
+ return {
46
+ type: 'sequence',
47
+ field: sequenceField,
48
+ fieldLabel: (_d = sequenceField.description) !== null && _d !== void 0 ? _d : sequenceField.key,
49
+ fileName: nodePath.absolutePath,
50
+ nodePath,
51
+ propStatus: sequencePropStatus,
52
+ schema: track.sequence.controls.schema,
53
+ sourceFrame,
54
+ };
55
+ }
56
+ const effect = track.sequence.effects[keyframeField.effectIndex];
57
+ if (!effect) {
58
+ return null;
59
+ }
60
+ const effectFields = (0, timeline_layout_1.getEffectFieldsToShow)({
61
+ effect,
62
+ effectIndex: keyframeField.effectIndex,
63
+ nodePath,
64
+ propStatuses,
65
+ getEffectDragOverrides,
66
+ });
67
+ const effectField = (_e = effectFields.find((candidate) => candidate.key === keyframeField.fieldKey)) !== null && _e !== void 0 ? _e : null;
68
+ const effectStatus = remotion_1.Internals.getEffectPropStatusesCtx({
69
+ propStatuses,
70
+ nodePath,
71
+ effectIndex: keyframeField.effectIndex,
72
+ });
73
+ const effectPropStatus = effectStatus.type === 'can-update-effect'
74
+ ? ((_f = effectStatus.props[keyframeField.fieldKey]) !== null && _f !== void 0 ? _f : null)
75
+ : null;
76
+ if (!effectField || (effectPropStatus === null || effectPropStatus === void 0 ? void 0 : effectPropStatus.status) !== 'keyframed') {
77
+ return null;
78
+ }
79
+ return {
80
+ type: 'effect',
81
+ field: effectField,
82
+ fieldLabel: (_g = effectField.description) !== null && _g !== void 0 ? _g : effectField.key,
83
+ nodePath,
84
+ sourceFrame,
85
+ validatedLocation: {
86
+ source: nodePath.absolutePath,
87
+ line: 1,
88
+ column: 0,
89
+ },
90
+ };
91
+ }, [
92
+ getDragOverrides,
93
+ getEffectDragOverrides,
94
+ propStatuses,
95
+ selection,
96
+ track,
97
+ ]);
98
+ if (details === null) {
99
+ return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Keyframe unavailable" });
100
+ }
101
+ return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
102
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Keyframe" }), jsx_runtime_1.jsxs("div", { style: styles_1.detailsContainer, children: [
103
+ jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Frame", children: selection.frame }), jsx_runtime_1.jsxs("div", { style: styles_1.keyframeEditorRow, children: [
104
+ jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorLabel, children: details.fieldLabel }), jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorValue, children: details.type === 'sequence' ? (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequenceKeyframedValue, { field: details.field, fileName: details.fileName, nodePath: details.nodePath, schema: details.schema, propStatus: details.propStatus, sourceFrame: details.sourceFrame })) : (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropValue, { field: details.field, nodePath: details.nodePath, validatedLocation: details.validatedLocation, sourceFrame: details.sourceFrame })) })
105
+ ] })
106
+ ] })
107
+ ] }));
108
+ };
109
+ exports.KeyframeInspector = KeyframeInspector;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { TimelineSelection } from '../Timeline/TimelineSelection';
3
+ export declare const SelectedInspector: React.FC<{
4
+ readonly selection: TimelineSelection;
5
+ }>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SelectedInspector = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const common_1 = require("./common");
6
+ const EasingInspector_1 = require("./EasingInspector");
7
+ const GuideInspector_1 = require("./GuideInspector");
8
+ const inspector_selection_1 = require("./inspector-selection");
9
+ const KeyframeInspector_1 = require("./KeyframeInspector");
10
+ const SequenceSelectionInspector_1 = require("./SequenceSelectionInspector");
11
+ const SelectedInspector = ({ selection }) => {
12
+ if ((0, inspector_selection_1.isSequenceSectionSelection)(selection)) {
13
+ return jsx_runtime_1.jsx(SequenceSelectionInspector_1.SequenceSelectionInspector, { selection: selection });
14
+ }
15
+ if (selection.type === 'keyframe') {
16
+ return jsx_runtime_1.jsx(KeyframeInspector_1.KeyframeInspector, { selection: selection });
17
+ }
18
+ if (selection.type === 'easing') {
19
+ return jsx_runtime_1.jsx(EasingInspector_1.EasingInspector, { selection: selection });
20
+ }
21
+ if (selection.type === 'guide') {
22
+ return jsx_runtime_1.jsx(GuideInspector_1.GuideInspector, { selection: selection });
23
+ }
24
+ return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Inspector unavailable" });
25
+ };
26
+ exports.SelectedInspector = SelectedInspector;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { SequenceSectionSelection } from './inspector-selection';
3
+ export declare const SequenceSelectionInspector: React.FC<{
4
+ readonly selection: SequenceSectionSelection;
5
+ }>;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SequenceSelectionInspector = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
7
+ const client_id_1 = require("../../helpers/client-id");
8
+ const InspectorSequenceSection_1 = require("../InspectorSequenceSection");
9
+ const InspectorSourceLocation_1 = require("../InspectorSourceLocation");
10
+ const is_menu_item_1 = require("../Menu/is-menu-item");
11
+ const TimelineSelection_1 = require("../Timeline/TimelineSelection");
12
+ const use_open_sequence_in_editor_1 = require("../Timeline/use-open-sequence-in-editor");
13
+ const common_1 = require("./common");
14
+ const styles_1 = require("./styles");
15
+ const use_track_for_selection_1 = require("./use-track-for-selection");
16
+ const useSequenceDisplayName = (track) => {
17
+ var _a;
18
+ var _b;
19
+ const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
20
+ const nodePath = (_b = (_a = track.nodePathInfo) === null || _a === void 0 ? void 0 : _a.sequenceSubscriptionKey) !== null && _b !== void 0 ? _b : null;
21
+ return (0, react_1.useMemo)(() => {
22
+ const propStatusesForOverride = nodePath
23
+ ? remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)
24
+ : undefined;
25
+ const codeNameStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.name;
26
+ const displayName = codeNameStatus &&
27
+ codeNameStatus.status === 'static' &&
28
+ typeof codeNameStatus.codeValue === 'string'
29
+ ? codeNameStatus.codeValue
30
+ : track.sequence.displayName;
31
+ return displayName || '<Sequence>';
32
+ }, [nodePath, propStatuses, track.sequence.displayName]);
33
+ };
34
+ const SequenceExpandedInspector = ({ track }) => {
35
+ const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
36
+ const { selectedItems, selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
37
+ const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(track.sequence);
38
+ const sequenceDisplayName = useSequenceDisplayName(track);
39
+ const { documentationLink } = track.sequence;
40
+ const validatedLocation = (0, react_1.useMemo)(() => {
41
+ var _a;
42
+ if (!originalLocation ||
43
+ !originalLocation.source ||
44
+ !originalLocation.line) {
45
+ return null;
46
+ }
47
+ return {
48
+ source: originalLocation.source,
49
+ line: originalLocation.line,
50
+ column: (_a = originalLocation.column) !== null && _a !== void 0 ? _a : 0,
51
+ };
52
+ }, [originalLocation]);
53
+ const openFileLocation = (0, react_1.useCallback)(() => {
54
+ if (!canOpenInEditor) {
55
+ return;
56
+ }
57
+ openInEditor();
58
+ }, [canOpenInEditor, openInEditor]);
59
+ const openDocumentationLink = (0, react_1.useCallback)(() => {
60
+ if (!documentationLink) {
61
+ return;
62
+ }
63
+ window.open(documentationLink, '_blank', 'noopener,noreferrer');
64
+ }, [documentationLink]);
65
+ const titleStyle = (0, react_1.useMemo)(() => {
66
+ return {
67
+ ...styles_1.sequenceHeaderTitle,
68
+ cursor: documentationLink ? 'pointer' : 'default',
69
+ };
70
+ }, [documentationLink]);
71
+ const sequenceSelection = (0, react_1.useMemo)(() => {
72
+ if (!track.nodePathInfo) {
73
+ return null;
74
+ }
75
+ return {
76
+ type: 'sequence',
77
+ nodePathInfo: track.nodePathInfo,
78
+ };
79
+ }, [track.nodePathInfo]);
80
+ const sequenceSelected = (0, react_1.useMemo)(() => {
81
+ if (sequenceSelection === null || selectedItems.length !== 1) {
82
+ return false;
83
+ }
84
+ return ((0, TimelineSelection_1.getTimelineSelectionKey)(selectedItems[0]) ===
85
+ (0, TimelineSelection_1.getTimelineSelectionKey)(sequenceSelection));
86
+ }, [selectedItems, sequenceSelection]);
87
+ const selectSequenceOnInspectorPointerDown = (0, react_1.useCallback)((event) => {
88
+ if (event.button !== 0 || sequenceSelection === null) {
89
+ return;
90
+ }
91
+ event.stopPropagation();
92
+ if (sequenceSelected) {
93
+ return;
94
+ }
95
+ selectItems([sequenceSelection]);
96
+ }, [selectItems, sequenceSelected, sequenceSelection]);
97
+ if (previewServerState.type !== 'connected') {
98
+ return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Studio server disconnected" });
99
+ }
100
+ if (!track.nodePathInfo ||
101
+ !(0, InspectorSequenceSection_1.hasSequenceControls)(track.sequence) ||
102
+ !validatedLocation) {
103
+ return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
104
+ }
105
+ return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
106
+ jsx_runtime_1.jsxs("div", { style: styles_1.sequenceHeader, children: [documentationLink ? (jsx_runtime_1.jsx("button", { type: "button", style: titleStyle, title: "Open component docs", onClick: openDocumentationLink, children: sequenceDisplayName })) : (jsx_runtime_1.jsx("div", { style: titleStyle, children: sequenceDisplayName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: canOpenInEditor, onOpen: openFileLocation })
107
+ ] }), jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderSectionHeader: (children) => (jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: children })) })] }));
108
+ };
109
+ const SequenceSelectionInspector = ({ selection }) => {
110
+ const track = (0, use_track_for_selection_1.useTrackForSelection)(selection);
111
+ if (!track) {
112
+ return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
113
+ }
114
+ return jsx_runtime_1.jsx(SequenceExpandedInspector, { track: track });
115
+ };
116
+ exports.SequenceSelectionInspector = SequenceSelectionInspector;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import type { RenderModalWarning } from '../RenderModal/DataEditor';
3
+ export declare const InspectorSectionHeader: React.FC<{
4
+ readonly children: React.ReactNode;
5
+ }>;
6
+ export declare const InspectorMessage: React.FC<{
7
+ readonly children: React.ReactNode;
8
+ }>;
9
+ export declare const InspectorDetailRow: React.FC<{
10
+ readonly label: string;
11
+ readonly children: React.ReactNode;
12
+ }>;
13
+ export declare const InspectorDefaultPropsWarnings: React.FC<{
14
+ readonly warnings: RenderModalWarning[];
15
+ }>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InspectorDefaultPropsWarnings = exports.InspectorDetailRow = exports.InspectorMessage = exports.InspectorSectionHeader = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
6
+ const styles_1 = require("./styles");
7
+ const InspectorSectionHeader = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.sectionHeader, children: children });
8
+ exports.InspectorSectionHeader = InspectorSectionHeader;
9
+ const InspectorMessage = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.centeredMessage, children: children });
10
+ exports.InspectorMessage = InspectorMessage;
11
+ const InspectorDetailRow = ({ label, children }) => (jsx_runtime_1.jsxs("div", { style: styles_1.detailRow, children: [
12
+ jsx_runtime_1.jsx("div", { style: styles_1.detailLabel, children: label }), jsx_runtime_1.jsx("div", { style: styles_1.detailValue, children: children })
13
+ ] }));
14
+ exports.InspectorDetailRow = InspectorDetailRow;
15
+ const InspectorDefaultPropsWarnings = ({ warnings }) => {
16
+ return (jsx_runtime_1.jsx("div", { style: styles_1.defaultPropsWarningMessages, children: warnings.map((warning) => (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: warning.message, align: "flex-start", type: "warning", size: "compact", action: warning.resolveLink ? (jsx_runtime_1.jsx("a", { href: warning.resolveLink, target: "_blank", rel: "noopener noreferrer", style: styles_1.resolveLinkStyle, children: "Resolve" })) : null }, warning.id))) }));
17
+ };
18
+ exports.InspectorDefaultPropsWarnings = InspectorDefaultPropsWarnings;
@@ -0,0 +1,10 @@
1
+ import { type TimelineSelection } from '../Timeline/TimelineSelection';
2
+ export type SequenceSectionSelection = Extract<TimelineSelection, {
3
+ type: 'sequence' | 'sequence-prop' | 'sequence-all-effects' | 'sequence-effect' | 'sequence-effect-prop';
4
+ }>;
5
+ export declare const isSequenceSectionSelection: (selection: TimelineSelection) => selection is SequenceSectionSelection;
6
+ type SequencePropSelection = Extract<TimelineSelection, {
7
+ type: 'sequence-prop' | 'sequence-effect-prop';
8
+ }>;
9
+ export declare const getSameSequencePropInspectorSelection: (selections: readonly TimelineSelection[]) => SequencePropSelection | null;
10
+ export {};
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSameSequencePropInspectorSelection = exports.isSequenceSectionSelection = void 0;
4
+ const TimelineSelection_1 = require("../Timeline/TimelineSelection");
5
+ const isSequenceSectionSelection = (selection) => {
6
+ return (selection.type === 'sequence' ||
7
+ selection.type === 'sequence-prop' ||
8
+ selection.type === 'sequence-all-effects' ||
9
+ selection.type === 'sequence-effect' ||
10
+ selection.type === 'sequence-effect-prop');
11
+ };
12
+ exports.isSequenceSectionSelection = isSequenceSectionSelection;
13
+ const isSequencePropSelection = (selection) => {
14
+ return (selection.type === 'sequence-prop' ||
15
+ selection.type === 'sequence-effect-prop');
16
+ };
17
+ const getSameSequencePropInspectorSelection = (selections) => {
18
+ const firstSelection = selections[0];
19
+ if (!firstSelection || !isSequencePropSelection(firstSelection)) {
20
+ return null;
21
+ }
22
+ const rootSequenceKey = (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(firstSelection.nodePathInfo);
23
+ for (const selection of selections) {
24
+ if (!isSequencePropSelection(selection)) {
25
+ return null;
26
+ }
27
+ if ((0, TimelineSelection_1.getTimelineSequenceSelectionKey)(selection.nodePathInfo) !==
28
+ rootSequenceKey) {
29
+ return null;
30
+ }
31
+ }
32
+ return firstSelection;
33
+ };
34
+ exports.getSameSequencePropInspectorSelection = getSameSequencePropInspectorSelection;