@remotion/cli 3.1.2 → 3.1.3

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 (356) hide show
  1. package/dist/chalk/symbols.d.ts +111 -0
  2. package/dist/chalk/symbols.js +75 -0
  3. package/dist/chalk/utilities.d.ts +2 -0
  4. package/dist/chalk/utilities.js +37 -0
  5. package/dist/editor/components/CompositionManager.d.ts +4 -0
  6. package/dist/editor/components/CompositionManager.js +60 -0
  7. package/dist/editor/components/PlayPause.js +1 -0
  8. package/dist/editor/state/render-frame.js +12 -3
  9. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.d.ts +6 -2
  10. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.js +52 -20
  11. package/dist/preview-server/fast-refresh/helpers.d.ts +39 -0
  12. package/dist/preview-server/fast-refresh/helpers.js +145 -0
  13. package/dist/preview-server/fast-refresh/index.d.ts +30 -0
  14. package/dist/preview-server/fast-refresh/index.js +86 -0
  15. package/dist/preview-server/fast-refresh/loader.d.ts +35 -0
  16. package/dist/preview-server/fast-refresh/loader.js +81 -0
  17. package/dist/preview-server/fast-refresh/runtime.d.ts +35 -0
  18. package/dist/preview-server/fast-refresh/runtime.js +32 -0
  19. package/dist/preview-server/routes.js +1 -1
  20. package/dist/preview-server/static-preview.d.ts +1 -0
  21. package/dist/preview-server/static-preview.js +40 -0
  22. package/dist/preview-server/webpack-cache.d.ts +12 -0
  23. package/dist/preview-server/webpack-cache.js +66 -0
  24. package/package.json +7 -7
  25. package/dist/ansi/ansi-diff.d.ts.map +0 -1
  26. package/dist/ansi/ansi-diff.js.map +0 -1
  27. package/dist/ansi/ansi-regex.d.ts.map +0 -1
  28. package/dist/ansi/ansi-regex.js.map +0 -1
  29. package/dist/ansi/ansi-split.d.ts.map +0 -1
  30. package/dist/ansi/ansi-split.js.map +0 -1
  31. package/dist/check-version.d.ts.map +0 -1
  32. package/dist/check-version.js.map +0 -1
  33. package/dist/code-frame.d.ts.map +0 -1
  34. package/dist/code-frame.js.map +0 -1
  35. package/dist/compositions.d.ts.map +0 -1
  36. package/dist/compositions.js.map +0 -1
  37. package/dist/download-progress.d.ts.map +0 -1
  38. package/dist/download-progress.js.map +0 -1
  39. package/dist/editor/components/AudioWaveform.d.ts.map +0 -1
  40. package/dist/editor/components/AudioWaveform.js.map +0 -1
  41. package/dist/editor/components/AudioWaveformBar.d.ts.map +0 -1
  42. package/dist/editor/components/AudioWaveformBar.js.map +0 -1
  43. package/dist/editor/components/Canvas.d.ts.map +0 -1
  44. package/dist/editor/components/Canvas.js.map +0 -1
  45. package/dist/editor/components/CheckboardToggle.d.ts.map +0 -1
  46. package/dist/editor/components/CheckboardToggle.js.map +0 -1
  47. package/dist/editor/components/ClipboardIcon.d.ts.map +0 -1
  48. package/dist/editor/components/ClipboardIcon.js.map +0 -1
  49. package/dist/editor/components/CompositionSelector.d.ts.map +0 -1
  50. package/dist/editor/components/CompositionSelector.js.map +0 -1
  51. package/dist/editor/components/CompositionSelectorItem.d.ts.map +0 -1
  52. package/dist/editor/components/CompositionSelectorItem.js.map +0 -1
  53. package/dist/editor/components/ControlButton.d.ts.map +0 -1
  54. package/dist/editor/components/ControlButton.js.map +0 -1
  55. package/dist/editor/components/CopyButton.d.ts.map +0 -1
  56. package/dist/editor/components/CopyButton.js.map +0 -1
  57. package/dist/editor/components/CurrentComposition.d.ts.map +0 -1
  58. package/dist/editor/components/CurrentComposition.js.map +0 -1
  59. package/dist/editor/components/Editor.d.ts.map +0 -1
  60. package/dist/editor/components/Editor.js.map +0 -1
  61. package/dist/editor/components/EditorContent.d.ts.map +0 -1
  62. package/dist/editor/components/EditorContent.js.map +0 -1
  63. package/dist/editor/components/FpsCounter.d.ts.map +0 -1
  64. package/dist/editor/components/FpsCounter.js.map +0 -1
  65. package/dist/editor/components/FramePersistor.d.ts.map +0 -1
  66. package/dist/editor/components/FramePersistor.js.map +0 -1
  67. package/dist/editor/components/GlobalKeybindings.d.ts.map +0 -1
  68. package/dist/editor/components/GlobalKeybindings.js.map +0 -1
  69. package/dist/editor/components/KeyboardShortcutsModal.d.ts.map +0 -1
  70. package/dist/editor/components/KeyboardShortcutsModal.js.map +0 -1
  71. package/dist/editor/components/LoadingIndicator.d.ts.map +0 -1
  72. package/dist/editor/components/LoadingIndicator.js.map +0 -1
  73. package/dist/editor/components/LoopToggle.d.ts.map +0 -1
  74. package/dist/editor/components/LoopToggle.js.map +0 -1
  75. package/dist/editor/components/Menu/MenuDivider.d.ts.map +0 -1
  76. package/dist/editor/components/Menu/MenuDivider.js.map +0 -1
  77. package/dist/editor/components/Menu/MenuItem.d.ts.map +0 -1
  78. package/dist/editor/components/Menu/MenuItem.js.map +0 -1
  79. package/dist/editor/components/Menu/MenuSubItem.d.ts.map +0 -1
  80. package/dist/editor/components/Menu/MenuSubItem.js.map +0 -1
  81. package/dist/editor/components/Menu/SubMenu.d.ts.map +0 -1
  82. package/dist/editor/components/Menu/SubMenu.js.map +0 -1
  83. package/dist/editor/components/Menu/portals.d.ts.map +0 -1
  84. package/dist/editor/components/Menu/portals.js.map +0 -1
  85. package/dist/editor/components/Menu/styles.d.ts.map +0 -1
  86. package/dist/editor/components/Menu/styles.js.map +0 -1
  87. package/dist/editor/components/MenuToolbar.d.ts.map +0 -1
  88. package/dist/editor/components/MenuToolbar.js.map +0 -1
  89. package/dist/editor/components/ModalContainer.d.ts.map +0 -1
  90. package/dist/editor/components/ModalContainer.js.map +0 -1
  91. package/dist/editor/components/ModalHeader.d.ts.map +0 -1
  92. package/dist/editor/components/ModalHeader.js.map +0 -1
  93. package/dist/editor/components/MuteToggle.d.ts.map +0 -1
  94. package/dist/editor/components/MuteToggle.js.map +0 -1
  95. package/dist/editor/components/NewComposition/CancelButton.d.ts.map +0 -1
  96. package/dist/editor/components/NewComposition/CancelButton.js.map +0 -1
  97. package/dist/editor/components/NewComposition/ComboBox.d.ts.map +0 -1
  98. package/dist/editor/components/NewComposition/ComboBox.js.map +0 -1
  99. package/dist/editor/components/NewComposition/CopyHint.d.ts.map +0 -1
  100. package/dist/editor/components/NewComposition/CopyHint.js.map +0 -1
  101. package/dist/editor/components/NewComposition/InputDragger.d.ts.map +0 -1
  102. package/dist/editor/components/NewComposition/InputDragger.js.map +0 -1
  103. package/dist/editor/components/NewComposition/MenuContent.d.ts.map +0 -1
  104. package/dist/editor/components/NewComposition/MenuContent.js.map +0 -1
  105. package/dist/editor/components/NewComposition/NewCompAspectRatio.d.ts.map +0 -1
  106. package/dist/editor/components/NewComposition/NewCompAspectRatio.js.map +0 -1
  107. package/dist/editor/components/NewComposition/NewCompCode.d.ts.map +0 -1
  108. package/dist/editor/components/NewComposition/NewCompCode.js.map +0 -1
  109. package/dist/editor/components/NewComposition/NewCompDuration.d.ts.map +0 -1
  110. package/dist/editor/components/NewComposition/NewCompDuration.js.map +0 -1
  111. package/dist/editor/components/NewComposition/NewComposition.d.ts.map +0 -1
  112. package/dist/editor/components/NewComposition/NewComposition.js.map +0 -1
  113. package/dist/editor/components/NewComposition/RemInput.d.ts.map +0 -1
  114. package/dist/editor/components/NewComposition/RemInput.js.map +0 -1
  115. package/dist/editor/components/NewComposition/ToggleAspectRatio.d.ts.map +0 -1
  116. package/dist/editor/components/NewComposition/ToggleAspectRatio.js.map +0 -1
  117. package/dist/editor/components/NewComposition/ValidationMessage.d.ts.map +0 -1
  118. package/dist/editor/components/NewComposition/ValidationMessage.js.map +0 -1
  119. package/dist/editor/components/NewComposition/new-comp-layout.d.ts.map +0 -1
  120. package/dist/editor/components/NewComposition/new-comp-layout.js.map +0 -1
  121. package/dist/editor/components/NewComposition/render-aspect-ratio.d.ts.map +0 -1
  122. package/dist/editor/components/NewComposition/render-aspect-ratio.js.map +0 -1
  123. package/dist/editor/components/PlayPause.d.ts.map +0 -1
  124. package/dist/editor/components/PlayPause.js.map +0 -1
  125. package/dist/editor/components/PlaybackKeyboardShortcutsManager.d.ts.map +0 -1
  126. package/dist/editor/components/PlaybackKeyboardShortcutsManager.js.map +0 -1
  127. package/dist/editor/components/PlaybackRatePersistor.d.ts.map +0 -1
  128. package/dist/editor/components/PlaybackRatePersistor.js.map +0 -1
  129. package/dist/editor/components/PlaybackRateSelector.d.ts.map +0 -1
  130. package/dist/editor/components/PlaybackRateSelector.js.map +0 -1
  131. package/dist/editor/components/Preview.d.ts.map +0 -1
  132. package/dist/editor/components/Preview.js.map +0 -1
  133. package/dist/editor/components/PreviewToolbar.d.ts.map +0 -1
  134. package/dist/editor/components/PreviewToolbar.js.map +0 -1
  135. package/dist/editor/components/RichTimelineToggle.d.ts.map +0 -1
  136. package/dist/editor/components/RichTimelineToggle.js.map +0 -1
  137. package/dist/editor/components/SizeSelector.d.ts.map +0 -1
  138. package/dist/editor/components/SizeSelector.js.map +0 -1
  139. package/dist/editor/components/Splitter/SplitterContainer.d.ts.map +0 -1
  140. package/dist/editor/components/Splitter/SplitterContainer.js.map +0 -1
  141. package/dist/editor/components/Splitter/SplitterContext.d.ts.map +0 -1
  142. package/dist/editor/components/Splitter/SplitterContext.js.map +0 -1
  143. package/dist/editor/components/Splitter/SplitterElement.d.ts.map +0 -1
  144. package/dist/editor/components/Splitter/SplitterElement.js.map +0 -1
  145. package/dist/editor/components/Splitter/SplitterHandle.d.ts.map +0 -1
  146. package/dist/editor/components/Splitter/SplitterHandle.js.map +0 -1
  147. package/dist/editor/components/Thumbnail.d.ts.map +0 -1
  148. package/dist/editor/components/Thumbnail.js.map +0 -1
  149. package/dist/editor/components/TimeValue.d.ts.map +0 -1
  150. package/dist/editor/components/TimeValue.js.map +0 -1
  151. package/dist/editor/components/Timeline/LoopedIndicator.d.ts.map +0 -1
  152. package/dist/editor/components/Timeline/LoopedIndicator.js.map +0 -1
  153. package/dist/editor/components/Timeline/LoopedTimelineIndicators.d.ts.map +0 -1
  154. package/dist/editor/components/Timeline/LoopedTimelineIndicators.js.map +0 -1
  155. package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts.map +0 -1
  156. package/dist/editor/components/Timeline/MaxTimelineTracks.js.map +0 -1
  157. package/dist/editor/components/Timeline/Timeline.d.ts.map +0 -1
  158. package/dist/editor/components/Timeline/Timeline.js.map +0 -1
  159. package/dist/editor/components/Timeline/TimelineCollapseToggle.d.ts.map +0 -1
  160. package/dist/editor/components/Timeline/TimelineCollapseToggle.js.map +0 -1
  161. package/dist/editor/components/Timeline/TimelineDragHandler.d.ts.map +0 -1
  162. package/dist/editor/components/Timeline/TimelineDragHandler.js.map +0 -1
  163. package/dist/editor/components/Timeline/TimelineInOutPointer.d.ts.map +0 -1
  164. package/dist/editor/components/Timeline/TimelineInOutPointer.js.map +0 -1
  165. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.d.ts.map +0 -1
  166. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js.map +0 -1
  167. package/dist/editor/components/Timeline/TimelineList.d.ts.map +0 -1
  168. package/dist/editor/components/Timeline/TimelineList.js.map +0 -1
  169. package/dist/editor/components/Timeline/TimelineListItem.d.ts.map +0 -1
  170. package/dist/editor/components/Timeline/TimelineListItem.js.map +0 -1
  171. package/dist/editor/components/Timeline/TimelineSequence.d.ts.map +0 -1
  172. package/dist/editor/components/Timeline/TimelineSequence.js.map +0 -1
  173. package/dist/editor/components/Timeline/TimelineSequenceFrame.d.ts.map +0 -1
  174. package/dist/editor/components/Timeline/TimelineSequenceFrame.js.map +0 -1
  175. package/dist/editor/components/Timeline/TimelineSlider.d.ts.map +0 -1
  176. package/dist/editor/components/Timeline/TimelineSlider.js.map +0 -1
  177. package/dist/editor/components/Timeline/TimelineSliderHandle.d.ts.map +0 -1
  178. package/dist/editor/components/Timeline/TimelineSliderHandle.js.map +0 -1
  179. package/dist/editor/components/Timeline/TimelineTracks.d.ts.map +0 -1
  180. package/dist/editor/components/Timeline/TimelineTracks.js.map +0 -1
  181. package/dist/editor/components/Timeline/TimelineVideoInfo.d.ts.map +0 -1
  182. package/dist/editor/components/Timeline/TimelineVideoInfo.js.map +0 -1
  183. package/dist/editor/components/Timeline/is-collapsed.d.ts.map +0 -1
  184. package/dist/editor/components/Timeline/is-collapsed.js.map +0 -1
  185. package/dist/editor/components/Timeline/timeline-refs.d.ts.map +0 -1
  186. package/dist/editor/components/Timeline/timeline-refs.js.map +0 -1
  187. package/dist/editor/components/Timeline/timeline-state-reducer.d.ts.map +0 -1
  188. package/dist/editor/components/Timeline/timeline-state-reducer.js.map +0 -1
  189. package/dist/editor/components/TimelineInOutToggle.d.ts.map +0 -1
  190. package/dist/editor/components/TimelineInOutToggle.js.map +0 -1
  191. package/dist/editor/components/TopPanel.d.ts.map +0 -1
  192. package/dist/editor/components/TopPanel.js.map +0 -1
  193. package/dist/editor/components/UpdateCheck.d.ts.map +0 -1
  194. package/dist/editor/components/UpdateCheck.js.map +0 -1
  195. package/dist/editor/components/UpdateModal/UpdateModal.d.ts.map +0 -1
  196. package/dist/editor/components/UpdateModal/UpdateModal.js.map +0 -1
  197. package/dist/editor/components/layout.d.ts.map +0 -1
  198. package/dist/editor/components/layout.js.map +0 -1
  199. package/dist/editor/helpers/calculate-timeline.d.ts.map +0 -1
  200. package/dist/editor/helpers/calculate-timeline.js.map +0 -1
  201. package/dist/editor/helpers/checkerboard-background.d.ts.map +0 -1
  202. package/dist/editor/helpers/checkerboard-background.js.map +0 -1
  203. package/dist/editor/helpers/colors.d.ts.map +0 -1
  204. package/dist/editor/helpers/colors.js.map +0 -1
  205. package/dist/editor/helpers/copy-text.d.ts.map +0 -1
  206. package/dist/editor/helpers/copy-text.js.map +0 -1
  207. package/dist/editor/helpers/create-folder-tree.d.ts.map +0 -1
  208. package/dist/editor/helpers/create-folder-tree.js.map +0 -1
  209. package/dist/editor/helpers/get-left-of-timeline-slider.d.ts.map +0 -1
  210. package/dist/editor/helpers/get-left-of-timeline-slider.js.map +0 -1
  211. package/dist/editor/helpers/get-sequence-visible-range.d.ts.map +0 -1
  212. package/dist/editor/helpers/get-sequence-visible-range.js.map +0 -1
  213. package/dist/editor/helpers/get-timeline-nestedness.d.ts.map +0 -1
  214. package/dist/editor/helpers/get-timeline-nestedness.js.map +0 -1
  215. package/dist/editor/helpers/get-timeline-sequence-hash.d.ts.map +0 -1
  216. package/dist/editor/helpers/get-timeline-sequence-hash.js.map +0 -1
  217. package/dist/editor/helpers/get-timeline-sequence-layout.d.ts.map +0 -1
  218. package/dist/editor/helpers/get-timeline-sequence-layout.js.map +0 -1
  219. package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts.map +0 -1
  220. package/dist/editor/helpers/get-timeline-sequence-sort-key.js.map +0 -1
  221. package/dist/editor/helpers/is-composition-still.d.ts.map +0 -1
  222. package/dist/editor/helpers/is-composition-still.js.map +0 -1
  223. package/dist/editor/helpers/is-current-selected-still.d.ts.map +0 -1
  224. package/dist/editor/helpers/is-current-selected-still.js.map +0 -1
  225. package/dist/editor/helpers/noop.d.ts.map +0 -1
  226. package/dist/editor/helpers/noop.js.map +0 -1
  227. package/dist/editor/helpers/persist-open-folders.d.ts.map +0 -1
  228. package/dist/editor/helpers/persist-open-folders.js.map +0 -1
  229. package/dist/editor/helpers/timeline-layout.d.ts.map +0 -1
  230. package/dist/editor/helpers/timeline-layout.js.map +0 -1
  231. package/dist/editor/helpers/use-keybinding.d.ts.map +0 -1
  232. package/dist/editor/helpers/use-keybinding.js.map +0 -1
  233. package/dist/editor/helpers/validate-new-comp-data.d.ts.map +0 -1
  234. package/dist/editor/helpers/validate-new-comp-data.js.map +0 -1
  235. package/dist/editor/icons/Checkmark.d.ts.map +0 -1
  236. package/dist/editor/icons/Checkmark.js.map +0 -1
  237. package/dist/editor/icons/caret.d.ts.map +0 -1
  238. package/dist/editor/icons/caret.js.map +0 -1
  239. package/dist/editor/icons/film.d.ts.map +0 -1
  240. package/dist/editor/icons/film.js.map +0 -1
  241. package/dist/editor/icons/folder.d.ts.map +0 -1
  242. package/dist/editor/icons/folder.js.map +0 -1
  243. package/dist/editor/icons/keys.d.ts.map +0 -1
  244. package/dist/editor/icons/keys.js.map +0 -1
  245. package/dist/editor/icons/lock.d.ts.map +0 -1
  246. package/dist/editor/icons/lock.js.map +0 -1
  247. package/dist/editor/icons/media-volume.d.ts.map +0 -1
  248. package/dist/editor/icons/media-volume.js.map +0 -1
  249. package/dist/editor/icons/pause.d.ts.map +0 -1
  250. package/dist/editor/icons/pause.js.map +0 -1
  251. package/dist/editor/icons/play.d.ts.map +0 -1
  252. package/dist/editor/icons/play.js.map +0 -1
  253. package/dist/editor/icons/step-back.d.ts.map +0 -1
  254. package/dist/editor/icons/step-back.js.map +0 -1
  255. package/dist/editor/icons/step-forward.d.ts.map +0 -1
  256. package/dist/editor/icons/step-forward.js.map +0 -1
  257. package/dist/editor/icons/still.d.ts.map +0 -1
  258. package/dist/editor/icons/still.js.map +0 -1
  259. package/dist/editor/icons/timeline.d.ts.map +0 -1
  260. package/dist/editor/icons/timeline.js.map +0 -1
  261. package/dist/editor/icons/timelineInOutPointer.d.ts.map +0 -1
  262. package/dist/editor/icons/timelineInOutPointer.js.map +0 -1
  263. package/dist/editor/state/aspect-ratio-locked.d.ts.map +0 -1
  264. package/dist/editor/state/aspect-ratio-locked.js.map +0 -1
  265. package/dist/editor/state/checkerboard.d.ts.map +0 -1
  266. package/dist/editor/state/checkerboard.js.map +0 -1
  267. package/dist/editor/state/highest-z-index.d.ts.map +0 -1
  268. package/dist/editor/state/highest-z-index.js.map +0 -1
  269. package/dist/editor/state/input-dragger-click-lock.d.ts.map +0 -1
  270. package/dist/editor/state/input-dragger-click-lock.js.map +0 -1
  271. package/dist/editor/state/keybindings.d.ts.map +0 -1
  272. package/dist/editor/state/keybindings.js.map +0 -1
  273. package/dist/editor/state/loop.d.ts.map +0 -1
  274. package/dist/editor/state/loop.js.map +0 -1
  275. package/dist/editor/state/marks.d.ts.map +0 -1
  276. package/dist/editor/state/marks.js.map +0 -1
  277. package/dist/editor/state/modals.d.ts.map +0 -1
  278. package/dist/editor/state/modals.js.map +0 -1
  279. package/dist/editor/state/mute.d.ts.map +0 -1
  280. package/dist/editor/state/mute.js.map +0 -1
  281. package/dist/editor/state/playbackrate.d.ts.map +0 -1
  282. package/dist/editor/state/playbackrate.js.map +0 -1
  283. package/dist/editor/state/preview-size.d.ts.map +0 -1
  284. package/dist/editor/state/preview-size.js.map +0 -1
  285. package/dist/editor/state/render-frame.d.ts.map +0 -1
  286. package/dist/editor/state/render-frame.js.map +0 -1
  287. package/dist/editor/state/rich-timeline.d.ts.map +0 -1
  288. package/dist/editor/state/rich-timeline.js.map +0 -1
  289. package/dist/editor/state/timeline-ref.d.ts.map +0 -1
  290. package/dist/editor/state/timeline-ref.js.map +0 -1
  291. package/dist/editor/state/timeline.d.ts.map +0 -1
  292. package/dist/editor/state/timeline.js.map +0 -1
  293. package/dist/editor/state/z-index.d.ts.map +0 -1
  294. package/dist/editor/state/z-index.js.map +0 -1
  295. package/dist/get-cli-options.d.ts.map +0 -1
  296. package/dist/get-cli-options.js.map +0 -1
  297. package/dist/get-composition-id.d.ts.map +0 -1
  298. package/dist/get-composition-id.js.map +0 -1
  299. package/dist/get-config-file-name.d.ts.map +0 -1
  300. package/dist/get-config-file-name.js.map +0 -1
  301. package/dist/get-env.d.ts.map +0 -1
  302. package/dist/get-env.js.map +0 -1
  303. package/dist/get-filename.d.ts.map +0 -1
  304. package/dist/get-filename.js.map +0 -1
  305. package/dist/get-input-props.d.ts.map +0 -1
  306. package/dist/get-input-props.js.map +0 -1
  307. package/dist/handle-common-errors.d.ts.map +0 -1
  308. package/dist/handle-common-errors.js.map +0 -1
  309. package/dist/image-formats.d.ts.map +0 -1
  310. package/dist/image-formats.js.map +0 -1
  311. package/dist/index.d.ts.map +0 -1
  312. package/dist/index.js.map +0 -1
  313. package/dist/initialize-render-cli.d.ts.map +0 -1
  314. package/dist/initialize-render-cli.js.map +0 -1
  315. package/dist/is-javascript.d.ts.map +0 -1
  316. package/dist/is-javascript.js.map +0 -1
  317. package/dist/lambda-command.d.ts.map +0 -1
  318. package/dist/lambda-command.js.map +0 -1
  319. package/dist/load-config.d.ts.map +0 -1
  320. package/dist/load-config.js.map +0 -1
  321. package/dist/log.d.ts.map +0 -1
  322. package/dist/log.js.map +0 -1
  323. package/dist/make-progress-bar.d.ts.map +0 -1
  324. package/dist/make-progress-bar.js.map +0 -1
  325. package/dist/parse-command-line.d.ts.map +0 -1
  326. package/dist/parse-command-line.js.map +0 -1
  327. package/dist/preview.d.ts.map +0 -1
  328. package/dist/preview.js.map +0 -1
  329. package/dist/previewEntry.d.ts.map +0 -1
  330. package/dist/previewEntry.js.map +0 -1
  331. package/dist/print-error.d.ts.map +0 -1
  332. package/dist/print-error.js.map +0 -1
  333. package/dist/print-help.d.ts.map +0 -1
  334. package/dist/print-help.js.map +0 -1
  335. package/dist/progress-bar.d.ts.map +0 -1
  336. package/dist/progress-bar.js.map +0 -1
  337. package/dist/render.d.ts.map +0 -1
  338. package/dist/render.js.map +0 -1
  339. package/dist/resolve-from.d.ts.map +0 -1
  340. package/dist/resolve-from.js.map +0 -1
  341. package/dist/setup-cache.d.ts.map +0 -1
  342. package/dist/setup-cache.js.map +0 -1
  343. package/dist/step.d.ts.map +0 -1
  344. package/dist/step.js.map +0 -1
  345. package/dist/still.d.ts.map +0 -1
  346. package/dist/still.js.map +0 -1
  347. package/dist/upgrade.d.ts.map +0 -1
  348. package/dist/upgrade.js.map +0 -1
  349. package/dist/user-passed-output-location.d.ts.map +0 -1
  350. package/dist/user-passed-output-location.js.map +0 -1
  351. package/dist/validate-ffmpeg-version.d.ts.map +0 -1
  352. package/dist/validate-ffmpeg-version.js.map +0 -1
  353. package/dist/versions.d.ts.map +0 -1
  354. package/dist/versions.js.map +0 -1
  355. package/dist/warn-about-ffmpeg-version.d.ts.map +0 -1
  356. package/dist/warn-about-ffmpeg-version.js.map +0 -1
@@ -0,0 +1,111 @@
1
+ declare const isHyper: boolean;
2
+ declare const isWindows: boolean;
3
+ declare const isLinux: boolean;
4
+ declare const common: {
5
+ ballotDisabled: string;
6
+ ballotOff: string;
7
+ ballotOn: string;
8
+ bullet: string;
9
+ bulletWhite: string;
10
+ fullBlock: string;
11
+ heart: string;
12
+ identicalTo: string;
13
+ line: string;
14
+ mark: string;
15
+ middot: string;
16
+ minus: string;
17
+ multiplication: string;
18
+ obelus: string;
19
+ pencilDownRight: string;
20
+ pencilRight: string;
21
+ pencilUpRight: string;
22
+ percent: string;
23
+ pilcrow2: string;
24
+ pilcrow: string;
25
+ plusMinus: string;
26
+ question: string;
27
+ section: string;
28
+ starsOff: string;
29
+ starsOn: string;
30
+ upDownArrow: string;
31
+ };
32
+ declare const windows: {
33
+ check: string;
34
+ cross: string;
35
+ ellipsisLarge: string;
36
+ ellipsis: string;
37
+ info: string;
38
+ questionSmall: string;
39
+ pointer: string;
40
+ pointerSmall: string;
41
+ radioOff: string;
42
+ radioOn: string;
43
+ warning: string;
44
+ ballotDisabled: string;
45
+ ballotOff: string;
46
+ ballotOn: string;
47
+ bullet: string;
48
+ bulletWhite: string;
49
+ fullBlock: string;
50
+ heart: string;
51
+ identicalTo: string;
52
+ line: string;
53
+ mark: string;
54
+ middot: string;
55
+ minus: string;
56
+ multiplication: string;
57
+ obelus: string;
58
+ pencilDownRight: string;
59
+ pencilRight: string;
60
+ pencilUpRight: string;
61
+ percent: string;
62
+ pilcrow2: string;
63
+ pilcrow: string;
64
+ plusMinus: string;
65
+ question: string;
66
+ section: string;
67
+ starsOff: string;
68
+ starsOn: string;
69
+ upDownArrow: string;
70
+ };
71
+ declare const other: {
72
+ ballotCross: string;
73
+ check: string;
74
+ cross: string;
75
+ ellipsisLarge: string;
76
+ ellipsis: string;
77
+ info: string;
78
+ questionFull: string;
79
+ questionSmall: string;
80
+ pointer: string;
81
+ pointerSmall: string;
82
+ radioOff: string;
83
+ radioOn: string;
84
+ warning: string;
85
+ ballotDisabled: string;
86
+ ballotOff: string;
87
+ ballotOn: string;
88
+ bullet: string;
89
+ bulletWhite: string;
90
+ fullBlock: string;
91
+ heart: string;
92
+ identicalTo: string;
93
+ line: string;
94
+ mark: string;
95
+ middot: string;
96
+ minus: string;
97
+ multiplication: string;
98
+ obelus: string;
99
+ pencilDownRight: string;
100
+ pencilRight: string;
101
+ pencilUpRight: string;
102
+ percent: string;
103
+ pilcrow2: string;
104
+ pilcrow: string;
105
+ plusMinus: string;
106
+ question: string;
107
+ section: string;
108
+ starsOff: string;
109
+ starsOn: string;
110
+ upDownArrow: string;
111
+ };
@@ -0,0 +1,75 @@
1
+ 'use strict';
2
+ const isHyper = typeof process !== 'undefined' && process.env.TERM_PROGRAM === 'Hyper';
3
+ const isWindows = typeof process !== 'undefined' && process.platform === 'win32';
4
+ const isLinux = typeof process !== 'undefined' && process.platform === 'linux';
5
+ const common = {
6
+ ballotDisabled: '☒',
7
+ ballotOff: '☐',
8
+ ballotOn: '☑',
9
+ bullet: '•',
10
+ bulletWhite: '◦',
11
+ fullBlock: '█',
12
+ heart: '❤',
13
+ identicalTo: '≡',
14
+ line: '─',
15
+ mark: '※',
16
+ middot: '·',
17
+ minus: '-',
18
+ multiplication: '×',
19
+ obelus: '÷',
20
+ pencilDownRight: '✎',
21
+ pencilRight: '✏',
22
+ pencilUpRight: '✐',
23
+ percent: '%',
24
+ pilcrow2: '❡',
25
+ pilcrow: '¶',
26
+ plusMinus: '±',
27
+ question: '?',
28
+ section: '§',
29
+ starsOff: '☆',
30
+ starsOn: '★',
31
+ upDownArrow: '↕',
32
+ };
33
+ const windows = {
34
+ ...common,
35
+ check: '√',
36
+ cross: '×',
37
+ ellipsisLarge: '...',
38
+ ellipsis: '...',
39
+ info: 'i',
40
+ questionSmall: '?',
41
+ pointer: '>',
42
+ pointerSmall: '»',
43
+ radioOff: '( )',
44
+ radioOn: '(*)',
45
+ warning: '‼',
46
+ };
47
+ const other = {
48
+ ...common,
49
+ ballotCross: '✘',
50
+ check: '✔',
51
+ cross: '✖',
52
+ ellipsisLarge: '⋯',
53
+ ellipsis: '…',
54
+ info: 'ℹ',
55
+ questionFull: '?',
56
+ questionSmall: '﹖',
57
+ pointer: isLinux ? '▸' : '❯',
58
+ pointerSmall: isLinux ? '‣' : '›',
59
+ radioOff: '◯',
60
+ radioOn: '◉',
61
+ warning: '⚠',
62
+ };
63
+ module.exports = isWindows && !isHyper ? windows : other;
64
+ Reflect.defineProperty(module.exports, 'common', {
65
+ enumerable: false,
66
+ value: common,
67
+ });
68
+ Reflect.defineProperty(module.exports, 'windows', {
69
+ enumerable: false,
70
+ value: windows,
71
+ });
72
+ Reflect.defineProperty(module.exports, 'other', {
73
+ enumerable: false,
74
+ value: other,
75
+ });
@@ -0,0 +1,2 @@
1
+ export declare function stringReplaceAll(string: string, substring: string, replacer: string): string;
2
+ export declare function stringEncaseCRLFWithFirstIndex(string: string, prefix: string, postfix: string, index: number): string;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stringEncaseCRLFWithFirstIndex = exports.stringReplaceAll = void 0;
4
+ function stringReplaceAll(string, substring, replacer) {
5
+ let index = string.indexOf(substring);
6
+ if (index === -1) {
7
+ return string;
8
+ }
9
+ const substringLength = substring.length;
10
+ let endIndex = 0;
11
+ let returnValue = '';
12
+ do {
13
+ returnValue += string.slice(endIndex, index) + substring + replacer;
14
+ endIndex = index + substringLength;
15
+ index = string.indexOf(substring, endIndex);
16
+ } while (index !== -1);
17
+ returnValue += string.slice(endIndex);
18
+ return returnValue;
19
+ }
20
+ exports.stringReplaceAll = stringReplaceAll;
21
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
22
+ let endIndex = 0;
23
+ let returnValue = '';
24
+ do {
25
+ const gotCR = string[index - 1] === '\r';
26
+ returnValue +=
27
+ string.slice(endIndex, gotCR ? index - 1 : index) +
28
+ prefix +
29
+ (gotCR ? '\r\n' : '\n') +
30
+ postfix;
31
+ endIndex = index + 1;
32
+ index = string.indexOf('\n', endIndex);
33
+ } while (index !== -1);
34
+ returnValue += string.slice(endIndex);
35
+ return returnValue;
36
+ }
37
+ exports.stringEncaseCRLFWithFirstIndex = stringEncaseCRLFWithFirstIndex;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TComposition } from 'remotion';
3
+ export declare const useSelectComposition: () => (c: TComposition) => void;
4
+ export declare const InitialCompositionLoader: React.FC;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InitialCompositionLoader = exports.useSelectComposition = void 0;
4
+ const react_1 = require("react");
5
+ const remotion_1 = require("remotion");
6
+ const folders_1 = require("../state/folders");
7
+ const marks_1 = require("../state/marks");
8
+ const CompositionSelector_1 = require("./CompositionSelector");
9
+ const FramePersistor_1 = require("./FramePersistor");
10
+ const TimelineInOutToggle_1 = require("./TimelineInOutToggle");
11
+ const useSelectComposition = () => {
12
+ const setCurrentFrame = remotion_1.Internals.Timeline.useTimelineSetFrame();
13
+ const { setCurrentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
14
+ const { setFoldersExpanded } = (0, react_1.useContext)(folders_1.FolderContext);
15
+ return (c) => {
16
+ var _a;
17
+ (_a = TimelineInOutToggle_1.inOutHandles.current) === null || _a === void 0 ? void 0 : _a.setMarks((0, marks_1.loadMarks)(c.id, c.durationInFrames));
18
+ window.history.pushState({}, 'Preview', `/${c.id}`);
19
+ const frame = (0, FramePersistor_1.getFrameForComposition)(c.id);
20
+ const frameInBounds = Math.min(c.durationInFrames - 1, frame);
21
+ setCurrentFrame(frameInBounds);
22
+ setCurrentComposition(c.id);
23
+ const { folderName, parentFolderName } = c;
24
+ if (folderName !== null) {
25
+ setFoldersExpanded((ex) => {
26
+ const keysToExpand = (0, CompositionSelector_1.getKeysToExpand)(folderName, parentFolderName);
27
+ const newState = {
28
+ ...ex,
29
+ };
30
+ for (const key of keysToExpand) {
31
+ newState[key] = true;
32
+ }
33
+ return newState;
34
+ });
35
+ }
36
+ };
37
+ };
38
+ exports.useSelectComposition = useSelectComposition;
39
+ const InitialCompositionLoader = () => {
40
+ const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
41
+ const selectComposition = (0, exports.useSelectComposition)();
42
+ (0, react_1.useEffect)(() => {
43
+ if (currentComposition) {
44
+ return;
45
+ }
46
+ const compositionFromUrl = (0, FramePersistor_1.getCurrentCompositionFromUrl)();
47
+ if (compositionFromUrl) {
48
+ const exists = compositions.find((c) => c.id === compositionFromUrl);
49
+ if (exists) {
50
+ selectComposition(exists);
51
+ return;
52
+ }
53
+ }
54
+ if (compositions.length > 0) {
55
+ selectComposition(compositions[0]);
56
+ }
57
+ }, [compositions, currentComposition, selectComposition]);
58
+ return null;
59
+ };
60
+ exports.InitialCompositionLoader = InitialCompositionLoader;
@@ -24,6 +24,7 @@ const PlayPause = ({ playbackRate, loop }) => {
24
24
  player_1.PlayerInternals.usePlayback({
25
25
  loop,
26
26
  playbackRate,
27
+ moveToBeginningWhenEnded: true,
27
28
  });
28
29
  const { playing, play, pause, pauseAndReturnToPlayStart, frameBack, seek, frameForward, isLastFrame, } = player_1.PlayerInternals.usePlayer();
29
30
  const isStill = (0, is_current_selected_still_1.useIsStill)();
@@ -2,10 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.renderFrame = void 0;
4
4
  const renderFrame = (frame, fps) => {
5
- const minutes = Math.floor(frame / fps / 60);
6
- const remainingSec = frame - minutes * fps * 60;
5
+ const hours = Math.floor(frame / fps / 3600);
6
+ const remainingMinutes = frame - hours * fps * 3600;
7
+ const minutes = Math.floor(remainingMinutes / 60 / fps);
8
+ const remainingSec = frame - hours * fps * 3600 - minutes * fps * 60;
7
9
  const seconds = Math.floor(remainingSec / fps);
8
10
  const frameAfterSec = Math.round(frame % fps);
9
- return `${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}.${String(frameAfterSec).padStart(2, '0')}`;
11
+ const hoursStr = String(hours);
12
+ const minutesStr = String(minutes).padStart(2, '0');
13
+ const secondsStr = String(seconds).padStart(2, '0');
14
+ const frameStr = String(frameAfterSec).padStart(2, '0');
15
+ if (hours > 0) {
16
+ return `${hoursStr}:${minutesStr}:${secondsStr}.${frameStr}`;
17
+ }
18
+ return `${minutesStr}:${secondsStr}.${frameStr}`;
10
19
  };
11
20
  exports.renderFrame = renderFrame;
@@ -1,12 +1,16 @@
1
1
  declare const editorNames: readonly ["atom", "/Applications/Atom Beta.app/Contents/MacOS/Atom Beta", "brackets", "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl", "/Applications/Sublime Text Dev.app/Contents/SharedSupport/bin/subl", "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl", "code", "code-insiders", "vscodium", "/Applications/AppCode.app/Contents/MacOS/appcode", "/Applications/CLion.app/Contents/MacOS/clion", "/Applications/IntelliJ IDEA.app/Contents/MacOS/idea", "/Applications/PhpStorm.app/Contents/MacOS/phpstorm", "/Applications/PyCharm.app/Contents/MacOS/pycharm", "/Applications/PyCharm CE.app/Contents/MacOS/pycharm", "/Applications/RubyMine.app/Contents/MacOS/rubymine", "/Applications/WebStorm.app/Contents/MacOS/webstorm", "/Applications/GoLand.app/Contents/MacOS/goland", "/Applications/Rider.app/Contents/MacOS/rider", "mvim", "emacs", "gvim", "idea", "phpstorm", "pycharm", "rubymine", "sublime_text", "vim", "webstorm", "goland", "rider", "Brackets.exe", "Code.exe", "Code - Insiders.exe", "VSCodium.exe", "atom.exe", "sublime_text.exe", "notepad++.exe", "clion.exe", "clion64.exe", "idea.exe", "idea64.exe", "phpstorm.exe", "phpstorm64.exe", "pycharm.exe", "pycharm64.exe", "rubymine.exe", "rubymine64.exe", "webstorm.exe", "webstorm64.exe", "goland.exe", "goland64.exe", "rider.exe", "rider64.exe", "nano"];
2
2
  export declare const getDisplayNameForEditor: (editor: Editor | undefined) => string | null;
3
3
  declare type Editor = typeof editorNames[number];
4
- export declare function guessEditor(): Promise<Editor[]>;
4
+ declare type ProcessAndCommand = {
5
+ process: string;
6
+ command: Editor;
7
+ };
8
+ export declare function guessEditor(): Promise<ProcessAndCommand[]>;
5
9
  export declare function launchEditor({ colNumber, editor, fileName, lineNumber, vsCodeNewWindow, }: {
6
10
  fileName: string;
7
11
  lineNumber: number;
8
12
  colNumber: number;
9
- editor: Editor;
13
+ editor: ProcessAndCommand;
10
14
  vsCodeNewWindow: boolean;
11
15
  }): Promise<boolean>;
12
16
  export {};
@@ -321,7 +321,10 @@ async function guessEditor() {
321
321
  for (let i = 0; i < processNames.length; i++) {
322
322
  const processName = processNames[i];
323
323
  if (output.indexOf(processName) !== -1) {
324
- availableEditors.push(COMMON_EDITORS_OSX[processName]);
324
+ availableEditors.push({
325
+ process: processName,
326
+ command: COMMON_EDITORS_OSX[processName],
327
+ });
325
328
  }
326
329
  }
327
330
  return availableEditors;
@@ -335,7 +338,10 @@ async function guessEditor() {
335
338
  const processPath = runningProcesses[i].trim();
336
339
  const processName = path_1.default.basename(processPath);
337
340
  if (COMMON_EDITORS_WIN.indexOf(processName) !== -1) {
338
- availableEditors.push(processPath);
341
+ availableEditors.push({
342
+ process: processPath,
343
+ command: processPath,
344
+ });
339
345
  }
340
346
  }
341
347
  return availableEditors;
@@ -349,7 +355,10 @@ async function guessEditor() {
349
355
  for (let i = 0; i < processNames.length; i++) {
350
356
  const processName = processNames[i];
351
357
  if (output.indexOf(processName) !== -1) {
352
- availableEditors.push(COMMON_EDITORS_LINUX[processName]);
358
+ availableEditors.push({
359
+ process: processName,
360
+ command: COMMON_EDITORS_LINUX[processName],
361
+ });
353
362
  }
354
363
  }
355
364
  return availableEditors;
@@ -360,32 +369,42 @@ async function guessEditor() {
360
369
  }
361
370
  // Last resort, use old skool env vars
362
371
  if (process.env.VISUAL) {
363
- return [process.env.VISUAL];
372
+ return [
373
+ {
374
+ process: process.env.VISUAL,
375
+ command: process.env.VISUAL,
376
+ },
377
+ ];
364
378
  }
365
379
  if (process.env.EDITOR) {
366
- return [process.env.EDITOR];
380
+ return [
381
+ {
382
+ process: process.env.EDITOR,
383
+ command: process.env.EDITOR,
384
+ },
385
+ ];
367
386
  }
368
387
  return [];
369
388
  }
370
389
  exports.guessEditor = guessEditor;
371
390
  let _childProcess = null;
372
- function launchEditor({ colNumber, editor, fileName, lineNumber, vsCodeNewWindow, }) {
391
+ async function launchEditor({ colNumber, editor, fileName, lineNumber, vsCodeNewWindow, }) {
373
392
  if (!fs_1.default.existsSync(fileName)) {
374
- return Promise.resolve(false);
393
+ return false;
375
394
  }
376
395
  // Sanitize lineNumber to prevent malicious use on win32
377
396
  // via: https://github.com/nodejs/node/blob/c3bb4b1aa5e907d489619fb43d233c3336bfc03d/lib/child_process.js#L333
378
397
  // and it should be a positive integer
379
398
  if (!(Number.isInteger(lineNumber) && lineNumber > 0)) {
380
- return Promise.resolve(false);
399
+ return false;
381
400
  }
382
401
  // colNumber is optional, but should be a positive integer too
383
402
  // default is 1
384
403
  if (!(Number.isInteger(colNumber) && colNumber > 0)) {
385
404
  colNumber = 1;
386
405
  }
387
- if (editor.toLowerCase() === 'none') {
388
- return Promise.resolve(false);
406
+ if (editor.command.toLowerCase() === 'none') {
407
+ return false;
389
408
  }
390
409
  if (process.platform === 'linux' &&
391
410
  fileName.startsWith('/mnt/') &&
@@ -412,30 +431,43 @@ function launchEditor({ colNumber, editor, fileName, lineNumber, vsCodeNewWindow
412
431
  'consist only of alphanumeric characters (all languages), periods, ' +
413
432
  'dashes, slashes, and underscores.');
414
433
  log_1.Log.error();
415
- return Promise.resolve(false);
434
+ return false;
416
435
  }
417
- const shouldOpenVsCodeNewWindow = isVsCodeDerivative(editor) && vsCodeNewWindow;
436
+ const shouldOpenVsCodeNewWindow = isVsCodeDerivative(editor.command) && vsCodeNewWindow;
418
437
  const args = shouldOpenVsCodeNewWindow
419
438
  ? ['--new-window', fileName]
420
439
  : lineNumber
421
- ? getArgumentsForLineNumber(editor, fileName, String(lineNumber), colNumber)
440
+ ? getArgumentsForLineNumber(editor.command, fileName, String(lineNumber), colNumber)
422
441
  : [fileName];
423
- if (_childProcess && isTerminalEditor(editor)) {
442
+ if (_childProcess && isTerminalEditor(editor.command)) {
424
443
  // There's an existing editor process already and it's attached
425
444
  // to the terminal, so go kill it. Otherwise two separate editor
426
445
  // instances attach to the stdin/stdout which gets confusing.
427
446
  _childProcess.kill('SIGKILL');
428
447
  }
448
+ const isWin = os_1.default.platform() === 'win32';
449
+ const where = isWin ? 'where' : 'which';
450
+ const binaryToUse = await new Promise((resolve) => {
451
+ if (editor.command === editor.process) {
452
+ resolve(editor.command);
453
+ return;
454
+ }
455
+ child_process_1.default.exec(`${where} "${editor.command}"`, (err) => {
456
+ if (err) {
457
+ resolve(editor.process);
458
+ }
459
+ else {
460
+ resolve(editor.command);
461
+ }
462
+ });
463
+ });
429
464
  if (process.platform === 'win32') {
430
465
  // On Windows, launch the editor in a shell because spawn can only
431
466
  // launch .exe files.
432
- _childProcess = child_process_1.default.spawn('cmd.exe', ['/C', editor].concat(args), { stdio: 'inherit' });
467
+ _childProcess = child_process_1.default.spawn('cmd.exe', ['/C', binaryToUse].concat(args), { stdio: 'inherit', detached: true });
433
468
  }
434
469
  else {
435
- _childProcess = child_process_1.default.spawn(editor, args, {
436
- stdio: 'inherit',
437
- detached: true,
438
- });
470
+ _childProcess = child_process_1.default.spawn(binaryToUse, args, { stdio: 'inherit' });
439
471
  }
440
472
  _childProcess.on('exit', (errorCode) => {
441
473
  _childProcess = null;
@@ -446,6 +478,6 @@ function launchEditor({ colNumber, editor, fileName, lineNumber, vsCodeNewWindow
446
478
  _childProcess.on('error', (error) => {
447
479
  log_1.Log.error('Error opening file in editor', fileName, error.message);
448
480
  });
449
- return Promise.resolve(true);
481
+ return true;
450
482
  }
451
483
  exports.launchEditor = launchEditor;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
3
+ */
4
+ /**
5
+ * MIT License
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ * of this software and associated documentation files (the "Software"), to deal
11
+ * in the Software without restriction, including without limitation the rights
12
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ * copies of the Software, and to permit persons to whom the Software is
14
+ * furnished to do so, subject to the following conditions:
15
+ *
16
+ * The above copyright notice and this permission notice shall be included in all
17
+ * copies or substantial portions of the Software.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ * SOFTWARE.
26
+ */
27
+ declare function registerExportsForReactRefresh(moduleExports: unknown, moduleID: unknown): void;
28
+ declare function isReactRefreshBoundary(moduleExports: unknown): boolean;
29
+ declare function shouldInvalidateReactRefreshBoundary(prevExports: unknown, nextExports: unknown): boolean;
30
+ declare function getRefreshBoundarySignature(moduleExports: unknown): any[];
31
+ declare function scheduleUpdate(): void;
32
+ declare const _default: {
33
+ registerExportsForReactRefresh: typeof registerExportsForReactRefresh;
34
+ isReactRefreshBoundary: typeof isReactRefreshBoundary;
35
+ shouldInvalidateReactRefreshBoundary: typeof shouldInvalidateReactRefreshBoundary;
36
+ getRefreshBoundarySignature: typeof getRefreshBoundarySignature;
37
+ scheduleUpdate: typeof scheduleUpdate;
38
+ };
39
+ export default _default;
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ /**
3
+ * Source code is adapted from https://github.com/WebHotelier/webpack-fast-refresh#readme and rewritten in Typescript. This file is MIT licensed.
4
+ */
5
+ /**
6
+ * MIT License
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ * of this software and associated documentation files (the "Software"), to deal
12
+ * in the Software without restriction, including without limitation the rights
13
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ * copies of the Software, and to permit persons to whom the Software is
15
+ * furnished to do so, subject to the following conditions:
16
+ *
17
+ * The above copyright notice and this permission notice shall be included in all
18
+ * copies or substantial portions of the Software.
19
+ *
20
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ * SOFTWARE.
27
+ */
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ // This file is copied from the Metro JavaScript bundler, with minor tweaks for
30
+ // webpack compatibility.
31
+ //
32
+ // https://github.com/facebook/metro/blob/d6b9685c730d0d63577db40f41369157f28dfa3a/packages/metro/src/lib/polyfills/require.js
33
+ const RefreshRuntime = require('react-refresh/runtime');
34
+ function isSafeExport(key) {
35
+ return (key === '__esModule' ||
36
+ key === '__N_SSG' ||
37
+ key === '__N_SSP' ||
38
+ key === 'config');
39
+ }
40
+ function registerExportsForReactRefresh(moduleExports, moduleID) {
41
+ RefreshRuntime.register(moduleExports, moduleID + ' %exports%');
42
+ if (moduleExports === null ||
43
+ moduleExports === undefined ||
44
+ typeof moduleExports !== 'object') {
45
+ // Exit if we can't iterate over exports.
46
+ // (This is important for legacy environments.)
47
+ return;
48
+ }
49
+ for (const key in moduleExports) {
50
+ if (isSafeExport(key)) {
51
+ continue;
52
+ }
53
+ // @ts-expect-error
54
+ const exportValue = moduleExports[key];
55
+ const typeID = moduleID + ' %exports% ' + key;
56
+ RefreshRuntime.register(exportValue, typeID);
57
+ }
58
+ }
59
+ function isReactRefreshBoundary(moduleExports) {
60
+ if (RefreshRuntime.isLikelyComponentType(moduleExports)) {
61
+ return true;
62
+ }
63
+ if (moduleExports === null ||
64
+ moduleExports === undefined ||
65
+ typeof moduleExports !== 'object') {
66
+ // Exit if we can't iterate over exports.
67
+ return false;
68
+ }
69
+ let hasExports = false;
70
+ let areAllExportsComponents = true;
71
+ for (const key in moduleExports) {
72
+ hasExports = true;
73
+ if (isSafeExport(key)) {
74
+ continue;
75
+ }
76
+ // @ts-expect-error
77
+ const exportValue = moduleExports[key];
78
+ if (!RefreshRuntime.isLikelyComponentType(exportValue)) {
79
+ areAllExportsComponents = false;
80
+ }
81
+ }
82
+ return hasExports && areAllExportsComponents;
83
+ }
84
+ function shouldInvalidateReactRefreshBoundary(prevExports, nextExports) {
85
+ const prevSignature = getRefreshBoundarySignature(prevExports);
86
+ const nextSignature = getRefreshBoundarySignature(nextExports);
87
+ if (prevSignature.length !== nextSignature.length) {
88
+ return true;
89
+ }
90
+ for (let i = 0; i < nextSignature.length; i++) {
91
+ if (prevSignature[i] !== nextSignature[i]) {
92
+ return true;
93
+ }
94
+ }
95
+ return false;
96
+ }
97
+ function getRefreshBoundarySignature(moduleExports) {
98
+ const signature = [];
99
+ signature.push(RefreshRuntime.getFamilyByType(moduleExports));
100
+ if (moduleExports === null ||
101
+ moduleExports === undefined ||
102
+ typeof moduleExports !== 'object') {
103
+ // Exit if we can't iterate over exports.
104
+ // (This is important for legacy environments.)
105
+ return signature;
106
+ }
107
+ for (const key in moduleExports) {
108
+ if (isSafeExport(key)) {
109
+ continue;
110
+ }
111
+ // @ts-expect-error
112
+ const exportValue = moduleExports[key];
113
+ signature.push(key);
114
+ signature.push(RefreshRuntime.getFamilyByType(exportValue));
115
+ }
116
+ return signature;
117
+ }
118
+ function scheduleUpdate() {
119
+ var _a, _b;
120
+ const execute = () => {
121
+ try {
122
+ RefreshRuntime.performReactRefresh();
123
+ }
124
+ catch (err) {
125
+ console.warn('Warning: Failed to re-render. We will retry on the next Fast Refresh event.\n' +
126
+ err);
127
+ }
128
+ };
129
+ // Only trigger refresh if the webpack HMR state is idle
130
+ if (((_a = module.hot) === null || _a === void 0 ? void 0 : _a.status()) === 'idle') {
131
+ return;
132
+ }
133
+ (_b = module.hot) === null || _b === void 0 ? void 0 : _b.addStatusHandler((status) => {
134
+ if (status === 'idle') {
135
+ execute();
136
+ }
137
+ });
138
+ }
139
+ exports.default = {
140
+ registerExportsForReactRefresh,
141
+ isReactRefreshBoundary,
142
+ shouldInvalidateReactRefreshBoundary,
143
+ getRefreshBoundarySignature,
144
+ scheduleUpdate,
145
+ };