@remotion/studio 4.0.290 → 4.0.292

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 (81) hide show
  1. package/.turbo/turbo-make.log +2 -2
  2. package/dist/api/get-zod-schema-from-primitive.d.ts +2 -0
  3. package/dist/api/get-zod-schema-from-primitive.js +18 -0
  4. package/dist/api/save-default-props.js +13 -1
  5. package/dist/api/update-default-props.js +1 -1
  6. package/dist/api/use-visual-control.d.ts +7 -0
  7. package/dist/api/use-visual-control.js +57 -0
  8. package/dist/api/use-visual-controls.d.ts +7 -0
  9. package/dist/api/use-visual-controls.js +57 -0
  10. package/dist/api/visual-control.d.ts +2 -0
  11. package/dist/api/visual-control.js +11 -0
  12. package/dist/components/AskAiModal.d.ts +7 -0
  13. package/dist/components/AskAiModal.js +65 -0
  14. package/dist/components/Canvas.d.ts +0 -1
  15. package/dist/components/Canvas.js +2 -2
  16. package/dist/components/CanvasOrLoading.js +1 -1
  17. package/dist/components/EditorContexts.js +2 -1
  18. package/dist/components/GlobalKeybindings.js +14 -0
  19. package/dist/components/GlobalPropsEditorUpdateButton.js +6 -2
  20. package/dist/components/KeyboardShortcutsExplainer.js +1 -1
  21. package/dist/components/ModalContainer.d.ts +1 -0
  22. package/dist/components/ModalContainer.js +2 -2
  23. package/dist/components/ModalHeader.d.ts +1 -0
  24. package/dist/components/ModalHeader.js +2 -2
  25. package/dist/components/Modals.js +2 -1
  26. package/dist/components/OptionsPanel.d.ts +1 -1
  27. package/dist/components/OptionsPanel.js +12 -2
  28. package/dist/components/Preview.d.ts +0 -1
  29. package/dist/components/Preview.js +3 -5
  30. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +1 -1
  31. package/dist/components/RenderModal/DataEditor.js +11 -4
  32. package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +1 -1
  33. package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +1 -0
  34. package/dist/components/RenderModal/SchemaEditor/Fieldset.js +5 -5
  35. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -1
  36. package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +1 -1
  37. package/dist/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +1 -0
  38. package/dist/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +2 -2
  39. package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.d.ts +17 -0
  40. package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +98 -0
  41. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +6 -0
  42. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +9 -0
  43. package/dist/components/RenderModal/SchemaEditor/extract-enum-json-paths.d.ts +7 -2
  44. package/dist/components/RenderModal/SchemaEditor/extract-enum-json-paths.js +96 -22
  45. package/dist/components/RenderQueue/actions.d.ts +5 -1
  46. package/dist/components/RenderQueue/actions.js +12 -5
  47. package/dist/components/Tabs/index.js +3 -1
  48. package/dist/components/Timeline/TimelineStack/get-stack.d.ts +1 -1
  49. package/dist/components/Timeline/TimelineStack/get-stack.js +4 -2
  50. package/dist/components/Timeline/TimelineStack/index.js +2 -8
  51. package/dist/components/VisualControls/ClickableFileName.d.ts +13 -0
  52. package/dist/components/VisualControls/ClickableFileName.js +43 -0
  53. package/dist/components/VisualControls/VisualControlHandle.d.ts +6 -0
  54. package/dist/components/VisualControls/VisualControlHandle.js +96 -0
  55. package/dist/components/VisualControls/VisualControlHandleHeader.d.ts +4 -0
  56. package/dist/components/VisualControls/VisualControlHandleHeader.js +9 -0
  57. package/dist/components/VisualControls/VisualControlsContent.d.ts +1 -0
  58. package/dist/components/VisualControls/VisualControlsContent.js +53 -0
  59. package/dist/components/VisualControls/get-original-stack-trace.d.ts +2 -0
  60. package/dist/components/VisualControls/get-original-stack-trace.js +31 -0
  61. package/dist/esm/index.mjs +153 -29
  62. package/dist/esm/internals.mjs +4430 -3644
  63. package/dist/esm/previewEntry.mjs +4520 -3734
  64. package/dist/esm/renderEntry.mjs +4545 -3721
  65. package/dist/helpers/get-location-of-sequence.d.ts +1 -0
  66. package/dist/helpers/get-location-of-sequence.js +18 -1
  67. package/dist/helpers/open-in-editor.d.ts +2 -0
  68. package/dist/helpers/open-in-editor.js +11 -1
  69. package/dist/helpers/retry-payload.js +3 -3
  70. package/dist/helpers/use-menu-structure.js +16 -0
  71. package/dist/index.d.ts +1 -0
  72. package/dist/index.js +3 -1
  73. package/dist/renderEntry.js +5 -5
  74. package/dist/state/z-index.d.ts +1 -0
  75. package/dist/state/z-index.js +13 -5
  76. package/dist/visual-controls/VisualControls.d.ts +29 -0
  77. package/dist/visual-controls/VisualControls.js +123 -0
  78. package/dist/visual-controls/get-current-edited-value.d.ts +5 -0
  79. package/dist/visual-controls/get-current-edited-value.js +9 -0
  80. package/package.json +9 -9
  81. package/tsconfig.tsbuildinfo +0 -1
@@ -68,17 +68,17 @@ const containerStyle = (options) => {
68
68
  backgroundPosition: (0, checkerboard_background_1.getCheckerboardBackgroundPos)(checkerboardSize) /* Must be half of one side of the square */,
69
69
  };
70
70
  };
71
- const VideoPreview = ({ canvasSize, contentDimensions, canvasContent, assetMetadata, isRefreshing, }) => {
71
+ const VideoPreview = ({ canvasSize, contentDimensions, canvasContent, assetMetadata }) => {
72
72
  if (assetMetadata && assetMetadata.type === 'not-found') {
73
73
  return ((0, jsx_runtime_1.jsx)("div", { style: centeredContainer, children: (0, jsx_runtime_1.jsx)("div", { style: label, children: "File does not exist" }) }));
74
74
  }
75
75
  if (contentDimensions === null) {
76
76
  return ((0, jsx_runtime_1.jsx)("div", { style: centeredContainer, children: (0, jsx_runtime_1.jsx)(Spinner_1.Spinner, { duration: 0.5, size: 24 }) }));
77
77
  }
78
- return ((0, jsx_runtime_1.jsx)(CompWhenItHasDimensions, { contentDimensions: contentDimensions, canvasSize: canvasSize, canvasContent: canvasContent, assetMetadata: assetMetadata, isRefreshing: isRefreshing }));
78
+ return ((0, jsx_runtime_1.jsx)(CompWhenItHasDimensions, { contentDimensions: contentDimensions, canvasSize: canvasSize, canvasContent: canvasContent, assetMetadata: assetMetadata }));
79
79
  };
80
80
  exports.VideoPreview = VideoPreview;
81
- const CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata, isRefreshing, }) => {
81
+ const CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
82
82
  const { size: previewSize } = (0, react_1.useContext)(remotion_1.Internals.PreviewSizeContext);
83
83
  const { centerX, centerY, yCorrection, xCorrection, scale } = (0, react_1.useMemo)(() => {
84
84
  if (contentDimensions === 'none') {
@@ -114,7 +114,6 @@ const CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent,
114
114
  (0, exports.getPreviewFileType)(canvasContent.asset) === 'audio'
115
115
  ? 'center'
116
116
  : 'normal',
117
- opacity: isRefreshing ? 0.5 : 1,
118
117
  };
119
118
  }, [
120
119
  contentDimensions,
@@ -124,7 +123,6 @@ const CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent,
124
123
  previewSize.translation.y,
125
124
  centerY,
126
125
  canvasContent,
127
- isRefreshing,
128
126
  ]);
129
127
  return ((0, jsx_runtime_1.jsx)("div", { style: outer, children: canvasContent.type === 'asset' ? ((0, jsx_runtime_1.jsx)(StaticFilePreview_1.StaticFilePreview, { assetMetadata: assetMetadata, currentAsset: canvasContent.asset })) : canvasContent.type === 'output' ? ((0, jsx_runtime_1.jsx)(RenderPreview_1.RenderPreview, { path: canvasContent.path, assetMetadata: assetMetadata })) : ((0, jsx_runtime_1.jsx)(PortalContainer, { contentDimensions: contentDimensions, scale: scale, xCorrection: xCorrection, yCorrection: yCorrection })) }));
130
128
  };
@@ -62,7 +62,7 @@ const QuickSwitcherResult = ({ result, selected }) => {
62
62
  commandCtrlKey: false,
63
63
  event: 'keydown',
64
64
  preventDefault: true,
65
- // Input will be focused while sleection
65
+ // Input will be focused while selection
66
66
  triggerIfInputFieldFocused: true,
67
67
  keepRegisteredWhenNotHighestContext: false,
68
68
  });
@@ -107,7 +107,7 @@ const DataEditor = ({ unresolvedComposition, defaultProps, setDefaultProps, mayS
107
107
  return null;
108
108
  }
109
109
  const value = defaultProps;
110
- return no_react_1.NoReactInternals.serializeJSONWithDate({
110
+ return no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
111
111
  data: value,
112
112
  indent: 2,
113
113
  staticBase: window.remotion_staticBase,
@@ -118,6 +118,7 @@ const DataEditor = ({ unresolvedComposition, defaultProps, setDefaultProps, mayS
118
118
  [unresolvedComposition.id]: get_render_modal_warnings_1.defaultTypeCanSaveState,
119
119
  });
120
120
  const z = (0, get_zod_if_possible_1.useZodIfPossible)();
121
+ const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
121
122
  const schema = (0, react_1.useMemo)(() => {
122
123
  if (!z) {
123
124
  return 'no-zod';
@@ -224,12 +225,12 @@ const DataEditor = ({ unresolvedComposition, defaultProps, setDefaultProps, mayS
224
225
  (0, NotificationCenter_1.showNotification)('Cannot update default props: No Zod schema', 2000);
225
226
  return;
226
227
  }
227
- (0, actions_1.callUpdateDefaultPropsApi)(unresolvedComposition.id, defaultProps, (0, extract_enum_json_paths_1.extractEnumJsonPaths)(schema, z, [])).then((response) => {
228
+ (0, actions_1.callUpdateDefaultPropsApi)(unresolvedComposition.id, defaultProps, (0, extract_enum_json_paths_1.extractEnumJsonPaths)({ schema, zodRuntime: z, currentPath: [], zodTypes })).then((response) => {
228
229
  if (!response.success) {
229
230
  (0, NotificationCenter_1.showNotification)(`Cannot update default props: ${response.reason}`, 2000);
230
231
  }
231
232
  });
232
- }, [unresolvedComposition.id, defaultProps, schema, z]);
233
+ }, [schema, z, unresolvedComposition.id, defaultProps, zodTypes]);
233
234
  const onSave = (0, react_1.useCallback)((updater) => {
234
235
  var _a;
235
236
  if (schema === 'no-zod' || schema === 'no-schema' || z === null) {
@@ -239,7 +240,12 @@ const DataEditor = ({ unresolvedComposition, defaultProps, setDefaultProps, mayS
239
240
  window.remotion_ignoreFastRefreshUpdate = fastRefreshes + 1;
240
241
  setSaving(true);
241
242
  const newDefaultProps = updater((_a = unresolvedComposition.defaultProps) !== null && _a !== void 0 ? _a : {});
242
- (0, actions_1.callUpdateDefaultPropsApi)(unresolvedComposition.id, newDefaultProps, (0, extract_enum_json_paths_1.extractEnumJsonPaths)(schema, z, []))
243
+ (0, actions_1.callUpdateDefaultPropsApi)(unresolvedComposition.id, newDefaultProps, (0, extract_enum_json_paths_1.extractEnumJsonPaths)({
244
+ schema,
245
+ zodRuntime: z,
246
+ currentPath: [],
247
+ zodTypes,
248
+ }))
243
249
  .then((response) => {
244
250
  if (!response.success) {
245
251
  // eslint-disable-next-line no-console
@@ -257,6 +263,7 @@ const DataEditor = ({ unresolvedComposition, defaultProps, setDefaultProps, mayS
257
263
  }, [
258
264
  schema,
259
265
  z,
266
+ zodTypes,
260
267
  fastRefreshes,
261
268
  setSaving,
262
269
  unresolvedComposition.defaultProps,
@@ -58,7 +58,7 @@ const scrollable = {
58
58
  };
59
59
  const parseJSON = (str, schema) => {
60
60
  try {
61
- const value = no_react_1.NoReactInternals.deserializeJSONWithCustomFields(str);
61
+ const value = no_react_1.NoReactInternals.deserializeJSONWithSpecialTypes(str);
62
62
  const zodValidation = schema.safeParse(value);
63
63
  return { str, value, validJSON: true, zodValidation };
64
64
  }
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ export declare const SCHEMA_EDITOR_FIELDSET_PADDING = 10;
2
3
  export declare const Fieldset: React.FC<{
3
4
  readonly children: React.ReactNode;
4
5
  readonly success: boolean;
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Fieldset = void 0;
3
+ exports.Fieldset = exports.SCHEMA_EDITOR_FIELDSET_PADDING = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const SCHEMA_EDITOR_FIELDSET_PADDING = 10;
6
+ exports.SCHEMA_EDITOR_FIELDSET_PADDING = 10;
7
7
  const AlreadyPaddedRightContext = (0, react_1.createContext)(false);
8
8
  const Fieldset = ({ children, shouldPad }) => {
9
9
  const alreadyPadded = (0, react_1.useContext)(AlreadyPaddedRightContext);
10
10
  const style = (0, react_1.useMemo)(() => {
11
11
  if (shouldPad) {
12
12
  return {
13
- padding: SCHEMA_EDITOR_FIELDSET_PADDING,
14
- paddingTop: SCHEMA_EDITOR_FIELDSET_PADDING / 2,
15
- paddingRight: alreadyPadded ? 0 : SCHEMA_EDITOR_FIELDSET_PADDING,
13
+ padding: exports.SCHEMA_EDITOR_FIELDSET_PADDING,
14
+ paddingTop: exports.SCHEMA_EDITOR_FIELDSET_PADDING / 2,
15
+ paddingRight: alreadyPadded ? 0 : exports.SCHEMA_EDITOR_FIELDSET_PADDING,
16
16
  };
17
17
  }
18
18
  return {};
@@ -43,6 +43,6 @@ const SchemaLabel = ({ jsonPath, isDefaultValue, onReset, onSave, showSaveButton
43
43
  const labelContent = ((0, jsx_runtime_1.jsxs)("span", { style: labelStyle, children: [(0, get_schema_label_1.getSchemaLabel)(jsonPath), " ", suffix ? suffix : null] }));
44
44
  return ((0, jsx_runtime_1.jsxs)("div", { style: compactStyles, className: scroll_to_default_props_path_1.DEFAULT_PROPS_PATH_CLASSNAME, "data-json-path": jsonPath.join('.'), children: [handleClick ? (
45
45
  // Minus the padding that a button has (user agent padding-line-start)
46
- (0, jsx_runtime_1.jsx)("button", { onPointerEnter: onClickablePointerEnter, onPointerLeave: onClickablePointerLeave, type: "button", onClick: handleClick, style: { border: 'none', marginLeft: -6 }, children: labelContent })) : (labelContent), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), isDefaultValue ? null : (0, jsx_runtime_1.jsx)(SchemaResetButton_1.SchemaResetButton, { onClick: onReset }), isDefaultValue ? null : showSaveButton ? ((0, jsx_runtime_1.jsx)(SchemaSaveButton_1.SchemaSaveButton, { onClick: onSave, disabled: disableSave })) : null, onRemove ? (0, jsx_runtime_1.jsx)(InlineRemoveButton_1.InlineRemoveButton, { onClick: onRemove }) : null] }));
46
+ (0, jsx_runtime_1.jsx)("button", { onPointerEnter: onClickablePointerEnter, onPointerLeave: onClickablePointerLeave, type: "button", onClick: handleClick, style: { border: 'none', padding: 0 }, children: labelContent })) : (labelContent), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), isDefaultValue ? null : (0, jsx_runtime_1.jsx)(SchemaResetButton_1.SchemaResetButton, { onClick: onReset }), isDefaultValue ? null : showSaveButton ? ((0, jsx_runtime_1.jsx)(SchemaSaveButton_1.SchemaSaveButton, { onClick: onSave, disabled: disableSave })) : null, onRemove ? (0, jsx_runtime_1.jsx)(InlineRemoveButton_1.InlineRemoveButton, { onClick: onRemove }) : null] }));
47
47
  };
48
48
  exports.SchemaLabel = SchemaLabel;
@@ -79,7 +79,7 @@ const ZodArrayEditor = ({ schema, jsonPath, setValue, defaultValue, value, onSav
79
79
  var _a;
80
80
  return (
81
81
  // eslint-disable-next-line react/no-array-index-key
82
- (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(ZodArrayItemEditor_1.ZodArrayItemEditor, { onChange: onChange, value: child, def: def, index: i, jsonPath: jsonPath, defaultValue: (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue[i]) !== null && _a !== void 0 ? _a : (0, create_zod_values_1.createZodValues)(def.type, z, zodTypes), onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }), (0, jsx_runtime_1.jsx)(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: i, onChange: onChange, isLast: i === localValue.value.length - 1, showAddButton: true })] }, `${i}${localValue.keyStabilityRevision}`));
82
+ (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(ZodArrayItemEditor_1.ZodArrayItemEditor, { onChange: onChange, value: child, def: def, index: i, jsonPath: jsonPath, defaultValue: (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue[i]) !== null && _a !== void 0 ? _a : (0, create_zod_values_1.createZodValues)(def.type, z, zodTypes), onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad, mayRemove: true }), (0, jsx_runtime_1.jsx)(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: i, onChange: onChange, isLast: i === localValue.value.length - 1, showAddButton: true })] }, `${i}${localValue.keyStabilityRevision}`));
83
83
  }), value.length === 0 ? ((0, jsx_runtime_1.jsx)(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: 0, onChange: onChange, isLast: true, showAddButton: true })) : null] }) })) : null, (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] }));
84
84
  };
85
85
  exports.ZodArrayEditor = ZodArrayEditor;
@@ -12,4 +12,5 @@ export declare const ZodArrayItemEditor: React.FC<{
12
12
  saving: boolean;
13
13
  saveDisabledByParent: boolean;
14
14
  mayPad: boolean;
15
+ mayRemove: boolean;
15
16
  }>;
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
7
7
  const ZodSwitch_1 = require("./ZodSwitch");
8
- const ZodArrayItemEditor = ({ def, onChange, jsonPath, index, value, defaultValue, onSave: onSaveObject, showSaveButton, saving, saveDisabledByParent, mayPad, }) => {
8
+ const ZodArrayItemEditor = ({ def, onChange, jsonPath, index, value, defaultValue, onSave: onSaveObject, showSaveButton, saving, saveDisabledByParent, mayPad, mayRemove, }) => {
9
9
  const z = (0, get_zod_if_possible_1.useZodIfPossible)();
10
10
  if (!z) {
11
11
  throw new Error('expected zod');
@@ -28,6 +28,6 @@ const ZodArrayItemEditor = ({ def, onChange, jsonPath, index, value, defaultValu
28
28
  ...oldV.slice(index + 1),
29
29
  ], false, false);
30
30
  }, [index, onSaveObject]);
31
- return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { jsonPath: newJsonPath, schema: def.type, value: value, setValue: setValue, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }) }));
31
+ return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { jsonPath: newJsonPath, schema: def.type, value: value, setValue: setValue, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: mayRemove ? onRemove : null, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }) }));
32
32
  };
33
33
  exports.ZodArrayItemEditor = ZodArrayItemEditor;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { z } from 'zod';
3
+ import type { UpdaterFunction } from './ZodSwitch';
4
+ import type { JSONPath } from './zod-types';
5
+ export declare const ZodMatrixEditor: React.FC<{
6
+ readonly schema: z.ZodTypeAny;
7
+ readonly jsonPath: JSONPath;
8
+ readonly value: unknown[];
9
+ readonly defaultValue: unknown[];
10
+ readonly setValue: UpdaterFunction<unknown[]>;
11
+ readonly onSave: UpdaterFunction<unknown[]>;
12
+ readonly showSaveButton: boolean;
13
+ readonly onRemove: null | (() => void);
14
+ readonly saving: boolean;
15
+ readonly saveDisabledByParent: boolean;
16
+ readonly mayPad: boolean;
17
+ }>;
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.ZodMatrixEditor = void 0;
37
+ const jsx_runtime_1 = require("react/jsx-runtime");
38
+ const react_1 = __importStar(require("react"));
39
+ const get_zod_if_possible_1 = require("../../get-zod-if-possible");
40
+ const Fieldset_1 = require("./Fieldset");
41
+ const SchemaLabel_1 = require("./SchemaLabel");
42
+ const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
43
+ const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
44
+ const ZodArrayItemEditor_1 = require("./ZodArrayItemEditor");
45
+ const ZodFieldValidation_1 = require("./ZodFieldValidation");
46
+ const create_zod_values_1 = require("./create-zod-values");
47
+ const deep_equal_1 = require("./deep-equal");
48
+ const local_state_1 = require("./local-state");
49
+ const rowStyle = {
50
+ display: 'flex',
51
+ flexDirection: 'row',
52
+ width: '100%',
53
+ };
54
+ const ZodMatrixEditor = ({ schema, jsonPath, setValue, defaultValue, value, onSave, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, }) => {
55
+ const { localValue, onChange, RevisionContextProvider, reset } = (0, local_state_1.useLocalState)({
56
+ unsavedValue: value,
57
+ schema,
58
+ setValue,
59
+ savedValue: defaultValue,
60
+ });
61
+ const [expanded, setExpanded] = (0, react_1.useState)(true);
62
+ const def = schema._def;
63
+ const suffix = (0, react_1.useMemo)(() => {
64
+ return expanded ? ' [' : ' [...] ';
65
+ }, [expanded]);
66
+ const z = (0, get_zod_if_possible_1.useZodIfPossible)();
67
+ if (!z) {
68
+ throw new Error('expected zod');
69
+ }
70
+ const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
71
+ const isDefaultValue = (0, react_1.useMemo)(() => {
72
+ return (0, deep_equal_1.deepEqual)(localValue.value, defaultValue);
73
+ }, [defaultValue, localValue]);
74
+ const dimensions = Math.sqrt(localValue.value.length);
75
+ if (!Number.isInteger(dimensions)) {
76
+ throw new Error('Invalid matrix');
77
+ }
78
+ const chunkedItems = (0, react_1.useMemo)(() => {
79
+ return localValue.value.reduce((acc, item, index) => {
80
+ const chunkIndex = Math.floor(index / dimensions);
81
+ acc[chunkIndex] = acc[chunkIndex] || [];
82
+ acc[chunkIndex].push(item);
83
+ return acc;
84
+ }, []);
85
+ }, [localValue.value, dimensions]);
86
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { onReset: reset, isDefaultValue: isDefaultValue, jsonPath: jsonPath, onRemove: onRemove, suffix: suffix, onSave: () => {
87
+ onSave(() => localValue.value, false, false);
88
+ }, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, valid: localValue.zodValidation.success, handleClick: () => setExpanded(!expanded) }), expanded ? ((0, jsx_runtime_1.jsx)(RevisionContextProvider, { children: (0, jsx_runtime_1.jsxs)(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: false, children: [chunkedItems.map((row, rowIndex) => {
89
+ return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment
90
+ // eslint-disable-next-line react/no-array-index-key
91
+ , { children: (0, jsx_runtime_1.jsx)("div", { style: rowStyle, children: row.map((item, _index) => {
92
+ var _a;
93
+ const actualIndex = rowIndex * dimensions + _index;
94
+ return ((0, jsx_runtime_1.jsx)("div", { style: { flex: 1 }, children: (0, jsx_runtime_1.jsx)(ZodArrayItemEditor_1.ZodArrayItemEditor, { onChange: onChange, value: item, def: def, index: actualIndex, jsonPath: jsonPath, defaultValue: (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue[actualIndex]) !== null && _a !== void 0 ? _a : (0, create_zod_values_1.createZodValues)(def.type, z, zodTypes), onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad, mayRemove: false }) }, `${_index}${localValue.keyStabilityRevision}`));
95
+ }) }) }, `${rowIndex}${localValue.keyStabilityRevision}`));
96
+ }), value.length === 0 ? ((0, jsx_runtime_1.jsx)(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: 0, onChange: onChange, isLast: true, showAddButton: true })) : null] }) })) : null, (0, jsx_runtime_1.jsx)(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })] }));
97
+ };
98
+ exports.ZodMatrixEditor = ZodMatrixEditor;
@@ -11,6 +11,7 @@ const ZodDefaultEditor_1 = require("./ZodDefaultEditor");
11
11
  const ZodDiscriminatedUnionEditor_1 = require("./ZodDiscriminatedUnionEditor");
12
12
  const ZodEffectEditor_1 = require("./ZodEffectEditor");
13
13
  const ZodEnumEditor_1 = require("./ZodEnumEditor");
14
+ const ZodMatrixEditor_1 = require("./ZodMatrixEditor");
14
15
  const ZodNonEditableValue_1 = require("./ZodNonEditableValue");
15
16
  const ZodNullableEditor_1 = require("./ZodNullableEditor");
16
17
  const ZodNumberEditor_1 = require("./ZodNumberEditor");
@@ -80,6 +81,11 @@ const ZodSwitch = ({ schema, jsonPath, value, setValue, defaultValue, onSave, sh
80
81
  zodTypes.ZodZypesInternals.REMOTION_COLOR_BRAND) {
81
82
  return ((0, jsx_runtime_1.jsx)(ZodColorEditor_1.ZodColorEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, onSave: onSave, defaultValue: defaultValue, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
82
83
  }
84
+ if (zodTypes &&
85
+ schema._def.description ===
86
+ zodTypes.ZodZypesInternals.REMOTION_MATRIX_BRAND) {
87
+ return ((0, jsx_runtime_1.jsx)(ZodMatrixEditor_1.ZodMatrixEditor, { setValue: setValue, value: value, jsonPath: jsonPath, schema: schema._def.schema, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
88
+ }
83
89
  return ((0, jsx_runtime_1.jsx)(ZodEffectEditor_1.ZodEffectEditor, { value: value, setValue: setValue, jsonPath: jsonPath, schema: schema, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, mayPad: mayPad }));
84
90
  }
85
91
  if (typeName === z.ZodFirstPartyTypeKind.ZodUnion) {
@@ -81,6 +81,15 @@ const createZodValues = (schema, zodRuntime, zodTypes) => {
81
81
  zodTypes.ZodZypesInternals.REMOTION_TEXTAREA_BRAND) {
82
82
  return '';
83
83
  }
84
+ if (zodTypes &&
85
+ schema._def.description ===
86
+ zodTypes.ZodZypesInternals.REMOTION_MATRIX_BRAND) {
87
+ return [
88
+ [1, 0, 0],
89
+ [0, 1, 0],
90
+ [0, 0, 1],
91
+ ];
92
+ }
84
93
  return (0, exports.createZodValues)(def.schema, zodRuntime, zodTypes);
85
94
  }
86
95
  case zodRuntime.ZodFirstPartyTypeKind.ZodIntersection: {
@@ -1,2 +1,7 @@
1
- import type { ZodType } from '../../get-zod-if-possible';
2
- export declare const extractEnumJsonPaths: (schema: Zod.ZodTypeAny, zodRuntime: ZodType, currentPath: (string | number)[]) => (string | number)[][];
1
+ import type { ZodType, ZodTypesType } from '../../get-zod-if-possible';
2
+ export declare const extractEnumJsonPaths: ({ schema, zodRuntime, currentPath, zodTypes, }: {
3
+ schema: Zod.ZodTypeAny;
4
+ zodRuntime: ZodType;
5
+ zodTypes: ZodTypesType | null;
6
+ currentPath: (string | number)[];
7
+ }) => (string | number)[][];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.extractEnumJsonPaths = void 0;
4
- const extractEnumJsonPaths = (schema, zodRuntime, currentPath) => {
4
+ const extractEnumJsonPaths = ({ schema, zodRuntime, currentPath, zodTypes, }) => {
5
5
  const def = schema._def;
6
6
  const typeName = def.typeName;
7
7
  switch (typeName) {
@@ -10,30 +10,44 @@ const extractEnumJsonPaths = (schema, zodRuntime, currentPath) => {
10
10
  const keys = Object.keys(shape);
11
11
  return keys
12
12
  .map((key) => {
13
- return (0, exports.extractEnumJsonPaths)(shape[key], zodRuntime, [
14
- ...currentPath,
15
- key,
16
- ]);
13
+ return (0, exports.extractEnumJsonPaths)({
14
+ schema: shape[key],
15
+ zodRuntime,
16
+ currentPath: [...currentPath, key],
17
+ zodTypes,
18
+ });
17
19
  })
18
20
  .flat(1);
19
21
  }
20
22
  case zodRuntime.ZodFirstPartyTypeKind.ZodArray: {
21
- return (0, exports.extractEnumJsonPaths)(def.type, zodRuntime, [
22
- ...currentPath,
23
- '[]',
24
- ]);
23
+ return (0, exports.extractEnumJsonPaths)({
24
+ schema: def.type,
25
+ zodRuntime,
26
+ currentPath: [...currentPath, '[]'],
27
+ zodTypes,
28
+ });
25
29
  }
26
30
  case zodRuntime.ZodFirstPartyTypeKind.ZodUnion: {
27
31
  return def.options
28
32
  .map((option) => {
29
- return (0, exports.extractEnumJsonPaths)(option, zodRuntime, currentPath);
33
+ return (0, exports.extractEnumJsonPaths)({
34
+ schema: option,
35
+ zodRuntime,
36
+ currentPath,
37
+ zodTypes,
38
+ });
30
39
  })
31
40
  .flat(1);
32
41
  }
33
42
  case zodRuntime.ZodFirstPartyTypeKind.ZodDiscriminatedUnion: {
34
43
  return def.options
35
44
  .map((op) => {
36
- return (0, exports.extractEnumJsonPaths)(op, zodRuntime, currentPath);
45
+ return (0, exports.extractEnumJsonPaths)({
46
+ schema: op,
47
+ zodRuntime,
48
+ currentPath,
49
+ zodTypes,
50
+ });
37
51
  })
38
52
  .flat(1);
39
53
  }
@@ -41,21 +55,51 @@ const extractEnumJsonPaths = (schema, zodRuntime, currentPath) => {
41
55
  return [currentPath];
42
56
  }
43
57
  case zodRuntime.ZodFirstPartyTypeKind.ZodEffects: {
44
- return (0, exports.extractEnumJsonPaths)(def.schema, zodRuntime, currentPath);
58
+ if (zodTypes &&
59
+ schema._def.description ===
60
+ zodTypes.ZodZypesInternals.REMOTION_MATRIX_BRAND) {
61
+ return [currentPath];
62
+ }
63
+ return (0, exports.extractEnumJsonPaths)({
64
+ schema: def.schema,
65
+ zodRuntime,
66
+ currentPath,
67
+ zodTypes,
68
+ });
45
69
  }
46
70
  case zodRuntime.ZodFirstPartyTypeKind.ZodIntersection: {
47
71
  const { left, right } = def;
48
- const leftValue = (0, exports.extractEnumJsonPaths)(left, zodRuntime, currentPath);
49
- const rightValue = (0, exports.extractEnumJsonPaths)(right, zodRuntime, currentPath);
72
+ const leftValue = (0, exports.extractEnumJsonPaths)({
73
+ schema: left,
74
+ zodRuntime,
75
+ currentPath,
76
+ zodTypes,
77
+ });
78
+ const rightValue = (0, exports.extractEnumJsonPaths)({
79
+ schema: right,
80
+ zodRuntime,
81
+ currentPath,
82
+ zodTypes,
83
+ });
50
84
  return [...leftValue, ...rightValue];
51
85
  }
52
86
  case zodRuntime.ZodFirstPartyTypeKind.ZodTuple: {
53
87
  return def.items
54
- .map((item, i) => (0, exports.extractEnumJsonPaths)(item, zodRuntime, [...currentPath, i]))
88
+ .map((item, i) => (0, exports.extractEnumJsonPaths)({
89
+ schema: item,
90
+ zodRuntime,
91
+ currentPath: [...currentPath, i],
92
+ zodTypes,
93
+ }))
55
94
  .flat(1);
56
95
  }
57
96
  case zodRuntime.ZodFirstPartyTypeKind.ZodRecord: {
58
- const values = (0, exports.extractEnumJsonPaths)(def.valueType, zodRuntime, [...currentPath, '{}']);
97
+ const values = (0, exports.extractEnumJsonPaths)({
98
+ schema: def.valueType,
99
+ zodRuntime,
100
+ currentPath: [...currentPath, '{}'],
101
+ zodTypes,
102
+ });
59
103
  return values;
60
104
  }
61
105
  case zodRuntime.ZodFirstPartyTypeKind.ZodFunction: {
@@ -69,21 +113,41 @@ const extractEnumJsonPaths = (schema, zodRuntime, currentPath) => {
69
113
  }
70
114
  case zodRuntime.ZodFirstPartyTypeKind.ZodOptional: {
71
115
  const defType = def;
72
- const value = (0, exports.extractEnumJsonPaths)(defType.innerType, zodRuntime, currentPath);
116
+ const value = (0, exports.extractEnumJsonPaths)({
117
+ schema: defType.innerType,
118
+ zodRuntime,
119
+ currentPath,
120
+ zodTypes,
121
+ });
73
122
  return value;
74
123
  }
75
124
  case zodRuntime.ZodFirstPartyTypeKind.ZodNullable: {
76
125
  const defType = def;
77
- const value = (0, exports.extractEnumJsonPaths)(defType.innerType, zodRuntime, currentPath);
126
+ const value = (0, exports.extractEnumJsonPaths)({
127
+ schema: defType.innerType,
128
+ zodRuntime,
129
+ currentPath,
130
+ zodTypes,
131
+ });
78
132
  return value;
79
133
  }
80
134
  case zodRuntime.ZodFirstPartyTypeKind.ZodDefault: {
81
135
  const defType = def;
82
- return (0, exports.extractEnumJsonPaths)(defType.innerType, zodRuntime, currentPath);
136
+ return (0, exports.extractEnumJsonPaths)({
137
+ schema: defType.innerType,
138
+ zodRuntime,
139
+ currentPath,
140
+ zodTypes,
141
+ });
83
142
  }
84
143
  case zodRuntime.ZodFirstPartyTypeKind.ZodCatch: {
85
144
  const defType = def;
86
- return (0, exports.extractEnumJsonPaths)(defType.innerType, zodRuntime, currentPath);
145
+ return (0, exports.extractEnumJsonPaths)({
146
+ schema: defType.innerType,
147
+ zodRuntime,
148
+ currentPath,
149
+ zodTypes,
150
+ });
87
151
  }
88
152
  case zodRuntime.ZodFirstPartyTypeKind.ZodPromise: {
89
153
  return [];
@@ -91,13 +155,23 @@ const extractEnumJsonPaths = (schema, zodRuntime, currentPath) => {
91
155
  case zodRuntime.ZodFirstPartyTypeKind.ZodBranded: {
92
156
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
93
157
  const defType = def;
94
- const value = (0, exports.extractEnumJsonPaths)(defType.type, zodRuntime, currentPath);
158
+ const value = (0, exports.extractEnumJsonPaths)({
159
+ schema: defType.type,
160
+ zodRuntime,
161
+ currentPath,
162
+ zodTypes,
163
+ });
95
164
  return value;
96
165
  }
97
166
  case zodRuntime.ZodFirstPartyTypeKind.ZodPipeline: {
98
167
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
99
168
  const defType = def;
100
- const value = (0, exports.extractEnumJsonPaths)(defType.out, zodRuntime, currentPath);
169
+ const value = (0, exports.extractEnumJsonPaths)({
170
+ schema: defType.out,
171
+ zodRuntime,
172
+ currentPath,
173
+ zodTypes,
174
+ });
101
175
  return value;
102
176
  }
103
177
  case zodRuntime.ZodFirstPartyTypeKind.ZodString:
@@ -1,6 +1,6 @@
1
1
  import type { AudioCodec, ChromeMode, Codec, ColorSpace, LogLevel, PixelFormat, ProResProfile, StillImageFormat, VideoImageFormat, X264Preset } from '@remotion/renderer';
2
2
  import type { HardwareAccelerationOption } from '@remotion/renderer/client';
3
- import type { CanUpdateDefaultPropsResponse, EnumPath, RecastCodemod, RenderJob, RequiredChromiumOptions } from '@remotion/studio-shared';
3
+ import type { CanUpdateDefaultPropsResponse, EnumPath, RecastCodemod, RenderJob, RequiredChromiumOptions, VisualControlChange } from '@remotion/studio-shared';
4
4
  export declare const addStillRenderJob: ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, logLevel, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, multiProcessOnLinux, beepOnFinish, metadata, chromeMode, }: {
5
5
  compositionId: string;
6
6
  outName: string;
@@ -106,3 +106,7 @@ export declare const updateAvailable: (signal: AbortSignal) => Promise<import("@
106
106
  export declare const getProjectInfo: (signal: AbortSignal) => Promise<import("@remotion/studio-shared").ProjectInfoResponse>;
107
107
  export declare const callUpdateDefaultPropsApi: (compositionId: string, defaultProps: Record<string, unknown>, enumPaths: EnumPath[]) => Promise<import("@remotion/studio-shared").UpdateDefaultPropsResponse>;
108
108
  export declare const canUpdateDefaultProps: (compositionId: string, readOnlyStudio: boolean) => Promise<CanUpdateDefaultPropsResponse>;
109
+ export declare const applyVisualControlChange: ({ fileName, changes, }: {
110
+ fileName: string;
111
+ changes: VisualControlChange[];
112
+ }) => Promise<import("@remotion/studio-shared").ApplyVisualControlResponse>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.canUpdateDefaultProps = exports.callUpdateDefaultPropsApi = exports.getProjectInfo = exports.updateAvailable = exports.cancelRenderJob = exports.removeRenderJob = exports.applyCodemod = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addSequenceRenderJob = exports.addStillRenderJob = void 0;
3
+ exports.applyVisualControlChange = exports.canUpdateDefaultProps = exports.callUpdateDefaultPropsApi = exports.getProjectInfo = exports.updateAvailable = exports.cancelRenderJob = exports.removeRenderJob = exports.applyCodemod = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addSequenceRenderJob = exports.addStillRenderJob = void 0;
4
4
  const no_react_1 = require("remotion/no-react");
5
5
  const call_api_1 = require("../call-api");
6
6
  const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, logLevel, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, multiProcessOnLinux, beepOnFinish, metadata, chromeMode, }) => {
@@ -16,7 +16,7 @@ const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, f
16
16
  chromiumOptions,
17
17
  delayRenderTimeout,
18
18
  envVariables,
19
- serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
19
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
20
20
  data: inputProps,
21
21
  staticBase: window.remotion_staticBase,
22
22
  indent: undefined,
@@ -45,7 +45,7 @@ const addSequenceRenderJob = ({ compositionId, outName, imageFormat, startFrame,
45
45
  delayRenderTimeout,
46
46
  envVariables,
47
47
  concurrency,
48
- serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
48
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
49
49
  data: inputProps,
50
50
  staticBase: window.remotion_staticBase,
51
51
  indent: undefined,
@@ -89,7 +89,7 @@ const addVideoRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, s
89
89
  disallowParallelEncoding,
90
90
  chromiumOptions,
91
91
  envVariables,
92
- serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithDate({
92
+ serializedInputPropsWithCustomSchema: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
93
93
  data: inputProps,
94
94
  staticBase: window.remotion_staticBase,
95
95
  indent: undefined,
@@ -160,7 +160,7 @@ exports.getProjectInfo = getProjectInfo;
160
160
  const callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
161
161
  return (0, call_api_1.callApi)('/api/update-default-props', {
162
162
  compositionId,
163
- defaultProps: no_react_1.NoReactInternals.serializeJSONWithDate({
163
+ defaultProps: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
164
164
  data: defaultProps,
165
165
  indent: undefined,
166
166
  staticBase: window.remotion_staticBase,
@@ -181,3 +181,10 @@ const canUpdateDefaultProps = (compositionId, readOnlyStudio) => {
181
181
  });
182
182
  };
183
183
  exports.canUpdateDefaultProps = canUpdateDefaultProps;
184
+ const applyVisualControlChange = ({ fileName, changes, }) => {
185
+ return (0, call_api_1.callApi)('/api/apply-visual-control-change', {
186
+ fileName,
187
+ changes,
188
+ });
189
+ };
190
+ exports.applyVisualControlChange = applyVisualControlChange;
@@ -22,13 +22,15 @@ exports.Tabs = Tabs;
22
22
  const selectorButton = {
23
23
  border: 'none',
24
24
  flex: 1,
25
- padding: 8,
25
+ padding: 4,
26
+ height: 40,
26
27
  paddingLeft: 16,
27
28
  display: 'flex',
28
29
  flexDirection: 'row',
29
30
  fontSize: 14,
30
31
  color: 'inherit',
31
32
  alignItems: 'center',
33
+ cursor: 'default',
32
34
  };
33
35
  const Tab = ({ children, onClick, style, selected }) => {
34
36
  const [hovered, setHovered] = (0, react_1.useState)(false);