@remotion/cli 3.3.87 → 3.3.89

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 (285) hide show
  1. package/dist/codemods/update-default-props.d.ts +5 -0
  2. package/dist/codemods/update-default-props.js +143 -0
  3. package/dist/color-math.d.ts +2 -0
  4. package/dist/color-math.js +11 -0
  5. package/dist/config/jpeg-quality.d.ts +2 -0
  6. package/dist/config/jpeg-quality.js +17 -0
  7. package/dist/convert-entry-point-to-serve-url.d.ts +1 -0
  8. package/dist/convert-entry-point-to-serve-url.js +15 -0
  9. package/dist/editor/components/Checkbox.d.ts +6 -0
  10. package/dist/editor/components/Checkbox.js +42 -0
  11. package/dist/editor/components/CheckerboardProvider.d.ts +4 -0
  12. package/dist/editor/components/CheckerboardProvider.js +24 -0
  13. package/dist/editor/components/CurrentCompositionSideEffects.d.ts +3 -0
  14. package/dist/editor/components/CurrentCompositionSideEffects.js +51 -0
  15. package/dist/editor/components/InlineAction.d.ts +7 -0
  16. package/dist/editor/components/InlineAction.js +31 -0
  17. package/dist/editor/components/MediaVolumeProvider.d.ts +4 -0
  18. package/dist/editor/components/MediaVolumeProvider.js +25 -0
  19. package/dist/editor/components/Modals.d.ts +2 -0
  20. package/dist/editor/components/Modals.js +23 -0
  21. package/dist/editor/components/ModalsProvider.d.ts +4 -0
  22. package/dist/editor/components/ModalsProvider.js +17 -0
  23. package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +7 -0
  24. package/dist/editor/components/NewComposition/RemInputTypeColor.js +53 -0
  25. package/dist/editor/components/NewComposition/RemTextarea.d.ts +7 -0
  26. package/dist/editor/components/NewComposition/RemTextarea.js +92 -0
  27. package/dist/editor/components/PlayerEmitterContext.d.ts +4 -0
  28. package/dist/editor/components/PlayerEmitterContext.js +11 -0
  29. package/dist/editor/components/RenderButton.d.ts +2 -0
  30. package/dist/editor/components/RenderButton.js +103 -0
  31. package/dist/editor/components/RenderModal/CliCopyButton.d.ts +4 -0
  32. package/dist/editor/components/RenderModal/CliCopyButton.js +22 -0
  33. package/dist/editor/components/RenderModal/CrfSetting.d.ts +15 -0
  34. package/dist/editor/components/RenderModal/CrfSetting.js +42 -0
  35. package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +8 -0
  36. package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +16 -0
  37. package/dist/editor/components/RenderModal/EnvInput.d.ts +11 -0
  38. package/dist/editor/components/RenderModal/EnvInput.js +74 -0
  39. package/dist/editor/components/RenderModal/FrameRangeSetting.d.ts +8 -0
  40. package/dist/editor/components/RenderModal/FrameRangeSetting.js +42 -0
  41. package/dist/editor/components/RenderModal/GuiRenderStatus.d.ts +5 -0
  42. package/dist/editor/components/RenderModal/GuiRenderStatus.js +78 -0
  43. package/dist/editor/components/RenderModal/InfoBubble.d.ts +5 -0
  44. package/dist/editor/components/RenderModal/InfoBubble.js +115 -0
  45. package/dist/editor/components/RenderModal/InfoTooltip.d.ts +5 -0
  46. package/dist/editor/components/RenderModal/InfoTooltip.js +40 -0
  47. package/dist/editor/components/RenderModal/InlineEyeIcon.d.ts +5 -0
  48. package/dist/editor/components/RenderModal/InlineEyeIcon.js +17 -0
  49. package/dist/editor/components/RenderModal/InlineRemoveButton.d.ts +4 -0
  50. package/dist/editor/components/RenderModal/InlineRemoveButton.js +17 -0
  51. package/dist/editor/components/RenderModal/JpegQualitySetting.d.ts +5 -0
  52. package/dist/editor/components/RenderModal/JpegQualitySetting.js +12 -0
  53. package/dist/editor/components/RenderModal/MutedSetting.d.ts +8 -0
  54. package/dist/editor/components/RenderModal/MutedSetting.js +16 -0
  55. package/dist/editor/components/RenderModal/NumberOfLoopsSetting.d.ts +5 -0
  56. package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +26 -0
  57. package/dist/editor/components/RenderModal/NumberSetting.d.ts +12 -0
  58. package/dist/editor/components/RenderModal/NumberSetting.js +29 -0
  59. package/dist/editor/components/RenderModal/OptionExplainer.d.ts +5 -0
  60. package/dist/editor/components/RenderModal/OptionExplainer.js +45 -0
  61. package/dist/editor/components/RenderModal/RenderModal.d.ts +35 -0
  62. package/dist/editor/components/RenderModal/RenderModal.js +597 -0
  63. package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +26 -0
  64. package/dist/editor/components/RenderModal/RenderModalAdvanced.js +61 -0
  65. package/dist/editor/components/RenderModal/RenderModalAudio.d.ts +17 -0
  66. package/dist/editor/components/RenderModal/RenderModalAudio.js +46 -0
  67. package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +23 -0
  68. package/dist/editor/components/RenderModal/RenderModalBasic.js +79 -0
  69. package/dist/editor/components/RenderModal/RenderModalData.d.ts +20 -0
  70. package/dist/editor/components/RenderModal/RenderModalData.js +249 -0
  71. package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.d.ts +5 -0
  72. package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.js +55 -0
  73. package/dist/editor/components/RenderModal/RenderModalGif.d.ts +9 -0
  74. package/dist/editor/components/RenderModal/RenderModalGif.js +19 -0
  75. package/dist/editor/components/RenderModal/RenderModalHr.d.ts +2 -0
  76. package/dist/editor/components/RenderModal/RenderModalHr.js +18 -0
  77. package/dist/editor/components/RenderModal/RenderModalInput.d.ts +10 -0
  78. package/dist/editor/components/RenderModal/RenderModalInput.js +13 -0
  79. package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +15 -0
  80. package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.js +109 -0
  81. package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +28 -0
  82. package/dist/editor/components/RenderModal/RenderModalPicture.js +54 -0
  83. package/dist/editor/components/RenderModal/RenderStatusModal.d.ts +4 -0
  84. package/dist/editor/components/RenderModal/RenderStatusModal.js +72 -0
  85. package/dist/editor/components/RenderModal/ScaleSetting.d.ts +5 -0
  86. package/dist/editor/components/RenderModal/ScaleSetting.js +17 -0
  87. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +13 -0
  88. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +39 -0
  89. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.d.ts +2 -0
  90. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.js +15 -0
  91. package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +12 -0
  92. package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +59 -0
  93. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +16 -0
  94. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +40 -0
  95. package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.d.ts +4 -0
  96. package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.js +17 -0
  97. package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.d.ts +5 -0
  98. package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.js +17 -0
  99. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +15 -0
  100. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +84 -0
  101. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +14 -0
  102. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +28 -0
  103. package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +13 -0
  104. package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +27 -0
  105. package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +15 -0
  106. package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +116 -0
  107. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +15 -0
  108. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +76 -0
  109. package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +15 -0
  110. package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +55 -0
  111. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +15 -0
  112. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +72 -0
  113. package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +5 -0
  114. package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -0
  115. package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.d.ts +9 -0
  116. package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +27 -0
  117. package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +15 -0
  118. package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.js +10 -0
  119. package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +15 -0
  120. package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +88 -0
  121. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +15 -0
  122. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +64 -0
  123. package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +15 -0
  124. package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +10 -0
  125. package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +16 -0
  126. package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +52 -0
  127. package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +15 -0
  128. package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +48 -0
  129. package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +15 -0
  130. package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +84 -0
  131. package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +15 -0
  132. package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.js +49 -0
  133. package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.d.ts +2 -0
  134. package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.js +158 -0
  135. package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.d.ts +6 -0
  136. package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.js +24 -0
  137. package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.d.ts +2 -0
  138. package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.js +15 -0
  139. package/dist/editor/components/RenderModal/SchemaEditor/zod-types.d.ts +1 -0
  140. package/dist/editor/components/RenderModal/SchemaEditor/zod-types.js +2 -0
  141. package/dist/editor/components/RenderModal/WarningIndicatorButton.d.ts +6 -0
  142. package/dist/editor/components/RenderModal/WarningIndicatorButton.js +49 -0
  143. package/dist/editor/components/RenderModal/get-render-modal-warnings.d.ts +15 -0
  144. package/dist/editor/components/RenderModal/get-render-modal-warnings.js +34 -0
  145. package/dist/editor/components/RenderModal/human-readable-audio-codecs.d.ts +2 -0
  146. package/dist/editor/components/RenderModal/human-readable-audio-codecs.js +18 -0
  147. package/dist/editor/components/RenderModal/human-readable-codec.d.ts +2 -0
  148. package/dist/editor/components/RenderModal/human-readable-codec.js +36 -0
  149. package/dist/editor/components/RenderModal/layout.d.ts +7 -0
  150. package/dist/editor/components/RenderModal/layout.js +45 -0
  151. package/dist/editor/components/RenderModal/out-name-checker.d.ts +14 -0
  152. package/dist/editor/components/RenderModal/out-name-checker.js +80 -0
  153. package/dist/editor/components/RenderQueue/CircularProgress.d.ts +5 -0
  154. package/dist/editor/components/RenderQueue/CircularProgress.js +18 -0
  155. package/dist/editor/components/RenderQueue/RenderQueueError.d.ts +5 -0
  156. package/dist/editor/components/RenderQueue/RenderQueueError.js +26 -0
  157. package/dist/editor/components/RenderQueue/RenderQueueItem.d.ts +5 -0
  158. package/dist/editor/components/RenderQueue/RenderQueueItem.js +40 -0
  159. package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.d.ts +5 -0
  160. package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.js +26 -0
  161. package/dist/editor/components/RenderQueue/RenderQueueItemStatus.d.ts +5 -0
  162. package/dist/editor/components/RenderQueue/RenderQueueItemStatus.js +43 -0
  163. package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.d.ts +5 -0
  164. package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +26 -0
  165. package/dist/editor/components/RenderQueue/RenderQueueOutputName.d.ts +5 -0
  166. package/dist/editor/components/RenderQueue/RenderQueueOutputName.js +26 -0
  167. package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.d.ts +5 -0
  168. package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.js +26 -0
  169. package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.d.ts +5 -0
  170. package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +37 -0
  171. package/dist/editor/components/RenderQueue/RenderQueueRepeat.d.ts +5 -0
  172. package/dist/editor/components/RenderQueue/RenderQueueRepeat.js +26 -0
  173. package/dist/editor/components/RenderQueue/SuccessIcon.d.ts +2 -0
  174. package/dist/editor/components/RenderQueue/SuccessIcon.js +14 -0
  175. package/dist/editor/components/RenderQueue/actions.d.ts +58 -0
  176. package/dist/editor/components/RenderQueue/actions.js +120 -0
  177. package/dist/editor/components/RenderQueue/context.d.ts +18 -0
  178. package/dist/editor/components/RenderQueue/context.js +49 -0
  179. package/dist/editor/components/RenderQueue/index.d.ts +2 -0
  180. package/dist/editor/components/RenderQueue/index.js +43 -0
  181. package/dist/editor/components/RenderQueue/item-style.d.ts +2 -0
  182. package/dist/editor/components/RenderQueue/item-style.js +21 -0
  183. package/dist/editor/components/RendersTab.d.ts +6 -0
  184. package/dist/editor/components/RendersTab.js +43 -0
  185. package/dist/editor/components/RightPanel.d.ts +8 -0
  186. package/dist/editor/components/RightPanel.js +76 -0
  187. package/dist/editor/components/SegmentedControl.d.ts +11 -0
  188. package/dist/editor/components/SegmentedControl.js +62 -0
  189. package/dist/editor/components/SetTimelineInOutProvider.d.ts +4 -0
  190. package/dist/editor/components/SetTimelineInOutProvider.js +19 -0
  191. package/dist/editor/components/SidebarCollapserControls.d.ts +2 -0
  192. package/dist/editor/components/SidebarCollapserControls.js +135 -0
  193. package/dist/editor/components/SidebarRenderButton.d.ts +6 -0
  194. package/dist/editor/components/SidebarRenderButton.js +85 -0
  195. package/dist/editor/components/Tabs/index.d.ts +11 -0
  196. package/dist/editor/components/Tabs/index.js +58 -0
  197. package/dist/editor/components/Tabs/vertical.d.ts +7 -0
  198. package/dist/editor/components/Tabs/vertical.js +43 -0
  199. package/dist/editor/components/ZoomGesturesProvider.d.ts +4 -0
  200. package/dist/editor/components/ZoomGesturesProvider.js +24 -0
  201. package/dist/editor/components/get-zod-if-possible.d.ts +10 -0
  202. package/dist/editor/components/get-zod-if-possible.js +79 -0
  203. package/dist/editor/helpers/client-id.d.ts +17 -0
  204. package/dist/editor/helpers/client-id.js +46 -0
  205. package/dist/editor/helpers/convert-env-variables.d.ts +2 -0
  206. package/dist/editor/helpers/convert-env-variables.js +20 -0
  207. package/dist/editor/helpers/prores-labels.d.ts +2 -0
  208. package/dist/editor/helpers/prores-labels.js +25 -0
  209. package/dist/editor/helpers/render-modal-sections.d.ts +10 -0
  210. package/dist/editor/helpers/render-modal-sections.js +32 -0
  211. package/dist/editor/helpers/use-breakpoint.d.ts +1 -0
  212. package/dist/editor/helpers/use-breakpoint.js +17 -0
  213. package/dist/editor/helpers/use-file-existence.d.ts +1 -0
  214. package/dist/editor/helpers/use-file-existence.js +66 -0
  215. package/dist/editor/icons/audio.d.ts +2 -0
  216. package/dist/editor/icons/audio.js +6 -0
  217. package/dist/editor/icons/data.d.ts +2 -0
  218. package/dist/editor/icons/data.js +8 -0
  219. package/dist/editor/icons/file.d.ts +2 -0
  220. package/dist/editor/icons/file.js +6 -0
  221. package/dist/editor/icons/frame.d.ts +2 -0
  222. package/dist/editor/icons/frame.js +6 -0
  223. package/dist/editor/icons/gear.d.ts +2 -0
  224. package/dist/editor/icons/gear.js +6 -0
  225. package/dist/editor/icons/gif.d.ts +2 -0
  226. package/dist/editor/icons/gif.js +6 -0
  227. package/dist/editor/icons/render.d.ts +9 -0
  228. package/dist/editor/icons/render.js +12 -0
  229. package/dist/editor/icons/video.d.ts +5 -0
  230. package/dist/editor/icons/video.js +8 -0
  231. package/dist/ffmpeg.d.ts +2 -0
  232. package/dist/ffmpeg.js +21 -0
  233. package/dist/file-watcher.d.ts +9 -0
  234. package/dist/file-watcher.js +35 -0
  235. package/dist/get-default-out-name.d.ts +5 -0
  236. package/dist/get-default-out-name.js +10 -0
  237. package/dist/preview-server/api-routes.d.ts +4 -0
  238. package/dist/preview-server/api-routes.js +21 -0
  239. package/dist/preview-server/api-types.d.ts +25 -0
  240. package/dist/preview-server/api-types.js +2 -0
  241. package/dist/preview-server/file-existence-watchers.d.ts +13 -0
  242. package/dist/preview-server/file-existence-watchers.js +62 -0
  243. package/dist/preview-server/handler.d.ts +9 -0
  244. package/dist/preview-server/handler.js +34 -0
  245. package/dist/preview-server/parse-body.d.ts +2 -0
  246. package/dist/preview-server/parse-body.js +16 -0
  247. package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +10 -0
  248. package/dist/preview-server/render-queue/get-default-video-contexts.js +13 -0
  249. package/dist/preview-server/render-queue/job.d.ts +138 -0
  250. package/dist/preview-server/render-queue/job.js +2 -0
  251. package/dist/preview-server/render-queue/make-retry-payload.d.ts +3 -0
  252. package/dist/preview-server/render-queue/make-retry-payload.js +91 -0
  253. package/dist/preview-server/render-queue/open-directory-in-finder.d.ts +1 -0
  254. package/dist/preview-server/render-queue/open-directory-in-finder.js +43 -0
  255. package/dist/preview-server/render-queue/process-still.d.ts +8 -0
  256. package/dist/preview-server/render-queue/process-still.js +46 -0
  257. package/dist/preview-server/render-queue/process-video.d.ts +8 -0
  258. package/dist/preview-server/render-queue/process-video.js +63 -0
  259. package/dist/preview-server/render-queue/queue.d.ts +9 -0
  260. package/dist/preview-server/render-queue/queue.js +212 -0
  261. package/dist/preview-server/routes/add-render.d.ts +3 -0
  262. package/dist/preview-server/routes/add-render.js +76 -0
  263. package/dist/preview-server/routes/can-update-default-props.d.ts +4 -0
  264. package/dist/preview-server/routes/can-update-default-props.js +39 -0
  265. package/dist/preview-server/routes/cancel-render.d.ts +3 -0
  266. package/dist/preview-server/routes/cancel-render.js +9 -0
  267. package/dist/preview-server/routes/open-in-file-explorer.d.ts +3 -0
  268. package/dist/preview-server/routes/open-in-file-explorer.js +8 -0
  269. package/dist/preview-server/routes/remove-render.d.ts +3 -0
  270. package/dist/preview-server/routes/remove-render.js +9 -0
  271. package/dist/preview-server/routes/subscribe-to-file-existence.d.ts +3 -0
  272. package/dist/preview-server/routes/subscribe-to-file-existence.js +13 -0
  273. package/dist/preview-server/routes/unsubscribe-from-file-existence.d.ts +3 -0
  274. package/dist/preview-server/routes/unsubscribe-from-file-existence.js +13 -0
  275. package/dist/preview-server/routes/update-default-props.d.ts +3 -0
  276. package/dist/preview-server/routes/update-default-props.js +24 -0
  277. package/dist/progress-types.d.ts +32 -0
  278. package/dist/progress-types.js +17 -0
  279. package/dist/render-flows/render.d.ts +47 -0
  280. package/dist/render-flows/render.js +293 -0
  281. package/dist/render-flows/still.d.ts +29 -0
  282. package/dist/render-flows/still.js +174 -0
  283. package/dist/required-chromium-options.d.ts +3 -0
  284. package/dist/required-chromium-options.js +2 -0
  285. package/package.json +6 -6
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createZodValues = void 0;
4
+ const createZodValues = (schema, zodRuntime, zodTypes) => {
5
+ if (!schema) {
6
+ throw new Error('Invalid zod schema');
7
+ }
8
+ const def = schema._def;
9
+ const typeName = def.typeName;
10
+ switch (typeName) {
11
+ case zodRuntime.ZodFirstPartyTypeKind.ZodString:
12
+ return '';
13
+ case zodRuntime.ZodFirstPartyTypeKind.ZodNumber:
14
+ return 0;
15
+ case zodRuntime.ZodFirstPartyTypeKind.ZodBigInt:
16
+ return BigInt(0);
17
+ case zodRuntime.ZodFirstPartyTypeKind.ZodBoolean:
18
+ return false;
19
+ case zodRuntime.ZodFirstPartyTypeKind.ZodNaN:
20
+ return NaN;
21
+ case zodRuntime.ZodFirstPartyTypeKind.ZodDate:
22
+ return new Date();
23
+ case zodRuntime.ZodFirstPartyTypeKind.ZodSymbol:
24
+ return Symbol('remotion');
25
+ case zodRuntime.ZodFirstPartyTypeKind.ZodUndefined:
26
+ return undefined;
27
+ case zodRuntime.ZodFirstPartyTypeKind.ZodNull:
28
+ return null;
29
+ case zodRuntime.ZodFirstPartyTypeKind.ZodAny:
30
+ throw new Error('Cannot create a value for type z.any()');
31
+ case zodRuntime.ZodFirstPartyTypeKind.ZodUnknown:
32
+ throw new Error('Cannot create a value for type z.unknown()');
33
+ case zodRuntime.ZodFirstPartyTypeKind.ZodNever:
34
+ throw new Error('Cannot create a value for type z.never()');
35
+ case zodRuntime.ZodFirstPartyTypeKind.ZodVoid:
36
+ return undefined;
37
+ case zodRuntime.ZodFirstPartyTypeKind.ZodObject: {
38
+ const shape = def.shape();
39
+ const keys = Object.keys(shape);
40
+ const returnValue = keys.reduce((existing, key) => {
41
+ existing[key] = (0, exports.createZodValues)(shape[key], zodRuntime, zodTypes);
42
+ return existing;
43
+ }, {});
44
+ return returnValue;
45
+ }
46
+ case zodRuntime.ZodFirstPartyTypeKind.ZodArray: {
47
+ return [
48
+ (0, exports.createZodValues)(def.type, zodRuntime, zodTypes),
49
+ ];
50
+ }
51
+ case zodRuntime.ZodFirstPartyTypeKind.ZodUnion: {
52
+ const firstOptions = def.options[0];
53
+ return firstOptions
54
+ ? (0, exports.createZodValues)(firstOptions, zodRuntime, zodTypes)
55
+ : undefined;
56
+ }
57
+ case zodRuntime.ZodFirstPartyTypeKind.ZodDiscriminatedUnion: {
58
+ const options = def.options[0];
59
+ return (0, exports.createZodValues)(options, zodRuntime, zodTypes);
60
+ }
61
+ case zodRuntime.ZodFirstPartyTypeKind.ZodLiteral: {
62
+ return def.value;
63
+ }
64
+ case zodRuntime.ZodFirstPartyTypeKind.ZodEffects: {
65
+ if (zodTypes &&
66
+ schema._def.description ===
67
+ zodTypes.ZodZypesInternals.REMOTION_COLOR_BRAND) {
68
+ return '#ffffff';
69
+ }
70
+ return (0, exports.createZodValues)(def.schema, zodRuntime, zodTypes);
71
+ }
72
+ case zodRuntime.ZodFirstPartyTypeKind.ZodIntersection: {
73
+ const { left, right } = def;
74
+ const leftValue = (0, exports.createZodValues)(left, zodRuntime, zodTypes);
75
+ if (typeof leftValue !== 'object') {
76
+ throw new Error('Cannot create value for type z.intersection: Left side is not an object');
77
+ }
78
+ const rightValue = (0, exports.createZodValues)(right, zodRuntime, zodTypes);
79
+ if (typeof rightValue !== 'object') {
80
+ throw new Error('Cannot create value for type z.intersection: Right side is not an object');
81
+ }
82
+ return { ...leftValue, ...rightValue };
83
+ }
84
+ case zodRuntime.ZodFirstPartyTypeKind.ZodTuple: {
85
+ const items = def.items.map((item) => (0, exports.createZodValues)(item, zodRuntime, zodTypes));
86
+ return items;
87
+ }
88
+ case zodRuntime.ZodFirstPartyTypeKind.ZodRecord: {
89
+ const values = (0, exports.createZodValues)(def.valueType, zodRuntime, zodTypes);
90
+ return { key: values };
91
+ }
92
+ case zodRuntime.ZodFirstPartyTypeKind.ZodMap: {
93
+ const defType = def;
94
+ const values = (0, exports.createZodValues)(defType.valueType, zodRuntime, zodTypes);
95
+ const key = (0, exports.createZodValues)(defType.keyType, zodRuntime, zodTypes);
96
+ return new Map([[key, values]]);
97
+ }
98
+ case zodRuntime.ZodFirstPartyTypeKind.ZodLazy: {
99
+ const defType = def;
100
+ const type = defType.getter();
101
+ return (0, exports.createZodValues)(type, zodRuntime, zodTypes);
102
+ }
103
+ case zodRuntime.ZodFirstPartyTypeKind.ZodSet: {
104
+ const defType = def;
105
+ const values = (0, exports.createZodValues)(defType.valueType, zodRuntime, zodTypes);
106
+ return new Set([values]);
107
+ }
108
+ case zodRuntime.ZodFirstPartyTypeKind.ZodFunction: {
109
+ throw new Error('Cannot create a value for type function');
110
+ }
111
+ case zodRuntime.ZodFirstPartyTypeKind.ZodEnum: {
112
+ const { values } = def;
113
+ return values[0];
114
+ }
115
+ case zodRuntime.ZodFirstPartyTypeKind.ZodNativeEnum: {
116
+ return 0;
117
+ }
118
+ case zodRuntime.ZodFirstPartyTypeKind.ZodOptional: {
119
+ const defType = def;
120
+ const value = (0, exports.createZodValues)(defType.innerType, zodRuntime, zodTypes);
121
+ return value;
122
+ }
123
+ case zodRuntime.ZodFirstPartyTypeKind.ZodNullable: {
124
+ const defType = def;
125
+ const value = (0, exports.createZodValues)(defType.innerType, zodRuntime, zodTypes);
126
+ return value;
127
+ }
128
+ case zodRuntime.ZodFirstPartyTypeKind.ZodDefault: {
129
+ const defType = def;
130
+ return defType.defaultValue();
131
+ }
132
+ case zodRuntime.ZodFirstPartyTypeKind.ZodCatch: {
133
+ const defType = def;
134
+ const value = (0, exports.createZodValues)(defType.innerType, zodRuntime, zodTypes);
135
+ return value;
136
+ }
137
+ case zodRuntime.ZodFirstPartyTypeKind.ZodPromise: {
138
+ const defType = def;
139
+ const value = (0, exports.createZodValues)(defType.type, zodRuntime, zodTypes);
140
+ return Promise.resolve(value);
141
+ }
142
+ case zodRuntime.ZodFirstPartyTypeKind.ZodBranded: {
143
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
144
+ const defType = def;
145
+ const value = (0, exports.createZodValues)(defType.type, zodRuntime, zodTypes);
146
+ return value;
147
+ }
148
+ case zodRuntime.ZodFirstPartyTypeKind.ZodPipeline: {
149
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
150
+ const defType = def;
151
+ const value = (0, exports.createZodValues)(defType.out, zodRuntime, zodTypes);
152
+ return value;
153
+ }
154
+ default:
155
+ throw new Error('Not implemented: ' + typeName);
156
+ }
157
+ };
158
+ exports.createZodValues = createZodValues;
@@ -0,0 +1,6 @@
1
+ export declare type SerializedJSONWithDate = {
2
+ serializedString: string;
3
+ customDateUsed: boolean;
4
+ };
5
+ export declare const serializeJSONWithDate: (data: unknown, indent: number | undefined) => SerializedJSONWithDate;
6
+ export declare const deserializeJSONWithDate: (data: string) => any;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deserializeJSONWithDate = exports.serializeJSONWithDate = void 0;
4
+ const serializeJSONWithDate = (data, indent) => {
5
+ let customDateUsed = false;
6
+ const serializedString = JSON.stringify(data, function (key, value) {
7
+ if (this[key] instanceof Date) {
8
+ customDateUsed = true;
9
+ return `remotion-date:${this[key].toISOString()}`;
10
+ }
11
+ return value;
12
+ }, indent);
13
+ return { serializedString, customDateUsed };
14
+ };
15
+ exports.serializeJSONWithDate = serializeJSONWithDate;
16
+ const deserializeJSONWithDate = (data) => {
17
+ return JSON.parse(data, (_, value) => {
18
+ if (typeof value === 'string' && value.startsWith('remotion-date:')) {
19
+ return new Date(value.replace('remotion-date:', ''));
20
+ }
21
+ return value;
22
+ });
23
+ };
24
+ exports.deserializeJSONWithDate = deserializeJSONWithDate;
@@ -0,0 +1,2 @@
1
+ import type { JSONPath } from './zod-types';
2
+ export declare const getSchemaLabel: (jsonPath: JSONPath) => string;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSchemaLabel = void 0;
4
+ const getSchemaLabel = (jsonPath) => {
5
+ const lastKey = jsonPath[jsonPath.length - 1];
6
+ if (typeof lastKey === 'number') {
7
+ const secondLastKey = jsonPath[jsonPath.length - 2];
8
+ if (typeof secondLastKey === 'undefined') {
9
+ return `[${lastKey}]`;
10
+ }
11
+ return `${(0, exports.getSchemaLabel)(jsonPath.slice(0, jsonPath.length - 1))}[${lastKey}]`;
12
+ }
13
+ return lastKey;
14
+ };
15
+ exports.getSchemaLabel = getSchemaLabel;
@@ -0,0 +1 @@
1
+ export declare type JSONPath = (string | number)[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const WarningIndicatorButton: React.FC<{
3
+ setShowWarning: React.Dispatch<React.SetStateAction<boolean>>;
4
+ showWarning: boolean;
5
+ warningCount: number;
6
+ }>;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WarningIndicatorButton = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../../helpers/colors");
7
+ const caret_1 = require("../../icons/caret");
8
+ const layout_1 = require("../layout");
9
+ const style = {
10
+ fontSize: 12,
11
+ display: 'inline-flex',
12
+ justifyContent: 'center',
13
+ alignItems: 'center',
14
+ backgroundColor: 'transparent',
15
+ color: colors_1.LIGHT_TEXT,
16
+ borderStyle: 'solid',
17
+ borderWidth: 1,
18
+ cursor: 'pointer',
19
+ paddingLeft: 8,
20
+ paddingRight: 8,
21
+ paddingTop: 4,
22
+ paddingBottom: 4,
23
+ };
24
+ const triangleStyle = {
25
+ width: 12,
26
+ height: 12,
27
+ flexShrink: 0,
28
+ fill: colors_1.WARNING_COLOR,
29
+ };
30
+ const WarningTriangle = (props) => {
31
+ return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 576 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { d: "M248.747 204.705l6.588 112c.373 6.343 5.626 11.295 11.979 11.295h41.37a12 12 0 0 0 11.979-11.295l6.588-112c.405-6.893-5.075-12.705-11.979-12.705h-54.547c-6.903 0-12.383 5.812-11.978 12.705zM330 384c0 23.196-18.804 42-42 42s-42-18.804-42-42 18.804-42 42-42 42 18.804 42 42zm-.423-360.015c-18.433-31.951-64.687-32.009-83.154 0L6.477 440.013C-11.945 471.946 11.118 512 48.054 512H527.94c36.865 0 60.035-39.993 41.577-71.987L329.577 23.985zM53.191 455.002L282.803 57.008c2.309-4.002 8.085-4.002 10.394 0l229.612 397.993c2.308 4-.579 8.998-5.197 8.998H58.388c-4.617.001-7.504-4.997-5.197-8.997z" }) }));
32
+ };
33
+ const WarningIndicatorButton = ({ setShowWarning, showWarning, warningCount }) => {
34
+ const onClick = (0, react_1.useCallback)(() => {
35
+ setShowWarning((s) => !s);
36
+ }, [setShowWarning]);
37
+ const buttonStyle = (0, react_1.useMemo)(() => {
38
+ return {
39
+ ...style,
40
+ backgroundColor: showWarning ? colors_1.INPUT_BACKGROUND : 'transparent',
41
+ borderColor: showWarning
42
+ ? colors_1.INPUT_BORDER_COLOR_HOVERED
43
+ : colors_1.INPUT_BORDER_COLOR_UNHOVERED,
44
+ color: showWarning ? 'white' : colors_1.LIGHT_TEXT,
45
+ };
46
+ }, [showWarning]);
47
+ return ((0, jsx_runtime_1.jsxs)("button", { type: "button", style: buttonStyle, onClick: onClick, children: [(0, jsx_runtime_1.jsx)(WarningTriangle, { style: triangleStyle }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), warningCount, (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(caret_1.AngleDown, { down: showWarning })] }));
48
+ };
49
+ exports.WarningIndicatorButton = WarningIndicatorButton;
@@ -0,0 +1,15 @@
1
+ import type { PropsEditType } from './RenderModalData';
2
+ export declare type TypeCanSaveState = {
3
+ canUpdate: true;
4
+ } | {
5
+ canUpdate: false;
6
+ reason: string;
7
+ determined: boolean;
8
+ };
9
+ export declare const getRenderModalWarnings: ({ cliProps, canSaveDefaultProps, isCustomDateUsed, inJSONEditor, propsEditType, }: {
10
+ cliProps: unknown;
11
+ canSaveDefaultProps: TypeCanSaveState;
12
+ isCustomDateUsed: boolean | undefined;
13
+ inJSONEditor: boolean;
14
+ propsEditType: PropsEditType;
15
+ }) => string[];
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRenderModalWarnings = void 0;
4
+ const truthy_1 = require("../../../truthy");
5
+ const getInputPropsWarning = ({ cliProps, propsEditType, }) => {
6
+ if (Object.keys(cliProps).length > 0 &&
7
+ propsEditType === 'default-props') {
8
+ return 'The data that was passed using --props takes priority over the data you enter here.';
9
+ }
10
+ return null;
11
+ };
12
+ const getCannotSaveDefaultProps = (canSaveDefaultProps) => {
13
+ if (canSaveDefaultProps.canUpdate) {
14
+ return null;
15
+ }
16
+ if (!canSaveDefaultProps.determined) {
17
+ return null;
18
+ }
19
+ return `Can't save default props: ${canSaveDefaultProps.reason}.`;
20
+ };
21
+ const customDateUsed = (used, inJSONEditor) => {
22
+ if (used && inJSONEditor) {
23
+ return "There is a Date in the schema which can't be serialized. It has been converted into a string.";
24
+ }
25
+ return null;
26
+ };
27
+ const getRenderModalWarnings = ({ cliProps, canSaveDefaultProps, isCustomDateUsed, inJSONEditor, propsEditType, }) => {
28
+ return [
29
+ getInputPropsWarning({ cliProps, propsEditType }),
30
+ getCannotSaveDefaultProps(canSaveDefaultProps),
31
+ customDateUsed(isCustomDateUsed, inJSONEditor),
32
+ ].filter(truthy_1.truthy);
33
+ };
34
+ exports.getRenderModalWarnings = getRenderModalWarnings;
@@ -0,0 +1,2 @@
1
+ import type { AudioCodec } from '@remotion/renderer';
2
+ export declare const humanReadableAudioCodec: (audioCodec: AudioCodec) => "AAC" | "MP3" | "Lossless" | "Opus" | undefined;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.humanReadableAudioCodec = void 0;
4
+ const humanReadableAudioCodec = (audioCodec) => {
5
+ if (audioCodec === 'aac') {
6
+ return 'AAC';
7
+ }
8
+ if (audioCodec === 'mp3') {
9
+ return 'MP3';
10
+ }
11
+ if (audioCodec === 'pcm-16') {
12
+ return 'Lossless';
13
+ }
14
+ if (audioCodec === 'opus') {
15
+ return 'Opus';
16
+ }
17
+ };
18
+ exports.humanReadableAudioCodec = humanReadableAudioCodec;
@@ -0,0 +1,2 @@
1
+ import type { Codec } from '@remotion/renderer';
2
+ export declare const humanReadableCodec: (codec: Codec) => "GIF" | "AAC" | "MP3" | "H.264" | "H.264 Matroska" | "H.265" | "ProRes" | "WebM VP8" | "WebM VP9" | "Waveform" | undefined;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.humanReadableCodec = void 0;
4
+ const humanReadableCodec = (codec) => {
5
+ if (codec === 'aac') {
6
+ return 'AAC';
7
+ }
8
+ if (codec === 'mp3') {
9
+ return 'MP3';
10
+ }
11
+ if (codec === 'gif') {
12
+ return 'GIF';
13
+ }
14
+ if (codec === 'h264') {
15
+ return 'H.264';
16
+ }
17
+ if (codec === 'h264-mkv') {
18
+ return 'H.264 Matroska';
19
+ }
20
+ if (codec === 'h265') {
21
+ return 'H.265';
22
+ }
23
+ if (codec === 'prores') {
24
+ return 'ProRes';
25
+ }
26
+ if (codec === 'vp8') {
27
+ return 'WebM VP8';
28
+ }
29
+ if (codec === 'vp9') {
30
+ return 'WebM VP9';
31
+ }
32
+ if (codec === 'wav') {
33
+ return 'Waveform';
34
+ }
35
+ };
36
+ exports.humanReadableCodec = humanReadableCodec;
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ export declare const optionRow: React.CSSProperties;
3
+ export declare const narrowOption: React.CSSProperties;
4
+ export declare const label: React.CSSProperties;
5
+ export declare const rightRow: React.CSSProperties;
6
+ export declare const input: React.CSSProperties;
7
+ export declare const fieldsetLabel: React.CSSProperties;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fieldsetLabel = exports.input = exports.rightRow = exports.label = exports.narrowOption = exports.optionRow = void 0;
4
+ const colors_1 = require("../../helpers/colors");
5
+ exports.optionRow = {
6
+ display: 'flex',
7
+ flexDirection: 'row',
8
+ minHeight: 40,
9
+ paddingLeft: 16,
10
+ paddingRight: 16,
11
+ paddingTop: 8,
12
+ paddingBottom: 8,
13
+ };
14
+ exports.narrowOption = {
15
+ display: 'flex',
16
+ flexDirection: 'column',
17
+ };
18
+ exports.label = {
19
+ width: 170,
20
+ fontSize: 15,
21
+ lineHeight: '40px',
22
+ color: colors_1.LIGHT_TEXT,
23
+ fontFamily: 'sans-serif',
24
+ };
25
+ exports.rightRow = {
26
+ display: 'flex',
27
+ flexDirection: 'row',
28
+ justifyContent: 'flex-end',
29
+ alignSelf: 'center',
30
+ flex: 1,
31
+ };
32
+ exports.input = {
33
+ minWidth: 250,
34
+ };
35
+ exports.fieldsetLabel = {
36
+ color: colors_1.LIGHT_TEXT,
37
+ fontSize: 14,
38
+ paddingLeft: 5,
39
+ paddingRight: 5,
40
+ display: 'flex',
41
+ flexDirection: 'row',
42
+ fontFamily: 'monospace',
43
+ alignItems: 'center',
44
+ width: '100%',
45
+ };
@@ -0,0 +1,14 @@
1
+ import type { AudioCodec, Codec, StillImageFormat } from '@remotion/renderer';
2
+ import type { RenderType } from './RenderModalAdvanced';
3
+ export declare const validateOutnameGui: ({ outName, codec, audioCodec, renderMode, stillImageFormat, }: {
4
+ outName: string;
5
+ codec: Codec;
6
+ audioCodec: AudioCodec;
7
+ renderMode: RenderType;
8
+ stillImageFormat: StillImageFormat | null;
9
+ }) => {
10
+ valid: true;
11
+ } | {
12
+ valid: false;
13
+ error: Error;
14
+ };
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateOutnameGui = void 0;
4
+ const client_1 = require("@remotion/renderer/client");
5
+ const invalidCharacters = ['?', '*', '+', ':', '%'];
6
+ const isValidStillExtension = (extension, stillImageFormat) => {
7
+ if (stillImageFormat === 'jpeg' && extension === 'jpg') {
8
+ return true;
9
+ }
10
+ return extension === stillImageFormat;
11
+ };
12
+ const validateOutnameGui = ({ outName, codec, audioCodec, renderMode, stillImageFormat, }) => {
13
+ try {
14
+ isValidOutName({
15
+ audioCodec,
16
+ codec,
17
+ outName,
18
+ renderMode,
19
+ stillImageFormat,
20
+ });
21
+ return { valid: true };
22
+ }
23
+ catch (err) {
24
+ return { valid: false, error: err };
25
+ }
26
+ };
27
+ exports.validateOutnameGui = validateOutnameGui;
28
+ const isValidOutName = ({ outName, codec, audioCodec, renderMode, stillImageFormat, }) => {
29
+ const extension = outName.substring(outName.lastIndexOf('.') + 1);
30
+ const prefix = outName.substring(0, outName.lastIndexOf('.'));
31
+ const map = client_1.BrowserSafeApis.defaultFileExtensionMap[codec];
32
+ if (client_1.BrowserSafeApis.supportedAudioCodecs[codec].length > 0 &&
33
+ !(audioCodec in map.forAudioCodec)) {
34
+ throw new Error(`Audio codec ${audioCodec} is not supported for codec ${codec}`);
35
+ }
36
+ const hasDotAfterSlash = () => {
37
+ const substrings = prefix.split('/');
38
+ for (const str of substrings) {
39
+ if (str[0] === '.') {
40
+ return true;
41
+ }
42
+ }
43
+ return false;
44
+ };
45
+ const hasInvalidChar = () => {
46
+ return prefix.split('').some((char) => invalidCharacters.includes(char));
47
+ };
48
+ if (renderMode === 'video') {
49
+ client_1.BrowserSafeApis.validateOutputFilename({
50
+ codec,
51
+ audioCodec: audioCodec !== null && audioCodec !== void 0 ? audioCodec : null,
52
+ extension,
53
+ preferLossless: false,
54
+ });
55
+ }
56
+ if (prefix.length < 1) {
57
+ throw new Error('The prefix must be at least 1 character long');
58
+ }
59
+ if (prefix[0] === '.' || hasDotAfterSlash()) {
60
+ throw new Error('The output name must not start with a dot');
61
+ }
62
+ if (hasInvalidChar()) {
63
+ throw new Error("Filename can't contain the following characters: ?, *, +, %, :");
64
+ }
65
+ if (renderMode === 'still' &&
66
+ stillImageFormat &&
67
+ !isValidStillExtension(extension, stillImageFormat)) {
68
+ throw new Error(`The extension ${extension} is not supported for still image format ${stillImageFormat}`);
69
+ }
70
+ if (renderMode === 'audio') {
71
+ if (audioCodec === 'pcm-16') {
72
+ if (extension !== 'wav' && extension !== 'wave') {
73
+ throw new Error(`The extension ${extension} is not supported for audio codec ${audioCodec}`);
74
+ }
75
+ }
76
+ if (audioCodec !== extension) {
77
+ throw new Error(`The extension ${extension} is not supported for audio codec ${audioCodec}`);
78
+ }
79
+ }
80
+ };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const RENDER_STATUS_INDICATOR_SIZE = 16;
3
+ export declare const CircularProgress: React.FC<{
4
+ progress: number;
5
+ }>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CircularProgress = exports.RENDER_STATUS_INDICATOR_SIZE = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../../helpers/colors");
6
+ exports.RENDER_STATUS_INDICATOR_SIZE = 16;
7
+ const STROKE_WIDTH = 3;
8
+ const container = {
9
+ height: exports.RENDER_STATUS_INDICATOR_SIZE,
10
+ width: exports.RENDER_STATUS_INDICATOR_SIZE,
11
+ transform: `rotate(-90deg)`,
12
+ };
13
+ const CircularProgress = ({ progress }) => {
14
+ const r = exports.RENDER_STATUS_INDICATOR_SIZE / 2 - STROKE_WIDTH;
15
+ const circumference = r * Math.PI * 2;
16
+ return ((0, jsx_runtime_1.jsx)("svg", { style: container, viewBox: `0 0 ${exports.RENDER_STATUS_INDICATOR_SIZE} ${exports.RENDER_STATUS_INDICATOR_SIZE}`, children: (0, jsx_runtime_1.jsx)("circle", { r: exports.RENDER_STATUS_INDICATOR_SIZE / 2 - STROKE_WIDTH, stroke: colors_1.LIGHT_TEXT, fill: "none", strokeWidth: STROKE_WIDTH, cx: exports.RENDER_STATUS_INDICATOR_SIZE / 2, cy: exports.RENDER_STATUS_INDICATOR_SIZE / 2, strokeDasharray: `${circumference} ${circumference}`, strokeMiterlimit: 0, strokeDashoffset: (1 - progress) * circumference }) }));
17
+ };
18
+ exports.CircularProgress = CircularProgress;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { RenderJob } from '../../../preview-server/render-queue/job';
3
+ export declare const RenderQueueError: React.FC<{
4
+ job: RenderJob;
5
+ }>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RenderQueueError = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const modals_1 = require("../../state/modals");
7
+ const z_index_1 = require("../../state/z-index");
8
+ const item_style_1 = require("./item-style");
9
+ const outputLocation = {
10
+ ...item_style_1.renderQueueItemSubtitleStyle,
11
+ };
12
+ const RenderQueueError = ({ job }) => {
13
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
14
+ const { tabIndex } = (0, z_index_1.useZIndex)();
15
+ const onClick = (0, react_1.useCallback)(() => {
16
+ setSelectedModal({
17
+ type: 'render-progress',
18
+ jobId: job.id,
19
+ });
20
+ }, [job.id, setSelectedModal]);
21
+ if (job.status !== 'failed') {
22
+ throw new Error('should not have rendered this component');
23
+ }
24
+ return ((0, jsx_runtime_1.jsx)("button", { onClick: onClick, type: "button", style: outputLocation, tabIndex: tabIndex, title: job.error.message, children: job.error.message }));
25
+ };
26
+ exports.RenderQueueError = RenderQueueError;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { RenderJob } from '../../../preview-server/render-queue/job';
3
+ export declare const RenderQueueItem: React.FC<{
4
+ job: RenderJob;
5
+ }>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RenderQueueItem = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const layout_1 = require("../layout");
6
+ const RenderQueueError_1 = require("./RenderQueueError");
7
+ const RenderQueueItemCancelButton_1 = require("./RenderQueueItemCancelButton");
8
+ const RenderQueueItemStatus_1 = require("./RenderQueueItemStatus");
9
+ const RenderQueueOpenInFolder_1 = require("./RenderQueueOpenInFolder");
10
+ const RenderQueueOutputName_1 = require("./RenderQueueOutputName");
11
+ const RenderQueueProgressMessage_1 = require("./RenderQueueProgressMessage");
12
+ const RenderQueueRemoveItem_1 = require("./RenderQueueRemoveItem");
13
+ const RenderQueueRepeat_1 = require("./RenderQueueRepeat");
14
+ const container = {
15
+ padding: 12,
16
+ display: 'flex',
17
+ flexDirection: 'row',
18
+ paddingBottom: 10,
19
+ paddingRight: 4,
20
+ };
21
+ const title = {
22
+ fontSize: 13,
23
+ lineHeight: 1,
24
+ };
25
+ const right = {
26
+ flex: 1,
27
+ display: 'flex',
28
+ flexDirection: 'column',
29
+ overflow: 'hidden',
30
+ };
31
+ const subtitle = {
32
+ maxWidth: '100%',
33
+ flex: 1,
34
+ display: 'flex',
35
+ overflow: 'hidden',
36
+ };
37
+ const RenderQueueItem = ({ job }) => {
38
+ return ((0, jsx_runtime_1.jsxs)(layout_1.Row, { style: container, align: "center", children: [(0, jsx_runtime_1.jsx)(RenderQueueItemStatus_1.RenderQueueItemStatus, { job: job }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsxs)("div", { style: right, children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: job.compositionId }), (0, jsx_runtime_1.jsx)("div", { style: subtitle, children: job.status === 'done' ? ((0, jsx_runtime_1.jsx)(RenderQueueOutputName_1.RenderQueueOutputName, { job: job })) : job.status === 'failed' ? ((0, jsx_runtime_1.jsx)(RenderQueueError_1.RenderQueueError, { job: job })) : job.status === 'running' ? ((0, jsx_runtime_1.jsx)(RenderQueueProgressMessage_1.RenderQueueProgressMessage, { job: job })) : null })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), job.status === 'done' || job.status === 'failed' ? ((0, jsx_runtime_1.jsx)(RenderQueueRepeat_1.RenderQueueRepeatItem, { job: job })) : null, job.status === 'running' ? ((0, jsx_runtime_1.jsx)(RenderQueueItemCancelButton_1.RenderQueueCancelButton, { job: job })) : ((0, jsx_runtime_1.jsx)(RenderQueueRemoveItem_1.RenderQueueRemoveItem, { job: job })), job.status === 'done' ? (0, jsx_runtime_1.jsx)(RenderQueueOpenInFolder_1.RenderQueueOpenInFinderItem, { job: job }) : null] }));
39
+ };
40
+ exports.RenderQueueItem = RenderQueueItem;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { RenderJob } from '../../../preview-server/render-queue/job';
3
+ export declare const RenderQueueCancelButton: React.FC<{
4
+ job: RenderJob;
5
+ }>;