@remotion/cli 4.1.0-alpha10 → 4.1.0-alpha12

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 (77) hide show
  1. package/dist/codemods/update-default-props.js +5 -0
  2. package/dist/config/image-format.d.ts +1 -1
  3. package/dist/config/index.d.ts +1 -1
  4. package/dist/editor/components/AssetSelector.js +61 -6
  5. package/dist/editor/components/AssetSelectorItem.js +27 -11
  6. package/dist/editor/components/CompositionSelector.js +3 -3
  7. package/dist/editor/components/CopyButton.js +8 -2
  8. package/dist/editor/components/CurrentCompositionSideEffects.js +9 -5
  9. package/dist/editor/components/FullscreenToggle.js +23 -1
  10. package/dist/editor/components/InlineAction.d.ts +1 -0
  11. package/dist/editor/components/InlineAction.js +2 -2
  12. package/dist/editor/components/KeyboardShortcutsExplainer.js +1 -1
  13. package/dist/editor/components/OptionsPanel.js +45 -12
  14. package/dist/editor/components/RenderModal/CliCopyButton.js +2 -1
  15. package/dist/editor/components/RenderModal/MultiRangeSlider.js +4 -7
  16. package/dist/editor/components/RenderModal/RenderModal.js +7 -7
  17. package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.js +4 -0
  18. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +5 -1
  19. package/dist/editor/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.d.ts +17 -0
  20. package/dist/editor/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +83 -0
  21. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +5 -0
  22. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +5 -1
  23. package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
  24. package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +5 -1
  25. package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
  26. package/dist/editor/components/TopPanel.js +4 -8
  27. package/dist/editor/components/UpdateModal/UpdateModal.js +4 -1
  28. package/dist/editor/helpers/copy-text.d.ts +1 -1
  29. package/dist/editor/helpers/copy-text.js +15 -10
  30. package/dist/editor/helpers/document-title.d.ts +4 -0
  31. package/dist/editor/helpers/document-title.js +60 -0
  32. package/dist/editor/helpers/pick-color.js +12 -7
  33. package/dist/editor/helpers/render-modal-sections.d.ts +0 -1
  34. package/dist/editor/icons/clipboard.d.ts +4 -0
  35. package/dist/editor/icons/clipboard.js +6 -0
  36. package/dist/editor/icons/file.d.ts +3 -1
  37. package/dist/editor/icons/file.js +1 -1
  38. package/dist/editor/icons/folder.d.ts +3 -0
  39. package/dist/editor/icons/folder.js +5 -1
  40. package/dist/event-source-events.d.ts +1 -0
  41. package/dist/event-source.js +1 -0
  42. package/dist/get-cli-options.d.ts +1 -1
  43. package/dist/get-input-props.js +2 -1
  44. package/dist/handle-common-errors.js +2 -2
  45. package/dist/index.d.ts +6 -5
  46. package/dist/index.js +1 -1
  47. package/dist/make-on-download.d.ts +12 -0
  48. package/dist/make-on-download.js +40 -0
  49. package/dist/parse-command-line.d.ts +1 -0
  50. package/dist/preview-server/public-folder.js +3 -0
  51. package/dist/preview-server/render-queue/process-still.js +1 -1
  52. package/dist/preview-server/routes.d.ts +0 -1
  53. package/dist/preview-server/routes.js +1 -0
  54. package/dist/progress-bar.js +2 -7
  55. package/dist/render-flows/render.js +17 -25
  56. package/dist/render-flows/still.d.ts +2 -2
  57. package/dist/render-flows/still.js +30 -40
  58. package/dist/still.js +1 -1
  59. package/dist/studio.js +8 -1
  60. package/dist/upgrade.d.ts +1 -1
  61. package/dist/upgrade.js +11 -4
  62. package/package.json +8 -8
  63. package/styles/styles.css +7 -17
  64. package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.d.ts +0 -14
  65. package/dist/editor/components/RenderModal/SchemaEditor/input-props-serialization.js +0 -42
  66. package/dist/error-with-stack-frame.d.ts +0 -19
  67. package/dist/error-with-stack-frame.js +0 -81
  68. package/dist/handle-javascript-error.d.ts +0 -20
  69. package/dist/handle-javascript-error.js +0 -81
  70. package/dist/symbolicate-error.d.ts +0 -3
  71. package/dist/symbolicate-error.js +0 -24
  72. package/dist/symbolicate-errors.d.ts +0 -7
  73. package/dist/symbolicate-errors.js +0 -90
  74. package/dist/symbolicate-stacktrace.d.ts +0 -28
  75. package/dist/symbolicate-stacktrace.js +0 -135
  76. package/dist/symbolicateable-error.d.ts +0 -16
  77. package/dist/symbolicateable-error.js +0 -18
@@ -29,6 +29,7 @@ const react_1 = __importStar(require("react"));
29
29
  const remotion_1 = require("remotion");
30
30
  const Button_1 = require("../../../preview-server/error-overlay/remotion-overlay/Button");
31
31
  const colors_1 = require("../../helpers/colors");
32
+ const document_title_1 = require("../../helpers/document-title");
32
33
  const use_keybinding_1 = require("../../helpers/use-keybinding");
33
34
  const layout_1 = require("../layout");
34
35
  const RemTextarea_1 = require("../NewComposition/RemTextarea");
@@ -95,6 +96,9 @@ const RenderModalJSONPropsEditor = ({ setValue, value, defaultProps, onSave, sho
95
96
  const hasChanged = (0, react_1.useMemo)(() => {
96
97
  return !(0, deep_equal_1.deepEqual)(value, defaultProps);
97
98
  }, [defaultProps, value]);
99
+ (0, react_1.useEffect)(() => {
100
+ (0, document_title_1.setUnsavedProps)(hasChanged);
101
+ }, [hasChanged]);
98
102
  const onQuickSave = (0, react_1.useCallback)(() => {
99
103
  if (hasChanged) {
100
104
  onSave();
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SchemaEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const document_title_1 = require("../../../helpers/document-title");
6
7
  const use_keybinding_1 = require("../../../helpers/use-keybinding");
7
8
  const get_zod_if_possible_1 = require("../../get-zod-if-possible");
8
9
  const is_menu_item_1 = require("../../Menu/is-menu-item");
@@ -23,6 +24,9 @@ const SchemaEditor = ({ schema, value, setValue, zodValidationResult, defaultPro
23
24
  const hasChanged = (0, react_1.useMemo)(() => {
24
25
  return !(0, deep_equal_1.deepEqual)(defaultProps, value);
25
26
  }, [defaultProps, value]);
27
+ (0, react_1.useEffect)(() => {
28
+ (0, document_title_1.setUnsavedProps)(hasChanged);
29
+ }, [hasChanged]);
26
30
  const onQuickSave = (0, react_1.useCallback)(() => {
27
31
  if (hasChanged && showSaveButton) {
28
32
  onSave(() => {
@@ -59,6 +63,6 @@ const SchemaEditor = ({ schema, value, setValue, zodValidationResult, defaultPro
59
63
  if (typeName !== z.ZodFirstPartyTypeKind.ZodObject) {
60
64
  return (0, jsx_runtime_1.jsx)(SchemaErrorMessages_1.TopLevelZodValue, { typeReceived: typeName });
61
65
  }
62
- return ((0, jsx_runtime_1.jsx)("div", { style: scrollable, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: (0, jsx_runtime_1.jsx)(ZodObjectEditor_1.ZodObjectEditor, { value: value, setValue: setValue, jsonPath: [], schema: schema, defaultValue: defaultProps, onSave: onSave, showSaveButton: showSaveButton, onRemove: null, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: true }) }));
66
+ return ((0, jsx_runtime_1.jsx)("div", { style: scrollable, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: (0, jsx_runtime_1.jsx)(ZodObjectEditor_1.ZodObjectEditor, { discriminatedUnionReplacement: null, value: value, setValue: setValue, jsonPath: [], schema: schema, defaultValue: defaultProps, onSave: onSave, showSaveButton: showSaveButton, onRemove: null, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: true }) }));
63
67
  };
64
68
  exports.SchemaEditor = SchemaEditor;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import type { z } from 'zod';
3
+ import type { JSONPath } from './zod-types';
4
+ import type { UpdaterFunction } from './ZodSwitch';
5
+ export declare const ZodDiscriminatedUnionEditor: React.FC<{
6
+ schema: z.ZodTypeAny;
7
+ setValue: UpdaterFunction<Record<string, unknown>>;
8
+ value: Record<string, unknown>;
9
+ defaultValue: Record<string, unknown>;
10
+ mayPad: boolean;
11
+ jsonPath: JSONPath;
12
+ onRemove: null | (() => void);
13
+ onSave: UpdaterFunction<unknown>;
14
+ showSaveButton: boolean;
15
+ saving: boolean;
16
+ saveDisabledByParent: boolean;
17
+ }>;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZodDiscriminatedUnionEditor = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const Checkmark_1 = require("../../../icons/Checkmark");
7
+ const get_zod_if_possible_1 = require("../../get-zod-if-possible");
8
+ const ComboBox_1 = require("../../NewComposition/ComboBox");
9
+ const create_zod_values_1 = require("./create-zod-values");
10
+ const Fieldset_1 = require("./Fieldset");
11
+ const local_state_1 = require("./local-state");
12
+ const SchemaLabel_1 = require("./SchemaLabel");
13
+ const ZodObjectEditor_1 = require("./ZodObjectEditor");
14
+ const ZodDiscriminatedUnionEditor = ({ schema, setValue, showSaveButton, saving, value, defaultValue, saveDisabledByParent, onSave, mayPad, jsonPath, onRemove, }) => {
15
+ const z = (0, get_zod_if_possible_1.useZodIfPossible)();
16
+ if (!z) {
17
+ throw new Error('expected zod');
18
+ }
19
+ const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
20
+ const typedSchema = schema._def;
21
+ const options = (0, react_1.useMemo)(() => [...typedSchema.optionsMap.keys()], [typedSchema.optionsMap]);
22
+ const { localValue, onChange: setLocalValue, reset, } = (0, local_state_1.useLocalState)({
23
+ schema,
24
+ setValue,
25
+ value,
26
+ defaultValue,
27
+ });
28
+ const comboBoxValues = (0, react_1.useMemo)(() => {
29
+ return options.map((option) => {
30
+ return {
31
+ value: option,
32
+ label: option,
33
+ id: option,
34
+ keyHint: null,
35
+ leftItem: option === value[typedSchema.discriminator] ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
36
+ onClick: () => {
37
+ const val = (0, create_zod_values_1.createZodValues)(typedSchema.optionsMap.get(option), z, zodTypes);
38
+ setLocalValue(() => val, false, false);
39
+ },
40
+ quickSwitcherLabel: null,
41
+ subMenu: null,
42
+ type: 'item',
43
+ };
44
+ });
45
+ }, [
46
+ options,
47
+ setLocalValue,
48
+ typedSchema.discriminator,
49
+ typedSchema.optionsMap,
50
+ value,
51
+ z,
52
+ zodTypes,
53
+ ]);
54
+ const save = (0, react_1.useCallback)(() => {
55
+ onSave(() => value, false, false);
56
+ }, [onSave, value]);
57
+ const discriminatedUnionReplacement = (0, react_1.useMemo)(() => {
58
+ return {
59
+ discriminator: typedSchema.discriminator,
60
+ markup: ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: true, children: [(0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value[typedSchema.discriminator] ===
61
+ defaultValue[typedSchema.discriminator], jsonPath: [...jsonPath, typedSchema.discriminator], onRemove: onRemove, onReset: reset, onSave: save, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, suffix: null, valid: localValue.zodValidation.success }), (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Select type", values: comboBoxValues, selectedId: value[typedSchema.discriminator] })] })),
62
+ };
63
+ }, [
64
+ comboBoxValues,
65
+ defaultValue,
66
+ jsonPath,
67
+ localValue.value,
68
+ localValue.zodValidation.success,
69
+ mayPad,
70
+ onRemove,
71
+ reset,
72
+ save,
73
+ saveDisabledByParent,
74
+ saving,
75
+ showSaveButton,
76
+ typedSchema.discriminator,
77
+ value,
78
+ ]);
79
+ return ((0, jsx_runtime_1.jsx)(ZodObjectEditor_1.ZodObjectEditor
80
+ // Re-render the object editor when the discriminator changes
81
+ , { jsonPath: jsonPath, mayPad: mayPad, defaultValue: defaultValue, onRemove: onRemove, onSave: onSave, saveDisabledByParent: saveDisabledByParent, saving: saving, schema: typedSchema.optionsMap.get(value[typedSchema.discriminator]), setValue: setLocalValue, showSaveButton: showSaveButton, value: value, discriminatedUnionReplacement: discriminatedUnionReplacement }, value[typedSchema.discriminator]));
82
+ };
83
+ exports.ZodDiscriminatedUnionEditor = ZodDiscriminatedUnionEditor;
@@ -2,6 +2,10 @@ import React from 'react';
2
2
  import type { z } from 'zod';
3
3
  import type { JSONPath } from './zod-types';
4
4
  import type { UpdaterFunction } from './ZodSwitch';
5
+ export type ObjectDiscrimatedUnionReplacement = {
6
+ discriminator: string;
7
+ markup: React.ReactNode;
8
+ };
5
9
  export declare const ZodObjectEditor: React.FC<{
6
10
  schema: z.ZodTypeAny;
7
11
  jsonPath: JSONPath;
@@ -14,4 +18,5 @@ export declare const ZodObjectEditor: React.FC<{
14
18
  saving: boolean;
15
19
  saveDisabledByParent: boolean;
16
20
  mayPad: boolean;
21
+ discriminatedUnionReplacement: ObjectDiscrimatedUnionReplacement | null;
17
22
  }>;
@@ -35,7 +35,7 @@ const SchemaLabel_1 = require("./SchemaLabel");
35
35
  const SchemaSeparationLine_1 = require("./SchemaSeparationLine");
36
36
  const SchemaVerticalGuide_1 = require("./SchemaVerticalGuide");
37
37
  const ZodSwitch_1 = require("./ZodSwitch");
38
- const ZodObjectEditor = ({ schema, jsonPath, setValue, value, defaultValue, onSave, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, }) => {
38
+ const ZodObjectEditor = ({ schema, jsonPath, setValue, value, defaultValue, onSave, showSaveButton, onRemove, saving, saveDisabledByParent, mayPad, discriminatedUnionReplacement, }) => {
39
39
  const z = (0, get_zod_if_possible_1.useZodIfPossible)();
40
40
  if (!z) {
41
41
  throw new Error('expected zod');
@@ -62,6 +62,10 @@ const ZodObjectEditor = ({ schema, jsonPath, setValue, value, defaultValue, onSa
62
62
  return localValue.value;
63
63
  }, false, false);
64
64
  }, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, valid: localValue.zodValidation.success })), (0, jsx_runtime_1.jsx)(RevisionContextProvider, { children: (0, jsx_runtime_1.jsx)(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: isRoot, children: keys.map((key, i) => {
65
+ if (discriminatedUnionReplacement &&
66
+ key === discriminatedUnionReplacement.discriminator) {
67
+ return discriminatedUnionReplacement.markup;
68
+ }
65
69
  return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { mayPad: true, jsonPath: [...jsonPath, key], schema: shape[key], value: localValue.value[key],
66
70
  // In case of null | {a: string, b: string} type, we need to fallback to the default value
67
71
  defaultValue: (defaultValue !== null && defaultValue !== void 0 ? defaultValue : value)[key], setValue: (val, forceApply) => {
@@ -45,6 +45,6 @@ const ZodOrNullishEditor = ({ jsonPath, schema, setValue, onSave, defaultValue,
45
45
  const save = (0, react_1.useCallback)(() => {
46
46
  onSave(() => value, false, false);
47
47
  }, [onSave, value]);
48
- return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [localValue.value === nullishValue ? ((0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null })) : ((0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { value: localValue.value, setValue: setLocalValue, jsonPath: jsonPath, schema: innerSchema, defaultValue: value, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: false })), (0, jsx_runtime_1.jsxs)("div", { style: checkBoxWrapper, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: isChecked, onChange: onCheckBoxChange, disabled: false, name: jsonPath.join('.') }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("div", { style: labelStyle, children: String(nullishValue) })] })] }));
48
+ return ((0, jsx_runtime_1.jsxs)(Fieldset_1.Fieldset, { shouldPad: mayPad, success: localValue.zodValidation.success, children: [localValue.value === nullishValue ? ((0, jsx_runtime_1.jsx)(SchemaLabel_1.SchemaLabel, { isDefaultValue: localValue.value === defaultValue, jsonPath: jsonPath, onReset: reset, onSave: save, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, valid: localValue.zodValidation.success, saveDisabledByParent: saveDisabledByParent, suffix: null })) : ((0, jsx_runtime_1.jsx)(ZodSwitch_1.ZodSwitch, { value: localValue.value, setValue: setLocalValue, jsonPath: jsonPath, schema: innerSchema, defaultValue: defaultValue, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: false })), (0, jsx_runtime_1.jsxs)("div", { style: checkBoxWrapper, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: isChecked, onChange: onCheckBoxChange, disabled: false, name: jsonPath.join('.') }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("div", { style: labelStyle, children: String(nullishValue) })] })] }));
49
49
  };
50
50
  exports.ZodOrNullishEditor = ZodOrNullishEditor;
@@ -8,6 +8,7 @@ const ZodBooleanEditor_1 = require("./ZodBooleanEditor");
8
8
  const ZodColorEditor_1 = require("./ZodColorEditor");
9
9
  const ZodDateEditor_1 = require("./ZodDateEditor");
10
10
  const ZodDefaultEditor_1 = require("./ZodDefaultEditor");
11
+ const ZodDiscriminatedUnionEditor_1 = require("./ZodDiscriminatedUnionEditor");
11
12
  const ZodEffectEditor_1 = require("./ZodEffectEditor");
12
13
  const ZodEnumEditor_1 = require("./ZodEnumEditor");
13
14
  const ZodNonEditableValue_1 = require("./ZodNonEditableValue");
@@ -28,7 +29,7 @@ const ZodSwitch = ({ schema, jsonPath, value, setValue, defaultValue, onSave, sh
28
29
  }
29
30
  const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
30
31
  if (typeName === z.ZodFirstPartyTypeKind.ZodObject) {
31
- return ((0, jsx_runtime_1.jsx)(ZodObjectEditor_1.ZodObjectEditor, { setValue: setValue, value: value, defaultValue: defaultValue, jsonPath: jsonPath, schema: schema, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
32
+ return ((0, jsx_runtime_1.jsx)(ZodObjectEditor_1.ZodObjectEditor, { setValue: setValue, value: value, defaultValue: defaultValue, jsonPath: jsonPath, schema: schema, onSave: onSave, showSaveButton: showSaveButton, onRemove: onRemove, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad, discriminatedUnionReplacement: null }));
32
33
  }
33
34
  if (typeName === z.ZodFirstPartyTypeKind.ZodString) {
34
35
  if (value.startsWith(window.remotion_staticBase)) {
@@ -86,6 +87,9 @@ const ZodSwitch = ({ schema, jsonPath, value, setValue, defaultValue, onSave, sh
86
87
  if (typeName === z.ZodFirstPartyTypeKind.ZodDefault) {
87
88
  return ((0, jsx_runtime_1.jsx)(ZodDefaultEditor_1.ZodDefaultEditor, { jsonPath: jsonPath, showSaveButton: showSaveButton, defaultValue: defaultValue, value: value, setValue: setValue, onSave: onSave, onRemove: onRemove, schema: schema, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }));
88
89
  }
90
+ if (typeName === z.ZodFirstPartyTypeKind.ZodDiscriminatedUnion) {
91
+ return ((0, jsx_runtime_1.jsx)(ZodDiscriminatedUnionEditor_1.ZodDiscriminatedUnionEditor, { defaultValue: defaultValue, mayPad: mayPad, schema: schema, setValue: setValue, value: value, jsonPath: jsonPath, onRemove: onRemove, onSave: onSave, saving: saving, saveDisabledByParent: saveDisabledByParent, showSaveButton: showSaveButton }));
92
+ }
89
93
  return ((0, jsx_runtime_1.jsx)(ZodNonEditableValue_1.ZonNonEditableValue, { jsonPath: jsonPath, showSaveButton: showSaveButton, label: `${typeName} (not editable)`, saving: saving, mayPad: mayPad }));
90
94
  };
91
95
  exports.ZodSwitch = ZodSwitch;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RenderQueueOpenInFinderItem = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const folder_1 = require("../../icons/folder");
6
7
  const InlineAction_1 = require("../InlineAction");
7
8
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
8
9
  const actions_1 = require("./actions");
@@ -19,7 +20,7 @@ const RenderQueueOpenInFinderItem = ({ job, }) => {
19
20
  };
20
21
  }, []);
21
22
  const renderAction = (0, react_1.useCallback)((color) => {
22
- return ((0, jsx_runtime_1.jsx)("svg", { style: icon, viewBox: "0 0 576 512", children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M384 480h48c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224H144c-11.4 0-21.9 6-27.6 15.9L48 357.1V96c0-8.8 7.2-16 16-16H181.5c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8H416c8.8 0 16 7.2 16 16v32h48V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H87.7 384z" }) }));
23
+ return (0, jsx_runtime_1.jsx)(folder_1.ExpandedFolderIconSolid, { style: icon, color: color });
23
24
  }, [icon]);
24
25
  return (0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
25
26
  };
@@ -6,12 +6,12 @@ const react_1 = require("react");
6
6
  const use_breakpoint_1 = require("../helpers/use-breakpoint");
7
7
  const sidebar_1 = require("../state/sidebar");
8
8
  const CanvasOrLoading_1 = require("./CanvasOrLoading");
9
- const CompositionSelector_1 = require("./CompositionSelector");
10
9
  const CurrentCompositionSideEffects_1 = require("./CurrentCompositionSideEffects");
10
+ const ExplorerPanel_1 = require("./ExplorerPanel");
11
11
  const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
12
12
  const MenuToolbar_1 = require("./MenuToolbar");
13
+ const OptionsPanel_1 = require("./OptionsPanel");
13
14
  const PreviewToolbar_1 = require("./PreviewToolbar");
14
- const RightPanel_1 = require("./RightPanel");
15
15
  const SplitterContainer_1 = require("./Splitter/SplitterContainer");
16
16
  const SplitterElement_1 = require("./Splitter/SplitterElement");
17
17
  const SplitterHandle_1 = require("./Splitter/SplitterHandle");
@@ -26,16 +26,12 @@ const row = {
26
26
  display: 'flex',
27
27
  flexDirection: 'row',
28
28
  flex: 1,
29
+ minHeight: 0,
29
30
  };
30
31
  const canvasContainer = {
31
32
  flex: 1,
32
33
  display: 'flex',
33
34
  };
34
- const leftContainer = {
35
- flex: 1,
36
- display: 'flex',
37
- maxWidth: '100%',
38
- };
39
35
  const useResponsiveSidebarStatus = () => {
40
36
  const { sidebarCollapsedStateLeft } = (0, react_1.useContext)(sidebar_1.SidebarContext);
41
37
  const responsiveLeftStatus = (0, use_breakpoint_1.useBreakpoint)(1200) ? 'collapsed' : 'expanded';
@@ -66,6 +62,6 @@ const TopPanel = () => {
66
62
  const onCollapseRight = (0, react_1.useCallback)(() => {
67
63
  setSidebarCollapsedState({ left: null, right: 'collapsed' });
68
64
  }, [setSidebarCollapsedState]);
69
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsx)("div", { style: row, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: leftContainer, className: "css-reset", children: (0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}) }) })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainer, children: (0, jsx_runtime_1.jsx)(CanvasOrLoading_1.CanvasOrLoading, {}) }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(RightPanel_1.RightPanel, {}) })) : null] }) })] }) }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
65
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsx)("div", { style: row, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(ExplorerPanel_1.ExplorerPanel, {}) })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainer, children: (0, jsx_runtime_1.jsx)(CanvasOrLoading_1.CanvasOrLoading, {}) }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(OptionsPanel_1.OptionsPanel, {}) })) : null] }) })] }) }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
70
66
  };
71
67
  exports.TopPanel = TopPanel;
@@ -10,6 +10,7 @@ const CopyButton_1 = require("../CopyButton");
10
10
  const layout_1 = require("../layout");
11
11
  const ModalContainer_1 = require("../ModalContainer");
12
12
  const ModalHeader_1 = require("../ModalHeader");
13
+ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
13
14
  const container = {
14
15
  padding: 20,
15
16
  paddingTop: 0,
@@ -38,6 +39,8 @@ const UpdateModal = ({ info }) => {
38
39
  setSelectedModal(null);
39
40
  }, [setSelectedModal]);
40
41
  const command = commands[info.packageManager];
41
- return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Update available" }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("p", { children: "A new update for Remotion is available! Run the following command:" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, { children: (0, jsx_runtime_1.jsx)("pre", { onClick: () => (0, copy_text_1.copyText)(command), style: code, children: command }) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(CopyButton_1.CopyButton, { textToCopy: command, label: "Copy command", labelWhenCopied: "Copied!" })] }), (0, jsx_runtime_1.jsxs)("p", { children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Read the", ' ', (0, jsx_runtime_1.jsx)("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "Release notes" }), ' ', "to know what", "'s", " new in Remotion."] })] })] }));
42
+ return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Update available" }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("p", { children: "A new update for Remotion is available! Run the following command:" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, { children: (0, jsx_runtime_1.jsx)("pre", { onClick: () => (0, copy_text_1.copyText)(command).catch((err) => {
43
+ (0, NotificationCenter_1.sendErrorNotification)(`Could not copy: ${err.message}`);
44
+ }), style: code, children: command }) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(CopyButton_1.CopyButton, { textToCopy: command, label: "Copy command", labelWhenCopied: "Copied!" })] }), (0, jsx_runtime_1.jsxs)("p", { children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Read the", ' ', (0, jsx_runtime_1.jsx)("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "Release notes" }), ' ', "to know what", "'s", " new in Remotion."] })] })] }));
42
45
  };
43
46
  exports.UpdateModal = UpdateModal;
@@ -1 +1 @@
1
- export declare const copyText: (cmd: string) => void;
1
+ export declare const copyText: (cmd: string) => Promise<void>;
@@ -3,16 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.copyText = void 0;
4
4
  const copyText = (cmd) => {
5
5
  const permissionName = 'clipboard-write';
6
- navigator.permissions
7
- .query({ name: permissionName })
8
- .then((result) => {
9
- if (result.state === 'granted' || result.state === 'prompt') {
10
- navigator.clipboard.writeText(cmd);
11
- }
12
- })
13
- .catch((err) => {
14
- // eslint-disable-next-line no-alert
15
- alert('Could not copy:' + err);
6
+ return new Promise((resolve, reject) => {
7
+ navigator.permissions
8
+ .query({ name: permissionName })
9
+ .then((result) => {
10
+ if (result.state === 'granted' || result.state === 'prompt') {
11
+ navigator.clipboard.writeText(cmd);
12
+ resolve();
13
+ }
14
+ else {
15
+ reject(new Error('Permission to copy not granted'));
16
+ }
17
+ })
18
+ .catch((err) => {
19
+ reject(err);
20
+ });
16
21
  });
17
22
  };
18
23
  exports.copyText = copyText;
@@ -0,0 +1,4 @@
1
+ import type { RenderJob } from '../../preview-server/render-queue/job';
2
+ export declare const setCurrentVideoId: (id: string | null) => void;
3
+ export declare const setUnsavedProps: (unsaved: boolean) => void;
4
+ export declare const setRenderJobs: (jobs: RenderJob[]) => void;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setRenderJobs = exports.setUnsavedProps = exports.setCurrentVideoId = void 0;
4
+ const truthy_1 = require("../../truthy");
5
+ let currentVideoId = null;
6
+ let unsavedProps = false;
7
+ let tabInactive = false;
8
+ let renderJobs = [];
9
+ const setCurrentVideoId = (id) => {
10
+ currentVideoId = id;
11
+ updateTitle();
12
+ };
13
+ exports.setCurrentVideoId = setCurrentVideoId;
14
+ const setUnsavedProps = (unsaved) => {
15
+ unsavedProps = unsaved;
16
+ };
17
+ exports.setUnsavedProps = setUnsavedProps;
18
+ const setRenderJobs = (jobs) => {
19
+ renderJobs = jobs;
20
+ updateTitle();
21
+ };
22
+ exports.setRenderJobs = setRenderJobs;
23
+ document.addEventListener('visibilitychange', () => {
24
+ tabInactive = document.visibilityState === 'hidden';
25
+ updateTitle();
26
+ });
27
+ const productName = 'Remotion Studio';
28
+ const suffix = `- ${productName}`;
29
+ const updateTitle = () => {
30
+ if (!currentVideoId) {
31
+ document.title = productName;
32
+ return;
33
+ }
34
+ const currentCompTitle = `${currentVideoId} / ${window.remotion_projectName}`;
35
+ document.title = [
36
+ getProgressInBrackets(currentVideoId, renderJobs),
37
+ unsavedProps && tabInactive ? '✏️' : null,
38
+ `${currentCompTitle} ${suffix}`,
39
+ ]
40
+ .filter(truthy_1.truthy)
41
+ .join(' ');
42
+ };
43
+ const getProgressInBrackets = (selectedCompositionId, jobs) => {
44
+ const currentRender = jobs.find((job) => job.status === 'running');
45
+ if (!currentRender) {
46
+ return null;
47
+ }
48
+ if (currentRender.status !== 'running') {
49
+ throw new Error('expected running job');
50
+ }
51
+ const progInPercent = Math.ceil(currentRender.progress.value * 100);
52
+ const progressInBrackets = currentRender.compositionId === selectedCompositionId
53
+ ? `[${progInPercent}%]`
54
+ : `[${progInPercent}% ${currentRender.compositionId}]`;
55
+ return progressInBrackets;
56
+ };
57
+ document.addEventListener('visibilitychange', () => {
58
+ tabInactive = document.visibilityState === 'hidden';
59
+ updateTitle();
60
+ });
@@ -11,13 +11,18 @@ const pickColor = () => {
11
11
  const open = new EyeDropper().open();
12
12
  open
13
13
  .then((color) => {
14
- var _a;
15
- (0, copy_text_1.copyText)(color.sRGBHex);
16
- (_a = NotificationCenter_1.notificationCenter.current) === null || _a === void 0 ? void 0 : _a.addNotification({
17
- content: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorDot_1.ColorDot, { color: color.sRGBHex }), " ", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), " Copied", ' ', color.sRGBHex] })),
18
- created: Date.now(),
19
- duration: 2000,
20
- id: String(Math.random()),
14
+ (0, copy_text_1.copyText)(color.sRGBHex)
15
+ .then(() => {
16
+ var _a;
17
+ (_a = NotificationCenter_1.notificationCenter.current) === null || _a === void 0 ? void 0 : _a.addNotification({
18
+ content: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorDot_1.ColorDot, { color: color.sRGBHex }), " ", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), " Copied", ' ', color.sRGBHex] })),
19
+ created: Date.now(),
20
+ duration: 2000,
21
+ id: String(Math.random()),
22
+ });
23
+ })
24
+ .catch((err) => {
25
+ (0, NotificationCenter_1.sendErrorNotification)(`Could not copy: ${err.message}`);
21
26
  });
22
27
  })
23
28
  .catch((err) => {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Codec } from '@remotion/renderer';
3
2
  import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
4
3
  type Section = 'general' | 'picture' | 'advanced' | 'data' | 'gif' | 'audio';
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare const ClipboardIcon: React.FC<SVGProps<SVGSVGElement> & {
3
+ color?: string;
4
+ }>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClipboardIcon = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const ClipboardIcon = ({ color, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 384 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z" }) }));
6
+ exports.ClipboardIcon = ClipboardIcon;
@@ -1,2 +1,4 @@
1
1
  import type { SVGProps } from 'react';
2
- export declare const FileIcon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
2
+ export declare const FileIcon: React.FC<SVGProps<SVGSVGElement> & {
3
+ color?: string;
4
+ }>;
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FileIcon = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const FileIcon = (props) => ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentcolor", d: "M0 64C0 28.65 28.65 0 64 0h156.1c12.7 0 25 5.057 34 14.06L369.9 129.9c9 9 14.1 21.3 14.1 34V448c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V64zm352 128H240c-26.5 0-48-21.5-48-48V32H64c-17.67 0-32 14.33-32 32v384c0 17.7 14.33 32 32 32h256c17.7 0 32-14.3 32-32V192zm-4.7-39.4L231.4 36.69c-2-2.07-4.6-3.51-7.4-4.21V144c0 8.8 7.2 16 16 16h111.5c-.7-2.8-2.1-5.4-4.2-7.4z" }) }));
5
+ const FileIcon = ({ color, ...props }) => ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color !== null && color !== void 0 ? color : 'currentColor', d: "M0 64C0 28.65 28.65 0 64 0h156.1c12.7 0 25 5.057 34 14.06L369.9 129.9c9 9 14.1 21.3 14.1 34V448c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V64zm352 128H240c-26.5 0-48-21.5-48-48V32H64c-17.67 0-32 14.33-32 32v384c0 17.7 14.33 32 32 32h256c17.7 0 32-14.3 32-32V192zm-4.7-39.4L231.4 36.69c-2-2.07-4.6-3.51-7.4-4.21V144c0 8.8 7.2 16 16 16h111.5c-.7-2.8-2.1-5.4-4.2-7.4z" }) }));
6
6
  exports.FileIcon = FileIcon;
@@ -6,3 +6,6 @@ export declare const CollapsedFolderIcon: React.FC<SVGProps<SVGSVGElement> & {
6
6
  export declare const ExpandedFolderIcon: React.FC<SVGProps<SVGSVGElement> & {
7
7
  color: string;
8
8
  }>;
9
+ export declare const ExpandedFolderIconSolid: React.FC<SVGProps<SVGSVGElement> & {
10
+ color: string;
11
+ }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExpandedFolderIcon = exports.CollapsedFolderIcon = void 0;
3
+ exports.ExpandedFolderIconSolid = exports.ExpandedFolderIcon = exports.CollapsedFolderIcon = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const CollapsedFolderIcon = ({ color, ...props }) => {
6
6
  return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 512 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M447.1 96H272L226.7 50.75C214.7 38.74 198.5 32 181.5 32H63.1c-35.35 0-64 28.65-64 64v320c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V160C511.1 124.7 483.3 96 447.1 96zM480 416c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V96c0-17.64 14.36-32 32-32h117.5c8.549 0 16.58 3.328 22.63 9.375L258.7 128H448c17.64 0 32 14.36 32 32V416z" }) }));
@@ -10,3 +10,7 @@ const ExpandedFolderIcon = ({ color, ...props }) => {
10
10
  return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 576 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M566.6 211.6C557.5 199.1 543.4 192 527.1 192H134.2C114.3 192 96.2 204.5 89.23 223.1L32 375.8V96c0-17.64 14.36-32 32-32h117.5c8.549 0 16.58 3.328 22.63 9.375L258.7 128H448c17.64 0 32 14.36 32 32h32c0-35.35-28.65-64-64-64H272L226.7 50.75C214.7 38.74 198.5 32 181.5 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h403.1c21.11 0 39.53-13.53 45.81-33.69l60-192C578.4 239.6 575.8 224 566.6 211.6zM543.2 244.8l-60 192C481.1 443.5 475 448 467.1 448H64c-3.322 0-6.357-.9551-9.373-1.898c-2.184-1.17-4.109-2.832-5.596-4.977c-3.031-4.375-3.703-9.75-1.828-14.73l72-192C121.5 228.2 127.5 224 134.2 224h393.8c5.141 0 9.844 2.375 12.89 6.516C543.9 234.7 544.8 239.9 543.2 244.8z" }) }));
11
11
  };
12
12
  exports.ExpandedFolderIcon = ExpandedFolderIcon;
13
+ const ExpandedFolderIconSolid = ({ color, ...props }) => {
14
+ return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 576 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M384 480h48c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224H144c-11.4 0-21.9 6-27.6 15.9L48 357.1V96c0-8.8 7.2-16 16-16H181.5c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8H416c8.8 0 16 7.2 16 16v32h48V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H87.7 384z" }) }));
15
+ };
16
+ exports.ExpandedFolderIconSolid = ExpandedFolderIconSolid;
@@ -27,4 +27,5 @@ export type EventSourceEvent = {
27
27
  } | {
28
28
  type: 'new-public-folder';
29
29
  files: StaticFile[];
30
+ folderExists: string | null;
30
31
  };
@@ -36,6 +36,7 @@ const openEventSource = () => {
36
36
  }
37
37
  if (newEvent.type === 'new-public-folder') {
38
38
  window.remotion_staticFiles = newEvent.files;
39
+ window.remotion_publicFolderExists = newEvent.folderExists;
39
40
  }
40
41
  listeners.forEach((l) => {
41
42
  if (l.type === newEvent.type) {
@@ -33,5 +33,5 @@ export declare const getCliOptions: (options: {
33
33
  videoBitrate: string | null;
34
34
  height: number | null;
35
35
  width: number | null;
36
- configFileImageFormat: "png" | "jpeg" | "none" | undefined;
36
+ configFileImageFormat: "none" | "png" | "jpeg" | undefined;
37
37
  }>;
@@ -33,7 +33,8 @@ const getInputProps = (onUpdate) => {
33
33
  return JSON.parse(parse_command_line_1.parsedCli.props);
34
34
  }
35
35
  catch (err) {
36
- log_1.Log.error('You passed --props but it was neither valid JSON nor a file path to a valid JSON file.');
36
+ log_1.Log.error('You passed --props but it was neither valid JSON nor a file path to a valid JSON file. Provided value: ' +
37
+ parse_command_line_1.parsedCli.props);
37
38
  log_1.Log.info('Got the following value:', parse_command_line_1.parsedCli.props);
38
39
  log_1.Log.error('Check that your input is parseable using `JSON.parse` and try again.');
39
40
  if (node_os_1.default.platform() === 'win32') {
@@ -27,8 +27,8 @@ const handleCommonError = async (err, logLevel) => {
27
27
  }
28
28
  if (err.message.includes('Error creating WebGL context')) {
29
29
  log_1.Log.info();
30
- log_1.Log.info('💡 You might need to set the OpenGL renderer to "angle"');
31
- log_1.Log.info('💡 Get help for this issue at https://www.remotion.dev/docs/three');
30
+ log_1.Log.warn('💡 You might need to set the OpenGL renderer to "angle" (or "swangle" if rendering on lambda). Learn why at https://www.remotion.dev/docs/three');
31
+ log_1.Log.warn("💡 Check how it's done at https://www.remotion.dev/docs/chromium-flags#--gl");
32
32
  }
33
33
  if (err.message.includes('The bucket does not allow ACLs')) {
34
34
  log_1.Log.info();
package/dist/index.d.ts CHANGED
@@ -118,7 +118,7 @@ export declare const CliInternals: {
118
118
  videoBitrate: string | null;
119
119
  height: number | null;
120
120
  width: number | null;
121
- configFileImageFormat: "png" | "jpeg" | "none" | undefined;
121
+ configFileImageFormat: "none" | "png" | "jpeg" | undefined;
122
122
  }>;
123
123
  loadConfig: (remotionRoot: string) => Promise<string | null>;
124
124
  initializeCli: (remotionRoot: string) => Promise<void>;
@@ -127,7 +127,7 @@ export declare const CliInternals: {
127
127
  parsedCli: {
128
128
  "browser-executable": import("@remotion/renderer").BrowserExecutable;
129
129
  "pixel-format": "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
130
- "image-format": "png" | "jpeg" | "pdf" | "webp" | "none";
130
+ "image-format": "none" | "png" | "jpeg" | "pdf" | "webp";
131
131
  "prores-profile": "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy";
132
132
  "bundle-cache": string;
133
133
  "env-file": string;
@@ -136,6 +136,7 @@ export declare const CliInternals: {
136
136
  "every-nth-frame": number;
137
137
  "number-of-gif-loops": number;
138
138
  "number-of-shared-audio-tags": number;
139
+ version: string;
139
140
  codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif";
140
141
  concurrency: number;
141
142
  timeout: number;
@@ -191,7 +192,7 @@ export declare const CliInternals: {
191
192
  downloadName: string | null;
192
193
  outName: string | null;
193
194
  configImageFormat: "png" | "jpeg" | "pdf" | "webp" | null;
194
- cliFlag: "png" | "jpeg" | "pdf" | "webp" | "none" | null;
195
+ cliFlag: "none" | "png" | "jpeg" | "pdf" | "webp" | null;
195
196
  isLambda: boolean;
196
197
  fromUi: "png" | "jpeg" | "pdf" | "webp" | null;
197
198
  }) => {
@@ -206,8 +207,8 @@ export declare const CliInternals: {
206
207
  };
207
208
  getVideoImageFormat: ({ codec, uiImageFormat, }: {
208
209
  codec: import("@remotion/renderer").CodecOrUndefined;
209
- uiImageFormat: "png" | "jpeg" | "none" | null;
210
- }) => "png" | "jpeg" | "none";
210
+ uiImageFormat: "none" | "png" | "jpeg" | null;
211
+ }) => "none" | "png" | "jpeg";
211
212
  printCompositions: (compositions: import("remotion").VideoConfig[]) => void;
212
213
  getFinalOutputCodec: ({ cliFlag, configFile, downloadName, outName, uiCodec, }: {
213
214
  cliFlag: import("@remotion/renderer").CodecOrUndefined;
package/dist/index.js CHANGED
@@ -94,7 +94,7 @@ const cli = async () => {
94
94
  (0, ffmpeg_1.ffprobeCommand)(remotionRoot, process.argv.slice(3));
95
95
  }
96
96
  else if (command === 'upgrade') {
97
- await (0, upgrade_1.upgrade)(remotionRoot, parse_command_line_1.parsedCli['package-manager']);
97
+ await (0, upgrade_1.upgrade)(remotionRoot, parse_command_line_1.parsedCli['package-manager'], parse_command_line_1.parsedCli.version);
98
98
  }
99
99
  else if (command === versions_1.VERSIONS_COMMAND) {
100
100
  await (0, versions_1.versionsCommand)(remotionRoot);